7a548246111c12177e59e431a2b0bb4815af4904
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-29  Joonghun Park  <jh718.park@samsung.com>
2
3         nullptr cleanup in RenderFooBox classes
4         https://bugs.webkit.org/show_bug.cgi?id=143182
5
6         Reviewed by Ryosuke Niwa.
7
8         No new tests, no behavior changes
9
10         Replace 0 with nullptr in RenderFooBox classes.
11
12         * rendering/RenderBox.cpp:
13         (WebCore::RenderBox::RenderBox):
14         (WebCore::RenderBox::paintFillLayer):
15         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
16         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
17         (WebCore::RenderBox::renderBoxRegionInfo):
18         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
19         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
20         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
21         (WebCore::RenderBox::positionForPoint):
22         (WebCore::RenderBox::layoutOverflowRectForPropagation):
23         * rendering/RenderBox.h:
24         (WebCore::RenderBox::setMarginBefore):
25         (WebCore::RenderBox::setMarginAfter):
26         (WebCore::RenderBox::setMarginStart):
27         (WebCore::RenderBox::setMarginEnd):
28         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
29         (WebCore::RenderBox::setInlineBoxWrapper):
30         * rendering/RenderBoxModelObject.cpp:
31         (WebCore::RenderBoxModelObject::willBeDestroyed):
32         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
33         (WebCore::RenderBoxModelObject::paintBorderSides):
34         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
35         * rendering/RenderBoxModelObject.h:
36         (WebCore::RenderBoxModelObject::moveChildTo):
37         (WebCore::RenderBoxModelObject::moveAllChildrenTo):
38         (WebCore::RenderBoxModelObject::moveChildrenTo):
39         * rendering/RenderDeprecatedFlexibleBox.cpp:
40         (WebCore::FlexBoxIterator::reset):
41         (WebCore::FlexBoxIterator::next):
42         * rendering/RenderDeprecatedFlexibleBox.h:
43         * rendering/RenderFlexibleBox.cpp:
44         (WebCore::RenderFlexibleBox::firstLineBaseline):
45         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
46         * rendering/RenderLineBoxList.cpp:
47         (WebCore::RenderLineBoxList::deleteLineBoxTree):
48         (WebCore::RenderLineBoxList::extractLineBox):
49         (WebCore::RenderLineBoxList::deleteLineBoxes):
50         (WebCore::RenderLineBoxList::checkConsistency):
51         * rendering/RenderLineBoxList.h:
52         (WebCore::RenderLineBoxList::RenderLineBoxList):
53         * rendering/RenderListBox.cpp:
54         (WebCore::RenderListBox::enclosingScrollableArea):
55         (WebCore::RenderListBox::setHasVerticalScrollbar):
56         * rendering/RenderListBox.h:
57
58 2015-03-29  Darin Adler  <darin@apple.com>
59
60         HTMLCollection caches incorrect length if item(0) is called before length on an empty collection
61         https://bugs.webkit.org/show_bug.cgi?id=143203
62         rdar://problem/18460462
63
64         Reviewed by Antti Koivisto.
65
66         Test: fast/dom/htmlcollection-length-after-item-2.html
67
68         * dom/CollectionIndexCache.h:
69         (CollectionIndexCache::nodeAt): If we hit the end looking for index 0, cache a length
70         of 0, not a length of 1.
71
72 2015-03-29  Darin Adler  <darin@apple.com>
73
74         Remove unneeded SVG code, including most isSupportedAttribute functions
75         https://bugs.webkit.org/show_bug.cgi?id=143194
76
77         Reviewed by Antti Koivisto.
78
79         - Removed most implementations of isSupportedAttribute. Others can be removed in
80           future patches. The ones left behind are now all private static member functions.
81           It's dangerous for them to be public because they tend to indicate which attributes
82           are supported at a particular level in the class hierarchy and they are not virtual
83           functions; might want to rethink the function name if we keep any of these long term.
84
85         - Removed unneeded includes, especially of Attr.h and Attribute.h.
86
87         - Changed most parseAttribute and svgAttributeChanged functions so they no longer
88           rely on checking attribute names against a set. Also removed lots of unneeded calls
89           to SVGLangSpace::parseAttribute, which is called by SVGElement::parseAttribute and
90           need not be called by derived classes.
91
92         - Removed return values from parseAttribute functions. Skipping other parseAttribute
93           logic is not an important optimization and makes functions needlessly complex.
94
95         - Moved use of InstanceInvalidationGuard closer to where they are needed. Eventually
96           we may be able to remove many of these.
97
98         - Used auto in a few places where the same type is repeated twice on the same line of
99           code, and auto makes it a bit smaller.
100
101         - Got rid of protected sections in some final classes; doesn't make sense to combine
102           these two. Also moved a few functions from protected to private in other classes.
103
104         - Made a number of functions into static member functions in the base classes such
105           as SVGLangSpace; they were not making any use of the object, and so it was wasteful
106           to compile them as non-static member functions.
107
108         * rendering/svg/RenderSVGImage.cpp: Removed unneeded includes.
109         * svg/SVGAElement.cpp: Removed unneeded includes.
110         (WebCore::SVGAElement::isSupportedAttribute): Deleted.
111         (WebCore::SVGAElement::parseAttribute): Don't use isSupportedAttribute.
112         (WebCore::SVGAElement::svgAttributeChanged): Don't use isSupportedAttribute.
113         * svg/SVGAElement.h: Removed isSupportedAttribute.
114         * svg/SVGAnimateMotionElement.cpp: Removed unneeded includes.
115         (WebCore::SVGAnimateMotionElement::isSupportedAttribute): Deleted.
116         (WebCore::SVGAnimateMotionElement::parseAttribute): Don't use isSupportedAttribute.
117         * svg/SVGAnimateMotionElement.h: Removed isSupportedAttribute.
118         * svg/SVGAnimateTransformElement.cpp:
119         (WebCore::SVGAnimateTransformElement::isSupportedAttribute): Deleted.
120         (WebCore::SVGAnimateTransformElement::parseAttribute): Don't use isSupportedAttribute.
121         * svg/SVGAnimateTransformElement.h: Removed isSupportedAttribute.
122         * svg/SVGAnimationElement.cpp:
123         (WebCore::SVGAnimationElement::parseAttribute): Don't use isSupportedAttribute.
124         * svg/SVGCircleElement.cpp:
125         (WebCore::SVGCircleElement::isSupportedAttribute): Deleted.
126         (WebCore::SVGCircleElement::parseAttribute): Don't use isSupportedAttribute.
127         (WebCore::SVGCircleElement::svgAttributeChanged): Don't use isSupportedAttribute.
128         * svg/SVGCircleElement.h: Removed isSupportedAttribute.
129         * svg/SVGClipPathElement.cpp: Removed unneeded includes.
130         (WebCore::SVGClipPathElement::parseAttribute): Don't use isSupportedAttribute.
131         * svg/SVGComponentTransferFunctionElement.cpp:
132         (WebCore::SVGComponentTransferFunctionElement::parseAttribute): Don't use isSupportedAttribute.
133         * svg/SVGCursorElement.cpp: Removed unneeded includes.
134         (WebCore::SVGCursorElement::parseAttribute): Don't use isSupportedAttribute.
135         (WebCore::SVGCursorElement::svgAttributeChanged): Don't use isSupportedAttribute.
136         * svg/SVGElement.cpp: Removed unneeded includes.
137         * svg/SVGEllipseElement.cpp: Removed unneeded includes.
138         (WebCore::SVGEllipseElement::isSupportedAttribute): Deleted.
139         (WebCore::SVGEllipseElement::parseAttribute): Don't use isSupportedAttribute.
140         (WebCore::SVGEllipseElement::svgAttributeChanged): Don't use isSupportedAttribute.
141         * svg/SVGEllipseElement.h: Removed isSupportedAttribute.
142         * svg/SVGExternalResourcesRequired.cpp: Removed unneeded includes.
143         (WebCore::SVGExternalResourcesRequired::parseAttribute): Don't return a boolean.
144         * svg/SVGExternalResourcesRequired.h: Don't return a boolean.
145         * svg/SVGFEBlendElement.cpp: Removed unneeded includes.
146         (WebCore::SVGFEBlendElement::isSupportedAttribute): Deleted.
147         (WebCore::SVGFEBlendElement::parseAttribute): Don't use isSupportedAttribute.
148         (WebCore::SVGFEBlendElement::svgAttributeChanged): Don't use isSupportedAttribute.
149         * svg/SVGFEBlendElement.h: Removed isSupportedAttribute.
150         * svg/SVGFEColorMatrixElement.cpp: Removed unneeded includes.
151         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): Deleted.
152         (WebCore::SVGFEColorMatrixElement::parseAttribute): Don't use isSupportedAttribute.
153         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
154         * svg/SVGFEColorMatrixElement.h: Removed isSupportedAttribute.
155         * svg/SVGFEComponentTransferElement.cpp: Removed unneeded includes.
156         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): Deleted.
157         (WebCore::SVGFEComponentTransferElement::parseAttribute): Don't use isSupportedAttribute.
158         * svg/SVGFEComponentTransferElement.h: Removed unneeded includes.
159         * svg/SVGFECompositeElement.cpp: Removed unneeded includes.
160         (WebCore::SVGFECompositeElement::isSupportedAttribute): Deleted.
161         (WebCore::SVGFECompositeElement::parseAttribute): Don't use isSupportedAttribute.
162         (WebCore::SVGFECompositeElement::svgAttributeChanged): Don't use isSupportedAttribute.
163         * svg/SVGFECompositeElement.h:
164         * svg/SVGFEConvolveMatrixElement.cpp: Removed unneeded includes.
165         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): Deleted.
166         (WebCore::SVGFEConvolveMatrixElement::parseAttribute): Don't use isSupportedAttribute.
167         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
168         * svg/SVGFEConvolveMatrixElement.h:
169         * svg/SVGFEDiffuseLightingElement.cpp: Removed unneeded includes.
170         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): Deleted.
171         (WebCore::SVGFEDiffuseLightingElement::parseAttribute): Don't use isSupportedAttribute.
172         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
173         * svg/SVGFEDiffuseLightingElement.h:
174         * svg/SVGFEDisplacementMapElement.cpp: Removed unneeded includes.
175         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): Deleted.
176         (WebCore::SVGFEDisplacementMapElement::parseAttribute): Don't use isSupportedAttribute.
177         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Don't use isSupportedAttribute.
178         * svg/SVGFEDisplacementMapElement.h:
179         * svg/SVGFEDropShadowElement.cpp: Removed unneeded includes.
180         (WebCore::SVGFEDropShadowElement::isSupportedAttribute): Deleted.
181         (WebCore::SVGFEDropShadowElement::parseAttribute): Don't use isSupportedAttribute.
182         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Don't use isSupportedAttribute.
183         * svg/SVGFEDropShadowElement.h:
184         * svg/SVGFEFloodElement.cpp: Removed unneeded includes.
185         * svg/SVGFEGaussianBlurElement.cpp: Removed unneeded includes.
186         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): Deleted.
187         (WebCore::SVGFEGaussianBlurElement::parseAttribute): Don't use isSupportedAttribute.
188         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Don't use isSupportedAttribute.
189         * svg/SVGFEGaussianBlurElement.h:
190         * svg/SVGFEImageElement.cpp: Removed unneeded includes.
191         (WebCore::SVGFEImageElement::isSupportedAttribute): Deleted.
192         (WebCore::SVGFEImageElement::parseAttribute): Don't use isSupportedAttribute.
193         (WebCore::SVGFEImageElement::svgAttributeChanged): Don't use isSupportedAttribute.
194         * svg/SVGFEImageElement.h:
195         * svg/SVGFELightElement.cpp: Removed unneeded includes.
196         (WebCore::SVGFELightElement::isSupportedAttribute): Deleted.
197         (WebCore::SVGFELightElement::parseAttribute): Don't use isSupportedAttribute.
198         (WebCore::SVGFELightElement::svgAttributeChanged): Don't use isSupportedAttribute.
199         * svg/SVGFELightElement.h:
200         * svg/SVGFEMergeNodeElement.cpp: Removed unneeded includes.
201         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): Deleted.
202         (WebCore::SVGFEMergeNodeElement::parseAttribute): Don't use isSupportedAttribute.
203         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Don't use isSupportedAttribute.
204         * svg/SVGFEMergeNodeElement.h:
205         * svg/SVGFEMorphologyElement.cpp: Removed unneeded includes.
206         (WebCore::SVGFEMorphologyElement::isSupportedAttribute): Deleted.
207         (WebCore::SVGFEMorphologyElement::parseAttribute): Don't use isSupportedAttribute.
208         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Don't use isSupportedAttribute.
209         * svg/SVGFEMorphologyElement.h:
210         * svg/SVGFEOffsetElement.cpp: Removed unneeded includes.
211         (WebCore::SVGFEOffsetElement::isSupportedAttribute): Deleted.
212         (WebCore::SVGFEOffsetElement::parseAttribute): Don't use isSupportedAttribute.
213         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Don't use isSupportedAttribute.
214         * svg/SVGFEOffsetElement.h:
215         * svg/SVGFESpecularLightingElement.cpp: Removed unneeded includes.
216         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): Deleted.
217         (WebCore::SVGFESpecularLightingElement::parseAttribute): Don't use isSupportedAttribute.
218         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
219         * svg/SVGFESpecularLightingElement.h:
220         * svg/SVGFETileElement.cpp: Removed unneeded includes.
221         (WebCore::SVGFETileElement::isSupportedAttribute): Deleted.
222         (WebCore::SVGFETileElement::parseAttribute): Don't use isSupportedAttribute.
223         (WebCore::SVGFETileElement::svgAttributeChanged): Don't use isSupportedAttribute.
224         * svg/SVGFETileElement.h:
225         * svg/SVGFETurbulenceElement.cpp: Removed unneeded includes.
226         (WebCore::SVGFETurbulenceElement::isSupportedAttribute): Deleted.
227         (WebCore::SVGFETurbulenceElement::parseAttribute): Don't use isSupportedAttribute.
228         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Don't use isSupportedAttribute.
229         * svg/SVGFETurbulenceElement.h:
230         * svg/SVGFilterElement.cpp: Removed unneeded includes.
231         (WebCore::SVGFilterElement::parseAttribute): Don't use isSupportedAttribute.
232         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Removed unneeded includes.
233         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): Don't use isSupportedAttribute.
234         * svg/SVGFilterPrimitiveStandardAttributes.h: Removed isSupportedAttribute and also moved a
235         couple functions out of the class definition.
236         * svg/SVGFitToViewBox.cpp: Removed unneeded includes.
237         * svg/SVGFontFaceElement.cpp: Removed unneeded includes.
238         * svg/SVGFontFaceUriElement.cpp: Removed unneeded includes.
239         * svg/SVGForeignObjectElement.cpp: Removed unneeded includes.
240         (WebCore::SVGForeignObjectElement::parseAttribute): Don't use isSupportedAttribute.
241         * svg/SVGGElement.cpp: Removed unneeded includes.
242         (WebCore::SVGGElement::parseAttribute): Don't use isSupportedAttribute.
243         * svg/SVGGlyphElement.cpp: Removed unneeded includes.
244         * svg/SVGGlyphRefElement.cpp: Removed unneeded includes.
245         (WebCore::SVGGlyphRefElement::hasValidGlyphElement): Rewrote to use is<> instead of hasTagName.
246         (WebCore::SVGGlyphRefElement::parseAttribute): Don't use return value from SVGURIReference::parseAttribute.
247         * svg/SVGGradientElement.cpp: Removed unneeded includes.
248         (WebCore::SVGGradientElement::parseAttribute): Don't use isSupportedAttribute.
249         * svg/SVGGraphicsElement.cpp: Removed unneeded includes.
250         (WebCore::SVGGraphicsElement::parseAttribute): Don't use isSupportedAttribute.
251         * svg/SVGImageElement.cpp: Removed unneeded includes.
252         (WebCore::SVGImageElement::parseAttribute): Don't use isSupportedAttribute.
253         * svg/SVGLangSpace.cpp: Removed unneeded includes.
254         (WebCore::SVGLangSpace::parseAttribute): Removed the return value.
255         * svg/SVGLangSpace.h: Converted functions to static member functions and removed the
256         return value from parseAttribute.
257         * svg/SVGLineElement.cpp: Removed unneeded includes.
258         (WebCore::SVGLineElement::parseAttribute): Don't use isSupportedAttribute.
259         * svg/SVGLinearGradientElement.cpp: Removed unneeded includes.
260         (WebCore::SVGLinearGradientElement::parseAttribute): Don't use isSupportedAttribute.
261         * svg/SVGMPathElement.cpp: Removed unneeded includes.
262         (WebCore::SVGMPathElement::isSupportedAttribute): Deleted.
263         (WebCore::SVGMPathElement::parseAttribute): Don't use isSupportedAttribute.
264         (WebCore::SVGMPathElement::svgAttributeChanged): Don't use isSupportedAttribute.
265         * svg/SVGMPathElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
266         private instead of protected.
267         * svg/SVGMarkerElement.cpp: Removed unneeded includes.
268         (WebCore::SVGMarkerElement::parseAttribute): Don't use isSupportedAttribute.
269         * svg/SVGMaskElement.cpp: Removed unneeded includes.
270         (WebCore::SVGMaskElement::parseAttribute): Don't use isSupportedAttribute.
271         * svg/SVGPathElement.cpp: Removed unneeded includes.
272         (WebCore::SVGPathElement::parseAttribute): Don't use isSupportedAttribute.
273         * svg/SVGPatternElement.cpp: Removed unneeded includes.
274         (WebCore::SVGPatternElement::parseAttribute): Don't use isSupportedAttribute.
275         * svg/SVGPolyElement.cpp: Removed unneeded includes.
276         (WebCore::SVGPolyElement::isSupportedAttribute): Deleted.
277         (WebCore::SVGPolyElement::parseAttribute): Don't use isSupportedAttribute.
278         (WebCore::SVGPolyElement::svgAttributeChanged): Don't use isSupportedAttribute.
279         * svg/SVGPolyElement.h:
280         * svg/SVGRadialGradientElement.cpp: Removed unneeded includes.
281         (WebCore::SVGRadialGradientElement::parseAttribute): Don't use isSupportedAttribute.
282         * svg/SVGRectElement.cpp: Removed unneeded includes.
283         (WebCore::SVGRectElement::isSupportedAttribute): Deleted.
284         (WebCore::SVGRectElement::parseAttribute): Don't use isSupportedAttribute.
285         (WebCore::SVGRectElement::svgAttributeChanged): Don't use isSupportedAttribute.
286         * svg/SVGRectElement.h:
287         * svg/SVGSVGElement.cpp: Removed unneeded includes.
288         (WebCore::SVGSVGElement::parseAttribute): Don't use isSupportedAttribute.
289         * svg/SVGScriptElement.cpp: Removed unneeded includes.
290         * svg/SVGStopElement.cpp: Removed unneeded includes.
291         (WebCore::SVGStopElement::isSupportedAttribute): Deleted.
292         (WebCore::SVGStopElement::parseAttribute): Don't use isSupportedAttribute.
293         (WebCore::SVGStopElement::svgAttributeChanged): Don't use isSupportedAttribute.
294         * svg/SVGStopElement.h: Removed isSupportedAttribute.
295         * svg/SVGStyleElement.cpp: Removed unneeded includes.
296         (WebCore::SVGStyleElement::isSupportedAttribute): Deleted.
297         (WebCore::SVGStyleElement::parseAttribute): Don't use isSupportedAttribute.
298         * svg/SVGStyleElement.h: Removed isSupportedAttribute.
299         * svg/SVGSymbolElement.cpp: Removed unneeded includes.
300         (WebCore::SVGSymbolElement::isSupportedAttribute): Deleted.
301         (WebCore::SVGSymbolElement::parseAttribute): Don't use isSupportedAttribute.
302         (WebCore::SVGSymbolElement::svgAttributeChanged): Don't use isSupportedAttribute.
303         * svg/SVGSymbolElement.h: Removed isSupportedAttribute.
304         * svg/SVGTRefElement.cpp: Removed unneeded includes.
305         (WebCore::SVGTRefElement::isSupportedAttribute): Deleted.
306         (WebCore::SVGTRefElement::parseAttribute): Don't use isSupportedAttribute.
307         (WebCore::SVGTRefElement::svgAttributeChanged): Don't use isSupportedAttribute.
308         * svg/SVGTRefElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
309         private instead of protected.
310         * svg/SVGTests.cpp: Removed unneeded includes.
311         (WebCore::SVGTests::parseAttribute): Removed return value.
312         * svg/SVGTests.h: Removed return value of parseAttribute.
313         * svg/SVGTextContentElement.cpp: Removed unneeded includes.
314         (WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Don't use
315         isSupportedAttribute. Also removed global to optimize comparing attribute value against
316         the string "preserve".
317         (WebCore::SVGTextContentElement::parseAttribute): Don't use isSupportedAttribute.
318         (WebCore::SVGTextContentElement::svgAttributeChanged): Don't use isSupportedAttribute.
319         * svg/SVGTextContentElement.h: Made isSupportedAttribute private instead of protected.
320         * svg/SVGTextElement.cpp: Removed unneeded includes.
321         * svg/SVGTextPathElement.cpp: Removed unneeded includes.
322         (WebCore::SVGTextPathElement::parseAttribute): Don't use isSupportedAttribute.
323         * svg/SVGTextPositioningElement.cpp: Removed unneeded includes.
324         (WebCore::SVGTextPositioningElement::isSupportedAttribute): Deleted.
325         (WebCore::SVGTextPositioningElement::parseAttribute): Don't use isSupportedAttribute.
326         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Don't use isSupportedAttribute.
327         * svg/SVGTextPositioningElement.h: Removed isSupportedAttribute and made some functions
328         private insetad of protected.
329         * svg/SVGURIReference.cpp: Removed unneeded includes.
330         (WebCore::SVGURIReference::parseAttribute): Don't use isSupportedAttribute.
331         * svg/SVGURIReference.h:
332         (WebCore::SVGURIReference::isExternalURIReference):
333         * svg/SVGUseElement.cpp: Removed unneeded includes.
334         (WebCore::SVGUseElement::parseAttribute): Don't use isSupportedAttribute.
335         * svg/SVGViewElement.h: Removed isSupportedAttribute.
336         * svg/animation/SVGSMILElement.cpp: Removed unneeded includes.
337
338 2015-03-29  Darin Adler  <darin@apple.com>
339
340         Remove unneeded includes of "Attribute.h"
341         https://bugs.webkit.org/show_bug.cgi?id=143195
342
343         Reviewed by Antti Koivisto.
344
345         * css/StyleResolver.cpp:
346         * html/HTMLAnchorElement.cpp:
347         * html/HTMLAreaElement.cpp:
348         * html/HTMLBRElement.cpp:
349         * html/HTMLBaseElement.cpp:
350         * html/HTMLBodyElement.cpp:
351         * html/HTMLButtonElement.cpp:
352         * html/HTMLCanvasElement.cpp:
353         * html/HTMLDivElement.cpp:
354         * html/HTMLElement.cpp:
355         * html/HTMLEmbedElement.cpp:
356         * html/HTMLFontElement.cpp:
357         * html/HTMLFormControlElement.cpp:
358         * html/HTMLFormElement.cpp:
359         * html/HTMLFrameElement.cpp:
360         * html/HTMLFrameElementBase.cpp:
361         * html/HTMLFrameSetElement.cpp:
362         * html/HTMLHRElement.cpp:
363         * html/HTMLIFrameElement.cpp:
364         * html/HTMLImageElement.cpp:
365         * html/HTMLOListElement.cpp:
366         * html/HTMLOptionElement.cpp:
367         * html/HTMLParagraphElement.cpp:
368         * html/HTMLParamElement.cpp:
369         * html/HTMLPlugInElement.cpp:
370         * html/HTMLPreElement.cpp:
371         * html/HTMLProgressElement.cpp:
372         * html/HTMLScriptElement.cpp:
373         * html/HTMLSelectElement.cpp:
374         * html/HTMLStyleElement.cpp:
375         * html/HTMLTableCaptionElement.cpp:
376         * html/HTMLTableCellElement.cpp:
377         * html/HTMLTableColElement.cpp:
378         * html/HTMLTableElement.cpp:
379         * html/HTMLTablePartElement.cpp:
380         * html/HTMLTextAreaElement.cpp:
381         * html/HTMLTextFormControlElement.cpp:
382         * html/HTMLUListElement.cpp:
383         * html/HTMLVideoElement.cpp:
384         * html/parser/HTMLScriptRunner.cpp:
385         * inspector/InspectorNodeFinder.cpp:
386         Removed includes of "Attribute.h".
387
388 2015-03-28  Eric Carlson  <eric.carlson@apple.com>
389
390         [Mac] Update for output device API change
391         https://bugs.webkit.org/show_bug.cgi?id=143187
392
393         Reviewed by Zalan Bujtas.
394
395         The API used for output device is being deprecated, update to the replacement.
396
397         * WebCore.xcodeproj/project.pbxproj: Add SPI headers.
398
399         * platform/graphics/MediaPlaybackTarget.h:
400         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
401         (WebCore::MediaPlaybackTarget::setDevicePickerContext):
402         (WebCore::MediaPlaybackTarget::devicePickerContext):
403
404         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
405         (WebCore::MediaPlaybackTarget::encode):
406         (WebCore::MediaPlaybackTarget::decode):
407
408         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
409         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
410         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
411         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
412         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
413         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
414         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
415         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
416         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
417         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.
418
419         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
420         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
421         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
422         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
423         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
424         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
425
426         * platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
427             from ios directory, added Mac includes and prototypes.
428         * platform/spi/ios/AVKitSPI.h: Removed.
429
430         * platform/spi/mac/AVFoundationSPI.h: Added.
431
432 2015-03-28  Simon Fraser  <simon.fraser@apple.com>
433
434         Optimize RenderLayer::intersectsDamageRect() slightly
435         https://bugs.webkit.org/show_bug.cgi?id=143186
436
437         Reviewed by Zalan Bujtas.
438
439         We can early return from RenderLayer::intersectsDamageRect() if the
440         damageRect is empty, since nothing will intersect with the empty rect.
441         
442         Slight performance gain when scrolling overflow-scroll with lots of nested,
443         clipping layers.
444
445         * rendering/RenderLayer.cpp:
446         (WebCore::RenderLayer::calculateClipRects):
447
448 2015-03-28  Anders Carlsson  <andersca@apple.com>
449
450         Remove an unused SPI method from WebKitLegacy
451         https://bugs.webkit.org/show_bug.cgi?id=143185
452
453         Reviewed by Sam Weinig.
454
455         * loader/appcache/ApplicationCacheStorage.cpp:
456         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
457         * loader/appcache/ApplicationCacheStorage.h:
458
459 2015-03-28  Joonghun Park  <jh718.park@samsung.com>
460
461         nullptr cleanup in InlineFooBox classes
462         https://bugs.webkit.org/show_bug.cgi?id=143178
463
464         Reviewed by Csaba Osztrogonác.
465
466         No new tests, no behavior changes
467
468         Replace 0 with nullptr in InlineFooBox classes.
469
470         * rendering/InlineBox.cpp:
471         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
472         * rendering/InlineFlowBox.cpp:
473         (WebCore::InlineFlowBox::removeChild):
474         (WebCore::InlineFlowBox::deleteLine):
475         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
476         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
477         * rendering/InlineFlowBox.h:
478         (WebCore::InlineFlowBox::InlineFlowBox):
479         * rendering/InlineTextBox.h:
480         (WebCore::InlineTextBox::InlineTextBox):
481         * rendering/RootInlineBox.cpp:
482         (WebCore::RootInlineBox::getLogicalStartBoxWithNode):
483         (WebCore::RootInlineBox::getLogicalEndBoxWithNode):
484         * rendering/RootInlineBox.h:
485         * rendering/svg/SVGInlineTextBox.cpp:
486         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
487         (WebCore::SVGInlineTextBox::releasePaintingResource):
488         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
489         * rendering/svg/SVGRootInlineBox.cpp:
490         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
491         (WebCore::findFirstAndLastAttributesInVector):
492         * rendering/svg/SVGRootInlineBox.h:
493
494 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
495
496         More modern loops in RenderLayer.cpp
497         https://bugs.webkit.org/show_bug.cgi?id=143175
498
499         Reviewed by Ryosuke Niwa.
500
501         Use modern loops in more places in RenderLayer.app.
502
503         * rendering/RenderLayer.cpp:
504         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
505         (WebCore::RenderLayer::paint):
506         (WebCore::performOverlapTests):
507         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
508         (WebCore::RenderLayer::paintList):
509         (WebCore::RenderLayer::collectFragments):
510         (WebCore::RenderLayer::updatePaintingInfoForFragments):
511         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
512         (WebCore::RenderLayer::calculateClipRects):
513
514 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
515
516         nullptr cleanup in RenderLayer
517         https://bugs.webkit.org/show_bug.cgi?id=143174
518
519         Reviewed by Ryosuke Niwa.
520
521         Replace 0 with nullptr in RenderLayer.cpp.
522
523         * rendering/RenderLayer.cpp:
524         (WebCore::RenderLayer::filterRenderer):
525         (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
526         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
527         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
528         (WebCore::RenderLayer::enclosingOverflowClipLayer):
529         (WebCore::RenderLayer::enclosingCompositingLayer):
530         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
531         (WebCore::RenderLayer::enclosingFilterLayer):
532         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
533         (WebCore::RenderLayer::clippingRootForPainting):
534         (WebCore::RenderLayer::transparentPaintingAncestor):
535         (WebCore::transparencyClipBox):
536         (WebCore::RenderLayer::removeChild):
537         (WebCore::RenderLayer::removeOnlyThisLayer):
538         (WebCore::RenderLayer::insertOnlyThisLayer):
539         (WebCore::accumulateOffsetTowardsAncestor):
540         (WebCore::RenderLayer::enclosingScrollableArea):
541         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
542         (WebCore::RenderLayer::enclosingElement):
543         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
544         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
545         (WebCore::RenderLayer::hitTestLayer):
546         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
547         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
548         (WebCore::RenderLayer::hitTestList):
549         (WebCore::RenderLayer::updateClipRects):
550         (WebCore::RenderLayer::clipRects):
551         (WebCore::RenderLayer::calculateClipRects):
552
553 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
554
555         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
556         https://bugs.webkit.org/show_bug.cgi?id=142386
557
558         Reviewed by Žan Doberšek.
559
560         TextureMapper and TextureMapperGL are bloated and tightly coupled with
561         BitmapTexture. We should move these classes to seperated file of their own.
562         Also, this patch removes friend relationship from TextureMapperGL and  its
563         subsidiary classes.
564
565         The main purpose of this refactoring is to expose BitmapTexturePool to
566         renderers of platformlayers like Video and Canvas. By doing this, each
567         renderer can acquire textures from the global texture pool to paint
568         their contents directly.
569
570         No new tests needed.
571
572         * PlatformEfl.cmake:
573         * PlatformGTK.cmake:
574         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
575         Include BitmapTextureGL and BitmapTexturePool explicitly
576
577         * platform/graphics/texmap/BitmapTexture.cpp: Added.
578         * platform/graphics/texmap/BitmapTexture.h: Added.
579         (WebCore::BitmapTexture::updateContents):
580         Exclude BitmapTexture class from TextureMapper
581
582         * platform/graphics/texmap/BitmapTextureGL.cpp: Added.
583         * platform/graphics/texmap/BitmapTextureGL.h: Added.
584         Exclude BitmapTextureGL class from TextureMapperGL
585         (WebCore::BitmapTextureGL::clipStack): Added.
586         Add the getter for clipStack for TextureMapperGL
587         (WebCore::BitmapTextureGL::Bind): Deleted.
588         (WebCore::BitmapTextureGL::BindAsSurface): Added.
589         Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
590         However, TextureMapperGL can compute projection matrix itself after binding job, so this
591         friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.
592
593         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
594         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
595         Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer
596
597         * platform/graphics/texmap/BitmapTexturePool.cpp: Added.
598         * platform/graphics/texmap/BitmapTexturePool.h: Added.
599         Exclude BitmapTexturePool class from TextureMapperGL
600         (WebCore::BitmapTexturePool::acquireTexture):
601         Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling
602
603         * platform/graphics/texmap/TextureMapper.cpp:
604         * platform/graphics/texmap/TextureMapper.h:
605         Remove BitmapTexturePool and BitmapTexture from its implementation.
606
607         * platform/graphics/texmap/TextureMapperGL.cpp:
608         * platform/graphics/texmap/TextureMapperGL.h:
609         Remove BitmapTextureGL from its implementation.
610         (WebCore::TextureMapperGL::TextureMapperGL):
611         (WebCore::TextureMapperGL::clipStack):
612         (WebCore::TextureMapperGL::bindSurface):
613         (WebCore::TextureMapperGL::currentSurface):
614         Add a getter of the current surface for filtering operation in BitmapTextureGL.
615         It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.
616
617         (WebCore::TextureMapperGL::ClipStack):
618         Move inner class declaration to public.
619
620         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
621         * platform/graphics/texmap/TextureMapperImageBuffer.h:
622         Remove BitmapTextureImageBuffer from its implementation.
623
624 2015-03-27  Tim Horton  <timothy_horton@apple.com>
625
626         WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
627         https://bugs.webkit.org/show_bug.cgi?id=143142
628         <rdar://problem/20324495>
629
630         Reviewed by Anders Carlsson.
631
632         Calling DataDetectorsLibrary() is expensive; we should avoid doing it
633         until actually necessary. When loading a page that makes a caret selection,
634         ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
635         that a caret selection can't have any services associated with it) to avoid
636         crashing on systems where DataDetectors is not available. Instead, we should
637         first check if there's anything to do, and then check for the existence
638         of DataDetectors.
639
640         * page/mac/ServicesOverlayController.mm:
641         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
642         Build the list of phone number ranges, and bail (clearing the potential highlights)
643         if it is empty, before calling DataDetectorsLibrary().
644
645         (WebCore::ServicesOverlayController::buildSelectionHighlight):
646         Check the list of selection rects, and bail (clearing the potential highlights)
647         if it is empty, before calling DataDetectorsLibrary().
648
649 2015-03-27  Jer Noble  <jer.noble@apple.com>
650
651         [Mac] Safari fails to fire page "load" event with video[preload=none]
652         https://bugs.webkit.org/show_bug.cgi?id=143147
653
654         Reviewed by Simon Fraser.
655
656         Test: media/video-page-load-preload-none.html
657
658         When told to load() when preload == None, set the networkState to Idle.
659         This causes HTMLMediaElement to set the shouldDelayLoadEvent flag to
660         false, and allows the page's 'load' event to fire.
661
662         Drive-by fix: add setNetworkState() and setReadyState() methods to
663         MediaPlayerPrivateAVFoundation, reducing a bunch of code duplication.
664
665         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
666         (WebCore::MediaPlayerPrivateAVFoundation::load):
667         (WebCore::MediaPlayerPrivateAVFoundation::setNetworkState):
668         (WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
669         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
670         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
671
672 2015-03-27  Alexey Proskuryakov  <ap@apple.com>
673
674         Calling crypto.webkitSubtle.generateKey causes page memory to never be released
675         https://bugs.webkit.org/show_bug.cgi?id=143151
676         rdar://problem/18940687
677
678         Reviewed by Tim Horton.
679
680         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): Don't.
681
682 2015-03-27  Brent Fulgham  <bfulgham@apple.com>
683
684         Null dereference in InbandMetadataTextTrack handling
685         https://bugs.webkit.org/show_bug.cgi?id=143144
686         <rdar://problem/18983250>
687
688         Reviewed by Eric Carlson.
689
690         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
691         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
692         'client()', just like we do in all other methods.
693
694 2015-03-27  Oliver Hunt  <oliver@apple.com>
695
696         Forward additional CFNetwork ATS information to child processes
697         https://bugs.webkit.org/show_bug.cgi?id=143136
698
699         Reviewed by Anders Carlsson.
700
701         Declare SPI.
702
703         * platform/spi/cf/CFNetworkSPI.h:
704
705 2015-03-27  Chris Dumez  <cdumez@apple.com>
706
707         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
708         https://bugs.webkit.org/show_bug.cgi?id=143125
709         <rdar://problem/20321172>
710
711         Reviewed by Antti Koivisto.
712
713         Export a couple of extra symbols.
714
715         * platform/network/ResourceResponseBase.h:
716
717 2015-03-27  Jer Noble  <jer.noble@apple.com>
718
719         HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
720         https://bugs.webkit.org/show_bug.cgi?id=143132
721
722         Reviewed by Eric Carlson.
723
724         When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
725         event and continue playback. However, if a media engine updates the ready state before its
726         seek operation actually completes, the currentTime it returns may still be the time before
727         the seek.
728
729         Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
730         false before firing the 'seeked' event.
731
732         * html/HTMLMediaElement.cpp:
733         (WebCore::HTMLMediaElement::parseAttribute):
734
735 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
736
737         Make some more objects use FastMalloc
738         https://bugs.webkit.org/show_bug.cgi?id=143122
739
740         Reviewed by Csaba Osztrogonác.
741
742         * Modules/geolocation/GeolocationController.h:
743         * Modules/geolocation/NavigatorGeolocation.h:
744         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
745         * Modules/notifications/NotificationController.h:
746         * Modules/webdatabase/DatabaseServer.h:
747         * css/CSSFontFaceSource.h:
748         * html/HTMLMediaSession.h:
749         * inspector/InspectorIndexedDBAgent.h:
750         * inspector/InspectorReplayAgent.h:
751         * page/CaptionUserPreferencesMediaAF.h:
752         * page/PageConsoleClient.h:
753         * page/PageDebuggable.h:
754         * page/animation/CSSPropertyAnimation.cpp:
755         * page/mac/ServicesOverlayController.h:
756         * platform/RemoteCommandListener.h:
757         * platform/Timer.h:
758         * platform/audio/MediaSessionManager.h:
759         * platform/mac/SystemSleepListenerMac.h:
760         * platform/mac/ThemeMac.h:
761         * rendering/svg/RenderSVGResourceSolidColor.h:
762         * replay/ReplayController.h:
763
764 2015-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
765
766         FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
767         https://bugs.webkit.org/show_bug.cgi?id=142885.
768
769         Reviewed by Dean Jackson.
770
771         FEMorphology class implementation code clean up.
772         
773         Tests: svg/filters/feMorphology-radius-cases.svg
774
775         * platform/graphics/filters/FEMorphology.cpp:
776         (WebCore::shouldSupersedeExtremum): Reuse code instead of repeating it and
777         use < and > instead of =< and >=.
778         
779         (WebCore::pixelArrayIndex): Returns the array index of a pixel in an image
780         buffer, given: position(x, y), image width and the color channel.
781         
782         (WebCore::columnExtremum): Returns the extremum of a column of pixels.
783         
784         (WebCore::kernelExtremum): Returns the extremum of a filter kernel.
785         
786         (WebCore::FEMorphology::platformApplyGeneric): Apply some code clean-up.
787         The kernel size should be equal to radius of the filter. The extra pixel
788         was causing the resulted image to be asymmetric in some cases.
789         
790         (WebCore::FEMorphology::platformApplyDegenerate):
791         (WebCore::FEMorphology::platformApplySoftware): After applying scaling, we
792         still need to check the resulted radius is negative (overflow case) or less
793         than one (zero radius case) and treat these cases differently.
794         
795         (WebCore::FEMorphology::morphologyOperator): Deleted.
796         (WebCore::FEMorphology::radiusX): Deleted.
797         (WebCore::FEMorphology::radiusY): Deleted.
798         * platform/graphics/filters/FEMorphology.h:
799         (WebCore::FEMorphology::morphologyOperator):
800         (WebCore::FEMorphology::radiusX):
801         (WebCore::FEMorphology::radiusY):
802         Move a single line functions from the source file to the header file.
803
804 2015-03-27  Antti Koivisto  <antti@apple.com>
805
806         Move CacheValidation to platform
807         https://bugs.webkit.org/show_bug.cgi?id=143133
808
809         Reviewed by Chris Dumez.
810
811         It deals with platform types only and is currently violating layering.
812
813         * WebCore.xcodeproj/project.pbxproj:
814         * loader/cache/CacheValidation.cpp: Removed.
815         * loader/cache/CacheValidation.h: Removed.
816         * platform/network/CacheValidation.cpp: Copied from Source/WebCore/loader/cache/CacheValidation.cpp.
817         * platform/network/CacheValidation.h: Copied from Source/WebCore/loader/cache/CacheValidation.h.
818
819 2015-03-27  Commit Queue  <commit-queue@webkit.org>
820
821         Unreviewed, rolling out r177896.
822         https://bugs.webkit.org/show_bug.cgi?id=142978
823
824         Loading libgstclutter.so in-process hangs web process
825         (Requested by mcatanzaro on #webkit).
826
827         Reverted changeset:
828
829         "[GStreamer] Disable gst-plugin-scanner if seccomp filters are
830         enabled"
831         https://bugs.webkit.org/show_bug.cgi?id=140069
832         http://trac.webkit.org/changeset/177896
833
834 2015-03-26  Antti Koivisto  <antti@apple.com>
835
836         Respect cache-control directives in request
837         https://bugs.webkit.org/show_bug.cgi?id=143121
838         rdar://problem/19714040
839
840         Reviewed by Chris Dumez.
841
842         Test: http/tests/cache/disk-cache/disk-cache-request-headers.html
843
844         * loader/cache/CacheValidation.cpp:
845         (WebCore::isCacheHeaderSeparator):
846         (WebCore::isControlCharacter):
847         (WebCore::trimToNextSeparator):
848         (WebCore::parseCacheHeader):
849         (WebCore::parseCacheControlDirectives):
850
851             Factor Cache-control parsing here so it can be used for both requests and responses.
852
853         * loader/cache/CacheValidation.h:
854         * platform/network/ResourceRequestBase.h:
855         * platform/network/ResourceResponseBase.cpp:
856         (WebCore::ResourceResponseBase::ResourceResponseBase):
857         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
858         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
859         (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
860         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
861         (WebCore::ResourceResponseBase::cacheControlMaxAge):
862         (WebCore::isCacheHeaderSeparator): Deleted.
863         (WebCore::isControlCharacter): Deleted.
864         (WebCore::trimToNextSeparator): Deleted.
865         (WebCore::parseCacheHeader): Deleted.
866         * platform/network/ResourceResponseBase.h:
867
868 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
869
870         [GStreamer] share GL context in pipeline, part 2
871         https://bugs.webkit.org/show_bug.cgi?id=143049
872
873         Reviewed by Carlos Garcia Campos.
874
875         This patch, instead of cluttering the GstGL attributes creation in
876         ::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
877         where those attributes are defined. This method is guarded by
878         USE(GSTREAMER_GL)
879
880         ::handlSyncMessage() shall return nothing, according to GStreamer
881         documentation, not a boolean.
882
883         The GstGL attributes are now GRefPtr<> to avoid memory leaks.
884
885         The GstGLAPI and GstGLPlatform are now set given by the pre-processor
886         directives, and the code in ::ensureGstGLContext() is simpler.
887
888         No new tests because this is platform specific and it depends in the
889         run-time availability and configurations of GstGL elements.
890
891         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
892         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
893         Don't initialise the GstGL attributes since are GRefPtr<>
894         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
895         signature to use void instead of gboolean.
896         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
897         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
898
899 2015-03-26  Jeremy Jones  <jeremyj@apple.com>
900
901         Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
902         https://bugs.webkit.org/show_bug.cgi?id=143120
903
904         Reviewed by Eric Carlson.
905
906         We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure 
907         media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
908         media state via resetMediaState(). m_playerController is already released in 
909         WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
910         fullscreen process from completing successfully.
911
912         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
913         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
914
915 2015-03-26  Zalan Bujtas  <zalan@apple.com>
916
917         Inline continuation code should not take anonymous containing wrapper granted.
918         https://bugs.webkit.org/show_bug.cgi?id=133312
919
920         Reviewed by Dave Hyatt.
921
922         It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
923         is an anonymous wrapper and its sibling might be a block level renderer.
924         When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
925         is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
926         anonymous wrappers)
927
928         Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html
929
930         * rendering/RenderInline.cpp:
931         (WebCore::updateStyleOfAnonymousBlockContinuations):
932         (WebCore::RenderInline::styleDidChange):
933
934 2015-03-26  Tim Horton  <timothy_horton@apple.com>
935
936         REGRESSION (r181358 and r181507): Lots of sites think that we support touch events on OS X
937         https://bugs.webkit.org/show_bug.cgi?id=142888
938         <rdar://problem/20227304>
939
940         Reviewed by Beth Dakin.
941
942         * dom/Document.idl:
943         * dom/Element.idl:
944         * html/HTMLBodyElement.idl:
945         * html/HTMLFrameSetElement.idl:
946         * page/DOMWindow.idl:
947         Re-conditionalize a lot of event listeners; sites test ("ontouchstart" in window), which
948         is not covered by NotEnumerable, and so r181358 and r181507 broke a bunch of sites
949         (apple.com, blaze.com, anything using nicescroll.js, etc.) by causing them to think
950         that (Mac) Safari was touch-enabled.
951
952 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
953
954         "lineNo" does not match WebKit coding style guidelines
955         https://bugs.webkit.org/show_bug.cgi?id=143119
956
957         Reviewed by Michael Saboff.
958
959         We can afford to use whole words.
960
961         * bindings/js/JSLazyEventListener.cpp:
962         (WebCore::JSLazyEventListener::initializeJSFunction):
963         * bindings/js/JSMainThreadExecStateInstrumentation.h:
964         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
965         * inspector/InspectorDOMAgent.cpp:
966         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
967         * testing/Internals.cpp:
968         (WebCore::Internals::parserMetaData):
969
970 2015-03-26  Roger Fong  <roger_fong@apple.com>
971
972         Apply blur effect to media control background.
973         https://bugs.webkit.org/show_bug.cgi?id=143116.
974         <rdar://problem/20316964>.
975
976         Reviewed by Brent Fulgham.
977
978         There are still a few issues, like the borders of the controls being blurred with black,
979         and the volume slider background not showing the blur effect. Will fix those separately.
980
981         Add CSS for new divs to create blur effect using back drop filters and blend modes.
982         * Modules/mediacontrols/mediaControlsApple.css:
983         (audio::-webkit-media-controls-panel):
984         (audio::-webkit-media-controls-panel-tint):
985         (audio::-webkit-media-controls-panel-background):
986         (audio::-webkit-media-controls-panel .volume-box):
987         (audio::-webkit-media-controls-volume-slider-container-background):
988         (audio::-webkit-media-controls-volume-slider-container-tint):
989         (audio::-webkit-media-controls-toggle-closed-captions-button): Adjust fill.
990         (audio::-webkit-media-controls-fullscreen-button): Adjust fill.
991         (audio::-webkit-media-controls-fullscreen-button.exit): Adjust fill.
992         (video:-webkit-full-screen::-webkit-media-controls-panel):
993         (audio:-webkit-full-screen::-webkit-media-controls-panel-tint):
994         (audio:-webkit-full-screen::-webkit-media-controls-panel-background):
995         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
996         (video:-webkit-full-screen::-webkit-media-controls-play-button):
997         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
998         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
999         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
1000         (video:-webkit-full-screen::-webkit-media-controls-status-display):
1001         (audio::-webkit-media-controls-panel .volume-box:active): Deleted.
1002         * Modules/mediacontrols/mediaControlsApple.js:
1003         (Controller.prototype.createControls):
1004         (Controller.prototype.configureInlineControls): Add new divs for blurred background effect.
1005         (Controller.prototype.configureFullScreenControls): Ditto.
1006         (Controller.prototype.handlePanelMouseDown): The tint div is now in front.
1007         (Controller.prototype.drawTimelineBackground): Adjust colors to make border look better with new background.
1008         (Controller.prototype.drawVolumeBackground): Ditto.
1009
1010 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1011
1012         Assertion firing in JavaScriptCore/parser/parser.h for statesman.com site
1013         https://bugs.webkit.org/show_bug.cgi?id=142974
1014
1015         Reviewed by Joseph Pecoraro.
1016
1017         * bindings/js/JSLazyEventListener.cpp:
1018         (WebCore::JSLazyEventListener::initializeJSFunction): Use the new override
1019         line number API to guarantee that errors will map to the .html file locations
1020         that we like.
1021
1022         * bindings/js/ScriptController.cpp:
1023         (WebCore::ScriptController::eventHandlerPosition): Added a FIXME to cover
1024         some cases where our line and column numbers are still nonsense.
1025
1026 2015-03-26  Beth Dakin  <bdakin@apple.com>
1027
1028         Relevant repainted objects callback is inaccurate and inconsistent for PDF 
1029         documents
1030         https://bugs.webkit.org/show_bug.cgi?id=143118
1031         -and corresponding-
1032         rdar://problem/13371582
1033
1034         Reviewed by Tim Horton.
1035
1036         Investigating this bug resulted in finding two things that should change for the 
1037         relevant repainted objects heuristic. First, we should not count any objects 
1038         painted while updating control tints. And secondly, we should not use it at all 
1039         for plugin documents. In other documents, we count the plugin area as “painted” 
1040         when we get to paint whether or not the plugin has actually loaded. This is 
1041         intentional because it allows us to account for chunks of the page that will be 
1042         filled in by possibly slow-loading ads. However, if the plugin is the whole 
1043         document, then the heuristic just doesn’t make any sense and it leads to 
1044         inconsistent behavior at different window sizes. So we’ll only count plugins when 
1045         the document is not a plugin document. 
1046
1047         Don’t count objects during this paint!
1048         * page/FrameView.cpp:
1049         (WebCore::FrameView::updateControlTints):
1050         * page/Page.h:
1051         (WebCore::Page::setIsCountingRelevantRepaintedObjects):
1052
1053         Make sure the document is not a plugin document.
1054         * rendering/RenderEmbeddedObject.cpp:
1055         (WebCore::RenderEmbeddedObject::paint):
1056
1057 2015-03-26  Alex Christensen  <achristensen@webkit.org>
1058
1059         Progress towards CMake on Mac.
1060         https://bugs.webkit.org/show_bug.cgi?id=143112
1061
1062         Reviewed by Chris Dumez.
1063
1064         * CMakeLists.txt:
1065         * PlatformEfl.cmake:
1066         * PlatformGTK.cmake:
1067         * PlatformMac.cmake:
1068         * platform/graphics/mac/IconMac.mm:
1069
1070 2015-03-26  Jer Noble  <jer.noble@apple.com>
1071
1072         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
1073         https://bugs.webkit.org/show_bug.cgi?id=142970
1074
1075         Reviewed by Eric Carlson.
1076
1077         isMainThread() will (ironically) return true if called from the web thread. Rather than dispatch
1078         synchronously to the main thread to allocate the _volumeView, dispatch asynchronously and handle
1079         the case where the MPVolumeView has not yet been created.
1080
1081         * platform/audio/ios/MediaSessionManagerIOS.mm:
1082         (-[WebMediaSessionHelper allocateVolumeView]): Dispatch to the main thread to allocate. Move notification
1083             registration to -setVolumeView:.
1084         (-[WebMediaSessionHelper setVolumeView:]): Added. Register/Unregister for route availablitiy notifications.
1085         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Handle the possibility of a nil _volumeView.
1086
1087 2015-03-26  Benjamin Poulain  <bpoulain@apple.com>
1088
1089         Fix state maching debugging after r181964
1090         https://bugs.webkit.org/show_bug.cgi?id=143082
1091
1092         Reviewed by Alex Christensen.
1093
1094         * contentextensions/ContentExtensionCompiler.cpp:
1095         (WebCore::ContentExtensions::compileRuleList):
1096
1097 2015-03-25  David Hyatt  <hyatt@apple.com>
1098
1099         Improve the offsetWidth/Height layout optimization
1100         https://bugs.webkit.org/show_bug.cgi?id=143008
1101
1102         Reviewed by Zalan Bujtas.
1103
1104         * dom/Document.cpp:
1105         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1106         * dom/Document.h:
1107         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
1108         the positioning restrictions on the optimization check.
1109
1110         * dom/Element.cpp:
1111         (WebCore::Element::offsetWidth):
1112         (WebCore::Element::offsetHeight):
1113         Change to use Element& instead of Element*.
1114
1115         (WebCore::Element::clientWidth):
1116         (WebCore::Element::clientHeight):
1117         (WebCore::Element::scrollWidth):
1118         (WebCore::Element::scrollHeight):
1119         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
1120
1121 2015-03-26  Brady Eidson  <beidson@apple.com>
1122
1123         Apply ContentExtension actions after redirects.
1124         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
1125
1126         Reviewed by Alex Christensen.
1127
1128         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
1129                http/tests/contentextensions/subresource-redirect-blocked.html
1130
1131         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
1132         the ContentExtensionsBackend.
1133
1134         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
1135         ResourceLoader where redirects are handled.
1136
1137         * contentextensions/ContentExtension.cpp:
1138         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
1139
1140         * contentextensions/ContentExtensionsBackend.cpp:
1141         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1142         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
1143         * contentextensions/ContentExtensionsBackend.h:
1144
1145         * loader/NetscapePlugInStreamLoader.cpp:
1146         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1147
1148         * loader/ResourceLoadInfo.h:
1149
1150         * loader/ResourceLoader.cpp:
1151         (WebCore::ResourceLoader::ResourceLoader):
1152         (WebCore::ResourceLoader::willSendRequest):
1153         * loader/ResourceLoader.h:
1154
1155         * loader/SubresourceLoader.cpp:
1156         (WebCore::SubresourceLoader::SubresourceLoader):
1157
1158         * loader/cache/CachedResourceLoader.cpp:
1159         (WebCore::CachedResourceLoader::requestResource):
1160
1161         * page/UserContentController.cpp:
1162         (WebCore::UserContentController::processContentExtensionRulesForLoad):
1163         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
1164         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
1165         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
1166         * page/UserContentController.h:
1167
1168 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
1169
1170         Crash when laying out (char)0
1171         https://bugs.webkit.org/show_bug.cgi?id=143103
1172
1173         Reviewed by Dean Jackson.
1174
1175         We currently cache a character -> Font mapping in a HashMap.
1176         However, keys in Hashmaps can't be 0. This patch simply skips
1177         the cache in this case.
1178
1179         No new tests, for now. I'm having trouble creating a test because
1180         the site that causes this bug generates their page using script,
1181         and the script is all minified, and difficult to understand. I
1182         will contact the owner of the site and ask for and unminified
1183         version of their sources. However, I don't want to that to block
1184         this tiny fix from going in.
1185
1186         * platform/graphics/Font.cpp:
1187         (WebCore::Font::systemFallbackFontForCharacter):
1188
1189 2015-03-26  Jer Noble  <jer.noble@apple.com>
1190
1191         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
1192         https://bugs.webkit.org/show_bug.cgi?id=143080
1193
1194         Reviewed by Eric Carlson.
1195
1196         Null-check m_certificate before dereferencing.
1197
1198         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1199         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
1200
1201 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
1202
1203         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
1204         https://bugs.webkit.org/show_bug.cgi?id=115298
1205
1206         Reviewed by Mario Sanchez Prada.
1207
1208         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
1209         aria-pressed state into a 0, 1, 2 number value for the Mac.
1210
1211         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
1212
1213         * accessibility/AccessibilityObject.cpp:
1214         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1215         * accessibility/AccessibilityObject.h:
1216         (WebCore::AccessibilityObject::isToggleButton):
1217         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1218         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1219         (createAccessibilityRoleMap):
1220         (-[WebAccessibilityObjectWrapper subrole]):
1221         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1222
1223 2015-03-25  Dean Jackson  <dino@apple.com>
1224
1225         CSS blend modes do not parse when in the shadow tree
1226         https://bugs.webkit.org/show_bug.cgi?id=143067
1227         <rdar://problem/20302662>
1228
1229         Reviewed by Anders Carlson.
1230
1231         The media controls style sheets are injected as UA stylesheets
1232         when we come across a <video> or <audio> element. These stylesheets
1233         have a different parsing context than the document stylesheets -
1234         one that uses the default constructor, which initializes some
1235         features like cssCompositingEnabled to false without checking
1236         the runtime state.
1237
1238         The easy fix is to use the global state to initialize the context.
1239
1240         Unfortunately we can't test this since it only occurs in the shadow
1241         tree.
1242
1243         * css/CSSParser.cpp:
1244         (WebCore::CSSParserContext::CSSParserContext): Check the state
1245         of RuntimeEnabledFeatures to initialize CSS Regions and
1246         CSS Compositing (Blending).
1247
1248 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
1249
1250         AX: table cells that use display:block render the table inaccessible to VoiceOver
1251         https://bugs.webkit.org/show_bug.cgi?id=143007
1252
1253         Reviewed by Mario Sanchez Prada.
1254
1255         When display:block is used on a table cell, it was being ignored because it was anonymous.
1256         This is still a valid scenario however if it's still inside of a valid table.
1257
1258         Test: accessibility/table-cell-display-block.html
1259
1260         * accessibility/AccessibilityTableCell.cpp:
1261         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
1262
1263 2015-03-25  Tim Horton  <timothy_horton@apple.com>
1264
1265         Add a preference to prevent "user-scalable=no" from having any effect
1266         https://bugs.webkit.org/show_bug.cgi?id=143032
1267
1268         Reviewed by Sam Weinig.
1269
1270         * page/ViewportConfiguration.cpp:
1271         (WebCore::ViewportConfiguration::ViewportConfiguration):
1272         (WebCore::ViewportConfiguration::allowsUserScaling):
1273         * page/ViewportConfiguration.h:
1274         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
1275         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
1276
1277 2015-03-25  Dan Bernstein  <mitz@apple.com>
1278
1279         Another attempt to get the iOS EWS building again.
1280
1281         * WebCore.xcodeproj/project.pbxproj:
1282
1283 2015-03-25  Alex Christensen  <achristensen@webkit.org>
1284
1285         Add case-insensitive checks to DFA bytecode.
1286         https://bugs.webkit.org/show_bug.cgi?id=142977
1287
1288         Reviewed by Benjamin Poulain.
1289
1290         * contentextensions/DFABytecode.h:
1291         (WebCore::ContentExtensions::instructionSizeWithArguments):
1292         * contentextensions/DFABytecodeCompiler.cpp:
1293         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
1294         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
1295         Add case-insensitive bytecode.
1296         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
1297         Check to see if case-insensitive bytecodes can be used.
1298         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
1299         * contentextensions/DFABytecodeCompiler.h:
1300         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
1301         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
1302         * contentextensions/DFABytecodeInterpreter.cpp:
1303         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1304         Interpret case-insensitive bytecodes.
1305
1306 2015-03-25  Sam Weinig  <sam@webkit.org>
1307
1308         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
1309
1310         * contentextensions/ContentExtensionCompiler.cpp:
1311         (WebCore::ContentExtensions::compileRuleList):
1312         * contentextensions/ContentExtensionCompiler.h:
1313         * contentextensions/ContentExtensionParser.cpp:
1314         (WebCore::ContentExtensions::getTypeFlags):
1315
1316 2015-03-25  Sam Weinig  <sam@webkit.org>
1317
1318         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
1319         https://bugs.webkit.org/show_bug.cgi?id=143059
1320
1321         Reviewed by Alex Christensen.
1322
1323         * WebCore.xcodeproj/project.pbxproj:
1324         Add ContentExtensionError.h/cpp.
1325
1326         * contentextensions/ContentExtensionError.cpp: Added.
1327         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1328         * contentextensions/ContentExtensionError.h: Added.
1329         (WebCore::ContentExtensions::make_error_code):
1330         Add ContentExtensionError enum and std::error_code adaptor.
1331
1332         * contentextensions/ContentExtensionCompiler.h:
1333         Instead of returning CompiledContentExtensionData, use a client interface
1334         to pass data. Eventually, this should be turned into a direct streaming 
1335         interface so we can write directly to a file.
1336
1337         * contentextensions/ContentExtensionCompiler.cpp:
1338         (WebCore::ContentExtensions::compileRuleList):
1339         * contentextensions/ContentExtensionParser.cpp:
1340         (WebCore::ContentExtensions::getTypeFlags):
1341         (WebCore::ContentExtensions::loadTrigger):
1342         (WebCore::ContentExtensions::loadAction):
1343         (WebCore::ContentExtensions::loadRule):
1344         (WebCore::ContentExtensions::loadEncodedRules):
1345         (WebCore::ContentExtensions::parseRuleList):
1346         * contentextensions/ContentExtensionParser.h:
1347         Convert to return an error.
1348
1349 2015-03-25  Beth Dakin  <bdakin@apple.com>
1350
1351         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
1352         force preview
1353         https://bugs.webkit.org/show_bug.cgi?id=143057
1354         -and corresponding-
1355         rdar://problem/20251436
1356
1357         Reviewed by Tim Horton.
1358
1359         This patch adds a value for ActionUpdated to the ImmediateActionStage enum. Now if 
1360         m_immediateActionStage indicates that an immediate action has either begun or 
1361         completed then we can have the same behavior.
1362         * page/EventHandler.cpp:
1363         (WebCore::EventHandler::handleMouseReleaseEvent):
1364         * page/EventHandler.h:
1365
1366 2015-03-25  Dean Jackson  <dino@apple.com>
1367
1368         MediaControls: Use font with fixed number width
1369         https://bugs.webkit.org/show_bug.cgi?id=143018
1370         <rdar://problem/20245415>
1371
1372         Reviewed by Eric Carlson.
1373
1374         Add a new font-family, specific to Apple platforms,
1375         called -apple-system-font-monospaced-numbers. This is
1376         a special variant of the system font which uses monospaced
1377         forms for the number glyphs - allowing a time reading that
1378         doesn't bounce around as the time changes.
1379
1380         * Modules/mediacontrols/mediaControlsApple.css: Media controls should
1381         use the new font.
1382         (audio::-webkit-media-controls-time-remaining-display):
1383         * Modules/mediacontrols/mediaControlsiOS.css:
1384         (audio::-webkit-media-controls-time-remaining-display):
1385
1386         * platform/graphics/ios/FontCacheIOS.mm: Request a new CTFontRef with
1387         the appropriate attributes.
1388         (WebCore::createCTFontWithFamilyNameAndWeight):
1389         * platform/graphics/mac/FontCacheMac.mm: Ditto, but NSFont.
1390         (WebCore::fontWithFamily):
1391         * platform/spi/cocoa/CoreTextSPI.h: Expose the constants for
1392         the new form so that the public SDK can build.
1393
1394 2015-03-25  Alex Christensen  <achristensen@webkit.org>
1395
1396         [Content Extensions] Add multi-DFA compiling and interpreting.
1397         https://bugs.webkit.org/show_bug.cgi?id=143010
1398
1399         Reviewed by Benjamin Poulain.
1400
1401         * contentextensions/ContentExtensionCompiler.cpp:
1402         (WebCore::ContentExtensions::compileRuleList):
1403         Compile multiple NFAs to DFAs.
1404         * contentextensions/ContentExtensionsBackend.cpp:
1405         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1406         Fixed a bug when there are no non-universal actions.
1407         We still need to report that no ignore-previous-rules was hit to apply the
1408         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
1409         and skipped in DFABytecodeInterpreter::interpret.
1410         * contentextensions/DFABytecodeCompiler.cpp:
1411         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1412         Add a header for each DFA.
1413         * contentextensions/DFABytecodeInterpreter.cpp:
1414         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1415         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1416         Interpret as many DFAs as there are in the bytecode.
1417
1418 2015-03-25  Per Arne Vollan  <peavo@outlook.com>
1419
1420         [Win] Illegal character in project file.
1421         https://bugs.webkit.org/show_bug.cgi?id=143051
1422
1423         Reviewed by Brent Fulgham.
1424
1425         There is an illegal character in the WebCore project filter.
1426         WebCore files are shown unfiltered.
1427
1428         * WebCore.vcxproj/WebCore.vcxproj.filters:
1429
1430 2015-03-25  David Hyatt  <hyatt@apple.com>
1431
1432         Add a pref to enable the new block-inside-inline model
1433         https://bugs.webkit.org/show_bug.cgi?id=143050
1434
1435         Reviewed by Sam Weinig.
1436
1437         * page/Settings.in:
1438
1439 2015-03-25  Dan Bernstein  <mitz@apple.com>
1440
1441         iOS Simulator build fix.
1442
1443         * platform/spi/cocoa/IOSurfaceSPI.h:
1444
1445 2015-03-25  Commit Queue  <commit-queue@webkit.org>
1446
1447         Unreviewed, rolling out r181932.
1448         https://bugs.webkit.org/show_bug.cgi?id=143041
1449
1450         The test fails most of the time on bots (Requested by ap on
1451         #webkit).
1452
1453         Reverted changeset:
1454
1455         "[Content Extensions] Add multi-DFA compiling and
1456         interpreting."
1457         https://bugs.webkit.org/show_bug.cgi?id=143010
1458         http://trac.webkit.org/changeset/181932
1459
1460 2015-03-24  Dean Jackson  <dino@apple.com>
1461
1462         Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
1463         https://bugs.webkit.org/show_bug.cgi?id=143039
1464
1465         Unreviewed build fix for newer versions of OS X.
1466
1467         * rendering/RenderThemeMac.mm: Define a null language parameter. This
1468         seemed better than turning the clang warning off for just that
1469         function.
1470         (WebCore::AttachmentLayout::layOutTitle):
1471         (WebCore::AttachmentLayout::layOutSubtitle):
1472
1473 2015-03-24  Dan Bernstein  <mitz@apple.com>
1474
1475         Another attempt to fix the build.
1476
1477         * WebCore.xcodeproj/project.pbxproj:
1478         * platform/spi/cocoa/QuartzCoreSPI.h:
1479
1480 2015-03-24  Alex Christensen  <achristensen@webkit.org>
1481
1482         [Content Extensions] Add multi-DFA compiling and interpreting.
1483         https://bugs.webkit.org/show_bug.cgi?id=143010
1484
1485         Reviewed by Benjamin Poulain.
1486
1487         * contentextensions/ContentExtensionCompiler.cpp:
1488         (WebCore::ContentExtensions::compileRuleList):
1489         Compile multiple NFAs to DFAs.
1490         * contentextensions/ContentExtensionsBackend.cpp:
1491         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1492         Fixed a bug when there are no non-universal actions.
1493         We still need to report that no ignore-previous-rules was hit to apply the
1494         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
1495         and skipped in DFABytecodeInterpreter::interpret.
1496         * contentextensions/DFABytecodeCompiler.cpp:
1497         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1498         Add a header for each DFA.
1499         * contentextensions/DFABytecodeInterpreter.cpp:
1500         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1501         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1502         Interpret as many DFAs as there are in the bytecode.
1503
1504 2015-03-24  Dan Bernstein  <mitz@apple.com>
1505
1506         Tried to fix the EWS build.
1507
1508         * platform/spi/cocoa/QuartzCoreSPI.h:
1509
1510 2015-03-24  Commit Queue  <commit-queue@webkit.org>
1511
1512         Unreviewed, rolling out r181898 and r181909.
1513         https://bugs.webkit.org/show_bug.cgi?id=143034
1514
1515         Broke fast/regions/auto-size/autoheight-two-pass-layout-
1516         complex-002.html (Requested by ap on #webkit).
1517
1518         Reverted changesets:
1519
1520         "Improve the offsetWidth/Height layout optimization"
1521         https://bugs.webkit.org/show_bug.cgi?id=143008
1522         http://trac.webkit.org/changeset/181898
1523
1524         "Disable layout dimensions optimization for RenderRegions"
1525         https://bugs.webkit.org/show_bug.cgi?id=143017
1526         http://trac.webkit.org/changeset/181909
1527
1528 2015-03-24  Zhuo Li  <zachli@apple.com>
1529
1530         Scripts running in isolated world should not subject to a page's CSP about 'eval'.
1531         https://bugs.webkit.org/show_bug.cgi?id=141316.
1532
1533         Reviewed by Geoffrey Garen.
1534
1535         * bindings/js/ScriptController.cpp:
1536         (WebCore::ScriptController::initScript):
1537         We should not impose the main world Content Security Policy onto the isolated world.
1538
1539 2015-03-24  Chris Dumez  <cdumez@apple.com>
1540
1541         [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
1542         https://bugs.webkit.org/show_bug.cgi?id=143026
1543
1544         Reviewed by Andy Estes.
1545
1546         Use .cpp file extension instead of .mm for SharedTimerCF and
1547         PowerObserverMac.
1548
1549         * WebCore.xcodeproj/project.pbxproj:
1550         * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
1551         (WebCore::timerFired):
1552         Use WTF::AutodrainedPool instead of @autoreleasepool {}.
1553
1554         * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
1555
1556 2015-03-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1557
1558         REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
1559         https://bugs.webkit.org/show_bug.cgi?id=142696
1560
1561         Reviewed and tweaked by Geoffrey Garen.
1562
1563         Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
1564
1565         * ForwardingHeaders/runtime/JSMapIterator.h: Added.
1566         * ForwardingHeaders/runtime/JSSetIterator.h: Added.
1567         * bindings/js/SerializedScriptValue.cpp:
1568         (WebCore::CloneSerializer::serialize):
1569
1570 2015-03-24  Dan Bernstein  <mitz@apple.com>
1571
1572         Tried to fix the iOS Simulator build.
1573
1574         * platform/spi/cocoa/QuartzCoreSPI.h:
1575
1576 2015-03-24  Benjamin Poulain  <bpoulain@apple.com>
1577
1578         Make URL filter patterns matching consistent and add a simple canonicalization step
1579         https://bugs.webkit.org/show_bug.cgi?id=142998
1580
1581         Reviewed by Alex Christensen.
1582
1583         This patch makes two changes to the url filter input:
1584         -Make the matching "Search" by default, the pattern can now appear anywhere
1585          in the URL by default.
1586         -Make the input a little less fragile: do not explode on valid input
1587          that is not formatted in a certain way.
1588
1589         To implement the search behavior, I simply add an implict ".*" in front of the patterns
1590         when that make sense.
1591
1592         To make the input more solid, we do some little modification on the input:
1593         -Remove duplicated ".*".
1594         -Remove matching suffixes that do not bring new information.
1595         -Unify all the ".*" in the same format.
1596
1597         Why do that here? That should be done through a graph analysis on the machine.
1598
1599         The reason is this is incredibly cheap compared to the graph analysis. Any state
1600         removed upfront will save the handling of several hundred nodes in the deterministic
1601         graph.
1602
1603         * contentextensions/URLFilterParser.cpp:
1604         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
1605         (WebCore::ContentExtensions::Term::isUniversalTransition):
1606         (WebCore::ContentExtensions::GraphBuilder::finalize):
1607         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
1608         (WebCore::ContentExtensions::GraphBuilder::fail):
1609         (WebCore::ContentExtensions::GraphBuilder::simplifySunkTerms):
1610
1611 2015-03-24  Chris Dumez  <cdumez@apple.com>
1612
1613         Regression(r181671): Caused Timer-related crashes on iOS / WK1
1614         https://bugs.webkit.org/show_bug.cgi?id=143025
1615
1616         Reviewed by Andy Estes.
1617
1618         Call CFRunLoopAddTimer() on WebThreadRunLoop() instead of
1619         CFRunLoopGetCurrent() for iOS, as we did before r181671.
1620
1621         I inadvertently changed this in r181671 when merging the Mac
1622         and iOS implementations.
1623
1624         No new tests, already covered by existing tests.
1625
1626         * platform/cf/SharedTimerCF.mm:
1627         (WebCore::setSharedTimerFireInterval):
1628
1629 2015-03-24  Dan Bernstein  <mitz@apple.com>
1630
1631         WebCore part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
1632         https://bugs.webkit.org/show_bug.cgi?id=143023
1633
1634         Reviewed by Tim Horton.
1635
1636         * platform/spi/cocoa/QuartzCoreSPI.h: Added the declaration of
1637         CARenderServerRenderLayerWithTransform.
1638
1639 2015-03-24  David Hyatt  <hyatt@apple.com>
1640
1641         Disable layout dimensions optimization for RenderRegions
1642         https://bugs.webkit.org/show_bug.cgi?id=143017
1643
1644         Reviewed by Dean Jackson.
1645
1646         * dom/Document.cpp:
1647         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1648         Turn off the optimization for regions, since auto height regions can change size
1649         without needing a layout.
1650
1651 2015-03-24  Beth Dakin  <bdakin@apple.com>
1652
1653         Add events related to force click gesture
1654         https://bugs.webkit.org/show_bug.cgi?id=142836
1655         -and corresponding-
1656         rdar://problem/20210239
1657
1658         Reviewed by Dean Jackson.
1659
1660         This patch adds six new events for the force click gesture:
1661
1662         webkitmouseforcewillbegin -> Event is sent just before mousedown to indicate that 
1663         force can be perceived if the user presses any harder. The author should prevent 
1664         default on this event to both prevent the user agent’s default force click 
1665         features and to receive the other 5 events.
1666
1667         webkitmouseforcechanged -> This event fires whenever force changes between the 
1668         mousedown and mouseup. It is a new type of mouse event that includes a force 
1669         variable which is a normalized number between 0 (corresponds to click) and 1 
1670         (corresponds to force click). In this patch, I have only added code to send this 
1671         event between mousedown and mouseforcedown, but as a followup patch, we plan to 
1672         send it through mouseup.
1673
1674         webkitmouseforcecancelled -> If the user releases their finger from the trackpad 
1675         after pressing hard enough to send webkitmouseforcewillbegin events but not hard 
1676         enough to force click, this event will be sent to indicate that the user bailed 
1677         out on the gesture.
1678
1679         webkitmouseforcedown -> The down part of the force click.
1680
1681         webkitmouseforceup -> The up part of the force click. This event is added in this 
1682         patch, but does not yet fire. That is work for a follow-up patch.
1683
1684         webkitmouseforceclick -> The equivalent of the click event for the force click. 
1685         Should fire just after webkitmouseforceup. This event is added in this patch, but 
1686         does not yet fire. That is work for a follow-up patch.
1687
1688         Add new files for WebKitMouseForceEvent to build systems.
1689         * DerivedSources.cpp:
1690         * DerivedSources.make:
1691         * WebCore.vcxproj/WebCore.vcxproj:
1692         * WebCore.vcxproj/WebCore.vcxproj.filters:
1693         * WebCore.xcodeproj/project.pbxproj:
1694         * WebCore.xcodeproj/project.pbxproj:
1695
1696         Plumbing for new events.
1697         * dom/Document.idl:
1698
1699         Code to dispatch the new events. Currently the code that calls these functions is 
1700         in WebKit2.
1701         * dom/Element.cpp:
1702         (WebCore::Element::dispatchMouseForceWillBegin):
1703         (WebCore::Element::dispatchMouseForceChanged):
1704         (WebCore::Element::dispatchMouseForceDown):
1705         (WebCore::Element::dispatchMouseForceUp):
1706         (WebCore::Element::dispatchMouseForceClick):
1707         (WebCore::Element::dispatchMouseForceCancelled):
1708         * dom/Element.h:
1709
1710         More plumbing.
1711         * dom/Element.idl:
1712         * dom/EventNames.h:
1713         * dom/EventNames.in:
1714
1715         Our new type of mouse event that includes force.
1716         * dom/WebKitMouseForceEvent.cpp: Added.
1717         (WebCore::WebKitMouseForceEventInit::WebKitMouseForceEventInit):
1718         (WebCore::WebKitMouseForceEvent::WebKitMouseForceEvent):
1719         (WebCore::WebKitMouseForceEvent::~WebKitMouseForceEvent):
1720         (WebCore::WebKitMouseForceEvent::eventInterface):
1721         * dom/WebKitMouseForceEvent.h: Added.
1722         * dom/WebKitMouseForceEvent.idl: Added.
1723
1724         More plumbing.
1725         * html/HTMLAttributeNames.in:
1726         * html/HTMLBodyElement.cpp:
1727         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
1728         * html/HTMLBodyElement.idl:
1729         * html/HTMLElement.cpp:
1730         (WebCore::HTMLElement::createEventHandlerNameMap):
1731         * page/DOMWindow.idl:
1732         * page/EventHandler.h:
1733         (WebCore::EventHandler::lastMouseDownEvent):
1734
1735 2015-03-24  Anders Carlsson  <andersca@apple.com>
1736
1737         Fix designated initializer violations
1738         https://bugs.webkit.org/show_bug.cgi?id=143016
1739         rdar://problem/20268858
1740
1741         Reviewed by Dan Bernstein.
1742
1743         Mark -[DOMObject init] as unavailable.
1744
1745         * bindings/objc/DOMObject.h:
1746         * bindings/objc/DOMObject.mm:
1747         (-[DOMObject init]):
1748
1749 2015-03-24  Benjamin Poulain  <benjamin@webkit.org>
1750
1751         CSS Selectors Level 4: enable case-insensitive attribute matching by default
1752         https://bugs.webkit.org/show_bug.cgi?id=142960
1753
1754         Reviewed by Andreas Kling.
1755
1756         All open issues have been resolved, enable the feature by default.
1757
1758         Test: fast/css/attribute-selector-case-insensitive.html
1759
1760         * css/CSSGrammar.y.in:
1761
1762 2015-03-24  Dean Jackson  <dino@apple.com>
1763
1764         MediaControls: Scrubber and Time displays have the incorrect blending
1765         https://bugs.webkit.org/show_bug.cgi?id=143011
1766         <rdar://problem/20245251>
1767
1768         Reviewed by Eric Carlson.
1769
1770         The scrubber in media controls should use plus-darker blending. Then
1771         the scrubber itself should use a slightly transparent black (55% opacity)
1772         when drawing.
1773
1774         * Modules/mediacontrols/mediaControlsiOS.css:
1775         (audio::-webkit-media-controls-timeline): Add the blend mode.
1776         * Modules/mediacontrols/mediaControlsiOS.js:
1777         (ControllerIOS.prototype.drawTimelineBackground): Start drawing with
1778         transparency. I changed the order of rendering to make it
1779         more clear we draw the three parts in left to right order.
1780
1781 2015-03-24  David Hyatt  <hyatt@apple.com>
1782
1783         Improve the offsetWidth/Height layout optimization
1784         https://bugs.webkit.org/show_bug.cgi?id=143008
1785
1786         Reviewed by Dean Jackson.
1787
1788         * dom/Document.cpp:
1789         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1790         * dom/Document.h:
1791         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
1792         the positioning restrictions on the optimization check.
1793
1794         * dom/Element.cpp:
1795         (WebCore::Element::offsetWidth):
1796         (WebCore::Element::offsetHeight):
1797         Change to use Element& instead of Element*.
1798
1799         (WebCore::Element::clientWidth):
1800         (WebCore::Element::clientHeight):
1801         (WebCore::Element::scrollWidth):
1802         (WebCore::Element::scrollHeight):
1803         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
1804
1805 2015-03-24  Yoav Weiss  <yoav@yoav.ws>
1806
1807         Stop image from displaying when src attribute is removed or emptied
1808         https://bugs.webkit.org/show_bug.cgi?id=142677
1809
1810         Reviewed by Chris Dumez.
1811
1812         Previously, we ignored empty attribute as failed URL, and didn't update the
1813         renderer when an image was removed. This patch fixes that.
1814
1815         Tests: fast/dom/HTMLImageElement/image-empty-src.html
1816                fast/dom/HTMLImageElement/image-remove-src.html
1817
1818         * loader/ImageLoader.cpp:
1819         (WebCore::ImageLoader::updateFromElement):
1820
1821 2015-03-17  Philippe Normand  <pnormand@igalia.com>
1822
1823         [OpenWebRTC] RealtimeMediaSourceCenter implementation
1824         https://bugs.webkit.org/show_bug.cgi?id=142476
1825
1826         Reviewed by Eric Carlson.
1827
1828         The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
1829         RealtimeMediaSourceCenter. It is not yet able to correctly assess
1830         MediaConstraints so it selects the first audio/video sources
1831         available through OpenWebRTC.
1832
1833         * PlatformEfl.cmake: Add new files to the build.
1834         * PlatformGTK.cmake: Ditto.
1835         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
1836         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
1837         (WebCore::initializeOpenWebRTC): Simple function to initialize the
1838         framework, it is going to be used by the PeerConnection backend as well.
1839         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
1840         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
1841         (WebCore::mediaSourcesAvailableCallback): Function invoked once
1842         the media sources discovery succeeded within OpenWebRTC.
1843         (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
1844         the OpenWebRTC RealtimeMediaSourceCenter.
1845         (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
1846         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
1847         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
1848         Schedule a discovery process for the capture sources.
1849         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
1850         the first audio/video sources and create a MediaStream accordingly.
1851         (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
1852         Not yet implemented.
1853         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
1854         Method invoked once the capture sources process succeeded. Parse
1855         them and create an internal cache of RealtimeMediaSources accordingly.
1856         (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
1857         function to fetch the first source of the given type from the
1858         RealtimeMediaSources cache.
1859         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
1860         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
1861
1862 2015-03-24  Csaba Osztrogonác  <ossy@webkit.org>
1863
1864         [EFL] Add OpenWebRTC in jhbuild
1865         https://bugs.webkit.org/show_bug.cgi?id=142778
1866
1867         Reviewed by Gyuyoung Kim.
1868
1869         Original patch by Philippe Normand <pnormand@igalia.com>
1870
1871         * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
1872
1873 2015-03-23 Yoav Weiss  <yoav@yoav.ws>
1874
1875         Update empty image canvas tests and fix a related bug
1876         https://bugs.webkit.org/show_bug.cgi?id=142694
1877
1878         Reviewed by Chris Dumez.
1879
1880         During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
1881         we encountered an issue with canvas tests related to empty image handling
1882         when drawn or used as a pattern. After updating these tests, an issue with
1883         pattern handling was encountered.
1884
1885         The spec, as well as Chrome's implementation, say that when an empty image
1886         is used as a pattern, createPattern should return null. See
1887         https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
1888         Instead, createPattern returned an exception in this case.
1889         This patch fixes that and makes sure that it returns a null when image loading hasn't started.
1890
1891         Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
1892                canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
1893                canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
1894                canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
1895                canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
1896
1897         * html/canvas/CanvasRenderingContext2D.cpp:
1898         (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
1899
1900 2015-03-23  Alex Christensen  <achristensen@webkit.org>
1901
1902         Fix api tests after r181876.
1903
1904         * contentextensions/ContentExtensionsBackend.cpp:
1905         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1906         Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
1907         * loader/cache/CachedResourceLoader.cpp:
1908         (WebCore::CachedResourceLoader::requestResource):
1909         Changed an assertion to a null check.
1910
1911 2015-03-23  Dean Jackson  <dino@apple.com>
1912
1913         Timelines are sharing the same canvas background
1914         https://bugs.webkit.org/show_bug.cgi?id=142994
1915         <rdar://problem/20209466>
1916
1917         Reviewed by Brent Fulgham.
1918
1919         Since each MediaControl lives in an isolated world, we
1920         can't rely on a global variable to provide a unique
1921         identifier for a named canvas. The fix is to expose
1922         WebCore's UUID generator, and have each canvas use
1923         that for a name.
1924
1925         * Modules/mediacontrols/MediaControlsHost.cpp:
1926         (WebCore::MediaControlsHost::generateUUID): New method on the
1927         MediaControlsHost that generates a UUID.
1928         * Modules/mediacontrols/MediaControlsHost.h:
1929         * Modules/mediacontrols/MediaControlsHost.idl:
1930
1931         * Modules/mediacontrols/mediaControlsApple.js: Remove the global
1932         variable unique ID that wasn't working, and instead get
1933         an ID from the MediaControlsHost.
1934         (Controller.prototype.createControls):
1935         * Modules/mediacontrols/mediaControlsiOS.js:
1936         (ControllerIOS):
1937
1938 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
1939
1940         Scroll latching logic can get stuck in 'scrollable="no"' iframes
1941         https://bugs.webkit.org/show_bug.cgi?id=142789
1942         <rdar://problem/20129494>
1943
1944         Reviewed by Dean Jackson.
1945
1946         Clean up the EventHandler and latching code as follows:
1947         (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
1948             be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
1949             frames.
1950         (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
1951             different.
1952         (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
1953             the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
1954             treat iframe as a suitable target.
1955         (4) Do not create a latching state object when the container being evaluated is already scrolled to the
1956             extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
1957             to be the latching target.
1958         (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
1959             momentum scrolling, as an appropriate time to select a latching target.
1960
1961         * page/EventHandler.cpp:
1962         (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
1963         (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
1964         * page/EventHandler.h:
1965         * page/mac/EventHandlerMac.mm:
1966         (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
1967         notes above.
1968         (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
1969         consolidate logic.
1970         (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
1971         longer needed here, now that iframes are not processed by this code.
1972         (WebCore::findEnclosingScrollableContainer): Deleted.
1973         * page/scrolling/ScrollLatchingState.cpp:
1974         (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
1975         a temporary RefPtr to the the function.
1976         * page/scrolling/ScrollLatchingState.h:
1977         * platform/PlatformWheelEvent.h:
1978         (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
1979         that should not cause latching state to be revised.
1980
1981 2015-03-23  Anders Carlsson  <andersca@apple.com>
1982
1983         Try to fix the iOS build.
1984
1985         * platform/network/mac/CookieJarMac.mm:
1986
1987 2015-03-23  Brady Eidson  <beidson@apple.com>
1988
1989         Content extensions should apply css selectors
1990         https://bugs.webkit.org/show_bug.cgi?id=142604
1991
1992         Reviewed by Alex Christensen.
1993
1994         Tests: http/tests/contentextensions/css-display-none.html
1995
1996         * WebCore.xcodeproj/project.pbxproj:
1997
1998         * contentextensions/ContentExtension.cpp:
1999         (WebCore::ContentExtensions::ContentExtension::create):
2000         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
2001         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
2002         * contentextensions/ContentExtension.h:
2003         (WebCore::ContentExtensions::ContentExtension::identifier):
2004         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
2005
2006         * contentextensions/ContentExtensionsBackend.cpp:
2007         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
2008         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2009         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
2010         * contentextensions/ContentExtensionsBackend.h:
2011
2012         * contentextensions/DFABytecodeInterpreter.cpp:
2013         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2014
2015         * dom/DocumentStyleSheetCollection.cpp:
2016         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
2017         * dom/DocumentStyleSheetCollection.h:
2018
2019         * loader/DocumentLoader.cpp:
2020         (WebCore::DocumentLoader::commitData):
2021         (WebCore::DocumentLoader::startLoadingMainResource):
2022         (WebCore::DocumentLoader::addPendingContentExtensionSheet):
2023         * loader/DocumentLoader.h:
2024
2025         * loader/cache/CachedResourceLoader.cpp:
2026         (WebCore::CachedResourceLoader::requestResource):
2027
2028         * loader/cache/CachedResourceRequest.cpp:
2029         (WebCore::CachedResourceRequest::setInitiator):
2030         * loader/cache/CachedResourceRequest.h:
2031         (WebCore::CachedResourceRequest::initiatingDocumentLoader):
2032
2033         * page/UserContentController.cpp:
2034         (WebCore::UserContentController::globalDisplayNoneStyleSheet):
2035         (WebCore::UserContentController::displayNoneCSSRule):
2036         * page/UserContentController.h:
2037
2038 2015-03-23  Anders Carlsson  <andersca@apple.com>
2039
2040         -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
2041         https://bugs.webkit.org/show_bug.cgi?id=142990
2042         rdar://problem/20241645
2043
2044         Reviewed by Andreas Kling.
2045
2046         Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
2047
2048         * platform/network/cf/CookieJarCFNet.cpp:
2049         * platform/network/mac/CookieJarMac.mm:
2050
2051 2015-03-23  Conrad Shultz  <conrad_shultz@apple.com>
2052
2053         Replace uses of kCTFontSystemFontType
2054         https://bugs.webkit.org/show_bug.cgi?id=142984
2055
2056         Reviewed by Tim Horton.
2057
2058         * rendering/RenderThemeMac.mm:
2059         (WebCore::AttachmentLayout::layOutTitle):
2060         (WebCore::AttachmentLayout::layOutSubtitle):
2061
2062 2015-03-23  Dean Jackson  <dino@apple.com>
2063
2064         kCTFontSystemFontType is deprecated in CoreText
2065         https://bugs.webkit.org/show_bug.cgi?id=142981
2066         <rdar://problem/20261171>
2067
2068         Reviewed by Beth Dakin.
2069
2070         Update to the non-deprecated version.
2071
2072         * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
2073         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2074
2075 2015-03-23  Eric Carlson  <eric.carlson@apple.com>
2076
2077         [Mac] Enable fullscreen for MSE-based videos
2078         https://bugs.webkit.org/show_bug.cgi?id=142971
2079
2080         Reviewed by Jer Noble.
2081
2082         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2083         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
2084
2085 2015-03-23  Alex Christensen  <achristensen@webkit.org>
2086
2087         [MediaFoundation] Implement seek.
2088         https://bugs.webkit.org/show_bug.cgi?id=142594
2089
2090         Reviewed by Darin Adler.
2091
2092         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2093         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
2094         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
2095         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
2096         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2097
2098 2015-03-23  Dan Bernstein  <mitz@apple.com>
2099
2100         Fixed the build.
2101
2102         * platform/graphics/cocoa/FontCocoa.mm:
2103         (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
2104         (WebCore::Font::platformWidthForGlyph): Ditto.
2105
2106 2015-03-23  Jer Noble  <jer.noble@apple.com>
2107
2108         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
2109         https://bugs.webkit.org/show_bug.cgi?id=142970
2110
2111         Reviewed by Eric Carlson.
2112
2113         Return early after synchronously calling to the main thread to allocate the volume
2114         view, to avoid re-allocating the volume view again on the web thread.
2115
2116         * platform/audio/ios/MediaSessionManagerIOS.mm:
2117         (-[WebMediaSessionHelper allocateVolumeView]):
2118
2119 2015-03-23  Tim Horton  <timothy_horton@apple.com>
2120
2121         Add a share item to the link action menu
2122         https://bugs.webkit.org/show_bug.cgi?id=142961
2123         <rdar://problem/19198374>
2124
2125         Reviewed by Beth Dakin.
2126
2127         * English.lproj/Localizable.strings:
2128         Remove some now-unused strings.
2129
2130         * platform/spi/mac/NSMenuSPI.h:
2131         Add some SPI.
2132
2133 2015-03-23  David Kilzer  <ddkilzer@apple.com>
2134
2135         [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
2136
2137         Fix tracked by:  <rdar://problem/20261171>
2138
2139         * rendering/RenderThemeIOS.mm:
2140         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2141         Add clang pragmas.
2142
2143 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2144
2145         Unreviewed test fix.
2146
2147         * css/CSSParser.cpp:
2148         (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
2149
2150 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2151
2152         scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
2153         https://bugs.webkit.org/show_bug.cgi?id=142552
2154         <rdar://problem/20114743>
2155
2156         Reviewed by Dean Jackson.
2157
2158         Revise the snap point logic as follows:
2159         (1) Put the snap point destination handling in a helper function to make the rest of the code
2160             easier to read.
2161         (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
2162             left-hand snap points.
2163         (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
2164             behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
2165         (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
2166
2167         * css/CSSParser.cpp:
2168         (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
2169         * page/scrolling/AxisScrollSnapOffsets.cpp:
2170         (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
2171         destination coordinates.
2172         (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
2173         (WebCore::styleUsesElements): Added helper function.
2174         (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
2175         offsets.
2176
2177 2015-03-23  Yoav Weiss  <yoav@yoav.ws>
2178
2179         Refactor ImageLoader's setting of CachedImage
2180         https://bugs.webkit.org/show_bug.cgi?id=142825
2181
2182         Reviewed by Chris Dumez.
2183
2184         No new tests, since there's no functional change.
2185
2186         setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
2187         CachedImages and were not used as originally intended. That resulted in some dead code,
2188         and confusion when going over the code.
2189         This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
2190
2191         * html/HTMLObjectElement.cpp:
2192         (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
2193         * loader/ImageLoader.cpp:
2194         (WebCore::ImageLoader::clearImage):
2195         (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
2196         (WebCore::ImageLoader::notifyFinished):
2197         (WebCore::ImageLoader::elementDidMoveToNewDocument):
2198         (WebCore::ImageLoader::setImage): Deleted.
2199         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
2200         * loader/ImageLoader.h:
2201
2202 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
2203
2204         CSS Selectors: fix attribute case-insensitive matching of Contain and List
2205         https://bugs.webkit.org/show_bug.cgi?id=142932
2206
2207         Reviewed by Darin Adler.
2208
2209         Fix the last two attribute selectors that were using full case-insensitive
2210         match:
2211             -Contain ([foo*=bar]).
2212             -List (foo~=bar]).
2213
2214         Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
2215                fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
2216
2217         * css/SelectorChecker.cpp:
2218         (WebCore::attributeValueMatches):
2219         * cssjit/SelectorCompiler.cpp:
2220         (WebCore::SelectorCompiler::attributeValueContains):
2221         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
2222
2223 2015-03-22  Benjamin Poulain  <bpoulain@apple.com>
2224
2225         Detect when url filter pattern with groups match the empty string
2226         https://bugs.webkit.org/show_bug.cgi?id=142930
2227
2228         Reviewed by Sam Weinig.
2229
2230         The previous test was only accounting for simple atoms. This patch extends
2231         it to groups.
2232
2233         * contentextensions/URLFilterParser.cpp:
2234         (WebCore::ContentExtensions::Term::quantify):
2235         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
2236         (WebCore::ContentExtensions::GraphBuilder::finalize):
2237         (WebCore::ContentExtensions::Term::quantifier): Deleted.
2238
2239 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
2240
2241         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
2242         https://bugs.webkit.org/show_bug.cgi?id=142940
2243
2244         Reviewed by Sam Weinig.
2245
2246         * dom/Document.cpp:
2247         (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
2248         * dom/Document.h:
2249
2250         * html/HTMLMediaSession.cpp:
2251         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
2252         * html/HTMLMediaSession.h:
2253
2254         * page/Page.cpp:
2255         (WebCore::Page::didChoosePlaybackTarget):  Ditto.
2256         * page/Page.h:
2257
2258         * platform/audio/MediaSession.h:
2259         * platform/graphics/MediaPlaybackTargetPickerClient.h:
2260         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: 
2261         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):  Ditto.
2262
2263 2015-03-22  Anders Carlsson  <andersca@apple.com>
2264
2265         _WKWebsiteDataStore should clear WebSQL databases
2266         https://bugs.webkit.org/show_bug.cgi?id=142947
2267
2268         Reviewed by Sam Weinig.
2269
2270         * Modules/webdatabase/DatabaseTracker.cpp:
2271         (WebCore::DatabaseTracker::trackerWithDatabasePath):
2272         Add a hack so we can get at a tracker from the UI process.
2273
2274         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
2275         New function that deletes all databases modified after a given time.
2276
2277         * Modules/webdatabase/DatabaseTracker.h:
2278         Add new members and export the ones we want to call from WebKit2.
2279
2280         * Modules/webdatabase/OriginLock.h:
2281         Export the destructor.
2282
2283 2015-03-21  Dean Jackson  <dino@apple.com>
2284
2285         Remove the prefix for CSS Transforms
2286         https://bugs.webkit.org/show_bug.cgi?id=142927
2287         <rdar://problem/11568151>
2288
2289         Reviewed by Simon Fraser.
2290
2291         Support the bare form of:
2292         - transform
2293         - transform-style
2294         - transform-origin
2295         - perspective
2296         - perspective-origin
2297
2298         For transform-style, we also still differentiate the prefixed property
2299         because we may want to use that as an indicator of legacy content.
2300
2301         This is mostly a find and replace, but with some related naming
2302         changes. The DOM interface for WebKitCSSTransformValue remains
2303         unchanged.
2304
2305         Tests: transforms/2d/transform-2d-prefixed.html
2306                transforms/3d/general/prefixed-3dtransform-values.html
2307
2308         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2309         (WebCore::propertyChangeMayRepaintNonDescendants):
2310         * css/CSSComputedStyleDeclaration.cpp:
2311         (WebCore::isLayoutDependent):
2312         (WebCore::ComputedStyleExtractor::propertyValue):
2313         * css/CSSParser.cpp:
2314         (WebCore::isValidKeywordPropertyAndValue):
2315         (WebCore::isKeywordPropertyID):
2316         (WebCore::parseTranslateTransformValue):
2317         (WebCore::CSSParser::parseValue):
2318         (WebCore::CSSParser::parseTransformOrigin):
2319         (WebCore::CSSParser::parsePerspectiveOrigin):
2320         * css/CSSPropertyNames.in:
2321         * css/StyleProperties.cpp:
2322         (WebCore::StyleProperties::getPropertyValue):
2323         (WebCore::StyleProperties::asText):
2324         * css/WebKitCSSMatrix.cpp:
2325         (WebCore::WebKitCSSMatrix::setMatrixValue):
2326         * html/track/VTTCue.cpp:
2327         (WebCore::VTTCueBox::applyCSSProperties):
2328         * page/animation/AnimationController.cpp:
2329         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
2330         * page/animation/CSSPropertyAnimation.cpp:
2331         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2332         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2333         * page/animation/CompositeAnimation.cpp:
2334         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2335         * page/animation/ImplicitAnimation.cpp:
2336         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2337         * page/animation/KeyframeAnimation.cpp:
2338         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2339         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2340         * platform/graphics/GraphicsLayer.cpp:
2341         (WebCore::GraphicsLayer::validateTransformOperations):
2342         * platform/graphics/GraphicsLayerClient.h:
2343         * platform/graphics/ca/GraphicsLayerCA.cpp:
2344         (WebCore::propertyIdToString):
2345         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2346         (WebCore::GraphicsLayerCA::addAnimation):
2347         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
2348         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2349         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2350         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2351         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2352         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2353         (WebCore::TextureMapperAnimation::applyInternal):
2354         * platform/graphics/texmap/TextureMapperLayer.cpp:
2355         (WebCore::TextureMapperLayer::syncAnimations):
2356         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2357         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
2358         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
2359         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2360         * rendering/RenderLayerBacking.cpp:
2361         (WebCore::RenderLayerBacking::updateGeometry):
2362         (WebCore::RenderLayerBacking::startAnimation):
2363         (WebCore::RenderLayerBacking::startTransition):
2364         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2365         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2366         * rendering/RenderLayerCompositor.cpp:
2367         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2368         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
2369         * svg/SVGElement.cpp:
2370         (WebCore::populateAttributeNameToCSSPropertyIDMap):
2371
2372 2015-03-21  Commit Queue  <commit-queue@webkit.org>
2373
2374         Unreviewed, rolling out r181824.
2375         https://bugs.webkit.org/show_bug.cgi?id=142935
2376
2377         Broke Windows build (Requested by ap on #webkit).
2378
2379         Reverted changeset:
2380
2381         "Remove the prefix for CSS Transforms"
2382         https://bugs.webkit.org/show_bug.cgi?id=142927
2383         http://trac.webkit.org/changeset/181824
2384
2385 2015-03-20  Dean Jackson  <dino@apple.com>
2386
2387         Remove the prefix for CSS Transforms
2388         https://bugs.webkit.org/show_bug.cgi?id=142927
2389         <rdar://problem/11568151>
2390
2391         Reviewed by Simon Fraser.
2392
2393         Support the bare form of:
2394         - transform
2395         - transform-style
2396         - transform-origin
2397         - perspective
2398         - perspective-origin
2399
2400         For transform-style, we also still differentiate the prefixed property
2401         because we may want to use that as an indicator of legacy content.
2402
2403         This is mostly a find and replace, but with some related naming
2404         changes. The DOM interface for WebKitCSSTransformValue remains
2405         unchanged.
2406
2407         Tests: transforms/2d/transform-2d-prefixed.html
2408                transforms/3d/general/prefixed-3dtransform-values.html
2409
2410         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2411         (WebCore::propertyChangeMayRepaintNonDescendants):
2412         * css/CSSComputedStyleDeclaration.cpp:
2413         (WebCore::isLayoutDependent):
2414         (WebCore::ComputedStyleExtractor::propertyValue):
2415         * css/CSSParser.cpp:
2416         (WebCore::isValidKeywordPropertyAndValue):
2417         (WebCore::isKeywordPropertyID):
2418         (WebCore::parseTranslateTransformValue):
2419         (WebCore::CSSParser::parseValue):
2420         (WebCore::CSSParser::parseTransformOrigin):
2421         (WebCore::CSSParser::parsePerspectiveOrigin):
2422         * css/CSSPropertyNames.in:
2423         * css/StyleProperties.cpp:
2424         (WebCore::StyleProperties::getPropertyValue):
2425         (WebCore::StyleProperties::asText):
2426         * css/WebKitCSSMatrix.cpp:
2427         (WebCore::WebKitCSSMatrix::setMatrixValue):
2428         * html/track/VTTCue.cpp:
2429         (WebCore::VTTCueBox::applyCSSProperties):
2430         * page/animation/AnimationController.cpp:
2431         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
2432         * page/animation/CSSPropertyAnimation.cpp:
2433         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2434         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2435         * page/animation/CompositeAnimation.cpp:
2436         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2437         * page/animation/ImplicitAnimation.cpp:
2438         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2439         * page/animation/KeyframeAnimation.cpp:
2440         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2441         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2442         * platform/graphics/GraphicsLayer.cpp:
2443         (WebCore::GraphicsLayer::validateTransformOperations):
2444         * platform/graphics/GraphicsLayerClient.h:
2445         * platform/graphics/ca/GraphicsLayerCA.cpp:
2446         (WebCore::propertyIdToString):
2447         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2448         (WebCore::GraphicsLayerCA::addAnimation):
2449         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
2450         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2451         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2452         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2453         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2454         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2455         (WebCore::TextureMapperAnimation::applyInternal):
2456         * platform/graphics/texmap/TextureMapperLayer.cpp:
2457         (WebCore::TextureMapperLayer::syncAnimations):
2458         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2459         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
2460         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
2461         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2462         * rendering/RenderLayerBacking.cpp:
2463         (WebCore::RenderLayerBacking::updateGeometry):
2464         (WebCore::RenderLayerBacking::startAnimation):
2465         (WebCore::RenderLayerBacking::startTransition):
2466         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2467         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2468         * rendering/RenderLayerCompositor.cpp:
2469         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2470         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
2471         * svg/SVGElement.cpp:
2472         (WebCore::populateAttributeNameToCSSPropertyIDMap):
2473
2474 2015-03-20  Yusuke Suzuki  <utatane.tea@gmail.com>
2475
2476         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
2477         https://bugs.webkit.org/show_bug.cgi?id=142410
2478
2479         Reviewed by Geoffrey Garen.
2480
2481         The same issues are found in the existing code; PropertyName does not have ownership.
2482         This patch rewrite the point that should have ownership to Identifier.
2483
2484         * bindings/js/JSDOMWindowCustom.cpp:
2485         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2486         (WebCore::JSDOMWindow::putByIndex):
2487         * bindings/js/ReadableStreamJSSource.cpp:
2488         (WebCore::getInternalSlotFromObject):
2489         * bindings/scripts/CodeGeneratorJS.pm:
2490         (GenerateImplementation):
2491         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2492         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
2493         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2494         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
2495         * bindings/scripts/test/JS/JSTestInterface.cpp:
2496         (WebCore::JSTestInterface::putByIndex):
2497
2498 2015-03-20  Simon Fraser  <simon.fraser@apple.com>
2499
2500         Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
2501         https://bugs.webkit.org/show_bug.cgi?id=142917
2502
2503         Reviewed by Beth Dakin.
2504         
2505         The scrollperf test would fail to detect transitions between slow and fast scrolling
2506         for new pages, because there was no logging when slow-scrolling scrolling tree was
2507         torn down, and a new fast-scrolling tree constructed.
2508         
2509         Fix by always logging the slow-scrolling reasons in the first update of the
2510         ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
2511         changed.
2512
2513         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2514         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2515         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2516         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2517
2518 2015-03-19  Geoffrey Garen  <ggaren@apple.com>
2519
2520         Function.prototype.toString should not decompile the AST
2521         https://bugs.webkit.org/show_bug.cgi?id=142853
2522
2523         Reviewed by Sam Weinig.
2524
2525         * bindings/js/JSLazyEventListener.cpp:
2526         (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
2527         number of attribute event listeners to account for the leading newline
2528         now added by JavaScriptCore.
2529
2530         This solution is not perfect, but there are a lot of pre-existing problems
2531         with line and column reporting for attribute event listeners, and this
2532         preserves existing behavior with reasonable reliability.
2533
2534 2015-03-20  Alex Christensen  <achristensen@webkit.org>
2535
2536         Progress towards CMake on Mac.
2537         https://bugs.webkit.org/show_bug.cgi?id=136003
2538
2539         Reviewed by Chris Dumez.
2540
2541         * PlatformMac.cmake:
2542         Added some directories to create forwarding headers from.
2543         Generate ObjC bindings.
2544
2545 2015-03-20  Per Arne Vollan  <peavo@outlook.com>
2546
2547         [WinCairo] Crash when leaving page while video is playing.
2548         https://bugs.webkit.org/show_bug.cgi?id=142578
2549
2550         Reviewed by Alex Christensen.
2551
2552         This can happen when there is an asynchronous event invoked from a video worker
2553         thread, accessing the media player object after it has been deleted.
2554         This is solved by resetting the media player pointer in the event object,
2555         when the media player is deleted.
2556
2557         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2558         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
2559         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
2560         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
2561         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
2562         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
2563         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
2564         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
2565         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
2566         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2567         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
2568         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
2569         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
2570
2571 2015-03-20  Chris Dumez  <cdumez@apple.com>
2572
2573         Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
2574         https://bugs.webkit.org/show_bug.cgi?id=142911
2575
2576         Reviewed by Antti Koivisto.
2577
2578         Drop the isBackForwardLoadType(m_loadType) assertion in
2579         FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
2580         used to hold true when goToBackForwardItem() was only called with
2581         history navigation load types. However, after r181782, we use a Standard
2582         load in the cases where we do not wish to display stale content (e.g.
2583         restoring session state).
2584
2585         The assertion comment says "We only use cache-only loads to avoid
2586         resubmitting forms". However, we then call loadDifferentDocumentItem()
2587         which already takes care of using the ReturnCacheDataElseLoad cache
2588         policy as the HistoryItem has form data and we pass
2589         MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
2590
2591         No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
2592         API test.
2593
2594         * loader/FrameLoader.cpp:
2595         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
2596
2597 2015-03-20  Andy Estes  <aestes@apple.com>
2598
2599         [Content Filtering] Adopt NEFilterSource unblock handling
2600         https://bugs.webkit.org/show_bug.cgi?id=142904
2601
2602         Reviewed by Andreas Kling.
2603
2604         * platform/cocoa/NetworkExtensionContentFilter.mm:
2605         (WebCore::NetworkExtensionContentFilter::unblockHandler):
2606         Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
2607         * platform/cocoa/ParentalControlsContentFilter.mm:
2608         (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
2609
2610 2015-03-19  Andy Estes  <aestes@apple.com>
2611
2612         [Content Filtering] Add tests for unblock requests
2613         https://bugs.webkit.org/show_bug.cgi?id=142900
2614
2615         Reviewed by Andreas Kling.
2616
2617         Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
2618         WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
2619         and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
2620         successful then we schedule a reload of the frame in order to display the unblocked document.
2621
2622         NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
2623         content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
2624         and writes tests to cover both allowed and denied unblock requests.
2625
2626         The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
2627         when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
2628         the context of its error page if the unblock is denied.
2629
2630         All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
2631         Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
2632         existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
2633
2634         Tests: contentfiltering/allow-after-unblock-request.html
2635                contentfiltering/block-after-unblock-request.html
2636
2637         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
2638         (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
2639         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
2640         (WebCore::toJSValue): Returns a JSValue from a Decision.
2641         (WebCore::toDecision): Returns a Decision from a JSValue.
2642         (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
2643         (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
2644         (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
2645         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
2646         * loader/ContentFilter.cpp:
2647         (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
2648         (WebCore::ContentFilter::ContentFilter): Ditto.
2649         (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
2650         unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
2651         * loader/ContentFilter.h:
2652         * loader/DocumentLoader.cpp:
2653         (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
2654         * loader/FrameLoader.cpp:
2655         (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
2656         * loader/PolicyChecker.cpp:
2657         (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
2658         (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
2659         Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
2660         be called in the UI process).
2661         * loader/PolicyChecker.h:
2662         (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
2663         * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
2664         copied by background threads managed by the underlying platform.
2665         * platform/ContentFilterUnblockHandler.h:
2666         (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
2667         (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
2668         (WebCore::ContentFilterUnblockHandler::clear): Deleted.
2669         * platform/PlatformContentFilter.h:
2670         (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
2671         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2672         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
2673         unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
2674         WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
2675         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
2676         (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
2677         (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
2678         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
2679         or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
2680         (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
2681         is enabled on iOS, dispatch it there.
2682         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
2683         Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
2684         (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
2685         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
2686         * platform/cocoa/ParentalControlsContentFilter.mm:
2687         (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
2688         * testing/MockContentFilter.cpp: Added using statments for clarity.
2689         (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
2690         (WebCore::MockContentFilter::canHandleResponse): Used the helper.
2691         (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
2692         (WebCore::MockContentFilter::addData): Ditto.
2693         (WebCore::MockContentFilter::finishedAddingData): Ditto.
2694         (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
2695         (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
2696         error page when an unblock request is denied.
2697         (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
2698         * testing/MockContentFilterSettings.cpp:
2699         (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
2700         * testing/MockContentFilterSettings.h:
2701         (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
2702         (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
2703         (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
2704         * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
2705
2706 2015-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2707
2708         [GTK] Crash due to empty drag image during drag-and-drop
2709         https://bugs.webkit.org/show_bug.cgi?id=142671
2710
2711         Reviewed by Philippe Normand.
2712
2713         Return early from ImageBuffer constructor if an empty size is
2714         given. This is a speculative fix for a crash while starting a drag
2715         and drop operation, that I haven't been able to reproduce.
2716
2717         * platform/graphics/cairo/ImageBufferCairo.cpp:
2718         (WebCore::ImageBuffer::ImageBuffer):
2719
2720 2015-03-19  Chris Dumez  <cdumez@apple.com>
2721
2722         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
2723         https://bugs.webkit.org/show_bug.cgi?id=142893
2724         <rdar://problem/19633737>
2725         <rdar://problem/19869257>
2726
2727         Reviewed by Antti Koivisto.
2728
2729         Always use ReturnCacheDataElseLoad cache policy for history navigations.
2730         Previously, we would use the default protocol cache policy for history
2731         navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
2732         false so that we do not display stale content when restoring the session
2733         state of Safari statup (rdar://problem/8131355). This is now handled
2734         before reaching this method by no longer using "IndexedBackForward"
2735         FrameLoadType when restoring session tabs, and using "Standard" load
2736         type instead.
2737
2738         * loader/FrameLoader.cpp:
2739         (WebCore::FrameLoader::loadDifferentDocumentItem):
2740
2741 2015-03-19  Andy Estes  <aestes@apple.com>
2742
2743         [Content Filtering] Move ContentFilter to from platform/ to loader/
2744         https://bugs.webkit.org/show_bug.cgi?id=142897
2745
2746         Reviewed by Dan Bernstein.
2747
2748         ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
2749         Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
2750         the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
2751         individual filters inherit from.
2752
2753         * WebCore.xcodeproj/project.pbxproj:
2754         * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
2755         (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
2756         (WebCore::ContentFilter::createIfNeeded): Ditto.
2757         (WebCore::ContentFilter::ContentFilter): Ditto.
2758         (WebCore::ContentFilter::addData): Ditto.
2759         (WebCore::ContentFilter::finishedAddingData): Ditto.
2760         (WebCore::ContentFilter::needsMoreData): Ditto.
2761         (WebCore::ContentFilter::didBlockData): Ditto.
2762         (WebCore::ContentFilter::getReplacementData): Ditto.
2763         (WebCore::ContentFilter::unblockHandler): Ditto.
2764         * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
2765         (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
2766         * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
2767         * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
2768         * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
2769         * testing/MockContentFilter.h: Ditto.
2770
2771 2015-03-19  Dean Jackson  <dino@apple.com>
2772
2773         CSS Animations with triggers should map scroll position to duration
2774         https://bugs.webkit.org/show_bug.cgi?id=142870
2775         <rdar://problem/20227244>
2776
2777         Reviewed by Simon Fraser.
2778
2779         Expose a prototype implementation of what will eventually be called
2780         animation-timebase, mapping the scroll location to the duration of an
2781         animation. This only applies if the animation has a start and end
2782         trigger.
2783
2784         Test: animations/trigger-container-scroll-boundaries.html
2785
2786         * css/CSSComputedStyleDeclaration.cpp:
2787         (WebCore::createAnimationTriggerValue): Change to downcast.
2788
2789         * css/CSSToStyleMap.cpp:
2790         (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
2791         telling the ScrollAnimationTrigger object whether or not it had
2792         an end value. This wasn't visible before because we were not using
2793         the end value.
2794
2795         * page/animation/AnimationBase.cpp:
2796         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
2797         change to using a downcast.
2798         (WebCore::AnimationBase::timeToNextService): Change to downcast.
2799         (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
2800         (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
2801         on the scroll position relative to the start and end trigger spots.
2802
2803         * page/animation/AnimationController.cpp:
2804         (WebCore::AnimationControllerPrivate::updateAnimations): Since this
2805         can potentially call into beginAnimationUpdateTime, it should have
2806         an update blocker. This fixes the assert we were seeing in tests.
2807         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
2808         position so we don't need to ask for it all the time.
2809         * page/animation/AnimationControllerPrivate.h:
2810         (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
2811
2812         * platform/animation/AnimationTrigger.h: Add downcast macros.
2813         (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
2814         parameters rather than a separate value.
2815         (WebCore::ScrollAnimationTrigger::hasEndValue):
2816         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
2817         (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
2818
2819         * platform/graphics/ca/GraphicsLayerCA.cpp:
2820         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
2821         animation of this sort, we can't use a CAAnimation.
2822
2823 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
2824
2825         [Mac] Move MediaPlaybackTargetPicker
2826         https://bugs.webkit.org/show_bug.cgi?id=142889
2827
2828         Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
2829         can be used by both WK2 and WK1.
2830
2831         Reviewed by Tim Horton.
2832
2833         * WebCore.xcodeproj/project.pbxproj:
2834         * platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
2835         * platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
2836         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
2837         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.
2838
2839 2015-03-19  Enrica Casucci  <enrica@apple.com>
2840
2841         REGRESSION (r109593): Clicking after last inline element could cause a crash.
2842         https://bugs.webkit.org/show_bug.cgi?id=142880
2843         rdar://problem/17222294
2844
2845         Reviewed by Ryosuke Niwa.
2846
2847         Test: editing/selection/click-after-last-inline-crash.html
2848
2849         * rendering/RootInlineBox.cpp:
2850         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
2851
2852 2015-03-19  Enrica Casucci  <enrica@apple.com>
2853
2854         One more build fix after r181760.
2855
2856         * page/EventHandler.cpp:
2857         (WebCore::EventHandler::handleDrag):
2858
2859 2015-03-19  Jessie Berlin  <jberlin@webkit.org>
2860
2861         Build fix after r181760.
2862
2863         * rendering/RenderAttachment.h:
2864
2865 2015-03-19  Jer Noble  <jer.noble@apple.com>
2866
2867         [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
2868         https://bugs.webkit.org/show_bug.cgi?id=142132
2869
2870         Reviewed by Tim Horton.
2871
2872         Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.
2873
2874         * platform/graphics/GeometryUtilities.cpp:
2875         (WebCore::smallestRectWithAspectRatioAroundRect):
2876         * platform/graphics/GeometryUtilities.h:
2877
2878 2015-03-19  Chris Dumez  <cdumez@apple.com>
2879
2880         Get rid of "CachePolicyCache" cache policy
2881         https://bugs.webkit.org/show_bug.cgi?id=142881
2882
2883         Reviewed by Antti Koivisto.
2884
2885         Get rid of "CachePolicyCache" cache policy as it is unused.
2886
2887         * loader/cache/CachePolicy.h:
2888         * loader/cache/CachedResource.cpp:
2889         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
2890         * page/DiagnosticLoggingKeys.cpp:
2891         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
2892         * page/DiagnosticLoggingKeys.h:
2893
2894 2015-03-19  Alex Christensen  <achristensen@webkit.org>
2895
2896         [Content Extensions] Test regular expression parse failures.
2897         https://bugs.webkit.org/show_bug.cgi?id=142872
2898
2899         Reviewed by Benjamin Poulain.
2900
2901         * contentextensions/URLFilterParser.cpp:
2902         (WebCore::ContentExtensions::GraphBuilder::finalize):
2903         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2904         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2905         (WebCore::ContentExtensions::URLFilterParser::statusString):
2906         * contentextensions/URLFilterParser.h:
2907         Changed failures that can never happen to assertions.
2908
2909 2015-03-19  Enrica Casucci  <enrica@apple.com>
2910
2911         Release build fix after https://trac.webkit.org/r181760.
2912
2913         Unreviewed.
2914
2915         * page/EventHandler.cpp:
2916         (WebCore::EventHandler::handleDrag):
2917
2918 2015-03-19  Enrica Casucci  <enrica@apple.com>
2919
2920         <attachment> should put URLs on the pasteboard so that Finder can accept drops.
2921         https://bugs.webkit.org/show_bug.cgi?id=142801
2922         rdar://problem/19982527
2923
2924         Reviewed by Tim Horton.
2925
2926         Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html
2927
2928         This patch adds all the necessary support to write attachment elements into
2929         the pasteboard, including the promised type.
2930
2931         * WebCore.xcodeproj/project.pbxproj:
2932         * page/DragActions.h:
2933         * page/DragClient.h:
2934         (WebCore::DragClient::declareAndWriteAttachment):
2935         * page/DragController.cpp:
2936         (WebCore::DragController::draggableElement):
2937         (WebCore::DragController::startDrag):
2938         * page/DragController.h:
2939         (WebCore::DragController::draggingAttachmentURL):
2940         * page/EventHandler.cpp:
2941         (WebCore::EventHandler::dragHysteresisExceeded):
2942         (WebCore::EventHandler::handleDrag):
2943         * page/mac/DragControllerMac.mm:
2944         (WebCore::DragController::declareAndWriteAttachment):
2945         * page/win/DragControllerWin.cpp:
2946         (WebCore::DragController::declareAndWriteAttachment):
2947         * platform/URL.cpp:
2948         (WebCore::URL::fileURLWithFileSystemPath):
2949         * platform/URL.h:
2950         * rendering/HitTestResult.cpp:
2951         (WebCore::HitTestResult::absoluteAttachmentURL):
2952         * rendering/HitTestResult.h:
2953
2954 2015-03-19  Chris Dumez  <cdumez@apple.com>
2955
2956         Unreviewed, fix linking error after r181753.
2957
2958         Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
2959         now inlined.
2960
2961         * page/Settings.h:
2962         (WebCore::Settings::minimumDOMTimerInterval):
2963
2964 2015-03-19  Brady Eidson  <beidson@apple.com>
2965
2966         Part of content extensions should apply css selectors
2967         https://bugs.webkit.org/show_bug.cgi?id=142604
2968
2969         Reviewed by Alex Christensen.
2970
2971         Add a new action for applying the cached global stylesheet.
2972
2973         * contentextensions/CompiledContentExtension.cpp:
2974         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
2975
2976         * contentextensions/ContentExtensionActions.h:
2977
2978         * contentextensions/ContentExtensionCompiler.cpp:
2979         (WebCore::ContentExtensions::serializeActions):
2980
2981         * contentextensions/ContentExtensionParser.cpp:
2982         (WebCore::ContentExtensions::loadAction):
2983
2984         * contentextensions/ContentExtensionRule.cpp:
2985         (WebCore::ContentExtensions::Action::deserialize):
2986         * contentextensions/ContentExtensionRule.h:
2987         (WebCore::ContentExtensions::Action::Action):
2988         (WebCore::ContentExtensions::Action::operator==):
2989         (WebCore::ContentExtensions::Action::stringArgument):
2990         (WebCore::ContentExtensions::Action::cssSelector): Deleted.
2991
2992         * contentextensions/ContentExtensionsBackend.cpp:
2993         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2994
2995         * loader/cache/CachedResourceLoader.cpp:
2996         (WebCore::CachedResourceLoader::requestResource):
2997
2998 2015-03-19  Chris Dumez  <cdumez@apple.com>
2999
3000         Clean up DOMTimer related settings
3001         https://bugs.webkit.org/show_bug.cgi?id=142837
3002
3003         Reviewed by Darin Adler.
3004
3005         Clean up DOMTimer related settings:
3006         - Make default minimum timer interval 4ms instead of 10ms as all ports
3007           were setting it to 4ms and the specifications says 4ms.
3008         - Get rid of setters for default DOMTimer interval values as they are
3009           not set anymore.
3010         - Move default DOMTimer interval values from Settings to DOMTimer as
3011           those are global (not per-page) and not really settings.
3012         - Stop using abbreviations in the names (e.g. min -> minimum).
3013         - Move DOMTimer settings members from Page to Settings. There is no
3014           reason for those to be stored on the Page. The getters were private
3015           so call-sites had to go via Settings anyway. Also, call-sites already
3016           had to do a null check on the page to get the settings. It seems
3017           unfortunate for the settings to do another null-check on the page for
3018           retrieving the setting value from the page.
3019         - Inline the DOMTimer settings getters as these are trivial.
3020
3021         * dom/Document.cpp:
3022         (WebCore::Document::minimumTimerInterval):
3023         (WebCore::Document::timerAlignmentInterval):
3024         * dom/ScriptExecutionContext.cpp:
3025         (WebCore::ScriptExecutionContext::minimumTimerInterval):
3026         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
3027         * page/DOMTimer.h:
3028         * page/Page.cpp:
3029         (WebCore::Page::Page):
3030         (WebCore::Page::setTimerThrottlingEnabled):
3031         (WebCore::Page::setMinimumTimerInterval): Deleted.
3032         (WebCore::Page::minimumTimerInterval): Deleted.
3033         * page/Page.h:
3034         (WebCore::Page::timerAlignmentInterval): Deleted.
3035         * page/Settings.cpp:
3036         (WebCore::Settings::Settings):
3037         (WebCore::Settings::setMinimumDOMTimerInterval):
3038         (WebCore::Settings::setDOMTimerAlignmentInterval):
3039         (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
3040         (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
3041         (WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
3042         (WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
3043         (WebCore::Settings::setMinDOMTimerInterval): Deleted.
3044         (WebCore::Settings::minDOMTimerInterval): Deleted.
3045         (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
3046         (WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
3047         (WebCore::Settings::domTimerAlignmentInterval): Deleted.
3048         * page/Settings.h:
3049         (WebCore::Settings::minimumDOMTimerInterval):
3050         (WebCore::Settings::domTimerAlignmentInterval):
3051         * testing/InternalSettings.cpp:
3052         (WebCore::InternalSettings::Backup::Backup):
3053         (WebCore::InternalSettings::Backup::restoreTo):
3054         (WebCore::InternalSettings::setMinimumTimerInterval):
3055
3056 2015-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3057
3058         [GTK] Scrollbars look bad with GTK+ 3.16
3059         https://bugs.webkit.org/show_bug.cgi?id=140800
3060
3061         Reviewed by Sergio Villar Senin.
3062
3063         Take margin into account when rendering scrollbars. This fixes the
3064         huge scrollbars rendered with GTK+ 3.16. We don't need to check
3065         the GTK+ version because in previous versions the marging were 0,
3066         so the same code just works.
3067
3068         * platform/gtk/ScrollbarThemeGtk.cpp:
3069         (WebCore::adjustRectAccordingToMargin):
3070         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
3071         (WebCore::ScrollbarThemeGtk::paintThumb):
3072
3073 2015-03-19  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3074
3075         [Streams API] Update ReadableStream API according new version of the specification
3076         https://bugs.webkit.org/show_bug.cgi?id=142822
3077
3078         Reviewed by Benjamin Poulain.
3079
3080         This patch updates the IDL of ReadableStream according the new version of the spec, which splits functionality between ReadableStream and ReadableStreamReader.
3081         In particular, this patch removes read(), ready, closed and state from ReadableStream and it adds the getReader method.
3082
3083         Covered by updated readablestream-constructor.html test.
3084
3085         * Modules/streams/ReadableStream.cpp:
3086         (WebCore::ReadableStream::ReadableStream):
3087         (WebCore::ReadableStream::state): Deleted.
3088         (WebCore::ReadableStream::closed): Deleted.
3089         (WebCore::ReadableStream::ready): Deleted.
3090         * Modules/streams/ReadableStream.h:
3091         (WebCore::ReadableStream::internalState): Added to make mac build system happy, to be used by ReadableStreamReader.
3092         * Modules/streams/ReadableStream.idl:
3093         * bindings/js/JSReadableStreamCustom.cpp:
3094         (WebCore::JSReadableStream::cancel):
3095         (WebCore::JSReadableStream::getReader):
3096         (WebCore::JSReadableStream::read): Deleted.
3097         (WebCore::getOrCreatePromiseDeferredFromObject): Deleted.
3098         (WebCore::readyPromiseSlotName): Deleted.
3099         (WebCore::JSReadableStream::ready): Deleted.
3100         (WebCore::closedPromiseSlotName): Deleted.
3101         (WebCore::JSReadableStream::closed): Deleted.
3102
3103 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
3104
3105         Unreviewed. GTK build fix after r181720.
3106
3107         * rendering/RenderImage.cpp:
3108         (WebCore::RenderImage::styleDidChange):
3109
3110 2015-03-18  Antti Koivisto  <antti@apple.com>
3111
3112         Test disk cache behavior when using back navigation cache policy
3113         https://bugs.webkit.org/show_bug.cgi?id=142848
3114
3115         Reviewed by Chris Dumez.
3116
3117         Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.
3118
3119         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
3120
3121         * loader/FrameLoader.cpp:
3122         (WebCore::FrameLoader::addExtraFieldsToRequest):
3123         * loader/FrameLoader.h:
3124         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
3125         * testing/Internals.cpp:
3126         (WebCore::Internals::setOverrideCachePolicy):
3127         * testing/Internals.h:
3128         * testing/Internals.idl:
3129
3130 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
3131
3132         TextFragment#start() is always >= 0 since its type is unsigned
3133         https://bugs.webkit.org/show_bug.cgi?id=142860
3134
3135         Reviewed by Andreas Kling.
3136
3137         Since TextFragment::m_start is unsigned, the result of
3138         TextFragment::start() is always >= 0 and assertion is not effective.
3139         This patch removes this assertion to suppress warnings.
3140
3141         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3142         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
3143
3144 2015-03-18  Alex Christensen  <achristensen@webkit.org>
3145
3146         [ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
3147         https://bugs.webkit.org/show_bug.cgi?id=142799
3148
3149         Reviewed by Brady Eidson.
3150
3151         * WebCore.xcodeproj/project.pbxproj:
3152         Make private headers to use with API tests.
3153         * contentextensions/CompiledContentExtension.cpp:
3154         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
3155         * contentextensions/CompiledContentExtension.h:
3156         Added method to get only the selectors from the root of the DFA, which apply to all URLs.
3157         * contentextensions/ContentExtensionCompiler.cpp:
3158         (WebCore::ContentExtensions::compileRuleList):
3159         Added checking if the trigger will match everything.
3160         These actions can be put directly on the root of the DFA without adding extra epsilon transitions to the NFA.
3161         * contentextensions/DFA.h:
3162         (WebCore::ContentExtensions::DFA::nodeAt):
3163         * contentextensions/DFABytecodeInterpreter.cpp:
3164         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
3165         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3166         * contentextensions/DFABytecodeInterpreter.h:
3167         * contentextensions/NFA.h:
3168         * contentextensions/URLFilterParser.cpp:
3169         (WebCore::ContentExtensions::Term::quantifier):
3170         Sink terms to a vector then add nodes to NFA when finalizing after checking for regexes that match everything.
3171         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
3172         (WebCore::ContentExtensions::GraphBuilder::finalize):
3173         (WebCore::ContentExtensions::GraphBuilder::parseStatus):
3174         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
3175         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
3176         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
3177         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
3178         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
3179         (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
3180         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
3181         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
3182         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
3183         (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
3184         (WebCore::ContentExtensions::GraphBuilder::disjunction):
3185         (WebCore::ContentExtensions::GraphBuilder::hasError):
3186         (WebCore::ContentExtensions::GraphBuilder::fail):
3187         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
3188         (WebCore::ContentExtensions::URLFilterParser::addPattern):
3189         (WebCore::ContentExtensions::URLFilterParser::statusString):
3190         (WebCore::ContentExtensions::GraphBuilder::errorMessage): Deleted.
3191         * contentextensions/URLFilterParser.h:
3192         Use an enum instead of strings for the status to avoid checking strings when we have a regex that matches everything.
3193
3194 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
3195
3196         Fix build failure due to FALLTHROUGH in unreachable code
3197         https://bugs.webkit.org/show_bug.cgi?id=142703
3198
3199         Reviewed by Benjamin Poulain.
3200
3201         FALLTHROUGH should not exist in unreachable code marked by
3202         ASSERT_NOT_REACHABLE.
3203
3204         When !ENABLE(CSS_SELECTOR_JIT) and Debug mode is enabled,
3205         both ASSERT_NOT_REACHED and FALLTHROUGH are instantiated
3206         and it cause build failure.
3207
3208         Here, since CompiledSingle/CompiledSingleWithRootFilter are
3209         not set when !ENABLE(CSS_SELECTOR_JIT). So dropping FALLTHROUGH
3210         and leave ASSERT_NOT_REACHED.
3211         And since ASSERT_NOT_ReACHED is stripped when Release build,
3212         I've inserted FALLTHROUGH() if ASSERT_DISABLED.
3213         This fix is the same to r162906.
3214
3215         * dom/SelectorQuery.cpp:
3216         (WebCore::SelectorDataList::execute):
3217
3218 2015-03-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
3219
3220         Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size.
3221         https://bugs.webkit.org/show_bug.cgi?id=142805.
3222
3223         Reviewed by Darin Adler.
3224         
3225         The bug happens due to wrong logic in RenderImage::imageDimensionsChanged().
3226         This function decides to setNeedsLayout() if the intrinsic size of the image
3227         changes. If the size does not change, it only repaints the image rectangle.
3228         When switching the src of the an image between two SVG images and both of
3229         them have no intrinsic size, we do not updateInnerContentRect() and this
3230         means an SVGImageForContainer is not going to be created for this image.
3231         When the image is drawn, it is drawn directly from the SVGImage. And this
3232         means the drawing has to be scaled by container_size / SVG_default_intrinsic_size
3233         
3234         After figuring out that I need to updateInnerContentRect() to fix this bug,
3235         I found out Blink has already changed this code to do the same thing. But 
3236         they also did more clean-up in this function. Here is the link
3237         https://codereview.chromium.org/114323004. I think their change seems correct
3238         although they did not say what exactly they were trying to fix.
3239         
3240         The plan for repaintOrMarkForLayout(), which is the new name of this function,
3241         is the following:
3242             -- setNeedLayout() if the intrinsic size changes and it affects the size
3243                of the image.
3244             -- updateInnerContentRect() if the intrinsic size did not change but the
3245                image has exiting layout.
3246             -- repaint the image rectangle if layout is not needed.
3247             
3248         This change also removes the call to computeLogicalWidthInRegion(), which is
3249         almost running a layout for the image. This call figures out whether the image
3250         needs to setNeedsLayout(). This call is unnecessary; the image needs to run a
3251         layout if the intrinsic size has changed and it affects the size of the image.
3252                     
3253         Test: svg/as-image/svg-no-intrinsic-size-switching.html
3254
3255         * rendering/RenderImage.cpp:
3256         (WebCore::RenderImage::styleDidChange): Change the function call.
3257         (WebCore::RenderImage::imageChanged): Rename local variable and change the
3258         function call.
3259         
3260         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
3261         Call setIntrinsicSize() with the new size unless the image is in error state.
3262         
3263         (WebCore::RenderImage::repaintOrMarkForLayout): This a better name for this
3264         function since it is called even if the intrinsic size was not changed.
3265         (WebCore::RenderImage::imageDimensionsChanged): Deleted.
3266         
3267         * rendering/RenderImage.h: Rename imageDimensionsChanged() and change the 
3268         updateIntrinsicSizeIfNeeded() to return void.
3269         
3270         * rendering/svg/RenderSVGForeignObject.cpp:
3271         (WebCore::RenderSVGForeignObject::paint): Code cleanup. This function can
3272         only handle the paint phases PaintPhaseForeground and PaintPhaseSelection.
3273         Use this information to simplify the logic and order of painting there.
3274
3275 2015-03-18  Jeremy Jones  <jeremyj@apple.com>
3276
3277         Fix typo in playerViewControllerWillCancelOptimizedFullscree.
3278         https://bugs.webkit.org/show_bug.cgi?id=142745
3279
3280         Reviewed by Darin Adler.
3281
3282         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3283         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
3284         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.
3285
3286 2015-03-18  Simon Fraser  <simon.fraser@apple.com>
3287
3288         Avoid repaints when changing transform on an element with multiple background images
3289         https://bugs.webkit.org/show_bug.cgi?id=142841
3290
3291         Reviewed by Zalan Bujtas.
3292         
3293         Replace the cheap test for changed images in RenderElement::updateFillImages()
3294         with an exhaustive test that walks the entire list of background images,
3295         since any ensuing repaint is way more expensive than a slightly more expensive check here.
3296         
3297         Test: fast/repaint/multiple-backgrounds-style-change.html
3298
3299         * rendering/RenderElement.cpp:
3300         (WebCore::RenderElement::updateFillImages):
3301         * rendering/style/FillLayer.cpp:
3302         (WebCore::layerImagesIdentical): See if both images are the same (either none
3303         or both mask images, and same image pointer).
3304         (WebCore::FillLayer::imagesIdentical): Walk the two FillLayer lists, checking the images
3305         on each one. Returns false if we reach the end of one list before the other, or the images
3306         are different.
3307         * rendering/style/FillLayer.h: New static function; static because
3308         it compares two FillLayer lists, and I think that makes more sense than
3309         a member function.
3310
3311 2015-03-18  Anders Carlsson  <andersca@apple.com>
3312
3313         Pass cookies by reference in CookieHash functions
3314         https://bugs.webkit.org/show_bug.cgi?id=142839
3315
3316         Reviewed by Sam Weinig.
3317
3318         * platform/Cookie.h:
3319         (WebCore::CookieHash::hash):
3320         (WebCore::CookieHash::equal):
3321
3322 2015-03-18  Tim Horton  <timothy_horton@apple.com>
3323
3324         Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
3325
3326         * dom/SelectorQuery.cpp:
3327         (WebCore::SelectorDataList::execute):
3328
3329 2015-03-18  Myles C. Maxfield  <mmaxfield@apple.com>
3330
3331         Call CTFontSetRenderingParameters before rendering text
3332         https://bugs.webkit.org/show_bug.cgi?id=142816
3333
3334         Reviewed by Darin Adler.
3335
3336         No new tests.
3337
3338         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3339         (WebCore::showGlyphsWithAdvances):
3340         * platform/spi/cocoa/CoreTextSPI.h:
3341
3342 2015-03-18  Chris Dumez  <cdumez@apple.com>
3343
3344         [WK2] Log the number of network cache requests that we have never seen before
3345         https://bugs.webkit.org/show_bug.cgi?id=142828
3346         <rdar://problem/19632130>
3347
3348         Reviewed by Antti Koivisto.
3349
3350         Add diagnostic logging key for network cache efficacy logging.
3351
3352         * page/DiagnosticLoggingKeys.cpp:
3353         (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
3354         (WebCore::DiagnosticLoggingKeys::requestKey):
3355         * page/DiagnosticLoggingKeys.h:
3356
3357 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
3358
3359         Use filterRootId in SelectorQuery even if CSS JIT is not enabled
3360         https://bugs.webkit.org/show_bug.cgi?id=142703
3361
3362         Reviewed by Benjamin Poulain.
3363
3364         filterRootId pruning path is not inherently related to CSS JIT.
3365         This patch enables filterRootId even in the environment
3366         where CSS JIT is not enabled.
3367
3368         * dom/SelectorQuery.cpp:
3369         (WebCore::filterRootById):
3370         (WebCore::SelectorDataList::executeSingleSelectorData):
3371         (WebCore::SelectorDataList::execute):
3372         * dom/SelectorQuery.h:
3373
3374 2015-03-18  Zalan Bujtas  <zalan@apple.com>
3375
3376         Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
3377         https://bugs.webkit.org/show_bug.cgi?id=142809
3378
3379         Reviewed by Antti Koivisto.
3380
3381         FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
3382
3383         No change in functionality.
3384
3385         * rendering/SimpleLineLayoutFlowContents.h:
3386         (WebCore::SimpleLineLayout::FlowContents::begin):
3387         (WebCore::SimpleLineLayout::FlowContents::end):
3388         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
3389         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
3390         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
3391         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
3392         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
3393         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
3394         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
3395         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3396         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3397
3398 2015-03-18  Zalan Bujtas  <zalan@apple.com>
3399
3400         Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
3401         https://bugs.webkit.org/show_bug.cgi?id=142785
3402
3403         Reviewed by Antti Koivisto.
3404
3405         This is in transition to support <br>. A particular position could point to multiple
3406         segments when <br> is directly followed by text.
3407
3408         No change in functionality.
3409
3410         * rendering/SimpleLineLayoutFlowContents.cpp:
3411         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
3412         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
3413         * rendering/SimpleLineLayoutFlowContents.h:
3414         (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
3415         (