Web Replay: capture and replay mouse events
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-20  Brian Burg  <bburg@apple.com>
2
3         Web Replay: capture and replay mouse events
4         https://bugs.webkit.org/show_bug.cgi?id=129395
5
6         Reviewed by Joseph Pecoraro.
7
8         Add support for capturing and replaying mouse inputs that come from WebKit2.
9         Hook up the UserInputBridge to session state changes in the ReplayController so
10         that the bridge knows when to capture or deny mouse inputs.
11
12         Test: ManualTests/inspector/replay-mouse-events.html
13
14         * platform/PlatformEvent.h: Give explicit storage types to Modifiers and Type enums
15         so they can be forward-declared.
16         * platform/PlatformMouseEvent.h: Give an explicit storage type to enum MouseButton.
17         Add operator== and operator!= for MouseButton to work around an MSVC bug.
18
19         * replay/ReplayController.cpp: Perform session state changes in a helper function, and
20         at the same time change the state of the page's user input bridge.
21         (WebCore::ReplayController::setSessionState):
22         (WebCore::ReplayController::startCapturing):
23         (WebCore::ReplayController::stopCapturing):
24         (WebCore::ReplayController::startPlayback):
25         (WebCore::ReplayController::cancelPlayback):
26
27         * replay/ReplayInputDispatchMethods.cpp: Add dispatch methods for new inputs.
28         (WebCore::HandleMouseMove::dispatch):
29         (WebCore::HandleMousePress::dispatch):
30         (WebCore::HandleMouseRelease::dispatch):
31
32         * replay/SerializationMethods.cpp: Add helper macros so that encode/decode methods look
33         symmetric with one data member per line. This helps reduce unintentional inconsistencies.
34         (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Added.
35         (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue): Added.
36         * replay/SerializationMethods.h:
37
38         * replay/UserInputBridge.cpp: Fill in the bridge method implementations for mouse
39         events, adding helpers and macros as necessary to reduce boilerplate.
40         (WebCore::UserInputBridge::activeCursor): Added.
41         (WebCore::UserInputBridge::handleMousePressEvent):
42         (WebCore::UserInputBridge::handleMouseReleaseEvent):
43         (WebCore::UserInputBridge::handleMouseMoveEvent):
44         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
45
46         * replay/UserInputBridge.h: Add a bridge state enum along with getters and setters.
47         The enum value controls whether the bridge should capture commands, deny non-synthetic
48         commands (from the user), or allow anything to pass (the default).
49         (WebCore::UserInputBridge::setState): Added.
50         (WebCore::UserInputBridge::state): Added.
51
52         * replay/WebInputs.json: Add inputs HandleMouseMove, HandleMousePress, HandleMouseRelease.
53         Add enum definitions for PlatformEvent::Type, PlatformEvent::Modifiers, and PlatformMouseEvent::MouseButton.
54         Alphabetize the existing data type definitions.
55
56 2014-03-20  Tim Horton  <timothy_horton@apple.com>
57
58         Add WebCore::IOSurface wrapper
59         https://bugs.webkit.org/show_bug.cgi?id=130529
60
61         Reviewed by Simon Fraser.
62
63         * WebCore.exp.in:
64         * WebCore.xcodeproj/project.pbxproj:
65         * platform/graphics/cg/ColorCG.cpp:
66         * platform/graphics/cg/GraphicsContextCG.h:
67         (WebCore::cachedCGColorSpace):
68         Move cachedCGColorSpace out so that other clients of GraphicsContextCG
69         can use its mapping from WebCore::ColorSpace -> CGColorSpaceRef.
70
71         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp:
72         * platform/graphics/cg/ImageBufferCG.cpp:
73         Add FIXMEs for ImageBuffer to adopt WebCore::IOSurface.
74
75         * platform/graphics/cocoa/IOSurface.h: Added.
76         * platform/graphics/cocoa/IOSurface.mm: Added.
77         (IOSurface::create):
78         (IOSurface::createFromMachPort):
79         (IOSurface::createFromSurface):
80         (IOSurface::IOSurface):
81         (IOSurface::maximumSize):
82         (IOSurface::createMachPort):
83         (IOSurface::createImage):
84         (IOSurface::ensurePlatformContext):
85         (IOSurface::ensureGraphicsContext):
86         (IOSurface::state):
87         (IOSurface::isPurgeable):
88         (IOSurface::setIsPurgeable):
89         (IOSurface::inUse):
90         Add WebCore::IOSurface.
91
92 2014-03-20  Pratik Solanki  <psolanki@apple.com>
93
94         iOS build fix after r165992.
95
96         * generate-export-file:
97         (preprocessorMacros):
98
99 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
100
101         [WebRTC] Moving RTCConfiguration and RTCIceServer to Modules/mediastream
102         https://bugs.webkit.org/show_bug.cgi?id=130434
103
104         Reviewed by Eric Carlson.
105
106         Those classes are defined in WebRTC spec, so they should not be in platform layer.
107         Adding a platform implementation to be passed to handler classes.
108
109         * Modules/mediastream/RTCConfiguration.h: Copied from Source/WebCore/platform/mediastream/RTCConfiguration.h.
110         * Modules/mediastream/RTCIceServer.h: Copied from Source/WebCore/platform/mediastream/RTCIceServer.h.
111         * Modules/mediastream/RTCPeerConnection.cpp:
112         (WebCore::RTCPeerConnection::RTCPeerConnection):
113         (WebCore::RTCPeerConnection::updateIce):
114         * WebCore.xcodeproj/project.pbxproj:
115         * platform/mediastream/RTCConfigurationPrivate.h: Added.
116         * platform/mediastream/RTCIceServerPrivate.h: Added.
117         * platform/mediastream/RTCPeerConnectionHandler.h:
118         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
119         (WebCore::RTCPeerConnectionHandlerMock::initialize):
120         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
121         * platform/mock/RTCPeerConnectionHandlerMock.h:
122
123 2014-03-20  Alex Christensen  <achristensen@webkit.org>
124
125         [WinCairo] Unreviewed speculative build after my r165996.
126
127         * platform/network/soup/AuthenticationChallengeSoup.cpp:
128         * platform/network/soup/CertificateInfo.cpp:
129         * platform/network/soup/CookieJarSoup.cpp:
130         * platform/network/soup/ResourceRequestSoup.cpp:
131         * platform/network/soup/ResourceResponseSoup.cpp:
132         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
133
134 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
135
136         Add a flushing mechanism for the WebVTTParser
137         https://bugs.webkit.org/show_bug.cgi?id=130532
138
139         Reviewed by Eric Carlson.
140
141         Merged from Blink (patch by vcarbune@chromium.org):
142         https://chromium.googlesource.com/chromium/blink/+/1ac2b3081492ab8661429230004013a9a3623f0f
143         http://crbug.com/54203003
144         https://chromium.googlesource.com/chromium/blink/+/24343d32bc36d20d59ef3e10040faddde65929e6
145         http://crbug.com/59453002
146         https://chromium.googlesource.com/chromium/blink/+/ef2793f1d9d207389589ecf9a136ea5c7170b4af
147         http://crbug.com/75233002
148         https://chromium.googlesource.com/chromium/blink/+/a29f2f8324abcd4826b41e7dc34373dee2ec57a9
149         http://crbug.com/52713005
150         https://chromium.googlesource.com/chromium/blink/+/7ce003c8d47b39f116f1f2a592a5dfb4a9e77228
151         http://crbug.com/64303004
152         https://chromium.googlesource.com/chromium/blink/+/18f896b3498478311e880f782813d5dfc8c0c7d1
153         http://crbug.com/96933004
154         https://chromium.googlesource.com/chromium/blink/+/8670e8ecb13254a651f5493ec83f4484d18c154e
155         http://crbug.com/98783005
156         https://chromium.googlesource.com/chromium/blink/+/4ac55780a6af3d76e0159c1d145330964ad56647
157         http://crbug.com/104713002
158
159         Tests: http/tests/media/track/track-webvtt-slow-loading-2.html
160                http/tests/media/track/track-webvtt-slow-loading.html
161
162         * CMakeLists.txt:
163         * GNUmakefile.list.am:
164         * WebCore.vcxproj/WebCore.vcxproj:
165         * WebCore.vcxproj/WebCore.vcxproj.filters:
166         * WebCore.xcodeproj/project.pbxproj:
167         * html/track/BufferedLineReader.cpp: Added.
168         * html/track/BufferedLineReader.h: Added.
169         * html/track/TextTrackRegion.cpp:
170         * html/track/VTTCue.cpp:
171         * html/track/WebVTTParser.cpp:
172         * html/track/WebVTTParser.h:
173         * loader/TextTrackLoader.cpp:
174
175 2014-03-20  Alex Christensen  <achristensen@webkit.org>
176
177         Preparation for using Soup on Windows.
178         https://bugs.webkit.org/show_bug.cgi?id=130472
179
180         Reviewed by Brent Fulgham.
181
182         * WebCore.vcxproj/WebCore.vcxproj:
183         * WebCore.vcxproj/WebCore.vcxproj.filters:
184         Added Soup source to build on WinCairo.
185         * platform/network/curl/CookieJarCurl.cpp:
186         * platform/network/curl/CredentialStorageCurl.cpp:
187         * platform/network/curl/CurlCacheEntry.cpp:
188         * platform/network/curl/CurlCacheManager.cpp:
189         * platform/network/curl/CurlDownload.cpp:
190         * platform/network/curl/DNSCurl.cpp:
191         * platform/network/curl/FormDataStreamCurl.cpp:
192         * platform/network/curl/MultipartHandle.cpp:
193         * platform/network/curl/ProxyServerCurl.cpp:
194         * platform/network/curl/ResourceHandleCurl.cpp:
195         * platform/network/curl/ResourceHandleManager.cpp:
196         * platform/network/curl/SSLHandle.cpp:
197         * platform/network/curl/SocketStreamHandleCurl.cpp:
198         Protected with USE(CURL) to avoid duplicate symbols when linking.
199         * platform/network/soup/AuthenticationChallengeSoup.cpp:
200         * platform/network/soup/CertificateInfo.cpp:
201         * platform/network/soup/CookieJarSoup.cpp:
202         * platform/network/soup/CookieStorageSoup.cpp:
203         * platform/network/soup/CredentialStorageSoup.cpp:
204         * platform/network/soup/DNSSoup.cpp:
205         * platform/network/soup/NetworkStorageSessionSoup.cpp:
206         * platform/network/soup/ProxyResolverSoup.cpp:
207         * platform/network/soup/ProxyServerSoup.cpp:
208         * platform/network/soup/ResourceErrorSoup.cpp:
209         * platform/network/soup/ResourceHandleSoup.cpp:
210         * platform/network/soup/ResourceRequestSoup.cpp:
211         * platform/network/soup/ResourceResponseSoup.cpp:
212         * platform/network/soup/SocketStreamHandleSoup.cpp:
213         * platform/network/soup/SoupNetworkSession.cpp:
214         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
215         Protected with USE(CURL) to avoid duplicate symbols when linking.
216
217 2014-03-20  Pratik Solanki  <psolanki@apple.com>
218
219         iOS build fix after r165979.
220
221         * generate-export-file:
222         (preprocessorMacros):
223
224 2014-03-20  David Hyatt  <hyatt@apple.com>
225
226         [New Multicolumn] getClientRects returns wrong rectangle
227         https://bugs.webkit.org/show_bug.cgi?id=128614
228
229         Reviewed by Sam Weinig.
230
231         Added fast/multicol/newmulticol/client-rects.html and beefed up existing
232         fast/multicol/client-rects.html to use more writing modes.
233
234         * rendering/LayoutState.h:
235         Removed unused function.
236
237         * rendering/RenderFlowThread.h:
238         Make mapFlowToRegion virtual so that RenderMultiColumnFlowThread can
239         override it.
240
241         * rendering/RenderMultiColumnFlowThread.cpp:
242         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
243         * rendering/RenderMultiColumnFlowThread.h:
244         Implement mapFlowToRegion to correctly translate a flow thread position
245         into a column offset within a region.
246
247         * rendering/RenderMultiColumnSet.cpp:
248         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
249         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
250         * rendering/RenderMultiColumnSet.h:
251         Refactored some code to make a columnTranslationForOffset helper that
252         can be used by RenderMultiColumnFlowThread.
253
254 2014-03-20  Daniel Bates  <dabates@apple.com>
255
256         Preserve original document URL for XSSAuditor reports
257
258         Merged from Blink (patch by Tom Sepez):
259         https://src.chromium.org/viewvc/blink?view=rev&revision=158406
260
261         Test: http/tests/security/xssAuditor/report-script-tag-replace-state.html
262
263         * html/parser/XSSAuditor.cpp:
264         (WebCore::XSSAuditor::filterToken):
265         * html/parser/XSSAuditorDelegate.cpp:
266         (WebCore::buildConsoleError):
267         (WebCore::XSSAuditorDelegate::generateViolationReport):
268         (WebCore::XSSAuditorDelegate::didBlockScript):
269         * html/parser/XSSAuditorDelegate.h:
270         (WebCore::XSSInfo::XSSInfo):
271
272 2014-03-20  Daniel Bates  <dabates@apple.com>
273
274         XSSAuditor bypass with frameset tags
275
276         Merged from Blink (patch by Tom Sepez):
277         https://src.chromium.org/viewvc/blink?view=rev&revision=157794
278
279         Test: http/tests/security/xssAuditor/frameset-injection.html
280
281         * html/parser/XSSAuditor.cpp:
282         (WebCore::XSSAuditor::filterStartToken):
283         (WebCore::XSSAuditor::filterFrameToken):
284         * html/parser/XSSAuditor.h:
285
286 2014-03-20  Brian Burg  <bburg@apple.com>
287
288         Web Replay: fix some oversights in the replay backend
289         https://bugs.webkit.org/show_bug.cgi?id=130435
290
291         Reviewed by Andreas Kling.
292
293         This functionality will be covered by tests in https://webkit.org/b/130145.
294
295         * inspector/InspectorInstrumentation.cpp:
296         (WebCore::InspectorInstrumentation::playbackFinishedImpl):
297         * inspector/InspectorInstrumentation.h:
298         (WebCore::InspectorInstrumentation::playbackFinished):
299         * inspector/InspectorReplayAgent.cpp:
300         (WebCore::buildInspectorObjectForSegment):
301         (WebCore::InspectorReplayAgent::playbackFinished):
302         * inspector/InspectorReplayAgent.h: Add a playbackFinished event to Inspector
303         instrumentation. This is fired by ReplayController when playback is cancelled or 
304         playback of the final segment has completed.
305
306         * replay/EventLoopInputDispatcher.cpp:
307         (WebCore::EventLoopInputDispatcher::dispatchInputSoon): Fix wrong cast.
308         (WebCore::EventLoopInputDispatcher::dispatchInput): Ensure that m_dispatching is
309         false when m_running is false.
310         * replay/EventLoopInputDispatcher.h: Distinguish 'dispaching' and 'running' in comments.
311         (WebCore::EventLoopInputDispatcher::isRunning): Added.
312
313         * replay/FunctorInputCursor.h: Since the base class InputCursor is RefCounted, the
314         Functor subclass cannot be put into a unique_ptr. Add create() method instead.
315
316         * replay/ReplayController.cpp:
317         (WebCore::ReplayController::loadSegmentAtIndex): Renamed from loadSegment(). Callers
318         now pass in the desired segment index rather than the segment itself. The index is
319         necessary to properly reset m_position after the segment is loaded.
320
321         (WebCore::ReplayController::startPlayback): Set the dispatcher's speed before run().
322         (WebCore::ReplayController::pausePlayback): Only pause the dispatcher if it's running.
323         (WebCore::ReplayController::cancelPlayback): Add playbackFinished instrumentation.
324         (WebCore::ReplayController::replayToPosition):
325         (WebCore::ReplayController::didDispatchFinalInput): If there are no more segments to load,
326         manually adjust the final m_position and defer to cancelPlayback to unload the segment.
327         * replay/ReplayController.h:
328         * replay/ReplaySessionSegment.cpp:
329         (WebCore::ReplaySessionSegment::createFunctorCursor):
330         * replay/ReplaySessionSegment.h:
331
332 2014-03-20  Pratik Solanki  <psolanki@apple.com>
333
334         [iOS] Get code to compile on older iOS versions
335         https://bugs.webkit.org/show_bug.cgi?id=130142
336         <rdar://problem/16302908>
337
338         Reviewed by Darin Adler.
339
340         * WebCore.exp.in:
341         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
342         (-[WebVideoFullscreenController WebCore::]):
343         (-[WebVideoFullscreenController enterFullscreen:]):
344         (-[WebVideoFullscreenController exitFullscreen]):
345         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
346         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
347         * platform/mac/HTMLConverter.mm:
348         (_dateForString):
349         * platform/network/cf/CookieJarCFNet.cpp:
350         (WebCore::copyCookiesForURLWithFirstPartyURL):
351         * platform/text/ios/LocalizedDateCache.mm:
352         (WebCore::LocalizedDateCache::calculateMaximumWidth):
353         * platform/text/mac/LocaleMac.mm:
354         (WebCore::LocaleMac::LocaleMac):
355
356 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
357
358         Followup build fix: AnimationBase.h needs to be private because
359         it's included by AnimationController.h.
360
361         * WebCore.xcodeproj/project.pbxproj:
362
363 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
364
365         A completed fill-forwards animation should not disable overlap testing
366         https://bugs.webkit.org/show_bug.cgi?id=130522
367         <rdar://problem/15862395>
368
369         Reviewed by Dean Jackson.
370         
371         Previously, if -webkit-transform was being keyframe-animated, and the
372         animation had fill-forwards, then we would continue to think that the
373         animation is running and turn off compositing overlap testing. This
374         caused some sites to keep too much backing store around.
375         
376         Fix by having isRunning{Accelerated}AnimationOnRenderer take some flags
377         so that more specific questions about the running state can be asked.
378         For layer creation, keep using the same criteria as before (for now)
379         which includes paused and fill-forwards animations. For overlap testing,
380         don't include the fill-forwards test.
381
382         Tests: compositing/animation/filling-animation-overlap-at-end.html
383                compositing/animation/filling-animation-overlap.html
384                compositing/animation/layer-for-filling-animation.html
385
386         * page/animation/AnimationBase.h:
387         (WebCore::AnimationBase::fillingForwards):
388         (WebCore::AnimationBase::inPausedState):
389         (WebCore::AnimationBase::isAnimatingProperty):
390         * page/animation/AnimationController.cpp:
391         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
392         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
393         (WebCore::AnimationController::isRunningAnimationOnRenderer):
394         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
395         * page/animation/AnimationController.h:
396         * page/animation/AnimationControllerPrivate.h:
397         * page/animation/CompositeAnimation.cpp:
398         (WebCore::CompositeAnimation::isAnimatingProperty):
399         * page/animation/CompositeAnimation.h:
400         * rendering/RenderLayerBacking.cpp:
401         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
402         * rendering/RenderLayerCompositor.cpp:
403         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
404         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
405
406 2014-03-20  Dirk Schulze  <krit@webkit.org>
407
408         Canvas methods clip/fill/stroke should not except 0 argument
409         https://bugs.webkit.org/show_bug.cgi?id=130497
410
411         Reviewed by Dean Jackson.
412
413         Do not allow nullable argument for fill/stroke/clip.
414
415         No new tests. Updated existing tests.
416
417         * html/canvas/CanvasRenderingContext2D.idl:
418
419 2014-03-20  Eric Carlson  <eric.carlson@apple.com>
420
421         [iOS] Support MediaDocument when building with PLUGIN_PROXY_FOR_VIDEO
422         https://bugs.webkit.org/show_bug.cgi?id=130520
423
424         Reviewed by Jer Noble.
425
426         * dom/DOMImplementation.cpp:
427         (WebCore::DOMImplementation::createDocument): Check the isVideoPluginProxyEnabled setting 
428             when building with ENABLE_PLUGIN_PROXY_FOR_VIDEO.
429
430 2014-03-20  Mihai Tica  <mitica@adobe.com>
431
432         [CSS Blending] Blending operation is not isolated when setting z-index on parent from javascript
433         https://bugs.webkit.org/show_bug.cgi?id=129307
434
435         Reviewed by Dean Jackson.
436
437         Reimplement the logic behind isolating blend modes. The blending operation should be limited to the
438         contents of the parent stacking context. The proposed solution implies adding logic in updateDescendantDependentFlags,
439         to track child elements that have blending and create a transparency layer that triggers isolation.
440
441         Tests: css3/compositing/blend-mode-background.html
442                fast/repaint/blend-mode-isolate-stacking-context.html
443
444         * rendering/RenderLayer.cpp:
445         (WebCore::RenderLayer::RenderLayer): Remove old members, add new members to constructor.
446         (WebCore::RenderLayer::updateBlendMode): Update parent stacking context isolation on blend mode change.
447         (WebCore::RenderLayer::updateNonCompositedParentStackingContextHasBlendedChild):
448         - Set m_hasBlendedElementInChildStackingContext for the non composited parent stacking context.
449         (WebCore::RenderLayer::dirtyAncestorParentStackingContextHasBlendedElement):
450         - Set flag so isolation should be considered in updateDescendantDependentFlags.
451         (WebCore::RenderLayer::nonCompositedParentStackingContextHasBlendedChild):
452         - Return whether the non composited parent stacking context isolates blending.
453         (WebCore::RenderLayer::updateDescendantDependentFlags): Add logic for isolating blending.
454         (WebCore::RenderLayer::addChild): Call to updateNonCompositedParentStackingContextHasBlendedChild if needed.
455         (WebCore::RenderLayer::removeChild): Call to dirtyAncestorParentStackingContextHasBlendedElement if needed.
456         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange): Update isolation when a stacking context was set or unset.
457         (WebCore::RenderLayer::styleChanged): Removed oldStyle parameter from updateBlendMode call.
458          Update parent stacking context isolation on blend mode change.
459         * rendering/RenderLayer.h:
460         - Add members, getters and setters for tracking whether the element has a blended child:
461             - m_hasBlendedElementInChildStackingContext
462             - m_hasBlendedElementInChildStackingContextStatusDirty
463         - Removed m_updateParentStackingContextShouldIsolateBlendingDirty (replaced with m_hasBlendedElementInChildStackingContextStatusDirty)
464         - Removed m_isolatesBlending (replaced with m_hasBlendedElementInChildStackingContext)
465         - Updated the isolatesBlending method to return true only when the element is a stacking context and has a blended child.
466         * rendering/RenderLayerCompositor.cpp:
467         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Removed layer.updateParentStackingContextShouldIsolateBlending call.
468
469 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
470
471         [GTK] [CMake] Do not compile ProxyResolverSoup.cpp
472         https://bugs.webkit.org/show_bug.cgi?id=130516
473
474         Reviewed by Sergio Villar Senin.
475
476         * PlatformGTK.cmake: Remove the file from the source list.
477
478 2014-03-20  Commit Queue  <commit-queue@webkit.org>
479
480         Unreviewed, rolling out r165962.
481         https://bugs.webkit.org/show_bug.cgi?id=130512
482
483         It broke the build (Requested by Ossy on #webkit).
484
485         Reverted changeset:
486
487         "[EFL][GTK] Get CMake to find Freetype2 properly"
488         https://bugs.webkit.org/show_bug.cgi?id=130150
489         http://trac.webkit.org/changeset/165962
490
491 2014-03-20  Lorenzo Tilve  <ltilve@igalia.com>
492
493         "input" event is not fired when changing a select element's value
494         https://bugs.webkit.org/show_bug.cgi?id=117526
495
496         Reviewed by Antti Koivisto.
497
498         Add a call to dispatch input event when listbox or menulist
499         values are modified.
500
501         According to the spec: "When the user agent is to send select update
502         notifications, queue a task to first fire a simple even that bubbles
503         named input at the select element, and then fire a simple event that
504         bubbles named change at the select element, using the user interaction
505         task source as the task source."
506
507         Tests: fast/forms/select/listbox-oninput-fired.html
508                fast/forms/select/menulist-oninput-fired.html
509
510         * html/HTMLSelectElement.cpp:
511         (WebCore::HTMLSelectElement::listBoxOnChange):
512         (WebCore::HTMLSelectElement::dispatchChangeEventForMenuList):
513
514 2014-03-20  Radu Stavila  <stavila@adobe.com>
515
516         [CSS Regions] The height of a scrollable element flowed inside a scrollable region is not computed correctly
517         https://bugs.webkit.org/show_bug.cgi?id=129487
518
519         Reviewed by Andrei Bucur.
520
521         When propagating the layout overflow from the flowed element up to the flow thread itself,
522         the region's logical bottom padding and the element's logical bottom margin must be taken into consideration.
523         However, if the flowed element has overflow, the overflow will be painted over the region's padding
524         and the element's margin, in order to be compatible with the non-regions case.
525         More info can be found here: http://lists.w3.org/Archives/Public/www-style/2014Jan/0089.html
526
527         Tests: fast/regions/scrollable-region-content-size-horiz-bt.html
528                fast/regions/scrollable-region-content-size-no-overflow-horiz-bt.html
529                fast/regions/scrollable-region-content-size-no-overflow-vert-rl.html
530                fast/regions/scrollable-region-content-size-no-overflow.html
531                fast/regions/scrollable-region-content-size-relative.html
532                fast/regions/scrollable-region-content-size-vert-rl.html
533                fast/regions/scrollable-region-content-size-vertical-lr.html
534                fast/regions/scrollable-region-content-size.html
535                fast/regions/scrollable-region-scrollable-content.html
536
537         * rendering/RenderFlowThread.cpp:
538         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
539         * rendering/RenderRegion.cpp:
540         (WebCore::RenderRegion::rectFlowPortionForBox):
541
542 2014-03-20  Zalan Bujtas  <zalan@apple.com>
543
544         Subpixel rendering: Nested layers with subpixel accumulation paint to wrong position.
545         https://bugs.webkit.org/show_bug.cgi?id=130153
546
547         Reviewed by Simon Fraser.
548
549         Subpixels (fractional device pixels here) can accumulate through nested layers. Subpixels
550         need to be propagated through the layer tree so that painting coordinates match layout coordinates.
551
552         Subpixel accumulation through nesting (absolute positioning, 2x display):
553         non-compositing case:
554         (nested boxes)  (layout pos) (norm.paint pos) (translate accumulation, subpixel accumulation, final paint pos)
555         div -> top: 1.3px   1.3px     1.5px      1.5px 0.2px -> snapped 0.0px -> 1.5px
556          div -> top: 1.3px   2.6px     2.5px      3.0px 0.4px -> snapped 0.5px -> 2.5px
557           div -> top: 1.3px   3.9px     4.0px      4.5px 0.6px -> snapped 0.5px -> 4.0px
558            div -> top: 1.3px   5.2px     5.0px      6.0px 0.8px -> snapped 1.0px -> 5.0px
559
560         compositing case:
561         (nested boxes)  (layout pos) (norm.paint pos) (device pixel offset + fractional offset, final pos)
562         div -> top: 1.3px   1.3px      1.5px      1.0px + 0.3px -> snapped -> 1.5px
563          div -> top: 1.3px   2.6px      2.5px      2.5px + 0.1px -> snapped -> 2.5px
564           div -> top: 1.3px   3.9px      4.0px      3.5px + 0.4px -> snapped -> 4.0px
565            div -> top: 1.3px   5.2px      5.0px      5.0px + 0.2px -> snapped -> 5.0px
566
567         Tests: compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation.html
568                fast/layers/hidpi-nested-layers-with-subpixel-accumulation.html
569
570         * rendering/RenderLayer.cpp:
571         (WebCore::RenderLayer::paintLayerByApplyingTransform):
572         * rendering/RenderLayerBacking.cpp:
573         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
574         * rendering/RenderLayerBacking.h:
575         (WebCore::RenderLayerBacking::devicePixelFractionFromRenderer):
576
577 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
578
579         [EFL][GTK] Get CMake to find Freetype2 properly
580         https://bugs.webkit.org/show_bug.cgi?id=130150
581
582         Reviewed by Csaba Osztrogonác.
583
584         Newer versions of CMake are not able to find Freetype2 correctly.
585         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
586         freetype2 repo, because a completely different version number is found in freetype2.pc.
587
588         * PlatformEfl.cmake:
589         * PlatformGTK.cmake:
590
591 2014-03-20  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
592
593         Refactor checking log channel state in MediaPlayerPrivateGStreamerBase.
594         https://bugs.webkit.org/show_bug.cgi?id=130241
595
596         Reviewed by Philippe Normand.
597
598         The channel was passed around only to check its state. Cleaned this up
599         by adding a method to check whether a log channel is enabled.
600
601         * platform/Logging.cpp:
602         (WebCore::isLogChannelEnabled):
603         * platform/Logging.h:
604         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
605         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
606
607 2014-03-20  Lorenzo Tilve  <ltilve@igalia.com>
608
609         Dispatch input event for Range element keyboard event
610         https://bugs.webkit.org/show_bug.cgi?id=129929
611
612         Reviewed by Kent Tamura.
613
614         For any value update, dispatch both input and change event.
615         Also removes extra dispatch change event, as event is dispatched
616         from TextFieldInputType:setValue.
617
618         Merged from Blink (patch by Habib Virji):
619         https://src.chromium.org/viewvc/blink?revision=168558&view=revision
620
621         Test: fast/forms/range/range-keyboard-oninput-event.html
622
623         * html/RangeInputType.cpp:
624         (WebCore::RangeInputType::handleKeydownEvent):
625
626 2014-03-20  Jinwoo Song  <jinwoo7.song@samsung.com>
627
628         Refine BatteryStatus module
629         https://bugs.webkit.org/show_bug.cgi?id=130495
630
631         Reviewed by Andreas Kling.
632
633         Small refinements:
634          - Return PassRef instead of PassRefPtr in create method
635          - Switched to nullptr instead of 0 where appropriate.
636          - Removed unused function and header file.
637          - Removed unnecessary empty lines.
638
639         * Modules/battery/BatteryController.h:
640         * Modules/battery/BatteryManager.cpp:
641         (WebCore::BatteryManager::create): Make return passRef.
642         * Modules/battery/BatteryManager.h:
643         (WebCore::BatteryManager::batteryControllerDestroyed): Use nullptr.
644         * Modules/battery/BatteryStatus.cpp:
645         (WebCore::BatteryStatus::create): Make return passRef.
646         * Modules/battery/BatteryStatus.h:
647         * Modules/battery/NavigatorBattery.cpp:
648         (WebCore::NavigatorBattery::webkitBattery): Remove batteryManager().
649         * Modules/battery/NavigatorBattery.h:
650
651 2014-03-19  Pratik Solanki  <psolanki@apple.com>
652
653         [iOS] Get code to compile on older iOS versions
654         https://bugs.webkit.org/show_bug.cgi?id=130142
655         <rdar://problem/16302908>
656
657         Reviewed by Darin Adler.
658
659         * WebCore.exp.in:
660         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
661         (-[WebVideoFullscreenController WebCore::]):
662         (-[WebVideoFullscreenController enterFullscreen:]):
663         (-[WebVideoFullscreenController exitFullscreen]):
664         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
665         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
666         * platform/mac/HTMLConverter.mm:
667         (_dateForString):
668         * platform/network/cf/CookieJarCFNet.cpp:
669         (WebCore::copyCookiesForURLWithFirstPartyURL):
670         * platform/text/ios/LocalizedDateCache.mm:
671         (WebCore::LocalizedDateCache::calculateMaximumWidth):
672         * platform/text/mac/LocaleMac.mm:
673         (WebCore::LocaleMac::LocaleMac):
674
675 2014-03-19  Byungseon Shin  <sun.shin@lge.com>
676
677         Fix "WEBKIT_WEBGL_compressed_texture_pvrtc" extension support
678         https://bugs.webkit.org/show_bug.cgi?id=130292
679
680         Reviewed by Dean Jackson.
681
682         WebGLRenderingContext::getExtension was not returning WEBGL_compressed_texture_pvrtc extension.
683
684         * html/canvas/WebGLRenderingContext.cpp:
685         (WebCore::WebGLRenderingContext::getExtension):
686
687 2014-03-19  Brent Fulgham  <bfulgham@apple.com>
688
689         Merge Misc. WebVTT Updates from Blink.
690         https://bugs.webkit.org/show_bug.cgi?id=130491
691
692         Reviewed by Eric Carlson.
693
694         Test: media/track/track-webvtt-tc030-interspersed-non-cue.html
695
696         Merged from Blink (patch by vcarbune@chromium.org):
697         https://chromium.googlesource.com/chromium/blink/+/fb62b2b54944bd19026192c049a1db250756fc12
698         http://crbug.com/40323003
699         https://chromium.googlesource.com/chromium/blink/+/29176fb0b394a97e85f4dabc07e18329f3ceae41
700         http://crbug.com/54463002
701         https://chromium.googlesource.com/chromium/blink/+/29476f839a08cb17c5a3fc713f7e454e7cea9c60
702         http://crbug.com/55853002
703         https://chromium.googlesource.com/chromium/blink/+/ba2378ef873e786cf2937034e012669cdd37dfe8
704         http://crbug.com/65343003
705         https://chromium.googlesource.com/chromium/blink/+/1915b9aa1bba45aebf28531b40ae627ecf9a3d59
706         http://crbug.com/62833005
707         https://chromium.googlesource.com/chromium/blink/+/ea46dbd0f1f29779a1cd4f59b19361b803f09a9b
708         http://crbug.com/64273013
709         https://chromium.googlesource.com/chromium/blink/+/9eb4bb6b627357bb94d66386a4123ec004cccfc4
710         http://crbug.com/101513002
711         https://chromium.googlesource.com/chromium/blink/+/192a843b32eafb77bf92c50ec50d334ba935028a
712         http://crbug.com/102403002
713         https://chromium.googlesource.com/chromium/blink/+/15f9efcc952fcf73184e28fb9db79633c1fa6653
714         http://crbug.com/104443002
715         https://chromium.googlesource.com/chromium/blink/+/74fd66b451a464683f7cb748855b1740a54b2c16
716         http://crbug.com/75243004
717
718         * html/track/TextTrackRegion.cpp:
719         (WebCore::TextTrackRegion::parseSettingValue):
720         * html/track/VTTCue.cpp:
721         (WebCore::VTTCue::markFutureAndPastNodes):
722         (WebCore::VTTCue::setCueSettings):
723         * html/track/WebVTTParser.cpp:
724         (WebCore::scanDigits):
725         (WebCore::WebVTTParser::collectDigitsToInt):
726         (WebCore::WebVTTParser::parseFloatPercentageValue):
727         (WebCore::WebVTTParser::parseBytes):
728         (WebCore::WebVTTParser::collectMetadataHeader):
729         (WebCore::WebVTTParser::collectTimingsAndSettings):
730         (WebCore::WebVTTParser::createDocumentFragmentFromCueText):
731         (WebCore::WebVTTParser::createNewCue):
732         (WebCore::WebVTTParser::createNewRegion):
733         (WebCore::WebVTTParser::collectTimeStamp):
734         (WebCore::tokenToNodeType):
735         (WebCore::WebVTTParser::constructTreeFromToken):
736         * html/track/WebVTTParser.h:
737         * html/track/WebVTTToken.h:
738         (WebCore::WebVTTToken::name):
739         (WebCore::WebVTTToken::characters):
740         (WebCore::WebVTTToken::appendToCharacter):
741         (WebCore::WebVTTToken::addNewClass):
742         (WebCore::WebVTTToken::classes):
743         (WebCore::WebVTTToken::addNewAnnotation):
744         (WebCore::WebVTTToken::annotation):
745         * html/track/WebVTTTokenizer.cpp:
746         (WebCore::equalLiteral):
747         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
748         (WebCore::WebVTTTokenizer::nextToken):
749         * html/track/WebVTTTokenizer.h:
750
751 2014-03-19  Mark Hahnenberg  <mhahnenberg@apple.com>
752
753         GC timer should intelligently choose between EdenCollections and FullCollections
754         https://bugs.webkit.org/show_bug.cgi?id=128261
755
756         Reviewed by Geoffrey Garen.
757
758         No new tests.
759
760         Updated WebSafeGCActivityCallbacks for both Eden and Full timers.
761
762         * bindings/js/JSDOMWindowBase.cpp:
763         (WebCore::JSDOMWindowBase::commonVM):
764         * platform/ios/WebSafeGCActivityCallbackIOS.h:
765
766 2014-03-19  Andy Estes  <aestes@apple.com>
767
768         Fix the iOS build after r165917.
769
770         * platform/ios/WebCoreSystemInterfaceIOS.mm:
771
772 2014-03-19  Commit Queue  <commit-queue@webkit.org>
773
774         Unreviewed, rolling out r165926.
775         https://bugs.webkit.org/show_bug.cgi?id=130488
776
777         broke the iOS build (Requested by estes on #webkit).
778
779         Reverted changeset:
780
781         "GC timer should intelligently choose between EdenCollections
782         and FullCollections"
783         https://bugs.webkit.org/show_bug.cgi?id=128261
784         http://trac.webkit.org/changeset/165926
785
786 2014-03-19  Commit Queue  <commit-queue@webkit.org>
787
788         Unreviewed, rolling out r165929.
789         https://bugs.webkit.org/show_bug.cgi?id=130487
790
791         in order to roll out r165926 (Requested by estes on #webkit).
792
793         Reverted changeset:
794
795         http://trac.webkit.org/changeset/165929
796
797 2014-03-19  Mark Hahnenberg  <mhahnenberg@apple.com>
798
799         Build fix for iOS after r165926
800
801         * bindings/js/JSDOMWindowBase.cpp:
802         (WebCore::JSDOMWindowBase::commonVM):
803         * platform/ios/WebSafeGCActivityCallbackIOS.h:
804
805 2014-03-19  Eric Carlson  <eric.carlson@apple.com>
806
807         Allow media engine to update HTMLMediaElement state when playing to external device
808         https://bugs.webkit.org/show_bug.cgi?id=130480
809
810         Reviewed by Jer Noble.
811
812         * html/HTMLMediaElement.h: Add mediaPlayerHandlePlaybackCommand.
813
814         * platform/graphics/MediaPlayer.cpp:
815         (WebCore::MediaPlayer::handlePlaybackCommand): New.
816         * platform/graphics/MediaPlayer.h:
817         (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):
818
819         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
820         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged): Send Play and Pause commands when
821             playing to an external device.
822
823 2014-03-19  Dirk Schulze  <krit@webkit.org>
824
825         Implement isPointInPath and isPointInStroke with Path2D argument
826         https://bugs.webkit.org/show_bug.cgi?id=130473
827
828         Reviewed by Dean Jackson.
829
830         Implement isPointInPath and isPointInStroke for 2D Canvas contxts
831         with Path2D argument.
832
833
834         Tests: fast/canvas/canvas-path-isPointInPath.html
835                fast/canvas/canvas-path-isPointInStroke.html
836
837         * html/canvas/CanvasRenderingContext2D.cpp:
838         (WebCore::CanvasRenderingContext2D::isPointInPath):
839         (WebCore::CanvasRenderingContext2D::isPointInStroke):
840         (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
841         (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
842         * html/canvas/CanvasRenderingContext2D.h:
843         * html/canvas/CanvasRenderingContext2D.idl:
844
845 2014-03-13  Mark Hahnenberg  <mhahnenberg@apple.com>
846
847         GC timer should intelligently choose between EdenCollections and FullCollections
848         https://bugs.webkit.org/show_bug.cgi?id=128261
849
850         Reviewed by Geoffrey Garen.
851
852         No new tests.
853
854         * platform/ios/WebSafeGCActivityCallbackIOS.h: Update WebSafeGCActivityCallback
855         appropriately for the introduction of another type of GCActivityCallback.
856
857 <<<<<<< .mine
858 2014-03-18  Mark Hahnenberg  <mhahnenberg@apple.com>
859
860         GC timer should intelligently choose between EdenCollections and FullCollections
861         https://bugs.webkit.org/show_bug.cgi?id=128261
862
863         Reviewed by Geoffrey Garen.
864
865         No new tests.
866
867         Updated WebSafeGCActivityCallbacks for both Eden and Full timers.
868
869         * platform/ios/WebSafeGCActivityCallbackIOS.h:
870
871 =======
872 2014-03-19  Antti Koivisto  <antti@apple.com>
873
874         Crash with long selector list
875         https://bugs.webkit.org/show_bug.cgi?id=123006
876
877         Reviewed by Andreas Kling.
878
879         Test: fast/css/long-selector-list-crash.html
880
881         * css/CSSSelectorList.cpp:
882         (WebCore::CSSSelectorList::CSSSelectorList):
883         (WebCore::CSSSelectorList::adoptSelectorVector):
884         (WebCore::CSSSelectorList::operator=):
885         * css/StyleRule.cpp:
886         (WebCore::StyleRule::create):
887
888             Add a bunch of asserts.
889
890         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
891         
892             This could produce a zero-length selector list.
893
894 2014-03-19  Andreas Kling  <akling@apple.com>
895
896         Rebaseline bindings tests.
897
898         * bindings/scripts/test/JS/*:
899
900 2014-03-04  Jer Noble  <jer.noble@apple.com>
901
902         [iOS][MediaControls] Reverse-pinching using the built-in controls should enter full screen
903         https://bugs.webkit.org/show_bug.cgi?id=129707
904
905         Reviewed by Eric Carlson.
906
907         The default controls on iOS should respond to a pinch gesture by entering fullscreen. Add a gesture
908         event listener, and enter full screen if the user does a quick (>2 velocity) reverse (>1.25 scale) pinch.
909
910         * Modules/mediacontrols/mediaControlsiOS.js:
911         (ControllerIOS.prototype.createBase):
912         (ControllerIOS.prototype.handlePlayButtonTouchEnd):
913         (ControllerIOS.prototype.handleBaseGestureStart):
914         (ControllerIOS.prototype.handleBaseGestureChange):
915         (ControllerIOS.prototype.handleBaseGestureEnd):
916
917 2014-03-19  Ryosuke Niwa  <rniwa@webkit.org>
918
919         REGRESSION(r156316): Scrollbar on a large document is broken
920         https://bugs.webkit.org/show_bug.cgi?id=130474
921         <rdar://problem/16371523>
922
923         Reviewed by Anders Carlsson.
924
925         The bug was caused by updateArrowPlacement() doing the work even though Scrollbar Overlay API is available.
926         Prior to r156316, this function exited early:
927         http://trac.webkit.org/browser/trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm?rev=156315#L147
928
929         Fixed the bug by deleting updateArrowPlacement() entirely.
930
931         * platform/mac/ScrollbarThemeMac.mm:
932         (WebCore::ScrollbarThemeMac::preferencesChanged):
933
934 2014-03-19  Jer Noble  <jer.noble@apple.com>
935
936         [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
937         https://bugs.webkit.org/show_bug.cgi?id=130459
938
939         Reviewed by Eric Carlson.
940
941         * WebCore.exp.in: Export the new WCSI method.
942         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
943         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsKeySystem): Bail early if we have no decoder support.
944         * platform/mac/WebCoreSystemInterface.h: Provide a WCSI wrapper for WKSI.
945         * platform/mac/WebCoreSystemInterface.mm: Ditto.
946
947 2014-03-19  Eric Carlson  <eric.carlson@apple.com>
948
949         Make Remote Control commands testable
950         https://bugs.webkit.org/show_bug.cgi?id=130358
951
952         Reviewed by Jer Noble.
953
954         Test: media/video-remote-control-playpause.html
955
956         * html/HTMLMediaElement.cpp:
957         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Call session->clientWillPausePlayback.
958         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Log the command.
959
960         * platform/audio/MediaSession.cpp:
961         (WebCore::MediaSessionClient::mediaSessionTitle): Move from header file.
962         (WebCore::MediaSessionClient::mediaSessionDuration): Ditto.
963         (WebCore::MediaSessionClient::mediaSessionCurrentTime): Ditto.
964         * platform/audio/MediaSession.h:
965
966         * platform/audio/MediaSessionManager.cpp:
967         (WebCore::MediaSessionManager::MediaSessionManager): Get rid of m_activeSession.
968         (WebCore::MediaSessionManager::removeSession): No need to clear m_activeSession because 
969             we use the m_sessions vector.
970         (WebCore::MediaSessionManager::sessionWillBeginPlayback): setCurrentSession takes a 
971             MediaSession&.
972         (WebCore::MediaSessionManager::sessionWillEndPlayback): Keep m_sessions sorted so playing
973             sessions are before paused sessions.
974         (WebCore::MediaSessionManager::setCurrentSession): Move the session that is beginning to
975             play to the head of m_sessions.
976         (WebCore::MediaSessionManager::currentSession): Return m_sessions[0] or nullptr.
977         (WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
978         * platform/audio/MediaSessionManager.h:
979
980         * platform/audio/ios/MediaSessionManagerIOS.mm: Include MediaPlayer.h.
981
982         * testing/Internals.cpp:
983         (WebCore::Internals::postRemoteControlCommand): New.
984         * testing/Internals.h:
985         * testing/Internals.idl:
986
987 2014-03-19  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
988
989         Improving webkitGetUserMedia error handling and error messages
990         https://bugs.webkit.org/show_bug.cgi?id=130452
991
992         Reviewed by Eric Carlson.
993
994         Checking if first argument of webkitGetUserMedia is a valid Dictionary. If not, throw an exception with a
995         clearer message of the error.
996
997         Test updated.
998
999         * Modules/mediastream/NavigatorMediaStream.idl:
1000         * UseJSC.cmake:
1001         * bindings/js/JSNavigatorCustom.cpp: Added.
1002
1003 2014-03-19  Andreas Kling  <akling@apple.com>
1004
1005         JSC bindings should use the passed-in global object for wrapper caching.
1006         <https://webkit.org/b/130458>
1007
1008         Take a shorter path to the DOMWrapperWorld by using the passed-in
1009         global object instead of getting the lexical global from ExecState.
1010         Removed an old FIXME that no longer applies since JSObjects can
1011         always find the right global object these days.
1012
1013         Reviewed by Geoff Garen.
1014
1015         * bindings/js/JSCSSRuleCustom.cpp:
1016         (WebCore::toJS):
1017         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1018         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
1019         * bindings/js/JSCSSValueCustom.cpp:
1020         (WebCore::toJS):
1021         * bindings/js/JSDOMBinding.h:
1022         (WebCore::createWrapper):
1023         (WebCore::wrap):
1024         (WebCore::getExistingWrapper):
1025         (WebCore::createNewWrapper):
1026         (WebCore::toJS):
1027         * bindings/js/JSDOMWindowCustom.cpp:
1028         (WebCore::JSDOMWindow::setTimeout):
1029         (WebCore::JSDOMWindow::setInterval):
1030         (WebCore::JSDOMWindow::addEventListener):
1031         (WebCore::JSDOMWindow::removeEventListener):
1032         * bindings/js/JSDocumentCustom.cpp:
1033         (WebCore::JSDocument::location):
1034         (WebCore::toJS):
1035         * bindings/js/JSElementCustom.cpp:
1036         (WebCore::toJSNewlyCreated):
1037         * bindings/js/JSEventCustom.cpp:
1038         (WebCore::toJS):
1039         * bindings/js/JSHTMLCollectionCustom.cpp:
1040         (WebCore::toJS):
1041         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1042         (WebCore::JSHTMLTemplateElement::content):
1043         * bindings/js/JSImageDataCustom.cpp:
1044         (WebCore::toJS):
1045         * bindings/js/JSNodeCustom.cpp:
1046         (WebCore::createWrapperInline):
1047         * bindings/js/JSNodeCustom.h:
1048         (WebCore::toJS):
1049         * bindings/js/JSSVGPathSegCustom.cpp:
1050         (WebCore::toJS):
1051         * bindings/js/JSStyleSheetCustom.cpp:
1052         (WebCore::toJS):
1053         * bindings/js/JSTextTrackCueCustom.cpp:
1054         (WebCore::toJS):
1055         * bindings/js/JSTrackCustom.cpp:
1056         (WebCore::toJS):
1057         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1058         (WebCore::JSWorkerGlobalScope::setTimeout):
1059         (WebCore::JSWorkerGlobalScope::setInterval):
1060         * bindings/scripts/CodeGeneratorJS.pm:
1061         (GenerateImplementation):
1062
1063 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
1064
1065         Page::setPageScaleFactor should not force the scroll view position when using delegatesScrolling()
1066         https://bugs.webkit.org/show_bug.cgi?id=130429
1067
1068         Reviewed by Simon Fraser.
1069
1070         When setting the same scale mutliple time (for example on load), Page was asking the top scrollview
1071         to scroll to the origin. This is bogus since the scroll view is driving Page::setDeviceScaleFactor,
1072         not the other way around.
1073
1074         Simon fixed the general case in http://trac.webkit.org/changeset/165652/trunk/Source/WebCore/page/Page.cpp
1075         but this branch was still scrolling content.
1076
1077         * page/Page.cpp:
1078         (WebCore::Page::setPageScaleFactor):
1079
1080 2014-03-19  Brady Eidson  <beidson@apple.com>
1081
1082         Filter out editable services from image menu for non-contenteditable images
1083         <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
1084
1085         Reviewed by Tim Horton.
1086
1087         * WebCore.exp.in:
1088
1089 2014-03-19  Dirk Schulze  <krit@webkit.org>
1090
1091         Implement method addPath for Path2D
1092         https://bugs.webkit.org/show_bug.cgi?id=130461
1093
1094         Reviewed by Dean Jackson.
1095
1096         Add support for the Path2D method addPath. The method allows
1097         to append and existing Path2D object to another one. It can be
1098         combined with a transformation matrix SVGMatrix.
1099
1100         Test: fast/canvas/canvas-path-addPath.html
1101
1102         * html/canvas/DOMPath.h: Add new method addPath().
1103         (WebCore::DOMPath::addPath):
1104         * html/canvas/DOMPath.idl:
1105         * platform/graphics/Path.h: Add support for appending paths.
1106         * platform/graphics/cairo/PathCairo.cpp:
1107         (WebCore::Path::addPath):
1108         * platform/graphics/cg/PathCG.cpp:
1109         (WebCore::Path::addPath):
1110         * platform/graphics/wince/PathWinCE.cpp:
1111         (WebCore::Path::addPath):
1112
1113 2014-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>
1114
1115         [iOS] WebKit2 Quicklook.
1116         https://bugs.webkit.org/show_bug.cgi?id=130360
1117
1118         Reviewed by Tim Horton.
1119
1120         Since ResourceLoaders using WebKit2 network process don't have ResourceHandle any more, we
1121         need to make it possible to create QuickLookHandle from ResourceLoader.
1122
1123         * WebCore.exp.in: Make some QuickLookHandle methods visible from WebKit2.
1124         * loader/ResourceLoader.h: Add m_quickLookHandle data member to ResourceLoader.
1125         (WebCore::ResourceLoader::quickLookHandle):
1126         (WebCore::ResourceLoader::setQuickLookHandle):
1127         * platform/network/ios/QuickLook.h: Add a new method to create QuickLookHandle from ResourceLoader.
1128         * platform/network/ios/QuickLook.mm:
1129         (WebCore::QuickLookHandle::create):
1130
1131 2014-03-19  Brent Fulgham  <bfulgham@apple.com>
1132
1133         Fix cue rendering test and include support for left/right alignment
1134         https://bugs.webkit.org/show_bug.cgi?id=130406
1135
1136         Reviewed by Eric Carlson.
1137
1138         Merged from Blink (patch by vcarbune@chromium.org):
1139         https://chromium.googlesource.com/chromium/blink/+/e695703cb603421c741e59a557a7989113c13b94
1140         http://crbug.com/25155003
1141
1142         No new tests. Covered by media/track/track-cue-rendering-snap-to-lines-not-set.html.
1143
1144         * html/track/VTTCue.cpp:
1145         (WebCore::leftKeyword): Added.
1146         (WebCore::rightKeyword): Added.
1147         (WebCore::VTTCueBox::applyCSSProperties): Added.
1148         (WebCore::VTTCue::VTTCue):
1149         (WebCore::VTTCue::align): Handle left/right alignment.
1150         (WebCore::VTTCue::setAlign): Ditto.
1151         (WebCore::VTTCue::calculateDisplayParameters): Refactored and revised for left/right tokens.
1152         (WebCore::VTTCue::setCueSettings): Ditto.
1153         (WebCore::VTTCue::getCSSAlignment): Added.
1154         (WebCore::VTTCue::getCSSWritingMode): Added.
1155         * html/track/VTTCue.h:
1156
1157 2014-03-18  Anders Carlsson  <andersca@apple.com>
1158
1159         Add new functionality that will be required by the history item decoding
1160         https://bugs.webkit.org/show_bug.cgi?id=130433
1161
1162         Reviewed by Sam Weinig.
1163
1164         * platform/KeyedCoding.h:
1165         (WebCore::KeyedDecoder::decodeConditionalObject):
1166
1167 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1168
1169         Fix the iOS build.
1170
1171         * html/BaseDateAndTimeInputType.cpp:
1172         (WebCore::BaseDateAndTimeInputType::parseToDateComponents):
1173         Missing a StringView().
1174
1175 2014-03-19  Antti Koivisto  <antti@apple.com>
1176
1177         Tighten ElementRuleCollector::m_matchedRuleList typing
1178         https://bugs.webkit.org/show_bug.cgi?id=130446
1179
1180         Reviewed by Anders Carlsson.
1181
1182         StyleRuleBase -> StyleRule.
1183
1184         * css/ElementRuleCollector.cpp:
1185         (WebCore::ElementRuleCollector::matchedRuleList):
1186         * css/ElementRuleCollector.h:
1187         * css/StyleResolver.cpp:
1188         (WebCore::StyleResolver::styleRulesForElement):
1189         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1190         * css/StyleResolver.h:
1191         * editing/EditingStyle.cpp:
1192         (WebCore::styleFromMatchedRulesForElement):
1193         * inspector/InspectorCSSAgent.cpp:
1194         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1195         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1196         * inspector/InspectorCSSAgent.h:
1197         * page/DOMWindow.cpp:
1198         (WebCore::DOMWindow::getMatchedCSSRules):
1199
1200 2014-03-19  Mihnea Ovidenie  <mihnea@adobe.com>
1201
1202         [CSSRegions] An unsplittable box is always displayed in a single region
1203         https://bugs.webkit.org/show_bug.cgi?id=130451
1204
1205         Reviewed by Andrei Bucur.
1206
1207         Add an ASSERT stating that an unsplittable box region range always contains 1 region.
1208         No new functionality, no new tests.
1209
1210         * rendering/RenderFlowThread.cpp:
1211         (WebCore::RenderFlowThread::getRegionRangeForBox):
1212
1213 2014-03-19  Zalan Bujtas  <zalan@apple.com>
1214
1215         Subpixel rendering: Transform origin is miscalculated when RenderLayer's
1216         offsetfromRenderer has device pixel fraction value.
1217         https://bugs.webkit.org/show_bug.cgi?id=129859
1218
1219         Reviewed by Simon Fraser.
1220
1221         We need to calculate the transformed origin using the painting coordinates to produce
1222         pixel precise result.
1223
1224         * rendering/RenderLayerBacking.cpp:
1225         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1226         (WebCore::RenderLayerBacking::computeTransformOriginForPainting):
1227         * rendering/RenderLayerBacking.h:
1228
1229 2014-03-19  Claudio Saavedra  <csaavedra@igalia.com>
1230
1231         [GStreamer] Clean timeout source ids
1232         https://bugs.webkit.org/show_bug.cgi?id=130450
1233
1234         Reviewed by Philippe Normand.
1235
1236         Sources IDs need to be cleaned up if the callback removes the
1237         source, otherwise we'll be attempting to remove an empty source at
1238         some point.
1239
1240         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1241         (webKitMediaVideoSrcStart): Clean the source id.
1242         (webKitMediaAudioSrcStart): Ditto.
1243         (webKitMediaVideoSrcSeekMainCb): Ditto.
1244         (webKitMediaAudioSrcSeekMainCb): Ditto.
1245
1246 2014-03-19  Mihnea Ovidenie  <mihnea@adobe.com>
1247
1248         [CSSRegions] Compute region ranges for children of inline blocks
1249         https://bugs.webkit.org/show_bug.cgi?id=130392
1250
1251         Reviewed by Andrei Bucur.
1252
1253         Extend the region ranges computation for children of inline blocks.
1254         When we cannot retrieve the region range for a box using cached information,
1255         either from region range map or from the region cached on the RootInlineBox,
1256         try to find the top most unsplittable box up to the flow thread boundary.
1257         If we find such unsplittable box and the box has a region range, then return
1258         this range.
1259
1260         Before this patch, method getRegionRangeForBox did not return true/false
1261         if it was able to retrieve the range and the caller checked the returned
1262         region values. I modified the method to return true if we were able to compute
1263         the range.
1264
1265         Tests: fast/regions/inline-block-inline-children-flowed-in-regions.html
1266                fast/regions/inline-blocks-dyn-enlarged-regions.html
1267                fast/regions/inline-blocks-dyn-shrunk-regions.html
1268                fast/regions/inline-blocks-in-two-regions.html
1269
1270         * inspector/InspectorOverlay.cpp:
1271         (WebCore::buildObjectForRendererFragments):
1272         * rendering/RenderBlock.cpp:
1273         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
1274         * rendering/RenderBlockFlow.cpp:
1275         (WebCore::RenderBlockFlow::hasNextPage):
1276         * rendering/RenderBox.cpp:
1277         (WebCore::RenderBox::clampToStartAndEndRegions):
1278         (WebCore::RenderBox::borderBoxRectInRegion):
1279         (WebCore::RenderBox::computeRectForRepaint):
1280         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1281         * rendering/RenderBoxModelObject.cpp:
1282         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
1283         * rendering/RenderFlowThread.cpp:
1284         (WebCore::RenderFlowThread::regionForCompositedLayer):
1285         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1286         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
1287         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1288         (WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
1289         (WebCore::RenderFlowThread::getRegionRangeForBox):
1290         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
1291         (WebCore::RenderFlowThread::objectInFlowRegion):
1292         (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
1293         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
1294         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1295         (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
1296         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
1297         (WebCore::RenderFlowThread::clearRegionsOverflow):
1298         * rendering/RenderFlowThread.h:
1299         * rendering/RenderNamedFlowThread.cpp:
1300         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
1301         * rendering/RenderObject.cpp:
1302         (WebCore::RenderObject::locateFlowThreadContainingBlock):
1303         Make sure we return the right render flow thread in the case of
1304         region-based multicolumn inside named flows.
1305         * rendering/RenderRegion.cpp:
1306         (WebCore::RenderRegion::rectFlowPortionForBox):
1307
1308 2014-03-19  Krzysztof Wolanski  <k.wolanski@samsung.com>
1309
1310         [EFL] vibration/cancelVibration-during-pattern-vibrating.html is failing after r165598
1311         https://bugs.webkit.org/show_bug.cgi?id=130333
1312
1313         Reviewed by Gyuyoung Kim.
1314
1315         Added setting m_state when calling Vibration::vibrate. It was missing after
1316         refactoring Vibration (r165598).
1317
1318         * Modules/vibration/Vibration.cpp:
1319         (WebCore::Vibration::vibrate):
1320
1321 2014-03-19  Sam Weinig  <sam@webkit.org>
1322
1323         Rewrite WebHTMLConverter::_colorForNode in C++
1324         https://bugs.webkit.org/show_bug.cgi?id=130443
1325
1326         Reviewed by Andreas Kling.
1327
1328         * platform/mac/HTMLConverter.mm:
1329         (_platformColor):
1330         Rename from _colorForRGBColor and simplify to just do the platform conversion.
1331
1332         (normalizedColor):
1333         Extract normalization out of _colorForRGBColor and remove cases that are impossible to hit
1334         due to us only ever using the device color space.
1335
1336         (HTMLConverterCaches::colorPropertyValueForNode):
1337         (-[WebHTMLConverter _colorForNode:property:]):
1338         Convert to C++.
1339
1340         (-[WebHTMLConverter dealloc]):
1341         (-[WebHTMLConverter init]):
1342         Remove caches, we already cache in ColorMac.
1343
1344 2014-03-18  Andrei Bucur  <abucur@adobe.com>
1345
1346         [CSS Regions] Strange layout for content with region breaks
1347         https://bugs.webkit.org/show_bug.cgi?id=121318
1348
1349         Reviewed by Mihnea Ovidenie.
1350
1351         When break-inside: avoid is used on an element, the implementation tries to
1352         force it inside a single fragmentation container even though the descendants
1353         of the element specify forced breaks. This leads to unexpected results and
1354         unstable layout.
1355
1356         The change extends the definition of unsplittable elements for flow threads
1357         using the same conditions found inside RenderBlockFlow::adjustForUnsplittableChild.
1358         This change forces elements that require break avoidance to have a single region
1359         in the region range. As a result, forced breaks have no effect inside them.
1360
1361         It should be noted this may not the behavior defined by the CSS3 Fragmentation spec.
1362         From my understanding of the text, forced breaks override any avoidance specified
1363         by ancestor elements. However, implementing this is a larger change that will require
1364         a fundamental new approach in handling break avoidance. This patch just brings
1365         consistency to the API.
1366
1367         Test: fast/regions/forced-break-inside-avoid-break.html
1368
1369         * rendering/RenderBlock.cpp:
1370         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
1371         (WebCore::RenderBlock::computeRegionRangeForBoxChild):
1372         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
1373         * rendering/RenderBlock.h:
1374         * rendering/RenderBlockFlow.cpp:
1375         (WebCore::RenderBlockFlow::adjustForUnsplittableChild): Move the avoidance conditions inside
1376         a helper method RenderBlock::childBoxIsUnsplittableForFragmentation.
1377
1378 2014-03-18  Samuel White  <samuel_white@apple.com>
1379
1380         AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
1381         https://bugs.webkit.org/show_bug.cgi?id=130250
1382
1383         Reviewed by Chris Fleizach.
1384
1385         If initial selection isn't set when we handle selection movement for accessibility, we need to set it. If we don't, using arrow
1386         keys to read text with VoiceOver doesn't work as expected. Things will only start working after the user holds shift and arrows
1387         around to select any arbitrary thing to force selection to get set. This logic handles that special case more gracefully.
1388
1389         Test: platform/mac/accessibility/selection-initial.html
1390
1391         * page/EventHandler.cpp:
1392         (WebCore::handleKeyboardSelectionMovement):
1393         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
1394         * testing/Internals.cpp:
1395         (WebCore::Internals::resetToConsistentState):
1396
1397 2014-03-18  Brent Fulgham  <bfulgham@apple.com>
1398
1399         TextTrackRegion Not Implemented
1400         https://bugs.webkit.org/show_bug.cgi?id=116546
1401
1402         Reviewed by Eric Carlson.
1403
1404         Merged from Blink (patch by vcarbune@chromium.org):
1405         https://chromium.googlesource.com/chromium/blink/+/4940f89a087fea5b5ea628e98d0b355d398a9eea
1406         http://crbug.com/25798003
1407
1408         Tests: media/track/regions-webvtt/text-track-region-display.html
1409                media/track/regions-webvtt/text-track-region-dom-layout.html
1410
1411         * html/HTMLMediaElement.cpp:
1412         (WebCore::HTMLMediaElement::parseAttribute):
1413         * html/track/LoadableTextTrack.cpp:
1414         (WebCore::LoadableTextTrack::newRegionsAvailable):
1415         * html/track/TextTrack.cpp:
1416         * html/track/TextTrack.h:
1417         * html/track/TextTrackRegion.cpp:
1418         (WebCore::TextTrackRegion::TextTrackRegion):
1419         (WebCore::TextTrackRegion::appendTextTrackCueBox):
1420         * html/track/TextTrackRegion.h:
1421         * html/track/VTTCue.cpp:
1422         (WebCore::VTTCue::VTTCue):
1423         (WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
1424         (WebCore::VTTCue::removeDisplayTree):
1425         * html/track/VTTCue.h:
1426         * html/track/WebVTTParser.cpp:
1427         (WebCore::WebVTTParser::parseBytes):
1428         (WebCore::WebVTTParser::collectMetadataHeader):
1429         * html/track/WebVTTParser.h:
1430
1431 2014-03-18  Andreas Kling  <akling@apple.com>
1432
1433         Share MemoryPressureHandler::releaseMemory() between platforms.
1434         <https://webkit.org/b/130416>
1435
1436         Move the code that scours WebKit for things we can free up right now
1437         to the common part of MemoryPressureHandler. This will enable other
1438         platforms to do the same thing under pressure.
1439
1440         There's now also a platformReleaseMemory() where platform-specific
1441         pressure relief stuff can go.
1442
1443         Reviewed by Antti Koivisto.
1444
1445         * platform/MemoryPressureHandler.cpp:
1446         (WebCore::MemoryPressureHandler::releaseMemory):
1447         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1448         * platform/MemoryPressureHandler.h:
1449         * platform/mac/MemoryPressureHandlerMac.mm:
1450         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1451         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1452
1453 2014-03-18  Dean Jackson  <dino@apple.com>
1454
1455         [WebGL] Destroy EAGLContext's backing store
1456         https://bugs.webkit.org/show_bug.cgi?id=130439
1457         <rdar://problem/16295217>
1458
1459         Reviewed by Tim Horton.
1460
1461         When a GraphicsContext3D is being destroyed, we should
1462         also remove any EAGLContext backing store.
1463
1464         * platform/graphics/mac/GraphicsContext3DMac.mm:
1465         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1466
1467 2014-03-18  Tim Horton  <timothy_horton@apple.com>
1468
1469         [iOS][WebKit2] Mark layer contents as being opaque if they are
1470         https://bugs.webkit.org/show_bug.cgi?id=130427
1471         <rdar://problem/15540434>
1472
1473         Reviewed by Simon Fraser.
1474
1475         * platform/graphics/GraphicsLayerClient.h:
1476         (WebCore::GraphicsLayerClient::paintsOpaquelyAtNonIntegralScales):
1477         * platform/graphics/ca/GraphicsLayerCA.cpp:
1478         (WebCore::GraphicsLayerCA::updateContentsOpaque):
1479         * rendering/RenderLayerBacking.cpp:
1480         (WebCore::RenderLayerBacking::paintsOpaquelyAtNonIntegralScales):
1481         * rendering/RenderLayerBacking.h:
1482         r159463 stopped us from setting layers opaque if they were being painted
1483         at non-integral scale. This makes sense for compositing layers, which
1484         are painted by arbitrary elements, but the main frame's RenderView
1485         will always paint its entire contents. To restore the opaque contents
1486         optimization to the main frame's tiles, don't de-opaquify layers
1487         belonging to the main frame's RenderView.
1488
1489 2014-03-18  Jeffrey Pfau  <jpfau@apple.com>
1490
1491         Unify <media> element callback registration and unregistration
1492         https://bugs.webkit.org/show_bug.cgi?id=130417
1493
1494         Reviewed by Eric Carlson.
1495
1496         * html/HTMLMediaElement.cpp:
1497         (WebCore::HTMLMediaElement::HTMLMediaElement):
1498         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1499         (WebCore::HTMLMediaElement::registerWithDocument):
1500         (WebCore::HTMLMediaElement::unregisterWithDocument):
1501         (WebCore::HTMLMediaElement::didMoveToNewDocument):
1502         * html/HTMLMediaElement.h:
1503
1504 2014-03-18  Jer Noble  <jer.noble@apple.com>
1505
1506         MediaDocument should set a max-width on its <video> element.
1507         https://bugs.webkit.org/show_bug.cgi?id=114691
1508
1509         Reviewed by Eric Carlson.
1510
1511         Set a style attribute containing max-width:100% and max-height:100% so that large videos
1512         are entirely visible within the browser window bounds.
1513
1514         * html/MediaDocument.cpp:
1515         (WebCore::MediaDocumentParser::createDocumentStructure):
1516
1517 2014-03-18  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1518
1519         [WebRTC] Fix layering violation in RTCStatsRequest
1520         https://bugs.webkit.org/show_bug.cgi?id=130426
1521
1522         Reviewed by Eric Carlson.
1523
1524         RTCStatsRequest::track() should return a MediaStreamTrackPrivate*.
1525
1526         No new tests needed.
1527
1528         * Modules/mediastream/RTCPeerConnection.cpp:
1529         (WebCore::RTCPeerConnection::getStats):
1530         * Modules/mediastream/RTCStatsRequestImpl.cpp:
1531         (WebCore::RTCStatsRequestImpl::create):
1532         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
1533         (WebCore::RTCStatsRequestImpl::track):
1534         * Modules/mediastream/RTCStatsRequestImpl.h:
1535         * platform/mediastream/RTCStatsRequest.h:
1536
1537 2014-03-18  Anders Carlsson  <andersca@apple.com>
1538
1539         Fix a trivial FIXME
1540         https://bugs.webkit.org/show_bug.cgi?id=130432
1541
1542         Reviewed by Tim Horton.
1543
1544         * history/HistoryItem.cpp:
1545         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1546
1547 2014-03-18  Anders Carlsson  <andersca@apple.com>
1548
1549         Begin cleaning up KeyedDecoder and KeyedEncoder
1550         https://bugs.webkit.org/show_bug.cgi?id=130431
1551
1552         Reviewed by Tim Horton.
1553
1554         Rename KeyedDecoder::decodeVerifiedEnum to decodeEnum to match the encode function,
1555         and sort the decode functions to be in the same logical order as the encode functions.
1556
1557         * Modules/indexeddb/IDBKeyData.cpp:
1558         (WebCore::IDBKeyData::decode):
1559         * Modules/indexeddb/IDBKeyPath.cpp:
1560         (WebCore::IDBKeyPath::decode):
1561         * platform/KeyedCoding.h:
1562         (WebCore::KeyedDecoder::decodeEnum):
1563
1564 2014-03-18  Darin Adler  <darin@apple.com>
1565
1566         Reduce use of deprecatedCharacters in WebCore
1567         https://bugs.webkit.org/show_bug.cgi?id=130318
1568
1569         Reviewed by Andreas Kling.
1570
1571         * Modules/indexeddb/IDBKeyPath.cpp:
1572         (WebCore::IDBKeyPathLexer::IDBKeyPathLexer): Use StringView for parsing.
1573         (WebCore::IDBKeyPathLexer::lex): Ditto.
1574         (WebCore::IDBKeyPathLexer::lexIdentifier): Ditto.
1575
1576         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1577         (WebCore::IDBLevelDBCoding::encodeString): Index directly into string instead of
1578         using deprecatedCharacters.
1579
1580         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1581         (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Use
1582         StringView::getCharactersWithUpconvert.
1583         (WebCore::ThreadableWebSocketChannelClientWrapper::setExtensions): Ditto.
1584
1585         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1586         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
1587         Use operator NSString * instead of explicitly creating an NSString.
1588
1589         * bindings/js/SerializedScriptValue.cpp:
1590         (WebCore::writeLittleEndianUInt16): Added.
1591         (WebCore::CloneSerializer::serialize): Added a separate code path for 8-bit strings.
1592         (WebCore::CloneSerializer::write): Ditto.
1593
1594         * bindings/objc/WebScriptObject.mm:
1595         (+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
1596         Use operator NSString * instead of explicitly creating an NSString.
1597
1598         * dom/Document.cpp:
1599         (WebCore::Document::parseQualifiedName): Index directly into string instead of
1600         using deprecatedCharacters.
1601         * editing/CompositeEditCommand.cpp:
1602         (WebCore::containsOnlyWhitespace): Ditto.
1603         * editing/SmartReplace.cpp:
1604         (WebCore::addAllCodePoints): Ditto.
1605         (WebCore::getSmartSet): Use StringView::upconvertedCharacters.
1606
1607         * editing/TextIterator.cpp:
1608         (WebCore::foldQuoteMarksAndSoftHyphens): Changed to return a value so it can be
1609         used in initialization rather than assignment.
1610         (WebCore::SearchBuffer::SearchBuffer): Use StringView::upconvertedCharacters.
1611
1612         * editing/TypingCommand.cpp:
1613         (WebCore::TypingCommand::insertText): Index directly into string instead of using
1614         deprecatedCharacters.
1615         * editing/VisiblePosition.cpp:
1616         (WebCore::VisiblePosition::characterAfter): Ditto.
1617         * editing/VisibleUnits.cpp:
1618         (WebCore::startOfParagraph): Ditto.
1619         (WebCore::endOfParagraph): Ditto.
1620
1621         * fileapi/WebKitBlobBuilder.cpp:
1622         (WebCore::BlobBuilder::append): Pass a StringView to TextEncoding::encode.
1623
1624         * html/BaseDateAndTimeInputType.cpp:
1625         (WebCore::BaseDateAndTimeInputType::parseToDateComponents): Use
1626         StringView::upconvertedCharacters.
1627
1628         * html/FormDataList.cpp:
1629         (WebCore::FormDataList::appendString): Pass a StringView to TextEncoding::encode.
1630
1631         * html/canvas/CanvasRenderingContext2D.cpp:
1632         (WebCore::normalizeSpaces): Use StringView::getCharactersWithUpconvert.
1633
1634         * html/parser/HTMLParserIdioms.cpp:
1635         (WebCore::stripLeadingAndTrailingHTMLSpaces): Use characters16 for a code path
1636         that already handled 8-bit characters separately.
1637         (WebCore::parseHTMLNonNegativeInteger): Ditto.
1638         (WebCore::parseDescriptors): Added an 8-bit code path.
1639
1640         * inspector/InspectorStyleSheet.cpp:
1641         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): Index directly into
1642         string instead of using deprecatedCharacters.
1643         * inspector/InspectorStyleTextEditor.cpp:
1644         (WebCore::InspectorStyleTextEditor::insertProperty): Ditto.
1645         (WebCore::InspectorStyleTextEditor::internalReplaceProperty): Ditto.
1646
1647         * page/ContentSecurityPolicy.cpp:
1648         (WebCore::isSourceListNone): Use StringView::upconvertedCharacters.
1649         (WebCore::CSPSourceList::parse): Ditto.
1650         (WebCore::NonceDirective::parse): Ditto.
1651         (WebCore::MediaListDirective::parse): Ditto.
1652         (WebCore::CSPDirectiveList::parse): Ditto.
1653         (WebCore::CSPDirectiveList::parseReportURI): Ditto.
1654         (WebCore::CSPDirectiveList::parseReflectedXSS): Ditto.
1655         (WebCore::ContentSecurityPolicy::didReceiveHeader): Ditto.
1656
1657         * page/PageSerializer.cpp:
1658         (WebCore::PageSerializer::serializeFrame): Pass a StringView into
1659         TextEncoding::encode.
1660         (WebCore::PageSerializer::serializeCSSStyleSheet): Ditto.
1661
1662         * platform/Length.cpp:
1663         (WebCore::countCharacter): Index directly into string instead of using
1664         deprecatedCharacters. Also changed to take a StringImpl&.
1665         (WebCore::newCoordsArray): Ditto. Call countCharacter the new way, and
1666         use StringView::upconvertedCharacters.
1667         (WebCore::newLengthArray): Ditto.
1668
1669         * platform/LinkHash.cpp:
1670         (WebCore::visitedLinkHash): Use characters16 for the 16-bit path.
1671         Also removed unused visitedURL function.
1672         * platform/LinkHash.h: Removed unused visitedURL function.
1673
1674         * platform/SharedBuffer.cpp:
1675         (WebCore::utf8Buffer): Added an 8-bit code path.
1676         * platform/URL.cpp:
1677         (WebCore::URL::port): Ditto.
1678         (WebCore::encodeRelativeString): Use StringView to call TextEncoding::encode.
1679
1680         * platform/graphics/Color.cpp:
1681         (WebCore::Color::parseHexColor): Use characters16 in the 16-bit path.
1682         (WebCore::Color::Color): Ditto.
1683
1684         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
1685         (WebCore::harfBuzzGetGlyph): Use StringView to call TextEncoding::encode.
1686
1687         * platform/graphics/StringTruncator.cpp:
1688         (WebCore::centerTruncateToBuffer): Use StringView::getCharactersWithUpconvert.
1689         (WebCore::rightTruncateToBuffer): Ditto.
1690         (WebCore::rightClipToCharacterBuffer): Ditto.
1691         (WebCore::rightClipToWordBuffer): Ditto.
1692         (WebCore::leftTruncateToBuffer): Ditto.
1693         (WebCore::truncateString): Ditto.
1694
1695         * platform/graphics/TextRun.h:
1696         (WebCore::TextRun::TextRun): Use characters16 in the 16-bit code path.
1697
1698         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1699         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1700         Use StringView::upconvertedCharacters.
1701
1702         * platform/network/DataURL.cpp:
1703         (WebCore::handleDataURL): Use StringView to call TextEncoding::encode.
1704         * platform/network/FormDataBuilder.cpp:
1705         (WebCore::FormDataBuilder::addFilenameToMultiPartHeader): Ditto.
1706
1707         * platform/sql/SQLiteStatement.cpp:
1708         (WebCore::SQLiteStatement::bindBlob): Use StringView::upconvertedCharacters.
1709         (WebCore::SQLiteStatement::bindText): Ditto.
1710
1711         * platform/text/DecodeEscapeSequences.h:
1712         (WebCore::Unicode16BitEscapeSequence::decodeRun): Changed to take a StringView.
1713         (WebCore::URLEscapeSequence::decodeRun): Ditto.
1714         (WebCore::decodeEscapeSequences): Pass StringView to decodeRun.
1715
1716         * platform/text/Hyphenation.cpp:
1717         (WebCore::lastHyphenLocation): Take a StringView.
1718         * platform/text/Hyphenation.h: Make lastHyphenLocation take a StringView.
1719
1720         * platform/text/TextBreakIterator.cpp:
1721         (WebCore::initializeIteratorWithRules): Use StringView::upconvertedCharacters.
1722
1723         * platform/text/TextEncoding.cpp:
1724         (WebCore::TextEncoding::encode): Use StringView::upconvertedCharacters.
1725         Change argument type to StringView.
1726         * platform/text/TextEncoding.h: Ditto.
1727
1728         * platform/text/TextEncodingRegistry.cpp:
1729         (WebCore::atomicCanonicalTextEncodingName): Use characters16 for the 16-bit path.
1730
1731         * platform/text/cf/HyphenationCF.cpp:
1732         (WebCore::lastHyphenLocation): Use StringView::text.createCFStringWithoutCopying.
1733         Change argument type to StringView.
1734
1735         * rendering/RenderBlock.cpp:
1736         (WebCore::RenderBlock::constructTextRun): Use characters16 for the 16-bit path.
1737
1738         * rendering/RenderCombineText.cpp:
1739         (WebCore::RenderCombineText::width): Removed check for null characters pointer,
1740         since the pointer will never be null, and even if it was there would be no need
1741         for an early exit.
1742
1743         * rendering/RenderText.cpp:
1744         (WebCore::maxWordFragmentWidth): Take a StringView.
1745         (WebCore::RenderText::computePreferredLogicalWidths): Pass in a StringView.
1746         * rendering/line/BreakingContextInlineHeaders.h:
1747         (WebCore::tryHyphenating): Ditto.
1748
1749         * rendering/svg/SVGTextLayoutEngine.cpp:
1750         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): Use
1751         StringView::upconvertedCharacters.
1752
1753         * rendering/svg/SVGTextMetrics.cpp:
1754         (WebCore::SVGTextMetrics::SVGTextMetrics): Use String::substring.
1755
1756         * svg/SVGAngle.cpp:
1757         (WebCore::SVGAngle::setValueAsString): Use StringView::upconvertedCharacters.
1758         * svg/SVGAnimateMotionElement.cpp:
1759         (WebCore::parsePoint): Ditto.
1760         * svg/SVGAnimationElement.cpp:
1761         (WebCore::parseKeySplines): Ditto.
1762         * svg/SVGFitToViewBox.cpp:
1763         (WebCore::SVGFitToViewBox::parseViewBox): Ditto.
1764
1765         * svg/SVGFontData.cpp:
1766         (WebCore::SVGFontData::applySVGGlyphSelection): Pass StringView to
1767         createStringWIthMirroredCharacters.
1768         (WebCore::createStringWithMirroredCharacters): Changed to use StringView and
1769         use indexing into that instead of a characters pointer.
1770
1771         * svg/SVGFontData.h: Removed createStringWithMirroredCharacters member function,
1772         since it has nothing to do with the SVGFontData object. Now it's just a private
1773         helper function in the SVGFontData.cpp source file.
1774
1775         * svg/SVGFontElement.cpp:
1776         (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Index into the string
1777         instead of using deprecatedCharacters.
1778
1779         * svg/SVGGlyphMap.h:
1780         (WebCore::SVGGlyphMap::addGlyph): Use StringView::upconvertedCharacters.
1781         (WebCore::SVGGlyphMap::collectGlyphsForString): Ditto.
1782         * svg/SVGGlyphRefElement.cpp:
1783         (WebCore::SVGGlyphRefElement::parseAttribute): Ditto.
1784         * svg/SVGLength.cpp:
1785         (WebCore::SVGLength::setValueAsString): Ditto.
1786         * svg/SVGLengthList.cpp:
1787         (WebCore::SVGLengthList::parse): Ditto.
1788         * svg/SVGNumberList.cpp:
1789         (WebCore::SVGNumberList::parse): Ditto.
1790         * svg/SVGParserUtilities.cpp:
1791         (WebCore::parseNumberFromString): Ditto.
1792         (WebCore::parseNumberOptionalNumber): Ditto.
1793         (WebCore::parseRect): Ditto.
1794         (WebCore::pointsListFromSVGData): Ditto.
1795         (WebCore::parseGlyphName): Ditto.
1796         (WebCore::parseKerningUnicodeString): Ditto.
1797         (WebCore::parseDelimitedString): Ditto.
1798         * svg/SVGPreserveAspectRatio.cpp:
1799         (WebCore::SVGPreserveAspectRatio::parse): Ditto.
1800         * svg/SVGStringList.cpp:
1801         (WebCore::SVGStringList::parse): Ditto.
1802         * svg/SVGTransformList.cpp:
1803         (WebCore::SVGTransformList::parse): Ditto.
1804         * svg/SVGTransformable.cpp:
1805         (WebCore::SVGTransformable::parseTransformType): Ditto.
1806         * svg/SVGViewSpec.cpp:
1807         (WebCore::SVGViewSpec::parseViewSpec): Ditto.
1808         * svg/SVGZoomAndPan.h:
1809         (WebCore::SVGZoomAndPan::parseAttribute): Ditto.
1810
1811         * xml/XMLHttpRequest.cpp:
1812         (WebCore::XMLHttpRequest::send): Pass a StringView to TextEncoding::encode.
1813
1814         * xml/XSLStyleSheetLibxslt.cpp:
1815         (WebCore::XSLStyleSheet::parseString): Use StringView::upconvertedCharacters.
1816
1817 2014-03-18  Bem Jones-Bey  <bjonesbe@adobe.com>
1818
1819         LayoutBox is a terrible name
1820         https://bugs.webkit.org/show_bug.cgi?id=130351
1821
1822         Reviewed by Simon Fraser.
1823
1824         Rename LayoutBox to CSSBoxType. Also rename the functions and methods
1825         that mention "LayoutBox" to something that makes sense for each
1826         specific situation.
1827
1828         No new tests, no behavior change.
1829
1830         * css/BasicShapeFunctions.cpp:
1831         (WebCore::valueForBasicShape):
1832         (WebCore::basicShapeForValue):
1833         * css/CSSBasicShapes.cpp:
1834         (WebCore::CSSBasicShapeCircle::cssText):
1835         (WebCore::CSSBasicShapeCircle::equals):
1836         (WebCore::CSSBasicShapeEllipse::cssText):
1837         (WebCore::CSSBasicShapeEllipse::equals):
1838         (WebCore::CSSBasicShapePolygon::cssText):
1839         (WebCore::CSSBasicShapePolygon::equals):
1840         (WebCore::CSSBasicShapeInset::cssText):
1841         * css/CSSBasicShapes.h:
1842         (WebCore::CSSBasicShape::referenceBox):
1843         (WebCore::CSSBasicShape::setReferenceBox):
1844         * css/CSSComputedStyleDeclaration.cpp:
1845         (WebCore::shapePropertyValue):
1846         * css/CSSPrimitiveValueMappings.h:
1847         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1848         (WebCore::CSSPrimitiveValue::operator CSSBoxType):
1849         * css/DeprecatedStyleBuilder.cpp:
1850         (WebCore::ApplyPropertyClipPath::applyValue):
1851         (WebCore::ApplyPropertyShape::applyValue):
1852         * page/animation/CSSPropertyAnimation.cpp:
1853         (WebCore::blendFunc):
1854         * rendering/ClipPathOperation.h:
1855         (WebCore::ShapeClipPathOperation::setReferenceBox):
1856         (WebCore::ShapeClipPathOperation::referenceBox):
1857         (WebCore::BoxClipPathOperation::create):
1858         (WebCore::BoxClipPathOperation::referenceBox):
1859         (WebCore::BoxClipPathOperation::BoxClipPathOperation):
1860         * rendering/shapes/Shape.cpp:
1861         (WebCore::Shape::createBoxShape):
1862         * rendering/shapes/Shape.h:
1863         * rendering/shapes/ShapeInfo.cpp:
1864         (WebCore::ShapeInfo<RenderType>::computedShape):
1865         * rendering/shapes/ShapeInfo.h:
1866         * rendering/shapes/ShapeInsideInfo.h:
1867         * rendering/shapes/ShapeOutsideInfo.h:
1868         * rendering/style/BasicShapes.cpp:
1869         (WebCore::BasicShape::canBlend):
1870         * rendering/style/BasicShapes.h:
1871         (WebCore::BasicShape::referenceBox):
1872         (WebCore::BasicShape::setReferenceBox):
1873         (WebCore::BasicShape::BasicShape):
1874         * rendering/style/RenderStyleConstants.h:
1875         * rendering/style/ShapeValue.h:
1876         (WebCore::ShapeValue::createShapeValue):
1877         (WebCore::ShapeValue::createBoxShapeValue):
1878         (WebCore::ShapeValue::cssBox):
1879         (WebCore::ShapeValue::ShapeValue):
1880
1881 2014-03-18  Daniel Bates  <dabates@apple.com>
1882
1883         REGRESSION (r162334): RenderTableCol::styleDidChange uses out-of-date table information
1884         https://bugs.webkit.org/show_bug.cgi?id=129561
1885
1886         Reviewed by Antti Koivisto.
1887
1888         Test: fast/table/update-col-width-and-remove-table-cell-crash.html
1889
1890         Fixes an issue where a table column or table column group may query an out-
1891         of-date model of its associated table as part of its process to propagate
1892         style changes to affected table cells.
1893
1894         * rendering/RenderTableCol.cpp:
1895         (WebCore::RenderTableCol::styleDidChange): Ensure that all sections in the table
1896         are up-to-date before querying for a table cell.
1897         * rendering/RenderTableSection.cpp:
1898         (WebCore::RenderTableSection::recalcCells): Update comment to read well. In
1899         particular, remove the reference to RenderTableSection::fillRowsWithDefaultStartingAtPosition()
1900         as this function was removed in <http://trac.webkit.org/changeset/99919>.
1901         (WebCore::RenderTableSection::setNeedsCellRecalc): Clear the grid preemptively to
1902         to ensure that accessors cannot access stale data. We'll build the grid again
1903         in RenderTableSection::recalcCells().
1904         (WebCore::RenderTableSection::numColumns): Add ASSERT(!m_needsCellRecalc) to assert
1905         that the grid cells are up-to-date. That is, we don't need to calculate them again.
1906         * rendering/RenderTableSection.h: Add ASSERT(!m_needsCellRecalc) or call recalcCellsIfNeeded()
1907         before accessing the grid to ensure that it's up-to-date.
1908
1909 2014-03-18  Daniel Bates  <dabates@apple.com>
1910
1911         REGRESSION (r163560): ASSERTION FAILED: childrenInline() in WebCore::RenderSVGText::layout
1912         https://bugs.webkit.org/show_bug.cgi?id=130346
1913
1914         Reviewed by Andreas Kling.
1915
1916         Following <http://trac.webkit.org/changeset/163560>, SVG inline elements may be treated as block-
1917         level elements depending on their CSS styles (e.g. display: block). But such elements should always
1918         be treated as inline-level elements.
1919
1920         Partially revert <http://trac.webkit.org/changeset/164368> as it addressed a similar issue for
1921         <tspan> and <tref>. Instead we should implement RenderSVGInline::updateFromStyle() to ensure that
1922         RenderSVGInline and any derived classes (e.g. RenderSVGTSpan) are always treated as inline elements
1923         regardless of their CSS style because the SVG text layout code depends on this assumption as part
1924         of a performance optimization. We may want to revaluate the benefits of this optimization with respect
1925         to code clarity and ensuring the code is less error prone.
1926
1927         Test: svg/text/a-display-block.html
1928               svg/text/tref-display-inherit.html
1929
1930         * css/StyleResolver.cpp:
1931         (WebCore::StyleResolver::adjustRenderStyle): Revert changes from <http://trac.webkit.org/changeset/164368>.
1932         * rendering/RenderInline.h:
1933         * rendering/svg/RenderSVGInline.cpp:
1934         (WebCore::RenderSVGInline::updateFromStyle): Added; ensure that RenderSVGInline and any derived
1935         classes are treated as inline elements because the SVG text layout code depends on this assumption.
1936         * rendering/svg/RenderSVGInline.h:
1937
1938 2014-03-18  Hans Muller  <hmuller@adobe.com>
1939
1940         [CSS Shapes] shape-outside: ellipse(50% 50% at) causes crash
1941         https://bugs.webkit.org/show_bug.cgi?id=130366
1942
1943         Reviewed by Andreas Kling.
1944
1945         The BasicShape ellipse and circle functions now report a syntax error
1946         if the "at" keyword is not followed by a position.
1947
1948         The existing parsing tests have been updated to include this case.
1949
1950         * css/CSSParser.cpp:
1951         (WebCore::CSSParser::parseBasicShapeCircle):
1952         (WebCore::CSSParser::parseBasicShapeEllipse):
1953
1954 2014-03-18  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1955
1956         Removing MediaStreamVector typedef
1957         https://bugs.webkit.org/show_bug.cgi?id=130402
1958
1959         Reviewed by Eric Carlson.
1960
1961         * Modules/mediastream/MediaStream.h:
1962         * Modules/mediastream/RTCPeerConnection.cpp:
1963         (WebCore::RTCPeerConnection::getLocalStreams):
1964         (WebCore::RTCPeerConnection::getRemoteStreams):
1965         (WebCore::RTCPeerConnection::getStreamById):
1966         (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
1967         * Modules/mediastream/RTCPeerConnection.h:
1968
1969 >>>>>>> .r165925
1970 2014-03-18  Commit Queue  <commit-queue@webkit.org>
1971
1972         Unreviewed, rolling out r165815.
1973         https://bugs.webkit.org/show_bug.cgi?id=130410
1974
1975         Broke many VTT tests (Requested by bfulgham on #webkit).
1976
1977         Reverted changeset:
1978
1979         "TextTrackRegion Not Implemented"
1980         https://bugs.webkit.org/show_bug.cgi?id=116546
1981         http://trac.webkit.org/changeset/165815
1982
1983 2014-03-18  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
1984
1985         Bad cast with toRenderBox in WebCore::RenderView::repaintViewRectangle
1986         https://bugs.webkit.org/show_bug.cgi?id=129104
1987
1988         Reviewed by Simon Fraser.
1989
1990         We should not cast the renderer of a RenderView's owner to RenderBox
1991         unless we are sure it is one.
1992
1993         Test: plugins/crash-invalid-data-reference.html
1994
1995         * rendering/RenderView.cpp:
1996         (WebCore::RenderView::repaintViewRectangle):
1997
1998 2014-03-18  Andreas Kling  <akling@apple.com>
1999
2000         Micro-optimize element descendant iterator.
2001         <https://webkit.org/b/130384>
2002
2003         Add a slightly more efficient ElementDescendantIterator that keeps a stack
2004         of relevant ancestor siblings instead of walking up the parent chain every
2005         time we run out of children.
2006
2007         Reviewed by Antti Koivisto.
2008
2009         * WebCore.xcodeproj/project.pbxproj:
2010         * dom/ElementDescendantIterator.h: Added.
2011         (WebCore::ElementDescendantIterator::ElementDescendantIterator):
2012         (WebCore::ElementDescendantIterator::operator++):
2013         (WebCore::ElementDescendantConstIterator::ElementDescendantConstIterator):
2014         (WebCore::ElementDescendantConstIterator::operator++):
2015         (WebCore::ElementDescendantIteratorAdapter::ElementDescendantIteratorAdapter):
2016         (WebCore::ElementDescendantIteratorAdapter::begin):
2017         (WebCore::ElementDescendantIteratorAdapter::end):
2018         (WebCore::ElementDescendantConstIteratorAdapter::ElementDescendantConstIteratorAdapter):
2019         (WebCore::ElementDescendantConstIteratorAdapter::begin):
2020         (WebCore::ElementDescendantConstIteratorAdapter::end):
2021         (WebCore::elementDescendants):
2022         * dom/ElementIterator.h:
2023         * dom/SelectorQuery.cpp:
2024         (WebCore::elementsForLocalName):
2025         (WebCore::anyElement):
2026         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2027         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
2028         (WebCore::SelectorDataList::executeSingleSelectorData):
2029         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
2030         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
2031
2032 2014-03-18  Antti Koivisto  <antti@apple.com>
2033
2034         Mutating rules returned by getMatchedCSSRules can result in crash
2035         https://bugs.webkit.org/show_bug.cgi?id=130209
2036
2037         Reviewed by Andreas Kling.
2038         
2039         The non-standard getMatchedCSSRules API returns CSSStyleRule objects that don't
2040         have parent stylesheet pointer (as we don't know which sheet the rule originated from).
2041         Mutating the rule via such wrapper can lead to crashes later as we fail to invalidate
2042         the underlying stylesheet.
2043         
2044         Fix by disallowing mutation of style rules that don't have parent sheet pointer. CSSStyleRule
2045         has two mutable properties selectorText and style. The latter gives back CSSStyleDeclaration.
2046         This patch disallows mutations in both cases for CSSStyleRules that don't have parent stylesheet
2047         pointer.
2048         
2049         While it is technically possible to have CSSRules that are legitimately disconnected
2050         from stylesheet (by removing rule from sheet while holding a reference to it) it never
2051         makes sense to mutate such rule as there is no way to do anything with it afterwards.
2052
2053         Tests: fast/css/getMatchedCSSProperties-rule-mutation.html
2054                fast/css/getMatchedCSSRules-crash.html
2055
2056         * css/CSSStyleRule.cpp:
2057         (WebCore::CSSStyleRule::setSelectorText):
2058
2059             Bail out if parent stylesheet is null.
2060
2061         * css/PropertySetCSSStyleDeclaration.cpp:
2062         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
2063         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
2064         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
2065         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
2066         
2067             Allow StyleRuleCSSStyleDeclaration subclass cancel the mutation via
2068             boolean return value from willMutate.
2069
2070         (WebCore::StyleRuleCSSStyleDeclaration::willMutate):
2071         
2072             Disallow mutation if the owning CSSStyleRule is null or has null stylesheet.
2073
2074         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
2075         
2076             We never get here with null rule or stylesheet anymore.
2077
2078         * css/PropertySetCSSStyleDeclaration.h:
2079         (WebCore::PropertySetCSSStyleDeclaration::willMutate):
2080
2081 2014-03-17  Jeffrey Pfau  <jpfau@apple.com>
2082
2083         <media> elements are not properly moved to new documents' visibility callback lists
2084         https://bugs.webkit.org/show_bug.cgi?id=127711
2085
2086         Reviewed by David Kilzer.
2087
2088         * html/HTMLMediaElement.cpp:
2089         (WebCore::HTMLMediaElement::didMoveToNewDocument):
2090
2091 2014-03-18  Filip Pizlo  <fpizlo@apple.com>
2092
2093         More FTL enabling.
2094
2095         Rubber stamped by Dan Bernstein and Mark Hahnenberg.
2096
2097         No new tests.
2098
2099         * Configurations/FeatureDefines.xcconfig:
2100
2101 2014-03-18  Brent Fulgham  <bfulgham@apple.com>
2102
2103         TextTrackRegion Not Implemented
2104         https://bugs.webkit.org/show_bug.cgi?id=116546
2105
2106         Reviewed by Eric Carlson.
2107
2108         Merged from Blink (patch by vcarbune@chromium.org):
2109         https://chromium.googlesource.com/chromium/blink/+/4940f89a087fea5b5ea628e98d0b355d398a9eea
2110         http://crbug.com/25798003
2111
2112         Tests: media/track/regions-webvtt/text-track-region-display.html
2113                media/track/regions-webvtt/text-track-region-dom-layout.html
2114
2115         * html/HTMLMediaElement.cpp:
2116         (WebCore::HTMLMediaElement::parseAttribute):
2117         * html/track/LoadableTextTrack.cpp:
2118         (WebCore::LoadableTextTrack::newRegionsAvailable):
2119         * html/track/TextTrack.cpp:
2120         * html/track/TextTrack.h:
2121         * html/track/TextTrackRegion.cpp:
2122         (WebCore::TextTrackRegion::TextTrackRegion):
2123         (WebCore::TextTrackRegion::appendTextTrackCueBox):
2124         * html/track/TextTrackRegion.h:
2125         * html/track/VTTCue.cpp:
2126         (WebCore::VTTCue::VTTCue):
2127         (WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
2128         (WebCore::VTTCue::removeDisplayTree):
2129         * html/track/VTTCue.h:
2130         * html/track/WebVTTParser.cpp:
2131         (WebCore::WebVTTParser::parseBytes):
2132         (WebCore::WebVTTParser::collectMetadataHeader):
2133         * html/track/WebVTTParser.h:
2134
2135 2014-03-18  Philippe Normand  <pnormand@igalia.com>
2136
2137         [GTK] ResourceLoaderSoup.cpp was added by mistake
2138         https://bugs.webkit.org/show_bug.cgi?id=130396
2139
2140         Reviewed by Carlos Garcia Campos.
2141
2142         This file was committed by mistake in r152778 and is not built by
2143         any port.
2144
2145         * loader/soup/ResourceLoaderSoup.cpp: Removed.
2146
2147 2014-03-18  Andreas Kling  <akling@apple.com>
2148
2149         Rename ElementDescendantIterator to TypedElementDescendantIterator.
2150         Romper-stubbed by Antti "Latte Lung" Koivisto.
2151
2152         * GNUmakefile.list.am:
2153         * WebCore.vcxproj/WebCore.vcxproj:
2154         * WebCore.vcxproj/WebCore.vcxproj.filters:
2155         * WebCore.xcodeproj/project.pbxproj:
2156         * dom/ElementDescendantIterator.h: Removed.
2157         * dom/ElementIterator.h:
2158         * dom/TypedElementDescendantIterator.h: Added.
2159         (WebCore::TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator):
2160         (WebCore::TypedElementDescendantIterator<ElementType>::operator):
2161         (WebCore::TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator):
2162         (WebCore::TypedElementDescendantConstIterator<ElementType>::operator):
2163         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::TypedElementDescendantIteratorAdapter):
2164         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::begin):
2165         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::end):
2166         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
2167         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
2168         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::first):
2169         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::last):
2170         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::TypedElementDescendantConstIteratorAdapter):
2171         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::begin):
2172         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::end):
2173         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
2174         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
2175         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::first):
2176         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::last):
2177         (WebCore::descendantsOfType):
2178
2179 2014-03-18  Ion Rosca  <rosca@adobe.com>
2180
2181         Add blend mode property to dumped information in GraphicsLayer.
2182         https://bugs.webkit.org/show_bug.cgi?id=130331
2183
2184         Reviewed by Simon Fraser.
2185
2186         Functionality is not changed, therefore no new tests added.
2187         I adjusted the affected test results generated with layerTreeAsText.
2188
2189         * platform/graphics/GraphicsLayer.cpp:
2190         (WebCore::GraphicsLayer::dumpProperties):
2191
2192 2014-03-17  Sergio Villar Senin  <svillar@igalia.com>
2193
2194         webdatabase: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
2195         https://bugs.webkit.org/show_bug.cgi?id=130347
2196
2197         Reviewed by Darin Adler.
2198
2199         * Modules/webdatabase/DatabaseTracker.cpp:
2200         (WebCore::DatabaseTracker::openDatabaseMutex):
2201         (WebCore::notificationMutex):
2202         (WebCore::notificationQueue):
2203
2204 2014-03-17  Jer Noble  <jer.noble@apple.com>
2205
2206         Add RemoteCommandListener support to MediaSessionManager.
2207         https://bugs.webkit.org/show_bug.cgi?id=130354
2208
2209         Reviewed by Eric Carlson.
2210
2211         Listen for remote commands in MediaSessionManager.
2212
2213         * platform/audio/MediaSessionManager.cpp:
2214         (WebCore::MediaSessionManager::addSession):
2215         (WebCore::MediaSessionManager::removeSession):
2216         * platform/audio/MediaSessionManager.h:
2217
2218         Add RemoteCommandListener to the project files:
2219         * CMakeLists.txt:
2220         * GNUmakefile.list.am:
2221         * WebCore.vcxproj/WebCore.vcxproj:
2222         * WebCore.vcxproj/WebCore.vcxproj.filters:
2223
2224 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2225
2226         Rewrite WebHTMLConverter::_elementHasOwnBackgroundColor in C++
2227         https://bugs.webkit.org/show_bug.cgi?id=130291
2228
2229         Reviewed by Andreas Kling.
2230
2231         Extracted HTMLConverterCaches::elementHasOwnBackgroundColor.
2232
2233         * platform/mac/HTMLConverter.mm:
2234         (HTMLConverterCaches::elementHasOwnBackgroundColor):
2235         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
2236
2237 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2238
2239         Rewrite WebHTMLConverter::_elementIsBlockLevel in C++
2240         https://bugs.webkit.org/show_bug.cgi?id=130287
2241
2242         Reviewed by Andreas Kling.
2243
2244         Rewrote _elementIsBlockLevel as HTMLConverterCaches::isBlockElement. Also removed the code to update
2245         _elementIsBlockLevel in _traverseNode as computing the value of _elementIsBlockLevel is now fast.
2246
2247         * platform/mac/HTMLConverter.h:
2248         * platform/mac/HTMLConverter.mm:
2249         (HTMLConverterCaches::isBlockElement):
2250         (-[WebHTMLConverter _elementIsBlockLevel:]):
2251         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
2252         (-[WebHTMLConverter dealloc]):
2253         (-[WebHTMLConverter init]):
2254
2255 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2256
2257         Rewrite WebHTMLConverter::_getComputedFloat in C++
2258         https://bugs.webkit.org/show_bug.cgi?id=130284
2259
2260         Reviewed by Andreas Kling.
2261
2262         Rewrote _getComputedFloat as HTMLConverterCaches::floatPropertyValueForNode.
2263
2264         * platform/mac/HTMLConverter.h:
2265         * platform/mac/HTMLConverter.mm:
2266         (HTMLConverterCaches::floatPropertyValueForNode):
2267         (-[WebHTMLConverter _getFloat:forNode:property:]): Now that computing the float value is fast, we don't need to
2268         store it in the cache.
2269         (-[WebHTMLConverter dealloc]):
2270         (-[WebHTMLConverter init]):
2271
2272 2014-03-16  Andreas Kling  <akling@apple.com>
2273
2274         HTMLInputElement::defaultEventHandler() shouldn't force style updates.
2275         <https://webkit.org/b/130303>
2276
2277         Move the updateStyleIfNeeded() call down to TextFieldInputType instead
2278         of doing it for every HTMLInputEvent.
2279
2280         There might be a better way to do this; we only want to know about this
2281         specific element's renderer, and don't need the rest of the tree.
2282         This is still an easy hack to avoid a lot of unnecessary work.
2283
2284         Reviewed by Anders Carlsson.
2285
2286         * html/HTMLInputElement.cpp:
2287         (WebCore::HTMLInputElement::defaultEventHandler):
2288         * html/TextFieldInputType.cpp:
2289         (WebCore::TextFieldInputType::forwardEvent):
2290
2291 2014-03-17  Brent Fulgham  <bfulgham@apple.com>
2292
2293         [WebVTT] Extending WebVTT Rendering with Regions
2294         https://bugs.webkit.org/show_bug.cgi?id=109822
2295
2296         Reviewed by Eric Carlson.
2297
2298         Merged from Blink (patch by Victor Carbune vcarbune@chromium.org):
2299         https://chromium.googlesource.com/chromium/blink/+/0cdebc1d76d41bfcb9c4b022e54a4fbff132225d
2300
2301         No new tests, as this feature is not active in default builds. New tests will be added
2302         in an upcoming bug.
2303
2304         * css/mediaControls.css:
2305         (video::-webkit-media-text-track-region):
2306         (video::-webkit-media-text-track-region-container):
2307         (video::-webkit-media-text-track-region-container.scrolling):
2308         (video::-webkit-media-text-track-display):
2309         * html/shadow/MediaControlElements.cpp:
2310         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2311         * html/track/TextTrack.cpp:
2312         (WebCore::TextTrack::~TextTrack):
2313         * html/track/TextTrackCue.cpp:
2314         * html/track/TextTrackRegion.cpp:
2315         (WebCore::TextTrackRegion::TextTrackRegion):
2316         (WebCore::TextTrackRegion::textTrackCueContainerScrollingClass):
2317         (WebCore::TextTrackRegion::textTrackCueContainerShadowPseudoId):
2318         (WebCore::TextTrackRegion::textTrackRegionShadowPseudoId):
2319         (WebCore::TextTrackRegion::appendTextTrackCueBox):
2320         (WebCore::TextTrackRegion::displayLastTextTrackCueBox):
2321         (WebCore::TextTrackRegion::willRemoveTextTrackCueBox):
2322         (WebCore::TextTrackRegion::getDisplayTree):
2323         (WebCore::TextTrackRegion::prepareRegionDisplayTree):
2324         (WebCore::TextTrackRegion::startTimer):
2325         (WebCore::TextTrackRegion::stopTimer):
2326         (WebCore::TextTrackRegion::scrollTimerFired):
2327         * html/track/TextTrackRegion.h:
2328         (WebCore::TextTrackRegion::create):
2329         (WebCore::TextTrackRegion::isScrollingRegion):
2330         (WebCore::TextTrackRegion::ownerDocument):
2331         * html/track/TextTrackRegion.idl:
2332         * html/track/TextTrackRegionList.cpp:
2333         (WebCore::TextTrackRegionList::getRegionById):
2334         * html/track/VTTCue.cpp:
2335         (WebCore::VTTCueBox::applyCSSProperties):
2336         (WebCore::VTTCue::~VTTCue):
2337         (WebCore::VTTCue::setIsActive):
2338         (WebCore::VTTCue::removeDisplayTree):
2339         * html/track/WebVTTParser.cpp:
2340         (WebCore::WebVTTParser::createNewRegion):
2341         * rendering/RenderVTTCue.cpp:
2342         (WebCore::RenderVTTCue::layout):
2343
2344 2014-03-17  Brendan Long  <b.long@cablelabs.com>
2345
2346         [GStreamer] human readable language code for tracks
2347         https://bugs.webkit.org/show_bug.cgi?id=124514
2348
2349         Reviewed by Martin Robinson.
2350
2351         * PlatformEfl.cmake: Add GSTREAMER_TAG_INCLUDE_DIRS and GSTREAMER_TAG_LIBRARIES.
2352         * PlatformGTK.cmake: Same.
2353         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2354         (WebCore::TrackPrivateBaseGStreamer::getLanguageCode): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.
2355         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use getLanguageCode() for languages instead of just getTag().
2356
2357 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2358
2359         [Mac] Rewrite WebHTMLConverter::_computedStringForNode in C++
2360         https://bugs.webkit.org/show_bug.cgi?id=130274
2361
2362         Reviewed by Andreas Kling.
2363
2364         Rewrote WebHTMLConverter::_computedStringForNode as HTMLConverterCaches::propertyValueForNode.
2365
2366         * platform/mac/HTMLConverter.h: Removed unused caches.
2367         * platform/mac/HTMLConverter.mm:
2368         (HTMLConverterCaches::computedStylePropertyForElement): Added use const String& instead of String& on property name.
2369         (HTMLConverterCaches::inlineStylePropertyForElement): Ditto.
2370         (HTMLConverterCaches::propertyValueForNode): Renamed and rewritten from _computedStringForNode.
2371         (-[WebHTMLConverter _stringForNode:property:]): Simply return the computed value instead of storing it in the cache
2372         now that the computing the value is fast.
2373         (-[WebHTMLConverter dealloc]):
2374         (-[WebHTMLConverter init]):
2375
2376 2014-03-17  Andreas Kling  <akling@apple.com>
2377
2378         Remove unnecessary JSC::Handle null checks in bindings code.
2379         <https://webkit.org/b/130356>
2380
2381         Use Handle::slot() directly instead of going through Handle::get().
2382         This avoids null checking the HandleSlot, which isn't necessary here
2383         anyway, and the code already assumes it'll never be null.
2384
2385         Reviewed by Gavin Barraclough.
2386
2387         * bindings/js/JSCSSRuleListCustom.cpp:
2388         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
2389         * bindings/js/JSCSSValueCustom.cpp:
2390         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
2391         (WebCore::JSCSSValueOwner::finalize):
2392         * bindings/js/JSMutationObserverCustom.cpp:
2393         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
2394         * bindings/js/JSNodeCustom.cpp:
2395         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
2396         * bindings/js/JSNodeListCustom.cpp:
2397         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2398         * bindings/js/JSTextTrackCueCustom.cpp:
2399         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
2400         * bindings/js/WebCoreTypedArrayController.cpp:
2401         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
2402         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2403         * bindings/scripts/CodeGeneratorJS.pm:
2404         (GenerateImplementation):
2405         * bridge/runtime_root.cpp:
2406         (JSC::Bindings::RootObject::finalize):
2407
2408 2014-03-17  Krzysztof Czech  <k.czech@samsung.com>
2409
2410         AX: Reducing some code by using helper function ariaElementsFromAttribute
2411         https://bugs.webkit.org/show_bug.cgi?id=130344
2412
2413         Reviewed by Chris Fleizach.
2414
2415         Change visibility of ariaElementsFromAttribute function from private to protected
2416         so that other classes that derives from AccessibilityRenderObject can use it.
2417
2418         No new tests. No behaviour change.
2419
2420         * accessibility/AccessibilityRenderObject.h:
2421         * accessibility/AccessibilityTableCell.cpp:
2422         (WebCore::AccessibilityTableCell::columnHeaders):
2423
2424 2014-03-16  Brent Fulgham  <bfulgham@apple.com>
2425
2426         Provide preference to enable additional AVFoundation options
2427         https://bugs.webkit.org/show_bug.cgi?id=130275
2428
2429         Reviewed by Eric Carlson.
2430
2431         * html/HTMLMediaElement.cpp:
2432         (WebCore::HTMLMediaElement::doesHaveAttribute): Added.
2433         * html/HTMLMediaElement.h:
2434         * page/Settings.in: Add new attribute.
2435         * platform/graphics/MediaPlayer.cpp:
2436         (WebCore::MediaPlayer::doesHaveAttribute): Added stub to call private player object's
2437         implementation of doesHaveAttribute.
2438         * platform/graphics/MediaPlayer.h:
2439         (WebCore::MediaPlayerClient::doesHaveAttribute):
2440         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2441         (WebCore::MediaPlayerPrivateAVFoundationCF::AVFWrapper::createAssetForURL): Check the <media> object,
2442         and notify AVFoundationCF to use URI option if relevant.
2443         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2444         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Check the <media> object,
2445         and notify AVFoundation to use URI option if relevant.
2446
2447 2014-03-17  Jer Noble  <jer.noble@apple.com>
2448
2449         [EME] Add NULL protections in SourceBuffer and MediaSource.
2450         https://bugs.webkit.org/show_bug.cgi?id=130266
2451
2452         Reviewed by Eric Carlson.
2453
2454         Add NULL checks in places which may be called after a SourceBuffer has been removed:
2455
2456         * Modules/mediasource/MediaSource.cpp:
2457         (WebCore::MediaSource::monitorSourceBuffers): Protect against a SourceBuffer being removed
2458             (and thus activeSourceBuffers being empty) when monitoring source buffer state.
2459         * Modules/mediasource/SourceBuffer.cpp:
2460         (WebCore::SourceBuffer::appendBufferTimerFired): Protect against SourceBuffer being removed.
2461         (WebCore::SourceBuffer::videoTracks): Ditto.
2462         (WebCore::SourceBuffer::audioTracks): Ditto.
2463         (WebCore::SourceBuffer::textTracks): Ditto.
2464         (WebCore::SourceBuffer::setActive): Ditto.
2465         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
2466         (WebCore::SourceBuffer::hasCurrentTime): Ditto.
2467         (WebCore::SourceBuffer::canPlayThrough): Ditto.
2468         (WebCore::SourceBuffer::hasFutureTime): Ditto, and check for an empty buffered ranges.
2469
2470 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2471
2472         WKThumbnailView should support snapshots
2473         https://bugs.webkit.org/show_bug.cgi?id=130335
2474         <rdar://problem/16255139>
2475
2476         Reviewed by Simon Fraser.
2477
2478         * WebCore.exp.in:
2479
2480 2014-01-29  Sergio Villar Senin  <svillar@igalia.com>
2481
2482         [CSS Grid Layout] getComputedStyle() not using author's order when showing named grid lines
2483         https://bugs.webkit.org/show_bug.cgi?id=127837
2484
2485         Reviewed by David Hyatt.
2486
2487         Added a couple of new Vectors to store the names of the grid lines
2488         respecting their order. They will be used to get the right outcome
2489         for getComputedStyle().
2490
2491         * css/CSSComputedStyleDeclaration.cpp:
2492         (WebCore::addValuesForNamedGridLinesAtIndex):
2493         (WebCore::valueForGridTrackList):
2494         * css/StyleResolver.cpp:
2495         (WebCore::createGridTrackList):
2496         (WebCore::StyleResolver::applyProperty):
2497         * rendering/style/RenderStyle.h:
2498         * rendering/style/StyleGridData.cpp:
2499         (WebCore::StyleGridData::StyleGridData):
2500         * rendering/style/StyleGridData.h:
2501         (WebCore::StyleGridData::operator==):
2502
2503 2014-03-17  Zsolt Borbely  <borbezs@inf.u-szeged.hu>
2504
2505         Fix the !ENABLE(PROMISES) build
2506         https://bugs.webkit.org/show_bug.cgi?id=130328
2507
2508         Reviewed by Darin Adler.
2509
2510         Add missing ENABLE(PROMISES) guards.
2511
2512         * bindings/js/JSDOMPromise.cpp:
2513         * bindings/js/JSDOMPromise.h:
2514
2515 2014-03-17  Gurpreet Kaur  <k.gurpreet@samsung.com>
2516
2517         Safari should not render a cell if the <td> is empty
2518         https://bugs.webkit.org/show_bug.cgi?id=15273
2519
2520         Reviewed by Darin Adler.
2521
2522         When table cell has no children and the doctype is not present or not
2523         correct the border for that cell should not be drawn. Firefox also
2524         follows the same behaviour hence making the changes to make it similiar
2525         to Firefox behaviour.
2526
2527         Tests: fast/table/table-cell-border-doctype.html
2528                fast/table/table-cell-border-no-doctype.html
2529
2530         * rendering/RenderTableCell.cpp:
2531         (WebCore::RenderTableCell::paintBoxDecorations):
2532         Added condition for not drawing the border when table cell has no child
2533         and doctype.
2534
2535
2536 2014-03-17  Frédéric Wang  <fred.wang@free.fr>
2537
2538         Fix handling of <annotation> in MathMLTextElement.
2539         https://bugs.webkit.org/show_bug.cgi?id=124128.
2540
2541         Reviewed by Darin Adler.
2542
2543         No new tests.
2544
2545         * mathml/MathMLTextElement.cpp:
2546         (WebCore::MathMLTextElement::createElementRenderer): do not create the special RenderMathMLToken for the <annotation> tag.
2547         (WebCore::MathMLTextElement::childShouldCreateRenderer): only allow text inside <annotation>.
2548
2549 2014-03-17  Martin Robinson  <mrobinson@igalia.com>
2550
2551         [GTK][CMake] Credential storage is not enabled
2552         https://bugs.webkit.org/show_bug.cgi?id=130149
2553
2554         Reviewed by Philippe Normand.
2555
2556         * PlatformGTK.cmake: Add the libsecret include directories and link line to the build.
2557
2558 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
2559
2560         Unreviewed.
2561
2562         Addressing reviewing comments by Darin in bug #130310 that I forgot
2563         to address before landing the changes in r165732.
2564         https://bugs.webkit.org/show_bug.cgi?id=130310
2565
2566         * rendering/InlineTextBox.cpp:
2567         * rendering/RenderLayer.cpp:
2568         * rendering/RenderObject.cpp:
2569
2570 2014-03-17  Jessie Berlin  <jberlin@apple.com>
2571
2572         Speculative build fix for ENABLE(TELEPHONE_NUMBER_DETECTION) after r165724.
2573
2574         * html/parser/HTMLTreeBuilder.cpp:
2575         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
2576
2577 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
2578
2579         Only supplement Page with UserMediaController once
2580         https://bugs.webkit.org/show_bug.cgi?id=130311
2581
2582         Reviewed by Darin Adler.
2583
2584         Don't supplement the Page with an UserMediaController object if that Page was
2585         already supplemented with one. This avoids triggering an assertion in
2586         Supplementable::provideSupplement() that ensures no supplement with the same key
2587         exists yet. The cause of this is calling provideUserMediaTo() in the Internals
2588         constructor that's using the same Page for two subsequent tests.
2589
2590         * Modules/mediastream/UserMediaController.cpp:
2591         (WebCore::provideUserMediaTo):
2592
2593 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
2594
2595         Explicitly include cstdio header for debug builds in InlineTextBox, RenderLayer, RenderObject
2596         https://bugs.webkit.org/show_bug.cgi?id=130310
2597
2598         Reviewed by Darin Adler.
2599
2600         Building the GTK port with Clang through CMake falls into a configuration where
2601         the cstdio header is not indirectly included in InlineTextBox, RenderLayer and
2602         RenderObject source files. fprintf() is required for helper functions that print
2603         out helpful debugging information in debug builds, so the cstdio header should
2604         be included explicitly in that case.
2605
2606         * rendering/InlineTextBox.cpp:
2607         * rendering/RenderLayer.cpp:
2608         * rendering/RenderObject.cpp:
2609
2610 2014-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2611
2612         [GTK] Cleanup WebKitDOMObject
2613         https://bugs.webkit.org/show_bug.cgi?id=130246
2614
2615         Reviewed by Martin Robinson.
2616
2617         Remove unneeded getter and fix coding style.
2618
2619         * bindings/gobject/WebKitDOMObject.cpp:
2620         (webkitDOMObjectSetProperty):
2621         (webkit_dom_object_class_init):
2622
2623 2014-03-17  Darin Adler  <darin@apple.com>
2624
2625         Stop using deprecatedCharacters in HTMLTreeBuilder
2626         https://bugs.webkit.org/show_bug.cgi?id=130323
2627
2628         Reviewed by Andreas Kling.
2629
2630         Keeping this separate from other patches because of concern that this could affect
2631         page load performance.
2632
2633         * html/parser/HTMLTreeBuilder.cpp:
2634         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
2635         Use a StringView instead of a character pointer.
2636         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::isEmpty): Ditto.
2637         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
2638         Ditto.
2639         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining): Ditto.
2640         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo): Ditto.
2641         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace): Ditto.
2642         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeading): Ditto.
2643         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading): Ditto.
2644         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers): Use StringView::upconvertedCharacters.
2645
2646 2014-03-17  Jinwoo Song  <jinwoo7.song@samsung.com>
2647
2648         Make some Module class constructors return PassRef.
2649         https://bugs.webkit.org/show_bug.cgi?id=130282
2650
2651         Reviewed by Andreas Kling.
2652
2653         Make the constructor helpers for the following classes return PassRef
2654         instead of PassRefPtr since they will never return null.
2655          - GamepadList
2656          - Geolocation
2657          - NavigatorContentUtils
2658          - NetworkInfoConnection
2659          - Notification
2660          - NotificationCenter
2661          - DeviceProximityEvent
2662
2663         * Modules/gamepad/GamepadList.h:
2664         (WebCore::GamepadList::create):
2665         * Modules/geolocation/Geolocation.cpp:
2666         (WebCore::Geolocation::create):
2667         * Modules/geolocation/Geolocation.h:
2668         (WebCore::Geolocation::GeoNotifier::create):
2669         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2670         (WebCore::NavigatorContentUtils::create):
2671         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
2672         * Modules/networkinfo/NetworkInfoConnection.cpp:
2673         (WebCore::NetworkInfoConnection::create):
2674         * Modules/networkinfo/NetworkInfoConnection.h:
2675         * Modules/notifications/Notification.cpp:
2676         (WebCore::Notification::create):
2677         * Modules/notifications/Notification.h:
2678         * Modules/notifications/NotificationCenter.cpp:
2679         (WebCore::NotificationCenter::create):
2680         * Modules/notifications/NotificationCenter.h:
2681         * Modules/proximity/DeviceProximityEvent.h:
2682         (WebCore::DeviceProximityEvent::create):
2683
2684 2014-03-16  Mihnea Ovidenie  <mihnea@adobe.com>
2685
2686         [CSSRegions]Do not compute region range for a box unless the parent has one
2687         https://bugs.webkit.org/show_bug.cgi?id=130249
2688
2689         Reviewed by Andrei Bucur.
2690
2691         If the containing block does not have a region range computed, do not attempt to compute
2692         a region range for a child. In such cases, the range computation for a child can lead to
2693         a result that is wrong, possibly leading to an incorrect clipping.
2694
2695         Test: fast/regions/inline-block-flowed-in-regions.html
2696
2697         * rendering/RenderBlock.cpp:
2698         (WebCore::canComputeRegionRangeForBox):
2699         (WebCore::RenderBlock::computeRegionRangeForBoxChild):
2700         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
2701         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
2702         * rendering/RenderFlowThread.h:
2703
2704 2014-03-16  Andreas Kling  <akling@apple.com>
2705
2706         CSSValueList should assert that no null values are added to it.
2707         <https://webkit.org/b/130315>
2708
2709         Add assertions in CSSValueList's append() and prepend() that we are
2710         not adding a null value. This caught a single place in CSSParser
2711         that was appending an alread-released RefPtr to a CSSValueList.
2712         That list was eventually discarded anyway (due to "foundClip" now
2713         being true), so the fix is simply to remove the adding.
2714
2715         Eventually we should use Ref and PassRef all over for CSSValueList,
2716         this is just a first step on the way.
2717
2718         Reviewed by Darin Adler.
2719
2720         * css/CSSParser.cpp:
2721         (WebCore::CSSParser::parseFillShorthand):
2722         * css/CSSValueList.h:
2723         (WebCore::CSSValueList::append):
2724         (WebCore::CSSValueList::prepend):
2725
2726 2014-03-16  Praveen R Jadhav  <praveen.j@samsung.com>
2727
2728         AudioBufferSourceNode stop attribute shouldn't throw exception in finished state.
2729         https://bugs.webkit.org/show_bug.cgi?id=130000.
2730
2731         Reviewed by Jer Noble.
2732
2733         AudioBufferSourceNode may go to FINISHED_STATE even before "stop" method is called 
2734         as silence rendered after audio data is played out when its not looping.
2735         A call to "stop" method after this shouldn't throw exception.
2736
2737         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2738         (WebCore::AudioScheduledSourceNode::stop):
2739
2740 2014-03-16  Brian Burg  <bburg@apple.com>
2741
2742         Web Inspector: generated backend commands should reflect build system ENABLE settings
2743         https://bugs.webkit.org/show_bug.cgi?id=130111
2744
2745         Reviewed by Timothy Hatcher.
2746
2747         Add guards for conditional inspector domains.
2748
2749         For Makefile-based build systems, force regeneration of the
2750         combined file if the list of domains has changed.
2751
2752         Combine only the Inspector domains listed in INSPECTOR_DOMAINS,
2753         instead of globbing any .json file.
2754
2755         * CMakeLists.txt:
2756         * DerivedSources.make:
2757         * GNUmakefile.am:
2758
2759 2014-03-16  David Kilzer  <ddkilzer@apple.com>
2760
2761         Follow-up: Double values passed to fabsf() in maxScaleFromTransform()
2762         <http://webkit.org/b/130297>
2763
2764         Reviewed by Darin Adler.
2765
2766         * platform/graphics/ca/GraphicsLayerCA.cpp:
2767         (WebCore::maxScaleFromTransform): Use narrowPrecisionToFloat()
2768         instead of static_cast<float>().
2769
2770 2014-03-16  Andreas Kling  <akling@apple.com>
2771
2772         ScriptExecutionContext::vm() should return a reference.
2773         <https://webkit.org/b/129611>
2774
2775         Every ScriptExecutionContext has a VM, so this can never return null.
2776         Made WorkerScriptController::vm() return a reference as well, since
2777         that was needed for this change.
2778
2779         Reviewed by Geoffrey Garen.
2780
2781         * bindings/js/WorkerScriptController.h:
2782         (WebCore::WorkerScriptController::vm):
2783         * bindings/js/WorkerScriptDebugServer.cpp:
2784         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2785         * css/ElementRuleCollector.cpp:
2786         (WebCore::ElementRuleCollector::ruleMatches):
2787         * dom/ScriptExecutionContext.cpp:
2788         (WebCore::ScriptExecutionContext::vm):
2789         * dom/ScriptExecutionContext.h:
2790         * dom/SelectorQuery.cpp:
2791         (WebCore::SelectorDataList::execute):
2792         * html/HTMLCanvasElement.cpp:
2793         (WebCore::HTMLCanvasElement::createImageBuffer):
2794         * xml/XMLHttpRequest.cpp:
2795         (WebCore::XMLHttpRequest::dropProtection):
2796         * testing/Internals.cpp:
2797         (WebCore::Internals::parserMetaData):
2798
2799 2014-03-16  Zan Dobersek  <zdobersek@igalia.com>
2800
2801         Remove OwnPtr.h, PassOwnPtr.h header inclusions in Source/WebCore/html/parser/ code
2802         https://bugs.webkit.org/show_bug.cgi?id=129667
2803
2804         Reviewed by Anders Carlsson.
2805
2806         Remove unnecessary inclusions of the OwnPtr.h and PassOwnPtr.h headers
2807         in the code under Source/WebCore/html/parser/.
2808
2809         * html/parser/HTMLParserScheduler.h:
2810         * html/parser/HTMLToken.h:
2811         * html/parser/HTMLTreeBuilder.h:
2812         * html/parser/XSSAuditor.h:
2813         * html/parser/XSSAuditorDelegate.h:
2814
2815 2014-03-16  Darin Adler  <darin@apple.com>
2816
2817         Remove uses of "cat" in DerivedSources.make outside platform-specific rules
2818         https://bugs.webkit.org/show_bug.cgi?id=130307
2819
2820         Reviewed by Anders Carlsson.
2821
2822         * DerivedSources.make: Use "perl -pe ''" instead of "cat".
2823
2824 2014-03-16  Brian Burg  <bburg@apple.com>
2825
2826         Web Inspector: vended backend commands file should be generated as part of the build
2827         https://bugs.webkit.org/show_bug.cgi?id=130110
2828
2829         Reviewed by Timothy Hatcher.
2830
2831         * WebCore.xcodeproj/project.pbxproj: Copy InspectorWebBackendCommands.js to the
2832         private headers directory.
2833
2834 2014-03-16  Frédéric Wang  <fred.wang@free.fr>
2835
2836         [regression] foreign content not displayed in MathML
2837         <https://webkit.org/b/124128>
2838
2839         Reviewed by Chris Fleizach.
2840
2841         This restores foreign content in <mtext>, <mn> and <mi> elements, but only when it is "phrasing content" as defined per the HTML5 specification. Other token elements are not handled here. This change makes mspace-units.html work again on Linux.
2842
2843         Tests: mathml/presentation/foreign-mi-dynamic.html
2844                mathml/presentation/foreign-mi.html
2845                mathml/presentation/foreign-mn.html
2846                mathml/presentation/foreign-mtext-rejected.html
2847                mathml/presentation/foreign-mtext.html
2848
2849         * mathml/MathMLTextElement.cpp:
2850         (WebCore::MathMLTextElement::createElementRenderer): create a RenderMathMLToken for mn, ms and mtext.
2851         (WebCore::isPhrasingContent): helper function to check phrasing content, as defined by the HTML spec.
2852         (WebCore::MathMLTextElement::childShouldCreateRenderer): <mi>, <mn>, <mtext> and, <ms> now accepts phrasing content.
2853         * rendering/mathml/RenderMathMLToken.cpp:
2854         (WebCore::RenderMathMLToken::RenderMathMLToken):
2855         (WebCore::RenderMathMLToken::updateTokenContent): initialize the m_containsElement boolean when updating the token content.
2856         (WebCore::RenderMathMLToken::updateStyle): move <mi> specific handling in its own section and only apply the single-char rule when it does not contain elements.
2857         * rendering/mathml/RenderMathMLToken.h: add an m_containsElement boolean to handle token element specifically.
2858
2859 2014-03-16  David Kilzer  <ddkilzer@apple.com>
2860
2861         PlatformTimeRanges::nearest() truncates closestDelta values from double to float
2862         <http://webkit.org/b/130298>
2863
2864         Reviewed by Darin Adler.
2865
2866         Fixes the following build failures using trunk clang:
2867
2868             WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
2869                         closestDelta = fabsf(startTime - time);
2870                                        ^
2871             WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: note: use function 'fabs' instead
2872                         closestDelta = fabsf(startTime - time);
2873                                        ^~~~~
2874                                        fabs
2875             WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
2876                         closestDelta = fabsf(endTime - time);
2877                                        ^
2878             WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: note: use function 'fabs' instead
2879                         closestDelta = fabsf(endTime - time);
2880                                        ^~~~~
2881                                        fabs
2882
2883         * platform/graphics/PlatformTimeRanges.cpp:
2884         (WebCore::PlatformTimeRanges::nearest): Extract start and end
2885         time deltas into local variables so they don't have to be
2886         computed twice, using fabs() instead of fabsf().
2887
2888 2014-03-16  Darin Adler  <darin@apple.com>
2889
2890         Optimize hasTagName when called on an HTMLElement
2891         https://bugs.webkit.org/show_bug.cgi?id=130090
2892
2893         Reviewed by Antti Koivisto.
2894
2895         Added new hasTagName functions that have the efficiency of hasLocalName.
2896         but are safe.
2897
2898         Now we can always use hasTagName, and we'll get a compile time error if
2899         we try to use an SVG tag name with an HTML element. All call sites that
2900         use the more specific tag name types are more efficient, and call sites
2901         that have a specific pointer type will get even more efficient checking
2902         that is exactly what we used to get by calling hasLocalName.
2903
2904         * accessibility/AccessibilityObject.cpp:
2905         (WebCore::AccessibilityObject::hasTagName): Cast explicitly to Element
2906         since Node::hasTagName no longer works on a general QualifiedName.
2907         * accessibility/AccessibilityRenderObject.cpp:
2908         (WebCore::AccessibilityRenderObject::isDescendantOfElementType): Use
2909         more specific type, RenderElement, so we can call hasTagName on Element
2910         instead of Node; eliminates an unnecessary branch.
2911
2912         * accessibility/AccessibilityTableColumn.cpp: Added now-needed include.
2913         * accessibility/atk/AccessibilityObjectAtk.cpp: Ditto.
2914
2915         * dom/DocumentStyleSheetCollection.cpp:
2916         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): Use
2917         new for loop and full words for variable names. Also use nullptr instead
2918         of 0. Call toHTMLElement and toSVGElement in code that checks hasTagName
2919         since it's already checking isHTMLElement and isSVGElement.
2920
2921         * dom/Element.cpp:
2922         (WebCore::attrNodeListMap): Use NeverDestroyed and put the vectors into
2923         the map rather than putting pointers to a vector into the map.
2924         (WebCore::attrNodeListForElement): Take a reference rather than a pointer,
2925         and update for the change above.
2926         (WebCore::ensureAttrNodeListForElement): Ditto.
2927         (WebCore::removeAttrNodeListForElement): Ditto.
2928         (WebCore::findAttrNodeInList): Ditto.
2929         (WebCore::Element::isFocusable): Use lineageOfType<HTMLCanvasElement>
2930         to fine the canvas rather than a hand-written loop.
2931         (WebCore::Element::attrNodeList): Update for above changes.
2932         (WebCore::Element::setAttributeNode): Ditto.
2933         (WebCore::Element::attrIfExists): Ditto.
2934         (WebCore::Element::ensureAttr): Ditto.
2935         (WebCore::Element::detachAttrNodeFromElementWithValue): Ditto.
2936         (WebCore::Element::detachAllAttrNodesFromElement): Ditto.
2937
2938         * dom/Element.h: Removed the overload of hasLocalName that takes a
2939         QualifiedName and ignores the non-local-name parts of it. Callers should
2940         use hasTagName instead, now that it's optimized appropriately. Added
2941         overloads of hasTagName for all the specific qualified name types. It's
2942         more efficient to use the Node versions of these functions rather than
2943         using QualifiedName::matches to do the check. Removed the hasTagName and
2944         hasLocalName functions from the Node class; the only convenience functions
2945         needed in Node are the specific checks for tags from HTML, MathML, and SVG,
2946         not the general purpose ones.
2947
2948         * dom/Node.h: Removed hasLocalName and replaced the single hasTagName
2949         that takes a QualifiedName with three faster ones that take HTML, MathML,
2950         and SVG qualified names instead. Also updated to use nullptr instead of 0.
2951
2952         * dom/PositionIterator.cpp: Added now-needed include.
2953         * dom/Text.cpp: Ditto.
2954
2955         * dom/make_names.pl:
2956         (printHeaderHead): Renamed an argument for clarity and added a definitions
2957         argument, which is where we insert the classes derived from QualifiedName.
2958         (printCppHead): Renamed an argument for clarity.
2959         (printTypeHelpers): Use hasTagName rather than hasLocalName, since the
2960         former is now optimized to be the same as what the latter was.
2961         (printNamesHeaderFile): Define a class derived from QualifiedName that can
2962         be used at compile time to avoid having to check the namespace.
2963         (printNamesCppFile): Use the new more-specific type as needed.
2964
2965         * editing/ApplyStyleCommand.cpp:
2966         (WebCore::isLegacyAppleStyleSpan): Use hasTagName instead of hasLocalName,
2967         and references instead of pointers.
2968         (WebCore::ApplyStyleCommand::ApplyStyleCommand): Removed uneeded explicit
2969         construction of a smart pointer.
2970         (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun): Updated to use
2971         the enclosingElementWithTag function by its new name.
2972
2973         * editing/Editor.cpp:
2974         (WebCore::Editor::selectionUnorderedListState): Updated to use the
2975         enclosingElementWithTag function by its new name.
2976         (WebCore::Editor::selectionOrderedListState): Ditto.
2977
2978         * editing/InsertListCommand.cpp:
2979         (WebCore::InsertListCommand::doApply): Use a more-specific type for the list tag.
2980         (WebCore::InsertListCommand::doApplyForSingleParagraph): Ditto.
2981         * editing/InsertListCommand.h: Ditto.
2982
2983         * editing/MarkupAccumulator.cpp:
2984         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Added an explicit
2985         cast to Element in the loop that is already guarded by an isElementNode check.
2986         Also use a modern C++ for loop.
2987
2988         * editing/ReplaceSelectionCommand.cpp:
2989         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2990         Updated to use the enclosingElementWithTag function by its new name.
2991         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Ditto.
2992         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Ditto.
2993
2994         * editing/TypingCommand.cpp: Added now-needed includes.
2995         * editing/VisibleUnits.cpp: Ditto.
2996
2997         * editing/htmlediting.cpp:
2998         (WebCore::enclosingElementWithTag): Changed to return an Element instead of a Node,
2999         since nodes other than elements do not have tags.
3000         * editing/htmlediting.h: Ditto.
3001
3002         * editing/mac/EditorMac.mm:
3003         (WebCore::Editor::adjustedSelectionRange): Updated to use the enclosingElementWithTag
3004         function by its new name.
3005         * editing/markup.cpp:
3006         (WebCore::StyledMarkupAccumulator::appendText): Ditto.
3007         (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization): Ditto.
3008         (WebCore::highestAncestorToWrapMarkup): Ditto.
3009         (WebCore::createMarkupInternal): Ditto.
3010         (WebCore::createContextualFragment): Ditto. Use hasTagName instead of hasLocalName,
3011         since the former is now optimized to be the same as the latter was before.
3012
3013         * html/HTMLCollection.cpp:
3014         (WebCore::isMatchingElement): Use hasTagName instead of hasLocalName,
3015         since the former is now optimized to be the same as the latter was before.
3016         (WebCore::nameShouldBeVisibleInDocumentAll): Ditto.
3017         * html/HTMLElement.cpp:
3018         (WebCore::HTMLElement::ieForbidsInsertHTML): Ditto.
3019         (WebCore::unicodeBidiAttributeForDirAuto): Ditto.
3020         (WebCore::HTMLElement::parseBorderWidthAttribute): Ditto.
3021         (WebCore::HTMLElement::setInnerHTML): Ditto.
3022         (WebCore::shouldProhibitSetInnerOuterText): Ditto. Added this to share code between
3023         setInnerText and setOuterText.
3024         (WebCore::HTMLElement::setInnerText): Ditto.
3025         (WebCore::HTMLElement::setOuterText): Ditto.
3026         (WebCore::HTMLElement::rendererIsNeeded): Ditto.
3027         (WebCore::HTMLElement::createElementRenderer): Ditto.
3028
3029         * html/HTMLElement.h: Added hasTagName, which hides the one inherited from Element
3030         and takes the more-specific HTMLQualifiedName type. This means we don't need to check
3031         the namespace at runtime because it's known at compile time. Also put the
3032         implementation of Node::hasTagName for HTMLQualifiedName into this header.
3033
3034         * html/HTMLObjectElement.cpp:
3035         (WebCore::isRecognizedTagName): Updated for change in return type of
3036         HTMLNames::getHTMLTags.
3037
3038         * html/HTMLSelectElement.cpp:
3039         (WebCore::HTMLSelectElement::add): Use hasTagName inastead of hasLocalName.
3040         (WebCore::HTMLSelectElement::value): Use isHTMLOptionElement instead of hasTagName.
3041         Also use a new style for loop and emptyString() instead of "".
3042         (WebCore::HTMLSelectElement::setValue): Ditto.
3043         (WebCore::HTMLSelectElement::setLength): Ditto.
3044         (WebCore::HTMLSelectElement::searchOptionsForValue): Ditto.
3045         (WebCore::HTMLSelectElement::restoreFormControlState): Ditto.
3046
3047         * html/HTMLTableColElement.cpp:
3048         (WebCore::HTMLTableColElement::additionalPresentationAttributeStyle): Use hasTagName
3049         instead of hasLocalName.
3050
3051         * html/HTMLTableRowsCollection.cpp:
3052         (WebCore::isInSection): Updated to use hasTagName and take a reference.
3053         (WebCore::HTMLTableRowsCollection::rowAfter): Pass a reference.
3054
3055         * html/parser/HTMLConstructionSite.cpp: Added now-needed include.
3056
3057         * html/parser/HTMLTreeBuilder.cpp:
3058         (WebCore::createCaseMap): Updated to return a map rather than filling one in, and to
3059         be flxible about the type of the table being used.
3060         (WebCore::adjustSVGTagNameCase): Updated to use NeverDestroyed.
3061         (WebCore::adjustAttributes): Added new helper so we can share more code. Updated
3062         template argument names for clarity.
3063         (WebCore::adjustSVGAttributes): Marked this inline, since it just turns around and
3064         calls a single non-inline function.
3065         (WebCore::adjustMathMLAttributes): Ditto.
3066         (WebCore::addNamesWithPrefix): Changed to take argument by reference instead of pointer.
3067         (WebCore::createForeignAttributesMap): Added. Factors out the map creation from the
3068         function below.
3069         (WebCore::adjustForeignAttributes): Updated for above changes.
3070         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to pass reference.
3071         (WebCore::HTMLTreeBuilder::processTokenInForeignContent): Ditto.
3072
3073         * inspector/InspectorStyleSheet.cpp: Added now-needed include.
3074
3075         * mathml/MathMLElement.h: Added hasTagName, which hides the one inherited from Element
3076         and takes the more-specific MathMLQualifiedName type. This means we don't need to check
3077         the namespace at runtime because it's known at compile time. Also put the
3078         implementation of Node::hasTagName for MathMLQualifiedName into this header.
3079
3080         * mathml/MathMLInlineContainerElement.cpp:
3081         (WebCore::MathMLInlineContainerElement::createElementRenderer): Use hasTagName.
3082
3083         * mathml/MathMLSelectElement.cpp:
3084         (WebCore::MathMLSelectElement::attributeChanged): Use hasTagName.
3085         (WebCore::MathMLSelectElement::getSelectedActionChildAndIndex): Ditto.
3086         (WebCore::MathMLSelectElement::getSelectedActionChild): Ditto.
3087         (WebCore::MathMLSelectElement::getSelectedSemanticsChild): Ditto.
3088         (WebCore::MathMLSelectElement::updateSelectedChild): Ditto.
3089         * mathml/MathMLTextElement.cpp:
3090         (WebCore::MathMLTextElement::createElementRenderer): Ditto.
3091         (WebCore::MathMLTextElement::childShouldCreateRenderer): Ditto.
3092
3093         * platform/gtk/PasteboardGtk.cpp: Added now-needed include.
3094         * platform/mac/HTMLConverter.mm: Ditto.
3095         * rendering/RenderBlockFlow.cpp: Ditto.
3096
3097         * rendering/RenderBoxModelObject.cpp:
3098         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use hasTagName.
3099         * rendering/RenderElement.cpp:
3100         (WebCore::RenderElement::rendererForRootBackground): Ditto.
3101         * rendering/RenderLayerBacking.cpp:
3102         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Ditto.
3103
3104         * rendering/RenderReplaced.cpp: Added now-needed include.
3105
3106         * rendering/mathml/RenderMathMLScripts.cpp:
3107         (WebCore::RenderMathMLScripts::RenderMathMLScripts): Use hasTagName.
3108         * rendering/mathml/RenderMathMLUnderOver.cpp:
3109         (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): Ditto.
3110
3111         * svg/SVGElement.h: Added hasTagName, which hides the one inherited from Element
3112         and takes the more-specific SVGQualifiedName type. This means we don't need to check
3113         the namespace at runtime because it's known at compile time. Also put the
3114         implementation of Node::hasTagName for SVGQualifiedName into this header.
3115
3116         * svg/SVGFontFaceSrcElement.cpp:
3117         (WebCore::SVGFontFaceSrcElement::childrenChanged): Use isSVGFontFaceElement instead
3118         of calling hasTagName.
3119
3120         * svg/SVGUseElement.cpp:
3121         (WebCore::isDirectReference): Changed to take a reference and a more specific type.
3122         (WebCore::SVGUseElement::toClipPath): Added a type cast.
3123         (WebCore::SVGUseElement::rendererClipChild): Use more specific types so we don't
3124         need a type cast.
3125
3126         * xml/parser/XMLDocumentParser.cpp:
3127         (WebCore::XMLDocumentParser::parseDocumentFragment): Added explicit calls to this
3128         unusual call site that has a good reason to use hasLocalName instead of hasTagName.
3129
3130 2014-03-16  Andreas Kling  <akling@apple.com>
3131
3132         Stop pulling in JSDOMBinding.h via JSEventListener.h
3133         <https://webkit.org/b/130299>
3134
3135         Just chippin' away at the compile time monster.
3136
3137         Reviewed by Darin Adler.
3138
3139         * bindings/js/IDBBindingUtilities.cpp:
3140         * bindings/js/JSEventListener.h:
3141
3142 2014-03-16  David Kilzer  <ddkilzer@apple.com>
3143
3144         Double values passed to fabsf() in maxScaleFromTransform()
3145         <http://webkit.org/b/130297>
3146
3147         Reviewed by Darin Adler.
3148
3149         Fixes the following build failures using trunk clang:
3150
3151             WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:21: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
3152                 return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY));
3153                                 ^
3154             WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:21: note: use function 'fabs' instead
3155                 return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY));
3156                                 ^~~~~
3157                                 fabs
3158             WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:50: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
3159                 return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY));
3160                                                              ^
3161             WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287:50: note: use function 'fabs' instead
3162                 return std::max(fabsf(decomposeData.scaleX), fabsf(decomposeData.scaleY));
3163                                                              ^~~~~
3164                                                              fabs
3165
3166         * platform/graphics/ca/GraphicsLayerCA.cpp:
3167         (WebCore::maxScaleFromTransform): Use static_cast<float>() to
3168         convert float values to double values.
3169
3170 2014-03-15  Zalan Bujtas  <zalan@apple.com>
3171
3172         Move BorderEdge class to its own file.
3173         https://bugs.webkit.org/show_bug.cgi?id=130294
3174
3175         Reviewed by Sam Weinig.
3176
3177         This is in preparation to have better encapsulation for border box decoration painting.
3178
3179         No change in functionality.
3180
3181         * CMakeLists.txt:
3182         * GNUmakefile.list.am:
3183         * WebCore.vcxproj/WebCore.vcxproj:
3184         * WebCore.vcxproj/WebCore.vcxproj.filters:
3185         * WebCore.xcodeproj/project.pbxproj:
3186         * rendering/BorderEdge.cpp: Added.
3187         (WebCore::BorderEdge::BorderEdge):
3188         (WebCore::BorderEdge::getBorderEdgeInfo):
3189         (WebCore::BorderEdge::includesAdjacentEdges):
3190         (WebCore::BorderEdge::obscuresBackgroundEdge):
3191         (WebCore::BorderEdge::obscuresBackground):
3192         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
3193         * rendering/BorderEdge.h: Added.
3194         (WebCore::BorderEdge::edgeFlagForSide):
3195         (WebCore::BorderEdge::includesEdge):
3196         (WebCore::BorderEdge::edgesShareColor):
3197         (WebCore::BorderEdge::hasVisibleColorAndStyle):
3198         (WebCore::BorderEdge::shouldRender):
3199         (WebCore::BorderEdge::presentButInvisible):
3200         (WebCore::BorderEdge::widthForPainting):
3201         (WebCore::BorderEdge::borderWidthInDevicePixel):
3202         * rendering/RenderBoxModelObject.cpp:
3203         (WebCore::borderStyleHasUnmatchedColorsAtCorner):
3204         (WebCore::colorsMatchAtCorner):
3205         (WebCore::colorNeedsAntiAliasAtCorner):
3206         (WebCore::willBeOverdrawn):
3207         (WebCore::joinRequiresMitre):
3208         (WebCore::RenderBoxModelObject::paintBorderSides):
3209         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
3210         (WebCore::RenderBoxModelObject::paintBorder):
3211         (WebCore::RenderBoxModelObject::borderObscuresBackgroundEdge):
3212         (WebCore::RenderBoxModelObject::borderObscuresBackground):
3213         * rendering/RenderBoxModelObject.h:
3214
3215 2014-03-15  Martin Robinson  <mrobinson@igalia.com>
3216
3217         Fix WebCore unused parameter warnings for WebKitGTK+ CMake build
3218         https://bugs.webkit.org/show_bug.cgi?id=130252
3219
3220         Reviewed by Carlos Garcia Campos.
3221
3222         * Modules/mediastream/HTMLMediaElementMediaStream.cpp: Fix unused parameters.
3223         * html/RangeInputType.cpp: Ditto.
3224         * page/gtk/EventHandlerGtk.cpp: Ditto.
3225         * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
3226         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp: Ditto.
3227         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: Ditto.
3228         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Ditto.
3229         * platform/gtk/GamepadsGtk.cpp: Ditto.
3230         * platform/gtk/GtkClickCounter.cpp: Ditto.
3231         * platform/gtk/GtkPopupMenu.cpp: Ditto.
3232         * platform/gtk/GtkTouchContextHelper.cpp: Ditto.
3233         * platform/gtk/GtkVersioning.c: Ditto.
3234         * platform/gtk/MainFrameScrollbarGtk.cpp: Ditto.
3235         * platform/gtk/PasteboardGtk.cpp: Ditto.
3236         * platform/gtk/PasteboardHelper.cpp: Ditto.
3237         * platform/gtk/RedirectedXCompositeWindow.cpp: Ditto.
3238         * platform/gtk/RenderThemeGtk.cpp: Ditto.
3239         * platform/gtk/RenderThemeGtk.h: Ditto.
3240         * platform/gtk/RenderThemeGtk2.cpp: Ditto.
3241         * platform/gtk/ScrollbarThemeGtk.cpp: Ditto.
3242         * platform/gtk/ScrollbarThemeGtk2.cpp: Ditto.
3243         * platform/gtk/WidgetGtk.cpp: Ditto.
3244         * platform/network/gtk/CredentialBackingStore.cpp: Ditto.
3245         * platform/soup/SharedBufferSoup.cpp: Ditto.
3246         * plugins/gtk/PluginViewGtk.cpp: Ditto.
3247         * plugins/gtk/gtk2xtbin.c: Ditto.
3248         * rendering/InlineTextBox.cpp: Ditto.
3249
3250 2014-03-14  Myles C. Maxfield  <mmaxfield@apple.com>
3251
3252         RenderTextControl::hasValidAvgCharWidth doesn't detect System Font
3253         https://bugs.webkit.org/show_bug.cgi?id=130168
3254
3255         Reviewed by Dean Jackson.
3256
3257         No new tests.
3258
3259         * platform/graphics/Font.cpp: Moved functions from RenderTextControl
3260         (WebCore::Font::hasValidAverageCharWidth):
3261         (WebCore::Font::fastAverageCharWidthIfAvailable):
3262         * platform/graphics/Font.h:
3263         * rendering/RenderTextControl.cpp: Moved functions to Font.cpp
3264         (WebCore::RenderTextControl::getAverageCharWidth): Removed redundant function argument
3265         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
3266         * rendering/RenderTextControl.h:
3267         * rendering/RenderTextControlMultiLine.cpp:
3268         (WebCore::RenderTextControlMultiLine::getAverageCharWidth): Removed redundant function argument
3269         * rendering/RenderTextControlMultiLine.h:
3270         * rendering/RenderTextControlSingleLine.cpp:
3271         (WebCore::RenderTextControlSingleLine::getAverageCharWidth): Removed redundant function argument
3272         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
3273         * rendering/RenderTextControlSingleLine.h:
3274
3275 2014-03-15  David Kilzer  <ddkilzer@apple.com>
3276
3277         [iOS] Define SYSTEM_VERSION_PREFIX consistently
3278         <http://webkit.org/b/130293>
3279         <rdar://problem/15926359>
3280
3281         Reviewed by Dan Bernstein.
3282
3283         * Configurations/Version.xcconfig:
3284         (SYSTEM_VERSION_PREFIX_iphoneos): Sync with
3285         Source/WebKit/mac/Version.xcconfig.
3286
3287 2014-03-14  Mark Rowe  <mrowe@apple.com>
3288
3289         Fix the production build.
3290
3291         Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
3292         be at the expected relative path when working from installed source.
3293
3294         * Configurations/Base.xcconfig:
3295
3296 2014-03-14  Maciej Stachowiak  <mjs@apple.com>
3297
3298         Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
3299         https://bugs.webkit.org/show_bug.cgi?id=130276
3300         <rdar://problem/16266927>
3301
3302         Reviewed by Simon Fraser.
3303
3304         No new tests because no behavior changes.
3305
3306         * DerivedSources.make:
3307         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
3308         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
3309         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
3310         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
3311         * Modules/encryptedmedia/MediaKeyMessageEvent.h:
3312         * Modules/encryptedmedia/MediaKeyMessageEvent.idl:
3313         * Modules/encryptedmedia/MediaKeyNeededEvent.cpp:
3314         * Modules/encryptedmedia/MediaKeyNeededEvent.h:
3315         * Modules/encryptedmedia/MediaKeyNeededEvent.idl:
3316         * Modules/encryptedmedia/MediaKeySession.idl:
3317         * Modules/encryptedmedia/MediaKeys.idl:
3318         * Modules/geolocation/NavigatorGeolocation.cpp:
3319         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
3320         * Modules/indexeddb/IDBCallbacks.h:
3321         * Modules/indexeddb/IDBDatabaseException.cpp:
3322         * Modules/indexeddb/IDBDatabaseMetadata.h:
3323         * Modules/indexeddb/IDBEventDispatcher.cpp:
3324         * Modules/indexeddb/IDBEventDispatcher.h:
3325         * Modules/indexeddb/IDBFactory.cpp:
3326         * Modules/indexeddb/IDBFactory.h:
3327         * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
3328         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3329         * Modules/indexeddb/IDBHistograms.h:
3330         * Modules/indexeddb/IDBIndexMetadata.h:
3331         * Modules/indexeddb/IDBObjectStoreMetadata.h:
3332         * Modules/indexeddb/IDBRecordIdentifier.h:
3333         * Modules/indexeddb/IDBRequest.cpp:
3334         * Modules/indexeddb/IDBRequest.h:
3335         * Modules/indexeddb/IDBRequest.idl:
3336         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
3337         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
3338         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl:
3339         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3340         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3341         * Modules/mediacontrols/MediaControlsHost.cpp:
3342         * Modules/mediacontrols/MediaControlsHost.h:
3343         * Modules/mediacontrols/MediaControlsHost.idl:
3344         * Modules/mediacontrols/mediaControlsApple.css:
3345         * Modules/mediacontrols/mediaControlsiOS.css:
3346         * Modules/mediasource/AudioTrackMediaSource.h:
3347         * Modules/mediasource/AudioTrackMediaSource.idl:
3348         * Modules/mediasource/TextTrackMediaSource.h:
3349         * Modules/mediasource/TextTrackMediaSource.idl:
3350         * Modules/mediasource/VideoTrackMediaSource.h:
3351         * Modules/mediasource/VideoTrackMediaSource.idl:
3352         * Modules/mediastream/AllAudioCapabilities.h:
3353         * Modules/mediastream/AllAudioCapabilities.idl:
3354         * Modules/mediastream/AllVideoCapabilities.h:
3355         * Modules/mediastream/AllVideoCapabilities.idl:
3356         * Modules/mediastream/AudioStreamTrack.cpp:
3357         * Modules/mediastream/AudioStreamTrack.h:
3358         * Modules/mediastream/AudioStreamTrack.idl:
3359         * Modules/mediastream/CapabilityRange.cpp:
3360         * Modules/mediastream/CapabilityRange.h:
3361         * Modules/mediastream/CapabilityRange.idl:
3362         * Modules/mediastream/MediaSourceStates.cpp:
3363         * Modules/mediastream/MediaSourceStates.h:
3364         * Modules/mediastream/MediaSourceStates.idl:
3365         * Modules/mediastream/MediaStreamCapabilities.cpp:
3366         * Modules/mediastream/MediaStreamCapabilities.h:
3367         * Modules/mediastream/MediaStreamCapabilities.idl:
3368         * Modules/mediastream/MediaTrackConstraint.cpp:
3369         * Modules/mediastream/MediaTrackConstraint.h:
3370         * Modules/mediastream/MediaTrackConstraint.idl:
3371         * Modules/mediastream/MediaTrackConstraintSet.cpp:
3372         * Modules/mediastream/MediaTrackConstraintSet.h:
3373         * Modules/mediastream/MediaTrackConstraints.cpp:
3374         * Modules/mediastream/MediaTrackConstraints.h:
3375         * Modules/mediastream/MediaTrackConstraints.idl:
3376         * Modules/mediastream/NavigatorMediaStream.cpp:
3377         * Modules/mediastream/NavigatorUserMediaError.cpp:
3378         * Modules/mediastream/RTCConfiguration.idl:
3379         * Modules/mediastream/RTCIceServer.idl:
3380         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
3381         * Modules/mediastream/RTCOfferAnswerOptions.h:
3382         * Modules/mediastream/VideoStreamTrack.cpp:
3383         * Modules/mediastream/VideoStreamTrack.h:
3384         * Modules/mediastream/VideoStreamTrack.idl:
3385         * Modules/networkinfo/NetworkInfo.cpp:
3386         * Modules/networkinfo/NetworkInfo.h:
3387         * Modules/networkinfo/NetworkInfoConnection.cpp:
3388         * Modules/networkinfo/NetworkInfoConnection.h:
3389         * Modules/networkinfo/NetworkInfoController.cpp:
3390         * Modules/notifications/DOMWindowNotifications.cpp:
3391         * Modules/notifications/DOMWindowNotifications.h:
3392         * Modules/notifications/DOMWindowNotifications.idl:
3393         * Modules/notifications/NotificationController.cpp:
3394         * Modules/notifications/NotificationController.h:
3395         * Modules/notifications/NotificationPermissionCallback.h:
3396         * Modules/notifications/NotificationPermissionCallback.idl:
3397         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
3398         * Modules/notifications/WorkerGlobalScopeNotifications.h:
3399         * Modules/notifications/WorkerGlobalScopeNotifications.idl:
3400         * Modules/plugins/PluginReplacement.h:
3401         * Modules/plugins/QuickTimePluginReplacement.cpp:
3402         * Modules/plugins/QuickTimePluginReplacement.css:
3403         * Modules/plugins/QuickTimePluginReplacement.h:
3404         * Modules/plugins/QuickTimePluginReplacement.idl:
3405         * Modules/quota/DOMWindowQuota.idl:
3406         * Modules/speech/DOMWindowSpeechSynthesis.h:
3407         * Modules/speech/DOMWindowSpeechSynthesis.idl:
3408         * Modules/speech/SpeechSynthesis.cpp:
3409         * Modules/speech/SpeechSynthesis.h:
3410         * Modules/speech/SpeechSynthesis.idl:
3411         * Modules/speech/SpeechSynthesisEvent.cpp:
3412         * Modules/speech/SpeechSynthesisEvent.h:
3413         * Modules/speech/SpeechSynthesisEvent.idl:
3414         * Modules/speech/SpeechSynthesisUtterance.cpp:
3415         * Modules/speech/SpeechSynthesisUtterance.h:
3416         * Modules/speech/SpeechSynthesisUtterance.idl:
3417         * Modules/speech/SpeechSynthesisVoice.cpp:
3418         * Modules/speech/SpeechSynthesisVoice.h:
3419         * Modules/speech/SpeechSynthesisVoice.idl:
3420         * Modules/webaudio/AudioBuffer.cpp:
3421         * Modules/webaudio/AudioBuffer.h:
3422         * Modules/webaudio/AudioBuffer.idl:
3423         * Modules/webaudio/AudioListener.cpp:
3424         * Modules/webaudio/AudioListener.h:
3425         * Modules/webaudio/AudioListener.idl:
3426         * Modules/webaudio/AudioParam.h:
3427         * Modules/webaudio/AudioParam.idl:
3428         * Modules/webaudio/AudioParamTimeline.h:
3429         * Modules/webaudio/AudioScheduledSourceNode.h:
3430         * Modules/webaudio/ChannelMergerNode.cpp:
3431         * Modules/webaudio/ChannelMergerNode.h:
3432         * Modules/webaudio/ChannelMergerNode.idl:
3433         * Modules/webaudio/MediaStreamAudioSource.cpp:
3434         * Modules/webaudio/MediaStreamAudioSource.h:
3435         * Modules/webaudio/PeriodicWave.cpp:
3436         * Modules/webaudio/PeriodicWave.h:
3437         * Modules/webdatabase/ChangeVersionWrapper.cpp:
3438         * Modules/webdatabase/ChangeVersionWrapper.h:
3439         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
3440         * Modules/webdatabase/DOMWindowWebDatabase.h:
3441         * Modules/webdatabase/DOMWindowWebDatabase.idl:
3442         * Modules/webdatabase/Database.cpp:
3443         * Modules/webdatabase/Database.h:
3444         * Modules/webdatabase/Database.idl:
3445         * Modules/webdatabase/DatabaseAuthorizer.cpp:
3446         * Modules/webdatabase/DatabaseAuthorizer.h:
3447         * Modules/webdatabase/DatabaseBackendBase.cpp:
3448         * Modules/webdatabase/DatabaseBackendBase.h:
3449         * Modules/webdatabase/DatabaseCallback.idl:
3450