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