Stop using WebCore.exp.in on Mac and iOS.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-10  Alex Christensen  <achristensen@webkit.org>
2
3         Stop using WebCore.exp.in on Mac and iOS.
4         https://bugs.webkit.org/show_bug.cgi?id=141413
5
6         Reviewed by Dan Bates.
7
8         * Configurations/Base.xcconfig:
9         Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
10         * platform/PlatformExportMacros.h:
11         Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
12
13 2015-02-10  Chris Dumez  <cdumez@apple.com>
14
15         Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
16         https://bugs.webkit.org/show_bug.cgi?id=141447
17         <rdar://problem/13811738>
18
19         Reviewed by Alexey Proskuryakov.
20
21         Add another assertion to help track down crash in
22         DocumentLoader::stopLoadingForPolicyChange().
23
24         The trace seems to hint that frameLoader() returns null when
25         stopLoadingForPolicyChange() is called. frameLoader() can only return
26         null after DocumentLoader::detachFromFrame() has been called.
27         Also, stopLoadingForPolicyChange() here is called from the
28         DocumentLoader::continueAfterContentPolicy() policy callback which
29         requires m_waitingForContentPolicy to be true. Therefore, we should
30         assert that m_waitingForContentPolicy is false when m_frame is cleared
31         in DocumentLoader::detachFromFrame().
32
33         * loader/DocumentLoader.cpp:
34         (WebCore::DocumentLoader::detachFromFrame):
35
36 2015-02-10  Alex Christensen  <achristensen@webkit.org>
37
38         Stop using WebCore.exp.in on Mac and iOS.
39         https://bugs.webkit.org/show_bug.cgi?id=141413
40
41         Reviewed by Dan Bates.
42
43         * Configurations/Base.xcconfig:
44         Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
45         * platform/PlatformExportMacros.h:
46         Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
47
48 2015-02-10  Alex Christensen  <achristensen@webkit.org>
49
50         Add more WEBCORE_EXPORT macros for iOS.
51         https://bugs.webkit.org/show_bug.cgi?id=141430
52
53         Reviewed by Tim Horton.
54
55         * bindings/objc/WebScriptObject.h:
56         * bindings/scripts/CodeGeneratorObjC.pm:
57         (GenerateHeader):
58         * dom/Event.h:
59         * dom/Node.h:
60         * editing/FrameSelection.h:
61         * html/HTMLFormControlElement.h:
62         * html/HTMLMediaSession.h:
63         * page/Frame.h:
64         * page/FrameView.h:
65         * platform/ScrollView.h:
66         * platform/ios/PasteboardIOS.mm:
67         * platform/ios/wak/WAKAppKitStubs.h:
68         * platform/ios/wak/WAKClipView.h:
69         * platform/ios/wak/WAKScrollView.h:
70         * platform/ios/wak/WAKView.h:
71         * platform/ios/wak/WAKWindow.h:
72         * platform/ios/wak/WAKWindow.mm:
73         * platform/ios/wak/WKContentObservation.h:
74         * platform/ios/wak/WKGraphics.h:
75         * platform/ios/wak/WebCoreThread.h:
76         * platform/ios/wak/WebCoreThread.mm:
77         * platform/ios/wak/WebCoreThreadRun.h:
78         * platform/ios/wak/WebCoreThreadSystemInterface.h:
79         * platform/network/ios/QuickLook.h:
80         * platform/text/TextBreakIterator.h:
81
82 2015-02-09  David Hyatt  <hyatt@apple.com>
83
84         text-underline-position: under is broken
85         https://bugs.webkit.org/show_bug.cgi?id=141400
86         <rdar://problem/18569583>
87
88         Reviewed by Simon Fraser.
89
90         Added fast/text/text-underline-position-under.html
91
92         * rendering/InlineFlowBox.cpp:
93         (WebCore::InlineFlowBox::computeMaxLogicalBottom):
94         (WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
95         * rendering/InlineFlowBox.h:
96         Switch to using the bottom to compute the offset. Using the top is incorrect, since
97         the heights of boxes can vary.
98
99         Fix a bug where the y() of the box was being used instead of the logical value, making the result
100         wrong for vertical text.
101
102         * rendering/RootInlineBox.cpp:
103         (WebCore::RootInlineBox::maxLogicalBottom):
104         (WebCore::RootInlineBox::maxLogicalTop): Deleted.
105         Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
106         since the old code just ignored the root's placement.
107
108         * rendering/RootInlineBox.h:
109         * style/InlineTextBoxStyle.cpp:
110         (WebCore::computeUnderlineOffset):
111         Call the bottom function now instead of the top.
112
113 2015-02-10  Chris Dumez  <cdumez@apple.com>
114
115         Add assertion to help track down WebCore::DocumentLoader::stopLoadingForPolicyChange() crash
116         https://bugs.webkit.org/show_bug.cgi?id=141441
117         <rdar://problem/13811738>
118
119         Reviewed by Alexey Proskuryakov.
120
121         Add assertion to help track down a crash in
122         WebCore::DocumentLoader::stopLoadingForPolicyChange().
123
124         * loader/DocumentLoader.cpp:
125         (WebCore::DocumentLoader::~DocumentLoader):
126         Make sure the DocumentLoader is not waiting for a content policy
127         response when it is destroyed. If this were to happen, then the
128         lambda function passed to PolicyChecker::checkContentPolicy()
129         would outlive the DocumentLoader. This is an issue because
130         that lambda function captures [this], which is the DocumentLoader.
131         This would cause DocumentLoader::continueAfterContentPolicy() to
132         be called after the DocumentLoader has been destroyed, which would
133         explain the crash.
134
135 2015-02-07  Zalan Bujtas  <zalan@apple.com>
136
137         REGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThread::checkLinesConsistency
138         https://bugs.webkit.org/show_bug.cgi?id=133462
139
140         Reviewed by David Hyatt.
141
142         RenderFlowThread::m_lineToRegionMap stores pointers to the root inlineboxes in the block flow.
143         Normally root inlineboxes remove themselves from this map in their dtors. However when collapsing an anonymous block,
144         we detach the inline tree first and destroy them after. The detached root boxes can't access
145         the flowthread containing block and we end up with dangling pointers in this map.
146         Call removeFlowChildInfo() before detaching the subtree to ensure proper pointer removal.
147
148         Test: fast/multicol/newmulticol/crash-when-switching-to-floating.html
149
150         * rendering/RenderBlock.cpp:
151         (WebCore::RenderBlock::collapseAnonymousBoxChild):
152
153 2015-02-10  Julien Isorce  <j.isorce@samsung.com>
154
155         Render: properly update body's background image
156         https://bugs.webkit.org/show_bug.cgi?id=140183
157
158         When HTML and BODY renderers are both composited the
159         skipBodyBackground condition should also take into account
160         if the HTML's layer can draw its contents.
161
162         Reviewed by Darin Adler.
163
164         Test: animations/animation-background-image.html
165
166         * rendering/RenderBox.cpp:
167         (WebCore::skipBodyBackground): Do not skip
168         if document's layer cannot draw its content.
169         Previously both body and html did not paint the background
170         when they are both composited.
171
172         * rendering/RenderLayerBacking.cpp:
173         (WebCore::RenderLayerBacking::contentChanged): Also redisplay
174         the content.
175
176 2015-02-10  Eric Carlson  <eric.carlson@apple.com>
177
178         [iOS] don't get out of sync when interrupt/resume calls are not balanced
179         https://bugs.webkit.org/show_bug.cgi?id=141310
180
181         Reviewed by Jer Noble.
182
183         No new tests, updated media/video-interruption-with-resume-allowing-play.html.
184
185         * platform/audio/MediaSession.cpp:
186         (WebCore::MediaSession::beginInterruption): Count interruptions.
187         (WebCore::MediaSession::endInterruption): Ignore calls when m_interruptionCount is already zero.
188         * platform/audio/MediaSession.h:
189
190 2015-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
191
192         [GTK] GMutexLocker build issue
193         https://bugs.webkit.org/show_bug.cgi?id=141381
194
195         Reviewed by Žan Doberšek.
196
197         Use always WTF::GMutexLocker because newer glib versions have a
198         GMutexLocker in the public API.
199
200         * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
201         (WebCore::AudioSourceProviderGStreamer::provideInput):
202         (WebCore::AudioSourceProviderGStreamer::handleAudioBuffer):
203         (WebCore::AudioSourceProviderGStreamer::clearAdapters):
204         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
205         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
206         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
207         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
208         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
209         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
210         (webkitVideoSinkTimeoutCallback):
211         (webkitVideoSinkRender):
212         (unlockSampleMutex):
213         (webkitVideoSinkUnlockStop):
214         (webkitVideoSinkStart):
215         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
216         (webKitWebSrcGetProperty):
217         (webKitWebSrcStop):
218         (webKitWebSrcStart):
219         (webKitWebSrcChangeState):
220         (webKitWebSrcQueryWithParent):
221         (webKitWebSrcGetUri):
222         (webKitWebSrcSetUri):
223         (webKitWebSrcNeedDataMainCb):
224         (webKitWebSrcNeedDataCb):
225         (webKitWebSrcEnoughDataMainCb):
226         (webKitWebSrcEnoughDataCb):
227         (webKitWebSrcSeekDataCb):
228         (webKitWebSrcSetMediaPlayer):
229         (StreamingClient::createReadBuffer):
230         (StreamingClient::handleResponseReceived):
231         (StreamingClient::handleDataReceived):
232         (StreamingClient::handleNotifyFinished):
233         (ResourceHandleStreamingClient::wasBlocked):
234         (ResourceHandleStreamingClient::cannotShowURL):
235
236 2015-02-09  Alex Christensen  <achristensen@webkit.org>
237
238         Update WEBCORE_EXPORT to prepare to start using it.
239         https://bugs.webkit.org/show_bug.cgi?id=141409
240
241         Reviewed by Tim Horton.
242
243         * bindings/js/JSDOMGlobalObject.h:
244         * bindings/objc/DOMInternal.h:
245         * bindings/objc/ExceptionHandlers.mm:
246         * bindings/objc/WebScriptObjectPrivate.h:
247         * bindings/scripts/CodeGeneratorJS.pm:
248         (GenerateHeader):
249         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
250         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
251         * bindings/scripts/test/JS/JSTestEventConstructor.h:
252         * bindings/scripts/test/JS/JSTestEventTarget.h:
253         * bindings/scripts/test/JS/JSTestException.h:
254         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
255         * bindings/scripts/test/JS/JSTestInterface.h:
256         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
257         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
258         * bindings/scripts/test/JS/JSTestNondeterministic.h:
259         * bindings/scripts/test/JS/JSTestObj.h:
260         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
261         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
262         * bindings/scripts/test/JS/JSTestTypedefs.h:
263         * bindings/scripts/test/JS/JSattribute.h:
264         * bindings/scripts/test/JS/JSreadonly.h:
265         * css/StyleProperties.h:
266         * dom/DeviceMotionData.h:
267         * dom/Node.h:
268         * dom/Position.h:
269         * dom/ScriptExecutionContext.h:
270         * editing/Editor.h:
271         * editing/htmlediting.h:
272         * html/HTMLInputElement.h:
273         * html/TimeRanges.h:
274         * loader/FrameLoader.h:
275         * loader/cache/CacheValidation.h:
276         * loader/cache/MemoryCache.h:
277         * loader/icon/IconDatabase.h:
278         * page/DatabaseProvider.h:
279         * page/DiagnosticLoggingKeys.h:
280         * page/EventHandler.h:
281         * page/FrameSnapshotting.h:
282         * page/MainFrame.h:
283         * page/PageConsoleClient.h:
284         * page/PageOverlay.h:
285         * platform/CrossThreadCopier.h:
286         * platform/FileSystem.h:
287         * platform/PlatformSpeechSynthesizer.h:
288         * platform/RemoteCommandListener.h:
289         * platform/RuntimeApplicationChecks.h:
290         * platform/graphics/Font.h:
291         * platform/graphics/FontCache.h:
292         * platform/graphics/FontGlyphs.h:
293         * platform/graphics/FontRanges.h:
294         * platform/graphics/GeometryUtilities.h:
295         * platform/graphics/GlyphPage.h:
296         * platform/graphics/Region.h:
297         * platform/graphics/ca/PlatformCALayer.h:
298         * platform/graphics/ca/TileController.h:
299         * platform/graphics/transforms/TransformationMatrix.h:
300         * platform/mac/WebCoreFullScreenWarningView.h:
301         * platform/network/BlobDataFileReference.h:
302         * platform/network/ResourceRequestBase.h:
303         * platform/network/ResourceResponseBase.h:
304         * platform/network/create-http-header-name-table:
305         * platform/network/mac/WebCoreURLResponse.h:
306         * platform/sql/SQLiteDatabaseTracker.h:
307         * platform/sql/SQLiteStatement.h:
308         * rendering/HitTestLocation.h:
309         * rendering/HitTestResult.h:
310         * storage/StorageEventDispatcher.h:
311         Added WEBCORE_EXPORT macros.
312
313 2015-02-09  Chris Dumez  <cdumez@apple.com>
314
315         Check for self-assignment in Length::operator=(const Length&)
316         https://bugs.webkit.org/show_bug.cgi?id=141402
317
318         Reviewed by Andreas Kling.
319
320         Check for self-assignment in Length::operator=(const Length&) as
321         calling memcpy() with the same source and destination addresses has
322         undefined behavior.
323
324         * platform/Length.h:
325         (WebCore::Length::operator=):
326
327 2015-02-09  Roger Fong  <roger_fong@apple.com>
328
329         WebGL: Update 1.0.2 conformance layout tests and address new failure.
330         https://bugs.webkit.org/show_bug.cgi?id=141408.
331         <rdar://problem/19773236>
332
333         Reviewed by Dean Jackson.
334
335         Tests covered by updated 1.0.2 conformance tests.
336
337         * html/canvas/WebGLRenderingContextBase.cpp: 
338         Return null string instead of empty string if parameter validation fails.
339         (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
340         (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
341         (WebCore::WebGLRenderingContextBase::getShaderSource):
342
343 2015-02-09  Timothy Horton  <timothy_horton@apple.com>
344
345         Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
346         https://bugs.webkit.org/show_bug.cgi?id=141353
347
348         Reviewed by Anders Carlsson.
349
350         No new tests, because there's no behavior change.
351
352         * platform/graphics/DisplayRefreshMonitorManager.cpp:
353         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
354         (WebCore::DisplayRefreshMonitorManager::unregisterClient):
355         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
356         * platform/graphics/DisplayRefreshMonitorManager.h:
357         Use a Vector of RefPtr<DisplayRefreshMonitor> instead of a HashMap
358         from uint64_t to RefPtr<DisplayRefreshMonitor>. There's usually only one
359         display, so there's usually only one DisplayRefreshMonitor. Linear search
360         on the Vector will be faster than the hash lookup in all conceivable cases.
361         This also avoids the situation mentioned in the comments in DisplayRefreshMonitorManager.h
362         where we don't know enough about PlatformDisplayID to safely hash it.
363
364 2015-02-09  Jer Noble  <jer.noble@apple.com>
365
366         [Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
367         https://bugs.webkit.org/show_bug.cgi?id=141399
368
369         Reviewed by Eric Carlson.
370
371         Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
372         the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
373         the requested value even if time is not progressing.
374
375         We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
376         be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
377         very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
378         estimation, means we should probably turn it off for iOS and Yosemite.
379
380         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
381         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
382         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
383         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.
384
385 2015-02-07  Roger Fong  <roger_fong@apple.com>
386
387         WebGL 2: Texture call format, internal format, and type validation.
388         https://bugs.webkit.org/show_bug.cgi?id=141318.
389         <rdar://problem/19733828>
390
391         Reviewed by Brent Fulgham.
392
393         Tests will be covered by WebGL2 conformance tests.
394
395         * html/canvas/WebGL2RenderingContext.cpp:
396         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Add missing ExceptionCode argument.
397         (WebCore::WebGL2RenderingContext::copyTexImage2D): Validate texture formats based on GLES3 spec.
398         (WebCore::WebGL2RenderingContext::texSubImage2DBase): Validate using internal format from texture target.
399         (WebCore::WebGL2RenderingContext::texSubImage2DImpl): Validate using internal format from texture target.
400         (WebCore::WebGL2RenderingContext::texSubImage2D): Validate using internal format from texture target.
401         (WebCore::WebGL2RenderingContext::validateTexFuncParameters): Do extra validation for copyTexImage2D.
402         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Validate internal format, format and type combination.
403         (WebCore::WebGL2RenderingContext::validateTexFuncData): Validate new data types.
404         This method now accepts an internal format argument.
405         (WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
406         Helper method to convert internal format to base internal format.
407         * html/canvas/WebGL2RenderingContext.h:
408
409         * html/canvas/WebGLRenderingContext.cpp:
410         (WebCore::WebGLRenderingContext::copyTexImage2D): Moved from WebGLRenderingContextBase.
411         (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
412         (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
413         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
414         (WebCore::WebGLRenderingContext::validateTexFuncParameters): Ditto.
415         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): Ditto.
416         (WebCore::WebGLRenderingContext::validateTexFuncData): Ditto.
417         * html/canvas/WebGLRenderingContext.h:
418
419         * html/canvas/WebGLRenderingContextBase.cpp:
420         (WebCore::WebGLRenderingContextBase::texImage2DBase):
421         (WebCore::WebGLRenderingContextBase::validateTexFunc):
422         (WebCore::WebGLRenderingContextBase::texImage2D):
423         (WebCore::WebGLRenderingContextBase::copyTexImage2D): Deleted.
424         (WebCore::WebGLRenderingContextBase::texSubImage2DBase): Deleted.
425         (WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Deleted.
426         (WebCore::WebGLRenderingContextBase::texSubImage2D): Deleted.
427         (WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType): Deleted.
428         (WebCore::WebGLRenderingContextBase::validateTexFuncParameters): Deleted.
429         (WebCore::WebGLRenderingContextBase::validateTexFuncData): Deleted.
430         * html/canvas/WebGLRenderingContextBase.h: Modify validation type enums to differentiate between CopyImage, TexImage and TexSubImage calls.
431         (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder):  Moved from WebGLRenderingContextBase.
432         (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Ditto.
433         (WebCore::clip1D): Ditto.
434         (WebCore::clip2D): Ditto.
435         * platform/graphics/GraphicsContext3D.h: Rename a typo'ed enum.
436
437 2015-02-09  Commit Queue  <commit-queue@webkit.org>
438
439         Unreviewed, rolling out r179494.
440         https://bugs.webkit.org/show_bug.cgi?id=141395
441
442         Caused slowdown in a WebKit client test scenario (Requested by
443         kling on #webkit).
444
445         Reverted changeset:
446
447         "[Cocoa] Make decoded image data purgeable ASAP."
448         https://bugs.webkit.org/show_bug.cgi?id=140298
449         http://trac.webkit.org/changeset/179494
450
451 2015-02-09  Jer Noble  <jer.noble@apple.com>
452
453         [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
454         https://bugs.webkit.org/show_bug.cgi?id=140955
455
456         Reviewed by Eric Carlson.
457
458         Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
459                webaudio/audiobuffersource-negative-playbackrate.html
460
461         Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
462         start() to set the initial playback position at the end of the play range if the rate of playback
463         is negtive.
464
465         * Modules/webaudio/AudioBufferSourceNode.cpp:
466         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
467         (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
468             for clarity. Add a non-interpolated and interpolated render step for negative playback.
469         (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
470         (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
471         (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.
472
473 2015-02-09  Darin Adler  <darin@apple.com>
474
475         Try to fix build on platforms that use SVG "all in one" file (Windows).
476
477         * svg/SVGAElement.cpp: Don't do "using namespace HTMLNames;" outside of
478         function boundaries, because that will be inherited by other files.
479         (WebCore::SVGAElement::isURLAttribute): Use XLinkNames directly here
480         instead of using HTMLNames implicitly.
481
482         * svg/SVGElement.cpp: Don't do "using namespace HTMLNames;" outside of
483         function boundaries, because that will be inherited by other files.
484         (WebCore::populateAttributeNameToCSSPropertyIDMap): Instead do it in here.
485         (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): And here.
486         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): And here.
487         (WebCore::SVGElement::parseAttribute): And use HTMLNames directly here
488         instead of implicitly.
489
490 2015-02-09  Eric Carlson  <eric.carlson@apple.com>
491
492         [iOS] exit from fullscreen when player view controller calls delegate
493         https://bugs.webkit.org/show_bug.cgi?id=141350
494
495         Reviewed by Jer Noble.
496
497         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
498         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): New, ask delegate
499             to exit from fullscreen.
500
501 2015-02-06  Sergio Villar Senin  <svillar@igalia.com>
502
503         ASSERTION FAILED: resolvedInitialPosition <= resolvedFinalPosition in WebCore::GridSpan::GridSpan
504         https://bugs.webkit.org/show_bug.cgi?id=141328
505
506         Reviewed by Darin Adler.
507
508         Whenever
509         GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition()
510         was trying to place an item with span, it was completely ignoring
511         the resolvedInitialPosition returned by
512         GridResolvedPosition::resolveGridPositionAgainstOppositePosition()
513         and only using the finalResolvedPosition. This works with an
514         unlimited grid which can indefinitely grow. But if the item spans
515         over the grid track limits, then it might happen that the final
516         resolved position is placed before the initial resolved position,
517         something that is forbidden.
518
519         The solution is to directly use the GridSpan returned by
520         GridResolvedPosition::resolveGridPositionAgainstOppositePosition(), if the item
521         does not surpass the track limits then the returned initialResolvedPosition
522         is identical to the provided one, otherwise it's properly corrected to respect
523         track boundaries.
524
525         * rendering/style/GridResolvedPosition.cpp:
526         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
527
528 2015-01-22  Sergio Villar Senin  <svillar@igalia.com>
529
530         [CSS Grid Layout] Tracks' growth limits must be >= base sizes
531         https://bugs.webkit.org/show_bug.cgi?id=140540
532
533         Reviewed by Antti Koivisto.
534
535         The track sizing algorithm is supposed to avoid those situations
536         but they easily (specially when we mix absolute lengths and
537         intrinsic lengths in min and max track sizing functions) and
538         frequently appear. In those cases the outcome from the algorithm
539         is wrong, tracks are not correctly sized.
540
541         In order to fulfill the restriction, m_usedBreadth and
542         m_maxBreadth are now private members of GridTrack and the class
543         now provides a couple of methods to modify them respecting the
544         growthLimit >= baseSize precondition.
545
546         Apart from that, the members and methods of GridTrack were also
547         renamed to match the ones used in the recent algorithm rewrite:
548         usedBreadth became baseSize and maxBreadth is now growthLimit.
549
550         Although the algorithm was not modified at all, this change
551         detected and fixed several invalid results (tracks and/or grids
552         bigger than expected).
553
554         * rendering/RenderGrid.cpp:
555         (WebCore::GridTrack::GridTrack): Renamed fields and methods. Added
556         assertions.
557         (WebCore::GridTrack::baseSize): Renamed from usedBreadth.
558         (WebCore::GridTrack::growthLimit): Renamed from maxBreadth.
559         (WebCore::GridTrack::setBaseSize):
560         (WebCore::GridTrack::setGrowthLimit):
561         (WebCore::GridTrack::growBaseSize): Renamed from growUsedBreadth.
562         (WebCore::GridTrack::growGrowthLimit): Renamed from growMaxBreadth.
563         (WebCore::GridTrack::growthLimitIsInfinite): New helper method.
564         (WebCore::GridTrack::growthLimitIfNotInfinite): Renamed from
565         maxBreadthIfNotInfinite.
566         (WebCore::GridTrack::isGrowthLimitBiggerThanBaseSize): New helper
567         method to verify ASSERTs are true.
568         (WebCore::GridTrack::ensureGrowthLimitIsBiggerThanBaseSize): Ditto.
569         (WebCore::GridTrackForNormalization::GridTrackForNormalization):
570         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
571         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
572         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
573         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
574         (WebCore::sortByGridTrackGrowthPotential):
575         (WebCore::RenderGrid::distributeSpaceToTracks):
576         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
577         (WebCore::RenderGrid::layoutGridItems):
578         (WebCore::RenderGrid::gridAreaBreadthForChild):
579         (WebCore::RenderGrid::populateGridPositions):
580         (WebCore::GridTrack::growUsedBreadth): Renamed to growBaseSize.
581         (WebCore::GridTrack::usedBreadth): Renamed to baseSize.
582         (WebCore::GridTrack::growMaxBreadth): Renamed to growGrowthLimit.
583         (WebCore::GridTrack::maxBreadthIfNotInfinite): Renamed to
584         growthLimitIfNotInfinite.
585         * rendering/RenderGrid.h:
586
587 2015-02-08  Chris Fleizach  <cfleizach@apple.com>
588
589         AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events
590         https://bugs.webkit.org/show_bug.cgi?id=140485
591
592         Reviewed by Anders Carlsson.
593
594         If setting an accessibility attribute results in a modal alert being displayed, it can cause VoiceOver
595         to hang. A simple solution is perform the actual work after a short delay, which will ensure the call
596         returns without hanging.
597
598         Test: platform/mac/accessibility/setting-attributes-is-asynchronous.html
599
600         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
601         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
602         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
603
604 2015-02-08  Benjamin Poulain  <benjamin@webkit.org>
605
606         Add parsing support for CSS Selector L4's case-insensitive attribute
607         https://bugs.webkit.org/show_bug.cgi?id=141373
608
609         Reviewed by Darin Adler.
610
611         This patch adds parsing for the case-insensitive attribute value
612         matching of CSS Selectors Level 4: http://dev.w3.org/csswg/selectors-4/#attribute-case
613         Excuse of a grammar: http://dev.w3.org/csswg/selectors-4/#grammar
614
615         This patch also covers serialization for CSSOM. The serialization
616         is defined here: http://dev.w3.org/csswg/cssom/#serializing-selectors
617
618         Matching is completely ignored in this patch. All the simple selectors
619         are treated as regular attribute selectors.
620
621         Tests: fast/css/parsing-css-attribute-case-insensitive-value-1.html
622                fast/css/parsing-css-attribute-case-insensitive-value-2.html
623                fast/css/parsing-css-attribute-case-insensitive-value-3.html
624                fast/css/parsing-css-attribute-case-insensitive-value-4.html
625
626         * css/CSSGrammar.y.in:
627         * css/CSSParserValues.h:
628         (WebCore::CSSParserSelector::setAttributeValueMatchingIsCaseInsensitive):
629         * css/CSSSelector.cpp:
630         (WebCore::CSSSelector::CSSSelector):
631         (WebCore::CSSSelector::selectorText):
632         * css/CSSSelector.h:
633         (WebCore::CSSSelector::CSSSelector):
634         (WebCore::CSSSelector::setAttributeValueMatchingIsCaseInsensitive):
635         (WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive):
636
637 2015-02-08  Darin Adler  <darin@apple.com>
638
639         Fix CMake-based build.
640
641         * CMakeLists.txt: Added a dependency on the CMakeLists.txt itself, analogous
642         to the one I added in DerivedSources.make.
643
644 2015-02-08  Darin Adler  <darin@apple.com>
645
646         Fix debug build.
647
648         * bindings/js/JSEventListener.h: Removed a call to forwardEventListeners.
649
650 2015-02-08  Darin Adler  <darin@apple.com>
651
652         Remove the SVG instance tree
653         https://bugs.webkit.org/show_bug.cgi?id=140602
654
655         Reviewed by Dean Jackson.
656
657         * CMakeLists.txt: Removed SVGElementInstance source files.
658         * DerivedSources.cpp: Ditto.
659         * DerivedSources.make: Ditto.
660         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
661         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
662         * WebCore.xcodeproj/project.pbxproj: Ditto.
663         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
664
665         * bindings/js/JSEventListener.cpp:
666         (WebCore::forwardsEventListeners): Deleted. Only returned true for JSSVGElementInstance.
667         (WebCore::correspondingElementWrapper): Deleted. Only used for JSSVGElementInstance.
668         (WebCore::createJSEventListenerForAttribute): Deleted. Argument type was JSSVGElementInstance.
669         (WebCore::createJSEventListenerForAdd): Removed most of the code; later we can delete this entirely.
670
671         * bindings/js/JSEventListener.h: Removed the overload of createJSEventListenerForAttribute
672         that takes a JSSVGElementInstance.
673
674         * bindings/js/JSSVGElementInstanceCustom.cpp: Removed.
675
676         * dom/ContainerNodeAlgorithms.h: Updated comment to reflect the fact that
677         this code is really now only used for ContainerNode and no longer needs to
678         exist in a generic form.
679
680         * dom/EventTarget.h: Removed forward declaration of SVGElementInstance.
681         * svg/SVGElement.h: Ditto.
682
683         * dom/EventTargetFactory.in: Removed SVGElementInstance.
684
685         * svg/SVGElementInstance.cpp: Removed.
686         * svg/SVGElementInstance.h: Removed.
687         * svg/SVGElementInstance.idl: Removed.
688
689         * svg/SVGUseElement.cpp:
690         (WebCore::SVGUseElement::insertedInto): Removed obsolete comment.
691         (WebCore::SVGUseElement::instanceTreeIsLoading): Deleted. Unused
692         function that I forgot to delete in my last patch. It also had a
693         glaring mistake, a missing "return" before the recursive call to
694         itself that would cause it to return false when it should return true.
695
696         * svg/SVGUseElement.h: Removed instanceTreeIsLoading.
697
698         * dom/EventDispatcher.cpp: Removed include of SVGElementInstance.h.
699         * page/EventHandler.cpp: Ditto.
700         * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
701         * svg/SVGAElement.cpp: Ditto.
702         * svg/SVGAllInOne.cpp: Ditto.
703         * svg/SVGAnimateMotionElement.cpp: Ditto.
704         * svg/SVGAnimatedTypeAnimator.h: Ditto.
705         * svg/SVGAnimationElement.cpp: Ditto.
706         * svg/SVGCircleElement.cpp: Ditto.
707         * svg/SVGClipPathElement.cpp: Ditto.
708         * svg/SVGComponentTransferFunctionElement.cpp: Ditto.
709         * svg/SVGCursorElement.cpp: Ditto.
710         * svg/SVGElement.cpp: Ditto.
711         * svg/SVGEllipseElement.cpp: Ditto.
712         * svg/SVGFEBlendElement.cpp: Ditto.
713         * svg/SVGFEColorMatrixElement.cpp: Ditto.
714         * svg/SVGFECompositeElement.cpp: Ditto.
715         * svg/SVGFEConvolveMatrixElement.cpp: Ditto.
716         * svg/SVGFEDiffuseLightingElement.cpp: Ditto.
717         * svg/SVGFEDisplacementMapElement.cpp: Ditto.
718         * svg/SVGFEDropShadowElement.cpp: Ditto.
719         * svg/SVGFEGaussianBlurElement.cpp: Ditto.
720         * svg/SVGFEImageElement.cpp: Ditto.
721         * svg/SVGFELightElement.cpp: Ditto.
722         * svg/SVGFEMergeNodeElement.cpp: Ditto.
723         * svg/SVGFEMorphologyElement.cpp: Ditto.
724         * svg/SVGFEOffsetElement.cpp: Ditto.
725         * svg/SVGFESpecularLightingElement.cpp: Ditto.
726         * svg/SVGFETileElement.cpp: Ditto.
727         * svg/SVGFETurbulenceElement.cpp: Ditto.
728         * svg/SVGFilterElement.cpp: Ditto.
729         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Ditto.
730         * svg/SVGForeignObjectElement.cpp: Ditto.
731         * svg/SVGGElement.cpp: Ditto.
732         * svg/SVGGradientElement.cpp: Ditto.
733         * svg/SVGGraphicsElement.cpp: Ditto.
734         * svg/SVGImageElement.cpp: Ditto.
735         * svg/SVGLineElement.cpp: Ditto.
736         * svg/SVGLinearGradientElement.cpp: Ditto.
737         * svg/SVGMarkerElement.cpp: Ditto.
738         * svg/SVGMaskElement.cpp: Ditto.
739         * svg/SVGPathElement.cpp: Ditto.
740         * svg/SVGPatternElement.cpp: Ditto.
741         * svg/SVGPolyElement.cpp: Ditto.
742         * svg/SVGRadialGradientElement.cpp: Ditto.
743         * svg/SVGRectElement.cpp: Ditto.
744         * svg/SVGSVGElement.cpp: Ditto.
745         * svg/SVGScriptElement.cpp: Ditto.
746         * svg/SVGStopElement.cpp: Ditto.
747         * svg/SVGSymbolElement.cpp: Ditto.
748         * svg/SVGTRefElement.cpp: Ditto.
749         * svg/SVGTextContentElement.cpp: Ditto.
750         * svg/SVGTextElement.cpp: Ditto.
751         * svg/SVGTextPathElement.cpp: Ditto.
752         * svg/SVGTextPositioningElement.cpp: Ditto.
753
754 2015-02-07  Dean Jackson  <dino@apple.com>
755
756         Tweak inline playback controls to match system spec
757         https://bugs.webkit.org/show_bug.cgi?id=141375
758         <rdar://problem/19760754>
759
760         Reviewed by Sam Weinig.
761
762         Rework the UI of the inline media controls on iOS, to
763         better match the system specification. I've batched a
764         few changes into one patch because many of them are
765         inter-dependent, and not very aggressive. Changes are:
766
767         - updated artwork for the buttons.
768         - separate artwork for normal and active states.
769         - background images are now explicitly sized and positioned
770           in the middle of the element, allowing audio and video
771           to use the same glyphs even though the elements are
772           different sizes.
773         - use plus-darker blend mode on the button glyphs.
774         - rearranged some of the rules to group things in a
775           logical order.
776         - time should front-pad a "0" character, if less than 10.
777         - no need for an "active" class on the Airplay button (although
778           I won't be surprised if this changes back).
779
780         * Modules/mediacontrols/mediaControlsiOS.css:
781         (::-webkit-media-controls):
782         (video::-webkit-media-controls-wireless-playback-picker-button.active): Deleted.
783         (audio::-webkit-media-controls-wireless-playback-picker-button.active): Deleted.
784         (audio::-webkit-media-controls-play-button:active): Deleted.
785         (audio::-webkit-media-controls-play-button.paused): Deleted.
786         (video::-webkit-media-controls-timeline): Deleted.
787         * Modules/mediacontrols/mediaControlsiOS.js:
788         (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need
789         for the "active" class.
790         (ControllerIOS.prototype.formatTime): Pad with a leading zero.
791
792 2015-02-08  Darin Adler  <darin@apple.com>
793
794         Make SVGUseElement work without creating any SVGElementInstance objects
795         https://bugs.webkit.org/show_bug.cgi?id=141374
796
797         Reviewed by Sam Weinig.
798
799         * dom/ElementIterator.h: Changed the * and -> operators to be const.
800         There is no need for the iterator itself to be modified just to dereference it.
801
802         * dom/TypedElementDescendantIterator.h: Added DoubleTypedElementDescendantIterator.
803         This allows callers to call descendantsOfType on two elements, as long as the caller
804         can guarantee that both have the same number of descendants of that type. It's handy
805         for walking a tree of cloned elements to set up something between each original and
806         its clone. In the future we might instead change the cloning machinery so it can do
807         this work as we clone, and if so, we could consider deleting this.
808
809         * svg/SVGElement.cpp:
810         (WebCore::SVGElement::correspondingElement): Made this const.
811         (WebCore::SVGElement::invalidateInstances): Got rid of the rule that said "this can
812         only be done for an element in a document", since it's useful to do this on an element
813         that has just been removed from a document. Removed the "updateStyleIfNeeded" call
814         here now that the other changes make it no longer needed. Removed an unimportant
815         assertion that we only invalidate use elements that are in a document; that's not
816         a necessary restriction. Streamlined the logic a bit.
817
818         * svg/SVGElement.h: Made correspondingElement const.
819
820         * svg/SVGUseElement.cpp:
821         (WebCore::SVGUseElement::insertedInto): Removed an assertion about
822         m_targetElementInstance since that's gone now.
823         (WebCore::SVGUseElement::svgAttributeChanged): Changed code that transfers
824         size attributes to the shadow tree to use shadowTreeTargetClone instead of
825         m_targetElementInstance.
826         (WebCore::SVGUseElement::clearResourceReferences): Removed code to detach
827         m_targetElementInstance, and also the call to removeAllTargetReferencesForElement,
828         because we no longer use those.
829         (WebCore::SVGUseElement::buildPendingResource): Moved the code to build the
830         shadow tree in here and deleted the buildShadowAndInstanceTree function.
831         Also changed logic so that we use a pending resource any time the target is not
832         a valid one. That helps us correctly handle cases where we initially have an
833         invalid target, but later get a value one
834         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Deleted. The code here
835         was greatly simplified and moved into buildPendingResource.
836         (WebCore::SVGUseElement::buildInstanceTree): Deleted.
837         (WebCore::SVGUseElement::hasCycleUseReferencing): Deleted. Cycles are now
838         detected by the new isValidTarget function and so there's no need for a
839         separate explicit check for a cycle.
840         (WebCore::associateClonesWithOriginals): Added. Helper that makes
841         functions that build the shadow tree simpler and easier to read.
842         (WebCore::associateReplacementCloneWithOriginal): Added. Helper to
843         make associateReplacementClonesWithOriginals simple.
844         (WebCore::associateReplacementClonesWithOriginals): Added. Helper that
845         makes functions that build the shadow tree simpler and easier to read.
846         (WebCore::SVGUseElement::buildShadowTree): Call associateClonesWithOriginals
847         since associateInstancesWithShadowTreeElements no longer does this.
848         (WebCore::SVGUseElement::isValidTarget): Added. Covers all the different
849         reasons a target might not be valid: type of element, reference cycles, and
850         also "not in document" (refactored in here; not sure when that can happen
851         in practice, might be possible to remove it later).
852         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Add checks for
853         documents that are still loading; this used to be checked when building the
854         instance tree. Added calls to associateReplacementClonesWithOriginals and
855         associateClonesWithOriginals; that used to be done by later in the
856         associateInstancesWithShadowTreeElements function. Use isValidTarget so
857         we handle cycles as well as invalid target types.
858         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Added a call to
859         associateReplacementClonesWithOriginals, since we can no longer do that in
860         associateInstancesWithShadowTreeElements.
861         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): Deleted.
862         (WebCore::SVGUseElement::instanceForShadowTreeElement): Deleted.
863         (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed a comment
864         that simply restated the name of the function.
865
866         * svg/SVGUseElement.h: Removed instanceForShadowTreeElement,
867         buildShadowAndInstanceTree, detachInstance, buildInstanceTree,
868         hasCycleUseReferencing, associateInstancesWithShadowTreeElements,
869         instanceForShadowTreeElement, and m_targetElementInstance. Added isValidTarget.
870
871 2015-02-08  Chris Dumez  <cdumez@apple.com>
872
873         [WK2] Add logging to validate the network cache efficacy (Part 1)
874         https://bugs.webkit.org/show_bug.cgi?id=141269
875         <rdar://problem/19632080>
876
877         Reviewed by Antti Koivisto.
878
879         Export an extra symbol.
880
881         * WebCore.exp.in:
882
883 2015-02-07  Chris Fleizach  <cfleizach@apple.com>
884
885         AX: The input element with type="search" has no default focus outline
886         https://bugs.webkit.org/show_bug.cgi?id=140326
887
888         Reviewed by Darin Adler.
889
890         The platform RenderTheme takes care of the search field, and that code
891         was missing a check for whether the element was focused.
892
893         Test: fast/css/focus-ring-exists-for-search-field.html
894
895         * rendering/RenderThemeMac.mm:
896         (WebCore::RenderThemeMac::paintSearchField):
897
898 2015-02-07  Tim Horton  <timothy_horton@apple.com>
899
900         Add some dictionary lookup tests
901         https://bugs.webkit.org/show_bug.cgi?id=141355
902
903         Reviewed by Darin Adler.
904
905         Tests: platform/mac/editing/dictionary-lookup/dictionary-lookup-input.html
906                platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection.html
907                platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection.html
908                platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl.html
909                platform/mac/editing/dictionary-lookup/dictionary-lookup.html
910
911         * WebCore.exp.in:
912         Remove an unneeded export.
913
914         * editing/mac/DictionaryLookup.h:
915         Use OBJC_CLASS instead of @class so that this can be included in pure-C++ files.
916
917         * testing/Internals.cpp:
918         (WebCore::Internals::rangeForDictionaryLookupAtLocation):
919         * testing/Internals.h:
920         * testing/Internals.idl:
921         Expose rangeForDictionaryLookupAtHitTestResult fairly directly to JavaScript.
922
923 2015-02-07  Chris Dumez  <cdumez@apple.com>
924
925         Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
926         https://bugs.webkit.org/show_bug.cgi?id=141321
927
928         Reviewed by Darin Adler.
929
930         Use new Vector::removeFirstMatching() / removeAllMatching() methods.
931
932 2015-02-07  Darin Adler  <darin@apple.com>
933
934         Stop dispatching events to with SVGElementInstance objects as their targets
935         https://bugs.webkit.org/show_bug.cgi?id=141108
936
937         Reviewed by Anders Carlsson.
938
939         Test: svg/custom/use-event-retargeting.html
940
941         * dom/EventDispatcher.cpp:
942         (WebCore::eventTargetRespectingTargetRules): Replaced the code that retargeted
943         events at SVGElementInstance objects with code that retargets them at the use
944         element instead. Also wrote the code in a simpler way.
945
946 2015-02-07  Jer Noble  <jer.noble@apple.com>
947
948         [Mac] Set -contentsScale on AVPlayerLayer to allow AVPlayer to select the appropriate HLS variant.
949         https://bugs.webkit.org/show_bug.cgi?id=141354
950         rdar://problem/19717591
951
952         Reviewed by Darin Adler.
953
954         AVPlayer will try to determine the correct HLS variant based on the bounds of an AVPlayerLayer.
955         When not in a layer tree, AVFoundation is not able to determine the correct mapping from logical
956         units to pixel values. To provide AVPlayer with that scaling value, set -contentsScale based on
957         both the current device scale and the current page scale.
958
959         Since this needs to be set at initialization time, before the AVPlayer is has any AVPlayerItems,
960         add some plumbing up from MediaPlayer to as the HTMLMediaElement for the appropriate contents
961         scale.
962
963         * html/HTMLMediaElement.cpp:
964         (WebCore::HTMLMediaElement::mediaPlayerContentsScale):
965         * html/HTMLMediaElement.h:
966         * platform/graphics/MediaPlayer.h:
967         (WebCore::MediaPlayerClient::mediaPlayerContentsScale):
968         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
969         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
970         * platform/graphics/ca/GraphicsLayerCA.cpp:
971         (WebCore::GraphicsLayerCA::updateContentsScale):
972
973 2015-02-07  Alexey Proskuryakov  <ap@apple.com>
974
975         ASan complains about plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
976         https://bugs.webkit.org/show_bug.cgi?id=141352
977         rdar://problem/19717490
978
979         Reviewed by Anders Carlsson.
980
981         * dom/Document.cpp: (WebCore::Document::ensurePlugInsInjectedScript): This string
982         is not null terminated.
983
984 2015-02-06  Zalan Bujtas  <zalan@apple.com>
985
986         ASSERT repaintContainer->hasLayer() in WebCore::RenderObject::repaintUsingContainer
987         https://bugs.webkit.org/show_bug.cgi?id=140750
988
989         Reviewed by Simon Fraser.
990
991         There's a short period of time when RenderObject::layer() still returns a valid pointer
992         even though we already cleared the hasLayer() flag.
993         Do not use the layer as repaint container in such cases.
994
995         Test: compositing/repaint-container-assertion-when-toggling-compositing.html
996
997         * rendering/RenderObject.cpp:
998         (WebCore::RenderObject::enclosingLayer):
999
1000 2015-02-06  Chris Dumez  <cdumez@apple.com>
1001
1002         Have SQLiteStatement::database() return a reference
1003         https://bugs.webkit.org/show_bug.cgi?id=141348
1004
1005         Reviewed by Andreas Kling.
1006
1007         Have SQLiteStatement::database() return a reference as it can never
1008         return null.
1009
1010         * loader/icon/IconDatabase.cpp:
1011         (WebCore::readySQLiteStatement):
1012         * platform/sql/SQLiteStatement.h:
1013         (WebCore::SQLiteStatement::database):
1014
1015 2015-02-06  Brent Fulgham  <bfulgham@apple.com>
1016
1017         Add youtube-nocookie URL to isYouTubeURL predicate 
1018         https://bugs.webkit.org/show_bug.cgi?id=141347
1019         <rdar://problem/19430657>
1020
1021         Reviewed by Eric Carlson.
1022
1023         * Modules/plugins/YouTubePluginReplacement.cpp:
1024         (WebCore::isYouTubeURL): Update for additional youtube-nocookie site.
1025
1026 2015-02-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
1027
1028         Invalid cast in WebCore::SVGAnimateElement::calculateAnimatedValue.
1029         https://bugs.webkit.org/show_bug.cgi?id=135171.
1030
1031         Reviewed by Dean Jackson.
1032
1033         The bug happens when an SVG element is animated by <animateMotion> followed by an
1034         <animateColor> or an <animate> and the values of the "attributeName" in both elements
1035         are the same. The problem is <animateMotion> should not have an attribute to animate.
1036         If it does by fuzz or by mistake, then we assume the <animateMotion> and the <animate>
1037         animate the same attribute for the same element target. Therefore we schedule them in
1038         the same AnimationVector in SMILTimeContainer::schedule(). When we call
1039         SVGAnimateElementBase::calculateAnimatedValue() for an SVGAnimateColorElement and the
1040         resultElement is SVGAnimateMotionElement, we fail to cast it to SVGAnimateElementBase
1041         because SVGAnimateMotionElement is derived from SVGAnimationElement which is the base
1042         class of all animate elements including SVGAnimateElementBase.
1043
1044         The fix is to nullify setting "attributeName" of an SVGAnimationElement. By doing so,
1045         "attributeName" and its value will be ignored from the <animateMotion> which is correct.
1046         
1047         Tests: svg/animations/animate-montion-invalid-attribute.svg.
1048
1049         * svg/SVGAnimateElementBase.cpp:
1050         (WebCore::SVGAnimateElementBase::setAttributeName):
1051         Do not call SVGAnimationElement::setAttributeName() since SVGAnimationElement should
1052         not have an attribute to animate. We prevent this by bypassing the parent in the class 
1053         hierarchy: SVGAnimationElement and calling SVGSMILElement::setAttributeName() directly.
1054         
1055         * svg/SVGAnimationElement.cpp:
1056         (WebCore::SVGAnimationElement::setAttributeName): Deleted.
1057         * svg/SVGAnimationElement.h:
1058         SVGAnimationElement should not have an attribute to animate. So implement its
1059         setAttributeName() as a null function.
1060
1061 2015-02-06  Simon Fraser  <simon.fraser@apple.com>
1062
1063         Convert the compositing overlap map to use LayoutRects
1064         https://bugs.webkit.org/show_bug.cgi?id=141346
1065         rdar://problem/18206365
1066
1067         Reviewed by Zalan Bujtas.
1068         
1069         If two compositing layers were adjoining but not overlapping, but happened to
1070         have non-integral offsets, then using enclosing IntRects in the overlap map
1071         would cause us to think they are overlapping, and create unnecessary backing store.
1072         
1073         Fix by converting the overlap map to use LayoutRects.
1074
1075         Test: compositing/layer-creation/subpixel-adjacent-layers-overlap.html
1076
1077         * rendering/RenderLayerCompositor.cpp:
1078         (WebCore::OverlapMapContainer::add):
1079         (WebCore::OverlapMapContainer::overlapsLayers):
1080         (WebCore::RenderLayerCompositor::OverlapMap::add):
1081         (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
1082         (WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
1083         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
1084         (WebCore::RenderLayerCompositor::logLayerInfo):
1085         (WebCore::RenderLayerCompositor::addToOverlapMap):
1086         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1087         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1088         * rendering/RenderLayerCompositor.h:
1089
1090 2015-02-06  Andreas Kling  <akling@apple.com>
1091
1092         Ref-ify various getters that return HTMLCollection.
1093         <https://webkit.org/b/141336>
1094
1095         Reviewed by Anders Carlsson.
1096
1097         Make all the getters that return HTMLCollection objects (and never return nullptr)
1098         return Ref instead of RefPtr.
1099
1100         Removed a couple of useless null checks that were exposed by this change.
1101
1102         * accessibility/AccessibilityRenderObject.cpp:
1103         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1104         * bindings/js/JSDOMWindowCustom.cpp:
1105         (WebCore::namedItemGetter):
1106         * bindings/js/JSHTMLDocumentCustom.cpp:
1107         (WebCore::JSHTMLDocument::nameGetter):
1108         * dom/Document.cpp:
1109         (WebCore::Document::ensureCachedCollection):
1110         (WebCore::Document::images):
1111         (WebCore::Document::applets):
1112         (WebCore::Document::embeds):
1113         (WebCore::Document::plugins):
1114         (WebCore::Document::scripts):
1115         (WebCore::Document::links):
1116         (WebCore::Document::forms):
1117         (WebCore::Document::anchors):
1118         (WebCore::Document::all):
1119         (WebCore::Document::windowNamedItems):
1120         (WebCore::Document::documentNamedItems):
1121         (WebCore::Document::iconURLs):
1122         * dom/Document.h:
1123         * dom/Element.cpp:
1124         (WebCore::Element::ensureCachedHTMLCollection):
1125         * dom/Element.h:
1126         * html/ColorInputType.cpp:
1127         (WebCore::ColorInputType::suggestions):
1128         * html/HTMLDataListElement.cpp:
1129         (WebCore::HTMLDataListElement::options):
1130         * html/HTMLDataListElement.h:
1131         * html/HTMLElement.cpp:
1132         (WebCore::HTMLElement::children):
1133         * html/HTMLElement.h:
1134         * html/HTMLFieldSetElement.cpp:
1135         (WebCore::HTMLFieldSetElement::elements):
1136         * html/HTMLFieldSetElement.h:
1137         * html/HTMLFormElement.cpp:
1138         (WebCore::HTMLFormElement::elements):
1139         * html/HTMLFormElement.h:
1140         * html/HTMLInputElement.cpp:
1141         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
1142         * html/HTMLMapElement.cpp:
1143         (WebCore::HTMLMapElement::areas):
1144         * html/HTMLMapElement.h:
1145         * html/HTMLSelectElement.cpp:
1146         (WebCore::HTMLSelectElement::selectedOptions):
1147         (WebCore::HTMLSelectElement::options):
1148         * html/HTMLSelectElement.h:
1149         * html/HTMLTableElement.cpp:
1150         (WebCore::HTMLTableElement::rows):
1151         (WebCore::HTMLTableElement::tBodies):
1152         * html/HTMLTableElement.h:
1153         * html/HTMLTableRowElement.cpp:
1154         (WebCore::HTMLTableRowElement::insertCell):
1155         (WebCore::HTMLTableRowElement::deleteCell):
1156         (WebCore::HTMLTableRowElement::cells):
1157         * html/HTMLTableRowElement.h:
1158         * html/HTMLTableSectionElement.cpp:
1159         (WebCore::HTMLTableSectionElement::insertRow):
1160         (WebCore::HTMLTableSectionElement::deleteRow):
1161         (WebCore::HTMLTableSectionElement::rows):
1162         * html/HTMLTableSectionElement.h:
1163         * html/RangeInputType.cpp:
1164         (WebCore::RangeInputType::updateTickMarkValues):
1165         * rendering/RenderTheme.cpp:
1166         (WebCore::RenderTheme::paintSliderTicks):
1167
1168 2015-02-06  Brent Fulgham  <bfulgham@apple.com>
1169
1170         [iOS] Implement audio track selection in fullscreen.
1171         https://bugs.webkit.org/show_bug.cgi?id=131236
1172         <rdar://problem/16552632>
1173
1174         Reviewed by Eric Carlson.
1175
1176         * platform/ios/WebVideoFullscreenModelVideoElement.h:
1177         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
1178         (WebVideoFullscreenModelVideoElement::selectAudioMediaOption): Provide implementation.
1179         (WebVideoFullscreenModelVideoElement::updateLegibleOptions): Add audio track information
1180         to menu displayed to user.
1181
1182 2015-02-06  Bartlomiej Gajda  <b.gajda@samsung.com>
1183
1184         [MSE] Implement Append Error algorithm.
1185         https://bugs.webkit.org/show_bug.cgi?id=139439
1186
1187         Reviewed by Jer Noble.
1188
1189         If Source Buffer has not received first init segment, then it shall call endOfStream after receiving
1190         Media Segment, as per Media Source spec. (from 17 July 2014) in paragraph 3.5.1 point 6.1.
1191
1192         Based this change on Editor's Draft 12 December 2014, as it clarifies order of events.
1193
1194         Test: media/media-source/media-source-append-media-segment-without-init.html
1195
1196         * Modules/mediasource/MediaSource.cpp:
1197         (WebCore::MediaSource::streamEndedWithError):
1198         * Modules/mediasource/MediaSource.h:
1199         * Modules/mediasource/SourceBuffer.cpp:
1200         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
1201         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1202         (WebCore::SourceBuffer::validateInitializationSegment):
1203         (WebCore::SourceBuffer::appendError):
1204         * Modules/mediasource/SourceBuffer.h:
1205
1206 2015-02-06  Timothy Horton  <timothy_horton@apple.com>
1207
1208         REGRESSION: Lookup doesn't work in RTL
1209         https://bugs.webkit.org/show_bug.cgi?id=141338
1210         <rdar://problem/19738407>
1211
1212         Reviewed by Dan Bernstein.
1213
1214         * editing/Editor.cpp:
1215         (WebCore::Editor::scanSelectionForTelephoneNumbers):
1216         * editing/mac/DictionaryLookup.mm:
1217         (WebCore::rangeExpandedAroundPositionByCharacters):
1218         Positions are independent of writing direction, so we don't
1219         need to (and shouldn't) do anything special for RTL here.
1220
1221 2015-02-06  Maciej Stachowiak  <mjs@apple.com>
1222
1223         REGRESSION(r179706): Caused memory corruption on some tests (Requested by _ap_ on #webkit).
1224         https://bugs.webkit.org/show_bug.cgi?id=141324
1225
1226         Reviewed by Alexey Proskuryakov.
1227
1228         No new tests. This is caught by existing tests under ASAN, and I don't know how to reproduce
1229         it without ASAN.
1230
1231         * rendering/RenderLineBoxList.cpp:
1232         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Give up
1233         and just always invalidate the next line. It's too hard to come up
1234         with the condition that catches all needed cases, doesn't itself
1235         cause a crash, and isn't overzealous. And we do this for the
1236         previous line anyway.  Also clean up the code a bit since it
1237         confusingly reuses a variable, and declares it uninitialized, for
1238         no good reason.
1239
1240 2015-02-05  Dhi Aurrahman  <diorahman@rockybars.com>
1241
1242         Remove duplicate loop after r179532
1243         https://bugs.webkit.org/show_bug.cgi?id=141300
1244
1245         Reviewed by Benjamin Poulain.
1246
1247         No new tests, no behavior changed.
1248
1249         * css/SelectorCheckerTestFunctions.h:
1250         (WebCore::matchesLangPseudoClass):
1251
1252 2015-02-05  Commit Queue  <commit-queue@webkit.org>
1253
1254         Unreviewed, rolling out r179725.
1255         https://bugs.webkit.org/show_bug.cgi?id=141320
1256
1257         caused 2 layout tests to fail (Requested by zalan on #webkit).
1258
1259         Reverted changeset:
1260
1261         "[MSE] Implement Append Error algorithm."
1262         https://bugs.webkit.org/show_bug.cgi?id=139439
1263         http://trac.webkit.org/changeset/179725
1264
1265 2015-02-05  Andreas Kling  <akling@apple.com>
1266
1267         [iOS] Run a full garbage collection on memory warning.
1268         <https://webkit.org/b/141313>
1269         <rdar://problem/19738024>
1270
1271         Reviewed by Chris Dumez.
1272
1273         Make sure that we run a full GC when trying to free up memory, as this might
1274         be our last chance to execute before the kernel suspends this process.
1275
1276         This aligns WebKit2 with the old WebKit1 behavior.
1277
1278         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1279         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1280
1281
1282 2015-02-05  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1283
1284         Fix ASSERTION FAILED: !root->needsLayout() in FrameView::layout()
1285         https://bugs.webkit.org/show_bug.cgi?id=141032
1286
1287         Reviewed by Darin Adler.
1288
1289         This patch moves the !root->needsLayout() assert statement above
1290         updateLayerPositionsAfterLayout() that can modify dirty bit system
1291         when we have RenderMarquee.
1292
1293         * page/FrameView.cpp:
1294         (WebCore::FrameView::layout):
1295
1296 2015-02-05  Bartlomiej Gajda  <b.gajda@samsung.com>
1297
1298         [MSE] Implement Append Error algorithm.
1299         https://bugs.webkit.org/show_bug.cgi?id=139439
1300
1301         Reviewed by Jer Noble.
1302
1303         If Source Buffer has not received first init segment, then it shall call endOfStream after receiving
1304         Media Segment, as per Media Source spec. (from 17 July 2014) in paragraph 3.5.1 point 6.1.
1305
1306         Based this change on Editor's Draft 12 December 2014, as it clarifies order of events.
1307
1308         Test: media/media-source/media-source-append-media-segment-without-init.html
1309
1310         * Modules/mediasource/MediaSource.cpp:
1311         (WebCore::MediaSource::streamEndedWithError):
1312         * Modules/mediasource/MediaSource.h:
1313         * Modules/mediasource/SourceBuffer.cpp:
1314         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
1315         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1316         (WebCore::SourceBuffer::validateInitializationSegment):
1317         (WebCore::SourceBuffer::appendError):
1318         * Modules/mediasource/SourceBuffer.h:
1319
1320 2015-02-05  Maciej Stachowiak  <mjs@apple.com>
1321
1322         Crash due to failing to dirty a removed text node's line box
1323         https://bugs.webkit.org/show_bug.cgi?id=136544
1324
1325         Reviewed by David Hyatt.
1326         
1327         Test: fast/text/remove-text-node-linebox-not-dirty-crash.html
1328
1329         * rendering/RenderLineBoxList.cpp:
1330         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
1331         line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
1332         being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.
1333
1334 2015-02-05  Chris Dumez  <cdumez@apple.com>
1335
1336         Free memory read under MemoryCache::pruneLiveResourcesToSize()
1337         https://bugs.webkit.org/show_bug.cgi?id=141292
1338         <rdar://problem/19725522>
1339
1340         Reviewed by Antti Koivisto.
1341
1342         In MemoryCache::pruneLiveResourcesToSize(), we were iterating over the
1343         m_liveDecodedResources ListHashSet and possibly calling
1344         CachedResource::destroyDecodedData() on the current value. Doing so
1345         would cause a call to ListHashSet::remove() to remove the value pointed
1346         by the current iterator, thus invalidating our iterator.
1347
1348         In this patch, we increment the ListHashSet iterator *before* calling
1349         CachedResource::destroyDecodedData(), while the current iterator is
1350         still valid. Note that this is safe because unlike iteration of most
1351         WTF Hash data structures, iteration is guaranteed safe against mutation
1352         of the ListHashSet, except for removal of the item currently pointed to
1353         by a given iterator.
1354
1355         Test: http/tests/cache/memory-cache-pruning.html
1356
1357         * loader/cache/MemoryCache.cpp:
1358         (WebCore::MemoryCache::pruneLiveResourcesToSize):
1359
1360 2015-02-05  Jer Noble  <jer.noble@apple.com>
1361
1362         [Mac] HLS <video> will not fire 'progress' events, only 'stalled'.
1363         https://bugs.webkit.org/show_bug.cgi?id=141284
1364
1365         Reviewed by Brent Fulgham.
1366
1367         Test: http/tests/media/hls/hls-progress.html
1368
1369         totalBytes() will always return 0 for HLS streams, which will cause didLoadingProgress() to always
1370         return false. Skip this optimization. 
1371
1372         Drive-by fix: duration() will always return 0 for this class as well. Use durationMediaTime() instead.
1373
1374         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1375         (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
1376
1377 2015-02-05  Darin Adler  <darin@apple.com>
1378
1379         Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
1380         https://bugs.webkit.org/show_bug.cgi?id=141148
1381
1382         Reviewed by Brent Fulgham and Anders Carlsson.
1383
1384         Inspired by this change Rob Buis made in Blink:
1385
1386             http://src.chromium.org/viewvc/blink?view=revision&revision=173343
1387
1388         I actually wrote the whole thing and then discovered we did it almost identically.
1389
1390         * svg/SVGAnimatedTypeAnimator.cpp:
1391         (WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
1392         helper function to get around a circular header dependency.
1393         * svg/SVGAnimatedTypeAnimator.h:
1394         (WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.
1395
1396         * svg/SVGElement.cpp:
1397         (WebCore::SVGElement::removedFrom): Use invalidateInstances.
1398         (WebCore::SVGElement::finishParsingChildren): Ditto.
1399         (WebCore::SVGElement::svgAttributeChanged): Ditto.
1400         (WebCore::SVGElement::childrenChanged): Ditto.
1401         (WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
1402         catch anyone who nests InstanceUpdateBlocker by accident.
1403         (WebCore::SVGElement::invalidateInstances): Moved this here from
1404         SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
1405         so it had nothing to do with SVGElementInstance, so it was a simple matter of
1406         converting this into a member function. Added a FIXME about the mysterious
1407         updateStyleIfNeeded that makes multiple tests fail if it's removed.
1408
1409         * svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
1410         InstanceInvalidationGuard class, and private invalidateInstances function.
1411         Unlike the ones in SVGElementInstance these use references so they are then
1412         not copyable without using the WTF_MAKE_NONCOPYABLE macro.
1413
1414         * svg/SVGElementInstance.cpp:
1415         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
1416         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
1417         (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
1418         * svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
1419         invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
1420         delete this entire file.
1421
1422         * svg/SVGAElement.cpp:
1423         (WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
1424         instead of pointer.
1425         * svg/SVGAnimateElementBase.cpp:
1426         (WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
1427         (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
1428         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
1429         * svg/SVGAnimatedPath.cpp:
1430         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
1431         * svg/SVGCircleElement.cpp:
1432         (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
1433         * svg/SVGClipPathElement.cpp:
1434         (WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
1435         * svg/SVGComponentTransferFunctionElement.cpp:
1436         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
1437         * svg/SVGCursorElement.cpp:
1438         (WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
1439         * svg/SVGEllipseElement.cpp:
1440         (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
1441         * svg/SVGFEBlendElement.cpp:
1442         (WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
1443         * svg/SVGFEColorMatrixElement.cpp:
1444         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
1445         * svg/SVGFECompositeElement.cpp:
1446         (WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
1447         * svg/SVGFEConvolveMatrixElement.cpp:
1448         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
1449         * svg/SVGFEDiffuseLightingElement.cpp:
1450         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
1451         * svg/SVGFEDisplacementMapElement.cpp:
1452         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
1453         * svg/SVGFEDropShadowElement.cpp:
1454         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
1455         * svg/SVGFEGaussianBlurElement.cpp:
1456         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
1457         * svg/SVGFEImageElement.cpp:
1458         (WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
1459         * svg/SVGFELightElement.cpp:
1460         (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
1461         * svg/SVGFEMergeNodeElement.cpp:
1462         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
1463         * svg/SVGFEMorphologyElement.cpp:
1464         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
1465         * svg/SVGFEOffsetElement.cpp:
1466         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
1467         * svg/SVGFESpecularLightingElement.cpp:
1468         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
1469         * svg/SVGFETileElement.cpp:
1470         (WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
1471         * svg/SVGFETurbulenceElement.cpp:
1472         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
1473         * svg/SVGFilterElement.cpp:
1474         (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
1475         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1476         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
1477         * svg/SVGForeignObjectElement.cpp:
1478         (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
1479         * svg/SVGGElement.cpp:
1480         (WebCore::SVGGElement::svgAttributeChanged): Ditto.
1481         * svg/SVGGradientElement.cpp:
1482         (WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
1483         * svg/SVGGraphicsElement.cpp:
1484         (WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
1485         * svg/SVGImageElement.cpp:
1486         (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
1487         * svg/SVGLineElement.cpp:
1488         (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
1489         * svg/SVGLinearGradientElement.cpp:
1490         (WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
1491         * svg/SVGMPathElement.cpp:
1492         (WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
1493         * svg/SVGMarkerElement.cpp:
1494         (WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
1495         * svg/SVGMaskElement.cpp:
1496         (WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
1497         * svg/SVGPathElement.cpp:
1498         (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
1499         * svg/SVGPatternElement.cpp:
1500         (WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
1501         * svg/SVGPolyElement.cpp:
1502         (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
1503         * svg/SVGRadialGradientElement.cpp:
1504         (WebCore::SVGRadialGradientElement::svgAttributeChanged): Ditto.
1505         * svg/SVGRectElement.cpp:
1506         (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
1507         * svg/SVGSVGElement.cpp:
1508         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
1509         * svg/SVGScriptElement.cpp:
1510         (WebCore::SVGScriptElement::svgAttributeChanged): Ditto.
1511         * svg/SVGStopElement.cpp:
1512         (WebCore::SVGStopElement::svgAttributeChanged): Ditto.
1513         * svg/SVGSymbolElement.cpp:
1514         (WebCore::SVGSymbolElement::svgAttributeChanged): Ditto.
1515         * svg/SVGTRefElement.cpp:
1516         (WebCore::SVGTRefElement::svgAttributeChanged): Ditto.
1517         * svg/SVGTextContentElement.cpp:
1518         (WebCore::SVGTextContentElement::svgAttributeChanged): Ditto.
1519         * svg/SVGTextPathElement.cpp:
1520         (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
1521         * svg/SVGTextPositioningElement.cpp:
1522         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
1523         * svg/SVGUseElement.cpp:
1524         (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
1525         * svg/animation/SVGSMILElement.cpp:
1526         (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
1527
1528 2015-02-05  Brent Fulgham  <bfulgham@apple.com>
1529
1530         Remind ourselves to remove work-around code
1531         https://bugs.webkit.org/show_bug.cgi?id=141289
1532
1533         Unreviewed gardening: Add a reminder FIXME to CSSParser
1534         so we can remove the MSVC-specific hack in the future.
1535
1536         * css/CSSParser.cpp:
1537
1538 2015-02-05  Zalan Bujtas  <zalan@apple.com>
1539
1540         Do not destroy RenderQuote's text fragment child when quotation mark string is changing.
1541         https://bugs.webkit.org/show_bug.cgi?id=141271
1542         rdar://problem/18169375
1543
1544         Reviewed by Antti Koivisto.
1545
1546         Similar approach as https://codereview.chromium.org/679593004/
1547
1548         This patch ensures that laying out a RenderQuote does not force a sibling RenderQuote's
1549         child renderer(RenderText) to be destroyed.
1550         BreakingContext holds a pointer to the next renderer on the line (BreakingContext::m_nextObject).
1551         While laying out the line, initiated by BreakingContext, placing the current renderer could end up destroying the "next" renderer.
1552         This happens when the pseudo after quotation mark(RenderQuote) becomes floated, the sibling <q>'s pseudo
1553         before text needs to be changed (from " to ') so that we don't end up with 2 sets of the same opening
1554         strings.
1555         The fix is to reuse the RenderTextFragment object instead of destroy/recreate it.
1556
1557         Test: fast/css/content/quote-crash-when-floating.html
1558
1559         * rendering/RenderQuote.cpp:
1560         (WebCore::RenderQuote::RenderQuote):
1561         (WebCore::fragmentChild):
1562         (WebCore::RenderQuote::updateText):
1563         * rendering/RenderQuote.h:
1564         * rendering/RenderTextFragment.cpp:
1565         (WebCore::RenderTextFragment::setText):
1566         (WebCore::RenderTextFragment::setContentString):
1567         * rendering/RenderTextFragment.h:
1568
1569 2015-02-04  Dean Jackson  <dino@apple.com>
1570
1571         [Media iOS] Add a debug setting to always show the optimized fullscreen button
1572         https://bugs.webkit.org/show_bug.cgi?id=141277
1573         <rdar://problem/19724471>
1574
1575         Reviewed by Eric Carlson.
1576
1577         Add a debug option so that we can test the optimized fullscreen
1578         control on media that doesn't support it.
1579
1580         * Modules/mediacontrols/mediaControlsiOS.js: Add gSimulateOptimizedFullscreenAvailable.
1581         (ControllerIOS.prototype.createControls): Check the setting.
1582         (ControllerIOS.prototype.configureInlineControls): Ditto.
1583         (ControllerIOS.prototype.formatTime): Drive-by whitespace cleanup.
1584         (ControllerIOS.prototype.handleBaseGestureChange):
1585         (ControllerIOS.prototype.handleWrapperTouchStart):
1586         (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd):
1587         (ControllerIOS.prototype.handlePresentationModeChange): Drive-by variable renaming.
1588
1589 2015-02-05  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
1590
1591         [Streams API] Implement a barebone ReadableStream interface
1592         https://bugs.webkit.org/show_bug.cgi?id=141045
1593
1594         Reviewed by Benjamin Poulain.
1595
1596         This patch implements the ReadableStream IDL (https://streams.spec.whatwg.org/#rs-model).
1597         No functionality is yet added.
1598         ReadableStreamSource is expected to be implemented for native sources (such as HTTP sources)
1599         as well as JavaScript source through ReadableStreamJSSource.
1600
1601         Test: streams/readablestream-constructor.html
1602
1603         * CMakeLists.txt:
1604         * Configurations/FeatureDefines.xcconfig:
1605         * DerivedSources.cpp:
1606         * DerivedSources.make:
1607         * Modules/streams/ReadableStream.cpp: Added.
1608         (WebCore::ReadableStream::create):
1609         (WebCore::ReadableStream::ReadableStream):
1610         (WebCore::ReadableStream::~ReadableStream):
1611         (WebCore::ReadableStream::state):
1612         (WebCore::ReadableStream::closed):
1613         (WebCore::ReadableStream::ready):
1614         * Modules/streams/ReadableStream.h: Added.
1615         * Modules/streams/ReadableStream.idl: Added.
1616         * Modules/streams/ReadableStreamSource.h: Added.
1617         * WebCore.vcxproj/WebCore.vcxproj:
1618         * WebCore.vcxproj/WebCore.vcxproj.filters:
1619         * WebCore.vcxproj/WebCoreCommon.props:
1620         * WebCore.xcodeproj/project.pbxproj:
1621         * bindings/js/JSBindingsAllInOne.cpp:
1622         * bindings/js/JSReadableStreamCustom.cpp: Added.
1623         (WebCore::JSReadableStream::read):
1624         (WebCore::JSReadableStream::ready):
1625         (WebCore::JSReadableStream::closed):
1626         (WebCore::JSReadableStream::cancel):
1627         (WebCore::JSReadableStream::pipeTo):
1628         (WebCore::JSReadableStream::pipeThrough):
1629         (WebCore::constructJSReadableStream):
1630         * bindings/js/ReadableStreamJSSource.cpp: Added.
1631         (WebCore::ReadableStreamJSSource::create):
1632         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource):
1633         (WebCore::ReadableStreamJSSource::setInternalError):
1634         * bindings/JSReadableStreamJSSource.h: Added.
1635
1636 2015-02-04  Brent Fulgham  <bfulgham@apple.com>
1637
1638         [Win] Unreviewed project file corrections.
1639
1640         Correct some parsing errors caused by recent manual editing of
1641         the project files.
1642
1643         * WebCore.vcxproj/WebCore.vcxproj:
1644         * WebCore.vcxproj/WebCore.vcxproj.filters:
1645
1646 2015-02-04  Eric Carlson  <eric.carlson@apple.com>
1647
1648         [iOS] add method to toggle playback when in the background
1649         https://bugs.webkit.org/show_bug.cgi?id=141270
1650
1651         Reviewed by Dean Jackson.
1652
1653         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1654         (-[WebAVPlayerController togglePlaybackEvenWhenInBackground:]): Added.
1655
1656 2015-02-04  Jer Noble  <jer.noble@apple.com>
1657
1658         [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
1659         https://bugs.webkit.org/show_bug.cgi?id=140825
1660
1661         Reviewed by Eric Carlson.
1662
1663         Test: http/tests/media/clearkey/clear-key-hls-aes128.html
1664
1665         Add support for ClearKey encryption when used with an AES-128 encrypted HLS stream.
1666
1667         * Modules/encryptedmedia/CDM.cpp:
1668         (WebCore::installedCDMFactories): Add the CDMPrivateClearKey factory.
1669         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
1670         (WebCore::CDMPrivateClearKey::supportsKeySystem): Support the "org.w3c.clearkey" key system.
1671         (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
1672         (WebCore::CDMPrivateClearKey::supportsMIMEType): Ditto.
1673         (WebCore::CDMPrivateClearKey::createSession): Create a CDMSessionClearKey.
1674         * Modules/encryptedmedia/CDMPrivateClearKey.h:
1675         (WebCore::CDMPrivateClearKey::create): Simple factory.
1676         (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Virtual destructor.
1677         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Simple destructor.
1678         * Modules/encryptedmedia/CDMSessionClearKey.cpp: Added.
1679         (WebCore::clearKeyVM): Static method returning the VM to be used by JSON parsing.
1680         (WebCore::CDMSessionClearKey::CDMSessionClearKey): Simple constructor.
1681         (WebCore::CDMSessionClearKey::~CDMSessionClearKey): Simple destructor.
1682         (WebCore::CDMSessionClearKey::generateKeyRequest): Store the initData, ensure that it consists of a UTF8-encoded key
1683             URI, and return same.
1684         (WebCore::CDMSessionClearKey::releaseKeys): Purged all cached keys.
1685         (WebCore::CDMSessionClearKey::update): Parse raw JSON-encoded JWK keys, rejecting non-AES, non-oct keys.
1686         (WebCore::CDMSessionClearKey::cachedKeyForKeyID): Return cached keys.
1687         * Modules/encryptedmedia/CDMSessionClearKey.h:
1688
1689         Add support for the "org.w3c.clearkey" CDM to MediaPlayerPrivateAVFoundationObjC, and do so in a platform-agnostic
1690         way by simply asking for raw key data from MediaPlayerClient when notified that a key has been added.
1691
1692         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1693         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1694         (WebCore::keySystemIsSupported):
1695         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1696         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
1697         (WebCore::fulfillRequestWithKeyData): Added utility method.
1698         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1699         (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded):
1700
1701         Pipe a keyAdded() notification down to MediaPlayer and a cachedKeyForKeyId() request up to CDMSessionClearKey:
1702
1703         * Modules/encryptedmedia/MediaKeySession.cpp:
1704         (WebCore::MediaKeySession::cachedKeyForKeyId):
1705         (WebCore::MediaKeySession::addKeyTimerFired):
1706         * Modules/encryptedmedia/MediaKeySession.h:
1707         * Modules/encryptedmedia/MediaKeys.cpp:
1708         (WebCore::MediaKeys::keyAdded):
1709         (WebCore::MediaKeys::cachedKeyForKeyId):
1710         * Modules/encryptedmedia/MediaKeys.h:
1711         * html/HTMLMediaElement.cpp:
1712         (WebCore::HTMLMediaElement::keyAdded):
1713         * html/HTMLMediaElement.h:
1714         * platform/graphics/CDMSession.h:
1715         (WebCore::CDMSession::cachedKeyForKeyID):
1716         * platform/graphics/MediaPlayer.cpp:
1717         (WebCore::MediaPlayer::keyAdded):
1718         (WebCore::MediaPlayer::cachedKeyForKeyId):
1719         * platform/graphics/MediaPlayer.h:
1720         (WebCore::MediaPlayerClient::mediaPlayerCachedKeyForKeyId):
1721         * platform/graphics/MediaPlayerPrivate.h:
1722         (WebCore::MediaPlayerPrivateInterface::keyAdded):
1723
1724         Add new files to project:
1725
1726         * WebCore.xcodeproj/project.pbxproj:
1727         * CMakeLists.txt:
1728         * WebCore.vcxproj/WebCore.vcxproj:
1729         * WebCore.vcxproj/WebCore.vcxproj.filters:
1730
1731 2015-02-04  Commit Queue  <commit-queue@webkit.org>
1732
1733         Unreviewed, rolling out r179618.
1734         https://bugs.webkit.org/show_bug.cgi?id=141263
1735
1736         Off-by-one error causing flaky behavior in webaudio
1737         /audiobuffersource-negative-playbackrate.html (Requested by
1738         jernoble_ on #webkit).
1739
1740         Reverted changeset:
1741
1742         "[WebAudio] AudioBufferSourceNodes should accurately play
1743         backwards if given a negative playbackRate."
1744         https://bugs.webkit.org/show_bug.cgi?id=140955
1745         http://trac.webkit.org/changeset/179618
1746
1747 2015-02-03  David Hyatt  <hyatt@apple.com>
1748
1749         Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
1750         https://bugs.webkit.org/show_bug.cgi?id=141207
1751         <rdar://problem/18387659>
1752
1753         Reviewed by Dean Jackson.
1754
1755         Added fast/multicol/table-dynamic-movement.html
1756
1757         Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.
1758
1759         Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
1760         ended up getting marked for relayout.
1761
1762         Make sure rows do the right thing as well.
1763
1764         * rendering/RenderBlock.cpp:
1765         (WebCore::RenderBlock::layoutPositionedObjects):
1766         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
1767         * rendering/RenderBlock.h:
1768         * rendering/RenderBlockFlow.cpp:
1769         (WebCore::RenderBlockFlow::layoutBlockChild):
1770         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
1771         (WebCore::RenderBlockFlow::positionNewFloats):
1772         * rendering/RenderDeprecatedFlexibleBox.cpp:
1773         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1774         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1775         * rendering/RenderTable.cpp:
1776         (WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
1777         * rendering/RenderTable.h:
1778         * rendering/RenderTableRow.cpp:
1779         (WebCore::RenderTableRow::layout):
1780         * rendering/RenderTableSection.cpp:
1781         (WebCore::RenderTableSection::layout):
1782
1783 2015-02-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
1784
1785         When using SVG as an image, we should load datauri images when these images are not in the image cache.
1786         https://bugs.webkit.org/show_bug.cgi?id=99677.
1787
1788         Reviewed by Darin Adler.
1789         
1790         Data URI sub-resources are not loaded because the networking context of FrameLoader
1791         attached to the SubResourceLoader is set to null. This is done intentionally to
1792         disallow any resource from loading external sub-resources. For example if an <img>
1793         tag has its 'src' attribute points to an svg file, this svg is not allowed to load
1794         an external image through the 'xlink' attribute of an <image> element. This restriction
1795         is not valid if the value of the 'xlink' attribute is a data URI. In this case the image 
1796         should be loaded into memory since there is no network traffic involved. All we need
1797         to do is to decode the data part of the URI.
1798         
1799         The fix is to pass the root FrameLoader, which has a valid NetworkingContext, through
1800         the FrameLoaderClient, to the ResourceHandle::create() which uses the NetworkingContext
1801         to decode the data and fire the load events of the data URI resources.
1802
1803         Tests:  svg/as-image/svg-image-with-data-uri-background.html
1804                 svg/as-image/svg-image-with-data-uri-from-canvas.html
1805                 svg/as-image/svg-image-with-data-uri-images-disabled.html
1806                 svg/as-image/svg-image-with-data-uri-reloading.html
1807                 svg/as-image/svg-image-with-data-uri-use-data-uri.svg
1808                 svg/as-image/svg-image-with-svg-data-uri.html
1809
1810         * accessibility/AccessibilityRenderObject.cpp:
1811         Remove unreferenced header file.
1812
1813         * loader/FrameLoaderClient.h:
1814         Define the null virtual function dataProtocolLoader() which should return the FrameLoader
1815         for loading data URI resources.
1816
1817         * loader/ResourceLoader.cpp:
1818         (WebCore::ResourceLoader::start):
1819         (WebCore::ResourceLoader::dataProtocolFrameLoader):
1820         * loader/ResourceLoader.h:
1821         Add ResourceLoader::dataProtocolFrameLoader() which returns the root FrameLoader. The
1822         root FrameLoader is used to get a valid NetworkingContext which can be passed to
1823         ResourceHandle::create() when url().protocolIsData().
1824
1825         * loader/cache/CachedImage.cpp:
1826         (WebCore::CachedImage::load):
1827         (WebCore::CachedImage::finishLoading):
1828         * loader/cache/CachedResourceLoader.cpp:
1829         (WebCore::CachedResourceLoader::shouldPerformImageLoad):
1830         (WebCore::CachedResourceLoader::shouldDeferImageLoad):
1831         * loader/cache/CachedResourceLoader.h:
1832         Allow loading data URI sub-resources as long as loading images is not disabled. Also we
1833         need to call setDataProtocolLoader() before calling setData() for the isSVGImage case, 
1834         setData() will create a page by calling Page::createPageFromBuffer() via SVGImage::dataChanged(),
1835         and we need to pass the correct FrameLoaderClient to the created FrameLoader of the main
1836          frame of this page.
1837
1838         * svg/graphics/SVGImage.cpp:
1839         (WebCore::SVGImage::SVGImage):
1840         (WebCore::SVGImage::dataChanged):
1841         * svg/graphics/SVGImage.h:
1842         Create a new FrameLoaderClient of type SVGFrameLoaderClient and set it in pageConfiguration
1843         which is used when creating the page from the SVG data URI.
1844
1845         * WebCore.xcodeproj/project.pbxproj:
1846         * svg/graphics/SVGImageChromeClient.h: Removed.
1847         * svg/graphics/SVGImageClients.h: Added.
1848         Add a new class SVGImageChromeClient which overrides the function dataProtocolLoader().
1849         Rename the header file SVGImageChromeClient.h to be SVGImageClients.h since it now 
1850         includes the classes SVGImageChromeClient and SVGFrameLoaderClient.
1851
1852 2015-02-04  Timothy Horton  <timothy_horton@apple.com>
1853
1854         Fix a misplaced include in CaptionUserPreferencesMediaAF
1855         https://bugs.webkit.org/show_bug.cgi?id=141239
1856
1857         Reviewed by Jer Noble.
1858
1859         * page/CaptionUserPreferencesMediaAF.cpp:
1860         CoreText is a system header, and there's already a good spot for it!
1861
1862 2015-02-04  Jer Noble  <jer.noble@apple.com>
1863
1864         [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
1865         https://bugs.webkit.org/show_bug.cgi?id=140955
1866
1867         Reviewed by Eric Carlson.
1868
1869         Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
1870                webaudio/audiobuffersource-negative-playbackrate.html
1871
1872         Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
1873         start() to set the initial playback position at the end of the play range if the rate of playback
1874         is negtive.
1875
1876         * Modules/webaudio/AudioBufferSourceNode.cpp:
1877         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
1878         (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
1879             for clarity. Add a non-interpolated and interpolated render step for negative playback.
1880         (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
1881         (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
1882         (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.
1883
1884 2015-02-04  Eric Carlson  <eric.carlson@apple.com>
1885
1886         video.attribute should not return true just because of fullscreen
1887         https://bugs.webkit.org/show_bug.cgi?id=141219
1888
1889         Reviewed by Dean Jackson.
1890
1891         No new tests, updated media/video-fullscreeen-only-controls.html
1892
1893         * Modules/mediacontrols/mediaControlsApple.js:
1894         (Controller.prototype.shouldHaveControls):
1895         * Modules/mediacontrols/mediaControlsiOS.js:
1896         (ControllerIOS.prototype.isFullScreen):
1897
1898         * html/HTMLMediaElement.cpp:
1899         (WebCore::HTMLMediaElement::controls): Don't consider fullscreen status.
1900         (WebCore::HTMLMediaElement::configureMediaControls): Create controls if a video element
1901             isn't allowed to play inline, or if it is in fullscreen.
1902
1903 2015-02-04  Mark Lam  <mark.lam@apple.com>
1904
1905         Remove concept of makeUsableFromMultipleThreads().
1906         <https://webkit.org/b/141221>
1907
1908         Reviewed by Mark Hahnenberg.
1909
1910         No new tests.
1911
1912         * bindings/js/JSDOMWindowBase.cpp:
1913         (WebCore::JSDOMWindowBase::commonVM):
1914
1915 2015-02-04  Simon Fraser  <simon.fraser@apple.com>
1916
1917         [iOS WK2] Assert in ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() on tab switching
1918         https://bugs.webkit.org/show_bug.cgi?id=141223
1919         rdar://problem/18458993
1920
1921         Reviewed by Tim Horton.
1922         
1923         It's possible to submit a RemoteLayerTree transaction that contains data
1924         about a created layer, but doesn't have any properties for that layer. This
1925         happens when the newly created layer isn't reached during the traversal that
1926         gathers layer properties (i.e. it's not rooted). However, whether we create
1927         a scrolling layer or not requires having properties; they are missing, so we
1928         create a normal layer, but then the scrolling tree commit asserts that we
1929         should have a scrolling layer.
1930         
1931         Fix by making scrolling layers have a corresponding layer type, which is
1932         stored in layer creation properties. This required exposing layer types
1933         up through GraphicsLayer, but that allows for some nice cleanup:
1934         
1935         1. No need to have the hokey shouldUseTiledBacking() GraphicsLayerClient hack
1936            for creating the page tiled layer.
1937         2. The notion of "custom behaviors" can be removed from GraphicsLayer entirely.
1938
1939         Not testable because it requires tab switching.
1940
1941         * WebCore.exp.in:
1942         * platform/graphics/GraphicsLayer.cpp:
1943         (WebCore::GraphicsLayer::GraphicsLayer):
1944         * platform/graphics/GraphicsLayer.h:
1945         (WebCore::GraphicsLayer::initialize):
1946         (WebCore::GraphicsLayer::setCustomBehavior): Deleted.
1947         (WebCore::GraphicsLayer::customBehavior): Deleted.
1948         * platform/graphics/GraphicsLayerClient.h:
1949         (WebCore::GraphicsLayerClient::shouldUseTiledBacking): Deleted.
1950         * platform/graphics/GraphicsLayerFactory.h:
1951         * platform/graphics/ca/GraphicsLayerCA.cpp:
1952         (WebCore::GraphicsLayer::create):
1953         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1954         (WebCore::GraphicsLayerCA::initialize):
1955         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1956         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1957         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1958         (WebCore::GraphicsLayerCA::updateCustomBehavior): Deleted.
1959         (WebCore::GraphicsLayerCA::setCustomBehavior): Deleted.
1960         * platform/graphics/ca/GraphicsLayerCA.h:
1961         (WebCore::GraphicsLayerCA::moveAnimations):
1962         (WebCore::GraphicsLayerCA::copyAnimations):
1963         * platform/graphics/ca/PlatformCALayer.h:
1964         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1965         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1966         (PlatformCALayerMac::PlatformCALayerMac):
1967         (PlatformCALayerMac::commonInit):
1968         (PlatformCALayerMac::updateCustomBehavior): Deleted.
1969         * rendering/RenderLayerBacking.cpp:
1970         (WebCore::RenderLayerBacking::createGraphicsLayer):
1971         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1972         (WebCore::RenderLayerBacking::updateScrollingLayers):
1973         (WebCore::RenderLayerBacking::shouldUseTiledBacking): Deleted.
1974         * rendering/RenderLayerBacking.h:
1975
1976 2015-02-04  Dean Jackson  <dino@apple.com>
1977
1978         [Media] Fullscreen button should always come last in inline controls (141245)
1979         https://bugs.webkit.org/show_bug.cgi?id=141245
1980         <rdar://problem/19714622>
1981
1982         Reviewed by Eric Carlson.
1983
1984         Make sure the optimizedFullscreen button is inserted before the
1985         normal fullscreen button.
1986
1987         * Modules/mediacontrols/mediaControlsiOS.js:
1988         (ControllerIOS.prototype.configureInlineControls):
1989
1990 2015-02-04  Dean Jackson  <dino@apple.com>
1991
1992         REGRESSION: AirPlay button not visible but present in inline toolbar
1993         https://bugs.webkit.org/show_bug.cgi?id=141244
1994         <rdar://problem/19328322>
1995
1996         Reviewed by Eric Carlson.
1997
1998         Replace the use of mask-image with a background-image (which matches
1999         what the other buttons are doing).
2000
2001         * Modules/mediacontrols/mediaControlsiOS.css:
2002         (::-webkit-media-controls):
2003         (video::-webkit-media-controls-wireless-playback-picker-button):
2004         (audio::-webkit-media-controls-wireless-playback-picker-button):
2005         (video::-webkit-media-controls-wireless-playback-picker-button.active):
2006         (audio::-webkit-media-controls-wireless-playback-picker-button.active):
2007
2008 2015-02-04  Chris Dumez  <cdumez@apple.com>
2009
2010         Add removeFirst(value) / removeAll(value) methods to WTF::Vector
2011         https://bugs.webkit.org/show_bug.cgi?id=141192
2012
2013         Reviewed by Benjamin Poulain.
2014
2015         Use new Vector::removeFirst(value) / removeAll(value) API to simplify the
2016         code a bit.
2017
2018         * css/StyleSheetContents.cpp:
2019         (WebCore::StyleSheetContents::unregisterClient):
2020         * html/HTMLFormElement.cpp:
2021         (WebCore::HTMLFormElement::removeFormElement):
2022         (WebCore::HTMLFormElement::removeImgElement):
2023         (WebCore::removeFromVector): Deleted.
2024         * page/Chrome.cpp:
2025         (WebCore::Chrome::unregisterPopupOpeningObserver):
2026         * page/PageOverlayController.cpp:
2027         (WebCore::PageOverlayController::uninstallPageOverlay):
2028         * page/SecurityPolicy.cpp:
2029         (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
2030         * platform/graphics/GraphicsLayer.cpp:
2031         (WebCore::GraphicsLayer::removeFromParent):
2032         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2033         (WebCore::TextureMapperAnimations::remove):
2034         * rendering/RenderSearchField.cpp:
2035         (WebCore::RenderSearchField::addSearchResult):
2036         * rendering/RenderTable.cpp:
2037         (WebCore::RenderTable::removeCaption):
2038         * rendering/svg/RenderSVGText.cpp:
2039         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
2040         * svg/SVGDocumentExtensions.cpp:
2041         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget):
2042         * svg/animation/SMILTimeContainer.cpp:
2043         (WebCore::SMILTimeContainer::unschedule):
2044
2045 2015-02-03  Maciej Stachowiak  <mjs@apple.com>
2046
2047         Crash when printing snapshotted plugins
2048         https://bugs.webkit.org/show_bug.cgi?id=141212
2049
2050         Reviewed by Simon Fraser.
2051
2052         Test: plugins/snapshotting/print-snapshotted-plugin.html
2053
2054         * html/HTMLPlugInImageElement.cpp:
2055         (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer): New
2056         method. If the current renderer is a snapshotted plugin, only
2057         allow children to create renderers if they are part of the
2058         snapshot shadow dom. Otherwise RenderEmbeddedObject invariants
2059         will be violated. This DOM class can have many other renderers, but they
2060         can just follow their own rules.
2061         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay): Make this
2062         const-correct, and don't create UA shadow DOM as a side effect if it doesn't
2063         already exist.
2064         * html/HTMLPlugInImageElement.h:
2065
2066 2015-02-03  Chris Dumez  <cdumez@apple.com>
2067
2068         Regression(r179584): Assertion hit in toResourceLoadPriority() on Yosemite
2069         https://bugs.webkit.org/show_bug.cgi?id=141230
2070
2071         Reviewed by Alexey Proskuryakov.
2072
2073         Handle -1 priority value again in toResourceLoadPriority() as it seems to
2074         be returned by CFNetwork on some configurations.
2075
2076         No new tests, already covered by existing tests.
2077
2078         * platform/network/cf/ResourceRequestCFNet.h:
2079         (WebCore::toResourceLoadPriority):
2080
2081 2015-02-03  Chris Dumez  <cdumez@apple.com>
2082
2083         Drop ResourceLoadPriorityUnresolved resource load priority and use Optional<> instead
2084         https://bugs.webkit.org/show_bug.cgi?id=141186
2085
2086         Reviewed by Antti Koivisto.
2087
2088         Drop ResourceLoadPriorityUnresolved resource load priority value and use
2089         Optional<ResourceLoadPriority> when needed instead. If the Optional
2090         doesn't have a value, then it means it is unresolved. Having
2091         ResourceLoadPriorityUnresolved in ResourceLoadPriority was confusing
2092         because this value is only valid in CachedResourceRequest, it is not
2093         a valid value in CachedResource or in ResourceRequest. After this
2094         refactoring, it now becomes more obvious.
2095
2096 2015-02-03  Chris Dumez  <cdumez@apple.com>
2097
2098         REGRESSION(176609): Very high memory usage in Canvas/reuse.html performance test
2099         https://bugs.webkit.org/show_bug.cgi?id=139812
2100
2101         Reviewed by Geoffrey Garen.
2102
2103         Update DOMTimerFireState.elementsChangedOutsideViewport to keep only
2104         weak pointers to the Elements, instead of ref'ing them, so as to not
2105         extend their life unnecessarily (by preventing garbage-collection).
2106         The same approach was already adopted in r176496 for
2107         DOMTimer.m_elementsCausingThrottling to address the same issue.
2108
2109         No new tests, already covered by Canvas/reuse.html performance test.
2110
2111         * page/DOMTimer.cpp:
2112         (WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElement):
2113         (WebCore::DOMTimerFireState::elementsChangedOutsideViewport):
2114
2115 2015-02-03  Jer Noble  <jer.noble@apple.com>
2116
2117         [MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
2118         https://bugs.webkit.org/show_bug.cgi?id=140929
2119
2120         Reviewed by Alexey Proskuryakov.
2121
2122         Fixes http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html.
2123
2124         Only apply the timestamp offset to the actual sample after step 1.6, where we may loop back to
2125         the top, to avoid double-offsetting the same sample.
2126
2127         * Modules/mediasource/SourceBuffer.cpp:
2128         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2129
2130 2015-02-03  Jeremy Jones  <jeremyj@apple.com>
2131
2132         Restore interface before exiting optimized fullscreen mode.
2133         https://bugs.webkit.org/show_bug.cgi?id=141167
2134
2135         Reviewed by Simon Fraser.
2136
2137         This change allows the user interface to be restored before exiting optimized fullscreen mode.
2138
2139         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add declaration.
2140         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
2141         (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]): Added.
2142         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline): Added.
2143         * platform/spi/ios/AVKitSPI.h: Add new SPI.
2144
2145 2015-02-03  Jeremy Jones  <jeremyj@apple.com>
2146
2147         Prevent flicker when exiting fullscreen by synchronizing transactions.
2148         https://bugs.webkit.org/show_bug.cgi?id=140897
2149
2150         Reviewed by Tim Horton.
2151
2152         Synchronize across CAContexts when moving the video layer between layer hierarchies.
2153         Normally transactions involving multiple CAContexts are not synchronized.
2154
2155         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2156         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2157         * platform/spi/cocoa/QuartzCoreSPI.h: add additional CAContext SPI declarations.
2158
2159 2015-02-03  Ryosuke Niwa  <rniwa@webkit.org>
2160
2161         Smart quoting could move the caret backwards in some configurations
2162         https://bugs.webkit.org/show_bug.cgi?id=141203
2163         <rdar://problem/17452543>
2164
2165         Reviewed by Enrica Casucci.
2166
2167         The bug was caused by markAndReplaceFor not running the code to preserve the selection after
2168         text replacement only when smart quote is enabled. Furthermore, when smart link was disabled,
2169         we never applied smart quote due to the following condition at line 2502:
2170
2171         if (!(shouldPerformReplacement || shouldCheckForCorrection || shouldMarkLink) || !doReplacement)
2172             continue;
2173
2174         This condition prevented the code to apply smart quote from running when both continuous
2175         spellchecking, smart link, and text replacement are disabled.
2176
2177         Fixed the bug by treating smart quotes and smart dashes like any other text replacement and set
2178         shouldPerformReplacement to true whenever either one of those text checking options are present.
2179
2180         Smart link didn't have this issue due to the explicit check for shouldMarkLink.
2181
2182         Smart dashes didn't suffer this problem either because dashes replacement happens only once
2183         the caret has moved past the dashes but his patch makes go through the same code path to preserve
2184         the selection as well for consistency.
2185
2186         Test: editing/inserting/smart-quote-with-all-configurations.html
2187
2188         * editing/Editor.cpp:
2189         (WebCore::Editor::markAndReplaceFor):
2190
2191 2015-02-02  Enrica Casucci  <enrica@apple.com>
2192
2193         Additional emoji support.
2194         https://bugs.webkit.org/show_bug.cgi?id=141047
2195         rdar://problem/19045135
2196
2197         Reviewed by Darin Adler.
2198
2199         Adds support for emoji modifiers and group emoji.
2200
2201         Test: editing/deleting/delete-emoji.html
2202
2203         * platform/graphics/FontCascade.cpp:
2204         (WebCore::FontCascade::characterRangeCodePath):
2205         * platform/text/TextBreakIterator.cpp:
2206         (WebCore::cursorMovementIterator):
2207         * rendering/RenderText.cpp:
2208         (WebCore::isEmojiGroupCandidate):
2209         (WebCore::isEmojiModifier):
2210         (WebCore::RenderText::previousOffsetForBackwardDeletion):
2211
2212 2015-02-03  Jer Noble  <jer.noble@apple.com>
2213
2214         Passing invalid values to OfflineAudioContext's constructor should not crash.
2215         https://bugs.webkit.org/show_bug.cgi?id=141197
2216
2217         Reviewed by Darin Adler.
2218
2219         Test: webaudio/offlineaudiocontext-constructor.html
2220
2221         Throw a SYNTAX_ERR exception if passed in a zero for channelCount or numberOfSamples. This avoids
2222         a crash where OfflineAudioDestinationNode is passed a null renderTarget.
2223
2224         * Modules/webaudio/OfflineAudioContext.cpp:
2225         (WebCore::OfflineAudioContext::create):
2226
2227 2015-02-03  Jer Noble  <jer.noble@apple.com>
2228
2229         [MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
2230         https://bugs.webkit.org/show_bug.cgi?id=140929
2231
2232         Reviewed by Darin Adler.
2233
2234         Test: media/media-source/media-source-timeoffset.html
2235
2236         Changing timestampOffset will correctly offset the presentation and decode times within SourceBuffer and
2237         will correctly modify things like buffered ranges. But those changes need to be reflected in the underlying
2238         MediaSample for decoders to decode and display the samples at the correct times.
2239
2240         Add a method to MediaSample which allows the caller to offset timestamps of the underlying PlatformMediaSample.
2241
2242         * Modules/mediasource/SourceBuffer.cpp:
2243         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Call offsetTimestampsBy() on the sample.
2244         * platform/MediaSample.h:
2245         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2246         (WebCore::MediaSampleAVFObjC::offsetTimestampsBy): Create a new sample with the same underlying data
2247             but with a new timing info array, each timing info offset by the requested amount.
2248         * platform/mock/mediasource/MockBox.h:
2249         (WebCore::MockBox::offsetTimestampsBy): Offset m_presentationTimestamp and m_decodeTimestamp;
2250         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2251         (WebCore::MockMediaSample::offsetTimestampsBy): Pass to MockBox.
2252
2253 2015-02-03  Jer Noble  <jer.noble@apple.com>
2254
2255         [Mac][EME] Crash in CDMSessionMediaSourceAVFObjC::layerDidReceiveError() - NSError not KVO compliant for key NSUnderlyingError.
2256         https://bugs.webkit.org/show_bug.cgi?id=140529
2257
2258         Reviewed by Darin Adler.
2259
2260         The underlying error should be fetched from the userInfo dictionary, not the error itself.
2261
2262         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2263         (WebCore::systemCodeForError):
2264
2265 2015-02-03  Commit Queue  <commit-queue@webkit.org>
2266
2267         Unreviewed, rolling out r179548.
2268         https://bugs.webkit.org/show_bug.cgi?id=141201
2269
2270         Hits debug assertions in 50+ SVG tests (Requested by brrian on
2271         #webkit).
2272
2273         Reverted changeset:
2274
2275         "Move InstanceInvalidationGuard/UpdateBlocker to SVGElement
2276         from SVGElementInstance"
2277         https://bugs.webkit.org/show_bug.cgi?id=141148
2278         http://trac.webkit.org/changeset/179548
2279
2280 2015-02-03  Jer Noble  <jer.noble@apple.com>
2281
2282         [Mac] HLS audio is not correctly selected according to system language
2283         https://bugs.webkit.org/show_bug.cgi?id=140398
2284         rdar://problem/19218487
2285
2286         Reviewed by Darin Adler.
2287
2288         Test: http/tests/media/hls/hls-audio-tracks-locale-selection.html
2289
2290         When AVMediaSelectionOptions come and go and no explicit track selection choice has
2291         been made, automatically pick the most appropriate track according to the user's
2292         current preferred locale settings.
2293
2294         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
2295         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
2296         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC): Set m_shouldSelectOptionAutomatically
2297             to true by default.
2298         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): If m_shouldSelectOptionAutomatically is set
2299             pick the most appropriate media selection option.
2300         (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set m_shouldSelectOptionAutomatically to false.
2301         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2302         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Remove these automatic selection
2303             requests as they are ineffective when -appliesMediaSelectionCriteriaAutomatically is NO.
2304
2305 2015-02-03  Darin Adler  <darin@apple.com>
2306
2307         Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
2308         https://bugs.webkit.org/show_bug.cgi?id=141148
2309
2310         Reviewed by Brent Fulgham.
2311
2312         Inspired by this change Rob Buis made in Blink:
2313
2314             http://src.chromium.org/viewvc/blink?view=revision&revision=173343
2315
2316         I actually wrote the whole thing and then discovered we did it almost identically.
2317
2318         * svg/SVGAnimatedTypeAnimator.cpp:
2319         (WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
2320         helper function to get around a circular header dependency.
2321         * svg/SVGAnimatedTypeAnimator.h:
2322         (WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.
2323
2324         * svg/SVGElement.cpp:
2325         (WebCore::SVGElement::removedFrom): Use invalidateInstances.
2326         (WebCore::SVGElement::finishParsingChildren): Ditto.
2327         (WebCore::SVGElement::svgAttributeChanged): Ditto.
2328         (WebCore::SVGElement::childrenChanged): Ditto.
2329         (WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
2330         catch anyone who nests InstanceUpdateBlocker by accident.
2331         (WebCore::SVGElement::invalidateInstances): Moved this here from
2332         SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
2333         so it had nothing to do with SVGElementInstance, so it was a simple matter of
2334         converting this into a member function. Added a FIXME about the mysterious
2335         updateStyleIfNeeded that makes multiple tests fail if it's removed.
2336
2337         * svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
2338         InstanceInvalidationGuard class, and private invalidateInstances function.
2339         Unlike the ones in SVGElementInstance these use references so they are then
2340         not copyable without using the WTF_MAKE_NONCOPYABLE macro.
2341
2342         * svg/SVGElementInstance.cpp:
2343         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
2344         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
2345         (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
2346         * svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
2347         invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
2348         delete this entire file.
2349
2350         * svg/SVGAElement.cpp:
2351         (WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
2352         instead of pointer.
2353         * svg/SVGAnimateElementBase.cpp:
2354         (WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
2355         (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
2356         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
2357         * svg/SVGAnimatedPath.cpp:
2358         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
2359         * svg/SVGCircleElement.cpp:
2360         (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
2361         * svg/SVGClipPathElement.cpp:
2362         (WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
2363         * svg/SVGComponentTransferFunctionElement.cpp:
2364         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
2365         * svg/SVGCursorElement.cpp:
2366         (WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
2367         * svg/SVGEllipseElement.cpp:
2368         (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
2369         * svg/SVGFEBlendElement.cpp:
2370         (WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
2371         * svg/SVGFEColorMatrixElement.cpp:
2372         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
2373         * svg/SVGFECompositeElement.cpp:
2374         (WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
2375         * svg/SVGFEConvolveMatrixElement.cpp:
2376         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
2377         * svg/SVGFEDiffuseLightingElement.cpp:
2378         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
2379         * svg/SVGFEDisplacementMapElement.cpp:
2380         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
2381         * svg/SVGFEDropShadowElement.cpp:
2382         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
2383         * svg/SVGFEGaussianBlurElement.cpp:
2384         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
2385         * svg/SVGFEImageElement.cpp:
2386         (WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
2387         * svg/SVGFELightElement.cpp:
2388         (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
2389         * svg/SVGFEMergeNodeElement.cpp:
2390         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
2391         * svg/SVGFEMorphologyElement.cpp:
2392         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
2393         * svg/SVGFEOffsetElement.cpp:
2394         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
2395         * svg/SVGFESpecularLightingElement.cpp:
2396         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
2397         * svg/SVGFETileElement.cpp:
2398         (WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
2399         * svg/SVGFETurbulenceElement.cpp:
2400         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
2401         * svg/SVGFilterElement.cpp:
2402         (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
2403         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2404         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
2405         * svg/SVGForeignObjectElement.cpp:
2406         (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
2407         * svg/SVGGElement.cpp:
2408         (WebCore::SVGGElement::svgAttributeChanged): Ditto.
2409         * svg/SVGGradientElement.cpp:
2410         (WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
2411         * svg/SVGGraphicsElement.cpp:
2412         (WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
2413         * svg/SVGImageElement.cpp:
2414         (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
2415         * svg/SVGLineElement.cpp:
2416         (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
2417         * svg/SVGLinearGradientElement.cpp:
2418         (WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
2419         * svg/SVGMPathElement.cpp:
2420         (WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
2421         * svg/SVGMarkerElement.cpp:
2422         (WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
2423         * svg/SVGMaskElement.cpp:
2424         (WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
2425         * svg/SVGPathElement.cpp:
2426         (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
2427         * svg/SVGPatternElement.cpp:
2428         (WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
2429         * svg/SVGPolyElement.cpp:
2430         (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
2431         * svg/SVGRadialGradientElement.cpp:
2432         (WebCore::SVGRadialGradientElement::svgAttributeChanged): Ditto.
2433         * svg/SVGRectElement.cpp:
2434         (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
2435         * svg/SVGSVGElement.cpp:
2436         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
2437         * svg/SVGScriptElement.cpp:
2438         (WebCore::SVGScriptElement::svgAttributeChanged): Ditto.
2439         * svg/SVGStopElement.cpp:
2440         (WebCore::SVGStopElement::svgAttributeChanged): Ditto.
2441         * svg/SVGSymbolElement.cpp:
2442         (WebCore::SVGSymbolElement::svgAttributeChanged): Ditto.
2443         * svg/SVGTRefElement.cpp:
2444         (WebCore::SVGTRefElement::svgAttributeChanged): Ditto.
2445         * svg/SVGTextContentElement.cpp:
2446         (WebCore::SVGTextContentElement::svgAttributeChanged): Ditto.
2447         * svg/SVGTextPathElement.cpp:
2448         (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
2449         * svg/SVGTextPositioningElement.cpp:
2450         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
2451         * svg/SVGUseElement.cpp:
2452         (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
2453         * svg/animation/SVGSMILElement.cpp:
2454         (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
2455
2456 2015-02-02  Darin Adler  <darin@apple.com>
2457
2458         REGRESSION (r170576): Storage leaks in parsing of CSS image sizes
2459         https://bugs.webkit.org/show_bug.cgi?id=141026
2460
2461         Reviewed by Brent Fulgham.
2462
2463         Forgot to actually fix the leak in the successful parse case!
2464
2465         * css/CSSParser.cpp:
2466         (WebCore::CSSParser::sourceSize): Added a call to destroy.
2467
2468 2015-02-02  Benjamin Poulain  <benjamin@webkit.org>
2469
2470         JIT Compile simple cases of :nth-last-child()
2471         https://bugs.webkit.org/show_bug.cgi?id=141053
2472
2473         Reviewed by Andreas Kling.
2474
2475         This patch adds the code generator for :nth-last-child(), skipping
2476         any :nth-last-child(An+B of selector list).
2477
2478         The code generator is boring here, nothing fancy.
2479         There is no optimization opportunity here so it is basically the same
2480         speed as the code generated by Clang when the simple selector is alone.
2481
2482         The only reason to JIT compile this is to avoid going to slow-path
2483         for every selector that contain :nth-last-child().
2484
2485         * cssjit/SelectorCompiler.cpp:
2486         (WebCore::SelectorCompiler::addNthChildType):
2487         The code creating the intermediate representation of :nth-child() is exactly
2488         the same as what we need for :nth-last-child(). I extracted the code from addPseudoClassType()
2489         and share it for both simple selectors.
2490
2491         (WebCore::SelectorCompiler::addPseudoClassType):
2492         I fail :nth-last-child(An+B of selector list). Let's add it later.
2493
2494         (WebCore::SelectorCompiler::minimumRegisterRequirements):
2495         Oops, there was a bug with nthChildOfFilters.
2496
2497         (WebCore::SelectorCompiler::hasAnyCombinators):
2498         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
2499         (WebCore::SelectorCompiler::computeBacktrackingInformation):
2500         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2501         (WebCore::SelectorCompiler::setChildrenAffectedByBackwardPositionalRules):
2502         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
2503
2504 2015-02-02  Zalan Bujtas  <zalan@apple.com>
2505
2506         Simple line layout: Rename FlowContentsIterator to TextFragmentIterator.
2507         https://bugs.webkit.org/show_bug.cgi?id=141177
2508
2509         Rubber-stamped by Antti Koivisto
2510
2511         FlowContentsIterator is easy to confuse with FlowContents::Iterator.
2512         TextFragmentIterator reflects the functionality better.
2513
2514         No change in functionality.
2515
2516         * CMakeLists.txt:
2517         * WebCore.vcxproj/WebCore.vcxproj:
2518         * WebCore.vcxproj/WebCore.vcxproj.filters:
2519         * WebCore.xcodeproj/project.pbxproj:
2520         * rendering/SimpleLineLayout.cpp:
2521         (WebCore::SimpleLineLayout::LineState::setOverflowedFragment):
2522         (WebCore::SimpleLineLayout::LineState::overflowedFragment):
2523         (WebCore::SimpleLineLayout::LineState::appendFragment):
2524         (WebCore::SimpleLineLayout::begin):
2525         (WebCore::SimpleLineLayout::end):
2526         (WebCore::SimpleLineLayout::preWrap):
2527         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2528         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
2529         (WebCore::SimpleLineLayout::firstFragment):
2530         (WebCore::SimpleLineLayout::createLineRuns):
2531         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
2532         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary):
2533         (WebCore::SimpleLineLayout::createTextRuns):
2534         * rendering/SimpleLineLayoutTextFragmentIterator.cpp: Renamed from Source/WebCore/rendering/SimpleLineLayoutFlowContentsIterator.cpp.
2535         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
2536         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
2537         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2538         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
2539         (WebCore::SimpleLineLayout::nextBreakablePosition):
2540         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition):
2541         (WebCore::SimpleLineLayout::findNextNonWhitespace):
2542         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition):
2543         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
2544         * rendering/SimpleLineLayoutTextFragmentIterator.h: Renamed from Source/WebCore/rendering/SimpleLineLayoutFlowContentsIterator.h.
2545         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
2546         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::start):
2547         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::end):
2548         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::width):
2549         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::type):
2550         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsed):
2551         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isBreakable):
2552         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isEmpty):
2553         (WebCore::SimpleLineLayout::TextFragmentIterator::style):
2554         (WebCore::SimpleLineLayout::TextFragmentIterator::segmentForPosition):
2555         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split):
2556         (WebCore::SimpleLineLayout::TextFragmentIterator::characterAt):
2557         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
2558         (WebCore::SimpleLineLayout::TextFragmentIterator::isEnd):
2559
2560 2015-02-02  Chris Dumez  <cdumez@apple.com>
2561
2562         Add diagnostic logging for ResourceResponse's source
2563         https://bugs.webkit.org/show_bug.cgi?id=141170
2564         <rdar://problem/19632080>
2565
2566         Reviewed by Antti Koivisto.
2567
2568         Add diagnostic logging for ResourceResponse's source (network, disk
2569         cache, disk cache after validation) to give us an idea of our network
2570         cache efficacy.
2571
2572         * loader/ResourceLoader.cpp:
2573         (WebCore::logResourceResponseSource):
2574         (WebCore::ResourceLoader::didReceiveResponse):
2575         * page/DiagnosticLoggingKeys.cpp:
2576         (WebCore::DiagnosticLoggingKeys::networkKey):
2577         (WebCore::DiagnosticLoggingKeys::diskCacheKey):
2578         (WebCore::DiagnosticLoggingKeys::diskCacheAfterValidationKey):
2579         (WebCore::DiagnosticLoggingKeys::resourceResponseKey):
2580         (WebCore::DiagnosticLoggingKeys::scriptKey):
2581         (WebCore::DiagnosticLoggingKeys::sourceKey):
2582         * page/DiagnosticLoggingKeys.h:
2583
2584 2015-02-02  Dhi Aurrahman  <diorahman@rockybars.com>
2585
2586         Optimize matchesLangPseudoClass() of :lang()
2587         https://bugs.webkit.org/show_bug.cgi?id=140873
2588
2589         Reviewed by Darin Adler.
2590
2591         Avoid unnecessary memory allocation.
2592
2593         No new tests, no behavior changed.
2594
2595         * css/SelectorCheckerTestFunctions.h:
2596         (WebCore::equalIgnoringASCIICase):
2597         (WebCore::containslanguageSubtagMatchingRange):
2598         (WebCore::matchesLangPseudoClass):
2599
2600 2015-02-02  Roger Fong  <roger_fong@apple.com>
2601
2602         WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 2).
2603         https://bugs.webkit.org/show_bug.cgi?id=141096
2604         <rdar://problem/15002469>
2605
2606         Reviewed by Brent Fulgham.
2607
2608         This patch handles some of the valid arguments that could be passed into getParameter.
2609         The unhandled cases will be implemented as the associated WebGL2 features are implemented.
2610         In addition, getParameter queries that return 64 bit integer currently just return 0 as 
2611         we need to use ::glGetInteger64v which is only available in GLES 3.0 headers.
2612         I will be adding these headers in a future patch.
2613
2614         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2615         (WebCore::toJS): Accept a 64 bit integer type.
2616         * html/canvas/WebGL2RenderingContext.cpp: Handle various parameter inputs.
2617         (WebCore::WebGL2RenderingContext::getParameter):
2618         * html/canvas/WebGLGetInfo.cpp: Add a 64 bit integer type.
2619         (WebCore::WebGLGetInfo::WebGLGetInfo):
2620         (WebCore::WebGLGetInfo::getInt64):
2621         * html/canvas/WebGLGetInfo.h:
2622         * html/canvas/WebGLRenderingContextBase.cpp:
2623         (WebCore::WebGLRenderingContextBase::getInt64Parameter):
2624         * html/canvas/WebGLRenderingContextBase.h:
2625         * platform/graphics/GraphicsContext3D.h:
2626         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2627         (WebCore::GraphicsContext3D::getInteger64v):
2628
2629 2015-02-02  Zalan Bujtas  <zalan@apple.com>
2630
2631         Simple line layout: use std::upper_bound in splitFragmentToFitLine()
2632         https://bugs.webkit.org/show_bug.cgi?id=141146
2633
2634         Reviewed by Antti Koivisto.
2635
2636         Replace the custom binary search implementation with std::upper_bound and
2637         move splitting functionality to TextFragment.
2638
2639         No change in functionality.
2640
2641         * rendering/SimpleLineLayout.cpp:
2642         (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator):
2643         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++):
2644         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=):
2645         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*):
2646         (WebCore::SimpleLineLayout::begin):
2647         (WebCore::SimpleLineLayout::end):
2648         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
2649         * rendering/SimpleLineLayoutFlowContentsIterator.cpp:
2650         (WebCore::SimpleLineLayout::FlowContentsIterator::runWidth):
2651         * rendering/SimpleLineLayoutFlowContentsIterator.h:
2652         (WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::split):
2653
2654 2015-02-02  Geoffrey Garen  <ggaren@apple.com>
2655
2656         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
2657         https://bugs.webkit.org/show_bug.cgi?id=140900
2658
2659         Reviewed by Mark Hahnenberg.
2660
2661         Re-landing just the HandleBlock piece of this patch.
2662
2663         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2664         (WebCore::MemoryPressureHandler::install):
2665
2666 2015-02-02  Brent Fulgham  <bfulgham@apple.com>
2667
2668         [Win] 64-bit build fix after r179492.
2669
2670         * WebCore.vcxproj/WebCore.vcxproj: Forgot to build these files
2671         as standalone under 64-bit target.
2672
2673 2015-02-02  Benjamin Poulain  <bpoulain@apple.com>
2674
2675         Clean up attribute handling: part 2 - attributeNode
2676         https://bugs.webkit.org/show_bug.cgi?id=141109
2677
2678         Reviewed by Andreas Kling.
2679
2680         Our implementation was covering some old legacy behaviors of Firefox,
2681         even copying bugs in some cases.
2682
2683         The spec (https://dom.spec.whatwg.org) now defines the behavior precisely,
2684         let's move a bit closer to that.
2685
2686         Tests: fast/dom/Element/attribute-ascii-case-insensitive-3.html
2687                fast/dom/Element/attribute-setAttributeNode-multiple-times.html
2688                fast/dom/Element/attribute-setAttributeNodeNS-multiple-times.html
2689                fast/dom/Element/mozilla-dom-base-tests/test_bug1075702.html
2690                fast/dom/Element/mozilla-dom-base-tests/test_bug339494.html
2691                fast/dom/Element/mozilla-dom-base-tests/test_bug364092.xhtml
2692                fast/dom/Element/setAttributeNode-overriding-lowercase-values.html
2693
2694         * dom/Element.cpp:
2695         (WebCore::findAttrNodeInList):
2696         New getter for the name-without-namespace case.
2697
2698         (WebCore::Element::setAttributeNode):
2699         This one is the tricky one: https://dom.spec.whatwg.org/#dom-element-setattributenode
2700
2701         When setAttributeNode() is used with an AttributeNode without namespace,
2702         getting the old value behaves like getAttribute(), with ASCII lowercase name matching.
2703         When used with a namespace, getting the old value behaves like getAttributeNS().
2704
2705         Setting the value is a whole different story, the name used always keeps
2706         the original case.
2707
2708         Now that's a bit tricky for us because AttributeNodes are just legacy stuff we don't
2709         used internally.
2710
2711         We have 4 cases to handle:
2712         1) The name being set is lowercase, there was no conflicting name on the element.
2713            That's easy, we just override any node that would exist, set the name otherwise.
2714         2) The name is lowercase but there was an existing attribute for it.
2715            -We create a new AttributeNode for the name to represent the old name.
2716            -We check the names are the same with attribute.name().matches(attrNode->qualifiedName())
2717             and override the value.
2718         3) The name has uppercase characters, there is no conflicting name.
2719            We would not find an element to remove, we just use setAttributeInternal() as usual
2720            to add the attribute;
2721         4) The name has uppercase characters, there is a lowercase conflicing name.
2722            This is the weird behavior: we need to nuke the old attribute, then add the new attribute
2723            with a different case.
2724
2725            First we remove the attribute with a lowercase name with removeAttributeInternal().
2726            That becomes the old node.
2727
2728            There might still be an element of the same name as what we are trying to add. We don't want
2729            to add another version of the same attribute. We need to use findAttributeIndexByName() again
2730            to find if there is a conflicting attribute. Then we call setAttributeInternal() which handle
2731            the both the cases where there was an element or not.
2732
2733         (WebCore::Element::setAttributeNodeNS):
2734         This should work like any "NS" method.
2735
2736         (WebCore::Element::removeAttributeNode):
2737         The method removeAttributeNode() is supposed to be exact.
2738
2739         (WebCore::Element::getAttributeNode):
2740         (WebCore::Element::hasAttribute):
2741         (WebCore::Element::attrIfExists):
2742         * dom/Element.h:
2743         * dom/ElementData.cpp:
2744         (WebCore::ElementData::findAttributeIndexByNameSlowCase): Deleted.
2745         (WebCore::ElementData::findAttributeIndexByNameForAttributeNode): Deleted.
2746         Kill the slow case, every caller has been updated now.
2747         * dom/ElementData.h:
2748         (WebCore::ElementData::findAttributeIndexByName):
2749         * dom/QualifiedName.h:
2750         (WebCore::QualifiedName::matchesIgnoringCaseForLocalName): Deleted.
2751
2752 2015-02-02  peavo@outlook.com  <peavo@outlook.com>
2753
2754         Memory is written to after deallocated, in GraphicsLayer::setMaskLayer.
2755         https://bugs.webkit.org/show_bug.cgi?id=141168
2756
2757         Reviewed by Brent Fulgham.
2758
2759         Visual Studio detected that a deallocated heap block had been modified in GraphicsLayer::setMaskLayer,
2760         when called from RenderLayerBacking::updateChildClippingStrategy.
2761
2762         * rendering/RenderLayerBacking.cpp:
2763         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
2764
2765 2015-02-02  Andreas Kling  <akling@apple.com>
2766
2767         [Cocoa] Make decoded image data purgeable ASAP.
2768         <https://webkit.org/b/140298>
2769         <rdar://problem/19623377>
2770
2771         Reviewed by Antti Koivisto.
2772
2773         Re-landing this patch since it turned out to not be the cause of
2774         the memory regression we saw around that revision.
2775
2776         Mark decoded images as "transient" which makes CoreGraphics mark
2777         the backing stores as purgeable shortly after they're used.
2778
2779         The decoded representation will remain in CoreGraphics's caches
2780         indefinitely unless the kernel gets starved and needs the pages.
2781
2782         Most resources will now reach a state where the encoded data is
2783         mmap'ed from disk cache (once the entire resource is downloaded)
2784         and the decoded data is purgeable.
2785
2786         This also has the side effect of making the MemoryCache more
2787         palatial since the decoded data cost can be deducted for images,
2788         allowing us to cache more resources.
2789
2790         Note that the worst case for this new behavior would be something
2791         like hovering below 100% memory utilization and constantly having
2792         to drop and re-decode images. While churny, it still beats
2793         crashing the process, plus there's tiling to remove many of the
2794         reasons we'd need the decoded data.
2795
2796         * platform/graphics/cg/ImageSourceCG.cpp:
2797         (WebCore::ImageSource::createFrameAtIndex):
2798
2799 2015-02-02  Joseph Pecoraro  <pecoraro@apple.com>
2800
2801         Web Inspector: Support console.table
2802         https://bugs.webkit.org/show_bug.cgi?id=141058
2803
2804         Reviewed by Timothy Hatcher.
2805
2806         * inspector/CommandLineAPIModuleSource.js:
2807         Include "table(foo)" as an alias of "console.table(foo)" on
2808         the command line.
2809
2810 2015-02-02  Roger Fong  <roger_fong@apple.com>
2811
2812         [Win] Build fix following r179482.
2813
2814         * WebCore.vcxproj/WebCore.vcxproj:
2815         * WebCore.vcxproj/WebCore.vcxproj.filters:
2816         * bindings/js/JSBindingsAllInOne.cpp:
2817         * platform/graphics/GraphicsContext3D.h:
2818
2819 2015-02-02  Chris Dumez  <cdumez@apple.com>
2820
2821         Access MemoryCache singleton using MemoryCache::singleton()
2822         https://bugs.webkit.org/show_bug.cgi?id=141104
2823
2824         Reviewed by Andreas Kling.
2825
2826         Access MemoryCache singleton using MemoryCache::singleton() static
2827         member function, instead of a free function, as per the recent
2828         coding style discussion on WebKit-dev.
2829
2830 2015-02-02  Zalan Bujtas  <zalan@apple.com>
2831
2832         Ambiguous naming: Do not call replacedContentRect()'s return value paint rect.
2833         https://bugs.webkit.org/show_bug.cgi?id=141125
2834
2835         Reviewed by Simon Fraser.
2836
2837         It's the content box rect with the object-fit adjustment.
2838
2839         No change in functionality.
2840
2841         * rendering/RenderHTMLCanvas.cpp:
2842         (WebCore::RenderHTMLCanvas::paintReplaced):
2843         * rendering/RenderImage.cpp:
2844         (WebCore::RenderImage::updateInnerContentRect):
2845         (WebCore::RenderImage::paintReplaced):
2846         * rendering/RenderReplaced.cpp:
2847         (WebCore::RenderReplaced::replacedContentRect):
2848         * rendering/SimpleLineLayout.cpp:
2849         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
2850
2851 2015-02-02  Brent Fulgham  <bfulgham@apple.com>
2852
2853         [Win] Build fix after r179476.
2854         https://bugs.webkit.org/show_bug.cgi?id=141026
2855
2856         Reviewed by Anders Carlsson.
2857
2858         MSVC has a compiler bug that forces us to make some explicit statements about how
2859         the passed pointer values are handled.
2860
2861         * css/CSSParser.cpp:
2862         (WebCore::CSSParser::SourceSize::SourceSize):
2863         (WebCore::CSSParser::sourceSize):
2864         * css/CSSParser.h:
2865
2866 2015-02-02  Benjamin Poulain  <benjamin@webkit.org>
2867
2868         Get rid of invalidSelectorVector, use Bison's error recovery instead
2869         https://bugs.webkit.org/show_bug.cgi?id=141147
2870
2871         Reviewed by Darin Adler.
2872
2873         * css/CSSGrammar.y.in:
2874         Instead of reducing a null selector, we can use a real parsing error
2875         to get out of invalid selector endings.
2876
2877         When that happens, Bison will pop the stack until it can reduce any
2878         valid error recovery rules.
2879
2880         The problem is to make sure there is no floating values because
2881         none of the reduce block between the error and the recovery would
2882         be executed.
2883
2884         In this case, "nth_selector_ending" is a non-recursive production of
2885         the NTHCHILDFUNCTIONS. In turn, NTHCHILDFUNCTIONS are productions
2886         of the non-recursive "pseudo". "pseudo" is only used as a trivial
2887         production of "specifier". "specifier" is only used by "specifier_list".
2888
2889         "specifier_list" has error recovery code -> no production could have
2890         generated a floating values between "specifier_list" and "nth_selector_ending".
2891
2892 2015-01-30  Roger Fong  <roger_fong@apple.com>
2893
2894         WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
2895         https://bugs.webkit.org/show_bug.cgi?id=141096
2896         <rdar://problem/15002469>
2897
2898         Reviewed by Brent Fulgham.
2899
2900         This patch implements the WebGL2 versions of getParameter, getIndexedParameter and isEnabled.
2901         It also removes the WebGL1 implementations from WebGLRenderingContextBase and moves it to WebGLRenderingContext.
2902         I’ve stubbed out most of the parameters for now, some of which will be implemented in Part 2, 
2903         and the rest as the our WebGL2 implementation progresses.        
2904
2905         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2906         (WebCore::toJS):
2907         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
2908         * html/canvas/WebGL2RenderingContext.cpp:
2909         (WebCore::WebGL2RenderingContext::getIndexedParameter):
2910         (WebCore::WebGL2RenderingContext::getParameter):
2911         (WebCore::WebGL2RenderingContext::validateCapability):
2912         * html/canvas/WebGL2RenderingContext.h:
2913         * html/canvas/WebGL2RenderingContext.idl:
2914         * html/canvas/WebGLRenderingContext.cpp:
2915         (WebCore::WebGLRenderingContext::getParameter):
2916         (WebCore::WebGLRenderingContext::validateCapability):
2917         * html/canvas/WebGLRenderingContext.h:
2918         * html/canvas/WebGLRenderingContextBase.cpp:
2919         (WebCore::WebGLRenderingContextBase::getParameter): Deleted.
2920         (WebCore::WebGLRenderingContextBase::validateCapability): Deleted.
2921         * html/canvas/WebGLRenderingContextBase.h:
2922         * html/canvas/WebGLRenderingContextBase.idl:
2923         * platform/graphics/GraphicsContext3D.h:
2924
2925 2015-02-02  Daniel Bates  <dabates@apple.com>
2926
2927         [iOS] ASSERTION FAILED: m_scriptExecutionContext->isContextThread() in ContextDestructionObserver::observeContext
2928         https://bugs.webkit.org/show_bug.cgi?id=141057
2929         <rdar://problem/19068790>
2930
2931         Reviewed by Alexey Proskuryakov.
2932
2933         Fixes an issue where we would create-/delete- the RSA crypto keys and dispatch callbacks on the wrong
2934         thread in WebKit1 for iOS. In iOS WebKit1 we should perform such operations on thread WebThread.
2935
2936         This change is covered by existing layout tests.
2937
2938         * crypto/mac/CryptoKeyRSAMac.cpp:
2939         (WebCore::CryptoKeyRSA::generatePair):
2940
2941 2015-02-02  Jeremy Jones  <jeremyj@apple.com>
2942
2943         Prevent crash when accessing WebAVPlayerController.delegate.
2944         https://bugs.webkit.org/show_bug.cgi?id=140893
2945
2946         Reviewed by Darin Adler.
2947
2948         This patch aims to prevent a null delegate access during invalidation by adding null checks before accessing the delegate, by making explicit the recreation of m_playerController, and by consolidating and correcting the teardown sequence.
2949
2950         * WebCore.exp.in:
2951         * platform/ios/WebVideoFullscreenInterface.h: add resetMediaState()
2952         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto.
2953         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2954         (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Check for null before accessing delegate.
2955         (-[WebAVPlayerController play:]): ditto.
2956         (-[WebAVPlayerController pause:]): ditto.
2957         (-[WebAVPlayerController togglePlayback:]): ditto.
2958         (-[WebAVPlayerController setPlaying:]): ditto.
2959         (-[WebAVPlayerController beginScrubbing:]): ditto.
2960         (-[WebAVPlayerController endScrubbing:]): ditto.
2961         (-[WebAVPlayerController seekToTime:]): ditto.
2962         (-[WebAVPlayerController beginScanningForward:]): ditto.
2963         (-[WebAVPlayerController endScanningForward:]): ditto.
2964         (-[WebAVPlayerController beginScanningBackward:]): ditto.
2965         (-[WebAVPlayerController endScanningBackward:]): ditto.
2966         (-[WebAVPlayerController seekToBeginning:]): ditto.
2967         (-[WebAVPlayerController seekToEnd:]): ditto.
2968         (-[WebAVPlayerController setCurrentAudioMediaSelectionOption:]): ditto.
2969         (-[WebAVPlayerController setCurrentLegibleMediaSelectionOption:]): ditto.
2970         (-[WebAVPlayerController layoutSublayersOfLayer:]): ditto.
2971         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): initialize m_playerController
2972         (WebVideoFullscreenInterfaceAVKit::resetMediaState): Added.
2973         (WebVideoFullscreenInterfaceAVKit::setDuration): remove playerController()
2974         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto.
2975         (WebVideoFullscreenInterfaceAVKit::setRate): ditto.
2976         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto.
2977         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto.
2978         (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): ditto.
2979         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto.
2980         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto.
2981         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto.
2982         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): ditto.
2983         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): ditto.
2984         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): consolidated cleanup code from invalidate()
2985         (WebVideoFullscreenInterfaceAVKit::invalidate): consolidate cleanup code.
2986         (WebVideoFullscreenInterfaceAVKit::playerController): Deleted.
2987         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2988         (WebVideoFullscreenModelVideoElement::setVideoElement): call resetMediaState()
2989
2990 2015-02-02  Darin Adler  <darin@apple.com>
2991
2992         REGRESSION (r170576): Storage leaks in parsing of CSS image sizes
2993         https://bugs.webkit.org/show_bug.cgi?id=141026
2994
2995         Reviewed by Anders Carlsson.
2996
2997         * css/CSSGrammar.y.in: Fixed all the shift/reduce conflicts caused
2998         by the ENABLE_PICTURE_SIZES code by removing all the redundant
2999         maybe_space which caused them. Rearranged the productions for
3000         ENABLE_PICTURE_SIZES to tighten up the code quite a bit. Changed
3001         the code to build up the source size vector as a Vector instead of
3002         a special class, and use the SourceSize struct from inside the
3003         CSSParser class.'
3004
3005         * css/CSSParser.cpp:
3006         (WebCore::CSSParser::setupParser): Changed this to take a StringView.
3007         In the future we can change all the parsing functions to take StringView,
3008         since they don't work with the String in place.
3009         (WebCore::CSSParser::parseSizesAttribute): Changed to return a vector
3010         of SourceSize instead of a SourceSizeList. This is better because it's
3011         a real CSS data structure that does not contain a CSSParserValue.
3012         (WebCore::CSSParser::sourceSize): Added. Helper that creates a
3013         SourceSize, mapping parser data structures into real CSS ones.
3014
3015         * css/CSSParser.h: Updated for changes above.
3016
3017         * css/MediaQuery.cpp:
3018         (WebCore::MediaQuery::MediaQuery): Use std::make_unique and the copy
3019         constructor directly instead of using a MediaQuery::copy function.
3020
3021         * css/MediaQueryExp.cpp: Streamlined the class a little bit.
3022         * css/MediaQueryExp.h: Removed unneeded includes. Moved functions out
3023         of the class body so the class is easier to read. Removed the unneeded
3024         copy function.
3025
3026         * css/SourceSizeList.cpp:
3027         (WebCore::SourceSize::match): Changed to use WTF::move instead
3028         of releasing and then re-creating the unique_ptr.
3029         (WebCore::computeLength): Added a comment to explain this function
3030         is using an incorrect strategy. Also added some type checking code
3031         to handle cases where a null or non-primitive CSS value might be
3032         returned. Probably dead code, but we don't want to risk a bad cast.
3033         Worthe cleaning up when we fix the strategy.
3034         (WebCore::SourceSizeList::getEffectiveSize): Updated since the
3035         vector now contains actual SourceSize objects rather than pointers
3036         to SourceSize objects on the heap.
3037
3038         * css/SourceSizeList.h: Changed the CSSParserValue argument to be
3039         an rvalue reference to make it clearer that we take ownership of it
3040         when it's moved in. Added a move constructor and a destructor. Added
3041         comments explaining that it's not correct design to use a
3042         CSSParserValue here, outside the parser. Changed SourceSizeList's
3043         append function to move a SourceSize in rather than a unique_ptr.
3044         Made getEffectiveSize private. Moved the various inline functions to
3045         the bottom of the file to make the class definitions easier to read.
3046
3047
3048         * css/SourceSizeList.cpp: Made almost everything about this private
3049         to this source file instead of public in the header.
3050         (WebCore::match): Made this a free function instead of a member function
3051         and made it take the media query expression as an argument.
3052         (WebCore::computeLength): Changed the argument type to CSSValue*,
3053         rather than using CSSParserValue here outside the parser.
3054         (WebCore::parseSizesAttribute): Streamlined and simplified this.
3055         Now that the parser builds the list in the correct order, there was
3056         no need to iterate backwards any more so we could use a modern for
3057         loop.
3058
3059         * css/SourceSizeList.h: Removed almost everything in this header.
3060
3061         * html/HTMLImageElement.cpp:
3062         (WebCore::HTMLImageElement::parseAttribute): Call the
3063         parseSizesAttribute function as free function since it's no longer
3064         a member of a SourceSizeList class.
3065
3066         * html/parser/HTMLPreloadScanner.cpp:
3067         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3068         Ditto.
3069
3070 2015-02-02  Darin Adler  <darin@apple.com>
3071
3072         Fix some leaks found by the leak bot
3073         https://bugs.webkit.org/show_bug.cgi?id=141149
3074
3075         Reviewed by Alexey Proskuryakov.
3076
3077         * bindings/js/JSSubtleCryptoCustom.cpp:
3078         (WebCore::importKey): Changed argument types to std::unique_ptr for better code clarity.
3079         (WebCore::JSSubtleCrypto::importKey): Use WTF::move instead of release.
3080         (WebCore::JSSubtleCrypto::wrapKey): Fixed leaks by adding missing delete calls to the
3081         case where we get a DOM exception.
3082         (WebCore::JSSubtleCrypto::unwrapKey): Ditto.
3083
3084         * dom/SelectorQuery.cpp:
3085         (WebCore::SelectorQuery::SelectorQuery): Use WTF::move here. Not clear how this could
3086         have caused the storage leak, but it does seem obviously missing. The leak is pretty big,
3087         implying that we leak almost all CSSSelectorList objects we parse; not sure this fixes it.
3088
3089         * loader/WorkerThreadableLoader.cpp:
3090         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): Added code to
3091         deleted the unguarded pointer if postTaskForModeToWorkerGlobalScope fails.
3092         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): Ditto.
3093         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
3094         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.
3095
3096         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
3097         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Added missing adoptNS.
3098
3099         * platform/graphics/mac/GraphicsContextMac.mm:
3100         (WebCore::GraphicsContext::updateDocumentMarkerResources): Added missing release.
3101
3102 2015-02-01  Chris Dumez  <cdumez@apple.com>
3103
3104         Use more references in HistoryItem
3105         https://bugs.webkit.org/show_bug.cgi?id=141133
3106
3107         Reviewed by Andreas Kling.
3108
3109         Use more references in HistoryItem instead of pointers.
3110
3111 2015-02-01  Commit Queue  <commit-queue@webkit.org>
3112
3113         Unreviewed, rolling out r179467 and r179470.
3114         https://bugs.webkit.org/show_bug.cgi?id=141144
3115
3116         Broke svg/custom/use-events-crash.svg (Requested by ap on
3117         #webkit).
3118
3119         Reverted changesets:
3120
3121         "Stop dispatching events with SVGElementInstance objects as
3122         their targets"
3123         https://bugs.webkit.org/show_bug.cgi?id=141108
3124         http://trac.webkit.org/changeset/179467
3125
3126         "REGRESSION(r179467): svg/custom/use-events-crash.svg times
3127         out"
3128         http://trac.webkit.org/changeset/179470
3129
3130 2015-01-31  Darin Adler  <darin@apple.com>
3131
3132         Stop dispatching events to with SVGElementInstance objects as their targets
3133         https://bugs.webkit.org/show_bug.cgi?id=141108
3134
3135         Reviewed by Anders Carlsson.
3136
3137         Test: svg/custom/use-event-retargeting.html
3138
3139         * dom/EventDispatcher.cpp:
3140         (WebCore::eventTargetRespectingTargetRules): Replaced the code that retargeted
3141         events at SVGElementInstance objects with code that retargets them at the use
3142         element instead. Also wrote the code in a simpler way.
3143
3144 2015-02-01  Zan Dobersek  <zdobersek@igalia.com>
3145
3146         [TexMap] Optimize TextureMapperLayer::removeAllChildren()
3147         https://bugs.webkit.org/show_bug.cgi?id=140734
3148
3149         Reviewed by Chris Dumez.
3150
3151         Instead of removing the children from the Vector member one by one,
3152         move the Vector out and iterate through the ex-children, clearing
3153         out the pointer to the parent.
3154
3155         * platform/graphics/texmap/TextureMapperLayer.cpp:
3156         (WebCore::TextureMapperLayer::removeAllChildren):
3157
3158 2015-02-01  Zan Dobersek  <zdobersek@igalia.com>
3159
3160         [TexMap] Avoid unnecessary TransformationMatrix copies in GraphicsLayerTransform
3161         https://bugs.webkit.org/show_bug.cgi?id=140735
3162
3163         Reviewed by Chris Dumez.
3164
3165         * platform/graphics/GraphicsLayerTransform.cpp:
3166         (WebCore::GraphicsLayerTransform::combined): Return a const reference to the matrix.
3167         (WebCore::GraphicsLayerTransform::combinedForChildren): Ditto.
3168         (WebCore::GraphicsLayerTransform::combineTransforms): First copy the parent transform,
3169         then apply the translation and multiplication. Previously this copied the parent
3170         transform into a temporary object, performed the translation and multiplication, and
3171         copied that temporary object again when assigning to the member variable.
3172         (WebCore::GraphicsLayerTransform::combineTransformsForChildren): Mark const. m_childrenDirty
3173         and m_combinedForChildren members are marked mutable.
3174         * platform/graphics/GraphicsLayerTransform.h:
3175
3176 2015-01-31  Myles C. Maxfield  <litherum@gmail.com>
3177
3178         REGRESSION (r177689): Emoji variation sequences rendered incorrectly (as characters from other non-emoji font)
3179         https://bugs.webkit.org/show_bug.cgi?id=141112
3180
3181         Reviewed by Sam Weinig.
3182
3183         Typo in r177689.
3184
3185         Test: platform/mac/fast/text/combining-mark-paint.html
3186
3187         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3188         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3189
3190 2015-01-31  Commit Queue  <commit-queue@webkit.org>
3191
3192         Unreviewed, rolling out r178183.
3193         https://bugs.webkit.org/show_bug.cgi?id=141132
3194
3195         Caused more mallocing than the volatility saved. (Requested by
3196         kling on #webkit).
3197
3198         Reverted changeset:
3199
3200         "[Cocoa] Make decoded image data purgeable ASAP."
3201         https://bugs.webkit.org/show_bug.cgi?id=140298
3202         http://trac.webkit.org/changeset/178183
3203
3204 2015-01-31  Chris Dumez  <cdumez@apple.com>
3205
3206         Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING enabled
3207         https://bugs.webkit.org/show_bug.cgi?id=141110
3208
3209         Reviewed by Antti Koivisto.
3210
3211         Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING
3212         enabled. Previously, we would be using a HashMap of HashMap to store
3213         CachedResources. The outer HashMap would use the URL as key and the inner
3214         HashMap would use the partition name as key. This would make traversing the
3215         structure overly complicated, especially considering that the code needs to
3216         traverse a simple HashMap if CACHE_PARTITIONING is disabled.
3217
3218         This patch updates the CachedResourceMap structure to be a simple HashMap,
3219         whose key is an std::pair<URL, String /* partitionName */>. Having a flat
3220         structure simplifies the traversal code a lot and enables more code sharing
3221         between CACHE_PARTITIONING and !CACHE_PARTITIONING. This shouldn't regress
3222         performance because we always have both a URL and a partition name when we
3223         need to look up a resource. We never need to retrieve all resources with
3224         a particular URL.
3225
3226         This patch also switches to using a URL as key instead of a String as we
3227         always have a URL has input.
3228
3229         * loader/cache/MemoryCache.cpp:
3230         (WebCore::MemoryCache::add):
3231         (WebCore::MemoryCache::revalidationSucceeded):
3232         (WebCore::MemoryCache::resourceForRequestImpl):
3233         (WebCore::MemoryCache::removeImageFromCache):
3234         (WebCore::MemoryCache::remove):
3235         After removing the resource from the CachedResourceMap, remove the
3236         sessionID from m_sessionResources if the CachedResourceMap is now
3237         empty. Previously, no code was removing sessionIDs from
3238         m_sessionResources.
3239
3240         (WebCore::MemoryCache::removeResourcesWithOrigin):
3241         (WebCore::MemoryCache::getOriginsWithCache):
3242         (WebCore::MemoryCache::getStatistics):
3243         (WebCore::MemoryCache::setDisabled):
3244         * loader/cache/MemoryCache.h:
3245
3246 2015-01-31  Sam Weinig  <sam@webkit.org>
3247
3248         Merge the iOS implementations of GraphicsContext::drawText and GraphicsContext::drawBidiText with the platform independent ones
3249         https://bugs.webkit.org/show_bug.cgi?id=141131
3250
3251         Reviewed by Antti Koivisto.
3252
3253         * platform/graphics/GraphicsContext.cpp:
3254         (WebCore::GraphicsContext::drawText):
3255         The only difference between the two implementation here was the iOS one returns the length of
3256         the text that was drawn. As all platforms now support that, we can merge by keeping the iOS one.
3257
3258         (WebCore::GraphicsContext::drawBidiText):
3259         This function had a few differences:
3260             - iOS returns the length of the text that was drawn.
3261                 Since this is not used anywhere, I dropped this ability.
3262             - iOS took additional inputs of initial bidi status and run length (and returned the
3263               the final bidi status as an out parameter)
3264                 Since this was also unused, I dropped it.
3265             - iOS used the fact that font.drawText() returns the length that was drawn, to avoid
3266               measuring the text twice.
3267                 I kept this, since all platforms now support this.
3268
3269         * platform/graphics/GraphicsContext.h:
3270         Update signatures. Remove WEBCORE_EXPORT for function that is not used outside of WebCore.
3271
3272 2015-01-31  Andreas Kling  <akling@apple.com>
3273
3274         Shrink RenderBlock.
3275         <https://webkit.org/b/141129>
3276
3277         Reviewed by Antti Koivisto.
3278
3279         Get rid of the bitfield in RenderBlock by moving the essential bits to
3280         RenderElement (plenty of space in the bitfield there.)
3281
3282         RenderBlock also had a cache of its line-height, but it doesn't appear
3283         to help any of the benchmarks that we're tracking so I'd say it's okay
3284         to lose this optimization.
3285
3286         This knocks 8 bytes off of RenderBlock (and all of its subclasses.)
3287
3288         * rendering/RenderBlock.cpp:
3289         (WebCore::RenderBlock::RenderBlock):
3290         (WebCore::RenderBlock::styleDidChange):
3291         (WebCore::RenderBlock::recomputeLogicalWidth):
3292         (WebCore::RenderBlock::lineHeight):
3293         * rendering/RenderBlock.h:
3294         (WebCore::RenderBlock::setHasMarginBeforeQuirk):
3295         (WebCore::RenderBlock::setHasMarginAfterQuirk):
3296         (WebCore::RenderBlock::setHasBorderOrPaddingLogicalWidthChanged):
3297         (WebCore::RenderBlock::hasMarginBeforeQuirk):
3298         (WebCore::RenderBlock::hasMarginAfterQuirk):
3299         (WebCore::RenderBlock::hasBorderOrPaddingLogicalWidthChanged):
3300         * rendering/RenderBlockFlow.cpp:
3301         (WebCore::RenderBlockFlow::layoutInlineChildren):
3302         (WebCore::RenderBlockFlow::invalidateLineLayoutPath):
3303         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
3304         (WebCore::RenderBlockFlow::ensureLineBoxes):
3305         * rendering/RenderBlockFlow.h:
3306         (WebCore::RenderBlockFlow::lineLayoutPath):
3307         (WebCore::RenderBlockFlow::setLineLayoutPath):
3308         (WebCore::RenderBlockFlow::setHasMarkupTruncation):
3309         (WebCore::RenderBlockFlow::hasMarkupTruncation):
3310         (WebCore::RenderBlockFlow::simpleLineLayout):
3311         * rendering/RenderElement.cpp:
3312         (WebCore::RenderElement::RenderElement):
3313         * rendering/RenderElement.h:
3314         (WebCore::RenderElement::setRenderBlockHasMarginBeforeQuirk):
3315         (WebCore::RenderElement::setRenderBlockHasMarginAfterQuirk):
3316         (WebCore::RenderElement::setRenderBlockHasBorderOrPaddingLogicalWidthChanged):
3317         (WebCore::RenderElement::renderBlockHasMarginBeforeQuirk):
3318         (WebCore::RenderElement::renderBlockHasMarginAfterQuirk):
3319         (WebCore::RenderElement::renderBlockHasBorderOrPaddingLogicalWidthChanged):
3320         (WebCore::RenderElement::setRenderBlockFlowLineLayoutPath):
3321         (WebCore::RenderElement::setRenderBlockFlowHasMarkupTruncation):
3322         (WebCore::RenderElement::renderBlockFlowLineLayoutPath):
3323         (WebCore::RenderElement::renderBlockFlowHasMarkupTruncation):
3324         * rendering/RenderFlowThread.cpp:
3325         (WebCore::RenderFlowThread::removeLineRegionInfo):
3326
3327 2015-01-31  Chris Dumez  <cdumez@apple.com>
3328
3329         Remove useless PageCache::singleton() call from PageCache member function
3330         https://bugs.webkit.org/show_bug.cgi?id=141127
3331
3332         Reviewed by Andreas Kling.
3333
3334         * history/PageCache.cpp:
3335         (WebCore::PageCache::get):
3336
3337 2015-01-31  Sam Weinig  <sam@webkit.org>
3338
3339         Remove empty #if/#endif
3340
3341         Rubber-stamped by Antti Koivisto.
3342
3343         * platform/graphics/FontPlatformData.h:
3344
3345 2015-01-31  Sam Weinig  <sam@webkit.org>
3346
3347         Remove support for disabling drawing of emoji
3348         https://bugs.webkit.org/show_bug.cgi?id=141126
3349
3350         Reviewed by Antti Koivisto.
3351
3352         Remove unused support for disabling the drawing of emoji.
3353
3354         * WebCore.exp.in:
3355         * platform/graphics/GraphicsContext.cpp:
3356         (WebCore::GraphicsContext::emojiDrawingEnabled): Deleted.
3357         (WebCore::GraphicsContext::setEmojiDrawingEnabled): Deleted.
3358         * platform/graphics/GraphicsContext.h:
3359         (WebCore::GraphicsContextState::GraphicsContextState):
3360         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3361         (WebCore::FontCascade::drawGlyphs):
3362
3363 2015-01-31  Sam Weinig  <sam@webkit.org>
3364
3365         Remove even more Mountain Lion support
3366         https://bugs.webkit.org/show_bug.cgi?id=141124
3367
3368         Reviewed by Alexey Proskuryakov.
3369
3370         * Configurations/Base.xcconfig:
3371         * Configurations/DebugRelease.xcconfig:
3372         * Configurations/FeatureDefines.xcconfig:
3373         * Configurations/Version.xcconfig:
3374         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3375         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
3376         (-[WebAccessibilityObjectWrapper subrole]):
3377         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3378         (PlatformCALayer::drawLayerContents):
3379         * platform/mac/ThemeMac.mm:
3380         (-[WebCoreThemeView _focusRingVisibleRect]):
3381
3382 2015-01-30  Sam Weinig  <sam@webkit.org>
3383
3384         Merge SimpleFontDataIOS.mm and SimpleFontDataMac.mm into FontCocoa.mm
3385         https://bugs.webkit.org/show_bug.cgi?id=141101
3386
3387         Rubber-stamped by Dan Bernstein.
3388
3389         * WebCore.xcodeproj/project.pbxproj:
3390         Remove SimpleFontDataIOS.mm and SimpleFontDataMac.mm. Add FontCocoa.mm.
3391
3392         * platform/graphics/Font.h:
3393         Remove a few CG only functions from the header that can be implemented as static functions
3394         in the implementation file.
3395
3396         * platform/graphics/cocoa/FontCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
3397         (WebCore::fontFamilyShouldNotBeUsedForArabic):
3398         (WebCore::Font::platformInit):
3399         (WebCore::Font::platformCharWidthInit):
3400         (WebCore::Font::platformCreateScaledFont):
3401         (WebCore::Font::determinePitch):
3402         (WebCore::renderingStyle):
3403         (WebCore::advanceForColorBitmapFont):
3404         (WebCore::hasCustomTracking):
3405         (WebCore::canUseFastGlyphAdvanceGetter):
3406 &n