<https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-02  Anton Obzhirov  <a.obzhirov@samsung.com>
2
3         <https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out
4
5         Reviewed by Mario Sanchez Prada.
6
7         The patch exposes aria-invalid attribute to ATK.
8
9         * accessibility/atk/AXObjectCacheAtk.cpp:
10         (WebCore::AXObjectCache::postPlatformNotification):
11         Added emitting state-change signal for aria-invalid event.
12         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
13         (webkitAccessibleGetAttributes):
14         Added aria-invalid attribute.
15
16 2013-09-02  Commit Queue  <commit-queue@webkit.org>
17
18         Unreviewed, rolling out r154955.
19         http://trac.webkit.org/changeset/154955
20         https://bugs.webkit.org/show_bug.cgi?id=120605
21
22         broke xcode4 build :| (Requested by kling on #webkit).
23
24         * GNUmakefile.am:
25         * GNUmakefile.list.am:
26         * WebCore.vcxproj/WebCore.vcxproj:
27         * WebCore.xcodeproj/project.pbxproj:
28         * dom/make_names.pl:
29         (defaultTagPropertyHash):
30         (printLicenseHeader):
31         * html/HTMLAnchorElement.h:
32         (WebCore::isHTMLAnchorElement):
33         (WebCore::HTMLAnchorElement):
34         * html/HTMLAreaElement.h:
35         (WebCore::isHTMLAreaElement):
36         (WebCore::HTMLAreaElement):
37         * html/HTMLAudioElement.h:
38         (WebCore::isHTMLAudioElement):
39         * html/HTMLBaseElement.h:
40         (WebCore::isHTMLBaseElement):
41         (WebCore::HTMLBaseElement):
42         * html/HTMLCanvasElement.h:
43         (WebCore::isHTMLCanvasElement):
44         * html/HTMLElement.h:
45         * html/HTMLFieldSetElement.h:
46         (WebCore::isHTMLFieldSetElement):
47         (WebCore::HTMLFieldSetElement):
48         * html/HTMLFormElement.h:
49         (WebCore::isHTMLFormElement):
50         * html/HTMLFrameSetElement.h:
51         (WebCore::isHTMLFrameSetElement):
52         (WebCore::HTMLFrameSetElement):
53         * html/HTMLImageElement.h:
54         (WebCore::isHTMLImageElement):
55         * html/HTMLInputElement.h:
56         (WebCore::isHTMLInputElement):
57         * html/HTMLLabelElement.h:
58         (WebCore::isHTMLLabelElement):
59         (WebCore::HTMLLabelElement):
60         * html/HTMLLegendElement.h:
61         (WebCore::isHTMLLegendElement):
62         (WebCore::HTMLLegendElement):
63         * html/HTMLMapElement.h:
64         (WebCore::isHTMLMapElement):
65         * html/HTMLMeterElement.h:
66         (WebCore::isHTMLMeterElement):
67         * html/HTMLOptGroupElement.h:
68         (WebCore::isHTMLOptGroupElement):
69         * html/HTMLOptionElement.h:
70         (WebCore::isHTMLOptionElement):
71         * html/HTMLParamElement.h:
72         (WebCore::isHTMLParamElement):
73         (WebCore::HTMLParamElement):
74         * html/HTMLProgressElement.h:
75         (WebCore::isHTMLProgressElement):
76         * html/HTMLScriptElement.h:
77         (WebCore::isHTMLScriptElement):
78         * html/HTMLSourceElement.h:
79         (WebCore::isHTMLSourceElement):
80         (WebCore::HTMLSourceElement):
81         * html/HTMLStyleElement.h:
82         (WebCore::isHTMLStyleElement):
83         (WebCore::HTMLStyleElement):
84         * html/HTMLTableElement.h:
85         (WebCore::isHTMLTableElement):
86         * html/HTMLTableRowElement.h:
87         (WebCore::isHTMLTableRowElement):
88         (WebCore::HTMLTableRowElement):
89         * html/HTMLTagNames.in:
90         * html/HTMLTextAreaElement.h:
91         (WebCore::isHTMLTextAreaElement):
92         * html/HTMLTitleElement.h:
93         (WebCore::isHTMLTitleElement):
94         (WebCore::HTMLTitleElement):
95         * html/HTMLTrackElement.h:
96         (WebCore::isHTMLTrackElement):
97         (WebCore::HTMLTrackElement):
98         * svg/SVGElement.h:
99         * svg/SVGFontElement.h:
100         (WebCore::isSVGFontElement):
101         * svg/SVGFontFaceElement.h:
102         (WebCore::isSVGFontFaceElement):
103         (WebCore::SVGFontFaceElement):
104         * svg/SVGForeignObjectElement.h:
105         (WebCore::isSVGForeignObjectElement):
106         (WebCore::SVGForeignObjectElement):
107         * svg/SVGImageElement.h:
108         (WebCore::isSVGImageElement):
109         * svg/SVGScriptElement.h:
110         (WebCore::isSVGScriptElement):
111         * svg/svgtags.in:
112
113 2013-09-02  Antti Koivisto  <antti@apple.com>
114
115         Clean up ContainerNode::childrenChanged
116         https://bugs.webkit.org/show_bug.cgi?id=120599
117
118         Reviewed by Andreas Kling.
119
120         - Make childrenChanged take a single struct argument instead of a long list of arguments.
121         - Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
122         - Remove use of Node*, give the change range as Elements.
123         - Related cleanups.
124
125         * dom/Attr.cpp:
126         (WebCore::Attr::childrenChanged):
127         * dom/Attr.h:
128         * dom/CharacterData.cpp:
129         (WebCore::CharacterData::parserAppendData):
130         (WebCore::CharacterData::dispatchModifiedEvent):
131         * dom/ContainerNode.cpp:
132         (WebCore::ContainerNode::insertBefore):
133         (WebCore::ContainerNode::notifyChildInserted):
134         (WebCore::ContainerNode::notifyChildRemoved):
135         
136             Add private helpers for setting up the struct.
137
138         (WebCore::ContainerNode::parserInsertBefore):
139         (WebCore::ContainerNode::replaceChild):
140         (WebCore::ContainerNode::removeChild):
141         (WebCore::ContainerNode::parserRemoveChild):
142         (WebCore::ContainerNode::removeChildren):
143         (WebCore::ContainerNode::appendChild):
144         (WebCore::ContainerNode::parserAppendChild):
145         (WebCore::ContainerNode::childrenChanged):
146         (WebCore::ContainerNode::updateTreeAfterInsertion):
147         * dom/ContainerNode.h:
148         * dom/Document.cpp:
149         (WebCore::Document::childrenChanged):
150         * dom/Document.h:
151         * dom/Element.cpp:
152         (WebCore::checkForSiblingStyleChanges):
153         
154             Clean up and simplify. Since we now get element range automatically we don't need to compute it.
155
156         (WebCore::Element::childrenChanged):
157         (WebCore::Element::finishParsingChildren):
158         * dom/Element.h:
159         * dom/ShadowRoot.cpp:
160         (WebCore::ShadowRoot::childrenChanged):
161         * dom/ShadowRoot.h:
162         * html/HTMLElement.cpp:
163         (WebCore::HTMLElement::childrenChanged):
164         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
165         
166             Try to keep the existing behavior. This code needs  more cleanup to be sane. It shouldn't operate on Nodes
167             as it only really cares about Elements.
168
169         * html/HTMLElement.h:
170         * html/HTMLFieldSetElement.cpp:
171         (WebCore::HTMLFieldSetElement::childrenChanged):
172         * html/HTMLFieldSetElement.h:
173         * html/HTMLObjectElement.cpp:
174         (WebCore::HTMLObjectElement::childrenChanged):
175         * html/HTMLObjectElement.h:
176         * html/HTMLOptGroupElement.cpp:
177         (WebCore::HTMLOptGroupElement::childrenChanged):
178         * html/HTMLOptGroupElement.h:
179         * html/HTMLOptionElement.cpp:
180         (WebCore::HTMLOptionElement::childrenChanged):
181         * html/HTMLOptionElement.h:
182         * html/HTMLOutputElement.cpp:
183         (WebCore::HTMLOutputElement::childrenChanged):
184         * html/HTMLOutputElement.h:
185         * html/HTMLScriptElement.cpp:
186         (WebCore::HTMLScriptElement::childrenChanged):
187         * html/HTMLScriptElement.h:
188         * html/HTMLSelectElement.cpp:
189         (WebCore::HTMLSelectElement::childrenChanged):
190         * html/HTMLSelectElement.h:
191         * html/HTMLStyleElement.cpp:
192         (WebCore::HTMLStyleElement::childrenChanged):
193         * html/HTMLStyleElement.h:
194         * html/HTMLTextAreaElement.cpp:
195         (WebCore::HTMLTextAreaElement::childrenChanged):
196         * html/HTMLTextAreaElement.h:
197         * html/HTMLTitleElement.cpp:
198         (WebCore::HTMLTitleElement::childrenChanged):
199         * html/HTMLTitleElement.h:
200         * html/shadow/InsertionPoint.cpp:
201         (WebCore::InsertionPoint::childrenChanged):
202         * html/shadow/InsertionPoint.h:
203         * svg/SVGClipPathElement.cpp:
204         (WebCore::SVGClipPathElement::childrenChanged):
205         * svg/SVGClipPathElement.h:
206         * svg/SVGElement.cpp:
207         (WebCore::SVGElement::childrenChanged):
208         * svg/SVGElement.h:
209         * svg/SVGFELightElement.cpp:
210         (WebCore::SVGFELightElement::childrenChanged):
211         * svg/SVGFELightElement.h:
212         * svg/SVGFilterElement.cpp:
213         (WebCore::SVGFilterElement::childrenChanged):
214         * svg/SVGFilterElement.h:
215         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
216         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
217         * svg/SVGFilterPrimitiveStandardAttributes.h:
218         * svg/SVGFontFaceElement.cpp:
219         (WebCore::SVGFontFaceElement::childrenChanged):
220         * svg/SVGFontFaceElement.h:
221         * svg/SVGFontFaceFormatElement.cpp:
222         (WebCore::SVGFontFaceFormatElement::childrenChanged):
223         * svg/SVGFontFaceFormatElement.h:
224         * svg/SVGFontFaceSrcElement.cpp:
225         (WebCore::SVGFontFaceSrcElement::childrenChanged):
226         * svg/SVGFontFaceSrcElement.h:
227         * svg/SVGFontFaceUriElement.cpp:
228         (WebCore::SVGFontFaceUriElement::childrenChanged):
229         * svg/SVGFontFaceUriElement.h:
230         * svg/SVGGradientElement.cpp:
231         (WebCore::SVGGradientElement::childrenChanged):
232         * svg/SVGGradientElement.h:
233         * svg/SVGMarkerElement.cpp:
234         (WebCore::SVGMarkerElement::childrenChanged):
235         * svg/SVGMarkerElement.h:
236         * svg/SVGMaskElement.cpp:
237         (WebCore::SVGMaskElement::childrenChanged):
238         * svg/SVGMaskElement.h:
239         * svg/SVGPatternElement.cpp:
240         (WebCore::SVGPatternElement::childrenChanged):
241         * svg/SVGPatternElement.h:
242         * svg/SVGScriptElement.cpp:
243         (WebCore::SVGScriptElement::childrenChanged):
244         * svg/SVGScriptElement.h:
245         * svg/SVGStyleElement.cpp:
246         (WebCore::SVGStyleElement::childrenChanged):
247         * svg/SVGStyleElement.h:
248         * svg/SVGTitleElement.cpp:
249         (WebCore::SVGTitleElement::childrenChanged):
250         * svg/SVGTitleElement.h:
251
252 2013-09-02  Andreas Kling  <akling@apple.com>
253
254         Generate isFooElement() functions from tagname data.
255         <https://webkit.org/b/120584>
256
257         Reviewed by Antti Koivisto.
258
259         Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
260         If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
261         This also outputs an isElementOfType<T> check for the Element iterators.
262
263         Removed all the hand-written isFooElement() functions that only checked tag name.
264
265         * html/HTMLTagNames.in:
266         * svg/svgtags.in:
267
268             Added "generateTypeChecks" attribute as appropriate.
269
270         * GNUmakefile.am:
271         * GNUmakefile.list.am:
272         * WebCore.vcxproj/WebCore.vcxproj:
273         * WebCore.xcodeproj/project.pbxproj:
274
275             Added to build systems based on how HTMLNames.h was done.
276             We're just outputting an additional header file in the generated code directory
277             so I suspect most ports will just pick this up automagically.
278
279         * dom/make_names.pl:
280         (defaultTagPropertyHash):
281         (printLicenseHeader):
282         (printTypeChecks):
283         (printTypeChecksHeaderFile):
284
285             Generate a separate file for each namespace with isFooElement() helpers for
286             elements with "generateTypeChecks" attribute set.
287
288 2013-09-02  Dirk Schulze  <krit@webkit.org>
289
290         Use edgeMode=duplicate for blurring on filter() function
291         https://bugs.webkit.org/show_bug.cgi?id=120590
292
293         Reviewed by Antti Koivisto.
294
295         Filters on the CSS Image function filter() are not allowed to extend the
296         dimension of the input image. This causes weird results on blurring an image,
297         where the fading on the edges is clipped at the half of the fading.
298         We shouldn't fade edges at all and use the edgeMode=duplicate instead.
299         This will duplicate the pixel value on the nearest edge of the input image
300         instead of taking transparent black and results in nice blurred images with
301         sharp edges.
302
303         Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent
304
305         Test: fast/filter-image/filter-image-blur.html
306
307         * css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
308         (WebCore::CSSFilterImageValue::image):
309         * rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
310             'duplicate' or 'none' depending on the consumer.
311         (WebCore::FilterEffectRenderer::build):
312         * rendering/FilterEffectRenderer.h: Add enumeration to differ between the 
313             different consumers of the renderer.
314         * rendering/RenderLayer.cpp:
315         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):  Pass consumer
316             information to the renderer.
317
318 2013-09-01  Dirk Schulze  <krit@webkit.org>
319
320         Add 'edgeMode' attribute to SVGFEGaussianBlur
321         https://bugs.webkit.org/show_bug.cgi?id=120582
322
323         Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute
324         allows users to define the behavior on edges with the values 'none' where
325         pixel values outside the input image are treated as transparent black. (The
326         current blurring behavior.) 'duplicate' which repeats the values on the
327         nearest edge and 'warp', which takes the pixel of the opposite site of
328         the input image.
329         Beside the attribute, this patch implements the behavior of 'duplicate'.
330
331         http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute
332
333         Reviewed by Rob Buis.
334
335         Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html
336                svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html
337                svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg
338                svg/filters/svg-gaussianblur-edgeMode-duplicate.svg
339
340         * platform/graphics/filters/FEGaussianBlur.cpp:
341         (WebCore::FEGaussianBlur::FEGaussianBlur):
342         (WebCore::FEGaussianBlur::create):
343         (WebCore::FEGaussianBlur::edgeMode):
344         (WebCore::FEGaussianBlur::setEdgeMode):
345         (WebCore::boxBlur):
346         (WebCore::FEGaussianBlur::platformApplyGeneric):
347         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
348         * platform/graphics/filters/FEGaussianBlur.h:
349         * rendering/FilterEffectRenderer.cpp:
350         (WebCore::FilterEffectRenderer::build):
351         * svg/SVGFEGaussianBlurElement.cpp:
352         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
353         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
354         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
355         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
356         (WebCore::SVGFEGaussianBlurElement::build):
357         * svg/SVGFEGaussianBlurElement.h:
358         * svg/SVGFEGaussianBlurElement.idl:
359
360 2013-09-01  Andreas Kling  <akling@apple.com>
361
362         EventHandler::m_frame should be a Frame&.
363         <https://webkit.org/b/120580>
364
365         Reviewed by Darin Adler.
366
367         EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
368         A handful of null checks and assertions removed.
369
370 2013-09-01  Darin Adler  <darin@apple.com>
371
372         Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.
373
374         * editing/mac/EditorMac.mm:
375         (WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.
376
377 2013-09-01  Darin Adler  <darin@apple.com>
378
379         HitTestResult should have innerNonSharedElement
380         https://bugs.webkit.org/show_bug.cgi?id=120579
381
382         Reviewed by Andreas Kling.
383
384         * editing/Editor.cpp:
385         (WebCore::Editor::copyImage): Call HitTestResult member function version of
386         innerNonSharedElement instead of a local function that does it.
387
388         * page/Chrome.cpp:
389         (WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
390         the node and checking if it's an input element. Also added some missing braces.
391
392         * page/EventHandler.cpp:
393         (WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
394         local variables instead of innerNode to match the HitTestResult function name.
395         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
396         (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
397         (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
398         (WebCore::EventHandler::handleMousePressEvent): Ditto.
399
400         * rendering/HitTestResult.cpp:
401         (WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
402         (WebCore::HitTestResult::innerNonSharedElement): Ditto.
403
404         * rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
405         we'd like to avoid using Node unless there is some real need.
406
407 2013-09-01  Xabier Rodriguez Calvar  <calvaris@igalia.com>
408
409         Volume slider value should be 0 when audio is muted
410         https://bugs.webkit.org/show_bug.cgi?id=120553
411
412         Reviewed by Eric Carlson.
413
414         Fixed the problem of showing a non empty slider when audio is
415         muted.
416
417         Test: media/volume-bar-empty-when-muted.html.
418
419         * html/shadow/MediaControls.cpp:
420         (WebCore::MediaControls::reset): Use setSliderVolume.
421         (WebCore::MediaControls::changedVolume): Use setSliderVolume.
422         (WebCore::MediaControls::setSliderVolume): Added to set the volume
423         to 0 when muted and to its value otherwise.
424         * html/shadow/MediaControls.h: Added setSliderVolume.
425         * html/shadow/MediaControlsApple.cpp:
426         (WebCore::MediaControlsApple::reset): Used setSliderVolume and
427         setFullscreenSliderVolume.
428         (WebCore::MediaControlsApple::changedVolume): Used
429         setFullscreenSliderVolume.
430         (WebCore::MediaControlsApple::setFullscreenSliderVolume): Added to
431         set the volume to 0 when muted and to its value otherwise.
432         * html/shadow/MediaControlsApple.h: Added setFullscreenSliderVolume
433         * html/shadow/MediaControlsBlackBerry.cpp:
434         (WebCore::MediaControlsBlackBerry::reset): Used setSliderVolume.
435
436 2013-09-01  Andreas Kling  <akling@apple.com>
437
438         Give EditCommand a protected Frame& getter.
439         <https://webkit.org/b/120574>
440
441         Reviewed by Darin Adler.
442
443         EditCommand is only created for documents that are attached to a Frame,
444         we already ASSERTed as much in the EditCommand constructor.
445
446         This patch adds a "Frame& EditCommand::frame()" helper, so EditCommand
447         and its subclasses don't have to fumble around with pointers.
448
449 2013-08-31  Antti Koivisto  <antti@apple.com>
450
451         Add element ancestor iterator
452         https://bugs.webkit.org/show_bug.cgi?id=120563
453
454         Reviewed by Andreas Kling.
455
456         This patch adds ancestor iterators. They iterate over elements parent chain up to the root.
457         
458         To iterate over Element ancestors:
459         
460         auto ancestors = elementAncestors(this);
461         for (auto it = ancestors.begin(), end = ancestors.end(); it != end; ++it) {
462             Element& element = *it;
463             ...
464
465         To iterate over Element ancestors including the current element:
466         
467         auto lineage = elementLineage(this);
468         for (auto it = lineage.begin(), end = lineage.end(); it != end; ++it) {
469             Element& element = *it;
470             ...
471             
472         To iterate over ancestors of a specific Element subclass:
473
474         auto htmlAncestors = ancestorsOfType<HTMLElement>(this);
475         for (auto it = htmlAncestors.begin(), end = htmlAncestors.end(); it != end; ++it) {
476             HTMLElement& htmlElement = *it;
477             ...
478             
479         To iterate over ancestors of a specific Element subclass including the current element:
480
481         auto htmlLineage = lineageOfType<HTMLElement>(this);
482         for (auto it = htmlLineage.begin(), end = htmlLineage.end(); it != end; ++it) {
483             HTMLElement& htmlElement = *it;
484             ...
485             
486         The patch also uses the new types in a few places.
487
488         * WebCore.xcodeproj/project.pbxproj:
489         * accessibility/AccessibilityNodeObject.cpp:
490         (WebCore::AccessibilityNodeObject::mouseButtonListener):
491         (WebCore::AccessibilityNodeObject::labelForElement):
492         * dom/ElementAncestorIterator.h: Added.
493         (WebCore::::ElementAncestorIterator):
494         (WebCore::::operator):
495         (WebCore::::ElementAncestorConstIterator):
496         (WebCore::::ElementAncestorIteratorAdapter):
497         (WebCore::::begin):
498         (WebCore::::end):
499         (WebCore::::ElementAncestorConstIteratorAdapter):
500         (WebCore::elementLineage):
501         (WebCore::elementAncestors):
502         (WebCore::ancestorsOfType):
503         * dom/ElementIterator.h:
504         (WebCore::findElementAncestorOfType):
505         (WebCore::::traverseAncestor):
506         (WebCore::=):
507         * html/HTMLElement.cpp:
508         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
509         * html/HTMLFieldSetElement.h:
510         (WebCore::isHTMLFieldSetElement):
511         (WebCore::HTMLFieldSetElement):
512         * html/HTMLFrameSetElement.cpp:
513         (WebCore::HTMLFrameSetElement::findContaining):
514         * html/HTMLFrameSetElement.h:
515         (WebCore::HTMLFrameSetElement):
516         * html/HTMLInputElement.h:
517         (WebCore::isHTMLInputElement):
518         (WebCore::toHTMLInputElement):
519         * html/HTMLLegendElement.cpp:
520         (WebCore::HTMLLegendElement::associatedControl):
521
522 2013-08-31  Darin Adler  <darin@apple.com>
523
524         Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
525         https://bugs.webkit.org/show_bug.cgi?id=120573
526
527         Reviewed by Andreas Kling.
528
529         * editing/Editor.cpp:
530         (WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
531         (WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
532         (WebCore::innerNonSharedElement): Added. Used in copyImage.
533         (WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
534         Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
535
536         * editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
537         both Mac-only for now.
538
539         * editing/mac/EditorMac.mm:
540         (WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
541         was left behind in this function.
542         (WebCore::getImage): Added. Helper used by writeImageToPasteboard.
543         (WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
544         Pasteboard::write with it.
545         (WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
546         Pasteboard::write with it.
547         * page/DragController.cpp:
548         (WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
549         Pasteboard::writeURL on Mac.
550
551         * platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
552         Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
553         Guard writeURL and writeImage with !PLATFORM(MAC).
554
555         * platform/mac/PasteboardMac.mm:
556         (WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
557         (WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
558         to take PasteboardURL and PasteboardImage arguments.
559         (WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
560         for an image is now clear from its argument, a PasteboardImage.
561         (WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
562
563 2013-08-31  Andreas Kling  <akling@apple.com>
564
565         EditCommand constructors should take Document&.
566         <https://webkit.org/b/120566>
567
568         Reviewed by Darin Adler.
569
570         Let EditCommand's and all subclass constructors take Document& instead of Document*.
571         EditCommand::document() now returns a Document&.
572
573         Added Editor::document() which returns Editor::frame().document() after asserting
574         that it's non-null, to make passing a Document& from Editor functions easier.
575
576 2013-08-31  Andreas Kling  <akling@apple.com>
577
578         Make more use of toRenderFoo(RenderObject&) cast helpers.
579         <https://webkit.org/b/120565>
580
581         Reviewed by Darin Adler.
582
583         To make amends for putting ugly toRenderFoo(&renderer) casts everywhere,
584         here's a patch that switches a bunch of code over to using reference-based casts.
585
586         I removed pointer-based casts altogether for these renderers:
587
588             - RenderBR
589             - RenderCombineText
590             - RenderListMarker
591             - RenderVideo
592             - RenderView
593
594 2013-08-31  Santosh Mahto  <santosh.ma@samsung.com>
595
596         warning: unused parameter ‘renderingMode'  in ImageBufferCairo.cpp:94
597         https://bugs.webkit.org/show_bug.cgi?id=120543
598
599         Reviewed by Darin Adler.
600
601         Fixing warning by adding ASSERT_UNUSED.
602
603         * platform/graphics/cairo/ImageBufferCairo.cpp:
604         (WebCore::ImageBuffer::ImageBuffer):
605
606 2013-08-31  Andreas Kling  <akling@apple.com>
607
608         Fix typo in r154931 that caused assertions in continuation tests.
609
610         * rendering/InlineFlowBox.cpp:
611         (WebCore::InlineFlowBox::paint):
612
613 2013-08-31  Rob Buis  <rwlbuis@webkit.org>
614
615         XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
616         https://bugs.webkit.org/show_bug.cgi?id=120490
617
618         Reviewed by Ryosuke Niwa.
619
620         Retain the key of the namespaces map by using AtomicString as key instead of AtomicStringImpl*.
621
622         * editing/MarkupAccumulator.h:
623
624 2013-08-31  Andreas Kling  <akling@apple.com>
625
626         InlineBox::renderer() and pals should return references.
627         <https://webkit.org/b/120562>
628
629         Reviewed by Antti Koivisto.
630
631         Make InlineBox::renderer() and its friends return references instead of pointers.
632         Every box always has a renderer, so this clears up any ambiguity, and a number of
633         weird assertions in SVG code.
634
635         Made InlineBox::m_renderer private so subclasses have to go through renderer().
636         The next step will be to replace renderer() with tightly-typed accessors where
637         applicable (e.g InlineTextBox's renderer is always a RenderText.)
638
639         Also added reference versions of these RenderObject casts:
640
641             - toRenderBox()
642             - toRenderBlock()
643             - toRenderInline()
644             - toRenderSVGInlineText()
645
646 2013-08-31  Andreas Kling  <akling@apple.com>
647
648         PostAttachCallbackDisabler should take a ContainerNode&.
649         <https://webkit.org/b/120560>
650
651         Reviewed by Antti Koivisto.
652
653         Let PostAttachCallbackDisabler take a reference and remove an ugly assertion.
654
655         * dom/ContainerNode.h:
656         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
657         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
658         * dom/Document.cpp:
659         (WebCore::Document::recalcStyle):
660         * style/StyleResolveTree.cpp:
661         (WebCore::Style::attachRenderTree):
662
663 2013-08-31  Antti Koivisto  <antti@apple.com>
664
665         Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator
666         https://bugs.webkit.org/show_bug.cgi?id=120561
667
668         Reviewed by Andreas Kling.
669
670         New names are more descriptive and consistent. They also put related iterator files close by in file lists.
671         The types are always used with auto so longer names don't make them any clumsier to use.
672
673         For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
674         to be included by the clients.
675
676         * GNUmakefile.list.am:
677         * Target.pri:
678         * WebCore.vcxproj/WebCore.vcxproj:
679         * WebCore.xcodeproj/project.pbxproj:
680         * accessibility/AccessibilityNodeObject.cpp:
681         * accessibility/AccessibilityRenderObject.cpp:
682         * accessibility/AccessibilityTable.cpp:
683         * css/CSSFontFaceSource.cpp:
684         * dom/ChildIterator.h: Removed.
685         * dom/DescendantIterator.h: Removed.
686         * dom/Document.cpp:
687         * dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
688         (WebCore::::ElementChildIterator):
689         (WebCore::::operator):
690         (WebCore::::ElementChildConstIterator):
691         (WebCore::::ElementChildIteratorAdapter):
692         (WebCore::::begin):
693         (WebCore::::end):
694         (WebCore::::ElementChildConstIteratorAdapter):
695         (WebCore::elementChildren):
696         (WebCore::childrenOfType):
697         * dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
698         (WebCore::::ElementDescendantIterator):
699         (WebCore::::operator):
700         (WebCore::::ElementDescendantConstIterator):
701         (WebCore::::ElementDescendantIteratorAdapter):
702         (WebCore::::begin):
703         (WebCore::::end):
704         (WebCore::::ElementDescendantConstIteratorAdapter):
705         (WebCore::elementDescendants):
706         (WebCore::descendantsOfType):
707         * dom/ElementIterator.h:
708         * dom/Node.cpp:
709         * dom/TreeScope.cpp:
710         * editing/ApplyStyleCommand.cpp:
711         * editing/markup.cpp:
712         * html/HTMLAppletElement.cpp:
713         * html/HTMLFieldSetElement.cpp:
714         * html/HTMLLabelElement.cpp:
715         * html/HTMLMapElement.cpp:
716         * html/HTMLMediaElement.cpp:
717         * html/HTMLObjectElement.cpp:
718         * loader/PlaceholderDocument.cpp:
719         * rendering/FilterEffectRenderer.cpp:
720         * style/StyleResolveTree.cpp:
721         * svg/SVGElement.cpp:
722         * svg/SVGSVGElement.cpp:
723         * svg/animation/SMILTimeContainer.cpp:
724         * svg/graphics/SVGImage.cpp:
725
726 2013-08-31  Andreas Kling  <akling@apple.com>
727
728         Don't do document style recalc unless there's a RenderView.
729         <https://webkit.org/b/120558>
730
731         Reviewed by Antti Koivisto.
732
733         There's no sense in computing style for a Document that has no RenderView.
734         Checking this before continuing also lets us know that there's a Frame & FrameView
735         present, simplifying some things later on.
736
737         * dom/Document.cpp:
738         (WebCore::Document::recalcStyle):
739         * style/StyleResolveForDocument.cpp:
740         (WebCore::Style::resolveForDocument):
741
742 2013-08-31  Antti Koivisto  <antti@apple.com>
743
744         Add common base for element iterators
745         https://bugs.webkit.org/show_bug.cgi?id=120557
746
747         Reviewed by Andreas Kling.
748
749         Add ElementIterator and use it as the base for child and descendant iterators. The only difference is the definition of operator++.
750         
751         Also renamed DescendantIteratorAssertions to ElementIteratorAssertions.
752
753         * GNUmakefile.list.am:
754         * Target.pri:
755         * WebCore.vcxproj/WebCore.vcxproj:
756         * WebCore.xcodeproj/project.pbxproj:
757         * dom/ChildIterator.h:
758         (WebCore::::ChildIterator):
759         (WebCore::::operator):
760         (WebCore::::ChildConstIterator):
761         (WebCore::::begin):
762         (WebCore::::end):
763         * dom/DescendantIterator.h:
764         (WebCore::::DescendantIterator):
765         (WebCore::::operator):
766         (WebCore::::DescendantConstIterator):
767         * dom/DescendantIteratorAssertions.h: Removed.
768         * dom/ElementIterator.h: Added.
769         (WebCore::::ElementIterator):
770         (WebCore::::traverseNext):
771         (WebCore::::traversePrevious):
772         (WebCore::::traverseNextSibling):
773         (WebCore::::traversePreviousSibling):
774         (WebCore::::operator):
775         (WebCore::=):
776         (WebCore::::ElementConstIterator):
777         * dom/ElementIteratorAssertions.h: Copied from Source/WebCore/dom/DescendantIteratorAssertions.h.
778         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
779         (WebCore::ElementIteratorAssertions::domTreeHasMutated):
780         (WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
781
782 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
783
784         [Windows] Build fix after r154921.
785
786         AVFoundationCF uses an internal wrapper object around the C-API. The call point
787         in the original patch was inside the wrapper, which did not (yet) provide
788         a method implementation.
789
790         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
791         (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
792         (WebCore::AVFWrapper::updateVideoLayerGravity):
793
794 2013-08-30  Simon Fraser  <simon.fraser@apple.com>
795
796         Video with object-fit: cover can spill outside the box
797         https://bugs.webkit.org/show_bug.cgi?id=52103
798
799         Reviewed by Dean Jackson.
800         
801         object-fit on renderers which use accelerated compositing needs special
802         treatment.
803         
804         For directly composited images, and video, GraphicsLayer needs to know
805         both the size of the content layer, and also a rectangle at which this
806         should be clipped (because, for the first time, that content layer can be
807         larger than the renderer's content box).
808         
809         AVFoundation would always aspect-ratio fit video by default, so plumb
810         through MediaPlayer a way to override that when object-fit requires it.
811         
812         Added a LAYER_TREE_INCLUDES_CONTENT_LAYERS enum to the layerTreeAsText()
813         flags so we can dump content layers for testing.
814
815         Tests: compositing/images/direct-image-object-fit.html
816                compositing/reflections/direct-image-object-fit-reflected.html
817                compositing/video/video-object-fit.html
818
819         * page/Frame.h: New LayerTreeFlagsIncludeContentLayers flag.
820         * platform/graphics/GraphicsLayer.h: New flag.
821         * platform/graphics/MediaPlayer.cpp:
822         (WebCore::MediaPlayer::shouldMaintainAspectRatio):
823         (WebCore::MediaPlayer::setShouldMaintainAspectRatio):
824         * platform/graphics/MediaPlayer.h:
825         * platform/graphics/MediaPlayerPrivate.h:
826         (WebCore::MediaPlayerPrivateInterface::shouldMaintainAspectRatio):
827         (WebCore::MediaPlayerPrivateInterface::setShouldMaintainAspectRatio):
828         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
829         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
830         (WebCore::MediaPlayerPrivateAVFoundation::setShouldMaintainAspectRatio):
831         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
832         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
833         (WebCore::MediaPlayerPrivateAVFoundationCF::updateVideoLayerGravity):
834         (WebCore::AVFWrapper::platformLayer):
835         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
836         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
837         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
838         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
839         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
840         * platform/graphics/ca/GraphicsLayerCA.cpp: We need a new m_contentsClippingLayer to
841         clip the contents layer, which only gets created when necessary. It has to be cloned
842         for reflections.
843         (WebCore::GraphicsLayerCA::willBeDestroyed):
844         (WebCore::GraphicsLayerCA::setContentsRect):
845         (WebCore::GraphicsLayerCA::setContentsClippingRect):
846         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
847         (WebCore::GraphicsLayerCA::updateSublayerList):
848         (WebCore::GraphicsLayerCA::updateContentsImage):
849         (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
850         (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
851         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
852         (WebCore::GraphicsLayerCA::updateContentsRects):
853         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
854         (WebCore::GraphicsLayerCA::ensureCloneLayers):
855         (WebCore::GraphicsLayerCA::removeCloneLayers):
856         (WebCore::GraphicsLayerCA::fetchCloneLayers):
857         * platform/graphics/ca/GraphicsLayerCA.h:
858         * rendering/RenderLayerBacking.cpp: Need to push both the contentsRect and
859         the contentsClippingRect down to the GraphicsLayers. Most of the time they
860         are the same, unless object-fit makes them different.
861         (WebCore::RenderLayerBacking::resetContentsRect):
862         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
863         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
864         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
865         (WebCore::RenderLayerBacking::updateImageContents):
866         (WebCore::RenderLayerBacking::contentsBox):
867         * rendering/RenderLayerCompositor.cpp:
868         (WebCore::RenderLayerCompositor::layerTreeAsText):
869         * rendering/RenderVideo.cpp:
870         (WebCore::RenderVideo::updatePlayer):
871         * testing/Internals.cpp:
872         (WebCore::Internals::layerTreeAsText):
873         * testing/Internals.h:
874         * testing/Internals.idl:
875
876 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
877
878         [Windows] Update to incorporate additional suggestions
879         https://bugs.webkit.org/show_bug.cgi?id=120448
880
881         Reviewed by Darin Adler
882
883         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Add
884         notes as to why AVFoundationCF needs this extra method call.
885         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Use OVERRIDE
886         * rendering/RenderVideo.cpp: Replace ternary operator with logical &&.
887
888 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
889
890         [Windows] Vide element in page always uses non-hw accelerated mode.
891         https://bugs.webkit.org/show_bug.cgi?id=120448
892
893         Reviewed by Darin Adler
894
895         This patch is unfortunately larger than my original idea, but seems to make the
896         layout system happier. Instead of switching into composited mode when building
897         the media player, we now build the original layout tree with compositing active
898         if the underlying media element requires it. The AVFoundationCF player needs to
899         have the compositor available at construction time so it can attach to the
900         rendering device. Otherwise it falls back to CPU-only mode.
901
902         * platform/graphics/MediaPlayer.cpp:
903         (WebCore::MediaPlayer::requiresImmediateCompositing): Added
904         * platform/graphics/MediaPlayer.h:
905         * platform/graphics/MediaPlayerPrivate.h:
906         (WebCore::MediaPlayerPrivateInterface::requiresImmediateCompositing): Added
907         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
908         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Added
909         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
910         (WebCore::MediaPlayerPrivateAVFoundationCF::requiresImmediateCompositing):
911         * rendering/RenderLayerCompositor.cpp:
912         (WebCore::RenderLayerCompositor::requiresCompositingForVideo): Uses new
913         'requiresImmediateCompositing' to short-circuit check for whether a
914         compositor is required.
915         * rendering/RenderVideo.cpp:
916         (WebCore::RenderVideo::requiresImmediateCompositing):
917         * rendering/RenderVideo.h:
918
919 2013-08-30  Joseph Pecoraro  <pecoraro@apple.com>
920
921         Web Inspector: Breakpoints should have Automatically Continue Option
922         https://bugs.webkit.org/show_bug.cgi?id=120187
923
924         Reviewed by Timothy Hatcher.
925
926         Tests: inspector-protocol/debugger/removeBreakpoint.html
927                inspector-protocol/debugger/setBreakpoint-autoContinue.html
928                inspector-protocol/debugger/setBreakpoint-column.html
929                inspector-protocol/debugger/setBreakpoint-condition.html
930                inspector-protocol/debugger/setBreakpoint.html
931
932         * inspector/Inspector.json:
933         Convert the "condition" argument of setBreakpoint and setBreakpointByUrl
934         to a BreakpointOptions object with optional properties. One of which
935         is "condition" and a new option "autoContinue".
936
937         * bindings/js/ScriptDebugServer.h:
938         * bindings/js/ScriptDebugServer.cpp:
939         (WebCore::ScriptDebugServer::hasBreakpoint):
940         (WebCore::ScriptDebugServer::pauseIfNeeded):
941         Automatically continue if the breakpoint was hit and has autoContinue.
942
943         * inspector/InspectorDebuggerAgent.h:
944         * inspector/InspectorDebuggerAgent.cpp:
945         (WebCore::buildObjectForBreakpointCookie):
946         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
947         (WebCore::InspectorDebuggerAgent::setBreakpoint):
948         (WebCore::InspectorDebuggerAgent::continueToLocation):
949         (WebCore::InspectorDebuggerAgent::didParseSource):
950         * inspector/ScriptBreakpoint.h:
951         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
952         Handle the new incoming BreakpointOptions type, and set the
953         autoContinue state on ScriptBreakpoints.
954
955         * inspector/front-end/DebuggerModel.js:
956         (WebInspector.DebuggerModel.prototype.setBreakpointByURL):
957         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
958         Update old front-end to be compatible with the new API.
959
960 2013-08-30  Dean Jackson  <dino@apple.com>
961
962         Animations should use double for key values, not floats
963         https://bugs.webkit.org/show_bug.cgi?id=120547
964
965         Reviewed by Simon Fraser.
966
967         Merge https://chromium.googlesource.com/chromium/blink/+/71de046541c77120874b9bff82958ee9e0e20c7c
968
969         Some files have been renamed in the Blink port, and they have made some
970         improvements, but I took what applied to us.
971
972         All our existing tests passed.
973
974         * css/StyleResolver.cpp:
975         (WebCore::StyleResolver::keyframeStylesForAnimation):
976         * css/WebKitCSSKeyframeRule.cpp:
977         (WebCore::StyleKeyframe::parseKeyString):
978         * css/WebKitCSSKeyframeRule.h:
979         (WebCore::StyleKeyframe::getKeys):
980         * platform/graphics/GraphicsLayer.h:
981         (WebCore::AnimationValue::keyTime):
982         (WebCore::AnimationValue::AnimationValue):
983         (WebCore::FloatAnimationValue::create):
984         (WebCore::FloatAnimationValue::FloatAnimationValue):
985         (WebCore::TransformAnimationValue::create):
986         (WebCore::TransformAnimationValue::TransformAnimationValue):
987         (WebCore::FilterAnimationValue::create):
988         (WebCore::FilterAnimationValue::FilterAnimationValue):
989         * rendering/RenderLayerBacking.cpp:
990         (WebCore::RenderLayerBacking::startAnimation):
991         * rendering/style/KeyframeList.h:
992         (WebCore::KeyframeValue::KeyframeValue):
993         (WebCore::KeyframeValue::key):
994         (WebCore::KeyframeValue::setKey):
995
996 2013-08-30  Brendan Long  <b.long@cablelabs.com>
997
998         [GStreamer] support in-band text tracks
999         https://bugs.webkit.org/show_bug.cgi?id=103771
1000
1001         Reviewed by Eric Carlson.
1002
1003         Tests: New tests added because existing tests were too specific.
1004            media/track/in-band/track-in-band-kate-ogg-cues-added-once.html
1005            media/track/in-band/track-in-band-kate-ogg-kind.html
1006            media/track/in-band/track-in-band-kate-ogg-language.html
1007            media/track/in-band/track-in-band-kate-ogg-mode.html
1008            media/track/in-band/track-in-band-kate-ogg-style.html
1009            media/track/in-band/track-in-band-kate-ogg-track-order.html
1010            media/track/in-band/track-in-band-srt-mkv-cues-added-once.html
1011            media/track/in-band/track-in-band-srt-mkv-kind.html
1012            media/track/in-band/track-in-band-srt-mkv-language.html
1013            media/track/in-band/track-in-band-srt-mkv-mode.html
1014            media/track/in-band/track-in-band-srt-mkv-style.html
1015            media/track/in-band/track-in-band-srt-mkv-track-order.html
1016
1017         * CMakeLists.txt: Add InbandTextTrackPrivateGStreamer, InbandGenericTextTrack, InbandWebVTTTextTrack, and TextCombinerGStreamer files.
1018         * GNUmakefile.list.am: Same.
1019         * PlatformEfl.cmake: Same.
1020         * Target.pri: Same.
1021         * WebCore.vcxproj/WebCore.vcxproj: Same.
1022         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
1023         * WebCore.xcodeproj/project.pbxproj: Same.
1024         * html/track/InbandGenericTextTrack.cpp: Split out code for handling generic cues.
1025         (WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Move from InbandTextTrack.
1026         (WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Same.
1027         (WebCore::GenericTextTrackCueMap::add): Same.
1028         (WebCore::GenericTextTrackCueMap::find): Same.
1029         (WebCore::GenericTextTrackCueMap::remove): Same.
1030         (WebCore::InbandGenericTextTrack::create): Same.
1031         (WebCore::InbandGenericTextTrack::updateCueFromCueData): Same.
1032         (WebCore::InbandGenericTextTrack::addGenericCue): Same.
1033         (WebCore::InbandGenericTextTrack::updateGenericCue): Same.
1034         (WebCore::InbandGenericTextTrack::removeGenericCue): Same.
1035         (WebCore::InbandGenericTextTrack::removeCue): Same.
1036         (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Empty.
1037         (WebCore::InbandGenericTextTrack::~InbandGenericTextTrack): Empty.
1038         * html/track/InbandGenericTextTrack.h: Copied from Source/WebCore/html/track/InbandTextTrack.h.
1039         The only addition is the ASSERT_NOT_REACHED() for WebVTT cues.
1040         * html/track/InbandTextTrack.cpp: Add label and language changed callbacks.
1041         (WebCore::InbandTextTrack::create): Return a generic or WebVTT text track based on the private CueFormat.
1042         (WebCore::InbandTextTrack::labelChanged): Added.
1043         (WebCore::InbandTextTrack::languageChanged): Added.
1044         * html/track/InbandTextTrack.h: Add label and language changed callbacks.
1045         * html/track/InbandWebVTTTextTrack.cpp: Added, based on InbandTextTrack.
1046         (WebCore::InbandWebVTTTextTrack::create): Same.
1047         (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Empty.
1048         (WebCore::InbandWebVTTTextTrack::~InbandWebVTTTextTrack): Empty.
1049         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Sends data to a WebVTTParser.
1050         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Adds cues when WebVTTParser parses them.
1051         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Prints a warning when WebVTTParser has a problem.
1052         * html/track/InbandWebVTTTextTrack.h: Added.
1053         * platform/graphics/InbandTextTrackPrivate.h:
1054         (WebCore::InbandTextTrackPrivate::cueFormat): For determining if the track will have generic or WebVTT cues.
1055         (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): Pass CueFormat in the constructor.
1056         * platform/graphics/InbandTextTrackPrivateClient.h: Same.
1057         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1058         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Pass CueFormat (Generic) to InbandTextTrackPrivate.
1059         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: Add GRefPtr specializations for GstSample and GstEvent.
1060         * platform/graphics/gstreamer/GRefPtrGStreamer.h: Same.
1061         * platform/graphics/gstreamer/GStreamerUtilities.h: Add WARN_MEDIA_MESSAGE.
1062         * platform/graphics/gstreamer/GStreamerVersioning.h: Add a function to check GStreamer version at runtime.
1063         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Added.
1064         (WebCore::textTrackPrivateEventCallback): Watches for tag and stream start events.
1065         (WebCore::textTrackPrivateSampleTimeoutCallback): See notifyTrackOfSample();
1066         (WebCore::textTrackPrivateStreamTimeoutCallback): See notifyTrackOfStreamChanged();
1067         (WebCore::textTrackPrivateTagsChangeTimeoutCallback): See notifyTrackOfTagsChanged();
1068         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): Initializes tags and stream and sets up event callback.
1069         (WebCore::InbandTextTrackPrivateGStreamer::~InbandTextTrackPrivateGStreamer): Calls disconnect:
1070         (WebCore::InbandTextTrackPrivateGStreamer::disconnect): Removes signal handlers and frees some memory.
1071         (WebCore::InbandTextTrackPrivateGStreamer::handleSample): Adds samples to a list and sets up callback.
1072         (WebCore::InbandTextTrackPrivateGStreamer::streamChanged): Sets up callback.
1073         (WebCore::InbandTextTrackPrivateGStreamer::tagsChanged): Same.
1074         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Parses all queued samples with WebVTTParser.
1075         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged): Keeps track of current stream.
1076         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfTagsChanged): Sets label and language from tags.
1077         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Added.
1078         (WebCore::InbandTextTrackPrivateGStreamer::create): Basic RefPtr create function.
1079         (WebCore::InbandTextTrackPrivateGStreamer::pad): Returns the pad this track is associated with (used
1080         to determine if a playbin text stream has already been associated with a text track).
1081         (WebCore::InbandTextTrackPrivateGStreamer::setIndex): Sets the track index (used for sorting).
1082         (WebCore::InbandTextTrackPrivateGStreamer::streamId): Returns the stream ID (used to handle new samples).
1083         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1084         (WebCore::mediaPlayerPrivateTextChangedCallback): Called for playbin "text-changed" event. See textChanged().
1085         (WebCore::mediaPlayerPrivateTextChangeTimeoutCallback): See notifyPlayerOfText().
1086         (WebCore::mediaPlayerPrivateNewTextSampleCallback): See newTextSample().
1087         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Initialize m_textTimerHandler.
1088         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Disconnect text tracks (they don't necessarily
1089         get freed here, since a script could hold a reference).
1090         (WebCore::MediaPlayerPrivateGStreamer::textChanged): Setup callback for notifyPlayerOfText.
1091         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Create text tracks.
1092         (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Handle new samples by giving them to a text track
1093         with a matching stream. This method is syncryonous because we need to get the stream start sticky event
1094         immediately.
1095         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1096         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Added. This element forwards buffers from all
1097         of its input pads, but also converts plain text to WebVTT as needed.
1098         (webkit_text_combiner_init): Setup internal funnel.
1099         (webkitTextCombinerPadEvent): If the caps are plain text make sure we have a webvttenv, otherwise connect
1100         directly to the funnel.
1101         (webkitTextCombinerRequestNewPad): Setup ghostpad and event callback.
1102         (webkitTextCombinerReleasePad): Release pad and optional associated webvttenc.
1103         (webkit_text_combiner_class_init): Setup pad templates and request/release pad functions.
1104         (webkitTextCombinerNew): Returns a new WebKitTextCombiner.
1105         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Added.
1106         * platform/graphics/gstreamer/TextSinkGStreamer.cpp: Added.
1107         (webkit_text_sink_init): Set sync=false.
1108         (webkitTextSinkGetProperty): Ignore sync property.
1109         (webkitTextSinkSetProperty): Same.
1110         (webkitTextSinkQuery): Ignore position and duration queries, forward everything else to appsink.
1111         (webkit_text_sink_class_init): Setup property and query functions.
1112         (webkitTextSinkNew): Return a new WebKitTextSink.
1113         * platform/graphics/gstreamer/TextSinkGStreamer.h: Added.
1114
1115 2013-08-30  Dirk Schulze  <krit@webkit.org>
1116
1117         Animate CSS Image filter() function
1118         https://bugs.webkit.org/show_bug.cgi?id=119938
1119
1120         Reviewed by Simon Fraser.
1121
1122         With this patch, the new introduced CSS Image function filter() can be
1123         animated. According to the spec, just filter functions can be
1124         interpolated.
1125
1126         The patch also prepares StyleImage blending for interpolation of other
1127         generated images like gradients or cross-fade().
1128
1129         http://dev.w3.org/fxtf/filters/#interpolating-filter-image
1130
1131         Test: fast/filter-image/filter-image-animation.html
1132
1133         * css/CSSComputedStyleDeclaration.cpp: Reuse the code that creates a
1134             CSSValueList from ComputeStyle logic.
1135         (WebCore::valueForPixel):
1136             For StyleRules we want to have not-adjusted length values.
1137         (WebCore::ComputedStyleExtractor::valueForShadow):
1138             Add argument to switch between adjusted and not-adjusted length.
1139         (WebCore::ComputedStyleExtractor::valueForFilter):
1140             Ditto.
1141         (WebCore::ComputedStyleExtractor::propertyValue):
1142         * css/CSSComputedStyleDeclaration.h:
1143         * css/CSSFilterImageValue.h: Add helper functions
1144             for animating filters. We need to pass the FilterOperations for
1145             the image generation and the CSSValueList for StyleRule.
1146         (WebCore::CSSFilterImageValue::filterOperations):
1147         (WebCore::CSSFilterImageValue::setFilterOperations):
1148         (WebCore::CSSFilterImageValue::cachedImage):
1149         * page/animation/CSSPropertyAnimation.cpp:
1150             Add animation code to support animations between two filter()
1151             function values.
1152         (WebCore::blendFilterOperations):
1153         (WebCore::blendFunc):
1154         (WebCore::filterBlend):
1155         * rendering/style/StyleGeneratedImage.h: Add helper functions.
1156         (WebCore::CSSFilterImageValue::imageValue):
1157
1158
1159 2013-08-30  Leo Yang  <leoyang@blackberry.com>
1160
1161         Make sure remove CachedResourceClient when destructing IconLoader
1162         https://bugs.webkit.org/show_bug.cgi?id=120541
1163
1164         Reviewed by Darin Adler.
1165
1166         It's a good practice to call CachedResource::removeClient(client)
1167         when the client is being destructed. We need to do this for InconLoader
1168         to prevent m_resource from keeping dangling client in case m_resource
1169         is referenced by someone else in the future.
1170
1171         Found by code inspection. Just a defensive enhancement no new tests.
1172
1173         * loader/icon/IconLoader.cpp:
1174         (WebCore::IconLoader::~IconLoader):
1175
1176 2013-08-30  Hans Muller  <hmuller@adobe.com>
1177
1178         [CSS Shapes] Redefine the ShapeIntervals class as a template
1179         https://bugs.webkit.org/show_bug.cgi?id=120381
1180
1181         Reviewed by Alexandru Chiculita.
1182
1183         No new tests, this was just an internal refactoring.
1184
1185         The existing ShapeIntervals class has been converted into a template whose
1186         type specifies the type of the interval's x1 and x2 horizontal endpoints
1187         (formerly float). There were several other minor changes, all in the realm
1188         of refactoring:
1189
1190         - The original type was a struct with public x1 and x2 fields. It's now a class
1191         with x1 and x2 accessors. ASSERTS are now used to maintain the x2 >= x1 invariant.
1192         In the original code the invariant was not checked.
1193
1194         - The logical comparison operators have been overloaded for ShapeInterval.
1195         This obviates the IntervalX1Comparator class which has been removed.
1196
1197         - The names of the global ShapeInterval Vector set operation methods have been
1198         changed to reflect the fact that they're now members of the template class,
1199         rather than globals.
1200
1201         PolygonShape.cpp depended on the ShapeInterval class. In the one or two places
1202         where an interval's x1 or x1 fields had been set explicitly, ShapeInterval::set()
1203         is now used to set both fields. This also enables the invariant check mentioned
1204         earlier. The other changes to this class are syntatic, to account for the ShapeInterval
1205         class's changes.
1206
1207         * CMakeLists.txt:
1208         * GNUmakefile.list.am:
1209         * WebCore.vcxproj/WebCore.vcxproj:
1210         * WebCore.xcodeproj/project.pbxproj:
1211         * rendering/shapes/PolygonShape.cpp:
1212         (WebCore::appendIntervalX):
1213         (WebCore::computeXIntersections):
1214         (WebCore::computeOverlappingEdgeXProjections):
1215         (WebCore::PolygonShape::getExcludedIntervals):
1216         (WebCore::PolygonShape::getIncludedIntervals):
1217         * rendering/shapes/PolygonShape.h:
1218         * rendering/shapes/ShapeInterval.cpp: Removed.
1219         * rendering/shapes/ShapeInterval.h: The entire implementation is now here. 
1220         (WebCore::ShapeInterval::ShapeInterval):
1221         (WebCore::ShapeInterval::x1):
1222         (WebCore::ShapeInterval::x2):
1223         (WebCore::ShapeInterval::set):
1224         (WebCore::ShapeInterval::overlaps):
1225         (WebCore::ShapeInterval::intersect):
1226         (WebCore::ShapeInterval::sortVector):
1227         (WebCore::ShapeInterval::uniteVectors):
1228         (WebCore::ShapeInterval::intersectVectors):
1229         (WebCore::ShapeInterval::subtractVectors):
1230         (WebCore::operator==):
1231         (WebCore::operator!=):
1232         (WebCore::operator< ):
1233         (WebCore::operator> ):
1234         (WebCore::operator<=):
1235         (WebCore::operator>=):
1236
1237 2013-08-30  Antti Koivisto  <antti@apple.com>
1238
1239         Use Element& in StyleResolveTree
1240         https://bugs.webkit.org/show_bug.cgi?id=120540
1241
1242         Reviewed by Andreas Kling.
1243
1244         * dom/ContainerNode.cpp:
1245         (WebCore::attachChild):
1246         (WebCore::detachChild):
1247         * dom/Document.cpp:
1248         (WebCore::Document::recalcStyle):
1249         (WebCore::Document::createRenderTree):
1250         (WebCore::Document::detach):
1251         * dom/Element.cpp:
1252         (WebCore::Element::lazyReattach):
1253         (WebCore::Element::updateExistingPseudoElement):
1254         (WebCore::Element::createPseudoElementIfNeeded):
1255         (WebCore::disconnectPseudoElement):
1256         * dom/ShadowRoot.cpp:
1257         (WebCore::ShadowRoot::setResetStyleInheritance):
1258         * html/HTMLDetailsElement.cpp:
1259         (WebCore::HTMLDetailsElement::parseAttribute):
1260         * html/HTMLInputElement.cpp:
1261         (WebCore::HTMLInputElement::updateType):
1262         (WebCore::HTMLInputElement::parseAttribute):
1263         * html/HTMLObjectElement.cpp:
1264         (WebCore::HTMLObjectElement::renderFallbackContent):
1265         * html/HTMLPlugInImageElement.cpp:
1266         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
1267         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
1268         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
1269         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
1270         * html/HTMLSelectElement.cpp:
1271         (WebCore::HTMLSelectElement::parseAttribute):
1272         (WebCore::HTMLSelectElement::parseMultipleAttribute):
1273         * html/HTMLViewSourceDocument.cpp:
1274         (WebCore::HTMLViewSourceDocument::createContainingTable):
1275         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1276         (WebCore::HTMLViewSourceDocument::addLine):
1277         (WebCore::HTMLViewSourceDocument::finishLine):
1278         (WebCore::HTMLViewSourceDocument::addBase):
1279         (WebCore::HTMLViewSourceDocument::addLink):
1280         * html/parser/HTMLConstructionSite.cpp:
1281         (WebCore::executeTask):
1282         * html/parser/HTMLTreeBuilder.cpp:
1283         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1284         * html/shadow/InsertionPoint.cpp:
1285         (WebCore::InsertionPoint::willAttachRenderers):
1286         (WebCore::InsertionPoint::willDetachRenderers):
1287         * loader/PlaceholderDocument.cpp:
1288         (WebCore::PlaceholderDocument::createRenderTree):
1289         * style/StyleResolveTree.cpp:
1290         (WebCore::Style::attachChildren):
1291         (WebCore::Style::attachRenderTree):
1292         (WebCore::Style::detachChildren):
1293         (WebCore::Style::detachRenderTree):
1294         (WebCore::Style::resolveLocal):
1295         (WebCore::Style::updateTextStyle):
1296         (WebCore::Style::resolveShadowTree):
1297         (WebCore::Style::resolveTree):
1298         
1299             Documents only ever have one child element. Remove the loop.
1300
1301         (WebCore::Style::detachRenderTreeInReattachMode):
1302         (WebCore::Style::reattachRenderTree):
1303         * style/StyleResolveTree.h:
1304         * svg/SVGTests.cpp:
1305         (WebCore::SVGTests::handleAttributeChange):
1306         * xml/XMLErrors.cpp:
1307         (WebCore::XMLErrors::insertErrorMessageBlock):
1308         * xml/parser/XMLDocumentParserLibxml2.cpp:
1309         (WebCore::XMLDocumentParser::startElementNs):
1310
1311 2013-08-30  Andreas Kling  <akling@apple.com>
1312
1313         Document style resolve should take Document&.
1314         <https://webkit.org/b/120534>
1315
1316         Reviewed by Darin Adler.
1317
1318         Tweak Style::resolveTree(Document*) and Style::resolveForDocument(Document*) to take Document& instead.
1319
1320         * dom/Document.cpp:
1321         (WebCore::Document::recalcStyle):
1322         * html/HTMLLinkElement.cpp:
1323         (WebCore::HTMLLinkElement::process):
1324         * style/StyleResolveForDocument.cpp:
1325         (WebCore::Style::resolveForDocument):
1326         * style/StyleResolveForDocument.h:
1327         * style/StyleResolveTree.cpp:
1328         (WebCore::Style::resolveTree):
1329         * style/StyleResolveTree.h:
1330
1331 2013-08-30  Darin Adler  <darin@apple.com>
1332
1333         [Mac] No need for Pasteboard::getDataSelection
1334         https://bugs.webkit.org/show_bug.cgi?id=120536
1335
1336         Reviewed by Anders Carlsson.
1337
1338         * editing/Editor.h: Added some Mac-only private member functions.
1339
1340         * editing/mac/EditorMac.mm:
1341         (WebCore::Editor::selectionInWebArchiveFormat): Added.
1342         (WebCore::Editor::adjustedSelectionRange): Added.
1343         (WebCore::attributedStringForRange): Added.
1344         (WebCore::dataInRTFDFormat): Added.
1345         (WebCore::dataInRTFFormat): Added.
1346         (WebCore::Editor::dataSelectionForPasteboard): Moved the implementation
1347         of Pasteboard::getDataSelection here, refactoring to share code with the
1348         writeSelectionToPasteboard function.
1349         (WebCore::Editor::writeSelectionToPasteboard): Refactored to share code
1350         with the new function above.
1351
1352         * platform/Pasteboard.h: Removed getDataSelection. One less layering violation.
1353         * platform/mac/PasteboardMac.mm: Ditto.
1354
1355 2013-08-30  Rob Buis  <rwlbuis@webkit.org>
1356
1357         SVG error parsing empty path
1358         https://bugs.webkit.org/show_bug.cgi?id=78980
1359
1360         Reviewed by Darin Adler.
1361
1362         According to the spec (http://www.w3.org/TR/SVG/paths.html#PathData), path 'd' attribute can be empty.
1363         No error should be reported in this case.
1364
1365         * svg/SVGPathParser.cpp:
1366         (WebCore::SVGPathParser::parsePathDataFromSource):
1367         * svg/SVGPathUtilities.cpp:
1368         (WebCore::buildPathFromString):
1369         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
1370         (WebCore::buildPathFromByteStream):
1371         (WebCore::buildSVGPathSegListFromByteStream):
1372         (WebCore::buildStringFromByteStream):
1373         (WebCore::buildStringFromSVGPathSegList):
1374         (WebCore::buildSVGPathByteStreamFromString):
1375         (WebCore::buildAnimatedSVGPathByteStream):
1376         (WebCore::addToSVGPathByteStream):
1377
1378 2013-08-30  Andreas Kling  <akling@apple.com>
1379
1380         Try to fix CSS_VARIABLES and CSS_DEVICE_ADAPTATION builds.
1381
1382         * css/StyleResolver.cpp:
1383         (WebCore::StyleResolver::StyleResolver):
1384         (WebCore::StyleResolver::resolveVariables):
1385
1386 2013-08-30  Commit Queue  <commit-queue@webkit.org>
1387
1388         Unreviewed, rolling out r154891.
1389         http://trac.webkit.org/changeset/154891
1390         https://bugs.webkit.org/show_bug.cgi?id=120539
1391
1392         broke the mac build (Requested by Ossy on #webkit).
1393
1394         * platform/network/SynchronousLoaderClient.h:
1395
1396 2013-08-30  Csaba Osztrogonác  <ossy@webkit.org>
1397
1398         Add USE(CFNETWORK) guard to SynchronousLoaderClient::didReceiveAuthenticationChallengedidReceiveAuthenticationChallenge()
1399         https://bugs.webkit.org/show_bug.cgi?id=120532
1400
1401         Reviewed by Darin Adler.
1402
1403         * platform/network/SynchronousLoaderClient.h:
1404
1405 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
1406
1407         [Windows] Video inside page always uses non-hardware accelerated playback
1408         https://bugs.webkit.org/show_bug.cgi?id=120448
1409
1410         Reviewed by Eric Carlson.
1411
1412         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1413         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Check for
1414         D3D device. If it doesn't exist, switch to compositing mode and try again.
1415
1416 2013-08-30  Leo Yang  <leoyang@blackberry.com>
1417
1418         Possible dangling CachedResourceClient of StyleRuleImport and XSLImportRule
1419         https://bugs.webkit.org/show_bug.cgi?id=120479
1420
1421         Reviewed by Darin Adler.
1422
1423         In StyleRuleImport::requestStyleSheet() and XSLImportRule::loadSheet() we
1424         didn't call removeClient() for m_cachedSheet before assigning m_cachedSheet
1425         a new value. This could leave the client as a client of the old cached
1426         sheet and dangling after the client is deleted. Fix them by calling removeClient()
1427         before assigning m_cacheSheet a new value.
1428
1429         Found by code inspection. Seems no way to test it automatically.
1430
1431         * css/StyleRuleImport.cpp:
1432         (WebCore::StyleRuleImport::requestStyleSheet):
1433         * xml/XSLImportRule.cpp:
1434         (WebCore::XSLImportRule::loadSheet):
1435
1436 2013-08-30  Gabor Abraham  <abrhm@inf.u-szeged.hu>
1437
1438         Fix unused parameter warning in graphics/cairo/GraphicsContextCairo.cpp file.
1439         https://bugs.webkit.org/show_bug.cgi?id=120524
1440
1441         Reviewed by Darin Adler.
1442
1443         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1444         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1445
1446 2013-08-30  Andreas Kling  <akling@apple.com>
1447
1448         StyleResolver & friends should use Document&.
1449         <https://webkit.org/b/120527>
1450
1451         Reviewed by Antti Koivisto.
1452
1453         Document&-ify StyleResolver, ElementRuleCollector and SelectorChecker.
1454
1455 2013-08-30  Brent Fulgham  <bfulgham@apple.com>
1456
1457         [Windows] Unreviewed build correction after r154835. Only seen when doing a
1458         full (clean) rebuild.
1459
1460         * DerivedSources.cpp: Remove reference to deleted JSHTMLDialogElement.cpp
1461
1462 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
1463
1464         Resolve unused parameter warning in FindController.cpp
1465         https://bugs.webkit.org/show_bug.cgi?id=120407
1466
1467         Reviewed by Darin Adler.
1468
1469         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1470         (wordAtPositionForAtkBoundary):
1471
1472 2013-08-30  Arpita Bahuguna  <a.bah@samsung.com>
1473
1474         setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
1475         https://bugs.webkit.org/show_bug.cgi?id=120293
1476
1477         Reviewed by Darin Adler.
1478
1479         setAttributeNode() performs a case-insensitive search for an existing
1480         attribute. If an existing attribute is found, it retrieves the index of
1481         such an attribute. For setting the attribute's new value, we call upon
1482         setAttributeInternal() to which both the index as well as the name of
1483         the attribute is passed.
1484         The name passed to this method is the same as the one passed to the
1485         setAttributeNode() API from the webpage and thus can be in any case.
1486
1487         However, setAttributeInternal() uses this name to get the corresponding
1488         existing attribute node. Since this retrieval is not case-insensitive,
1489         the existing node is not returned and thus the new value is not set on
1490         the existing node.
1491         We should instead use the passed index and use that to retrieve the
1492         existing node.
1493
1494         Note that obtaining the attribute's value using getAttributeNode() would
1495         still return the correct value, i.e. the new one.
1496
1497         Also, this change shall make our behavior similar to that of FF and IE.
1498
1499         Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html
1500
1501         * dom/Element.cpp:
1502         (WebCore::Element::setAttributeInternal):
1503         If the passed index is not equal to attributeNotFound, we use that index
1504         to retrieve the existing attribute.
1505
1506 2013-08-30  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1507
1508         SimpleClassVectorTraits shall be used for RuleData
1509         https://bugs.webkit.org/show_bug.cgi?id=120526
1510
1511         Reviewed by Andreas Kling.
1512
1513         Whereas RuleData is POD type and whereas there are quite a lot of Vector<RuleData> occurrences in the code,
1514         it makes sense to use SimpleClassVectorTraits for RuleData and hence to allow using more efficient mem functions
1515         in vectors.
1516
1517         * css/RuleSet.h:
1518
1519 2013-08-30  Andreas Kling  <akling@apple.com>
1520
1521         Node::document() should return a reference.
1522         <https://webkit.org/b/120496>
1523
1524         Reviewed by Antti Koivisto.
1525
1526         Now that orphan DocumentType nodes also have document pointers, it's no longer
1527         possible to have a null Node::document().
1528
1529         Cement this by making document() return a reference, and remove the various
1530         null checks exposed by this.
1531
1532 2013-08-30  Andrei Parvu  <parvu@adobe.com>
1533
1534         [CSS Masking] -webkit-mask-repeat: space does not work
1535         Added the space option to background-repeat and -webkit-mask-repeat.
1536         With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning
1537         area. The repeated images are spaced equally to fill the unused area.
1538         https://bugs.webkit.org/show_bug.cgi?id=119324
1539
1540         Reviewed by Dirk Schulze.
1541
1542         Tests: css3/background/background-repeat-space-border.html
1543                css3/background/background-repeat-space-content.html
1544                css3/background/background-repeat-space-padding.html
1545                css3/masking/mask-repeat-space-border.html
1546                css3/masking/mask-repeat-space-content.html
1547                css3/masking/mask-repeat-space-padding.html
1548
1549         * platform/graphics/GeneratorGeneratedImage.cpp:
1550         (WebCore::GeneratorGeneratedImage::drawPattern): Passed the space values to the image buffer.
1551         * platform/graphics/Image.cpp:
1552         (WebCore::Image::drawTiled): Added the space values when computing the location of the tile.
1553         * platform/graphics/Image.h: Added the space property.
1554         (WebCore::Image::spaceSize):
1555         (WebCore::Image::setSpaceSize):
1556         * platform/graphics/ImageBuffer.h: Added the space property.
1557         (WebCore::ImageBuffer::spaceSize):
1558         (WebCore::ImageBuffer::setSpaceSize):
1559         * platform/graphics/cg/ImageBufferCG.cpp: Passed the space values when copying an image.
1560         (WebCore::ImageBuffer::copyImage):
1561         * platform/graphics/cg/ImageCG.cpp: Added the space values when creating a platform pattern.
1562         (WebCore::Image::drawPattern):
1563         * rendering/RenderBoxModelObject.cpp:
1564         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Computed the space values on x and y axis.
1565         (WebCore::getSpace):
1566         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Pass the space values to the Image class.
1567         * rendering/RenderBoxModelObject.h: Added the space property.
1568         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
1569         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
1570         * svg/graphics/SVGImage.cpp: Passed the space property to the created image.
1571         (WebCore::SVGImage::drawPatternForContainer):
1572         * svg/graphics/SVGImageForContainer.cpp: Passed the space property to the image property.
1573         (WebCore::SVGImageForContainer::drawPattern):
1574
1575 2013-08-30  Antti Koivisto  <antti@apple.com>
1576
1577         Remove AttachContext
1578         https://bugs.webkit.org/show_bug.cgi?id=120518
1579
1580         Reviewed by Andreas Kling.
1581
1582         This type is not useful anymore. Just pass the precomputed style to attachRenderTree and reattach-or-not flag to detachRenderTree.
1583
1584         * style/StyleResolveTree.cpp:
1585         (WebCore::Style::createRendererIfNeeded):
1586         (WebCore::Style::attachChildren):
1587         (WebCore::Style::attachShadowRoot):
1588         (WebCore::Style::attachRenderTree):
1589         (WebCore::Style::detachChildren):
1590         (WebCore::Style::detachShadowRoot):
1591         (WebCore::Style::detachRenderTree):
1592         (WebCore::Style::reattachRenderTree):
1593         (WebCore::Style::resolveLocal):
1594         * style/StyleResolveTree.h:
1595
1596 2013-08-30  Commit Queue  <commit-queue@webkit.org>
1597
1598         Unreviewed, rolling out r154826.
1599         http://trac.webkit.org/changeset/154826
1600         https://bugs.webkit.org/show_bug.cgi?id=120517
1601
1602         Still breaks icloud.com (Requested by mwenge_ on #webkit).
1603
1604         * rendering/RenderBox.cpp:
1605         (WebCore::RenderBox::computePositionedLogicalWidth):
1606         (WebCore::RenderBox::computePositionedLogicalHeight):
1607         * rendering/RenderBox.h:
1608         (WebCore::RenderBox::intrinsicSize):
1609         * rendering/RenderButton.h:
1610         * rendering/RenderFileUploadControl.cpp:
1611         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1612         * rendering/RenderListBox.cpp:
1613         (WebCore::RenderListBox::RenderListBox):
1614         (WebCore::RenderListBox::computePreferredLogicalWidths):
1615         (WebCore::RenderListBox::computeLogicalHeight):
1616         * rendering/RenderListBox.h:
1617         * rendering/RenderMenuList.h:
1618         * rendering/RenderSlider.cpp:
1619         (WebCore::RenderSlider::computePreferredLogicalWidths):
1620         * rendering/RenderTextControl.cpp:
1621         (WebCore::RenderTextControl::RenderTextControl):
1622         (WebCore::RenderTextControl::computeLogicalHeight):
1623         * rendering/RenderTextControl.h:
1624
1625 2013-08-29  Ryosuke Niwa  <rniwa@webkit.org>
1626
1627         Unduplicate the code to convert between VisiblePosition and index
1628         https://bugs.webkit.org/show_bug.cgi?id=120506
1629
1630         Reviewed by Darin Adler.
1631
1632         Encapsulate the conversion between VisiblePosition and index into indexForVisiblePosition
1633         and visiblePositionForIndexUsingCharacterIterator. It's unfortunate that these two functions
1634         are different from the two other existing functions of similar names but we've at least
1635         confined problems into a single cpp file now.
1636
1637         * accessibility/AccessibilityRenderObject.cpp:
1638         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
1639         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
1640         * editing/Editor.cpp:
1641         (WebCore::findFirstMarkable):
1642         * editing/htmlediting.cpp:
1643         (WebCore::indexForVisiblePosition):
1644         (WebCore::visiblePositionForIndexUsingCharacterIterator):
1645         * editing/htmlediting.h:
1646         * html/HTMLTextFormControlElement.cpp:
1647         (WebCore::hasVisibleTextArea):
1648         (WebCore::HTMLTextFormControlElement::setSelectionRange):
1649         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
1650         (WebCore::HTMLTextFormControlElement::visiblePositionForIndex):
1651         * html/HTMLTextFormControlElement.h:
1652         * rendering/RenderTextControl.cpp:
1653         * rendering/RenderTextControl.h:
1654
1655 2013-08-29  Ryosuke Niwa  <rniwa@webkit.org>
1656
1657         Avoid Node references from AXObjectCache from leaking
1658         https://bugs.webkit.org/show_bug.cgi?id=120501
1659
1660         Reviewed by Darin Adler.
1661
1662         Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06
1663         without any tests since we don't have the same infrastructure to detect leaks in WebKit.
1664
1665         A real world example of this would be selecting an <option> item inside frame by keyboard. The node will not be deref()-ed until the topDocument() is detached. 
1666
1667         The issue was that AccessibilityMenuListOption is created in childrenChanged()
1668         hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
1669         element is already detached.
1670
1671         * accessibility/AccessibilityMenuListPopup.cpp:
1672         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
1673         * rendering/RenderMenuList.cpp:
1674         (WebCore::RenderMenuList::didUpdateActiveOption):
1675
1676 2013-08-26  Simon Fraser  <simon.fraser@apple.com>
1677
1678         Implement object-fit CSS property
1679         https://bugs.webkit.org/show_bug.cgi?id=52040
1680
1681         Reviewed by Antti Koivisto, Sam Weinig.
1682         
1683         Merge object-fit patch from Blink r156535, which started as a patch
1684         by me.
1685
1686         Since then, the spec has gone to CR. This patch is an
1687         implementation of object-fit as described in
1688         http://www.w3.org/TR/2012/CR-css3-images-20120417/#object-fit
1689
1690         Object-fit is used to maintain the aspect ratio of replaced content
1691         within its content box. All object-fit values but the initial one
1692         ('fill') will always ensure that the aspect ratio is retained, in
1693         different ways (fit inside the content box, cover the content box, or
1694         use intrinsic size). Painting is always clipped against the content
1695         box, regardless of the 'overflow' property.
1696
1697         Tests: fast/css/object-fit/object-fit-canvas.html
1698                fast/css/object-fit/object-fit-embed.html
1699                fast/css/object-fit/object-fit-grow-landscape.html
1700                fast/css/object-fit/object-fit-grow-portrait.html
1701                fast/css/object-fit/object-fit-img-svg.html
1702                fast/css/object-fit/object-fit-img-svg2.html
1703                fast/css/object-fit/object-fit-img.html
1704                fast/css/object-fit/object-fit-input-image.html
1705                fast/css/object-fit/object-fit-object.html
1706                fast/css/object-fit/object-fit-shrink.html
1707                fast/css/object-fit/object-fit-video-poster.html
1708                fast/css/parsing-object-fit.html
1709                http/tests/css/object-fit-delayed-img-svg.html
1710                media/video-object-fit-change.html
1711                media/video-object-fit.html
1712
1713         * css/CSSComputedStyleDeclaration.cpp:
1714         (WebCore::ComputedStyleExtractor::propertyValue):
1715         * css/CSSParser.cpp:
1716         (WebCore::isValidKeywordPropertyAndValue):
1717         (WebCore::isKeywordPropertyID):
1718         (WebCore::CSSParser::parseValue):
1719         * css/CSSPrimitiveValueMappings.h:
1720         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1721         (WebCore::CSSPrimitiveValue::operator EObjectFit):
1722         * css/CSSProperty.cpp:
1723         (WebCore::CSSProperty::isInheritedProperty):
1724         * css/CSSPropertyNames.in:
1725         * css/CSSValueKeywords.in:
1726         * css/DeprecatedStyleBuilder.cpp:
1727         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1728         * css/StyleResolver.cpp:
1729         (WebCore::StyleResolver::applyProperty):
1730         * css/html.css:
1731         (video): Set object-fit to 'contain'. This is how VIDEO elements
1732         work, apparently.
1733         * loader/cache/CachedImage.cpp:
1734         (WebCore::CachedImage::imageSizeForRenderer):
1735         * loader/cache/CachedImage.h:
1736         * platform/graphics/LayoutSize.h:
1737         (WebCore::fitLayoutSizeToAspectRatio): New function to grow or shrink
1738         in one dimension to fit to the aspect ratio.
1739         * rendering/RenderHTMLCanvas.cpp:
1740         (WebCore::RenderHTMLCanvas::paintReplaced): Apply object-fit and
1741         clip if necessary.
1742         * rendering/RenderImage.cpp:
1743         (WebCore::RenderImage::updateInnerContentRect):
1744         (WebCore::RenderImage::imageDimensionsChanged): Update intrinsic
1745         size properly, and recalculate the inner content rectangle (the
1746         exact area occupied by the replaced content) again if appropriate.
1747         (WebCore::RenderImage::paintReplaced): Apply object-fit and clip
1748         if necessary.
1749         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
1750         object-fit may leave parts of the content box empty, in which case
1751         it won't be fully obscured.
1752         (WebCore::RenderImage::layout):
1753         * rendering/RenderImage.h:
1754         * rendering/RenderImageResource.cpp:
1755         (WebCore::RenderImageResource::intrinsicSize): Need this to
1756         differentiate between intrinsic and extrinsic size for SVG images.
1757         * rendering/RenderImageResource.h:
1758         * rendering/RenderImageResourceStyleImage.h:
1759         * rendering/RenderReplaced.cpp:
1760         (WebCore::RenderReplaced::replacedContentRect): Return the
1761         rectangle occupied by the replaced content. This will be identical
1762         to the content box if object-fit is 'fill', but will typically be
1763         something else for other values.
1764         * rendering/RenderReplaced.h:
1765         * rendering/RenderVideo.cpp:
1766         (WebCore::RenderVideo::videoBox): Not much left to do here, with
1767         the new RenderReplaced::replacedContentRect() method in place.
1768         (WebCore::RenderVideo::paintReplaced): Apply object-fit and clip
1769         if necessary.
1770         * rendering/style/RenderStyle.cpp:
1771         (WebCore::RenderStyle::changeRequiresRepaint):
1772         * rendering/style/RenderStyle.h:
1773         * rendering/style/RenderStyleConstants.h:
1774         * rendering/style/StyleRareNonInheritedData.cpp:
1775         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1776         (WebCore::StyleRareNonInheritedData::operator==):
1777         * rendering/style/StyleRareNonInheritedData.h:
1778
1779 2013-08-29  Tim Horton  <timothy_horton@apple.com>
1780
1781         SVG clipping, masking, and gradients-on-text do not respect the device scale factor
1782         https://bugs.webkit.org/show_bug.cgi?id=120377
1783         <rdar://problem/14777944>
1784
1785         Reviewed by Simon Fraser.
1786
1787         Tests: svg/custom/masking-clipping-hidpi.svg
1788
1789         calculateTransformationToOutermostCoordinateSystem should include the page's
1790         device scale factor in its transform.
1791
1792         * rendering/svg/SVGRenderingContext.cpp:
1793         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
1794
1795 2013-08-29  Chris Fleizach  <cfleizach@apple.com>
1796
1797         AX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
1798         https://bugs.webkit.org/show_bug.cgi?id=120318
1799
1800         Reviewed by Darin Adler.
1801
1802         These crashes occur because an AXTextMarker is retrieved that reference a Node in an iframe.
1803         The iframe goes away, but when it tries to clean up and remove that Node from the InUse cache,
1804         the document() tree has already been detached, so it never clears the actual InUse cache.
1805
1806         The fix here is to pre-emptively clean up any nodes in the document going away when the frame is about to disconnect.
1807
1808         I'm removing the clearAXObjectCache() at the disconnectOwnerElement because it 
1809            1) Cleared the AXObjectCache for the iframe document (which is always empty -- only the top level doc maintains the cache), because
1810                 the document() tree had already been detached... so it essentially did nothing.
1811            2) And if it did work, we wouldn't want this behavior -- that is to say, when an iframe goes away, we don't want to clear the entire cache for all
1812                the other documents (there's even an existing layout test to verify this behavior).
1813
1814         Test: platform/mac/accessibility/stale-textmarker-crash.html
1815
1816         * accessibility/AXObjectCache.cpp:
1817         (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
1818         * accessibility/AXObjectCache.h:
1819         * page/Frame.cpp:
1820         (WebCore::Frame::disconnectOwnerElement):
1821
1822 2013-08-29  Brent Fulgham  <bfulgham@apple.com>
1823
1824         [Windows] More unreviewed gardening of project file.
1825         Move css files inline with related source code.
1826
1827         * WebCore.vcxproj/WebCore.vcxproj:
1828         * WebCore.vcxproj/WebCore.vcxproj.filters:
1829
1830 2013-08-29  Sam Weinig  <sam@webkit.org>
1831
1832         Add ENABLE guards for Promises
1833         https://bugs.webkit.org/show_bug.cgi?id=120488
1834
1835         Reviewed by Andreas Kling.
1836
1837         * Configurations/FeatureDefines.xcconfig:
1838
1839 2013-08-29  Andreas Kling  <akling@apple.com>
1840
1841         Inspector: Use a bit of RefPtr::release() in generated code.
1842         <https://webkit.org/b/120485>
1843
1844         Reviewed by Darin Adler.
1845
1846         Just something I spotted while reading InspectorBackendDispatcher.cpp.
1847         Avoid 3 cases of reference count churnery.
1848
1849         * inspector/CodeGeneratorInspectorStrings.py:
1850
1851 2013-08-29  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1852
1853         According to DOM4, all DocType nodes should have a document
1854         https://bugs.webkit.org/show_bug.cgi?id=99244
1855
1856         Reviewed by Darin Adler.
1857
1858         Doctypes now always have a node document and can be moved across document boundaries as per
1859         the latest DOM4 specification:
1860         http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
1861         http://dom.spec.whatwg.org/#dom-node-ownerdocument
1862
1863         This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
1864         new DocumentType Node to the associated document of the current "context" object. In
1865         DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
1866         document boundaries so that the node can be added to a Document after being created.
1867
1868         This means we will no longer need to special case DocumentType nodes in the code and
1869         Node::document() can no longer return NULL, which means that we'll be able to remove
1870         NULL checks in call sites.
1871
1872         Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).
1873
1874         Test: fast/dom/createDocumentType-ownerDocument.html
1875
1876         * dom/ContainerNode.cpp:
1877         (WebCore::checkAcceptChild):
1878         * dom/DOMImplementation.cpp:
1879         (WebCore::DOMImplementation::createDocumentType):
1880         (WebCore::DOMImplementation::createDocument):
1881         * dom/Node.h:
1882         (WebCore::Node::document):
1883
1884 2013-08-29  Darin Adler  <darin@apple.com>
1885
1886         Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
1887         https://bugs.webkit.org/show_bug.cgi?id=120483
1888
1889         Reviewed by Anders Carlsson.
1890
1891         * editing/Editor.cpp:
1892         (WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
1893         function on Mac instead of Pasteboard::writeSelection.
1894         (WebCore::Editor::copy): Ditto.
1895
1896         * editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
1897         that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
1898         Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.
1899
1900         * editing/mac/EditorMac.mm:
1901         (WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
1902         puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
1903         do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
1904         for each platform.
1905
1906         * page/DragController.cpp:
1907         (WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
1908         function on Mac instead of Pasteboard::writeSelection.
1909
1910         * platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
1911         that don't belong in this class because they are layering violations; this becomes the to do list for
1912         the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
1913         except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
1914         Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
1915         Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.
1916
1917         * platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
1918         Pasteboard::writeSelectionForTypes, and writeSelection functions.
1919         (WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
1920         (WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.
1921
1922 2013-08-29  Antti Koivisto  <antti@apple.com>
1923
1924         Remove code behind ENABLE(DIALOG_ELEMENT)
1925         https://bugs.webkit.org/show_bug.cgi?id=120467
1926
1927         Reviewed by Darin Adler.
1928
1929         It is incomplete and no one is building it.
1930
1931         * CMakeLists.txt:
1932         * Configurations/FeatureDefines.xcconfig:
1933         * DerivedSources.make:
1934         * DerivedSources.pri:
1935         * GNUmakefile.list.am:
1936         * Target.pri:
1937         * WebCore.exp.in:
1938         * WebCore.xcodeproj/project.pbxproj:
1939         * bindings/generic/RuntimeEnabledFeatures.cpp:
1940         * bindings/generic/RuntimeEnabledFeatures.h:
1941         * css/StyleResolver.cpp:
1942         (WebCore::StyleResolver::adjustRenderStyle):
1943         * css/html.css:
1944         * dom/ContextFeatures.cpp:
1945         * dom/ContextFeatures.h:
1946         * dom/Document.cpp:
1947         * dom/Document.h:
1948         * dom/Element.cpp:
1949         (WebCore::Element::removedFrom):
1950         (WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
1951         * dom/Element.h:
1952         (WebCore::Element::isDisabledFormControl):
1953         * dom/ElementRareData.h:
1954         (WebCore::ElementRareData::ElementRareData):
1955         * html/HTMLDialogElement.cpp: Removed.
1956         * html/HTMLDialogElement.h: Removed.
1957         * html/HTMLDialogElement.idl: Removed.
1958         * html/HTMLElementsAllInOne.cpp:
1959         * html/HTMLTagNames.in:
1960         * rendering/RenderDialog.cpp: Removed.
1961         * rendering/RenderDialog.h: Removed.
1962         * rendering/RenderLayer.cpp:
1963         (WebCore::RenderLayer::rebuildZOrderLists):
1964         (WebCore::RenderLayer::collectLayers):
1965         * rendering/RenderLayer.h:
1966         * rendering/RenderObject.h:
1967         (WebCore::RenderObject::isCounter):
1968         * rendering/RenderingAllInOne.cpp:
1969         * testing/InternalSettings.cpp:
1970         (WebCore::InternalSettings::Backup::Backup):
1971         (WebCore::InternalSettings::Backup::restoreTo):
1972         * testing/InternalSettings.h:
1973
1974 2013-08-29  Simon Fraser  <simon.fraser@apple.com>
1975
1976         Fix slider thumb event handling to use local, not absolute coordinates
1977         https://bugs.webkit.org/show_bug.cgi?id=120480
1978
1979         Reviewed by Darin Adler.
1980         
1981         SliderThumbElement::setPositionFromPoint() did all of its coordinate
1982         math by mapping renderer rects into absolute coordinates, which was
1983         unnecessary and expensive.
1984         
1985         Fix by doing all the math in the coordinate space of the input's
1986         renderer. This simplified the code. Also, currentPosition
1987         was computed but unused, so was removed.
1988
1989         No behavior change. Tested by fast/forms/range/slider-transformed.html
1990
1991         * html/shadow/SliderThumbElement.cpp:
1992         (WebCore::SliderThumbElement::setPositionFromPoint):
1993
1994 2013-08-29  Zan Dobersek  <zdobersek@igalia.com>
1995
1996         [Automake] libWebCoreDOM.la could use a better name
1997         https://bugs.webkit.org/show_bug.cgi?id=120232
1998
1999         Reviewed by Martin Robinson.
2000
2001         * bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.
2002
2003 2013-08-29  Joseph Pecoraro  <pecoraro@apple.com>
2004
2005         Web Inspector: Download Web Archive of Inspected Page
2006         https://bugs.webkit.org/show_bug.cgi?id=119774
2007
2008         Reviewed by Timothy Hatcher.
2009
2010         Add PageAgent.archive which will return a Base-64 encoded web archive
2011         when successful. In order to then allow saving non-string files, extend
2012         InspectorFrontendHost.save to allow for Base-64 encoded data.
2013
2014         * inspector/Inspector.json:
2015         * inspector/InspectorPageAgent.cpp:
2016         (WebCore::InspectorPageAgent::archive):
2017         * inspector/InspectorPageAgent.h:
2018         Introduce and implement PageAgent.archive. Create a Web Archive of the
2019         page's main frame.
2020
2021         * inspector/InspectorFrontendClient.h:
2022         * inspector/InspectorFrontendClientLocal.h:
2023         (WebCore::InspectorFrontendClientLocal::save):
2024         * inspector/InspectorFrontendHost.cpp:
2025         (WebCore::InspectorFrontendHost::save):
2026         * inspector/InspectorFrontendHost.h:
2027         * inspector/InspectorFrontendHost.idl:
2028         Extend InspectorFrontendHost.save to include a base64Encoded param.
2029
2030         * inspector/front-end/FileManager.js:
2031         * inspector/front-end/InspectorFrontendHostStub.js:
2032         (.WebInspector.InspectorFrontendHostStub.prototype.save):
2033         Misc. updates to the old inspector for function changes.
2034
2035 2013-08-29  Robert Hogan  <robert@webkit.org>
2036
2037         Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
2038         https://bugs.webkit.org/show_bug.cgi?id=93735
2039
2040         Reviewed by David Hyatt.
2041
2042         Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an 
2043         intrinsic height or width. This causes them to go down the wrong height and width computation
2044         path in RenderBox when they are absolute positioned. 
2045         
2046         The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really 
2047         possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
2048         of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
2049         To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
2050         the helpers for returning their approximation of intrinsic height and width.
2051
2052         The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
2053         intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
2054         The fix for this issue is captured in intrinsic-button-and-input-height.html.
2055
2056         Tests: fast/replaced/intrinsic-button-and-input-height.html
2057                fast/replaced/width-and-height-of-positioned-replaced-elements.html
2058
2059         * rendering/RenderBox.cpp:
2060         (WebCore::isReplacedElement):
2061         (WebCore::RenderBox::computePositionedLogicalWidth):
2062         (WebCore::RenderBox::computePositionedLogicalHeight):
2063         * rendering/RenderBox.h:
2064         (WebCore::RenderBox::intrinsicSize):
2065         * rendering/RenderButton.h:
2066         * rendering/RenderFileUploadControl.cpp:
2067         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2068         * rendering/RenderListBox.cpp:
2069         (WebCore::RenderListBox::RenderListBox):
2070         (WebCore::RenderListBox::computePreferredLogicalWidths):
2071         (WebCore::RenderListBox::computeLogicalHeight):
2072         * rendering/RenderListBox.h:
2073         * rendering/RenderMenuList.h:
2074         * rendering/RenderReplaced.h:
2075         * rendering/RenderSlider.cpp:
2076         (WebCore::RenderSlider::computePreferredLogicalWidths):
2077         * rendering/RenderTextControl.cpp:
2078         (WebCore::RenderTextControl::RenderTextControl):
2079         (WebCore::RenderTextControl::computeLogicalHeight):
2080         * rendering/RenderTextControl.h:
2081
2082 2013-08-29  Brent Fulgham  <bfulgham@apple.com>
2083
2084         [Windows] Unreviewed gardening. Add missing *.css files from project.
2085
2086         * WebCore.vcxproj/WebCore.vcxproj:
2087         * WebCore.vcxproj/WebCore.vcxproj.filters:
2088
2089 2013-08-29  Pratik Solanki  <pratik.solanki@gmail.com>
2090
2091         SharedBuffer m_segments and m_dataArray must be exclusive
2092         https://bugs.webkit.org/show_bug.cgi?id=77715
2093
2094         Reviewed by Benjamin Poulain.
2095
2096         When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
2097         data. We do not use m_segments. Since they are exclusive in practice, do not define or use
2098         m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.
2099
2100         No new tests because no functional changes.
2101
2102         * platform/SharedBuffer.cpp:
2103         (WebCore::SharedBuffer::append):
2104         (WebCore::SharedBuffer::clear):
2105         (WebCore::SharedBuffer::copy):
2106         (WebCore::SharedBuffer::buffer):
2107         (WebCore::SharedBuffer::getSomeData):
2108         * platform/SharedBuffer.h:
2109
2110 2013-08-29  Daniel Bates  <dabates@apple.com>
2111
2112         [iOS] Upstream changes to WebCore/style
2113         https://bugs.webkit.org/show_bug.cgi?id=120173
2114
2115         Reviewed by Darin Adler.
2116
2117         * style/StyleResolveTree.cpp:
2118         (WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
2119         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
2120         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
2121         (WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.
2122
2123 2013-08-29  Arnaud Renevier  <a.renevier@samsung.com>
2124
2125         [cairo] canvas drawing on itself doesn't work with accelerated canvas
2126         https://bugs.webkit.org/show_bug.cgi?id=118808
2127
2128         Reviewed by Martin Robinson.
2129
2130         When copying an accelerated image, we try to get its dimensions with
2131         cairo_image_surface_get_width/cairo_image_surface_get_height. As
2132         surface is not an image, this returns width and height of 0.
2133
2134         Many other places use cairo_image_surface_get although the surface may
2135         be a gl surface. 
2136         
2137         This patch fixes those issues by implementing a cairoSurfaceSize
2138         helper that returns the surface size whatever type it is.
2139
2140         It use cairo_surface_create_similar instead of
2141         cairo_image_surface_create in copyCairoImageSurface. It also calls
2142         cairo_paint in encodeImage when a drawing over a black background is
2143         needed.
2144
2145         It copies the surface to an image surface if needed in extractImage.
2146
2147         No new tests. Covered by existing tests.
2148
2149         * platform/graphics/cairo/BitmapImageCairo.cpp:
2150         (WebCore::BitmapImage::BitmapImage):
2151         (WebCore::BitmapImage::draw):
2152         (WebCore::BitmapImage::checkForSolidColor):
2153         * platform/graphics/cairo/CairoUtilities.cpp:
2154         (WebCore::copyCairoImageSurface):
2155         (WebCore::cairoSurfaceSize):
2156         * platform/graphics/cairo/CairoUtilities.h:
2157         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2158         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2159         * platform/graphics/gtk/GdkCairoUtilities.cpp:
2160         (cairoSurfaceToGdkPixbuf):
2161         * platform/graphics/gtk/GdkCairoUtilities.h:
2162         * platform/graphics/gtk/ImageBufferGtk.cpp:
2163         (WebCore::encodeImage):
2164         * platform/graphics/gtk/ImageGtk.cpp:
2165         (WebCore::BitmapImage::getGdkPixbuf):
2166         * platform/gtk/DragIcon.cpp:
2167         (WebCore::DragIcon::setImage):
2168
2169 2013-08-29  Tamas Czene  <tczene@inf.u-szeged.hu>
2170
2171         Buildfix after r154806 for !ENABLE(CSS_REGIONS) platforms.
2172         https://bugs.webkit.org/show_bug.cgi?id=120461
2173
2174         Reviewed by Csaba Osztrogonác.
2175
2176         moveToFlowThreadIfNeeded() is used only inside of ENABLE(CSS_REGIONS)
2177         block (and only once), so it should be guarded too.
2178
2179         * style/StyleResolveTree.cpp:
2180
2181 2013-08-29  David Kilzer  <ddkilzer@apple.com>
2182
2183         BUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS
2184
2185         See: AX: Cancel button in search field not accessible.
2186         <https://webkit.org/b/120322>
2187
2188         Fixes the following build error:
2189
2190             In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:44:
2191             Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp:46:12: error: use of undeclared identifier 'AXSearchFieldCancelButtonText'
2192                 return AXSearchFieldCancelButtonText();
2193                        ^
2194             1 error generated.
2195
2196         * accessibility/AccessibilitySearchFieldButtons.cpp:
2197         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
2198         Return String() instead of calling AXSearchFieldCancelButtonText() on iOS.
2199
2200 2013-08-29  Antti Koivisto  <antti@apple.com>
2201
2202         Remove NodeRenderingContext
2203         https://bugs.webkit.org/show_bug.cgi?id=120466
2204
2205         Reviewed by Andreas Kling.
2206
2207         Switch the few remaining clients of this class to call the underlying code directly.
2208
2209         * CMakeLists.txt:
2210         * GNUmakefile.list.am:
2211         * Target.pri:
2212         * WebCore.exp.in:
2213         * WebCore.vcxproj/WebCore.vcxproj:
2214         * WebCore.xcodeproj/project.pbxproj:
2215         * css/StyleResolver.cpp:
2216         (WebCore::StyleResolver::State::initForStyleResolve):
2217         * dom/DOMAllInOne.cpp:
2218         * dom/Node.cpp:
2219         * dom/Node.h:
2220         
2221             Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.
2222
2223         * dom/NodeRenderingContext.cpp: Removed.
2224         * dom/NodeRenderingContext.h: Removed.
2225         * dom/ShadowRoot.h:
2226         * dom/Text.cpp:
2227         * dom/Text.h:
2228         * dom/TreeScope.cpp:
2229         * dom/TreeScope.h:
2230             
2231             Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.
2232
2233         * html/HTMLSummaryElement.cpp:
2234         (WebCore::HTMLSummaryElement::detailsElement):
2235         * style/StyleResolveTree.cpp:
2236         (WebCore::Style::createTextRendererIfNeeded):
2237         
2238             For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
2239             This difference is probably not testable in current trunk.
2240
2241         (WebCore::Style::resolveTree):
2242
2243 2013-08-29  Antti Koivisto  <antti@apple.com>
2244
2245         Move element renderer creation out of NodeRenderingContext
2246         https://bugs.webkit.org/show_bug.cgi?id=120461
2247
2248         Reviewed by Andreas Kling.
2249
2250         Move NodeRenderingContext::createRendererIfNeeded() and the related utility functions to StyleResolveTree.
2251         
2252         Tighten typing and constness. Refactor sligthly to be more understandable.
2253
2254         * dom/Element.cpp:
2255         (WebCore::Element::shouldMoveToFlowThread):
2256         * dom/Element.h:
2257         * dom/NodeRenderingContext.cpp:
2258         (WebCore::NodeRenderingContext::NodeRenderingContext):
2259         (WebCore::NodeRenderingContext::nextRenderer):
2260         (WebCore::NodeRenderingContext::previousRenderer):
2261         (WebCore::NodeRenderingContext::parentRenderer):
2262         * dom/NodeRenderingContext.h:
2263         * dom/PseudoElement.h:
2264         * style/StyleResolveTree.cpp:
2265         (WebCore::Style::nextSiblingRenderer):
2266         (WebCore::Style::shouldCreateRenderer):
2267         (WebCore::Style::elementInsideRegionNeedsRenderer):
2268         (WebCore::Style::moveToFlowThreadIfNeeded):
2269         (WebCore::Style::createRendererIfNeeded):
2270         (WebCore::Style::attachRenderTree):
2271         * svg/SVGElement.cpp:
2272         (WebCore::SVGElement::shouldMoveToFlowThread):
2273         * svg/SVGElement.h:
2274
2275 2013-08-28  Chris Fleizach  <cfleizach@apple.com>
2276
2277         AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27
2278         https://bugs.webkit.org/show_bug.cgi?id=120434
2279
2280         Reviewed by Darin Adler.
2281
2282         Crash logs indicate that there's a null pointer access in rootObject. That seems like it could only
2283         happen in Document was null. 
2284
2285         Unfortunately, there are no reproducible steps and no other information to construct a test case.
2286
2287         * accessibility/AXObjectCache.cpp:
2288         (WebCore::AXObjectCache::rootObject):
2289
2290 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2291
2292         The code to look for an ancestor form element is duplicated in three different places
2293         https://bugs.webkit.org/show_bug.cgi?id=120391
2294
2295         Reviewed by Darin Adler.
2296
2297         Unduplicated the code by putting a single implementation in HTMLFormElement.cpp.
2298
2299         * WebCore.order:
2300         * html/FormAssociatedElement.cpp:
2301         (WebCore::FormAssociatedElement::findAssociatedForm):
2302         (WebCore::FormAssociatedElement::formAttributeChanged):
2303         * html/HTMLElement.cpp:
2304         (WebCore::HTMLElement::virtualForm):
2305         * html/HTMLElement.h:
2306         * html/HTMLFormControlElement.cpp:
2307         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2308         * html/HTMLFormElement.cpp:
2309         (WebCore::HTMLFormElement::findClosestFormAncestor):
2310         * html/HTMLFormElement.h:
2311         * html/HTMLImageElement.cpp:
2312         (WebCore::HTMLImageElement::insertedInto):
2313         * html/HTMLObjectElement.cpp:
2314         (WebCore::HTMLObjectElement::HTMLObjectElement):
2315         * html/parser/HTMLTreeBuilder.cpp:
2316         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2317
2318 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2319
2320         Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters
2321         https://bugs.webkit.org/show_bug.cgi?id=120446
2322
2323         Reviewed by Alexey Proskuryakov.
2324
2325         Merge https://chromium.googlesource.com/chromium/blink/+/c8188c21452501b68950a9fcc1f5cbc7b4de4df5
2326
2327         Unlike 'responseText' and 'responseXML', 'responseBlob' and
2328         'responseArrayBuffer' are not exposed to JavaScript (they don't
2329         appear in the IDL or in the specification). As they are only called from
2330         custom bindings in response to a JavaScript call to the 'response' getter,
2331         we can safely replace the exception-throwing code in the implementation
2332         with an ASSERT that the request type is correct.
2333
2334         * bindings/js/JSXMLHttpRequestCustom.cpp:
2335         (WebCore::JSXMLHttpRequest::response):
2336         * xml/XMLHttpRequest.cpp:
2337         (WebCore::XMLHttpRequest::responseBlob):
2338         (WebCore::XMLHttpRequest::responseArrayBuffer):
2339         * xml/XMLHttpRequest.h:
2340
2341 2013-08-28  Chris Curtis  <chris_curtis@apple.com>
2342
2343         https://bugs.webkit.org/show_bug.cgi?id=119548
2344         Refactoring Exception throws.
2345         
2346         Reviewed by Geoffrey Garen.
2347         
2348         Gets column information from the error object for reporting exceptions.
2349         * bindings/js/JSDOMBinding.cpp:
2350         (WebCore::reportException): 
2351         * bindings/js/ScriptCallStackFactory.cpp: 
2352         (WebCore::createScriptCallStackFromException):
2353  
2354         Moved setting an exception into the vm, These functions changed to use the new functionality.
2355  
2356         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
2357         (WebCore::JSAudioBufferSourceNode::setBuffer):
2358         * bindings/js/JSBiquadFilterNodeCustom.cpp:
2359         (WebCore::JSBiquadFilterNode::setType):
2360         * bindings/js/JSCryptoCustom.cpp:
2361         (WebCore::JSCrypto::getRandomValues):
2362         * bindings/js/JSDOMBinding.cpp:
2363         (WebCore::setDOMException):
2364         * bindings/js/JSInjectedScriptHostCustom.cpp:
2365         (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
2366         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2367         (WebCore::JSJavaScriptCallFrame::evaluate):
2368         (WebCore::JSJavaScriptCallFrame::setVariableValue):
2369         * bindings/js/JSNodeFilterCondition.cpp:
2370         (WebCore::JSNodeFilterCondition::acceptNode):
2371         * bindings/js/JSOscillatorNodeCustom.cpp:
2372         (WebCore::JSOscillatorNode::setType):
2373         * bindings/js/JSPannerNodeCustom.cpp:
2374         (WebCore::JSPannerNode::setPanningModel):
2375         (WebCore::JSPannerNode::setDistanceModel):
2376         * bindings/js/JSSVGLengthCustom.cpp:
2377         (WebCore::JSSVGLength::convertToSpecifiedUnits):
2378         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2379         (WebCore::getObjectParameter):
2380         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
2381         (WebCore::JSWebGLRenderingContext::getExtension):
2382         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
2383         (WebCore::JSWebGLRenderingContext::getParameter):
2384         (WebCore::JSWebGLRenderingContext::getProgramParameter):
2385         (WebCore::JSWebGLRenderingContext::getShaderParameter):
2386         (WebCore::JSWebGLRenderingContext::getUniform):
2387         (WebCore::dataFunctionf):
2388         (WebCore::dataFunctioni):
2389         (WebCore::dataFunctionMatrix):
2390         * bindings/js/JSXMLHttpRequestCustom.cpp:
2391         (WebCore::JSXMLHttpRequest::open):
2392         * bindings/js/SerializedScriptValue.cpp:
2393         (WebCore::CloneBase::throwStackOverflow):
2394         (WebCore::CloneDeserializer::throwValidationError):
2395         (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
2396         * bindings/js/WorkerScriptController.cpp:
2397         (WebCore::WorkerScriptController::evaluate):
2398         (WebCore::WorkerScriptController::setException):
2399         * bridge/c/c_instance.cpp:
2400         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
2401         (JSC::Bindings::CInstance::invokeMethod):
2402         (JSC::Bindings::CInstance::invokeDefaultMethod):
2403         (JSC::Bindings::CInstance::invokeConstruct):
2404         (JSC::Bindings::CInstance::toJSPrimitive):
2405         * bridge/objc/objc_instance.mm:
2406         (ObjcInstance::invokeMethod):
2407         * bridge/objc/objc_runtime.mm:
2408         (JSC::Bindings::ObjcArray::setValueAt):
2409         (JSC::Bindings::ObjcArray::valueAt):
2410         * bridge/objc/objc_utility.mm:
2411         (JSC::Bindings::throwError):
2412         * bridge/qt/qt_instance.cpp:
2413         (JSC::Bindings::QtField::valueFromInstance):
2414         (JSC::Bindings::QtField::setValueToInstance):
2415         * bridge/runtime_array.cpp:
2416         (JSC::RuntimeArray::put):
2417         (JSC::RuntimeArray::putByIndex):
2418         * bridge/runtime_object.cpp:
2419         (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
2420
2421 2013-08-28  Alexey Proskuryakov  <ap@apple.com>
2422
2423         Remove an unused data member from Page.
2424
2425         Rubber-stamped by Brady Eidson.
2426
2427         * page/Page.cpp:
2428         * page/Page.h:
2429         Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.
2430
2431 2013-08-28  Gustavo Noronha Silva  <gns@gnome.org>
2432
2433         Unreviewed build fix - copy/paste failure, copied too much.
2434
2435         * bindings/gobject/WebKitDOMCustom.h:
2436
2437 2013-08-28  Dean Jackson  <dino@apple.com>
2438
2439         [WebGL] CoreGraphics can provide greyscale image data
2440         https://webkit.org/b/120443
2441
2442         Reviewed by Simon Fraser.
2443
2444         CoreGraphics can decode greyscale or greyscale+alpha images
2445         while preserving the format. Our WebGL texture unpacker
2446         was seeing this and assuming it meant the data did not come
2447         from an <img> element. Since that method already special cased
2448         CoreGraphics, the fix was to simply return true for these
2449         extra types.
2450
2451         I also renamed srcFormatComeFromDOMElementOrImageData
2452         to srcFormatComesFromDOMElementOrImageData.
2453
2454         Test: fast/canvas/webgl/tex-image-with-greyscale-image.html
2455
2456         * platform/graphics/GraphicsContext3D.cpp: Call new name.
2457         * platform/graphics/GraphicsContext3D.h:
2458         (WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
2459         Add support for R8, AR8, A8, and RA8 data formats.
2460
2461 2013-08-28  Gustavo Noronha Silva  <gns@gnome.org>
2462
2463         [GTK] HTMLElement lost setID and getID - need to add compatibility symbols
2464         https://bugs.webkit.org/show_bug.cgi?id=120440
2465
2466         Reviewed by Martin Robinson.
2467
2468         No tests, just adding compatibility symbols.
2469
2470         setID and getID were removed, and the parent class (Element) ones should be used instead.
2471         We need to keep our ABI compatible, though, so add compatibility symbols.
2472
2473         * bindings/gobject/WebKitDOMCustom.cpp:
2474         (webkit_dom_html_element_get_id):
2475         (webkit_dom_html_element_set_id):
2476         * bindings/gobject/WebKitDOMCustom.h:
2477
2478 2013-08-28  Simon Fraser  <simon.fraser@apple.com>
2479
2480         Fix compositing layers in columns
2481         https://bugs.webkit.org/show_bug.cgi?id=120436
2482
2483         Reviewed by Dave Hyatt.
2484         
2485         Remove the old hack in RenderLayer::updateLayerPosition() for placing
2486         layers in columns, which changed the layer position for composited
2487         layers; this broke hit-testing.
2488         
2489         Fix a better way by moving compositing layers to the correct
2490         positions that take column offsets into account, by fixing
2491         RenderLayer::convertToLayerCoords() to optionally apply column
2492         adjustment, and using this in the code which positions compositing layers.
2493
2494         Tests: compositing/columns/ancestor-clipped-in-paginated.html
2495                compositing/columns/clipped-in-paginated.html
2496                compositing/columns/composited-columns-vertical-rl.html
2497                compositing/columns/composited-columns.html
2498                compositing/columns/composited-in-paginated-rl.html
2499                compositing/columns/composited-in-paginated-writing-mode-rl.html
2500                compositing/columns/composited-lr-paginated-repaint.html
2501                compositing/columns/composited-rl-paginated-repaint.html
2502                compositing/columns/hittest-composited-in-paginated.html
2503                compositing/columns/rotated-in-paginated.html
2504                compositing/columns/untransformed-composited-in-paginated.html
2505
2506         * rendering/RenderLayer.cpp:
2507         (WebCore::RenderLayer::updateLayerPosition):
2508         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
2509         (WebCore::accumulateOffsetTowardsAncestor):
2510         (WebCore::RenderLayer::convertToLayerCoords):
2511         * rendering/RenderLayer.h:
2512         * rendering/RenderLayerBacking.cpp:
2513         (WebCore::RenderLayerBacking::updateCompositedBounds):
2514         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2515
2516 2013-08-28  Brent Fulgham  <bfulgham@webkit.org>
2517
2518         [WinCairo] Unreviewed build fix.
2519
2520         * WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
2521         window from the build.
2522         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2523
2524 2013-08-28  Benjamin Poulain  <benjamin@webkit.org>
2525
2526         Fix the build after r154780
2527
2528         * dom/SpaceSplitString.cpp:
2529         (WebCore::SpaceSplitStringData::create):
2530
2531 2013-08-27  Benjamin Poulain  <bpoulain@apple.com>
2532
2533         Simplify and clean SpaceSplitString
2534         https://bugs.webkit.org/show_bug.cgi?id=120385
2535
2536         Reviewed by Ryosuke Niwa.
2537
2538         Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
2539         This brings the following:
2540         - Fix the coding style of the header.
2541         - Remove the concepts of empty and null. The list can now be empty or have something.
2542           There is no null state.
2543         - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
2544
2545         * WebCore.exp.in:
2546         * dom/ElementData.h:
2547         (WebCore::ElementData::hasClass):
2548         * dom/SpaceSplitString.cpp:
2549         (WebCore::tokenizeSpaceSplitString):
2550         (WebCore::SpaceSplitStringData::containsAll):
2551         (WebCore::SpaceSplitString::set):
2552         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2553         (WebCore::TokenCounterProcessor::TokenCounterProcessor):
2554         (WebCore::TokenCounterProcessor::processToken):
2555         (WebCore::TokenCounterProcessor::tokenCount):
2556         (WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
2557         (WebCore::TokenInitializerProcessor::processToken):
2558         (WebCore::TokenInitializerProcessor::nextMemoryBucket):
2559         (WebCore::SpaceSplitStringData::create):
2560         (WebCore::SpaceSplitStringData::destroy):
2561         * dom/SpaceSplitString.h:
2562         (WebCore::SpaceSplitStringData::contains):
2563         (WebCore::SpaceSplitStringData::size):
2564         (WebCore::SpaceSplitStringData::operator[]):
2565         (WebCore::SpaceSplitStringData::ref):
2566         (WebCore::SpaceSplitStringData::deref):
2567         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
2568         (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
2569         (WebCore::SpaceSplitStringData::tokenArrayStart):
2570         (WebCore::SpaceSplitString::SpaceSplitString):
2571         (WebCore::SpaceSplitString::operator!=):
2572         (WebCore::SpaceSplitString::clear):
2573         (WebCore::SpaceSplitString::contains):
2574         (WebCore::SpaceSplitString::containsAll):
2575         (WebCore::SpaceSplitString::size):
2576         (WebCore::SpaceSplitString::isEmpty):
2577         (WebCore::SpaceSplitString::operator[]):
2578         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2579         * html/ClassList.cpp:
2580         (WebCore::ClassList::classNames):
2581         * page/EventHandler.cpp:
2582         (WebCore::findDropZone):
2583
2584 <<<<<<< .mine
2585 2013-08-28  Benjamin Poulain  <benjamin@webkit.org>
2586
2587         Simplify and clean SpaceSplitString
2588         https://bugs.webkit.org/show_bug.cgi?id=120385
2589
2590         Reviewed by Ryosuke Niwa.
2591
2592         Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
2593         - Remove the concepts of empty and null. The list can now be empty or have something.
2594           There is no null state.
2595         - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
2596
2597         * WebCore.exp.in:
2598         * dom/ElementData.h:
2599         (WebCore::ElementData::hasClass):
2600         * dom/SpaceSplitString.cpp:
2601         (WebCore::tokenizeSpaceSplitString):
2602         (WebCore::SpaceSplitStringData::containsAll):
2603         (WebCore::SpaceSplitString::set):
2604         (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2605         (WebCore::TokenCounter::TokenCounter):
2606         (WebCore::TokenCounter::processToken):
2607         (WebCore::TokenCounter::tokenCount):
2608         (WebCore::TokenAtomicStringInitializer::TokenAtomicStringInitializer):
2609         (WebCore::TokenAtomicStringInitializer::processToken):
2610         (WebCore::TokenAtomicStringInitializer::nextMemoryBucket):
2611         (WebCore::SpaceSplitStringData::create):
2612         (WebCore::SpaceSplitStringData::destroy):
2613         * dom/SpaceSplitString.h:
2614         (WebCore::SpaceSplitStringData::contains):
2615         (WebCore::SpaceSplitStringData::size):
2616         (WebCore::SpaceSplitStringData::operator[]):
2617         (WebCore::SpaceSplitStringData::ref):
2618         (WebCore::SpaceSplitStringData::deref):
2619         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
2620         (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
2621         (WebCore::SpaceSplitStringData::tokenArrayStart):
2622         (WebCore::SpaceSplitString::containsAll):
2623         (WebCore::SpaceSplitString::isEmpty):
2624         (WebCore::SpaceSplitString::operator[]):
2625         * html/ClassList.cpp:
2626         (WebCore::ClassList::classNames):
2627         * page/EventHandler.cpp:
2628         (WebCore::findDropZone):
2629
2630 =======
2631 2013-08-28  Rob Buis  <rwlbuis@webkit.org>
2632
2633         Namespace prefix is blindly followed when serializing
2634         https://bugs.webkit.org/show_bug.cgi?id=19121
2635         Serializer doesn't handling inconsistent prefixes properly
2636         https://bugs.webkit.org/show_bug.cgi?id=117764
2637         Attribute namespaces are serialized as if they were element ones
2638         https://bugs.webkit.org/show_bug.cgi?id=22958
2639
2640         Reviewed by Ryosuke Niwa.
2641
2642         Add code to make sure unique prefixes and namespace declarations are generated.
2643         Unique prefix generation happens when:
2644         - the same prefix is used to map to different namespaces or
2645         - no prefix is given but the attribute is in a namespace.
2646
2647         This is done in order to not violate constraints listed in http://www.w3.org/TR/xml-names11/. In general
2648         the pseudo code listed in http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
2649         is used, doing the following for attributes:
2650         if the attribute has a namespace then
2651           if the attribute has no prefix OR prefix is not declared OR conflicts with existing prefix mapping to different NS then
2652             try to find the matching in-scope declaration by looking up the prefix in the namespace -> prefix mapping, if found use that prefix
2653             else if the attribute prefix is not null AND not mapped in-scope, declare the prefix
2654             else generate a unique prefix for the namespace
2655
2656         To keep track of in-scope namespaces a prefix to namespace mapping is used. 
2657
2658         Tests: fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html
2659                fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html
2660                fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html
2661                svg/custom/xlink-prefix-generation-in-attributes.html
2662
2663         * editing/MarkupAccumulator.cpp:
2664         (WebCore::MarkupAccumulator::MarkupAccumulator):
2665         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
2666         (WebCore::MarkupAccumulator::appendNamespace):
2667         (WebCore::MarkupAccumulator::generateUniquePrefix):
2668         (WebCore::MarkupAccumulator::appendAttribute):
2669         * editing/MarkupAccumulator.h:
2670
2671 2013-08-28  Sam White  <samuel_white@apple.com>
2672
2673         AX: Cancel button in search field not accessible.
2674         <https://webkit.org/b/120322>
2675
2676         Expose the cancel button that shows in an input element of
2677         type search to accessibility.
2678
2679         Reviewed by Chris Fleizach.
2680
2681         Test: platform/mac/accessibility/search-field-cancel-button.html
2682
2683         * CMakeLists.txt:
2684         * English.lproj/Localizable.strings:
2685         * GNUmakefile.list.am:
2686         * Target.pri:
2687         * WebCore.vcxproj/WebCore.vcxproj:
2688         * WebCore.xcodeproj/project.pbxproj:
2689         * accessibility/AXObjectCache.cpp:
2690         (WebCore::createFromRenderer):
2691         * accessibility/AccessibilityAllInOne.cpp:
2692         * accessibility/AccessibilitySearchFieldButtons.cpp: Added.
2693         (WebCore::AccessibilitySearchFieldCancelButton::create):
2694         (WebCore::AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton):
2695         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
2696         (WebCore::AccessibilitySearchFieldCancelButton::accessibilityText):
2697         (WebCore::AccessibilitySearchFieldCancelButton::press):
2698         (WebCore::AccessibilitySearchFieldCancelButton::computeAccessibilityIsIgnored):
2699         * accessibility/AccessibilitySearchFieldButtons.h: Added.
2700         * dom/Element.h:
2701         (WebCore::Element::isSearchFieldCancelButtonElement):
2702         * html/shadow/TextControlInnerElements.h:
2703         * platform/LocalizedStrings.cpp:
2704         (WebCore::AXSearchFieldCancelButtonText):
2705         * platform/LocalizedStrings.h:
2706         * platform/efl/LocalizedStringsEfl.cpp:
2707         (WebCore::AXSearchFieldCancelButtonText):
2708         * platform/gtk/LocalizedStringsGtk.cpp:
2709         (WebCore::AXSearchFieldCancelButtonText):
2710         * platform/qt/LocalizedStringsQt.cpp:
2711         (WebCore::AXSearchFieldCancelButtonText):
2712
2713 >>>>>>> .r154779
2714 2013-08-28  Eric Carlson  <eric.carlson@apple.com>
2715
2716         MediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer
2717         https://bugs.webkit.org/show_bug.cgi?id=120170
2718
2719         Reviewed by Simon Fraser.
2720
2721         No new tests, it is only possible to test in the debugger.
2722
2723         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2724         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Drive by optimization.
2725         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Move logic from paint here.
2726         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Do nothing if we already have a video layer,
2727             otherwise call paint().
2728
2729 2013-08-28  Antti Koivisto  <antti@apple.com>
2730
2731         Add child and descendant const iterators
2732         https://bugs.webkit.org/show_bug.cgi?id=120430
2733
2734         Reviewed by Andreas Kling
2735
2736         This patch adds const-correct DOM tree traversal iterators. It also uses them in a few places.
2737         
2738         Some const_casts have been applied where constness breaks.
2739
2740         * dom/ChildIterator.h:
2741         (WebCore::::ChildConstIterator):
2742         (WebCore::::operator):
2743         (WebCore::=):
2744         (WebCore::::ChildConstIteratorAdapter):
2745         (WebCore::::begin):
2746         (WebCore::::end):
2747         (WebCore::elementChildren):
2748         (WebCore::childrenOfType):
2749         * dom/DescendantIterator.h:
2750         (WebCore::::DescendantConstIterator):
2751         (WebCore::::operator):
2752         (WebCore::=):
2753         (WebCore::::DescendantConstIteratorAdapter):
2754         (WebCore::::begin):
2755         (WebCore::::end):
2756         (WebCore::elementDescendants):
2757         (WebCore::descendantsOfType):
2758         * dom/Node.cpp:
2759         (WebCore::Node::numberOfScopedHTMLStyleChildren):
2760         * html/HTMLFieldSetElement.cpp:
2761         (WebCore::HTMLFieldSetElement::legend):
2762         * html/HTMLFieldSetElement.h:
2763         * html/HTMLMediaElement.cpp:
2764         (WebCore::HTMLMediaElement::finishParsingChildren):
2765         * html/HTMLObjectElement.cpp:
2766         (WebCore::HTMLObjectElement::containsJavaApplet):
2767         * svg/SVGElement.cpp:
2768         (WebCore::SVGElement::title):
2769         * svg/SVGSVGElement.cpp:
2770         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
2771         (WebCore::SVGSVGElement::checkIntersection):
2772         (WebCore::SVGSVGElement::checkEnclosure):
2773         (WebCore::SVGSVGElement::getElementById):
2774         * svg/SVGSVGElement.h:
2775
2776 2013-08-28  Lukasz Gajowy  <l.gajowy@samsung.com>
2777
2778         AX:Null pointer may be dereferenced.
2779         https://bugs.webkit.org/show_bug.cgi?id=120300
2780
2781         Reviewed by Chris Fleizach.
2782
2783         Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.
2784
2785         * accessibility/AXObjectCache.cpp:
2786         (WebCore::AXObjectCache::getOrCreate):
2787
2788 2013-08-28  Pratik Solanki  <psolanki@apple.com>
2789
2790         Document::elementSheet() should return a reference
2791         https://bugs.webkit.org/show_bug.cgi?id=120433
2792
2793         Reviewed by Andreas Kling.
2794
2795         Since elementSheet() always retruns a valid pointer, we can simply return a reference
2796         instead. Also rename m_elemSheet to m_elementSheet.
2797
2798         * css/CSSParser.cpp:
2799         (WebCore::CSSParser::parseInlineStyleDeclaration):
2800         * css/PropertySetCSSStyleDeclaration.cpp:
2801         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
2802         * dom/Document.cpp:
2803         (WebCore::Document::~Document):
2804         (WebCore::Document::recalcStyle):
2805         (WebCore::Document::updateBaseURL):
2806         (WebCore::Document::elementSheet):
2807         * dom/Document.h:
2808         * dom/StyledElement.cpp:
2809         (WebCore::StyledElement::setInlineStyleFromString):
2810         (WebCore::StyledElement::setInlineStyleProperty):
2811         (WebCore::StyledElement::addSubresourceAttributeURLs):
2812         (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
2813         * inspector/InspectorStyleSheet.cpp:
2814         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
2815
2816 2013-08-28  Ryosuke Niwa  <rniwa@webkit.org>
2817
2818         REGRESSION(r154586): Past names map should only be used when named item is empty
2819         https://bugs.webkit.org/show_bug.cgi?id=120432
2820
2821         Reviewed by Anders Carlsson.
2822
2823         Don't add the element from the past names map if we've found elements of the given name.
2824
2825         Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html
2826
2827         * html/HTMLFormElement.cpp:
2828         (WebCore::HTMLFormElement::getNamedElements):
2829
2830 2013-08-27  Ryosuke Niwa  <rniwa@webkit.org>
2831
2832         Don't keep unassociated elements in the past names map
2833         https://bugs.webkit.org/show_bug.cgi?id=120328
2834
2835         Reviewed by Darin Adler.
2836
2837         Remove elements from the past names map of a form element when they are disassociated with the form to match
2838         the behaviors of Firefox 24 and Internet Explorer 10. The specification feedback has been submitted to WHATWG
2839         in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html
2840
2841         Also fix a memory leak via the past names map when the elements in the map becomes an ancestor of the form
2842         element by storing a raw pointer in the map. This is safe because the form associated elements are kept alive
2843         by another mechanism.
2844
2845         Because ~FormAssociatedElement removes entries from the past names map, we could no longer store HTMLElement*
2846         in HTMLFormElement::m_pastNamesMap as that requires casting FormAssociatedElement* to HTMLElement*, which is
2847         not possible in ~FormAssociatedElement. We instead store pointers to FormNamedItem, new base class of
2848         FormAssociatedElement and HTMLImageElement.
2849
2850         Test: fast/forms/past-names-map-should-not-contained-disassociated-elements.html
2851
2852         * Target.pri:
2853         * WebCore.exp.in:
2854         * WebCore.vcxproj/WebCore.vcxproj:
2855         * WebCore.vcxproj/WebCore.vcxproj.filters:
2856         * WebCore.xcodeproj/project.pbxproj:
2857         * html/FormAssociatedElement.cpp:
2858         * html/FormAssociatedElement.h:
2859         (WebCore::toHTMLElement):
2860
2861         * html/FormNamedItem.h: Added.
2862         (WebCore::FormNamedItem::~FormNamedItem):
2863
2864         * html/HTMLElement.h:
2865         (WebCore::HTMLElement::asFormNamedItem): Added. This allows the conversion from a HTMLFormControlElement,
2866         HTMLObjectElement, HTMLImageElement to FormNamedItem in getNamedElements to update the past names map.
2867
2868         * html/HTMLFormControlElement.h:
2869         * html/HTMLFormElement.cpp:
2870         (WebCore::HTMLFormElement::removeFormElement):
2871         (WebCore::HTMLFormElement::removeImgElement):
2872         (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Asserts that FormNamedItem added to or obtained
2873         from the past names map is either a form associated element or an image element; the condition guarantees
2874         that the item will be removed from the map before its element gets destructed.
2875
2876         (WebCore::HTMLFormElement::elementFromPastNamesMap):
2877         (WebCore::HTMLFormElement::addToPastNamesMap):
2878         (WebCore::HTMLFormElement::removeFromPastNamesMap): Finds and removes the obsolete item from the map in O(n).
2879         Note that removeFromVector, which is called on m_associatedElements or m_imageElements before this function is called,
2880         is already O(n).
2881
2882         (WebCore::HTMLFormElement::getNamedElements):
2883
2884         * html/HTMLFormElement.h:
2885         * html/HTMLImageElement.h:
2886         * html/HTMLObjectElement.h:
2887
2888 2013-08-28  Brendan Long  <b.long@cablelabs.com>
2889
2890         Duplicate in-band tracks when switching <source> elements
2891         https://bugs.webkit.org/show_bug.cgi?id=120369
2892
2893         Reviewed by Eric Carlson.
2894
2895         Test: media/track/track-in-band-duplicate-tracks-when-source-changes.html
2896
2897         * html/HTMLMediaElement.cpp:
2898         (WebCore::HTMLMediaElement::createMediaPlayer):
2899         Delete existing in-band tracks before creating a new media player.
2900
2901 2013-08-28  Bem Jones-Bey  <bjonesbe@adobe.com>
2902
2903         Code cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines
2904         https://bugs.webkit.org/show_bug.cgi?id=120378
2905
2906         Reviewed by Darin Adler.
2907
2908         Rename FloatIntervalSearchAdapter to ComputeFloatOffsetAdapter. The
2909         naming of this adapter has caused much confusion in reading the code,
2910         as it wasn't apparent that calls to it were actually doing anything
2911         other than searching the interval tree. The new name is a much better
2912         description of what it actually does.
2913
2914         Also, rename m_lowValue and m_highValue member variables to make it
2915         easier to read the code that uses them.
2916
2917         Removed the inlines based on a change by eseidel in Blink.
2918
2919         No new tests, no behavior change.
2920
2921         * rendering/RenderBlock.cpp:
2922         (WebCore::::updateOffsetIfNeeded): Update for renames.
2923         (WebCore::::collectIfNeeded): Ditto.
2924         (WebCore::::getHeightRemaining): Ditto.
2925         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
2926         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
2927         * rendering/RenderBlock.h:
2928         (WebCore::RenderBlock::FloatingObject::x): Remove unnecessary inline.
2929         (WebCore::RenderBlock::FloatingObject::maxX): Ditto.
2930         (WebCore::RenderBlock::FloatingObject::y): Ditto.
2931         (WebCore::RenderBlock::FloatingObject::maxY): Ditto.
2932         (WebCore::RenderBlock::FloatingObject::width): Ditto.
2933         (WebCore::RenderBlock::FloatingObject::height): Ditto.
2934         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter): Rename.
2935         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::lowValue): Rename m_lowValue.
2936         (WebCore::RenderBlock::ComputeFloatOffsetAdapter::highValue): Rename m_highValue.
2937
2938 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
2939
2940         Resolve unused parameter warning in ScriptedAnimationController.cpp.
2941         https://bugs.webkit.org/show_bug.cgi?id=120408
2942
2943         Reviewed by Darin Adler.
2944
2945         * dom/ScriptedAnimationController.cpp:
2946         (WebCore::ScriptedAnimationController::setThrottled):
2947
2948 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
2949
2950         [CSS Grid Layout] Handle 'span' positions during layout
2951         https://bugs.webkit.org/show_bug.cgi?id=119756
2952
2953         Reviewed by Andreas Kling.
2954
2955         From Blink r149133 by <jchaffraix@chromium.org>
2956
2957         Properly handle the 'span' keyword during layout. We only had
2958         parsing support so far but with this change we are able to
2959         recognize these positions and act accordingly.
2960
2961         * rendering/RenderGrid.cpp:
2962         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
2963         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
2964         * rendering/RenderGrid.h:
2965         * rendering/style/GridPosition.h:
2966         (WebCore::GridPosition::shouldBeResolvedAgainstOppositePosition):
2967
2968 2013-08-28  Antti Koivisto  <antti@apple.com>
2969
2970         Factor descendant iterator assertions into a class.
2971         https://bugs.webkit.org/show_bug.cgi?id=120422
2972
2973         Reviewed by Darin Adler.
2974
2975         Share the assertions between ChildIterator and DescendantIterator. We can use it for future const iterators too.
2976
2977         * GNUmakefile.list.am:
2978         * Target.pri:
2979         * WebCore.vcxproj/WebCore.vcxproj:
2980         * WebCore.xcodeproj/project.pbxproj:
2981         * dom/ChildIterator.h:
2982         (WebCore::::ChildIterator):
2983         (WebCore::::operator):
2984         (WebCore::=):
2985         * dom/DescendantIterator.h:
2986         (WebCore::::DescendantIterator):
2987         (WebCore::::operator):
2988         (WebCore::=):
2989         * dom/DescendantIteratorAssertions.h: Added.
2990         (WebCore::DescendantIteratorAssertions::DescendantIteratorAssertions):
2991         (WebCore::DescendantIteratorAssertions::domTreeHasMutated):
2992         (WebCore::DescendantIteratorAssertions::dropEventDispatchAssertion):
2993
2994 2013-08-28  Darin Adler  <darin@apple.com>
2995
2996         Eliminate Pasteboard::generalPasteboard
2997         https://bugs.webkit.org/show_bug.cgi?id=120392
2998
2999         Reviewed by Anders Carlsson.
3000
3001         * WebCore.exp.in: Removed the generalPasteboard function.
3002         It didn't need to be exported, because no one was using it.
3003
3004         * editing/Editor.cpp:
3005         (WebCore::Editor::paste): Added an overload that takes a Pasteboard.
3006         (WebCore::Editor::copyURL): Ditto.
3007         * editing/Editor.h: Added overloads.
3008
3009         * editing/EditorCommand.cpp:
3010         (WebCore::executePasteGlobalSelection): Put this function inside the same
3011         platform #if that the global selection code in the Pasteboard class was in.
3012         Changed to use Pasteboard::createForGlobalSelection instead of using the
3013         Pasteboard::setSelectionMode approach.
3014         (WebCore::createCommandMap): Put PasteGlobalSelection inside the platform #if.
3015
3016         * inspector/InjectedScriptHost.cpp:
3017         (WebCore::InjectedScriptHost::copyText): Use Pasteboard::createForCopyAndPaste()
3018         instead of Pasteboard::generalPasteboard().
3019         * inspector/InspectorFrontendHost.cpp:
3020         (WebCore::InspectorFrontendHost::copyText): Ditto.
3021
3022         * platform/Pasteboard.h: Removed generalPasteboard. Replaced isSelectionMode
3023         and setSelectionMode with createForGlobalSelection.
3024
3025         * platform/blackberry/PasteboardBlackBerry.cpp: Deleted generalPasteboard.
3026         * platform/efl/PasteboardEfl.cpp: Deleted generalPasteboard.
3027
3028         * platform/gtk/PasteboardGtk.cpp: Deleted selectionClipboard, primaryClipboard,
3029         generalPasteboard, isSelectionMode, and setSelectionMode.
3030         (WebCore::Pasteboard::createForGlobalSelection): Added.
3031         * platform/gtk/PasteboardHelper.cpp: Deleted m_usePrimarySelectionClipboard,
3032         getCurrentClipboard, and getClipboard.
3033         * platform/gtk/PasteboardHelper.h: Deleted the above, plus
3034         setUsePrimarySelectionClipboard and usePrimarySelectionClipboard.
3035
3036         * platform/ios/PasteboardIOS.mm: Deleted generalPasteboard.
3037         * platform/mac/PasteboardMac.mm: Deleted generalPasteboard.
3038
3039         * platform/qt/PasteboardQt.cpp: Deleted generalPasteboard, isSelectionMode,
3040         and setSelectionMode.
3041         (WebCore::Pasteboard::createForGlobalSelection): Added.
3042
3043         * platform/win/PasteboardWin.cpp: Deleted generalPasteboard.
3044
3045 2013-08-28  Antti Koivisto  <antti@apple.com>
3046
3047         Share attach loops between Elements and ShadowRoots
3048         https://bugs.webkit.org/show_bug.cgi?id=120414
3049
3050         Reviewed Andreas Kling.
3051
3052         * style/StyleResolveTree.cpp:
3053         (WebCore::Style::attachChildren):
3054         (WebCore::Style::attachShadowRoot):
3055         (WebCore::Style::detachChildren):
3056         (WebCore::Style::detachShadowRoot):
3057
3058 2013-08-28  Anders Carlsson  <andersca@apple.com>
3059
3060         Clean up XPathExpressionNode and XPath::Function
3061         https://bugs.webkit.org/show_bug.cgi?id=120411
3062
3063         Reviewed by Antti Koivisto.
3064
3065         Rename the subexpression and function argument getters to be more descriptive,
3066         remove the non-const overloads (they were never used) and change the getters to return
3067         references since they can never be null.
3068
3069         * xml/XPathExpressionNode.cpp:
3070         * xml/XPathExpressionNode.h:
3071         (WebCore::XPath::ParseNode::~ParseNode):
3072         (WebCore::XPath::Expression::addSubExpression):
3073         (WebCore::XPath::Expression::isContextNodeSensitive):
3074         (WebCore::XPath::Expression::setIsContextNodeSensitive):
3075         (WebCore::XPath::Expression::isContextPositionSensitive):
3076         (WebCore::XPath::Expression::setIsContextPositionSensitive):
3077         (WebCore::XPath::Expression::isContextSizeSensitive):
3078         (WebCore::XPath::Expression::setIsContextSizeSensitive):
3079         (WebCore::XPath::Expression::subExpressionCount):
3080         (WebCore::XPath::Expression::subExpression):
3081         * xml/XPathFunctions.cpp:
3082         (WebCore::XPath::Function::setArguments):
3083         (WebCore::XPath::FunId::evaluate):
3084         (WebCore::XPath::FunLocalName::evaluate):
3085         (WebCore::XPath::FunNamespaceURI::evaluate):
3086         (WebCore::XPath::FunName::evaluate):
3087         (WebCore::XPath::FunCount::evaluate):
3088         (WebCore::XPath::FunString::evaluate):
3089         (WebCore::XPath::FunConcat::evaluate):
3090         (WebCore::XPath::FunStartsWith::evaluate):
3091         (WebCore::XPath::FunContains::evaluate):
3092         (WebCore::XPath::FunSubstringBefore::evaluate):
3093         (WebCore::XPath::FunSubstringAfter::evaluate):
3094         (WebCore::XPath::FunSubstring::evaluate):
3095         (WebCore::XPath::FunStringLength::evaluate):
3096         (WebCore::XPath::FunNormalizeSpace::evaluate):
3097         (WebCore::XPath::FunTranslate::evaluate):
3098         (WebCore::XPath::FunBoolean::evaluate):
3099         (WebCore::XPath::FunNot::evaluate):
3100         (WebCore::XPath::FunLang::evaluate):
3101         (WebCore::XPath::FunNumber::evaluate):
3102         (WebCore::XPath::FunSum::evaluate):
3103         (WebCore::XPath::FunFloor::evaluate):
3104         (WebCore::XPath::FunCeiling::evaluate):
3105         (WebCore::XPath::FunRound::evaluate):
3106         * xml/XPathFunctions.h:
3107         (WebCore::XPath::Function::setName):
3108         (WebCore::XPath::Function::argumentCount):
3109         (WebCore::XPath::Function::argument):
3110         (WebCore::XPath::Function::name):
3111         * xml/XPathPredicate.cpp:
3112         (WebCore::XPath::Negative::evaluate):
3113         (WebCore::XPath::NumericOp::evaluate):
3114         (WebCore::XPath::EqTestOp::evaluate):
3115         (WebCore::XPath::LogicalOp::evaluate):
3116         (WebCore::XPath::Union::evaluate):
3117
3118 2013-08-28  Andreas Kling  <akling@apple.com>
3119
3120         Page::pluginData() should return a reference.
3121         <https://webkit.org/b/120386>
3122
3123         Reviewed by Darin Adler.
3124
3125         The PluginData is lazily constructed by pluginData(); it never returns null.
3126         A small number of null checks were harmed in the making of this patch.
3127
3128 2013-08-28  Andrei Parvu  <parvu@adobe.com>
3129
3130         <https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
3131
3132         Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.
3133
3134         Reviewed by Dirk Schulze.
3135
3136         Test cases added in LayoutTests/fast/masking/parsing-mask.html
3137
3138         * css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
3139         (WebCore::CSSParser::parseValue):
3140         * css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
3141         (WebCore::webkitMaskShorthand):
3142         (WebCore::matchingShorthandsForLonghand):
3143
3144 2013-08-28  Zan Dobersek  <zdobersek@igalia.com>
3145
3146         REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
3147         https://bugs.webkit.org/show_bug.cgi?id=120398
3148
3149         Reviewed by Anders Carlsson.
3150
3151         * bridge/c/c_class.cpp:
3152         (JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
3153         to return it after it's adopted by the new HashMap entry.
3154         (JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
3155         should be returned in this branch, matching the behavior before r154708.
3156
3157 2013-08-28  Antti Koivisto  <antti@apple.com>
3158
3159         Fix Qt no-libxml2 build.
3160         
3161         Not reviewed.
3162
3163         * xml/parser/XMLDocumentParserQt.cpp:
3164         (WebCore::XMLDocumentParser::parseCdata):
3165
3166 2013-08-28  Antti Koivisto  <antti@apple.com>
3167
3168         Don't use NodeRenderingContext when attaching text renderers
3169         https://bugs.webkit.org/show_bug.cgi?id=120402
3170
3171         Reviewed by Andreas Kling.
3172
3173         This patch moves various functions for creating text renderers from NodeRenderingContext and Text to StyleResolveTree.
3174         It also tightens the logic and combines some functions.
3175
3176         * dom/CharacterData.cpp:
3177         (WebCore::CharacterData::parserAppendData):
3178         (WebCore::CharacterData::setDataAndUpdate):
3179         * dom/ContainerNode.cpp:
3180         (WebCore::attachChild):
3181         (WebCore::detachChild):
3182         * dom/NodeRenderingContext.cpp:
3183         * dom/NodeRenderingContext.h:
3184         * dom/Text.cpp:
3185         (WebCore::Text::~Text):
3186         * dom/Text.h:
3187         * html/HTMLViewSourceDocument.cpp:
3188         (WebCore::HTMLViewSourceDocument::addText):
3189         * html/parser/HTMLConstructionSite.cpp:
3190         (WebCore::executeTask):
3191         * html/shadow/InsertionPoint.cpp:
3192         (WebCore::InsertionPoint::willAttachRenderers):
3193         (WebCore::InsertionPoint::willDetachRenderers):
3194         * style/StyleResolveTree.cpp:
3195         (WebCore::Style::isRendererReparented):
3196         (WebCore::Style::previousSiblingRenderer):
3197         (WebCore::Style::nextSiblingRenderer):
3198         
3199             From NodeRenderingContext::next/previousRenderer
3200
3201         (WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
3202         
3203             From Text::createTextRenderersForSiblingsAfterAttachIfNeeded()
3204
3205         (WebCore::Style::textRendererIsNeeded):
3206         
3207             From Text::textRendererIsNeeded
3208
3209         (WebCore::Style::createTextRendererIfNeeded):
3210         
3211             Combines code from Text::createTextRendererIfNeeded, NodeRenderingContext::createRendererForTextIfNeeded,
3212             NodeRenderingContext constructor and text node relevant code NodeRenderingContext::shouldCreateRenderer.
3213
3214         (WebCore::Style::attachTextRenderer):
3215         (WebCore::Style::detachTextRenderer):
3216         
3217             New functions of attaching text renderers. From Text::attach/detachText()
3218
3219         (WebCore::Style::updateTextRendererAfterContentChange):
3220         
3221             From Text::updateTextRenderer.
3222
3223         (WebCore::Style::attachShadowRoot):
3224         (WebCore::Style::attachChildren):
3225         (WebCore::Style::attachRenderTree):
3226         (WebCore::Style::detachShadowRoot):
3227         (WebCore::Style::detachChildren):
3228         (WebCore::Style::updateTextStyle):
3229         * style/StyleResolveTree.h:
3230         * xml/parser/XMLDocumentParser.cpp:
3231         (WebCore::XMLDocumentParser::exitText):
3232         * xml/parser/XMLDocumentParserLibxml2.cpp:
3233         (WebCore::XMLDocumentParser::cdataBlock):
3234
3235 2013-08-28  Antti Koivisto  <antti@apple.com>
3236
3237         Make descendant iterators always require ContainerNode root
3238         https://bugs.webkit.org/show_bug.cgi?id=120393
3239
3240         Reviewed by Andreas Kling.
3241
3242         Remove Node* root versions of the iterators. 
3243         Fix the few call sites that required them to have tighter typing.
3244
3245         * accessibility/AccessibilityNodeObject.cpp:
3246         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
3247         (WebCore::siblingWithAriaRole):
3248         * dom/ChildIterator.h:
3249         (WebCore::::ChildIteratorAdapter):
3250         (WebCore::::begin):
3251         (WebCore::::end):
3252         (WebCore::elementChildren):
3253         (WebCore::childrenOfType):
3254         * dom/DescendantIterator.h:
3255         (WebCore::::DescendantIterator):
3256         (WebCore::::DescendantIteratorAdapter):
3257         (WebCore::::begin):
3258         (WebCore::::end):
3259         (WebCore::elementDescendants):
3260         (WebCore::descendantsOfType):
3261         * editing/ApplyStyleCommand.cpp:
3262         (WebCore::dummySpanAncestorForNode):
3263         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
3264         (WebCore::ApplyStyleCommand::applyInlineStyle):
3265         * editing/ApplyStyleCommand.h:
3266
3267 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3268
3269         WorkerGlobalScopeWebDatabase requires ENABLE(WORKERS)
3270         https://bugs.webkit.org/show_bug.cgi?id=120395
3271
3272         Reviewed by Christophe Dumez.
3273
3274         WorkerGlobalScopeDatabase uses the WorkerGlobalScope object which is
3275         defined only when WORKERS are enabled. We should guard that code.
3276
3277         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp:
3278         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h:
3279         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl:
3280
3281 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3282
3283         [CSS Grid Layout] Fix grid position resolution
3284         https://bugs.webkit.org/show_bug.cgi?id=119801
3285
3286         Reviewed by Andreas Kling.
3287
3288         From Blink r148833, r148878, r150403 by <jchaffraix@chromium.org>
3289
3290         Both grid-{column|row}-end and negative positions were not
3291         properly handled in our grid position resolution code. We were
3292         using the same code to resolve all the grid positions without
3293         considering the edges of the grid.
3294
3295         Also refactored the grid size estimation in
3296         resolveGridPositionsFromStyle() so we can use it for the grid size
3297         estimation. The code no longer requires the grid to be filled at
3298         that moment as the specs changed to use the "explicit grid" which
3299         is independent of grid items (only depends on style).
3300
3301         Test: fast/css-grid-layout/grid-item-negative-position-resolution.html
3302
3303         * rendering/RenderGrid.cpp:
3304         (WebCore::RenderGrid::maximumIndexInDirection):
3305         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
3306         (WebCore::adjustGridPositionForSide):
3307         (WebCore::RenderGrid::resolveGridPositionFromStyle):
3308         * rendering/RenderGrid.h:
3309
3310 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3311
3312         [CSS Grid Layout] infinity should be defined as a negative value
3313         https://bugs.webkit.org/show_bug.cgi?id=107053
3314
3315         Reviewed by Andreas Kling.
3316
3317         From Blink r154805 by <jchaffraix@chromium.org>
3318
3319         Reject negative values for track-breadth at parse time as
3320         mentioned in the latest versions of the spec.
3321
3322         Added some extra checks to the existing tests.
3323
3324         * css/CSSParser.cpp:
3325         (WebCore::CSSParser::parseGridBreadth):
3326         * rendering/RenderGrid.cpp:
3327         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
3328
3329 2013-08-28  Sergio Villar Senin  <svillar@igalia.com>
3330
3331         [Soup] WebTiming information not shown in the inspector
3332         https://bugs.webkit.org/show_bug.cgi?id=118395
3333
3334         Reviewed by Martin Robinson.
3335
3336         WebTiming information was not correctly provided to WebCore
3337         because the gotHeadersCallback was incorrectly resetting the
3338         original ResourceResponse (which had the ResourceLoadTiming
3339         object) instead of simply updating their contents using the
3340         SoupMessage.
3341
3342         No new test required as this feature is already covered by the
3343         existing webtiming tests. In any case this change includes a fix
3344         for the http/tests/misc/webtiming-ssl.php test which was not
3345         failing even if it should because it was not correct.
3346
3347         * platform/network/soup/ResourceHandleSoup.cpp:
3348         (WebCore::gotHeadersCallback):
3349         (WebCore::restartedCallback): restartedCallback should be
3350         available only if WEB_TIMING is defined.
3351         (WebCore::createSoupMessageForHandleAndRequest): Ditto.
3352
3353 2013-08-26  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3354
3355         Scrolling allowed when overflow:hidden (seen on Acid2)
3356         https://bugs.webkit.org/show_bug.cgi?id=22769
3357
3358         Reviewed by Darin Adler.
3359
3360         Autoscroll, as well as other user-driven scroll actions,
3361         has to respect the scrollability styled into the web page.
3362         More specifically, if a html or body tags are styled with
3363         overflow:hidden, autoscroll should not scroll the containing document.
3364
3365         In order to fix this, patch hardens RenderBox::canAutoscroll as
3366         following: previously, ::canAutoscroll was relying solemnly in
3367         ::canBeScrolledAndHasScrollableArea to determine the scrollability
3368         of #document node, which was unconditionally returned as 'true'.
3369         Patch extends ::canAutoscroll to handle the #document case for
3370         main and inner frames, and now it asks through ::isScrollable if
3371         the corresponding document's FrameView is actually user-scrollable.
3372
3373         Note, that the patch change ::canAutoscroll to cover the non-mainFrame
3374         #document case, so the comment specific to Apple's Mail app can be omited
3375         now.
3376
3377         Test: fast/events/autoscroll-in-overflow-hidden-html.html
3378
3379         * rendering/RenderBox.cpp:
3380         (WebCore::RenderBox::canAutoscroll):
3381
3382 2013-08-27  Santosh Mahto  <santosh.ma@samsung.com>
3383
3384         Adding  "explicit" keyword in  forms related classes constructor
3385         https://bugs.webkit.org/show_bug.cgi?id=120366
3386
3387         Reviewed by Darin Adler.
3388
3389         Adding "explicit" keyword in constructors.
3390
3391         * html/BaseButtonInputType.h:
3392         (WebCore::BaseButtonInputType::BaseButtonInputType):
3393         * html/BaseCheckableInputType.h:
3394         (WebCore::BaseCheckableInputType::BaseCheckableInputType):
3395         * html/BaseChooserOnlyDateAndTimeInputType.h:
3396         (WebCore::BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType):
3397         * html/BaseClickableWithKeyInputType.h:
3398         (WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):
3399         * html/BaseTextInputType.h:
3400         (WebCore::BaseTextInputType::BaseTextInputType):
3401         * html/ColorInputType.h:
3402         (WebCore::ColorInputType::ColorInputType):
3403         * html/DateInputType.h:
3404         * html/DateTimeInputType.h:
3405         (WebCore::DateTimeInputType::DateTimeInputType):
3406         * html/DateTimeLocalInputType.h:
3407         (WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
3408         * html/EmailInputType.h:
3409         (WebCore::EmailInputType::EmailInputType):
3410         * html/FileInputType.h:
3411         * html/HiddenInputType.h:
3412         (WebCore::HiddenInputType::HiddenInputType):
3413         * html/ImageData.h:
3414         * html/ImageInputType.h:
3415         * html/InputType.h:
3416         (WebCore::InputType::InputType):
3417         * html/MediaController.h:
3418         * html/MonthInputType.h:
3419         (WebCore::MonthInputType::MonthInputType):
3420         * html/RadioInputType.h:
3421         (WebCore::RadioInputType::RadioInputType):
3422         * html/RangeInputType.h:
3423         * html/ResetInputType.h:
3424         (WebCore::ResetInputType::ResetInputType):
3425         * html/SearchInputType.h:
3426         * html/SubmitInputType.h:
3427         (WebCore::SubmitInputType::SubmitInputType):
3428         * html/TelephoneInputType.h:
3429         (WebCore::TelephoneInputType::TelephoneInputType):
3430         * html/TextFieldInputType.h:
3431         * html/TextInputType.h:
3432         (WebCore::TextInputType::TextInputType):
3433         * html/TimeInputType.h:
3434         * html/URLInputType.h:
3435         (WebCore::URLInputType::URLInputType):
3436         * html/ValidationMessage.h:
3437         * html/WeekInputType.h:
3438         (WebCore::WeekInputType::WeekInputType):
3439