Adapt inline SVG sizing behavior to Firefox and Blink
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-05  Dirk Schulze  <krit@webkit.org>
2
3         Adapt inline SVG sizing behavior to Firefox and Blink
4         https://bugs.webkit.org/show_bug.cgi?id=132569
5
6         Reviewed by Dean Jackson.
7
8         This patch is ported from Blink CR 308992. Thanks to David Vest for helping
9         with back porting his Blink patch. From the commit message:
10
11         "The basis of this change is to map explicit width and height
12         attributes to CSS properties, essentially promoting them to
13         presentation attributes. Note that implicit "100%" width and height
14         are not mapped.
15         
16         This enables us to remove the concept of "percentage intrinsic size"
17         and rely on normal CSS rules to resolve percentage values.
18         
19         The change has been approved by the SVG WG and the spec is being
20         updated. Minutes here:
21         
22         http://www.w3.org/2014/04/07-svg-minutes.html#item03"
23
24         The new model was indeed approved by the SVG WG and is basically following
25         the CSS 2.1 model for replaced elements.
26
27         With this patch WebKit, Firefox and Blink have the same behavior for inline SVG.
28         This is the first successful approach to unify the sizing behavior of SVG
29         across UAs.
30
31         Tests: svg/as-object/sizing/svg-in-object-placeholder-height-auto.html
32                svg/as-object/sizing/svg-in-object-placeholder-height-fixed.html
33                svg/as-object/sizing/svg-in-object-placeholder-height-percentage.html
34                svg/in-html/sizing/svg-inline.html
35
36         * css/svg.css: Root SVG elements still need to be sized with height: 100% and
37             width: 100%. This is necessary since width and height are presentation
38             attributes now.
39         (svg:root):
40         * rendering/RenderBox.h:
41         (WebCore::RenderBox::computeIntrinsicRatioInformation): Remove all special
42             behavior for intrinsic and percentage based sizes in SVG. This simplifies and
43             unifies the code a lot. Most of the logic that is used is in RenderBox and
44             RenderReplaced now. RenderSVGRoot was cleaned up a lot and is much lighter. 
45             And so it SVGSVGElement.
46         * rendering/RenderBoxModelObject.cpp:
47         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
48         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
49         * rendering/RenderImage.cpp:
50         (WebCore::RenderImage::computeIntrinsicRatioInformation):
51         * rendering/RenderImage.h:
52         * rendering/RenderReplaced.cpp:
53         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
54         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
55         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
56         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
57         (WebCore::RenderReplaced::computePreferredLogicalWidths):
58         * rendering/RenderReplaced.h:
59         * rendering/svg/RenderSVGRoot.cpp:
60         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
61         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
62         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
63         (WebCore::RenderSVGRoot::hasRelativeDimensions):
64         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth): Deleted.
65         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight): Deleted.
66         * rendering/svg/RenderSVGRoot.h:
67         * svg/SVGElement.h:
68         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):
69         * svg/SVGSVGElement.cpp:
70         (WebCore::SVGSVGElement::isPresentationAttribute):
71         (WebCore::SVGSVGElement::collectStyleForPresentationAttribute):
72         (WebCore::SVGSVGElement::svgAttributeChanged):
73         (WebCore::SVGSVGElement::currentViewportSize):
74         (WebCore::SVGSVGElement::hasIntrinsicWidth):
75         (WebCore::SVGSVGElement::hasIntrinsicHeight):
76         (WebCore::SVGSVGElement::intrinsicWidth):
77         (WebCore::SVGSVGElement::intrinsicHeight):
78         (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Deleted.
79         (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Deleted.
80         * svg/SVGSVGElement.h:
81         * svg/graphics/SVGImage.cpp:
82         (WebCore::SVGImage::containerSize):
83         * xml/XMLErrors.cpp: If an error occurs in a stand alone SVG file, we create
84             an XHTML document with the error message and append the SVG file.
85             This SVG file now follows the CSS sizing behavior as inline SVG.
86             Therefore, we need to set width and height to 100% explicitly.
87         (WebCore::XMLErrors::insertErrorMessageBlock):
88
89 2014-05-05  Ryuan Choi  <ryuan.choi@samsung.com>
90
91         [EFL] REGRESSION(167145): JavaScript media controls are broken
92         https://bugs.webkit.org/show_bug.cgi?id=131573
93
94         Reviewed by Brent Fulgham.
95
96         * PlatformEfl.cmake: Add the localized strings file to the list of user agent scripts.
97         * platform/efl/RenderThemeEfl.cpp:
98         (WebCore::RenderThemeEfl::mediaControlsScript): Include the localized strings file in the script body.
99
100 2014-05-05  Jeremy Jones  <jeremyj@apple.com>
101
102         Implement scan backward and forward in video fullscreen.
103         https://bugs.webkit.org/show_bug.cgi?id=132517
104
105         Reviewed by Simon Fraser.
106
107         Implement scanning forward and backward. This implements methods in 
108         WebAVPlayerController and forwards them through WebVideoFullscreenModelMediaElement
109         and on to HTMLMediaElement.
110
111         * WebCore.exp.in: necessary exports.
112         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
113         (-[WebAVPlayerController seekToTime:]):
114         Use fastSeek in this case.
115         (-[WebAVPlayerController canScanForward]): If you can play, you can scan.
116         (+[WebAVPlayerController keyPathsForValuesAffectingCanScanForward]): ditto
117         (-[WebAVPlayerController beginScanningForward:]): ditto
118         (-[WebAVPlayerController endScanningForward:]): ditto
119         (-[WebAVPlayerController canScanBackward]): If you can play, you can scan.
120         (+[WebAVPlayerController keyPathsForValuesAffectingCanScanBackward]): ditto
121         (-[WebAVPlayerController beginScanningBackward:]): ditto
122         (-[WebAVPlayerController endScanningBackward:]): ditto
123         (-[WebAVPlayerController canSeekToBeginning]):
124         This looks at seekableRanges to determine if any seeking is possible.
125         (+[WebAVPlayerController keyPathsForValuesAffectingCanSeekToBeginning]):
126         depends on seekableRanges.
127         (-[WebAVPlayerController seekToBeginning:]): seek to -ininity
128         (-[WebAVPlayerController canSeekToEnd]):
129         This looks at seekableRanges to determine if any seeking is possible.
130         (+[WebAVPlayerController keyPathsForValuesAffectingCanSeekToEnd]):
131         depends on seekableRanges.
132         (-[WebAVPlayerController seekToEnd:]): seek to INFINITY.
133         * platform/ios/WebVideoFullscreenModel.h:
134         Add 4 new functions.
135         * platform/ios/WebVideoFullscreenModelMediaElement.h:
136         ditto
137         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
138         (WebVideoFullscreenModelMediaElement::fastSeek): forwards to HTMLMediaEelement
139         (WebVideoFullscreenModelMediaElement::beginScanningForward): forwards to HTMLMediaEelement
140         (WebVideoFullscreenModelMediaElement::beginScanningBackward): forwards to HTMLMediaEelement
141         (WebVideoFullscreenModelMediaElement::endScanning): forwards to HTMLMediaEelement
142
143 2014-05-05  Benjamin Poulain  <bpoulain@apple.com>
144
145         [iOS][WK2] Prefetch DNS hostnames on tap highlight
146         https://bugs.webkit.org/show_bug.cgi?id=132509
147
148         Reviewed by Alexey Proskuryakov.
149
150         * WebCore.exp.in:
151         * dom/Element.cpp:
152         * dom/Element.h:
153         (WebCore::Element::absoluteLinkURL()):
154
155 2014-05-05  Simon Fraser  <simon.fraser@apple.com>
156
157         [iOS WK2] Flickery scrolling inside overflow-scrolling: touch
158         https://bugs.webkit.org/show_bug.cgi?id=132591
159         <rdar://problem/16760466>
160
161         Reviewed by Tim Horton.
162
163         Avoid triggering layer tree commits that touch the layer's boundsOrigin
164         while the user is scrolling in the UI process.
165         
166         Fix the WKOverflowScrollViewDelegate to pass along an "inUserInteration"
167         flag to the ScrollingTree to say that we're in the middle of a user interaction
168         (and also to send a final non-interactive update). That gets passed along
169         to the web process, and turned into "SyncScrollingLayerPosition" update.
170         AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll() consults
171         this, and uses it to set a flag on the ScrollableArea to say that the scroll
172         is a user scroll.
173         
174         RenderLayerBacking then makes use of this (in existing code, shared with WK1)
175         to avoid triggering layer bounds setting. Instead, it now just calls syncBoundsOrigin(),
176         which updates the GraphicsLayer without touching platform layers. This is necessary
177         so that GraphicsLayer geometry is up-to-date (used for tiled layer visibility
178         computations).
179         
180         Finally, a hack in GraphicsLayerCA::computeVisibleRect() is conditionalized
181         for WebKit1 by checking the type of platform layer.
182
183         * WebCore.exp.in:
184         * page/scrolling/AsyncScrollingCoordinator.cpp:
185         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
186         * page/scrolling/ScrollingTree.cpp:
187         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
188         * page/scrolling/ScrollingTree.h:
189         * platform/graphics/GraphicsLayer.h:
190         (WebCore::GraphicsLayer::syncBoundsOrigin):
191         * platform/graphics/ca/GraphicsLayerCA.cpp:
192         (WebCore::GraphicsLayerCA::computeVisibleRect):
193         * rendering/RenderLayerBacking.cpp:
194         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
195
196 2014-05-05  Alexey Proskuryakov  <ap@apple.com>
197
198         Stop using BlobData on client side
199         https://bugs.webkit.org/show_bug.cgi?id=132582
200
201         Reviewed by Sam Weinig.
202
203         Blob registration now uses either a single file path, or a vector of much simpler
204         BlobPart objects, not an array with arbitrarily sliced blobs or files, which can't happen.
205
206         * Modules/websockets/WebSocket.cpp:(WebCore::WebSocket::didReceiveBinaryData):
207         Use a new simpler Blob constructor.
208
209         * WebCore.xcodeproj/project.pbxproj: Added BlobPart, removed BlobRegistrationData.
210
211         * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob):
212         Use Vector<BlobPart> instead of BlobData (1 line of code instead of 5).
213
214         * dom/DataTransfer.cpp: (WebCore::DataTransfer::hasFileOfType): Updated for
215         File::contentTypeFromFilePathOrName rename.
216
217         * fileapi/Blob.cpp: (WebCore::Blob::Blob):
218         * fileapi/Blob.h:
219         (WebCore::Blob::create):
220         (WebCore::Blob::deserialize):
221         * fileapi/File.cpp:
222         (WebCore::File::File):
223         (WebCore::File::contentTypeFromFilePathOrName):
224         (WebCore::createBlobDataForFileWithType): Deleted.
225         (WebCore::createBlobDataForFile): Deleted.
226         (WebCore::createBlobDataForFileWithName): Deleted.
227         (WebCore::File::contentTypeFromFilePath): Deleted.
228         * fileapi/File.h: (WebCore::File::deserialize): Deleted.
229         Added and updated constructors to not use BlobData. Changed special case constructors
230         to use name tags instead of non-enforced comments.
231
232         * fileapi/ThreadableBlobRegistry.h:
233         * fileapi/ThreadableBlobRegistry.cpp:
234         (WebCore::BlobRegistryContext::BlobRegistryContext): Updated with new data members
235         that were split out of BlobData.
236         (WebCore::ThreadableBlobRegistry::registerFileBlobURL): Added.
237         (WebCore::ThreadableBlobRegistry::registerBlobURL): Updated to pass Content-Type
238         explicitly, as it's no longer hidden in BlobData.
239
240         * fileapi/WebKitBlobBuilder.h:
241         * fileapi/WebKitBlobBuilder.cpp:
242         (WebCore::BlobBuilder::append):
243         (WebCore::BlobBuilder::finalize):
244         (WebCore::BlobBuilder::appendBytesData): Deleted.
245         Updated to use BlobPart. There is no longer any need to special case Files,
246         the registry takes care of that.
247
248         * platform/network/BlobData.h:
249         * platform/network/BlobData.cpp:
250         (WebCore::BlobDataItem::detachFromCurrentThread): Deleted.
251         (WebCore::BlobData::detachFromCurrentThread): Deleted.
252         BlobData will only be used on main thread by the registry.
253
254         * platform/network/BlobPart.h: Added. A new class to encapsulate a list of blobs
255         that are combined into a new blob, as exposed to JS via Blob constructor.
256
257         * platform/network/BlobRegistry.h:
258         * platform/network/BlobRegistryImpl.cpp:
259         (WebCore::BlobRegistryImpl::registerFileBlobURL):
260         (WebCore::BlobRegistryImpl::registerBlobURL):
261         * platform/network/BlobRegistryImpl.h:
262         Updated for the new registration methods. We no longer have arbitrary BlobDatas
263         coming in.
264
265         * platform/network/FormData.cpp: Don't include BlobData for now (but really,
266         BlobStorageData is the same thing, and they will be merged soon).
267         Unfortunately, FormData is used by both client and registry side, and there is
268         no clear delimitation at the time.
269  
270         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): Use the new simpler
271         way to create a Blob.
272
273 2014-05-05  Benjamin Poulain  <benjamin@webkit.org>
274
275         Clean up Image Document and tweak the layout and viewport
276         https://bugs.webkit.org/show_bug.cgi?id=132552
277
278         Reviewed by Sam Weinig.
279
280         The #ifdef in every function was making quite a mess. A lot of that code does
281         not make sense on iOS.
282
283         This patch make a clean split between mouse related stuff and iOS.
284
285         Also:
286         -Change the viewport to be only width based, and avoid scaling in portrait.
287         -Center the image horizontally in the view.
288
289         * html/ImageDocument.cpp:
290         (WebCore::ImageDocument::ImageDocument):
291         (WebCore::ImageDocument::createDocumentStructure):
292         (WebCore::ImageDocument::imageUpdated):
293         (WebCore::ImageDocument::scale):
294         (WebCore::ImageDocument::resizeImageToFit):
295         (WebCore::ImageDocument::imageFitsInWindow):
296         (WebCore::ImageDocument::windowSizeChanged):
297         (WebCore::ImageDocument::imageClicked):
298         * html/ImageDocument.h:
299
300 2014-05-05  Beth Dakin  <bdakin@apple.com>
301
302         Need a delegate that informs the UI process when the page's pin state changes
303         https://bugs.webkit.org/show_bug.cgi?id=132583
304         -and corresponding-
305         <rdar://problem/16806231>
306
307         Reviewed by Anders Carlsson.
308
309         We should default all of these pin-state value to true.
310         * page/scrolling/ScrollingTree.cpp:
311         (WebCore::ScrollingTree::ScrollingTree):
312
313 2014-05-05  Christophe Dumez  <ch.dumez@samsung.com>
314
315         Named element cache can become invalid during HTMLCollection::updateNamedElementCache()
316         https://bugs.webkit.org/show_bug.cgi?id=132575
317
318         Reviewed by Ryosuke Niwa.
319
320         Make sure the named element cache object stays valid in
321         HTMLCollection::updateNamedElementCache() while it is populating it.
322
323         The method was previously creating and setting the cache first, and then start
324         traversing the DOM tree to populate it. As a consequence, hasNamedElementCache()
325         would start returning true before the cache is actually populated.
326         The issue is that finding matches in the DOM tree can cause
327         HTMLCollection::invalidateCache() to be called under certain circumstances and
328         thus the named element cache object can become invalid while
329         updateNamedElementCache() is populating it.
330
331         To avoid the issue, this patch updates updateNamedElementCache() so that the
332         named element cache map is set *after* traversing the DOM tree. This way,
333         hasNamedElementCache() returns false while the cache is being populated and
334         there is no chance of it being invalidated too early.
335
336         Test: fast/dom/htmlcollection-selectedOptions-namedItem-crash.html
337
338         * html/HTMLCollection.cpp:
339         (WebCore::HTMLCollection::updateNamedElementCache):
340         * html/HTMLCollection.h:
341         (WebCore::HTMLCollection::setNameItemCache):
342         (WebCore::HTMLCollection::createNameItemCache): Deleted.
343         * html/HTMLFormControlsCollection.cpp:
344         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
345
346 2014-05-05  Benjamin Poulain  <benjamin@webkit.org>
347
348         [iOS][WK2] Special case ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture() for image documents
349         https://bugs.webkit.org/show_bug.cgi?id=132553
350
351         Reviewed by Tim Horton.
352
353         * WebCore.exp.in:
354         * WebCore.xcodeproj/project.pbxproj:
355         * html/ImageDocument.cpp:
356         (WebCore::ImageDocument::imageElement):
357         * html/ImageDocument.h:
358
359 2014-05-05  Ion Rosca  <rosca@adobe.com>
360
361         [CSS Blending] Webkit-blend-mode fails for accelerated parent with overflow:hidden
362         https://bugs.webkit.org/show_bug.cgi?id=126160
363
364         When the isolating layer has overflow:hidden, it will create a descendant clipping layer
365         (m_childContainmentLayer), which will restrict the bleding layer to reading the backdrop
366         from the isolating layer.
367         The solution in this patch is to forbid the isolating layer to create a descendant clipping
368         layer and make all the children to get their own ancestor clipping layers instead.
369
370         Reviewed by Dean Jackson.
371
372         Tests: css3/compositing/blend-mode-accelerated-parent-overflow-hidden.html
373                css3/compositing/blend-mode-clip-accelerated-blending-canvas.html
374                css3/compositing/blend-mode-clip-accelerated-blending-child.html
375                css3/compositing/blend-mode-clip-accelerated-blending-double.html
376                css3/compositing/blend-mode-clip-accelerated-blending-with-siblings.html
377                css3/compositing/blend-mode-clip-accelerated-transformed-blending.html
378                css3/compositing/blend-mode-clip-rect-accelerated-blending.html
379
380         * rendering/RenderLayerBacking.cpp:
381         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
382         when the compositing ancestor isolates blending we take it into account for computing
383         the clipping rect for this layer, because it was not allowed to create the descendant
384         clipping layer. 
385         * rendering/RenderLayerCompositor.cpp:
386         (WebCore::RenderLayerCompositor::clippedByAncestor):
387         when the compositing ancestor isolates blending we decide if a layer is clipped by ancestor
388         by computing the clipping rect taking into account all the ancestors up to and including
389         the compositing ancestor.
390         (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
391         if a layer isolates blending, it is not allowed to create a descendant clipping layer.
392
393 2014-05-05  Dirk Schulze  <krit@webkit.org>
394
395         AX: tabindex support in SVG2
396         https://bugs.webkit.org/show_bug.cgi?id=130212
397
398         Reviewed by Chris Fleizach.
399
400         The patch is mainly based on a patch for Blink by Erik Dahlström.
401         https://src.chromium.org/viewvc/blink?revision=172964&view=revision
402
403         It adds support for tabindex to SVG by reusing the HTML code.
404
405         Spec: https://svgwg.org/svg2-draft/interact.html#sequential-focus-navigation-and-the-tabindex-attribute
406         IDL attribute: https://svgwg.org/svg2-draft/types.html#__svg__SVGElement__tabIndex
407
408         Test: svg/custom/tabindex-order.html
409
410         * dom/Element.cpp:
411         (WebCore::Element::setTabIndex): Moved from HTMLElement and shared with all elements.
412         * dom/Element.h:
413         * html/HTMLAnchorElement.cpp: Remove outdated comment.
414         (WebCore::HTMLAnchorElement::canStartSelection):
415         * html/HTMLElement.cpp:
416         (WebCore::HTMLElement::setTabIndex): Deleted.
417         * html/HTMLElement.h:
418         * svg/SVGAElement.cpp: Uses the same logic as HTMLAnchorElement now.
419         (WebCore::SVGAElement::tabIndex):
420         (WebCore::SVGAElement::supportsFocus):
421         (WebCore::SVGAElement::isMouseFocusable):
422         (WebCore::SVGAElement::isKeyboardFocusable):
423         (WebCore::SVGAElement::canStartSelection):
424         * svg/SVGAElement.h:
425         * svg/SVGCircleElement.h:
426         * svg/SVGClipPathElement.h:
427         * svg/SVGDefsElement.h:
428         * svg/SVGElement.cpp:
429         (WebCore::SVGElement::tabIndex): Return -1 if element can not be focused.
430         (WebCore::SVGElement::parseAttribute):
431         (WebCore::SVGElement::isMouseFocusable):
432         (WebCore::SVGElement::isKeyboardFocusable): Deleted. Use function on Element.
433         * svg/SVGElement.h:
434         * svg/SVGElement.idl:
435         * svg/SVGEllipseElement.h:
436         * svg/SVGGElement.h:
437         * svg/SVGGraphicsElement.h: Remove supportsFocus() from inheriting functions.
438             Don't just return true. SVG elements should not be focusable by default.
439             Instead check if tabindex was set explicitly.
440         * svg/SVGImageElement.h:
441         * svg/SVGLineElement.h:
442         * svg/SVGPathElement.h:
443         * svg/SVGPolyElement.h:
444         * svg/SVGRectElement.h:
445         * svg/SVGSVGElement.h:
446         * svg/SVGSwitchElement.h:
447         * svg/SVGSymbolElement.h:
448         * svg/SVGTextElement.h:
449
450 2014-05-05  Jeremy Jones  <jeremyj@apple.com>
451
452         Implement beginScrubbing and endScrubbing for video fullscreen.
453         https://bugs.webkit.org/show_bug.cgi?id=132520
454
455         Reviewed by Eric Carlson.
456
457         Plumb through beginScrubbing and endScrubbing from AVKit down to HTMLMediaElement.
458         This keeps the playback state consistent while scrubbing and allows playback state
459         to return to the original state when scrubbing is complete.
460
461         * WebCore.exp.in:
462         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
463         (-[WebAVPlayerController beginScrubbing:]):
464         (-[WebAVPlayerController endScrubbing:]):
465         * platform/ios/WebVideoFullscreenModel.h:
466         * platform/ios/WebVideoFullscreenModelMediaElement.h:
467         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
468         (WebVideoFullscreenModelMediaElement::beginScrubbing):
469         (WebVideoFullscreenModelMediaElement::endScrubbing):
470
471 2014-05-05  Tim Horton  <timothy_horton@apple.com>
472
473         More long hangs under IOSurfacePool::evict
474         https://bugs.webkit.org/show_bug.cgi?id=132576
475         <rdar://problem/16769469>
476
477         Reviewed by Simon Fraser.
478
479         * platform/graphics/cg/IOSurfacePool.cpp:
480         (WebCore::IOSurfacePool::evict):
481         If the pool is too full, we should be evicting in-use surfaces
482         even if the size of the in-use surfaces has dropped below maximumInUseBytes,
483         otherwise we can get stuck in an infinite loop with 0 cached surfaces
484         and 1+ in-use surfaces.
485
486 2014-05-05  Radu Stavila  <stavila@adobe.com>
487
488         [CSS Regions] Remove regionLayoutUpdate event
489         https://bugs.webkit.org/show_bug.cgi?id=132564
490
491         Reviewed by Simon Fraser.
492
493         The regionLayoutUpdate event was removed from the regions spec and was replaced by two other events: 
494         regionOversetChange and regionFragmentChange.
495
496         No new tests needed, this patch removes a feature.
497
498         * dom/EventNames.h:
499         * dom/WebKitNamedFlow.cpp:
500         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): Deleted.
501         * dom/WebKitNamedFlow.h:
502         * inspector/InspectorCSSAgent.cpp:
503         (WebCore::InspectorCSSAgent::resetNonPersistentData):
504         (WebCore::InspectorCSSAgent::willRemoveNamedFlow):
505         (WebCore::UpdateRegionLayoutTask::UpdateRegionLayoutTask): Deleted.
506         (WebCore::UpdateRegionLayoutTask::scheduleFor): Deleted.
507         (WebCore::UpdateRegionLayoutTask::unschedule): Deleted.
508         (WebCore::UpdateRegionLayoutTask::reset): Deleted.
509         (WebCore::UpdateRegionLayoutTask::timerFired): Deleted.
510         (WebCore::InspectorCSSAgent::didUpdateRegionLayout): Deleted.
511         (WebCore::InspectorCSSAgent::regionLayoutUpdated): Deleted.
512         * inspector/InspectorCSSAgent.h:
513         * inspector/InspectorInstrumentation.cpp:
514         (WebCore::InspectorInstrumentation::didUpdateRegionLayoutImpl): Deleted.
515         * inspector/InspectorInstrumentation.h:
516         (WebCore::InspectorInstrumentation::didUpdateRegionLayout): Deleted.
517         * inspector/protocol/CSS.json:
518         * rendering/RenderNamedFlowFragment.cpp:
519         (WebCore::RenderNamedFlowFragment::updateOversetState):
520         * rendering/RenderNamedFlowThread.cpp:
521         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
522         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
523         (WebCore::RenderNamedFlowThread::layout):
524         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEventIfNeeded): Deleted.
525         (WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired): Deleted.
526         * rendering/RenderNamedFlowThread.h:
527
528 2014-05-05  Rik Cabanier  <cabanier@adobe.com>
529
530         Enhance IDL compiler so it supports unrestricted float and double
531         https://bugs.webkit.org/show_bug.cgi?id=132460
532
533         Reviewed by Dirk Schulze.
534
535         Updated IDL compiler so it supports unrestricted types.
536         Also updated the IDL files so they use unrestricted float and
537         double.
538
539         Tests:
540         * canvas/philip/tests/2d.gradient.linear.nonfinite.html:
541         * canvas/philip/tests/2d.gradient.object.invalidoffset.html:
542         * canvas/philip/tests/2d.gradient.radial.nonfinite.html:
543         * canvas/philip/tests/2d.imageData.get.nonfinite.html:
544         * canvas/philip/tests/2d.imageData.put.nonfinite.html:
545         * canvas/philip/tests/2d.missingargs.html:
546         * fast/canvas/canvas-getImageData-invalid-expected.txt:
547         * fast/canvas/canvas-putImageData-expected.txt:
548         * fast/canvas/canvas-putImageData.js:
549
550         * Modules/battery/BatteryManager.idl:
551         * Modules/gamepad/Gamepad.idl:
552         * Modules/geolocation/Coordinates.idl:
553         * Modules/mediasource/MediaSource.idl:
554         * Modules/mediasource/SourceBuffer.idl:
555         * Modules/mediasource/VideoPlaybackQuality.idl:
556         * Modules/mediastream/MediaSourceStates.idl:
557         * Modules/proximity/DeviceProximityEvent.idl:
558         * Modules/speech/SpeechGrammar.idl:
559         * Modules/speech/SpeechGrammarList.idl:
560         * Modules/speech/SpeechRecognitionAlternative.idl:
561         * Modules/speech/SpeechSynthesisEvent.idl:
562         * Modules/speech/SpeechSynthesisUtterance.idl:
563         * Modules/webaudio/AnalyserNode.idl:
564         * Modules/webaudio/AudioBuffer.idl:
565         * Modules/webaudio/AudioBufferSourceNode.idl:
566         * Modules/webaudio/AudioContext.idl:
567         * Modules/webaudio/AudioListener.idl:
568         * Modules/webaudio/AudioParam.idl:
569         * Modules/webaudio/AudioProcessingEvent.idl:
570         * Modules/webaudio/OfflineAudioContext.idl:
571         * Modules/webaudio/OscillatorNode.idl:
572         * Modules/webaudio/PannerNode.idl:
573         * bindings/scripts/CodeGenerator.pm:
574         * bindings/scripts/CodeGeneratorGObject.pm:
575         (GetGValueTypeName):
576         (GetGlibTypeName):
577         * bindings/scripts/CodeGeneratorJS.pm:
578         (GenerateImplementation):
579         (GenerateParametersCheck):
580         (JSValueToNative):
581         * bindings/scripts/CodeGeneratorObjC.pm:
582         (GetObjCType):
583         (GenerateHeader):
584         * bindings/scripts/test/TestObj.idl:
585         * bindings/scripts/test/TestTypedefs.idl:
586         * css/CSSPrimitiveValue.idl:
587         * css/WebKitCSSMatrix.idl:
588         * dom/ClientRect.idl:
589         * dom/DeviceMotionEvent.idl:
590         * dom/DeviceOrientationEvent.idl:
591         * dom/Document.idl:
592         * dom/RequestAnimationFrameCallback.idl:
593         * dom/Touch.idl:
594         * dom/TransitionEvent.idl:
595         * dom/WebKitAnimationEvent.idl:
596         * dom/WebKitTransitionEvent.idl:
597         * dom/WheelEvent.idl:
598         * html/HTMLInputElement.idl:
599         * html/HTMLMediaElement.idl:
600         * html/HTMLMeterElement.idl:
601         * html/HTMLProgressElement.idl:
602         * html/MediaController.idl:
603         * html/TextMetrics.idl:
604         * html/TimeRanges.idl:
605         * html/canvas/CanvasRenderingContext2D.idl:
606         * html/canvas/WebGLRenderingContext.idl:
607         * html/track/DataCue.idl:
608         * html/track/TextTrackCue.idl:
609         * html/track/VTTCue.idl:
610         * html/track/VTTRegion.idl:
611         * inspector/InspectorFrontendHost.idl:
612         * inspector/ScriptProfile.idl:
613         * inspector/ScriptProfileNode.idl:
614         * page/DOMWindow.idl:
615         * page/Performance.idl:
616         * page/PerformanceEntry.idl:
617         * page/PerformanceResourceTiming.idl:
618         * page/SpeechInputResult.idl:
619         * page/WebKitPoint.idl:
620         * svg/SVGAngle.idl:
621         * svg/SVGAnimatedNumber.idl:
622         * svg/SVGAnimationElement.idl:
623         * svg/SVGFEDropShadowElement.idl:
624         * svg/SVGFEGaussianBlurElement.idl:
625         * svg/SVGFEMorphologyElement.idl:
626         * svg/SVGGlyphRefElement.idl:
627         * svg/SVGLength.idl:
628         * svg/SVGMatrix.idl:
629         * svg/SVGNumber.idl:
630         * svg/SVGPathElement.idl:
631         * svg/SVGPathSegArcAbs.idl:
632         * svg/SVGPathSegArcRel.idl:
633         * svg/SVGPathSegCurvetoCubicAbs.idl:
634         * svg/SVGPathSegCurvetoCubicRel.idl:
635         * svg/SVGPathSegCurvetoCubicSmoothAbs.idl:
636         * svg/SVGPathSegCurvetoCubicSmoothRel.idl:
637         * svg/SVGPathSegCurvetoQuadraticAbs.idl:
638         * svg/SVGPathSegCurvetoQuadraticRel.idl:
639         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl:
640         * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl:
641         * svg/SVGPathSegLinetoAbs.idl:
642         * svg/SVGPathSegLinetoHorizontalAbs.idl:
643         * svg/SVGPathSegLinetoHorizontalRel.idl:
644         * svg/SVGPathSegLinetoRel.idl:
645         * svg/SVGPathSegLinetoVerticalAbs.idl:
646         * svg/SVGPathSegLinetoVerticalRel.idl:
647         * svg/SVGPathSegMovetoAbs.idl:
648         * svg/SVGPathSegMovetoRel.idl:
649         * svg/SVGPoint.idl:
650         * svg/SVGRect.idl:
651         * svg/SVGSVGElement.idl:
652         * svg/SVGTextContentElement.idl:
653         * svg/SVGTransform.idl:
654         * svg/SVGZoomEvent.idl:
655         * testing/InternalSettings.idl:
656         * testing/Internals.idl:
657         * xml/XPathResult.idl:
658
659 2014-05-05  Tim Horton  <timothy_horton@apple.com>
660
661         Use a layer delegate instead of web_disableAllActions wherever possible
662         https://bugs.webkit.org/show_bug.cgi?id=132560
663         <rdar://problem/16459284>
664
665         Reviewed by Simon Fraser.
666
667         * WebCore.exp.in:
668         * WebCore.xcodeproj/project.pbxproj:
669         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
670         (PlatformCALayerMac::commonInit):
671         If we own the platform layer, set its delegate to the action-disabling WebActionDisablingCALayerDelegate.
672         If we don't, its actual owner might want to control the delegate, so continue using web_disableAllActions.
673
674         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h: Added.
675         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm: Added.
676         (+[WebActionDisablingCALayerDelegate shared]):
677         (-[WebActionDisablingCALayerDelegate actionForLayer:forKey:]):
678         Add a class that can act as the delegate of a CALayer, and disables all actions.
679
680         * platform/graphics/cocoa/WebCoreCALayerExtras.h: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.h.
681         * platform/graphics/cocoa/WebCoreCALayerExtras.mm: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.mm.
682         (-[CALayer web_disableAllActions]):
683         Move WebCoreCALayerExtras from mac/ to cocoa/.
684
685 2014-05-05  Martin Hock  <mhock@apple.com>
686
687         Session-aware plugin autostart data
688         https://bugs.webkit.org/show_bug.cgi?id=131758
689         <rdar://problem/15906540>
690
691         Reviewed by Alexey Proskuryakov.
692
693         * html/HTMLPlugInImageElement.cpp:
694         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
695         * page/PlugInClient.h:
696
697 2014-05-05  Radu Stavila  <stavila@adobe.com>
698
699         [CSS Regions] Elements with overflow:auto are not painted inside regions when following a float
700         https://bugs.webkit.org/show_bug.cgi?id=131161
701
702         Reviewed by David Hyatt.
703
704         When a float-avoiding element (such as overflow:auto) is flowed into a flow thread after a float, its 
705         logical left is not set on its frameRect or its layer's topLeft, but is instead kept in its RenderBoxRegionInfo
706         structure. In some situation, this causes paint rejection to kick-in because intersecting the layer's rect
707         (which DOESN'T contain the logical left from the region info object) with the computed background rect 
708         (which contains the logical left from the region info object) results in an empty rect.
709
710         Test: fast/regions/overflow-auto-after-float.html
711
712         * rendering/RenderLayer.cpp:
713         (WebCore::RenderLayer::calculateClipRects):
714
715 2014-05-05  Andrei Bucur  <abucur@adobe.com>
716
717         [CSSRegions] Slider displayed wrong in regions
718         https://bugs.webkit.org/show_bug.cgi?id=132243
719
720         Reviewed by Mihnea Ovidenie.
721
722         In case a box didn't have a range, getRegionRangeForBox was searching for
723         the top-most unplittable ancestor. This is not correct in every case. It's
724         possible to have a box with range that has children without ranges (e.g. an
725         absolutely positioned inline box with shadow descendants).
726
727         I've modified getRegionRangeForBox to search for the first ancestor that
728         has a cached range and use that instead of looking for an unsplittable box.
729         The range of the box is the region at the top of the box, clamped by the
730         range of the ancestor. This will be correct all the time once all the layout
731         systems are region range aware and are able to cache it.
732
733         Test: fast/regions/positioned-slider-in-regions.html
734
735         * rendering/RenderFlowThread.cpp:
736         (WebCore::RenderFlowThread::hasRegionRangeForBox):
737         (WebCore::RenderFlowThread::getRegionRangeForBox):
738         * rendering/RenderFlowThread.h:
739
740 2014-05-05  Andrei Bucur  <abucur@adobe.com>
741
742         [CSS Regions] ASSERT when hovering over region
743         https://bugs.webkit.org/show_bug.cgi?id=128809
744
745         Reviewed by Mihnea Ovidenie.
746
747         There's no point in hit-testing a box for a region if it's not contained inside
748         that region.
749
750         Test: fast/regions/hit-test-box-non-containing-region.html
751
752         * rendering/RenderBox.cpp:
753         (WebCore::RenderBox::nodeAtPoint):
754
755 2014-05-04  Andreas Kling  <akling@apple.com>
756
757         Optimize JSRopeString for resolving directly to AtomicString.
758         <https://webkit.org/b/132548>
759
760         Add two bindings generator attributes for parameters to influence
761         the way that JS rope strings are resolved:
762
763         - AtomicString
764
765             Generates code that avoids allocating a new StringImpl if there
766             is already an existing AtomicString we can reuse.
767
768         - RequiresExistingAtomicString
769
770             Generates code that fails immediately if the provided string
771             is not found in the AtomicString table. This is now used for
772             document.getElementById(), and works because any existing ID
773             is guaranteed to be in the table.
774
775         Reviewed by Filip Pizlo.
776
777         * bindings/scripts/CodeGeneratorJS.pm:
778         (GenerateParametersCheck):
779         (JSValueToNative):
780         * bindings/scripts/IDLAttributes.txt:
781         * dom/Document.idl:
782
783 2014-05-04  Simon Fraser  <simon.fraser@apple.com>
784
785         [iOS WK2] Compositing layers in iframes are misplaced
786         https://bugs.webkit.org/show_bug.cgi?id=132554
787         <rdar://problem/16203027>
788
789         Reviewed by Benjamin Poulain.
790
791         Have requiresScrollLayer() only consider frameView.delegatesScrolling()
792         for the main frame, so that iframes get scroll layers (even though they
793         will never scroll), so that the rest of geometry code works as on other
794         platforms.
795
796         * rendering/RenderLayerCompositor.cpp:
797         (WebCore::RenderLayerCompositor::requiresScrollLayer):
798
799 2014-05-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
800
801         Use std::unique_ptr in m_taskTimer of Notification class
802         https://bugs.webkit.org/show_bug.cgi?id=132544
803
804         Reviewed by Andreas Kling.
805
806         No new tests, no behavior change.
807
808         * Modules/notifications/Notification.cpp:
809         (WebCore::Notification::Notification):
810         * Modules/notifications/Notification.h: Use std::unique_ptr instead of OwnPtr.
811
812 2014-05-04  Tim Horton  <timothy_horton@apple.com>
813
814         Long hangs under IOSurfacePool::evict
815         https://bugs.webkit.org/show_bug.cgi?id=132549
816         <rdar://problem/16769469>
817
818         Reviewed by Simon Fraser.
819
820         * platform/graphics/cg/IOSurfacePool.cpp:
821         (WebCore::IOSurfacePool::willAddSurface):
822         Run eviction before adding the new surface to m_bytesCached/m_inUseBytesCached.
823         We use the additionalSize parameter to make space for the new surface.
824
825         (WebCore::IOSurfacePool::evict):
826         If we want to free up the entire pool, we can do so by throwing away everything.
827         This also avoids an underflow if additionalSize is larger than the maximum pool size.
828
829 2014-05-04  Pratik Solanki  <psolanki@apple.com>
830
831         Shortcircuit shouldUseCredentialStorage callback
832         https://bugs.webkit.org/show_bug.cgi?id=132308
833         <rdar://problem/16806708>
834
835         Reviewed by Alexey Proskuryakov.
836
837         If we are going to return true from the shouldUseCredentialStorage callback then we don't
838         really need to have CFNetwork/Foundation call us. We can just disable the callback and
839         CFNetwork will assume true. Add a separate subclass that implements this callback when we
840         need to return false. We can also eliminate the corresponding async callbacks. This avoids
841         pingponging between dispatch queue and main thread in the common case.
842
843         No new tests because no change in functionality.
844
845         * WebCore.exp.in:
846         * platform/network/ResourceHandle.cpp:
847         * platform/network/ResourceHandle.h:
848         * platform/network/ResourceHandleClient.cpp:
849         * platform/network/ResourceHandleClient.h:
850         * platform/network/cf/ResourceHandleCFNet.cpp:
851         (WebCore::ResourceHandle::createCFURLConnection):
852         (WebCore::ResourceHandle::shouldUseCredentialStorage):
853         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
854         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
855         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
856         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
857         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
858         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
859         * platform/network/mac/ResourceHandleMac.mm:
860         (WebCore::ResourceHandle::start):
861         (WebCore::ResourceHandle::makeDelegate):
862         (WebCore::ResourceHandle::delegate):
863         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
864         (WebCore::ResourceHandle::shouldUseCredentialStorage):
865         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
866         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
867         (-[WebCoreResourceHandleWithCredentialStorageAsOperationQueueDelegate connectionShouldUseCredentialStorage:]):
868         * platform/network/soup/ResourceHandleSoup.cpp:
869
870 2014-05-04  Brent Fulgham  <bfulgham@apple.com>
871
872         [iOS] deviceScaleFactor is being double-applied when rendering captions in full screen mode 
873         https://bugs.webkit.org/show_bug.cgi?id=132481
874         <rdar://problem/16507482>
875
876         Reviewed by Jer Noble.
877
878         Add a new 'syncTextTrackBounds' method (and relaying functions) to keep the text track container in sync
879         with changes to the video player's display layer.
880
881         * html/HTMLMediaElement.cpp:
882         (WebCore::HTMLMediaElement::syncTextTrackBounds: Added.
883         * html/HTMLMediaElement.h:
884         * html/shadow/MediaControlElements.cpp:
885         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't set the platform scale factor here. It is already
886         being accounted for in the createTextTrackRepresentationImage method.
887         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Synchronize the text track representation
888         with any new video layer changes.
889         * platform/graphics/MediaPlayer.cpp:
890         (WebCore::MediaPlayer::syncTextTrackBounds): Added.
891         * platform/graphics/MediaPlayer.h:
892         * platform/graphics/MediaPlayerPrivate.h:
893         (WebCore::MediaPlayerPrivateInterface::syncTextTrackBounds): Added.
894         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
895         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
896         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Use new sync function.
897         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): Ditto.
898         (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds): Added. Keep the text track layer size in sync with
899         the current video layer size. This may change during animations, rotations, etc.
900         (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation): Use new sync function.
901
902 2014-05-04  Beth Dakin  <bdakin@apple.com>
903
904         Top content inset: Margin tiles should not display in the inset area when pinned 
905         to the top of the page
906         https://bugs.webkit.org/show_bug.cgi?id=132535
907         -and corresponding-
908         <rdar://problem/16613039>
909
910         Reviewed by Simon Fraser.
911
912         Prior to this change, topContentInset was implemented by positioning 
913         RenderLayerCompositor’s m_rootContentLayer based on the inset value. In order to 
914         ensure that no content is displayed in the inset area when we are pinned to the 
915         top of the page, we’ll have to take a different approach. In this patch, when you 
916         are pinned to the top of the page, the m_rootContentLayer is positioned at (0,0), 
917         much like it would be without an inset, but the m_clip layer IS positioned at (0, 
918         topContentInset). Then for all y-scroll values between 0 and topContentInset, the 
919         positions of the clip layer and the contents layer are adjusted so that the clip 
920         layer approaches a position of (0,0), and the root layer approaches a position of 
921         (0, topContentInset). This makes sure that any content above the top the document 
922         is aways clipped out of the inset area.
923
924         In order to achieve this, the scrolling thread needs to know about the 
925         topContentInset, the clip layer, and the root contents layer.
926
927         AsyncScrollingCoordinator::updateScrollingNode() now takes an additional parameter 
928         for the clip layer. Also export the topContentInset symbol for UI-side 
929         compositing.
930         * WebCore.exp.in:
931
932         Here is the new computation. Implemented in one spot that can be called from the 
933         scrolling thread, AsyncScrollingCoordinator and RenderLayerCompositor.
934         * page/FrameView.cpp:
935         (WebCore::FrameView::yPositionForInsetClipLayer):
936         (WebCore::FrameView::yPositionForRootContentLayer):
937         * page/FrameView.h:
938
939         Set the topContentInset, the insetClipLayer, and the scrolledContentsLayer when 
940         appropriate.
941         * page/scrolling/AsyncScrollingCoordinator.cpp:
942         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
943         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
944
945         Set or sync the positions for the inset layer and the contents layer.
946         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
947         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
948         * page/scrolling/AsyncScrollingCoordinator.h:
949
950         Convenience functions for getting the clipLayer() and the rootContentLayer() from 
951         the RenderLayerCompositor.
952         * page/scrolling/ScrollingCoordinator.cpp:
953         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
954         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
955         * page/scrolling/ScrollingCoordinator.h:
956         (WebCore::ScrollingCoordinator::updateScrollingNode):
957
958         ScrollingStateScrolling nodes have two new members now. m_insetClipLayer and 
959         m_topContentInset. We can use m_scrolledContentsLayer for the rootContentsLayer 
960         since previously that member was not used for FrameViews; it was only used for 
961         accelerated overflow:scroll nodes.
962         * page/scrolling/ScrollingStateScrollingNode.cpp:
963         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
964         (WebCore::ScrollingStateScrollingNode::setTopContentInset):
965         (WebCore::ScrollingStateScrollingNode::setInsetClipLayer):
966         * page/scrolling/ScrollingStateScrollingNode.h:
967
968         Similarly, ScrollingTreeScrollingNode has two new members for m_topContentInset 
969         and m_clipLayer.
970         * page/scrolling/ScrollingTreeScrollingNode.cpp:
971         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
972         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
973         * page/scrolling/ScrollingTreeScrollingNode.h:
974         (WebCore::ScrollingTreeScrollingNode::topContentInset):
975         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
976         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
977         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
978
979         Compute positions for the two new layers.
980         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
981
982         Now use the static FrameView functions to compute the positions for these layers.
983         * rendering/RenderLayerCompositor.cpp:
984         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
985         (WebCore::RenderLayerCompositor::positionForClipLayer):
986         (WebCore::RenderLayerCompositor::clipLayer):
987         (WebCore::RenderLayerCompositor::rootContentLayer):
988         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
989         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
990         (WebCore::RenderLayerCompositor::ensureRootLayer):
991         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
992         * rendering/RenderLayerCompositor.h:
993
994 2014-05-04  Benjamin Poulain  <benjamin@webkit.org>
995
996         Clear the Selector Query caches on memory pressure
997         https://bugs.webkit.org/show_bug.cgi?id=132545
998
999         Reviewed by Andreas Kling.
1000
1001         The Selector Query Cache can use quite a bit of memory if many
1002         complex selectors are compiled. This patch makes sure the cache gets
1003         cleared on memory pressure.
1004
1005         * dom/Document.cpp:
1006         (WebCore::Document::clearSelectorQueryCache):
1007         (WebCore::Document::setCompatibilityMode):
1008         (WebCore::Document::updateBaseURL):
1009         * dom/Document.h:
1010         * dom/SelectorQuery.cpp:
1011         (WebCore::SelectorQueryCache::invalidate): Deleted.
1012         * dom/SelectorQuery.h:
1013         * platform/MemoryPressureHandler.cpp:
1014         (WebCore::MemoryPressureHandler::releaseMemory):
1015
1016 2014-05-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1017
1018         Convert OwnPtr to std::unique_ptr in CDM
1019         https://bugs.webkit.org/show_bug.cgi?id=132467
1020
1021         Reviewed by Andreas Kling.
1022
1023         Use std::unique_ptr in CDM class.
1024
1025         No new tests, no behavior change.
1026
1027         * Modules/encryptedmedia/CDM.cpp:
1028         (WebCore::CDM::create):
1029         (WebCore::CDM::CDM):
1030         * Modules/encryptedmedia/CDM.h:
1031         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
1032         (WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
1033         (WebCore::CDMPrivateMediaPlayer::create):
1034         * Modules/encryptedmedia/MediaKeys.cpp:
1035         (WebCore::MediaKeys::create):
1036         (WebCore::MediaKeys::MediaKeys):
1037         * Modules/encryptedmedia/MediaKeys.h:
1038         * WebCore.exp.in:
1039
1040 2014-05-03  Commit Queue  <commit-queue@webkit.org>
1041
1042         Unreviewed, rolling out r168232.
1043         https://bugs.webkit.org/show_bug.cgi?id=132543
1044
1045         broke ~15 tests on WK2 debug (Requested by kling on #webkit).
1046
1047         Reverted changeset:
1048
1049         "Shortcircuit shouldUseCredentialStorage callback"
1050         https://bugs.webkit.org/show_bug.cgi?id=132308
1051         http://trac.webkit.org/changeset/168232
1052
1053 2014-05-03  Andreas Kling  <akling@apple.com>
1054
1055         RenderSVGResourcePattern should deal in RenderElement&.
1056         <https://webkit.org/b/132536>
1057
1058         Tweak buildPattern() and buildTileImageTransform() to take RenderElement&
1059         instead of RenderObject* since we know that these functions will always
1060         be called with non-null RenderElement subclasses.
1061
1062         Reviewed by Sam Weinig.
1063
1064         * rendering/svg/RenderSVGResourceContainer.cpp:
1065         (WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting):
1066         * rendering/svg/RenderSVGResourceContainer.h:
1067         * rendering/svg/RenderSVGResourceGradient.cpp:
1068         (WebCore::RenderSVGResourceGradient::applyResource):
1069         * rendering/svg/RenderSVGResourcePattern.cpp:
1070         (WebCore::RenderSVGResourcePattern::buildPattern):
1071         (WebCore::RenderSVGResourcePattern::applyResource):
1072         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
1073         * rendering/svg/RenderSVGResourcePattern.h:
1074
1075 2014-05-03  Yusuke Suzuki  <utatane.tea@gmail.com>
1076
1077         CSS JIT: optimize direct / indirect adjacent's traversal backtracking
1078         https://bugs.webkit.org/show_bug.cgi?id=132319
1079
1080         Reviewed by Benjamin Poulain.
1081
1082         Since adjacent backtracking stack reference is pre-allocated
1083         in prologue in http://trac.webkit.org/changeset/166834,
1084         clearing stack phase is not needed. So we can drop
1085         JumpToClearAdjacentTail from backtracking action and simplify
1086         backtracking handling.
1087         And optimize direct / indirect adjacent's traversal backtracking by
1088         using appropriate backtracking height.
1089
1090         When solving adjacent traversal backtracking action,
1091         1) When there's no descendant relation on the right, traversal
1092         failure becomes global failure.
1093         2) When `tagNameMatchedBacktrackingStartHeightFromDescendant` ==
1094         `heightFromDescendant` + 1, the descendant backtracking starts with
1095         the parent of the current element. So we can use the current element
1096         and the backtracking action is JumpToDescendantTreeWalkerEntryPoint.
1097         3) Otherwise, currently we take the conservative approach,
1098         JumpToDescendantTail.
1099
1100         NOTE:
1101         And if `hasDescendantRelationOnTheRight` is true and there's no child
1102         fragment on the right, the backtracking element register is not
1103         effective. So we should ensure that fragment doesn't use the
1104         backtracking element register. Such a fragment fulfills the following
1105         conditions. 1. tagNameMatchedBacktrackingStartHeightFromDescendant is
1106         always 1 (tagNames.size(), that contains only descendant fragment) 2.
1107         heightFromDescendant is always 0 (-- See
1108         computeBacktrackingHeightFromDescendant implementation) Therefore such
1109         a fragment's action always becomes
1110         JumpToDescendantTreeWalkerEntryPoint. So we can ensure that the
1111         backtracking element register is not used.
1112
1113         Test: fast/selectors/backtracking-adjacent.html
1114
1115         * cssjit/SelectorCompiler.cpp:
1116         (WebCore::SelectorCompiler::solveDescendantBacktrackingActionForChild):
1117         (WebCore::SelectorCompiler::solveAdjacentTraversalBacktrackingAction):
1118         (WebCore::SelectorCompiler::solveBacktrackingAction):
1119         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
1120         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
1121         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
1122         (WebCore::SelectorCompiler::isAfterChildRelation): Deleted.
1123
1124 2014-05-03  Andreas Kling  <akling@apple.com>
1125
1126         Clear the JSString cache when under memory pressure.
1127         <https://webkit.org/b/132539>
1128
1129         The WeakGCMap used for fast mapping from StringImpl* to JSString*
1130         can actually get pretty big, and if we find ourselves under memory
1131         pressure, it's entirely inessential.
1132
1133         1.1 MB progression on Membuster3.
1134
1135         Reviewed by Sam Weinig.
1136
1137         * platform/MemoryPressureHandler.cpp:
1138         (WebCore::MemoryPressureHandler::releaseMemory):
1139
1140 2014-05-03  Benjamin Poulain  <benjamin@webkit.org>
1141
1142         [iOS][WK2] Support disabling speculative tiling
1143         https://bugs.webkit.org/show_bug.cgi?id=132512
1144
1145         Reviewed by Tim Horton.
1146
1147         Move ScrollView::setScrollVelocity() and ScrollView::computeCoverageRect() to FrameView.
1148         When speculative tiling is disabled, return an unmodified exposed rect.
1149
1150         Time/velocity adjusments are completely unnecessary at the moment since speculative tiling
1151         is enabled as soon as the view scrolls.
1152
1153         * WebCore.exp.in:
1154         * page/FrameView.cpp:
1155         (WebCore::FrameView::setScrollVelocity):
1156         (WebCore::FrameView::computeCoverageRect):
1157         * page/FrameView.h:
1158         * platform/ScrollView.h:
1159         * platform/ios/ScrollViewIOS.mm:
1160         (WebCore::ScrollView::setScrollVelocity): Deleted.
1161         (WebCore::ScrollView::computeCoverageRect): Deleted.
1162
1163 2014-05-02  Pratik Solanki  <psolanki@apple.com>
1164
1165         Shortcircuit shouldUseCredentialStorage callback
1166         https://bugs.webkit.org/show_bug.cgi?id=132308
1167         <rdar://problem/16806708>
1168
1169         Reviewed by Alexey Proskuryakov.
1170
1171         If we are going to return true from the shouldUseCredentialStorage callback then we don't
1172         really need to have CFNetwork/Foundation call us. We can just disable the callback and
1173         CFNetwork will assume true. Add a separate subclass that implements this callback when we
1174         need to return false. We can also eliminate the corresponding async callbacks. This avoids
1175         pingponging between dispatch queue and main thread in the common case.
1176
1177         No new tests because no change in functionality.
1178
1179         * WebCore.exp.in:
1180         * platform/network/ResourceHandle.cpp:
1181         * platform/network/ResourceHandle.h:
1182         * platform/network/ResourceHandleClient.cpp:
1183         * platform/network/ResourceHandleClient.h:
1184         * platform/network/cf/ResourceHandleCFNet.cpp:
1185         (WebCore::ResourceHandle::createCFURLConnection):
1186         (WebCore::ResourceHandle::shouldUseCredentialStorage):
1187         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1188         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1189         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
1190         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
1191         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1192         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
1193         * platform/network/mac/ResourceHandleMac.mm:
1194         (WebCore::ResourceHandle::start):
1195         (WebCore::ResourceHandle::makeDelegate):
1196         (WebCore::ResourceHandle::delegate):
1197         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
1198         (WebCore::ResourceHandle::shouldUseCredentialStorage):
1199         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
1200         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1201         (-[WebCoreResourceHandleWithCredentialStorageAsOperationQueueDelegate connectionShouldUseCredentialStorage:]):
1202         * platform/network/soup/ResourceHandleSoup.cpp:
1203
1204 2014-05-03  Andreas Kling  <akling@apple.com>
1205
1206         Invalidate scrollbars when custom scrollbar style changes dynamically.
1207         <https://webkit.org/b/132529>
1208
1209         Add a ScrollView::styleDidChange() and call that from RenderView::styleDidChange()
1210         so that the scrollbars are sure to get repainted with potentially different style.
1211
1212         Reviewed by Antti Koivisto.
1213
1214         Test: fast/css/scrollbar-dynamic-style-change.html
1215
1216         * platform/ScrollView.cpp:
1217         (WebCore::ScrollView::styleDidChange):
1218         * platform/ScrollView.h:
1219         * rendering/RenderView.cpp:
1220         (WebCore::RenderView::styleDidChange):
1221
1222 2014-05-03  Simon Fraser  <simon.fraser@apple.com>
1223
1224         Very fuzzy layers under non-decompasable matrices
1225         https://bugs.webkit.org/show_bug.cgi?id=132516
1226         <rdar://problem/16717478>
1227
1228         Reviewed by Sam Weinig.
1229         
1230         r155977 added code to modify layer contentsScale based on a root-relative
1231         scale, so that scaled-up layers remained sharp. It does this by decomposing
1232         an accumulated matrix, but failed to test whether the decomposition
1233         succeeded. This would result in contentsScale of 0, which is clamped to 0.1,
1234         resulting in very fuzzy layers.
1235         
1236         Fix by testing for success of decomposition.
1237
1238         Test: compositing/contents-scale/non-decomposable-matrix.html
1239
1240         * platform/graphics/ca/GraphicsLayerCA.cpp:
1241         (WebCore::maxScaleFromTransform):
1242         * platform/graphics/transforms/TransformationMatrix.cpp:
1243         (WebCore::TransformationMatrix::decompose2): Return early for identity matrices,
1244         with fix for m11 and m22.
1245         (WebCore::TransformationMatrix::decompose4): Return early for identity matrices.
1246         * platform/graphics/transforms/TransformationMatrix.h:
1247         Make Decomposed2Type and Decomposed4Type into C++ structs.
1248         (WebCore::TransformationMatrix::Decomposed2Type::operator==): Added to make it easier
1249         to write code that asserts that decomposition is correct.
1250         (WebCore::TransformationMatrix::Decomposed4Type::operator==): Ditto.
1251
1252 2014-05-03  Simon Fraser  <simon.fraser@apple.com>
1253
1254         Fix crash in WebKit client app when zooming
1255         https://bugs.webkit.org/show_bug.cgi?id=132475
1256         <rdar://problem/16703405>
1257
1258         Reviewed by Tim Horton.
1259
1260         It's possible for a WebTiledBackingLayer CALayer to remain in the CALayer
1261         hierarchy after we've called -invalidate on it, which clears the _tileController.
1262         Project the getters against null derefs to handle this.
1263
1264         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
1265         (-[WebTiledBackingLayer isOpaque]):
1266         (-[WebTiledBackingLayer acceleratesDrawing]):
1267         (-[WebTiledBackingLayer contentsScale]):
1268
1269 2014-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1270
1271         Unreviewed. Fix GTK+ build after r168209.
1272
1273         * platform/leveldb/LevelDBDatabase.cpp:
1274         (WebCore::LevelDBDatabase::write):
1275
1276 2014-05-03  Zalan Bujtas  <zalan@apple.com>
1277
1278         Subpixel rendering: Fieldset legend has a horizontal line through, when the fieldset is painted on odd device pixel position.
1279         https://bugs.webkit.org/show_bug.cgi?id=132521
1280         <rdar://problem/16803305>
1281
1282         Reviewed by Simon Fraser.
1283
1284         Use device pixel snapping when the fieldset's border gets clipped out for the legend's text. It ensures that
1285         the device pixel snapped border gets properly clipped out.
1286
1287         Existing fieldset tests cover it.
1288
1289         * rendering/RenderFieldset.cpp:
1290         (WebCore::RenderFieldset::paintBoxDecorations):
1291
1292 2014-05-02  Zalan Bujtas  <zalan@apple.com>
1293
1294         CodeCleanup: Remove *MaintainsPixelAlignment from GraphicsLayer*.
1295         https://bugs.webkit.org/show_bug.cgi?id=132501
1296
1297         Reviewed by Simon Fraser.
1298
1299         * WebCore.exp.in:
1300         * platform/graphics/GraphicsLayer.cpp:
1301         (WebCore::GraphicsLayer::GraphicsLayer):
1302         * platform/graphics/GraphicsLayer.h:
1303         (WebCore::GraphicsLayer::setMaintainsPixelAlignment): Deleted.
1304         (WebCore::GraphicsLayer::maintainsPixelAlignment): Deleted.
1305         (WebCore::GraphicsLayer::pixelAlignmentOffset): Deleted.
1306         * platform/graphics/ca/GraphicsLayerCA.cpp:
1307         (WebCore::GraphicsLayerCA::updateGeometry):
1308         (WebCore::GraphicsLayerCA::computePixelAlignment):
1309         (WebCore::GraphicsLayerCA::setMaintainsPixelAlignment): Deleted.
1310         * platform/graphics/ca/GraphicsLayerCA.h:
1311         * rendering/RenderLayerBacking.cpp:
1312         (WebCore::RenderLayerBacking::createGraphicsLayer):
1313         * rendering/RenderLayerCompositor.cpp:
1314         (WebCore::RenderLayerCompositor::keepLayersPixelAligned): Deleted.
1315         * rendering/RenderLayerCompositor.h:
1316
1317 2014-05-02  Simon Fraser  <simon.fraser@apple.com>
1318
1319         [iOS WK2] Tiled layer content missing on pages with animated tiled layers
1320         https://bugs.webkit.org/show_bug.cgi?id=132507
1321         <rdar://problem/16765740>
1322
1323         Reviewed by Tim Horton.
1324
1325         Updating the tiling area of content TileControllers while
1326         CSS animations are running depends on GraphicsLayerUpdater
1327         triggering repeated layer flushes. With UI-side compositing, those
1328         flushes were happening, but nothing triggered RemoteLayerTreeDrawingArea
1329         to flush changes to the UI process.
1330         
1331         Fix by having RenderLayerCompositor schedule a flush, rather
1332         than just doing a flush, in response to GraphicsLayerUpdater.
1333         
1334         Also change the name of the GraphicsLayerUpdaterClient function
1335         to indicate that it suggests that a flush is required soon, rather than
1336         that the flushing has to be synchronous.
1337
1338         * platform/graphics/GraphicsLayerUpdater.cpp:
1339         (WebCore::GraphicsLayerUpdater::displayRefreshFired):
1340         * platform/graphics/GraphicsLayerUpdater.h:
1341         * rendering/RenderLayerCompositor.cpp:
1342         (WebCore::RenderLayerCompositor::flushLayersSoon):
1343         (WebCore::RenderLayerCompositor::flushLayers): Deleted.
1344         * rendering/RenderLayerCompositor.h:
1345
1346 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
1347
1348         Use displayNameForTrack instead of textTrack->label() for captions.
1349         https://bugs.webkit.org/show_bug.cgi?id=131311
1350
1351         Reviewed by Darin Adler.
1352
1353         Use the same mechanism as the desktop to build the captions list so it has the correct
1354         names in the correct order including none and automatic.
1355
1356         * platform/ios/WebVideoFullscreenModelMediaElement.h:
1357         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1358         (WebVideoFullscreenModelMediaElement::setMediaElement):
1359         move legible track code into updateLegibleOptions()
1360
1361         (WebVideoFullscreenModelMediaElement::handleEvent):
1362         updateLegibleOptions on addTrack and removeTrack
1363
1364         (WebVideoFullscreenModelMediaElement::selectLegibleMediaOption):
1365         select the corresponding TextTrack on HTMLMediaElement.
1366
1367         (WebVideoFullscreenModelMediaElement::updateLegibleOptions):
1368         use the same mechanism as desktop to build the captions menu.
1369
1370 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
1371
1372         CSS-based Media Controls Show Different times content longer than 1 hour.
1373         https://bugs.webkit.org/show_bug.cgi?id=132443
1374
1375         Reviewed by Jer Noble.
1376
1377         * Modules/mediacontrols/mediaControlsApple.css:
1378         (audio::-webkit-media-controls-timeline-container .hour-long-time):
1379         This class has a wider width for longer duration times.
1380
1381         * Modules/mediacontrols/mediaControlsApple.js:
1382         (Controller.prototype.updateDuration):
1383         Apply .hour-long-time class as appropriate.
1384
1385         (Controller.prototype.formatTime):
1386         More robust formatting to handle hours.
1387
1388         * Modules/mediacontrols/mediaControlsiOS.css:
1389         (audio::-webkit-media-controls-timeline-container .hour-long-time):
1390         This class has a wider width for longer duration times.
1391
1392         * Modules/mediacontrols/mediaControlsiOS.js:
1393         (ControllerIOS.prototype.formatTime):
1394         More robust formatting to handle hours.
1395
1396 2014-05-02  Jer Noble  <jer.noble@apple.com>
1397
1398         [MSE][Mac] AVAssetTrack returns incorrect track size
1399         https://bugs.webkit.org/show_bug.cgi?id=132469
1400
1401         Reviewed by Brent Fulgham.
1402
1403         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1404         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1405         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):  Remove the sizeChanged() notification.
1406         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Cache the last parsed video frame size.
1407         (WebCore::SourceBufferPrivateAVFObjC::naturalSize): Return the cached value.
1408
1409 2014-05-02  Zalan Bujtas  <zalan@apple.com>
1410
1411         Subpixel rendering[iOS]: Use pixelSnappedRoundedRectForPainting() to clip text area rect.
1412         https://bugs.webkit.org/show_bug.cgi?id=132499
1413         <rdar://problem/16631050>
1414
1415         Reviewed by Simon Fraser.
1416
1417         Snap to device pixels properly instead of relying on float arithmetics while converting from RoundedRect
1418         to FloatRoundedRect. This is the second, cleanup part of the text-area decoration is off-by-one painting issue.
1419
1420         Currently not testable.
1421
1422         * rendering/RenderThemeIOS.mm:
1423         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
1424
1425 2014-05-02  Andreas Kling  <akling@apple.com>
1426
1427         Remove HistogramSupport.
1428         <https://webkit.org/b/132354>
1429
1430         Prune some leftover Chromium gunk that no other ports ever used.
1431
1432         Reviewed by Simon Fraser.
1433
1434         * CMakeLists.txt:
1435         * Modules/indexeddb/IDBDatabase.cpp:
1436         (WebCore::IDBDatabase::createObjectStore):
1437         (WebCore::IDBDatabase::deleteObjectStore):
1438         (WebCore::IDBDatabase::transaction):
1439         * Modules/indexeddb/IDBFactory.cpp:
1440         (WebCore::IDBFactory::openInternal):
1441         (WebCore::IDBFactory::deleteDatabase):
1442         * Modules/indexeddb/IDBHistograms.h: Removed.
1443         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1444         (WebCore::IDBBackingStoreLevelDB::open):
1445         (WebCore::IDBBackingStoreLevelDB::openInMemory):
1446         (WebCore::recordInternalError): Deleted.
1447         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
1448         * WebCore.vcxproj/WebCore.vcxproj:
1449         * WebCore.vcxproj/WebCore.vcxproj.filters:
1450         * WebCore.xcodeproj/project.pbxproj:
1451         * css/CSSParser.cpp:
1452         (WebCore::cssPropertyID):
1453         * dom/Document.cpp:
1454         (WebCore::Document::~Document):
1455         (WebCore::histogramMutationEventUsage): Deleted.
1456         * dom/ShadowRoot.cpp:
1457         * fileapi/Blob.cpp:
1458         * fileapi/WebKitBlobBuilder.cpp:
1459         (WebCore::BlobBuilder::append):
1460         * history/PageCache.cpp:
1461         (WebCore::logCanCacheFrameDecision):
1462         (WebCore::logCanCachePageDecision):
1463         * platform/HistogramSupport.cpp: Removed.
1464         * platform/HistogramSupport.h: Removed.
1465         * platform/leveldb/LevelDBDatabase.cpp:
1466         (WebCore::LevelDBDatabase::open):
1467         (WebCore::histogramLevelDBError): Deleted.
1468         * rendering/RenderLayer.cpp:
1469         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
1470         * xml/XMLHttpRequest.cpp:
1471         (WebCore::XMLHttpRequest::send):
1472
1473 2014-05-02  Brady Eidson  <beidson@apple.com>
1474
1475         Stop flipping the ImageControlsButton
1476         <rdar://problem/16773238> and https://bugs.webkit.org/show_bug.cgi?id=132502
1477
1478         Reviewed by Tim Horton.
1479
1480         * rendering/RenderThemeMac.mm:
1481         (WebCore::RenderThemeMac::paintImageControlsButton):
1482
1483 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
1484
1485         Fullscreen UI does not appear after WebProcess has crashed
1486         https://bugs.webkit.org/show_bug.cgi?id=132442
1487
1488         Reviewed by Darin Adler.
1489
1490         Clean up immediately when there is a WebProcess crash.
1491
1492         * WebCore.exp.in:
1493         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1494         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1495         (WebVideoFullscreenInterfaceAVKit::invalidate):
1496         Clean-up resources immediately.
1497
1498 2014-05-02  Commit Queue  <commit-queue@webkit.org>
1499
1500         Unreviewed, rolling out r168192.
1501         https://bugs.webkit.org/show_bug.cgi?id=132498
1502
1503         Was not the correct fix (blurry!) (Requested by bfulgham_ on
1504         #webkit).
1505
1506         Reverted changeset:
1507
1508         "[iOS] deviceScaleFactor is being double-applied when
1509         rendering captions in full screen mode"
1510         https://bugs.webkit.org/show_bug.cgi?id=132481
1511         http://trac.webkit.org/changeset/168192
1512
1513 2014-05-02  Alexey Proskuryakov  <ap@apple.com>
1514
1515         Remove Blob contentDisposition handling
1516         https://bugs.webkit.org/show_bug.cgi?id=132490
1517
1518         Reviewed by Sam Weinig.
1519
1520         Dead code.
1521
1522         * platform/network/BlobData.h:
1523         (WebCore::BlobData::contentDisposition): Deleted.
1524         (WebCore::BlobData::setContentDisposition): Deleted.
1525         * platform/network/BlobRegistryImpl.cpp:
1526         (WebCore::BlobRegistryImpl::registerBlobURL):
1527         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
1528         * platform/network/BlobResourceHandle.cpp:
1529         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
1530         * platform/network/BlobStorageData.h:
1531         (WebCore::BlobStorageData::create):
1532         (WebCore::BlobStorageData::contentType):
1533         (WebCore::BlobStorageData::BlobStorageData):
1534         (WebCore::BlobStorageData::contentDisposition): Deleted.
1535
1536 2014-05-02  Anders Carlsson  <andersca@apple.com>
1537
1538         Implement FormData decoding using KeyedDecoder
1539         https://bugs.webkit.org/show_bug.cgi?id=132494
1540
1541         Reviewed by Tim Horton.
1542
1543         * platform/KeyedCoding.h:
1544         (WebCore::KeyedDecoder::decodeEnum):
1545         * platform/network/FormData.cpp:
1546         (WebCore::decodeElement):
1547         (WebCore::FormData::decode):
1548         * platform/network/FormData.h:
1549
1550 2014-05-02  Brent Fulgham  <bfulgham@apple.com>
1551
1552         [iOS] deviceScaleFactor is being double-applied when rendering captions in full screen mode
1553         https://bugs.webkit.org/show_bug.cgi?id=132481
1554
1555         Reviewed by Jer Noble.
1556
1557         * html/shadow/MediaControlElements.cpp:
1558         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't set the platform scale factor here. It is already
1559         being accounted for in the createTextTrackRepresentationImage method.
1560
1561 2014-05-02  Simon Fraser  <simon.fraser@apple.com>
1562
1563         [iOS WK2] Don't create backing store for -webkit-overflow-scrolling:touch that can't scroll
1564         https://bugs.webkit.org/show_bug.cgi?id=132487
1565         <rdar://problem/16758041>
1566
1567         Reviewed by Sam Weinig.
1568
1569         Previously, -webkit-overflow-scrolling:touch would cause us to make compositing
1570         layers for any element that had overflow: auto or scroll on either axis. This
1571         created lots of backing store when not required.
1572         
1573         Improve this to only create compositing for scrolling when there is actually
1574         scrollable overflow. This makes things slightly more complex, because we can
1575         only know when layout is up to date.
1576
1577         * rendering/RenderBox.cpp:
1578         (WebCore::RenderBox::computeRectForRepaint): usesCompositedScrolling() tells
1579         us if we're actually doing composited overflow.
1580         * rendering/RenderLayer.cpp:
1581         (WebCore::RenderLayer::hasTouchScrollableOverflow):
1582         (WebCore::RenderLayer::handleTouchEvent):
1583         * rendering/RenderLayer.h:
1584         * rendering/RenderLayerBacking.cpp:
1585         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
1586         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Only update
1587         scrolling and clipping layers if layout is not pending.
1588         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1589         (WebCore::RenderLayerBacking::updateScrollingLayers): The caller calls
1590         updateInternalHierarchy(), so no need to do it here.
1591         * rendering/RenderLayerCompositor.cpp:
1592         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): We
1593         can only determine that we're scrollable after layout.
1594         (WebCore::isStickyInAcceleratedScrollingLayerOrViewport):
1595         (WebCore::isMainFrameScrollingOrOverflowScrolling):
1596
1597 2014-05-02  Anders Carlsson  <andersca@apple.com>
1598
1599         Clean up FormDataElement
1600         https://bugs.webkit.org/show_bug.cgi?id=132483
1601
1602         Reviewed by Sam Weinig.
1603
1604         * platform/network/FormData.cpp:
1605         (WebCore::FormData::FormData):
1606         (WebCore::FormData::deepCopy):
1607         (WebCore::FormData::expandDataStore):
1608         (WebCore::FormData::flatten):
1609         (WebCore::FormData::resolveBlobReferences):
1610         (WebCore::FormData::generateFiles):
1611         (WebCore::FormData::hasGeneratedFiles):
1612         (WebCore::FormData::hasOwnedGeneratedFiles):
1613         (WebCore::FormData::removeGeneratedFilesIfNeeded):
1614         (WebCore::encodeElement):
1615         (WebCore::decodeElement):
1616         * platform/network/FormData.h:
1617         (WebCore::FormDataElement::FormDataElement):
1618         (WebCore::operator==):
1619         * platform/network/cf/FormDataStreamCFNet.cpp:
1620         (WebCore::advanceCurrentStream):
1621         (WebCore::setHTTPBody):
1622         * platform/network/curl/FormDataStreamCurl.cpp:
1623         (WebCore::FormDataStream::read):
1624         * platform/network/curl/ResourceHandleManager.cpp:
1625         (WebCore::setupFormData):
1626         * platform/network/soup/ResourceHandleSoup.cpp:
1627         (WebCore::addFormElementsToSoupMessage):
1628
1629 2014-05-02  Jer Noble  <jer.noble@apple.com>
1630
1631         [iOS] Wireless playback button not blue when active
1632         https://bugs.webkit.org/show_bug.cgi?id=132473
1633
1634         Reviewed by Simon Fraser.
1635
1636         The playback button's class was being set to 'undefined', due to Controller.ClassNames.active being undefined.
1637
1638         * Modules/mediacontrols/mediaControlsApple.js:
1639
1640 2014-05-02  Alexey Proskuryakov  <ap@apple.com>
1641
1642         Don't abuse Blob deserialization constructor in WebSocket
1643         https://bugs.webkit.org/show_bug.cgi?id=132478
1644
1645         Reviewed by Sam Weinig.
1646
1647         * Modules/websockets/WebSocketChannel.cpp:
1648         (WebCore::WebSocketChannel::send):
1649         (WebCore::WebSocketChannel::enqueueBlobFrame): This is the important change -
1650         Blob::create was called for no reason. If the blob came from a worker, it was
1651         already cloned for cross-thread messaging, otherwise there is no reason to make
1652         a new one.
1653
1654         * fileapi/Blob.h:
1655         (WebCore::Blob::deserialize):
1656         (WebCore::Blob::create): Deleted.
1657         * fileapi/File.h:
1658         (WebCore::File::deserialize):
1659         (WebCore::File::create): Deleted.
1660         Renamed a special case of "create" function to avoid explaining what it is for.
1661
1662         * Modules/websockets/ThreadableWebSocketChannel.h:
1663         * Modules/websockets/WebSocket.cpp:
1664         (WebCore::WebSocket::send):
1665         * Modules/websockets/WebSocketChannel.h:
1666         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1667         (WebCore::WorkerThreadableWebSocketChannel::send): Print a full URL in LOG(),
1668         not one shortened to 1024 characters.
1669         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
1670         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob):
1671         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
1672         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1673         * bindings/js/SerializedScriptValue.cpp:
1674         (WebCore::CloneDeserializer::readFile):
1675         (WebCore::CloneDeserializer::readTerminal):
1676
1677 2014-05-02  Anders Carlsson  <andersca@apple.com>
1678
1679         Add and implement KeyedDecoder::decodeBytes
1680         https://bugs.webkit.org/show_bug.cgi?id=132479
1681
1682         Reviewed by Tim Horton.
1683
1684         * platform/KeyedCoding.h:
1685         (WebCore::KeyedDecoder::decodeBytes):
1686
1687 2014-05-02  Joseph Pecoraro  <pecoraro@apple.com>
1688
1689         [iOS] WebKit2 File Upload Support
1690         https://bugs.webkit.org/show_bug.cgi?id=132024
1691
1692         Reviewed by Enrica Casucci.
1693
1694         * English.lproj/Localizable.strings:
1695         New localized strings for <input type="file"> on iOS.
1696
1697 2014-05-02  Chris Fleizach  <cfleizach@apple.com>
1698
1699         AX: WK2: iOS web page scrolling doesn't work with VoiceOver
1700         https://bugs.webkit.org/show_bug.cgi?id=132028
1701
1702         Reviewed by Mario Sanchez Prada.
1703
1704         With the AX tree residing in the WebProcess, scrolling needs to be implemented in
1705         WebCore using accessibilityScroll: in order for accessibility clients to scroll through the AX API.
1706
1707         * accessibility/AccessibilityObject.cpp:
1708         (WebCore::AccessibilityObject::scrollViewAncestor):
1709         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
1710         * accessibility/AccessibilityObject.h:
1711         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
1712         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1713         (-[WebAccessibilityObjectWrapper _accessibilityConvertPointToViewSpace:]):
1714         (-[WebAccessibilityObjectWrapper _accessibilityScrollToVisible]):
1715         (-[WebAccessibilityObjectWrapper accessibilityScroll:]):
1716         (-[WebAccessibilityObjectWrapper postScrollStatusChangeNotification]):
1717         (-[WebAccessibilityObjectWrapper _accessibilityScrollPosition]):
1718         (-[WebAccessibilityObjectWrapper _accessibilityScrollSize]):
1719         (-[WebAccessibilityObjectWrapper _accessibilityScrollVisibleRect]):
1720
1721 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
1722
1723         Pause playback on exit fullscreen when inline playback not allowed.
1724         https://bugs.webkit.org/show_bug.cgi?id=132450
1725
1726         Reviewed by Jer Noble.
1727
1728         Use correct method of determining if inline playback is allowed.
1729
1730         * html/HTMLMediaElement.cpp:
1731         (WebCore::HTMLMediaElement::parseAttribute):
1732         Use m_mediaSession->requiresFullscreenForVideoPlayback to detect if inline playback is allowed.
1733
1734         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1735         (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
1736         Prevent duplicate exit requests.
1737
1738 2014-05-02  Ion Rosca  <rosca@adobe.com>
1739
1740         [CSS Blending] Remove support for non-separable blend modes from background-blend-mode
1741         https://bugs.webkit.org/show_bug.cgi?id=132327
1742
1743         Reviewed by Dean Jackson.
1744
1745         Removed support for non-separable background blend modes from the CSS parser.
1746         Covered by existing tests.
1747
1748         * css/CSSParser.cpp:
1749         (WebCore::CSSParser::parseFillProperty):
1750
1751 2014-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1752
1753         Clean up #include <OwnPtr.h>|<PassOwnPtr.h> in Supplementable classes
1754         https://bugs.webkit.org/show_bug.cgi?id=132466
1755
1756         Reviewed by Tim Horton.
1757
1758         Since r168144, Supplementable classes don't need to include OwnPtr.h or PassOwnPtr.h.
1759         Clean up those inclusions.
1760
1761         No new tests, just clean up patch.
1762
1763         * Modules/encryptedmedia/CDMPrivate.h:
1764         * Modules/gamepad/NavigatorGamepad.cpp:
1765         * Modules/geolocation/GeolocationController.cpp:
1766         (WebCore::GeolocationController::create): Deleted. Don't need to have a factory function.
1767         * Modules/geolocation/GeolocationController.h:
1768         * Modules/mediasource/MediaSource.h:
1769         * Modules/mediastream/UserMediaController.h:
1770         * Modules/notifications/NotificationCenter.h:
1771         * Modules/notifications/NotificationController.cpp:
1772         * Modules/quota/StorageErrorCallback.h:
1773         * Modules/vibration/Vibration.h:
1774         * Modules/webdatabase/Database.cpp:
1775         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1776         * Modules/websockets/WebSocket.cpp:
1777         * Modules/websockets/WebSocket.h:
1778
1779 2014-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
1780
1781         Remove TiledBackingStore stuff from Frame
1782         https://bugs.webkit.org/show_bug.cgi?id=132458
1783
1784         Reviewed by Andreas Kling.
1785
1786         Although TiledBackingStore is using for the CoordinatedGraphics,
1787         CoordinatedGraphics does not use tiledBackingStore of Frame.
1788
1789         This patch removed TiledBackingStore related code of the Frame.
1790
1791         * page/Frame.cpp:
1792         (WebCore::Frame::Frame):
1793         (WebCore::Frame::setView):
1794         (WebCore::Frame::setTiledBackingStoreEnabled): Deleted.
1795         (WebCore::Frame::tiledBackingStorePaintBegin): Deleted.
1796         (WebCore::Frame::tiledBackingStorePaint): Deleted.
1797         (WebCore::Frame::tiledBackingStorePaintEnd): Deleted.
1798         (WebCore::Frame::tiledBackingStoreContentsRect): Deleted.
1799         (WebCore::Frame::tiledBackingStoreVisibleRect): Deleted.
1800         (WebCore::Frame::tiledBackingStoreBackgroundColor): Deleted.
1801         * page/Frame.h:
1802         (WebCore::Frame::tiledBackingStore): Deleted.
1803         * page/FrameView.cpp:
1804         (WebCore::FrameView::repaintContentRectangle):
1805         * page/Settings.cpp:
1806         (WebCore::Settings::Settings):
1807         (WebCore::Settings::setTiledBackingStoreEnabled): Deleted.
1808         * page/Settings.h:
1809         (WebCore::Settings::tiledBackingStoreEnabled): Deleted.
1810
1811 2014-05-01  Myles C. Maxfield  <mmaxfield@apple.com>
1812
1813         Migrate all uses of DeviceMotionController and DeviceOrientationController to std::unique_ptr
1814         https://bugs.webkit.org/show_bug.cgi?id=132461
1815
1816         Unreviewed build fix.
1817
1818         No new tests.
1819
1820         * dom/Document.cpp:
1821         (WebCore::Document::Document):
1822         * dom/Document.h:
1823         * platform/ios/DeviceMotionClientIOS.h:
1824         (WebCore::DeviceMotionClientIOS::create): Deleted.
1825         * platform/ios/DeviceOrientationClientIOS.h:
1826         (WebCore::DeviceOrientationClientIOS::create): Deleted.
1827
1828 2014-05-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1829
1830         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr in Supplement
1831         https://bugs.webkit.org/show_bug.cgi?id=132165
1832
1833         Reviewed by Darin Adler.
1834
1835         According to convert from PassOwnPtr to std::unique_ptr, provideTo() callers also begin
1836         to use std::make_unique.
1837
1838         * Modules/battery/BatteryController.cpp:
1839         (WebCore::provideBatteryTo):
1840         * Modules/battery/BatteryController.h:
1841         * Modules/battery/NavigatorBattery.cpp:
1842         (WebCore::NavigatorBattery::from):
1843         * Modules/gamepad/NavigatorGamepad.cpp:
1844         (WebCore::NavigatorGamepad::from):
1845         * Modules/geolocation/GeolocationController.cpp:
1846         (WebCore::provideGeolocationTo):
1847         * Modules/geolocation/GeolocationController.h:
1848         * Modules/geolocation/NavigatorGeolocation.cpp:
1849         (WebCore::NavigatorGeolocation::from):
1850         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1851         (WebCore::DOMWindowIndexedDatabase::from):
1852         * Modules/indexeddb/PageGroupIndexedDatabase.cpp:
1853         (WebCore::PageGroupIndexedDatabase::from):
1854         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
1855         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
1856         * Modules/mediastream/UserMediaController.cpp:
1857         (WebCore::provideUserMediaTo):
1858         (WebCore::UserMediaController::create): Deleted.
1859         * Modules/mediastream/UserMediaController.h:
1860         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1861         (WebCore::provideNavigatorContentUtilsTo):
1862         (WebCore::NavigatorContentUtils::create): Deleted.
1863         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
1864         * Modules/notifications/DOMWindowNotifications.cpp:
1865         (WebCore::DOMWindowNotifications::from):
1866         * Modules/notifications/NotificationController.cpp:
1867         (WebCore::provideNotification):
1868         (WebCore::NotificationController::create): Deleted.
1869         * Modules/notifications/NotificationController.h:
1870         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
1871         (WebCore::WorkerGlobalScopeNotifications::from):
1872         * Modules/proximity/DeviceProximityController.cpp:
1873         (WebCore::provideDeviceProximityTo):
1874         (WebCore::DeviceProximityController::create): Deleted.
1875         * Modules/proximity/DeviceProximityController.h:
1876         * Modules/quota/DOMWindowQuota.cpp:
1877         (WebCore::DOMWindowQuota::from):
1878         * Modules/quota/NavigatorStorageQuota.cpp:
1879         (WebCore::NavigatorStorageQuota::from):
1880         * Modules/quota/WorkerNavigatorStorageQuota.cpp:
1881         (WebCore::WorkerNavigatorStorageQuota::from):
1882         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
1883         (WebCore::DOMWindowSpeechSynthesis::from):
1884         * Modules/speech/SpeechRecognitionController.cpp:
1885         (WebCore::provideSpeechRecognitionTo):
1886         * Modules/vibration/Vibration.cpp:
1887         (WebCore::provideVibrationTo):
1888         (WebCore::Vibration::create): Deleted.
1889         * Modules/vibration/Vibration.h:
1890         * dom/DeviceMotionController.cpp:
1891         (WebCore::provideDeviceMotionTo):
1892         (WebCore::DeviceMotionController::create): Deleted.
1893         * dom/DeviceMotionController.h:
1894         * dom/DeviceOrientationController.cpp:
1895         (WebCore::provideDeviceOrientationTo):
1896         (WebCore::DeviceOrientationController::create): Deleted.
1897         * dom/DeviceOrientationController.h:
1898         * page/SpeechInput.cpp:
1899         (WebCore::provideSpeechInputTo):
1900         (WebCore::SpeechInput::create): Deleted.
1901         * page/SpeechInput.h:
1902         * platform/Supplementable.h:
1903         (WebCore::Supplement::provideTo):
1904         (WebCore::Supplementable::provideSupplement):
1905         * testing/InternalSettings.cpp:
1906         (WebCore::InternalSettings::from):
1907
1908 2014-05-01  Andreas Kling  <akling@apple.com>
1909
1910         HTMLMediaElement: Remove two unnecessary virtual overrides.
1911         <https://webkit.org/b/132445>
1912
1913         Now that ENABLE_PLUGIN_PROXY_FOR_VIDEO is gone, we can remove
1914         these overrides:
1915
1916             - defaultEventHandler()
1917             - willRespondToMouseClickEvents()
1918
1919         Reviewed by Darin Adler.
1920
1921         * html/HTMLMediaElement.cpp:
1922         * html/HTMLMediaElement.h:
1923
1924 2014-05-01  Benjamin Poulain  <bpoulain@apple.com>
1925
1926         ViewportConfiguration::minimumScale() uses the initial scale as initial value
1927         https://bugs.webkit.org/show_bug.cgi?id=132451
1928         <rdar://problem/16780111>
1929
1930         Reviewed by Enrica Casucci.
1931
1932         * page/ViewportConfiguration.cpp:
1933         (WebCore::ViewportConfiguration::minimumScale):
1934         The initial minimum scale was set to the initial scale, preventing some pages from zooming
1935         out.
1936
1937 2014-05-01  Alexey Proskuryakov  <ap@apple.com>
1938
1939         Build fix for !ENABLE(BLOB) builds.
1940
1941         * fileapi/ThreadableBlobRegistry.cpp:
1942         (WebCore::ThreadableBlobRegistry::registerBlobURL):
1943         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
1944
1945 2014-05-01  Alexey Proskuryakov  <ap@apple.com>
1946
1947         Move size computation for Blob constructor into BlobRegistryImpl
1948         https://bugs.webkit.org/show_bug.cgi?id=132439
1949
1950         Reviewed by Sam Weinig.
1951
1952         * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData):
1953         Don't pass the size, anyone who cares can get it from BlobData.
1954
1955         * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob):
1956         Updated for BlobBuilder changes.
1957
1958         * fileapi/Blob.cpp: (WebCore::Blob::Blob):
1959         * fileapi/Blob.h: (WebCore::Blob::create):
1960         No longer take a precomputed size with BlobData, BlobRegistry will compute it as
1961         part of registration.
1962
1963         * fileapi/File.h:
1964         * fileapi/File.cpp:
1965         (WebCore::File::File): Don't pass a size (that's unknown anyway).
1966         (WebCore::File::captureSnapshot): Deleted. Finally, only the registry is responsible
1967         for snapshot tracking now (I doubt that either new or old code is particularly compliant).
1968
1969         * fileapi/ThreadableBlobRegistry.cpp:
1970         (WebCore::ThreadableBlobRegistry::registerBlobURL):
1971         * fileapi/ThreadableBlobRegistry.h:
1972         Plumbing to make this version of registerBlobURL return a size. I may make size
1973         calculation lazy and the function async later, but this is needed to move the behavior
1974         to the right place first.
1975
1976         * fileapi/WebKitBlobBuilder.h:
1977         * fileapi/WebKitBlobBuilder.cpp:
1978         (WebCore::BlobBuilder::BlobBuilder):
1979         (WebCore::BlobBuilder::append):
1980         (WebCore::BlobBuilder::appendBytesData):
1981         (WebCore::BlobBuilder::finalize):
1982         (WebCore::BlobBuilder::getBlob): Deleted.
1983         Don't track sizes or modification times, registry will do that with appropriate laziness.
1984         Cleaned up the API - now that BlobBuilder is not exposed to JS as an object, it
1985         does not need to be reusable.
1986
1987         * platform/network/BlobRegistry.h: Made this version of registerBlobURL return a size.
1988         * platform/network/BlobRegistryImpl.h:
1989         * platform/network/BlobRegistryImpl.cpp:
1990         (WebCore::BlobRegistryImpl::appendStorageItems): Assert that length computations are accurate.
1991         (WebCore::BlobRegistryImpl::registerBlobURL): Compute a size to return, and record
1992         modification time as necessary.
1993
1994         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): Don't pass the
1995         size, which can be computed from data. Soon, I want to add a constructor that doesn't
1996         require wrapping a single Vector as BlobData to construct a Blob.
1997
1998 2014-05-01  Eric Carlson  <eric.carlson@apple.com>
1999
2000         [iOS] audio and video should automatically play to active external device
2001         https://bugs.webkit.org/show_bug.cgi?id=132428
2002
2003         Reviewed by Jer Noble.
2004
2005         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2006         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Set 
2007             AVPlayer.usesExternalPlaybackWhileExternalScreenIsActive.
2008
2009 2014-05-01  David Hyatt  <hyatt@apple.com>
2010
2011         REGRESSION (r168046): [New Multicolumn] Selection into and out of column-span elements doesn't work
2012         https://bugs.webkit.org/show_bug.cgi?id=132066
2013
2014         Reviewed by Oliver Hunt.
2015
2016         Make a new SelectionIterator struct that knows how to drill into and out of
2017         column span placeholders. Also change spans to be selection roots (in the painting
2018         sense).
2019
2020         * rendering/RenderBlock.cpp:
2021         (WebCore::RenderBlock::isSelectionRoot):
2022         (WebCore::RenderBlock::selectionGaps):
2023         * rendering/RenderView.cpp:
2024         (WebCore::SelectionIterator::SelectionIterator):
2025         (WebCore::SelectionIterator::checkForSpanner):
2026         (WebCore::SelectionIterator::current):
2027         (WebCore::SelectionIterator::next):
2028         (WebCore::RenderView::subtreeSelectionBounds):
2029         (WebCore::RenderView::repaintSubtreeSelection):
2030         (WebCore::RenderView::setSubtreeSelection):
2031
2032 2014-05-01  Simon Fraser  <simon.fraser@apple.com>
2033
2034         Don't always make backing store for -webkit-backface-visibility:hidden
2035         https://bugs.webkit.org/show_bug.cgi?id=132420
2036
2037         Reviewed by Sam Weinig.
2038         
2039         Previously, -webkit-backface-visibility:hidden unconditionally created
2040         compositing layers with backing store. This results in high memory use
2041         on pages with this style applied to many elements (a cargo-cult "optimization").
2042         
2043         Fix by only having -webkit-backface-visibility:hidden create compositing layers
2044         if some ancestor has a 3D transform. That's the only scenario in which the
2045         element can be flipped around to reveal the back side, so the only time we need
2046         to do compositing for this property. In future, we could be smarter, and only
2047         consider 3D transforms in the current preserve-3d context.
2048
2049         Tests: compositing/backing/backface-visibility-in-3dtransformed.html
2050                compositing/backing/backface-visibility-in-transformed.html
2051                compositing/backing/backface-visibility.html
2052
2053         * rendering/RenderLayer.cpp:
2054         (WebCore::RenderLayer::RenderLayer):
2055         (WebCore::RenderLayer::updateLayerPositions):
2056         (WebCore::RenderLayer::hitTestLayer):
2057         * rendering/RenderLayer.h:
2058         * rendering/RenderLayerCompositor.cpp:
2059         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
2060         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
2061         (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility):
2062         * rendering/RenderLayerCompositor.h:
2063
2064 2014-05-01  Alex Christensen  <achristensen@webkit.org>
2065
2066         Finish updating ANGLE.
2067         https://bugs.webkit.org/show_bug.cgi?id=132434
2068
2069         Reviewed by Dean Jackson.
2070
2071         * CMakeLists.txt:
2072         Removed Uniform.cpp which is no longer in ANGLE.
2073
2074 2014-05-01  David Hyatt  <hyatt@apple.com>
2075
2076         REGRESSION (new multi-column): WebKit2.ResizeReversePaginatedWebView fails on debug bots
2077         https://bugs.webkit.org/show_bug.cgi?id=132429
2078
2079         Reviewed by Alexey Proskuryakov.
2080         
2081         Make sure to get the column count directly from the column set.
2082         I was returning the theoretical column count from the flow thread,
2083         and that wasn't the right value.
2084
2085         * rendering/RenderMultiColumnSet.h:
2086         * rendering/RenderView.cpp:
2087         (WebCore::RenderView::pageCount):
2088
2089 2014-05-01  Brent Fulgham  <bfulgham@apple.com>
2090
2091         Fix handling of attributes prior to compiling shader
2092         https://bugs.webkit.org/show_bug.cgi?id=132430
2093
2094         Reviewed by Dean Jackson.
2095
2096         WebGL programs that called bindAttribLocations prior to compiling shader sources
2097         would perform the bind using the non-hashed symbol name, but would later create
2098         the attributes as hashed names. Consequently, the program would refer to
2099         attributes that were never actually part of any shader, resulting in some amazing
2100         display artifacts.
2101
2102         This patch adds a dictionary of hashed symbol names so that we can tell the WebGL
2103         program the proper name that will be used when the shader is eventually compiled,
2104         allowing the WebGL program to link against the proper symbol after compiling and
2105         linking completes.
2106
2107         * platform/graphics/GraphicsContext3D.h:
2108         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2109         (WebCore::generateHashedName): Function uses the ANGLE hashing
2110         function to generate correct symbol.
2111         (WebCore::GraphicsContext3D::mappedSymbolName): If we haven't compiled shaders yet, look
2112         in our set of potentially unused attributes.
2113         (WebCore::GraphicsContext3D::originalSymbolName): Ditto, for reverse lookup.
2114
2115 2014-05-01  Zalan Bujtas  <zalan@apple.com>
2116
2117         Subpixel rendering: Make selection gaps painting subpixel aware.
2118         https://bugs.webkit.org/show_bug.cgi?id=132169
2119
2120         Reviewed by Simon Fraser.
2121
2122         Push selection gaps painting to device pixel boundaries instead of integral CSS pixel positions.
2123
2124         Test: fast/inline/hidpi-selection-gap-on-subpixel-position.html
2125
2126         * rendering/RenderBlock.cpp:
2127         (WebCore::RenderBlock::blockSelectionGap):
2128         (WebCore::RenderBlock::logicalLeftSelectionGap):
2129         (WebCore::RenderBlock::logicalRightSelectionGap):
2130
2131 2014-05-01  David Kilzer  <ddkilzer@apple.com>
2132
2133         Really remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
2134         <http://webkit.org/b/132432>
2135
2136         Reviewed by Tim Horton.
2137
2138         * platform/graphics/wince/MediaPlayerPrivateWinCE.h: Remove
2139         methods and ivar in ENABLE(PLUGIN_PROXY_FOR_VIDEO).
2140
2141 2014-05-01  Javier Fernandez  <jfernandez@igalia.com>
2142
2143         [CSS Grid Layout] Clamping the number of repetitions in repeat()
2144         https://bugs.webkit.org/show_bug.cgi?id=131023
2145
2146         Reviewed by Brent Fulgham.
2147
2148         The ED suggests now to be able to clamp the number of repetitions when
2149         using the repeat() function, taking precautions about excessive memory
2150         usage.
2151
2152         The implemented max repetitions is 10K.
2153
2154         Test: fast/css-grid-layout/grid-element-repeat-max-repetitions.html
2155
2156         * css/CSSParser.cpp:
2157         (WebCore::CSSParser::parseGridTrackRepeatFunction):
2158
2159 2014-04-30  Jer Noble  <jer.noble@apple.com>
2160
2161         [MSE] Seeking between two buffered ranges enquues incorrect buffers.
2162         https://bugs.webkit.org/show_bug.cgi?id=132416
2163
2164         Reviewed by Eric Carlson.
2165
2166         std::equal_range(begin, end, value) will return an empty range if equal values cannot
2167         be found. But the range is not necessarily [end, end).  It may be some other value n,
2168         such that the empty range is [n, n). Check to see if the returned range is empty in
2169         findSampleContainingPresentationTime() and its reverse version, and if so, explicitly
2170         return presentationEnd() or reversePresentationEnd() respectively.
2171
2172         Drive-by fix: make the comparator functions take const& arguments to minimize object
2173         creation.
2174
2175         * Modules/mediasource/SampleMap.cpp:
2176         (WebCore::SampleIsLessThanMediaTimeComparator::operator()):
2177         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()):
2178         (WebCore::SampleMap::findSampleContainingPresentationTime):
2179         (WebCore::SampleMap::reverseFindSampleContainingPresentationTime):
2180
2181 2014-05-01  Zalan Bujtas  <zalan@apple.com>
2182
2183         Subpixel rendering: Inline text selection painting should not snap to integral CSS pixel position.
2184         https://bugs.webkit.org/show_bug.cgi?id=132164
2185
2186         Reviewed by Darin Adler.
2187
2188         Inline text selection painting now snaps to device pixels. It uses the same rounding logic as
2189         other painting functions.
2190
2191         Test: fast/inline/hidpi-select-inline-on-subpixel-position.html
2192
2193         * rendering/EllipsisBox.cpp:
2194         (WebCore::EllipsisBox::paintSelection):
2195         * rendering/InlineTextBox.cpp:
2196         (WebCore::InlineTextBox::paintSelection):
2197         (WebCore::alignSelectionRectToDevicePixels): Deleted.
2198         * rendering/InlineTextBox.h:
2199
2200 2014-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
2201
2202         [EFL] There are many warnings with software backend
2203         https://bugs.webkit.org/show_bug.cgi?id=132422
2204
2205         Reviewed by Gyuyoung Kim.
2206
2207         ecore_evas_gl_x11_window_get should be called when only engine is opengl_x11.
2208
2209         This patch refactors not to call unnecessary API by checking engine type.
2210         In addition, removed unnecessary isUsingEcoreX().
2211
2212         * platform/efl/EflScreenUtilities.cpp:
2213         (WebCore::applyFallbackCursor):
2214         (WebCore::getEcoreXWindow):
2215         (WebCore::isUsingEcoreX): Deleted.
2216         * platform/efl/EflScreenUtilities.h:
2217
2218 2014-05-01  Rik Cabanier  <cabanier@adobe.com>
2219
2220         Calling createPattern with a broken image must throw an invalidstate error
2221         https://bugs.webkit.org/show_bug.cgi?id=132407
2222
2223         Reviewed by Dirk Schulze.
2224
2225         Per the WebIDL spec, passing non-finite parameter to a method that
2226         takes doubles, should generate a type error.
2227
2228         Tests:
2229         * canvas/philip/tests/2d.imageData.create2.nonfinite.html:
2230         * fast/canvas/canvas-2d-imageData-create-nonfinite.html:
2231
2232         * html/canvas/CanvasRenderingContext2D.cpp:
2233         (WebCore::CanvasRenderingContext2D::createImageData):
2234
2235 2014-04-30  David Hyatt  <hyatt@apple.com>
2236
2237         REGRESSION (r168046): [New Multicolumn] LeftToRight-rl.html (and all the other reversed/block-axis pagination tests) fail
2238         https://bugs.webkit.org/show_bug.cgi?id=132419
2239
2240         Reviewed by Andreas Kling.
2241
2242         * rendering/RenderMultiColumnSet.cpp:
2243         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting):
2244         Don't flip here. The old code needed to do that, but the new code doesn't.
2245
2246 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
2247
2248         Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
2249         Clean up unnecessary methods in the BackForwardClient interface
2250
2251         It broke a regression test and an API test.
2252
2253         * WebCore.exp.in:
2254         * history/BackForwardClient.h:
2255         (WebCore::BackForwardClient::backItem):
2256         (WebCore::BackForwardClient::currentItem):
2257         (WebCore::BackForwardClient::forwardItem):
2258         * history/BackForwardController.cpp:
2259         (WebCore::BackForwardController::BackForwardController):
2260         * history/BackForwardController.h:
2261         (WebCore::BackForwardController::client):
2262         * history/BackForwardList.cpp:
2263         (WebCore::BackForwardList::BackForwardList):
2264         (WebCore::BackForwardList::close):
2265         * history/BackForwardList.h:
2266         (WebCore::BackForwardList::create):
2267         (WebCore::BackForwardList::page):
2268         * page/Page.cpp:
2269         (WebCore::Page::Page):
2270         (WebCore::Page::PageClients::PageClients):
2271         * page/Page.h:
2272
2273 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
2274
2275         More iOS build fixing. MediaPlayerPrivateIOS is defunct and can be removed.
2276         Fix some build errors in other media files.
2277
2278         * WebCore.xcodeproj/project.pbxproj:
2279         * platform/graphics/MediaPlayer.cpp:
2280         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2281         * platform/graphics/ios/MediaPlayerPrivateIOS.h: Removed.
2282         * platform/graphics/ios/MediaPlayerPrivateIOS.mm: Removed.
2283
2284 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
2285
2286         Fix the iOS build, which no longer needs these calls
2287         to enter/exitFullscreen.
2288
2289         * html/HTMLMediaElement.cpp:
2290         (WebCore::HTMLMediaElement::parseAttribute):
2291
2292 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
2293
2294         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
2295         https://bugs.webkit.org/show_bug.cgi?id=132396
2296
2297         Reviewed by Eric Carlson.
2298
2299         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
2300
2301         * Configurations/FeatureDefines.xcconfig:
2302         * WebCore.exp.in:
2303         * css/StyleResolver.cpp:
2304         (WebCore::StyleResolver::canShareStyleWithElement):
2305         * dom/DOMImplementation.cpp:
2306         (WebCore::DOMImplementation::createDocument):
2307         * editing/TextIterator.cpp:
2308         (WebCore::isRendererReplacedElement):
2309         * html/HTMLMediaElement.cpp:
2310         (WebCore::HTMLMediaElement::HTMLMediaElement):
2311         (WebCore::HTMLMediaElement::parseAttribute):
2312         * html/HTMLMediaElement.h:
2313         (WebCore::HTMLMediaElement::setNeedWidgetUpdate): Deleted.
2314         * html/HTMLMediaSession.cpp:
2315         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
2316         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
2317         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
2318         * html/HTMLVideoElement.cpp:
2319         (WebCore::HTMLVideoElement::createElementRenderer):
2320         (WebCore::HTMLVideoElement::didAttachRenderers):
2321         (WebCore::HTMLVideoElement::parseAttribute):
2322         (WebCore::HTMLVideoElement::setDisplayMode):
2323         * html/shadow/MediaControlElements.cpp:
2324         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
2325         * loader/EmptyClients.cpp:
2326         (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
2327         * loader/EmptyClients.h:
2328         * loader/FrameLoaderClient.h:
2329         * loader/SubframeLoader.cpp:
2330         (WebCore::SubframeLoader::loadPlugin):
2331         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin): Deleted.
2332         * loader/SubframeLoader.h:
2333         * page/FrameView.cpp:
2334         (WebCore::FrameView::updateEmbeddedObject):
2335         * page/Settings.cpp:
2336         (WebCore::Settings::setVideoPluginProxyEnabled): Deleted.
2337         * page/Settings.h:
2338         (WebCore::Settings::isVideoPluginProxyEnabled): Deleted.
2339         * platform/graphics/GraphicsLayerClient.h:
2340         (WebCore::GraphicsLayerClient::mediaLayerMustBeUpdatedOnMainThread): Deleted.
2341         * platform/graphics/MediaPlayer.cpp:
2342         (WebCore::installedMediaEngines):
2343         (WebCore::MediaPlayer::MediaPlayer):
2344         (WebCore::MediaPlayer::loadWithNextMediaEngine):
2345         (WebCore::NullMediaPlayerPrivate::deliverNotification): Deleted.
2346         (WebCore::NullMediaPlayerPrivate::setMediaPlayerProxy): Deleted.
2347         (WebCore::NullMediaPlayerPrivate::setControls): Deleted.
2348         (WebCore::MediaPlayer::deliverNotification): Deleted.
2349         (WebCore::MediaPlayer::setMediaPlayerProxy): Deleted.
2350         (WebCore::MediaPlayer::setControls): Deleted.
2351         * platform/graphics/MediaPlayer.h:
2352         * platform/graphics/MediaPlayerPrivate.h:
2353         (WebCore::MediaPlayerPrivateInterface::deliverNotification): Deleted.
2354         (WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Deleted.
2355         (WebCore::MediaPlayerPrivateInterface::setControls): Deleted.
2356         * platform/graphics/ca/GraphicsLayerCA.cpp:
2357         (WebCore::GraphicsLayerCA::updateGeometry):
2358         (WebCore::GraphicsLayerCA::updateContentsRects):
2359         (WebCore::GraphicsLayerCA::mediaLayerMustBeUpdatedOnMainThread): Deleted.
2360         * platform/graphics/ca/GraphicsLayerCA.h:
2361         * rendering/RenderEmbeddedObject.cpp:
2362         (WebCore::RenderEmbeddedObject::canHaveChildren):
2363         * rendering/RenderLayerBacking.cpp:
2364         (WebCore::RenderLayerBacking::mediaLayerMustBeUpdatedOnMainThread): Deleted.
2365         * rendering/RenderLayerBacking.h:
2366         * rendering/RenderLayerCompositor.cpp:
2367         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
2368
2369 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
2370
2371         [iOS WK2] Some accerated overflow-scroll doesn't scroll correctly
2372         https://bugs.webkit.org/show_bug.cgi?id=132375
2373
2374         Reviewed by Tim Horton.
2375         
2376         We set the size of the scrolling layer (which becomes the bounds of
2377         the UIScrollView) to a non-pixel-snapped padding box size, but the
2378         size of the contents layer is an integral-snapped scroll size.
2379         This would result in a fractional difference between the two, which
2380         makes us thing that the element is scrollable when it really is not.
2381         
2382         Fix by setting the size of the scroll layer to pixel snapped client size,
2383         which is what we also use for scrollability computation.
2384         
2385         Added some FIXMEs in code that requires pixel snapping.
2386         
2387         Also use #if PLATFORM(IOS)/#else to bracket some code that never runs on iOS
2388         but tries to do something similar to iOS-only code.
2389
2390         * rendering/RenderLayerBacking.cpp:
2391         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2392
2393 2014-04-30  David Hyatt  <hyatt@apple.com>
2394
2395         REGRESSION (r168046): [New Multicolumn] Painting order is wrong for columns and fixed positioned elements
2396         https://bugs.webkit.org/show_bug.cgi?id=132377
2397
2398         Reviewed by Simon Fraser.
2399
2400         Added fast/multicol/fixed-stack.html
2401
2402         * rendering/RenderLayer.cpp:
2403         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
2404         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
2405         Change the flow thread layer for multicolumn layout to be normal flow only and to
2406         stay self-painting. This has the effect of keeping the flow thread layer grouped
2407         with the enclosing multicolumn layer, and this keeps the paint order correct when
2408         compositing kicks in (or when something would otherwise try to get between the
2409         two layers).
2410
2411 2014-04-30  Eric Carlson  <eric.carlson@apple.com>
2412
2413         [iOS] do not pause video when entering background while playing to external device
2414         https://bugs.webkit.org/show_bug.cgi?id=132374
2415
2416         Reviewed by Jer Noble.
2417
2418         * WebCore.exp.in: Update beginInterruption signature.
2419
2420         * html/HTMLMediaElement.cpp:
2421         (WebCore::HTMLMediaElement::canOverrideBackgroundPlaybackRestriction): New, return true when
2422             playing to external device.
2423         * html/HTMLMediaElement.h:
2424
2425         * platform/audio/MediaSession.cpp:
2426         (WebCore::MediaSession::beginInterruption): Add interruption type to beginInterruption.
2427         * platform/audio/MediaSession.h:
2428
2429         * platform/audio/MediaSessionManager.cpp:
2430         (WebCore::MediaSessionManager::beginInterruption): Ditto.
2431         (WebCore::MediaSessionManager::applicationWillEnterBackground): Ditto.
2432         (WebCore::MediaSessionManager::systemWillSleep): Ditto.
2433         * platform/audio/MediaSessionManager.h:
2434
2435         * platform/audio/ios/AudioDestinationIOS.h:
2436         * platform/audio/ios/MediaSessionManagerIOS.mm:
2437         (-[WebMediaSessionHelper interruption:]): Ditto.
2438
2439         * platform/audio/mac/AudioDestinationMac.h: Make most methods private. Add 
2440             canOverrideBackgroundPlaybackRestriction. Add missing overrides.
2441         * testing/Internals.cpp:
2442         (WebCore::Internals::beginMediaSessionInterruption): Pass interruption type.
2443
2444 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
2445
2446         Unreviewed, rolling out r167879 and r167942.
2447         https://bugs.webkit.org/show_bug.cgi?id=132408
2448
2449         OrderIterator changes caused regressions in flexbox (Requested
2450         by rego on #webkit).
2451
2452         We're keeping the new layout test introduced in r167942
2453         (fast/flexbox/order-iterator-crash.html) to avoid similar
2454         regressions in the future.
2455
2456         Reverted changesets:
2457
2458         "OrderIterator refactoring to avoid extra loops"
2459         https://bugs.webkit.org/show_bug.cgi?id=119061
2460         http://trac.webkit.org/changeset/167879
2461
2462         "REGRESSION (r167879): Heap-use-after-free in
2463         WebCore::RenderFlexibleBox"
2464         https://bugs.webkit.org/show_bug.cgi?id=132337
2465         http://trac.webkit.org/changeset/167942
2466
2467 2014-04-30  Enrica Casucci  <enrica@apple.com>
2468
2469         Cursor gets thinner on empty lines.
2470         https://bugs.webkit.org/show_bug.cgi?id=132411
2471         <rdar://problem/15994556>
2472
2473         Reviewed by Benjamin Poulain.
2474
2475         RenderLineBreak::localCaretRect should not define
2476         locally the constant caretWidth, but use the one from
2477         RenderObject.h which knows about the differences between
2478         iOS and the other platforms.
2479
2480         * rendering/RenderLineBreak.cpp:
2481         (WebCore::RenderLineBreak::localCaretRect):
2482
2483 2014-04-30  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2484
2485         [GStreamer] Use GstMetaVideo
2486         https://bugs.webkit.org/show_bug.cgi?id=132247
2487
2488         Reviewed by Philippe Normand.
2489
2490         In WebKitVideoSink we announce the usage of GstMetaVideo, but we do
2491         not use it when handling the video frames. This might break
2492         some decoders and filters that rely on buffer's meta, rather
2493         that in the caps structures.
2494
2495         This patch enables the use of GstMetaVideo through the GstVideoFrame
2496         API. And it is used everywhere the buffer mapping is required.
2497
2498         Also this patch changes to nullptr where zeros were used.
2499
2500         Also, compile conditionally the video buffer conversion when it is
2501         ARGB/BGRA, since it is only required for the Cairo backend.
2502
2503         No new tests, already covered by current tests.
2504
2505         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2506         (WebCore::getVideoSizeAndFormatFromCaps): init the GstVideoInfo before
2507         used and remove caps fixate check since it is done by
2508         gst_video_info_from_caps().
2509         * platform/graphics/gstreamer/ImageGStreamer.h:
2510         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
2511         (ImageGStreamer::ImageGStreamer): use GstVideoFrame for buffer mapping
2512         and unmapping.
2513         (ImageGStreamer::~ImageGStreamer): ditto.
2514         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2515         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): ditto.
2516         (WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
2517         return nullptr if failed.
2518         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2519         (webkitVideoSinkRender): rely on GstVideoInfo rather than on the
2520         caps. Use GstVideoFrame for buffer mapping and unmapping. Add guards
2521         for buffer transformation, since it's only used by Cairo.
2522         (webkitVideoSinkDispose): remove glib version guards.
2523         (webkitVideoSinkSetCaps): update the value of the private
2524         GstVideoInfo.
2525
2526 2014-04-30  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2527
2528         [GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
2529         https://bugs.webkit.org/show_bug.cgi?id=132390
2530
2531         Reviewed by Philippe Normand.
2532
2533         Since EFL port use GLib 2.38 and GTK+, 2.33.2, I assume it is OK
2534         remove, in GTK+ and GST, the existing glib version guards.
2535
2536         No new tests, already covered by current tests.
2537
2538         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2539         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2540         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2541         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2542         (webkitVideoSinkDispose):
2543         (webkitVideoSinkFinalize): Deleted.
2544
2545 2014-04-30  Alex Christensen  <achristensen@webkit.org>
2546
2547         Updated ANGLE.
2548         https://bugs.webkit.org/show_bug.cgi?id=132367
2549         <rdar://problem/16211451>
2550
2551         Reviewed by Dean Jackson.
2552
2553         * CMakeLists.txt
2554         Fixed ANGLE compiling with the update.
2555         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2556         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2557         Removed SH_MAP_LONG_VARIABLE_NAMES which is no longer defined in ANGLE.
2558         See https://chromium.googlesource.com/angle/angle/+/3cdfcce86b38ef31a0afd71855887193a7924468
2559         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2560         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2561         Updated type names from ANGLE.
2562
2563 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
2564
2565         Move Blob.slice() implementation into BlobRegistryImpl
2566         https://bugs.webkit.org/show_bug.cgi?id=132402
2567
2568         Reviewed by Anders Carlsson.
2569
2570         Part or centralizing the responsibility for file size tracking.
2571
2572         * fileapi/Blob.cpp:
2573         (WebCore::Blob::Blob):
2574         (WebCore::Blob::slice): Deleted.
2575         * fileapi/Blob.h:
2576         (WebCore::Blob::slice):
2577         * fileapi/ThreadableBlobRegistry.cpp:
2578         (WebCore::ThreadableBlobRegistry::registerBlobURL):
2579         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
2580         (WebCore::registerBlobURLTask): Deleted.
2581         (WebCore::registerBlobURLFromTask): Deleted.
2582         * fileapi/ThreadableBlobRegistry.h:
2583         * platform/network/BlobRegistry.h:
2584         * platform/network/BlobRegistryImpl.cpp:
2585         (WebCore::BlobRegistryImpl::appendStorageItems):
2586         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
2587         (WebCore::BlobRegistryImpl::blobSize):
2588         * platform/network/BlobRegistryImpl.h:
2589
2590 2014-04-30  Brent Fulgham  <bfulgham@apple.com>
2591
2592         Unreviewed build fix after r168041.
2593
2594         * WebCore.exp.in: Add missing iOS exports.
2595
2596 2014-04-30  Beth Dakin  <bdakin@apple.com>
2597
2598         Always-visible scrollbars continuously repaint after non-momentum scrollling
2599         https://bugs.webkit.org/show_bug.cgi?id=132403
2600         -and corresponding-
2601         <rdar://problem/16553878>
2602
2603         Reviewed by Simon Fraser.
2604
2605         No longer universally opt into presentation value mode whenever the scroll 
2606         position changes on the scrolling thread. We really only want it for momentum 
2607         scrolls, and this will ensure that we always set it to NO once we have set it to 
2608         YES.
2609         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2610         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
2611         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2612
2613         Expose shouldUsePresentationValue.
2614         * platform/mac/NSScrollerImpDetails.h:
2615
2616 2014-04-30  Anders Carlsson  <andersca@apple.com>
2617
2618         Move the legacy WebKit API into WebKitLegacy.framework and move it inside WebKit.framework
2619         https://bugs.webkit.org/show_bug.cgi?id=132399
2620         <rdar://problem/15920046>
2621
2622         Reviewed by Dan Bernstein.
2623
2624         Allow WebKitLegacy to link against WebCore.
2625
2626         * Configurations/WebCore.xcconfig:
2627
2628 2014-04-30  David Hyatt  <hyatt@apple.com>
2629
2630         [New Multicolumn] ASSERTs in fast/dynamic/continuation-detach-crash.html
2631         https://bugs.webkit.org/show_bug.cgi?id=132392
2632
2633         Reviewed by Dean Jackson.
2634
2635         * rendering/RenderFlowThread.cpp:
2636         (WebCore::RenderFlowThread::setRegionRangeForBox):
2637         Add ASSERTs in case we ever try to set regions from the wrong flow thread
2638         as part of the box's region range.
2639
2640         * rendering/RenderMultiColumnFlowThread.cpp:
2641         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
2642         Add a bunch of code that handles the discovery of a span from an outer flow thread
2643         being inserted into an inner flow thread. This forces us to delete that placeholder
2644         and shift the outer spanning content into the inner flow thread in order to get a new
2645         mapping/placeholder created in the inner flow thread.
2646
2647         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
2648         Tighten this code to use the parent() just in case we change the invariant of
2649         parent = containingBlock later.
2650
2651         * rendering/RenderMultiColumnFlowThread.h:
2652         Add a static guard when shifting a spanner to prevent the outer flow thread from
2653         thinking the spanner belongs to it when it gets punted out of the inner flow thread.
2654         A better long-term solution might be to make the spanner map global instead of
2655         per-flow thread.
2656
2657         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
2658         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
2659         * rendering/RenderMultiColumnSpannerPlaceholder.h:
2660         Cache the flow thread so that we can get back to it in order to detect if the
2661         placeholder belongs to us or not.
2662
2663         * rendering/RenderObject.cpp:
2664         (WebCore::RenderObject::insertedIntoTree):
2665         Notifications from insertedIntoTree are problematic, since this can be called during
2666         the layout of the outer flow thread for content inside an inner flow thread that is
2667         not getting a layout yet. This makes the currentFlowThread in the flow thread controller
2668         inaccurate, so we have to add code to clear it out and put it back.
2669
2670 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
2671
2672         AX: Make "contenteditable" regions into AXTextAreas
2673         https://bugs.webkit.org/show_bug.cgi?id=132379
2674
2675         Reviewed by Mario Sanchez Prada.
2676
2677         Make contenteditable regions into AXTextAreas. This will allow for a more standardized
2678         interface for interaction with assistive technologies.
2679
2680         Test: accessibility/content-editable-as-textarea.html
2681
2682         * accessibility/AccessibilityNodeObject.cpp:
2683         (WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet):
2684         * accessibility/AccessibilityObject.cpp:
2685         (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
2686         * accessibility/AccessibilityObject.h:
2687         * accessibility/AccessibilityRenderObject.cpp:
2688         (WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange):
2689         (WebCore::AccessibilityRenderObject::selectedText):
2690         (WebCore::AccessibilityRenderObject::selectedTextRange):
2691         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
2692         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2693         (WebCore::AccessibilityRenderObject::ariaSelectedTextRange): Deleted.
2694         * accessibility/AccessibilityRenderObject.h:
2695
2696 2014-04-30  Brian J. Burg  <burg@cs.washington.edu>
2697
2698         Clean up unnecessary methods in the BackForwardClient interface
2699         https://bugs.webkit.org/show_bug.cgi?id=131637
2700
2701         Reviewed by Andreas Kling.
2702
2703         Demote back/current/forwardItem and iOS-specific methods from the
2704         BackForwardClient interface. Convert the class to not be refcounted.
2705
2706         No new tests, no behavior was changed.
2707
2708         * WebCore.exp.in:
2709         * history/BackForwardClient.h:
2710         (WebCore::BackForwardClient::~BackForwardClient): Deleted.
2711         (WebCore::BackForwardClient::backItem): Deleted.
2712         (WebCore::BackForwardClient::currentItem): Deleted.
2713         (WebCore::BackForwardClient::forwardItem): Deleted.
2714         * history/BackForwardController.cpp:
2715         (WebCore::BackForwardController::BackForwardController):
2716         * history/BackForwardController.h: Take ownership of the passed BackForwardClient.
2717         (WebCore::BackForwardController::client): Return a reference.
2718         * history/BackForwardList.h: Remove the Page field, since it isn't used any more.
2719         (WebCore::BackForwardList::create): Deleted.
2720         * page/Page.h: Remove RefPtr from PageClient.
2721         * page/Page.cpp:
2722         (WebCore::PageClients::PageClients): Initialize client to nullptr.
2723
2724 2014-04-30  Brent Fulgham  <bfulgham@apple.com>
2725
2726         [Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
2727         https://bugs.webkit.org/show_bug.cgi?id=132320
2728
2729         Reviewed by Eric Carlson.
2730
2731         * Modules/mediacontrols/mediaControlsApple.css:
2732         (video::-webkit-media-text-track-container .hidden): Added.
2733         * html/HTMLMediaElement.cpp:
2734         (WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
2735         new 'updateCaptionsContainer'.
2736         (WebCore::HTMLMediaElement::updateCaptionContainer): Added.
2737         * html/HTMLMediaElement.h:
2738
2739 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
2740
2741         https://bugs.webkit.org/show_bug.cgi?id=132363
2742         Make Blob RawData immutable
2743
2744         Reviewed by Anders Carlsson.
2745
2746         * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData):
2747         Create RawData in one step.
2748
2749         * WebCore.exp.in: Don't export a constructor that we no longer have (and the new one is inline).
2750
2751         * fileapi/Blob.cpp: Removed entirely dead code.
2752
2753         * fileapi/WebKitBlobBuilder.cpp:
2754         * fileapi/WebKitBlobBuilder.h:
2755         Updated to collect data in a plain Vector, so that we don't have to modify RawData.
2756         Removed FIXMEs about renaming - there used to be a BlobBuilder exposed to JS, but
2757         now this is just a helper to implement JS Blob constructor. We should probably
2758         still rename it, but not how the FIXME suggested.
2759
2760         * platform/network/BlobData.cpp:
2761         (WebCore::BlobDataItem::detachFromCurrentThread): RawData::detachFromCurrentThread()
2762         was a no-op.
2763         (WebCore::BlobDataHandle::BlobDataHandle): Deleted. This was entirely dead code.
2764         (WebCore::BlobDataHandle::~BlobDataHandle): Ditto.
2765
2766         * platform/network/BlobData.h: Made RawData immutable.
2767
2768         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob):
2769         Create RawData in one step.
2770
2771 2014-04-30  David Hyatt  <hyatt@apple.com>
2772
2773         [New Multicolumn] Region offset not factored in when mapping to local coords
2774         https://bugs.webkit.org/show_bug.cgi?id=132383
2775
2776         Reviewed by Anders Carlsson.
2777
2778         Make sure to cache the offset of the multicolumn set from its parent and then
2779         add that in to the translation offset.
2780
2781         * rendering/RenderMultiColumnFlowThread.cpp:
2782         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
2783
2784 2014-04-30  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
2785
2786         Move removeEquivalentProperties functions to EditingStyle
2787         https://bugs.webkit.org/show_bug.cgi?id=131093
2788
2789         Reviewed by Csaba Osztrogonác.
2790
2791         A follow-up to r167967. Use single line declaration for template methods.
2792
2793         * editing/EditingStyle.h:
2794
2795 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
2796
2797         [CSS Grid Layout] Enable runtime feature by default
2798         https://bugs.webkit.org/show_bug.cgi?id=132189
2799
2800         Reviewed by Benjamin Poulain.
2801
2802         * page/Settings.in: Set cssGridLayoutEnabled to true.
2803
2804 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
2805
2806         [CSS Grid Layout] Wrap some specific grid code under compilation flag
2807         https://bugs.webkit.org/show_bug.cgi?id=132341
2808
2809         Reviewed by Benjamin Poulain.
2810
2811         Some static variables in RenderBox are only used for CSS Grid Layout code. Wrap them and the related methods
2812         under ENABLE_CSS_GRID_LAYOUT compilation flag.
2813
2814         * rendering/RenderBox.cpp:
2815         (WebCore::RenderBox::willBeDestroyed):
2816         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
2817         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
2818         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2819         (WebCore::RenderBox::computePercentageLogicalHeight):
2820         * rendering/RenderBox.h:
2821
2822 2014-04-29  Commit Queue  <commit-queue@webkit.org>
2823
2824         Unreviewed, rolling out r167962 and r167975.
2825         https://bugs.webkit.org/show_bug.cgi?id=132376
2826
2827         Mysteriously broke many tests (Requested by ap on #webkit).
2828
2829         Reverted changesets:
2830
2831         "[Mac, iOS] Support caption activation via JS
2832         webkitHasClosedCaptions method"
2833         https://bugs.webkit.org/show_bug.cgi?id=132320
2834         http://trac.webkit.org/changeset/167962
2835
2836         "Unreviewed test fix after r167962."
2837         http://trac.webkit.org/changeset/167975
2838
2839 2014-04-29  David Hyatt  <hyatt@apple.com>
2840
2841         [New Multicolumn] Multiple tests assert in RenderGeometryMap
2842         https://bugs.webkit.org/show_bug.cgi?id=132285
2843
2844         Reviewed by Simon Fraser.
2845
2846         Implement offsetFromContainer for RenderMultiColumnFlowThread so that the
2847         geometry map gets the right offsets. This is really only relevant for the 
2848         geometry map, since I already overrode mapAbsoluteToLocalPoint and multicolumn
2849         flow threads are repaint containers (so mapLocalToAbsolute never needs offsetFromContainer).
2850
2851         * rendering/RenderMultiColumnFlowThread.cpp:
2852         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
2853         * rendering/RenderMultiColumnFlowThread.h:
2854
2855 2014-04-29  Benjamin Poulain  <bpoulain@apple.com>
2856
2857         [iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely messed up
2858         https://bugs.webkit.org/show_bug.cgi?id=132368
2859
2860         Reviewed by Simon Fraser.
2861
2862         * platform/graphics/ca/mac/TileController.mm:
2863         (WebCore::TileController::TileController):
2864         The initial device scale factor was initialized to 1. We were returning the wrong zoomedOutContentsScale() and
2865         contentsScale() on retina devices until the next successful scale update.
2866
2867 2014-04-29  Alexey Proskuryakov  <ap@apple.com>
2868
2869         Remove an unused override of BlobRegistryImpl::appendStorageItems
2870         https://bugs.webkit.org/show_bug.cgi?id=132365
2871
2872         Reviewed by Andreas Kling.
2873
2874         * platform/network/BlobRegistryImpl.cpp:
2875         (WebCore::BlobRegistryImpl::appendStorageItems): Deleted.
2876         * platform/network/BlobRegistryImpl.h:
2877
2878 2014-04-29  Eric Carlson  <eric.carlson@apple.com>
2879
2880         [Mac] tag the video layers with descriptive name to aid debugging
2881         https://bugs.webkit.org/show_bug.cgi?id=132371
2882
2883         Reviewed by Darin Adler.
2884
2885         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2886         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Set the AVPlayerLayer
2887             name in a debug build.
2888
2889 2014-04-29  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
2890
2891         [GTK][cmake] CMake variable (non)expansion causing 'File name too long' build error.
2892         https://bugs.webkit.org/show_bug.cgi?id=132244
2893
2894         Reviewed by Martin Robinson.
2895
2896         Removing quotes around include directory variable ${WebCore_INCLUDE_DIRECTORIES} in
2897         the include_directories cmake macro enables the variable to be expanded correctly.
2898
2899         No tests created as this fixes a platform specific build issue.
2900
2901         * PlatformGTK.cmake:
2902
2903 2014-04-29  Brent Fulgham  <bfulgham@apple.com>
2904
2905         Unreviewed test fix after r167962.
2906         * Modules/mediacontrols/mediaControlsApple.css:
2907         (.hidden): Use common '.hidden' class for controls.
2908         (video::-webkit-media-text-track-container .hidden): Deleted.
2909
2910 2014-04-29  Brady Eidson  <beidson@apple.com>
2911
2912         Handle selection services menu.
2913         <rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
2914
2915         Reviewed by Tim Horton.
2916
2917         * WebCore.exp.in:
2918
2919 2014-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
2920
2921         Removing unused argument in InlineFlowBox::placeBoxesInInlineDirection()
2922         https://bugs.webkit.org/show_bug.cgi?id=132369
2923
2924         Reviewed by Darin Adler.
2925
2926         This was not caught by our compiler because placeBoxesInInlineDirection()
2927         is mutually-recursive with placeBoxRangeInInlineDirection().
2928
2929         No new tests are necessary because there should be no behavior change.
2930
2931         * rendering/InlineFlowBox.cpp:
2932         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
2933         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2934         * rendering/InlineFlowBox.h:
2935         * rendering/RenderBlockLineLayout.cpp:
2936         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
2937
2938 2014-04-29  Alex Christensen  <achristensen@webkit.org>
2939
2940         [WinCairo] Switch video from GStreamer to Media Foundation.
2941         https://bugs.webkit.org/show_bug.cgi?id=132358
2942
2943         Reviewed by Brent Fulgham.
2944
2945         * WebCore.vcxproj/WebCore.vcxproj:
2946         Removed dependencies on GStreamer.
2947
2948 2014-04-29  Simon Fraser  <simon.fraser@apple.com>
2949
2950         Remove some PLATFORM(IOS) #ifdefs related to hasAcceleratedTouchScrolling()
2951         https://bugs.webkit.org/show_bug.cgi?id=132353
2952
2953         Reviewed by Tim Horton & Darin Adler.
2954
2955         Minor cleanup and refactoring to remove #idefs.
2956
2957         * rendering/RenderLayer.cpp:
2958         (WebCore::RenderLayer::scrollTo): No need for this #ifdef, usesCompositedScrolling()
2959         gives the right answser already.
2960         (WebCore::RenderLayer::visibleContentRectInternal): Use showsOverflowControls() to
2961         avoid #ifdef.
2962         (WebCore::RenderLayer::invalidateScrollbarRect): Ditto.
2963         (WebCore::RenderLayer::invalidateScrollCornerRect): Ditto.
2964         (WebCore::RenderLayer::verticalScrollbarWidth): Ditto.
2965         (WebCore::RenderLayer::horizontalScrollbarHeight): Ditto.
2966         (WebCore::RenderLayer::showsOverflowControls): Return false on iOS.
2967         (WebCore::RenderLayer::paintOverflowControls): Ditto.
2968         (WebCore::RenderLayer::calculateClipRects): Ditto.
2969         * rendering/RenderLayer.h:
2970         * rendering/RenderLayerBacking.cpp:
2971         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
2972         Just #ifdef in side of this function rather than having two similar functions.
2973         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
2974         (WebCore::hasNonZeroTransformOrigin):
2975         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Use a local bool
2976         to reduce #ifdefs.
2977         (WebCore::layerOrAncestorIsTransformedOrScrolling): Deleted.
2978
2979 2014-04-29  Simon Fraser  <simon.fraser@apple.com>
2980
2981         Remove Settings::compositedScrollingForFramesEnabled
2982         https://bugs.webkit.org/show_bug.cgi?id=132352
2983
2984         Reviewed by Andreas Kling.
2985
2986         The usesCompositedScrolling setting was only used by Chromium, so
2987         remove it and associated code.
2988
2989         * page/FrameView.cpp:
2990         (WebCore::FrameView::usesCompositedScrolling): Deleted.
2991         * page/FrameView.h:
2992         * page/Settings.in:
2993         * rendering/RenderLayerCompositor.cpp:
2994         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
2995
2996 2014-04-29  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
2997
2998         Move removeEquivalentProperties functions to EditingStyle
2999         https://bugs.webkit.org/show_bug.cgi?id=131093
3000
3001         Reviewed by Darin Adler.
3002
3003         Moved the removeEquivalentProperties functions
3004         from StyleProperties to EditingStyle class.
3005
3006         * css/StyleProperties.cpp:
3007         (WebCore::MutableStyleProperties::removeEquivalentProperties): Deleted.
3008         * css/StyleProperties.h:
3009         * editing/EditingStyle.cpp:
3010         (WebCore::EditingStyle::removeStyleAddedByNode):
3011         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
3012         (WebCore::EditingStyle::prepareToApplyAt):
3013         (WebCore::EditingStyle::removeEquivalentProperties):
3014         (WebCore::extractPropertiesNotIn):
3015         * editing/EditingStyle.h:
3016
3017 2014-04-29  David Hyatt  <hyatt@apple.com>
3018
3019         [New Multicolumn] Implement support for compositing
3020         https://bugs.webkit.org/show_bug.cgi?id=132298
3021
3022         Reviewed by Simon Fraser.
3023
3024         * rendering/RenderLayer.cpp:
3025         (WebCore::accumulateOffsetTowardsAncestor):
3026         Add in a case for the new columns that calls into the multi-column flow thread
3027         to get an offset to adjust by.
3028
3029         * rendering/RenderLayerBacking.cpp:
3030         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
3031         Make sure this code only runs for named flow threads.
3032
3033         * rendering/RenderLayerCompositor.cpp:
3034         (WebCore::RenderLayerCompositor::canBeComposited):
3035         Turn on compositing support for in-flow RenderFlowThreads instead of always returning
3036         false
3037
3038         * rendering/RenderMultiColumnFlowThread.cpp:
3039         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
3040         Changed this function to fix a couple of bugs exposed by compositing/columns tests. Its
3041         end goal is the same, but the approach is improved.
3042
3043         * rendering/RenderMultiColumnSet.cpp:
3044         (WebCore::RenderMultiColumnSet::endFlow):
3045         Don't pad out to a multiple of column height. You can't flip around a flow thread
3046         to get back to accurate physical coordinates if bogus padding is introduced. This
3047         seemed to have no effect on any layout tests when removed, so I don't think it 
3048         was really serving any useful purpose.
3049
3050         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
3051         Don't factor in the overall flow thread portion, since this is handled by the callers
3052         now.
3053
3054         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
3055         * rendering/RenderMultiColumnSet.h:
3056         Change this function to be ASSERT_NOT_REACHED(), since we want to know if someone calls
3057         it. It only runs for named flow thread compositing code, so it would be a mistake if
3058         this ever gets invoked.
3059
3060 2014-04-29  Mark Hahnenberg  <mhahnenberg@apple.com>
3061
3062         JSProxies should be cacheable
3063         https://bugs.webkit.org/show_bug.cgi?id=132351
3064
3065         Reviewed by Geoffrey Garen.
3066
3067         No new tests.
3068
3069         Whenever we encounter a proxy in an inline cache we should try to cache on the 
3070         proxy's target instead of giving up.
3071
3072         This patch adds support for a simple "recursive" inline cache if the base object
3073         we're accessing is a pure forwarding proxy. JSGlobalObject and its subclasses 
3074         are the only ones to benefit from this right now.
3075
3076         This is performance neutral on the benchmarks we track. Currently we won't
3077         cache on JSDOMWindow due to HasImpureGetOwnPropertySlot, but this issue will be fixed soon.
3078
3079         * bindings/js/JSDOMWindowShell.h:
3080         (WebCore::JSDOMWindowShell::createStructure):
3081
3082 2014-04-29  Brent Fulgham  <bfulgham@apple.com>
3083
3084         [Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
3085         https://bugs.webkit.org/show_bug.cgi?id=132320
3086
3087         Reviewed by Eric Carlson.
3088
3089         * Modules/mediacontrols/mediaControlsApple.css:
3090         (video::-webkit-media-text-track-container .hidden): Added.
3091         * html/HTMLMediaElement.cpp:
3092         (WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
3093         new 'updateCaptionsContainer'.
3094         (WebCore::HTMLMediaElement::updateCaptionContainer): Added.
3095         * html/HTMLMediaElement.h:
3096         * html/shadow/MediaControlElements.cpp:
3097         (WebCore::MediaControlTextTrackContainerElement::hide): Use CSS class .hidden instead of
3098         hard-coded "display:none".
3099         (WebCore::MediaControlTextTrackContainerElement::show): Ditto.
3100         * html/shadow/MediaControlElements.h:
3101
3102 2014-04-28  Roger Fong  <roger_fong@apple.com>
3103
3104         Plugins hidden by images should autoplay.
3105         https://bugs.webkit.org/show_bug.cgi?id=132222.
3106         <rdar://problem/16653536>
3107
3108         Reviewed by Jon Lee and Darin Adler.
3109
3110         * WebCore.exp.in: Add exports needed by WK2.
3111
3112 2014-04-29  Filip Pizlo  <fpizlo@apple.com>
3113
3114         Use LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
3115         https://bugs.webkit.org/show_bug.cgi?id=112840
3116
3117         Rubber stamped by Geoffrey Garen.
3118
3119         It already has a lot of tests.
3120
3121         * Configurations/FeatureDefines.xcconfig:
3122
3123 2014-04-29  Brady Eidson  <beidson@apple.com>
3124
3125         Change Image Controls replacement to use selection and paste
3126         <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
3127
3128         Reviewed by Tim Horton.
3129
3130         * WebCore.exp.in: Remove deleted symbol.
3131
3132         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
3133         (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
3134
3135         * page/ContextMenuController.cpp:
3136         (WebCore::ContextMenuController::showImageControlsMenu): Select the image element
3137           before showing the menu.
3138         (WebCore::ContextMenuController::replaceControlledImage): Deleted.
3139         * page/ContextMenuController.h:
3140
3141 2014-04-29  Jer Noble  <jer.noble@apple.com>
3142
3143         [iOS] Remove workaround for <rdar://problem/16578727>.
3144         https://bugs.webkit.org/show_bug.cgi?id=132338
3145
3146         Reviewed by Darin Adler.
3147
3148         Now that <rdar://problem/16578727> is fixed, remove the workaround by replacing the
3149         call to -_updatePlaybackControlsViewController with one to -layoutIfNeeded.
3150
3151         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3152         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
3153
3154 2014-04-29  Zan Dobersek  <zdobersek@igalia.com>
3155
3156         ScriptExecutionContext::Task should work well with C++11 lambdas
3157         https://bugs.webkit.org/show_bug.cgi?id=129795
3158
3159         Reviewed by Darin Adler.
3160
3161         Instead of having classes that subclass ScriptExecutionContext::Task and override
3162         the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
3163         take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
3164         which would contain the code currently kept in the performTask() methods.
3165
3166         This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
3167         cleanup tasks, the Task object can be implicitly constructed by using the initializer list
3168         constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
3169         The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
3170         object in the std::function wrapper, along with a boolean member that indicates whether the
3171         task is of cleanup nature.
3172
3173         * Modules/quota/StorageErrorCallback.cpp:
3174         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
3175         (WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
3176         * Modules/quota/StorageErrorCallback.h:
3177         (WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
3178         * Modules/webdatabase/Database.cpp:
3179         (WebCore::Database::~Database):
3180         (WebCore::Database::runTransaction):
3181         (WebCore::Database::scheduleTransactionCallback):
3182         (WebCore::DerefContextTask::create): Deleted.
3183         (WebCore::DerefContextTask::performTask): Deleted.
3184         (WebCore::DerefContextTask::isCleanupTask): Deleted.
3185         (WebCore::DerefContextTask::DerefContextTask): Deleted.
3186         (WebCore::callTransactionErrorCallback): Deleted.
3187         (WebCore::DeliverPendingCallbackTask::create): Deleted.
3188         (WebCore::DeliverPendingCallbackTask::performTask): Deleted.
3189         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
3190         * Modules/webdatabase/DatabaseManager.cpp:
3191         (WebCore::DatabaseManager::openDatabase):
3192         (WebCore::DatabaseCreationCallbackTask::create): Deleted.
3193         (WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
3194         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
3195         * Modules/webdatabase/DatabaseSync.cpp:
3196         (WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
3197         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
3198         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
3199         * Modules/webdatabase/SQLCallbackWrapper.h:
3200         (WebCore::SQLCallbackWrapper::clear):
3201         (WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
3202         (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
3203         (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
3204         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
3205         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3206         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
3207         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
3208         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3209         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
3210         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3211         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3212         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
3213         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
3214         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3215         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3216         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
3217         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
3218         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
3219         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
3220         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
3221         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
3222         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3223         * bindings/js/JSCallbackData.h:
3224         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
3225         (WebCore::DeleteCallbackDataTask::create): Deleted.
3226         (WebCore::DeleteCallbackDataTask::performTask): Deleted.
3227         (WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
3228         * bindings/js/JSDOMGlobalObjectTask.cpp:
3229         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
3230         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
3231         (WebCore::JSGlobalObjectTask::performTask): Deleted.
3232         * bindings/js/JSDOMGlobalObjectTask.h:
3233         * bindings/js/JSDOMWindowBase.cpp:
3234         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
3235         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3236         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
3237         * bindings/scripts/CodeGeneratorJS.pm:
3238         * bindings/scripts/test/JS/JSTestCallback.cpp:
3239         (WebCore::JSTestCallback::~JSTestCallback):
3240         (GenerateCallbackImplementation):
3241         * dom/CrossThreadTask.h:
3242         (WebCore::CrossThreadTask1::performTask):
3243         (WebCore::CrossThreadTask2::performTask):
3244         (WebCore::CrossThreadTask3::performTask):
3245         (WebCore::CrossThreadTask4::performTask):
3246         (WebCore::CrossThreadTask5::performTask):
3247         (WebCore::CrossThreadTask6::performTask):
3248         (WebCore::CrossThreadTask7::performTask):
3249         (WebCore::CrossThreadTask8::performTask):
3250         (WebCore::createCallbackTask):
3251         (WebCore::CrossThreadTask1::create): Deleted.
3252         (WebCore::CrossThreadTask2::create): Deleted.
3253         (WebCore::CrossThreadTask3::create): Deleted.
3254         (WebCore::CrossThreadTask4::create): Deleted.
3255         (WebCore::CrossThreadTask5::create): Deleted.
3256         (WebCore::CrossThreadTask6::create): Deleted.
3257         (WebCore::CrossThreadTask7::create): Deleted.
3258         (WebCore::CrossThreadTask8::create): Deleted.
3259         * dom/Document.cpp:
3260         (WebCore::Document::addConsoleMessage):
3261         (WebCore::Document::addMessage):
3262         (WebCore::Document::postTask):
3263         (WebCore::Document::pendingTasksTimerFired):
3264         (WebCore::PerformTaskContext::PerformTaskContext): Deleted.
3265         (WebCore::Document::didReceiveTask): Deleted.
3266         * dom/Document.h:
3267         * dom/ScriptExecutionContext.cpp:
3268         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
3269         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
3270         (WebCore::ProcessMessagesSoonTask::create): Deleted.
3271         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
3272         (WebCore::ScriptExecutionContext::Task::~Task): Deleted.
3273         * dom/ScriptExecutionContext.h:
3274         (WebCore::ScriptExecutionContext::Task::Task):
3275         (WebCore::ScriptExecutionContext::Task::performTask):
3276         (WebCore::ScriptExecutionContext::Task::isCleanupTask):
3277         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
3278         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
3279         * dom/StringCallback.cpp:
3280         (WebCore::StringCallback::scheduleCallback):
3281         * loader/appcache/ApplicationCacheGroup.cpp:
3282         (WebCore::ApplicationCacheGroup::postListenerTask):
3283         (WebCore::CallCacheListenerTask::create): Deleted.
3284         (WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
3285         * workers/DefaultSharedWorkerRepository.cpp:
3286         (WebCore::SharedWorkerProxy::postTaskToLoader):
3287         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
3288         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
3289         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
3290         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
3291         (WebCore::SharedWorkerConnectTask::create): Deleted.
3292         (WebCore::SharedWorkerConnectTask::performTask): Deleted.
3293         * workers/WorkerEventQueue.cpp:
3294         (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
3295         (WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
3296         (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
3297         (WebCore::WorkerEventQueue::enqueueEvent):
3298         (WebCore::WorkerEventQueue::cancelEvent):
3299         (WebCore::WorkerEventQueue::close):
3300         * workers/WorkerEventQueue.h:
3301         * workers/WorkerGlobalScope.cpp:
3302         (WebCore::WorkerGlobalScope::close):
3303         (WebCore::WorkerGlobalScope::postTask):
3304         (WebCore::WorkerGlobalScope::addConsoleMessage):
3305         (WebCore::WorkerGlobalScope::addMessage):
3306         (WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
3307         (WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
3308         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
3309         * workers/WorkerGlobalScope.h:
3310         * workers/WorkerLoaderProxy.h:
3311         * workers/WorkerMessagingProxy.cpp:
3312         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
3313         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
3314         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
3315         (WebCore::WorkerMessagingProxy::postTaskToLoader):
3316         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
3317         (WebCore::WorkerMessagingProxy::workerThreadCreated):
3318         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
3319         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
3320         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
3321         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
3322         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
3323         (WebCore::WorkerMessagingProxy::reportPendingActivity):
3324         (WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
3325         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
3326         (WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
3327         (WebCore::MessageWorkerTask::create): Deleted.
3328         (WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
3329         (WebCore::MessageWorkerTask::performTask): Deleted.
3330         (WebCore::WorkerExceptionTask::create): Deleted.
3331         (WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
3332         (WebCore::WorkerExceptionTask::performTask): Deleted.
3333         (WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
3334         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
3335         (WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
3336         (WebCore::WorkerTerminateTask::create): Deleted.
3337         (WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
3338         (WebCore::WorkerTerminateTask::performTask): Deleted.
3339         (WebCore::WorkerThreadActivityReportTask::create): Deleted.
3340         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
3341         (WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
3342         (WebCore::PostMessageToPageInspectorTask::create): Deleted.
3343         (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
3344         (WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
3345         (WebCore::NotifyNetworkStateChangeTask::create): Deleted.
3346         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
3347         (WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
3348         * workers/WorkerMessagingProxy.h:
3349         * workers/WorkerRunLoop.cpp:
3350         (WebCore::WorkerRunLoop::postTask):
3351         (WebCore::WorkerRunLoop::postTaskAndTerminate):
3352         (WebCore::WorkerRunLoop::postTaskForMode):
3353         (WebCore::WorkerRunLoop::Task::create):
3354         (WebCore::WorkerRunLoop::Task::performTask):
3355         (WebCore::WorkerRunLoop::Task::Task):
3356         * workers/WorkerRunLoop.h:
3357         * workers/WorkerThread.cpp:
3358         (WebCore::WorkerThread::stop):
3359         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
3360         (WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
3361         (WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
3362         (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
3363         (WebCore::WorkerThreadShutdownStartTask::create): Deleted.
3364         (WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
3365         (WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.
3366
3367 2014-04-29  Manuel Rego Casasnovas  <rego@igalia.com>
3368
3369         REGRESSION (r167879): Heap-use-after-free in WebCore::RenderFlexibleBox
3370         https://bugs.webkit.org/show_bug.cgi?id=132337
3371
3372         Reviewed by Simon Fraser.
3373
3374         From Blink r154582 by <jchaffraix@chromium.org>
3375
3376         This is a regression from the changes in OrderIterator. The issue is
3377         that we don't invalidate our iterator when a child is removed. This
3378         means that we could hold onto free'd memory until the next layout
3379         when we will recompute the iterator.
3380
3381         The solution is simple: just clear the memory when we remove a child.
3382
3383         Note that RenderGrid is not impacted by this bug as we don't use the
3384         iterator outside layout yet, but if we do it at some point the very same
3385         problem will arise, so the same treatment was applied to the class.
3386
3387         Test: fast/flexbox/order-iterator-crash.html
3388
3389         * rendering/OrderIterator.cpp:
3390         (WebCore::OrderIterator::invalidate): Clear m_children Vector.
3391         * rendering/OrderIterator.h:
3392         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Use
3393         invalidate() method.
3394         * rendering/RenderFlexibleBox.cpp:
3395         (WebCore::RenderFlexibleBox::removeChild): Invalidate m_orderIterator.
3396         * rendering/RenderFlexibleBox.h: Add removeChild() signature.
3397         * rendering/RenderGrid.cpp: Invalidate m_orderIterator.
3398         (WebCore::RenderGrid::removeChild):
3399         * rendering/RenderGrid.h: Add removeChild() header.
3400
3401 2014-04-29  Enrica Casucci  <enrica@apple.com>
3402
3403         iOS build fix after http://trac.webkit.org/changeset/167937.
3404         Unreviewed.
3405
3406         * rendering/RenderThemeIOS.mm:
3407         (WebCore::RenderThemeIOS::adjustButtonStyle):
3408
3409 2014-04-29  Hans Muller  <hmuller@adobe.com>
3410
3411         [CSS Shapes] off-by-one error in Shape::createRasterShape()
3412         https://bugs.webkit.org/show_bug.cgi?id=132154
3413
3414         Reviewed by Bem Jones-Bey.
3415
3416         This is a port of a patch for a bug that was reported by and fixed in Blink by
3417         David Vest: https://codereview.chromium.org/237123002/.  Shape::createRasterShape()
3418         now consistently reports "end-point exclusive" intervals. Before the patch
3419         an entire row of pixels was above the shape-image-threshold, the interval's end
3420         index was reported as image.width. Now it's image.width + 1, which is consistent
3421         with the way the end index is reported if the last above threshold pixel is within
3422         an image row.
3423
3424         Two existing tests were revised to account for this change.
3425
3426         * rendering/shapes/RasterShape.cpp:
3427         (WebCore::RasterShape::getExcludedIntervals):
3428         * rendering/shapes/Shape.cpp:
3429         (WebCore::Shape::createRasterShape):
3430
3431 2014-04-29  Bem Jones-Bey  <bjonesbe@adobe.com>
3432
3433         Wrap CSS length conversion arguments in an object
3434         https://bugs.webkit.org/show_bug.cgi?id=131552
3435
3436         Reviewed by Andreas Kling.
3437
3438         This patch introduces a class CSSToLengthConversionData to wrap the
3439         data required to convert CSS lengths to Lengths. This simplifies the
3440         plumbing that goes on whenever we need to resolve CSS lengths and
3441         makes it easier to update the arguments needed for resolving these (in
3442         particular adding a RenderView for resolving viewport units at style
3443         recalc time; removing the computingFontSize bool also appears
3444         possible).
3445
3446         Note that the zoom argument, which was previously a float in some
3447         p