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