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