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