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