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