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