[GTK] [CMake] Clean up library linking
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-10  Martin Robinson  <mrobinson@igalia.com>
2
3         [GTK] [CMake] Clean up library linking
4         https://bugs.webkit.org/show_bug.cgi?id=129782
5
6         Reviewed by Philippe Normand.
7
8         * PlatformGTK.cmake: Some files are duplicated on the source list of two convenience
9         libraries. Ensure that they are all compiled into WebCore instead of WebCorePlatformGTK.
10         Some simply need to be moved to WebCore from WebCorePlatformGTK. Don't try to link
11         WebCorePlatformGTK against WebCore -- convenience libraries should be able to save
12         their symbol resolution for the final linking step.
13
14 2014-03-10  Radu Stavila  <stavila@adobe.com>
15
16         [CSS Regions] Scrolling regions with the mouse wheel only works properly if hovering over the region's padding
17         https://bugs.webkit.org/show_bug.cgi?id=129485
18
19         Reviewed by Andrei Bucur.
20
21         When searching for the region under the mouse pointer (to identify which region to scroll), 
22         the localToAbsolute method must be called on the region container, not the region itself.
23         Also, when calling the offsetFromContainer method on a named flow fragment,
24         it must only take into consideration the border and padding of the fragment container,
25         not its scrolled offset.
26
27         Test: fast/regions/wheel-scrollable-single-region.html
28
29         * rendering/RenderBox.cpp:
30         (WebCore::RenderBox::scroll):
31         * rendering/RenderFlowThread.cpp:
32         * rendering/RenderFlowThread.h:
33         * rendering/RenderNamedFlowFragment.cpp:
34         (WebCore::RenderNamedFlowFragment::offsetFromContainer):
35         * rendering/RenderNamedFlowFragment.h:
36         * rendering/RenderNamedFlowThread.cpp:
37         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
38         * rendering/RenderNamedFlowThread.h:
39
40 2014-03-10  Jinwoo Song  <jinwoo7.song@samsung.com>
41
42         Remove unused dispatchStorageEvent() from StorageAreaSync
43         https://bugs.webkit.org/show_bug.cgi?id=129999
44
45         Reviewed by Andreas Kling.
46
47         dispatchStorageEvent() is not used anywhere.
48
49         * storage/StorageAreaSync.h: Remove dispatchStorageEvent().
50
51 2014-03-09  Alexey Proskuryakov  <ap@apple.com>
52
53         iOS build fix.
54
55         * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent):
56
57 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
58
59         [Mac] Don't perform a round-trip through WebProcess before interpreting key events
60         https://bugs.webkit.org/show_bug.cgi?id=129812
61
62         Reviewed by Darin Adler.
63
64         No significant behavior changes expected, except for Esc key processing, which now
65         dispatches a keypress before executing its default action.
66
67         * platform/KeypressCommand.h: Added.
68         (WebCore::KeypressCommand::KeypressCommand):
69         * GNUmakefile.list.am:
70         * WebCore.vcxproj/WebCore.vcxproj:
71         * WebCore.vcxproj/WebCore.vcxproj.filters:
72         * WebCore.xcodeproj/project.pbxproj:
73         Moved KeypressCommand from dom/KeyboardEvent.h to its own header, as it needed
74         in platform/ directory now.
75
76         * dom/KeyboardEvent.cpp:
77         (WebCore::KeyboardEvent::KeyboardEvent):
78         * dom/KeyboardEvent.h:
79         (WebCore::KeyboardEvent::handledByInputMethod):
80         (WebCore::KeyboardEvent::keypressCommands):
81         * platform/PlatformKeyboardEvent.h:
82         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
83         (WebCore::PlatformKeyboardEvent::handledByInputMethod):
84         (WebCore::PlatformKeyboardEvent::commands):
85         PlatformKeyboardEvent now carries results of interpreting the event by AppKit. This
86         is logically not much different from carrying charcode, and is similar to what Gtk
87         does for input methods.
88         KeyboardEvent already had keypress commands, which were added to it after construction.
89         It's still possible for WebKit1, while with WebKit2, they are provided at construction
90         time. The event now also has a boolean for whether IM handled it already.
91
92 2014-03-09  Zalan Bujtas  <zalan@apple.com>
93
94         Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
95         https://bugs.webkit.org/show_bug.cgi?id=129985
96
97         Reviewed by Simon Fraser.
98
99         This is in preparation to stop passing integral positioned boxes to transform animations.
100
101         No change in behavior.
102
103         * WebCore.exp.in:
104         * platform/graphics/GraphicsLayer.h:
105         (WebCore::GraphicsLayer::addAnimation):
106         * platform/graphics/ca/GraphicsLayerCA.cpp:
107         (WebCore::getTransformFunctionValue):
108         (WebCore::GraphicsLayerCA::addAnimation):
109         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
110         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
111         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
112         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
113         * platform/graphics/ca/GraphicsLayerCA.h:
114         * rendering/RenderLayerBacking.cpp:
115         (WebCore::RenderLayerBacking::startTransition):
116
117 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
118
119         [iOS Wk2] Can't scroll after going back to page in page cache
120         https://bugs.webkit.org/show_bug.cgi?id=129989
121         <rdar://problem/16217588>
122
123         Reviewed by Dan Bernstein.
124
125         iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
126         function that is called instead of FrameView::forceLayout(). This was unimplemented
127         for the WK2 FrameLoaderClient, so no layout was forced, with the result
128         that the contentSize was never updated and scrolling was broken.
129         
130         Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
131         and having it return a bool to say whether the default forceLayout()
132         should be done. WK1 can then continue to have its custom behavior,
133         and Wk2 will simply do a forceLayout().
134         
135         Also remove FrameLaoderClient::forceLayout(), which was never called.
136
137         * loader/EmptyClients.h:
138         * loader/FrameLoader.cpp:
139         (WebCore::FrameLoader::commitProvisionalLoad):
140         * loader/FrameLoaderClient.h:
141
142 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
143
144         [iOS WK2] Get position:fixed working slighlty better
145         https://bugs.webkit.org/show_bug.cgi?id=129988
146
147         Reviewed by Dan Bernstein.
148
149         On iOS we want to use the viewport-constrained visible rect, not
150         just the visible rect.
151
152         * page/scrolling/AsyncScrollingCoordinator.cpp:
153         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
154
155 2014-03-07  Simon Fraser  <simon.fraser@apple.com>
156
157         [iOS] Don't call scrollOffsetForFixedPosition a second time if we have no header and footer layers
158         https://bugs.webkit.org/show_bug.cgi?id=129912
159
160         Reviewed by Tim Horton.
161
162         Avoid extra work if we have no header or footer layers.
163
164         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
165         (WebCore::ScrollingTreeScrollingNodeIOS::setScrollLayerPosition):
166
167 2014-03-08  Zalan Bujtas  <zalan@apple.com>
168
169         RenderElement::valueForLength() callers misuse bool parameter.
170         https://bugs.webkit.org/show_bug.cgi?id=129982
171
172         Reviewed by Andreas Kling.
173
174         Remove bogus RenderView* parameter.
175
176         * rendering/RenderBox.cpp:
177         (WebCore::RenderBox::computePercentageLogicalHeight):
178         * rendering/RenderElement.cpp:
179         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
180
181 2014-03-08  Jeremy Jones  <jeremyj@apple.com>
182
183         Allow media element to supply the video layer after fullscreen transition has already begun.
184         https://bugs.webkit.org/show_bug.cgi?id=129870
185
186         Reviewed by Eric Carlson.
187
188         Instead of borrowing the videolayer from the HTMLMediaElement, WebVideoFullscreen now supplies a layer to HTMLMediaElement to fill in as needed and at the appropriate time.
189
190         This allows fullscreen even if the video layer hasn't yet been created. And in the future it allows MediaPlayer to supply other layers such as closed captions. 
191
192         * WebCore.exp.in:
193         Remove exports related to borrowing and lend the video layer.
194         Add exports for supplying a layer to fullscreen and keepying the frame and gravity properties in sync.
195
196         * html/HTMLMediaElement.cpp:
197         Remove the concept of borrowing the platform layer.
198         Add the concept of a supplied m_videoFullscreenLayer, into which the media player can add layers.
199         When the m_videoFullscreenFrame is supplied, don't show the video layer inline any more.
200         Stash video layer properties in case the media player is not yet created.
201
202         (WebCore::HTMLMediaElement::HTMLMediaElement):
203         Initialize gravity to the default. Remove m_platformLayerBorrowed.
204
205         (WebCore::HTMLMediaElement::platformLayer):
206         When we have a m_videoFullscreenLayer, don't show video inline.
207
208         (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
209         Pass along the m_videoFullscreenLayer to the MediaPlayer if available or just stash it for later.
210
211         (WebCore::HTMLMediaElement::createMediaPlayer):
212         Pass along video fullscreen properties that we may have accumulated before the MediaPlayer was created.
213
214         (WebCore::HTMLMediaElement::setVideoFullscreenGravity):
215         Stash the gravity property, pass it along to the media player if possible.
216
217         * html/HTMLMediaElement.h:
218         Remove concept of borrowing the video layer. Add properties for a supplied videoFullscreenLayer.
219
220         * platform/graphics/MediaPlayer.cpp:
221         (WebCore::MediaPlayer::setVideoFullscreenLayer):
222         Forward on to internal implementation.
223
224         (WebCore::MediaPlayer::setVideoFullscreenFrame):
225         Forward on to internal implementation.
226
227         (WebCore::MediaPlayer::setVideoFullscreenGravity):
228         Forward on to internal implementation.
229
230         * platform/graphics/MediaPlayer.h:
231         Add methods for video fullscreen Layer, Frame and Gravity.
232
233         * platform/graphics/MediaPlayerPrivate.h:
234         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenLayer):
235         Add default implementation.
236
237         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenFrame):
238         Add default implementation.
239         
240         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenGravity):
241         Add default implementation.
242         
243         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
244         Add support for fullscreen video layer, frame and gravity.
245
246         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
247         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
248         Init m_videoFullscreenGravity. 
249
250         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
251         Apply cached properties once video layer is created and add to the fullscreen layer.
252
253         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
254         Cache the property value. Add video layer right away available.
255
256         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
257         Cache the property value. Apply to video layer right away if available.
258
259         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity):
260         Cache the property value. Apply to video layer right away if available.
261
262         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
263         Supply a fullscreen video layer to the WebVideoFullscreenModel and to the WebVideoFullscreenInterface.
264
265         (-[WebVideoFullscreenController enterFullscreen:]):
266         Supply a fullscreen video layer to the WebVideoFullscreenModel and to the WebVideoFullscreenInterface.
267
268         (-[WebVideoFullscreenController didExitFullscreen]):
269         Clean up the videoFullscreenLayer.
270
271         * platform/ios/WebVideoFullscreenInterface.h:
272         Remove methods related to lending the video layer.
273
274         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
275         Rename WebAVPlayer layer to WebAVVideoLayer to match the AVKit name.
276         Remove functions related to lending the video layer.
277         Supply a layer directly to enterFullscreen.
278
279         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
280         (+[WebAVVideoLayer videoLayer]):
281         Rename WebAVPlayer layer to WebAVVideoLayer to match the AVKit name.
282
283         (-[WebAVVideoLayer setPlayerController:]):
284         Store the AVPlayerController to prevent AVKit's default behavior.
285
286         (-[WebAVVideoLayer setBounds:]):
287         Forward this onto the WebVideoFullscreenModel
288
289         (-[WebAVVideoLayer setVideoLayerGravity:]):
290         Forward this onto the WebVideoFullscreenModel
291
292         (-[WebAVVideoLayer videoLayerGravity]):
293         Forward this onto the WebVideoFullscreenModel
294
295         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
296         Supply a video layer directly instead of relying on one being previously loaned.
297
298         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
299         Clean-up now assumes there is a video layer.
300
301         * platform/ios/WebVideoFullscreenModel.h:
302         Remove methods for borrowing and returning video layers.
303         Add methods for keeping video layer state in sync.
304
305         * platform/ios/WebVideoFullscreenModelMediaElement.h:
306         Remove methods for borrowing and returning video layers.
307         Add method for supplying a video fullscreen layer.
308         Add methods for keeping video layer state in sync.
309
310         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
311         (WebVideoFullscreenModelMediaElement::setMediaElement):
312         Handle audio element case by setting hasVideo to false.
313
314         (WebVideoFullscreenModelMediaElement::setVideoFullscreenLayer):
315         Pass along the video fullscreen layer to the media element.
316
317         (WebVideoFullscreenModelMediaElement::setVideoLayerFrame):
318         Pass along the video layer frame to the media element.
319
320         (WebVideoFullscreenModelMediaElement::setVideoLayerGravity):
321         Pass along the video layer gravity to the media element.
322
323 2014-03-08  Jae Hyun Park  <jaepark@webkit.org>
324
325         Clean up PlatformLayer.h
326         https://bugs.webkit.org/show_bug.cgi?id=129967
327
328         Reviewed by Martin Robinson.
329
330         * platform/graphics/PlatformLayer.h:
331         Remove duplicated declaration of PlatformLayer when using TextureMapper.
332
333 2014-03-08  Zalan Bujtas  <zalan@apple.com>
334
335         Subpixel rendering: Simple compositing container layer (isSimpleContainerCompositingLayer) paints to wrong position.
336         https://bugs.webkit.org/show_bug.cgi?id=129861
337
338         Reviewed by Simon Fraser.
339
340         This patch ensures that both the simple and non-simple cases paint to the same position.
341         Simple compositing container layer codepath needs to take the fractional device pixel offset
342         into account when painting. Without the fractional value, the final paint rounding could push the
343         paint offset to a different position.
344         retina example:
345         compositing top-left: 0px 0px.
346         fractional offset: 0.3px 0.3px
347         painting coords without offseting: 0px 0px
348                            with offseting: 0.5px 0.5px
349
350         Tests: compositing/hidpi-simple-container-layer-on-device-pixel.html
351
352         * WebCore.exp.in:
353         * platform/graphics/GraphicsLayer.h:
354         (WebCore::GraphicsLayer::contentsRect):
355         (WebCore::GraphicsLayer::setContentsRect):
356         (WebCore::GraphicsLayer::contentsClippingRect):
357         (WebCore::GraphicsLayer::setContentsClippingRect):
358         * platform/graphics/ca/GraphicsLayerCA.cpp:
359         (WebCore::GraphicsLayerCA::setContentsRect):
360         (WebCore::GraphicsLayerCA::setContentsClippingRect):
361         (WebCore::GraphicsLayerCA::updateContentsRects):
362         * platform/graphics/ca/GraphicsLayerCA.h:
363         * rendering/RenderLayerBacking.cpp:
364         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
365         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
366         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
367         (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
368         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
369         * rendering/RenderLayerBacking.h:
370
371 2014-03-08  Oliver Hunt  <oliver@apple.com>
372
373         SerializedScriptValue may move Identifiers between worlds
374         https://bugs.webkit.org/show_bug.cgi?id=129979
375
376         Reviewed by Andreas Kling.
377
378         Test: fast/workers/worker-copy-shared-blob-url.html
379
380         Don't use Strings to store blob URLs as String's may be Identifiers
381         and they can only exist in one world/thread at a time.
382
383         * Modules/indexeddb/IDBObjectStore.cpp:
384         (WebCore::IDBObjectStore::put):
385         * bindings/js/SerializedScriptValue.cpp:
386         (WebCore::CloneDeserializer::deserializeString):
387         (WebCore::SerializedScriptValue::addBlobURL):
388         (WebCore::SerializedScriptValue::SerializedScriptValue):
389         * bindings/js/SerializedScriptValue.h:
390
391 2014-03-07  Timothy Hatcher  <timothy@apple.com>
392
393         Load source maps and their resources asynchronously.
394
395         https://bugs.webkit.org/show_bug.cgi?id=112071
396
397         Reviewed by Joseph Pecoraro.
398
399         * inspector/InspectorPageAgent.cpp:
400         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
401         Honor the hiddenFromInspector flag.
402
403         * inspector/InspectorResourceAgent.cpp:
404         (WebCore::InspectorResourceAgent::willSendRequest):
405         (WebCore::InspectorResourceAgent::markResourceAsCached):
406         (WebCore::InspectorResourceAgent::didReceiveResponse):
407         (WebCore::InspectorResourceAgent::didReceiveData):
408         (WebCore::InspectorResourceAgent::didFinishLoading):
409         (WebCore::InspectorResourceAgent::didFailLoading):
410         (WebCore::InspectorResourceAgent::replayXHR):
411         (WebCore::InspectorResourceAgent::loadResource):
412         * inspector/InspectorResourceAgent.h:
413         Honor the hiddenFromInspector flag by keeping track of
414         hidden identifiers in a HashSet.
415
416         * inspector/protocol/Network.json:
417         (Network.loadResource): Added.
418
419         * platform/network/ResourceRequestBase.h:
420         (WebCore::ResourceRequestBase::hiddenFromInspector): Added.
421         (WebCore::ResourceRequestBase::setHiddenFromInspector): Added.
422         (WebCore::ResourceRequestBase::ResourceRequestBase):
423         Add a flag to hide the request from the Inspector.
424
425         * xml/XMLHttpRequest.cpp:
426         (WebCore::XMLHttpRequest::XMLHttpRequest):
427         (WebCore::XMLHttpRequest::sendForInspector): Added.
428         (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Renamed.
429         (WebCore::XMLHttpRequest::createRequest):
430         * xml/XMLHttpRequest.h:
431         Make Inspector loads allow cross-origins and hide their request
432         from the Inspector itself.
433
434 2014-03-07  Tim Horton  <timothy_horton@apple.com>
435
436         [WebKit2][iOS] PDF
437         https://bugs.webkit.org/show_bug.cgi?id=129600
438         <rdar://problem/15260216>
439
440         Reviewed by Anders Carlsson.
441
442         * WebCore.exp.in:
443         * platform/MIMETypeRegistry.cpp:
444         (WebCore::initializeSupportedImageMIMETypes):
445         (WebCore::initializePDFMIMETypes):
446         (WebCore::initializePostScriptMIMETypes):
447         (WebCore::initializeMIMETypeRegistry):
448         (WebCore::MIMETypeRegistry::getPDFMIMETypes):
449         * platform/MIMETypeRegistry.h:
450         Split PDF and PostScript MIME types, so WebKit2 can retrieve just the PDF ones
451         without PostScript included.
452
453 2014-03-07  Myles C. Maxfield  <mmaxfield@apple.com>
454
455         Comment in RenderStyle is no longer accurate
456         https://bugs.webkit.org/show_bug.cgi?id=129956
457
458         Reviewed by Simon Fraser.
459
460         RenderStyle::createStyleInheritingFromPseudoStyle was moved from RenderImage. Before it
461         was moved, there was an image-specific comment in the function. However, that comment
462         is both irrelevant to RenderStyle, and incorrect as the function is necessary for
463         RenderQuotes as well.
464
465         No new tests are necessary because there is no behavior change.
466
467         * rendering/style/RenderStyle.cpp:
468         (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
469
470 2014-03-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
471
472         [WebRTC] Throw SYNTAX_ERROR when maxRetransmits and maxRetransmitTime are both set in RTCDataChannelInit
473         https://bugs.webkit.org/show_bug.cgi?id=129894
474
475         Reviewed by Eric Carlson.
476
477         Existing test was updated.
478
479         * Modules/mediastream/RTCDataChannel.cpp:
480         (WebCore::RTCDataChannel::create):
481
482 2014-03-07  Benjamin Poulain  <bpoulain@apple.com>
483
484         Fix the regression introduced by r165288
485         https://bugs.webkit.org/show_bug.cgi?id=129934
486
487         Reviewed by Ryosuke Niwa.
488
489         * page/DOMWindow.cpp:
490         (WebCore::DOMWindow::scrollX):
491         (WebCore::DOMWindow::scrollY):
492         We need to return the new value after layout, not the value from the dirty tree.
493
494 2014-03-07  Benjamin Poulain  <benjamin@webkit.org>
495
496         Traversal failure in a direct adjacent chain with tail backtracking lacks the path to clear the tail
497         https://bugs.webkit.org/show_bug.cgi?id=129863
498
499         Reviewed by Gavin Barraclough.
500
501         Direct adjacent backtracking use the stack to push the backtracking entry point and recover from there.
502         In case of traversal failure, their is no point in recovering from the indirect adjancent entry point and
503         we should clear entry point from the stack (which is the purpose of the tail).
504
505         The adjancent tail was missing the part for clearing the stack in one case.
506
507         The case with adjancent backtracking inside descendant backtracing was doing everything right. This patch
508         generalize this code and the correct tail is fully generated by generateAdjacentBacktrackingTail().
509
510         JumpToClearAdjacentDescendantTail becomes JumpToClearAdjacentTail, and this new backtracking state is added
511         to the missing traversal action.
512
513         Test: fast/selectors/long-adjacent-backtracking.html
514
515         * cssjit/SelectorCompiler.cpp:
516         (WebCore::SelectorCompiler::solveBacktrackingAction):
517         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
518         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
519         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
520         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
521
522 2014-03-07  Andreas Kling  <akling@apple.com>
523
524         [Mac] Notify system malloc of fake memory pressure.
525         <https://webkit.org/b/129908>
526
527         After fixing the leak in r165252, I was surprised to find that it didn't
528         show up on memory test bots. It turns out that while the memory is now
529         getting freed, the system malloc implementation doesn't actually release
530         pages back to the OS until there is memory pressure.
531
532         Since we are just faking the memory pressure on bots, we have to let
533         system malloc in on the fun, so we can get representative numbers.
534         With this change, we should finally see the effect of not leaking the
535         URLRequest object tree.
536
537         Reviewed by Anders Carlsson.
538
539         * platform/mac/MemoryPressureHandlerMac.mm:
540         (WebCore::MemoryPressureHandler::install):
541
542             Tell system malloc that we are under fake memory pressure.
543
544 2014-03-07  Benjamin Poulain  <bpoulain@apple.com>
545
546         [iOS] WebKit1 scroll position is incorrect
547         https://bugs.webkit.org/show_bug.cgi?id=129905
548
549         Reviewed by Simon Fraser.
550
551         * page/DOMWindow.cpp:
552         (WebCore::DOMWindow::scrollX):
553         (WebCore::DOMWindow::scrollY):
554         A new optimization was avoiding layout if the position is zero. This was using the scrollX/Y instead
555         of actualScrollX/Y which caused us to always bail out instead of returning the value to JavaScript.
556
557         * platform/ScrollView.h:
558         (WebCore::ScrollView::actualScrollX):
559         (WebCore::ScrollView::actualScrollY):
560         (WebCore::ScrollView::actualScrollPosition):
561         This was accidentally changed to the iOS compat document visible rect at some point.
562
563 2014-03-07  Adenilson Cavalcanti  <cavalcantii@gmail.com>
564
565         Remove unused StdDeviation from Drop shadow effect
566         https://bugs.webkit.org/show_bug.cgi?id=129891
567
568         Reviewed by Dirk Schulze.
569
570         No new tests, no change on behavior.
571
572         * platform/graphics/filters/FEDropShadow.h:
573
574 2014-03-07  Brent Fulgham  <bfulgham@apple.com>
575
576         Correct out-of-band track selection logic.
577         https://bugs.webkit.org/show_bug.cgi?id=129900
578
579         Reviewed by Jer Noble.
580
581         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
582         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): Correct test to
583         use inequality.
584
585 2014-03-07  Bear Travis  <betravis@adobe.com>
586
587         [CSS Shapes] Correctly serialize ellipse positions
588         https://bugs.webkit.org/show_bug.cgi?id=129700
589
590         Reviewed by Dirk Schulze.
591
592         Updating ellipse serialization to be in line with
593         the CSS Shapes spec. Positions should serialize as
594         2 or 4-value positions, converting keywords to
595         percentages where possible. This uses the same method
596         as circle position serialization (bug 129404).
597
598         Updated existing parsing tests.
599
600         * css/CSSBasicShapes.cpp:
601         (WebCore::CSSBasicShapeEllipse::cssText): Use the
602         normalization / serialization helpers for shape position.
603
604 2014-03-07  Brian Burg  <bburg@apple.com>
605
606         Unreviewed, rebaseline run-binding-tests results after r165242.
607
608         * bindings/scripts/test/JS/JSTestObj.cpp:
609         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
610         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
611         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
612
613 2014-03-07  Darin Adler  <darin@apple.com>
614
615         Remove non-working optimization that was attempted on iOS only
616         https://bugs.webkit.org/show_bug.cgi?id=129595
617         <rdar://problem/15798825>
618
619         Reviewed by Sam Weinig.
620
621         Code in GCController tried to optimize cases where the controller
622         was used, but no JavaScript had been run in the current process.
623         The code was never effective, and was iOS-only. Another way to fix
624         the problem would be to change the code so it works, and if we do
625         that we should do it for all platforms, not just iOS.
626
627         * bindings/js/GCController.cpp:
628         (WebCore::GCController::garbageCollectNow): Remove check of
629         JSDOMWindow::commonVMExists, since it's called just after a call
630         to JSDOMWindow::commonVM, which will create it as a side effect.
631         (WebCore::GCController::releaseExecutableMemory): Ditto.
632
633         * bindings/js/JSDOMWindowBase.cpp:
634         (WebCore::JSDOMWindowBase::commonVM): Removed iOS-specific code
635         that pulled the commonVM global out into another function so we
636         can check for its existence without creating it as a side effect.
637
638         * bindings/js/JSDOMWindowBase.h: Ditto.
639
640 2014-03-07  Bem Jones-Bey  <bjonesbe@adobe.com>
641
642         [CSS Shapes] inset does not properly clamp large corner radii
643         https://bugs.webkit.org/show_bug.cgi?id=129726
644
645         Reviewed by Dirk Schulze.
646
647         Make sure that radii that are larger than 50% of the associated shape
648         dimension (height or width) are properly reduced the same way as
649         border-radius radii are.
650
651         Test: fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-large-radius.html
652
653         * rendering/shapes/Shape.cpp:
654         (WebCore::ensureRadiiDoNotOverlap): Drive by style fix.
655         (WebCore::Shape::createShape): Scale radii the same way as border
656             radii are scaled.
657         * platform/graphics/FloatRoundedRect.h:
658         (WebCore::calcBorderRadiiConstraintScaleFor): Move border radii
659             constraint calculation function out so that it can be shared by
660             the shape code.
661         * rendering/style/RenderStyle.cpp:
662         (WebCore::RenderStyle::getRoundedBorderFor): Call renamed scale function.
663
664 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
665
666         [GST] Set name to several timeout sources
667         https://bugs.webkit.org/show_bug.cgi?id=129878
668
669         Reviewed by Philippe Normand.
670
671         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
672         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
673         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
674         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
675         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
676         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
677         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
678         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
679
680 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
681
682         [GTK] Timeout sources not correctly removed
683         https://bugs.webkit.org/show_bug.cgi?id=129877
684
685         Reviewed by Philippe Normand.
686
687         Set source ID variables to 0 after removing the sources from the
688         context. Also give a name to the sources.
689
690         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
691         (WebCore::TrackPrivateBaseGStreamer::disconnect):
692         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
693         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
694         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
695
696 2014-03-07  Gergo Balogh  <gbalogh.u-szeged@partner.samsung.com>
697
698         Remove FFTFrameMKL.
699         https://bugs.webkit.org/show_bug.cgi?id=129866
700
701         Reviewed by Csaba Osztrogonác.
702
703         * platform/audio/FFTFrame.h:
704         * platform/audio/FFTFrameStub.cpp:
705         * platform/audio/mkl/FFTFrameMKL.cpp: Removed, it is never used.
706
707 2014-03-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
708
709         [WebRTC] Adding getConfiguration method to RTCPeerConnection
710         https://bugs.webkit.org/show_bug.cgi?id=129845
711
712         Reviewed by Eric Carlson.
713
714         Test: fast/mediastream/RTCPeerConnection-getConfiguration.html
715
716         * CMakeLists.txt:
717         * DerivedSources.make:
718         * GNUmakefile.list.am:
719         * Modules/mediastream/RTCConfiguration.idl: Added.
720         * Modules/mediastream/RTCIceServer.idl: Added.
721         * Modules/mediastream/RTCPeerConnection.cpp:
722         (WebCore::RTCPeerConnection::RTCPeerConnection):
723         (WebCore::RTCPeerConnection::updateIce):
724         (WebCore::RTCPeerConnection::getConfiguration):
725         * Modules/mediastream/RTCPeerConnection.h:
726         * Modules/mediastream/RTCPeerConnection.idl:
727
728 2014-03-07  Jinwoo Song  <jinwoo7.song@samsung.com>
729
730         Optimize collectionLast() and collectionTraverseBackward() in LiveNodeList
731         https://bugs.webkit.org/show_bug.cgi?id=129775
732
733         Reviewed by Ryosuke Niwa.
734
735         Check the LiveNodeList type if it is HTMLTagNodeListType and ClassNodeListType then
736         apply inlined matching methods for each type.
737
738         * dom/LiveNodeList.cpp:
739         (WebCore::lastMatchingElement): Added.
740         (WebCore::previousMatchingElement): Added.
741         (WebCore::traverseMatchingElementsBackward): Added.
742         (WebCore::LiveNodeList::collectionLast): Apply lastMatchingElement() with LiveNodeList type.
743         (WebCore::LiveNodeList::collectionTraverseBackward): Apply traverseMatchingElementsBackward()
744         with LiveNodeList type.
745
746 2014-03-06  Andreas Kling  <akling@apple.com>
747
748         WebCoreResourceHandleAsOperationQueueDelegate over-retains NSURLRequest.
749         <https://webkit.org/b/129862>
750
751         Don't retain the pointer before assigning it to a RetainPtr, since that
752         will cause the object to leak.
753
754         Reviewed by Alexey Proskuryakov.
755
756         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
757         (-[WebCoreResourceHandleAsOperationQueueDelegate continueWillSendRequest:]):
758
759 2014-03-06  Dan Bernstein  <mitz@apple.com>
760
761         Don’t copy WebInputs.json into the framework.
762
763         * WebCore.xcodeproj/project.pbxproj: Removed WebInputs.json from the Copy Bundle Resources
764         build phase of the WebCore target.
765
766 2014-03-06  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
767
768         [WebRTC] Updating RTCPeerConnection.idl
769         https://bugs.webkit.org/show_bug.cgi?id=129804
770
771         Reviewed by Eric Carlson.
772
773         Some methods signatures were wrong, marking some arguments as optional when they are mandatory.
774
775         Existing tests were updated.
776
777         * Modules/mediastream/RTCPeerConnection.cpp:
778         (WebCore::RTCPeerConnection::getStats):
779         * Modules/mediastream/RTCPeerConnection.h:
780         * Modules/mediastream/RTCPeerConnection.idl:
781         * Modules/mediastream/RTCStatsRequestImpl.cpp:
782         (WebCore::RTCStatsRequestImpl::create):
783         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
784         (WebCore::RTCStatsRequestImpl::requestFailed):
785         * Modules/mediastream/RTCStatsRequestImpl.h:
786         * platform/mediastream/RTCStatsRequest.h:
787
788 2014-03-06  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
789
790         [WebRTC] Updating RTCIceServer to match spec
791         https://bugs.webkit.org/show_bug.cgi?id=129844
792
793         Reviewed by Eric Carlson.
794
795         Move RTCIceServer from RTCConfiguration to its own file.
796
797         * Modules/mediastream/RTCPeerConnection.cpp:
798         (WebCore::validateIceServerURL):
799         (WebCore::processIceServer):
800         * platform/mediastream/RTCConfiguration.h:
801         (WebCore::RTCConfiguration::iceServers):
802         * platform/mediastream/RTCIceServer.h: Added.
803
804 2014-03-06  Hyowon Kim  <hw1008.kim@samsung.com>
805
806         [EFL] Move EvasGL classes from WebKit to WebCore namespace.
807         https://bugs.webkit.org/show_bug.cgi?id=129797
808
809         Reviewed by Gyuyoung Kim.
810
811         Though EvasGLContext and EvasGLSurface files were moved from WebKit2/UIProcess/API/efl/ 
812         to WebCore/platform/graphics/efl/, they are still in WebKit namespace.
813         Patch for namespace changes.
814
815         * platform/graphics/efl/EvasGLContext.cpp:
816         * platform/graphics/efl/EvasGLContext.h:
817         * platform/graphics/efl/EvasGLSurface.cpp:
818         * platform/graphics/efl/EvasGLSurface.h:
819
820 2014-03-06  Brian Burg  <bburg@apple.com>
821
822         CodeGeneratorJS.pm doesn't need to add spaces between consecutive closing template brackets
823         https://bugs.webkit.org/show_bug.cgi?id=129836
824
825         Reviewed by Andreas Kling.
826
827         * bindings/scripts/CodeGeneratorJS.pm:
828         (GenerateParametersCheck):
829         (GetNativeVectorInnerType):
830         (GetSVGPropertyTypes):
831
832 2014-03-06  Jinwoo Song  <jinwoo7.song@samsung.com>
833
834         Remove unused method from BatteryController
835         https://bugs.webkit.org/show_bug.cgi?id=129850
836
837         Reviewed by Gyuyoung Kim.
838
839         isActive() method is never called anywhere.
840
841         * Modules/battery/BatteryController.cpp:
842         * Modules/battery/BatteryController.h:
843
844 2014-03-06  Pratik Solanki  <psolanki@apple.com>
845
846         [iOS] Crash on launch with website restrictions enabled
847         https://bugs.webkit.org/show_bug.cgi?id=129854
848         <rdar://problem/16207016>
849
850         Reviewed by Simon Fraser.
851
852         * platform/mac/ContentFilterMac.mm:
853         (WebCore::ContentFilter::ContentFilter): Initialize m_neFilterSourceQueue so that we don't
854         crash in the dtor due to garbage value in the field.
855
856 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
857
858         Minor optimization in ScrollingTreeScrollingNodeMac
859         https://bugs.webkit.org/show_bug.cgi?id=129848
860
861         Reviewed by Dean Jackson.
862
863         No need to call scrollOffsetForFixedPosition() again if we don't have header
864         and footer layers.
865
866         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
867         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
868
869 2014-03-06  Mark Lam  <mark.lam@apple.com>
870
871         XMLHttpRequest: status and statusText throw DOM Exception 11 when the state is UNSENT or OPENED.
872         https://bugs.webkit.org/show_bug.cgi?id=45994
873
874         Not reviewed.
875
876         Re-landing r161051 (originally by Ryosuke Niwa, reviewed by Alexey Proskuryakov)
877         since https://bugs.webkit.org/show_bug.cgi?id=126219 is no longer an issue.
878
879         * xml/XMLHttpRequest.cpp:
880         (WebCore::XMLHttpRequest::status):
881         (WebCore::XMLHttpRequest::statusText):
882         * xml/XMLHttpRequest.h:
883         * xml/XMLHttpRequest.idl:
884
885 2014-03-06  Brent Fulgham  <bfulgham@apple.com>
886
887         Revise Out-of-band VTT support for better integration with AVFoundation engine
888         https://bugs.webkit.org/show_bug.cgi?id=129749
889         <rdar://problem/16215701>
890
891         Reviewed by Eric Carlson.
892
893         Revise the platform handling of out-of-band text tracks so that we can keep AVFoundation
894         informed of track selections we make. Use a dummy out-of-band child of the existing text
895         track classes to avoid code duplication.
896
897         * WebCore.xcodeproj/project.pbxproj: Add new OutOfBandTextTrackPrivateAVF.h file.
898         * html/HTMLMediaElement.cpp:
899         (WebCore::HTMLMediaElement::parseAttribute): Notify player when OOB tracks change.
900         (WebCore::HTMLMediaElement::outOfBandTrackSources): Also pass track mode to platform backend.
901         * html/track/TextTrack.cpp:
902         (WebCore::TextTrack::platformTextTrack): Also pass track mode to constructor.
903         * html/track/TrackBase.cpp:
904         (WebCore::TrackBase::TrackBase): Move ownership of track unique identifier to this base class.
905         * html/track/TrackBase.h:
906         (WebCore::TrackBase::uniqueId): Ditto.
907         * platform/graphics/MediaPlayer.cpp:
908         (WebCore::MediaPlayer::notifyTrackModeChanged): Added stub to pass message to platform player.
909         * platform/graphics/MediaPlayer.h:
910         * platform/graphics/MediaPlayerPrivate.h:
911         (WebCore::MediaPlayerPrivateInterface::notifyTrackModeChanged): Stub for most platforms.
912         * platform/graphics/PlatformTextTrack.h:
913         (WebCore::PlatformTextTrack::create): Update for revised constructor (with 'mode' argument).
914         (WebCore::PlatformTextTrack::createOutOfBand): Ditto.
915         (WebCore::PlatformTextTrack::mode): Added.
916         (WebCore::PlatformTextTrack::captionMenuOffItem): Use revised constructor arguments.
917         (WebCore::PlatformTextTrack::captionMenuAutomaticItem): Ditto.
918         (WebCore::PlatformTextTrack::PlatformTextTrack): Ditto.
919         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Change predicate to return enum indicating the category
920         of track (out-of-band, legacy closed caption, or in band).
921         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
922         (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Added.
923         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: Override predicate to return category enum.
924         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise to use new category enum.
925         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Override predicate to return category enum.
926         that this is NOT an out-of-band track.
927         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Ditto.
928         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
929         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
930         (WebCore::MediaPlayerPrivateAVFoundationObjC::notifyTrackModeChanged): Added implementation.
931         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Revise to handle out-of-band
932         track placeholders.
933         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Modify to inform AVFoundation about any
934         out-of-band tracks we've selected.
935         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): Added.
936         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: Added.
937         (WebCore::OutOfBandTextTrackPrivateAVF::create):
938         (WebCore::OutOfBandTextTrackPrivateAVF::processCue):
939         (WebCore::OutOfBandTextTrackPrivateAVF::resetCueValues):
940         (WebCore::OutOfBandTextTrackPrivateAVF::mediaSelectionOption):
941         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
942         (WebCore::OutOfBandTextTrackPrivateAVF::processCueAttributes):
943         * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Override predicate to indicate
944         that this is NOT an out-of-band track.
945         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
946         (WebCore::MediaPlayerPrivateIOS::setSelectedTextTrack): Correct typo in logging text.
947
948 2014-03-06  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
949
950         [WebRTC] Updating createOffer and createAnswer methods to match WebRTC editor's draft of 01/27/2014
951         https://bugs.webkit.org/show_bug.cgi?id=129484
952
953         Reviewed by Eric Carlson.
954
955         According to the spec, createOffer and createAnswer will no longer have MediaConstraints as an argument,
956         instead they will have RTCOfferOptions and RTCOfferAnswerOptions, respectively.
957
958         Existing tests were updated.
959
960         * CMakeLists.txt:
961         * GNUmakefile.list.am:
962         * Modules/mediastream/RTCOfferAnswerOptions.cpp: Added.
963         * Modules/mediastream/RTCOfferAnswerOptions.h: Added.
964         * Modules/mediastream/RTCPeerConnection.cpp:
965         (WebCore::RTCPeerConnection::createOffer):
966         (WebCore::RTCPeerConnection::createAnswer):
967         * Modules/mediastream/RTCPeerConnection.h:
968         * Modules/mediastream/RTCPeerConnection.idl:
969         * platform/mediastream/RTCPeerConnectionHandler.h:
970         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
971         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
972         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
973         * platform/mock/RTCPeerConnectionHandlerMock.h:
974
975 2014-03-06  Brian Burg  <bburg@apple.com>
976
977         Web Replay: premature release() of PassRefPtr in InspectorReplayAgent
978         https://bugs.webkit.org/show_bug.cgi?id=129827
979
980         Reviewed by Timothy Hatcher.
981
982         * inspector/InspectorReplayAgent.cpp:
983         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
984
985 2014-03-06  Benjamin Poulain  <bpoulain@apple.com>
986
987         [iOS] Do not compile fake mouse event handling when iOS Touch Events are enabled
988         https://bugs.webkit.org/show_bug.cgi?id=129725
989
990         Reviewed by Dan Bernstein.
991
992         Bug <rdar://problem/16218636>. The code is #ifdef'ed out to avoid setting up useless objects
993         and to avoid future mistake.
994
995         * page/EventHandler.cpp:
996         (WebCore::EventHandler::EventHandler):
997         (WebCore::EventHandler::~EventHandler):
998         (WebCore::EventHandler::clear):
999         (WebCore::EventHandler::handleMousePressEvent):
1000         (WebCore::EventHandler::startAutoHideCursorTimer):
1001         (WebCore::EventHandler::handleMouseMoveEvent):
1002         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
1003         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoonInQuad):
1004         * page/EventHandler.h:
1005
1006 2014-03-06  Pratik Solanki  <psolanki@apple.com>
1007
1008         Unreviewed. iOS build fix after r165199.
1009
1010         * rendering/RootInlineBox.cpp:
1011
1012 2014-03-06  Benjamin Poulain  <bpoulain@apple.com>
1013
1014         [iOS] Rename the actualVisibleXXXRect to unobscuredContentRect for consistency
1015         https://bugs.webkit.org/show_bug.cgi?id=129773
1016
1017         Reviewed by Simon Fraser.
1018
1019         * dom/TreeScope.cpp:
1020         (WebCore::nodeFromPoint):
1021         * platform/ScrollView.cpp:
1022         (WebCore::ScrollView::visibleContentRectInternal):
1023         * platform/ScrollView.h:
1024         * platform/ios/ScrollViewIOS.mm:
1025         (WebCore::ScrollView::unoscuredContentRect):
1026         * platform/ios/wak/WAKScrollView.h:
1027         * platform/ios/wak/WAKScrollView.mm:
1028         (-[WAKScrollView unoscuredContentRect]):
1029         (-[WAKScrollView description]):
1030         * rendering/RenderLayer.cpp:
1031         (WebCore::RenderLayer::scrollRectToVisible):
1032
1033 2014-03-05  Oliver Hunt  <oliver@apple.com>
1034
1035         Support caching of custom setters
1036         https://bugs.webkit.org/show_bug.cgi?id=129519
1037
1038         Reviewed by Filip Pizlo.
1039
1040         Add forwarding header
1041
1042         Tests: js/regress/assign-custom-setter-polymorphic.html
1043                js/regress/assign-custom-setter.html
1044
1045         * ForwardingHeaders/jit/SpillRegistersMode.h: Added.
1046
1047 2014-03-05  Jon Honeycutt  <jhoneycutt@apple.com>
1048
1049         Invalid cast in WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients()
1050
1051         <https://bugs.webkit.org/show_bug.cgi?id=121887>
1052         <rdar://problem/15073043>
1053
1054         Clang appears to be optimizing out a branch in RenderObject::node()
1055         when compiling RenderLayer::FilterInfo::updateReferenceFilterClients().
1056         We'll work around this by factoring out the code in question into a
1057         separate member function marked NEVER_INLINE.
1058
1059         No test possible due to <https://bugs.webkit.org/show_bug.cgi?id=129757>.
1060
1061         Reviewed by David Kilzer.
1062
1063         * rendering/RenderLayerFilterInfo.cpp:
1064         (WebCore::RenderLayer::FilterInfo::layerElement):
1065         Code moved from updateReferenceFilterClients(). Returns the Element*
1066         for m_layer.
1067         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
1068         Use layerElement().
1069
1070         * rendering/RenderLayerFilterInfo.h:
1071         Declared layerElement().
1072
1073 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1074
1075         Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
1076         https://bugs.webkit.org/show_bug.cgi?id=127944
1077
1078         Reviewed by Geoffrey Garen.
1079
1080         Covered by existing tests.
1081
1082         * CMakeLists.txt:
1083         * DerivedSources.cpp:
1084         * DerivedSources.make:
1085         * ForwardingHeaders/runtime/ConsoleClient.h: Added.
1086         * ForwardingHeaders/runtime/ConsoleTypes.h: Renamed from Source/WebCore/ForwardingHeaders/inspector/ConsoleTypes.h.
1087         * GNUmakefile.list.am:
1088         * PlatformGTK.cmake:
1089         * WebCore.exp.in:
1090         * WebCore.vcxproj/WebCore.vcxproj:
1091         * WebCore.vcxproj/WebCore.vcxproj.filters:
1092         * WebCore.xcodeproj/project.pbxproj:
1093         * bindings/gobject/GNUmakefile.am:
1094         Update build systems.
1095
1096         * page/Console.cpp: Removed.
1097         * page/Console.h: Removed.
1098         * page/Console.idl: Removed.
1099         * page/DOMWindow.cpp:
1100         (WebCore::DOMWindow::~DOMWindow):
1101         (WebCore::DOMWindow::resetDOMWindowProperties):
1102         * page/DOMWindow.h:
1103         (WebCore::DOMWindow::defaultStatus):
1104         * page/DOMWindow.idl:
1105         Removed the old IDL generated Console object on window.
1106
1107         * page/PageConsole.cpp:
1108         (WebCore::PageConsole::shouldPrintExceptions):
1109         (WebCore::PageConsole::setShouldPrintExceptions):
1110         (WebCore::PageConsole::mute):
1111         (WebCore::PageConsole::unmute):
1112         (WebCore::PageConsole::messageWithTypeAndLevel):
1113         (WebCore::PageConsole::count):
1114         (WebCore::PageConsole::profile):
1115         (WebCore::PageConsole::profileEnd):
1116         (WebCore::PageConsole::time):
1117         (WebCore::PageConsole::timeEnd):
1118         (WebCore::PageConsole::timeStamp):
1119         (WebCore::PageConsole::group):
1120         (WebCore::PageConsole::groupCollapsed):
1121         (WebCore::PageConsole::groupEnd):
1122         (WebCore::PageConsole::clearProfiles):
1123         * page/PageConsole.h:
1124         Move the handling of Console object into PageConsole.
1125
1126         * bindings/js/ScriptCachedFrameData.cpp:
1127         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1128         (WebCore::ScriptCachedFrameData::restore):
1129         * bindings/js/ScriptController.cpp:
1130         (WebCore::ScriptController::clearWindowShell):
1131         (WebCore::ScriptController::initScript):
1132         Set the PageConsole as the ConsoleClient of the JSGlobalObject
1133         so that WebCore may handle console messages directly. For instance
1134         it may pass messages on to the ChromeClient.
1135
1136         * testing/Internals.cpp:
1137         (WebCore::Internals::consoleProfiles):
1138         To access profiles, go through PageConsole now instead of Console.
1139
1140         * bindings/js/JSDOMWindowBase.cpp:
1141         * bindings/objc/WebScriptObject.mm:
1142         * css/MediaList.cpp:
1143         * dom/ScriptExecutionContext.h:
1144         * dom/UIEvent.cpp:
1145         * dom/ViewportArguments.cpp:
1146         * html/parser/XSSAuditorDelegate.cpp:
1147         * inspector/CommandLineAPIHost.h:
1148         * inspector/InspectorInstrumentation.cpp:
1149         * inspector/InspectorInstrumentation.h:
1150         * inspector/InspectorProfilerAgent.cpp:
1151         * inspector/WebConsoleAgent.cpp:
1152         * loader/FrameLoader.cpp:
1153         * loader/MixedContentChecker.cpp:
1154         * loader/appcache/ApplicationCacheGroup.cpp:
1155         * loader/cache/CachedResourceLoader.cpp:
1156         * page/ChromeClient.h:
1157         * page/ContentSecurityPolicy.cpp:
1158         * page/Page.cpp:
1159         * page/Page.h:
1160         * svg/SVGDocumentExtensions.cpp:
1161         * workers/WorkerMessagingProxy.cpp:
1162         * workers/WorkerReportingProxy.h:
1163         Update includes.
1164
1165 2014-03-06  Zsolt Borbely  <borbezs@inf.u-szeged.hu>
1166
1167         Fix the !ENABLE(CSS_STICKY_POSITION) build
1168         https://bugs.webkit.org/show_bug.cgi?id=129793
1169
1170         Reviewed by Simon Fraser.
1171
1172         Add missing ENABLE(CSS_STICKY_POSITION) guard to EditingStyle::convertPositionStyle().
1173
1174         * editing/EditingStyle.cpp:
1175         (WebCore::EditingStyle::convertPositionStyle):
1176
1177 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1178
1179         [Mac] Leak: dispatch_semaphore leak allocated in MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
1180         https://bugs.webkit.org/show_bug.cgi?id=129792
1181
1182         Reviewed by Anders Carlsson.
1183
1184         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1185         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
1186
1187 2014-03-06  Brendan Long  <b.long@cablelabs.com>
1188
1189         Implement VideoTrackList.selectedIndex
1190         https://bugs.webkit.org/show_bug.cgi?id=129770
1191
1192         Reviewed by Eric Carlson.
1193
1194         Tests: media/track/video/video-track-mkv-theora-selected.html
1195
1196         * html/track/VideoTrackList.idl:
1197
1198 2014-03-06  Lorenzo Tilve  <ltilve@igalia.com>
1199
1200         [GTK][CMake] Fix the GTK+ CMake build
1201         https://bugs.webkit.org/show_bug.cgi?id=129801
1202
1203         Reviewed by Martin Robinson.
1204
1205         Include missing files for CMake build
1206
1207         * CMakeLists.txt: Add a missing references to DOMURLMediaStream
1208
1209 2014-03-06  Zalan Bujtas  <zalan@apple.com>
1210
1211         Subpixel rendering: Setting content to opaque on m_graphicsLayer depends on subpixel accumulation.
1212         https://bugs.webkit.org/show_bug.cgi?id=129776
1213
1214         Reviewed by Simon Fraser.
1215
1216         isEmpty() returns true when any of the dimensions is <= 0. Subpixel accumulation could happen
1217         in one direction only. Use isZero() instead().
1218
1219         * rendering/RenderLayerBacking.cpp:
1220         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1221
1222 2014-03-06  Gurpreet Kaur  <k.gurpreet@samsung.com>
1223
1224         REGRESSION (r158254): Rubber-banding at Bing image search causes the toolbar to move up and away
1225         https://bugs.webkit.org/show_bug.cgi?id=128873
1226
1227         Reviewed by Antonio Gomes.
1228
1229         This regression is caused by  http://trac.webkit.org/changeset/154614 
1230         and http://trac.webkit.org/changeset/156605. So reverting the changes
1231         to make it Web compatible as earlier.
1232
1233         * dom/Element.cpp:
1234         (WebCore::Element::scrollLeft):
1235         (WebCore::Element::scrollTop):
1236         (WebCore::Element::setScrollLeft):
1237         (WebCore::Element::setScrollTop):
1238         Reverting changes as it caused regression.
1239
1240 2014-03-06  Zan Dobersek  <zdobersek@igalia.com>
1241
1242         Move Source/WebCore/html/canvas/ code to std::unique_ptr
1243         https://bugs.webkit.org/show_bug.cgi?id=129668
1244
1245         Reviewed by Anders Carlsson.
1246
1247         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/canvas/ to std::unique_ptr.
1248
1249         * html/HTMLCanvasElement.cpp:
1250         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1251         (WebCore::HTMLCanvasElement::getContext):
1252         * html/HTMLCanvasElement.h:
1253         * html/canvas/ANGLEInstancedArrays.cpp:
1254         * html/canvas/ANGLEInstancedArrays.h:
1255         * html/canvas/CanvasRenderingContext2D.h:
1256         * html/canvas/EXTTextureFilterAnisotropic.cpp:
1257         * html/canvas/EXTTextureFilterAnisotropic.h:
1258         * html/canvas/OESElementIndexUint.cpp:
1259         * html/canvas/OESElementIndexUint.h:
1260         * html/canvas/OESStandardDerivatives.cpp:
1261         * html/canvas/OESStandardDerivatives.h:
1262         * html/canvas/OESTextureFloat.cpp:
1263         * html/canvas/OESTextureFloat.h:
1264         * html/canvas/OESTextureFloatLinear.cpp:
1265         * html/canvas/OESTextureFloatLinear.h:
1266         * html/canvas/OESTextureHalfFloat.cpp:
1267         * html/canvas/OESTextureHalfFloat.h:
1268         * html/canvas/OESTextureHalfFloatLinear.cpp:
1269         * html/canvas/OESTextureHalfFloatLinear.h:
1270         * html/canvas/OESVertexArrayObject.cpp:
1271         * html/canvas/OESVertexArrayObject.h:
1272         * html/canvas/WebGLCompressedTextureATC.cpp:
1273         * html/canvas/WebGLCompressedTextureATC.h:
1274         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
1275         * html/canvas/WebGLCompressedTexturePVRTC.h:
1276         * html/canvas/WebGLCompressedTextureS3TC.cpp:
1277         * html/canvas/WebGLCompressedTextureS3TC.h:
1278         * html/canvas/WebGLDebugRendererInfo.cpp:
1279         * html/canvas/WebGLDebugRendererInfo.h:
1280         * html/canvas/WebGLDebugShaders.cpp:
1281         * html/canvas/WebGLDebugShaders.h:
1282         * html/canvas/WebGLDepthTexture.cpp:
1283         * html/canvas/WebGLDepthTexture.h:
1284         * html/canvas/WebGLDrawBuffers.cpp:
1285         * html/canvas/WebGLDrawBuffers.h:
1286         * html/canvas/WebGLLoseContext.cpp:
1287         * html/canvas/WebGLLoseContext.h:
1288         * html/canvas/WebGLRenderingContext.cpp:
1289         (WebCore::WebGLRenderingContext::create):
1290         (WebCore::WebGLRenderingContext::getExtension):
1291         * html/canvas/WebGLRenderingContext.h:
1292
1293 2014-03-06  Zan Dobersek  <zdobersek@igalia.com>
1294
1295         Move Source/WebCore/editing/ code to std::unique_ptr
1296         https://bugs.webkit.org/show_bug.cgi?id=129665
1297
1298         Reviewed by Anders Carlsson.
1299
1300         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/editing/ with std::unique_ptr.
1301
1302         * editing/EditingStyle.cpp:
1303         (WebCore::htmlElementEquivalents):
1304         (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
1305         (WebCore::htmlAttributeEquivalents):
1306         (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
1307         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
1308         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
1309         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
1310         * editing/Editor.cpp:
1311         (WebCore::Editor::Editor):
1312         (WebCore::Editor::clear):
1313         * editing/Editor.h:
1314         * page/Frame.cpp:
1315         (WebCore::Frame::Frame):
1316         * page/Frame.h:
1317
1318 2014-03-06  Zan Dobersek  <zdobersek@igalia.com>
1319
1320         Move to using std::unique_ptr for KeyboardEvent, ScriptExecutionContext::PendingException
1321         https://bugs.webkit.org/show_bug.cgi?id=129061
1322
1323         Reviewed by Eric Carlson.
1324
1325         Replace uses of OwnPtr and PassOwnPtr for KeyboardEvent and ScriptExecutionContext::PendingException
1326         classes with std::unique_ptr. ScriptExecutionContext::Task objects are still handled through OwnPtr,
1327         but this will be addressed later.
1328
1329         * dom/KeyboardEvent.cpp:
1330         (WebCore::KeyboardEvent::KeyboardEvent):
1331         * dom/KeyboardEvent.h:
1332         * dom/ScriptExecutionContext.cpp:
1333         (WebCore::ScriptExecutionContext::reportException):
1334         * dom/ScriptExecutionContext.h:
1335         * dom/ScriptRunner.h: Remove an unnecessary PassOwnPtr header inclusion.
1336
1337 2014-03-06  Commit Queue  <commit-queue@webkit.org>
1338
1339         Unreviewed, rolling out r165175.
1340         http://trac.webkit.org/changeset/165175
1341         https://bugs.webkit.org/show_bug.cgi?id=129788
1342
1343         Linking failures on GTK, EFL due to missing gstreamer-tag-1.0
1344         dependency (Requested by zdobersek on #webkit).
1345
1346         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1347         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1348
1349 2014-03-05  Brendan Long  <b.long@cablelabs.com>
1350
1351         [GStreamer] human readable language code for tracks
1352         https://bugs.webkit.org/show_bug.cgi?id=124514
1353
1354         Reviewed by Philippe Normand.
1355
1356         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1357         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.
1358
1359 2014-03-05  Ryuan Choi  <ryuan.choi@samsung.com>
1360
1361         Remove unused method from Vibration
1362         https://bugs.webkit.org/show_bug.cgi?id=129732
1363
1364         Reviewed by Gyuyoung Kim.
1365
1366         * Modules/vibration/Vibration.cpp:
1367         Removed isActive(), which is never called since r152441.
1368         * Modules/vibration/Vibration.h: Ditto.
1369
1370 2014-03-05  Commit Queue  <commit-queue@webkit.org>
1371
1372         Unreviewed, rolling out r165141, r165157, and r165158.
1373         http://trac.webkit.org/changeset/165141
1374         http://trac.webkit.org/changeset/165157
1375         http://trac.webkit.org/changeset/165158
1376         https://bugs.webkit.org/show_bug.cgi?id=129772
1377
1378         "broke ftl" (Requested by olliej_ on #webkit).
1379
1380         * ForwardingHeaders/jit/SpillRegistersMode.h: Removed.
1381
1382 2014-03-05  Martin Robinson  <mrobinson@igalia.com>
1383
1384         [GTK][CMake] The GObject DOM bindings should always be built
1385         https://bugs.webkit.org/show_bug.cgi?id=127963
1386
1387         Reviewed by Ryosuke Niwa.
1388
1389         * PlatformGTK.cmake: Make compilation of the WebKitGTK+ GObject DOM bindings
1390         unconditional, instead of conditional on the WebKit2 build.
1391
1392 2014-03-05  Jer Noble  <jer.noble@apple.com>
1393
1394         [MSE] Crash in SourceBuffer::sourceBufferPrivateDidReceiveSample() - received samples after SourceBuffer was removed.
1395         https://bugs.webkit.org/show_bug.cgi?id=129761
1396
1397         Reviewed by Eric Carlson.
1398
1399         Guard against the possibility that SourceBufferPrivates will continue to generate samples even after
1400         a parse error. Bail out early from sourceBufferPrivateDidReceiveInitializationSegment and
1401         sourceBufferPrivateDidReceiveSample if the SourceBuffer has been removed.
1402
1403         * Modules/mediasource/SourceBuffer.cpp:
1404         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1405         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1406
1407 2014-03-05  Enrica Casucci  <enrica@apple.com>
1408
1409         Build fix, take 2.
1410
1411         * platform/mac/HTMLConverter.mm:
1412
1413 2014-03-05  Enrica Casucci  <enrica@apple.com>
1414
1415         Build fix.
1416
1417         * platform/mac/HTMLConverter.mm:
1418
1419 2014-03-05  Enrica Casucci  <enrica@apple.com>
1420
1421         Crash when copying content that contains <sup>.
1422         https://bugs.webkit.org/show_bug.cgi?id=129765
1423         <rdar://problem/16139498>
1424         
1425         Reviewed by Benjamin Poulain.
1426
1427         Adding static definition of NSAttributeSuperscriptName.
1428
1429         * platform/mac/HTMLConverter.mm:
1430
1431 2014-03-05  Gavin Barraclough  <barraclough@apple.com>
1432
1433         https://bugs.webkit.org/show_bug.cgi?id=128625
1434         Add fast mapping from StringImpl to JSString
1435
1436         Unreviewed roll-out.
1437
1438         Reverting r164347, r165054, r165066 - not clear the performance tradeoff was right.
1439
1440         * bindings/js/DOMWrapperWorld.cpp:
1441         (WebCore::DOMWrapperWorld::clearWrappers):
1442         * bindings/js/DOMWrapperWorld.h:
1443         * bindings/js/JSDOMBinding.h:
1444         (WebCore::jsStringWithCache):
1445         * bindings/js/JSDOMWindowBase.cpp:
1446         (WebCore::JSDOMWindowBase::commonVM):
1447         * bindings/scripts/StaticString.pm:
1448         (GenerateStrings):
1449
1450 2014-03-05  Daniel Bates  <dabates@apple.com>
1451             And Alexey Proskuryakov  <ap@apple.com>
1452
1453         ASSERT(newestManifest) fails in WebCore::ApplicationCacheGroup::didFinishLoadingManifest()
1454         https://bugs.webkit.org/show_bug.cgi?id=129753
1455         <rdar://problem/12069835>
1456
1457         Reviewed by Alexey Proskuryakov.
1458
1459         Fixes an issue where an assertion failure would occur when visiting a web site whose on-disk
1460         app cache doesn't contain a manifest resource.
1461
1462         For some reason an app cache for a web site may be partially written to disk. In particular, the
1463         app cache may only contain a CacheGroups entry. That is, the manifest resource and origin records
1464         may not be persisted to disk. From looking over the code, we're unclear how such a situation can occur
1465         and hence have been unable to create such an app cache. We were able to reproduce this issue using
1466         an app cache database file that was provided by a person that was affected by this issue.
1467
1468         No test included because it's not straightforward to write a test for this change.
1469
1470         * loader/appcache/ApplicationCacheGroup.cpp:
1471         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Assert that m_cacheBeingUpdated->manifestResource()
1472         is non-null. Currently we only document this assumption in a code comment. Also separated a single assertion
1473         expression into two assertion expressions to make it straightforward to identify the failing sub-expression
1474         on failure.
1475         * loader/appcache/ApplicationCacheStorage.cpp:
1476         (WebCore::ApplicationCacheStorage::store): Modified to call ApplicationCacheStorage::deleteCacheGroupRecord()
1477         to remove a cache group and associated cache records (if applicable) before inserting a cache group entry.
1478         This replacement approach will ultimately repair incomplete app cache data for people affected by this bug.
1479         (WebCore::ApplicationCacheStorage::loadCache): Log an error and return nullptr if the cache we loaded doesn't
1480         have a manifest resource.
1481         (WebCore::ApplicationCacheStorage::deleteCacheGroupRecord): Added.
1482         (WebCore::ApplicationCacheStorage::deleteCacheGroup): Extracted deletion logic for cache group record into
1483         ApplicationCacheStorage::deleteCacheGroupRecord().
1484         * loader/appcache/ApplicationCacheStorage.h:
1485
1486 2014-03-05  Oliver Hunt  <oliver@apple.com>
1487
1488         Support caching of custom setters
1489         https://bugs.webkit.org/show_bug.cgi?id=129519
1490
1491         Reviewed by Filip Pizlo.
1492
1493         Add forwarding header
1494
1495         Tests: js/regress/assign-custom-setter-polymorphic.html
1496                js/regress/assign-custom-setter.html
1497
1498         * ForwardingHeaders/jit/SpillRegistersMode.h: Added.
1499
1500 2014-03-05  David Kilzer  <ddkilzer@apple.com>
1501
1502         Fix crash in CompositeEditCommand::cloneParagraphUnderNewElement()
1503         <http://webkit.org/b/129751>
1504         <rdar://problem/16237965>
1505
1506         Reviewed by Jon Honeycutt.
1507
1508         Merged from Blink (patch by Yuta Kitamura):
1509         https://src.chromium.org/viewvc/blink?revision=168160&view=revision
1510         http://crbug.com/345005
1511
1512             The root cause is CompositeEditCommand::moveParagraphWithClones() passing
1513             two positions |start| and |end| which do not follow the document order,
1514             i.e. in some situations |start| is located after |end| because of
1515             the difference in affinity.
1516
1517             This patch fixes this crash by normalizing |end| to |start| in such situations.
1518             It also adds an ASSERT that checks the relationship between |start| and |end|.
1519
1520         Test: editing/execCommand/format-block-crash.html
1521
1522         * editing/CompositeEditCommand.cpp:
1523         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
1524         (WebCore::CompositeEditCommand::moveParagraphWithClones):
1525         * editing/CompositeEditCommand.h:
1526
1527 2014-03-05  Radu Stavila  <stavila@adobe.com>
1528
1529         [CSS Regions] Scrollable regions
1530         https://bugs.webkit.org/show_bug.cgi?id=129301
1531
1532         Reviewed by David Hyatt.
1533
1534         Named flow fragments do not inherit the overflow property from the fragment container.
1535         When asked if the flow thread content should be clipped, the named flow fragments
1536         will respond using the overflow property of the named flow fragment container.
1537
1538         When painting the flow thread layer inside the region, the scrolled content offset of
1539         the region must be used to offset the flow thread's layer.
1540
1541         Tests: fast/regions/scrollable-last-region.html
1542                fast/regions/scrollable-single-region-bt.html
1543                fast/regions/scrollable-single-region-lr.html
1544                fast/regions/scrollable-single-region-relative-element.html
1545                fast/regions/scrollable-single-region-rl.html
1546                fast/regions/scrollable-single-region.html
1547
1548         * rendering/RenderLayer.cpp:
1549         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
1550         (WebCore::RenderLayer::calculateClipRects):
1551         * rendering/RenderNamedFlowFragment.cpp:
1552         (WebCore::RenderNamedFlowFragment::createStyle):
1553         (WebCore::RenderNamedFlowFragment::shouldClipFlowThreadContent):
1554         * rendering/RenderNamedFlowFragment.h:
1555         * rendering/RenderNamedFlowThread.cpp:
1556         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
1557         * rendering/RenderRegion.cpp:
1558         (WebCore::RenderRegion::shouldClipFlowThreadContent):
1559         * rendering/RenderRegion.h:
1560
1561 2014-03-05  Zalan Bujtas  <zalan@apple.com>
1562
1563         Subpixel rendering: Device pixel round accumulated subpixel value when the RenderLayer with transform paints its content.
1564         https://bugs.webkit.org/show_bug.cgi?id=129079
1565
1566         Reviewed by Simon Fraser.
1567
1568         Snap the content to the device pixel position (as opposed to integral position) before
1569         applying the transform. Recalculate the remaining subpixels that need offsetting at painting time.
1570
1571         Test: compositing/hidpi-absolute-subpixel-positioned-transformed-elements.html
1572
1573         * platform/graphics/LayoutPoint.h:
1574         (WebCore::roundedForPainting):
1575         * rendering/RenderLayer.cpp:
1576         (WebCore::RenderLayer::paintLayerByApplyingTransform):
1577
1578 2014-03-05  Eric Carlson  <eric.carlson@apple.com>
1579
1580         [iOS] Show external device name/type in placeholder
1581         https://bugs.webkit.org/show_bug.cgi?id=129723
1582
1583         Reviewed by Jer Noble.
1584
1585         Make the name and type of the external device available to the JS based controls.
1586         * Modules/mediacontrols/MediaControlsHost.cpp:
1587         (WebCore::MediaControlsHost::externalDeviceDisplayName):
1588         (WebCore::MediaControlsHost::externalDeviceType):
1589         * Modules/mediacontrols/MediaControlsHost.h:
1590         * Modules/mediacontrols/MediaControlsHost.idl:
1591
1592         * Modules/mediacontrols/mediaControlsiOS.js:
1593         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Display device type-specific infomation
1594             in the placeholder image.
1595
1596         * WebCore.exp.in: Export new WebKitSystemInterface functions.
1597
1598         * platform/graphics/MediaPlayer.cpp:
1599         (WebCore::MediaPlayer::wirelessPlaybackTargetName): Added.
1600         (WebCore::MediaPlayer::wirelessPlaybackTargetType): Ditto.
1601         * platform/graphics/MediaPlayer.h:
1602         * platform/graphics/MediaPlayerPrivate.h:
1603
1604         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1605         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1606         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType): Added.
1607         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName): Ditto.
1608
1609         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1610         * platform/mac/WebCoreSystemInterface.h:
1611         * platform/mac/WebCoreSystemInterface.mm:
1612
1613 2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
1614
1615         [iOS] Rename the various VisibleExtent variations to exposedContentRect
1616         https://bugs.webkit.org/show_bug.cgi?id=129728
1617
1618         Reviewed by Simon Fraser.
1619
1620         Rename DocumentVisibleExtent and VisibleExtentContentRect to ExposedContentRect in a desperate
1621         attempt to make things a tiny little bit less confusing.
1622
1623         The name is ExposedContentRect and not ExposedRect as that rect is exposed on ScrollView, while the
1624         rect is in document coordinates (which does not make any difference on WebKit1...).
1625
1626         * WebCore.exp.in:
1627         * platform/ScrollView.h:
1628         * platform/ios/ScrollViewIOS.mm:
1629         (WebCore::ScrollView::exposedContentRect):
1630         (WebCore::ScrollView::setExposedContentRect):
1631         * platform/ios/wak/WAKScrollView.h:
1632         * platform/ios/wak/WAKScrollView.mm:
1633         (-[WAKScrollView exposedContentRect]):
1634         * rendering/RenderLayerCompositor.cpp:
1635         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1636         (WebCore::RenderLayerCompositor::didChangeVisibleRect):
1637
1638 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
1639
1640         ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
1641         https://bugs.webkit.org/show_bug.cgi?id=129752
1642
1643         Reviewed by Enrica Casucci.
1644
1645         Add C functions for NSURL-related functionality required by WebKit2
1646
1647         * WebCore.exp.in:
1648         * platform/mac/WebCoreNSURLExtras.h:
1649         * platform/mac/WebCoreNSURLExtras.mm:
1650         (WebCore::URLByCanonicalizingURL):
1651         (WebCore::rangeOfURLScheme):
1652         (WebCore::looksLikeAbsoluteURL):
1653
1654 2014-03-05  Martin Hock  <mhock@apple.com>
1655
1656         Add support for sessions to MemoryCache.
1657         https://bugs.webkit.org/show_bug.cgi?id=127794
1658
1659         Reviewed by Sam Weinig.
1660
1661         * WebCore.exp.in:
1662         * editing/DeleteButtonController.cpp:
1663         (WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
1664         * html/DOMURL.cpp:
1665         (WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
1666         * inspector/InspectorPageAgent.cpp:
1667         (WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
1668         * inspector/InspectorResourceAgent.cpp:
1669         (WebCore::InspectorResourceAgent::replayXHR): Ditto.
1670         * loader/DocumentLoader.cpp:
1671         (WebCore::areAllLoadersPageCacheAcceptable): Ditto.
1672         * loader/FrameLoader.cpp:
1673         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
1674         * loader/ImageLoader.cpp:
1675         (WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
1676         * loader/archive/cf/LegacyWebArchive.cpp:
1677         (WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
1678         * loader/cache/CachedCSSStyleSheet.cpp:
1679         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
1680         * loader/cache/CachedCSSStyleSheet.h:
1681         * loader/cache/CachedFont.cpp: Ditto.
1682         (WebCore::CachedFont::CachedFont):
1683         * loader/cache/CachedFont.h:
1684         * loader/cache/CachedImage.cpp: Ditto.
1685         (WebCore::CachedImage::CachedImage):
1686         * loader/cache/CachedImage.h:
1687         * loader/cache/CachedRawResource.cpp: Ditto.
1688         (WebCore::CachedRawResource::CachedRawResource):
1689         * loader/cache/CachedRawResource.h:
1690         * loader/cache/CachedResource.cpp: Ditto.
1691         (WebCore::CachedResource::CachedResource):
1692         (WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
1693         * loader/cache/CachedResource.h:
1694         (WebCore::CachedResource::sessionID):
1695         * loader/cache/CachedResourceLoader.cpp:
1696         (WebCore::createResource): Constructors take sessionID.
1697         (WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
1698         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
1699         (WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
1700         (WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
1701         (WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
1702         * loader/cache/CachedResourceLoader.h:
1703         * loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
1704         (WebCore::CachedSVGDocument::CachedSVGDocument):
1705         * loader/cache/CachedSVGDocument.h:
1706         * loader/cache/CachedScript.cpp: Ditto.
1707         (WebCore::CachedScript::CachedScript):
1708         * loader/cache/CachedScript.h:
1709         * loader/cache/CachedTextTrack.cpp: Ditto.
1710         (WebCore::CachedTextTrack::CachedTextTrack):
1711         * loader/cache/CachedTextTrack.h:
1712         * loader/cache/CachedXSLStyleSheet.cpp: Ditto.
1713         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
1714         * loader/cache/CachedXSLStyleSheet.h:
1715         * loader/cache/MemoryCache.cpp:
1716         (WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
1717         (WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
1718         (WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
1719         (WebCore::MemoryCache::resourceForURL): Ditto.
1720         (WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
1721         (WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
1722         (WebCore::MemoryCache::addImageToCache): Use default sessionID.
1723         (WebCore::MemoryCache::removeImageFromCache): Ditto.
1724         (WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
1725         (WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
1726         (WebCore::MemoryCache::getOriginsWithCache): Ditto.
1727         (WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
1728         (WebCore::MemoryCache::removeRequestFromCache): Ditto.
1729         (WebCore::MemoryCache::removeRequestFromSessionCaches): Remove request from all CachedResourceMaps, with multithread support.
1730         (WebCore::MemoryCache::removeRequestFromCacheImpl): Add sessionID parameter.
1731         (WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Iterate through all CachedResourceMaps.
1732         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
1733         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Pass on request to removeRequestFromSessionCachesImpl.
1734         (WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
1735         (WebCore::MemoryCache::setDisabled): Ditto.
1736         * loader/cache/MemoryCache.h: Create another level for cache.
1737         * platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
1738         (WebCore::SessionID>::copy):
1739         * platform/CrossThreadCopier.h:
1740         * platform/network/cf/ResourceRequest.h:
1741         (WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
1742         * rendering/RenderSnapshottedPlugIn.cpp:
1743         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
1744         * testing/Internals.cpp:
1745         (WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.
1746
1747 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
1748
1749         [GTK][CMake] Generate documentation for the DOM bindings
1750         https://bugs.webkit.org/show_bug.cgi?id=126211
1751
1752         Reviewed by Carlos Garcia Campos.
1753
1754         * PlatformGTK.cmake: Add some files to the GObjectDOMBindings build, so that the
1755         doc generation succeeds. Have the GObjectDOMBindings_INSTALLED_HEADERS variable contain
1756         all installed headers and use another variable for GIR generation. Create the configuration
1757         file for the gtkdoc generation.
1758
1759 2014-03-05  Zalan Bujtas  <zalan@apple.com>
1760
1761         Subpixel rendering: Wrong cliprect on absolute positioned elements.
1762         https://bugs.webkit.org/show_bug.cgi?id=129656
1763
1764         Reviewed by Simon Fraser.
1765
1766         outlineBoundsForRepaint() is expected to return the outline repaint rect. Using enclosingIntRect()
1767         to calculate the outline boundaries breaks repaint logic in RenderElement::repaintAfterLayoutIfNeeded().
1768         Since enclosingIntRect() can return bigger rect than repaint rect, the old/new bounds' dimensions could end up
1769         being different which triggers the size change repaint code path.
1770
1771         Test: fast/repaint/hidpi-absolute-positioned-element-wrong-cliprect-after-move.html
1772
1773         * rendering/RenderBox.cpp:
1774         (WebCore::RenderBox::outlineBoundsForRepaint):
1775         * rendering/RenderElement.cpp:
1776         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
1777         * rendering/svg/RenderSVGModelObject.cpp:
1778         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
1779
1780 2014-03-05  Krzysztof Czech  <k.czech@samsung.com>
1781
1782         [ATK] Expose missing functionalities of AtkTableCell to AT.
1783         https://bugs.webkit.org/show_bug.cgi?id=129492
1784
1785         Reviewed by Mario Sanchez Prada.
1786
1787         Implemented missing API of AtkTableCell.
1788
1789         No new tests. Covered by existing ones.
1790
1791         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
1792         (webkitAccessibleTableCellGetColumnSpan):
1793         (webkitAccessibleTableCellGetRowSpan):
1794         (webkitAccessibleTableCellGetPosition):
1795         (webkitAccessibleTableCellGetTable):
1796         (webkitAccessibleTableCellInterfaceInit):
1797
1798 2014-03-05  Andres Gomez  <agomez@igalia.com>
1799
1800         [GStreamer] WebSource doesn't need the "iradio-mode" property
1801         https://bugs.webkit.org/show_bug.cgi?id=129685
1802
1803         Reviewed by Philippe Normand.
1804
1805         Removed the "iradio-mode" property from the WK source element
1806         since this was only available for its modification from
1807         playbin/uridecodebin and, as discussed in GStreamer bug #725383,
1808         it was not being set and now is going to be removed.
1809
1810         It is safe just to send always the "icy-metadata" header set and
1811         deal with returning "icy" headers as we were already doing.
1812
1813         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1814         (webKitWebSrcSetProperty):
1815         (webKitWebSrcGetProperty):
1816         (webKitWebSrcStart):
1817
1818 2014-03-05  Chang Shu  <cshu@webkit.org>
1819
1820         Copying wrapping text results in multiple spaces between wrapped lines stripped.
1821         https://bugs.webkit.org/show_bug.cgi?id=129609.
1822
1823         Reviewed by Ryosuke Niwa.
1824
1825         While checking the condition of restoring the missing space, the collapsed spaces
1826         may not be exactly one.
1827
1828         editing/pasteboard/copy-text-with-wrapped-tag.html is enhanced to test this case.
1829
1830         * editing/TextIterator.cpp:
1831         (WebCore::TextIterator::handleTextBox):
1832
1833 2014-03-05  Ryosuke Niwa  <rniwa@webkit.org>
1834
1835         appendChild shouldn't invalidate LiveNodeLists and HTMLCollections if they don't have valid caches
1836         https://bugs.webkit.org/show_bug.cgi?id=129727
1837
1838         Reviewed by Andreas Kling.
1839
1840         Before this patch, invalidateNodeListAndCollectionCachesInAncestors invalidated node lists and HTML
1841         collections on ancestors of a node whenever we're inserting or removing a child node. This patch
1842         makes HTMLCollections and LiveNodeLists register themselves with Document only when they have valid
1843         caches.
1844
1845         Each user of CollectionIndexCache now implements willValidateIndexCache member function that gets
1846         called when CollectionIndexCache caches any state and necessitates the registration with document.
1847
1848         * dom/ChildNodeList.h: Added an empty willValidateIndexCache since child node lists are never
1849         registered with document.
1850
1851         * dom/CollectionIndexCache.h:
1852         (WebCore::CollectionIndexCache::hasValidCache): Added.
1853         (WebCore::CollectionIndexCache::nodeCount): Calls willValidateIndexCache when caching node count.
1854         (WebCore::CollectionIndexCache::nodeAfterCached): Ditto. Also assert that hasValidCache() true in
1855         the cases where we're simply updating our caches or adding more caches.
1856         (WebCore::CollectionIndexCache::nodeAt): Ditto. Also added a code to set the length cache when
1857         we've reached the end of the list. This should be a slight speed up on some cases.
1858
1859         * dom/Document.cpp:
1860         (WebCore::Document::Document): Initializes a variable used by assertions.
1861         (WebCore::Document::unregisterNodeList): Added an early exit for when m_listsInvalidatedAtDocument
1862         is empty since invalidateNodeListAndCollectionCaches swaps out the list.
1863         (WebCore::Document::registerCollection): Removed the boolean hasIdNameMap since we now explicitly
1864         call collectionCachedIdNameMap in HTMLCollection.
1865         (WebCore::Document::unregisterCollection): Ditto. Exit early if m_collectionsInvalidatedAtDocument
1866         is empty since invalidateNodeListAndCollectionCaches swaps out the list.
1867         * dom/Document.h:
1868
1869         * dom/LiveNodeList.cpp:
1870         (WebCore::LiveNodeList::invalidateCache): Unregister the node list with document if we had caches.
1871         * dom/LiveNodeList.h:
1872         (WebCore::LiveNodeList::LiveNodeList):
1873         (WebCore::LiveNodeList::~LiveNodeList): Ditto.
1874         (WebCore::LiveNodeList::invalidateCache): Pass around document. This is necessary since document()
1875         had already moved to the new document inside NodeListsNodeData::invalidateCaches.
1876         (WebCore::LiveNodeList::willValidateIndexCache): Added. Registers itself with document.
1877
1878         * dom/Node.cpp:
1879         (WebCore::Document::invalidateNodeListAndCollectionCaches): Swap the lists since invalidateCache
1880         tries to unregister node lists and HTML collections with document. Since this is the only case in
1881         which node lists and HTML collections being removed may not be in the lists in unregisterNodeList
1882         and unregisterCollection, assert this condition via m_inInvalidateNodeListAndCollectionCaches.
1883         (WebCore::NodeListsNodeData::invalidateCaches):
1884
1885         * dom/NodeRareData.h:
1886         (WebCore::NodeListsNodeData::adoptDocument): Unregister node lists and HTML collections from old
1887         document via invalidateCache. We need to explicitly pass in oldDocument here since owner node's
1888         document had already been changed to newDocument at this point. Since we're invalidating caches,
1889         there is no need to register node lists and HTML collections with newDocument.
1890
1891         * html/HTMLCollection.cpp:
1892         (WebCore::HTMLCollection::HTMLCollection):
1893         (WebCore::HTMLCollection::~HTMLCollection): Unregister the node list with document if we had caches.
1894         (WebCore::HTMLCollection::invalidateCache): Ditto.
1895         (WebCore::HTMLCollection::invalidateNamedElementCache):
1896         * html/HTMLCollection.h:
1897         (WebCore::HTMLCollection::invalidateCache): Pass around document as done in LiveNodeList.
1898         (WebCore::HTMLCollection::willValidateIndexCache): Ditto.
1899
1900         * html/HTMLFormControlsCollection.cpp:
1901         (WebCore::HTMLFormControlsCollection::invalidateCache): Ditto.
1902         * html/HTMLFormControlsCollection.h:
1903
1904         * html/HTMLSelectElement.cpp:
1905         (WebCore::HTMLSelectElement::invalidateSelectedItems): Ditto.
1906         (WebCore::HTMLSelectElement::setRecalcListItems): Ditto.
1907
1908 2014-03-05  Jon Lee  <jonlee@apple.com>
1909
1910         Fix linker error after r165087
1911         https://bugs.webkit.org/show_bug.cgi?id=129730
1912
1913         Reviewed by Csaba Osztrogonác.
1914
1915         * WebCore.exp.in: Remove undefined symbol __ZN7WebCore32WebVideoFullscreenChangeObserverD2Ev.
1916
1917 2014-03-04  Zalan Bujtas  <zalan@apple.com>
1918
1919         Enable device pixel repaint rect tracking.
1920         https://bugs.webkit.org/show_bug.cgi?id=129712
1921
1922         Reviewed by Simon Fraser.
1923
1924         Tracked repaint rects are device pixel snapped now to support hiDPI test cases.
1925
1926         Test: fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking.html
1927
1928         * WebCore.exp.in:
1929         * page/FrameView.cpp:
1930         (WebCore::FrameView::addTrackedRepaintRect):
1931         (WebCore::FrameView::trackedRepaintRectsAsText): Print them as LayoutUnits to get
1932         trailing zeros cut off.
1933         * page/FrameView.h:
1934         * rendering/RenderLayer.cpp:
1935         (WebCore::RenderLayer::calculateClipRects):
1936         * rendering/RenderLayer.h:
1937         * rendering/RenderLayerBacking.cpp:
1938         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
1939         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1940         * rendering/RenderView.cpp:
1941         (WebCore::RenderView::repaintViewRectangle):
1942
1943 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
1944
1945         Don't clamp scrolling node offsets when the offset is changed by delegated scrolling
1946         https://bugs.webkit.org/show_bug.cgi?id=129724
1947
1948         Reviewed by Sam Weinig.
1949         
1950         Call setScrollPositionWithoutContentEdgeConstraints() from
1951         ScrollingTree::scrollPositionChangedViaDelegatedScrolling() so that
1952         layers are not clamped during rubber-banding.
1953         
1954         This requires making setScrollPositionWithoutContentEdgeConstraints()
1955         a pure virtual function on the base class.
1956
1957         * page/scrolling/ScrollingTree.cpp:
1958         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
1959         * page/scrolling/ScrollingTreeScrollingNode.h:
1960         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
1961         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1962
1963 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
1964
1965         WebVideoFullscreen, should make the hand off of the video layer explicit.
1966         https://bugs.webkit.org/show_bug.cgi?id=128844
1967
1968         Reviewed by Simon Fraser.
1969
1970         This change introduces a more explicit hand-off of the video layer.
1971         This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
1972         WebVideoFullscreenModel <-> WebVideoFullscreenInterface
1973               enterFullScreen(*) ->
1974                                 <- borrowVideoLayer
1975               willLendVideoLayer ->
1976                didLendVideoLayer ->
1977                                 <- didEnterFullscreen
1978                                 ...
1979                                 <- requestExitFullscreen
1980                   exitFullscreen ->
1981                                 <- returnVideoLayer
1982                                 <- didExitFullscreen
1983         (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
1984
1985         * WebCore.exp.in:
1986         Export new functions in WebVideoFullscreenInterfaceAVKit, WebVideoFullscreenModelMediaElement, etc.
1987
1988         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1989         Add WebVideoFullscreenControllerChangeObserver to forward fullscreen callbacks to WebVideoFullscreenController
1990
1991         (WebVideoFullscreenControllerChangeObserver::setTarget):
1992         Sets obj-c target of fullscreen change callbacks.
1993
1994         (-[WebVideoFullscreenController init]):
1995         Point _changeObserver's target at self.
1996
1997         (-[WebVideoFullscreenController dealloc]):
1998         Clear _changeObserver's target.
1999
2000         (-[WebVideoFullscreenController enterFullscreen:]):
2001         Retain self to prevent dealloc during animation or while fullscreen.
2002         Connect _interface to _changeObserver.
2003
2004         (-[WebVideoFullscreenController exitFullscreen]):
2005         Remove use of completion move cleanup to -didExitFullscreen.
2006
2007         (-[WebVideoFullscreenController didEnterFullscreen]):
2008         Nothing to see here.
2009
2010         (-[WebVideoFullscreenController didExitFullscreen]):
2011         Move clean up code that was in a completion to here.
2012
2013         * platform/ios/WebVideoFullscreenInterface.h:
2014         Add delarations for more explicit hand-off of video layer.
2015
2016         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2017         Add WebVideoFullscreenChangeObserver to notify when fullscreen animations complete.
2018         Add declarations for more explicit hand-off of video layer.
2019         Add WebAVPlayerLayer now always wraps the m_videoLayer to prevent default behavior
2020         of AVPlayerLayer.
2021
2022         (WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
2023         Add empty virtual destructor.
2024
2025         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2026         Include AVKit headers instead of declaring everything locally.
2027         AVPlayerLayer protocol renamed to AVVideoLayer per AVKit.
2028
2029         (-[WebAVPlayerController dealloc]):
2030         Don't refer to self.
2031
2032         (-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
2033         Pause before requesting exit fullscreen.
2034
2035         (-[WebAVPlayerLayer setPlayerController:]):
2036         This is required by AVVideoLayer, but we don't need it.
2037
2038         (WebVideoFullscreenInterfaceAVKit::playerController):
2039         White space.
2040
2041         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenChangeObserver):
2042         Set observer to forward fullscreen changes to.
2043
2044         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
2045         Use more explicit video layer hand-off.
2046
2047         (WebVideoFullscreenInterfaceAVKit::doEnterFullscreen):
2048         Move enterFullscreen logic here.
2049         AVPlayerViewController now takes the video layer at init time.
2050         Always provide a video layer wrapped in a WebAVPlayerLayer.
2051
2052         (WebVideoFullscreenInterfaceAVKit::willLendVideoLayer):
2053         Use more explicit video layer hand-off.
2054
2055         (WebVideoFullscreenInterfaceAVKit::didLendVideoLayer):
2056         Use more explicit video layer hand-off.
2057
2058         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2059         Use more explicit video layer hand-off.
2060
2061         * platform/ios/WebVideoFullscreenModel.h:
2062         Add functions for more explicit video layer hand-off.
2063
2064         * platform/ios/WebVideoFullscreenModelMediaElement.h:
2065         Mark virtual functions as virtual.
2066         Add changes for WebVideoFullscreenModel.
2067
2068         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2069         Use more explicit video layer hand-off.
2070
2071         (WebVideoFullscreenModelMediaElement::setMediaElement):
2072         Don't push the video layer. Wait for a request for it.
2073
2074         (WebVideoFullscreenModelMediaElement::handleEvent):
2075         Make sure m_videoFullscreenInterface is valid.
2076
2077         (WebVideoFullscreenModelMediaElement::borrowVideoLayer):
2078         Use more explicit video layer hand-off.
2079         Lend videoLayer in request to a request to borrow the videoLayer.
2080         Make sure to retain the video layer before it is removed from the layer tree.
2081
2082         (WebVideoFullscreenModelMediaElement::returnVideoLayer):
2083         Use more explicit video layer hand-off.
2084
2085         (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
2086         Don't clear the mediaElement reference until completely exited from fullscreen.
2087
2088 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2089
2090         Get position:fixed working slightly better on iOS
2091         https://bugs.webkit.org/show_bug.cgi?id=129714
2092
2093         Reviewed by Benjamin Poulain.
2094
2095         Send the scroll position as a FloatPoint, rather than an IntPoint.
2096
2097         * WebCore.exp.in:
2098         * page/scrolling/ScrollingTree.cpp:
2099         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
2100         * page/scrolling/ScrollingTree.h:
2101
2102 2014-03-04  Alex Christensen  <achristensen@webkit.org>
2103
2104         Fixed Windows build without MEDIA_CONTROLS_SCRIPT enabled.
2105         https://bugs.webkit.org/show_bug.cgi?id=129701
2106
2107         Reviewed by Jer Noble.
2108
2109         * WebCore.vcxproj/WebCore.vcxproj:
2110         * DerivedSources.cpp:
2111         Moved UserAgentScriptsData.cpp to DerivedSources.cpp to only be built if MEDIA_CONTROLS_SCRIPT is enabled.
2112         * DerivedSources.make:
2113         Only generate UserAgentScripts.cpp/h when USER_AGENT_SCRIPTS is non-empty.
2114         * rendering/RenderThemeWin.cpp:
2115         Only include UserAgentScripts.h when MEDIA_CONTROLS_SCRIPT is enabled.
2116
2117 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2118
2119         Allow iOS DumpRenderTree crashes to show application-specific information
2120         https://bugs.webkit.org/show_bug.cgi?id=129705
2121
2122         Reviewed by David Kilzer.
2123
2124         Make the WKSI function SetCrashReportApplicationSpecificInformation available
2125         in iOS simulator builds.
2126
2127         * WebCore.exp.in:
2128         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2129         * platform/mac/WebCoreSystemInterface.h:
2130
2131 2014-03-04  Andreas Kling  <akling@apple.com>
2132
2133         Spam static branch prediction hints on JS bindings.
2134         <https://webkit.org/b/129703>
2135
2136         Add UNLIKELY hints to all !castedThis and exec->hadException() paths
2137         in the JS bindings since they are almost always going to get skipped.
2138
2139         Reviewed by Geoff Garen.
2140
2141         * bindings/scripts/CodeGeneratorJS.pm:
2142         (GenerateImplementation):
2143         (GenerateParametersCheck):
2144         (GenerateImplementationFunctionCall):
2145         (GenerateConstructorDefinition):
2146
2147 2014-03-04  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2148
2149         Remove unused StdDeviation from Gaussian Blur effect
2150         https://bugs.webkit.org/show_bug.cgi?id=129693
2151
2152         Reviewed by Simon Fraser.
2153
2154         No new tests, no change on behavior.
2155
2156         * platform/graphics/filters/FEGaussianBlur.cpp:
2157         * platform/graphics/filters/FEGaussianBlur.h:
2158
2159 2014-03-04  Andreas Kling  <akling@apple.com>
2160
2161         Add a Document::updateStyleIfNeededForNode(Node&).
2162         <https://webkit.org/b/129689>
2163
2164         Generalize the mechanism that computed style uses to avoid doing full
2165         style updates when the node we're interested in isn't actually dirty.
2166
2167         Reviewed by Antti Koivisto.
2168
2169         * css/CSSComputedStyleDeclaration.cpp:
2170         (WebCore::ComputedStyleExtractor::propertyValue):
2171         * dom/Document.cpp:
2172         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
2173         (WebCore::Document::updateStyleIfNeededForNode):
2174         * dom/Document.h:
2175         * editing/htmlediting.cpp:
2176         (WebCore::isEditablePosition):
2177         * html/HTMLInputElement.cpp:
2178         (WebCore::HTMLInputElement::defaultEventHandler):
2179
2180 2014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
2181
2182         Merge API shims and JSLock
2183         https://bugs.webkit.org/show_bug.cgi?id=129650
2184
2185         Reviewed by Mark Lam.
2186
2187         No new tests.
2188
2189         JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
2190         to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
2191
2192         * bindings/js/DOMRequestState.h:
2193         (WebCore::DOMRequestState::Scope::Scope):
2194         * bindings/js/JSDOMPromise.h:
2195         (WebCore::DeferredWrapper::resolve):
2196         (WebCore::DeferredWrapper::reject):
2197         (WebCore::DeferredWrapper::resolve<String>):
2198         (WebCore::DeferredWrapper::resolve<bool>):
2199         (WebCore::char>>):
2200         (WebCore::DeferredWrapper::reject<String>):
2201         * bindings/js/ScriptController.cpp:
2202         (WebCore::ScriptController::evaluateInWorld):
2203         * bindings/js/SerializedScriptValue.cpp:
2204         (WebCore::SerializedScriptValue::create):
2205         (WebCore::SerializedScriptValue::deserialize):
2206
2207 2014-03-04  Beth Dakin  <bdakin@apple.com>
2208
2209         REGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
2210         https://bugs.webkit.org/show_bug.cgi?id=129691
2211         -and corresponding-
2212         <rdar://problem/15666846>
2213
2214         Reviewed by Simon Fraser.
2215
2216         This regression started happening after we adopted the setPresentationValue 
2217         ScrollbarPainter API which allows us to update the position of the scrollbar knob 
2218         from our secondary scrolling thread. The bug occurs when the scrollbar grows while 
2219         it still thinks it is in presentation-value mode. Whenever the scrollbar grows, it 
2220         should be in non-presentation value mode.
2221
2222         If the wheel event has ended or been cancelled, we can switch out of presentation 
2223         value mode.
2224         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2225         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
2226
2227         Sometimes we will grow the scrollbar before we have received a wheel event with 
2228         the end or cancelled phase, and so automatically switch out of presentation-value 
2229         mode whenever we start one of these animations.
2230         * platform/mac/ScrollAnimatorMac.mm:
2231         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2232
2233 2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
2234
2235         Move Source/WebCore/html/track/ code to std::unique_ptr
2236         https://bugs.webkit.org/show_bug.cgi?id=129666
2237
2238         Reviewed by Eric Carlson.
2239
2240         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/track/ with std::unique_ptr.
2241
2242         * html/track/AudioTrack.h:
2243         * html/track/InbandWebVTTTextTrack.cpp:
2244         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):
2245         * html/track/InbandWebVTTTextTrack.h:
2246         * html/track/LoadableTextTrack.cpp:
2247         (WebCore::LoadableTextTrack::loadTimerFired):
2248         (WebCore::LoadableTextTrack::newCuesAvailable):
2249         (WebCore::LoadableTextTrack::cueLoadingCompleted):
2250         (WebCore::LoadableTextTrack::newRegionsAvailable):
2251         * html/track/LoadableTextTrack.h:
2252         * html/track/TextTrack.h:
2253         * html/track/TextTrackCue.h:
2254         * html/track/TextTrackRegion.h:
2255         * html/track/VTTCue.cpp:
2256         (WebCore::VTTCue::createWebVTTNodeTree):
2257         (WebCore::VTTCue::markFutureAndPastNodes):
2258         * html/track/VTTCue.h:
2259         * html/track/VideoTrack.h:
2260         * html/track/WebVTTParser.cpp:
2261         (WebCore::WebVTTParser::WebVTTParser):
2262         * html/track/WebVTTParser.h:
2263         * html/track/WebVTTTokenizer.h:
2264         * loader/TextTrackLoader.cpp:
2265         (WebCore::TextTrackLoader::processNewCueData):
2266         * loader/TextTrackLoader.h:
2267
2268 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2269
2270         Subpixel rendering: Make border-radius painting device pixel aware.
2271         https://bugs.webkit.org/show_bug.cgi?id=129558
2272
2273         Reviewed by Simon Fraser.
2274
2275         Snap rounded rects to device pixels right before passing them to GraphicsContext.
2276
2277         * rendering/RenderBoxModelObject.cpp:
2278         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
2279         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2280         (WebCore::RenderBoxModelObject::paintBorder):
2281         * rendering/RenderBoxModelObject.h:
2282         * rendering/RenderReplaced.cpp:
2283         (WebCore::RenderReplaced::paint):
2284         * rendering/RenderWidget.cpp:
2285         (WebCore::RenderWidget::paint):
2286
2287 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2288
2289         Crashes and assertions running iOS compositing tests
2290         https://bugs.webkit.org/show_bug.cgi?id=129688
2291
2292         Reviewed by Dean Jackson.
2293         
2294         When a layer is no longer composited, we need to unregister it
2295         from the scrolling coordinator, and remove it from m_scrollCoordinatedLayers.
2296
2297         Tested by compositing tests on iOS.
2298
2299         * rendering/RenderLayerCompositor.cpp:
2300         (WebCore::RenderLayerCompositor::updateBacking):
2301
2302 2014-03-04  Antti Koivisto  <antti@apple.com>
2303
2304         Update bindings test results after r165046.
2305
2306         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2307         (webkit_dom_test_obj_set_property):
2308         (webkit_dom_test_obj_set_reflected_string_attr):
2309         (webkit_dom_test_obj_set_reflected_url_attr):
2310         (webkit_dom_test_obj_set_reflected_custom_url_attr):
2311         * bindings/scripts/test/JS/JSTestObj.cpp:
2312         (WebCore::setJSTestObjReflectedStringAttr):
2313         (WebCore::setJSTestObjReflectedURLAttr):
2314         (WebCore::setJSTestObjReflectedCustomURLAttr):
2315         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2316         (-[DOMTestObj setReflectedStringAttr:]):
2317         (-[DOMTestObj setReflectedURLAttr:]):
2318         (-[DOMTestObj setReflectedCustomURLAttr:]):
2319
2320 2014-03-04  Martin Robinson  <mrobinson@igalia.com>
2321
2322         [GTK] Simplify the GObject DOM bindings API break check into one step
2323         https://bugs.webkit.org/show_bug.cgi?id=129571
2324
2325         Reviewed by Carlos Garcia Campos.
2326
2327         * bindings/gobject/GNUmakefile.am: We no longer generate the webkitdom.symbols file in the
2328         DerivedSources directory. All the logic is handled internally in the script now.
2329         * bindings/scripts/gobject-run-api-break-test: Removed.
2330
2331 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2332
2333         Build fix for iOS.
2334
2335         * rendering/RenderThemeIOS.mm:
2336         (WebCore::RenderThemeIOS::addRoundedBorderClip):
2337         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
2338
2339 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2340
2341         Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
2342         https://bugs.webkit.org/show_bug.cgi?id=129557
2343
2344         Reviewed by Simon Fraser.
2345
2346         This is the preparation for snapping rounded rects to device pixel position. It enables
2347         device pixel aware border-radius painting.
2348
2349         No change in functionality.
2350
2351         * platform/efl/RenderThemeEfl.cpp:
2352         (WebCore::RenderThemeEfl::paintMediaSliderThumb):
2353         * platform/graphics/FloatRoundedRect.cpp:
2354         (WebCore::FloatRoundedRect::FloatRoundedRect):
2355         (WebCore::FloatRoundedRect::isRenderable):
2356         * platform/graphics/FloatRoundedRect.h:
2357         * platform/graphics/GraphicsContext.cpp:
2358         (WebCore::GraphicsContext::clipRoundedRect):
2359         (WebCore::GraphicsContext::clipOutRoundedRect):
2360         (WebCore::GraphicsContext::fillRoundedRect):
2361         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2362         * platform/graphics/GraphicsContext.h:
2363         * platform/graphics/Path.cpp:
2364         (WebCore::Path::addRoundedRect):
2365         * platform/graphics/Path.h:
2366         * platform/graphics/RoundedRect.cpp:
2367         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
2368         * platform/graphics/RoundedRect.h:
2369         * platform/graphics/ShadowBlur.cpp:
2370         (WebCore::ShadowBlur::drawRectShadow):
2371         (WebCore::ShadowBlur::drawInsetShadow):
2372         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2373         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2374         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2375         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2376         * platform/graphics/ShadowBlur.h:
2377         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2378         (WebCore::GraphicsContext::fillRect):
2379         (WebCore::GraphicsContext::platformFillRoundedRect):
2380         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2381         * platform/graphics/cg/GraphicsContextCG.cpp:
2382         (WebCore::GraphicsContext::fillRect):
2383         (WebCore::GraphicsContext::platformFillRoundedRect):
2384         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2385         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2386         (WebCore::GraphicsContext::fillRoundedRect):
2387         * platform/gtk/RenderThemeGtk.cpp:
2388         (WebCore::borderRadiiFromStyle):
2389         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
2390         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
2391         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
2392         * platform/win/DragImageWin.cpp:
2393         (WebCore::createDragImageForLink):
2394         * rendering/RenderBox.cpp:
2395         (WebCore::RenderBox::paintBoxDecorations):
2396         (WebCore::RenderBox::pushContentsClip):
2397         * rendering/RenderBoxModelObject.cpp:
2398         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
2399         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2400         (WebCore::RenderBoxModelObject::paintBorder):
2401         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2402         (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
2403         (WebCore::RenderBoxModelObject::paintBoxShadow):
2404         * rendering/RenderLayer.cpp:
2405         (WebCore::RenderLayer::clipToRect):
2406         * rendering/RenderThemeIOS.mm:
2407         (WebCore::RenderThemeIOS::paintRadioDecorations):
2408         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
2409         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
2410         (WebCore::RenderThemeIOS::paintSliderTrack):
2411         (WebCore::RenderThemeIOS::paintProgressBar):
2412         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
2413         * rendering/RenderThemeMac.mm:
2414         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2415         (WebCore::RenderThemeMac::paintSliderTrack):
2416         * rendering/RenderThemeSafari.cpp:
2417         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
2418         (WebCore::RenderThemeSafari::paintSliderTrack):
2419         * rendering/shapes/BoxShape.cpp:
2420         (WebCore::BoxShape::buildDisplayPaths):
2421         * rendering/style/BasicShapes.cpp:
2422         (WebCore::BasicShapeInset::path):
2423
2424 2014-03-04  Andreas Kling  <akling@apple.com>
2425
2426         Micro-optimize Strings in JS bindings.
2427         <https://webkit.org/b/129673>
2428
2429         Tweaked for new jsStringWithWeakOwner signature. This patch removes
2430         36 bytes of code from every wrapper getter that returns a DOMString.
2431
2432         Reviewed by Ryosuke Niwa.
2433
2434         * bindings/js/JSDOMBinding.h:
2435         (WebCore::jsStringWithCache):
2436
2437 2014-03-03  David Kilzer  <ddkilzer@apple.com>
2438
2439         SVGPropertyTearOffs should detachChildren before deleting its value.
2440         <http://webkit.org/b/129618>
2441         <rdar://problem/15661617>
2442
2443         Reviewed by Maciej Stachowiak.
2444
2445         Merged from Blink (patch by kouhei@chromium.org):
2446         https://src.chromium.org/viewvc/blink?revision=158563&view=revision
2447         http://crbug.com/296276
2448
2449         Test: svg/transforms/svg-matrix-tearoff-crash.html
2450
2451         NOTE: The test does not reproduce a crash on WebKit using
2452         JavaScriptCore.
2453
2454         * svg/properties/SVGPropertyTearOff.h:
2455         (WebCore::SVGPropertyTearOff::setValue):
2456         (WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):
2457         - Call detachChildren() if m_value is a copy.  The original
2458           Blink patch did not modify the destructor code path, although
2459           that seems obvious via code inspection.
2460
2461 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2462
2463         Subpixel rendering: Incorrect repaint rect cuts off content's right edge after move.
2464         https://bugs.webkit.org/show_bug.cgi?id=129652
2465
2466         Reviewed by Simon Fraser.
2467
2468         When repaint rect is adjusted in order to take the distance from renderer into account,
2469         the accumulated fraction value need to be added too. This is always a positive value.
2470
2471         Test: fast/borders/hidpi-border-clipping-right-after-move.html
2472
2473         * rendering/RenderLayerBacking.cpp:
2474         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2475
2476 2014-03-04  Ryuan Choi  <ryuan.choi@samsung.com>
2477
2478         Remove unused member variable of NetworkInfoController
2479         https://bugs.webkit.org/show_bug.cgi?id=129674
2480
2481         Reviewed by Gyuyoung Kim.
2482
2483         * Modules/networkinfo/NetworkInfoController.cpp:
2484         (WebCore::NetworkInfoController::NetworkInfoController):
2485         (WebCore::NetworkInfoController::create):
2486         (WebCore::provideNetworkInfoTo):
2487         * Modules/networkinfo/NetworkInfoController.h: Removed m_page which is not really used.
2488
2489 2014-02-07  Sergio Villar Senin  <svillar@igalia.com>
2490
2491         [CSS Grid Layout] Percentages of indefinite sizes should compute to auto
2492         https://bugs.webkit.org/show_bug.cgi?id=128173
2493
2494         Reviewed by Darin Adler.
2495
2496         We should treat percentages of indefinite sizes as auto as
2497         mandated by the spec. Otherwise we would end up calculating a
2498         percentage of -1, the value we use to represent infinite.
2499
2500         Added some test cases to the current tests.
2501
2502         * rendering/RenderGrid.cpp:
2503         (WebCore::RenderGrid::gridTrackSize):
2504         * rendering/style/GridTrackSize.h:
2505         (WebCore::GridTrackSize::isPercentage):
2506
2507 2014-03-04  Ryosuke Niwa  <rniwa@webkit.org>
2508
2509         Don't synchronize attributes in reflect setters when we don't need to
2510         https://bugs.webkit.org/show_bug.cgi?id=129662
2511
2512         Reviewed by Andreas Kling.
2513
2514         The vast majority of attributes don't need synchronization. Avoid calling synchronizeAttribute in setters
2515         for those content attributes generated by "Reflect" keyword in IDL.
2516
2517         * bindings/scripts/CodeGenerator.pm:
2518         (SetterExpression):
2519         * dom/Element.cpp:
2520         (WebCore::Element::setAttributeWithoutSynchronization): Added.
2521         * dom/Element.h:
2522
2523 2014-03-04  Andreas Kling  <akling@apple.com>
2524
2525         Remove Document::idAttributeName().
2526         <https://webkit.org/b/129663>
2527
2528         Reviewed by Ryosuke "DYEB" Niwa.
2529
2530         This abstraction is not actually used and causes unnecessary indirection
2531         in some pretty hot code paths.
2532
2533         Replace it with hard-coded HTMLNames::idAttr instead which is a compile
2534         time constant pointer. We can revisit this in the future if we wish to
2535         implement support for custom id attributes.
2536
2537         * dom/Attr.cpp:
2538         (WebCore::Attr::isId):
2539         * dom/Document.cpp:
2540         (WebCore::Document::Document):
2541         * dom/Document.h:
2542         * dom/Element.cpp:
2543         (WebCore::Element::attributeChanged):
2544         (WebCore::Element::willModifyAttribute):
2545         * dom/Element.h:
2546         (WebCore::Element::getIdAttribute):
2547         (WebCore::Element::getNameAttribute):
2548         (WebCore::Element::setIdAttribute):
2549         * html/HTMLElement.cpp:
2550         (WebCore::HTMLElement::parseAttribute):
2551         * html/HTMLFrameElementBase.cpp:
2552         (WebCore::HTMLFrameElementBase::parseAttribute):
2553         * html/HTMLMapElement.cpp:
2554         (WebCore::HTMLMapElement::parseAttribute):
2555         * svg/SVGElement.cpp:
2556         (WebCore::SVGElement::attributeChanged):
2557         (WebCore::SVGElement::isKnownAttribute):
2558         (WebCore::SVGElement::svgAttributeChanged):
2559
2560 2014-03-04  Ryosuke Niwa  <rniwa@webkit.org>
2561
2562         REGRESSION(r164856): Use after free in WebCore::QualifiedName::operator== / WebCore::StyledElement::attributeChanged
2563         https://bugs.webkit.org/show_bug.cgi?id=129550
2564
2565         Reviewed by Andreas Kling.
2566
2567         We can't store a reference to QualifiedName here because ensureUniqueElementData could delete QualifiedName inside Attribute.
2568
2569         Test: fast/dom/uniquing-attributes-via-setAttribute.html
2570
2571         * dom/Element.cpp:
2572         (WebCore::Element::setAttributeInternal):
2573
2574 2014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
2575
2576         Move EvasGLContext and EvasGLSurface files into the efl common directory.
2577         https://bugs.webkit.org/show_bug.cgi?id=129603
2578
2579         Reviewed by Gyuyoung Kim.
2580
2581         EFL port will use EvasGLContext and EvasGLSurface files in both WK1 and WK2.
2582
2583         No new tests, just refactorings.
2584
2585         * PlatformEfl.cmake:
2586         * platform/graphics/efl/EvasGLContext.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp.
2587         (WebKit::EvasGLContext::EvasGLContext):
2588         (WebKit::EvasGLContext::~EvasGLContext):
2589         * platform/graphics/efl/EvasGLContext.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.h.
2590         (WebKit::EvasGLContext::create):
2591         (WebKit::EvasGLContext::context):
2592         * platform/graphics/efl/EvasGLSurface.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp.
2593         (WebKit::EvasGLSurface::EvasGLSurface):
2594         (WebKit::EvasGLSurface::~EvasGLSurface):
2595         * platform/graphics/efl/EvasGLSurface.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h.
2596         (WebKit::EvasGLSurface::create):
2597         (WebKit::EvasGLSurface::surface):
2598
2599 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
2600
2601         Fix the GTK+ CMake build
2602
2603         * PlatformGTK.cmake: Add a missing file to the source list.
2604
2605 2014-03-03  Sanghyup Lee  <sh53.lee@samsung.com>
2606
2607         :active style is not cleared when its display property is set to none before mouse released.
2608         https://bugs.webkit.org/show_bug.cgi?id=129465
2609
2610         Reviewed by Antonio Gomes.
2611
2612         Source/WebCore:
2613
2614         We currently clearing the :active style when element has a renderer.
2615         This patch makes elements clear its active style regardless of renderer. 
2616
2617         * dom/Document.cpp:
2618         (WebCore::Document::updateHoverActiveState):
2619
2620         LayoutTests:
2621
2622         * fast/css/active-display-none-expected.txt: Added.
2623         * fast/css/active-display-none.html: Added.
2624
2625
2626 2014-03-03  Andreas Kling  <akling@apple.com>
2627
2628         Remove 2 unnecessary includes from JSDOMBinding.h
2629         <https://webkit.org/b/129619>
2630
2631         Reviewed by Antti Koivisto.
2632
2633         * bindings/js/JSDOMBinding.h:
2634
2635 2014-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
2636
2637         GraphicsContext::drawLineForText needs to be exported from WebCore.dylib for iOS builds
2638         https://bugs.webkit.org/show_bug.cgi?id=129647
2639
2640         Reviewed by NOBODY (This is a build fix).
2641
2642         Fixing after r165025 and r165016.
2643
2644         No new tests as this is a build fix.
2645
2646         * WebCore.exp.in:
2647
2648 2014-03-03  Jer Noble  <jer.noble@apple.com>
2649
2650         [iOS] Start playback button misplaced
2651         https://bugs.webkit.org/show_bug.cgi?id=129628
2652
2653         Reviewed by Simon Fraser.
2654
2655         On YouTube embeds, while the video is loading it is placed into the DOM with a 0x0 size.
2656         This causes the start playback button to be visible in the upper-left corner of the embed
2657         area. The button wasn't visible previously (in plugin mode) because the plugin clipped its
2658         drawing to its bounds, and so the <video> shadow should do the same.
2659
2660         * Modules/mediacontrols/mediaControlsiOS.css:
2661         (::-webkit-media-controls):
2662
2663 2014-03-03  Enrica Casucci  <enrica@apple.com>
2664
2665         Build fix for iOS simulator.
2666
2667         * WebCore.exp.in:
2668
2669 2014-03-03  Jeremy Jones  <jeremyj@apple.com>
2670
2671         Forward application suspend resume notifications to the web process.
2672         https://bugs.webkit.org/show_bug.cgi?id=129356
2673
2674         Reviewed by Eric Carlson.
2675
2676         * platform/audio/ios/MediaSessionManagerIOS.mm:
2677         (-[WebMediaSessionHelper initWithCallback:]):
2678         Observe UIApplicationDidBecomeActiveNotification,
2679         WebUIApplicationDidBecomeActiveNotification,
2680         WebUIApplicationWillEnterForegroundNotification, and
2681         WebUIApplicationWillResignActiveNotification
2682         
2683         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
2684         Resume session.
2685
2686 2014-03-03  Commit Queue  <commit-queue@webkit.org>
2687
2688         Unreviewed, rolling out r165013.
2689         http://trac.webkit.org/changeset/165013
2690         https://bugs.webkit.org/show_bug.cgi?id=129646
2691
2692         New code is not thread safe, asserting on a worker test
2693         (Requested by ap on #webkit).
2694
2695         * WebCore.exp.in:
2696         * editing/DeleteButtonController.cpp:
2697         (WebCore::DeleteButtonController::createDeletionUI):
2698         * html/DOMURL.cpp:
2699         (WebCore::DOMURL::revokeObjectURL):
2700         * inspector/InspectorPageAgent.cpp:
2701         (WebCore::InspectorPageAgent::cachedResource):
2702         * inspector/InspectorResourceAgent.cpp:
2703         (WebCore::InspectorResourceAgent::replayXHR):
2704         * loader/DocumentLoader.cpp:
2705         (WebCore::areAllLoadersPageCacheAcceptable):
2706         * loader/FrameLoader.cpp:
2707         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
2708         * loader/ImageLoader.cpp:
2709         (WebCore::ImageLoader::updateFromElement):
2710         * loader/archive/cf/LegacyWebArchive.cpp:
2711         (WebCore::LegacyWebArchive::create):
2712         * loader/cache/CachedCSSStyleSheet.cpp:
2713         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
2714         * loader/cache/CachedCSSStyleSheet.h:
2715         * loader/cache/CachedFont.cpp:
2716         (WebCore::CachedFont::CachedFont):
2717         * loader/cache/CachedFont.h:
2718         * loader/cache/CachedImage.cpp:
2719         (WebCore::CachedImage::CachedImage):
2720         * loader/cache/CachedImage.h:
2721         * loader/cache/CachedRawResource.cpp:
2722         (WebCore::CachedRawResource::CachedRawResource):
2723         * loader/cache/CachedRawResource.h:
2724         * loader/cache/CachedResource.cpp:
2725         (WebCore::CachedResource::CachedResource):
2726         (WebCore::CachedResource::~CachedResource):
2727         * loader/cache/CachedResource.h:
2728         * loader/cache/CachedResourceLoader.cpp:
2729         (WebCore::createResource):
2730         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2731         (WebCore::CachedResourceLoader::requestResource):
2732         (WebCore::CachedResourceLoader::revalidateResource):
2733         (WebCore::CachedResourceLoader::loadResource):
2734         * loader/cache/CachedResourceLoader.h:
2735         * loader/cache/CachedSVGDocument.cpp:
2736         (WebCore::CachedSVGDocument::CachedSVGDocument):
2737         * loader/cache/CachedSVGDocument.h:
2738         * loader/cache/CachedScript.cpp:
2739         (WebCore::CachedScript::CachedScript):
2740         * loader/cache/CachedScript.h:
2741         * loader/cache/CachedTextTrack.cpp:
2742         (WebCore::CachedTextTrack::CachedTextTrack):
2743         * loader/cache/CachedTextTrack.h:
2744         * loader/cache/CachedXSLStyleSheet.cpp:
2745         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
2746         * loader/cache/CachedXSLStyleSheet.h:
2747         * loader/cache/MemoryCache.cpp:
2748         (WebCore::MemoryCache::add):
2749         (WebCore::MemoryCache::revalidationSucceeded):
2750         (WebCore::MemoryCache::resourceForURL):
2751         (WebCore::MemoryCache::resourceForRequest):
2752         (WebCore::MemoryCache::addImageToCache):
2753         (WebCore::MemoryCache::removeImageFromCache):
2754         (WebCore::MemoryCache::evict):
2755         (WebCore::MemoryCache::removeResourcesWithOrigin):
2756         (WebCore::MemoryCache::getOriginsWithCache):
2757         (WebCore::MemoryCache::removeUrlFromCache):
2758         (WebCore::MemoryCache::removeRequestFromCache):
2759         (WebCore::MemoryCache::removeRequestFromCacheImpl):
2760         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
2761         (WebCore::MemoryCache::getStatistics):
2762         (WebCore::MemoryCache::setDisabled):
2763         * loader/cache/MemoryCache.h:
2764         * platform/CrossThreadCopier.cpp:
2765         * platform/CrossThreadCopier.h:
2766         * platform/network/cf/ResourceRequest.h:
2767         (WebCore::ResourceRequest::ResourceRequest):
2768         * rendering/RenderSnapshottedPlugIn.cpp:
2769         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
2770         * testing/Internals.cpp:
2771         (WebCore::Internals::isLoadingFromMemoryCache):
2772
2773 2014-03-03  Sam Weinig  <sam@webkit.org>
2774
2775         Fix the iOS Simulator build.
2776
2777         * WebCore.exp.in:
2778
2779 2014-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
2780
2781         Space between double underlines does not scale with font size
2782         https://bugs.webkit.org/show_bug.cgi?id=129521
2783
2784         Reviewed by Simon Fraser.
2785
2786         This patch moves the logic about how far to draw the second underline (when text-decoration-style: double
2787         is specified) from InlineTextBox to GraphicsContext, because GraphicsContext is the authoritative source
2788         about how thick underlines should be. The space between the two underlines is set to the thickness of
2789         each of the underlines.
2790
2791         This patch also deletes some unused code in InlineTextBox that was never getting triggered, in addition
2792         to unifying drawLineForText with drawLinesForText. This didn't have any performance impact in my testing.
2793
2794         Test: fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html
2795
2796         * platform/graphics/GraphicsContext.h: drawLineForText takes a boolean for if we should draw double
2797         underlines.
2798         * platform/graphics/cg/GraphicsContextCG.cpp:
2799         (WebCore::GraphicsContext::drawLineForText):
2800         (WebCore::GraphicsContext::drawLinesForText):
2801         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2802         (WebCore::GraphicsContext::drawLineForText):
2803         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2804         (WebCore::GraphicsContext::drawLineForText):
2805         * rendering/InlineTextBox.cpp: Use new boolean argument
2806         (WebCore::drawSkipInkUnderline):
2807         (WebCore::InlineTextBox::paintDecoration):
2808
2809 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
2810
2811         AX: Support IOS Accessibility in WK2
2812         https://bugs.webkit.org/show_bug.cgi?id=129527
2813
2814         Reviewed by Sam Weinig.
2815
2816         Update the iOS wrapper so that it can convert points to screen space in WebKit2.
2817
2818         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2819         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2820         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
2821
2822 2014-03-03  Martin Hock  <mhock@apple.com>
2823
2824         Add support for sessions to MemoryCache.
2825         https://bugs.webkit.org/show_bug.cgi?id=127794
2826
2827         Reviewed by Sam Weinig.
2828
2829         * WebCore.exp.in:
2830         * editing/DeleteButtonController.cpp:
2831         (WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
2832         * html/DOMURL.cpp:
2833         (WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
2834         * inspector/InspectorPageAgent.cpp:
2835         (WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
2836         * inspector/InspectorResourceAgent.cpp:
2837         (WebCore::InspectorResourceAgent::replayXHR): Ditto.
2838         * loader/DocumentLoader.cpp:
2839         (WebCore::areAllLoadersPageCacheAcceptable): Ditto.
2840         * loader/FrameLoader.cpp:
2841         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
2842         * loader/ImageLoader.cpp:
2843         (WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
2844         * loader/archive/cf/LegacyWebArchive.cpp:
2845         (WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
2846         * loader/cache/CachedCSSStyleSheet.cpp:
2847         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
2848         * loader/cache/CachedCSSStyleSheet.h:
2849         * loader/cache/CachedFont.cpp: Ditto.
2850         (WebCore::CachedFont::CachedFont):
2851         * loader/cache/CachedFont.h:
2852         * loader/cache/CachedImage.cpp: Ditto.
2853         (WebCore::CachedImage::CachedImage):
2854         * loader/cache/CachedImage.h:
2855         * loader/cache/CachedRawResource.cpp: Ditto.
2856         (WebCore::CachedRawResource::CachedRawResource):
2857         * loader/cache/CachedRawResource.h:
2858         * loader/cache/CachedResource.cpp: Ditto.
2859         (WebCore::CachedResource::CachedResource):
2860         (WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
2861         * loader/cache/CachedResource.h:
2862         (WebCore::CachedResource::sessionID):
2863         * loader/cache/CachedResourceLoader.cpp:
2864         (WebCore::createResource): Constructors take sessionID.
2865         (WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
2866         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
2867         (WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
2868         (WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
2869         (WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
2870         * loader/cache/CachedResourceLoader.h:
2871         * loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
2872         (WebCore::CachedSVGDocument::CachedSVGDocument):
2873         * loader/cache/CachedSVGDocument.h:
2874         * loader/cache/CachedScript.cpp: Ditto.
2875         (WebCore::CachedScript::CachedScript):
2876         * loader/cache/CachedScript.h:
2877         * loader/cache/CachedTextTrack.cpp: Ditto.
2878         (WebCore::CachedTextTrack::CachedTextTrack):
2879         * loader/cache/CachedTextTrack.h:
2880         * loader/cache/CachedXSLStyleSheet.cpp: Ditto.
2881         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
2882         * loader/cache/CachedXSLStyleSheet.h:
2883         * loader/cache/MemoryCache.cpp:
2884         (WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
2885         (WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
2886         (WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
2887         (WebCore::MemoryCache::resourceForURL): Ditto.
2888         (WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
2889         (WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
2890         (WebCore::MemoryCache::addImageToCache): Use default sessionID.
2891         (WebCore::MemoryCache::removeImageFromCache): Ditto.
2892         (WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
2893         (WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
2894         (WebCore::MemoryCache::getOriginsWithCache): Ditto.
2895         (WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
2896         (WebCore::MemoryCache::removeRequestFromCache): Ditto.
2897         (WebCore::MemoryCache::removeRequestFromCacheImpl): Ditto.
2898         (WebCore::MemoryCache::removeRequestFromSessionCaches): Iterate through all CachedResourceMaps.
2899         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
2900         (WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
2901         (WebCore::MemoryCache::setDisabled): Ditto.
2902         * loader/cache/MemoryCache.h: Create another level for cache.
2903         * platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
2904         (WebCore::SessionID>::copy):
2905         * platform/CrossThreadCopier.h:
2906         * platform/network/cf/ResourceRequest.h:
2907         (WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
2908         * rendering/RenderSnapshottedPlugIn.cpp:
2909         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
2910         * testing/Internals.cpp:
2911         (WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.
2912
2913 2014-03-03  Andreas Kling  <akling@apple.com>
2914
2915         Remove unused DataView code from JSDOMBinding.h
2916         <https://webkit.org/b/129616>
2917
2918         Reviewed by Antti Koivisto.
2919
2920         * bindings/js/JSDOMBinding.h:
2921
2922 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
2923
2924         Allow overflow-scroll to be one-finger scrolled until we hook up UIScrollViews
2925         https://bugs.webkit.org/show_bug.cgi?id=129621
2926
2927         Reviewed by Benjamin Poulain.
2928
2929         Temporary change to allow overflow:scroll to be scrolled in iOS WK2.
2930
2931         * rendering/RenderLayer.cpp:
2932         (WebCore::RenderLayer::hasAcceleratedTouchScrolling):
2933
2934 2014-03-03  Antti Koivisto  <antti@apple.com>
2935
2936         Find results on simple lines are not marked correctly
2937         https://bugs.webkit.org/show_bug.cgi?id=129586
2938
2939         Reviewed by Andreas Kling.
2940
2941         Tests: editing/text-iterator/count-mark-lineboxes.html
2942                editing/text-iterator/count-mark-simple-lines.html
2943                
2944         TextIterator operating on simple lines failed to take the end of the range into account.
2945         This also causes performance issues on long documents as range traversals would miss the end
2946         node and end up going through the entire document.
2947
2948         * editing/TextIterator.cpp:
2949         (WebCore::TextIterator::handleTextNode):
2950         
2951             Stop when hitting the range end on simple text nodes.
2952
2953         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
2954         
2955             Use hasRenderedText test instead of linebox-only firstTextBox.
2956
2957         * testing/Internals.cpp:
2958         (WebCore::Internals::countMatchesForText):
2959         * testing/Internals.h:
2960         * testing/Internals.idl:
2961         
2962             Add testing interface for counting and marking matches.
2963
2964 2014-03-03  Benjamin Poulain  <benjamin@webkit.org>
2965
2966         SelectorQuery failing RightMostWithIdMatch are compiling their selectors for each execution
2967         https://bugs.webkit.org/show_bug.cgi?id=129601
2968
2969         Reviewed by Andreas Kling.
2970
2971         This caused a regression after r164924 for documents in quirks mode. Since those always fail
2972         selectorForIdLookup(), they ended up compiling the selector every time they were called.
2973
2974         * dom/SelectorQuery.cpp:
2975         (WebCore::SelectorDataList::execute):
2976
2977 2014-03-01  Jer Noble  <jer.noble@apple.com>
2978
2979         [Mac] Crash in MediaPlayer::rateChanged()
2980         https://bugs.webkit.org/show_bug.cgi?id=129548
2981
2982         Reviewed by Darin Adler.
2983
2984         WTF::bind will automatically ref the parameters added to it. But MediaPlayerPrivate-
2985         AVFoundation and -MediaSOurceAVFObjC are not RefCounted, so by the time the bound
2986         function is called, the underlying objects may have been freed.
2987
2988         Replace or augment callOnMainThread arguments with lambdas and weakPtrs so that
2989         if the argument has been destroyed, its methods will not be called.
2990
2991         Make the MediaPlayerPrivateAVFoundation::Notification function type a std::function:
2992         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2993         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
2994         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
2995
2996         Make createWeakPtr() public so that it can be called from non-class methods:
2997         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2998         (WebCore::MediaPlayerPrivateAVFoundationObjC::createWeakPtr): 
2999         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3000         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr): 
3001
3002         Use a weakPtr to abort callOnMainThread() if the object has been destroyed:
3003         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3004         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3005         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3006         (WebCore::CMTimebaseEffectiveRateChangedCallback):
3007         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
3008         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
3009         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
3010
3011 2014-02-28  Jer Noble  <jer.noble@apple.com>
3012
3013         [MSE] YouTube videos fail to play
3014         https://bugs.webkit.org/show_bug.cgi?id=129525
3015
3016         Reviewed by Darin Adler.
3017
3018         Test: media/media-source/media-source-fudge-factor.html
3019
3020         Add a very simple playability metric to SourceBuffer. Track the number of seconds buffered
3021         and use that metric to determine whether the MediaSource has buffered enough data to play
3022         through.
3023
3024         * Modules/mediasource/MediaSource.cpp:
3025         (WebCore::MediaSource::currentTime): Added simple accessor.
3026         (WebCore::MediaSource::monitorSourceBuffers): Replace the functor-based iterators with lambdas.
3027         (WebCore::MediaSource::addSourceBuffer): Drive-by fix; only add new source buffers to the
3028             activeSourceBuffers list if those buffers are actually active.
3029         * Modules/mediasource/MediaSource.h:
3030         * Modules/mediasource/SourceBuffer.cpp:
3031         (WebCore::SourceBuffer::SourceBuffer): Initialize new ivars.
3032         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Measure the number of seconds buffered.
3033         (WebCore::SourceBuffer::monitorBufferingRate): Use a simple Exponential moving average to
3034             track the buffering rate.
3035         (WebCore::SourceBuffer::hasCurrentTime): Return true if the current time is within 1/24 s
3036             of a buffered range.
3037         (WebCore::SourceBuffer::hasFutureTime): Moved from MediaSource.
3038         (WebCore::SourceBuffer::canPlayThrough): Return true if the buffering rate is > 1s per
3039             second, or if the rate is sufficient to keep up over the remaining time.
3040         * Modules/mediasource/SourceBuffer.h:
3041
3042 2014-03-03  Bear Travis  <betravis@adobe.com>
3043
3044         [CSS Shapes] Serialize circle positions
3045         https://bugs.webkit.org/show_bug.cgi?id=129404
3046
3047         Reviewed by Dirk Schulze.
3048
3049         Circle positions should always be present when serialized, and should
3050         only have the 2 or 4-valued form. Keywords are converted to percentages
3051         and simplified where possible. This patch adds some additional processing
3052         that converts the parsed position into the serialized format, before
3053         converting it to text. See http://dev.w3.org/csswg/css-shapes/#basic-shape-serialization.
3054
3055         Updated existing parsing tests.
3056
3057         * css/CSSBasicShapes.cpp:
3058         (WebCore::serializePositionOffset): Convert a position offset to a serialized string.
3059         The offset must be a pair, as generated by buildSerializablePositionOffset.
3060         (WebCore::buildSerializablePositionOffset): Generates a keyword + offset pair for each
3061         position offset. The keywords may later be dropped during serialization.
3062         (WebCore::CSSBasicShapeCircle::cssText): Use the new serialization methods.
3063
3064 2014-03-03  Lorenzo Tilve  <ltilve@igalia.com>
3065
3066         Optimize StylePropertiesSet::findPropertyIndex() to improve CSS properties performance
3067         https://bugs.webkit.org/show_bug.cgi?id=129605
3068
3069         Reviewed by Andreas Kling.
3070
3071         Merged from Blink (patch by Mikhail Pozdnyakov):
3072         https://src.chromium.org/viewvc/blink?view=revision&revision=167325
3073
3074         Avoid checking whether 'StylePropertiesSet' is mutable and accesing directly to its
3075         data members to achieve performance improvements
3076
3077         Before the optimization applied:
3078             mean: 3064.8337171934063 runs/s
3079             median: 3097.5899379343855 runs/s
3080             stdev: 66.89274074044187 runs/s
3081             min: 2891.7479324362585 runs/s
3082             max: 3113.288683440125 runs/s
3083
3084         After the optimization applied:
3085             mean: 3343.8356114138105 runs/s
3086             median: 3356.25682957446 runs/s
3087             stdev: 36.297533087489036 runs/s
3088             min: 3238.5468032264243 runs/s
3089             max: 3368.664837531425 runs/s
3090
3091         Performance gain for the average value is approx. 9.1%, in the
3092         range of the 10% - 8.2% for the min and max measured
3093         values (Linux desktop x64).
3094
3095         * css/StyleProperties.cpp:
3096         (WebCore::ImmutableStyleProperties::findPropertyIndex):
3097         (WebCore::MutableStyleProperties::findPropertyIndex):
3098         * css/StyleProperties.h:
3099         (WebCore::toMutableStyleProperties):
3100         (WebCore::toImmutableStyleProperties):
3101         (WebCore::StyleProperties::findPropertyIndex):
3102
3103 2014-03-03  Brian Burg  <bburg@apple.com>
3104
3105         Unreviewed build fix for Windows after r164986.
3106
3107         * WebCore.vcxproj/build-generated-files.sh: Export WebReplayScripts
3108         so that the build system knows how to find CodeGeneratorReplayInputs.py.
3109
3110 2014-03-03  Andrei Bucur  <abucur@adobe.com>
3111
3112         [CSS Regions] Overset computation is incorrect in some cases
3113         https://bugs.webkit.org/show_bug.cgi?id=129032
3114
3115         Reviewed by Mihnea Ovidenie.
3116
3117         This patch reworks the way overset is computed for regions and named flows.
3118
3119         1. Regions overflow no longer trigger an overset changed event. This is because
3120         the overflow of a box is contained within the region range of the box. The content
3121         edge should be considered the logical bottom position of the content inside the
3122         flow thread.
3123
3124         2. The regions events logic was moved from RenderFlowThread to RenderNamedFlowThread
3125         and from RenderRegion to RenderNamedFlowFragment (including the regionOverset property).
3126
3127         3. The overset value of the named flow is no longer stored in the named flow. It is
3128         extracted from the overset of the last region in the chain.
3129
3130         4. The regions overset is not computed every time the flow thread is laid out which
3131         should improve performance for flows with many regions. With the patch, each region
3132         computes the overset value during its layout when the flow thread is in the overflow
3133         or the final layout phase.
3134
3135         5. The overset changed event is dispatched only at the end of the layout of the named flows,
3136         after all the region overset changes have been considered. This means that the overset
3137         event can't be dispatched in the middle of the auto-height processing algorithm that
3138         requires multiple layout passes for the flow threads.
3139
3140         However, the region layout update event dispatch timing was not changed, it is dispatched
3141         every time the flow thread has a layout. This preserves the current behavior of the event.
3142
3143         Tests: The old tests were modified to take into account the change.
3144
3145         * dom/Element.cpp:
3146         (WebCore::Element::webkitRegionOverset):
3147         * dom/WebKitNamedFlow.cpp:
3148         (WebCore::WebKitNamedFlow::overset):
3149         * inspector/InspectorCSSAgent.cpp:
3150         (WebCore::InspectorCSSAgent::buildArrayForRegions):
3151         * rendering/FlowThreadController.cpp:
3152         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
3153         * rendering/RenderBlock.cpp:
3154         (WebCore::RenderBlock::computeOverflow):
3155         * rendering/RenderFlowThread.cpp:
3156         (WebCore::RenderFlowThread::RenderFlowThread):
3157         (WebCore::RenderFlowThread::layout):
3158         * rendering/RenderFlowThread.h:
3159         * rendering/RenderNamedFlowFragment.cpp:
3160         (WebCore::RenderNamedFlowFragment::layoutBlock):
3161         (WebCore::RenderNamedFlowFragment::setRegionOversetState):
3162         (WebCore::RenderNamedFlowFragment::regionOversetState):
3163         (WebCore::RenderNamedFlowFragment::updateOversetState):
3164         * rendering/RenderNamedFlowFragment.h:
3165         * rendering/RenderNamedFlowThread.cpp:
3166         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3167         (WebCore::RenderNamedFlowThread::computeOverflow):
3168         (WebCore::RenderNamedFlowThread::layout):
3169         (WebCore::RenderNamedFlowThread::dispatchNamedFlowEvents):
3170         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEventIfNeeded):
3171         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
3172         * rendering/RenderNamedFlowThread.h:
3173         There's a new field called m_flowContentBottom that tracks the content bottom of the flow thread
3174         after layout. This value is used to compute the overset value of the regions because it's not
3175         affected by relative positioning or visual overflow such as shadows.
3176         * rendering/RenderRegion.cpp:
3177         * rendering/RenderRegion.h:
3178
3179 2014-03-03  Tomas Popela  <tpopela@redhat.com>
3180
3181         [GTK] CodeGeneratorGObject.pm remove usage of undefined variable
3182         https://bugs.webkit.org/show_bug.cgi?id=129602
3183
3184         Reviewed by Martin Robinson.
3185
3186         Remove usage of undefined variable hdrPropIncludes in CodeGeneratorGObject.pm
3187
3188         * bindings/scripts/CodeGeneratorGObject.pm:
3189         (WriteData):
3190
3191 2014-03-03  Brian Burg  <bburg@apple.com>
3192
3193         Web Replay: upstream input storage, capture/replay machinery, and inspector domain
3194         https://bugs.webkit.org/show_bug.cgi?id=128782
3195
3196         Reviewed by Timothy Hatcher, Joseph Pecoraro, and Andreas Kling.
3197
3198         No new tests yet, as they rely on infrastructure tracked in https://webkit.org/b/129190.
3199
3200         Replayable executions are organized into ReplaySessions, which can
3201         contain several ReplaySessionSegments that divide overall execution
3202         at main frame navigation boundaries. NondeterministicInput subclasses
3203         are stored in SegmentedInputStorage according to the input's InputQueue.
3204
3205         Capture and playback are controlled at the page granularity by the Page's
3206         ReplayController. The controller knows how to create new segments, replay to
3207         arbitrary positions in the ReplaySession, and track the active InputCursor.
3208
3209         The capturing and replaying input cursor subclasses encapsulate state for
3210         storing new inputs and loading/dispatching saved inputs, respectively.
3211
3212         The ReplayAgent and associated inspector protocol domain is the friendly
3213         public API for programmatically capturing and replaying sessions.
3214
3215         * DerivedSources.make: Add replay inputs code generation target. Add the
3216         replay domain specification to the list of inspector domains.
3217
3218         * ForwardingHeaders/replay/EncodedValue.h: Added.
3219         * WebCore.xcodeproj/project.pbxproj: Add many files, and export
3220         `WebReplayScripts` environment variable to DerivedSources.make.
3221
3222         * inspector/InspectorController.cpp: Add the replay agent.
3223         (WebCore::InspectorController::InspectorController):
3224
3225         * inspector/InspectorInstrumentation.cpp:
3226         Add events for segment lifecycle events, and loading/unloading of sessions
3227         and segments, and capture/replay progress events. The replay controller
3228         also needs to know about detached and committed frames.
3229
3230         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
3231         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3232         (WebCore::InspectorInstrumentation::sessionCreatedImpl):
3233         (WebCore::InspectorInstrumentation::sessionLoadedImpl):
3234         (WebCore::InspectorInstrumentation::sessionModifiedImpl):
3235         (WebCore::InspectorInstrumentation::segmentCreatedImpl):
3236         (WebCore::InspectorInstrumentation::segmentCompletedImpl):
3237         (WebCore::InspectorInstrumentation::segmentLoadedImpl):
3238         (WebCore::InspectorInstrumentation::segmentUnloadedImpl):
3239         (WebCore::InspectorInstrumentation::captureStartedImpl):
3240         (WebCore::InspectorInstrumentation::captureStoppedImpl):
3241         (WebCore::InspectorInstrumentation::playbackStartedImpl):
3242         (WebCore::InspectorInstrumentation::playbackPausedImpl):
3243         (WebCore::InspectorInstrumentation::playbackHitPositionImpl):
3244         (WebCore::InspectorInstrumentation::replayAgentEnabled):
3245         * inspector/InspectorInstrumentation.h:
3246         (WebCore::InspectorInstrumentation::replayAgentEnabled):
3247         (WebCore::InspectorInstrumentation::sessionCreated):
3248         (WebCore::InspectorInstrumentation::sessionLoaded):
3249         (WebCore::InspectorInstrumentation::sessionModified):
3250         (WebCore::InspectorInstrumentation::segmentCreated):
3251         (WebCore::InspectorInstrumentation::segmentCompleted):
3252         (WebCore::InspectorInstrumentation::segmentLoaded):
3253         (WebCore::InspectorInstrumentation::segmentUnloaded):
3254         (WebCore::InspectorInstrumentation::captureStarted):
3255         (WebCore::InspectorInstrumentation::captureStopped):
3256         (WebCore::InspectorInstrumentation::playbackStarted):
3257         (WebCore::InspectorInstrumentation::playbackPaused):
3258         (WebCore::InspectorInstrumentation::playbackHitPosition):
3259
3260         * inspector/InspectorReplayAgent.cpp: Added.
3261         (WebCore::buildInspectorObjectForPosition):
3262         (WebCore::buildInspectorObjectForInput):
3263         (WebCore::buildInspectorObjectForSession):
3264         (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
3265         (WebCore::SerializeInputToJSONFunctor::~SerializeInputToJSONFunctor):
3266         (WebCore::SerializeInputToJSONFunctor::operator()):
3267         (WebCore::SerializeInputToJSONFunctor::returnValue):
3268         (WebCore::buildInspectorObjectForSegment):
3269         (WebCore::InspectorReplayAgent::InspectorReplayAgent):
3270         (WebCore::InspectorReplayAgent::~InspectorReplayAgent):
3271         (WebCore::InspectorReplayAgent::sessionState):
3272         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
3273         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
3274         (WebCore::InspectorReplayAgent::frameNavigated):
3275         (WebCore::InspectorReplayAgent::frameDetached):
3276         (WebCore::InspectorReplayAgent::sessionCreated):
3277         (WebCore::InspectorReplayAgent::sessionModified):
3278         (WebCore::InspectorReplayAgent::sessionLoaded):
3279         (WebCore::InspectorReplayAgent::segmentCreated):
3280         (WebCore::InspectorReplayAgent::segmentCompleted):
3281         (WebCore::InspectorReplayAgent::segmentLoaded):
3282         (WebCore::InspectorReplayAgent::segmentUnloaded):
3283         (WebCore::InspectorReplayAgent::captureStarted):
3284         (WebCore::InspectorReplayAgent::captureStopped):
3285         (WebCore::InspectorReplayAgent::playbackStarted):
3286         (WebCore::InspectorReplayAgent::playbackPaused):
3287         (WebCore::InspectorReplayAgent::playbackHitPosition):
3288         (WebCore::InspectorReplayAgent::startCapturing):
3289         (WebCore::InspectorReplayAgent::stopCapturing):
3290         (WebCore::InspectorReplayAgent::replayToPosition):
3291         (WebCore::InspectorReplayAgent::replayToCompletion):
3292         (WebCore::InspectorReplayAgent::pausePlayback):
3293         (WebCore::InspectorReplayAgent::cancelPlayback):
3294         (WebCore::InspectorReplayAgent::switchSession):
3295         (WebCore::InspectorReplayAgent::insertSessionSegment):
3296         (WebCore::InspectorReplayAgent::removeSessionSegment):
3297         Provide a public API for modifying sessions. This is the backend support
3298         for user editing of replay sessions to add/remove specific segments.
3299
3300         (WebCore::InspectorReplayAgent::findSession):
3301         (WebCore::InspectorReplayAgent::findSegment):
3302         (WebCore::InspectorReplayAgent::getAvailableSessions):
3303         (WebCore::InspectorReplayAgent::getSerializedSession):
3304         (WebCore::InspectorReplayAgent::getSerializedSegment):
3305         Most of the replay protocol domain speaks in terms of sesssion and
3306         segment identifiers. These functions return the actual data associated
3307         with these identifiers.
3308
3309         * inspector/InspectorReplayAgent.h: Added.
3310         * inspector/InstrumentingAgents.cpp:
3311         (WebCore::InstrumentingAgents::InstrumentingAgents):
3312         (WebCore::InstrumentingAgents::reset):
3313         * inspector/InstrumentingAgents.h:
3314         (WebCore::InstrumentingAgents::inspectorReplayAgent): Added.
3315         (WebCore::InstrumentingAgents::setInspectorReplayAgent): Added.
3316         * inspector/protocol/Replay.json: Added.
3317
3318         * page/Page.cpp:
3319         (WebCore::Page::Page):
3320         * page/Page.h:
3321         (WebCore::Page::replayController): Added.
3322         * platform/Logging.h: Add WebReplay logging channel.
3323         * replay/AllReplayInputs.h: Added. Simplifies importing all input definitions.
3324
3325         * replay/CapturingInputCursor.cpp: Added.
3326         (WebCore::CapturingInputCursor::CapturingInputCursor):
3327         (WebCore::CapturingInputCursor::~CapturingInputCursor):
3328         (WebCore::CapturingInputCursor::create):
3329         (WebCore::CapturingInputCursor::storeInput):
3330         (WebCore::CapturingInputCursor::loadInput):
3331         (WebCore::CapturingInputCursor::uncheckedLoadInput):
3332         * replay/CapturingInputCursor.h: Added.
3333
3334         * replay/EventLoopInput.h:
3335         (WebCore::EventLoopInputBase::EventLoopInputBase):
3336         (WebCore::EventLoopInputBase::timestamp):
3337         (WebCore::EventLoopInputBase::setTimestamp): Support deserialization.
3338
3339         * replay/EventLoopInputDispatcher.cpp: Added. This class encapsulates the timers
3340         and measurements used to dispatch event loop inputs during replay.
3341
3342         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
3343         (WebCore::EventLoopInputDispatcher::run):
3344         (WebCore::EventLoopInputDispatcher::pause):
3345         (WebCore::EventLoopInputDispatcher::timerFired):
3346         (WebCore::EventLoopInputDispatcher::dispatchInputSoon):
3347         (WebCore::EventLoopInputDispatcher::dispatchInput):
3348         * replay/EventLoopInputDispatcher.h: Added.
3349         (WebCore::EventLoopInputDispatcherClient::EventLoopInputDispatcherClient):
3350         (WebCore::EventLoopInputDispatcherClient::~EventLoopInputDispatcherClient):
3351
3352         * replay/FunctorInputCursor.h: Added.
3353         (WebCore::FunctorInputCursor::~FunctorInputCursor):
3354         (WebCore::FunctorInputCursor::forEachInputInQueue):
3355         (WebCore::FunctorInputCursor::FunctorInputCursor):
3356         (WebCore::FunctorInputCursor::storeInput):
3357         (WebCore::FunctorInputCursor::loadInput):
3358         (WebCore::FunctorInputCursor::uncheckedLoadInput):
3359
3360         * replay/ReplayController.cpp: Added.
3361         (WebCore::ReplayController::ReplayController):
3362         (WebCore::ReplayController::switchSession):
3363         (WebCore::ReplayController::createSegment):
3364         (WebCore::ReplayController::completeSegment):
3365         (WebCore::ReplayController::loadSegment):
3366         (WebCore::ReplayController::unloadSegment):
3367         (WebCore::ReplayController::startCapturing):
3368         (WebCore::ReplayController::stopCapturing):
3369         (WebCore::ReplayController::startPlayback):
3370         (WebCore::ReplayController::pausePlayback):
3371         (WebCore::ReplayController::cancelPlayback):
3372         (WebCore::ReplayController::replayToPosition):
3373         (WebCore::ReplayController::frameDetached):
3374         (WebCore::ReplayController::frameNavigated):
3375         (WebCore::ReplayController::loadedSession):
3376         (WebCore::ReplayController::loadedSegment):
3377         (WebCore::ReplayController::activeInputCursor):
3378         (WebCore::ReplayController::dispatcher):
3379         (WebCore::ReplayController::willDispatchInput):
3380         (WebCore::ReplayController::didDispatchInput):
3381         (WebCore::ReplayController::didDispatchFinalInput):
3382         * replay/ReplayController.h: Added.
3383         (WebCore::ReplayPosition::ReplayPosition):
3384         (WebCore::ReplayPosition::operator<):
3385         (WebCore::ReplayPosition::operator==):
3386
3387         * replay/ReplayInputCreationMethods.cpp: Added.
3388         Static factory implementations for inputs belong here.
3389         (WebCore::InitialNavigation::createFromPage):
3390
3391         * replay/ReplayInputDispatchMethods.cpp: Added.
3392         All dispatch() implementations for generated replay inputs belong here.
3393         (WebCore::BeginSegmentSentinel::dispatch):
3394         (WebCore::EndSegmentSentinel::dispatch):
3395         (WebCore::InitialNavigation::dispatch):
3396
3397         * replay/ReplayInputTypes.cpp:
3398         (WebCore::ReplayInputTypes::ReplayInputTypes):
3399         * replay/ReplayInputTypes.h: Define strings for WebCore inputs.
3400
3401         * replay/ReplaySession.cpp: Added.
3402         (WebCore::ReplaySession::create):
3403         (WebCore::ReplaySession::ReplaySession):
3404         (WebCore::ReplaySession::~ReplaySession):
3405         (WebCore::ReplaySession::appendSegment):
3406         (WebCore::ReplaySession::insertSegment):
3407         (WebCore::ReplaySession::removeSegment):
3408         * replay/ReplaySession.h: Added.
3409         (WebCore::ReplaySession::identifier):
3410         (WebCore::ReplaySession::timestamp):
3411         (WebCore::ReplaySession::size):
3412         (WebCore::ReplaySession::at):
3413         (WebCore::ReplaySession::begin):
3414         (WebCore::ReplaySession::end):
3415
3416         * replay/ReplaySessionSegment.cpp: Added.
3417         (WebCore::ReplaySessionSegment::create):
3418         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
3419         (WebCore::ReplaySessionSegment::~ReplaySessionSegment):
3420         (WebCore::ReplaySessionSegment::createCapturingCursor):
3421         (WebCore::ReplaySessionSegment::createReplayingCursor):
3422         (WebCore::ReplaySessionSegment::createFunctorCursor):
3423         * replay/ReplaySessionSegment.h: Added.
3424         (WebCore::ReplaySessionSegment::identifier):
3425         (WebCore::ReplaySessionSegment::timestamp):
3426
3427         * replay/ReplayingInputCursor.cpp: Added.
3428         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
3429         (WebCore::ReplayingInputCursor::~ReplayingInputCursor):
3430         (WebCore::ReplayingInputCursor::create):
3431         (WebCore::ReplayingInputCursor::storeInput):
3432         (WebCore::ReplayingInputCursor::loadInput):
3433         (WebCore::ReplayingInputCursor::uncheckedLoadInput):
3434         * replay/ReplayingInputCursor.h: Added.
3435
3436         * replay/SegmentedInputStorage.cpp: Added.
3437         (WebCore::queueTypeToLogPrefix):
3438         (WebCore::jsonStringForInput):
3439         (WebCore::offsetForInputQueue):
3440         (WebCore::SegmentedInputStorage::SegmentedInputStorage):
3441         (WebCore::SegmentedInputStorage::~SegmentedInputStorage):
3442         (WebCore::SegmentedInputStorage::load):
3443         (WebCore::SegmentedInputStorage::store):
3444         (WebCore::SegmentedInputStorage::queueSize):
3445         * replay/SegmentedInputStorage.h: Added.
3446
3447         * replay/SerializationMethods.cpp: Added.
3448         Specializations of EncodingTraits for WebCore types belong here.
3449
3450         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
3451         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
3452         (JSC::EncodingTraits<SecurityOrigin>::encodeValue):
3453         (JSC::EncodingTraits<SecurityOrigin>::decodeValue):
3454         (JSC::EncodingTraits<URL>::encodeValue):
3455         (JSC::EncodingTraits<URL>::decodeValue):
3456         * replay/SerializationMethods.h: Added.
3457         * replay/WebInputs.json: Added.
3458         In this inital patch, we define BeginSegmentSentinel,
3459         EndSegmentSentinel, and InitialNavigation inputs.
3460
3461 2014-03-03  Antoine Quint  <graouts@webkit.org>
3462
3463         Respect SVG fragment identifiers in <img> src attribute
3464         https://bugs.webkit.org/show_bug.cgi?id=129387
3465
3466         Reviewed by Dirk Schulze.
3467