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