[WK2] Pinch-zoom shadows can overlap headers and footers
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-26  Tim Horton  <timothy_horton@apple.com>
2
3         [WK2] Pinch-zoom shadows can overlap headers and footers
4         https://bugs.webkit.org/show_bug.cgi?id=134372
5         <rdar://problem/16004095>
6
7         Reviewed by Simon Fraser.
8
9         * WebCore.exp.in:
10         * rendering/RenderLayerCompositor.cpp:
11         (WebCore::RenderLayerCompositor::updateLayerForHeader):
12         (WebCore::RenderLayerCompositor::updateLayerForFooter):
13         Put header/footer layers in front of the root content layer instead of behind.
14         Ideally nothing would ever overlap them, but this will give them precedence regardless.
15
16 2014-06-26  David Kilzer  <ddkilzer@apple.com>
17
18         [Win] Always NULL-terminate the string in createUTF8String()
19         <http://webkit.org/b/134353>
20         <rdar://problem/17471783>
21
22         Reviewed by Brent Fulgham.
23
24         * plugins/PluginView.cpp:
25         (WebCore::createUTF8String): Pull out CString length into local
26         variable.  Switch to use memcpy.  Always NULL-terminate the
27         string.
28
29 2014-06-26  Jer Noble  <jer.noble@apple.com>
30
31         [MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
32         https://bugs.webkit.org/show_bug.cgi?id=134367
33
34         Reviewed by Darin Adler.
35
36         Add a couple of null-checks to protect against methods being called in the brief time
37         between when the object is created and when it's asked to load.
38
39         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
40         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
41         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
42
43 2014-06-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
44
45         Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme()
46         https://bugs.webkit.org/show_bug.cgi?id=134289
47
48         Reviewed by Darin Adler.
49
50         If we do early return when there is invalid protocol, we're able to avoid unnecessary call flow.
51
52         No new tests, covered by existing tests.
53
54         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
55         (WebCore::verifyProtocolHandlerScheme):
56
57 2014-06-26  Benjamin Poulain  <bpoulain@apple.com>
58
59         [WK1] Use native touch event's timestamp for DOM touch event
60         https://bugs.webkit.org/show_bug.cgi?id=134326
61
62         Reviewed by Enrica Casucci.
63
64         * platform/ios/PlatformEventFactoryIOS.mm:
65         (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
66         Use device event timestamp to get more accurate timing information. This also removes
67         the variance introduced by WebKit when computing velocity/acceleration/etc.
68
69 2014-06-26  Balazs Kelemen  <b.kelemen@samsung.com>
70
71         Memcache migth not be pruned when it should for https pages
72         https://bugs.webkit.org/show_bug.cgi?id=134361
73
74         Reviewed by Geoffrey Garen.
75
76         There is no reason we should not try to prune in case of a https resource.
77
78         No observable change in behavior, no tests.
79
80         * loader/cache/CachedResource.cpp:
81         (WebCore::CachedResource::removeClient):
82         Call prune unconditionally and remove an unnecessary branch.
83
84 2014-06-26  Alexey Proskuryakov  <ap@apple.com>
85
86         REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
87         https://bugs.webkit.org/show_bug.cgi?id=133882
88         <rdar://problem/17271965>
89
90         Reviewed by Brady Eidson.
91
92         This goes to pre-r161796 behavior on 10.8 and 10.9. We schedule the requests internally,
93         and only give 6 of them to CFNetwork at a time. Except for synchronous requests,
94         which still use the improved approach, and don't count against 6 connections.
95
96         * loader/ResourceLoadScheduler.cpp:
97         (WebCore::ResourceLoadScheduler::scheduleLoad):
98         * platform/network/cf/ResourceRequest.h:
99         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
100         * platform/network/cf/ResourceRequestCFNet.cpp:
101         (WebCore::ResourceRequest::doUpdatePlatformRequest):
102         (WebCore::ResourceRequest::doUpdateResourceRequest):
103         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Deleted.
104         * platform/network/mac/ResourceRequestMac.mm:
105         (WebCore::ResourceRequest::doUpdateResourceRequest):
106         (WebCore::ResourceRequest::doUpdatePlatformRequest):
107
108 2014-06-26  Brady Eidson  <beidson@apple.com>
109
110         Remove use of PlatformStrategies for Gamepad API.
111         https://bugs.webkit.org/show_bug.cgi?id=134348
112
113         Reviewed by Dean Jackson.
114
115         No new tests (Not yet a tested config)
116
117         Introduce a virtual GamepadProvider with a process-global shared provider.
118         The base implementation of the GamepadProvider does nothing.
119         * platform/GamepadProvider.cpp: Renamed from Source/WebKit/mac/WebCoreSupport/WebHIDGamepadController.h.
120         (WebCore::GamepadProvider::shared):
121         (WebCore::GamepadProvider::setSharedProvider):
122         (WebCore::GamepadProvider::startMonitoringGamepads):
123         (WebCore::GamepadProvider::stopMonitoringGamepads):
124         (WebCore::GamepadProvider::platformGamepads):
125         * platform/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadStrategy.h.
126         (WebCore::GamepadProvider::~GamepadProvider):
127
128         * platform/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadStrategyClient.h.
129         (WebCore::GamepadProviderClient::~GamepadProviderClient):
130
131         GamepadManager is now a GamepadProviderClient:
132         * Modules/gamepad/GamepadManager.cpp:
133         (WebCore::GamepadManager::GamepadManager):
134         (WebCore::GamepadManager::registerNavigator):
135         (WebCore::GamepadManager::unregisterNavigator):
136         * Modules/gamepad/GamepadManager.h:
137
138         Remove the GamepadStrategy altogether:
139         * platform/PlatformStrategies.h:
140         (WebCore::PlatformStrategies::PlatformStrategies):
141         (WebCore::PlatformStrategies::gamepadStrategy): Deleted.
142
143         Call to the shared GamepadProvider instead of the strategy:
144         * Modules/gamepad/NavigatorGamepad.cpp:
145         (WebCore::NavigatorGamepad::gamepads):
146         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
147         (WebCore::NavigatorGamepad::gamepadConnected):
148
149         HIDGamepadListener is now a subclass of GamepadProvider that implements the HID based management.
150         LegacyWebKit on Mac will install the shared HIDGamepadProvider instead of the default GamepadProvider:
151         * platform/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.cpp.
152         (WebCore::deviceMatchingDictionary):
153         (WebCore::deviceAddedCallback):
154         (WebCore::deviceRemovedCallback):
155         (WebCore::deviceValuesChangedCallback):
156         (WebCore::HIDGamepadProvider::shared):
157         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
158         (WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
159         (WebCore::HIDGamepadProvider::startMonitoringGamepads):
160         (WebCore::HIDGamepadProvider::stopMonitoringGamepads):
161         (WebCore::HIDGamepadProvider::deviceAdded):
162         (WebCore::HIDGamepadProvider::deviceRemoved):
163         (WebCore::HIDGamepadProvider::valuesChanged):
164         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
165         * platform/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.h.
166         (WebCore::HIDGamepadProvider::platformGamepads):
167         (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks):
168
169         * WebCore.exp.in:
170         * WebCore.xcodeproj/project.pbxproj:
171
172         * platform/mac/HIDGamepad.h: Fix incorrect comment
173
174 2014-06-26  Andreas Kling  <akling@apple.com>
175
176         Skip memcmp()ing fully downloaded resources after they become mmap()able.
177         <https://webkit.org/b/134362>
178
179         When we receive word that a downloaded resource is now available for mmap()ing
180         from the file system, we don't need to compare against the buffered data,
181         since even if there were a mismatch, the cached version should be the canonical one.
182
183         This was added as belt-and-suspenders while the supporting mechanism was being
184         developed in CFNetwork, and there's no evidence of a race today. This change
185         turns the runtime checks into debug-only assertions.
186
187         Saves ~300ms of main thread time on PLT.
188
189         Reviewed by Geoff Garen.
190
191         * loader/cache/CachedResource.cpp:
192         (WebCore::CachedResource::tryReplaceEncodedData):
193
194 2014-06-26  Jer Noble  <jer.noble@apple.com>
195
196         [MSE] Refactoring: Use C++11 for-loops in SourceBuffer.
197         https://bugs.webkit.org/show_bug.cgi?id=134352
198
199         Reviewed by Darin Adler.
200
201         Use C++11 style for-loops where appropriate in SourceBuffer now that the
202         SampleMap ordered objects support them.
203
204         * Modules/mediasource/SourceBuffer.cpp:
205         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
206         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
207         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
208         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
209         (WebCore::SourceBuffer::validateInitializationSegment):
210         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
211
212 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
213  
214         [iOS]: Tapping <button> outside of a form is no longer working
215         https://bugs.webkit.org/show_bug.cgi?id=134319
216         <rdar://problem/17213346>
217
218         Reviewed by Daniel Bates.
219
220         Restore behavior of allowing <button> clicks outside of <form>.
221         This used to be iOS behavior before it was removed in favor of the
222         OpenSource (Android?) behavior. Now, willRespondToMouseClickEvents
223         is only used by iOS, so lets restore the iOS behavior.
224
225         * html/HTMLButtonElement.cpp:
226         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
227
228 2014-06-26  Jer Noble  <jer.noble@apple.com>
229
230         Unreviewed build-fix. Remove unintentionial rename of MediaTime.h -> MediaTimeHash.h.
231
232         * Modules/mediasource/SampleMap.h:
233
234 2014-06-26  Eric Carlson  <eric.carlson@apple.com>
235
236         [iOS] no need to deactivate audio session
237         https://bugs.webkit.org/show_bug.cgi?id=134350
238
239         Reviewed by Jer Noble.
240
241         * platform/audio/mac/MediaSessionManagerMac.cpp:
242         (MediaSessionManager::updateSessionState): Don't bother calling 
243             AudioSession::setActive(false), WebCore's audio session will be deactivated 
244             automatically if another application begins playing audio.
245
246 2014-06-26  Jer Noble  <jer.noble@apple.com>
247
248         [MSE] Refactoring: Differentiate between SampleMap decode and presentation order methods
249         https://bugs.webkit.org/show_bug.cgi?id=134349
250
251         Reviewed by Geoffrey Garen.
252
253         Refactor SampleMap to clarify the distinction between methods which return decode-order
254         iterators and ones which retun presentation-order iterators.
255
256         Add two classes, PresentationOrderSampleMap and DecodeOrderSampleMap, to contain the actual
257         MediaTime-to-Sample maps, and move the methods returning presentation-order and decode-order
258         iterators to each, respectively.  Rename the {presentation,decode}{Begin,End}() methods to
259         begin() and end() so the objects can be used in C++11 for-loops.
260
261         Update all the call sites in SourceBuffer to use the new ordered objects.
262
263         * Modules/mediasource/SampleMap.cpp:
264         (WebCore::SampleIsLessThanMediaTimeComparator::operator()): Use new ordered objects.
265         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()): Ditto.
266         (WebCore::SampleMap::clear): Ditto.
267         (WebCore::SampleMap::addSample): Ditto.
268         (WebCore::SampleMap::removeSample): Ditto.
269         (WebCore::PresentationOrderSampleMap::findSampleContainingPresentationTime): Renamed from SampleMap version.
270         (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Ditto.
271         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Ditto.
272         (WebCore::PresentationOrderSampleMap::reverseFindSampleContainingPresentationTime): Ditto.
273         (WebCore::PresentationOrderSampleMap::reverseFindSampleBeforePresentationTime): Ditto.
274         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Ditto.
275         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Ditto.
276         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToDecodeIterator): Ditto.
277         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
278         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Ditto.
279         (WebCore::PresentationOrderSampleMap::findSamplesBetweenPresentationTimes): Ditto.
280         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRange): Ditto.
281         (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
282         * Modules/mediasource/SampleMap.h:
283         (WebCore::PresentationOrderSampleMap::begin): Renamed from presentationBegin().
284         (WebCore::PresentationOrderSampleMap::end): Renamed from presentationEnd().
285         (WebCore::PresentationOrderSampleMap::rbegin): Renamed from reversePresentationBegin().
286         (WebCore::PresentationOrderSampleMap::rend): Renamed from reversePresentationEnd().
287         (WebCore::DecodeOrderSampleMap::begin): Renamed from decodeBegin().
288         (WebCore::DecodeOrderSampleMap::end): Renamed from decodeEnd().
289         (WebCore::DecodeOrderSampleMap::rbegin): Renamed from reverseDecodeBegin().
290         (WebCore::DecodeOrderSampleMap::rend): Renamed from reverseDecodeEnd().
291         (WebCore::SampleMap::SampleMap): Create new ordered objects.
292         (WebCore::SampleMap::sizeInBytes): Use new ordered objects.
293         (WebCore::SampleMap::decodeOrder): Simple accessor.
294         (WebCore::SampleMap::presentationOrder): Simple accessor.
295         * Modules/mediasource/SourceBuffer.cpp:
296         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Use new ordered objects.
297         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Ditto.
298         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
299         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
300         (WebCore::SourceBuffer::bufferedSamplesForTrackID): Ditto.
301
302 2014-06-26  Chris Fleizach  <cfleizach@apple.com>
303
304         Add an undo group for each dictated utterance in WebKit
305         https://bugs.webkit.org/show_bug.cgi?id=134086
306
307         Applied review comments from Sam Weinig.
308
309         Move the associated USE #define into Platform.h.
310  
311         * WebCore.xcodeproj/project.pbxproj:
312         * editing/mac/TextUndoInsertionMarkup.h: Removed.
313         * editing/mac/TextUndoInsertionMarkupMac.h:
314
315 2014-06-26  Shivakumar JM  <shiva.jm@samsung.com>
316
317         [EFL][WK2] Fix Debug Build Error in Webcore module.
318         https://bugs.webkit.org/show_bug.cgi?id=134345
319
320         Reviewed by Zalan Bujtas.
321
322         Use static cast to change the type of variable to fix error
323
324         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
325         (WebCore::HarfBuzzShaper::setDrawRange):
326
327 2014-06-26  Eric Carlson  <eric.carlson@apple.com>
328
329         [Mac] allow host application to canonicalize media urls
330         https://bugs.webkit.org/show_bug.cgi?id=134329
331
332         Reviewed by Dean Jackson.
333
334         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
335         (WebCore::canonicalURL): New, use NSURLProtocol to canonicalize a URL.
336         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Call canonicalURL.
337
338 2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>
339
340         [GTK] Add padding for future expansion to WebKitDOMEventTargetIface
341         https://bugs.webkit.org/show_bug.cgi?id=134298
342
343         Reviewed by Martin Robinson.
344
345         * bindings/gobject/WebKitDOMEventTarget.h:
346
347 2014-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
348
349         [GTK] Add support for constants in GObject DOM bindings
350         https://bugs.webkit.org/show_bug.cgi?id=133983
351
352         Reviewed by Martin Robinson.
353
354         * bindings/gobject/webkitdom.symbols: Add stable constants.
355         * bindings/scripts/CodeGeneratorGObject.pm:
356         (GenerateHeader): Add constants to the header.
357         (Generate): Pass the interface object to GenerateHeader to get the constants
358         (IsInterfaceSymbol): Helper function that returns whether the given
359         symbol belongs to the interface. Check also constants now.
360         (ReadStableSymbols): Use IsInterfaceSymbol().
361         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
362         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
363
364 2014-06-26  Manuel Rego Casasnovas  <rego@igalia.com>
365
366         [CSS Grid Layout] Properly support for z-index on grid items
367         https://bugs.webkit.org/show_bug.cgi?id=103329
368
369         Reviewed by Benjamin Poulain.
370
371         From Blink r157620 by <jchaffraix@chromium.org> and r172402 by
372         <wangxianzhu@chromium.org>.
373
374         The specification says that grid should match flexbox and force
375         grid items to be stacking context if z-index is set, regardless
376         of 'position'. After this change, this is what happens.
377
378         Previously z-index changes of static positioned objects were ignored.
379         However, z-index is applicable for some static positioned objects,
380         such as grid items. Ignoring them makes the object not to be properly
381         painted on z-index change.
382
383         As StyleResolver has ensured that z-index is non-auto only if
384         applicable, RenderStyle::changeRequiresLayerRepaint() should not check
385         again (with inconsistent conditions).
386
387         Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.html
388                fast/css-grid-layout/grid-item-z-index-stacking-context.html
389                fast/css-grid-layout/grid-item-z-index-support.html
390
391         * css/StyleResolver.cpp:
392         (WebCore::isDisplayFlexibleOrGridBox): Add new method to check if parent
393         display is flexbox or grid.
394         (WebCore::StyleResolver::adjustRenderStyle): Use new method in z-index
395         condition.
396         * rendering/style/RenderStyle.cpp:
397         (WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index checks
398         out of non-static positioned objects if.
399
400 2014-06-25  Dean Jackson  <dino@apple.com>
401
402         HIDGamepad should use CFIndex when looping
403         https://bugs.webkit.org/show_bug.cgi?id=134337
404
405         Reviewed by Dan Bernstein.
406
407         * platform/mac/HIDGamepad.cpp:
408         (WebCore::HIDGamepad::initElementsFromArray): Replace int with CFIndex, and use
409         a local variable for CFArrayCount.
410
411 2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>
412
413         Build fix attempt after r170465.
414
415         * platform/mac/HIDGamepad.cpp:
416         (WebCore::HIDGamepad::initElementsFromArray):
417
418 2014-06-25  Dean Jackson  <dino@apple.com>
419
420         [Mac] Radio buttons and checkboxes vanish when redrawn
421         https://bugs.webkit.org/show_bug.cgi?id=134335
422
423         Reviewed by Dan Bernstein.
424
425         I screwed up when landing r170343 by moving some code around
426         which broke the logic. We need to query the animation
427         state for controls after we draw (both statically and animated).
428
429         * platform/mac/ThemeMac.mm:
430         (WebCore::paintToggleButton): We need to check the state of animation again, after
431         we draw.
432
433 2014-06-25  Brady Eidson  <beidson@apple.com>
434
435         Add HID-based gamepad implementation for Mac
436         https://bugs.webkit.org/show_bug.cgi?id=134324
437
438         Reviewed by Dean Jackson.
439
440         No new tests (Not yet a tested config)
441
442         * Modules/gamepad/Gamepad.cpp:
443         (WebCore::Gamepad::Gamepad):
444         (WebCore::Gamepad::updateFromPlatformGamepad): Update the Gamepad’s data from the passed-in PlatformGamepad.
445         * Modules/gamepad/Gamepad.h:
446
447         * Modules/gamepad/GamepadButton.h:
448         (WebCore::GamepadButton::create): Change to use Ref instead of RefPtr.
449
450         GamepadManager is a GamepadStrategyClient that receives notifications from the platform gamepad implementation
451         and forwards them to NavigatorGamepad objects. In the future it will also handle event dispatch and exposing
452         gamepads to the API layer when a button is pressed:
453         * Modules/gamepad/GamepadManager.cpp: Added.
454         (WebCore::GamepadManager::shared):
455         (WebCore::GamepadManager::GamepadManager):
456         (WebCore::GamepadManager::platformGamepadConnected):
457         (WebCore::GamepadManager::platformGamepadDisconnected):
458         (WebCore::GamepadManager::registerNavigator):
459         (WebCore::GamepadManager::unregisterNavigator):
460         * Modules/gamepad/GamepadManager.h:
461
462         The NavigatorGamepad supplement actually manages visibility of Gamepads on a per-DOMWindow basis:
463         * Modules/gamepad/NavigatorGamepad.cpp:
464         (WebCore::NavigatorGamepad::NavigatorGamepad):
465         (WebCore::NavigatorGamepad::~NavigatorGamepad):
466         (WebCore::NavigatorGamepad::from):
467         (WebCore::NavigatorGamepad::gamepads):
468         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
469         (WebCore::NavigatorGamepad::gamepadConnected):
470         (WebCore::NavigatorGamepad::gamepadDisconnected):
471         * Modules/gamepad/NavigatorGamepad.h:
472         (WebCore::NavigatorGamepad::navigationStart):
473
474         HIDGamepad is a PlatformGamepad that wraps an IOHIDDeviceRef and keeps input values updated:
475         * platform/mac/HIDGamepad.cpp: Added.
476         (WebCore::HIDGamepad::HIDGamepad):
477         (WebCore::HIDGamepad::initElements):
478         (WebCore::HIDGamepad::initElementsFromArray):
479         (WebCore::HIDGamepad::maybeAddButton):
480         (WebCore::HIDGamepad::maybeAddAxis):
481         (WebCore::HIDGamepad::valueChanged):
482         * platform/mac/HIDGamepad.h: Added.
483         (WebCore::HIDGamepadElement::HIDGamepadElement):
484         (WebCore::HIDGamepadElement::~HIDGamepadElement):
485         (WebCore::HIDGamepadElement::isButton):
486         (WebCore::HIDGamepadElement::isAxis):
487         (WebCore::HIDGamepadButton::HIDGamepadButton):
488         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
489         (WebCore::HIDGamepad::hidDevice):
490
491         HIDGamepadListener wraps an IOHIDManagerRef and continuously listens for changes to Gamepad-type
492         devices plugged in to the system:
493         * platform/mac/HIDGamepadListener.cpp: Added.
494         (WebCore::deviceMatchingDictionary):
495         (WebCore::deviceAddedCallback):
496         (WebCore::deviceRemovedCallback):
497         (WebCore::deviceValuesChangedCallback):
498         (WebCore::HIDGamepadListener::shared):
499         (WebCore::HIDGamepadListener::HIDGamepadListener):
500         (WebCore::HIDGamepadListener::indexForNewlyConnectedDevice):
501         (WebCore::HIDGamepadListener::deviceAdded):
502         (WebCore::HIDGamepadListener::deviceRemoved):
503         (WebCore::HIDGamepadListener::valuesChanged):
504         (WebCore::HIDGamepadListener::removeGamepadForDevice):
505         * platform/mac/HIDGamepadListener.h: Copied from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
506         (WebCore::HIDGamepadListenerClient::~HIDGamepadListenerClient):
507         (WebCore::HIDGamepadListener::setClient):
508         (WebCore::HIDGamepadListener::platformGamepads):
509         (WebCore::HIDGamepadListener::setShouldDispatchCallbacks):
510
511         * WebCore.exp.in:
512         * WebCore.xcodeproj/project.pbxproj:
513
514 2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>
515
516         WebProgressTracker updates progress too frequently
517         https://bugs.webkit.org/show_bug.cgi?id=134185
518
519         Reviewed by Tim Horton.
520
521         The old code throttled the progress update to when either 100ms has passed or the delta is at least 2%
522         but this was still not enough in pages that loaded in sub-seconds. The new code always throttles it at 200ms.
523
524         * loader/ProgressTracker.cpp:
525         (WebCore::ProgressTracker::ProgressTracker):
526         (WebCore::ProgressTracker::incrementProgress):
527         * loader/ProgressTracker.h:
528
529 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
530
531         [iOS WK2] Fixed position elements jump around when zooming
532         https://bugs.webkit.org/show_bug.cgi?id=134328
533         <rdar://problem/17447048>
534
535         Reviewed by Zalan Bujtas.
536
537         If a given remote layer tree commit contains changes of layers for viewport-constrained
538         objects, then the associated scrolling tree also needs to show that the layers changed,
539         since we need to re-run the "viewport changed" logic in the UI process to get the
540         layers correctly positioned for the current zoom level.
541         
542         The bug was that page scale changes resulted in small "pixel alignment" position
543         changes which touched layers, but we didn't commit any scrolling tree changes. So
544         the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
545         update to adjust them for the current transient zoom.
546
547         Fix by making use of the existing "alignment offset" field in the ViewportConstraints
548         data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
549         fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
550         nodes were updated.
551
552         * page/scrolling/ScrollingConstraints.h:
553         (WebCore::StickyPositionViewportConstraints::operator==):
554         * platform/graphics/GraphicsLayer.h:
555         (WebCore::GraphicsLayer::pixelAlignmentOffset):
556         * platform/graphics/ca/GraphicsLayerCA.cpp:
557         (WebCore::GraphicsLayerCA::updateGeometry):
558         * platform/graphics/ca/GraphicsLayerCA.h:
559         * rendering/RenderLayerCompositor.cpp:
560         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
561         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
562
563 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
564
565         [iOS WK2] Tweak the logic used to choose the scale at which position:fixed gets pushed out of view
566         https://bugs.webkit.org/show_bug.cgi?id=134323
567
568         Reviewed by Benjamin Poulain.
569
570         Previously we used a fixed scale (1.2x) at which we'd start pushing position:fixed elements
571         out of the viewport. This worked well on iPad, but terribly on iPhone. Instead, choose a scale
572         relative to how much of the page is visible width-wise, the threshold being 2/3 of the page width.
573         The width is clamped to get reasonable behavior on wide pages.
574
575         * page/FrameView.cpp:
576         (WebCore::FrameView::rectForViewportConstrainedObjects):
577
578 2014-06-25  Brady Eidson  <beidson@apple.com>
579
580         Add new platform gamepad abstractions
581         https://bugs.webkit.org/show_bug.cgi?id=134325
582
583         Reviewed by Dean Jackson.
584
585         No new tests (Not yet a tested config)
586
587         - GamepadStrategy lets ports customize the 3 basic behaviors needed for a gamepad
588           implementation to feed the API in WebCore.
589         - GamepadStrategyClient gives arbitrary objects in WebCore the ability to register
590           for callbacks with the GamepadStrategy.
591         - PlatformGamepad is a platform-agnostic object that represents the data that
592           feeds into the Gamepad object that is exposed to web content.
593
594         The code in this patch is dead as-is, but https://bugs.webkit.org/show_bug.cgi?id=134324
595         will contain an immediate follow-up patch that uses it.
596
597         Makes sense to review them separately.
598
599         * WebCore.xcodeproj/project.pbxproj:
600
601         * platform/GamepadStrategy.h: Added.
602         (WebCore::GamepadStrategy::~GamepadStrategy):
603
604         * platform/GamepadStrategyClient.h: Added.
605         (WebCore::GamepadStrategyClient::~GamepadStrategyClient):
606
607         * platform/PlatformGamepad.h: Added.
608         (WebCore::PlatformGamepad::~PlatformGamepad):
609         (WebCore::PlatformGamepad::id):
610         (WebCore::PlatformGamepad::lastUpdateTime):
611         (WebCore::PlatformGamepad::connectTime):
612         (WebCore::PlatformGamepad::PlatformGamepad):
613
614         * platform/PlatformStrategies.h:
615         (WebCore::PlatformStrategies::gamepadStrategy):
616         (WebCore::PlatformStrategies::PlatformStrategies):
617
618 2014-06-25  Zalan Bujtas  <zalan@apple.com>
619
620         Assertion failed: CGPathAddRoundedRect asserts on non-renderable rounded rectangle.
621         https://bugs.webkit.org/show_bug.cgi?id=134288
622
623         Reviewed by Simon Fraser.
624
625         Speculative fix. This changeset attempts to address a possible mantissa overflow of radius
626         when checking whether the rounded rectangle is renderable.
627         We convert both the radius and the rectangle values to CGFloat(float/double) to perform
628         this renderable check, instead of always using float.
629
630         * platform/graphics/FloatRoundedRect.cpp:
631         (WebCore::FloatRoundedRect::Radii::scale): Move scale(float, float) from RoundedRect to FloatRoundedRect.
632         (WebCore::FloatRoundedRect::isRenderable): Add check if radius is >= 0.
633         * platform/graphics/FloatRoundedRect.h:
634         * platform/graphics/RoundedRect.cpp:
635         (WebCore::RoundedRect::Radii::scale):
636         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): use FloatRoundeRect::Radii.
637         * platform/graphics/RoundedRect.h:
638         * platform/graphics/cg/PathCG.cpp:
639         (WebCore::Path::platformAddPathForRoundedRect): use epsilon() to ensure width/height is always >= even with mantissa overflow. 
640
641 2014-06-25  Jer Noble  <jer.noble@apple.com>
642
643         [MSE] removeCodedFrames() can remove more than it should
644         https://bugs.webkit.org/show_bug.cgi?id=134320
645
646         Reviewed by Geoff Garen.
647
648         removeCodedFrames() can remove more samples than it should because it compares an iterator
649         in presentation timespace to one in decode timespace. Clean up this code by removing frames
650         in decode order. Rename variables and add comments to make explicit which timespace defines
651         the iterators being used.
652
653         * Modules/mediasource/SourceBuffer.cpp:
654         (WebCore::SourceBuffer::removeCodedFrames):
655
656 2014-06-25  Beth Dakin  <bdakin@apple.com>
657
658         Crash in ScrollingTree::isRubberBandInProgress()
659         https://bugs.webkit.org/show_bug.cgi?id=134316
660         -and corresponding-
661         <rdar://problem/16247911>
662
663         Reviewed by Geoffrey Garen.
664
665         This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
666         which moved the ScrollingNode creation code from ScrollingTree over to 
667         ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
668         believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
669         even though the ScrollingTree was kept alive by the bind call to propagate 
670         commitNewTreeState() over to the scrolling thread. The fix is to move node 
671         creation back to the ScrollingTree and to use the this pointer to create new
672         nodes rather than the ScrollingCoordinator's ScrollingTree pointer.
673
674         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
675         * page/scrolling/AsyncScrollingCoordinator.h:
676
677         Re-name createNode to createScrollingTreeNode(). 
678         * page/scrolling/ScrollingTree.cpp:
679         (WebCore::ScrollingTree::updateTreeFromStateNode):
680         * page/scrolling/ScrollingTree.h:
681
682         Remove this implementation of createNode that called into the 
683         ScrollingCoordinator.
684         * page/scrolling/ThreadedScrollingTree.cpp:
685         (WebCore::ThreadedScrollingTree::createNode): Deleted.
686         * page/scrolling/ThreadedScrollingTree.h:
687
688         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
689         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
690         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
691         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.
692
693         Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
694         * page/scrolling/ios/ScrollingTreeIOS.cpp:
695         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
696         (WebCore::ScrollingTreeIOS::createNode): Deleted.
697         * page/scrolling/ios/ScrollingTreeIOS.h:
698
699         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
700         * page/scrolling/mac/ScrollingCoordinatorMac.h:
701         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
702         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.
703
704         Add the implementation of createScrollingTreeNode() for the Mac to 
705         ScrollingTreeMac since it can create Mac-specific nodes.
706         * page/scrolling/mac/ScrollingTreeMac.cpp:
707         (ScrollingTreeMac::createScrollingTreeNode):
708         * page/scrolling/mac/ScrollingTreeMac.h:
709
710 2014-06-25  Enrica Casucci  <enrica@apple.com>
711
712         iOS build fix after http://trac.webkit.org/changeset/170447.
713         Unreviewed.
714
715         * editing/mac/TextUndoInsertionMarkup.h:
716
717 2014-06-25  Chris Fleizach  <cfleizach@apple.com>
718
719         Add an undo group for each dictated utterance in WebKit
720         https://bugs.webkit.org/show_bug.cgi?id=134086
721
722         Reviewed by Enrica Casucci.
723
724         Provide a mechanism for ending the current undo group on a text insertion.
725         This allows a stream of text, that is normally part of one undo group, to be
726         broken up so that subsequent undo commands will only undo portions of the text stream.
727
728         * WebCore.exp.in:
729         * WebCore.xcodeproj/project.pbxproj:
730         * editing/mac/TextUndoInsertionMarkup.h: Added.
731         * editing/mac/TextUndoInsertionMarkup.mm: Added.
732         (WebCore::shouldRegisterInsertionUndoGroup):
733         (WebCore::registerInsertionUndoGrouping):
734
735 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
736
737         [iOS]: WK2 Inspector Node Search
738         https://bugs.webkit.org/show_bug.cgi?id=134279
739
740         Reviewed by Benjamin Poulain.
741
742         * WebCore.exp.in:
743         Export Node::inspect for WebKit2.
744
745 2014-06-25  Dana Burkart  <dburkart@apple.com>
746
747         Add support for 5-tuple versioning.
748
749         Reviewed by David Farler.
750
751         * Configurations/Version.xcconfig:
752
753 2014-06-25  Jer Noble  <jer.noble@apple.com>
754
755         [MSE][Mac] REGRESSION(r170336) - zero tolerance seeks are ignored.
756         https://bugs.webkit.org/show_bug.cgi?id=134310
757
758         Reviewed by Brent Fulgham.
759
760         Tests for zero tolerance seeks were inadvertantly reversed in r170336.
761
762         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
763         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
764
765 2014-06-25  Jer Noble  <jer.noble@apple.com>
766
767         [MSE][Mac] Pause playback when readyState drops below HAVE_FUTURE_DATA, and do not complete seek until it rises above HAVE_METADATA.
768         https://bugs.webkit.org/show_bug.cgi?id=134306
769
770         Reviewed by Eric Carlson.
771
772         Pause the synchronizer before seeking, and do not resume the synchronizer until it both reports that the seek completed,
773         and that the readyState rises above HAVE_METADATA. In every other location where we change the rate of the synchronizer,
774         gate that rate change on the above.
775
776         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
777         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
778         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Check shouldBePlaying().
779         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Ditto.
780         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Unset m_seekCompleted.
781         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Pause the synchronizer.
782         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Check shouldBePlaying().
783         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying): Test m_seeking, !m_seekCompleted, and the readyState.
784         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): Set m_seekCompleted; check shouldBePlaying() and play if appropriate.
785
786 2014-06-25  Jer Noble  <jer.noble@apple.com>
787
788         [MSE] Update monitorSourceBuffers to match recent spec changes
789         https://bugs.webkit.org/show_bug.cgi?id=134305
790
791         Reviewed by Eric Carlson.
792
793         In W3C bug #24347, the text for the third clause of Source Buffer Monitoring was updated. Update our
794         implementation to match the new text.
795
796         * Modules/mediasource/MediaSource.cpp:
797         (WebCore::MediaSource::monitorSourceBuffers):
798
799 2014-06-25  Alex Christensen  <achristensen@webkit.org>
800             And peavo@outlook.com  <peavo@outlook.com>
801
802         Use references instead of pointers in RenderTheme.
803         https://bugs.webkit.org/show_bug.cgi?id=134261
804
805         Reviewed by Zalan Bujtas.
806
807         * css/StyleResolver.cpp:
808         (WebCore::StyleResolver::adjustRenderStyle):
809         * html/TextFieldInputType.cpp:
810         (WebCore::TextFieldInputType::shouldHaveSpinButton):
811         * html/shadow/SliderThumbElement.cpp:
812         (WebCore::RenderSliderThumb::updateAppearance):
813         * platform/efl/RenderThemeEfl.cpp:
814         (WebCore::RenderThemeEfl::adjustSizeConstraints):
815         (WebCore::RenderThemeEfl::applyEdjeRTLState):
816         (WebCore::RenderThemeEfl::isControlStyled):
817         (WebCore::RenderThemeEfl::paintThemePart):
818         (WebCore::RenderThemeEfl::supportsFocusRing):
819         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
820         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
821         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
822         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
823         (WebCore::RenderThemeEfl::adjustRadioStyle):
824         (WebCore::RenderThemeEfl::adjustButtonStyle):
825         (WebCore::RenderThemeEfl::adjustMenuListStyle):
826         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
827         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
828         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
829         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
830         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
831         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
832         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
833         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
834         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
835         (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
836         (WebCore::RenderThemeEfl::animationDurationForProgressBar):
837         * platform/efl/RenderThemeEfl.h:
838         * platform/gtk/RenderThemeGtk.cpp:
839         (WebCore::RenderThemeGtk::supportsFocusRing):
840         (WebCore::RenderThemeGtk::adjustButtonStyle):
841         (WebCore::RenderThemeGtk::adjustMenuListStyle):
842         (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
843         (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
844         (WebCore::adjustSearchFieldIconStyle):
845         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
846         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
847         (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
848         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
849         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
850         (WebCore::borderRadiiFromStyle):
851         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
852         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
853         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
854         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
855         (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
856         (WebCore::RenderThemeGtk::animationDurationForProgressBar):
857         (WebCore::RenderThemeGtk::calculateProgressRect):
858         * platform/gtk/RenderThemeGtk.h:
859         * platform/gtk/RenderThemeGtk2.cpp:
860         (WebCore::setToggleSize):
861         (WebCore::RenderThemeGtk::setCheckboxSize):
862         (WebCore::RenderThemeGtk::setRadioSize):
863         (WebCore::RenderThemeGtk::comboBoxArrowSize):
864         (WebCore::RenderThemeGtk::getComboBoxPadding):
865         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
866         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
867         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
868         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
869         (WebCore::RenderThemeGtk::paintMenuList):
870         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
871         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
872         * platform/gtk/RenderThemeGtk3.cpp:
873         (WebCore::setToggleSize):
874         (WebCore::RenderThemeGtk::setCheckboxSize):
875         (WebCore::RenderThemeGtk::setRadioSize):
876         (WebCore::getComboBoxMetrics):
877         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
878         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
879         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
880         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
881         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
882         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
883         * rendering/RenderButton.cpp:
884         (WebCore::RenderButton::layout):
885         * rendering/RenderInline.cpp:
886         (WebCore::RenderInline::paintOutline):
887         * rendering/RenderMediaControls.cpp:
888         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
889         * rendering/RenderMediaControls.h:
890         * rendering/RenderMenuList.cpp:
891         (WebCore::RenderMenuList::adjustInnerStyle):
892         (RenderMenuList::computeIntrinsicLogicalWidths):
893         (RenderMenuList::menuStyle):
894         * rendering/RenderMeter.cpp:
895         (WebCore::RenderMeter::updateLogicalWidth):
896         (WebCore::RenderMeter::computeLogicalHeight):
897         * rendering/RenderObject.cpp:
898         (WebCore::RenderObject::paintOutline):
899         * rendering/RenderProgress.cpp:
900         (WebCore::RenderProgress::updateAnimationState):
901         * rendering/RenderTextControlSingleLine.cpp:
902         (WebCore::RenderTextControlSingleLine::layout):
903         * rendering/RenderTheme.cpp:
904         (WebCore::RenderTheme::adjustStyle):
905         (WebCore::RenderTheme::isControlStyled):
906         (WebCore::RenderTheme::supportsFocusRing):
907         (WebCore::RenderTheme::stateChanged):
908         (WebCore::RenderTheme::adjustCheckboxStyle):
909         (WebCore::RenderTheme::adjustRadioStyle):
910         (WebCore::RenderTheme::adjustButtonStyle):
911         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
912         (WebCore::RenderTheme::adjustTextFieldStyle):
913         (WebCore::RenderTheme::adjustTextAreaStyle):
914         (WebCore::RenderTheme::adjustMenuListStyle):
915         (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
916         (WebCore::RenderTheme::adjustMeterStyle):
917         (WebCore::RenderTheme::meterSizeForBounds):
918         (WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
919         (WebCore::RenderTheme::animationDurationForProgressBar):
920         (WebCore::RenderTheme::adjustProgressBarStyle):
921         (WebCore::RenderTheme::shouldHaveSpinButton):
922         (WebCore::RenderTheme::adjustMediaControlStyle):
923         (WebCore::RenderTheme::adjustSliderTrackStyle):
924         (WebCore::RenderTheme::adjustSliderThumbStyle):
925         (WebCore::RenderTheme::adjustSliderThumbSize):
926         (WebCore::RenderTheme::adjustSearchFieldStyle):
927         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
928         (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
929         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
930         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
931         * rendering/RenderTheme.h:
932         (WebCore::RenderTheme::supportsHover):
933         (WebCore::RenderTheme::minimumMenuListSize):
934         (WebCore::RenderTheme::popupInternalPaddingLeft):
935         (WebCore::RenderTheme::popupInternalPaddingRight):
936         (WebCore::RenderTheme::popupInternalPaddingTop):
937         (WebCore::RenderTheme::popupInternalPaddingBottom):
938         (WebCore::RenderTheme::popupMenuSize):
939         (WebCore::RenderTheme::setCheckboxSize):
940         (WebCore::RenderTheme::setRadioSize):
941         (WebCore::RenderTheme::setButtonSize):
942         * rendering/RenderThemeIOS.h:
943         * rendering/RenderThemeIOS.mm:
944         (WebCore::RenderThemeIOS::adjustCheckboxStyle):
945         (WebCore::RenderThemeIOS::isControlStyled):
946         (WebCore::RenderThemeIOS::adjustRadioStyle):
947         (WebCore::RenderThemeIOS::popupInternalPaddingRight):
948         (WebCore::RenderThemeIOS::adjustRoundBorderRadius):
949         (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
950         (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
951         (WebCore::RenderThemeIOS::adjustSliderThumbSize):
952         (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
953         (WebCore::RenderThemeIOS::animationDurationForProgressBar):
954         (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
955         (WebCore::RenderThemeIOS::adjustButtonStyle):
956         (WebCore::RenderThemeIOS::setButtonSize):
957         (WebCore::RenderThemeIOS::shouldHaveSpinButton):
958         * rendering/RenderThemeMac.h:
959         * rendering/RenderThemeMac.mm:
960         (WebCore::RenderThemeMac::isControlStyled):
961         (WebCore::RenderThemeMac::controlSizeForFont):
962         (WebCore::RenderThemeMac::sizeForFont):
963         (WebCore::RenderThemeMac::sizeForSystemFont):
964         (WebCore::RenderThemeMac::setSizeFromFont):
965         (WebCore::RenderThemeMac::setFontFromControlSize):
966         (WebCore::RenderThemeMac::controlSizeForSystemFont):
967         (WebCore::RenderThemeMac::adjustTextFieldStyle):
968         (WebCore::RenderThemeMac::adjustTextAreaStyle):
969         (WebCore::RenderThemeMac::paintMenuList):
970         (WebCore::RenderThemeMac::meterSizeForBounds):
971         (WebCore::RenderThemeMac::paintMeter):
972         (WebCore::RenderThemeMac::levelIndicatorFor):
973         (WebCore::RenderThemeMac::progressBarRectForBounds):
974         (WebCore::RenderThemeMac::minimumProgressBarHeight):
975         (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
976         (WebCore::RenderThemeMac::animationDurationForProgressBar):
977         (WebCore::RenderThemeMac::adjustProgressBarStyle):
978         (WebCore::RenderThemeMac::paintProgressBar):
979         (WebCore::RenderThemeMac::adjustMenuListStyle):
980         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
981         (WebCore::RenderThemeMac::popupInternalPaddingRight):
982         (WebCore::RenderThemeMac::popupInternalPaddingTop):
983         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
984         (WebCore::RenderThemeMac::popupMenuSize):
985         (WebCore::RenderThemeMac::minimumMenuListSize):
986         (WebCore::RenderThemeMac::adjustSliderTrackStyle):
987         (WebCore::RenderThemeMac::adjustSliderThumbStyle):
988         (WebCore::RenderThemeMac::setSearchCellState):
989         (WebCore::RenderThemeMac::setSearchFieldSize):
990         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
991         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
992         (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
993         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
994         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
995         (WebCore::RenderThemeMac::adjustSliderThumbSize):
996         * rendering/RenderThemeSafari.cpp:
997         (WebCore::RenderThemeSafari::isControlStyled):
998         (WebCore::RenderThemeSafari::adjustRepaintRect):
999         (WebCore::RenderThemeSafari::baselinePosition):
1000         (WebCore::RenderThemeSafari::controlSizeForFont):
1001         (WebCore::RenderThemeSafari::sizeForFont):
1002         (WebCore::RenderThemeSafari::sizeForSystemFont):
1003         (WebCore::RenderThemeSafari::setSizeFromFont):
1004         (WebCore::RenderThemeSafari::setFontFromControlSize):
1005         (WebCore::RenderThemeSafari::controlSizeForSystemFont):
1006         (WebCore::RenderThemeSafari::paintCheckbox):
1007         (WebCore::RenderThemeSafari::setCheckboxSize):
1008         (WebCore::RenderThemeSafari::paintRadio):
1009         (WebCore::RenderThemeSafari::setRadioSize):
1010         (WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
1011         (WebCore::RenderThemeSafari::adjustButtonStyle):
1012         (WebCore::RenderThemeSafari::setButtonSize):
1013         (WebCore::RenderThemeSafari::adjustTextFieldStyle):
1014         (WebCore::RenderThemeSafari::adjustTextAreaStyle):
1015         (WebCore::RenderThemeSafari::paintMenuList):
1016         (WebCore::RenderThemeSafari::adjustMenuListStyle):
1017         (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
1018         (WebCore::RenderThemeSafari::popupInternalPaddingRight):
1019         (WebCore::RenderThemeSafari::popupInternalPaddingTop):
1020         (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
1021         (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
1022         (WebCore::RenderThemeSafari::minimumMenuListSize):
1023         (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
1024         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
1025         (WebCore::RenderThemeSafari::setSearchFieldSize):
1026         (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
1027         (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
1028         (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
1029         (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
1030         (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
1031         (WebCore::RenderThemeSafari::adjustMeterStyle):
1032         (WebCore::RenderThemeSafari::meterSizeForBounds):
1033         (WebCore::RenderThemeSafari::paintMeter):
1034         * rendering/RenderThemeSafari.h:
1035         * rendering/RenderThemeWin.cpp:
1036         (WebCore::RenderThemeWin::supportsHover):
1037         (WebCore::RenderThemeWin::supportsFocusRing):
1038         (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
1039         (WebCore::RenderThemeWin::setCheckboxSize):
1040         (WebCore::RenderThemeWin::paintTextField):
1041         (WebCore::RenderThemeWin::paintMenuList):
1042         (WebCore::RenderThemeWin::adjustMenuListStyle):
1043         (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
1044         (WebCore::RenderThemeWin::adjustSliderThumbSize):
1045         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
1046         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
1047         (WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
1048         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
1049         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
1050         (WebCore::RenderThemeWin::adjustMeterStyle):
1051         (WebCore::RenderThemeWin::meterSizeForBounds):
1052         (WebCore::RenderThemeWin::paintMeter):
1053         * rendering/RenderThemeWin.h:
1054         (WebCore::RenderThemeWin::paintCheckbox):
1055         (WebCore::RenderThemeWin::paintRadio):
1056         (WebCore::RenderThemeWin::setRadioSize):
1057         (WebCore::RenderThemeWin::paintTextArea):
1058         (WebCore::RenderThemeWin::popupOptionSupportsTextIndent):
1059         (WebCore::RenderThemeWin::paintSearchFieldDecorationPart):
1060         (WebCore::RenderThemeWin::adjustButtonStyle):
1061         (WebCore::RenderThemeWin::adjustTextFieldStyle):
1062         (WebCore::RenderThemeWin::adjustTextAreaStyle):
1063         (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):
1064
1065 2014-06-25  Benjamin Poulain  <benjamin@webkit.org>
1066
1067         [Mac] Update the time base of event's timestamp when the system time changes
1068         https://bugs.webkit.org/show_bug.cgi?id=134293
1069
1070         Reviewed by Anders Carlsson.
1071
1072         * platform/mac/PlatformEventFactoryMac.mm:
1073         (WebCore::cachedStartupTimeIntervalSince1970): Since events timestamps are absolute time, they also
1074         need to be updated if the system clock changes.
1075
1076 2014-06-25  Dirk Schulze  <krit@webkit.org>
1077
1078         Add all blend modes to feBlend
1079
1080         feBlend should support all blend modes from CSS and Canvas
1081         https://bugs.webkit.org/show_bug.cgi?id=134296
1082
1083         Reviewed by Dean Jackson.
1084
1085         Add all blend modes to <feBlend> (the SVG filter primitive) that are also
1086         supported by HTML Canvas and CSS.
1087
1088         In addition, add "normal" blend mode to HTML Canvas as requested by the
1089         CSS Compositing and Blending specification. (Referenced from HTML Canvas.)
1090         With this change, SVG, CSS and Canvas truly share the same blend modes and
1091         even the same keywords. This is much easier to for web authors.
1092
1093         http://www.w3.org/TR/2014/CR-compositing-1-20140220/#ltblendmodegt
1094
1095         Test: svg/filters/feBlend-all-blendmodes.svg
1096
1097         * platform/graphics/GraphicsTypes.cpp: Reorder blend mode text streams to match
1098             enumeration order. Add a new function to parse blend modes independent of
1099             compositing modes. Add a string "normal" that is supported by CSS, feBlend and
1100             HTML Canvas now.
1101         (WebCore::parseBlendMode):
1102         (WebCore::parseCompositeAndBlendOperator):
1103         * platform/graphics/GraphicsTypes.h: Reorder BlendMode enumeration values to match
1104          the SVG JS enumeration for blend modes.
1105         * platform/graphics/cpu/arm/filters/FEBlendNEON.h: Move all software code that is no
1106             longer required by the software path but still used by NEON here.
1107         (WebCore::FEBlend::platformApplySoftware):
1108         (WebCore::FEBlend::platformApplyNEON):
1109         * platform/graphics/filters/FEBlend.cpp:
1110             Use drawImageBuffer() to blend the results of previous filter primitives. This
1111             allows removing more than 60% of the code.
1112         (WebCore::FEBlend::FEBlend):
1113         (WebCore::FEBlend::create):
1114         (WebCore::FEBlend::blendMode):
1115         (WebCore::FEBlend::setBlendMode):
1116         (WebCore::FEBlend::platformApplySoftware):
1117         (WebCore::FEBlend::dump):
1118         (WebCore::FEBlend::externalRepresentation):
1119         (WebCore::feBlendNormal): Deleted.
1120         (WebCore::feBlendMultiply): Deleted.
1121         (WebCore::feBlendScreen): Deleted.
1122         (WebCore::feBlendDarken): Deleted.
1123         (WebCore::feBlendLighten): Deleted.
1124         (WebCore::feBlendUnknown): Deleted.
1125         (WebCore::platformApply): Deleted.
1126         (WebCore::FEBlend::platformApplyGeneric): Deleted.
1127         (WebCore::operator<<): Deleted.
1128         * platform/graphics/filters/FEBlend.h:
1129         * svg/SVGAnimatedEnumeration.cpp: Use the global BlendMode enumeration.
1130         (WebCore::enumerationValueForTargetAttribute):
1131         * svg/SVGFEBlendElement.cpp:
1132         (WebCore::SVGFEBlendElement::SVGFEBlendElement): Use the global BlendMode enumeration.
1133             No new enumeration values added or exposed to SVG DOM as requested by SVG WG.
1134         (WebCore::SVGFEBlendElement::parseAttribute):
1135         * svg/SVGFEBlendElement.h: Replace BlendModeType with global BlendMode enumeration. Remove
1136             blend mode parsing code and use the code in GraphicsTypes instead.
1137         (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
1138         (WebCore::SVGPropertyTraits<BlendMode>::toString):
1139         (WebCore::SVGPropertyTraits<BlendModeType>::highestEnumValue): Deleted.
1140         (WebCore::SVGPropertyTraits<BlendModeType>::toString): Deleted.
1141         (WebCore::SVGPropertyTraits<BlendModeType>::fromString): Deleted.
1142
1143 2014-06-25  Zalan Bujtas  <zalan@apple.com>
1144
1145         Unreviewed iOS build fix after r170425.
1146
1147         * accessibility/AccessibilityProgressIndicator.cpp:
1148         * accessibility/AccessibilityProgressIndicator.h:
1149
1150 2014-06-25  Chris Fleizach  <cfleizach@apple.com>
1151
1152         AX: Crash at com.apple.WebCore: WebCore::AlternativeTextController::removeDictationAlternativesForMarker + 43
1153         https://bugs.webkit.org/show_bug.cgi?id=134226
1154
1155         Reviewed by Enrica Casucci.
1156
1157         Unchecked access of details pointer in the Document marker led to the crash.
1158         It seems erroneous to allow creation of a DocumentMarker without details when one is expected, because it
1159         carries the dictation context (not just the description).
1160         Also, add in ASSERTs to catch scenarios where a nullptr might be passed in.
1161
1162         Test: platform/mac/editing/input/crash-for-empty-text-alternative.html
1163
1164         * dom/DocumentMarker.cpp:
1165         (WebCore::DocumentMarker::DocumentMarker):
1166         * editing/AlternativeTextController.cpp:
1167         (WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
1168
1169 2014-06-25  Laszlo Gombos  <l.gombos@samsung.com>
1170
1171         Remove build guard for progress element
1172         https://bugs.webkit.org/show_bug.cgi?id=134292
1173
1174         Reviewed by Benjamin Poulain.
1175
1176         The build flag is no longer needed as it is always on.
1177
1178         No new tests as there is no new behaviour.
1179
1180         * Configurations/FeatureDefines.xcconfig:
1181         * DerivedSources.make:
1182         * accessibility/AXObjectCache.cpp:
1183         (WebCore::createFromRenderer):
1184         * accessibility/AccessibilityProgressIndicator.cpp:
1185         (WebCore::AccessibilityProgressIndicator::create):
1186         (WebCore::AccessibilityProgressIndicator::valueForRange):
1187         (WebCore::AccessibilityProgressIndicator::maxValueForRange):
1188         (WebCore::AccessibilityProgressIndicator::minValueForRange):
1189         (WebCore::AccessibilityProgressIndicator::progressElement):
1190         * accessibility/AccessibilityProgressIndicator.h:
1191         * css/CSSPrimitiveValueMappings.h:
1192         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1193         * css/StyleResolver.cpp:
1194         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
1195         * css/html.css:
1196         (progress::-webkit-progress-value):
1197         * html/HTMLProgressElement.cpp:
1198         * html/HTMLProgressElement.h:
1199         * html/HTMLProgressElement.idl:
1200         * html/HTMLTagNames.in:
1201         * html/shadow/ProgressShadowElement.cpp:
1202         * html/shadow/ProgressShadowElement.h:
1203         * platform/efl/DefaultTheme/CMakeLists.txt:
1204         * platform/efl/DefaultTheme/default.edc:
1205         * platform/efl/RenderThemeEfl.cpp:
1206         (WebCore::toEdjeGroup):
1207         (WebCore::RenderThemeEfl::applyEdjeRTLState):
1208         (WebCore::RenderThemeEfl::paintProgressBar):
1209         * platform/efl/RenderThemeEfl.h:
1210         * platform/gtk/RenderThemeGtk.cpp:
1211         (WebCore::RenderThemeGtk::calculateProgressRect):
1212         * platform/gtk/RenderThemeGtk.h:
1213         * platform/gtk/RenderThemeGtk2.cpp:
1214         (WebCore::RenderThemeGtk::paintProgressBar):
1215         * platform/gtk/RenderThemeGtk3.cpp:
1216         (WebCore::RenderThemeGtk::paintProgressBar):
1217         * rendering/RenderObject.h:
1218         (WebCore::RenderObject::isSnapshottedPlugIn):
1219         (WebCore::RenderObject::isProgress):
1220         * rendering/RenderProgress.cpp:
1221         * rendering/RenderProgress.h:
1222         * rendering/RenderTheme.cpp:
1223         (WebCore::RenderTheme::adjustStyle):
1224         (WebCore::RenderTheme::paint):
1225         (WebCore::RenderTheme::paintBorderOnly):
1226         (WebCore::RenderTheme::paintDecorations):
1227         (WebCore::RenderTheme::progressBarRectForBounds):
1228         * rendering/RenderTheme.h:
1229         (WebCore::RenderTheme::paintProgressBar):
1230         * rendering/RenderThemeIOS.h:
1231         * rendering/RenderThemeIOS.mm:
1232         (WebCore::RenderThemeIOS::paintProgressBar):
1233         * rendering/RenderThemeMac.h:
1234         * rendering/RenderThemeMac.mm:
1235         (WebCore::RenderThemeMac::paintProgressBar):
1236
1237 2014-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1238
1239         Unreviewed. Update GObject DOM bindings test results after r170422.
1240
1241         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1242         (WebKit::wrapTestActiveDOMObject):
1243         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1244         (WebKit::wrapTestCallback):
1245         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1246         (WebKit::wrapTestCustomNamedGetter):
1247         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1248         (WebKit::wrapTestEventConstructor):
1249         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1250         (WebKit::wrapTestEventTarget):
1251         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1252         (WebKit::wrapTestException):
1253         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
1254         (WebKit::wrapTestGenerateIsReachable):
1255         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1256         (WebKit::wrapTestInterface):
1257         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1258         (WebKit::wrapTestMediaQueryListListener):
1259         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1260         (WebKit::wrapTestNamedConstructor):
1261         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1262         (WebKit::wrapTestNode):
1263         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
1264         (WebKit::wrapTestNondeterministic):
1265         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1266         (WebKit::wrapTestObj):
1267         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
1268         (WebKit::wrapTestOverloadedConstructors):
1269         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1270         (WebKit::wrapTestSerializedScriptValueInterface):
1271         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1272         (WebKit::wrapTestTypedefs):
1273         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
1274         (WebKit::wrapattribute):
1275         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
1276         (WebKit::wrapreadonly):
1277
1278 2014-06-24  Tomas Popela  <tpopela@redhat.com>
1279
1280         [GTK] Some of DOM bindings macros are misnamed
1281         https://bugs.webkit.org/show_bug.cgi?id=121543
1282
1283         Reviewed by Carlos Garcia Campos.
1284
1285         As we are using WebKitDOM as a namespace we should unify all type macros
1286         to have WEBKIT_DOM_TYPE prefix instead of WEBKIT_TYPE_DOM. Also add
1287         more exceptions to decamelize function in GObject bindings generator
1288         to fix the names of bindings for BR, HR, UL, OL, DL and LI elements.
1289
1290         * bindings/gobject/GObjectEventListener.cpp:
1291         (WebCore::GObjectEventListener::handleEvent):
1292         * bindings/gobject/WebKitDOMEventTarget.h:
1293         * bindings/gobject/WebKitDOMNodeFilter.h:
1294         * bindings/gobject/WebKitDOMObject.h:
1295         * bindings/gobject/webkitdom.symbols:
1296         * bindings/scripts/CodeGeneratorGObject.pm:
1297         (decamelize):
1298         (GetParentGObjType):
1299         (GenerateProperty):
1300         (GenerateHeader):
1301         (GenerateCFile):
1302         (GenerateEventTargetIface):
1303         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1304         (WebKit::wrapFloat64Array):
1305         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
1306         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1307         (WebKit::wrapTestActiveDOMObject):
1308         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
1309         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1310         (WebKit::wrapTestCallback):
1311         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1312         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1313         (WebKit::wrapTestCustomNamedGetter):
1314         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
1315         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1316         (WebKit::wrapTestEventConstructor):
1317         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
1318         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1319         (WebKit::wrapTestEventTarget):
1320         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1321         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1322         (WebKit::wrapTestException):
1323         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
1324         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
1325         (WebKit::wrapTestGenerateIsReachable):
1326         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
1327         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1328         (WebKit::wrapTestInterface):
1329         (webkit_dom_test_interface_class_init):
1330         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
1331         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1332         (WebKit::wrapTestMediaQueryListListener):
1333         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
1334         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1335         (WebKit::wrapTestNamedConstructor):
1336         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
1337         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1338         (WebKit::wrapTestNode):
1339         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
1340         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
1341         (WebKit::wrapTestNondeterministic):
1342         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
1343         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1344         (WebKit::wrapTestObj):
1345         (webkit_dom_test_obj_class_init):
1346         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1347         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
1348         (WebKit::wrapTestOverloadedConstructors):
1349         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
1350         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1351         (WebKit::wrapTestSerializedScriptValueInterface):
1352         (webkit_dom_test_serialized_script_value_interface_class_init):
1353         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1354         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1355         (WebKit::wrapTestTypedefs):
1356         (webkit_dom_test_typedefs_class_init):
1357         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1358         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
1359         (WebKit::wrapattribute):
1360         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
1361         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
1362         (WebKit::wrapreadonly):
1363         * bindings/scripts/test/GObject/WebKitDOMreadonly.h:
1364
1365 2014-06-24  Commit Queue  <commit-queue@webkit.org>
1366
1367         Unreviewed, rolling out r170414.
1368         https://bugs.webkit.org/show_bug.cgi?id=134291
1369
1370         the patch added a test that fails on almost every Mac tester
1371         (Requested by rniwa on #webkit).
1372
1373         Reverted changeset:
1374
1375         "Tiles on bottom of screen are not always allocated when
1376         necessary"
1377         https://bugs.webkit.org/show_bug.cgi?id=134272
1378         http://trac.webkit.org/changeset/170414
1379
1380 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
1381
1382         Tiles on bottom of screen are not always allocated when necessary
1383         https://bugs.webkit.org/show_bug.cgi?id=134272
1384
1385         Reviewed by Simon Fraser.
1386
1387         The initial visibleRect is in the coordinate of the root layer, so its origin
1388         is at the top left of the view. The initial rect we were using doesn't
1389         include the contents inset, so it was too short, which was causing tiles near
1390         the bottom of the screen to not always be allocated if the tile threshold was
1391         close to the bottom of the view. Instead, we want to include the contents
1392         inset size so the visible rect includes the entire view.
1393         GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
1394         the visible rect into the tiled layer's coordinate system, at which point it
1395         is used for visible tile logic.
1396
1397         Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
1398
1399         * platform/graphics/ca/TileCoverageMap.cpp:
1400         (WebCore::TileCoverageMap::update):
1401         * rendering/RenderLayerCompositor.cpp:
1402         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1403
1404 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
1405
1406         InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
1407         https://bugs.webkit.org/show_bug.cgi?id=134173
1408
1409         Reviewed by Daniel Bates.
1410
1411         After Zalan's talks with Kling, it seems that the simple line layout code
1412         might alleviate the need for the space savings in InlineTextBox. Given this,
1413         it would be beneficial to be a little more safe by using unsigneds throughout.
1414
1415         For example, we have code like "void setLen(unsigned len) { m_len = len; }"
1416         which might silently break if given particular inputs.
1417
1418         No new tests because there is no behavior change.
1419
1420         * rendering/InlineTextBox.cpp:
1421         (WebCore::InlineTextBox::isSelected):
1422         (WebCore::InlineTextBox::localSelectionRect):
1423         (WebCore::InlineTextBox::paint):
1424         (WebCore::InlineTextBox::selectionStartEnd):
1425         (WebCore::InlineTextBox::paintSelection):
1426         (WebCore::InlineTextBox::paintCompositionBackground):
1427         (WebCore::InlineTextBox::paintDocumentMarker):
1428         (WebCore::InlineTextBox::paintTextMatchMarker):
1429         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1430         * rendering/InlineTextBox.h:
1431         (WebCore::InlineTextBox::truncation):
1432         * rendering/RenderTextLineBoxes.cpp:
1433         (WebCore::ellipsisRectForBox):
1434
1435 2014-06-24  Ryosuke Niwa  <rniwa@webkit.org>
1436
1437         Speculative 32-bit Mac build fix after r170402.
1438
1439         * platform/graphics/mac/ComplexTextController.cpp:
1440         (WebCore::advanceByCombiningCharacterSequence):
1441
1442 2014-06-24  Joseph Pecoraro  <pecoraro@apple.com>
1443
1444         [iOS]: WK2 Inspector Node Highlighting
1445         https://bugs.webkit.org/show_bug.cgi?id=134257
1446
1447         Reviewed by Timothy Hatcher.
1448
1449         Some clients want to get highlights with the scroll applied,
1450         others do not. Provide a CoordinateSpace param to be used for
1451         getting a highlight (only used on iOS).
1452
1453         * WebCore.exp.in:
1454         * inspector/InspectorController.cpp:
1455         (WebCore::InspectorController::getHighlight):
1456         * inspector/InspectorController.h:
1457         * inspector/InspectorOverlay.cpp:
1458         (WebCore::InspectorOverlay::getHighlight):
1459         (WebCore::buildObjectForRendererFragments):
1460         * inspector/InspectorOverlay.h:
1461         (WebCore::Highlight::Highlight):
1462         * testing/Internals.cpp:
1463         (WebCore::Internals::inspectorHighlightRects):
1464
1465 2014-06-24  Jer Noble  <jer.noble@apple.com>
1466
1467         [MSE][Mac] Uncaught exception when deallocating AVSampleBufferDisplayLayer
1468         https://bugs.webkit.org/show_bug.cgi?id=134281
1469
1470         Reviewed by Brent Fulgham.
1471
1472         AVSampleBufferDisplayLayer is throwing an exception from its -dealloc method because KVO observers exist
1473         at the time of dealloc. Remove the observer for outputObscuredDueToInsufficientExternalProtection inside
1474         -stopObservingLayer.
1475
1476         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1477         (-[WebAVSampleBufferErrorListener stopObservingLayer:]):
1478
1479 2014-06-24  Mark Rowe  <mrowe@apple.com>
1480
1481         WKContextHistoryClient::didNavigateWithNavigationData is passed incorrect URL when history.pushState is used
1482         <https://webkit.org/b/134271> / <rdar://problem/16270167>
1483
1484         Reviewed by Brady Eidson.
1485
1486         Tests: http/tests/globalhistory/history-delegate-pushstate.html
1487                http/tests/globalhistory/history-delegate-replacestate.html
1488
1489         * page/History.cpp:
1490         (WebCore::History::stateObjectAdded): Call HistoryController after updating the document's URL so that the
1491         URL will reflect the destination of the navigation when FrameLoaderClient::updateGlobalHistory is called.
1492
1493 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
1494
1495         advanceByCombiningCharacterSequence() can be simplified
1496         https://bugs.webkit.org/show_bug.cgi?id=133591
1497
1498         Reviewed by Dean Jackson.
1499
1500         Use U16_NEXT() because it already does what we're trying to do.
1501
1502         No new tests because there is no behavior change.
1503
1504         * platform/graphics/mac/ComplexTextController.cpp:
1505         (WebCore::advanceByCombiningCharacterSequence):
1506
1507 2014-06-24  Brady Eidson  <beidson@apple.com>
1508
1509         Enable GAMEPAD in the Mac build, but disabled at runtime.
1510         https://bugs.webkit.org/show_bug.cgi?id=134255
1511
1512         Reviewed by Dean Jackson.
1513
1514         No new tests (No changes to a tested config).
1515
1516         * bindings/scripts/CodeGeneratorJS.pm:
1517         (GenerateImplementation): Add the ability to have a function be EnabledAtRuntime by
1518           removing such functions from the prototype if they are disabled.
1519
1520         Change the three new objects and the one new function to be EnabledAtRuntime
1521         * Modules/gamepad/Gamepad.idl:
1522         * Modules/gamepad/GamepadButton.idl:
1523         * Modules/gamepad/GamepadEvent.idl:
1524         * Modules/gamepad/NavigatorGamepad.idl:
1525
1526         Add a RuntimeEnabledFeature for Gamepads:
1527         * bindings/generic/RuntimeEnabledFeatures.cpp:
1528         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1529         * bindings/generic/RuntimeEnabledFeatures.h:
1530         (WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
1531         (WebCore::RuntimeEnabledFeatures::gamepadsEnabled):
1532
1533         * Configurations/FeatureDefines.xcconfig:
1534
1535 2014-06-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1536
1537         CSS JIT: Add positionInRootFragments to SelectorFragment
1538         https://bugs.webkit.org/show_bug.cgi?id=133609
1539
1540         Reviewed by Benjamin Poulain.
1541
1542         Some non-backtrack-related predicates use relationToRightFragment information
1543         to decide whether checkingContext->elementStyle should be refered.
1544         To make it works correctly, add the positionInRootFragments field to SelectorFragment.
1545         When positionInRootFragments == Rightmost and relationToRightFragment == Rightmost,
1546         we should see checkingContext->elementStyle.
1547
1548         Test: fast/selectors/first-child-update-with-renderer.html
1549
1550         * cssjit/SelectorCompiler.cpp:
1551         (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext):
1552         (WebCore::SelectorCompiler::addPseudoClassType):
1553         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1554         (WebCore::SelectorCompiler::constructFragments):
1555         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
1556         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1557         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1558         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1559         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1560         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1561
1562 2014-06-24  Jer Noble  <jer.noble@apple.com>
1563
1564         [Fullscreen][Mac] WKView is not firstResponder after entering fullscreen mode
1565         https://bugs.webkit.org/show_bug.cgi?id=134270
1566
1567         Reviewed by Jon Honeycutt.
1568
1569         The WebCoreFullScreenWindow's firstResponder is reset when the full screen animation completes and
1570         the window's style is changed to a fullscreen style. Save the firstResponder, and if it's still in
1571         the window's view hierarchy after the style changes, reset it to the firstResponder.
1572
1573         * platform/mac/WebCoreFullScreenWindow.mm:
1574         (-[WebCoreFullScreenWindow setStyleMask:]):
1575
1576 2014-06-24  Jer Noble  <jer.noble@apple.com>
1577
1578         [MSE][Mac] Pass AVSampleBufferDisplayLayer HDCP status through to EME
1579         https://bugs.webkit.org/show_bug.cgi?id=134221
1580
1581         Reviewed by Eric Carlson.
1582
1583         Pass the outputObscuredDueToInsufficientExternalProtection property of AVSampleBufferDisplayLayer
1584         as an error to the associated MediaKeySession object.
1585
1586         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1587         (-[WebAVSampleBufferErrorListener invalidate]):
1588         (-[WebAVSampleBufferErrorListener beginObservingLayer:]):
1589         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1590
1591 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
1592
1593         Use unsigneds instead of ints for indexes into a string in text layout code
1594         https://bugs.webkit.org/show_bug.cgi?id=133592
1595
1596         Reviewed by Zalan Bujtas.
1597
1598         Migrate much of the text-handling code to use unsigneds for indexes into a string.
1599
1600         No new tests because there is no behavior change.
1601
1602         * WebCore.exp.in:
1603         * platform/graphics/Font.cpp:
1604         (WebCore::Font::drawText):
1605         (WebCore::Font::drawEmphasisMarks):
1606         (WebCore::Font::adjustSelectionRectForText):
1607         (WebCore::computeUnderlineType):
1608         * platform/graphics/Font.h:
1609         * platform/graphics/FontFastPath.cpp:
1610         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
1611         (WebCore::Font::drawSimpleText):
1612         (WebCore::Font::drawEmphasisMarksForSimpleText):
1613         (WebCore::Font::drawGlyphBuffer):
1614         (WebCore::Font::drawEmphasisMarks):
1615         (WebCore::Font::adjustSelectionRectForSimpleText):
1616         * platform/graphics/GlyphBuffer.h:
1617         (WebCore::GlyphBuffer::size):
1618         (WebCore::GlyphBuffer::glyphs):
1619         (WebCore::GlyphBuffer::advances):
1620         (WebCore::GlyphBuffer::fontDataAt):
1621         (WebCore::GlyphBuffer::advanceAt):
1622         (WebCore::GlyphBuffer::offsetAt):
1623         (WebCore::GlyphBuffer::reverse):
1624         (WebCore::GlyphBuffer::offsetInString):
1625         (WebCore::GlyphBuffer::swap):
1626         * platform/graphics/GraphicsContext.cpp:
1627         (WebCore::TextRunIterator::atEnd):
1628         * platform/graphics/Latin1TextIterator.h:
1629         (WebCore::Latin1TextIterator::Latin1TextIterator):
1630         (WebCore::Latin1TextIterator::currentCharacter):
1631         * platform/graphics/SimpleFontData.h:
1632         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
1633         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
1634         * platform/graphics/SurrogatePairAwareTextIterator.h:
1635         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
1636         * platform/graphics/TextRun.h:
1637         (WebCore::TextRun::length):
1638         (WebCore::TextRun::charactersLength):
1639         * platform/graphics/WidthIterator.cpp:
1640         (WebCore::WidthIterator::glyphDataForCharacter):
1641         (WebCore::applyFontTransforms):
1642         (WebCore::WidthIterator::advanceInternal):
1643         (WebCore::WidthIterator::advance):
1644         (WebCore::WidthIterator::advanceOneCharacter):
1645         * platform/graphics/WidthIterator.h:
1646         * platform/graphics/cairo/FontCairo.cpp:
1647         (WebCore::Font::drawGlyphs):
1648         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
1649         (WebCore::Font::drawComplexText):
1650         (WebCore::Font::drawEmphasisMarksForComplexText):
1651         (WebCore::Font::adjustSelectionRectForComplexText):
1652         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1653         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
1654         * platform/graphics/mac/FontComplexTextMac.cpp:
1655         (WebCore::Font::adjustSelectionRectForComplexText):
1656         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1657         (WebCore::Font::drawComplexText):
1658         (WebCore::Font::drawEmphasisMarksForComplexText):
1659         * platform/graphics/mac/FontMac.mm:
1660         (WebCore::Font::drawGlyphs):
1661         * platform/graphics/win/FontCGWin.cpp:
1662         (WebCore::Font::drawGlyphs):
1663         * platform/graphics/win/FontWin.cpp:
1664         (WebCore::Font::adjustSelectionRectForComplexText):
1665         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1666         (WebCore::Font::drawComplexText):
1667         (WebCore::Font::drawEmphasisMarksForComplexText):
1668         * platform/graphics/wince/FontWinCE.cpp:
1669         (WebCore::Font::drawGlyphs):
1670         (WebCore::Font::drawComplexText):
1671         (WebCore::Font::drawEmphasisMarksForComplexText):
1672         (WebCore::Font::selectionRectForComplexText):
1673         * rendering/InlineTextBox.cpp:
1674         (WebCore::InlineTextBox::isSelected):
1675         (WebCore::InlineTextBox::selectionState):
1676         (WebCore::adjustCharactersAndLengthForHyphen):
1677         (WebCore::InlineTextBox::localSelectionRect):
1678         (WebCore::InlineTextBox::paint):
1679         (WebCore::InlineTextBox::selectionStartEnd):
1680         (WebCore::InlineTextBox::paintSelection):
1681         (WebCore::InlineTextBox::paintCompositionBackground):
1682         (WebCore::InlineTextBox::paintDocumentMarker):
1683         (WebCore::InlineTextBox::paintTextMatchMarker):
1684         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1685         (WebCore::InlineTextBox::paintCompositionUnderline):
1686         (WebCore::InlineTextBox::positionForOffset):
1687         (WebCore::InlineTextBox::constructTextRun):
1688         * rendering/InlineTextBox.h:
1689         * rendering/RenderCombineText.cpp:
1690         (WebCore::RenderCombineText::getStringToRender):
1691         * rendering/RenderCombineText.h:
1692         * rendering/svg/SVGInlineFlowBox.cpp:
1693         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1694         * rendering/svg/SVGInlineTextBox.cpp:
1695         (WebCore::SVGInlineTextBox::positionForOffset):
1696         (WebCore::SVGInlineTextBox::localSelectionRect):
1697         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1698         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
1699         (WebCore::SVGInlineTextBox::paintText):
1700         * rendering/svg/SVGInlineTextBox.h:
1701         * rendering/svg/SVGTextMetricsBuilder.cpp:
1702         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
1703         (WebCore::SVGTextMetricsBuilder::advance):
1704         * rendering/svg/SVGTextQuery.cpp:
1705         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
1706         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
1707         (WebCore::SVGTextQuery::subStringLengthCallback):
1708         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
1709         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
1710         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
1711         (WebCore::SVGTextQuery::extentOfCharacterCallback):
1712         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
1713         * rendering/svg/SVGTextQuery.h:
1714         * rendering/svg/SVGTextRunRenderingContext.cpp:
1715         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
1716         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1717         * rendering/svg/SVGTextRunRenderingContext.h:
1718         * svg/SVGFontData.cpp:
1719         (WebCore::SVGFontData::applySVGGlyphSelection):
1720         * svg/SVGFontData.h:
1721
1722 2014-06-24  Eric Carlson  <eric.carlson@apple.com>
1723
1724         Unreviewed build fix.
1725
1726         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1727         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Cast variadic argument to int.
1728
1729 2014-06-24  Brent Fulgham  <bfulgham@apple.com>
1730
1731         [Win] MSVC mishandles enums in bitfields
1732         https://bugs.webkit.org/show_bug.cgi?id=134237
1733
1734         Reviewed by Michael Saboff.
1735
1736         Replace uses of enum types in bit fields with unsigned to
1737         avoid losing a bit to hold the sign value. This can result
1738         in Windows interpreting the value of the field improperly.
1739
1740         * loader/ResourceLoaderOptions.h:
1741         * platform/network/ResourceRequestBase.h:
1742         * platform/network/cf/ResourceResponse.h:
1743         * rendering/RenderLayer.h:
1744         * rendering/RenderMarquee.h:
1745
1746 2014-06-24  Antti Koivisto  <antti@apple.com>
1747
1748         Try to fix build.
1749
1750         * WebCore.exp.in: Remove duplicate export, this should be in the iOS section only.
1751
1752 2014-06-24  Eric Carlson  <eric.carlson@apple.com>
1753
1754         [Mac] process raw VTT in-band captions
1755         https://bugs.webkit.org/show_bug.cgi?id=134178
1756
1757         Reviewed by Jer Noble.
1758
1759         * CMakeLists.txt: Add ISOVTTCue.cpp|h.
1760         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1761         * WebCore.xcodeproj/project.pbxproj: Ditto.
1762
1763         * html/track/BufferedLineReader.h:
1764         (WebCore::BufferedLineReader::reset): New, empty the input buffer.
1765
1766         Make it possible to process WebVTT captions. 
1767         * html/track/InbandGenericTextTrack.cpp:
1768         (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
1769         (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
1770         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
1771         (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
1772         (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
1773         (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
1774         * html/track/InbandGenericTextTrack.h:
1775
1776         * html/track/InbandTextTrack.h:
1777
1778         * html/track/InbandWebVTTTextTrack.cpp:
1779         (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
1780         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
1781             object.
1782         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
1783         (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
1784         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
1785         * html/track/InbandWebVTTTextTrack.h:
1786
1787         * html/track/TextTrackCueGeneric.cpp:
1788         (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
1789             from a pointer to a reference.
1790         (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.
1791
1792         * html/track/VTTCue.cpp:
1793         (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
1794         (WebCore::VTTCueBox::VTTCueBox): Ditto.
1795         (WebCore::VTTCueBox::getCue): Return a reference.
1796         (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
1797         (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
1798         (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
1799         (WebCore::VTTCue::initialize): New, shared constructor initialization.
1800         (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
1801         (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
1802         (WebCore::VTTCue::setCueSettings): Ditto.
1803         * html/track/VTTCue.h:
1804         (WebCore::VTTCueBox::create): Deleted.
1805         (WebCore::VTTCue::create): Deleted.
1806
1807         * html/track/WebVTTParser.cpp:
1808         (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
1809             call the parser.
1810         (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
1811         (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
1812         (WebCore::WebVTTParser::collectTimeStamp): Ditto.
1813         * html/track/WebVTTParser.h:
1814         (WebCore::WebVTTCueData::originalStartTime): New.
1815         (WebCore::WebVTTCueData::setOriginalStartTime): New.
1816         (WebCore::WebVTTCueData::WebVTTCueData):
1817
1818         * loader/TextTrackLoader.cpp:
1819         (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.
1820
1821         Parse ISO WebVTT cue boxes.
1822         * platform/graphics/ISOVTTCue.cpp: Added.
1823         (WebCore::ISOBox::ISOBox):
1824         (WebCore::ISOBox::peekType):
1825         (WebCore::ISOBox::peekLength):
1826         (WebCore::ISOBox::peekString):
1827         (WebCore::vttCueBoxType):
1828         (WebCore::vttIdBoxType):
1829         (WebCore::vttSettingsBoxType):
1830         (WebCore::vttPayloadBoxType):
1831         (WebCore::vttCurrentTimeBoxType):
1832         (WebCore::vttCueSourceIDBoxType):
1833         (WebCore::ISOWebVTTCue::boxType):
1834         (WebCore::ISOWebVTTCue::ISOWebVTTCue):
1835         * platform/graphics/ISOVTTCue.h: Added.
1836         (WebCore::ISOBox::boxHeaderSize):
1837         (WebCore::ISOBox::length):
1838         (WebCore::ISOBox::type):
1839         (WebCore::ISOWebVTTCue::presentationTime):
1840         (WebCore::ISOWebVTTCue::duration):
1841         (WebCore::ISOWebVTTCue::sourceID):
1842         (WebCore::ISOWebVTTCue::id):
1843         (WebCore::ISOWebVTTCue::originalStartTime):
1844         (WebCore::ISOWebVTTCue::settings):
1845         (WebCore::ISOWebVTTCue::cueText):
1846
1847         * platform/graphics/InbandTextTrackPrivateClient.h:
1848         (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.
1849
1850         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1851         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
1852         (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
1853         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
1854         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
1855             CMSampleBuffers, create ISOWebVTTCue from the sample data.
1856         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1857
1858         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
1859         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
1860         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
1861         (WebCore::InbandTextTrackPrivateAVCF::create):
1862         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1863         (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
1864         (WebCore::LegibleOutputData::LegibleOutputData):
1865         (WebCore::AVFWrapper::processCue):
1866         (WebCore::AVFWrapper::legibleOutputCallback):
1867
1868         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
1869         (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
1870         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
1871         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
1872
1873         * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
1874         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
1875             format to base class.
1876
1877         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1878         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1879         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
1880         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
1881         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
1882             options until we have tracks.
1883         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
1884         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
1885             attributed strings to track.
1886         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
1887         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
1888         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
1889
1890         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
1891         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
1892
1893 2014-06-24  Antti Koivisto  <antti@apple.com>
1894
1895         Only flush layers when the exposed rect actually changes
1896         https://bugs.webkit.org/show_bug.cgi?id=134248
1897
1898         Reviewed by Anders Carlsson.
1899
1900         * WebCore.exp.in:
1901
1902 2014-06-24  Brady Eidson  <beidson@apple.com>
1903
1904         Remove references to "Shader.h" which doesn't currently exist in the project.
1905
1906         Rubberstamped by Andreas Kling.
1907
1908         * WebCore.xcodeproj/project.pbxproj:
1909
1910 2014-06-24  Martin Hock  <mhock@apple.com>
1911
1912         [iOS] DOMWindow::outerWidth and outerHeight don't return useful values, so return 0.
1913         Also, revert r169281.
1914         https://bugs.webkit.org/show_bug.cgi?id=134233
1915         <rdar://problem/17060183>
1916
1917         Reviewed by Benjamin Poulain.
1918
1919         * page/DOMWindow.cpp:
1920         (WebCore::DOMWindow::outerHeight):
1921         (WebCore::DOMWindow::outerWidth):
1922
1923 2014-06-24  Jeremy Jones  <jeremyj@apple.com>
1924
1925         Don't set AudioSession active while interrupted.
1926         https://bugs.webkit.org/show_bug.cgi?id=134239
1927
1928         Reviewed by Eric Carlson.
1929
1930         To activate the AudioSession there must be a session with audio or video
1931         and being playing or paused.
1932
1933         * platform/audio/MediaSessionManager.cpp:
1934         (WebCore::MediaSessionManager::hasActive): added
1935         (WebCore::MediaSessionManager::beginInterruption): updateSessionState
1936         (WebCore::MediaSessionManager::sessionWillBeginPlayback): updateSessionState
1937         * platform/audio/MediaSessionManager.h: declare hasActive()
1938         * platform/audio/mac/MediaSessionManagerMac.cpp:
1939         (MediaSessionManager::updateSessionState): use hasActive()
1940
1941 2014-06-24  Jer Noble  <jer.noble@apple.com>
1942
1943         REGRESSION(r170336): Crash in HTMLMediaElement::seekTimerFired()
1944         https://bugs.webkit.org/show_bug.cgi?id=134253
1945
1946         Rubber-stamped by Eric Carlson.
1947
1948         Now that seekWithTolerance() has been split up into an asyncronous section, the null-checks in seekWithTolerance()
1949         need to be re-performed in seekTimerFired(), in case the m_player has been cleared between when the seek was initiated
1950         and when the asynchronous section is performed.
1951
1952         * html/HTMLMediaElement.cpp:
1953         (WebCore::HTMLMediaElement::seekTimerFired):
1954
1955 2014-06-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1956
1957         Fix unused parameter warnings if inspector is disabled
1958         https://bugs.webkit.org/show_bug.cgi?id=134244
1959
1960         Reviewed by Zalan Bujtas.
1961
1962         No new tests, no behavior change.
1963
1964         * inspector/InspectorConsoleInstrumentation.h:
1965         (WebCore::InspectorInstrumentation::startProfiling):
1966         (WebCore::InspectorInstrumentation::stopProfiling):
1967         * inspector/InspectorInstrumentation.h:
1968         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
1969         * loader/cache/CachedResourceLoader.cpp:
1970         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
1971
1972 2014-06-24  Jer Noble  <jer.noble@apple.com>
1973
1974         [MSE] Add null-check in sourceBufferPrivateAppendComplete().
1975         https://bugs.webkit.org/show_bug.cgi?id=133230
1976
1977         Reviewed by Eric Carlson.
1978
1979         * Modules/mediasource/SourceBuffer.cpp:
1980         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Bail early if the 
1981             SourceBuffer has been removed from the MediaSource.
1982
1983 2014-06-24  Commit Queue  <commit-queue@webkit.org>
1984
1985         Unreviewed, rolling out r170337.
1986         https://bugs.webkit.org/show_bug.cgi?id=134250
1987
1988         caused 3 layout tests to crash on debug. (Requested by zalan
1989         on #webkit).
1990
1991         Reverted changeset:
1992
1993         "Use unsigneds instead of ints for indexes into a string in
1994         text layout code"
1995         https://bugs.webkit.org/show_bug.cgi?id=133592
1996         http://trac.webkit.org/changeset/170337
1997
1998 2014-06-24  Jarek Czekalski  <jarekczek@poczta.onet.pl>
1999
2000         [ATK] Don't ignore links rendered as blocks.
2001         https://bugs.webkit.org/show_bug.cgi?id=130941
2002
2003         Reviewed by Mario Sanchez Prada.
2004
2005         * /m/usr/src/webkit-trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2006         (WebCore::AccessibilityObject::objectFocusedAndCaretOffsetUnignored): Don't ignore links
2007         when they are renderered with display:block.
2008
2009 2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2010
2011         Unreviewed. Update GObject DOM bindings test results after r170351.
2012
2013         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
2014         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2015
2016 2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2017
2018         Unreviewed. Fix GTK+ build after r170309.
2019
2020         Skip functions returning arrays in GObject DOM bindings.
2021
2022         * bindings/scripts/CodeGeneratorGObject.pm:
2023         (SkipFunction):
2024
2025 2014-06-23  Ryuan Choi  <ryuan.choi@samsung.com>
2026
2027         [EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
2028         https://bugs.webkit.org/show_bug.cgi?id=134236
2029
2030         Reviewed by Gyuyoung Kim.
2031
2032         * platform/efl/RenderThemeEfl.cpp:
2033         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
2034         (WebCore::RenderThemeEfl::loadTheme):
2035         (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
2036         * platform/efl/RenderThemeEfl.h:
2037         * platform/graphics/efl/CairoUtilitiesEfl.cpp:
2038         (WebCore::evasObjectFromCairoImageSurface):
2039         * platform/graphics/efl/CairoUtilitiesEfl.h:
2040         * platform/graphics/efl/ImageEfl.cpp:
2041         (WebCore::BitmapImage::getEvasObject):
2042
2043 2014-06-23  Jeremy Jones  <jeremyj@apple.com>
2044
2045         Chapter forward/backward should seek to beginning/end.
2046         https://bugs.webkit.org/show_bug.cgi?id=134225
2047
2048         Reviewed by Eric Carlson.
2049
2050         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2051         (-[WebAVPlayerController seekChapterBackward:]): forwards to -seekToBeginning
2052         (-[WebAVPlayerController seekChapterForward:]): forwards to -seekToEnd
2053
2054 2014-06-23  Dean Jackson  <dino@apple.com>
2055
2056         [Mac] Don't draw focus rings if we are animating controls
2057         https://bugs.webkit.org/show_bug.cgi?id=134232
2058         <rdar://problem/17381121>
2059
2060         Reviewed by Tim Horton.
2061
2062         Controls in native apps do not draw their focus rings as they
2063         animate (in Yosemite). Turn this off for WebKit too. It turns
2064         out that when we were drawing them, they were in the wrong
2065         place anyway.
2066
2067         Since we don't animate controls when testing, we can't really test this.
2068
2069         * platform/mac/ThemeMac.mm:
2070         (WebCore::paintToggleButton): Only draw the focus ring if the
2071         NSButtonCell is not animating.
2072
2073 2014-06-23  Krzysztof Czech  <k.czech@samsung.com>
2074
2075         [ATK] Remove some unnecessary code from WebKitAccessibleWrapperAtk
2076         https://bugs.webkit.org/show_bug.cgi?id=134193
2077
2078         Reviewed by Gyuyoung Kim.
2079
2080         It was used along with DRT. Since we have stopped support WK1/DRT, it won't be needed.
2081
2082         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2083         (webkitAccessibleGetFocusedElement): Deleted.
2084         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
2085
2086 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
2087
2088         Use unsigneds instead of ints for indexes into a string in text layout code
2089         https://bugs.webkit.org/show_bug.cgi?id=133592
2090
2091         Reviewed by Zalan Bujtas.
2092
2093         Migrate much of the text-handling code to use unsigneds for indexes into a string.
2094
2095         No new tests because there is no behavior change.
2096
2097         * WebCore.exp.in:
2098         * platform/graphics/Font.cpp:
2099         (WebCore::Font::drawText):
2100         (WebCore::Font::drawEmphasisMarks):
2101         (WebCore::Font::adjustSelectionRectForText):
2102         (WebCore::computeUnderlineType):
2103         * platform/graphics/Font.h:
2104         * platform/graphics/FontFastPath.cpp:
2105         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
2106         (WebCore::Font::drawSimpleText):
2107         (WebCore::Font::drawEmphasisMarksForSimpleText):
2108         (WebCore::Font::drawGlyphBuffer):
2109         (WebCore::Font::drawEmphasisMarks):
2110         (WebCore::Font::adjustSelectionRectForSimpleText):
2111         * platform/graphics/GlyphBuffer.h:
2112         (WebCore::GlyphBuffer::size):
2113         (WebCore::GlyphBuffer::glyphs):
2114         (WebCore::GlyphBuffer::advances):
2115         (WebCore::GlyphBuffer::fontDataAt):
2116         (WebCore::GlyphBuffer::advanceAt):
2117         (WebCore::GlyphBuffer::offsetAt):
2118         (WebCore::GlyphBuffer::reverse):
2119         (WebCore::GlyphBuffer::offsetInString):
2120         (WebCore::GlyphBuffer::swap):
2121         * platform/graphics/GraphicsContext.cpp:
2122         (WebCore::TextRunIterator::atEnd):
2123         * platform/graphics/Latin1TextIterator.h:
2124         (WebCore::Latin1TextIterator::Latin1TextIterator):
2125         (WebCore::Latin1TextIterator::currentCharacter):
2126         * platform/graphics/SimpleFontData.h:
2127         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
2128         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
2129         * platform/graphics/SurrogatePairAwareTextIterator.h:
2130         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
2131         * platform/graphics/TextRun.h:
2132         (WebCore::TextRun::length):
2133         (WebCore::TextRun::charactersLength):
2134         * platform/graphics/WidthIterator.cpp:
2135         (WebCore::WidthIterator::glyphDataForCharacter):
2136         (WebCore::applyFontTransforms):
2137         (WebCore::WidthIterator::advanceInternal):
2138         (WebCore::WidthIterator::advance):
2139         (WebCore::WidthIterator::advanceOneCharacter):
2140         * platform/graphics/WidthIterator.h:
2141         * platform/graphics/cairo/FontCairo.cpp:
2142         (WebCore::Font::drawGlyphs):
2143         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2144         (WebCore::Font::drawComplexText):
2145         (WebCore::Font::drawEmphasisMarksForComplexText):
2146         (WebCore::Font::adjustSelectionRectForComplexText):
2147         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2148         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
2149         * platform/graphics/mac/FontComplexTextMac.cpp:
2150         (WebCore::Font::adjustSelectionRectForComplexText):
2151         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2152         (WebCore::Font::drawComplexText):
2153         (WebCore::Font::drawEmphasisMarksForComplexText):
2154         * platform/graphics/mac/FontMac.mm:
2155         (WebCore::Font::drawGlyphs):
2156         * platform/graphics/win/FontCGWin.cpp:
2157         (WebCore::Font::drawGlyphs):
2158         * platform/graphics/win/FontWin.cpp:
2159         (WebCore::Font::adjustSelectionRectForComplexText):
2160         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2161         (WebCore::Font::drawComplexText):
2162         (WebCore::Font::drawEmphasisMarksForComplexText):
2163         * platform/graphics/wince/FontWinCE.cpp:
2164         (WebCore::Font::drawGlyphs):
2165         (WebCore::Font::drawComplexText):
2166         (WebCore::Font::drawEmphasisMarksForComplexText):
2167         (WebCore::Font::selectionRectForComplexText):
2168         * rendering/InlineTextBox.cpp:
2169         (WebCore::InlineTextBox::isSelected):
2170         (WebCore::InlineTextBox::selectionState):
2171         (WebCore::adjustCharactersAndLengthForHyphen):
2172         (WebCore::InlineTextBox::localSelectionRect):
2173         (WebCore::InlineTextBox::paint):
2174         (WebCore::InlineTextBox::selectionStartEnd):
2175         (WebCore::InlineTextBox::paintSelection):
2176         (WebCore::InlineTextBox::paintCompositionBackground):
2177         (WebCore::InlineTextBox::paintDocumentMarker):
2178         (WebCore::InlineTextBox::paintTextMatchMarker):
2179         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2180         (WebCore::InlineTextBox::paintCompositionUnderline):
2181         (WebCore::InlineTextBox::positionForOffset):
2182         (WebCore::InlineTextBox::constructTextRun):
2183         * rendering/InlineTextBox.h:
2184         * rendering/RenderCombineText.cpp:
2185         (WebCore::RenderCombineText::getStringToRender):
2186         * rendering/RenderCombineText.h:
2187         * rendering/svg/SVGInlineFlowBox.cpp:
2188         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2189         * rendering/svg/SVGInlineTextBox.cpp:
2190         (WebCore::SVGInlineTextBox::positionForOffset):
2191         (WebCore::SVGInlineTextBox::localSelectionRect):
2192         (WebCore::SVGInlineTextBox::paintSelectionBackground):
2193         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
2194         (WebCore::SVGInlineTextBox::paintText):
2195         * rendering/svg/SVGInlineTextBox.h:
2196         * rendering/svg/SVGTextMetricsBuilder.cpp:
2197         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
2198         (WebCore::SVGTextMetricsBuilder::advance):
2199         * rendering/svg/SVGTextQuery.cpp:
2200         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
2201         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
2202         (WebCore::SVGTextQuery::subStringLengthCallback):
2203         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
2204         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
2205         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
2206         (WebCore::SVGTextQuery::extentOfCharacterCallback):
2207         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
2208         * rendering/svg/SVGTextQuery.h:
2209         * rendering/svg/SVGTextRunRenderingContext.cpp:
2210         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
2211         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2212         * rendering/svg/SVGTextRunRenderingContext.h:
2213         * svg/SVGFontData.cpp:
2214         (WebCore::SVGFontData::applySVGGlyphSelection):
2215         * svg/SVGFontData.h:
2216
2217 2014-06-20  Jer Noble  <jer.noble@apple.com>
2218
2219         HTMLMediaElement seek algorithm should allow cancelling previous seeks.
2220         https://bugs.webkit.org/show_bug.cgi?id=134116
2221
2222         Reviewed by Eric Carlson.
2223
2224         Test: media/video-seek-double.html
2225
2226         Fulfill the requirement of the §4.7.14.9 seeking algorithm to do steps 5+ asynchronously and cancel
2227         previous instances of the algorithm.
2228
2229         For the html/ parts of the algorithm, implement this by adding a seek timer, which when fired will
2230         issue steps 5-12. MediaPlayerPrivateAVFoundation will already coalesce multiple seek operations, so nothing
2231         additional needs be done there.  However, MediaPlayerPrivateMediaSourceAVFObjC needs to implement the same
2232         pending seek logic in case additional seeks were issued after the html/ algorithm reached step 12.
2233
2234         * html/HTMLMediaElement.cpp:
2235         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the new m_seekTimer.
2236         (WebCore::HTMLMediaElement::parseAttribute): Clear the seek timer.
2237         (WebCore::HTMLMediaElement::seekInternal): Differentiate between DOM seeks and internal seeks.
2238         (WebCore::HTMLMediaElement::seekWithTolerance:) Split into the seekTimerFired() method.
2239         (WebCore::HTMLMediaElement::seekTimerFired:) Added, split from seekWithTolerance().
2240         * html/HTMLMediaElement.h:
2241         * html/MediaController.cpp:
2242         (MediaController::bringElementUpToSpeed): Call seekInternal().
2243         (WebCore::HTMLMediaElement::PendingSeek::PendingSeek): Added convenience struct for storing seek requests.
2244         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2245         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::PendingSeek::PendingSeek): Ditto.
2246         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2247         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Modify the time jumped
2248             handler to not clear the m_seeking flag if another seek request is pending.
2249         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
2250         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2251
2252 2014-06-23  Timothy Horton  <timothy_horton@apple.com>
2253
2254         [WK2] Use the page background color instead of white when swipe snapshots were purged (134218)
2255         https://bugs.webkit.org/show_bug.cgi?id=134218
2256         <rdar://problem/17426454>
2257
2258         Reviewed by Benjamin Poulain.
2259
2260         * WebCore.exp.in:
2261
2262 2014-06-23  Eric Carlson  <eric.carlson@apple.com>
2263
2264         [iOS] remove InbandTextTrackPrivateAVFIOS
2265         https://bugs.webkit.org/show_bug.cgi?id=134220
2266
2267         Reviewed by Benjamin Poulain.
2268
2269         * WebCore.xcodeproj/project.pbxproj: Remove references to InbandTextTrackPrivateAVFIOS.
2270
2271         * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Removed.
2272         * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.mm: Removed.
2273
2274 2014-06-23  Commit Queue  <commit-queue@webkit.org>
2275
2276         Unreviewed, rolling out r170323.
2277         https://bugs.webkit.org/show_bug.cgi?id=134224
2278
2279         lots of build breakage (Requested by bradeeoh on #webkit).
2280
2281         Reverted changeset:
2282
2283         "[Mac] process raw VTT in-band captions"
2284         https://bugs.webkit.org/show_bug.cgi?id=134178
2285         http://trac.webkit.org/changeset/170323
2286
2287 2014-06-23  Jeffrey Pfau  <jpfau@apple.com>
2288
2289         Fix release build
2290
2291         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
2292         (WebCore::IDBTransactionCoordinator::canRunTransaction):
2293
2294 2014-06-19  Jeffrey Pfau  <jpfau@apple.com>
2295
2296         Database process crashes when multiple transactions attempt to run at once
2297         https://bugs.webkit.org/show_bug.cgi?id=134139
2298
2299         Reviewed by David Kilzer.
2300
2301         Ensure that only one transaction can be running at a time.
2302
2303         Test: storage/indexeddb/transaction-overlapping.html
2304
2305         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
2306         (WebCore::IDBTransactionCoordinator::canRunTransaction):
2307
2308 2014-06-23  Benjamin Poulain  <bpoulain@apple.com>
2309
2310         [iOS][WK2] Make the state restore from HistoryItem more precise and reliable
2311         https://bugs.webkit.org/show_bug.cgi?id=134150
2312
2313         Reviewed by Tim Horton.
2314
2315         The two biggest changes for WebCore are:
2316         -Store everything we need to handle changes of ViewportConfiguration on HistoryItem.
2317         -Store the exposedRect with floating point coordinates.
2318
2319         * WebCore.exp.in:
2320         * history/CachedPage.cpp:
2321         (WebCore::CachedPage::restore):
2322         We cannot determine a good scroll position from the WebProcess because the obscured insets can change
2323         arbitrarily in the UIProcess. When we scroll here from the WebProcess, we would force an invalid position
2324         to the UIProcess with the next layer tree update.
2325
2326         To avoid any problem, we prohibit scrolling when restoring the focus appearance.
2327
2328         * history/HistoryItem.cpp:
2329         (WebCore::encodeRect):
2330         (WebCore::encodeSize):
2331         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2332         (WebCore::decodeRect):
2333         (WebCore::decodeSize):
2334         (WebCore::HistoryItem::decodeBackForwardTree):
2335         * history/HistoryItem.h:
2336         (WebCore::HistoryItem::exposedContentRect):
2337         (WebCore::HistoryItem::setExposedContentRect):
2338         (WebCore::HistoryItem::unobscuredContentRect):
2339         (WebCore::HistoryItem::setUnobscuredContentRect):
2340         (WebCore::HistoryItem::minimumLayoutSizeInScrollViewCoordinates):
2341         (WebCore::HistoryItem::setMinimumLayoutSizeInScrollViewCoordinates):
2342         (WebCore::HistoryItem::contentSize):
2343         (WebCore::HistoryItem::setContentSize):
2344         (WebCore::HistoryItem::exposedContentPosition): Deleted.
2345         (WebCore::HistoryItem::setExposedContentPosition): Deleted.
2346         * loader/HistoryController.cpp:
2347         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
2348         * page/FrameView.h:
2349         * platform/ScrollView.h:
2350         * platform/ios/ScrollViewIOS.mm:
2351         (WebCore::ScrollView::exposedContentRect):
2352         (WebCore::ScrollView::setExposedContentRect):
2353         * rendering/RenderLayerCompositor.cpp:
2354         (WebCore::RenderLayerCompositor::didChangeVisibleRect):
2355
2356 2014-06-23  Eric Carlson  <eric.carlson@apple.com>
2357
2358         [Mac] process raw VTT in-band captions
2359         https://bugs.webkit.org/show_bug.cgi?id=134178
2360
2361         Reviewed by Jer Noble.
2362
2363         * CMakeLists.txt: Add ISOVTTCue.cpp|h.
2364         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2365         * WebCore.xcodeproj/project.pbxproj: Ditto.
2366
2367         * html/track/BufferedLineReader.h:
2368         (WebCore::BufferedLineReader::reset): New, empty the input buffer.
2369
2370         Make it possible to process WebVTT captions. 
2371         * html/track/InbandGenericTextTrack.cpp:
2372         (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
2373         (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
2374         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
2375         (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
2376         (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
2377         (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
2378         * html/track/InbandGenericTextTrack.h:
2379
2380         * html/track/InbandTextTrack.h:
2381
2382         * html/track/InbandWebVTTTextTrack.cpp:
2383         (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
2384         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
2385             object.
2386         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
2387         (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
2388         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
2389         * html/track/InbandWebVTTTextTrack.h:
2390
2391         * html/track/TextTrackCueGeneric.cpp:
2392         (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
2393             from a pointer to a reference.
2394         (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.
2395
2396         * html/track/VTTCue.cpp:
2397         (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
2398         (WebCore::VTTCueBox::VTTCueBox): Ditto.
2399         (WebCore::VTTCueBox::getCue): Return a reference.
2400         (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
2401         (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
2402         (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
2403         (WebCore::VTTCue::initialize): New, shared constructor initialization.
2404         (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
2405         (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
2406         (WebCore::VTTCue::setCueSettings): Ditto.
2407         * html/track/VTTCue.h:
2408         (WebCore::VTTCueBox::create): Deleted.
2409         (WebCore::VTTCue::create): Deleted.
2410
2411         * html/track/WebVTTParser.cpp:
2412         (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
2413             call the parser.
2414         (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
2415         (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
2416         (WebCore::WebVTTParser::collectTimeStamp): Ditto.
2417         * html/track/WebVTTParser.h:
2418         (WebCore::WebVTTCueData::originalStartTime): New.
2419         (WebCore::WebVTTCueData::setOriginalStartTime): New.
2420         (WebCore::WebVTTCueData::WebVTTCueData):
2421
2422         * loader/TextTrackLoader.cpp:
2423         (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.
2424
2425         * platform/graphics/InbandTextTrackPrivateClient.h:
2426         (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.
2427
2428         Parse ISO WebVTT cue boxes.
2429         * platform/graphics/ISOVTTCue.cpp: Added.
2430         (WebCore::ISOBox::ISOBox):
2431         (WebCore::ISOBox::peekType):
2432         (WebCore::ISOBox::peekLength):
2433         (WebCore::ISOBox::peekString):
2434         (WebCore::vttCueBoxType):
2435         (WebCore::vttIdBoxType):
2436         (WebCore::vttSettingsBoxType):
2437         (WebCore::vttPayloadBoxType):
2438         (WebCore::vttCurrentTimeBoxType):
2439         (WebCore::vttCueSourceIDBoxType):
2440         (WebCore::ISOWebVTTCue::boxType):
2441         (WebCore::ISOWebVTTCue::ISOWebVTTCue):
2442         * platform/graphics/ISOVTTCue.h: Added.
2443         (WebCore::ISOBox::boxHeaderSize):
2444         (WebCore::ISOBox::length):
2445         (WebCore::ISOBox::type):
2446         (WebCore::ISOWebVTTCue::presentationTime):
2447         (WebCore::ISOWebVTTCue::duration):
2448         (WebCore::ISOWebVTTCue::sourceID):
2449         (WebCore::ISOWebVTTCue::id):
2450         (WebCore::ISOWebVTTCue::originalStartTime):
2451         (WebCore::ISOWebVTTCue::settings):
2452         (WebCore::ISOWebVTTCue::cueText):
2453
2454         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2455         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
2456         (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
2457         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
2458         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
2459             CMSampleBuffers, create ISOWebVTTCue from the sample data.
2460         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2461
2462         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
2463         (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
2464         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2465         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
2466
2467         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2468         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2469         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
2470         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
2471         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
2472             options until we have tracks.
2473         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
2474         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
2475             attributed strings to track.
2476         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
2477         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
2478         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
2479
2480         * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
2481         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
2482             format to base class.
2483
2484         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2485         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF): Ditto.
2486         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
2487
2488 2014-06-23  Jer Noble  <jer.noble@apple.com>
2489
2490         [MSE][Mac] Crash in SourceBuffer::sourceBufferPrivateDidReceiveRenderingError()
2491         https://bugs.webkit.org/show_bug.cgi?id=134211
2492
2493         Reviewed by Eric Carlson.
2494
2495         Null-check m_source before dereferencing, as the SourceBuffer may have been removed
2496         from its MediaSource before this error was received.
2497
2498         * Modules/mediasource/SourceBuffer.cpp:
2499         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
2500
2501 2014-06-23  Joseph Pecoraro  <pecoraro@apple.com>
2502
2503         Reduce synchronous layout triggered by JavaScript-based media controls
2504         https://bugs.webkit.org/show_bug.cgi?id=134208
2505
2506         Reviewed by Eric Carlson.
2507
2508         Avoid always querying the offsetWidth and offsetHeight of the timeline
2509         by only calculating these values when the timeline may change size.
2510         Also avoid doing work in a few cases where properties did not
2511         actually change.
2512
2513         * Modules/mediacontrols/mediaControlsApple.js:
2514         (Controller):
2515
2516         (Controller.prototype.setNeedsTimelineMetricsUpdate):
2517         (Controller.prototype.updateTimelineMetricsIfNeeded):
2518         Only update the timeline metrics when they may have changed.
2519
2520         (Controller.prototype.updateControls):
2521         (Controller.prototype.handleTimelineMouseMove):
2522         (Controller.prototype.progressFillStyle):
2523         (Controller.prototype.showControls):
2524         (Controller.prototype.addControls):
2525         Mark timeline metrics need update based on various UI changes.
2526
2527         (Controller.prototype.setStatusHidden):
2528         Only do work if the hidden status changed.
2529         Mark timeline metrics need update if the timeline is changed.
2530
2531         (Controller.prototype.updateProgress):
2532         Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.
2533
2534         * Modules/mediacontrols/mediaControlsiOS.js:
2535         (ControllerIOS):
2536         (ControllerIOS.prototype.updateControls):
2537
2538         (ControllerIOS.prototype.updateProgress):
2539         Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.
2540
2541         (ControllerIOS.prototype.handleWirelessPlaybackChange):
2542         Mark timeline metrics need update as button may have changed.
2543
2544         (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
2545         Only do work if the availability changed.
2546         Mark timeline metrics need update as a new button may have appeared.
2547
2548         (ControllerIOS.prototype.set pageScaleFactor):
2549         Only do work if the page scale factor changed.
2550
2551 2014-06-23  Brady Eidson  <beidson@apple.com>
2552
2553         Add skeleton code for updated Gamepad API
2554         https://bugs.webkit.org/show_bug.cgi?id=134165
2555
2556         Unreviewed - Forgotten review feedback from http://trac.webkit.org/changeset/170309
2557
2558         * Modules/gamepad/GamepadButton.idl: Forgot to commit the removal of NoInterfaceObject here.
2559
2560 2014-06-23  Brady Eidson  <beidson@apple.com>
2561
2562         Add skeleton code for updated Gamepad API
2563         https://bugs.webkit.org/show_bug.cgi?id=134165
2564
2565         Reviewed by Dean Jackson.
2566
2567         No new tests (No change in behavior for any tested configuration)
2568
2569         Interface and dummy implementation for the Gamepad object:
2570         * Modules/gamepad/Gamepad.cpp: Added.
2571         (WebCore::Gamepad::Gamepad):
2572         (WebCore::Gamepad::~Gamepad):
2573         (WebCore::Gamepad::axes):
2574         (WebCore::Gamepad::buttons):
2575         * Modules/gamepad/Gamepad.h: Added.
2576         * Modules/gamepad/Gamepad.idl: Added.
2577
2578         Interface and dummy implementation for the GamepadButton object:
2579         * Modules/gamepad/GamepadButton.cpp: Added.
2580         (WebCore::GamepadButton::GamepadButton):
2581         (WebCore::GamepadButton::pressed):
2582         * Modules/gamepad/GamepadButton.h: Added.
2583         (WebCore::GamepadButton::create):
2584         (WebCore::GamepadButton::value):
2585         (WebCore::GamepadButton::setValue):
2586         * Modules/gamepad/GamepadButton.idl: Added.
2587
2588         Interface and dummy implementation for the GamepadEvent object:
2589         * Modules/gamepad/GamepadEvent.cpp: Added.
2590         (WebCore::GamepadEvent::GamepadEvent):
2591         * Modules/gamepad/GamepadEvent.h: Added.
2592         (WebCore::GamepadEventInit::GamepadEventInit):
2593         (WebCore::GamepadEvent::~GamepadEvent):
2594         (WebCore::GamepadEvent::create):
2595         (WebCore::GamepadEvent::gamepad):
2596         * Modules/gamepad/GamepadEvent.idl: Added.
2597         * dom/EventNames.in:
2598
2599         Interface and dummy implementation for additions to the Navigator object:
2600         * Modules/gamepad/NavigatorGamepad.cpp: Added.
2601         (WebCore::NavigatorGamepad::NavigatorGamepad):
2602         (WebCore::NavigatorGamepad::supplementName):
2603         (WebCore::NavigatorGamepad::from):
2604         (WebCore::NavigatorGamepad::getGamepads):
2605         (WebCore::NavigatorGamepad::gamepads):
2606         * Modules/gamepad/NavigatorGamepad.h: Added.
2607         * Modules/gamepad/NavigatorGamepad.idl: Added.
2608
2609         Bindings additions necessary for these new interfaces:
2610         * bindings/js/JSDOMBinding.h:
2611         (WebCore::JSValueTraits<double>::arrayJSValue):
2612         * bindings/js/JSDictionary.cpp:
2613         (WebCore::JSDictionary::convertValue):
2614         * bindings/js/JSDictionary.h:
2615
2616         Project file stuff:
2617         * CMakeLists.txt:
2618         * WebCore.vcxproj/WebCore.vcxproj:
2619         * WebCore.vcxproj/WebCoreCommon.props:
2620         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2621         * WebCore.xcodeproj/project.pbxproj:
2622         * DerivedSources.make:
2623
2624 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
2625
2626         Catch Obj-C exceptions thrown by _linenPatternImage
2627         https://bugs.webkit.org/show_bug.cgi?id=134202
2628
2629         Reviewed by Geoffrey Garen.
2630
2631         Catch Objective-C exceptions thrown by _linenPatternImage and
2632         -[NSImage CGImageForProposedRect:context:hints:].
2633
2634         * platform/mac/ScrollbarThemeMac.mm:
2635         (WebCore::linenBackgroundColor):
2636
2637 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
2638
2639         CSS clip property should make layers non-opaque
2640         https://bugs.webkit.org/show_bug.cgi?id=134147
2641         <rdar://problem/17324579>
2642
2643         Reviewed by Tim Horton.
2644         
2645         https://www.fairphone.com has position:fixed elements with clip: rect(...)
2646         but we were making those layers opaque, resulting in garbage pixels
2647         in areas outside the clip rect.
2648         
2649         Fix by checking for the clip property in RenderBox::backgroundIsKnownToBeOpaqueInRect().
2650
2651         Test: compositing/contents-opaque/opaque-with-clip.html
2652
2653         * rendering/RenderBox.cpp:
2654         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
2655
2656 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
2657
2658         Adding a mask on a simple color compositing layer removes the content
2659         https://bugs.webkit.org/show_bug.cgi?id=134127
2660
2661         Reviewed by Dean Jackson.
2662         
2663         In r169053 I moved some updateDrawsContent() into updateAfterDescendents(),
2664         but this isn't called when a composited layer gains or loses a mask (which
2665         doesn't cause a layout). This caused us to fail to allocate backing store
2666         when gaining a mask, resulting in missing content.
2667         
2668         Fix by calling updateAfterDescendents() from RenderLayer::styleChange()
2669         when the layer config isn't changing.
2670         
2671         Also remove a condition in isSimpleContainerCompositingLayer() that caused us
2672         to fall off the simple layer path for masked layers, since this works just
2673         fine.
2674
2675         Test: compositing/masks/solid-color-masked.html
2676
2677         * rendering/RenderLayer.cpp:
2678         (WebCore::RenderLayer::calculateClipRects):
2679         * rendering/RenderLayerBacking.cpp:
2680         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2681
2682 2014-06-23  David Hyatt  <hyatt@apple.com>
2683
2684         [New Multicolumn] Writing mode changes on the <html> and RenderView need to
2685         be propagated to column sets and flow thread children of those renderers.
2686         https://bugs.webkit.org/show_bug.cgi?id=134121
2687         <rdar://problem/16884527>
2688
2689         Reviewed by Dean Jackson.
2690
2691         Added fast/multicol/pagination/RightToLeft-rl-dynamic.html
2692
2693         * rendering/RenderBlockFlow.cpp:
2694         (WebCore::RenderBlockFlow::styleDidChange):
2695         Refactor the propagation code for column sets and flow thread styles into a helper
2696         function that is called here.
2697
2698         (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
2699         * rendering/RenderBlockFlow.h:
2700         Add a new helper function for recalculating the styles of the column sets and
2701         flow thread in response to changes.
2702
2703         * rendering/RenderBox.cpp:
2704         (WebCore::RenderBox::styleDidChange):
2705         When the style is changed for a root element or the RenderView in response to
2706         writing mode and direction changes, make sure that style gets propagated to
2707         the column children by calling the new helper function.
2708
2709 2014-06-23  Jer Noble  <jer.noble@apple.com>
2710
2711         [Mac] Uncaught exception crash when destroying MediaPlayerPrivateAVFoundationObjC
2712         https://bugs.webkit.org/show_bug.cgi?id=134198
2713
2714         Reviewed by Eric Carlson.
2715
2716         Now that we always create an AVPlayerLayer when creating an AVPlayer, but we don't
2717         return that layer from platformLayer() unless we've been asked to, we no longer are
2718         asked to destroy our video layer from MediaPlayerPrivateAVFoundation::tearDownVideoRendering().
2719
2720         Instead, explicitly destroy our video layer (and remove the KVO-observer which is
2721         causing this exception) in the MediaPlayerPrivateAVFoundationObjC destructor.
2722
2723         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2724         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
2725
2726 2014-06-23  Andreas Kling  <akling@apple.com>
2727
2728         Remove unused FrameView::setUseCustomFixedPositionLayoutRect().
2729         <https://webkit.org/b/134194>
2730
2731         Reviewed by Anders Carlsson.
2732
2733         * WebCore.exp.in:
2734         * page/FrameView.cpp:
2735         (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Deleted.
2736         * page/FrameView.h:
2737
2738 2014-06-23  Antti Koivisto  <antti@apple.com>
2739
2740         REGRESSION (r160908): Unable to unset bold while entering text
2741         https://bugs.webkit.org/show_bug.cgi?id=134196
2742         <rdar://problem/17051653>
2743
2744         Reviewed by Andreas Kling.
2745         
2746         No test, this code path is used by some WK1 API clients only.
2747
2748         * editing/Editor.cpp:
2749         (WebCore::Editor::styleForSelectionStart):
2750         
2751             This needs to update the style before requesting the renderer.
2752
2753         * editing/Editor.h:
2754         * editing/ios/EditorIOS.mm:
2755         (WebCore::styleForSelectionStart): Deleted.
2756         * editing/mac/EditorMac.mm:
2757         (WebCore::styleForSelectionStart): Deleted.
2758         
2759             Removed the duplicated functions, moved to Editor.cpp.
2760
2761 2014-06-23  Alex Christensen  <achristensen@webkit.org>
2762
2763         [iOS] Fix video in WebGL.
2764         https://bugs.webkit.org/show_bug.cgi?id=133511
2765
2766         Reviewed by Jer Noble.
2767
2768         * WebCore.exp.in:
2769         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2770         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
2771         (WebCore::wkAVAssetResolvedURL): Deleted.
2772         * platform/mac/WebCoreSystemInterface.h:
2773         * platform/mac/WebCoreSystemInterface.mm:
2774         Declare and use resolvedURL on AVURLAsset instead of using wkAVAssetResolvedURL through WebKitSystemInterface.
2775
2776 2014-06-23  Radu Stavila  <stavila@adobe.com>
2777
2778         REGRESSION (r168046): Incorrect handling of object information in WebCore::RenderFlowThread::removeLineRegionInfo
2779         https://bugs.webkit.org/show_bug.cgi?id=133587
2780
2781         Reviewed by Antti Koivisto.
2782
2783         When an object flowed in multicol is moved from in-flow positioning to out-of-flow positioning,
2784         its information must be removed from the flowthread prior to the change being made. 
2785         Otherwise, the flow thread will no longer be its containing block and a reference to it
2786         will not be possible to obtain.
2787
2788         No new tests can be added because the code still hits in an unrelated assertion followed by a null dereference.
2789         The issue was discussed with Antti Koivisto and we decided its better to fix this problem first and
2790         handle the following issue in a separate bug.
2791
2792         * rendering/RenderBlockFlow.cpp:
2793         (WebCore::RenderBlockFlow::styleWillChange):
2794         * rendering/RenderObject.h:
2795         (WebCore::RenderObject::flowThreadContainingBlock):
2796
2797 2014-06-23  Krzysztof Czech  <k.czech@samsung.com>
2798
2799         [EFL] Platform support for WebSpeech feature.
2800         https://bugs.webkit.org/show_bug.cgi?id=116438
2801
2802         Reviewed by Csaba Osztrogonác.
2803
2804         It's a first step of adding support for Speech Synthesis in EFL port.
2805         Just stub out required API and support for compilation.
2806
2807         * CMakeLists.txt:
2808         * PlatformEfl.cmake:
2809         * PlatformGTK.cmake: Added some idls to not break GTK build.
2810         * platform/PlatformSpeechSynthesizer.h:
2811         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
2812         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
2813         (WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
2814         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
2815         (WebCore::PlatformSpeechSynthesisProviderEfl::pause):
2816         (WebCore::PlatformSpeechSynthesisProviderEfl::resume):
2817         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
2818         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
2819         * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
2820         * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
2821         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2822         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2823         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2824         (WebCore::PlatformSpeechSynthesizer::pause):
2825         (WebCore::PlatformSpeechSynthesizer::resume):
2826         (WebCore::PlatformSpeechSynthesizer::speak):
2827         (WebCore::PlatformSpeechSynthesizer::cancel):
2828
2829 2014-06-23  Jeongeun Kim  <je_julie.kim@samsung.com>
2830
2831         Make it clear to get m_svgExtensions using svgExtensions().
2832         https://bugs.webkit.org/show_bug.cgi?id=134186.
2833
2834         Reviewed by Dirk Schulze.
2835
2836         This patch makes sure that the purpose of code is to get m_svgExtensions 
2837         as changing accessSVGExtensions() to svgExtensions(). 
2838         svgExtensions() is a getter API and accessSVGExtensions() checks 
2839         the presence of m_svgExtensions and create m_svgExtensions if it does not exist. 
2840
2841         No new tests, no behavior change.
2842
2843         * dom/ContainerNode.cpp:
2844         (WebCore::ContainerNode::removeChild):
2845         (WebCore::ContainerNode::removeChildren):
2846         * dom/Document.cpp:
2847         (WebCore::Document::commonTeardown):
2848         (WebCore::Document::implicitClose):
2849         * history/CachedFrame.cpp:
2850         (WebCore::CachedFrameBase::restore):
2851         * svg/SVGDocumentExtensions.cpp:
2852         (WebCore::SVGDocumentExtensions::startAnimations):
2853         (WebCore::SVGDocumentExtensions::pauseAnimations):
2854         (WebCore::SVGDocumentExtensions::unpauseAnimations):
2855         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
2856         (WebCore::SVGDocumentExtensions::rebuildElements):
2857         * svg/SVGDocumentExtensions.h:
2858
2859 2014-06-23  Dean Jackson  <dino@apple.com>
2860
2861         [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
2862         https://bugs.webkit.org/show_bug.cgi?id=134183
2863
2864         Follow-up review from Sam Weinig.
2865
2866         * platform/graphics/GraphicsContext3D.h: Merge another bit of MAC and IOS
2867         code.
2868         * ChangeLog: Actually read his review comments this time.
2869
2870 2014-06-23  Dean Jackson  <dino@apple.com>
2871
2872         [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
2873         https://bugs.webkit.org/show_bug.cgi?id=134183
2874
2875         Reviewed by Sam Weinig.
2876
2877         GraphicsContext3D has a reference to a WebGLLayer that was
2878         hidden behind a PlatformLayer. This meant we had to cast it
2879         to use a WebGLLayer method.
2880
2881         * platform/graphics/GraphicsContext3D.h: Replace RetainPtr<PlatformLayer>
2882         with RetainPtr<WebGLLayer>.
2883         * platform/graphics/mac/GraphicsContext3DMac.mm:
2884         (WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.
2885
2886 2014-06-22  Zalan Bujtas  <zalan@apple.com>
2887
2888         Make offset from ancestor computation explicit by moving it to the callers.
2889         https://bugs.webkit.org/show_bug.cgi?id=134168.
2890
2891         Reviewed by Simon Fraser.
2892         
2893         Explicit offset computation helps code reading and less error-prone than passing
2894         the offset pointer and compute it locally when it is null.
2895
2896         No change in functionality.
2897
2898         * rendering/RenderLayer.cpp:
2899         (WebCore::transparencyClipBox):
2900         (WebCore::performOverlapTests):
2901         (WebCore::RenderLayer::setupClipPath):
2902         (WebCore::RenderLayer::setupFilters):
2903         (WebCore::RenderLayer::paintLayerContents):
2904         (WebCore::RenderLayer::collectFragments):
2905         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2906         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2907         (WebCore::RenderLayer::hitTestLayer):
2908         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2909         (WebCore::RenderLayer::calculateClipRects):
2910         * rendering/RenderLayer.h:
2911         * rendering/RenderLayerCompositor.cpp:
2912         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2913         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2914         * rendering/RenderTreeAsText.cpp:
2915         (WebCore::writeLayers):
2916
2917 2014-06-22  Zalan Bujtas  <zalan@apple.com>
2918
2919         Transition layer offsets from LayoutPoint to LayoutSize.
2920         https://bugs.webkit.org/show_bug.cgi?id=134156
2921
2922         Reviewed by Simon Fraser.
2923
2924         Use better representation for offset values.
2925
2926         No change in functionality.
2927
2928         * platform/graphics/LayoutSize.h:
2929         (WebCore::roundedForPainting):
2930         * rendering/RenderFlowThread.cpp:
2931         (WebCore::RenderFlowThread::fragmentsBoundingBox):
2932         * rendering/RenderLayer.cpp:
2933         (WebCore::expandClipRectForDescendantsAndReflection):
2934         (WebCore::RenderLayer::convertToLayerCoords):
2935         (WebCore::computeReferenceBox):
2936         (WebCore::RenderLayer::setupClipPath):
2937         (WebCore::RenderLayer::setupFilters):
2938         (WebCore::RenderLayer::paintLayerContents):
2939         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2940         (WebCore::RenderLayer::collectFragments):
2941         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2942         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2943         (WebCore::RenderLayer::createLocalTransformState):
2944         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2945         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
2946         (WebCore::RenderLayer::calculateClipRects):
2947         * rendering/RenderLayer.h:
2948         * rendering/RenderMultiColumnSet.cpp:
2949         (WebCore::RenderMultiColumnSet::collectLayerFragments):
2950
2951 2014-06-22  Dean Jackson  <dino@apple.com>
2952
2953         Attempted iOS build fix.
2954
2955         * platform/graphics/mac/GraphicsContext3DMac.mm:
2956         (WebCore::GraphicsContext3D::~GraphicsContext3D): Cast to WebGLLayer.
2957
2958 2014-06-22  Dean Jackson  <dino@apple.com>
2959
2960         [Apple] WebGL layer may use GC3D after free with remote layer hosting
2961         https://bugs.webkit.org/show_bug.cgi?id=134179
2962         <rdar://problem/17412931>
2963
2964         Reviewed by Tim Horton.
2965
2966         With remote layer hosting, a WebGLLayer may attempt to draw after
2967         the GraphicsContext3D has been destroyed. We need to make sure
2968         the GC3D tells the WebGLLayer that it is no longer valid.
2969
2970         While here, I changed some return 0 to return nullptr, the
2971         name of the ObjC property member from m_context to _context,
2972         and removed some unnecessary .get() calls.
2973
2974         This is tested by run-webkit-tests with the --remote-layer-tree
2975         option.
2976
2977         * platform/graphics/mac/GraphicsContext3DMac.mm:
2978         (WebCore::GraphicsContext3D::GraphicsContext3D): No need for .get().
2979         (WebCore::GraphicsContext3D::~GraphicsContext3D): Set the context reference on WebGLLayer
2980         to be null.
2981         (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): No need for .get().
2982         * platform/graphics/mac/WebGLLayer.h: Set the context reference on WebGLLayer
2983         to be null.
2984         * platform/graphics/mac/WebGLLayer.mm:
2985         (-[WebGLLayer initWithGraphicsContext3D:]): Rename m_context to _context.
2986         (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Check for null.
2987         (-[WebGLLayer copyCGLContextForPixelFormat:]): Rename to _context.
2988         (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Check for null.
2989         (-[WebGLLayer copyImageSnapshotWithColorSpace:]): Ditto.
2990         (-[WebGLLayer display]): Ditto.
2991
2992 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
2993
2994         [WK2] Frameset frames are not scrollable after loading (and should be)
2995         https://bugs.webkit.org/show_bug.cgi?id=134151
2996         <rdar://problem/17403365>
2997
2998         Reviewed by Dan Bates.
2999         
3000         When loading a <frameset>, we could end up with an empty non-fast-scrollable
3001         region for the main frame, because after the initial frameset document layout,
3002         nothing updated the non-fast scrollable region as the subframes added their
3003         scrollable areas to the the main frame's scrollable area set.
3004         
3005         Fix by having addScrollableArea() and removeScrollableArea() trigger an update
3006         of the non-fast scrollable region.
3007
3008         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html
3009
3010         * page/FrameView.cpp:
3011         (WebCore::FrameView::addScrollableArea):
3012         (WebCore::FrameView::removeScrollableArea):
3013         (WebCore::FrameView::scrollableAreaSetChanged):
3014         * page/FrameView.h:
3015
3016 2014-06-22  Commit Queue  <commit-queue@webkit.org>
3017
3018         Unreviewed, rolling out r170265.
3019         https://bugs.webkit.org/show_bug.cgi?id=134174
3020
3021         Broke editing tests (Requested by litherum on #webkit).
3022
3023         Reverted changeset:
3024
3025         "Use unsigneds instead of ints for indexes into a string in
3026         text layout code"
3027         https://bugs.webkit.org/show_bug.cgi?id=133592
3028         http://trac.webkit.org/changeset/170265
3029
3030 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
3031
3032         Have scrollingTreeAsText() dump the non-fast-scrollable region
3033         https://bugs.webkit.org/show_bug.cgi?id=134149
3034
3035         Reviewed by Sam Weinig.
3036
3037         Dump the non-fast-scrollable region (as an array of rects).
3038
3039         * WebCore.exp.in:
3040         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3041         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
3042
3043 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
3044
3045         Use unsigneds instead of ints for indexes into a string in text layout code
3046         https://bugs.webkit.org/show_bug.cgi?id=133592
3047
3048         Reviewed by Zalan Bujtas.
3049
3050         Migrate much of the text-handling code to use unsigneds for indexes into a string.
3051
3052         No new tests because there is no behavior change.
3053
3054         * WebCore.exp.in:
3055         * platform/graphics/Font.cpp:
3056         (WebCore::Font::drawText):
3057         (WebCore::Font::drawEmphasisMarks):
3058         (WebCore::Font::adjustSelectionRectForText):
3059         (WebCore::computeUnderlineType):
3060         * platform/graphics/Font.h:
3061         * platform/graphics/FontFastPath.cpp:
3062         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
3063         (WebCore::Font::drawSimpleText):
3064         (WebCore::Font::drawEmphasisMarksForSimpleText):
3065         (WebCore::Font::drawGlyphBuffer):
3066         (WebCore::Font::drawEmphasisMarks):
3067         (WebCore::Font::adjustSelectionRectForSimpleText):
3068         * platform/graphics/GlyphBuffer.h:
3069         (WebCore::GlyphBuffer::size):
3070         (WebCore::GlyphBuffer::glyphs):
3071         (WebCore::GlyphBuffer::advances):
3072         (WebCore::GlyphBuffer::fontDataAt):
3073         (WebCore::GlyphBuffer::advanceAt):
3074         (WebCore::GlyphBuffer::offsetAt):
3075         (WebCore::GlyphBuffer::reverse):
3076         (WebCore::GlyphBuffer::offsetInString):
3077         (WebCore::GlyphBuffer::swap):
3078         * platform/graphics/GraphicsContext.cpp:
3079         (WebCore::TextRunIterator::atEnd):
3080         * platform/graphics/Latin1TextIterator.h:
3081         (WebCore::Latin1TextIterator::Latin1TextIterator):
3082         (WebCore::Latin1TextIterator::currentCharacter):
3083         * platform/graphics/SimpleFontData.h:
3084         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
3085         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
3086         * platform/graphics/SurrogatePairAwareTextIterator.h:
3087         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
3088         * platform/graphics/TextRun.h:
3089         (WebCore::TextRun::length):
3090         (WebCore::TextRun::charactersLength):
3091         * platform/graphics/WidthIterator.cpp:
3092         (WebCore::WidthIterator::glyphDataForCharacter):
3093         (WebCore::applyFontTransforms):
3094         (WebCore::WidthIterator::advanceInternal):
3095         (WebCore::WidthIterator::advance):
3096         (WebCore::WidthIterator::advanceOneCharacter):
3097         * platform/graphics/WidthIterator.h:
3098         * platform/graphics/cairo/FontCairo.cpp:
3099         (WebCore::Font::drawGlyphs):
3100         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
3101         (WebCore::Font::drawComplexText):
3102         (WebCore::Font::drawEmphasisMarksForComplexText):
3103         (WebCore::Font::adjustSelectionRectForComplexText):
3104         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3105         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
3106         * platform/graphics/mac/FontComplexTextMac.cpp:
3107         (WebCore::Font::adjustSelectionRectForComplexText):
3108         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
3109         (WebCore::Font::drawComplexText):
3110         (WebCore::Font::drawEmphasisMarksForComplexText):
3111         * platform/graphics/mac/FontMac.mm:
3112         (WebCore::Font::drawGlyphs):
3113         * platform/graphics/win/FontCGWin.cpp:
3114         (WebCore::Font::drawGlyphs):
3115         * platform/graphics/win/FontWin.cpp:
3116         (WebCore::Font::adjustSelectionRectForComplexText):
3117         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
3118         (WebCore::Font::drawComplexText):
3119         (WebCore::Font::drawEmphasisMarksForComplexText):
3120         * platform/graphics/wince/FontWinCE.cpp:
3121         (WebCore::Font::drawGlyphs):
3122         (WebCore::Font::drawComplexText):
3123         (WebCore::Font::drawEmphasisMarksForComplexText):
3124         (WebCore::Font::selectionRectForComplexText):
3125         * rendering/InlineTextBox.cpp:
3126         (WebCore::InlineTextBox::isSelected):
3127         (WebCore::InlineTextBox::selectionState):
3128         (WebCore::adjustCharactersAndLengthForHyphen):
3129         (WebCore::InlineTextBox::localSelectionRect):
3130         (WebCore::InlineTextBox::paint):
3131         (WebCore::InlineTextBox::selectionStartEnd):
3132         (WebCore::InlineTextBox::paintSelection):
3133         (WebCore::InlineTextBox::paintCompositionBackground):
3134         (WebCore::InlineTextBox::paintDocumentMarker):
3135         (WebCore::InlineTextBox::paintTextMatchMarker):
3136         (WebCore::InlineTextBox::computeRectForReplacementMarker):
3137         (WebCore::InlineTextBox::paintCompositionUnderline):
3138         (WebCore::InlineTextBox::positionForOffset):
3139         (WebCore::InlineTextBox::constructTextRun):
3140         * rendering/InlineTextBox.h:
3141         * rendering/RenderCombineText.cpp:
3142         (WebCore::RenderCombineText::getStringToRender):
3143         * rendering/RenderCombineText.h:
3144         * rendering/svg/SVGInlineFlowBox.cpp:
3145         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
3146         * rendering/svg/SVGInlineTextBox.cpp:
3147         (WebCore::SVGInlineTextBox::positionForOffset):
3148         (WebCore::SVGInlineTextBox::localSelectionRect):
3149         (WebCore::SVGInlineTextBox::paintSelectionBackground):
3150         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
3151         (WebCore::SVGInlineTextBox::paintText):
3152         * rendering/svg/SVGInlineTextBox.h:
3153         * rendering/svg/SVGTextMetricsBuilder.cpp:
3154         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
3155         (WebCore::SVGTextMetricsBuilder::advance):
3156         * rendering/svg/SVGTextQuery.cpp:
3157         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
3158         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
3159         (WebCore::SVGTextQuery::subStringLengthCallback):
3160         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
3161         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
3162         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
3163         (WebCore::SVGTextQuery::extentOfCharacterCallback):
3164         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
3165         * rendering/svg/SVGTextQuery.h:
3166         * rendering/svg/SVGTextRunRenderingContext.cpp:
3167         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
3168         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
3169         * rendering/svg/SVGTextRunRenderingContext.h:
3170         * svg/SVGFontData.cpp:
3171         (WebCore::SVGFontData::applySVGGlyphSelection):
3172         * svg/SVGFontData.h:
3173
3174 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
3175
3176         createCairoGLSurface should take in a FloatSize reference as its first parameter
3177         https://bugs.webkit.org/show_bug.cgi?id=134159
3178
3179         Reviewed by Martin Robinson.
3180
3181         The ImageBuffer constructor operates with a FloatSize reference, which is also
3182         passed to createCairoGLSurface when accelerated 2D canvas support is enabled.
3183         That function should take in a reference to the same type.
3184
3185         * platform/graphics/cairo/ImageBufferCairo.cpp:
3186         (WebCore::createCairoGLSurface):
3187
3188 2014-06-21  Dean Jackson  <dino@apple.com>
3189
3190         [Mac] Margins for new form controls need tweaking
3191         https://bugs.webkit.org/show_bug.cgi?id=134135
3192         <rdar://problem/17262164>
3193
3194         Reviewed by Sam Weinig.
3195
3196         Take 2 of this patch. Only the mac-mountainlion LayoutTest
3197         results are different from the first attempt.
3198
3199         With the newer animated controls in OS X Yosemite, we need
3200         to tweak the fudge-factor margins for positioning. In a recent
3201         patch I added another fudge, which I'm removing with this. I'm
3202         not sure where the older values came from, but I've checked with
3203         the latest AppKit sources and am using the sizes they implement
3204         for the controls.
3205
3206         This will rebaseline a lot of tests, since I've made small tweaks
3207         to the form layout.
3208
3209         * platform/mac/ThemeMac.mm:
3210         (WebCore::checkboxMargins): New margin amounts.
3211         (WebCore::radioSizes): New sizes.
3212         (WebCore::radioMargins): New margin amounts.
3213         (WebCore::paintToggleButton): No need to call the positioning fudge any more.
3214         (WebCore::checkboxOffsets): Deleted.
3215         (WebCore::radioOffsets): Deleted.
3216
3217 2014-06-20  Sam Weinig  <sam@webkit.org>
3218
3219         Remove static tables for bindings that use eager reification
3220         https://bugs.webkit.org/show_bug.cgi?id=134126
3221
3222         Reviewed by Oliver Hunt.
3223
3224         This shaves about 1MB off of WebCore's .o files.
3225
3226         * bindings/scripts/CodeGeneratorJS.pm:
3227         (GenerateHeader):
3228         (GenerateImplementation):
3229         (GenerateConstructorHelperMethods):
3230         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3231         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3232         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3233         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3234         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3235         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3236         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3237         * bindings/scripts/test/JS/JSTestEventTarget.h:
3238         * bindings/scripts/test/JS/JSTestException.cpp:
3239         * bindings/scripts/test/JS/JSTestException.h:
3240         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3241         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3242         * bindings/scripts/test/JS/JSTestInterface.cpp:
3243         * bindings/scripts/test/JS/JSTestInterface.h:
3244         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3245         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3246         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3247         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3248         * bindings/scripts/test/JS/JSTestNode.cpp:
3249         * bindings/scripts/test/JS/JSTestNode.h:
3250         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3251         * bindings/scripts/test/JS/JSTestNondeterministic.h:
3252         * bindings/scripts/test/JS/JSTestObj.cpp:
3253         * bindings/scripts/test/JS/JSTestObj.h:
3254         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3255         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3256         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3257         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3258         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3259         * bindings/scripts/test/JS/JSTestTypedefs.h:
3260         * bindings/scripts/test/JS/JSattribute.cpp:
3261         * bindings/scripts/test/JS/JSattribute.h:
3262         * bindings/scripts/test/JS/JSreadonly.cpp:
3263         * bindings/scripts/test/JS/JSreadonly.h:
3264
3265 2014-06-21  Brady Eidson  <beidson@apple.com>
3266
3267         Gamepad API - Deprecate the existing implementation
3268         https://bugs.webkit.org/show_bug.cgi?id=134108
3269
3270         Reviewed by Timothy Hatcher.
3271
3272         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
3273         -Move some implementation files into a "deprecated" subdirectory.
3274
3275         * CMakeLists.txt:
3276         * Configurations/FeatureDefines.xcconfig:
3277         * PlatformGTK.cmake:
3278
3279         * Modules/gamepad/deprecated/Gamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
3280         * Modules/gamepad/deprecated/Gamepad.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
3281         * Modules/gamepad/deprecated/Gamepad.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
3282         * Modules/gamepad/deprecated/GamepadList.cpp: Renamed from Source/WebCore/Modules/gamepad/GamepadList.cpp.
3283         * Modules/gamepad/deprecated/GamepadList.h: Renamed from Source/WebCore/Modules/gamepad/GamepadList.h.
3284         * Modules/gamepad/deprecated/GamepadList.idl: Renamed from Source/WebCore/Modules/gamepad/GamepadList.idl.
3285         * Modules/gamepad/deprecated/NavigatorGamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
3286         * Modules/gamepad/deprecated/NavigatorGamepad.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
3287         * Modules/gamepad/deprecated/NavigatorGamepad.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
3288
3289         * platform/Gamepads.h:
3290         * platform/efl/GamepadsEfl.cpp:
3291         * platform/gtk/GamepadsGtk.cpp:
3292         * platform/linux/GamepadDeviceLinux.cpp:
3293         * platform/linux/GamepadDeviceLinux.h:
3294
3295 2014-06-21  Myles C. Maxfield  <mmaxfield@apple.com>
3296
3297         Mark TextRun's constructors as explicit
3298         https://bugs.webkit.org/show_bug.cgi?id=134124
3299
3300         Reviewed by Sam Weinig.
3301
3302         After r170072, nobody is implicitly converting a string to a TextRun. Therefore,
3303         we can make the constructors explicit.
3304
3305         No new tests because there is no behavior change.
3306
3307         * platform/graphics/TextRun.h:
3308         (WebCore::TextRun::TextRun):
3309
3310 2014-06-21  Commit Queue  <commit-queue@webkit.org>
3311
3312         Unreviewed, rolling out r170244.
3313         https://bugs.webkit.org/show_bug.cgi?id=134157
3314
3315         GTK/EFL bindings generator works differently, making this
3316         patch not work there.  Will fix entire patch after a rollout.
3317         (Requested by bradee-oh on #webkit).
3318
3319         Reverted changeset:
3320
3321         "Gamepad API - Deprecate the existing implementation"
3322         https://bugs.webkit.org/show_bug.cgi?id=134108
3323         http://trac.webkit.org/changeset/170244
3324
3325 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
3326
3327         Fix the mismatched header build guards in WebKitDOMNodeFilterPrivate.h
3328         which are throwing compilation warnings when building with Clang.
3329
3330         * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
3331
3332 2014-06-21  Brady Eidson  <beidson@apple.com>
3333
3334         Gamepad API - Deprecate the existing implementation
3335         https://bugs.webkit.org/show_bug.cgi?id=134108
3336
3337         Reviewed by Timothy Hatcher.
3338
3339         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
3340         -Add the "Deprecated" suffix to some implementation files
3341
3342         * CMakeLists.txt:
3343         * PlatformGTK.cmake:
3344         * Configurations/FeatureDefines.xcconfig:
3345         
3346         * Modules/gamepad/GamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
3347         * Modules/gamepad/GamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
3348         * Modules/gamepad/GamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
3349
3350         * Modules/gamepad/GamepadList.cpp:
3351         * Modules/gamepad/GamepadList.h:
3352         * Modules/gamepad/GamepadList.idl:
3353
3354         * Modules/gamepad/NavigatorGamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
3355         * Modules/gamepad/NavigatorGamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
3356         * Modules/gamepad/NavigatorGamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
3357
3358         * platform/Gamepads.h:
3359         * platform/efl/GamepadsEfl.cpp:
3360         * platform/gtk/GamepadsGtk.cpp:
3361         * platform/linux/GamepadDeviceLinux.cpp:
3362         * platform/linux/GamepadDeviceLinux.h:
3363
3364 2014-06-21  Commit Queue  <commit-queue@webkit.org>
3365
3366         Unreviewed, rolling out r170228.
3367         https://bugs.webkit.org/show_bug.cgi?id=134155
3368
3369         Caused 9 layout test failures on Mountain Lion
3370         http://build.webkit.org/builders/Apple%20MountainLion%20Release%20WK2%20(Tests)/builds/19216
3371         (Requested by bradee-oh on #webkit).
3372
3373         Reverted changeset:
3374
3375         "[Mac] Margins for new form controls need tweaking"
3376         https://bugs.webkit.org/show_bug.cgi?id=134135
3377         http://trac.webkit.org/changeset/170228
3378
3379 2014-06-21  Jer Noble  <jer.noble@apple.com>
3380
3381         [Mac] Create and attach the AVPlayerLayer to the AVPlayer immediately if the media element is <video>.
3382         https://bugs.webkit.org/show_bug.cgi?id=134131
3383
3384         Reviewed by Eric Carlson.
3385
3386         The AVPlayer uses the presence of an AVPlayerLayer to decide which alternate to display in the case of
3387         HLS streams with audio-only alternates. To give the AVPlayer the most information with which to make its
3388         decision, always create and attach an AVPlayerLayer before attaching an AVPlayerItem to the AVPlayerLayer.
3389         In addition, retrieve the <video> element bounds and create an AVPlayerLayer with a matching size, so that
3390         the AVPlayer can choose an alternate with the correct dimensions.
3391
3392         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3393         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3394         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
3395         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLayerRenderer):
3396         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
3397         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3398         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
3399         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
3400
3401 2014-06-21  Jeremy Jones  <jeremyj@apple.com>
3402
3403         Implement ios -[WAKWindow convertBaseToScreen:]
3404         https://bugs.webkit.org/show_bug.cgi?id=134053
3405
3406         Reviewed by Eric Carlson.
3407
3408         * platform/ios/wak/WAKWindow.mm:
3409         (-[WAKWindow convertBaseToScreen:]):
3410         Traverse layer hierarchy and convert point.
3411
3412         (-[WAKWindow convertScreenToBase:]):
3413         Traverse layer hierarchy and convert point.
3414
3415 2014-06-21  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3416
3417         Removing PAGE_VISIBILITY_API compile guard.
3418         https://bugs.webkit.org/show_bug.cgi?id=133844
3419
3420         Reviewed by Gavin Barraclough.
3421
3422         No new tests because no functional changes.
3423
3424         * Configurations/FeatureDefines.xcconfig:
3425         * Modules/vibration/NavigatorVibration.cpp:
3426         (WebCore::NavigatorVibration::vibrate):
3427         * dom/Document.cpp:
3428         (WebCore::Document::hidden):
3429         * dom/Document.h:
3430         * dom/Document.idl:
3431         * dom/Element.h:
3432         * html/HTMLMediaElement.cpp:
3433         (WebCore::HTMLMediaElement::HTMLMediaElement):
3434         (WebCore::HTMLMediaElement::registerWithDocument):
3435         (WebCore::HTMLMediaElement::unregisterWithDocument):
3436         (WebCore::HTMLMediaElement::parseAttribute):
3437         * html/HTMLMediaElement.h:
3438         * page/Page.cpp:
3439         (WebCore::Page::setIsVisibleInternal):
3440         (WebCore::Page::visibilityState):
3441         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
3442         * page/Page.h:
3443         * page/PageVisibilityState.cpp:
3444         * page/PageVisibilityState.h:
3445         * page/Settings.cpp: