REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-13  Beth Dakin  <bdakin@apple.com>
2
3         REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
4         scrolling in News Feed
5         https://bugs.webkit.org/show_bug.cgi?id=132889
6         -and corresponding-
7         <rdar://problem/16715716>
8
9         Reviewed by Simon Fraser.
10
11         First of all, scrollOffsetRelativeToDocument() was very poorly named. This patch 
12         re-names it to the much more accurate documentScrollOffsetRelativeToViewOrigin(). 
13         Re-naming it makes it clear that ONE call site was not getting the right offset. 
14         That call site does not want to know the document’s position relative to the view 
15         origin, but rather it wants to know the Document’s position relative to the 
16         scrolling origin.
17
18         Export new name.
19         * WebCore.exp.in:
20
21         Use newly re-named documentScrollPositionRelativeToViewOrigin().
22         * page/FrameView.cpp:
23         (WebCore::FrameView::convertToRenderer):
24         * platform/ScrollView.cpp:
25         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
26         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
27         (WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
28         (WebCore::ScrollView::rootViewToContents):
29         (WebCore::ScrollView::windowToContents):
30         (WebCore::ScrollView::scrollOffsetRelativeToDocument): Deleted.
31         (WebCore::ScrollView::scrollPositionRelativeToDocument): Deleted.
32         * platform/ScrollView.h:
33
34         THIS is the spot that needs the new function, 
35         documentScrollOffsetRelativeToScrollableAreaOrigin()()
36         * rendering/RenderLayer.cpp:
37         (WebCore::RenderLayer::scrollRectToVisible):
38
39 2014-05-13  Dean Jackson  <dino@apple.com>
40
41         [iOS] Page scale update messages for media controls should only fire at the end of zooming
42         https://bugs.webkit.org/show_bug.cgi?id=132857
43         <rdar://problem/16631009>
44
45         Reviewed by Simon Fraser.
46
47         As the user was zooming, the media controls that responded
48         to the page scale (and resized themselves) would do so
49         slightly out of sync with the screen refreshes, and it looked
50         terrible. They really only need to get told at the end
51         of the zoom that they need to relayout.
52
53         Allow setPageScaleFactor to accept another parameter
54         that indicates if the change is stable. That way, changes
55         during a user triggers zoom gesture can be ignored for
56         media controls.
57
58         * WebCore.exp.in: Page::setPageScaleFactor takes a new parameter.
59         * dom/Document.cpp:
60         (WebCore::Document::pageScaleFactorChangedAndStable): Renamed from pageScaleFactorChanged.
61         (WebCore::Document::pageScaleFactorChanged): Deleted.
62         * dom/Document.h:
63         * page/Page.cpp:
64         (WebCore::Page::setPageScaleFactor): Accepts a new inStableState parameter,
65         and tells the main frame that the scale factor has changed if it's stable.
66         * page/Page.h:
67
68 2014-05-13  Eric Carlson  <eric.carlson@apple.com>
69
70         Unreviewed build fix after r168755.
71
72         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
73         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
74
75 2014-05-13  Eric Carlson  <eric.carlson@apple.com>
76
77         [Mac] hasVideo should return true when video is ready to display
78         https://bugs.webkit.org/show_bug.cgi?id=132885
79
80         Reviewed by Jer Noble.
81
82         * html/HTMLMediaElement.cpp:
83         (WebCore::HTMLMediaElement::parseAttribute):
84
85         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
86         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
87             enabled state of the AVPlayerItemTrack during setup.
88
89         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
90         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
91         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
92             m_cachedIsReadyForDisplay.
93         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "enabled" KVO observers.
94         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Observe "readyForDisplay"
95             change notifications.
96         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Remove for "readyForDisplay"
97             observer.
98         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Return cached readyForDisplay
99             state instead of polling every time.
100         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Call setHasVideo(true) if the
101             player layer is ready for display.
102         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Update logging.
103         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
104         (WebCore::MediaPlayerPrivateAVFoundationObjC::firstFrameAvailableDidChange): Cache readyForDisplay
105             state, call tracksChanged() if we haven't seen a video track yet.
106         (WebCore::MediaPlayerPrivateAVFoundationObjC::trackEnabledDidChange): New.
107         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Correct logging.
108         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Remove old "enabled" listeners
109             before release tracks, add new ones to new tracks.
110         (WebCore::assetTrackMetadataKeyNames): Add "enabled" to the list of properties we require to 
111             be loaded before announcing that metadata has loaded.
112         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Observe 
113             "readyForDisplay" and "enabled".
114
115         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
116         (WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
117             enabled state of the AVPlayerItemTrack during setup.
118
119 2014-05-13  Myles C. Maxfield  <litherum@gmail.com>
120
121         Text decorations do not contribute to visual overflow
122         https://bugs.webkit.org/show_bug.cgi?id=132773
123
124         Reviewed by Darin Adler.
125
126         Tests: fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html
127
128         * rendering/InlineTextBox.cpp:
129         (WebCore::textDecorationStrokeThickness): Refactor into a common function
130         (WebCore::wavyOffsetFromDecoration): Ditto
131         (WebCore::InlineTextBox::extendVerticalVisualOverflowForDecorations): Given
132         vertical overflow bounds, possibly extend those to include location of
133         decorations.
134         (WebCore::InlineTextBox::paintDecoration): Use refactored functions.
135         * rendering/InlineTextBox.h: Function signature
136         * rendering/RenderBlockLineLayout.cpp:
137         (WebCore::setLogicalWidthForTextRun): Call extendVerticalVisualOverflowForDecorations()
138         * rendering/style/RenderStyle.cpp:
139         (WebCore::RenderStyle::changeAffectsVisualOverflow): Inspects shadows and text decorations
140         (WebCore::RenderStyle::changeRequiresLayout): Calls changeAffectsVisualOverflow()
141         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Moved code from here
142         to changeAffectsVisualOverflow().
143         * rendering/style/RenderStyle.h: Function signature
144
145 2014-05-13  Enrica Casucci  <enrica@apple.com>
146
147         REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
148         https://bugs.webkit.org/show_bug.cgi?id=132879
149         <rdar://problem/16318049>
150
151         Reviewed by Benjamin Poulain.
152
153         Adding some exports. The fix to setScrollPosition is to avoid clamping the scroll
154         position when using delegate scrolling.
155
156         * WebCore.exp.in:
157         * platform/ScrollView.cpp:
158         (WebCore::ScrollView::setScrollPosition):
159
160 2014-05-13  Brady Eidson  <beidson@apple.com>
161
162         Followup to: Update positioning/drawing of the image controls button.
163         <rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883
164
165         Reviewed by Tim Horton.
166
167         Cleared up the actual intent behind review feedback on the original patch.
168
169         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
170         (WebCore::ImageControlsButtonElementMac::maybeCreate):
171
172 2014-05-13  Brady Eidson  <beidson@apple.com>
173
174         Update positioning/drawing of the image controls button.
175         <rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883
176
177         Reviewed by Tim Horton.
178
179         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
180         (WebCore::ImageControlsButtonElementMac::maybeCreate): Add inline style for top/right
181           positioning based on the metrics from the render theme.
182
183         * html/shadow/mac/imageControlsMac.css:
184         (.x-webkit-image-controls-button): Can’t hard code any positioning.
185
186         * rendering/RenderTheme.h:
187         (WebCore::RenderTheme::imageControlsButtonPositionOffset):
188         * rendering/RenderThemeMac.h:
189         * rendering/RenderThemeMac.mm:
190         (WebCore::RenderThemeMac::servicesRolloverButtonCell):
191         (WebCore::RenderThemeMac::imageControlsButtonPositionOffset):
192
193 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
194
195         [iOS WK2] background-attachment:fixed behaves very poorly
196         https://bugs.webkit.org/show_bug.cgi?id=132881
197         <rdar://problem/16789526>
198
199         Reviewed by Beth Dakin.
200
201         Remove the old ENABLE_FAST_MOBILE_SCROLLING code, and add a setting that
202         controls whether fixed backgrounds paint relative to the document, which
203         is enabled for iOS (WK1 and WK2). This setting is consulted when we repaint
204         fixed backgrounds on scrolling, when we paint them, and when we decide to make
205         a layer for fixed backgrounds.
206         
207         * page/Settings.cpp:
208         * page/Settings.in:
209         * rendering/RenderBoxModelObject.cpp:
210         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
211         * rendering/RenderElement.cpp:
212         (WebCore::RenderElement::styleWillChange):
213         (WebCore::RenderElement::willBeRemovedFromTree):
214         (WebCore::shouldRepaintFixedBackgroundsOnScroll): Deleted.
215         * rendering/RenderLayerCompositor.cpp:
216         (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
217
218 2014-05-13  Zalan Bujtas  <zalan@apple.com>
219
220         REGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly when SVG text is selected.
221         https://bugs.webkit.org/show_bug.cgi?id=132868
222
223         Reviewed by Dirk Schulze.
224
225         Scale the selection rect. r168528 missed applying this final transform on the selection/painting rect.
226
227         Test: svg/text/hidpi-text-selection-rect-position.html
228
229         * rendering/svg/SVGInlineTextBox.cpp:
230         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
231
232 2014-05-13  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
233
234         ASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
235         in WebCore::CSSCalcBinaryOperation::createSimplified
236         https://bugs.webkit.org/show_bug.cgi?id=132870
237
238         According to the standard, calc() should be able to handle angle, time
239         and frequency values as well: http://www.w3.org/TR/css3-values/#calc
240
241         Reviewed by Darin Adler.
242
243         Test: fast/css/calc-with-angle-time-frequency.html
244
245         * css/CSSCalculationValue.cpp:
246         (WebCore::unitCategory):
247         (WebCore::CSSCalcPrimitiveValue::createCalcExpression):
248         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
249         (WebCore::CSSCalcPrimitiveValue::addSubtractResult):
250         (WebCore::CSSCalcPrimitiveValue::determineCategory):
251         (WebCore::CSSCalcBinaryOperation::primitiveType)
252         * css/CSSCalculationValue.h: extending CalculationCategory
253         * css/CSSParser.cpp:
254         (WebCore::CSSParser::validCalculationUnit):
255         * css/CSSPrimitiveValue.cpp:
256         (WebCore::CSSPrimitiveValue::primitiveType):
257
258 2014-05-13  Darin Adler  <darin@apple.com>
259
260         Try to fix the !ENABLE(ICONDATABASE) build
261
262         * loader/icon/IconDatabase.h: Include WTFString.h.
263
264 2014-05-13  Carlos Garcia Campos  <cgarcia@igalia.com>
265
266         REGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed
267         https://bugs.webkit.org/show_bug.cgi?id=132864
268
269         Reviewed by Philippe Normand.
270
271         This is because the virtual methods changed the API in the parent,
272         and since we don't have the methods marked as override we didn't
273         noticed it. After using override keyword for all virtual methods
274         in the derived class another problem showed up, the ActiveListBox
275         selection methods were incorrectly named.
276
277         * platform/gtk/RenderThemeGtk.cpp:
278         (WebCore::RenderThemeGtk::paintTextArea): Update to API changes in the
279         parent class.
280         * platform/gtk/RenderThemeGtk.h: Mark all virtual methods as
281         override and the class as final.
282         * platform/gtk/RenderThemeGtk2.cpp:
283         (WebCore::RenderThemeGtk::paintTextField): Update to API changes
284         in the parent class.
285         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
286         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
287         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
288         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
289         (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
290         (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
291         (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
292         (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
293         * platform/gtk/RenderThemeGtk3.cpp:
294         (WebCore::RenderThemeGtk::paintTextField): Update to API changes
295         in the parent class.
296         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
297         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
298         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
299         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
300         (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
301         (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
302         (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
303         (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
304
305 2014-05-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
306
307         [GStreamer] Move toGstClockTime to utilities
308         https://bugs.webkit.org/show_bug.cgi?id=132702
309
310         Reviewed by Philippe Normand.
311
312         toGstClockTime should be in GStreamerUtilities and corrected typo
313         in getGstPlayFlag.
314
315         No new tests needed.
316
317         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
318         (WebCore::getGstPlayFlag): Renamed from getGstPlaysFlag.
319         (WebCore::toGstClockTime): Moved from MediaPlayerPrivateGStreamer.
320         (WebCore::getGstPlaysFlag): Deleted.
321         * platform/graphics/gstreamer/GStreamerUtilities.h:
322         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
323         (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
324         Corrected getGstPlayFlag typo.
325         (WebCore::toGstClockTime): Deleted.
326
327 2014-05-12  Darin Adler  <darin@apple.com>
328
329         Make a few icon database improvements
330         https://bugs.webkit.org/show_bug.cgi?id=132812
331
332         Reviewed by Brady Eidson.
333
334         * WebCore.exp.in: Export more IconDatabase functions, since they are now called
335         by WebKit2 through pointers to a class marked final.
336
337         * loader/icon/IconDatabase.cpp: Removed unneeded includes. Use override for
338         virtual functions.
339
340         * loader/icon/IconDatabase.h: Removed unneeded includes. Marked the class final.
341         Use override for virtual functions. Use a public constructor instead of a create
342         function.
343
344         * loader/icon/IconDatabaseBase.h: Removed unneeded includes.
345
346 2014-05-13  Kiran  <kiran.guduru@samsung.com>
347
348         [MediaStream] MediaStream.addTrack Should not check for active state.
349         https://bugs.webkit.org/show_bug.cgi?id=132558
350
351         Reviewed by Eric Carlson.
352
353         MediaStream.addTrack method is checking for active state of a
354         MediaStream, but it should not check for active state while adding a Track.
355
356         Test: fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html
357
358         * Modules/mediastream/MediaStream.cpp:
359         (WebCore::MediaStream::addTrack):
360
361 2014-05-12  Mark Lam  <mark.lam@apple.com>
362
363         WebKit2 on iOS needs to capture the main thread's floating point environment.
364         <https://webkit.org/b/132755>
365
366         Reviewed by Geoffrey Garen.
367
368         For iOS, WorkerThread::workerThread() expects to be able to initialize the
369         worker thread's floating point environment to be the same as the one in the
370         main thread.  The FP env of the main thread is expected to have been captured
371         in the mainThreadFEnv global.  On WebKit2 for iOS, we neglected to initialize
372         mainThreadFEnv.
373
374         We now introduce a FloatingPointEnvironment class that will encapsulate the main
375         thread (aka "UIThread") fenv, and we'll call FloatingPointEnv::saveMainThreadEnvironment()
376         from ChildProcess::platformInitialize() to ensure that the FloatingPointEnvironment
377         singleton instance is initialized properly for WebKit2.
378
379         In the ChildProcess::platformInitialize(), we also need to initialize the ARMv7
380         FP env to support denormalized numbers.  We'll do this before calling
381         saveMainThreadEnvironment().
382
383         Tests: fast/workers/worker-floating-point.html
384                js/floating-point-denormalized.html
385
386         * WebCore.exp.in:
387         * WebCore.xcodeproj/project.pbxproj:
388         * platform/ios/wak/FloatingPointEnvironment.cpp: Added.
389         (WebCore::FloatingPointEnvironment::env):
390         (WebCore::FloatingPointEnvironment::FloatingPointEnvironment):
391         (WebCore::FloatingPointEnvironment::enableDenormalSupport):
392         (WebCore::FloatingPointEnvironment::saveMainThreadEnvironment):
393         (WebCore::FloatingPointEnvironment::propagateMainThreadEnvironment):
394         * platform/ios/wak/FloatingPointEnvironment.h: Added.
395         * platform/ios/wak/WebCoreThread.h:
396         * platform/ios/wak/WebCoreThread.mm:
397         (RunWebThread):
398         (StartWebThread):
399         * workers/WorkerThread.cpp:
400         (WebCore::WorkerThread::workerThread):
401
402 2014-05-12  Dirk Schulze  <krit@webkit.org>
403
404         SVG root element accepts background color but fails to repaint it
405         https://bugs.webkit.org/show_bug.cgi?id=63153
406
407         Reviewed by Dean Jackson.
408
409         This is back ported from Blink. Don't know the exact commit though.
410         The patch checks if the SVGSVGElement is an outermost root element.
411         If it is, mark the whole element for repaint.
412
413         Test: svg/custom/svg-root-background.html
414
415         * rendering/RenderBoxModelObject.cpp:
416         (WebCore::RenderBoxModelObject::calculateHasBoxDecorations):
417         (WebCore::RenderBoxModelObject::updateFromStyle):
418         * rendering/RenderBoxModelObject.h:
419         * rendering/svg/RenderSVGRoot.cpp:
420         (WebCore::RenderSVGRoot::RenderSVGRoot):
421         (WebCore::RenderSVGRoot::layout):
422         (WebCore::RenderSVGRoot::paintReplaced):
423         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
424             This is a simple optimization by taking the necessary parts
425             from RenderReplaced and SVGRenderSupport.
426         * rendering/svg/RenderSVGRoot.h:
427
428 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
429
430         [iOS] Fixed items are sometimes clipped after rubber-banding
431         https://bugs.webkit.org/show_bug.cgi?id=132851
432         <rdar://problem/16870790>
433
434         Reviewed by Benjamin Poulain.
435
436         On iOS fixed-position layers would get clipped to the document rect,
437         but with rubber-banding, we can now have a custom fixed postion rect
438         that extends outside the document rect.
439         
440         Another issue was that we would un-composite fixed elements sometimes
441         when scrolling fast, again because they could fall outside of the document rect.
442         
443         A final issue was that pinching could reveal parts of fixed elements that should
444         lie outside the viewport, rather than clipping the layers.
445         
446         Fix by converting both call points to use viewportConstrainedVisibleContentRect()
447         rather than viewportConstrainedExtentRect(). On non-iOS platforms these are
448         the same, but on iOS viewportConstrainedVisibleContentRect() uses the
449         custom fixed position rect, which is the correct rect to intersect with.
450
451         * rendering/RenderLayerBacking.cpp:
452         (WebCore::RenderLayerBacking::updateCompositedBounds):
453         * rendering/RenderLayerCompositor.cpp:
454         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
455
456 2014-05-06  Jon Honeycutt  <jhoneycutt@apple.com>
457
458         Don't dispatch 'beforeload' event inside FrameView::layout()
459
460         https://bugs.webkit.org/show_bug.cgi?id=132621
461         <rdar://problem/15661470>
462
463         This merges Blink revision 162073 with minor renaming and style
464         changes. From that commit:
465
466         Executing JavaScript code inside FrameView::layout() is problematic.
467         e.g. an assertion failure tested in fast/events/beforeload-assertion.html.
468         We should avoid it.
469
470         This CL makes 'beforeload' event dispatching for plugins and iframes asynchronous,
471         except plugin access from JavaScript code (HTMLPlugInElement::
472         renderWidgetForJSBindings).
473
474         Reviewed by Brent Fulgham.
475
476         Tests: fast/events/beforeload-assertion.html
477                fast/events/beforeload-iframe-crash.html
478                fast/events/beforeload-input-time-crash.html
479
480         * WebCore.exp.in:
481         * dom/Document.cpp:
482         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
483         * dom/Document.h:
484         * html/HTMLAppletElement.cpp:
485         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
486         * html/HTMLEmbedElement.cpp:
487         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
488         * html/HTMLObjectElement.cpp:
489         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
490         * page/FrameView.cpp:
491         (WebCore::FrameView::FrameView):
492         (WebCore::FrameView::reset):
493         (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
494         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
495         (WebCore::FrameView::performPostLayoutTasks):
496         * page/FrameView.h:
497         * testing/Internals.cpp:
498         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
499         * testing/Internals.h:
500         * testing/Internals.idl:
501
502 2014-05-12  Roger Fong  <roger_fong@apple.com>
503
504         Limit number of active graphics contexts per web process.
505         https://bugs.webkit.org/show_bug.cgi?id=132833.
506         <rdar://problem/16888459>
507
508         Reviewed by Dean Jackson.
509
510         Test: webgl/many-contexts.html
511
512         * platform/graphics/GraphicsContext3D.h:
513         * platform/graphics/mac/GraphicsContext3DMac.mm: Limit number of active contexts to 16.
514         (WebCore::GraphicsContext3D::create):
515         (WebCore::GraphicsContext3D::~GraphicsContext3D):
516
517 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
518
519         Build fix fix.
520
521         * page/scrolling/ScrollingCoordinator.cpp:
522         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
523
524 2014-05-12  Brent Fulgham  <bfulgham@apple.com>
525
526         DataDetectorUI doesn't update with resize
527         https://bugs.webkit.org/show_bug.cgi?id=132830
528         <rdar://problem/16871179>
529
530         Reviewed by Simon Fraser.
531
532         * editing/Editor.cpp:
533         (WebCore::Editor::scanSelectionForTelephoneNumbers): Add public, no-argument
534         version that can be called after layout changes.
535         (WebCore::Editor::didLayout): Reprocess telephone number data
536         since Ranges will have changed.
537         * editing/Editor.h:
538         * editing/FrameSelection.cpp:
539         (WebCore::FrameSelection::updateDataDetectorsForSelection): Added.
540         * editing/FrameSelection.h:
541         * page/FrameView.cpp:
542         (WebCore::FrameView::performPostLayoutTasks): Ask the FrameSelection to update the
543         Range information for selected phone numbers.
544
545 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
546
547         Fix the iOS build.
548
549         * page/scrolling/ScrollingCoordinator.cpp:
550         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
551
552 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
553
554         [iOS WK2] Fuzzy tiles on some sites on loading
555         https://bugs.webkit.org/show_bug.cgi?id=132847
556         <rdar://problem/16816178>
557
558         Reviewed by Benjamin Poulain.
559
560         Export WebCore::TileController::contentsScale() const
561
562         * WebCore.exp.in:
563
564 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
565
566         Add debug dumping for ViewportConfiguration
567         https://bugs.webkit.org/show_bug.cgi?id=132843
568
569         Reviewed by Benjamin Poulain.
570
571         Add some TextStream-based dumping for ViewportConfiguration.
572
573         * page/ViewportConfiguration.cpp:
574         (WebCore::ViewportConfiguration::updateConfiguration):
575         (WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream):
576         (WebCore::ViewportConfigurationTextStream::increaseIndent):
577         (WebCore::ViewportConfigurationTextStream::decreaseIndent):
578         (WebCore::dumpProperty):
579         (WebCore::ViewportConfigurationTextStream::writeIndent):
580         (WebCore::ViewportConfigurationTextStream::operator<<):
581         (WebCore::ViewportConfiguration::description):
582         (WebCore::ViewportConfiguration::dump):
583         * page/ViewportConfiguration.h:
584
585 2014-05-12  Brady Eidson  <beidson@apple.com>
586
587         Followup to "Teach Editor to support more direct replacement of a Node"
588         <rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834
589
590         Pair programmed and pair reviewed by Brady Eidson and Darin Adler.
591
592         * editing/mac/EditorMac.mm:
593         (WebCore::maybeCopyNodeAttributesToFragment):
594         (WebCore::Editor::replaceNodeFromPasteboard):
595
596 2014-05-12  Beth Dakin  <bdakin@apple.com>
597
598         Content shadow layer needs to move in sync with the content layer
599         https://bugs.webkit.org/show_bug.cgi?id=132841
600         -and corresponding-
601         <rdar://problem/16641115>
602
603         Reviewed by Simon Fraser.
604
605         Now that the root content layer moves a little bit (for y scroll positions between 
606         0 and topContentInset), the shadow layer needs to move along with it since the 
607         shadow layer should always have the same position as the root content layer.
608
609         Set the root state node’s shadow layer, and update the position whenever the root 
610         content layer’s position is updated.
611         * page/scrolling/AsyncScrollingCoordinator.cpp:
612         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
613         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
614
615         Fetch the compositor’s layerForContentShadow().
616         * page/scrolling/ScrollingCoordinator.cpp:
617         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
618         * page/scrolling/ScrollingCoordinator.h:
619
620         Hook up the contentShadowLayer in the state node.
621         * page/scrolling/ScrollingStateScrollingNode.cpp:
622         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
623         (WebCore::ScrollingStateScrollingNode::setContentShadowLayer):
624
625         Hook it up in the ScrollingTreeNode as well. Move the layer whenever the m
626         _scrolledContentsLayer is moved.
627         * page/scrolling/ScrollingStateScrollingNode.h:
628         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
629         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
630         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
631         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
632
633         The shadow layer needs an anchor point now that we are moving it around.
634         * rendering/RenderLayerCompositor.cpp:
635         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
636
637 2014-05-12  Dirk Schulze  <krit@webkit.org>
638
639         <svg> with opacity and compositing double-applies its opacity
640         https://bugs.webkit.org/show_bug.cgi?id=116856
641
642         Reviewed by Simon Fraser.
643
644         The opacity is applied by the compositor. However, all SVG elements
645         create transparency layers on their own to apply opacity. So did
646         SVGSVGElement.
647
648         Added a check if the current element has a compositing layer and skip
649         creating transparency layer if it has.
650
651         Test: svg/custom/composited-svg-with-opacity.html
652
653         * rendering/svg/SVGRenderingContext.cpp:
654         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
655
656 2014-05-12  Brady Eidson  <beidson@apple.com>
657
658         Teach Editor to support more direct replacement of a Node
659         <rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834
660
661         Reviewed by Enrica Casucci.
662
663         The new method "Editor::replaceNodeFromPasteboard" has the intent that the new DocumentFragment
664         from the pasteboard is as similar to the old Node as possible.
665
666         In practice, the new DocumentFragment:
667         1 - Can represent a single node that's missing various attributes the original Node had.
668         2 - Can be an unwanted fragment of arbitrary depth when the replacement happens inside Mail.app
669
670         This fixes both of these issues.
671
672         Add a MailBlockquoteHandling enum class for various Editor operations to pass through to the
673         ReplaceSelectionCommand:
674         * editing/Editor.cpp:
675         (WebCore::Editor::handleTextEvent):
676         (WebCore::Editor::pasteAsFragment):
677         (WebCore::Editor::pasteWithPasteboard):
678         (WebCore::Editor::replaceSelectionWithFragment):
679         * editing/Editor.h:
680
681         * dom/TextEvent.cpp:
682         (WebCore::TextEvent::createForPlainTextPaste):
683         (WebCore::TextEvent::createForFragmentPaste):
684         (WebCore::TextEvent::TextEvent):
685         * dom/TextEvent.h:
686         (WebCore::TextEvent::mailBlockquoteHandling):
687
688         * editing/ReplaceSelectionCommand.cpp:
689         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
690         (WebCore::ReplaceSelectionCommand::doApply): Consider whether or not this particular Editor
691           operation was meant to give special consideration to Mail's Blockquotes.
692         * editing/ReplaceSelectionCommand.h:
693
694         * editing/efl/EditorEfl.cpp:
695         (WebCore::Editor::pasteWithPasteboard):
696         * editing/ios/EditorIOS.mm:
697         (WebCore::Editor::pasteWithPasteboard):
698
699         * editing/mac/EditorMac.mm:
700         (WebCore::Editor::pasteWithPasteboard):
701         (WebCore::Editor::readSelectionFromPasteboard):
702         (WebCore::maybeCopyNodeAttributesToFragment): If the new DocumentFragment represents a single HTML node
703           with the same tag name is the original HTML node, copy over most attributes from the original node.
704         (WebCore::Editor::replaceNodeFromPasteboard): Create the fragment, run it through maybeCopyNodeAttributesToFragment.
705
706         * WebCore.exp.in:
707
708 2014-05-12  Alex Christensen  <achristensen@webkit.org>
709
710         Progress on web timing.
711         https://bugs.webkit.org/show_bug.cgi?id=132574
712
713         Reviewed by Alexey Proskuryakov.
714
715         * CMakeLists.txt:
716         Removed ResourceLoadTiming.cpp.
717         * WebCore.exp.in:
718         Added linker symbols for ResourceLoadTiming.
719         * WebCore.xcodeproj/project.pbxproj:
720         * WebCore.vcxproj/WebCore.vcxproj:
721         * WebCore.vcxproj/WebCore.vcxproj.filters:
722         Removed ResourceLoadTiming.cpp.
723         * inspector/InspectorResourceAgent.cpp:
724         (WebCore::buildObjectForTiming):
725         * inspector/protocol/Network.json:
726         Updated ResourceTiming structure.
727         * loader/DocumentLoadTiming.cpp:
728         (WebCore::DocumentLoadTiming::setNavigationStart):
729         * loader/DocumentLoadTiming.h:
730          Deleted unused setNavigationStart function.
731         * page/Performance.idl:
732         Updated spec URL.
733         * page/PerformanceResourceTiming.cpp:
734         (WebCore::PerformanceResourceTiming::domainLookupStart):
735         (WebCore::PerformanceResourceTiming::domainLookupEnd):
736         (WebCore::PerformanceResourceTiming::connectStart):
737         (WebCore::PerformanceResourceTiming::secureConnectionStart):
738         (WebCore::PerformanceResourceTiming::responseEnd):
739         Updated ResourceLoadTiming member variable names.
740         (WebCore::PerformanceResourceTiming::responseStart):
741         * page/PerformanceResourceTiming.h:
742         * page/PerformanceResourceTiming.idl:
743         Deleted responseStart because it is not in the spec.
744         * page/PerformanceTiming.cpp:
745         (WebCore::PerformanceTiming::domainLookupStart):
746         (WebCore::PerformanceTiming::domainLookupEnd):
747         (WebCore::PerformanceTiming::connectStart):
748         (WebCore::PerformanceTiming::secureConnectionStart):
749         (WebCore::PerformanceTiming::requestStart):
750         (WebCore::PerformanceTiming::responseStart):
751         Updated ResourceLoadTiming member variable names.
752         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
753         Use navigationStart as base for resource load times.
754         * page/PerformanceTiming.idl:
755         Updated spec URL.
756         * platform/network/HTTPParsers.h:
757         Removed unused class declarations.
758         * platform/network/ResourceHandle.h:
759         Moved soup request time from ResourceLoadTiming to ResourceHandle.
760         * platform/network/ResourceLoadTiming.cpp: Removed.
761         * platform/network/ResourceLoadTiming.h:
762         (WebCore::ResourceLoadTiming::deepCopy):
763         (WebCore::ResourceLoadTiming::operator==):
764         (WebCore::ResourceLoadTiming::ResourceLoadTiming):
765         Updated ResourceLoadTiming member variable names.
766         * platform/network/mac/ResourceHandleMac.mm:
767         (WebCore::ResourceHandle::createNSURLConnection):
768         Collect timing data.
769         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
770         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
771         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
772         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
773         Save timing data to a ResourceLoadTiming on the ResourceResponse.
774         * platform/network/soup/ResourceHandleSoup.cpp:
775         (WebCore::gotHeadersCallback):
776         (WebCore::restartedCallback):
777         (WebCore::milisecondsSinceRequest):
778         (WebCore::ResourceHandle::didStartRequest):
779         (WebCore::networkEventCallback):
780         (WebCore::createSoupMessageForHandleAndRequest):
781         (WebCore::ResourceHandle::sendPendingRequest):
782         Updated ResourceLoadTiming member variable names.
783         (WebCore::wroteBodyCallback): Deleted.
784
785 2014-05-12  Dirk Schulze  <krit@webkit.org>
786
787         SVG outline property is broken and inefficient
788         https://bugs.webkit.org/show_bug.cgi?id=113666
789
790         Reviewed by Dean Jackson.
791
792         Patch by Erik Dahlström backported from Blink.
793
794         "[SVG2] css 'outline' property should apply to svg elements 
795
796         The 'outline' property was only partially working in SVG before
797         this patch, this makes it work on text and text content child
798         elements too. 
799
800         This makes SVG render the outlines as part of the foreground paint
801         phase. 
802
803         Partly based on Florin Malita's webkit patch https://bugs.webkit.org/show_bug.cgi?id=113666#c12."
804
805         Tests: svg/custom/outline-stacking-expected.svg
806                svg/custom/outline-stacking.svg
807                svg/custom/rgba-color-outline.svg
808                svg/text/text-outline-expected.svg
809                svg/text/text-outline-rgba.html
810                svg/text/text-outline.html
811                svg/text/textpath-outline-expected.svg
812                svg/text/textpath-outline.svg
813                svg/text/tspan-multiple-outline.svg
814                svg/text/tspan-outline-2-expected.svg
815                svg/text/tspan-outline-2.svg
816                svg/text/tspan-outline-expected.svg
817                svg/text/tspan-outline.html
818
819         * rendering/svg/RenderSVGContainer.cpp:
820         (WebCore::RenderSVGContainer::paint): Draw outline in forground
821             paint phase.
822         * rendering/svg/RenderSVGImage.cpp:
823         (WebCore::RenderSVGImage::paint): Draw outline in forground
824             paint phase.
825         * rendering/svg/RenderSVGRoot.cpp:
826         (WebCore::RenderSVGRoot::paintReplaced): Pass paint offset.
827         * rendering/svg/RenderSVGShape.cpp:
828         (WebCore::RenderSVGShape::paint): Draw outline in forground
829             paint phase.
830         * rendering/svg/RenderSVGText.cpp:
831         (WebCore::RenderSVGText::paint): Draw outline in forground
832             paint phase.
833         * rendering/svg/SVGInlineFlowBox.cpp:
834         (WebCore::SVGInlineFlowBox::paint): Pass paint offset.
835         * rendering/svg/SVGInlineTextBox.cpp:
836         (WebCore::SVGInlineTextBox::paint): Draw outline in forground
837             paint phase.
838         * rendering/svg/SVGRootInlineBox.cpp:
839         (WebCore::SVGRootInlineBox::paint): Pass paint offset.
840
841 2014-05-12  Beth Dakin  <bdakin@apple.com>
842
843         Layer for bottom overhang area needs to be offset by the topContentInset
844         https://bugs.webkit.org/show_bug.cgi?id=132835
845         -and corresponding-
846         <rdar://problem/16641115>
847
848         Reviewed by Simon Fraser.
849
850         Push this layer down by the topContentInset in addition to the root layer height, 
851         footer height, and header height.
852         * rendering/RenderLayerCompositor.cpp:
853         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
854
855 2014-05-09  Jon Honeycutt  <jhoneycutt@apple.com>
856
857         REGRESSION (r167818): editing/inserting/typing-space-to-trigger-smart-link.html fails on WebKit1 bots
858
859         <https://bugs.webkit.org/show_bug.cgi?id=132207>
860         <rdar://problem/16730393>
861
862         Reverts the previous workaround in favor of a more specific fix for the
863         null dereference.
864
865         Reviewed by Darin Adler.
866
867         * editing/ApplyStyleCommand.cpp:
868         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
869         Check whether the run's start and end are still in the document, as
870         removeConflictingInlineStyleFromRun() may have removed them.
871
872         * editing/CompositeEditCommand.cpp:
873         (WebCore::CompositeEditCommand::apply):
874         Reverted previous workaround.
875         (WebCore::ApplyEditCommand::ReentrancyGuard::isRecursiveCall): Deleted.
876         (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::Scope): Deleted.
877         (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::~Scope): Deleted.
878
879 2014-05-12  Zan Dobersek  <zdobersek@igalia.com>
880
881         Clean up CrossThreadTask
882         https://bugs.webkit.org/show_bug.cgi?id=132800
883
884         Reviewed by Darin Adler.
885
886         Remove the createCallbackTask overloads and the related CrossThreadTask helper classes.
887
888         Instead, have one simple CrossThreadTask class that derives from ScriptExecutionContext::Task.
889         Its templated constructor takes in the method and the variadic pack of parameters. The cross-thread
890         copies of the parameters are then bound to that method and the resulting bind expression is used to
891         initialize the base class. The bind expression is constructed with a placeholder for the
892         ScriptExecutionContext* parameter that's provided through ScriptExecutionContext::Task::performTask().
893
894         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
895         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
896         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
897         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
898         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
899         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
900         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
901         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
902         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
903         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
904         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
905         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
906         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
907         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
908         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
909         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
910         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
911         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
912         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
913         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
914         (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
915         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
916         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
917         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
918         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
919         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
920         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
921         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
922         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
923         * dom/CrossThreadTask.h:
924         (WebCore::CrossThreadTask::CrossThreadTask):
925         (WebCore::CrossThreadTask1::CrossThreadTask1): Deleted.
926         (WebCore::CrossThreadTask1::performTask): Deleted.
927         (WebCore::CrossThreadTask2::CrossThreadTask2): Deleted.
928         (WebCore::CrossThreadTask2::performTask): Deleted.
929         (WebCore::CrossThreadTask3::CrossThreadTask3): Deleted.
930         (WebCore::CrossThreadTask3::performTask): Deleted.
931         (WebCore::CrossThreadTask4::CrossThreadTask4): Deleted.
932         (WebCore::CrossThreadTask4::performTask): Deleted.
933         (WebCore::CrossThreadTask5::CrossThreadTask5): Deleted.
934         (WebCore::CrossThreadTask5::performTask): Deleted.
935         (WebCore::CrossThreadTask6::CrossThreadTask6): Deleted.
936         (WebCore::CrossThreadTask6::performTask): Deleted.
937         (WebCore::CrossThreadTask7::CrossThreadTask7): Deleted.
938         (WebCore::CrossThreadTask7::performTask): Deleted.
939         (WebCore::CrossThreadTask8::CrossThreadTask8): Deleted.
940         (WebCore::CrossThreadTask8::performTask): Deleted.
941         (WebCore::createCallbackTask): Deleted.
942         * fileapi/FileReader.cpp:
943         (WebCore::FileReader::abort):
944         * loader/WorkerThreadableLoader.cpp:
945         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
946         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
947         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
948         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
949         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
950         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
951         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
952         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
953         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
954         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
955         * loader/WorkerThreadableLoader.h:
956         * loader/cache/MemoryCache.cpp:
957         (WebCore::MemoryCache::removeRequestFromCache):
958         (WebCore::MemoryCache::removeRequestFromSessionCaches):
959         * workers/DefaultSharedWorkerRepository.cpp:
960         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
961         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
962         * workers/WorkerMessagingProxy.cpp:
963         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
964         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
965         (WebCore::WorkerMessagingProxy::connectToInspector):
966         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
967         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
968
969 2014-05-12  Alex Christensen  <achristensen@webkit.org>
970
971         Implement EXT_shader_texture_lod in WebGL.
972         https://bugs.webkit.org/show_bug.cgi?id=128985
973         <rdar://problem/16111396>
974
975         Based on Chromium patch by bajones@chromium.org.
976         https://src.chromium.org/viewvc/blink?revision=171465&view=revision
977
978         Reviewed by Dean Jackson.
979
980         Test: webgl/conformance/extensions/ext-shader-texture-lod.html
981         
982         * CMakeLists.txt:
983         * DerivedSources.cpp:
984         * DerivedSources.make:
985         * WebCore.vcxproj/WebCore.vcxproj:
986         * WebCore.vcxproj/WebCore.vcxproj.filters:
987         * WebCore.xcodeproj/project.pbxproj:
988         Added new EXTShaderTextureLOD files.
989         * bindings/js/JSWebGLRenderingContextCustom.cpp:
990         (WebCore::toJS):
991         Added EXTShaderTextureLOD.
992         * html/canvas/EXTShaderTextureLOD.cpp: Added.
993         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
994         (WebCore::EXTShaderTextureLOD::~EXTShaderTextureLOD):
995         (WebCore::EXTShaderTextureLOD::getName):
996         * html/canvas/EXTShaderTextureLOD.h: Added.
997         * html/canvas/EXTShaderTextureLOD.idl: Added.
998         * html/canvas/WebGLExtension.h:
999         Added EXTShaderTextureLODName.
1000         * html/canvas/WebGLObject.cpp:
1001         Removed unused inclusion of EXTTextureFilterAnisotropic.h.
1002         * html/canvas/WebGLRenderingContext.cpp:
1003         (WebCore::WebGLRenderingContext::getExtension):
1004         Added EXT_shader_texture_lod.
1005         * html/canvas/WebGLRenderingContext.h:
1006         Added a EXTShaderTextureLOD member variable.
1007
1008 2014-05-12  Martin Hock  <mhock@apple.com>
1009
1010         Disallow drag and drop of non-displayable resources.
1011         https://bugs.webkit.org/show_bug.cgi?id=132745
1012         <rdar://problem/10562662>
1013
1014         Reviewed by Alexey Proskuryakov.
1015
1016         Test: http/tests/security/drag-drop-local-file.html
1017
1018         * page/DragController.cpp:
1019         (WebCore::DragController::startDrag):
1020
1021 2014-05-12  Jozsef Berta  <jberta.u-szeged@partner.samsung.com>
1022
1023         WinCairo buildfix after r168611
1024         https://bugs.webkit.org/show_bug.cgi?id=132825
1025
1026         Reviewed by Darin Adler.
1027
1028         * platform/network/curl/CurlDownload.cpp:
1029         (WebCore::CurlDownloadManager::downloadThread):
1030         (WebCore::CurlDownload::didReceiveHeader):
1031         (WebCore::CurlDownload::didReceiveData):
1032
1033 2014-05-12  Antti Koivisto  <antti@apple.com>
1034
1035         REGRESSION (r159560): Text clips on tile border if line-height < font-size
1036         https://bugs.webkit.org/show_bug.cgi?id=132822
1037
1038         Reviewed by Andreas Kling.
1039         
1040         The first line of simple line layout run range was miscomputed.
1041
1042         Test: fast/text/simple-lines-range-low-line-height.html
1043
1044         * rendering/SimpleLineLayoutResolver.h:
1045         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
1046         
1047             Lines may overlap if line-height < font-size. Apply different adjustment when searching for range begin
1048             so that overflowing earlier lines are taken into account.
1049
1050         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
1051
1052 2014-05-12  Radu Stavila  <stavila@adobe.com>
1053
1054         Invalid information remaining in lineToRegion map of RenderFlowThread.
1055         https://bugs.webkit.org/show_bug.cgi?id=132690
1056
1057         Reviewed by Antti Koivisto.
1058
1059         Test: fast/multicol/newmulticol/lines-region-map-crash.html
1060
1061         * rendering/RenderFlowThread.cpp:
1062         (WebCore::RenderFlowThread::deleteLines):
1063         * rendering/RenderFlowThread.h:
1064
1065 2014-05-12  Zan Dobersek  <zdobersek@igalia.com>
1066
1067         Clean up MainThreadTask
1068         https://bugs.webkit.org/show_bug.cgi?id=132799
1069
1070         Reviewed by Darin Adler.
1071
1072         Only have one simple MainThreadTask class that derives from std::function<void ()>.
1073         Its templated constructor takes in the method and a variadic pack of parameters.
1074         The cross-thread copies of the parameter are then bound to the given method through
1075         std::bind(), with the resulting bind expression used to initialize the base
1076         std::function<void ()> class.
1077
1078         The WebCore::callOnMainThread() functions and the helper classes are removed in favor
1079         of passing MainThreadTask rvalues directly to WTF::callOnMainThread().
1080
1081         * fileapi/AsyncFileStream.cpp:
1082         (WebCore::AsyncFileStream::startOnFileThread):
1083         (WebCore::AsyncFileStream::stopOnFileThread):
1084         (WebCore::AsyncFileStream::getSizeOnFileThread):
1085         (WebCore::AsyncFileStream::openForReadOnFileThread):
1086         (WebCore::AsyncFileStream::openForWriteOnFileThread):
1087         (WebCore::AsyncFileStream::readOnFileThread):
1088         (WebCore::AsyncFileStream::writeOnFileThread):
1089         (WebCore::AsyncFileStream::truncateOnFileThread):
1090         * platform/MainThreadTask.h:
1091         (WebCore::MainThreadTask::MainThreadTask):
1092         (WebCore::MainThreadTaskBase::MainThreadTaskBase): Deleted.
1093         (WebCore::MainThreadTaskBase::~MainThreadTaskBase): Deleted.
1094         (WebCore::MainThreadTask1::create): Deleted.
1095         (WebCore::MainThreadTask1::MainThreadTask1): Deleted.
1096         (WebCore::MainThreadTask2::create): Deleted.
1097         (WebCore::MainThreadTask2::MainThreadTask2): Deleted.
1098         (WebCore::MainThreadTask3::create): Deleted.
1099         (WebCore::MainThreadTask3::MainThreadTask3): Deleted.
1100         (WebCore::MainThreadTask4::create): Deleted.
1101         (WebCore::MainThreadTask4::MainThreadTask4): Deleted.
1102         (WebCore::MainThreadTask5::create): Deleted.
1103         (WebCore::MainThreadTask5::MainThreadTask5): Deleted.
1104         (WebCore::MainThreadTask6::create): Deleted.
1105         (WebCore::MainThreadTask6::MainThreadTask6): Deleted.
1106         (WebCore::MainThreadTask7::create): Deleted.
1107         (WebCore::MainThreadTask7::MainThreadTask7): Deleted.
1108         (WebCore::MainThreadTask8::create): Deleted.
1109         (WebCore::MainThreadTask8::MainThreadTask8): Deleted.
1110         (WebCore::executeMainThreadTask): Deleted.
1111         (WebCore::callOnMainThread): Deleted.
1112
1113 2014-05-11  Zan Dobersek  <zdobersek@igalia.com>
1114
1115         Simplify FileThread::Task usage
1116         https://bugs.webkit.org/show_bug.cgi?id=132798
1117
1118         Reviewed by Darin Adler.
1119
1120         Remove the createFileThreadTask functions and the related FileThreadTask helper classes.
1121
1122         Instead, the FileThread::Task class now has a templated constructor that takes in a pointer
1123         to the object instance, a method, and a variadic pack of parameters. The pointer and the
1124         cross-thread copies of all the parameters are then bound to the given method through std::bind().
1125
1126         Instead of createFileThreadTask, std::make_unique<>() should be used to construct unique pointers
1127         that wrap FileThread::Task objects.
1128
1129         * WebCore.vcxproj/WebCore.vcxproj:
1130         * WebCore.vcxproj/WebCore.vcxproj.filters:
1131         * WebCore.xcodeproj/project.pbxproj:
1132         * fileapi/AsyncFileStream.cpp:
1133         (WebCore::AsyncFileStream::create):
1134         (WebCore::AsyncFileStream::stop):
1135         (WebCore::AsyncFileStream::getSize):
1136         (WebCore::AsyncFileStream::openForRead):
1137         (WebCore::AsyncFileStream::openForWrite):
1138         (WebCore::AsyncFileStream::close):
1139         (WebCore::AsyncFileStream::read):
1140         (WebCore::AsyncFileStream::write):
1141         (WebCore::AsyncFileStream::truncate):
1142         * fileapi/FileThread.h:
1143         (WebCore::FileThread::Task::Task):
1144         (WebCore::FileThread::Task::performTask):
1145         (WebCore::FileThread::Task::~Task): Deleted.
1146         * fileapi/FileThreadTask.h: Removed.
1147
1148 2014-05-11  Benjamin Poulain  <benjamin@webkit.org>
1149
1150         Do not create a temporary string to append the SVGLength's unit
1151         https://bugs.webkit.org/show_bug.cgi?id=132807
1152
1153         Reviewed by Geoffrey Garen.
1154
1155         * svg/SVGLength.cpp:
1156         (WebCore::lengthTypeToString):
1157         The caller just append the string to a number string. The function
1158         lengthTypeToString() was creating a new WTF::String from scratch,
1159         copied the characters to make a new string, and destroyed the WTF::String.
1160
1161         Instead, just append the string literal.
1162
1163 2014-05-11  Yusuke Suzuki  <utatane.tea@gmail.com>
1164
1165         CSS JIT: reduce cost of computing backtracking height
1166         https://bugs.webkit.org/show_bug.cgi?id=132546
1167
1168         Reviewed by Benjamin Poulain.
1169
1170         Because compiler previously compute backtracking height for
1171         previous child fragment, by leveraging this, we can limit the
1172         `maxPrefixSize` for `computeBacktrackingHeightFromDescendant`.
1173
1174         For example, consider selector "c>a>b>d>a>b e"'s descendant chain,
1175         "c>a>b>d>a>b".
1176
1177         At the <a> position, we have matching pattern [b, a, d, b, a] and
1178         calculate the backtracking height by following method.
1179
1180         pattern:    [b, a, d, b, a]
1181         candidate0:    [b, a, d, b]  => Not matched.
1182         candidate1:       [b, a, d]  => Not matched.
1183         candidate2:          [b, a]  => Matched against the pattern.
1184
1185         At this time, first candidate0's pattern size is `pattern.size() - 1`.
1186         And get backtracking height from descendant 3, that is
1187         `pattern.size() - candidate.size()`, `5 - 2`.
1188
1189         And next, at the <c> position, we calcucate the backtracking height
1190         for this pattern.
1191
1192         pattern:    [b, a, d, b, a, c]
1193         candidate0:    [b, a, d, b, a]  => Not matched.
1194         candidate1:       [b, a, d, b]  => Not matched.
1195         candidate2:          [b, a, d]  => Not matched.
1196         candidate3:             [b, a]  => Not matched.
1197         candidate4:                [b]  => Not matched.
1198         candidate5:                 []  => Matched against the pattern.
1199
1200         Then, we get the backtracking height, which is 6 (6 - 0).
1201         However, in the above case, we already know that attempts from candidate0
1202         to candidate1 always fail, since parts of these are already tested at
1203         the <b> position trial and we know they don't match.
1204
1205         So in this case, we should start this computation from candidate2,
1206         such as,
1207
1208         pattern:    [b, a, d, b, a, c]
1209         candidate2:          [b, a, d]  => Not matched.
1210         candidate3:             [b, a]  => Not matched.
1211         candidate4:                [b]  => Not matched.
1212         candidate5:                 []  => Matched against the pattern.
1213
1214         We can start computation with candidate size
1215         `pattern.size() - previousChildFragmentBacktrackingHeight`.
1216         In this example, `pattern.size()` is 6 and
1217         `previousChildFragmentBacktrackingHeight` is 3, so candidate size is
1218         3, that is candidate2.
1219
1220         * cssjit/SelectorCompiler.cpp:
1221         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
1222         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
1223
1224 2014-05-11  Beth Dakin  <bdakin@apple.com>
1225
1226         Headers and footers are not positioned correctly with topContentInset
1227         https://bugs.webkit.org/show_bug.cgi?id=132787
1228         -and corresponding-
1229         <rdar://problem/16641115>
1230
1231         Reviewed by Tim Horton.
1232
1233         Headers and footers need to take the inset into account, and they also need to 
1234         factor in the fact that the root layer moves around now too.
1235
1236         The existing yPositionForRootContentLayer() is actually the right calculation for 
1237         the header layer. The root content layer wants that value, but pushed down by the 
1238         header height. Now there are static functions for both of them and the footer to 
1239         avoid duplicated code in the three spots where we need this information.
1240         * page/FrameView.cpp:
1241         (WebCore::FrameView::yPositionForHeaderLayer):
1242         (WebCore::FrameView::yPositionForRootContentLayer):
1243         (WebCore::FrameView::yPositionForFooterLayer):
1244         * page/FrameView.h:
1245
1246         Use the static functions to compute the layer positions.
1247         * page/scrolling/AsyncScrollingCoordinator.cpp:
1248         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1249
1250         How did headers ever work with this bug?? I don’t know. We need to return that 
1251         layer.
1252         * page/scrolling/ScrollingCoordinator.cpp:
1253         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
1254
1255         Use the static functions to compute the layer positions.
1256         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1257         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1258         * rendering/RenderLayerCompositor.cpp:
1259         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1260         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1261         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1262
1263 2014-05-11  Zalan Bujtas  <zalan@apple.com>
1264
1265         Subpixel rendering[iOS]: <select> decoration is misaligned when the renderer is on subpixel position.
1266         https://bugs.webkit.org/show_bug.cgi?id=132779
1267         <rdar://problem/16631071>
1268
1269         Reviewed by Simon Fraser.
1270
1271         Push <select> theme decoration's rect to device pixel position to ensure
1272         that the theme bounds are aligned with the renderer's bounds. (in painting terms)
1273         However, as the decoration code paints multiple items, they all need to use snapped 
1274         final coordinates for painting : tracked here https://bugs.webkit.org/show_bug.cgi?id=132780
1275         This patch also changes the padding values for <select> [iOS] to compensate for the integer
1276         truncation that happened before subpixel. 
1277
1278         Not testable.
1279
1280         * css/html.css:
1281         (select):
1282         * platform/efl/RenderThemeEfl.cpp:
1283         (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
1284         * platform/efl/RenderThemeEfl.h:
1285         * platform/gtk/RenderThemeGtk.cpp:
1286         (WebCore::RenderThemeGtk::paintMenuListButtonDecorations):
1287         * platform/gtk/RenderThemeGtk.h:
1288         * rendering/RenderTheme.cpp:
1289         (WebCore::RenderTheme::paintDecorations):
1290         * rendering/RenderTheme.h:
1291         (WebCore::RenderTheme::paintMenuListButtonDecorations):
1292         * rendering/RenderThemeIOS.h:
1293         * rendering/RenderThemeIOS.mm:
1294         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
1295         * rendering/RenderThemeMac.h:
1296         * rendering/RenderThemeMac.mm:
1297         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
1298         * rendering/RenderThemeSafari.cpp:
1299         (WebCore::RenderThemeSafari::paintMenuListButtonDecorations):
1300         * rendering/RenderThemeSafari.h:
1301         * rendering/RenderThemeWin.cpp:
1302         (WebCore::RenderThemeWin::paintMenuList):
1303         (WebCore::RenderThemeWin::paintMenuListButtonDecorations):
1304         * rendering/RenderThemeWin.h:
1305
1306 2014-05-11  Zan Dobersek  <zdobersek@igalia.com>
1307
1308         Move Source/WebCore/workers/ code to std::unique_ptr
1309         https://bugs.webkit.org/show_bug.cgi?id=132401
1310
1311         Reviewed by Darin Adler.
1312
1313         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
1314         with std::unique_ptr.
1315
1316         * bindings/js/JSDOMWindowCustom.cpp:
1317         (WebCore::JSDOMWindow::setTimeout):
1318         (WebCore::JSDOMWindow::setInterval):
1319         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1320         (WebCore::JSWorkerGlobalScope::setTimeout):
1321         (WebCore::JSWorkerGlobalScope::setInterval):
1322         * bindings/js/ScheduledAction.cpp:
1323         (WebCore::ScheduledAction::create):
1324         * bindings/js/ScheduledAction.h:
1325         * page/DOMTimer.cpp:
1326         (WebCore::DOMTimer::DOMTimer):
1327         (WebCore::DOMTimer::install):
1328         (WebCore::DOMTimer::fired):
1329         (WebCore::DOMTimer::didStop):
1330         * page/DOMTimer.h:
1331         * page/DOMWindow.cpp:
1332         (WebCore::DOMWindow::setTimeout):
1333         (WebCore::DOMWindow::setInterval):
1334         * page/DOMWindow.h:
1335         * workers/WorkerEventQueue.h:
1336         * workers/WorkerGlobalScope.cpp:
1337         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
1338         (WebCore::WorkerGlobalScope::setTimeout):
1339         (WebCore::WorkerGlobalScope::setInterval):
1340         * workers/WorkerGlobalScope.h:
1341         (WebCore::WorkerGlobalScope::clearScript):
1342         * workers/WorkerLoaderProxy.h:
1343         * workers/WorkerMessagingProxy.h:
1344         * workers/WorkerRunLoop.cpp:
1345         (WebCore::WorkerRunLoop::WorkerRunLoop):
1346         * workers/WorkerRunLoop.h:
1347         * workers/WorkerScriptLoader.cpp:
1348         (WebCore::WorkerScriptLoader::loadSynchronously):
1349         (WebCore::WorkerScriptLoader::loadAsynchronously):
1350         (WebCore::WorkerScriptLoader::createResourceRequest):
1351         * workers/WorkerScriptLoader.h:
1352         * workers/WorkerThread.cpp:
1353         (WebCore::WorkerThread::WorkerThread):
1354         (WebCore::WorkerThread::workerThread):
1355         (WebCore::WorkerThreadStartupData::create): Deleted.
1356         * workers/WorkerThread.h:
1357
1358 2014-05-09  Myles C. Maxfield  <litherum@gmail.com>
1359
1360         [Mac] [iOS] Underlines are too low
1361         https://bugs.webkit.org/show_bug.cgi?id=132770
1362
1363         Reviewed by Darin Adler.
1364
1365         computeUnderlineOffset() inside InlineTextBox.cpp lowers underlines from text
1366         baseline by a value that is proportional to the font size. However, this
1367         lowering was done a second time in
1368         GraphicsContext::computeLineBoundsAndAntialiasingModeForText(). This patch
1369         removes this second, platform-dependent lowering.
1370
1371         This duplication was caused by merging iOS into open source, where iOS used
1372         the GraphicsContext approach and open source used the InlineTextBox approach.
1373
1374         Covered by fast/css3-text/css3-text-decoration/text-decoration-thickness.html.
1375
1376         * platform/graphics/GraphicsContext.cpp:
1377         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText): Remove
1378         redundant lowering code
1379         * rendering/InlineTextBox.cpp:
1380         (WebCore::InlineTextBox::paintDecoration): Clean up textDecorationThickness
1381         variable
1382
1383 2014-05-11  Antti Koivisto  <antti@apple.com>
1384
1385         Text with simple line layout not getting pushed below float when there is not enough space for it
1386         https://bugs.webkit.org/show_bug.cgi?id=126991
1387
1388         Reviewed by Andreas Kling.
1389
1390         Tests: fast/text/simple-lines-intruding-wide-float-dynamic.html
1391                fast/text/simple-lines-intruding-wide-float.html
1392
1393         * rendering/RenderBlockFlow.cpp:
1394         (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
1395         
1396             Invalidate the line layout path when floats change. We need to check SimpleLineLayout::canUseFor again as
1397             intruding floats may make this flow ineligible to use the path.
1398
1399         * rendering/RenderBlockFlow.h:
1400         (WebCore::RenderBlockFlow::floatingObjectSet):
1401         * rendering/SimpleLineLayout.cpp:
1402         (WebCore::SimpleLineLayout::canUseFor):
1403         
1404             Test the top positions of all floats for case that would push text below the float instead of just testing 
1405             the first line. We may have floats in the middle of the paragraph too.
1406
1407 2014-05-11  peavo@outlook.com  <peavo@outlook.com>
1408
1409         WinCairo crashes on acid3 test
1410         https://bugs.webkit.org/show_bug.cgi?id=131364
1411
1412         Reviewed by Brent Fulgham.
1413
1414         When the 304 (Not-modified) response is received, the Curl backend should look up the cached response,
1415         and call the client method didReceiveResponse with the cached response, instead of the 304 response.
1416         Otherwise the response will contain an empty MIME type, which causes the request to be cancelled, and the client deleted.
1417         When the Curl cache manager then accesses the client afterwards, it is deleted, and we crash.
1418
1419         * platform/network/curl/CurlCacheManager.cpp:
1420         (WebCore::CurlCacheManager::didReceiveResponse): Return early if request is cancelled.
1421         (WebCore::CurlCacheManager::getCachedResponse): Added method to get cached response.
1422         * platform/network/curl/CurlCacheManager.h: Ditto.
1423         * platform/network/curl/ResourceHandleManager.cpp:
1424         (WebCore::headerCallback): When 304 response is received, look up cached response, and use it.
1425
1426 2014-05-10  Tim Horton  <timothy_horton@apple.com>
1427
1428         [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
1429         https://bugs.webkit.org/show_bug.cgi?id=132793
1430         <rdar://problem/16877870>
1431
1432         Reviewed by Dan Bernstein.
1433
1434         * WebCore.exp.in:
1435         Export a Color convenience function.
1436
1437 2014-05-10  Commit Queue  <commit-queue@webkit.org>
1438
1439         Unreviewed, rolling out r168578.
1440         https://bugs.webkit.org/show_bug.cgi?id=132789
1441
1442         Speculative rollout since this appears to break PLT3.
1443         (Requested by kling on #webkit).
1444
1445         Reverted changeset:
1446
1447         "Move Source/WebCore/workers/ code to std::unique_ptr"
1448         https://bugs.webkit.org/show_bug.cgi?id=132401
1449         http://trac.webkit.org/changeset/168578
1450
1451 2014-05-10  Darin Adler  <darin@apple.com>
1452
1453         REGRESSION (r166853): fast/preloader/document-write.html is very flaky
1454         https://bugs.webkit.org/show_bug.cgi?id=130942
1455
1456         Reviewed by Anders Carlsson.
1457
1458         * style/StyleResolveTree.cpp:
1459         (WebCore::Style::suspendMemoryCacheClientCalls): Use a RefPtr to the main
1460         frame as a weak pointer to a Page that will work unless the page is destroyed.
1461         The old code tried to do it with a RefPtr to a document, but as the FIXME
1462         points out, that won't work if the document is disassociated with its frame.
1463
1464 2014-05-10  Anders Carlsson  <andersca@apple.com>
1465
1466         Block exceptions when trying to convert attributed strings to RTF and RTFD
1467         https://bugs.webkit.org/show_bug.cgi?id=132778
1468         <rdar://problem/16675805>
1469
1470         Reviewed by Darin Adler.
1471
1472         When the iOS WebHTMLConverter was upstreamed, converting some attributed strings to RTF and RTFD
1473         started throwing Objective-C exceptions (see <rdar://problem/16876920>).
1474         
1475         In WebKit2, we now crash on unhandled exceptions so work around that crash by adding exception blocking macros.
1476
1477         * editing/ios/EditorIOS.mm:
1478         (WebCore::dataInRTFDFormat):
1479         (WebCore::dataInRTFFormat):
1480         * editing/mac/EditorMac.mm:
1481         (WebCore::dataInRTFDFormat):
1482         (WebCore::dataInRTFFormat):
1483
1484 2014-05-10  Zan Dobersek  <zdobersek@igalia.com>
1485
1486         Move Source/WebCore/workers/ code to std::unique_ptr
1487         https://bugs.webkit.org/show_bug.cgi?id=132401
1488
1489         Reviewed by Andreas Kling.
1490
1491         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
1492         with std::unique_ptr.
1493
1494         * bindings/js/JSDOMWindowCustom.cpp:
1495         (WebCore::JSDOMWindow::setTimeout):
1496         (WebCore::JSDOMWindow::setInterval):
1497         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1498         (WebCore::JSWorkerGlobalScope::setTimeout):
1499         (WebCore::JSWorkerGlobalScope::setInterval):
1500         * bindings/js/ScheduledAction.cpp:
1501         (WebCore::ScheduledAction::create):
1502         * bindings/js/ScheduledAction.h:
1503         * page/DOMTimer.cpp:
1504         (WebCore::DOMTimer::DOMTimer):
1505         (WebCore::DOMTimer::install):
1506         (WebCore::DOMTimer::fired):
1507         (WebCore::DOMTimer::didStop):
1508         * page/DOMTimer.h:
1509         * page/DOMWindow.cpp:
1510         (WebCore::DOMWindow::setTimeout):
1511         (WebCore::DOMWindow::setInterval):
1512         * page/DOMWindow.h:
1513         * workers/WorkerEventQueue.h:
1514         * workers/WorkerGlobalScope.cpp:
1515         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
1516         (WebCore::WorkerGlobalScope::setTimeout):
1517         (WebCore::WorkerGlobalScope::setInterval):
1518         * workers/WorkerGlobalScope.h:
1519         (WebCore::WorkerGlobalScope::clearScript):
1520         * workers/WorkerLoaderProxy.h:
1521         * workers/WorkerMessagingProxy.h:
1522         * workers/WorkerRunLoop.cpp:
1523         (WebCore::WorkerRunLoop::WorkerRunLoop):
1524         * workers/WorkerRunLoop.h:
1525         * workers/WorkerScriptLoader.cpp:
1526         (WebCore::WorkerScriptLoader::loadSynchronously):
1527         (WebCore::WorkerScriptLoader::loadAsynchronously):
1528         (WebCore::WorkerScriptLoader::createResourceRequest):
1529         * workers/WorkerScriptLoader.h:
1530         * workers/WorkerThread.cpp:
1531         (WebCore::WorkerThread::WorkerThread):
1532         (WebCore::WorkerThread::workerThread):
1533         (WebCore::WorkerThreadStartupData::create): Deleted.
1534         * workers/WorkerThread.h:
1535
1536 2014-05-09  Dean Jackson  <dino@apple.com>
1537
1538         -webkit-filter prevents rendering at retina scale
1539         https://bugs.webkit.org/show_bug.cgi?id=93471
1540
1541         Reviewed by Dirk Schulze.
1542
1543         Implement 2x support for filters that go through
1544         the -webkit-filter property. This includes all
1545         shorthand filters, and any referenced SVG-style filters
1546         (as long as they use only the supported subset of
1547         operations - basically the same as is exposed for
1548         the shorthands).
1549
1550         Tests: fast/hidpi/filters-blur.html
1551                fast/hidpi/filters-hue-rotate.html
1552                fast/hidpi/filters-invert.html
1553                fast/hidpi/filters-multiple.html
1554                fast/hidpi/filters-reference.html
1555                fast/hidpi/filters-shadow.html
1556
1557         * platform/graphics/cg/ImageBufferCG.cpp:
1558         (WebCore::ImageBuffer::getUnmultipliedImageData): Scale the source rectangle if the method was
1559         called using LogicalCoordinates.
1560         (WebCore::ImageBuffer::getPremultipliedImageData): Ditto.
1561         (WebCore::ImageBuffer::putByteArray): Ditto.
1562
1563         * platform/graphics/filters/FEDropShadow.cpp:
1564         (WebCore::FEDropShadow::platformApplySoftware): Make sure to scale the blur radius by the filter
1565         resolution, and call the byte-array methods with the native coordinate system.
1566         * platform/graphics/filters/FEGaussianBlur.cpp:
1567         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Fix typo.
1568         (WebCore::FEGaussianBlur::platformApplySoftware): Scale the kernel and paint rectangles
1569         by the filter scale.
1570
1571         * platform/graphics/filters/Filter.h:
1572         (WebCore::Filter::Filter): Initialise the filter scale.
1573         (WebCore::Filter::filterScale): New property which reflects the mapping between logical pixels
1574         and device pixels.
1575         (WebCore::Filter::setFilterScale):
1576
1577         * platform/graphics/filters/FilterEffect.cpp:
1578         (WebCore::FilterEffect::asImageBuffer): Make sure buffer creation takes scale into account.
1579         (WebCore::FilterEffect::asUnmultipliedImage): Ditto.
1580         (WebCore::FilterEffect::asPremultipliedImage): Ditto.
1581         (WebCore::FilterEffect::copyImageBytes): Scale any incoming regions if they are talking about
1582         device pixels rather than logical pixels.
1583         (WebCore::FilterEffect::copyUnmultipliedImage): Ditto.
1584         (WebCore::FilterEffect::copyPremultipliedImage): Ditto.
1585         (WebCore::FilterEffect::createImageBufferResult): Take scale into account when creating byte array.
1586         (WebCore::FilterEffect::createUnmultipliedImageResult): Ditto.
1587         (WebCore::FilterEffect::createPremultipliedImageResult): Ditto.
1588
1589         * rendering/FilterEffectRenderer.cpp:
1590         (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): Pass filter scale into buffer creation.
1591
1592         * rendering/RenderLayer.cpp:
1593         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Make sure to set the filter scale to
1594         the device scale factor, and notice if we ever change scales.
1595
1596 2014-05-10  Praveen R Jadhav  <praveen.j@samsung.com>
1597
1598         [MediaStream] Rename NavigatorMediaStream as NavigatorUserMedia.
1599         https://bugs.webkit.org/show_bug.cgi?id=132734
1600
1601         Reviewed by Eric Carlson.
1602
1603         Spec: http://www.w3.org/TR/mediacapture-streams/#navigatorusermedia
1604
1605         This patch replaces 'NavigatorMediaStream' with 'NavigatorUserMedia'
1606         throughout the code to be consistent with W3C specifications.
1607         Test cases remain the same as 'Navigator' implies 'NavigatorUserMedia'.
1608
1609         * CMakeLists.txt: Compiles NavigatorUserMedia.cpp
1610         * DerivedSources.make: Compiles NavigatorUserMedia.idl
1611         * Modules/mediastream/NavigatorMediaStream.cpp: Removed.
1612         * Modules/mediastream/NavigatorMediaStream.h: Removed.
1613         * Modules/mediastream/NavigatorMediaStream.idl: Removed.
1614         * Modules/mediastream/NavigatorUserMedia.cpp: Added.
1615         (WebCore::NavigatorUserMedia::NavigatorUserMedia):
1616         (WebCore::NavigatorUserMedia::~NavigatorUserMedia):
1617         (WebCore::NavigatorUserMedia::webkitGetUserMedia):
1618         * Modules/mediastream/NavigatorUserMedia.h: Added.
1619         * Modules/mediastream/NavigatorUserMedia.idl: Added.
1620         * WebCore.xcodeproj/project.pbxproj:
1621         * bindings/js/JSNavigatorCustom.cpp:
1622         (WebCore::JSNavigator::webkitGetUserMedia): NavigatorUserMedia
1623         class is used instead of NavigatorMediaStream.
1624
1625 2014-05-10  Zalan Bujtas  <zalan@apple.com>
1626
1627         Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
1628         https://bugs.webkit.org/show_bug.cgi?id=132753
1629         <rdar://problem/16846801>
1630
1631         Reviewed by Simon Fraser.
1632
1633         This patch ensures that empty LayoutRects remain empty after converting to integral enclosing rect.
1634         LayoutRects with fractional position get expanded even if they are empty. This makes rectangle
1635         operations unreliable and can result in undesired side effects.
1636
1637         No testable/covered by existing tests.
1638
1639         * platform/graphics/LayoutRect.cpp:
1640         (WebCore::enclosingIntRect):
1641         * rendering/InlineTextBox.cpp:
1642         (WebCore::InlineTextBox::localSelectionRect):
1643         (WebCore::InlineTextBox::paintDocumentMarker):
1644         (WebCore::InlineTextBox::paintTextMatchMarker):
1645         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1646         (WebCore::integralEnclosingRectForSelection): Deleted.
1647
1648 2014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
1649
1650         Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
1651         https://bugs.webkit.org/show_bug.cgi?id=132409
1652
1653         Reviewed by Timothy Hatcher.
1654
1655         * inspector/InspectorClient.h:
1656         (WebCore::InspectorClient::parentProcessIdentifier): Deleted.
1657         * page/PageDebuggable.cpp:
1658         (WebCore::PageDebuggable::parentProcessIdentifier): Deleted.
1659         * page/PageDebuggable.h:
1660         pid per debuggable is no longer needed.
1661
1662 2014-05-09  Dean Jackson  <dino@apple.com>
1663
1664         [fullscreen] cursor should auto-hide when over video
1665         https://bugs.webkit.org/show_bug.cgi?id=132758
1666
1667         Unreviewed followup based on test failure.
1668
1669         * css/fullscreen.css: Append the previous rule - video children of fullscreen elements.
1670
1671 2014-05-09  Dean Jackson  <dino@apple.com>
1672
1673         [fullscreen] cursor should auto-hide when over video
1674         https://bugs.webkit.org/show_bug.cgi?id=132758
1675
1676         Reviewed by Brent Fulgham.
1677
1678         Cursors were not auto-hiding over fullscreen video. There was
1679         a small error in the CSS we load for fullscreen content.
1680
1681         * css/fullscreen.css: Don't hide when video is a child of the fullscreen element - hide when it *is* the fullscreen element.
1682         (video:-webkit-full-screen):
1683         (:-webkit-full-screen video:hover): Deleted.
1684
1685 2014-05-09  Zalan Bujtas  <zalan@apple.com>
1686
1687         Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
1688         https://bugs.webkit.org/show_bug.cgi?id=132750
1689         <rdar://problem/16803281>
1690
1691         Reviewed by Simon Fraser.
1692
1693         This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
1694         
1695         Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
1696         different from the backingstore when the passed value is fractional.
1697         We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
1698         the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
1699
1700         Currently not testable.
1701
1702         * platform/graphics/ca/GraphicsLayerCA.cpp:
1703         (WebCore::GraphicsLayerCA::updateGeometry):
1704         (WebCore::GraphicsLayerCA::computePixelAlignment): include device scale factor to be able calculate the final content scale.
1705         * platform/graphics/ca/GraphicsLayerCA.h:
1706
1707 2014-05-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1708
1709         JSDOMWindow should disable property caching after a certain point
1710         https://bugs.webkit.org/show_bug.cgi?id=132751
1711
1712         Reviewed by Filip Pizlo.
1713
1714         No new tests.
1715
1716         This is part of removing HasImpureGetOwnPropertySlot from JSDOMWindow. After the lookup in the static 
1717         hash table for JSDOMWindow fails we want to disable property caching even if the code that follows thinks 
1718         that it has provided a cacheable value.
1719
1720         * bindings/js/JSDOMWindowCustom.cpp:
1721         (WebCore::JSDOMWindow::getOwnPropertySlot):
1722
1723 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
1724
1725         Fix the export file after r168556
1726
1727         * WebCore.exp.in: I forgot to fix the export file before landing.
1728
1729 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
1730
1731         [iOS][WK2] Set up the resize events
1732         https://bugs.webkit.org/show_bug.cgi?id=132726
1733
1734         Reviewed by Darin Adler and Simon Fraser.
1735
1736         Let the WebKit2 layer override the size used for resize events.
1737
1738         * WebCore.exp.in:
1739         * page/FrameView.cpp:
1740         (WebCore::FrameView::layout):
1741         (WebCore::FrameView::sizeForResizeEvent):
1742         (WebCore::FrameView::sendResizeEventIfNeeded):
1743         (WebCore::FrameView::setCustomSizeForResizeEvent):
1744         * page/FrameView.h:
1745
1746 2014-05-09  Alexey Proskuryakov  <ap@apple.com>
1747
1748         REGRESSION (r168518): Multiple tests for workers in blobs assert
1749         https://bugs.webkit.org/show_bug.cgi?id=132728
1750
1751         Reviewed by Geoffrey Garen.
1752
1753         Change File serialization to include name, so that we don't have to regenerate anything
1754         on a secondary thread after deserialization.
1755
1756         Files and Blobs can't be stored persistently, because URLs are transient (IndexedDB
1757         has an explicit check, and fails if there were any blob URLs). API doesn't have the
1758         check, but given that anyone who tried to use these to serialize a File would fail,
1759         it seems OK to change the format.
1760
1761         * bindings/js/SerializedScriptValue.cpp:
1762         (WebCore::CloneSerializer::write):
1763         (WebCore::CloneDeserializer::readFile):
1764         * fileapi/File.cpp:
1765         (WebCore::File::File):
1766         * fileapi/File.h:
1767
1768 2014-05-08  Mark Hahnenberg  <mhahnenberg@apple.com>
1769
1770         JSDOMWindow should have a WatchpointSet to fire on window close
1771         https://bugs.webkit.org/show_bug.cgi?id=132721
1772
1773         Reviewed by Filip Pizlo.
1774
1775         No new tests.
1776
1777         This patch allows us to reset the inline caches that assumed they could skip 
1778         the first part of JSDOMWindow::getOwnPropertySlot that checks if the window has 
1779         been closed. This is part of getting rid of HasImpureGetOwnPropertySlot on JSDOMWindow.
1780
1781         JSDOMWindowBase now has a WatchpointSet that the underlying DOMWindow fires when its
1782         frame is cleared. In getOwnPropertySlot, we now pass this WatchpointSet to PropertySlot
1783         which will shepherd it back up to the code that generates the inline cache (and the 
1784         Watchpoint for clearing it).
1785
1786         * bindings/js/JSDOMWindowBase.cpp:
1787         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1788         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1789         * bindings/js/JSDOMWindowBase.h:
1790         * bindings/js/JSDOMWindowCustom.cpp:
1791         (WebCore::JSDOMWindow::getOwnPropertySlot):
1792         * page/DOMWindow.cpp:
1793         (WebCore::DOMWindow::frameDestroyed):
1794
1795 2014-05-09  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1796
1797         ASSERTION FAILED: object->style()->overflowX() == object->style()->overflowY()
1798         https://bugs.webkit.org/show_bug.cgi?id=121682
1799
1800         Reviewed by Dirk Schulze.
1801
1802         Add more overflow freedom to the SVG element:
1803         -overflow-x and overflow-y for controlling each scrollbar independently is now supported
1804         -overflow:scroll will display scrollbars regardless of the svg overflowing or not (as required by CSS)
1805         -overflow:hidden will cause overflow to be clipped away and scrollbars to be hidden
1806
1807         Merged from Blink r172126 by <ed@opera.com>
1808
1809         Tests: svg/W3C-SVG-1.1-SE/painting-marker-05-f.svg
1810                svg/W3C-SVG-1.1-SE/painting-marker-06-f.svg
1811                svg/animations/animate-viewport-overflow-2.html
1812                svg/animations/animate-viewport-overflow.html
1813                svg/in-html/overflow-repaint.html
1814                svg/in-html/overflow-svg-root-attr.html
1815                svg/in-html/overflow-svg-root-style.html
1816                svg/in-html/overflow-svg-root.html
1817                svg/overflow/overflow-on-outermost-svg-element-horizontal-auto.svg
1818                svg/overflow/overflow-on-outermost-svg-element-vertical-auto.svg
1819                svg/overflow/overflow-scroll-on-outermost-svg-element.svg
1820                svg/overflow/overflow-x-hidden-on-outermost-svg-element-expected.svg
1821                svg/overflow/overflow-x-hidden-on-outermost-svg-element.svg
1822                svg/overflow/overflow-y-hidden-on-outermost-svg-element-expected.svg
1823                svg/overflow/overflow-y-hidden-on-outermost-svg-element.svg
1824
1825         * css/StyleResolver.cpp:
1826         (WebCore::StyleResolver::adjustRenderStyle):
1827         * page/FrameView.cpp:
1828         (WebCore::FrameView::applyOverflowToViewport):
1829         * rendering/svg/RenderSVGRoot.cpp:
1830         (WebCore::RenderSVGRoot::layout):
1831         (WebCore::RenderSVGRoot::shouldApplyViewportClip):
1832         (WebCore::RenderSVGRoot::paintReplaced):
1833         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
1834         * rendering/svg/RenderSVGRoot.h:
1835         * rendering/svg/SVGRenderSupport.cpp:
1836         (WebCore::SVGRenderSupport::isOverflowHidden):
1837
1838 2014-05-09  Jer Noble  <jer.noble@apple.com>
1839
1840         [MSE][Mac] Destroy the AVStreamDataParser when the SourceBuffer is removed from its MediaSource.
1841         https://bugs.webkit.org/show_bug.cgi?id=132710
1842
1843         Reviewed by Eric Carlson.
1844
1845         The AVStreamDataParser should be destroyed when the SourceBuffer is removed, so that subsequent
1846         SourceBuffers can utilize resources released by the parser on destruction.
1847
1848         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1849         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1850         (-[WebAVStreamDataParserListener invalidate]):
1851         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):  Protect against _parent being invalidated.
1852         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
1853         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
1854         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
1855         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): Call destroyParser();.
1856         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto.
1857         (WebCore::SourceBufferPrivateAVFObjC::destroyParser): Call -[WebAVStreamDataParserListener invalidate].
1858
1859 2014-05-09  Andrei Bucur  <abucur@adobe.com>
1860
1861         [CSS Regions] 1-2% performance regression in html5-full-render after r168286
1862         https://bugs.webkit.org/show_bug.cgi?id=132672
1863
1864         Reviewed by Mihnea Ovidenie.
1865
1866         The patch optimizes the search of regions when there's a single region in the chain.
1867         There's no need to execute advanced search logic, we can directly return that region.
1868
1869         Tests: No function change, no tests.
1870
1871         * rendering/RenderBlock.cpp:
1872         (WebCore::canComputeRegionRangeForBox):
1873         * rendering/RenderFlowThread.cpp:
1874         (WebCore::RenderFlowThread::regionAtBlockOffset):
1875         (WebCore::RenderFlowThread::hasCachedRegionRangeForBox): Renamed from hasRegionRangeForBox to
1876         better suggest what the function does.
1877         (WebCore::RenderFlowThread::getRegionRangeForBox):
1878         (WebCore::RenderFlowThread::hasRegionRangeForBox): Deleted.
1879         * rendering/RenderFlowThread.h:
1880
1881 2014-05-09  Jer Noble  <jer.noble@apple.com>
1882
1883         [EME] Call suspendIfNeeded() in the MediaKeySession create() method to avoid an ASSERT.
1884         https://bugs.webkit.org/show_bug.cgi?id=132712
1885
1886         Reviewed by Eric Carlson.
1887
1888         All ActiveDOMObject subclasses must call suspendIfNeeded() immediately after creation.
1889
1890         * Modules/encryptedmedia/MediaKeySession.cpp:
1891         (WebCore::MediaKeySession::MediaKeySession):
1892
1893 2014-05-09  Zalan Bujtas  <zalan@apple.com>
1894
1895         Unreviewed. Another attempt to fix Windows build after r168528.
1896
1897         * platform/graphics/win/FontWin.cpp:
1898         (WebCore::Font::adjustSelectionRectForComplexText):
1899
1900 2014-05-09  Zalan Bujtas  <zalan@apple.com>
1901
1902         Unreviewed build fix for Win after r168528.
1903
1904         * platform/graphics/win/FontWin.cpp:
1905         (WebCore::Font::adjustSelectionRectForComplexText):
1906
1907 2014-05-09  Zalan Bujtas  <zalan@apple.com>
1908
1909         REGRESSION (r168095): 1-pixel gap between adjacent selection inlines
1910         https://bugs.webkit.org/show_bug.cgi?id=132474
1911         <rdar://problem/16797394>
1912
1913         Reviewed by David Hyatt.
1914
1915         This patch changes text selection rectangle calculation from integral to device
1916         pixel snapping. It ensures that selection rect painting matches box boundaries for inline elements.
1917         Directional rounding (horizontal only atm) is moved out from Font class and now accessible
1918         to all the painting code. RTL snapping strategy is changed from floor to round to match ltr behavior.
1919         However this patch does not address all the integral snapping across inline elements. There are
1920         a few places where we still calculate enclosing rects where snapping is sufficient.
1921
1922         Test: fast/inline/hidpi-pixel-gap-between-adjacent-selection-inlines.html
1923
1924         * platform/LayoutUnit.h:
1925         (WebCore::roundToDevicePixel): added fudge factor to change rounding direction as directed.
1926         * platform/graphics/Font.cpp:
1927         (WebCore::Font::adjustSelectionRectForText):
1928         (WebCore::Font::selectionRectForText): Deleted.
1929         * platform/graphics/Font.h:
1930         * platform/graphics/FontFastPath.cpp:
1931         (WebCore::Font::adjustSelectionRectForSimpleText): removed directional rounding.
1932         (WebCore::Font::selectionRectForSimpleText): Deleted.
1933         * platform/graphics/GraphicsContext.cpp:
1934         (WebCore::GraphicsContext::drawHighlightForText): Deleted.
1935         * platform/graphics/GraphicsContext.h:
1936         * platform/graphics/LayoutPoint.h:
1937         (WebCore::roundedForPainting):
1938         * platform/graphics/LayoutRect.h:
1939         (WebCore::directionalPixelSnappedForPainting): Snap top right corner for rtl direction.
1940         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
1941         (WebCore::Font::adjustSelectionRectForComplexText):
1942         (WebCore::Font::selectionRectForComplexText): Deleted.
1943         * platform/graphics/mac/FontComplexTextMac.cpp:
1944         (WebCore::Font::adjustSelectionRectForComplexText): removed directional rounding.
1945         (WebCore::Font::selectionRectForComplexText): Deleted.
1946         * platform/graphics/win/FontWin.cpp:
1947         (WebCore::Font::adjustSelectionRectForComplexText):
1948         (WebCore::Font::selectionRectForComplexText): Deleted.
1949         * rendering/EllipsisBox.cpp:
1950         (WebCore::EllipsisBox::selectionRect):
1951         (WebCore::EllipsisBox::paintSelection):
1952         * rendering/InlineTextBox.cpp:
1953         (WebCore::integralEnclosingRectForSelection): helper to address enclosing empty rect problem.
1954         (WebCore::InlineTextBox::localSelectionRect):
1955         (WebCore::InlineTextBox::paintSelection):
1956         (WebCore::InlineTextBox::paintCompositionBackground):
1957         (WebCore::InlineTextBox::paintDocumentMarker):
1958         (WebCore::InlineTextBox::paintTextMatchMarker):
1959         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1960         (WebCore::InlineTextBox::positionForOffset):
1961         * rendering/svg/SVGInlineTextBox.cpp:
1962         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
1963
1964 2014-05-09  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
1965
1966         ASSERTION FAILED: !m_code || m_code == defaultExceptionCode
1967         in WebCore::constructQualifiedName
1968         https://bugs.webkit.org/show_bug.cgi?id=132343
1969
1970         'Remove bad assertion in SVGSMILElement's constructQualifiedName() by passing
1971         IGNORE_EXCEPTION instead ASSERT_NO_EXCEPTION to Document::parseQualifiedName().
1972         The constructQualifiedName() function handles parseQualifiedName() failures
1973         propertly by returning early so there is no reason to assert on parsing
1974         failures.'
1975
1976         Blink merge: http://src.chromium.org/viewvc/blink?view=revision&revision=173564
1977         Based on the patch made by Christophe Dumez <ch.dumez@samsung.com>.
1978
1979         Reviewed by Dirk Schulze.
1980
1981         Test: svg/custom/bad-attributeName-crash.html
1982
1983         * svg/animation/SVGSMILElement.cpp:
1984         (WebCore::constructQualifiedName):
1985
1986 2014-05-08  Brent Fulgham  <bfulgham@apple.com>
1987
1988         Multiple (stacked) cues when shuttling through video while playing closed captions
1989         https://bugs.webkit.org/show_bug.cgi?id=132715
1990         <rdar://problem/16795782>
1991
1992         Reviewed by Eric Carlson.
1993
1994         Tests: media/track/track-in-band-cues-added-once.html
1995
1996         * html/track/TextTrack.cpp:
1997         (WebCore::TextTrack::hasCue): Revise to use a relaxed time equality.
1998         * html/track/TextTrackCue.cpp:
1999         (WebCore::TextTrackCue::isEqual): Ditto.
2000         (WebCore::TextTrackCue::hasEquivalentStartTime): Added.
2001         * html/track/TextTrackCue.h:
2002         (WebCore::TextTrackCue::startTimeVariance): Added.
2003         * html/track/TextTrackCueGeneric.h:
2004         * html/track/TextTrackCueGeneric.cpp:
2005         (WebCore::TextTrackCueGeneric::isEqual): Do not call the VTTCue::isEqual method from
2006         this class, since cueType() will not equal VTTCue, and the equality will fail.
2007
2008 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
2009
2010         Automatically zip document bundles used via File API
2011         https://bugs.webkit.org/show_bug.cgi?id=132713
2012         <rdar://problem/13397892>
2013
2014         Reviewed by Anders Carlsson.
2015
2016         Tests: fast/files/filereader-zip-bundle.html
2017                http/tests/local/fileapi/upload-zip-bundle-as-blob.html
2018
2019         * FileMac.mm: Added.
2020         (WebCore::File::shouldReplaceFile):
2021         (WebCore::File::computeNameAndContentTypeForReplacedFile):
2022         Added code that decides what to do with a bundle. We need this to happen in
2023         WebProcess, because HTML5 dropzone depends on this, it needs to know file type
2024         even before a File object can be created.
2025
2026         * WebCore.exp.in: Export new functions.
2027
2028         * WebCore.xcodeproj/project.pbxproj: Added new files.
2029
2030         * dom/DataTransfer.cpp: (WebCore::DataTransfer::hasFileOfType): Updated for File
2031         interface change.
2032
2033         * fileapi/File.h:
2034         * fileapi/File.cpp:
2035         (WebCore::File::File):
2036         (WebCore::File::computeNameAndContentType):
2037         (WebCore::File::contentTypeForFile):
2038         (WebCore::File::contentTypeFromFilePathOrName): Deleted.
2039         Make it possible for a subclass to affect file name and content type calculation.
2040
2041         * platform/network/BlobDataFileReference.cpp:
2042         (WebCore::BlobDataFileReference::BlobDataFileReference):
2043         (WebCore::BlobDataFileReference::~BlobDataFileReference):
2044         (WebCore::BlobDataFileReference::path):
2045         (WebCore::BlobDataFileReference::size):
2046         (WebCore::BlobDataFileReference::expectedModificationTime):
2047         (WebCore::BlobDataFileReference::startTrackingModifications):
2048         * platform/network/BlobDataFileReference.h:
2049         (WebCore::BlobDataFileReference::path): Deleted.
2050         (WebCore::BlobDataFileReference::BlobDataFileReference): Deleted.
2051         Use original or replaced file, as appropriate. 
2052
2053         * platform/network/mac/BlobDataFileReferenceMac.mm: Added.
2054         (WebCore::BlobDataFileReference::generateReplacementFile): Implements generateReplacementFile().
2055
2056         * platform/network/FormData.h: Added a FIXME.
2057
2058         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Always use Blob code path
2059         for blobs, don't unwrap them into a file path.
2060
2061 2014-05-08  Simon Fraser  <simon.fraser@apple.com>
2062
2063         Occasional crash under AsyncScrollingCoordinator::frameViewRootLayerDidChange() on history navigation
2064         https://bugs.webkit.org/show_bug.cgi?id=132723
2065
2066         Reviewed by Sam Weinig.
2067         
2068         Crash reports suggest that when we call AsyncScrollingCoordinator::frameViewRootLayerDidChange()
2069         from HistoryController::restoreScrollPositionAndViewState(), the FrameView may not have a 
2070         scrolling node ID, which suggests that either the FrameView doesn't have a RenderView,
2071         or compositing hasn't happened yet.
2072         
2073         So if we enter AsyncScrollingCoordinator::frameViewRootLayerDidChange()
2074         and the FrameView has no scrollLayerID, just return. We'll fix things up
2075         when compositing kicks in later.
2076
2077         * page/scrolling/AsyncScrollingCoordinator.cpp:
2078         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
2079
2080 2014-05-08  Simon Fraser  <simon.fraser@apple.com>
2081
2082         [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
2083         https://bugs.webkit.org/show_bug.cgi?id=132719
2084         <rdar://problem/16860837>
2085
2086         Reviewed by Benjamin Poulain.
2087
2088         Add a couple of functions, and sort.
2089
2090         * WebCore.exp.in:
2091
2092 2014-05-08  Jer Noble  <jer.noble@apple.com>
2093
2094         [Mac, iOS] Add source application accounting to AVURLAsset.
2095         https://bugs.webkit.org/show_bug.cgi?id=132637
2096
2097         Reviewed by Eric Carlson.
2098
2099         Properly account for the application responisble for data loading by passing the source
2100         application identifier through to AVFoundation through AVURLAsset options.
2101
2102         * html/HTMLMediaElement.cpp:
2103         (WebCore::HTMLMediaElement::parseAttribute):
2104         * html/HTMLMediaElement.h:
2105         * platform/graphics/MediaPlayer.cpp:
2106         (WebCore::MediaPlayer::sourceApplicationIdentifier):
2107         * platform/graphics/MediaPlayer.h:
2108         (WebCore::MediaPlayerClient::mediaPlayerSourceApplicationIdentifier):
2109         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2110         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2111         * platform/network/NetworkingContext.h:
2112
2113 2014-05-08  Jer Noble  <jer.noble@apple.com>
2114
2115         [MSE][Mac] Move AVStreamDataParser off-main-thread.
2116         https://bugs.webkit.org/show_bug.cgi?id=132698
2117
2118         Reviewed by Eric Carlson.
2119
2120         -[AVStreamDataParser appendStreamData:] can casue the main thread to hang when a
2121         large amount of media data is appended at once. Move the actual parsing of data
2122         to a background (synchronous) dispatch queue, and split SourceBuffer::appendBufferTimerFired
2123         into two functions, the latter of which will be called after the background queue
2124         completes.
2125
2126         * Modules/mediasource/SourceBuffer.cpp:
2127         (WebCore::SourceBuffer::appendBufferTimerFired): Split into sourceBufferPrivateAppendComplete.
2128         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Split from appendBufferTimerFired.
2129         * Modules/mediasource/SourceBuffer.h:
2130         * platform/graphics/SourceBufferPrivate.h:
2131         * platform/graphics/SourceBufferPrivateClient.h:
2132         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2133         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2134         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): Re-dispatch to the
2135                 web thread.
2136         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
2137         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
2138         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
2139         (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): Ditto.
2140         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): Ditto.
2141         (WebCore::globalDataParserQueue): Added.
2142         (WebCore::SourceBufferPrivateAVFObjC::append): Dispatch to the globalDataParserQueue.
2143         (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): Added.
2144         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2145         (WebCore::MockSourceBufferPrivate::append): Adopt sourceBufferPrivateAppendComplete.
2146         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2147
2148         Update SourceBufferPrivateGStreamer to match the new append return value:
2149         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
2150         (WebCore::SourceBufferPrivateGStreamer::append):
2151         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
2152
2153 2014-05-08  Commit Queue  <commit-queue@webkit.org>
2154
2155         Unreviewed, rolling out r168498.
2156         https://bugs.webkit.org/show_bug.cgi?id=132714
2157
2158         broke Mavericks WK2 (Requested by litherum on #webkit).
2159
2160         Reverted changeset:
2161
2162         "http/tests/security/xss-DENIED-xsl-document-redirect.xml
2163         fails with NetworkProcess"
2164         https://bugs.webkit.org/show_bug.cgi?id=132523
2165         http://trac.webkit.org/changeset/168498
2166
2167 2014-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
2168
2169         http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
2170         https://bugs.webkit.org/show_bug.cgi?id=132523
2171
2172         Reviewed by Alexey Proskuryakov.
2173
2174         We should not manufacture a response in the event of an error during a
2175         synchronous XHR. In addition, this test removes one place that is
2176         sensitive to such a manufactured response.
2177
2178         Updates test expectations.
2179
2180         * platform/network/cf/ResourceHandleCFNet.cpp:
2181         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
2182         manufacture a response
2183         * platform/network/mac/ResourceHandleMac.mm:
2184         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
2185         manufacture a response
2186         * xml/XSLTProcessorLibxslt.cpp:
2187         (WebCore::docLoaderFunc): Only use the response's URL if no error
2188         occurred.
2189
2190 2014-05-08  Andreas Kling  <akling@apple.com>
2191
2192         [iOS] WebKit should listen to critical memory warnings.
2193         <https://webkit.org/b/132704>
2194         <rdar://problem/16857112>
2195
2196         Listen for DISPATCH_MEMORYSTATUS_PRESSURE_CRITICAL in addition to
2197         DISPATCH_MEMORYSTATUS_PRESSURE_WARN, since we may only get the critical
2198         notification on some systems.
2199
2200         Reviewed by Gavin Barraclough.
2201
2202         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2203         (WebCore::MemoryPressureHandler::install):
2204
2205 2014-05-08  Joseph Pecoraro  <pecoraro@apple.com>
2206
2207         Web Inspector: InspectorDOMAgent::getAccessibilityPropertiesForNode should gracefully handle bad node
2208         https://bugs.webkit.org/show_bug.cgi?id=132697
2209
2210         Reviewed by Timothy Hatcher.
2211
2212         * inspector/InspectorDOMAgent.cpp:
2213         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
2214         Gracefully handle no node.
2215
2216 2014-05-08  Tim Horton  <timothy_horton@apple.com>
2217
2218         Fix the iOS build after r168476.
2219
2220         * platform/graphics/mac/GraphicsContextMac.mm:
2221         (WebCore::GraphicsContext::drawFocusRing):
2222
2223 2014-05-08  Bem Jones-Bey  <bjonesbe@adobe.com>
2224
2225         [CSS Shapes] Shapes do not resolve dimensions specified in viewport units
2226         https://bugs.webkit.org/show_bug.cgi?id=124052
2227
2228         Reviewed by Dirk Schulze.
2229
2230         Viewport unit resolution doesn't work unless the RenderView is passed
2231         down into the floatValueForLength methods. All this does is plumb down
2232         a RenderView in all of these cases.
2233
2234         Tests: css3/masking/clip-path-polygon-viewport-units.html
2235                fast/shapes/shape-outside-floats/shape-outside-floats-viewport-units.html
2236
2237         * css/BasicShapeFunctions.cpp:
2238         (WebCore::floatValueForCenterCoordinate):
2239         * css/BasicShapeFunctions.h:
2240         * css/LengthFunctions.cpp:
2241         (WebCore::floatSizeForLengthSize):
2242         * css/LengthFunctions.h:
2243         * rendering/ClipPathOperation.h:
2244         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
2245         (WebCore::BoxClipPathOperation::pathForReferenceRect):
2246         * rendering/RenderLayer.cpp:
2247         (WebCore::RenderLayer::setupClipPath):
2248         * rendering/shapes/Shape.cpp:
2249         (WebCore::Shape::createShape):
2250         * rendering/shapes/Shape.h:
2251         * rendering/shapes/ShapeOutsideInfo.cpp:
2252         (WebCore::ShapeOutsideInfo::computedShape):
2253         * rendering/style/BasicShapes.cpp:
2254         (WebCore::BasicShapeCircle::floatValueForRadiusInBox):
2255         (WebCore::BasicShapeCircle::path):
2256         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox):
2257         (WebCore::BasicShapeEllipse::path):
2258         (WebCore::BasicShapePolygon::path):
2259         (WebCore::floatSizeForLengthSize):
2260         (WebCore::BasicShapeInset::path):
2261         * rendering/style/BasicShapes.h:
2262         * rendering/svg/SVGRenderingContext.cpp:
2263         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2264
2265 2014-05-08  Brent Fulgham  <bfulgham@apple.com>
2266
2267         Cue display events may not be registered during page load.
2268         https://bugs.webkit.org/show_bug.cgi?id=132696
2269         <rdar://problem/16652874>
2270
2271         Reviewed by Eric Carlson.
2272
2273         * Modules/mediacontrols/mediaControlsApple.js:
2274         (Controller.prototype.handleTextTrackAdd): Don't register
2275         for 'cuechange' events anymore.
2276         (Controller.prototype.handleTextTrackRemove): Ditto.
2277         (Controller.prototype.updateCaptionContainer): Reduce CSS
2278         churn by not adding/removing 'Hidden' class every time a
2279         new cue is processed. Only do this when transitioning
2280         track display state.
2281         (Controller.prototype.handleTextTrackCueChange): Deleted.
2282         * html/HTMLMediaElement.cpp:
2283         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Call
2284         'updateTextTrackContainer' directory when processing cues,
2285         rather than trampolining through the JS layer.
2286
2287 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
2288
2289         Make BlobDataFileReference manage its sandbox extension
2290         https://bugs.webkit.org/show_bug.cgi?id=132689
2291
2292         Reviewed by Anders Carlsson.
2293
2294         * WebCore.exp.in: Export symbols that are now needed in WebKit2 to subclass BlobDataFileReference.
2295
2296         * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
2297         * platform/network/BlobData.cpp: (WebCore::BlobData::appendFile):
2298         * platform/network/BlobData.h: (WebCore::BlobDataItem::BlobDataItem):
2299         * platform/network/BlobRegistry.h:
2300         * platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerFileBlobURL):
2301         * platform/network/BlobRegistryImpl.h:
2302         BlobRegistry now takes a BlobDataFileReference and not a path, so that WebKit2
2303         could pass objects that include sandbox extensions.
2304
2305         * platform/network/BlobDataFileReference.h:
2306         * platform/network/BlobDataFileReference.cpp:
2307         (WebCore::BlobDataFileReference::~BlobDataFileReference): Added a virtual destructor.
2308         (WebCore::BlobDataFileReference::size): We now record the size and modification time right away, no need to lazily calculate them.
2309         (WebCore::BlobDataFileReference::expectedModificationTime): Ditto.
2310         (WebCore::BlobDataFileReference::startTrackingModifications): Record time and size
2311         (since it's a single call). However, size calculation will become complicated again soon.
2312         (WebCore::BlobDataFileReference::prepareForFileAccess): A hook for subclasses.
2313         (WebCore::BlobDataFileReference::revokeFileAccess): Ditto.
2314         (WebCore::BlobDataFileReference::computeFileSystemData): Deleted.
2315
2316 2014-05-08  Rik Cabanier  <cabanier@adobe.com>
2317
2318         Add support for drawFocusIfNeeded
2319         https://bugs.webkit.org/show_bug.cgi?id=132584
2320
2321         Reviewed by Dirk Schulze.
2322
2323         The drawFocusIfNeeded API will draw a focus ring if the element that is passed
2324         in is focused and a child element of the canvas.
2325
2326         Test: fast/canvas/draw-focus-if-needed.html
2327
2328         * html/canvas/CanvasRenderingContext2D.cpp:
2329         (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
2330         * html/canvas/CanvasRenderingContext2D.h:
2331         * html/canvas/CanvasRenderingContext2D.idl:
2332
2333 2014-05-08  Antti Koivisto  <antti@apple.com>
2334
2335         [iOS WebKit2] Can't activate text fields on Facebook
2336         https://bugs.webkit.org/show_bug.cgi?id=132682
2337
2338         Reviewed by Enrica Casucci.
2339
2340         * page/DOMTimer.cpp:
2341         (WebCore::DOMTimer::fired):
2342         
2343             The isDocument() test here had reversed in the merge breaking content change observer callback.
2344
2345 2014-05-07  Sergio Villar Senin  <svillar@igalia.com>
2346
2347         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in svg/
2348         https://bugs.webkit.org/show_bug.cgi?id=132647
2349
2350         Reviewed by Darin Adler.
2351
2352         * svg/SVGAElement.cpp:
2353         (WebCore::SVGAElement::isSupportedAttribute):
2354         * svg/SVGAnimateMotionElement.cpp:
2355         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
2356         * svg/SVGAnimateTransformElement.cpp:
2357         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
2358         * svg/SVGAnimatedLength.cpp:
2359         (WebCore::sharedSVGLength):
2360         * svg/SVGAnimationElement.cpp:
2361         (WebCore::SVGAnimationElement::isSupportedAttribute):
2362         * svg/SVGCircleElement.cpp:
2363         (WebCore::SVGCircleElement::isSupportedAttribute):
2364         * svg/SVGClipPathElement.cpp:
2365         (WebCore::SVGClipPathElement::isSupportedAttribute):
2366         * svg/SVGComponentTransferFunctionElement.cpp:
2367         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
2368         * svg/SVGCursorElement.cpp:
2369         (WebCore::SVGCursorElement::isSupportedAttribute):
2370         * svg/SVGElement.cpp:
2371         (WebCore::SVGElement::instancesForElement):
2372         (WebCore::SVGElement::childShouldCreateRenderer):
2373         * svg/SVGEllipseElement.cpp:
2374         (WebCore::SVGEllipseElement::isSupportedAttribute):
2375         * svg/SVGFEBlendElement.cpp:
2376         (WebCore::SVGFEBlendElement::isSupportedAttribute):
2377         * svg/SVGFEColorMatrixElement.cpp:
2378         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
2379         * svg/SVGFEComponentTransferElement.cpp:
2380         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
2381         * svg/SVGFECompositeElement.cpp:
2382         (WebCore::SVGFECompositeElement::isSupportedAttribute):
2383         * svg/SVGFEConvolveMatrixElement.cpp:
2384         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
2385         * svg/SVGFEDiffuseLightingElement.cpp:
2386         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
2387         * svg/SVGFEDisplacementMapElement.cpp:
2388         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
2389         * svg/SVGFEDropShadowElement.cpp:
2390         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
2391         * svg/SVGFEGaussianBlurElement.cpp:
2392         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
2393         * svg/SVGFEImageElement.cpp:
2394         (WebCore::SVGFEImageElement::isSupportedAttribute):
2395         * svg/SVGFELightElement.cpp:
2396         (WebCore::SVGFELightElement::isSupportedAttribute):
2397         * svg/SVGFEMergeNodeElement.cpp:
2398         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
2399         * svg/SVGFEMorphologyElement.cpp:
2400         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
2401         * svg/SVGFEOffsetElement.cpp:
2402         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
2403         * svg/SVGFESpecularLightingElement.cpp:
2404         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
2405         * svg/SVGFETileElement.cpp:
2406         (WebCore::SVGFETileElement::isSupportedAttribute):
2407         * svg/SVGFETurbulenceElement.cpp:
2408         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
2409         * svg/SVGFilterElement.cpp:
2410         (WebCore::SVGFilterElement::isSupportedAttribute):
2411         (WebCore::SVGFilterElement::childShouldCreateRenderer):
2412         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2413         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
2414         * svg/SVGForeignObjectElement.cpp:
2415         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
2416         * svg/SVGGElement.cpp:
2417         (WebCore::SVGGElement::isSupportedAttribute):
2418         * svg/SVGGradientElement.cpp:
2419         (WebCore::SVGGradientElement::isSupportedAttribute):
2420         * svg/SVGGraphicsElement.cpp:
2421         (WebCore::SVGGraphicsElement::isSupportedAttribute):
2422         * svg/SVGImageElement.cpp:
2423         (WebCore::SVGImageElement::isSupportedAttribute):
2424         * svg/SVGLength.cpp:
2425         (WebCore::SVGLength::lengthModeForAnimatedLengthAttribute):
2426         * svg/SVGLineElement.cpp:
2427         (WebCore::SVGLineElement::isSupportedAttribute):
2428         * svg/SVGLinearGradientElement.cpp:
2429         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
2430         * svg/SVGMPathElement.cpp:
2431         (WebCore::SVGMPathElement::isSupportedAttribute):
2432         * svg/SVGMarkerElement.cpp:
2433         (WebCore::SVGMarkerElement::isSupportedAttribute):
2434         * svg/SVGMaskElement.cpp:
2435         (WebCore::SVGMaskElement::isSupportedAttribute):
2436         * svg/SVGPathElement.cpp:
2437         (WebCore::SVGPathElement::isSupportedAttribute):
2438         * svg/SVGPatternElement.cpp:
2439         (WebCore::SVGPatternElement::isSupportedAttribute):
2440         * svg/SVGPolyElement.cpp:
2441         (WebCore::SVGPolyElement::isSupportedAttribute):
2442         * svg/SVGRadialGradientElement.cpp:
2443         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
2444         * svg/SVGRectElement.cpp:
2445         (WebCore::SVGRectElement::isSupportedAttribute):
2446         * svg/SVGScriptElement.cpp:
2447         (WebCore::SVGScriptElement::isSupportedAttribute):
2448         * svg/SVGStopElement.cpp:
2449         (WebCore::SVGStopElement::isSupportedAttribute):
2450         * svg/SVGStyleElement.cpp:
2451         (WebCore::SVGStyleElement::isSupportedAttribute):
2452         * svg/SVGSymbolElement.cpp:
2453         (WebCore::SVGSymbolElement::isSupportedAttribute):
2454         * svg/SVGTRefElement.cpp:
2455         (WebCore::SVGTRefElement::isSupportedAttribute):
2456         * svg/SVGTests.cpp:
2457         (WebCore::SVGTests::attributeToPropertyMap):
2458         * svg/SVGTextContentElement.cpp:
2459         (WebCore::SVGTextContentElement::textLengthAnimated):
2460         (WebCore::SVGTextContentElement::isSupportedAttribute):
2461         * svg/SVGTextPathElement.cpp:
2462         (WebCore::SVGTextPathElement::isSupportedAttribute):
2463         * svg/SVGTextPositioningElement.cpp:
2464         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
2465         * svg/SVGUseElement.cpp:
2466         (WebCore::SVGUseElement::isSupportedAttribute):
2467         (WebCore::isDisallowedElement):
2468         * svg/SVGViewElement.cpp:
2469         (WebCore::SVGViewElement::isSupportedAttribute):
2470
2471 2014-05-08  Ion Rosca  <rosca@adobe.com>
2472
2473         [CSS Blending] Replacing Unisolated with NotIsolated in variables and methods names
2474         https://bugs.webkit.org/show_bug.cgi?id=132677
2475
2476         Reviewed by Dirk Schulze.
2477
2478         No new tests required.
2479
2480         * rendering/RenderLayer.cpp:
2481         (WebCore::RenderLayer::RenderLayer):
2482         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
2483         (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
2484         (WebCore::RenderLayer::updateDescendantDependentFlags):
2485         hasUnisolatedBlendingDescendants -> hasNotIsolatedBlendingDescendants
2486         (WebCore::RenderLayer::addChild):
2487         (WebCore::RenderLayer::removeChild):
2488         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
2489         * rendering/RenderLayer.h:
2490         m_hasUnisolatedBlendingDescendants -> m_hasNotIsolatedBlendingDescendants
2491         m_hasUnisolatedBlendingDescendantsStatusDirty -> m_hasNotIsolatedBlendingDescendantsStatusDirty
2492         hasUnisolatedBlendingDescendants() -> hasNotIsolatedBlendingDescendants()
2493         hasUnisolatedBlendingDescendantsStatusDirty() -> hasNotIsolatedBlendingDescendantsStatusDirty()
2494         m_hasUnisolatedCompositedBlendingDescendants -> m_hasNotIsolatedCompositedBlendingDescendants
2495         hasUnisolatedCompositedBlendingDescendants() -> hasNotIsolatedCompositedBlendingDescendants()
2496         setHasUnisolatedCompositedBlendingDescendants() -> setHasNotIsolatedCompositedBlendingDescendants
2497         * rendering/RenderLayerCompositor.cpp:
2498         (WebCore::CompositingState::CompositingState):
2499         m_hasUnisolatedCompositedBlendingDescendants -> m_hasNotIsolatedCompositedBlendingDescendants
2500         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2501
2502 2014-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2503
2504         [GTK] Enable skipped http/tests/media/hls/video-controls-live-stream.html
2505         https://bugs.webkit.org/show_bug.cgi?id=132329
2506
2507         Reviewed by Eric Carlson.
2508
2509         GTK port needed to define what happened with live stream media
2510         controls. Now we disable and dim the timeline and tweak the
2511         timers.
2512
2513         Test: http/tests/media/hls/video-controls-live-stream.html.
2514
2515         * Modules/mediacontrols/mediaControlsGtk.js:
2516         (ControllerGtk.prototype.configureControls): Moved logic from
2517         setControlsType and changed to use an early return.
2518         (ControllerGtk.prototype.reconnectControls): Redefined to just
2519         configure the controls.
2520         (ControllerGtk.prototype.handlePlay): If stream is live we don't
2521         activate the current time just in case.
2522         (ControllerGtk.prototype.updateDuration): Calls the superclass and
2523         sets timeline.max to 0.
2524         (ControllerGtk.prototype.setControlsType): Deleted.
2525         (ControllerGtk.prototype.setIsLive): Configures controls and
2526         disables the timeline if stream is live.
2527         * css/mediaControlsGtk.css:
2528         (audio::-webkit-media-controls-timeline[disabled])
2529         (video::-webkit-media-controls-timeline[disabled]): Dimmed the
2530         timeline by setting opacity to 0.3.
2531
2532 2014-05-08  Ion Rosca  <rosca@adobe.com>
2533
2534         [CSS Blending] Changing isolation CSS property should not trigger repaint in RenderStyle::changeRequiresLayerRepaint
2535         https://bugs.webkit.org/show_bug.cgi?id=131436
2536
2537         Reviewed by Dirk Schulze.
2538
2539         The isolation:isolate property will create a stacking context. This is done in
2540         StyleResolver::adjustRenderStyle where z-index is forced to 0.
2541         If the element is already a stacking context for any other reason,
2542         changing the isolation flag should not have any effect.
2543
2544         Tests: css3/blending/repaint/blend-mode-turn-off-isolation-no-effect.html
2545                css3/blending/repaint/blend-mode-turn-off-isolation.html
2546
2547         * rendering/style/RenderStyle.cpp:
2548         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2549         do not request repaint if isolation has changed.
2550
2551 2014-05-08  Manuel Rego Casasnovas  <rego@igalia.com>
2552
2553         REGRESSION (r167652): SelectionState is not set properly for non leaf objects in pages with regions
2554         https://bugs.webkit.org/show_bug.cgi?id=132493
2555
2556         Reviewed by David Hyatt.
2557
2558         Non selection leaf elements were not included in the selection ranges,
2559         that was causing that their selection state was not set properly and
2560         when one of the element was removed as it was marked as SelectionNone
2561         current selection was not removed.
2562
2563         Due to this fix, the regression detected in bug #131982 arose again.
2564         Reverted changes from r167675 and reopened bug as previous fix was not
2565         right. Updated TestExpectations accordingly.
2566
2567         Test: fast/regions/selection/crash-select-all.html
2568
2569         * rendering/RenderView.cpp:
2570         (WebCore::RenderView::splitSelectionBetweenSubtrees): We need to include
2571         non selection leafs in the range, otherwise we won't be marking
2572         selection state of some elements properly.
2573
2574 2014-05-08  Zoltan Horvath  <zoltan@webkit.org>
2575
2576         [CSS Shapes] Can't select content within the area of the floating box when clip-path is applied
2577         https://bugs.webkit.org/show_bug.cgi?id=131375
2578
2579         Reviewed by Dirk Schulze.
2580
2581         According to http://www.w3.org/TR/css-masking-1/, the clipped part of the element should
2582         not have pointer event dispatching. So add this logic to RenderBlock::nodeAtPoint. This
2583         fixes the bug as it disallows selection on any clipped parts.
2584
2585         I implemented the proper selection for the various CSS box types and added testing
2586         for them. Also, I made and run performance tests for exposing mouse events over the
2587         clipped/non-clipped area, which results can be seen in bugzilla.
2588
2589         Based on the patch made by Rob Buis <rob.buis@samsung.com>
2590         Blink revision: http://src.chromium.org/viewvc/blink?view=revision&revision=172619
2591
2592         Tests: fast/masking/clip-path-selection.html
2593                fast/shapes/shape-outside-floats/shape-outside-clip-path-selection.html
2594
2595         * rendering/RenderBlock.cpp:
2596         (WebCore::RenderBlock::nodeAtPoint):
2597
2598 2014-05-07  Ion Rosca  <rosca@adobe.com>
2599
2600         [CSS Blending] Blending doesn't work if the parent stacking context is not a self painting layer
2601         https://bugs.webkit.org/show_bug.cgi?id=130891
2602
2603         Reviewed by Dean Jackson.
2604
2605         The stacking context layers having unisolated blending descendants should be able
2606         to create transparency layers or to become composited in order to restrict blending 
2607         content to accessing the information outside the current stacking context.
2608         Some layers are not self painting layers and these layers cannot crate transparency
2609         layers and cannot be composited, thus they are not able to isolate blending descendants
2610         when it's required.
2611         
2612         The solution in this patch is to make a layer isSelfPaintingLayer when
2613         it needs to isolate blending descendants (hasUnisolatedBlendingDescendants).
2614
2615         Tests: css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html
2616                css3/blending/blend-mode-isolation-overflow-hidden.html
2617                css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html
2618                css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html
2619                css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html
2620                css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html
2621
2622         * rendering/RenderLayer.cpp:
2623         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
2624         When hasUnisolatedBlendingDescendants is set we make sure that isSelfPaintingLayer flag is set too.
2625         (WebCore::RenderLayer::updateDescendantDependentFlags):
2626         The flags might be read or changed while walking the descendants, so we don't want to reset
2627         them before traversing the tree.
2628         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
2629         Adding isolatesBlending() condition for a layer to be self painting.
2630         * rendering/RenderLayer.h:
2631         Removing ASSERT from hasUnisolatedBlendingDescendants(). It crashes in minibrowser
2632         and in layout tests when painting contents. Similar bugs on other flags: #71044, #71277.
2633         * rendering/RenderLayerModelObject.cpp:
2634         (WebCore::RenderLayerModelObject::styleDidChange):
2635         Telling ancestors that blend mode property has been removed from CSS when the layer for
2636         this element is going to be removed; styleChanged will not be called anymore.
2637
2638 2014-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
2639
2640         Dragging text from one paragraph to another does not render as expected
2641         https://bugs.webkit.org/show_bug.cgi?id=132633
2642
2643         Reviewed by Darin Adler and Ryosuke Niwa.
2644
2645         When we are dragging and dropping into a content editable field, we detect
2646         if we are trying to put a <p> into an existing <p>, and if so, split the
2647         outer <p> and insert the new <p> as its sibling. However, the outer <p>
2648         might not be editable, so we don't want to do any splitting and inserting
2649         at that location.
2650
2651         Test: editing/pasteboard/drag-drop-paragraph-crasher.html
2652
2653         * editing/ReplaceSelectionCommand.cpp:
2654         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2655
2656 2014-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2657
2658         [CoordinatedGraphics][WK2] Scale factor and scroll position is not being restored properly in a back/forward load
2659         https://bugs.webkit.org/show_bug.cgi?id=126022
2660
2661         Reviewed by Benjamin Poulain.
2662
2663         Original author : Thiago de Barros Lacerda, and finished by Gyuyoung Kim.
2664
2665         When user is navigating back/forward to a page that has been scrolled and/or scaled, that page must be shown
2666         with its last scroll position and scale factor. However, when fixed layout was enabled with CoordinatedGraphics
2667         and TILED_BACKING_STORE, Page::setPageScaleFactor() doesn't send previous scroll position since r165652 and r165913.
2668
2669         This patch allows the Page::setPageScaleFactor() send stored position to WK2 implementation by calling delegatedScrollRequested()
2670         directly when delegatesScrolling() is on.
2671
2672         * page/Page.cpp:
2673         (WebCore::Page::setPageScaleFactor): TILED_BACKING_STORE and delegateScrolling are enabled, we pass new scroll position to WK2 though
2674         delegateScrolling is disabled.
2675         * platform/ScrollView.cpp: delegatedScrollRequested() call is moved from ScrollView::setScrollPosition() to Page::setPageScaleFactor().
2676         (WebCore::ScrollView::setScrollPosition): 
2677
2678 2014-05-07  Dean Jackson  <dino@apple.com>
2679
2680         Using a fill pattern much larger than actual canvas reliably segfaults browser
2681         https://bugs.webkit.org/show_bug.cgi?id=132635
2682
2683         Reviewed by Simon Fraser.
2684
2685         Make sure that createPattern checks that the canvas it is about to use
2686         as a source is valid.
2687
2688         Test: fast/canvas/pattern-too-large-to-create.html
2689
2690         * html/canvas/CanvasRenderingContext2D.cpp:
2691         (WebCore::CanvasRenderingContext2D::createPattern): Check that the source canvas has
2692         an ok ImageBuffer.
2693
2694 2014-05-07  Pratik Solanki  <psolanki@apple.com>
2695
2696         Use system defaults for hardware jpeg decoding
2697         https://bugs.webkit.org/show_bug.cgi?id=132661
2698         <rdar://problem/11348201>
2699
2700         Reviewed by Tim Horton.
2701
2702         Remove code that explicitly disabled hardware image decoding. Let the system decide what to do.
2703
2704         * WebCore.exp.in:
2705         * platform/graphics/ImageSource.h:
2706         (WebCore::ImageSource::acceleratedImageDecodingEnabled): Deleted.
2707         (WebCore::ImageSource::setAcceleratedImageDecodingEnabled): Deleted.
2708         * platform/graphics/cg/ImageSourceCG.cpp:
2709         (WebCore::ImageSource::imageSourceOptions):
2710
2711 2014-05-07  Radu Stavila  <stavila@adobe.com>
2712
2713         Use after free in WebCore::RenderObject::nextSibling / WebCore::RenderBoxModelObject::moveChildrenTo
2714         https://bugs.webkit.org/show_bug.cgi?id=132625
2715
2716         Reviewed by David Hyatt.
2717
2718         Fixed problem with dynamically inserting first letter elements.
2719
2720         Test: fast/multicol/newmulticol/first-letter-create.html
2721
2722         * rendering/RenderBlock.cpp:
2723         (WebCore::RenderBlock::getFirstLetter):
2724         (WebCore::RenderBlock::updateFirstLetter):
2725         * rendering/RenderBlock.h:
2726         * rendering/RenderBoxModelObject.cpp:
2727         (WebCore::RenderBoxModelObject::moveChildrenTo):
2728
2729 2014-05-07  Enrica Casucci  <enrica@apple.com>
2730
2731         WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
2732         https://bugs.webkit.org/show_bug.cgi?id=132657
2733         <rdar://problem/16468462>
2734
2735         Reviewed by Benjamin Poulain.
2736
2737         With the scrolling model we use on iOS, a programatic scroll
2738         request can be received while we are still animating to reveal
2739         the focused input element. The WebProcess is unaware that the
2740         scroll position is being changed in the UIProcess, and does not
2741         honor the scroll request from JavaScript.
2742         This is patch changes the behavior for clients using scroll delegates
2743         to always send the scroll request to the UIProcess without checking
2744         the current scroll position.
2745
2746         * page/FrameView.h:
2747         * platform/ScrollView.cpp:
2748         (WebCore::ScrollView::setScrollPosition):
2749         * platform/ScrollView.h:
2750         (WebCore::ScrollView::inProgrammaticScroll):
2751
2752 2014-05-07  Brent Fulgham  <bfulgham@apple.com>
2753
2754         [Mac, iOS] REGRESSION: WK2 YouTube support
2755         https://bugs.webkit.org/show_bug.cgi?id=132568
2756         <rdar://problem/11464344>
2757
2758         Reviewed by Darin Adler.
2759
2760         Move the custom YouTube loader code out of the WebFrameLoaderClient into a
2761         PluginReplacement-based class.
2762
2763         * Modules/plugins/PluginReplacement.h:
2764         (WebCore::PluginReplacement::supportsURL): New predicate so we can restrict
2765         use of a plugin to a particular category of URLs.
2766         * Modules/plugins/QuickTimePluginReplacement.mm:
2767         (WebCore::QuickTimePluginReplacement): Updated for new registrar signature.
2768         * Modules/plugins/YouTubePluginReplacement.h: Added.
2769         (WebCore::YouTubePluginReplacement::parentElement):
2770         * Modules/plugins/YouTubePluginReplacement.cpp: Added.
2771         (WebCore::YouTubePluginReplacement::registerPluginReplacement):
2772         (WebCore::YouTubePluginReplacement::create):
2773         (WebCore::YouTubePluginReplacement::supportsMimeType):
2774         (WebCore::YouTubePluginReplacement::supportsFileExtension):
2775         (WebCore::kit):
2776         (WebCore::YouTubePluginReplacement::YouTubePluginReplacement):
2777         (WebCore::YouTubePluginReplacement::createElementRenderer):
2778         (WebCore::objectForKey):
2779         (WebCore::YouTubePluginReplacement::installReplacement):
2780         (WebCore::createYouTubeURL):
2781         (WebCore::processAndCreateYouTubeURL):
2782         (WebCore::YouTubePluginReplacement::youTubeURL):
2783         * WebCore.exp.in: Add new export from WebCore.
2784         * WebCore.xcodeproj/project.pbxproj:
2785         * html/HTMLPlugInElement.cpp:
2786         (WebCore::pluginReplacementForType): Update to also check that the URL is supported
2787         by the plugin.
2788         (WebCore::registeredPluginReplacements): Add new YouTubePluginReplacement to registry.
2789         * html/HTMLPlugInImageElement.cpp:
2790         (WebCore::HTMLPlugInImageElement::createElementRenderer): Remove custom YouTube code
2791         now that this logic is handled in the plugin replacement class.
2792         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): Deleted.
2793         * html/HTMLPlugInImageElement.h:
2794         * html/shadow/YouTubeEmbedShadowElement.cpp:
2795         (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):
2796         (WebCore::YouTubeEmbedShadowElement::shadowPseudoId): Use correct pseudoID for the
2797         plugin replacement architecture.
2798         * html/shadow/YouTubeEmbedShadowElement.h:
2799         * platform/mac/WebCoreNSURLExtras.h:
2800         * platform/mac/WebCoreNSURLExtras.mm:
2801         (WebCore::unescapedQueryValue): Moved from WebKit/Misc/WebNSURLExtras.
2802         (WebCore::queryKeysAndValues): Ditto.
2803
2804 2014-05-07  Simon Fraser  <simon.fraser@apple.com>
2805
2806         [iOS] Acclerated overflow-scrolling broken in WK1
2807         https://bugs.webkit.org/show_bug.cgi?id=132665
2808         <rdar://problem/16842909>
2809
2810         Reviewed by Tim Horton.
2811
2812         r168301 added a CALayer delegate to disable implicit animations,
2813         but for some layers we wrap them in UIViews (which are themselves
2814         layer delegates), so bad things happened.
2815         
2816         Fix by falling back to setting the null actions dictionary for
2817         layers with custom scrolling behavior.
2818
2819         * platform/graphics/GraphicsLayer.h:
2820         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2821         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2822         (PlatformCALayerMac::updateCustomBehavior):
2823         * rendering/RenderLayerBacking.cpp:
2824         (WebCore::RenderLayerBacking::updateScrollingLayers):
2825
2826 2014-05-07  Jeremy Jones  <jeremyj@apple.com>
2827
2828         HTMLMediaElement should exitFullscreen when view is removed from the window.
2829         https://bugs.webkit.org/show_bug.cgi?id=132506
2830
2831         Reviewed by Tim Horton.
2832
2833         * platform/ios/WebVideoFullscreenControllerAVKit.h:
2834         Add -requestExitFullscreen.
2835
2836         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2837         (-[WebVideoFullscreenController requestExitFullscreen]):
2838         Forward request onto WebVideoFullscreenModelMediaElement.
2839
2840         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2841         (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
2842         Add some protection here since this may be called when not in fullscreen.
2843
2844 2014-05-07  Dean Jackson  <dino@apple.com>
2845
2846         Clean up the difference between painting focus rings and adding PDF annotations
2847         https://bugs.webkit.org/show_bug.cgi?id=132638
2848
2849         Follow-up comments from Darin Adler.
2850
2851         * rendering/RenderInline.cpp:
2852         (WebCore::RenderInline::paintOutline): Move "else if" to a separate "if" for clarity.
2853         * rendering/RenderObject.cpp:
2854         (WebCore::RenderObject::paintFocusRing): Don't guard against outlineIsAuto(). ASSERT instead.
2855         (WebCore::RenderObject::addPDFURLRect): Give "rect" variable a better name.
2856         (WebCore::RenderObject::paintOutline): Move "else if" to a separate "if" for clarity.
2857
2858 2014-05-07  Alexey Proskuryakov  <ap@apple.com>
2859
2860         Make blob size computation lazy
2861         https://bugs.webkit.org/show_bug.cgi?id=132653
2862
2863         Reviewed by Anders Carlsson.
2864
2865         * fileapi/Blob.cpp:
2866         (WebCore::Blob::Blob):
2867         (WebCore::Blob::size):
2868         * fileapi/Blob.h:
2869         (WebCore::Blob::size): Deleted.
2870         * fileapi/File.cpp:
2871         (WebCore::File::size): Deleted.
2872         * fileapi/File.h:
2873         * fileapi/ThreadableBlobRegistry.cpp:
2874         (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
2875         (WebCore::ThreadableBlobRegistry::registerBlobURL):
2876         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
2877         (WebCore::ThreadableBlobRegistry::blobSize):
2878         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
2879         (WebCore::unregisterBlobURLTask): Deleted.
2880         * fileapi/ThreadableBlobRegistry.h:
2881         * platform/network/BlobData.cpp:
2882         (WebCore::BlobData::appendData):
2883         * platform/network/BlobRegistry.h:
2884         * platform/network/BlobRegistryImpl.cpp:
2885         (WebCore::BlobRegistryImpl::registerBlobURL):
2886         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
2887         * platform/network/BlobRegistryImpl.h:
2888
2889 2014-05-06  Simon Fraser  <simon.fraser@apple.com>
2890
2891         Add scrolling tree logging to RemoteLayerTree output
2892         https://bugs.webkit.org/show_bug.cgi?id=132640
2893
2894         Reviewed by Beth Dakin.
2895
2896         Support scrolling tree logging in the RemoteLayerTree log channel
2897         output.
2898         
2899         ScrollingStateTree::commit() unconditionally set treeStateClone->m_hasChangedProperties
2900         to true, but we should set it based on original scrolling state tree's 
2901         m_hasChangedProperties.
2902         
2903         We have to encode all of the scrolling state nodes anyway (they only encode
2904         changed properties), but we can use this for future optimizations, and to
2905         avoid spurious logging.
2906         
2907         * WebCore.exp.in: Export a couple of things we need.
2908         * page/scrolling/ScrollingStateTree.cpp:
2909         (WebCore::ScrollingStateTree::commit):
2910
2911 2014-05-07  Chris Fleizach  <cfleizach@apple.com>
2912
2913         AX: aria-expanded changes are not communicated to clients
2914         https://bugs.webkit.org/show_bug.cgi?id=132642
2915
2916         Reviewed by Mario Sanchez Prada.
2917
2918         When aria-expanded changes on non list/tree items, send out a generic
2919         AXExpandedChange notification.
2920
2921         Test: platform/mac/accessibility/expanded-notification.html
2922
2923         * accessibility/AXObjectCache.h:
2924         * accessibility/AccessibilityRenderObject.cpp:
2925         (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
2926         * accessibility/mac/AXObjectCacheMac.mm:
2927         (WebCore::AXObjectCache::postPlatformNotification):
2928
2929 2014-05-07  Alexey Proskuryakov  <ap@apple.com>
2930
2931         Release build fix.
2932
2933         * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes):
2934         Removed unused globals.
2935
2936 2014-05-07  Alexey Proskuryakov  <ap@apple.com>
2937
2938         Eliminate "well known MIME type" support
2939         https://bugs.webkit.org/show_bug.cgi?id=132654
2940
2941         Reviewed by Anders Carlsson.
2942
2943         Vestiges of FileSystem API.
2944
2945         * dom/DataTransfer.cpp:
2946         (WebCore::DataTransfer::files):
2947         (WebCore::DataTransfer::hasFileOfType):
2948         * fileapi/File.cpp:
2949         (WebCore::File::File):
2950         (WebCore::File::contentTypeFromFilePathOrName):
2951         * fileapi/File.h:
2952         * html/FileInputType.cpp:
2953         (WebCore::FileInputType::createFileList):
2954         * platform/MIMETypeRegistry.cpp:
2955         (WebCore::initializeSupportedImageMIMETypes):
2956         (WebCore::findMimeType): Deleted.
2957         (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): Deleted.
2958         * platform/MIMETypeRegistry.h:
2959
2960 2014-05-07  Christophe Dumez  <ch.dumez@samsung.com>
2961
2962         [HTML] Default argument to HTMLTableElement.insertRow() should be -1
2963         https://bugs.webkit.org/show_bug.cgi?id=132651
2964
2965         Reviewed by Alexey Proskuryakov.
2966
2967         HTMLTableElement.insertRow()'s argument default value should be -1, not 0,
2968         as per the specification:
2969         http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#htmltableelement
2970
2971         The new behavior matches the one of Firefox 29 and IE11, and soon Blink:
2972         https://codereview.chromium.org/270213007/
2973
2974         Test: fast/dom/HTMLTableElement/insertRow-default-argument.html
2975
2976         * html/HTMLTableElement.h:
2977         * html/HTMLTableElement.idl:
2978
2979 2014-05-07  Chris Fleizach  <cfleizach@apple.com>
2980
2981         AX: AXSelectTextWithCriteria should support capitalize/lowercase/uppercase
2982         https://bugs.webkit.org/show_bug.cgi?id=132622
2983
2984         Reviewed by Mario Sanchez Prada.
2985
2986         The select text with criteria mechanism used through accessibility needs to support
2987         a few more parameters to be complete (including capitalize, lowercase and uppercase).
2988
2989         Updated: accessibility/select-text.html
2990
2991         * accessibility/AccessibilityObject.cpp:
2992         (WebCore::AccessibilityObject::selectText):
2993         * accessibility/AccessibilityObject.h:
2994         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2995         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
2996         * rendering/RenderText.cpp:
2997         (WebCore::makeCapitalized):
2998         * rendering/RenderText.h:
2999
3000 2014-05-07  peavo@outlook.com  <peavo@outlook.com>
3001
3002         DocumentLoader::dataReceived assertion failed
3003         https://bugs.webkit.org/show_bug.cgi?id=132017
3004
3005         Reviewed by Brent Fulgham.
3006
3007         We need to call didReceiveResponse client method before the didReceiveData client method, otherwise we get a lot of asserts.
3008         This patch also fixes frequent crashes in downloadTimerCallback method on page loading.
3009
3010         * platform/network/curl/ResourceHandleManager.cpp:
3011         (WebCore::calculateWebTimingInformations): Initialize local variables.
3012         (WebCore::headerCallback): Call didReceiveResponse client method here instead of in downloadTimerCallback.
3013         (WebCore::ResourceHandleManager::downloadTimerCallback): Remove call to didReceiveResponse method.
3014         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Removed empty line.
3015
3016 2014-05-06  Antti Koivisto  <antti@apple.com>
3017
3018         REGRESSION: Animated GIF inside compositing layer never resumes animation when scrolled back into view
3019         https://bugs.webkit.org/show_bug.cgi?id=132608
3020
3021         Reviewed by Simon Fraser.
3022
3023         Test: fast/repaint/animation-after-layer-scroll.html
3024
3025         * rendering/RenderLayer.cpp:
3026         (WebCore::RenderLayer::scrollTo):
3027         
3028             Check if any animations need to be restarted after layer scroll.
3029
3030 2014-05-07  Hyowon Kim  <hw1008.kim@samsung.com>
3031
3032         GraphicsLayer::client() should return a reference.
3033         https://bugs.webkit.org/show_bug.cgi?id=126372
3034
3035         Reviewed by Simon Fraser.
3036
3037         GraphicsLayers always have a GraphicsLayerClient attached,
3038         so make client() a reference and remove some unnecessary branches.
3039         The author of the changes in the mac port is Andreas Kling <akling@apple.com>.
3040
3041         * WebCore.exp.in:
3042         * platform/graphics/GraphicsLayer.cpp:
3043         (WebCore::GraphicsLayer::GraphicsLayer):
3044         (WebCore::GraphicsLayer::willBeDestroyed):
3045         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
3046         (WebCore::GraphicsLayer::addRepaintRect):
3047         (WebCore::dumpChildren):
3048         (WebCore::GraphicsLayer::dumpProperties):
3049         * platform/graphics/GraphicsLayer.h:
3050         (WebCore::GraphicsLayer::client):
3051         (WebCore::GraphicsLayer::pageScaleFactor):
3052         (WebCore::GraphicsLayer::deviceScaleFactor):
3053         * platform/graphics/GraphicsLayerFactory.h:
3054         * platform/graphics/ca/GraphicsLayerCA.cpp:
3055         (WebCore::GraphicsLayer::create):
3056         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3057         (WebCore::GraphicsLayerCA::initialize):
3058         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
3059         (WebCore::GraphicsLayerCA::computePositionRelativeToBase):
3060         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
3061         (WebCore::GraphicsLayerCA::computeVisibleRect):
3062         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3063         (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
3064         (WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
3065         (WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
3066         (WebCore::GraphicsLayerCA::updateContentsOpaque):
3067         (WebCore::GraphicsLayerCA::updateContentsScale):
3068         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3069         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
3070         * platform/graphics/ca/GraphicsLayerCA.h:
3071         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3072         (WebCore::GraphicsLayer::create):
3073         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
3074         (WebCore::GraphicsLayerTextureMapper::notifyChange):
3075         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
3076         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3077         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
3078         (WebCore::CompositingCoordinator::createRootLayer):
3079         (WebCore::CompositingCoordinator::createGraphicsLayer):
3080         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
3081         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3082         (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired):
3083         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
3084         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
3085         (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
3086         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3087         * rendering/RenderLayerBacking.cpp:
3088         (WebCore::RenderLayerBacking::createGraphicsLayer):
3089         * rendering/RenderLayerCompositor.cpp:
3090         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
3091         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
3092         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3093         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3094         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3095         (WebCore::RenderLayerCompositor::ensureRootLayer):
3096
3097 2014-05-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3098
3099         [GStreamer] Corrected typo
3100         https://bugs.webkit.org/show_bug.cgi?id=132609
3101
3102         Reviewed by Martin Robinson.
3103
3104         Corrected m_canFallBackToLastFinishedSeekPositon typo and
3105         initialized in the constructor to prevent problems in the future.
3106
3107         No test needed.
3108
3109         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3110         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3111         Initialized m_canFallBackToLastFinishedSeekPosition as false.
3112         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
3113         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3114         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
3115         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3116         m_canFallBackToLastFinishedSeekPositon ->
3117         m_canFallBackToLastFinishedSeekPosition
3118
3119 2014-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3120
3121         Convert PassOwnPtr to unique_ptr in CrossThreadTask.h
3122         https://bugs.webkit.org/show_bug.cgi?id=132605
3123
3124         Reviewed by Dirk Schulze.
3125
3126         * dom/CrossThreadTask.h: Converted.
3127
3128 2014-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3129
3130         [SOUP] TLSErrors do not cause page load to fail when not ignored
3131         https://bugs.webkit.org/show_bug.cgi?id=121548
3132
3133         Reviewed by Sergio Villar Senin.
3134
3135         This only happens in case of redirection, when the initial URL is
3136         an HTTPS site with an invalid certificate, that redirects to
3137         another location. We are starting the redirection without checking
3138         the TLS errors.
3139
3140         * platform/network/soup/ResourceHandleSoup.cpp:
3141         (WebCore::sendRequestCallback): Check TLS errors before starting a
3142         possible redirection.
3143
3144 2014-05-07  Manuel Rego Casasnovas  <rego@igalia.com>
3145
3146         [CSS Grid Layout] Remove runtime feature
3147         https://bugs.webkit.org/show_bug.cgi?id=132382
3148
3149         Reviewed by Benjamin Poulain.
3150
3151         Remove cssGridLayoutEnabled setting. Update methods using it accordingly.
3152
3153         * WebCore.order:
3154         * css/CSSParser.cpp:
3155         (WebCore::CSSParserContext::CSSParserContext):
3156         (WebCore::operator==):
3157         (WebCore::isValidKeywordPropertyAndValue):
3158         (WebCore::CSSParser::parseValue):
3159         (WebCore::CSSParser::parseGridTemplateShorthand):
3160         (WebCore::CSSParser::parseGridAreaShorthand):
3161         (WebCore::CSSParser::cssGridLayoutEnabled): Deleted.
3162         * css/CSSParser.h:
3163         * css/CSSParserMode.h:
3164         * dom/Document.cpp:
3165         (WebCore::Document::cssGridLayoutEnabled): Deleted.
3166         * dom/Document.h:
3167         * page/Settings.in:
3168
3169 2014-05-07  Praveen R Jadhav  <praveen.j@samsung.com>
3170
3171         Fix build errors for BlobDataItem after r168391.
3172         https://bugs.webkit.org/show_bug.cgi?id=132643
3173
3174         Reviewed by Carlos Garcia Campos.
3175
3176         Patch updates BlobDataItem params usage in ResourceHandleSoup.cpp
3177         to be inline with r168391.
3178
3179         * platform/network/soup/ResourceHandleSoup.cpp:
3180         (WebCore::blobIsOutOfDate): BlobDataItem class is updated in r168391.
3181         Corresponding parameter changes are done to resolve build error.
3182         (WebCore::addEncodedBlobItemToSoupMessageBody): BlobDataItem class is updated
3183         in r168391. Corresponding parameter changes are done to resolve build error.
3184
3185 2014-05-06  Dean Jackson  <dino@apple.com>
3186
3187         Clean up the difference between painting focus rings and adding PDF annotations
3188         https://bugs.webkit.org/show_bug.cgi?id=132638
3189
3190         Reviewed by Simon Fraser.
3191
3192         The code to add a PDF annotation when printing was called from
3193         drawFocusRing, which is quite confusing. With just little movement
3194         of code, we can detect an annotation and call addPDFURLRect in the
3195         paint phase, and drawFocusRing becomes something that only
3196         draws focus rings.
3197
3198         * rendering/RenderInline.cpp:
3199         (WebCore::RenderInline::paintOutline): Split calls to drawFocusRing
3200         and addPDFURLRect.
3201         * rendering/RenderObject.cpp:
3202         (WebCore::RenderObject::paintFocusRing): Get rid of call to PDF.
3203         (WebCore::RenderObject::addPDFURLRect): Change the signature so it
3204         can be called externally, and calculates the rectangle itself.
3205         (WebCore::RenderObject::paintOutline): Split the calls.
3206         * rendering/RenderObject.h:
3207
3208 2014-05-06  Rik Cabanier  <cabanier@adobe.com>
3209
3210         Calling createPattern with a broken image must throw an invalidstate error
3211         https://bugs.webkit.org/show_bug.cgi?id=132407
3212
3213         Reviewed by Darin Adler.
3214
3215         Updated createPattern so it throws an invalidState exception
3216         if you pass it an image that is in the broken state.
3217
3218         Tests:
3219         * canvas/philip/tests/2d.pattern.image.broken.html:
3220         * canvas/philip/tests/2d.pattern.image.incomplete.empty.html:
3221         * fast/canvas/canvas-empty-image-pattern.html:
3222
3223         * html/canvas/CanvasRenderingContext2D.cpp:
3224         (WebCore::CanvasRenderingContext2D::createPattern):
3225
3226 2014-05-06  Jer Noble  <jer.noble@apple.com>
3227
3228         [iOS][Mac] Display sleeps while playing <video> content.
3229         https://bugs.webkit.org/show_bug.cgi?id=132624
3230
3231         Reviewed by Darin Adler.
3232
3233         On iOS and Mac, create a DisplaySleepDisablerCocoa rather than an (no-op) DisplaySleepDisabler.
3234
3235         * platform/cocoa/DisplaySleepDisablerCocoa.cpp:
3236         (WebCore::DisplaySleepDisabler::create):
3237         * platform/cocoa/DisplaySleepDisablerCocoa.h:
3238
3239 2014-05-06  Dean Jackson  <dino@apple.com>
3240
3241         [Mac] Allow focus rings to redraw themselves if necessary
3242         https://bugs.webkit.org/show_bug.cgi?id=132593
3243
3244         Fix iOS build.
3245
3246         * platform/graphics/mac/GraphicsContextMac.mm:
3247         (WebCore::GraphicsContext::drawFocusRing): We no longer use the color parameter.
3248
3249 2014-05-06  Dean Jackson  <dino@apple.com>
3250
3251         [Mac] Allow focus rings to redraw themselves if necessary
3252         https://bugs.webkit.org/show_bug.cgi?id=132593
3253
3254         Reviewed by Simon Fraser.
3255
3256         Mac allows focus rings to change rendering over time. Expose this
3257         functionality to WebKit by having the rendering code detect that
3258         a focused element has asked to repaint itself, and also have
3259         the FocusController object remember how long it has been since
3260         an element was focused.
3261
3262         This patch removes WebCoreNSCellExtras, since a better version is
3263         available in WebKitSystemInterface, and it was going to be cumbersome
3264         to port the code from there into WebKit.
3265
3266         * WebCore.exp.in: Export _wkDrawFocusRingAtTime and _wkDrawCellFocusRingWithFrameAtTime.
3267         * WebCore.xcodeproj/project.pbxproj: Remove WebCoreNSCellExtras.
3268         * page/FocusController.cpp:
3269         (WebCore::FocusController::FocusController): Initialize the repaint timer.
3270         (WebCore::FocusController::~FocusController): Stop the repaint timer on deletion.
3271         (WebCore::FocusController::setFocusedElement): Keep track of the current time when focused.
3272         (WebCore::FocusController::focusedElementNeedsRepaint): Start the repaint timer.
3273         (WebCore::FocusController::focusRepaintTimerFired): Ask the focused element to repaint itself.
3274         (WebCore::FocusController::timeSinceFocusWasSet):
3275         * page/FocusController.h: Expose timeSinceFocusWasSet() and focusedElementNeedsRepaint(), as
3276         well as add the timer for repainting.
3277
3278         * platform/ControlStates.h: Add timeSinceControlWasFocused member variable, allowing the platform
3279         code such as Theme to obtain the value from FocusController.
3280         (WebCore::ControlStates::ControlStates):
3281         (WebCore::ControlStates::timeSinceControlWasFocused):
3282         (WebCore::ControlStates::setTimeSinceControlWasFocused):
3283
3284         * platform/graphics/GraphicsContext.h:
3285         (WebCore::GraphicsContext::drawFocusRing): New Mac-only method that uses timeOffset.
3286
3287         * platform/graphics/mac/GraphicsContextMac.mm:
3288         (WebCore::drawFocusRingToContext): No need to pass in color and radius - these are now
3289         ignored in WKDrawFocusRing. However, I didn't want to change the signature of the
3290         WKSI function.
3291         (WebCore::drawFocusRingToContextAtTime): Call into the new method WKDrawFocusRingAtTime.
3292         (WebCore::GraphicsContext::drawFocusRing): Color and radius no longer used.
3293
3294         * platform/mac/ThemeMac.mm:
3295         (WebCore::checkboxMargins): Update the margins since our focus ring can be a lot bigger.
3296         (WebCore::radioMargins): Ditto.
3297         (WebCore::paintToggleButton): Drawing a focus ring might trigger a repaint too.
3298         (WebCore::buttonMargins): Increase the margins.
3299         (WebCore::paintButton): If our focus ring wants to be drawn again, set the ControlStates flag.
3300
3301         * platform/mac/WebCoreNSCellExtras.h: Removed.
3302         * platform/mac/WebCoreNSCellExtras.m: Removed.
3303
3304         * platform/mac/WebCoreSystemInterface.h: Declare the new methods.
3305         * platform/mac/WebCoreSystemInterface.mm:
3306
3307         * rendering/RenderElement.cpp:
3308         (WebCore::RenderElement::initializeStyle): Expand the overflow rects by the maximum
3309         focus ring width. This might be different from the current outline size.
3310         (WebCore::RenderElement::setStyle): Ditto.
3311
3312         * rendering/RenderObject.cpp:
3313         (WebCore::RenderObject::paintFocusRing): If we're on Mac, use the new drawFocusRing method,
3314         which sets a parameter to true if the focused element needs a repaint.
3315
3316         * rendering/RenderTheme.cpp:
3317         (WebCore::RenderTheme::updateControlStatesForRenderer): Copy the value from FocusController
3318         so that the platform Theme code can use it.
3319
3320         * rendering/RenderTheme.h:
3321         (WebCore::RenderTheme::platformFocusRingMaxWidth): Add a way to get the maximum width
3322         of a focus ring for the platform. This is used to extend the overflow rects.
3323         * rendering/RenderThemeMac.h: Override the focus ring width.
3324         * rendering/RenderThemeMac.mm: On newer versions of OS X, we have a larger focus ring.
3325         (WebCore::RenderThemeMac::platformFocusRingMaxWidth):
3326         (WebCore::RenderThemeMac::paintMenuList): If a menu is focused, and needs a repaint, mark
3327         it as such.
3328
3329 2014-05-06  Jer Noble  <jer.noble@apple.com>
3330
3331         [iOS] Animate AVPlayerLayer into and out of full screen
3332         https://bugs.webkit.org/show_bug.cgi?id=132603
3333
3334         Reviewed by Simon Fraser.
3335
3336         Rather than synchronize animations across the WebProcess / UIProcess boundary, animate
3337         the AVPlayerLayer into place by first resizing the full screen layer to occupy the
3338         entire screen in the WebProcess, and use a sublayerTransform animation in the UIProcess
3339         to scale the AVPlayer from its initial screen location, as well as back to its final screen
3340         location.
3341
3342         * platform/graphics/GeometryUtilities.cpp:
3343         (WebCore::largestRectWithAspectRatioInsideRect): Added utility method.
3344         * platform/graphics/GeometryUtilities.h:
3345         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3346         (-[WebAVVideoLayer init]): Added, initialize video gravity and enable child layer masking.
3347         (-[WebAVVideoLayer setBounds:]): Create a transform to scale the video area.
3348         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Block implicit animations during setup.
3349         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Reset the gravity to ResizeAspect
3350             if necessary.
3351
3352 2014-05-06  Alexey Proskuryakov  <ap@apple.com>
3353
3354         Make BlobDataItem use a refcounted object for files
3355         https://bugs.webkit.org/show_bug.cgi?id=132628
3356
3357         Reviewed by Anders Carlsson.
3358
3359         * CMakeLists.txt:
3360         * WebCore.vcxproj/WebCore.vcxproj:
3361         * WebCore.vcxproj/WebCore.vcxproj.filters:
3362         * WebCore.xcodeproj/project.pbxproj:
3363         Added BlobDataFileReference.{h|cpp}
3364
3365         * WebCore.exp.in: Removed unused exports.
3366
3367         * platform/network/BlobData.h:
3368         (WebCore::BlobDataItem::offset):
3369         (WebCore::BlobDataItem::BlobDataItem):
3370         Use a wrapper class for files, not a path. Changed to be more class-like accordingly.
3371
3372         * platform/network/BlobData.cpp:
3373         (WebCore::BlobData::appendData):
3374         (WebCore::BlobData::appendFile):
3375         (WebCore::BlobData::appendBlob): Deleted.
3376         (WebCore::BlobData::BlobData): Deleted.
3377         We never add blobs to BlobData, they are always resolved to data of file references.
3378         Lots of very confusing code to delete.
3379
3380         * platform/network/BlobDataFileReference.h: Added.
3381         * platform/network/BlobDataFileReference.cpp: Added.
3382         (WebCore::BlobDataFileReference::size):
3383         (WebCore::BlobDataFileReference::expectedModificationTime):
3384         (WebCore::BlobDataFileReference::computeFileSystemData):
3385         A unique reference to a file referenced by blob, to be preserved when you slice
3386         or combine blobs.
3387
3388         * platform/network/BlobRegistryImpl.cpp:
3389         (WebCore::BlobRegistryImpl::appendStorageItems):
3390         (WebCore::BlobRegistryImpl::registerFileBlobURL):
3391         (WebCore::BlobRegistryImpl::registerBlobURL):
3392         (WebCore::BlobRegistryImpl::blobSize):
3393         * platform/network/BlobResourceHandle.cpp:
3394         (WebCore::BlobResourceHandle::getSizeForNext):
3395         (WebCore::BlobResourceHandle::didGetSize):
3396         (WebCore::BlobResourceHandle::readDataSync):
3397         (WebCore::BlobResourceHandle::readFileSync):
3398         (WebCore::BlobResourceHandle::readDataAsync):
3399         (WebCore::BlobResourceHandle::readFileAsync):
3400         * platform/network/BlobResourceHandle.h:
3401         * platform/network/FormData.cpp:
3402         (WebCore::appendBlobResolved):
3403         Updated for BlobDataItem interface changes.
3404
3405 2014-05-06  Christophe Dumez  <ch.dumez@samsung.com>
3406
3407         [HTML] Default argument to HTMLTableRowElement.insertCell() should be -1
3408         https://bugs.webkit.org/show_bug.cgi?id=132615
3409
3410         Reviewed by Darin Adler.
3411
3412         HTMLTableRowElement.insertCell()'s argument default value should be -1, not
3413         0, as per the specification:
3414         http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-tr-element
3415
3416         The new behavior matches the one of Firefox 29 and IE11, and soon Blink:
3417         https://codereview.chromium.org/263323004/
3418
3419         Test: fast/dom/HTMLTableRowElement/insertCell-default-argument.html
3420
3421         * html/HTMLTableRowElement.h:
3422         * html/HTMLTableRowElement.idl:
3423
3424 2014-05-06  Oliver Hunt  <oliver@apple.com>
3425
3426         Fix build.
3427
3428         * WebCore.exp.in:
3429
3430 2014-05-06  Andreas Kling  <akling@apple.com>
3431
3432         Add missing line from r168384.
3433
3434     &nb