[Win] Implement cap height in SimpleFontDataWin to enable initial-letter support...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-19  Brent Fulgham  <bfulgham@apple.com>
2
3         [Win] Implement cap height in SimpleFontDataWin to enable initial-letter support for Windows.
4         https://bugs.webkit.org/show_bug.cgi?id=136841
5
6         Reviewed by David Hyatt.
7
8         * platform/graphics/win/SimpleFontDataCGWin.cpp:
9         (WebCore::SimpleFontData::platformInit): Add missing calls to set up our fonts.
10
11 2014-09-22  Eric Carlson  <eric.carlson@apple.com>
12
13         Update HTMLMediaElement logging
14         https://bugs.webkit.org/show_bug.cgi?id=136991
15
16         Reviewed by Alexey Proskuryakov.
17
18         No new tests, only logging was changed.
19
20         * html/HTMLMediaElement.cpp:
21         (WebCore::HTMLMediaElement::HTMLMediaElement):
22         (WebCore::HTMLMediaElement::~HTMLMediaElement):
23         (WebCore::HTMLMediaElement::parseAttribute):
24
25 2014-09-22  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
26
27         REGRESSION(r173631): It broke the !ENABLE(VIDEO) build
28         https://bugs.webkit.org/show_bug.cgi?id=136946
29
30         Reviewed by Jer Noble.
31
32         No new tests required, no new functionality.
33
34         * page/DragController.cpp:
35         (WebCore::DragController::startDrag):
36
37 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
38
39         [CSSRegions] Use nullptr in regions code
40         https://bugs.webkit.org/show_bug.cgi?id=137001
41
42         Reviewed by Andrei Bucur.
43
44         No new tests as no new functionality is introduced.
45
46         * dom/DOMNamedFlowCollection.cpp:
47         (WebCore::DOMNamedFlowCollection::item):
48         (WebCore::DOMNamedFlowCollection::namedItem):
49         * dom/NamedFlowCollection.cpp:
50         (WebCore::NamedFlowCollection::flowByName):
51         * dom/WebKitNamedFlow.cpp:
52         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
53         * rendering/RenderFlowThread.cpp:
54         (WebCore::RenderFlowThread::getLayerListForRegion):
55         (WebCore::RenderFlowThread::regionForCompositedLayer):
56         (WebCore::RenderFlowThread::regionAtBlockOffset):
57         (WebCore::RenderFlowThread::mapFromFlowToRegion):
58         (WebCore::RenderFlowThread::firstRegion):
59         (WebCore::RenderFlowThread::lastRegion):
60         (WebCore::RenderFlowThread::currentActiveRenderBox):
61         * rendering/RenderNamedFlowThread.cpp:
62         (WebCore::RenderNamedFlowThread::nextRendererForElement):
63
64 2014-09-17  Philippe Normand  <pnormand@igalia.com>
65
66         [GStreamer] Cannot play Vimeo video
67         https://bugs.webkit.org/show_bug.cgi?id=134969
68
69         Reviewed by Sergio Villar Senin.
70
71         Ensure the GStreamer HTTP source element also sends cookies when
72         it's sending its requests. Some streaming platforms such as Vimeo
73         do server-side cookie checks on incoming requests before serving
74         media data.
75
76         Test: http/tests/media/hls/video-cookie.html
77
78         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
79         (webKitWebSrcStart): Set first-party cookie URL to the request so
80         the ResourceLoader properly sets cookies in the HTTP request.
81
82 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
83
84         Leverage RenderLayerBacking::renderer() instead of m_owningLayer.renderer()
85         https://bugs.webkit.org/show_bug.cgi?id=136954
86
87         Reviewed by Darin Adler.
88
89         No new tests just refactoring.
90
91         * rendering/RenderLayerBacking.cpp:
92         (WebCore::RenderLayerBacking::updateCompositedBounds):
93         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
94         (WebCore::RenderLayerBacking::paintIntoLayer):
95
96 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
97
98         [CSS Regions] Assertion failure and null dereference crash when using animations and regions
99         https://bugs.webkit.org/show_bug.cgi?id=136918
100
101         Reviewed by Andrei Bucur.
102
103         In some situations, for instance when an image has an attached animation, the style change caused by the animation
104         triggers a geometry update for the backing store associated with the image's layer. This may occur before
105         the layout for the image has finished.
106
107         Moreover, if the image in such situation - having a composited layer - is displayed in a region,
108         sicne the layout did not finish yet, the mappings between the layers of the elements collected in the named flow
109         and the regions associated with the named flow are not updated and cannot be used.
110
111         Therefore in those situations, we have to bail out early and use these mappings only after the layout has finished.
112
113         This patch also changes RenderLayerBacking method updateAfterDescendents -> updateAfterDescendants.
114
115         Test: fast/regions/animated-image-in-region.html
116
117         * rendering/RenderFlowThread.cpp:
118         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
119         * rendering/RenderLayer.cpp:
120         (WebCore::RenderLayer::calculateClipRects):
121         * rendering/RenderLayerBacking.cpp:
122         (WebCore::RenderLayerBacking::updateAfterDescendants):
123         * rendering/RenderLayerBacking.h:
124         * rendering/RenderLayerCompositor.cpp:
125         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
126         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
127         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
128
129 2014-09-21  Chris Dumez  <cdumez@apple.com>
130
131         Generate Element casting helper functions
132         https://bugs.webkit.org/show_bug.cgi?id=136839
133
134         Reviewed by Darin Adler.
135
136         Generate Element casting helper functions instead of requiring explicit
137         use of NODE_TYPE_CASTS() macro. Casting is now done using the following
138         form: downcast<HTMLDivElement>(), instead of toHTMLDivElement().
139
140         The previous form (i.e. toHTMLDivElement()) is still supported for now
141         by generating macros that convert these calls into the new form, until
142         the code base is ported to the new casting helpers.
143
144         The plan is also to use is<HTMLDivElement>() instead of
145         isHTMLDivElement() for consistency but this was not changed in this
146         patch to avoid blowing up the size.
147
148         This CL also updates the way we convert a JSValue into an
149         implementation pointer. Instead of using toHTMLDivElement(), which
150         looked like a cast, we now use JSHTMLDivElement::toWrapped(). This
151         avoids conflicting with the toXXXElement() macros and makes it
152         clearer this is not a simple cast.
153
154         No new tests, no behavior change.
155
156         * Modules/plugins/QuickTimePluginReplacement.mm:
157         (WebCore::QuickTimePluginReplacement::installReplacement):
158         * WebCore.exp.in:
159         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
160         (WebCore::JSAudioBufferSourceNode::setBuffer):
161         * bindings/js/JSBlobCustom.cpp:
162         (WebCore::constructJSBlob):
163         * bindings/js/JSCommandLineAPIHostCustom.cpp:
164         (WebCore::JSCommandLineAPIHost::getEventListeners):
165         (WebCore::JSCommandLineAPIHost::databaseId):
166         (WebCore::JSCommandLineAPIHost::storageId):
167         * bindings/js/JSDOMFormDataCustom.cpp:
168         (WebCore::toHTMLFormElementOrNull):
169         (WebCore::constructJSDOMFormData):
170         (WebCore::JSDOMFormData::append):
171         (WebCore::toHTMLFormElement): Deleted.
172         * bindings/js/JSDOMStringListCustom.cpp:
173         (WebCore::JSDOMStringList::toWrapped):
174         (WebCore::toDOMStringList): Deleted.
175         * bindings/js/JSDOMWindowCustom.cpp:
176         (WebCore::JSDOMWindow::toWrapped):
177         (WebCore::toDOMWindow): Deleted.
178         * bindings/js/JSDictionary.cpp:
179         (WebCore::JSDictionary::convertValue):
180         * bindings/js/JSDocumentCustom.cpp:
181         (WebCore::JSDocument::createTouchList):
182         * bindings/js/JSEventTargetCustom.cpp:
183         (WebCore::JSEventTarget::toWrapped):
184         (WebCore::toEventTarget): Deleted.
185         * bindings/js/JSExceptionBase.cpp:
186         (WebCore::toExceptionBase):
187         * bindings/js/JSHTMLMediaElementCustom.cpp:
188         (WebCore::JSHTMLMediaElement::setController):
189         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
190         (WebCore::JSHTMLOptionsCollection::add):
191         (WebCore::JSHTMLOptionsCollection::remove):
192         * bindings/js/JSHTMLSelectElementCustom.cpp:
193         (WebCore::JSHTMLSelectElement::remove):
194         (WebCore::selectIndexSetter):
195         * bindings/js/JSInspectorFrontendHostCustom.cpp:
196         (WebCore::JSInspectorFrontendHost::showContextMenu):
197         * bindings/js/JSMessageEventCustom.cpp:
198         (WebCore::handleInitMessageEvent):
199         * bindings/js/JSMessagePortCustom.cpp:
200         (WebCore::fillMessagePortArray):
201         * bindings/js/JSNodeCustom.cpp:
202         (WebCore::JSNode::insertBefore):
203         (WebCore::JSNode::replaceChild):
204         (WebCore::JSNode::removeChild):
205         (WebCore::JSNode::appendChild):
206         * bindings/js/JSNodeFilterCustom.cpp:
207         (WebCore::JSNodeFilter::toWrapped):
208         (WebCore::toNodeFilter): Deleted.
209         * bindings/js/JSSubtleCryptoCustom.cpp:
210         (WebCore::JSSubtleCrypto::encrypt):
211         (WebCore::JSSubtleCrypto::decrypt):
212         (WebCore::JSSubtleCrypto::sign):
213         (WebCore::JSSubtleCrypto::verify):
214         (WebCore::JSSubtleCrypto::exportKey):
215         (WebCore::JSSubtleCrypto::wrapKey):
216         (WebCore::JSSubtleCrypto::unwrapKey):
217         * bindings/js/JSWebGLRenderingContextCustom.cpp:
218         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
219         (WebCore::JSWebGLRenderingContext::getProgramParameter):
220         (WebCore::JSWebGLRenderingContext::getShaderParameter):
221         (WebCore::JSWebGLRenderingContext::getUniform):
222         (WebCore::dataFunctionf):
223         (WebCore::dataFunctioni):
224         (WebCore::dataFunctionMatrix):
225         * bindings/js/JSXMLHttpRequestCustom.cpp:
226         (WebCore::JSXMLHttpRequest::send):
227         * bindings/js/SerializedScriptValue.cpp:
228         (WebCore::CloneSerializer::dumpIfTerminal):
229         * bindings/scripts/CodeGeneratorJS.pm:
230         (GenerateHeader):
231         (GenerateImplementation):
232         (GenerateParametersCheck):
233         (JSValueToNative):
234         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
235         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
236         (WebCore::JSTestActiveDOMObject::toWrapped):
237         (WebCore::toTestActiveDOMObject): Deleted.
238         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
239         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
240         (WebCore::JSTestCustomNamedGetter::toWrapped):
241         (WebCore::toTestCustomNamedGetter): Deleted.
242         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
243         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
244         (WebCore::JSTestEventConstructor::toWrapped):
245         (WebCore::toTestEventConstructor): Deleted.
246         * bindings/scripts/test/JS/JSTestEventConstructor.h:
247         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
248         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
249         (WebCore::JSTestEventTarget::toWrapped):
250         (WebCore::toTestEventTarget): Deleted.
251         * bindings/scripts/test/JS/JSTestEventTarget.h:
252         * bindings/scripts/test/JS/JSTestException.cpp:
253         (WebCore::JSTestException::toWrapped):
254         (WebCore::toTestException): Deleted.
255         * bindings/scripts/test/JS/JSTestException.h:
256         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
257         (WebCore::JSTestGenerateIsReachable::toWrapped):
258         (WebCore::toTestGenerateIsReachable): Deleted.
259         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
260         * bindings/scripts/test/JS/JSTestInterface.cpp:
261         (WebCore::setJSTestInterfaceImplementsNode):
262         (WebCore::setJSTestInterfaceSupplementalNode):
263         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
264         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
265         (WebCore::JSTestInterface::toWrapped):
266         (WebCore::toTestInterface): Deleted.
267         * bindings/scripts/test/JS/JSTestInterface.h:
268         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
269         (WebCore::JSTestMediaQueryListListener::toWrapped):
270         (WebCore::toTestMediaQueryListListener): Deleted.
271         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
272         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
273         (WebCore::JSTestNamedConstructor::toWrapped):
274         (WebCore::toTestNamedConstructor): Deleted.
275         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
276         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
277         (WebCore::JSTestNondeterministic::toWrapped):
278         (WebCore::toTestNondeterministic): Deleted.
279         * bindings/scripts/test/JS/JSTestNondeterministic.h:
280         * bindings/scripts/test/JS/JSTestObj.cpp:
281         (WebCore::setJSTestObjTestObjAttr):
282         (WebCore::setJSTestObjXMLObjAttr):
283         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
284         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
285         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
286         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
287         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
288         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
289         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
290         (WebCore::setJSTestObjMutablePoint):
291         (WebCore::setJSTestObjImmutablePoint):
292         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
293         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
294         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
295         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
296         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
297         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
298         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
299         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
300         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
301         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
302         (WebCore::jsTestObjPrototypeFunctionConvert1):
303         (WebCore::jsTestObjPrototypeFunctionConvert2):
304         (WebCore::jsTestObjPrototypeFunctionConvert4):
305         (WebCore::jsTestObjPrototypeFunctionConvert5):
306         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
307         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
308         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
309         (WebCore::JSTestObj::toWrapped):
310         (WebCore::toTestObj): Deleted.
311         * bindings/scripts/test/JS/JSTestObj.h:
312         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
313         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
314         (WebCore::JSTestOverloadedConstructors::toWrapped):
315         (WebCore::toTestOverloadedConstructors): Deleted.
316         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
317         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
318         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
319         (WebCore::toTestSerializedScriptValueInterface): Deleted.
320         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
321         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
322         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
323         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
324         (WebCore::JSTestTypedefs::toWrapped):
325         (WebCore::toTestTypedefs): Deleted.
326         * bindings/scripts/test/JS/JSTestTypedefs.h:
327         * bindings/scripts/test/JS/JSattribute.cpp:
328         (WebCore::JSattribute::toWrapped):
329         (WebCore::toattribute): Deleted.
330         * bindings/scripts/test/JS/JSattribute.h:
331         * bindings/scripts/test/JS/JSreadonly.cpp:
332         (WebCore::JSreadonly::toWrapped):
333         (WebCore::toreadonly): Deleted.
334         * bindings/scripts/test/JS/JSreadonly.h:
335         * dom/Element.h:
336         (WebCore::downcast):
337         * dom/make_names.pl:
338         (printTypeHelpers):
339         * html/HTMLAnchorElement.h:
340         * html/HTMLAreaElement.h:
341         * html/HTMLAudioElement.h:
342         * html/HTMLBaseElement.h:
343         * html/HTMLBodyElement.h:
344         * html/HTMLCanvasElement.h:
345         * html/HTMLDataListElement.h:
346         * html/HTMLDetailsElement.h:
347         * html/HTMLDivElement.h:
348         * html/HTMLEmbedElement.h:
349         * html/HTMLFieldSetElement.h:
350         * html/HTMLFormElement.h:
351         * html/HTMLFrameElement.h:
352         * html/HTMLFrameSetElement.h:
353         * html/HTMLHtmlElement.h:
354         * html/HTMLIFrameElement.h:
355         * html/HTMLImageElement.h:
356         * html/HTMLInputElement.h:
357         * html/HTMLLabelElement.h:
358         * html/HTMLLegendElement.h:
359         * html/HTMLLinkElement.h:
360         * html/HTMLMapElement.h:
361         * html/HTMLMarqueeElement.h:
362         * html/HTMLMetaElement.h:
363         * html/HTMLMeterElement.h:
364         * html/HTMLOListElement.h:
365         * html/HTMLObjectElement.h:
366         * html/HTMLOptGroupElement.h:
367         * html/HTMLOptionElement.h:
368         * html/HTMLParamElement.h:
369         * html/HTMLProgressElement.h:
370         * html/HTMLScriptElement.h:
371         * html/HTMLSelectElement.h:
372         * html/HTMLSourceElement.h:
373         * html/HTMLStyleElement.h:
374         * html/HTMLSummaryElement.h:
375         * html/HTMLTableCaptionElement.h:
376         * html/HTMLTableElement.h:
377         * html/HTMLTableRowElement.h:
378         * html/HTMLTemplateElement.h:
379         * html/HTMLTextAreaElement.h:
380         * html/HTMLTitleElement.h:
381         * html/HTMLTrackElement.h:
382         * html/HTMLVideoElement.h:
383         * inspector/InspectorDOMAgent.cpp:
384         (WebCore::InspectorDOMAgent::scriptValueAsNode):
385         * mathml/MathMLMencloseElement.h:
386         * svg/SVGAltGlyphDefElement.h:
387         * svg/SVGAltGlyphElement.h:
388         * svg/SVGAltGlyphItemElement.h:
389         * svg/SVGAnimateMotionElement.h:
390         * svg/SVGAnimateTransformElement.h:
391         * svg/SVGCircleElement.h:
392         * svg/SVGClipPathElement.h:
393         * svg/SVGCursorElement.h:
394         * svg/SVGEllipseElement.h:
395         * svg/SVGFEDistantLightElement.h:
396         * svg/SVGFEFuncAElement.h:
397         * svg/SVGFEFuncBElement.h:
398         * svg/SVGFEFuncGElement.h:
399         * svg/SVGFEFuncRElement.h:
400         * svg/SVGFEMergeNodeElement.h:
401         * svg/SVGFEPointLightElement.h:
402         * svg/SVGFESpotLightElement.h:
403         * svg/SVGFilterElement.h:
404         * svg/SVGFontElement.h:
405         * svg/SVGFontFaceElement.h:
406         * svg/SVGFontFaceNameElement.h:
407         * svg/SVGFontFaceSrcElement.h:
408         * svg/SVGFontFaceUriElement.h:
409         * svg/SVGForeignObjectElement.h:
410         * svg/SVGGlyphElement.h:
411         * svg/SVGGlyphRefElement.h:
412         * svg/SVGHKernElement.h:
413         * svg/SVGImageElement.h:
414         * svg/SVGLineElement.h:
415         * svg/SVGLinearGradientElement.h:
416         * svg/SVGMPathElement.h:
417         * svg/SVGMarkerElement.h:
418         * svg/SVGMaskElement.h:
419         * svg/SVGMissingGlyphElement.h:
420         * svg/SVGPathElement.h:
421         * svg/SVGPatternElement.h:
422         * svg/SVGPolygonElement.h:
423         * svg/SVGPolylineElement.h:
424         * svg/SVGRadialGradientElement.h:
425         * svg/SVGRectElement.h:
426         * svg/SVGSVGElement.h:
427         * svg/SVGScriptElement.h:
428         * svg/SVGStopElement.h:
429         * svg/SVGStyleElement.h:
430         * svg/SVGTextElement.h:
431         * svg/SVGTextPathElement.h:
432         * svg/SVGTitleElement.h:
433         * svg/SVGUseElement.h:
434         * svg/SVGVKernElement.h:
435         * svg/SVGViewElement.h:
436
437 2014-09-21  Christophe Dumez  <cdumez@apple.com>
438
439         Fix post-mortem nits for r173724
440         https://bugs.webkit.org/show_bug.cgi?id=136986
441
442         Reviewed by Darin Adler.
443
444         Fix post-mortem nits for r173724.
445
446         No new tests, no behavior change.
447
448         * editing/EditingStyle.cpp:
449         (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
450         (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
451         Use nullptr instead of 0.
452
453         * editing/SplitElementCommand.cpp:
454         (WebCore::SplitElementCommand::doUnapply):
455         Use getIdAttribute() / setIdAttribute().
456
457         * rendering/RenderTableCell.cpp:
458         (WebCore::RenderTableCell::computePreferredLogicalWidths):
459         Use fastHasAttribute() for nowrap and do an early return to avoid
460         calling styleOrColLogicalWidth() if the nowrap attribute is missing.
461
462 2014-09-21  Filip Pizlo  <fpizlo@apple.com>
463
464         Unreviewed, speculative build fix.
465         
466         If you use typed arrays, you gotta include runtime/TypedArrayInlines.h.
467
468         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
469
470 2014-09-19  Jer Noble  <jer.noble@apple.com>
471
472         [EME][Mac] Support secure proof of key release in the com.apple.fps.2_0 keysystem.
473         https://bugs.webkit.org/show_bug.cgi?id=136898
474
475         Reviewed by Eric Carlson.
476
477         Add support for proof of key release to the CDM by supporting a new "mime" type called
478         "keyrelease". When a session of type "keyrelease" is created, the initData is the server
479         certificate, the keyMessage contains the first stored proof of key release if present,
480         and closing the session will remove that proof from storage.
481
482         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
483         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
484         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
485         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
486         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
487         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
488         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
489         (WebCore::sessionStorageDirectory):
490         (WebCore::CDMSessionMediaSourceAVFObjC::update):
491         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
492
493 2014-09-19  Jer Noble  <jer.noble@apple.com>
494
495         [Media][Mac] Buffered range slides around as you resize a window
496         https://bugs.webkit.org/show_bug.cgi?id=136960
497
498         Reviewed by Dean Jackson.
499
500         Rather than using a canvas as the background image for the timeline slider, use a generated SVG image
501         to represent the buffered ranges.
502
503         * Modules/mediacontrols/mediaControlsApple.css:
504         (audio::-webkit-media-controls-timeline):
505         * Modules/mediacontrols/mediaControlsApple.js:
506         (Controller.prototype.createControls):
507         (Controller.prototype.updateProgress):
508
509 2014-09-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
510
511         [CoordinatedGraphics][EFL] window.scrollTo(x, y) doesn't work when fixed layout is enabled
512         https://bugs.webkit.org/show_bug.cgi?id=136917
513
514         Reviewed by Darin Adler.
515
516         When fixed layout is enabled, scrollTo doesn't work on EFL port with coordinated graphics.
517         Since updateScrollbars() doesn't update scroll position when delegatesScrolling() is enabled. 
518         To fix this issue, EFL port should update scroll position based on WK2 port. This patch
519         update scroll position in FrameView::requestScrollPositionUpdate() as Mac port.
520
521         TestWebKitAPI: Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewScrollTo
522
523         * page/FrameView.cpp:
524         (WebCore::FrameView::requestScrollPositionUpdate):
525
526 2014-09-19  Brent Fulgham  <bfulgham@apple.com>
527
528         Latching in iframes is not working as expected
529         https://bugs.webkit.org/show_bug.cgi?id=136729
530         <rdar://problem/18370549>
531
532         Reviewed by Simon Fraser.
533
534         Test: platform/mac/fast/scrolling/scrolling-iframe-100pct.html
535
536         Correct latching behavior by moving the concept of latching from the event handler to the main frame.
537         The event handlers are per-document, and can improperly latch to the iframe element (rather than the
538         scrollable content of the iframe) resulting in incorrect behavior.
539
540         Also move the wheel event delta tracking to the main frame, as this is similarly "top-level" in nature.
541
542         * WebCore.vcxproj/WebCore.vcxproj: Add new LatchedState class.
543         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
544         * WebCore.xcodeproj/project.pbxproj: Ditto.
545         * page/EventHandler.cpp:
546         (WebCore::EventHandler::EventHandler): Update constructor after moving some members to the new
547         LatchedState object.
548         (WebCore::EventHandler::clear): Call 'clear' on the LatchedState class.
549         (WebCore::EventHandler::platformRecordWheelEvent):  Update for new LatchedState class.
550         (WebCore::EventHandler::handleWheelEvent): Ditto.
551         (WebCore::EventHandler::clearLatchedState): Ditto.
552         (WebCore::EventHandler::defaultWheelEventHandler): Ditto.
553         * page/EventHandler.h:
554         * page/LatchedState.cpp: Added.
555         (WebCore::LatchedState::LatchedState):
556         (WebCore::LatchedState::~LatchedState):
557         (WebCore::LatchedState::clear):
558         (WebCore::LatchedState::setWheelEventElement):
559         (WebCore::LatchedState::setWidgetIsLatched):
560         (WebCore::LatchedState::setPreviousWheelScrolledElement):
561         (WebCore::LatchedState::setScrollableContainer):
562         * page/LatchedState.h: Added.
563         (WebCore::LatchedState::wheelEventElement):
564         (WebCore::LatchedState::frame):
565         (WebCore::LatchedState::setFrame):
566         (WebCore::LatchedState::widgetIsLatched):
567         (WebCore::LatchedState::previousWheelScrolledElement):
568         (WebCore::LatchedState::scrollableContainer):
569         (WebCore::LatchedState::startedGestureAtScrollLimit):
570         (WebCore::LatchedState::setStartedGestureAtScrollLimit):
571         * page/MainFrame.cpp:
572         (WebCore::MainFrame::MainFrame): Update for new members (LatchedState and WheelEventDeltaTracker)
573         * page/MainFrame.h:
574         * page/mac/EventHandlerMac.mm:
575         (WebCore::EventHandler::platformPrepareForWheelEvents): Use mainFrame-located latching information.
576         (WebCore::EventHandler::platformRecordWheelEvent): Use mainFrame-located wheel event delta tracking.
577         (WebCore::EventHandler::platformCompleteWheelEvent): Make sure to use the latched frame as well as
578         the latched element so that events get routed properly.
579         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Update for new mainFrame
580         location for latched state information.
581
582 2014-09-19  Chris Dumez  <cdumez@apple.com>
583
584         Minimize virtual function calls in MarkupAccumulator
585         https://bugs.webkit.org/show_bug.cgi?id=136957
586
587         Reviewed by Benjamin Poulain.
588
589         This patch minimizes the number of virtual function calls in
590         MarkupAccumulator by:
591         - De-virtualizing MarkupAccumulator::appendString(), which is never
592           overridden
593         - Having MarkupAccumulator::appendEndTag() virtual function take an
594           Element in argument instead of a Node, as it only applies to Element.
595           Also add a non-virtual overload that takes a Node in argument and
596           that does the isElementNode() check so that we don't need to explicitly
597           do the check at each call site.
598
599         No new tests, no behavior change.
600
601         * editing/MarkupAccumulator.cpp:
602         (WebCore::MarkupAccumulator::appendEndTag):
603         (WebCore::MarkupAccumulator::shouldSelfClose):
604         (WebCore::MarkupAccumulator::appendEndMarkup):
605         * editing/MarkupAccumulator.h:
606         (WebCore::MarkupAccumulator::appendEndTag):
607         * page/PageSerializer.cpp:
608         (WebCore::SerializerMarkupAccumulator::appendEndTag):
609
610 2014-09-19  Pratik Solanki  <psolanki@apple.com>
611
612         [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
613         https://bugs.webkit.org/show_bug.cgi?id=136962
614         <rdar://problem/18342344>
615
616         Reviewed by Geoffrey Garen.
617
618         The disk cache monitor callback code was being executed on the main thread. This is wrong
619         when the web thread is being used in WebKit1 on iOS. The code needs to run on the web
620         thread. Use WebThreadRun to dispatch the block to the web thread. This works for WebKit2 as
621         well since when web thread is not being used, WebThreadRun invokes the block directly.
622
623         * loader/cocoa/DiskCacheMonitorCocoa.mm:
624         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
625
626 2014-09-19  Jer Noble  <jer.noble@apple.com>
627
628         Unreviewed build fix; pass duration into the lambda.
629
630         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
631         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
632
633 2014-09-19  Dean Jackson  <dino@apple.com>
634
635         Multithreaded WebGL is a bad idea - remove it
636         https://bugs.webkit.org/show_bug.cgi?id=136964
637         <rdar://problem/18399858>
638
639         Reviewed by Brent Fulgham.
640
641         We should not allow multithreaded GL access. Remove the
642         feature.
643
644         * html/canvas/WebGLRenderingContext.cpp:
645         (WebCore::WebGLRenderingContext::create):
646         * page/Settings.in:
647         * platform/graphics/GraphicsContext3D.h:
648         (WebCore::GraphicsContext3D::Attributes::Attributes):
649         * platform/graphics/mac/GraphicsContext3DMac.mm:
650         (WebCore::GraphicsContext3D::GraphicsContext3D):
651
652 2014-09-19  Eric Carlson  <eric.carlson@apple.com>
653
654         [MSE][Mac] work around AVSampleBufferRenderSynchronizer early callbacks
655         https://bugs.webkit.org/show_bug.cgi?id=136958
656
657         Reviewed by Jer Noble.
658
659         No new tests, we have been unable to come up with a test case that reproduces
660         this issue reliably.
661
662         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
663         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged): Set the synchronizer
664             time to duration when the duration time observer is called early. Add more logging.
665
666 2014-09-19  Benjamin Poulain  <bpoulain@apple.com>
667
668         CSS JIT: allocate the minimum required register count in debug
669         https://bugs.webkit.org/show_bug.cgi?id=136933
670
671         Reviewed by Andreas Kling.
672
673         It is hard to catch bugs of minimumRegisterRequirements() because every CPU has a different
674         number of registers available by default.
675
676         This patch aims at improving testing by creating artificial register pressure when running
677         in debug. When running in debug, we no longer allocate all the available registers right away.
678         Instead, we allocate just enough to satisfy minimumRegisterRequirements().
679
680         The expectation with this is that under-allocation would be detected quicker since they would
681         crash debug builds.
682
683         * cssjit/RegisterAllocator.h:
684         (WebCore::RegisterAllocator::RegisterAllocator):
685         (WebCore::RegisterAllocator::reserveCallerSavedRegisters):
686         (WebCore::RegisterAllocator::availableRegisterCount): Deleted.
687         * cssjit/SelectorCompiler.cpp:
688         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
689
690 2014-09-19  Benjamin Poulain  <bpoulain@apple.com>
691
692         Add a size check for CSSSelector
693         https://bugs.webkit.org/show_bug.cgi?id=136882
694
695         Reviewed by Christophe Dumez.
696
697         * css/CSSSelector.cpp:
698
699 2014-09-19  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
700
701         REGRESSION(r173464): It broke the !ENABLE(PICTURE_SIZES) build
702         https://bugs.webkit.org/show_bug.cgi?id=136942
703
704         Reviewed by Simon Fraser.
705
706         * html/HTMLImageElement.cpp:
707         (WebCore::HTMLImageElement::parseAttribute):
708
709 2014-09-19  Simon Fraser  <simon.fraser@apple.com>
710
711         Provide a default argument for the most commonly used HitTestRequest variant
712         https://bugs.webkit.org/show_bug.cgi?id=136653
713
714         Reviewed by Darin Adler.
715
716         Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent
717         and change call sites using the default flags to use a HitTestRequest temporary.
718
719         * dom/TreeScope.cpp:
720         (WebCore::nodeFromPoint):
721         * editing/FrameSelection.cpp:
722         (WebCore::FrameSelection::contains):
723         * page/DragController.cpp:
724         (WebCore::elementUnderMouse):
725         * page/EventHandler.cpp:
726         (WebCore::EventHandler::handleMouseDraggedEvent):
727         (WebCore::EventHandler::handleMousePressEvent):
728         * rendering/HitTestRequest.h:
729         (WebCore::HitTestRequest::HitTestRequest):
730
731 2014-09-19  Chris Dumez  <cdumez@apple.com>
732
733         Allow DOM methods to return references instead of pointers
734         https://bugs.webkit.org/show_bug.cgi?id=136931
735
736         Reviewed by Sam Weinig.
737
738         It is common practice in WebKit to have methods return a reference
739         instead of a pointer if the pointer can never be null. However, this
740         unfortunately did not work for DOM methods (functions called by JS
741         bindings). This prevented further refactoring.
742
743         This patch brings support for having DOM methods to return references
744         instead of pointers when the pointer cannot be null. The generated
745         bindings were calling WTF::getPtr() on the pointer type returned by
746         the implementation already (in case it was a smart pointer type).
747         This patch leverages this by having WTF::getPtr() convert reference
748         arguments into raw pointers.
749
750         This patch also updates a few DOM methods on Document and Element
751         classes to return a reference instead of a pointer, to test the change.
752         There are likely more DOM methods that can be updated though.
753
754         No new tests, no behavior change.
755
756         * accessibility/AccessibilityObject.cpp:
757         (WebCore::AccessibilityObject::classList):
758         * bindings/js/JSDOMBinding.h:
759         (WTF::getPtr): Deleted.
760         * dom/Document.cpp:
761         (WebCore::Document::implementation):
762         (WebCore::Document::webkitGetNamedFlows):
763         (WebCore::Document::namedFlows):
764         (WebCore::Document::setXMLVersion):
765         (WebCore::Document::setXMLStandalone):
766         (WebCore::Document::securityPolicy):
767         (WebCore::Document::styleSheets):
768         * dom/Document.h:
769         (WebCore::Document::timing):
770         * dom/Element.cpp:
771         (WebCore::Element::classList):
772         (WebCore::Element::dataset):
773         * dom/Element.h:
774         * html/shadow/MediaControlElements.cpp:
775         (WebCore::MediaControlPanelElement::setPosition):
776         (WebCore::MediaControlPanelElement::resetPosition):
777         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
778         * html/track/VTTRegion.cpp:
779         (WebCore::VTTRegion::displayLastTextTrackCueBox):
780         (WebCore::VTTRegion::willRemoveTextTrackCueBox):
781         * inspector/InspectorCSSAgent.cpp:
782         (WebCore::InspectorCSSAgent::getAllStyleSheets):
783         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
784         * page/PerformanceTiming.cpp:
785         (WebCore::PerformanceTiming::documentTiming):
786         * rendering/FlowThreadController.cpp:
787         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
788
789 2014-09-19  Daniel Bates  <dabates@apple.com>
790
791         Always assume internal SDK when building configuration Production
792         https://bugs.webkit.org/show_bug.cgi?id=136925
793         <rdar://problem/18362399>
794
795         Reviewed by Dan Bernstein.
796
797         As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
798         and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.
799
800         * Configurations/Base.xcconfig:
801
802 2014-09-19  Chris Dumez  <cdumez@apple.com>
803
804         Optimize MarkupAccumulator::appendText()
805         https://bugs.webkit.org/show_bug.cgi?id=136935
806
807         Reviewed by Benjamin Poulain.
808
809         MarkupAccumulator::appendText() was calling the generic appendNodeValue()
810         method to append the text. appendNodeValue() supports any kind of Node and
811         thus calls the Node::nodeValue() virtual function.
812
813         Since appendText() is the only caller to appendNodeValue(), this patch
814         inlines the code in appendText() and makes it specific to Text Node, and
815         thus more efficient. The code now calls CharacterData::data() instead of
816         the Node::nodeValue() virtual function. This patch also updates
817         CharacterData::data() to return a const reference to avoid copying the
818         return value.
819
820         No new tests, no behavior change.
821
822         * dom/CharacterData.h:
823         (WebCore::CharacterData::data):
824         * editing/MarkupAccumulator.cpp:
825         (WebCore::MarkupAccumulator::appendText):
826         (WebCore::MarkupAccumulator::appendNodeValue): Deleted.
827         * editing/MarkupAccumulator.h:
828
829 2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
830
831         [GTK] Dot not allow to create delete-on-destroy GMainLoopSources
832         https://bugs.webkit.org/show_bug.cgi?id=136923
833
834         Reviewed by Gustavo Noronha Silva.
835
836         * platform/gtk/GtkDragAndDropHelper.cpp:
837         (WebCore::GtkDragAndDropHelper::handleDragLeave): Use GMainLoopSource::scheduleAndDeleteOnDestroy().
838
839 2014-09-18  Roger Fong  <roger_fong@apple.com>
840
841         [Windows] Media tests all fail because they cannot find localized strings.
842         
843         * rendering/RenderThemeSafari.cpp:
844         (WebCore::RenderThemeSafari::mediaControlsScript):
845         Make sure to use localized strings files in RenderThemeSafari.
846
847 2014-09-18  Simon Fraser  <simon.fraser@apple.com>
848
849         Remove generator/yield terminology in RenderInline's GeneratorContext
850         https://bugs.webkit.org/show_bug.cgi?id=119278
851
852         Reviewed by Sam Weinig.
853         
854         Get rid of the icky Generator/yield syntax used for collecting rects in RenderInline.
855         Just replace the operator() with an explicit addRect().
856         
857         Also some drive-by nullptr cleanup, and removing default arguments from
858         addChildIgnoringContinuation() calls.
859
860         * rendering/RenderInline.cpp:
861         (WebCore::RenderInline::willBeDestroyed):
862         (WebCore::RenderInline::styleDidChange):
863         (WebCore::RenderInline::splitInlines):
864         (WebCore::RenderInline::addChildToContinuation):
865         (WebCore::RenderInline::generateLineBoxRects):
866         (WebCore::RenderInline::generateCulledLineBoxRects):
867         * rendering/RenderInline.h:
868
869 2014-09-18  Jeremy Jones  <jeremyj@apple.com>
870
871         Improve fullscreen video rotation animation.
872         https://bugs.webkit.org/show_bug.cgi?id=136870
873
874         Reviewed by Simon Fraser.
875
876         Instead of setting the frame on the video layer, set position and bounds separately. This allows the position to be synchronized with the rest of the animation.
877         When using a fencePort to synchronize animations, if the fence times out, pivoting around the center provides a better fallback.
878
879         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
880         (-[WebAVVideoLayer setVideoSublayer:]): added
881         (-[WebAVVideoLayer videoSublayer]): added
882         (-[WebAVVideoLayer setBounds:]):  set position and bounds insted of frame.
883         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): use setVideoSublayer
884         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
885         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): set bounds and anchorPoint instead of frame
886         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): set bounds instead of frame.
887
888 2014-09-17  Myles C. Maxfield  <mmaxfield@apple.com>
889
890         Text laid out with the SVG -> OTF font converter does not have the same metrics as with the SVG font code path
891         https://bugs.webkit.org/show_bug.cgi?id=136907
892
893         Reviewed by Darin Adler.
894
895         There are three things that are causing text laid out with the SVG -> OTF font converter to not have metrics that
896         measure our existing SVG codepath. They are:
897
898         1. Creating a font with a 0 ascent or descent makes OS X think that something is wrong with the font, and take
899         a different codepath when trying to parse ascent and descent information. This patch checks for this condition
900         and sets the ascent/descent to 1 FUnit instead (which is generally much smaller than a pixel).
901         2. Our SVG font codepath hardcodes a line gap of 1/10th of the font size for every font. This patch makes the
902         font converter obey this.
903         3. The converter was not allowing for default glyph advances as per the SVG font specification. This patch
904         does so.
905
906         No new tests yet, but they will come soon! I promise!
907
908         * svg/SVGToOTFFontConversion.cpp:
909         (WebCore::SVGToOTFFontConverter::appendHHEATable):
910         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
911
912 2014-09-18  Daniel Bates  <dabates@apple.com>
913
914         REGRESSION (r168921): SVG elements may be unnecessarily rebuilt
915         https://bugs.webkit.org/show_bug.cgi?id=136373
916
917         Reviewed by David Kilzer.
918
919         Fixes an issue where a SVG element may be unnecessarily rebuilt. In particular,
920         it is unnecessary to rebuild a SVG element that will be removed from the document.
921
922         Test: svg/custom/remove-subtree-including-use-with-child-textpath-that-references-earlier-path.html
923
924         * svg/SVGDocumentExtensions.cpp:
925         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Modified to remove a SVG element
926         from the list of elements to be rebuilt.
927
928 2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
929
930         Unreviewed rollout r173731. Broke multiple builds.
931
932         * WebCore.exp.in:
933         * inspector/InspectorController.cpp:
934         (WebCore::InspectorController::connectFrontend):
935         (WebCore::InspectorController::show):
936         * inspector/InspectorController.h:
937         * page/PageDebuggable.cpp:
938         (WebCore::PageDebuggable::connect):
939         * page/PageDebuggable.h:
940         * testing/Internals.cpp:
941         (WebCore::Internals::openDummyInspectorFrontend):
942
943 2014-09-18  Beth Dakin  <bdakin@apple.com>
944
945         ASSERT in RenderBox::instrinsicScrollbarLogicalWidth opening the inspector
946         https://bugs.webkit.org/show_bug.cgi?id=136929
947
948         Reviewed by Simon Fraser.
949
950         This is a regression from http://trac.webkit.org/changeset/173668 
951         This code is wrong after that change because it assumes that overflow:scroll will 
952         always have a scrollbar. That is no longer the case. We need to check to make sure 
953         it’s an overflow:scroll that does NOT have overflow:auto behavior.
954
955         * rendering/RenderBox.cpp:
956         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth):
957
958 2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
959
960         Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
961         https://bugs.webkit.org/show_bug.cgi?id=136893
962
963         Reviewed by Timothy Hatcher.
964
965         Automatic inspection is currently disabled for web pages.
966         This just updates the interfaces that changed.
967
968         * WebCore.exp.in:
969         * inspector/InspectorController.cpp:
970         (WebCore::InspectorController::connectFrontend):
971         (WebCore::InspectorController::show):
972         * inspector/InspectorController.h:
973         * page/PageDebuggable.cpp:
974         (WebCore::PageDebuggable::connect):
975         * page/PageDebuggable.h:
976         * testing/Internals.cpp:
977         (WebCore::Internals::openDummyInspectorFrontend):
978
979 2014-09-18  Chris Dumez  <cdumez@apple.com>
980
981         Use fastHasAttribute() / fastGetAttribute() when possible
982         https://bugs.webkit.org/show_bug.cgi?id=136900
983
984         Reviewed by Benjamin Poulain.
985
986         Use fastHasAttribute() / fastGetAttribute() when possible, that is when
987         the attribute is not SVG-animated or the |style| attribute, to avoid
988         synchronizing attributes unnecessarily.
989
990         Also avoid calling hasAttribute(xxxAttr) then getAttribute(xxxAttr) as
991         it causes 2 linear searches. It is best to call getAttribute(xxxAttr)
992         directly and check if it returns the nullAtom.
993
994         No new tests, no behavior change. Element::fastAttributeLookupAllowed()
995         is there as a safety set for debug builds.
996
997         * accessibility/AccessibilityListBoxOption.cpp:
998         (WebCore::AccessibilityListBoxOption::isEnabled):
999         * accessibility/AccessibilityNodeObject.cpp:
1000         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
1001         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
1002         * accessibility/AccessibilityObject.cpp:
1003         (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
1004         * dom/Document.cpp:
1005         (WebCore::Document::hasManifest):
1006         * dom/DocumentOrderedMap.cpp:
1007         (WebCore::keyMatchesLabelForAttribute):
1008         * dom/DocumentStyleSheetCollection.cpp:
1009         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1010         * dom/Element.cpp:
1011         (WebCore::Element::imageSourceURL):
1012         (WebCore::Element::pseudo):
1013         (WebCore::Element::spellcheckAttributeState):
1014         * editing/ApplyStyleCommand.cpp:
1015         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
1016         * editing/EditingStyle.cpp:
1017         (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
1018         (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
1019         * editing/SplitElementCommand.cpp:
1020         (WebCore::SplitElementCommand::doUnapply):
1021         * html/HTMLAnchorElement.cpp:
1022         (WebCore::HTMLAnchorElement::draggable):
1023         (WebCore::HTMLAnchorElement::sendPings):
1024         * html/HTMLAppletElement.cpp:
1025         (WebCore::HTMLAppletElement::updateWidget):
1026         * html/HTMLBodyElement.cpp:
1027         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
1028         * html/HTMLButtonElement.cpp:
1029         (WebCore::HTMLButtonElement::value):
1030         * html/HTMLDocument.cpp:
1031         (WebCore::HTMLDocument::dir):
1032         * html/HTMLEmbedElement.cpp:
1033         (WebCore::HTMLEmbedElement::imageSourceURL):
1034         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs):
1035         * html/HTMLFieldSetElement.cpp:
1036         (WebCore::HTMLFieldSetElement::~HTMLFieldSetElement):
1037         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
1038         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
1039         (WebCore::HTMLFieldSetElement::disabledStateChanged):
1040         (WebCore::HTMLFieldSetElement::childrenChanged):
1041         (WebCore::HTMLFieldSetElement::didMoveToNewDocument):
1042         * html/HTMLFormControlElement.cpp:
1043         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
1044         * html/HTMLFormElement.cpp:
1045         (WebCore::HTMLFormElement::action):
1046         * html/HTMLFrameElement.cpp:
1047         (WebCore::HTMLFrameElement::noResize):
1048         * html/HTMLFrameElementBase.cpp:
1049         (WebCore::HTMLFrameElementBase::location):
1050         * html/HTMLHRElement.cpp:
1051         (WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
1052         * html/HTMLHtmlElement.cpp:
1053         (WebCore::HTMLHtmlElement::insertedByParser):
1054         * html/HTMLImageElement.cpp:
1055         (WebCore::HTMLImageElement::altText):
1056         (WebCore::HTMLImageElement::alt):
1057         (WebCore::HTMLImageElement::draggable):
1058         (WebCore::HTMLImageElement::src):
1059         (WebCore::HTMLImageElement::addSubresourceAttributeURLs):
1060         * html/HTMLInputElement.cpp:
1061         (WebCore::HTMLInputElement::finishParsingChildren):
1062         (WebCore::HTMLInputElement::altText):
1063         (WebCore::HTMLInputElement::reset):
1064         * html/HTMLLabelElement.cpp:
1065         (WebCore::HTMLLabelElement::control):
1066         * html/HTMLLinkElement.cpp:
1067         (WebCore::HTMLLinkElement::process):
1068         (WebCore::HTMLLinkElement::rel):
1069         * html/HTMLMetaElement.cpp:
1070         (WebCore::HTMLMetaElement::content):
1071         (WebCore::HTMLMetaElement::httpEquiv):
1072         * html/HTMLObjectElement.cpp:
1073         (WebCore::HTMLObjectElement::imageSourceURL):
1074         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
1075         * html/HTMLOptGroupElement.cpp:
1076         (WebCore::HTMLOptGroupElement::groupLabelText):
1077         * html/HTMLProgressElement.cpp:
1078         (WebCore::HTMLProgressElement::max):
1079         * html/HTMLScriptElement.cpp:
1080         (WebCore::HTMLScriptElement::sourceAttributeValue):
1081         (WebCore::HTMLScriptElement::charsetAttributeValue):
1082         (WebCore::HTMLScriptElement::languageAttributeValue):
1083         (WebCore::HTMLScriptElement::forAttributeValue):
1084         (WebCore::HTMLScriptElement::eventAttributeValue):
1085         * html/HTMLTableCellElement.cpp:
1086         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs):
1087         * html/HTMLTableElement.cpp:
1088         (WebCore::HTMLTableElement::rules):
1089         (WebCore::HTMLTableElement::summary):
1090         (WebCore::HTMLTableElement::addSubresourceAttributeURLs):
1091         * html/HTMLTableSectionElement.cpp:
1092         (WebCore::HTMLTableSectionElement::align):
1093         (WebCore::HTMLTableSectionElement::ch):
1094         (WebCore::HTMLTableSectionElement::vAlign):
1095         * html/HTMLTextAreaElement.cpp:
1096         (WebCore::HTMLTextAreaElement::maxLength):
1097         * html/SearchInputType.cpp:
1098         (WebCore::SearchInputType::searchEventsShouldBeDispatched):
1099         * loader/FormSubmission.cpp:
1100         (WebCore::FormSubmission::create):
1101         * page/Frame.cpp:
1102         (WebCore::Frame::matchLabelsAgainstElement):
1103         * page/PageSerializer.cpp:
1104         (WebCore::PageSerializer::serializeFrame):
1105         * platform/win/PasteboardWin.cpp:
1106         (WebCore::Pasteboard::writeImageToDataObject):
1107         * rendering/HitTestResult.cpp:
1108         (WebCore::HitTestResult::altDisplayString):
1109         * rendering/RenderSearchField.cpp:
1110         (WebCore::RenderSearchField::autosaveName):
1111         * rendering/RenderTableCell.cpp:
1112         (WebCore::RenderTableCell::computePreferredLogicalWidths):
1113         * rendering/svg/RenderSVGResourceClipper.cpp:
1114         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1115
1116 2014-09-18  Chris Dumez  <cdumez@apple.com>
1117
1118         Have LiveNodeLists / HTMLCollections's elementMatches() take a reference
1119         https://bugs.webkit.org/show_bug.cgi?id=136902
1120
1121         Reviewed by Darin Adler.
1122
1123         Have LiveNodeLists / HTMLCollections's elementMatches() take a reference
1124         in argument instead of a pointer as the Element can never be null.
1125
1126         No new tests, no behavior change.
1127
1128         * dom/ClassNodeList.h:
1129         (WebCore::ClassNodeList::elementMatches):
1130         * dom/DocumentOrderedMap.cpp:
1131         (WebCore::keyMatchesWindowNamedItem):
1132         (WebCore::keyMatchesDocumentNamedItem):
1133         * dom/Element.cpp:
1134         (WebCore::Element::updateNameForDocument):
1135         (WebCore::Element::updateIdForDocument):
1136         * dom/LiveNodeList.cpp:
1137         (WebCore::LiveNodeList::namedItem):
1138         * dom/LiveNodeList.h:
1139         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
1140         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
1141         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
1142         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
1143         * dom/NameNodeList.h:
1144         (WebCore::NameNodeList::elementMatches):
1145         * dom/TagNodeList.h:
1146         (WebCore::TagNodeList::elementMatches):
1147         (WebCore::HTMLTagNodeList::elementMatches):
1148         * html/HTMLCollection.cpp:
1149         (WebCore::isMatchingElement):
1150         * html/HTMLNameCollection.cpp:
1151         (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
1152         (WebCore::WindowNameCollection::elementMatches):
1153         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
1154         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
1155         (WebCore::DocumentNameCollection::elementMatches):
1156         * html/HTMLNameCollection.h:
1157         * html/LabelsNodeList.cpp:
1158         (WebCore::LabelsNodeList::elementMatches):
1159         * html/LabelsNodeList.h:
1160         * html/RadioNodeList.cpp:
1161         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
1162         (WebCore::RadioNodeList::elementMatches):
1163         * html/RadioNodeList.h:
1164
1165 2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1166
1167         Remove unused methods from MediaPlayerClient
1168         https://bugs.webkit.org/show_bug.cgi?id=136884
1169
1170         Reviewed by Eric Carlson.
1171
1172         Remove unused methods from MediaPlayerClient that introduce
1173         dependencies on WebCore types.
1174
1175         * html/HTMLMediaElement.cpp:
1176         * html/HTMLMediaElement.h:
1177         * platform/graphics/MediaPlayer.h:
1178         (WebCore::MediaPlayerClient::mediaPlayerOwningDocument): Deleted.
1179         (WebCore::MediaPlayerClient::mediaPlayerHostWindow): Deleted.
1180         (WebCore::MediaPlayerClient::mediaPlayerWindowClipRect): Deleted.
1181
1182 2014-09-17  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
1183
1184         [GTK] Add Wayland support to GLContextEGL
1185         https://bugs.webkit.org/show_bug.cgi?id=136829
1186
1187         Reviewed by Martin Robinson.
1188
1189         * platform/graphics/egl/GLContextEGL.cpp:
1190         (WebCore::sharedEGLDisplay): Special-case the shared EGL display initialization
1191         for the GTK port when running under Wayland. In that case the pointer to the
1192         native wl_display object should be passed to eglGetDisplay(). If not running
1193         under Wayland we should fall back to using the shared X11 display (if support
1194         for that display system is enabled) or the EGL_DEFAULT_DISPLAY.
1195
1196 2014-09-17  Daniel Bates  <dabates@apple.com>
1197
1198         Unreviewed, rolling out r173695.
1199
1200         Broke building third-party Legacy WebKit apps; will
1201         investigate offline
1202
1203         Reverted changeset:
1204
1205         "[iOS] Make WebCore build with public iOS SDK"
1206         https://bugs.webkit.org/show_bug.cgi?id=136487
1207         http://trac.webkit.org/changeset/173695
1208
1209 2014-09-17  Roger Fong  <roger_fong@apple.com>
1210
1211         Speculative fix for a fast\dom\html-collections-named-getter failing only in Debug builds.
1212
1213         * dom/Node.cpp:
1214         (WebCore::Document::invalidateNodeListAndCollectionCaches):
1215
1216 2014-09-17  Benjamin Poulain  <bpoulain@apple.com>
1217
1218         Add parsing for :nth-child(An+B of selector)
1219         https://bugs.webkit.org/show_bug.cgi?id=136845
1220
1221         Reviewed by Antti Koivisto.
1222
1223         Add support for parsing :nth-child(of). The implementation of selector matching
1224         will be in a follow up, there are enough edge cases here already.
1225
1226         Spec here: http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo
1227
1228         Test: fast/css/parsing-css-nth-child-of.html
1229
1230         * css/CSSParser.cpp:
1231         (WebCore::CSSParser::detectFunctionTypeToken):
1232         (WebCore::CSSParser::realLex):
1233         The parser generate two new kinds of tokens:
1234         -NTHCHILDFUNCTION, matching the "nth-child" identifier.
1235         -NTHCHILDSELECTORSEPARATOR, matching the "of" keyword separating An+B from the selector list.
1236
1237         NTHCHILDFUNCTION is used to extend the new syntax only for :nth-child() and not all the "nth" functions
1238         (e.g. :nth-of-type()).
1239
1240         NTHCHILDSELECTORSEPARATOR exists for two reasons:
1241         -We must clear the "parsingMode" before parsing selectorList. If we failed to do that, the complex selectors
1242          would be parsed in NthChildMode, which has all kind of bad side effects.
1243         -The second reason is differentiacting "of" for all the other identifiers. Arguably, this could have been done
1244          in the grammar, but it is clearer this way since we already need the branches for the parsingMode.
1245
1246         * css/CSSGrammar.y.in:
1247         Those are pretty much duplicates of the existing FUNCTION rules but supporting the new syntax.
1248
1249         * css/CSSParserValues.cpp:
1250         (WebCore::selectorListMatchesPseudoElement):
1251         (WebCore::CSSParserSelector::matchesPseudoElement):
1252         Matching pseudo elements does not make much sense for those selectorList (e.g. :nth-child(2n of ::before)).
1253         Add helper function to fail parsing of those cases.
1254
1255         * css/CSSParserValues.h:
1256         * css/CSSSelector.cpp:
1257         (WebCore::CSSSelector::selectorText):
1258         * css/CSSSelector.h:
1259         (WebCore::CSSSelector::selectorList):
1260         Updated serialization code for CSS OM.
1261
1262 2014-09-17  Benjamin Poulain  <bpoulain@apple.com>
1263
1264         CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
1265         https://bugs.webkit.org/show_bug.cgi?id=136807
1266
1267         Reviewed by Antti Koivisto.
1268
1269         The spec defines selector lists as token separated by white space.
1270
1271         The definition of white space for CSS Selectors is:
1272         "White space in Selectors consists of the code points SPACE (U+0020),
1273         TAB (U+0009), LINE FEED (U+000A), CARRIAGE RETURN (U+000D), and FORM FEED (U+000C)
1274         can occur in whitespace. Other space-like code points, such as EM SPACE (U+2003)
1275         and IDEOGRAPHIC SPACE (U+3000), are never part of white space."
1276
1277         The old code was only matching SPACE (U+0020) which is buggy. This patch
1278         adds support for the other caracters.
1279
1280         Tests: fast/selectors/attr-list-01.html
1281                fast/selectors/attribute-list-with-whitespace-in-selector.html
1282                fast/selectors/attribute-list-with-whitespace-in-value.html
1283
1284         * css/SelectorChecker.cpp:
1285         (WebCore::attributeValueMatches):
1286         * cssjit/SelectorCompiler.cpp:
1287         (WebCore::SelectorCompiler::constructFragments):
1288         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
1289         Add the missing checks.
1290
1291         * html/track/VTTRegion.cpp:
1292         (WebCore::VTTRegion::setRegionSettings):
1293         (WebCore::VTTRegion::parseSettingValue):
1294         * html/track/WebVTTParser.cpp:
1295         (WebCore::WebVTTParser::hasRequiredFileIdentifier):
1296         (WebCore::WebVTTParser::collectTimingsAndSettings):
1297         * html/track/WebVTTParser.h:
1298         While looking for affected code, I discovered WebVTT redefines isHTMLSpace().
1299         I cleaned that code.
1300
1301 2014-09-17  Gavin Barraclough  <baraclough@apple.com>
1302
1303         Aways have a PageThrottler (sometimes have a UserActivity::Impl)
1304         https://bugs.webkit.org/show_bug.cgi?id=136892
1305
1306         Reviewed by Geoffrey Garen.
1307
1308         Some instances of Page have a PageThrottler to track activity on the Page, and some do not.
1309         (Specifically, those created from WebPage in WK2 do, those related to WK1, SVG & inspector do not).
1310
1311         We do this for three reasons:
1312             * We do not need to take AppNap assertions on WK1.
1313             * Some Pages do not track their visibility correctly, and would always claim to be visible.
1314             * Page VisibilityState is not set until after construction, so if we instantiate
1315
1316         Creating the entire PageThrottler lazily has the drawback that we have to check for its existence at
1317         numerous points throughout the code, and we'll miss activity that occurs between the Page being created
1318         & the PageThrottler added to it (really a theoretical problem right now, since they're currently always
1319         created pretty much back to back).
1320
1321         Instead, Page should always have a PageThrottler, & instead make the UserActivity::Impl on the
1322         PageThrottler be added later.
1323
1324         * WebCore.exp.in:
1325             - createPageThrottler -> enablePageThrottler
1326         * html/HTMLMediaElement.cpp:
1327         (WebCore::HTMLMediaElement::parseAttribute):
1328             - Page::pageThrottler now returns a reference rather than a pointer
1329         * loader/FrameLoader.cpp:
1330         (WebCore::FrameLoader::started):
1331             - Page::pageThrottler now returns a reference rather than a pointer
1332         * page/Page.cpp:
1333         (WebCore::Page::Page):
1334             - instantiate PageThrottler in constructor
1335         (WebCore::Page::enablePageThrottler):
1336             - renamed from createPageThrottler, instead of creating the PageThrottler this method now
1337               instruct PageThrottler to create a UserActivity::Impl
1338         (WebCore::Page::setViewState):
1339             - m_pageThrottler is not a pointer
1340         (WebCore::Page::createPageThrottler): Deleted.
1341             - renamed to enablePageThrottler
1342         * page/Page.h:
1343         (WebCore::Page::pageThrottler):
1344             - now returns a reference
1345         * page/PageThrottler.cpp:
1346         (WebCore::PageThrottler::PageThrottler):
1347             - no longer instantiate m_activity
1348         (WebCore::PageThrottler::createUserActivity):
1349             - lazily instantiate m_activity, call updateUserActivity
1350         (WebCore::PageThrottler::updateUserActivity):
1351             - m_activity may not yet be instantiated; added early return
1352         * page/PageThrottler.h:
1353             - m_activity becomes a std::unique_ptr, added createUserActivity
1354
1355 2014-09-17  Daniel Bates  <dabates@apple.com>
1356
1357         [iOS] Make WebCore build with public iOS SDK
1358         https://bugs.webkit.org/show_bug.cgi?id=136487
1359
1360         Reviewed by David Kilzer.
1361
1362         Add headers that wrap Mac and iOS SPIs and update WebCore source files to include these
1363         headers instead of the corresponding actual SPI header(s).
1364
1365         * WebCore.vcxproj/WebCore.vcxproj:
1366         * WebCore.vcxproj/WebCore.vcxproj.filters:
1367         * WebCore.vcxproj/WebCoreCG.props:
1368         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1369         * WebCore.xcodeproj/project.pbxproj:
1370         * bindings/objc/DOMInternal.mm:
1371         * bridge/objc/objc_instance.mm:
1372         * platform/audio/ios/MediaSessionManagerIOS.mm:
1373         * platform/cocoa/DisplaySleepDisablerCocoa.cpp:
1374         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1375         * platform/graphics/SimpleFontData.h:
1376         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1377         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1378         * platform/graphics/cg/BitmapImageCG.cpp:
1379         * platform/graphics/cg/ColorCG.cpp:
1380         * platform/graphics/cg/GraphicsContextCG.cpp:
1381         * platform/graphics/cg/ImageSourceCG.cpp:
1382         * platform/graphics/cg/PDFDocumentImage.cpp:
1383         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1384         * platform/graphics/ios/FontCacheIOS.mm:
1385         * platform/graphics/ios/FontServicesIOS.mm:
1386         * platform/graphics/ios/SimpleFontDataIOS.mm:
1387         * platform/graphics/mac/FontMac.mm:
1388         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1389         * platform/graphics/mac/MediaPlayerProxy.h:
1390         * platform/graphics/mac/SimpleFontDataMac.mm:
1391         * platform/ios/LegacyTileCache.mm:
1392         * platform/ios/LegacyTileGrid.mm:
1393         * platform/ios/LegacyTileGridTile.mm:
1394         * platform/ios/PlatformEventFactoryIOS.mm:
1395         * platform/ios/PlatformScreenIOS.mm:
1396         * platform/ios/WebEvent.mm:
1397         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1398         * platform/ios/wak/WAKAppKitStubs.h:
1399         * platform/ios/wak/WAKView.h:
1400         * platform/ios/wak/WKGraphics.h:
1401         * platform/ios/wak/WKGraphics.mm:
1402         * platform/ios/wak/WebCoreThread.mm:
1403         * platform/network/ios/QuickLook.mm:
1404         * platform/spi/ca/CALayerSPI.h: Added.
1405         * platform/spi/ca/CATiledLayerSPI.h: Added.
1406         * platform/spi/cf/CFLocaleSPI.h: Modified to use EXTERN_C.
1407         * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Ditto. Also changed header visibility from private to project.
1408         * platform/spi/cf/CFURLRequestSPI.h: Ditto. Also modified to unconditionally include header <CoreFoundation/CFBase.h>.
1409         * platform/spi/cg/CGColorTransformSPI.h: Added.
1410         * platform/spi/cg/CGContextSPI.h: Added.
1411         * platform/spi/cg/CGFloatSPI.h: Added.
1412         * platform/spi/cg/CGFontGlyphSupportSPI.h: Added.
1413         * platform/spi/cg/CGFontInfoSPI.h: Added.
1414         * platform/spi/cg/CGFontRenderingSPI.h: Added.
1415         * platform/spi/cg/CGFontUnicodeSupportSPI.h: Added.
1416         * platform/spi/cg/CGImageSPI.h: Added.
1417         * platform/spi/cg/CGSRegionSPI.h: Added.
1418         * platform/spi/cocoa/DispatchSPI.h: Added.
1419         * platform/spi/cocoa/IOPMLibSPI.h: Added.
1420         * platform/spi/cocoa/MachVMSPI.h: Added.
1421         * platform/spi/cocoa/NSFileManagerSPI.h: Added.
1422         * platform/spi/cocoa/NSGeometrySPI.h: Added.
1423         * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
1424         * platform/spi/cocoa/dyldSPI.h: Added.
1425         * platform/spi/ios/AVPlayerControllerSPI.h: Added.
1426         * platform/spi/ios/AVPlayerViewControllerSPI.h: Added.
1427         * platform/spi/ios/AVValueTimingSPI.h: Added.
1428         * platform/spi/ios/AVVideoLayerSPI.h: Added.
1429         * platform/spi/ios/CTFontDescriptorSPI.h: Added.
1430         * platform/spi/ios/CTFontSPI.h: Added.
1431         * platform/spi/ios/CUICatalogSPI.h: Added.
1432         * platform/spi/ios/CUIStyleEffectConfigurationSPI.h: Added.
1433         * platform/spi/ios/MPAVRoutingControllerSPI.h: Added.
1434         * platform/spi/ios/MobileGestaltSPI.h: Added.
1435         * platform/spi/ios/QLPreviewConverterSPI.h: Added.
1436         * platform/spi/ios/QuickLookSPI.h: Added.
1437         * rendering/RenderThemeIOS.mm:
1438
1439 2014-09-17  Gavin Barraclough  <barraclough@apple.com>
1440
1441         DOM timer throttling for hidden plugins
1442         https://bugs.webkit.org/show_bug.cgi?id=136197
1443
1444         Reviewed by Geoff Garen & Andreas Kling.
1445
1446         For non-visible web pages we slow timers (since they can't be driving animations, etc).
1447         We should do the same for plugins.
1448
1449         There are a few steps to this:
1450             - JSPluginElementFunctions notifies DOMTimer when script interacts with a plugin.
1451             - DOMTimerFireState keeps a record of events that occur while a timer is firing.
1452             - DOMTimer::fired detects timers that interact with invisible/inaudible plugins, and flags itself for throtting.
1453             - DOMTimer::intervalClampedToMinimum sets timer intervals appropriately.
1454
1455         * bindings/js/JSPluginElementFunctions.cpp:
1456         (WebCore::pluginScriptObject):
1457             - notify DOMTimer when script interacts with a plugin.
1458         * html/HTMLPlugInElement.cpp:
1459         (WebCore::HTMLPlugInElement::isDetectable):
1460         * html/HTMLPlugInElement.h:
1461             - added isDetectable, to check for visible / audible plugins.
1462         * page/DOMTimer.cpp:
1463         (WebCore::DOMTimerFireState::DOMTimerFireState):
1464         (WebCore::DOMTimerFireState::~DOMTimerFireState):
1465             - track current DOMTimerFireState.
1466         (WebCore::DOMTimer::DOMTimer):
1467             - initialize m_throttleState.
1468         (WebCore::DOMTimer::scriptDidInteractWithPlugin):
1469             - if interaction with a plugin occurs while a timer is firing, record on the DOMTimerFireState.
1470         (WebCore::DOMTimer::fired):
1471             - set DOMTimerFireState, and update m_throttleState accordingly.
1472         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
1473             - remove redundant check of maxTimerNestingLevel (covered by intervalClampedToMinimum).
1474         (WebCore::DOMTimer::intervalClampedToMinimum):
1475             - Also take m_throttleState into account when throttling.
1476         * page/DOMTimer.h:
1477             - added scriptDidInteractWithPlugin, m_throttleState.
1478         * platform/audio/AudioHardwareListener.h:
1479             - enum -> enum class.
1480         * plugins/PluginViewBase.h:
1481         (WebCore::PluginViewBase::audioHardwareActivity):
1482             - expose audioHardwareActivity on PluginViewBase (previously available in subclass).
1483
1484 2014-09-16  Gavin Barraclough  <baraclough@apple.com>
1485
1486         Exclude page visibility from PageThrottler's hysteresis
1487         https://bugs.webkit.org/show_bug.cgi?id=136866
1488
1489         Reviewed by Geoff Garen.
1490
1491         Including visibility in the hysteresis mechanism has the effect of prolonging the visually
1492         idle timeout, and causing the page hide event to be run at foreground priority. Neither of
1493         these are particularly desirable. Instead separate visibility from the rest of the page
1494         activities we track (and apply hysteresis to), and feed this directly into determination
1495         of the UserActivity state.
1496
1497         * page/PageThrottler.cpp:
1498         (WebCore::PageThrottler::PageThrottler):
1499             - when the PageThrottler is instantiated call updateUserActivity to set initial UserActivity.
1500         (WebCore::PageThrottler::incrementActivityCount):
1501             - simplified - when m_activityCount becomes non-zero, start m_hysteresis.
1502         (WebCore::PageThrottler::decrementActivityCount):
1503             - simplified - when m_activityCount becomes zero, stop m_hysteresis.
1504         (WebCore::PageThrottler::updateUserActivity):
1505             - end the UserActivity (allow AppNap) if visually idle and no page activity is taking place.
1506         (WebCore::PageThrottler::setViewState):
1507             - when the visually idle state changed call updateUserActivity to update the UserActivity.
1508         (WebCore::PageThrottler::started):
1509         (WebCore::PageThrottler::stopped):
1510             - when the hysteresis state changed call updateUserActivity to update the UserActivity.
1511         (WebCore::PageThrottler::updateHysteresis): Deleted.
1512             - removed: simplified the hysteresis trigger, we now incorporate visually idle state in updateUserActivity.
1513         * page/PageThrottler.h:
1514             - removed updateHysteresis, added updateUserActivity.
1515         * platform/HysteresisActivity.h:
1516         (WebCore::HysteresisActivity::state):
1517             - determine the curent state of the HysteresisActivity - started, waiting, or stopped.
1518
1519 2014-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1520
1521         [GTK] Fix runtime critical warnings when writing to the clipboard after r173687
1522         https://bugs.webkit.org/show_bug.cgi?id=136891
1523
1524         Reviewed by Philippe Normand.
1525
1526         * platform/gtk/PasteboardHelper.cpp:
1527         (WebCore::PasteboardHelper::writeClipboardContents): Check passed
1528         callback is not null before trying to ref/unref it since
1529         g_closure_ref/unref are not null safe.
1530
1531 2014-09-17  Zan Dobersek  <zdobersek@igalia.com>
1532
1533         [GTK] Add a helper function for display system deduction
1534         https://bugs.webkit.org/show_bug.cgi?id=136849
1535
1536         Reviewed by Martin Robinson.
1537
1538         getDisplaySystemType() is a helper function that checks the type of the
1539         default GdkDisplay object and initializes a static variable to the
1540         corresponding value. It then returns the value of that variable.
1541
1542         When building with the GTK+2 API (still the case with the GTK+2 plugin
1543         process) we default to X11.
1544
1545         The function is declared and implemented in GtkUtilities files.
1546
1547         * platform/gtk/GtkUtilities.cpp:
1548         (WebCore::widgetIsOnscreenToplevelWindow):
1549         (WebCore::getDisplaySystemType):
1550         * platform/gtk/GtkUtilities.h:
1551
1552 2014-09-16  Yusuke Suzuki  <utatane.tea@gmail.com>
1553
1554         filterRootById accidentally clears inAdjacentChain flag
1555         https://bugs.webkit.org/show_bug.cgi?id=136851
1556
1557         Reviewed by Benjamin Poulain.
1558
1559         Test: fast/selectors/filter-root-node-with-selector-contains-adjacents.html
1560
1561         * dom/SelectorQuery.cpp:
1562         (WebCore::filterRootById):
1563
1564 2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1565
1566         [GTK] Fix layering violations in PasteboardGtk
1567         https://bugs.webkit.org/show_bug.cgi?id=136802
1568
1569         Reviewed by Darin Adler.
1570
1571         Refactor the Pasteboard code moving the WebCore parts to the Editor.
1572
1573         * PlatformGTK.cmake: Add new file to compilation.
1574         * editing/Editor.cpp:
1575         (WebCore::Editor::performCutOrCopy):
1576         (WebCore::Editor::copyImage):
1577         * editing/Editor.h:
1578         * editing/gtk/EditorGtk.cpp: Added.
1579         (WebCore::createFragmentFromPasteBoardData):
1580         (WebCore::Editor::pasteWithPasteboard):
1581         (WebCore::getImageAndURLForElement):
1582         (WebCore::Editor::writeImageToPasteboard):
1583         (WebCore::Editor::writeSelectionToPasteboard):
1584         * page/DragController.cpp:
1585         (WebCore::DragController::startDrag):
1586         * page/gtk/DragControllerGtk.cpp:
1587         (WebCore::DragController::declareAndWriteDragImage):
1588         * platform/Pasteboard.h:
1589         * platform/gtk/DataObjectGtk.cpp: Remove range member, the caller
1590         should call setText() + setMarkup() intead.
1591         (WebCore::DataObjectGtk::setText):
1592         (WebCore::DataObjectGtk::setMarkup):
1593         (WebCore::DataObjectGtk::clearText):
1594         (WebCore::DataObjectGtk::clearMarkup):
1595         (WebCore::DataObjectGtk::clearAllExceptFilenames):
1596         * platform/gtk/DataObjectGtk.h:
1597         (WebCore::DataObjectGtk::hasText):
1598         (WebCore::DataObjectGtk::hasMarkup):
1599         (WebCore::DataObjectGtk::clearImage):
1600         (WebCore::DataObjectGtk::text):
1601         (WebCore::DataObjectGtk::markup):
1602         (WebCore::DataObjectGtk::setRange): Deleted.
1603         * platform/gtk/GtkDragAndDropHelper.h:
1604         * platform/gtk/PasteboardGtk.cpp:
1605         (WebCore::PasteboardImage::PasteboardImage):
1606         (WebCore::PasteboardImage::~PasteboardImage):
1607         (WebCore::Pasteboard::write):
1608         (WebCore::Pasteboard::writeSelection): Deleted.
1609         (WebCore::getURLForImageElement): Deleted.
1610         (WebCore::Pasteboard::writeImage): Deleted.
1611         (WebCore::Pasteboard::documentFragment): Deleted.
1612         * platform/gtk/PasteboardHelper.cpp:
1613         (WebCore::displayFromFrame): Deleted.
1614         (WebCore::PasteboardHelper::getPrimarySelectionClipboard): Deleted.
1615         * platform/gtk/PasteboardHelper.h:
1616
1617 2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1618
1619         DragData should not depend on Clipboard, DocumentFragment, and Document
1620         https://bugs.webkit.org/show_bug.cgi?id=21358
1621
1622         Reviewed by Darin Adler.
1623
1624         Refactor DragData to not depend on Frame, DocumentFragment,
1625         Document and Range. DragData::asFragment() has been moved to
1626         DragController and implemented in the platform specific file.
1627         DragData methods using Frame has been reworked in Mac to not use
1628         Frame, since all other ports were ignoreing the frame parameter.
1629
1630         * page/DragController.cpp:
1631         (WebCore::DragController::documentFragmentFromDragData): Make it
1632         a static member to be able to use createFragmentFromDragData().
1633         (WebCore::DragController::performDragOperation): Update to
1634         DragData API changes.
1635         (WebCore::DragController::dispatchTextInputEventFor): Ditto.
1636         (WebCore::DragController::concludeEditDrag): Ditto.
1637         (WebCore::documentFragmentFromDragData): Deleted.
1638         * page/DragController.h:
1639         * page/efl/DragControllerEfl.cpp:
1640         (WebCore::DragController::createFragmentFromDragData): Move
1641         DragData::asFragment() implementation here.
1642         * page/gtk/DragControllerGtk.cpp:
1643         (WebCore::DragController::dragOperation):
1644         (WebCore::DragController::createFragmentFromDragData): Ditto.
1645         * page/mac/DragControllerMac.mm:
1646         (WebCore::DragController::dragOperation):
1647         (WebCore::DragController::createFragmentFromDragData): Ditto.
1648         * page/win/DragControllerWin.cpp:
1649         (WebCore::DragController::createFragmentFromDragData): Ditto.
1650         * platform/DragData.h:
1651         * platform/efl/DragDataEfl.cpp:
1652         (WebCore::DragData::asPlainText): Remove Frame parameter.
1653         (WebCore::DragData::containsURL): Ditto.
1654         (WebCore::DragData::asURL): Ditto.
1655         (WebCore::DragData::asFragment): Deleted.
1656         * platform/gtk/DragDataGtk.cpp:
1657         (WebCore::DragData::asPlainText): Remove Frame parameter.
1658         (WebCore::DragData::containsCompatibleContent):
1659         (WebCore::DragData::containsURL): Ditto.
1660         (WebCore::DragData::asURL): Ditto.
1661         (WebCore::DragData::asFragment): Deleted.
1662         * platform/mac/DragDataMac.mm:
1663         (WebCore::DragData::asPlainText): Same implementation as the
1664         Editor.
1665         (WebCore::DragData::containsURL): Remove Frame parameter.
1666         (WebCore::DragData::asURL): Use URLByCanonicalizingURL() instead
1667         of using the Editor client.
1668         (WebCore::DragData::asFragment): Deleted.
1669         * platform/win/DragDataWin.cpp:
1670         (WebCore::DragData::containsURL): Remove Frame parameter.
1671         (WebCore::DragData::asURL): Ditto.
1672         (WebCore::DragData::asPlainText): Ditto.
1673         (WebCore::DragData::containsCompatibleContent):
1674         (WebCore::DragData::asFragment): Deleted.
1675
1676 2014-09-16  Chris Dumez  <cdumez@apple.com>
1677
1678         Rename Node::childNode(index) to traverseToChildAt(index) for clarity
1679         https://bugs.webkit.org/show_bug.cgi?id=136825
1680
1681         Reviewed by Benjamin Poulain.
1682
1683         Rename Node::childNode(index) to traverseToChildAt(index) to make it
1684         clearer that the method is actually traversing the children and thus
1685         potentially expensive.
1686
1687         This patch also avoids calling traverseToChildAt() in a couple of
1688         easily avoidable cases.
1689
1690         No new tests, no behavior change.
1691
1692         * WebCore.exp.in:
1693         * WebCore.order:
1694         Remove symbol for ContainerNode::childNode() as it was renamed. It does
1695         not seem we need to expose ContainerNode::traverseToChildAt().
1696
1697         * accessibility/AccessibilityObject.cpp:
1698         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
1699         (WebCore::AccessibilityObject::lengthForVisiblePositionRange):
1700         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1701         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
1702         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1703         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
1704         Mechanical renaming.
1705
1706         * dom/ContainerNode.cpp:
1707         (WebCore::ContainerNode::traverseToChildAt):
1708         (WebCore::ContainerNode::childNode): Deleted.
1709         * dom/ContainerNode.h:
1710         (WebCore::Node::traverseToChildAt):
1711         (WebCore::Node::childNode): Deleted.
1712         * dom/Node.h:
1713         - Rename Node / ContainerNode's childNode(index) to
1714           traverseToChildAt(index) to make it clear that it is actually
1715           traversing the children and thus potentially expensive.
1716         - Clean up the implementation of ContainerNode::traverseToChildAt()
1717           to avoid the use of an extra |i| variable.
1718
1719         * dom/Position.cpp:
1720         (WebCore::Position::computeNodeBeforePosition):
1721         Avoid calling traverseToChildAt(-1). Relying on the unsigned argument
1722         wrapping and the method returning null in this case is a bit obscure
1723         and causes unnecessary traversal of all children.
1724
1725         (WebCore::Position::computeNodeAfterPosition):
1726         (WebCore::Position::previous):
1727         (WebCore::Position::next):
1728         Mechanical renaming and update variable names to stop using
1729         abbreviations as per coding style.
1730
1731         * dom/PositionIterator.h:
1732         (WebCore::PositionIterator::PositionIterator):
1733         * dom/Range.cpp:
1734         (WebCore::Range::insertNode):
1735         (WebCore::Range::checkNodeWOffset):
1736         (WebCore::Range::firstNode):
1737         (WebCore::Range::pastLastNode):
1738         * dom/RangeBoundaryPoint.h:
1739         (WebCore::RangeBoundaryPoint::set):
1740         * editing/BreakBlockquoteCommand.cpp:
1741         (WebCore::BreakBlockquoteCommand::doApply):
1742         * editing/CompositeEditCommand.cpp:
1743         (WebCore::CompositeEditCommand::removeChildrenInRange):
1744         * editing/DeleteSelectionCommand.cpp:
1745         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1746         * editing/InsertParagraphSeparatorCommand.cpp:
1747         (WebCore::InsertParagraphSeparatorCommand::doApply):
1748         * editing/TextIterator.cpp:
1749         (WebCore::nextInPreOrderCrossingShadowBoundaries):
1750         (WebCore::TextIterator::node):
1751         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
1752         * editing/VisibleUnits.cpp:
1753         (WebCore::nextLinePosition):
1754         * editing/cocoa/HTMLConverter.mm:
1755         (WebCore::editingAttributedStringFromRange):
1756         Mechanical renaming.
1757
1758         * inspector/DOMPatchSupport.cpp:
1759         (WebCore::DOMPatchSupport::innerPatchChildren):
1760         Iterate over children while incrementing the |i| variable to avoid
1761         calling traverseToChildAt(index) repeatedly and thus traversing the
1762         children from the beginning every time.
1763
1764 2014-09-16  Joseph Pecoraro  <pecoraro@apple.com>
1765
1766         Web Inspector: Reduce a bit of churn setting initial remote inspection state
1767         https://bugs.webkit.org/show_bug.cgi?id=136875
1768
1769         Reviewed by Timothy Hatcher.
1770
1771         * bindings/js/JSDOMGlobalObject.cpp:
1772         (WebCore::JSDOMGlobalObject::finishCreation):
1773         We no longer need to toggle this state.
1774
1775 2014-09-16  Enrica Casucci  <enrica@apple.com>
1776
1777         Should have an editing behavior specific for IOS.
1778         https://bugs.webkit.org/show_bug.cgi?id=136876
1779
1780         Reviewed by Sam Weinig.
1781
1782         This patch introduces a new editing behavior type to be able
1783         to perform editing tasks that are specific to iOS.
1784         All the existing EditingBehavior methods return the same boolean
1785         value for for Mac and iOS. A new one has been introduced to support
1786         a specific behavior in the DeleteSelectionCommand.
1787
1788         * editing/DeleteSelectionCommand.cpp:
1789         (WebCore::DeleteSelectionCommand::doApply):
1790         * editing/EditingBehavior.h:
1791         (WebCore::EditingBehavior::shouldConsiderSelectionAsDirectional):
1792         (WebCore::EditingBehavior::shouldCenterAlignWhenSelectionIsRevealed):
1793         (WebCore::EditingBehavior::shouldToggleStyleBasedOnStartOfSelection):
1794         (WebCore::EditingBehavior::shouldAlwaysGrowSelectionWhenExtendingToBoundary):
1795         (WebCore::EditingBehavior::shouldSelectOnContextualMenuClick):
1796         (WebCore::EditingBehavior::shouldExtendSelectionByWordOrLineAcrossCaret):
1797         (WebCore::EditingBehavior::shouldRebalanceWhiteSpacesInSecureField):
1798         * editing/EditingBehaviorTypes.h:
1799         * editing/FrameSelection.cpp:
1800         (WebCore::FrameSelection::positionForPlatform):
1801         * page/Settings.cpp:
1802         (WebCore::editingBehaviorTypeForPlatform):
1803         * testing/InternalSettings.cpp:
1804         (WebCore::InternalSettings::setEditingBehavior):
1805
1806 2014-09-16  Commit Queue  <commit-queue@webkit.org>
1807
1808         Unreviewed, rolling out r173670.
1809         https://bugs.webkit.org/show_bug.cgi?id=136871
1810
1811         Creates layering violation (Requested by enrica on #webkit).
1812
1813         Reverted changeset:
1814
1815         "Move HTMLConverter from editing/cocoa to platform/cocoa."
1816         https://bugs.webkit.org/show_bug.cgi?id=136474
1817         http://trac.webkit.org/changeset/173670
1818
1819 2014-09-16  Eric Carlson  <eric.carlson@apple.com>
1820
1821         [Mac] MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput doesn't work with rotated movies
1822         https://bugs.webkit.org/show_bug.cgi?id=136872
1823
1824         Reviewed by Tim Horton.
1825
1826         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1827         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator): Add logging.
1828         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Apply the video track
1829             preferred transform.
1830
1831 2014-09-16  Enrica Casucci  <enrica@apple.com>
1832
1833         Move HTMLConverter from editing/cocoa to platform/cocoa.
1834         https://bugs.webkit.org/show_bug.cgi?id=136474
1835
1836         Reviewed by Benjamin Poulain.
1837
1838         This is a platform specific class and it belongs to the platform folder.
1839
1840         * WebCore.xcodeproj/project.pbxproj:
1841         * editing/cocoa: Removed.
1842         * editing/cocoa/HTMLConverter.h: Removed.
1843         * editing/cocoa/HTMLConverter.mm: Removed.
1844         * platform/cocoa/HTMLConverter.h: Copied from editing/cocoa/HTMLConverter.h.
1845         * platform/cocoa/HTMLConverter.mm: Copied from editing/cocoa/HTMLConverter.mm.
1846
1847 2014-09-16  Enrica Casucci  <enrica@apple.com>
1848
1849         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
1850         https://bugs.webkit.org/show_bug.cgi?id=136474
1851
1852         Reviewed by Benjamin Poulain.
1853
1854         This is the updated version of the patch that was landed in r173340.
1855         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
1856         and removes the assumption that EAffinity values match NSSelectionAffinity
1857         values. It also removes the includes in TextAffinity.h, creating the need to
1858         include explicitly the files when necessary.
1859
1860         * editing/TextAffinity.h:
1861         (kit): Deleted.
1862         (core): Deleted.
1863         * editing/cocoa/HTMLConverter.mm:
1864         * page/mac/WebCoreFrameView.h:
1865
1866 2014-09-16  Beth Dakin  <bdakin@apple.com>
1867
1868         overflow:scroll should not leave space for a scroll corner with overlay scrollbars
1869         https://bugs.webkit.org/show_bug.cgi?id=136861
1870
1871         Reviewed by Sam Weinig.
1872
1873         overflow:scroll should behave like overflow:auto when the scrollbar will render as 
1874         an overlay scrollbar.
1875
1876         Re-name hasAutoVerticalScrollbar()/Horizontal to 
1877         hasVerticalScrollbarWithAutoBehavior()/Horizontal, and return true for 
1878         overflow:scroll scrollbars that will render as overlay scrollbars.
1879         * rendering/RenderBox.cpp:
1880         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior):
1881         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior):
1882         * rendering/RenderBox.h:
1883         (WebCore::RenderBox::scrollsOverflowX):
1884         (WebCore::RenderBox::scrollsOverflowY):
1885         (WebCore::RenderBox::hasAutoVerticalScrollbar): Deleted.
1886         (WebCore::RenderBox::hasAutoHorizontalScrollbar): Deleted.
1887
1888         Re-name overflowRequiresScrollbar() to styleRequiresScrollbar() and also re-name 
1889         overflowDefinesAutomaticScrollbar() to styleDefinesAutomaticScrollbar(), and make         
1890         these functions take into account the fact that overflow:scroll should act like 
1891         overflow:auto when the scrollbar will render as an overlay scrollbar.
1892         * rendering/RenderLayer.cpp:
1893         (WebCore::styleRequiresScrollbar):
1894         (WebCore::styleDefinesAutomaticScrollbar):
1895         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1896         (WebCore::RenderLayer::calculateClipRects):
1897
1898 2014-09-16  peavo@outlook.com  <peavo@outlook.com>
1899
1900         [Curl] Sometimes incomplete or empty content can be loaded from cache.
1901         https://bugs.webkit.org/show_bug.cgi?id=136855
1902
1903         Reviewed by Alex Christensen.
1904
1905         Sometimes, when two requests with the same url are started at the same time,
1906         there is a possibility of loading incomplete or empty content from the cache.
1907         This happens because the method CurlCacheEntry::isLoading() is returning the wrong status
1908         in the time period between the headers are received, and the content data is received.
1909         This can be fixed by using a flag for the load status, instead of checking whether
1910         the content file is open. 
1911
1912         * platform/network/curl/CurlCacheEntry.cpp:
1913         (WebCore::CurlCacheEntry::CurlCacheEntry): Initialize loading flag.
1914         (WebCore::CurlCacheEntry::isLoading): Return loading flag.
1915         (WebCore::CurlCacheEntry::didFail): Call new method to set loading flag.
1916         (WebCore::CurlCacheEntry::didFinishLoading): Ditto.
1917         (WebCore::CurlCacheEntry::setIsLoading): Added new method to set loading flag.
1918         * platform/network/curl/CurlCacheEntry.h: Added loading flag and new method to set it.
1919         * platform/network/curl/CurlCacheManager.cpp:
1920         (WebCore::CurlCacheManager::didReceiveResponse): Call new method to set loading flag.
1921
1922 2014-09-16  Chris Dumez  <cdumez@apple.com>
1923
1924         Rename Node::nodeIndex() to computeNodeIndex() for clarity
1925         https://bugs.webkit.org/show_bug.cgi?id=136826
1926
1927         Reviewed by Benjamin Poulain.
1928
1929         Rename Node::nodeIndex() to computeNodeIndex() to make it clear that
1930         index is being computed and that calling this method is potentially
1931         expensive.
1932
1933         No new tests, no behavior change.
1934
1935         * WebCore.exp.in:
1936         * WebCore.order:
1937         Rename exported symbol for Node::nodeIndex() as well.
1938
1939         * dom/Document.cpp:
1940         (WebCore::Document::caretRangeFromPoint):
1941         * dom/Node.cpp:
1942         (WebCore::Node::computeNodeIndex):
1943         (WebCore::Node::nodeIndex): Deleted.
1944         * dom/Node.h:
1945         * dom/NodeWithIndex.h:
1946         (WebCore::NodeWithIndex::index):
1947         Clean up implementation to reduce the scope of the Node variable and
1948         to follow coding style (variable naming, spacing, star placement).
1949
1950         * dom/Position.cpp:
1951         (WebCore::Position::computeOffsetInContainerNode):
1952         (WebCore::Position::previous):
1953         (WebCore::Position::next):
1954         (WebCore::Position::upstream):
1955         (WebCore::Position::downstream):
1956         * dom/Position.h:
1957         (WebCore::positionInParentBeforeNode):
1958         (WebCore::positionInParentAfterNode):
1959         * dom/Range.cpp:
1960         (WebCore::Range::compareNode):
1961         (WebCore::Range::intersectsNode):
1962         (WebCore::Range::processContents):
1963         (WebCore::Range::insertNode):
1964         (WebCore::Range::setStartAfter):
1965         (WebCore::Range::setEndBefore):
1966         (WebCore::Range::setEndAfter):
1967         (WebCore::Range::setStartBefore):
1968         * dom/RangeBoundaryPoint.h:
1969         (WebCore::RangeBoundaryPoint::ensureOffsetIsValid):
1970         * editing/ApplyStyleCommand.cpp:
1971         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1972         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1973         * editing/DeleteSelectionCommand.cpp:
1974         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1975         * editing/Editor.cpp:
1976         (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
1977         * editing/FrameSelection.cpp:
1978         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
1979         * editing/ReplaceSelectionCommand.cpp:
1980         (WebCore::ReplaceSelectionCommand::doApply):
1981         * editing/TextIterator.cpp:
1982         (WebCore::TextIterator::range):
1983         (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
1984         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
1985         * editing/htmlediting.cpp:
1986         (WebCore::updatePositionForNodeRemoval):
1987         * html/HTMLTextFormControlElement.cpp:
1988         (WebCore::setContainerAndOffsetForRange):
1989         * page/DOMSelection.cpp:
1990         (WebCore::DOMSelection::getRangeAt):
1991         (WebCore::DOMSelection::containsNode):
1992         (WebCore::DOMSelection::shadowAdjustedOffset):
1993         * rendering/RenderBlock.cpp:
1994         (WebCore::positionForPointRespectingEditingBoundaries):
1995         * rendering/RenderTreeAsText.cpp:
1996         (WebCore::nodePosition):
1997
1998 2014-09-16  Jer Noble  <jer.noble@apple.com>
1999
2000         Videos with controls enabled never receive 'dragstart' events.
2001         https://bugs.webkit.org/show_bug.cgi?id=136837
2002
2003         Reviewed by Eric Carlson.
2004
2005         Fixes a crash regression introduced by r173631. Node::contains() has an interesting property of returning false
2006         if `this` is NULL. Rather than depending on this behavior, explicitly NULL-check state.source and bail early.
2007
2008         * page/DragController.cpp:
2009         (WebCore::DragController::startDrag):
2010
2011 2014-09-16  Csaba Osztrogonác  <ossy@webkit.org>
2012
2013         URTBF after r173659.
2014
2015         After r173659 convertToIntLength() is used only inside ENABLE(DASHBOARD_SUPPORT), so it
2016         became unused function and caused build failure if ENABLE(DASHBOARD_SUPPORT) is false.
2017
2018         Source/WebCore/css/StyleResolver.cpp:1471:15: error: 'WebCore::Length WebCore::convertToIntLength(const WebCore::CSSPrimitiveValue*, const WebCore::CSSToLengthConversionData&)'
2019         defined but not used [-Werror=unused-function] cc1plus: all warnings being treated as errors
2020
2021         * css/StyleResolver.cpp: Missing ENABLE(DASHBOARD_SUPPORT) guard added.
2022
2023 2014-09-14  Darin Adler  <darin@apple.com>
2024
2025         Scroll snap properties don't handle inherit and initial propertly.
2026         https://bugs.webkit.org/show_bug.cgi?id=136643
2027
2028         Reviewed by Beth Dakin.
2029
2030         Restructured scroll snap code both to handle inherit and initial, and to reduce the
2031         total code size a bit, fixing a few minor bugs along the way. Updated the regression
2032         tests to cover the new parts.
2033
2034         * css/CSSComputedStyleDeclaration.cpp:
2035         (WebCore::addValuesForNamedGridLinesAtIndex): Use a modern for loop.
2036         (WebCore::scrollSnapDestination): Changed to take a LengthSize. Also streamlined.
2037         (WebCore::scrollSnapPoints): Changed to to take a ScrollSnapPoints. Also streamlined and
2038         added code to handle the "uses elements" case; serialize that as an identifier, not the
2039         string "elements", fixing a minor bug.
2040         (WebCore::scrollSnapCoordinates): Changed to take a Vector<LengthSize>. Also streamlined
2041         and added code to handle the empty vector case; serialize that as an identifier, not the
2042         string "none", fixing a minor bug.
2043         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword): Use nullptr.
2044         (WebCore::counterToCSSValue): Use nullptr.
2045         (WebCore::ComputedStyleExtractor::styledNode): Use nullptr.
2046         (WebCore::ComputedStyleExtractor::propertyValue): Use nullptr. Moved CSS_SCROLL_SNAP
2047         to a more appropriate section of the switch statement. Made it just call through to
2048         the functions above in a more straightforward way.
2049         (WebCore::CSSComputedStyleDeclaration::getPropertyValue): Reversed logic to use early
2050         return and to call emptyString.
2051         (WebCore::CSSComputedStyleDeclaration::item): Use emptyString.
2052         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand): Use nullptr.
2053         (WebCore::CSSComputedStyleDeclaration::parentRule): Use nullptr.
2054         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Use nullptr.
2055         (WebCore::CSSComputedStyleDeclaration::getPropertyPriority): Use emptyString.
2056         (WebCore::CSSComputedStyleDeclaration::getPropertyShorthand): Use emptyString.
2057
2058         * css/DeprecatedStyleBuilder.cpp:
2059         (WebCore::ApplyPropertyMarqueeIncrement::applyValue): Use the switch statement for the
2060         invalid value as well as for the valid values, rather than a separate if statement.
2061         Call convertToLength directly rather than through a StyleResolver static member function.
2062
2063         * css/PropertySetCSSStyleDeclaration.cpp:
2064         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue): Fixed a formatting mistake.
2065
2066         * css/StyleResolver.cpp:
2067         (WebCore::convertToIntLength): Made this function local to this file instead of a
2068         static member function.
2069         (WebCore::convertToFloatLength): Ditto.
2070         (WebCore::StyleResolver::parseSnapCoordinate): Added. Used to keep snap point parsing
2071         code small.
2072         (WebCore::StyleResolver::parseSnapCoordinatePair): Ditto.
2073         (WebCore::StyleResolver::parseSnapPoints): Added. Parses an entire snap points property.
2074         (WebCore::StyleResolver::applyProperty): Removed various bits of redundant code that
2075         were not using the primitiveValue value already in a local variable. Added the
2076         HANDLE_INHERIT_AND_INITIAL to all the scroll snap properties and updated since the
2077         RenderStyle structure now more closely matches the CSS properties.
2078
2079         * css/StyleResolver.h: Updated for above changes, and removed a redundant "private:".
2080
2081         * page/scrolling/AxisScrollSnapOffsets.cpp:
2082         (WebCore::appendChildSnapOffsets): Use auto& instead of SnapCoordinate since that type
2083         is now gone. Updated since coordinates are now LengthSize.
2084         (WebCore::updateFromStyle): Changed to take a reference instead of a pointer and
2085         also to fetch the data from RenderStyle in a new way that more closely matches the
2086         CSS properties.
2087         (WebCore::updateSnapOffsetsForScrollableArea): Ditto. Also moved some memory allocation
2088         inside if statements so we don't wastefully allocate and destroy.
2089
2090         * rendering/style/RenderStyle.cpp: Added an include of StyleScrollSnapPoints.h now
2091         that the header doesn't include them. Moved the conditional includes out of the main
2092         include paragraph (even though I don't think conditional includes are usually a good
2093         idea).
2094         (WebCore::RenderStyle::initialScrollSnapPointsX): Added.
2095         (WebCore::RenderStyle::initialScrollSnapPointsY): Added.
2096         (WebCore::RenderStyle::initialScrollSnapDestination): Added.
2097         (WebCore::RenderStyle::initialScrollSnapCoordinates): Added.
2098         (WebCore::RenderStyle::scrollSnapPointsX): Added.
2099         (WebCore::RenderStyle::scrollSnapPointsY): Added.
2100         (WebCore::RenderStyle::scrollSnapDestination): Added.
2101         (WebCore::RenderStyle::scrollSnapCoordinates): Added.
2102         (WebCore::RenderStyle::setScrollSnapPointsX): Added.
2103         (WebCore::RenderStyle::setScrollSnapPointsY): Added.
2104         (WebCore::RenderStyle::setScrollSnapDestination): Added.
2105         (WebCore::RenderStyle::setScrollSnapCoordinates): Added.
2106
2107         * rendering/style/RenderStyle.h: Replaced the include of StyleScrollSnapPoints.h with
2108         a forward declaration of ScrollSnapPoints. Removed getters and setters for the old
2109         style properties and replaced them with new ones that match the CSS properties more
2110         closely. Tweaked formatting a bit. Added initial value functions for the the scroll snap
2111         properties.
2112
2113         * rendering/style/StyleRareNonInheritedData.cpp: Added include of StyleScrollSnapPoints.h
2114         now that RenderStyle.h doesn't include it.
2115         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Updated since
2116         m_scrollSnapType is now unsigned instead of ScrollSnapType.
2117
2118         * rendering/style/StyleRareNonInheritedData.h: Fixed type of m_scrollSnapType to be
2119         unsigned instead of ScrollSnapType. This should have been causing problems on Windows,
2120         but I think we got lucky and had no detectable problems.
2121
2122         * rendering/style/StyleScrollSnapPoints.cpp:
2123         (WebCore::ScrollSnapPoints::ScrollSnapPoints): Added.
2124         (WebCore::operator==): Added overloads for both ScrollSnapPoints and also for
2125         StyleScrollSnapPoints; using a free function for both since both have public data.
2126         (WebCore::defaultScrollSnapDestination): Added, replaces a static member function.
2127         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Updated both the default
2128         constructor and the copy constructor for the new design.
2129
2130         * rendering/style/StyleScrollSnapPoints.h: Added a ScrollSnapPoints struct for the
2131         type of the snap-points-x and snap-points-y CSS properties. Changed the data members
2132         of StyleScrollSnapPoints to match the various CSS properties rather than breaking
2133         out all the data into separate data members.
2134         (WebCore::StyleScrollSnapPoints::defaultRepeatOffset): Deleted. Replaced by the
2135         default constructor for ScrollSnapPoints.
2136         (WebCore::StyleScrollSnapPoints::defaultDestinationOffset): Deleted. Replaced by
2137         a function inside the .cpp file.
2138
2139 2014-09-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2140
2141         [GStreamer] http/tests/media/video-auth.html is failing
2142         https://bugs.webkit.org/show_bug.cgi?id=126619
2143
2144         Reviewed by Philippe Normand.
2145
2146         Test: http/tests/media/video-auth-cors.html
2147
2148         Use stored credentials when retrieving videos following image loading behavior
2149         (i.e. stored credentials are always used except when in cors anonymous mode),
2150         except that requesting credentials from user remains disabled for cross-origin requests.
2151
2152         Patch is covered by http/tests/media/video-auth.html.
2153
2154         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2155         (CachedResourceStreamingClient::CachedResourceStreamingClient): Enable using stored credentials except when using cors anonymous mode.
2156
2157 2014-09-16  Jinho Bang  <jinho.bang@samsung.com>
2158
2159         Add version of drawFocusIfNeeded that take a Path2D parameter.
2160         https://bugs.webkit.org/show_bug.cgi?id=136846
2161
2162         Reviewed by Dirk Schulze.
2163
2164         Tests: fast/canvas/draw-focus-if-needed-with-path.html
2165
2166         * html/canvas/CanvasRenderingContext2D.cpp:
2167         (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
2168         (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
2169         * html/canvas/CanvasRenderingContext2D.h:
2170         * html/canvas/CanvasRenderingContext2D.idl:
2171
2172 2014-09-15  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
2173
2174         [GTK] Add WaylandDisplay
2175         https://bugs.webkit.org/show_bug.cgi?id=136216
2176
2177         Reviewed by Martin Robinson.
2178
2179         Add the WaylandDisplay class. This class is used in the LayerTreeHostGtk,
2180         in the WebProcess, and controls the connection to the nested Wayland
2181         compositor in the UIProcess. Only one instance of the class is used in the
2182         WebProcess, accessible via the static WaylandDisplay::instance() method.
2183
2184         The WaylandDisplay constructor performs the EGL initialization while also
2185         querying the Wayland register, resulting in initializing client-side objects
2186         that can interact with the wl_compositor and wl_webkitgtk interfaces
2187         implemented in the nested Wayland compositor. The single class instance is
2188         only deemed properly initialized if it picked up the Wayland interface objects
2189         and has properly acquired the EGL display and config.
2190
2191         WaylandDisplay::createSurface() is called by the LayerTreeHostGtk during
2192         its own initialization. The method creates a new wl_surface object via the
2193         wl_compositor interface and a new wl_egl_window object that's based on that
2194         surface. For the wl_egl_window object, we fall back to a width or height of 1
2195         in case the passed-in value for either is 0. This avoids problems in Mesa
2196         where widths or heights of 0 are not supported.
2197
2198         We associate the created surface with the passed-in widget ID, as provided
2199         by LayerTreeHostGtk, via the wl_webkitgtk interface. This enables proper
2200         mapping of Wayland surfaces and the GtkWidgets in the UIProcess and makes
2201         it possible for the nested Wayland compositor to correctly determine which
2202         GtkWidget has to be redrawn after some surface has been committed.
2203
2204         WaylandDisplay::createSharingGLContext() creates a new GLContextEGL object
2205         that's to be used as a sharing context. The method creates a new surface
2206         via the wl_compositor interface and uses it to create a dummy native EGL
2207         window that's 1x1px in size. The GLContextEGL object is then created
2208         through the static GLContextEGL::createWindowContext() method.
2209
2210         * PlatformGTK.cmake:
2211         * platform/graphics/wayland/WaylandDisplay.cpp: Added.
2212         (WebCore::WaylandDisplay::globalCallback):
2213         (WebCore::WaylandDisplay::globalRemoveCallback):
2214         (WebCore::WaylandDisplay::instance):
2215         (WebCore::WaylandDisplay::WaylandDisplay):
2216         (WebCore::WaylandDisplay::createSurface):
2217         (WebCore::WaylandDisplay::createSharingGLContext):
2218         * platform/graphics/wayland/WaylandDisplay.h: Added.
2219         (WebCore::WaylandDisplay::nativeDisplay):
2220         (WebCore::WaylandDisplay::eglDisplay):
2221         * platform/graphics/wayland/WaylandSurface.cpp:
2222         (WebCore::WaylandSurface::~WaylandSurface): Assert that the WaylandDisplay
2223         instance is present before going on to destroy the surface resources.
2224
2225 2014-09-15  Chris Dumez  <cdumez@apple.com>
2226
2227         Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
2228         https://bugs.webkit.org/show_bug.cgi?id=136844
2229
2230         Reviewed by Sam Weinig.
2231
2232         Rename LiveNodeLists / HTMLCollections's nodeMatches() to elementMatches()
2233         for clarity as the argument is an Element.
2234
2235         No new tests, no behavior change.
2236
2237         * dom/ClassNodeList.h:
2238         (WebCore::ClassNodeList::elementMatches):
2239         (WebCore::ClassNodeList::nodeMatches): Deleted.
2240         * dom/DocumentOrderedMap.cpp:
2241         (WebCore::keyMatchesWindowNamedItem):
2242         (WebCore::keyMatchesDocumentNamedItem):
2243         * dom/Element.cpp:
2244         (WebCore::Element::updateNameForDocument):
2245         (WebCore::Element::updateIdForDocument):
2246         * dom/LiveNodeList.cpp:
2247         (WebCore::LiveNodeList::namedItem):
2248         * dom/LiveNodeList.h:
2249         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
2250         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
2251         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
2252         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
2253         * dom/NameNodeList.h:
2254         (WebCore::NameNodeList::elementMatches):
2255         (WebCore::NameNodeList::nodeMatches): Deleted.
2256         * dom/TagNodeList.h:
2257         (WebCore::TagNodeList::elementMatches):
2258         (WebCore::HTMLTagNodeList::elementMatches):
2259         (WebCore::TagNodeList::nodeMatches): Deleted.
2260         (WebCore::HTMLTagNodeList::nodeMatches): Deleted.
2261         * html/HTMLCollection.cpp:
2262         (WebCore::isMatchingElement):
2263         * html/HTMLNameCollection.cpp:
2264         (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
2265         (WebCore::WindowNameCollection::elementMatches):
2266         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
2267         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
2268         (WebCore::DocumentNameCollection::elementMatches):
2269         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
2270         (WebCore::WindowNameCollection::nodeMatches): Deleted.
2271         (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Deleted.
2272         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Deleted.
2273         (WebCore::DocumentNameCollection::nodeMatches): Deleted.
2274         * html/HTMLNameCollection.h:
2275         * html/LabelsNodeList.cpp:
2276         (WebCore::LabelsNodeList::elementMatches):
2277         (WebCore::LabelsNodeList::nodeMatches): Deleted.
2278         * html/LabelsNodeList.h:
2279         * html/RadioNodeList.cpp:
2280         (WebCore::RadioNodeList::elementMatches):
2281         (WebCore::RadioNodeList::nodeMatches): Deleted.
2282         * html/RadioNodeList.h:
2283
2284 2014-09-15  Chris Dumez  <cdumez@apple.com>
2285
2286         Use an AtomicString as key for caching ClassNodeList objects
2287         https://bugs.webkit.org/show_bug.cgi?id=136830
2288
2289         Reviewed by Benjamin Poulain.
2290
2291         Use an AtomicString as key for caching ClassNodeList objects instead of
2292         a String. ClassNodeList is the only type using a String instead of an
2293         AtomicString as key in the cache HashTable. This brings some
2294         complexity.
2295
2296         I believe this was done to avoid unnecessarily atomizing the String,
2297         for performance reasons. However, at the moment, the String gets
2298         atomized anyway when constructing the ClassNodeList object. This is
2299         because the ClassNodeList::m_classNames member is of SpaceSplitString
2300         type and the SpaceSplitString constructor takes an AtomicString in
2301         argument.
2302
2303         Using an AtomicString to cache ClassNodeLists simplifies the code quite
2304         a bit and decreases the size of NodeListsNodeData as well.
2305
2306         Test: fast/dom/getElementsByClassName/conflict-tag-name.html
2307
2308         * WebCore.order:
2309         Remove symbol corresponding to addCacheWithName() as it was removed.
2310
2311         * dom/ClassNodeList.cpp:
2312         (WebCore::ClassNodeList::~ClassNodeList):
2313         Update the constructor to take an AtomicString in argument instead of
2314         a String, for clarity. The String gets atomized when initializing
2315         m_classNames anyway.
2316
2317         (WebCore::ClassNodeList::ClassNodeList):
2318         Call removeCacheWithAtomicName() instead of removeCacheWithName() now
2319         that m_originalClassNames is an AtomicString.
2320
2321         * dom/ClassNodeList.h:
2322         Use AtomicString instead of String type for classNames, in both the
2323         constructor argument and the m_originalClassNames data member.
2324
2325         * dom/ContainerNode.cpp:
2326         (WebCore::ContainerNode::getElementsByClassName):
2327         Call addCacheWithAtomicName() instead of addCacheWithName() now that
2328         addCacheWithName() has been removed.
2329
2330         * dom/Node.cpp:
2331         (WebCore::NodeListsNodeData::invalidateCaches):
2332         Stop invalidating m_nameCaches as this HashMap no longer exists.
2333
2334         * dom/NodeRareData.h:
2335         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash):
2336         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
2337         (WebCore::NodeListsNodeData::isEmpty):
2338         (WebCore::NodeListsNodeData::adoptDocument):
2339         (WebCore::NodeListsNodeData::namedNodeListKey):
2340         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
2341         (WebCore::NodeListsNodeData::addCacheWithName): Deleted.
2342         (WebCore::NodeListsNodeData::removeCacheWithName): Deleted.
2343         - Drop addCacheWithName() / removeCacheWithName() now that no NodeList
2344           uses a String as HashMap key.
2345         - Drop m_nameCaches now that ClassNodeLists are cached in
2346           m_atomicNameCaches instead.
2347         - Remove StringType template parameter and hardcode AtomicString
2348           instead.
2349
2350 2014-09-15  Chris Dumez  <cdumez@apple.com>
2351
2352         Return early in SelectorChecker::checkOne() if selector.isAttributeSelector() is true
2353         https://bugs.webkit.org/show_bug.cgi?id=136838
2354
2355         Reviewed by Benjamin Poulain.
2356
2357         Return early in SelectorChecker::checkOne() if selector.isAttributeSelector()
2358         is true and the selector matched. Previously, we were only returning early if
2359         the selector did not match and we were falling through if it did. This means
2360         that we ended up doing the 2 if() checks below in the method unnecessarily:
2361         - selector.m_match == CSSSelector::PseudoClass
2362         - selector.m_match == CSSSelector::PseudoElement
2363
2364         No new tests, no behavior change.
2365
2366         * css/SelectorChecker.cpp:
2367         (WebCore::SelectorChecker::checkOne):
2368
2369 2014-09-15  Chris Dumez  <cdumez@apple.com>
2370
2371         Un-inline the Node constructor
2372         https://bugs.webkit.org/show_bug.cgi?id=136842
2373
2374         Reviewed by Benjamin Poulain.
2375
2376         Un-inline the Node constructor as it does not seem to impact
2377         performance, based on my testing:
2378         http://dromaeo.com/?id=226992,226998
2379
2380         This reduces the stripped binary size by ~4Kb.
2381
2382         No new tests, no behavior change.
2383
2384         * dom/Document.h:
2385         (WebCore::Node::Node): Deleted.
2386         * dom/Node.cpp:
2387         (WebCore::Node::Node):
2388
2389 2014-09-15  Shivakumar JM  <shiva.jm@samsung.com>
2390
2391         Web Core: Websocket state should be set to closed in didReceiveMessage call back.
2392         https://bugs.webkit.org/show_bug.cgi?id=136219
2393
2394         Reviewed by Alexey Proskuryakov.
2395
2396         Set the Websocket state to closed in didReceiveMessage call back.
2397
2398         Test: http/tests/websocket/tests/hybi/error-event-ready-state.html
2399
2400         * Modules/websockets/WebSocket.cpp:
2401         (WebCore::WebSocket::didReceiveMessageError):
2402
2403 2014-09-15  Jon Honeycutt  <jhoneycutt@apple.com>
2404
2405         Naming clean-up.
2406
2407         Rubber-stamped by Andy Estes.
2408
2409         * html/HTMLFormElement.cpp:
2410         (WebCore::HTMLFormElement::requestAutocomplete):
2411         (WebCore::HTMLFormElement::finishRequestAutocomplete):
2412         Remove superfluous "AutocompleteResult".
2413
2414         * html/HTMLFormElement.h:
2415         Ditto.
2416
2417 2014-09-15  Alexey Proskuryakov  <ap@apple.com>
2418
2419         Crash when logging in to optionshouse.com
2420         https://bugs.webkit.org/show_bug.cgi?id=136834
2421
2422         Reviewed by Anders Carlsson.
2423
2424         No test, because I couldn't make one. I don't have a way to reproduce first-hand.
2425
2426         * platform/network/cf/SocketStreamHandleCFNet.cpp:
2427         (WebCore::SocketStreamHandle::readStreamCallback):
2428         (WebCore::SocketStreamHandle::writeStreamCallback):
2429
2430 2014-09-15  Jer Noble  <jer.noble@apple.com>
2431
2432         Unreviewed build fix for 32-bit builds.
2433
2434         Make casts from unsigned long long -> size_t explicit, rather than implicit. Also
2435         make CARingBuffer be protected by USING_MEDIA_TOOLBOX so ports without that flag
2436         won't try to compile unused code.
2437
2438         * platform/audio/mac/CARingBuffer.cpp:
2439         (WebCore::CARingBuffer::fetch):
2440         * platform/audio/mac/CARingBuffer.h:
2441         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2442         (WebCore::AudioSourceProviderAVFObjC::provideInput):
2443
2444 2014-09-15  Jer Noble  <jer.noble@apple.com>
2445
2446         Unreviewed logic fix from r173631. Logic for includeShadowDOM was reversed.
2447
2448         * page/DragController.cpp:
2449         (WebCore::DragController::startDrag):
2450
2451 2014-09-15  Jer Noble  <jer.noble@apple.com>
2452
2453         Videos with controls enabled never receive 'dragstart' events.
2454         https://bugs.webkit.org/show_bug.cgi?id=136837
2455
2456         Reviewed by Simon Fraser.
2457
2458         When initiating a drag, the DragController checks whether the hit-tested element at a
2459         drag location is a child of the drag source, and bails if early if that is not the case.
2460         For a <video> element with controls, the hit-tested element is an element within the
2461         <video> element's Shadow DOM. Because the DragController uses a method which does not
2462         take Shadow DOM into account when determining a child-parent relationship, this test fails
2463         and all drag operations fail as well.
2464
2465         For <video> elements only, when testing whether the drag source is an ancestor of the
2466         hit-tested element, use containsIncludingShadowDOM() instead of contains(). To ensure that
2467         the controls are still usable when a drag listener is active on a <video> element, mark
2468         the controls as a draggable element, but simply call preventDefault() in the controls'
2469         'dragstart' handler, ensuring the timeline and volume controls are themselves still draggable.
2470
2471         * Modules/mediacontrols/mediaControlsApple.css:
2472         (audio::-webkit-media-controls-panel):
2473         * Modules/mediacontrols/mediaControlsApple.js:
2474         (Controller.prototype.createControls):
2475         (Controller.prototype.handlePanelDragStart):
2476         * page/DragController.cpp:
2477         (WebCore::DragController::startDrag):
2478
2479 2014-09-15  Roger Fong  <roger_fong@apple.com>
2480
2481         Unreviewed. Add an unimplemented case to handle CSSPropertyWebkitInitialLetter so we don't get an assertion failure.
2482
2483         * css/SVGCSSStyleSelector.cpp:
2484         (WebCore::StyleResolver::applySVGProperty):
2485
2486 2014-09-15  Jer Noble  <jer.noble@apple.com>
2487
2488         [Mac] Support audioSourceProvider() in MediaPlayerPrivateAVFoundationObjC
2489         https://bugs.webkit.org/show_bug.cgi?id=135042
2490
2491         Reviewed by Eric Carlson.
2492
2493         Add support for AudioSourceProvider in MediaPlayerPrivateAVFoundationObjC, thereby
2494         supporting MediaElementAudioSourceNode.
2495
2496         Import the CARingBuffer from CoreAudio sample code, making the necessary modifications
2497         for WebKit style and coding conventions. The threading assumptions for this class are
2498         that there will be a single writer thread and a single reader thread.
2499
2500         * platform/audio/mac/CARingBuffer.cpp: Added.
2501         (WebCore::CARingBuffer::create): Create a unique_ptr.
2502         (WebCore::CARingBuffer::CARingBuffer): Simple constructor.
2503         (WebCore::CARingBuffer::~CARingBuffer): Simple destructor.
2504         (WebCore::CARingBuffer::allocate): Initialize the buffers and time bounds structures.
2505         (WebCore::CARingBuffer::deallocate): Destroy same.
2506         (WebCore::ZeroRange): Static utility method.
2507         (WebCore::StoreABL): Ditto.
2508         (WebCore::FetchABL): Ditto.
2509         (WebCore::ZeroABL): Ditto.
2510         (WebCore::CARingBuffer::store): Store the passed in buffer in the ring buffer, wrapping
2511             if necessary.
2512         (WebCore::CARingBuffer::setTimeBounds): Set the new time bounds by incrementing the
2513             bounds index locally, filling in the new values, then atomically incrementing the
2514             reader-visible index.
2515         (WebCore::CARingBuffer::getTimeBounds): Get the new time bounds by masking the time
2516             bounds index, and using it as an offset to the time bounds array. Protect against
2517             CPU starvation on the reading thread by checking the index against the stored
2518             index in the array entry. This check will fail if the writing thread has wrapped
2519             more than the size of the array.
2520         (WebCore::CARingBuffer::clipTimeBounds): Clamp the passed values to the available bounds.
2521         (WebCore::CARingBuffer::startFrame): Simple accessor.
2522         (WebCore::CARingBuffer::endFrame): Ditto.
2523         (WebCore::CARingBuffer::fetch): Read an audio buffer list from the ring buffer, possbily
2524             wrapping around to the start of the ring buffer.
2525         * platform/audio/mac/CARingBuffer.h: Added.
2526         (WebCore::CARingBuffer::numberOfChannels): Simple accessor.
2527         (WebCore::CARingBuffer::frameOffset): Ditto.
2528         (WebCore::CARingBuffer::TimeBounds::TimeBounds): Struct holding the start and end frame values.
2529
2530         Add an implementation of AudioSourceProvider, using AVAudioMix and MTAudioProcessingTap
2531         to tap an AVPlayerItem's audio output and feed it to a MediaElementAudioSourceNode.
2532
2533         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h: Added.
2534         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm: Added.
2535         (WebCore::AudioSourceProviderAVFObjC::create): Simple factory.
2536         (WebCore::AudioSourceProviderAVFObjC::AudioSourceProviderAVFObjC): Simple constructor.
2537         (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC): Simple destructor.
2538         (WebCore::AudioSourceProviderAVFObjC::provideInput): Push audio into the ring buffer.
2539         (WebCore::AudioSourceProviderAVFObjC::setClient): Call destroyMix()/createMix() as appropriate.
2540         (WebCore::AudioSourceProviderAVFObjC::setPlayerItem): Ditto.
2541         (WebCore::AudioSourceProviderAVFObjC::destroyMix): Detach and destroy the AVAudioMix and tap.
2542         (WebCore::AudioSourceProviderAVFObjC::createMix): Set up the AVAudioMix and tap and attach to
2543             the AVPlayerItem.
2544         (WebCore::AudioSourceProviderAVFObjC::initCallback): Pass to class method.
2545         (WebCore::AudioSourceProviderAVFObjC::finalizeCallback): Ditto.
2546         (WebCore::AudioSourceProviderAVFObjC::prepareCallback): Ditto.
2547         (WebCore::AudioSourceProviderAVFObjC::unprepareCallback): Ditto.
2548         (WebCore::AudioSourceProviderAVFObjC::processCallback): Ditto.
2549         (WebCore::AudioSourceProviderAVFObjC::init): Set up the storage pointer for the tap.
2550         (WebCore::AudioSourceProviderAVFObjC::finalize): No-op.
2551         (WebCore::operator==): Compare two AudioStreamBasicDescription objects.
2552         (WebCore::operator!=): Ditto.
2553         (WebCore::AudioSourceProviderAVFObjC::prepare): Create an AudioCoverter object if necessary,
2554             create the ring buffer, and notify the client of format changes.
2555         (WebCore::AudioSourceProviderAVFObjC::unprepare): Destroy same.
2556         (WebCore::AudioSourceProviderAVFObjC::process): Copy samples out of the ring buffer,
2557             format converting them if necessary. Mute original audio.
2558
2559         Create the AudioSourceProviderAVFObjC object and notify it when the current AVPlayerItem changes.
2560
2561         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2562         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2563         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2564         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2565         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
2566
2567         Enable SOFT_LINK_MAY_FAIL on the Mac platform.
2568
2569         * platform/mac/SoftLinking.h:
2570
2571         Add new files to the project.
2572
2573         * WebCore.xcodeproj/project.pbxproj:
2574
2575 2014-09-15  Chris Dumez  <cdumez@apple.com>
2576
2577         Avoid redundant isElementNode() checks in Traversal<HTML*Element> / Traversal<SVG*Element>
2578         https://bugs.webkit.org/show_bug.cgi?id=136719
2579
2580         Reviewed by Darin Adler.
2581
2582         Avoid redundant isElementNode() checks in Traversal<HTML*Element> /
2583         Traversal<SVG*Element>.  We used to iterate through Elements, and then
2584         call isElementOfType<HTML*Element>()  on each Element. This made sense
2585         because hasTagName() used to be defined on Element. However, after
2586         http://trac.webkit.org/changeset/165699, hasTagName() is now defined on
2587         Node for HTMLQualifiedName / SVGQualifiedName arguments.
2588
2589         Node::hasTagName(HTMLQualifiedName) basically does the following check
2590         "isHTMLElement() &&  toHTMLElement(*this).hasTagName(tagName)". As a
2591         consequence, doing an isElementNode() check is now redundant as
2592         isHTMLElement() is defined on Node.
2593
2594         This patch adds a template parameter to isElementOfType() so that it can
2595         take any type in argument (particulaly Node, Element, HTMLElement,
2596         SVGElement, MathMLElement), not just an Element. I had to add an
2597         ElementTypeCastTraits struct to support partial specialization as C++
2598         does not support partial specialization of template functions.
2599         This patch also updates Traversal<ElementType> so that the methods use
2600         NodeTraversal internally instead of Traversal<ElementType>. As a result,
2601         we now iterate over Nodes (not Elements) and call the new
2602         isElementOfType<ElementType>(Node) helpers (which are efficient after
2603         r165699).
2604
2605         Before the patch, the code ended up doing the following checks for
2606         Traversal<HTML*element>:
2607         node.isElementNode() && toElement(node).isHTMLElement()
2608             && toHTMLElement(node).hasTagName(HTMLNames::fooTag)
2609
2610         After the patch, the code only does:
2611         node.isHTMLElement()
2612             && toHTMLElement(node).hasTagName(HTMLNames::fooTag)
2613
2614         No new tests, no behavior change.
2615
2616         * dom/Element.h:
2617         (WebCore::Element>):
2618         (WebCore::isElementOfType):
2619         Add template parameter to isElementOfType() function so that it can
2620         handle any argument type, not just Elements. Also introduce an
2621         ElementTypeCastTraits struct that is called by isElementOfType()
2622         function so that we can so partial template specialization.
2623
2624         * dom/ElementTraversal.h:
2625         (WebCore::Traversal<ElementType>::firstWithinTemplate):
2626         (WebCore::Traversal<ElementType>::lastWithinTemplate):
2627         (WebCore::Traversal<ElementType>::nextTemplate):
2628         (WebCore::Traversal<ElementType>::previousTemplate):
2629         Use NodeTraversal API internally instead of Traversal<Element> to avoid
2630         redundant isElementNode() checks.
2631
2632         (WebCore::Traversal<Element>::lastWithinTemplate): Deleted.
2633         The code is now identical to the generic version.
2634
2635         (WebCore::Traversal<Element>::previousTemplate): Deleted.
2636         The code is now identical to the generic version.
2637
2638         * dom/make_names.pl:
2639         (printTypeHelpers):
2640         - Generate template specializations for ElementTypeCastTraits struct
2641           instead of isElementOfType(). This avoids having to provide overloads
2642           for specific argument types (e.g. Node, Element, HTMLElement, ...).
2643         - Share more code between HTML code path and the other path (for SVG,
2644           MTHML).
2645
2646         * html/HTMLElement.h:
2647         (WebCore::HTMLElement>):
2648         Provide HTMLElement template specialization for ElementTypeCastTraits
2649         struct instead of isElementOfType().
2650
2651         * html/HTMLFormControlElement.h:
2652         (WebCore::HTMLFormControlElement>):
2653         Provide HTMLFormControlElement template specialization for
2654         ElementTypeCastTraits struct instead of isElementOfType().
2655
2656         * html/HTMLFrameElementBase.h:
2657         (WebCore::isHTMLFrameElementBase):
2658         - Remove helper taking an Element in argument as it does not bring any
2659           benefit. Instead, update the overload taking a Node in argument to
2660           remove the unnecessary isElementNode() check as isHTMLFrameElement(Node)
2661           is now efficient.
2662         - Add an overload taking an HTMLElement in argument so that we can bypass
2663           the isHTMLElement() check when we know the input is an HTMLElement.
2664
2665         * html/HTMLMediaElement.h:
2666         (WebCore::HTMLMediaElement>):
2667         Provide HTMLMediaElement template specialization for ElementTypeCastTraits
2668         struct instead of isElementOfType().
2669
2670         * html/HTMLPlugInImageElement.h:
2671         (WebCore::HTMLPlugInImageElement>):
2672         Provide HTMLPlugInImageElement template specialization for
2673         ElementTypeCastTraits struct instead of isElementOfType().
2674
2675         * html/LabelableElement.h:
2676         (WebCore::LabelableElement>):
2677         Provide LabelableElement template specialization for ElementTypeCastTraits
2678         struct instead of isElementOfType().
2679
2680         * mathml/MathMLElement.h:
2681         (WebCore::MathMLElement>):
2682         Provide MathMLElement template specialization for ElementTypeCastTraits
2683         struct for consistency with HTMLElement / SVGElement.
2684
2685         * svg/SVGElement.h:
2686         (WebCore::SVGElement>):
2687         - Provide SVGElement template specialization for ElementTypeCastTraits
2688           struct instead of isElementOfType().
2689         - include SVGElementTypeHelpers.h at the end of the file (similarly to
2690           what is already done in HTMLElement.h because
2691           isElementOfType(const SVGElement&) needs to be defiend because the
2692           include.
2693
2694         * svg/SVGFilterPrimitiveStandardAttributes.h:
2695         (WebCore::SVGFilterPrimitiveStandardAttributes>):
2696         Provide SVGFilterPrimitiveStandardAttributes template specialization for
2697         ElementTypeCastTraits struct instead of isElementOfType().
2698
2699         * svg/animation/SVGSMILElement.h:
2700         (WebCore::SVGSMILElement>):
2701         Provide SVGSMILElement template specialization for ElementTypeCastTraits
2702         struct instead of isElementOfType().
2703
2704
2705 2014-08-07  Sergio Villar Senin  <svillar@igalia.com>
2706
2707         [CSS Grid Layout] Sort items by span when resolving content-based track sizing functions
2708         https://bugs.webkit.org/show_bug.cgi?id=135701
2709
2710         Reviewed by Darin Adler.
2711
2712         Section 10.4 of the specs mentions that we should first treat non
2713         spanning items and then incrementally proceed with items with
2714         greater spans when resolving the track breaths in the Track Sizing
2715         Algorithm.
2716
2717         As a nice side effect we're removing the multiple processing of
2718         spanning grid items caused by GridIterator (it returns the same
2719         item as many times as the number of cells it spans). This adds a
2720         ~4% performance penalty in auto-grid-lots-of-data.html mainly due
2721         to the use of a hash to remove duplicates.
2722
2723         Test: fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html
2724
2725         * rendering/RenderGrid.cpp:
2726         (WebCore::RenderGrid::gridItemSpan):
2727         (WebCore::gridItemWithSpanSorter):
2728         (WebCore::uniquePointerInPair):
2729         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2730         * rendering/RenderGrid.h:
2731
2732 2014-09-15  Zan Dobersek  <zdobersek@igalia.com>
2733
2734         [GTK][CMake] Build WebCore with Wayland-specific include directories, libraries
2735         https://bugs.webkit.org/show_bug.cgi?id=136815
2736
2737         Reviewed by Philippe Normand.
2738
2739         * PlatformGTK.cmake: Add the platform/graphics/wayland/ directory to the list of
2740         WebCore's include directories. Add include directories of the Wayland dependency
2741         to the list of WebCore's include directories. Same for the Wayland libraries.
2742
2743 2014-09-15  peavo@outlook.com  <peavo@outlook.com>
2744
2745         [WinCairo] Make it easier to enable/disable GStreamer.
2746         https://bugs.webkit.org/show_bug.cgi?id=135766
2747
2748         Reviewed by Brent Fulgham.
2749
2750         Make it possible to enable/disable GStreamer by editing the new user macro ENABLE_GSTREAMER_WINCAIRO.
2751
2752         * WebCore.vcxproj/WebCoreDebugWinCairo.props: Import GStreamer property file.
2753         * WebCore.vcxproj/WebCoreReleaseWinCairo.props: Ditto.
2754
2755 2014-09-12  Sergio Villar Senin  <svillar@igalia.com>
2756
2757         [CSS Grid Layout] Crash at CSSParser::parseGridTemplateRowsAndAreas
2758         https://bugs.webkit.org/show_bug.cgi?id=136778
2759
2760         Reviewed by Darin Adler.
2761
2762         An empty list of grid line names (represented by "()") does not
2763         add anything to the list of parsed values. That's why trying to
2764         concatenate an adjacent list of grid line names was failing,
2765         because we were trying to concatenate a list with the last parsed
2766         CSSValue which was not the expected grid line names list.
2767
2768         * css/CSSParser.cpp:
2769         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
2770         (WebCore::CSSParser::parseGridLineNames):
2771         * css/CSSParser.h:
2772
2773 2014-09-15  Andres Gomez  <agomez@igalia.com>
2774
2775         [GStreamer] don't send transferMode HTTP header
2776         https://bugs.webkit.org/show_bug.cgi?id=136781
2777
2778         Reviewed by Philippe Normand.
2779
2780         No header at all is better than having the wrong header as DLNA
2781         mandates that a missing header has to be tolerated while a wrong
2782         header is an error.
2783
2784         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2785         (webKitWebSrcStart):
2786         * platform/network/HTTPHeaderNames.in:
2787
2788 2014-09-14  Christophe Dumez  <cdumez@apple.com>
2789
2790         Fix post-mortem nits for r173528 & r173549
2791         https://bugs.webkit.org/show_bug.cgi?id=136808
2792
2793         Reviewed by Darin Adler.
2794
2795         Fix post-mortem nits for r173528 & r173549.
2796
2797         No new tests, no behavior change.
2798
2799         * accessibility/AccessibilityNodeObject.cpp:
2800         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
2801         - Use auto* instead of more specific types.
2802         - Use fastGetAttribute() instead of getAttribute() as this is
2803           supported for the "title" attribute.
2804
2805         * editing/FrameSelection.cpp:
2806         (WebCore::FrameSelection::setSelectionFromNone):
2807         Use auto* instead of more specific types.
2808
2809 2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2810
2811         Introduce FONT_DATA_TYPE_CASTS, and use it
2812         https://bugs.webkit.org/show_bug.cgi?id=136766
2813
2814         Reviewed by Darin Adler.
2815
2816         As a step to use toFoo, this patch introduces FONT_DATA_TYPE_CASTS macro for toFooFontData().
2817         This will help to detect wrong type cast.
2818
2819         * platform/graphics/FontData.h:
2820         * platform/graphics/FontGlyphs.cpp:
2821         (WebCore::FontGlyphs::releaseFontData):
2822         (WebCore::FontGlyphs::determinePitch):
2823         * platform/graphics/GlyphPageTreeNode.cpp:
2824         (WebCore::GlyphPageTreeNode::initializePage):
2825         * platform/graphics/SegmentedFontData.h:
2826         * platform/graphics/SimpleFontData.h:
2827         * platform/graphics/mac/SimpleFontDataMac.mm:
2828         (WebCore::SimpleFontData::getCompositeFontReferenceFontData):
2829
2830 2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2831
2832         Generate toCSSStyleSheet using STYLE_SHEET_TYPE_CASTS
2833         https://bugs.webkit.org/show_bug.cgi?id=136774
2834
2835         Reviewed by Darin Adler.
2836
2837         As a step to use toFoo, this patch introduces STYLE_SHEET_TYPE_CASTS for toCSSStyleSheet().
2838         This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.
2839
2840         No new tests, no behavior changes.
2841
2842         * bindings/gobject/WebKitDOMPrivate.cpp:
2843         (WebKit::wrap):
2844         * css/CSSStyleSheet.h:
2845         * css/StyleSheet.h:
2846         * dom/DocumentStyleSheetCollection.cpp:
2847         (WebCore::filterEnabledNonemptyCSSStyleSheets):
2848         * dom/ProcessingInstruction.cpp:
2849         (WebCore::ProcessingInstruction::parseStyleSheet):
2850         * inspector/InspectorCSSAgent.cpp:
2851         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2852         (WebCore::InspectorCSSAgent::collectStyleSheets):
2853
2854 2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2855
2856         Generate toFooElementData() using ELEMENT_DATA_TYPE_CASTS
2857         https://bugs.webkit.org/show_bug.cgi?id=136775
2858
2859         Reviewed by Darin Adler.
2860
2861         As a step to use toFoo, this patch introduces ELEMENT_DATA_TYPE_CASTS for toFooElementData().
2862         This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.
2863
2864         No new tests, no behavior changes.
2865
2866         * dom/Element.cpp:
2867         (WebCore::Element::cloneAttributesFromElement):
2868         (WebCore::Element::createUniqueElementData):
2869         * dom/ElementData.cpp:
2870         (WebCore::ElementData::destroy):
2871         * dom/ElementData.h:
2872         (WebCore::ElementData::length):
2873         (WebCore::ElementData::attributeBase):
2874         (WebCore::ElementData::presentationAttributeStyle):
2875         (WebCore::ElementData::attributesIterator):
2876         * svg/SVGSVGElement.cpp:
2877         (WebCore::SVGSVGElement::setupInitialView): Remove static_cast<SVGSVGElement*>
2878
2879 2014-09-14  Chris Dumez  <cdumez@apple.com>
2880
2881         Remove unnecessary overloads taking a ContainerNode in Element Traversal
2882         https://bugs.webkit.org/show_bug.cgi?id=136767
2883
2884         Reviewed by Darin Adler.
2885
2886         Remove unnecessary overloads taking a ContainerNode in Element Traversal.
2887         Several of those don't bring any performance improvements as the needed
2888         methods are defined on Node (not ContainerNode).
2889
2890         No new tests, no behavior change.
2891
2892         * dom/ElementTraversal.h:
2893         (WebCore::Traversal<Element>::previous):
2894         NodeTraversal::previous() takes a const Node* in argument so the
2895         ContainerNode overload is not needed.
2896
2897         (WebCore::Traversal<ElementType>::previous):
2898         Unnecessary now that Traversal<Element>::previous() takes a const Node*
2899         in argument.
2900
2901         (WebCore::Traversal<ElementType>::nextSibling):
2902         nextSibling() is defined on Node, not ContainerNode, so the overload
2903         is not needed.
2904
2905         (WebCore::Traversal<ElementType>::previousSibling):
2906         previousSibling() is defined on Node, not ContainerNode, so the overload
2907         is not needed.
2908
2909         (WebCore::Traversal<Element>::previousTemplate): Deleted.
2910         (WebCore::Traversal<ElementType>::previousTemplate): Deleted.
2911         (WebCore::Traversal<ElementType>::nextSiblingTemplate): Deleted.
2912         (WebCore::Traversal<ElementType>::previousSiblingTemplate): Deleted.
2913         No need to have those functions templated anymore.
2914
2915 2014-09-14  Daniel Bates  <dabates@apple.com>
2916
2917         [iOS] Attempt to fix the iOS build after <http://trac.webkit.org/changeset/173606>
2918         (https://bugs.webkit.org/show_bug.cgi?id=136789)
2919
2920         Substitute Node::countChildNodes() for Node::childNodeCount() in more places.
2921
2922         Although I updated a comment in WebCore::lastOffsetForEditing() (defined in file
2923         editing/htmlediting.cpp) to refer to Node::countChildNodes(), I'm unclear what the
2924         comment is trying to explain that isn't otherwise explained by the code or the
2925         comments that precede this function. Specifically, I don't understand the use of
2926         the word "preempt" in the comment. We should look to improve the readability of
2927         this comment.
2928
2929         * editing/htmlediting.cpp:
2930         (WebCore::lastOffsetForEditing):
2931         * page/ios/FrameIOS.mm:
2932         (WebCore::Frame::interpretationsForCurrentRoot):
2933
2934 2014-09-14  Chris Dumez  <cdumez@apple.com>
2935
2936         Drop NodeTraversal::nextSkippingChildren() overload taking a ContainerNode
2937         https://bugs.webkit.org/show_bug.cgi?id=136764
2938
2939         Reviewed by Darin Adler.
2940
2941         Drop NodeTraversal::nextSkippingChildren() overload taking a
2942         ContainerNode argument. This one does not bring any performance
2943         improvement because nextSibling() is defined on Node and
2944         nextAncestorSibling() takes a Node in argument.
2945
2946         Also remove the overload in ElementTraversal as it no longer makes
2947         sense after this change.
2948
2949         No new tests, no behavior change.
2950
2951         * dom/ElementTraversal.h:
2952         (WebCore::Traversal<ElementType>::nextSkippingChildren):
2953         (WebCore::Traversal<ElementType>::nextSkippingChildrenTemplate): Deleted.
2954         * dom/NodeTraversal.h:
2955         (WebCore::NodeTraversal::nextSkippingChildren):
2956         (WebCore::NodeTraversal::next):
2957         (WebCore::NodeTraversal::traverseNextSkippingChildrenTemplate): Deleted.
2958
2959 2014-09-14  Chris Dumez  <cdumez@apple.com>
2960
2961         Rename Node::childNodeCount() to countChildNodes() and avoid inefficient uses
2962         https://bugs.webkit.org/show_bug.cgi?id=136789
2963
2964         Reviewed by Darin Adler.
2965
2966         Rename Node::childNodeCount() to countChildNodes() to make it clearer
2967         that the method actually computes the result rather than returning a
2968         cached value.
2969
2970         This patch also introduces a new Node::hasOneChild() method that is
2971         used to check if a Node has a single child. This is much more efficient
2972         than calling countChildNodes() == 1.
2973
2974         The patch also leverages Node::hasChildNodes() in a lot of places
2975         instead of calling countChildNodes().
2976
2977         Finally, in a couple of places, we now use childrenOfType() to iterate
2978         over children more efficient than using countChildNodes() and
2979         childNode(index).
2980
2981         No new tests, no behavior change.
2982
2983         * WebCore.exp.in:
2984         * WebCore.order:
2985         Update the name of the exposed symbol for countChildNodes().
2986
2987         * dom/ContainerNode.cpp:
2988         (WebCore::ContainerNode::removeChildren):
2989         (WebCore::ContainerNode::countChildNodes):
2990         (WebCore::ContainerNode::childNodeCount): Deleted.
2991         Rename childNodeCount() to countChildNodes() to make it obvious it is
2992         computing the result rather than returning a cached value.
2993
2994         * dom/ContainerNode.h:
2995         (WebCore::ContainerNode::hasOneChild):
2996         Introduce an efficient way to check in a ContainerNode has a single
2997         child as "countChildNodes() == 1" calls were frequent and inefficient.
2998
2999         (WebCore::Node::countChildNodes):
3000         (WebCore::Node::childNodeCount): Deleted.
3001         * dom/Node.h:
3002         Rename childNodeCount() to countChildNodes().
3003
3004         * dom/Position.cpp:
3005         (WebCore::Position::parentAnchoredEquivalent):
3006         * dom/Position.h:
3007         (WebCore::lastOffsetInNode):
3008         * dom/Range.cpp:
3009         Mechanical renaming.
3010
3011         (WebCore::lengthOfContentsInNode):
3012         * editing/ApplyStyleCommand.cpp:
3013         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
3014         (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
3015         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
3016         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
3017         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
3018         Call hasChildNodes() rather than countChildNodes() as it is a lot more
3019         efficient.
3020
3021         * editing/Editor.cpp:
3022         (WebCore::Editor::setTextAsChildOfElement):
3023         (WebCore::Editor::rangeOfString):
3024         (WebCore::Editor::countMatchesForText):
3025         * editing/FrameSelection.cpp:
3026         (WebCore::FrameSelection::elementRangeContainingCaretSelection):
3027         Mechanical renaming.
3028
3029         * editing/ReplaceSelectionCommand.cpp:
3030         (WebCore::ReplaceSelectionCommand::insertAsListItems):
3031         Call hasOneChild() instead of countChildNodes() == 1. Also remove
3032         redundant listElement->hasChildNodes() check as hasOneChild() takes
3033         care of this already.
3034
3035         * editing/TextIterator.cpp:
3036         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3037         * editing/VisibleUnits.cpp:
3038         (WebCore::endOfDocument):
3039         * editing/htmlediting.cpp:
3040         (WebCore::lastOffsetForEditing):
3041         Mechanical renaming.
3042
3043         (WebCore::visiblePositionBeforeNode):
3044         (WebCore::visiblePositionAfterNode):
3045         Call hasChildNodes() instead of converting countChildNodes() to a
3046         boolean.
3047
3048         * editing/markup.cpp:
3049         (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
3050         Call !hasChildNodes() instead of !countChildNodes().
3051
3052         (WebCore::isPlainTextMarkup):
3053         - Drop !node->isElementNode() check as !node->hasTagName(divTag) takes
3054           care of discarding non-Element Nodes already.
3055         - Cast the Node to an HTMLDivElement as soon as possible to avoid
3056           calling calling the slower Node APIs in several cases.
3057         - Call hasOneChild() instead of countChildNodes() == 1.
3058
3059         * html/HTMLDivElement.h:
3060         * html/HTMLTagNames.in:
3061         Generate casting helpers as I use them in WebCore::isPlainTextMarkup().
3062
3063         * html/HTMLScriptElement.cpp:
3064         (WebCore::HTMLScriptElement::setText):
3065         * html/HTMLTitleElement.cpp:
3066         (WebCore::HTMLTitleElement::setText):
3067         Call hasOneChild() / hasChildNodes() instead of countChildNodes().
3068
3069         * html/shadow/MediaControlElements.cpp:
3070         (WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden):
3071         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3072         Use childrenOfType<Element>() to iterate of child Elements instead of
3073         slower childNodeCount() + childNode(index) + isElementNode(). Also,
3074         childNodeCount() was not even cached before the loop.
3075
3076         * html/track/VTTRegion.cpp:
3077         (WebCore::VTTRegion::displayLastTextTrackCueBox):
3078         Use childrenOfType<Element>() to iterate of child Elements, thus
3079         avoiding calling childNodeCount() + childNode(index).
3080
3081         * page/DOMSelection.cpp:
3082         (WebCore::DOMSelection::extend):
3083         (WebCore::DOMSelection::selectAllChildren):
3084         * rendering/RenderObject.cpp:
3085         (WebCore::RenderObject::caretMaxOffset):
3086         * rendering/RenderReplaced.cpp:
3087         (WebCore::RenderReplaced::isSelected):
3088         * rendering/RenderView.cpp:
3089         (WebCore::RenderView::splitSelectionBetweenSubtrees):
3090         Mechanical renaming.
3091
3092 2014-09-13  Chris Dumez  <cdumez@apple.com>
3093
3094         Un-inline Element constructor
3095         https://bugs.webkit.org/show_bug.cgi?id=136786
3096
3097         Reviewed by Benjamin Poulain.
3098
3099         Un-inline Element constructor as it is non-trivial and it does not seem
3100         to impact performance based on my testing:
3101         http://dromaeo.com/?id=226865,226869
3102
3103         This reduces the stripped binary size by 8 Kb.
3104
3105         No new tests, no behavior change.
3106
3107         * dom/Element.cpp:
3108         (WebCore::Element::Element):
3109         * dom/Element.h:
3110         (WebCore::Element::Element): Deleted.
3111
3112 2014-09-12  Jon Honeycutt  <jhoneycutt@apple.com>
3113
3114         Build fix with REQUEST_AUTOCOMPLETE enabled
3115
3116         * html/HTMLFormElement.cpp:
3117         (WebCore::HTMLFormElement::requestAutocomplete):
3118         (WebCore::HTMLFormElement::finishRequestAutocomplete):
3119
3120 2014-09-10  Jon Honeycutt  <jhoneycutt@apple.com>
3121
3122         Re-add the request autocomplete feature
3123
3124         <https://bugs.webkit.org/show_bug.cgi?id=136730>
3125
3126         This feature was rolled out in r148731 because it was only used by
3127         Chromium. As we consider supporting this feature, roll it back in, but
3128         leave it disabled.
3129
3130         This rolls out r148731 (which removed the feature) with small changes
3131         needed to make the code build in ToT, to match modern style, to make
3132         the tests run, and to remove unused code.
3133
3134         Reviewed by Andy Estes.
3135
3136         Tests: fast/events/constructors/autocomplete-error-event-constructor.html
3137                fast/forms/form-request-autocomplete.html
3138
3139         * Configurations/FeatureDefines.xcconfig:
3140         * DerivedSources.make:
3141         * WebCore.xcodeproj/project.pbxproj:
3142         * dom/AutocompleteErrorEvent.h: Added.
3143         (WebCore::AutocompleteErrorEvent::create):
3144         (WebCore::AutocompleteErrorEvent::reason):
3145         (WebCore::AutocompleteErrorEvent::AutocompleteErrorEvent):
3146         * dom/AutocompleteErrorEvent.idl: Added.
3147         * dom/EventNames.h:
3148         * dom/EventNames.in:
3149         * html/HTMLAttributeNames.in:
3150         * html/HTMLFormElement.cpp:
3151         (WebCore::HTMLFormElement::HTMLFormElement):
3152         (WebCore::HTMLFormElement::requestAutocomplete):
3153         (WebCore::HTMLFormElement::finishRequestAutocomplete):
3154         (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
3155         (WebCore::HTMLFormElement::parseAttribute):
3156         * html/HTMLFormElement.h:
3157         * html/HTMLFormElement.idl:
3158         * loader/EmptyClients.h:
3159         * loader/FrameLoaderClient.h:
3160         * page/DOMWindow.idl:
3161
3162 2014-09-12  Vivek Galatage  <vivek.vg@samsung.com>
3163
3164         CanvasRenderingContext2D should update the computed style while setting the font
3165         https://bugs.webkit.org/show_bug.cgi?id=136737
3166
3167         Reviewed by Darin Adler.
3168
3169         Before accessing the computed style for populating 'font' property of CanvasRenderingContext2D
3170         make sure to have an up-to-date computed style avoiding any stale reference.
3171
3172         Test: fast/canvas/canvas-set-font-with-updated-style.html
3173
3174         * html/canvas/CanvasRenderingContext2D.cpp:
3175         (WebCore::CanvasRenderingContext2D::setFont):
3176
3177 2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>
3178
3179         CSS JIT: Apply CSS JIT to SelectorQuery with multiple selectors
3180         https://bugs.webkit.org/show_bug.cgi?id=135255
3181
3182         Reviewed by Benjamin Poulain.
3183
3184         After dropping SelectorCheckerFastPath, Dromaeo cssquery-jquery test
3185         result becomes significantly worse. 400.26/s to 348.16/s, 13%
3186         performance regression.
3187
3188         Investigated the cause of it and we found that the test results for
3189         querySelector with multiple selectors causes performance regressions.
3190
3191         To solve this, we attempt to JIT compile all selectors in multiple
3192         selectors. And if compiling some selectors is failed, SelectorQuery
3193         fallbacks to the slower implementation.
3194
3195         This change improves the performance. After applying this patch,
3196         cssquery-jquery test result becomes 418.71/s, 4.61% better than the
3197         previous good performance case.
3198
3199         Test: fast/selectors/querySelector-multiple-selectors.html
3200
3201         * dom/SelectorQuery.cpp:
3202         (WebCore::SelectorDataList::SelectorDataList):
3203         (WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
3204         (WebCore::SelectorDataList::execute):
3205         * dom/SelectorQuery.h:
3206
3207 2014-09-12  Jer Noble  <jer.noble@apple.com>
3208
3209         [Fullscreen] Taking embedded youtube video full screen takes the whole page full screen
3210         https://bugs.webkit.org/show_bug.cgi?id=136792
3211
3212         Reviewed by Beth Dakin.
3213
3214         Recalculate style after beginning the enter fullscreen animation, but before sending the
3215         "webkitfullscreenchange" event to listeners.
3216
3217         * dom/Document.cpp:
3218         (WebCore::Document::webkitWillEnterFullScreenForElement):
3219
3220 2014-09-12  Commit Queue  <commit-queue@webkit.org>
3221
3222         Unreviewed, rolling out r173575.
3223         https://bugs.webkit.org/show_bug.cgi?id=136790
3224
3225         Failing tests (Requested by enrica on #webkit).
3226
3227         Reverted changeset:
3228
3229         "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
3230         https://bugs.webkit.org/show_bug.cgi?id=136474
3231         http://trac.webkit.org/changeset/173575
3232
3233 2014-09-12  Enrica Casucci  <enrica@apple.com>
3234
3235         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
3236         https://bugs.webkit.org/show_bug.cgi?id=136474
3237
3238         Reviewed by Benjamin Poulain.
3239
3240         This is the updated version of the patch that was landed in r173340.
3241         I changed the use of IntPoint to FloatPoint since it was causing tests
3242         to fail.
3243         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
3244         and removes the assumption that EAffinity values match NSSelectionAffinity
3245         values. It also removes the includes in TextAffinity.h, creating the need to
3246         include explicitly the files when necessary. It also removes the unnecessary
3247         use of platform specific types, replacing them with WebCore types.
3248
3249         * WebCore.exp.in:
3250         * editing/TextAffinity.h:
3251         (kit): Deleted.
3252         (core): Deleted.
3253         * editing/cocoa/HTMLConverter.mm:
3254         * page/mac/WebCoreFrameView.h:
3255         * platform/ios/ScrollViewIOS.mm:
3256         (WebCore::ScrollView::platformSetScrollPosition):
3257         * platform/ios/wak/WAKScrollView.mm:
3258         (-[WAKScrollView setScrollOrigin:updatePositionAtAll:immediately:]):
3259         (-[WAKScrollView scrollOrigin]):
3260         * platform/mac/ScrollViewMac.mm:
3261         (WebCore::ScrollView::platformSetScrollPosition):
3262
3263 2014-09-12  Dean Jackson  <dino@apple.com>
3264
3265         Unprefix the flexbox CSS properties
3266         https://bugs.webkit.org/show_bug.cgi?id=98420
3267
3268         Unreviewed fix up, that missed the original
3269         commit. Tony Chang made some comments
3270         on the bugzilla.
3271
3272         "justify-self" should not have been unprefixed.
3273
3274         * css/CSSComputedStyleDeclaration.cpp:
3275         (WebCore::ComputedStyleExtractor::propertyValue):
3276         * css/CSSParser.cpp:
3277         (WebCore::isValidKeywordPropertyAndValue):
3278         (WebCore::CSSParser::parseValue):
3279         * css/CSSPropertyNames.in:
3280         * css/StyleResolver.cpp:
3281         (WebCore::StyleResolver::applyProperty):
3282
3283 2014-09-12  Dean Jackson  <dino@apple.com>
3284
3285         Unprefix the flexbox CSS properties
3286         https://bugs.webkit.org/show_bug.cgi?id=98420
3287
3288         Reviewed by Benjamin Poulain.
3289
3290         Remove the need for a "-webkit-" prefix on flexbox
3291         and related properties. This includes:
3292         - align-content
3293         - align-items
3294         - align-self
3295         - flex-basis
3296         - flex-direction
3297         - flex-wrap
3298         - flex-grow
3299         - flex-shrink
3300         - flex
3301         - flex-flow
3302         - justify-content
3303         - order
3304
3305         ... as well as the display keyword values "flex" and
3306         "inline-flex".
3307
3308         * css/CSSComputedStyleDeclaration.cpp:  Change names.
3309         (WebCore::ComputedStyleExtractor::propertyValue):
3310         * css/CSSParser.cpp: Ditto.
3311         (WebCore::isValidKeywordPropertyAndValue):
3312         (WebCore::isKeywordPropertyID):
3313         (WebCore::CSSParser::parseValue):
3314         (WebCore::CSSParser::parseFlex):
3315         * css/CSSPrimitiveValueMappings.h: Since we need to still handle the old
3316         keywords for display, this has added two new keywords.
3317         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3318         (WebCore::CSSPrimitiveValue::operator EDisplay): If the older keywords were used in
3319         content, map them to the new value names.
3320         * css/CSSPropertyNames.in: Add aliases for the prefixed properties.
3321         * css/CSSValueKeywords.in: Add "flex" and "inline-flex".
3322         * css/DeprecatedStyleBuilder.cpp: Change names.
3323         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3324         * css/StyleProperties.cpp: Change names.
3325         (WebCore::StyleProperties::getPropertyValue):
3326         (WebCore::StyleProperties::asText):
3327         * css/StylePropertyShorthand.cpp: Rename shorthand methods to remove the prefix.
3328         (WebCore::flexFlowShorthand):
3329         (WebCore::flexShorthand):
3330         (WebCore::shorthandForProperty):
3331         (WebCore::matchingShorthandsForLonghand):
3332         (WebCore::webkitFlexFlowShorthand): Deleted.
3333         (WebCore::webkitFlexShorthand): Deleted.
3334         * css/StylePropertyShorthand.h:
3335         * css/StyleResolver.cpp:
3336         (WebCore::equivalentBlockDisplay):
3337         (WebCore::StyleResolver::applyProperty):
3338         * page/animation/CSSPropertyAnimation.cpp: Change names.
3339         (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
3340         * rendering/RenderElement.cpp:
3341         (WebCore::RenderElement::createFor): Handle the two new display values (the same way as
3342         the old values).
3343         * rendering/style/RenderStyleConstants.h: Add constants for the new display values.
3344
3345 2014-09-12  Yusuke Suzuki  <utatane.tea@gmail.com>
3346
3347         ASSERTION FAILED: e in WebCore::StyleResolver::adjustRenderStyle
3348         https://bugs.webkit.org/show_bug.cgi?id=136366
3349
3350         Reviewed by Benjamin Poulain.
3351
3352         Since element becomes nullptr when resolving styles for pseudo elements,
3353         so don't do `ASSERT(e)` and use pointer for that.
3354
3355         Test: fast/css/appearance-with-pseudo-elements.html
3356
3357         * css/StyleResolver.cpp:
3358         (WebCore::StyleResolver::adjustRenderStyle):
3359         * html/shadow/SliderThumbElement.cpp:
3360         (WebCore::RenderSliderThumb::updateAppearance):
3361         * platform/efl/RenderThemeEfl.cpp:
3362         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
3363         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
3364         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
3365         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
3366         (WebCore::RenderThemeEfl::adjustRadioStyle):
3367         (WebCore::RenderThemeEfl::adjustButtonStyle):
3368         (WebCore::RenderThemeEfl::adjustMenuListStyle):
3369         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
3370         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
3371         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
3372         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
3373         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
3374         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
3375         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
3376         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
3377         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
3378         * platform/efl/RenderThemeEfl.h:
3379         * platform/gtk/RenderThemeGtk.h:
3380         * rendering/RenderTheme.cpp:
3381         (WebCore::RenderTheme::adjustStyle):
3382         (WebCore::RenderTheme::adjustCheckboxStyle):
3383         (WebCore::RenderTheme::adjustRadioStyle):
3384         (WebCore::RenderTheme::adjustButtonStyle):
3385         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
3386         (WebCore::RenderTheme::adjustTextFieldStyle):
3387         (WebCore::RenderTheme::adjustTextAreaStyle):
3388         (WebCore::RenderTheme::adjustMenuListStyle):
3389         (WebCore::RenderTheme::adjustMeterStyle):
3390         (WebCore::RenderTheme::adjustProgressBarStyle):
3391         (WebCore::RenderTheme::adjustMenuListButtonStyle):
3392         (WebCore::RenderTheme::adjustMediaControlStyle):
3393         (WebCore::RenderTheme::adjustSliderTrackStyle):
3394         (WebCore::RenderTheme::adjustSliderThumbStyle):
3395         (WebCore::RenderTheme::adjustSliderThumbSize):
3396         (WebCore::RenderTheme::adjustSearchFieldStyle):
3397         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
3398         (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
3399         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
3400         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
3401         * rendering/RenderTheme.h:
3402         * rendering/RenderThemeGtk.cpp:
3403         (WebCore::RenderThemeGtk::adjustButtonStyle):
3404         (WebCore::RenderThemeGtk::adjustMenuListStyle):
3405         (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
3406         (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
3407         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
3408         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
3409         (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
3410         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
3411         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
3412         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
3413         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
3414         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
3415         * rendering/RenderThemeIOS.h:
3416         *