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