c7c5be02e35693202514513eeba4e3a29d769827
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-19  Antti Koivisto  <antti@apple.com>
2
3         <https://webkit.org/b/120001> Clean up StyleElement
4
5         Reviewed by Andreas Kling.
6
7         - Make it non-virtual so we don't use virtual multiple inheritance
8         - Improve names
9         - Improve code clarity
10
11         * dom/StyleElement.cpp:
12         (WebCore::StyleElement::StyleElement):
13         (WebCore::StyleElement::insertedIntoDocument):
14         (WebCore::StyleElement::clearDocumentData):
15         (WebCore::StyleElement::childrenChanged):
16         (WebCore::StyleElement::finishParsingChildren):
17         (WebCore::StyleElement::createSheetFromTextContents):
18         (WebCore::isValidCSSContentType):
19         (WebCore::StyleElement::createSheet):
20         (WebCore::StyleElement::isLoading):
21         * dom/StyleElement.h:
22         (WebCore::StyleElement::setStyleSheetContentType):
23         (WebCore::StyleElement::setStyleSheetMedia):
24         * html/HTMLStyleElement.cpp:
25         (WebCore::HTMLStyleElement::parseAttribute):
26         * html/HTMLStyleElement.h:
27         * svg/SVGStyleElement.cpp:
28         (WebCore::SVGStyleElement::isSupportedAttribute):
29         (WebCore::SVGStyleElement::parseAttribute):
30         * svg/SVGStyleElement.h:
31
32 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
33
34         <https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*>
35
36         Reviewed by Darin Adler.
37
38         Clean up remained static_cast<SVGStopElement*> using toSVGStopElement(toSVGElement()).
39
40         * rendering/svg/SVGRenderTreeAsText.cpp:
41         (WebCore::writeSVGGradientStop):
42
43 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
44
45         <https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it
46
47         Reviewed by Andreas Kling.
48
49         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGAnimateElement*> also can be changed
50         with toSVGAnimateElement().
51
52         * svg/SVGAnimateElement.cpp:
53         (WebCore::SVGAnimateElement::calculateAnimatedValue):
54         * svg/SVGAnimateElement.h:
55         (WebCore::toSVGAnimateElement):
56         * svg/SVGAnimationElement.cpp:
57         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
58
59 2013-08-19  Andreas Kling  <akling@apple.com>
60
61         <https://webkit.org/b/119997> Page::progress() should return a reference.
62
63         Reviewed by Antti Koivisto.
64
65         Page::m_progress is never null.
66
67 2013-08-18  Darin Adler  <darin@apple.com>
68
69         <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
70
71         Reviewed by Sam Weinig.
72
73         * dom/Element.h: Deleted the ownerDocument function. For compilers that don't support
74         deleted functions, it is instead overrides the base class function with one that is
75         private and not defined, which accomplishes almost the same thing: An error, either
76         at compile time or link time.
77
78         * bindings/js/JSHTMLElementCustom.cpp:
79         (WebCore::JSHTMLElement::pushEventHandlerScope): Use document instead of ownerDocument.
80         * dom/Document.cpp:
81         (WebCore::Document::~Document): Added a comment about this clearly-incorrect code.
82         * inspector/InspectorInstrumentation.h:
83         (WebCore::InspectorInstrumentation::didPushShadowRoot): Use document instead of ownerDocument.
84         (WebCore::InspectorInstrumentation::willPopShadowRoot): Ditto.
85         * inspector/InspectorStyleSheet.cpp:
86         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
87         * plugins/PluginView.cpp:
88         (WebCore::getFrame): Removed ineffective call to ownerDocument after document when it
89         returns 0. It will never return anything other than 0 in that case.
90         * rendering/RenderVideo.cpp:
91         (WebCore::RenderVideo::calculateIntrinsicSize): Use document instead of ownerDocument.
92         Did not remove the null check at this time, although I'm pretty sure it's bogus. We can
93         fix that when/if we change the return type of Element::document to a reference.
94         * svg/SVGFEImageElement.cpp:
95         (WebCore::SVGFEImageElement::requestImageResource): Use document instead of ownerDocument.
96
97 2013-08-18  Darin Adler  <darin@apple.com>
98
99         <https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipboard class
100
101         Reviewed by Sam Weinig.
102
103         * GNUmakefile.list.am: Removed ClipboardGtk.cpp.
104         * PlatformEfl.cmake: Removed ClipboardEfl.cpp.
105         * PlatformGTK.cmake: Removed ClipboardGtk.cpp.
106         * PlatformWinCE.cmake: Removed ClipboardWin.cpp.
107         * Target.pri: Removed ClipboardQt.cpp.
108         * WebCore.vcxproj/WebCore.vcxproj: Removed ClipboardWin.cpp and ClipboardWin.h.
109         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed ClipboardWin.cpp and ClipboardWin.h.
110
111         * dom/Clipboard.cpp:
112         (WebCore::Clipboard::createDragImage): Added. Version that works for all platforms
113         other than Mac, identical to the old one used in GTK and Qt, and close to the one used
114         on Windows.
115
116         * platform/mac/ClipboardMac.mm: Trimmed includes down, and added a FIXME about next steps.
117
118         * platform/qt/DataTransferItemListQt.h: Removed "friend class ClipboardQt", which refers
119         to a now-nonexistent class.
120
121         * platform/efl/ClipboardEfl.cpp: Removed.
122         * platform/gtk/ClipboardGtk.cpp: Removed.
123         * platform/qt/ClipboardQt.cpp: Removed.
124         * platform/win/ClipboardWin.cpp: Removed.
125
126 2013-08-17  Darin Adler  <darin@apple.com>
127
128         <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts
129
130         Reviewed by Sam Weinig.
131
132         * dom/Clipboard.cpp:
133         (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
134         Initialize strings more efficiently. Put drag-specific data members inside an if statement.
135         Replace m_clipboardType with m_forDrag.
136         (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
137         Removed explicit clipboard type since constructor now defaults to copy and paste style.
138         (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
139         (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
140         (WebCore::Clipboard::setData): Ditto.
141         (WebCore::Clipboard::files): Ditto.
142         (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
143         be used when !ENABLE(DRAG_SUPPORT).
144         (WebCore::Clipboard::setDropEffect): Ditto.
145         (WebCore::Clipboard::effectAllowed): Ditto.
146         (WebCore::Clipboard::setEffectAllowed): Ditto.
147         (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
148         to this, and kep the overload that does not as well. Made the DragData argument a const&.
149         (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
150         (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
151         calling a dragStarted function.
152         (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
153         (WebCore::IEOpFromDragOp): Ditto.
154         (WebCore::Clipboard::sourceOperation): Ditto.
155         (WebCore::Clipboard::destinationOperation): Ditto.
156         (WebCore::Clipboard::setSourceOperation): Ditto.
157         (WebCore::Clipboard::setDestinationOperation): Ditto.
158
159         * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
160         class declarations as required. Removed non-helpful comment. Made ClipboardType a private
161         implementation detail. Moved functions that are not part of the DOM API down to a separate
162         section lower down in the class, and sorted the functions to match the order they appear
163         in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
164         effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
165         implementation since it's an implementation detail. Since this class is no longer polymorphic,
166         use only private, not protected. Make m_dragImageElement an Element, not a Node.
167
168         * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
169         these string properties can never return null strings anyway.
170
171         * page/DragController.cpp:
172         (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
173         (WebCore::DragController::performDrag): Ditto.
174         (WebCore::DragController::tryDHTMLDrag): Ditto.
175
176         * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
177         longer includes it.
178
179 2013-08-18  David Kilzer  <ddkilzer@apple.com>
180
181         WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
182         <http://webkit.org/b/119932>
183         <rdar://problem/14764085>
184
185         Reviewed by Darin Adler.
186
187         Add pragma statements to ignore -Wdeprecated-register warnings
188         in generated code.  Also ignore -Wunknown-pragmas so this
189         doesn't cause a build failure in older versions of clang.
190
191         * css/makeprop.pl:
192         (WebCore::findProperty): Remove register hints from parameters.
193         * css/makevalues.pl:
194         (WebCore::findValue): Ditto.
195         * platform/ColorData.gperf:
196         (WebCore::findColor): Ditto.
197
198 2013-08-18  Antti Koivisto  <antti@apple.com>
199
200         <https://webkit.org/b/119987> Make Element::attach standalone function
201
202         Reviewed by Andreas Kling.
203
204         This patch turns Element::attach() and the related functions into standalone functions.
205
206         * dom/ContainerNode.cpp:
207         (WebCore::attachChild):
208         (WebCore::detachChild):
209         * dom/ContainerNode.h:
210         * dom/Document.cpp:
211         (WebCore::Document::attach):
212         (WebCore::Document::detach):
213         * dom/Element.cpp:
214         (WebCore::Element::~Element):
215         (WebCore::Element::lazyReattach):
216         (WebCore::Element::removeShadowRoot):
217         
218             Shadow root should be detached by now. Remove the detach call.
219
220         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
221         (WebCore::Element::updatePseudoElement):
222         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
223         (WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
224         
225             Factor some parts of former Element::attach/detach() into member functions.
226
227         * dom/Element.h:
228         * dom/ElementRareData.h:
229         (WebCore::ElementRareData::releasePseudoElement):
230         * dom/NodeRenderingContext.cpp:
231         (WebCore::NodeRenderingContext::NodeRenderingContext):
232         * dom/NodeRenderingContext.h:
233         * dom/ShadowRoot.cpp:
234         * dom/ShadowRoot.h:
235         * html/HTMLDetailsElement.cpp:
236         (WebCore::HTMLDetailsElement::parseAttribute):
237         * html/HTMLInputElement.cpp:
238         (WebCore::HTMLInputElement::updateType):
239         (WebCore::HTMLInputElement::parseAttribute):
240         * html/HTMLObjectElement.cpp:
241         (WebCore::HTMLObjectElement::renderFallbackContent):
242         * html/HTMLPlugInImageElement.cpp:
243         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
244         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
245         * html/HTMLSelectElement.cpp:
246         (WebCore::HTMLSelectElement::parseAttribute):
247         (WebCore::HTMLSelectElement::parseMultipleAttribute):
248         * html/HTMLViewSourceDocument.cpp:
249         (WebCore::HTMLViewSourceDocument::createContainingTable):
250         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
251         (WebCore::HTMLViewSourceDocument::addLine):
252         (WebCore::HTMLViewSourceDocument::finishLine):
253         (WebCore::HTMLViewSourceDocument::addBase):
254         (WebCore::HTMLViewSourceDocument::addLink):
255         * html/parser/HTMLConstructionSite.cpp:
256         (WebCore::executeTask):
257         * html/parser/HTMLTreeBuilder.cpp:
258         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
259         * html/shadow/InsertionPoint.cpp:
260         (WebCore::InsertionPoint::willAttachRenderers):
261         (WebCore::InsertionPoint::willDetachRenderers):
262         * loader/PlaceholderDocument.cpp:
263         (WebCore::PlaceholderDocument::attach):
264         * style/StyleResolveTree.cpp:
265         (WebCore::Style::createRendererIfNeeded):
266         
267             From Element::createRendererIfNeeded()
268
269         (WebCore::Style::attachShadowRoot):
270         
271             From ShadowRoot::attach()
272
273         (WebCore::Style::childAttachedAllowedWhenAttachingChildren):
274         (WebCore::Style::attachChildren):
275         
276             From Element::attachChildren()
277
278         (WebCore::Style::attachRenderTree):
279         
280             From Element::attach()
281
282         (WebCore::Style::detachShadowRoot):
283         
284             From ShadowRoot::detach()
285
286         (WebCore::Style::detachChildren):
287         
288             From Element::detachChildren()
289
290         (WebCore::Style::detachRenderTree):
291         
292             From Element::deatach()
293
294         (WebCore::Style::reattachRenderTree):
295         
296              From Element::reattach()
297
298         (WebCore::Style::resolveLocal):
299         * style/StyleResolveTree.h:
300         (WebCore::Style::AttachContext::AttachContext):
301         
302             From Element::AttachContext
303
304         * svg/SVGTests.cpp:
305         (WebCore::SVGTests::handleAttributeChange):
306         * xml/XMLErrors.cpp:
307         (WebCore::XMLErrors::insertErrorMessageBlock):
308         * xml/parser/XMLDocumentParserLibxml2.cpp:
309         (WebCore::XMLDocumentParser::startElementNs):
310
311 2013-08-18  Antti Koivisto  <antti@apple.com>
312
313         Fix crashing plugin tests caused by a logic error in the previous patch.
314         
315         Not reviewed.
316
317         * html/HTMLPlugInImageElement.cpp:
318         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
319
320 2013-08-18  Antti Koivisto  <antti@apple.com>
321
322         <https://webkit.org/b/119982> Make Element::attach non-virtual
323
324         Reviewed by Andreas Kling.
325
326         This will give us more future refactoring options.
327
328         * dom/Element.cpp:
329         (WebCore::Element::attach):
330         (WebCore::Element::detach):
331         
332             Make non-virtual. Call element type specific custom functions as needed.
333
334         (WebCore::Element::styleForRenderer):
335         (WebCore::Element::willRecalcStyle):
336         (WebCore::Element::didRecalcStyle):
337         (WebCore::Element::willAttachRenderers):
338         (WebCore::Element::didAttachRenderers):
339         (WebCore::Element::willDetachRenderers):
340         (WebCore::Element::didDetachRenderers):
341         
342             Add virtual custom callbacks.
343
344         (WebCore::Element::customStyleForRenderer):
345         * dom/Element.h:
346         * dom/Node.h:
347         (WebCore::Node::pseudoId):
348         (WebCore::Node::hasCustomStyleResolveCallbacks):
349         (WebCore::Node::setHasCustomStyleResolveCallbacks):
350         
351             Use the existing bit as it largely overlaps. Rename for clarity.
352
353         (WebCore::Node::customPseudoId):
354         * dom/PseudoElement.cpp:
355         (WebCore::PseudoElement::PseudoElement):
356         (WebCore::PseudoElement::didAttachRenderers):
357         * dom/PseudoElement.h:
358         * html/HTMLCanvasElement.cpp:
359         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
360         (WebCore::HTMLCanvasElement::willAttachRenderers):
361         * html/HTMLCanvasElement.h:
362         * html/HTMLFormControlElement.cpp:
363         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
364         (WebCore::HTMLFormControlElement::didAttachRenderers):
365         * html/HTMLFormControlElement.h:
366         * html/HTMLFrameElement.cpp:
367         (WebCore::HTMLFrameElement::HTMLFrameElement):
368         (WebCore::HTMLFrameElement::didAttachRenderers):
369         * html/HTMLFrameElement.h:
370         * html/HTMLFrameElementBase.cpp:
371         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
372         (WebCore::HTMLFrameElementBase::didAttachRenderers):
373         * html/HTMLFrameElementBase.h:
374         * html/HTMLFrameSetElement.cpp:
375         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
376         (WebCore::HTMLFrameSetElement::willAttachRenderers):
377         * html/HTMLFrameSetElement.h:
378         * html/HTMLIFrameElement.cpp:
379         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
380         * html/HTMLImageElement.cpp:
381         (WebCore::HTMLImageElement::HTMLImageElement):
382         (WebCore::HTMLImageElement::didAttachRenderers):
383         * html/HTMLImageElement.h:
384         * html/HTMLInputElement.cpp:
385         (WebCore::HTMLInputElement::HTMLInputElement):
386         (WebCore::HTMLInputElement::willAttachRenderers):
387         (WebCore::HTMLInputElement::didAttachRenderers):
388         (WebCore::HTMLInputElement::didDetachRenderers):
389         * html/HTMLInputElement.h:
390         * html/HTMLLIElement.cpp:
391         (WebCore::HTMLLIElement::HTMLLIElement):
392         (WebCore::HTMLLIElement::didAttachRenderers):
393         * html/HTMLLIElement.h:
394         * html/HTMLMediaElement.cpp:
395         (WebCore::HTMLMediaElement::HTMLMediaElement):
396         (WebCore::HTMLMediaElement::willAttachRenderers):
397         (WebCore::HTMLMediaElement::didAttachRenderers):
398         * html/HTMLMediaElement.h:
399         * html/HTMLOptGroupElement.cpp:
400         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
401         (WebCore::HTMLOptGroupElement::didAttachRenderers):
402         (WebCore::HTMLOptGroupElement::willDetachRenderers):
403         * html/HTMLOptGroupElement.h:
404         * html/HTMLOptionElement.cpp:
405         (WebCore::HTMLOptionElement::HTMLOptionElement):
406         (WebCore::HTMLOptionElement::didAttachRenderers):
407         (WebCore::HTMLOptionElement::willDetachRenderers):
408         * html/HTMLOptionElement.h:
409         * html/HTMLPlugInElement.cpp:
410         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
411         (WebCore::HTMLPlugInElement::willDetachRenderers):
412         * html/HTMLPlugInElement.h:
413         * html/HTMLPlugInImageElement.cpp:
414         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
415         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
416         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
417         * html/HTMLPlugInImageElement.h:
418         * html/HTMLProgressElement.cpp:
419         (WebCore::HTMLProgressElement::HTMLProgressElement):
420         (WebCore::HTMLProgressElement::didAttachRenderers):
421         * html/HTMLProgressElement.h:
422         * html/HTMLTextAreaElement.cpp:
423         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
424         (WebCore::HTMLTextAreaElement::didAttachRenderers):
425         * html/HTMLTextAreaElement.h:
426         * html/HTMLVideoElement.cpp:
427         (WebCore::HTMLVideoElement::HTMLVideoElement):
428         (WebCore::HTMLVideoElement::didAttachRenderers):
429         * html/HTMLVideoElement.h:
430         * html/shadow/InsertionPoint.cpp:
431         (WebCore::InsertionPoint::InsertionPoint):
432         (WebCore::InsertionPoint::willAttachRenderers):
433         (WebCore::InsertionPoint::willDetachRenderers):
434         * html/shadow/InsertionPoint.h:
435         * html/shadow/SliderThumbElement.cpp:
436         (WebCore::SliderThumbElement::SliderThumbElement):
437         (WebCore::SliderThumbElement::willDetachRenderers):
438         * html/shadow/SliderThumbElement.h:
439         * html/shadow/SpinButtonElement.cpp:
440         (WebCore::SpinButtonElement::SpinButtonElement):
441         (WebCore::SpinButtonElement::willDetachRenderers):
442         * html/shadow/SpinButtonElement.h:
443         * html/shadow/TextControlInnerElements.cpp:
444         (WebCore::TextControlInnerElement::TextControlInnerElement):
445         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
446         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
447         (WebCore::SearchFieldCancelButtonElement::willDetachRenderers):
448         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
449         (WebCore::InputFieldSpeechButtonElement::willAttachRenderers):
450         (WebCore::InputFieldSpeechButtonElement::willDetachRenderers):
451         * html/shadow/TextControlInnerElements.h:
452         * style/StyleResolveTree.cpp:
453         (WebCore::Style::resolveTree):
454         * svg/SVGElement.cpp:
455         (WebCore::SVGElement::SVGElement):
456         * svg/SVGImageElement.cpp:
457         (WebCore::SVGImageElement::SVGImageElement):
458         (WebCore::SVGImageElement::didAttachRenderers):
459         * svg/SVGImageElement.h:
460         * svg/SVGUseElement.cpp:
461         (WebCore::SVGUseElement::SVGUseElement):
462
463 2013-08-18  Gavin Barraclough  <barraclough@apple.com>
464
465         https://bugs.webkit.org/show_bug.cgi?id=119972
466         Add attributes field to PropertySlot
467
468         Reviewed by Geoff Garen.
469
470         For all JSC types, this makes getOwnPropertyDescriptor redundant.
471         There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
472         (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
473
474         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
475         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
476         * bindings/js/JSDOMWindowCustom.cpp:
477         (WebCore::JSDOMWindow::getOwnPropertySlot):
478         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
479         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
480         * bindings/js/JSHistoryCustom.cpp:
481         (WebCore::JSHistory::getOwnPropertySlotDelegate):
482         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
483         * bindings/js/JSLocationCustom.cpp:
484         (WebCore::JSLocation::getOwnPropertySlotDelegate):
485         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
486         * bindings/js/JSPluginElementFunctions.cpp:
487         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
488         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
489         * bindings/scripts/CodeGeneratorJS.pm:
490         (GenerateGetOwnPropertySlotBody):
491         (GenerateGetOwnPropertyDescriptorBody):
492         (GenerateImplementation):
493         * bridge/runtime_array.cpp:
494         (JSC::RuntimeArray::getOwnPropertySlot):
495         (JSC::RuntimeArray::getOwnPropertyDescriptor):
496         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
497         * bridge/runtime_method.cpp:
498         (JSC::RuntimeMethod::getOwnPropertySlot):
499         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
500         * bridge/runtime_object.cpp:
501         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
502         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
503             - Pass attributes to PropertySlot::set* methods.
504
505 2013-08-18  Ryosuke Niwa  <rniwa@webkit.org>
506
507         <https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce extra new lines
508
509         Reviewed by Darin Adler.
510
511         Inspired by https://chromium.googlesource.com/chromium/blink/+/6152a12f7ace27beea4d284ff8416631e8aa5217.
512
513         The bug was caused by createFragmentFromText's falsely assuming that the newline were not preserved
514         if the first node's renderer didn't exist.
515
516         Fixed the bug by obtaining the renderer of the container of the first visible position in the context.
517
518         Test: editing/pasteboard/paste-into-textarea-with-new-line.html
519
520         * editing/markup.cpp:
521         (WebCore::contextPreservesNewline):
522         (WebCore::createFragmentFromText):
523
524 2013-08-18  Andreas Kling  <akling@apple.com>
525
526         <https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.
527
528         Reviewed by Antti Koivisto.
529
530         * html/HTMLLinkElement.cpp:
531         (WebCore::HTMLLinkElement::setCSSStyleSheet):
532
533 2013-08-18  Andreas Kling  <akling@apple.com>
534
535         <https://webkit.org/b/119981> Move ElementData & co to their own files.
536
537         Reviewed by Antti Koivisto.
538
539         I like to move it move it.
540
541 2013-08-18  David Kilzer  <ddkilzer@apple.com>
542
543         BUILD FIX (r153990): Add UNUSED_PARAM for heightChanged when CSS_SHAPES is disabled
544
545         Fixes the following build failure:
546
547             WebCore/rendering/RenderBlock.cpp:1529:53: error: unused parameter 'heightChanged' [-Werror,-Wunused-parameter]
548             void RenderBlock::updateShapesAfterBlockLayout(bool heightChanged)
549                                                                 ^
550             1 error generated.
551
552         * rendering/RenderBlock.cpp:
553         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Add
554         UNUSED_PARAM(heightChanged) when CSS_SHAPES is disabled.
555
556 2013-08-18  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
557
558         [EFL] minor method name fix for the textTrackOffMenuItemText method
559         https://bugs.webkit.org/show_bug.cgi?id=119978
560
561         the method textTrackOffMenuItemText was renamed in
562         https://bugs.webkit.org/show_bug.cgi?id=113822
563
564         Reviewed by Christophe Dumez.
565
566         * platform/efl/LocalizedStringsEfl.cpp:
567         (WebCore::textTrackOffMenuItemText):
568
569 2013-08-17  Antti Koivisto  <antti@apple.com>
570
571         <https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleElement
572
573         Reviewed by Andreas Kling.
574
575         * dom/StyleElement.cpp:
576         (WebCore::StyleElement::process):
577         
578             Use TextNodeTraversal::contentsAsString for the sheet text. The overflow check is removed as StringBuilder 
579             (which is used by contentsAsString) does that itself. The behavior in case of overflow changes from empty
580             sheet to CRASH(). Thats what we do elsewhere in similar situations too (scripts for example). Continuing
581             with > 4GB of style sheet text nodes is probably not going to go well anyway.
582
583 2013-08-17  Antti Koivisto  <antti@apple.com>
584
585         <https://webkit.org/b/119960> Remove some optimizations made obsolete by use of StringBuilder
586
587         Reviewed by Andreas Kling.
588
589         * dom/ScriptElement.cpp:
590         (WebCore::ScriptElement::scriptContent):
591         
592             StringBuilder already optimizes for the single string case. If there is only one the original string is returned.
593
594         * dom/Text.cpp:
595         (WebCore::Text::wholeText):
596         
597             No need to traverse twice to compute the capacity. StringBuilder handles this efficiently. 
598             Also in the common case there is only one string and the optimization here is actually hurting by disabling the StringBuilder one.
599
600 2013-08-17  Antti Koivisto  <antti@apple.com>
601
602         <https://webkit.org/b/119959> Add TextNodeTraversal
603
604         Reviewed by Andreas Kling.
605
606         Add TextNodeTraversal for cleaner and more compact traversal of Text nodes.
607         
608         Use it where appropriate.
609
610         * WebCore.xcodeproj/project.pbxproj:
611         * dom/Attr.cpp:
612         (WebCore::Attr::childrenChanged):
613         * dom/NodeTraversal.h:
614         (WebCore::NodeTraversal::next):
615         * dom/ScriptElement.cpp:
616         (WebCore::ScriptElement::scriptContent):
617         * dom/Text.cpp:
618         (WebCore::Text::wholeText):
619         * dom/Text.h:
620         (WebCore::toText):
621         * dom/TextNodeTraversal.cpp: Added.
622         (WebCore::TextNodeTraversal::appendContents):
623         (WebCore::TextNodeTraversal::contentsAsString):
624         
625             Helpers for getting text content of a subtree.
626
627         * dom/TextNodeTraversal.h: Added.
628         (WebCore::TextNodeTraversal::firstTextChildTemplate):
629         (WebCore::TextNodeTraversal::firstChild):
630         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
631         (WebCore::TextNodeTraversal::firstWithin):
632         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
633         (WebCore::TextNodeTraversal::next):
634         (WebCore::TextNodeTraversal::nextSibling):
635         * editing/ApplyStyleCommand.cpp:
636         (WebCore::ApplyStyleCommand::joinChildTextNodes):
637         * html/HTMLTextAreaElement.cpp:
638         (WebCore::HTMLTextAreaElement::defaultValue):
639         (WebCore::HTMLTextAreaElement::setDefaultValue):
640         * html/HTMLTitleElement.cpp:
641         (WebCore::HTMLTitleElement::text):
642         * html/track/TextTrackCue.cpp:
643         (WebCore::TextTrackCue::determineTextDirection):
644         * page/Frame.cpp:
645         (WebCore::Frame::searchForLabelsAboveCell):
646         * xml/XPathUtil.cpp:
647         (WebCore::XPath::stringValue):
648
649 2013-08-17  Andreas Kling  <akling@apple.com>
650
651         <https://webkit.org/b/119957> Page::contextMenuController() should return a reference.
652
653         Reviewed by Antti Koivisto.
654
655         Page::m_contextMenuController is never null.
656
657         * page/Page.h:
658         (WebCore::Page::contextMenuController):
659
660 2013-08-17  Andreas Kling  <akling@apple.com>
661
662         <https://webkit.org/b/119954> Page::dragCaretController() should return a reference.
663
664         Reviewed by Antti Koivisto.
665
666         Page::m_dragCaretController is never null.
667
668         * dom/Document.cpp:
669         (WebCore::Document::nodeChildrenWillBeRemoved):
670         (WebCore::Document::nodeWillBeRemoved):
671         * page/DragController.cpp:
672         (WebCore::DragController::cancelDrag):
673         (WebCore::DragController::dragEnded):
674         (WebCore::DragController::tryDocumentDrag):
675         (WebCore::DragController::dispatchTextInputEventFor):
676         (WebCore::DragController::concludeEditDrag):
677         (WebCore::DragController::placeDragCaret):
678         * page/Page.h:
679         (WebCore::Page::dragCaretController):
680         * rendering/RenderBlock.cpp:
681         (WebCore::RenderBlock::paintCaret):
682
683 2013-08-17  Andreas Kling  <akling@apple.com>
684
685         <https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame.
686
687         Reviewed by Antti Koivisto.
688
689         Remove Editor's inheritance from FrameDestructionObserver. Editor is owned by Frame and
690         has no interest in observing frame destruction since its own destruction will soon follow.
691
692         Editor::m_frame is now a reference instead of a pointer. Removed some null checking.
693
694 2013-08-17  Andreas Kling  <akling@apple.com>
695
696         <https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback.
697
698         Reviewed by Antti Koivisto.
699
700         This callback was only used by the Chromium port.
701
702         * editing/Editor.h:
703         * editing/Editor.cpp:
704
705             Remove override of FrameDestructionObserver::willDetachPage().
706
707         * page/EditorClient.h:
708
709             Remove frameWillDetachPage(). This is repeated in every EditorClient subclass.
710
711 2013-08-16  Antti Koivisto  <antti@apple.com>
712
713         <https://webkit.org/b/119886> PseudoElement is abusing parent node pointer
714
715         Reviewed by Darin Adler.
716
717         PseudoElement sets its host node as its parent. This is confusing and wrong as it breaks
718         the basic tree consistency (a node is a child node of its parent node).
719         
720         This patch adds an explicit host pointer PseudoElement and switches the call sites over. Memory
721         impact is negligible as there are not that many ::befores and ::afters.
722
723         * dom/ComposedShadowTreeWalker.cpp:
724         (WebCore::ComposedShadowTreeWalker::traverseParent):
725         * dom/EventPathWalker.cpp:
726         (WebCore::EventPathWalker::moveToParent):
727         * dom/EventRetargeter.h:
728         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
729         * dom/Node.cpp:
730         (WebCore::Node::~Node):
731         
732             Add consistency assertions. Remove unnecessary clearing of sibling pointers. They should be cleared already.
733
734         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
735         * dom/PseudoElement.cpp:
736         (WebCore::PseudoElement::PseudoElement):
737         (WebCore::PseudoElement::customStyleForRenderer):
738         * dom/PseudoElement.h:
739         (WebCore::toPseudoElement):
740         
741             Add casting functions.
742
743         * inspector/InspectorLayerTreeAgent.cpp:
744         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
745         * rendering/HitTestResult.cpp:
746         (WebCore::HitTestResult::setInnerNode):
747         (WebCore::HitTestResult::setInnerNonSharedNode):
748
749 2013-08-17  Darin Adler  <darin@apple.com>
750
751         <https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard
752
753         Reviewed by Andreas Kling.
754
755         * dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
756         All three are just unneeded forwarding to pasteboard.
757         * dom/Clipboard.h: Ditto.
758
759         * page/DragController.cpp:
760         (WebCore::DragController::startDrag): Move the logic in here. Later we might
761         want to straighten this out a bit, perhaps using functions in Editor, but it's
762         not much code so fine to just have it here for now.
763
764 2013-08-17  Darin Adler  <darin@apple.com>
765
766         <https://webkit.org/b/119947> Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
767
768         Reviewed by Andreas Kling.
769
770         * dom/Clipboard.cpp:
771         (WebCore::Clipboard::Clipboard):
772         (WebCore::Clipboard::~Clipboard):
773         * dom/Clipboard.h:
774         Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS, LEGACY_VIRTUAL, and LEGACY_PURE.
775         Keep only the !USE(LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS) side of all conditionals.
776
777 2013-08-17  Darin Adler  <darin@apple.com>
778
779         <https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard to EventHandler
780
781         Reviewed by Andreas Kling.
782
783         Later it would be good to move this all to DragController, but there is no reason to have
784         these functions as member functions of the DOM-exposed Clipboard class.
785
786         * dom/Clipboard.cpp: Deleted hasFileOfType, hasStringOfType, convertDropZoneOperationToDragOperation,
787         convertDragOperationToDropZoneOperation.
788         * dom/Clipboard.h: Ditto.
789
790         * page/EventHandler.cpp:
791         (WebCore::convertDropZoneOperationToDragOperation): Moved here.
792         (WebCore::convertDragOperationToDropZoneOperation): Moved here. Also changed to use ASCIILiteral.
793         (WebCore::hasFileOfType): Moved here and made a free function instead of a member function. Removed
794         canReadTypes check because Clipboard::files already takes care of that.
795         (WebCore::hasStringOfType): Moved here and made a free function instead of a member function.
796         Added a check for the null string because HashSet::contains will not work on a null string.
797         (WebCore::hasDropZoneType): Moved here and made a free function instead of a member function.
798         (WebCore::findDropZone): Call the hasDropZoneType function instead of Clipboard::hasDropZoneType.
799
800 2013-08-17  Darin Adler  <darin@apple.com>
801
802         <https://webkit.org/b/119943> Clean up the Document class a bit
803
804         Reviewed by Antti Koivisto.
805
806         * dom/Document.cpp:
807         (WebCore::Document::~Document): Fixed typo in comment.
808         (WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
809         Also name local variable just loader rather than documentLoader.
810         (WebCore::Document::updateTitle): Call loader rather than going indirectly
811         through frame to get to the loader.
812         (WebCore::Document::setTitleElement): Fixed formatting (add braces).
813         (WebCore::Document::removeTitle): Iterate elements instead of nodes.
814         (WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
815         styleForPage to avoid the need for a simple forwarding function. Also
816         eliminated local variable to increase clarity.
817         (WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
818         to call styleForPage to avoid the need for a simple forwarding function.
819         (WebCore::Document::setIsViewSource): Renamed a local variable.
820
821         * dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
822         styleForPage functions.
823
824         * loader/FrameLoader.cpp: Removed unnneeded setTitle function.
825         * loader/FrameLoader.h: Ditto.
826
827         * page/PrintContext.cpp:
828         (WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
829         styleForPage to avoid the need for a simple forwarding function.
830
831 2013-08-17  Darin Adler  <darin@apple.com>
832
833         <https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code
834
835         Reviewed by Andreas Kling.
836
837         * PlatformWinCE.cmake: Removed EditorWin.cpp.
838         * WebCore.vcxproj/WebCore.vcxproj: Removed EditorWin.cpp.
839         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed EditorWin.cpp.
840         * WebCore.xcodeproj/project.pbxproj: Removed ClipboardIOS.h and
841         ClipboardIOS.mm, and also let Xcode edit/reorder this file.
842
843         * editing/Editor.cpp:
844         (WebCore::Editor::dispatchCPPEvent): Removed some LEGACY_STYLE_ABSTRACT_CLIPBOARD
845         class code. Will remove the rest later.
846
847         * editing/Editor.h: Removed declaration of newGeneralClipboard.
848
849         * platform/Pasteboard.h: Removed declaration of writeClipboard. Also updated a
850         comment to make it clearer.
851
852         * platform/blackberry/PasteboardBlackBerry.cpp: Removed Pasteboard::writeClipboard.
853         * platform/efl/PasteboardEfl.cpp: Ditto.
854         * platform/ios/PasteboardIOS.mm: Ditto.
855         * platform/win/PasteboardWin.cpp: Ditto.
856
857         * platform/ios/ClipboardIOS.h: Removed. Was an empty file.
858         * platform/ios/ClipboardIOS.mm: Removed. Was an empty file.
859         * platform/win/EditorWin.cpp: Removed. Had only newGeneralClipboard in the file,
860         a function that is never called.
861
862 2013-08-17  Darin Adler  <darin@apple.com>
863
864         <https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation
865
866         Reviewed by Andreas Kling.
867
868         * dom/Clipboard.h: Removed unused dragLocation member function.
869         Renamed m_dragLoc to m_dragLocation.
870
871         * dom/Clipboard.cpp:
872         (WebCore::Clipboard::setDragImage):
873         * platform/gtk/ClipboardGtk.cpp:
874         (WebCore::Clipboard::createDragImage):
875         * platform/mac/ClipboardMac.mm:
876         (WebCore::Clipboard::createDragImage):
877         * platform/qt/ClipboardQt.cpp:
878         (WebCore::Clipboard::createDragImage):
879         * platform/win/ClipboardWin.cpp:
880         (WebCore::Clipboard::createDragImage):
881         Updated for new name.
882
883 2013-08-17  Darin Adler  <darin@apple.com>
884
885         <https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument
886
887         Reviewed by Andreas Kling.
888
889         The Element::document is a simpler faster alternative to Element::ownerDocument.
890         The only behavior difference between the two is that ownerDocument returns 0 when
891         called on a Document.
892
893         * html/HTMLMediaElement.cpp:
894         (WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
895         (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
896         document and call to ownerDocument, since ownerDocument will never return non-null
897         if document returns null.
898         (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
899         of ownerDocument.
900
901         * inspector/DOMEditor.cpp:
902         (WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.
903
904         * inspector/InspectorCSSAgent.cpp:
905         (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
906         (WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
907         (WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.
908
909         * inspector/InspectorDOMAgent.cpp:
910         (WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
911         does the same thing in a roundabout way.
912         (WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
913         (WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
914         does the same thing in a roundabout way.
915
916         * page/DragController.cpp:
917         (WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.
918
919         * svg/SVGElementInstance.cpp:
920         (WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.
921
922 2013-08-17  Darin Adler  <darin@apple.com>
923
924         <https://webkit.org/b/119941> Make Page::dragController return a reference
925
926         Reviewed by Andreas Kling.
927
928         * page/Page.h:
929         (WebCore::Page::dragController): Return a reference instead of a pointer.
930
931         * page/DragController.cpp:
932         (WebCore::DragController::concludeEditDrag):
933         * page/EventHandler.cpp:
934         (WebCore::EventHandler::eventMayStartDrag):
935         (WebCore::EventHandler::updateDragSourceActionsAllowed):
936         (WebCore::EventHandler::handleDrag):
937         * page/mac/EventHandlerMac.mm:
938         (WebCore::EventHandler::passSubframeEventToSubframe):
939         Updated call sites.
940
941 2013-08-17  Morten Stenshorne  <mstensho@opera.com>
942
943         <https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread
944
945         Reviewed by Darin Adler.
946
947         Since the flow thread is a direct child of RenderView, it doesn't inherit
948         proper writing-mode automatically. It should be mentioned that if the thread's
949         contents' writing-mode differs from that of the first region, things are
950         typically going to look useless (although perhaps that's how it should be),
951         but as long as writing-mode is only specified on a common parent of the
952         thread's contents and the regions, things look fine, and also, we're now
953         following what the spec has to say on the matter:
954
955         http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-flow-into-property
956
957             "The first region defines the principal writing mode for the entire flow.
958              The writing mode on subsequent regions is ignored."
959
960         This is a back-port of the fix for Blink bug 257965.
961         Reviewed by esprehn and mihnea there.
962         Blink review URL: https://chromiumcodereview.appspot.com/18374008
963
964         Tests: fast/regions/changing-writing-mode-2.html
965                fast/regions/changing-writing-mode-3.html
966                fast/regions/changing-writing-mode-4.html
967                fast/regions/changing-writing-mode-5.html
968                fast/regions/changing-writing-mode.html
969                fast/regions/invalid-first-region-with-writing-mode-2.html
970                fast/regions/invalid-first-region-with-writing-mode.html
971                fast/regions/subtree-with-horiz-bt.html
972                fast/regions/subtree-with-horiz-tb.html
973                fast/regions/subtree-with-vert-lr.html
974                fast/regions/subtree-with-vert-rl.html
975
976         * rendering/RenderFlowThread.cpp:
977         (WebCore::RenderFlowThread::styleDidChange):
978         * rendering/RenderFlowThread.h:
979         * rendering/RenderNamedFlowThread.cpp:
980         (WebCore::RenderNamedFlowThread::updateWritingMode):
981         (WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread):
982         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
983         (WebCore::RenderNamedFlowThread::regionChangedWritingMode):
984         * rendering/RenderNamedFlowThread.h:
985         * rendering/RenderRegion.cpp:
986         (WebCore::RenderRegion::styleDidChange):
987
988 2013-08-16  Andreas Kling  <akling@apple.com>
989
990         <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
991
992         Reviewed by Geoff Garen.
993
994         Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
995         It now also returns a reference, as it can never be null.
996
997         Removed 8.8 million lines of null-checking as a result.
998
999 2013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
1000
1001         <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
1002
1003         Reviewed by Benjamin Poulain.
1004
1005         Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
1006         the first root editable element exactly once.
1007
1008         * dom/Node.cpp:
1009         (WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
1010         when we don't have to check RenderStyle's value.
1011         * editing/htmlediting.cpp:
1012         (WebCore::highestEditableRoot):
1013
1014 2013-08-16  Benjamin Poulain  <benjamin@webkit.org>
1015
1016         Remove a useless #include of SelectorChecker.h
1017
1018         Rubber-stamped by Ryosuke Niwa.
1019
1020         * dom/DocumentStyleSheetCollection.cpp:
1021
1022 2013-08-16  Brent Fulgham  <bfulgham@apple.com>
1023
1024         [Windows] Update RenderMediaControls for new API
1025         https://bugs.webkit.org/show_bug.cgi?id=119910
1026
1027         Reviewed by Eric Carlson.
1028
1029         * rendering/RenderMediaControls.cpp: Update calls to WebKitSystemInterface for
1030         the changed API.
1031
1032 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
1033
1034         <https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)
1035
1036         Reviewed by Simon Fraser.
1037
1038         No new tests required, just a build fix.
1039
1040         Since r154174 CSS keywords alpha and luminance used by -webkit-mask-source-type. Move those
1041         keywords from SVGCSSValueKeywords.in to CSSValueKeywords.in.
1042
1043         * css/CSSValueKeywords.in:
1044         * css/SVGCSSValueKeywords.in:
1045
1046 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
1047
1048         <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
1049
1050         Reviewed by Alexey Proskuryakov.
1051
1052         WTF::currentTime() is prone to DST changes and NTP adjustments, so use
1053         WTF::monotonicallyIncreasingTime() to measure elapsed time.
1054         
1055         * Modules/filesystem/FileWriter.cpp:
1056         (WebCore::FileWriter::didWrite):
1057         * dom/Document.cpp:
1058         (WebCore::Document::Document):
1059         (WebCore::Document::elapsedTime):
1060         (WebCore::Document::resetLastHandledUserGestureTimestamp):
1061         * dom/Element.cpp:
1062         (WebCore::Element::setActive):
1063         * fileapi/FileReader.cpp:
1064         (WebCore::FileReader::didReceiveData):
1065         * html/HTMLMediaElement.cpp:
1066         (WebCore::HTMLMediaElement::HTMLMediaElement):
1067         (WebCore::HTMLMediaElement::startProgressEventTimer):
1068         (WebCore::HTMLMediaElement::progressEventTimerFired):
1069         (WebCore::HTMLMediaElement::refreshCachedTime):
1070         (WebCore::HTMLMediaElement::invalidateCachedTime):
1071         (WebCore::HTMLMediaElement::currentTime):
1072         (WebCore::HTMLMediaElement::startPlaybackProgressTimer):
1073         (WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
1074         * html/HTMLMediaElement.h:
1075         * html/HTMLPlugInImageElement.cpp:
1076         (WebCore::documentHadRecentUserGesture):
1077         * html/MediaController.cpp:
1078         (MediaController::scheduleTimeupdateEvent):
1079         * html/parser/HTMLDocumentParser.cpp:
1080         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
1081         * html/parser/HTMLParserScheduler.h:
1082         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
1083         * inspector/InspectorCSSAgent.cpp:
1084         (WebCore::SelectorProfile::SelectorProfile):
1085         (WebCore::SelectorProfile::totalMatchingTimeMs):
1086         (WebCore::SelectorProfile::startSelector):
1087         (WebCore::SelectorProfile::commitSelector):
1088         (WebCore::SelectorProfile::commitSelectorTime):
1089         * inspector/InspectorProfilerAgent.cpp:
1090         (WebCore::InspectorProfilerAgent::willProcessTask):
1091         (WebCore::InspectorProfilerAgent::didProcessTask):
1092         * inspector/InspectorTimelineAgent.cpp:
1093         (WebCore::InspectorTimelineAgent::timestamp):
1094         * inspector/TimelineTraceEventProcessor.cpp:
1095         (WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
1096         * page/FrameView.cpp:
1097         (WebCore::FrameView::adjustedDeferredRepaintDelay):
1098         (WebCore::FrameView::paintContents):
1099         * platform/ClockGeneric.cpp:
1100         (ClockGeneric::now):
1101         * platform/ScrollAnimatorNone.cpp:
1102         (WebCore::ScrollAnimatorNone::scroll):
1103         (WebCore::ScrollAnimatorNone::animationTimerFired):
1104         * platform/graphics/cg/ImageBufferCG.cpp:
1105         (WebCore::ImageBuffer::ImageBuffer):
1106         (WebCore::ImageBuffer::flushContextIfNecessary):
1107         (WebCore::ImageBuffer::flushContext):
1108         (WebCore::ImageBuffer::copyNativeImage):
1109
1110 2013-08-16  peavo@outlook.com  <peavo@outlook.com>
1111
1112         <https://webkit.org/b/119891> [WinCairo] Compile error.
1113
1114         Reviewed by Brent Fulgham.
1115
1116         * rendering/FlowThreadController.cpp: Need USE(ACCELERATED_COMPOSITING) guard.
1117         * rendering/FlowThreadController.h: Need USE(ACCELERATED_COMPOSITING) guard.
1118
1119 2013-08-16  Zan Dobersek  <zdobersek@igalia.com>
1120
1121         <https://webkit.org/b/119887> [Soup] The testing NetworkStorageSession should have a proper SoupSession
1122
1123         Reviewed by Martin Robinson.
1124
1125         After r154144, a testing NetworkStorageSession is enforced when running the layout tests
1126         through WebKitTestRunner. Ports using the Soup networking backend don't assign any SoupSession
1127         objects to such NetworkStorageSession objects as it's usually the case. This is causing problems
1128         as the ResourceHandleInternal uses the SoupSession that's provided by the NetworkingContext's
1129         NetworkStorageSession, which ends up being null if the testing-specific NetworkStorageSession is used.
1130         As a result, all the layout tests are crashing under WKTR.
1131
1132         * platform/network/NetworkStorageSession.h: Make the SoupSession member a GRefPtr.
1133         (WebCore::NetworkStorageSession::soupSession): Return the GRefPtr's pointer.
1134         * platform/network/ResourceHandle.h: Declare the new createTestingSession method.
1135         * platform/network/soup/CookieJarSoup.cpp: 
1136         (WebCore::cookieJarForSession): Instead of returning the default SoupCookieJar when there's no SoupSession
1137         provided by the NetworkStorageSession, assert that there now always is one, and return the session's cookie
1138         jar. For testing NetworkStorageSession objects, their SoupSession objects will always use the default cookie jar.
1139         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1140         (WebCore::NetworkStorageSession::NetworkStorageSession): Adopt the given SoupSession reference pointer.
1141         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a newly-created, testing-specific SoupSession.
1142         * platform/network/soup/ResourceHandleSoup.cpp:
1143         (WebCore::ResourceHandle::createTestingSession): Define the new createTestingSession method. It creates a new
1144         SoupSession through createSoupSession, but uses the default SoupCookieJar, as provided by WebCore::soupCookieJar.
1145
1146 2013-08-16  Pratik Solanki  <psolanki@apple.com>
1147
1148         <https://webkit.org/b/119852> Frame::scriptController() should return a reference
1149
1150         Reviewed by Andreas Kling.
1151
1152         m_script is never NULL so we can just return a reference. Also remove some pointless null
1153         checks as a result of doing this.
1154
1155         * Modules/websockets/WebSocket.cpp:
1156         (WebCore::WebSocket::connect):
1157         * bindings/js/JSDOMWindowBase.cpp:
1158         (WebCore::toJS):
1159         (WebCore::toJSDOMWindow):
1160         * bindings/js/JSDOMWindowShell.cpp:
1161         (WebCore::toJS):
1162         (WebCore::toJSDOMWindowShell):
1163         * bindings/js/JSEventListener.cpp:
1164         (WebCore::JSEventListener::handleEvent):
1165         * bindings/js/JSLazyEventListener.cpp:
1166         (WebCore::JSLazyEventListener::initializeJSFunction):
1167         * bindings/js/PageScriptDebugServer.cpp:
1168         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
1169         * bindings/js/ScheduledAction.cpp:
1170         (WebCore::ScheduledAction::execute):
1171         * bindings/js/ScriptCachedFrameData.cpp:
1172         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1173         (WebCore::ScriptCachedFrameData::restore):
1174         * bindings/js/ScriptEventListener.cpp:
1175         (WebCore::createAttributeEventListener):
1176         (WebCore::eventListenerHandlerScriptState):
1177         * bindings/js/ScriptState.cpp:
1178         (WebCore::mainWorldScriptState):
1179         (WebCore::scriptStateFromNode):
1180         (WebCore::scriptStateFromPage):
1181         * bindings/objc/DOM.mm:
1182         (-[DOMNode JSC::Bindings::]):
1183         * bindings/objc/DOMInternal.mm:
1184         (-[WebScriptObject _initializeScriptDOMNodeImp]):
1185         * dom/Document.cpp:
1186         (WebCore::Document::disableEval):
1187         (WebCore::Document::ensurePlugInsInjectedScript):
1188         * dom/ScriptElement.cpp:
1189         (WebCore::ScriptElement::prepareScript):
1190         (WebCore::ScriptElement::executeScript):
1191         * history/CachedFrame.cpp:
1192         (WebCore::CachedFrameBase::restore):
1193         * html/HTMLCanvasElement.cpp:
1194         (WebCore::HTMLCanvasElement::createRenderer):
1195         * html/HTMLElement.cpp:
1196         (WebCore::HTMLElement::rendererIsNeeded):
1197         * html/HTMLMediaElement.cpp:
1198         (WebCore::HTMLMediaElement::controls):
1199         * html/HTMLPlugInElement.cpp:
1200         (WebCore::HTMLPlugInElement::getInstance):
1201         (WebCore::HTMLPlugInElement::getNPObject):
1202         * html/HTMLPlugInImageElement.cpp:
1203         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
1204         * html/parser/HTMLParserOptions.cpp:
1205         (WebCore::HTMLParserOptions::HTMLParserOptions):
1206         * inspector/InspectorAgent.cpp:
1207         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
1208         * inspector/InspectorClient.cpp:
1209         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
1210         * inspector/InspectorFrontendClientLocal.cpp:
1211         (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
1212         (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
1213         * inspector/InspectorOverlay.cpp:
1214         (WebCore::InspectorOverlay::evaluateInOverlay):
1215         * inspector/InspectorPageAgent.cpp:
1216         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
1217         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
1218         * inspector/PageRuntimeAgent.cpp:
1219         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
1220         * loader/DocumentWriter.cpp:
1221         (WebCore::DocumentWriter::begin):
1222         * loader/FrameLoader.cpp:
1223         (WebCore::FrameLoader::urlSelected):
1224         (WebCore::FrameLoader::submitForm):
1225         (WebCore::FrameLoader::cancelAndClear):
1226         (WebCore::FrameLoader::clear):
1227         (WebCore::FrameLoader::prepareForCachedPageRestore):
1228         (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
1229         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
1230         * loader/SubframeLoader.cpp:
1231         (WebCore::SubframeLoader::requestFrame):
1232         * loader/cache/CachedResourceLoader.cpp:
1233         (WebCore::CachedResourceLoader::canRequest):
1234         * page/EventSource.cpp:
1235         (WebCore::EventSource::create):
1236         * page/Frame.cpp:
1237         (WebCore::Frame::willDetachPage):
1238         * page/Frame.h:
1239         (WebCore::Frame::script):
1240         * page/Navigator.cpp:
1241         (WebCore::shouldHideFourDot):
1242         * page/Page.cpp:
1243         (WebCore::Page::setDebugger):
1244         * platform/graphics/wince/MediaPlayerProxy.cpp:
1245         (WebCore::WebMediaPlayerProxy::pluginInstance):
1246         (WebCore::WebMediaPlayerProxy::invokeMethod):
1247         * plugins/PluginView.cpp:
1248         (WebCore::PluginView::~PluginView):
1249         (WebCore::PluginView::performRequest):
1250         (WebCore::PluginView::load):
1251         (WebCore::PluginView::bindingInstance):
1252         (WebCore::PluginView::getValue):
1253         * plugins/efl/PluginViewEfl.cpp:
1254         (WebCore::PluginView::platformGetValue):
1255         * xml/XMLHttpRequest.cpp:
1256         (WebCore::XMLHttpRequest::open):
1257         * xml/XMLTreeViewer.cpp:
1258         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
1259
1260 2013-08-16  Andreas Kling  <akling@apple.com>
1261
1262         Attempt to fix the Qt/MountainLion build after r154142.
1263
1264         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1265         (WebCore::MediaPlayerPrivateQt::commitLoad):
1266
1267 2013-08-16  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1268
1269         [Qt] Kerning in fast font path breaks letter-spacing
1270         https://bugs.webkit.org/show_bug.cgi?id=119838
1271
1272         Reviewed by Jocelyn Turcotte.
1273
1274         Mark fonts with both kerning and letter-spacing as unsupported by the simple font-path.
1275
1276         Test: fast/text/letter-spacing-kerned.html
1277
1278         * platform/graphics/WidthIterator.h:
1279         (WebCore::WidthIterator::supportsTypesettingFeatures):
1280
1281 2013-08-16  Andreas Kling  <akling@apple.com>
1282
1283         <https://webkit.org/b/119893> FrameView::frame() should return a reference.
1284
1285         Reviewed by Antti Koivisto.
1286
1287         FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
1288         Leave it alone instead, and update the assertion that depended on this behavior.
1289         This enables us to make FrameView::frame() return a Frame&, exposing a ton of
1290         unnecessary null checks.
1291
1292         * history/CachedFrame.cpp:
1293         (WebCore::CachedFrame::destroy):
1294
1295             Remove call to FrameView::clearFrame() that was the only way to get a null
1296             FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
1297             the FrameView would get destroyed anyway.
1298
1299         (WebCore::CachedFrame::clear):
1300
1301             Update an assertion to support the case where the Document's Frame pointer has
1302             been cleared out and CachedFrame is still clinging to the FrameView.
1303
1304         * history/CachedPage.h:
1305
1306             Made CachedPage::destroy() private as it was only called by ~CachedPage().
1307
1308         * /:
1309
1310             Frame* FrameView::frame() => Frame& FrameView::frame()
1311
1312 2013-08-16  Brady Eidson  <beidson@apple.com>
1313
1314         (NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
1315         https://bugs.webkit.org/show_bug.cgi?id=119493
1316
1317         Reviewed by Alexey Proskuryakov.
1318
1319         No new tests (Covered by plenty of existing tests).
1320
1321         * WebCore.exp.in:
1322         * WebCore.xcodeproj/project.pbxproj:
1323
1324         * platform/network/SynchronousLoaderClient.h: Make platformBadResponseError public
1325
1326         * platform/network/mac/ResourceHandleMac.mm:
1327         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Add comments/FIXMEs spelling out how wrong this code is.
1328
1329 2013-08-16  peavo@outlook.com  <peavo@outlook.com>
1330
1331         <https://webkit.org/b/119889> [WinCairo] Compile error.
1332
1333         Reviewed by Brent Fulgham.
1334
1335         * platform/network/curl/ResourceHandleManager.cpp:
1336         (WebCore::certificatePath): Use correct function name.
1337
1338 2013-08-16  Brent Fulgham  <bfulgham@apple.com>
1339
1340         [Windows] Unreviewed build correction after r154165.
1341
1342         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
1343         to WebKit include location.
1344
1345 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
1346
1347         [Windows] Prevent dangling CACFLayer when switching to/from Tiled backing.
1348         https://bugs.webkit.org/show_bug.cgi?id=119818
1349
1350         Reviewed by Darin Adler.
1351
1352         Covered by existing: compositing/tiling/empty-to-tiled.html
1353
1354         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1355         (PlatformCALayer::~PlatformCALayer): Remove deleted layer from its
1356         parent layer 
1357
1358 2013-08-16  Andreas Kling  <akling@apple.com>
1359
1360         <https://webkit.org/b/119866> Frame::eventHandler() should return a reference.
1361
1362         Reviewed by Anders Carlsson.
1363
1364         Frame::m_eventHandler is never null.
1365
1366 2013-08-16  Commit Queue  <commit-queue@webkit.org>
1367
1368         Unreviewed, rolling out r153749.
1369         http://trac.webkit.org/changeset/153749
1370         https://bugs.webkit.org/show_bug.cgi?id=119892
1371
1372         The bison generation of the glslang* files has now been fixed. (Requested by zdobersek on #webkit).
1373
1374         * GNUmakefile.am:
1375
1376 2013-08-16  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
1377
1378         [GTK] fixing localizedString method name
1379         https://bugs.webkit.org/show_bug.cgi?id=119884
1380
1381         The method name defined in LocalizedStringsGtk.cpp doesn't not match
1382         the one used in LocalizedStrings.h
1383
1384         Reviewed by Gustavo Noronha Silva.
1385
1386         * platform/gtk/LocalizedStringsGtk.cpp:
1387         (WebCore::textTrackOffMenuItemText):
1388
1389 2013-08-16  Andrei Parvu  <parvu@adobe.com>
1390
1391         [CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
1392         https://bugs.webkit.org/show_bug.cgi?id=119614
1393
1394         Added the -webkit-mask-source-type property, which can have a value of auto, alpha or
1395         luminance. The default value is auto. This patch contains only the parsing of the property,
1396         not the actual implementation of the types of masks. The parsing of mask-source-type in the
1397         -webkit-mask property will be handled in a separate patch.
1398
1399         Reviewed by Dirk Schulze.
1400
1401         Test: fast/masking/parsing-mask-source-type.html
1402
1403         * css/CSSComputedStyleDeclaration.cpp: Added case for CSSPropertyWebkitMaskType.
1404         (WebCore::ComputedStyleExtractor::propertyValue):
1405         * css/CSSParser.cpp: Parsed the values for CSSPropertyWebkitMaskType.
1406         (WebCore::CSSParser::parseValue):
1407         (WebCore::CSSParser::parseFillProperty):
1408         * css/CSSProperty.cpp:
1409         (WebCore::CSSProperty::isInheritedProperty):
1410         * css/CSSPropertyNames.in: Added -webkit-mask-type property.
1411         * css/CSSToStyleMap.cpp: map the provided mask type to the FillLayer class.
1412         (WebCore::CSSToStyleMap::mapFillMaskType):
1413         * css/CSSToStyleMap.h:
1414         * css/DeprecatedStyleBuilder.cpp:
1415         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1416         * css/StyleResolver.cpp:
1417         (WebCore::StyleResolver::applyProperty):
1418         * rendering/style/FillLayer.cpp: Added the m_maskType property to the FillLayer class.
1419         (WebCore::FillLayer::FillLayer):
1420         (WebCore::FillLayer::operator=):
1421         (WebCore::FillLayer::operator==):
1422         * rendering/style/FillLayer.h: Added methods for working with m_maskType.
1423         (WebCore::FillLayer::maskType):
1424         (WebCore::FillLayer::isMaskTypeSet):
1425         (WebCore::FillLayer::setMaskType):
1426         (WebCore::FillLayer::clearMaskType):
1427         (WebCore::FillLayer::initialMaskType):
1428         * rendering/style/RenderStyleConstants.h: Added the EMaskSourceType enum.
1429
1430 2013-08-16  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1431
1432         <https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE's glslang.cpp and glslang_tab.cpp
1433
1434         Reviewed by Gyuyoung Kim.
1435
1436         Now that r154109 has landed, all Bison versions (at least from 2.3 up
1437         to the latest 3.0) should be able to generate versions of glslang* that
1438         build correctly.
1439
1440         Since the idea is to remove the prebuilt files from future imports of
1441         ANGLE, always building our own versions is a good idea, and allows us
1442         to get rid of some very ugly CMake checks.
1443
1444         * CMakeLists.txt: Always build glslang.cpp and glslang_tab.cpp from
1445         DERIVED_SOURCES_WEBCORE_DIR.
1446
1447 2013-08-16  Julien Brianceau  <jbrianceau@nds.com>
1448
1449         <https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).
1450
1451         Reviewed by Gyuyoung Kim.
1452
1453         Since r154142, Frame::loader() is a reference (and not a pointer anymore).
1454
1455         * xml/parser/XMLDocumentParserQt.cpp:
1456         (WebCore::XMLDocumentParser::parseStartElement):
1457
1458 2013-08-16  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
1459
1460         [WebGL] Vertex attribute binding validation method
1461         https://bugs.webkit.org/show_bug.cgi?id=119515
1462
1463         This patch refactors WebGLRenderingContext code by moving the vertex
1464         attribute binding validation to a separate method. It is now
1465         possible to use that validation in other parts of the code. The
1466         code is more clear now. 
1467
1468         Reviewed by Christophe Dumez.
1469
1470         No new tests. Covered by existing tests. No behaviour changed.
1471         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/gl-drawelements.html
1472         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-elements-out-of-bounds.html
1473         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-arrays-out-of-bounds.html
1474
1475         * html/canvas/WebGLRenderingContext.cpp:
1476         (WebCore::WebGLRenderingContext::validateVertexAttributes):
1477         * html/canvas/WebGLVertexArrayObjectOES.h:
1478         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::isBound):
1479         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::validateBinding):
1480
1481 2013-08-15  Antti Koivisto  <antti@apple.com>
1482
1483         <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared
1484
1485         Reviewed by Andreas Kling.
1486
1487         Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
1488         pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that 
1489         want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
1490         traversing through.
1491         
1492         This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
1493         member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
1494         now always null in the root node.
1495         
1496         ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
1497
1498         * css/StyleResolver.cpp:
1499         (WebCore::StyleResolver::pushParentShadowRoot):
1500         (WebCore::StyleResolver::popParentShadowRoot):
1501         * dom/Attr.cpp:
1502         (WebCore::Attr::createTextChild):
1503         * dom/ComposedShadowTreeWalker.cpp:
1504         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
1505         * dom/ContainerNode.cpp:
1506         (WebCore::ContainerNode::insertBeforeCommon):
1507         (WebCore::ContainerNode::removeBetween):
1508         * dom/ContainerNodeAlgorithms.cpp:
1509         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
1510         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
1511         * dom/ContainerNodeAlgorithms.h:
1512         (WebCore::appendChildToContainer):
1513         (WebCore::Private::addChildNodesToDeletionQueue):
1514         * dom/Document.h:
1515         (WebCore::Node::Node):
1516         * dom/Element.cpp:
1517         (WebCore::Element::addShadowRoot):
1518         (WebCore::Element::removeShadowRoot):
1519         * dom/ElementRareData.h:
1520         (WebCore::ElementRareData::releasePseudoElement):
1521         * dom/EventPathWalker.cpp:
1522         (WebCore::EventPathWalker::moveToParent):
1523         * dom/EventRetargeter.cpp:
1524         (WebCore::determineDispatchBehavior):
1525         * dom/EventRetargeter.h:
1526         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
1527         * dom/Node.cpp:
1528         (WebCore::Node::shadowHost):
1529         (WebCore::Node::deprecatedShadowAncestorNode):
1530         (WebCore::Node::parentOrShadowHostElement):
1531         * dom/Node.h:
1532         (WebCore::Node::hasTreeSharedParent):
1533         
1534             Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
1535
1536         (WebCore::Node::setParentNode):
1537         (WebCore::Node::parentNode):
1538         (WebCore::Node::parentNodeGuaranteedHostFree):
1539         * dom/PseudoElement.cpp:
1540         (WebCore::PseudoElement::PseudoElement):
1541         * dom/ShadowRoot.cpp:
1542         (WebCore::ShadowRoot::ShadowRoot):
1543         (WebCore::ShadowRoot::setInnerHTML):
1544         (WebCore::ShadowRoot::setApplyAuthorStyles):
1545         (WebCore::ShadowRoot::setResetStyleInheritance):
1546         * dom/ShadowRoot.h:
1547         
1548             Rename host() -> hostElement() for clarity.
1549
1550         (WebCore::Node::parentOrShadowHostNode):
1551         * dom/Text.cpp:
1552         (WebCore::isSVGShadowText):
1553         * dom/TreeScope.cpp:
1554         (WebCore::TreeScope::focusedElement):
1555         * html/shadow/ContentDistributor.cpp:
1556         (WebCore::ContentDistributor::ensureDistribution):
1557         * html/shadow/InsertionPoint.cpp:
1558         (WebCore::InsertionPoint::insertedInto):
1559         (WebCore::InsertionPoint::removedFrom):
1560         (WebCore::InsertionPoint::parseAttribute):
1561         * page/DragController.cpp:
1562         (WebCore::asFileInput):
1563         * page/EventHandler.cpp:
1564         (WebCore::EventHandler::handleMousePressEvent):
1565         (WebCore::instanceAssociatedWithShadowTreeElement):
1566         * page/FocusController.cpp:
1567         (WebCore::FocusNavigationScope::owner):
1568         * rendering/RenderBlock.cpp:
1569         (WebCore::RenderBlock::hasLineIfEmpty):
1570         * rendering/RenderLayer.cpp:
1571         (WebCore::rendererForScrollbar):
1572         * svg/SVGElementInstance.h:
1573         (WebCore::SVGElementInstance::setParentNode):
1574             
1575             Renamed so it works with appendChildToContainer template.
1576
1577         * svg/SVGStyledElement.cpp:
1578         (WebCore::SVGStyledElement::title):
1579
1580 2013-08-13  Darin Adler  <darin@apple.com>
1581
1582         [iOS] Get iOS port off legacy clipboard
1583         https://bugs.webkit.org/show_bug.cgi?id=116412
1584
1585         Reviewed by Daniel Bates.
1586
1587         * dom/Clipboard.h: Turn off legacy style clipboard for iOS.
1588         Next patch will be able to remove legacy style entirely!
1589
1590         * editing/Editor.cpp:
1591         (WebCore::Editor::dispatchCPPEvent): Attach the frame to the
1592         pasteboard directly explicitly. This is a layering violation, but
1593         is needed until we change how iOS pasteboard communicates with the
1594         host to use platform strategies instead of the editor client.
1595
1596         * editing/ios/EditorIOS.mm: Removed Editor::newGeneralClipboard and
1597         the include of ClipboardIOS.h.
1598
1599         * platform/Pasteboard.h: Added the setFrame function (iOS-only) and
1600         frame and change count data members.
1601
1602         * platform/ios/ClipboardIOS.h: Emptied out. Later we can remove this.
1603         * platform/ios/ClipboardIOS.mm: Ditto.
1604
1605         * platform/ios/PasteboardIOS.mm:
1606         (WebCore::Pasteboard::Pasteboard): Initialize m_frame to zero.
1607         (WebCore::Pasteboard::createForCopyAndPaste): Added.
1608         (WebCore::Pasteboard::createPrivate): Added.
1609         (WebCore::Pasteboard::writePasteboard): Added. Empty function, like
1610         writeClipboard. Eventually need to remove or implement this.
1611         (WebCore::Pasteboard::setFrame): Added. Sets frame and change count.
1612         (WebCore::Pasteboard::hasData): Moved here from ClipboardIOS.
1613         (WebCore::utiTypeFromCocoaType): Ditto.
1614         (WebCore::cocoaTypeFromHTMLClipboardType): Ditto.
1615         (WebCore::Pasteboard::clear): Ditto.
1616         (WebCore::Pasteboard::readString): Ditto.
1617         (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
1618         (WebCore::Pasteboard::writeString): Ditto.
1619         (WebCore::Pasteboard::types): Ditto.
1620         (WebCore::Pasteboard::readFilenames): Ditto.
1621
1622         * WebCore.exp.in: Move Clipboard destructor from Mac-only section to
1623         common section shared by Mac and iOS.
1624
1625 2013-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
1626
1627         [EFL] Unreviewed build fix after r154142 and r154144.
1628
1629         * platform/efl/ErrorsEfl.cpp: Follow the changes of r154142.
1630         (WebCore::printError):
1631         (WebCore::printerNotFoundError):
1632         (WebCore::invalidPageRangeToPrint):
1633
1634 2013-08-15  Hans Muller  <hmuller@adobe.com>
1635
1636         [CSS Shapes] Add support for shape-outside image values
1637         https://bugs.webkit.org/show_bug.cgi?id=119809
1638
1639         Added minimal support for shape-outside image values. A new method that computes
1640         the excluded intervals for a horizontal line segment was added to the RasterIntervals
1641         class. The stub RasterShape getExcludedIntervals() method has been replaced by
1642         one that uses the new method.
1643
1644         Image shapes are represented by a RasterIntervals object, which just encapsulates a
1645         Region object. The new getExcludedIntervals() method computes the excluded intervals
1646         for a horizontal line segment between y1 and y2. To find the excluded intervals we
1647         vertically expand each of the image shape Region's rectangles that fall within the line
1648         segment, so that they begin at y1 and have height = y2 - y1. The union of the expanded
1649         rectangles produces a new Region whose horizontal projection defines the excluded intervals.
1650
1651         Reviewed by Alexandru Chiculita.
1652
1653         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-001.html
1654                fast/shapes/shape-outside-floats/shape-outside-floats-image-002.html
1655
1656         * rendering/shapes/RasterShape.cpp:
1657         (WebCore::RasterShapeIntervals::getExcludedIntervals): See above.
1658         (WebCore::RasterShape::getExcludedIntervals): Stub method has been replaced by one that uses RasterShapeIntervals::getExcludedIntervals().
1659         * rendering/shapes/RasterShape.h:
1660         * rendering/shapes/ShapeOutsideInfo.cpp:
1661         (WebCore::ShapeOutsideInfo::isEnabledFor): Enable Image valued shapes.
1662
1663 2013-08-15  Simon Fraser  <simon.fraser@apple.com>
1664
1665         <https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
1666
1667         Reviewed by Tim Horton.
1668         
1669         When starting a show on Hulu, there's a layer that gets marked as
1670         opaque because it has a child RenderLayer whose background fills the
1671         compositing layer. That child RenderLayer was recently position:fixed
1672         but outside the viewport, so its viewportConstrainedNotCompositedReason
1673         was set to a non-zero value.
1674         
1675         However, we failed to clear the viewportConstrainedNotCompositedReason
1676         when the layer became non-fixed. This caused painting the opaque
1677         layer to bail in RenderLayer::paintLayer(), leaving garbage.
1678
1679         Test: compositing/contents-opaque/fixed-to-nonfixed.html
1680
1681         * rendering/RenderLayer.cpp:
1682         (WebCore::RenderLayer::paintLayer): Add an assertion to catch this error in future.
1683         * rendering/RenderLayerCompositor.cpp:
1684         (WebCore::RenderLayerCompositor::updateBacking): Make sure we clear the
1685         ViewportConstrainedNotCompositedReason if the layer is no longer fixed.
1686
1687 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
1688
1689         [Windows] Consolidate WebKit Bundle Handling
1690         https://bugs.webkit.org/show_bug.cgi?id=119869
1691
1692         Reviewed by Tim Horton.
1693
1694         * WebCore.vcxproj/WebCore.vcxproj: Add new WebCoreBundleWin files.
1695         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1696         * platform/network/curl/ResourceHandleManager.cpp:
1697         (WebCore::certificatePath): Use correct bundle handling logic.
1698         * platform/win/LocalizedStringsWin.cpp: Move bundle implementation to
1699         new WebCoreBundleWin.cpp file.
1700         * platform/win/WebCoreBundleWin.cpp: Added.
1701         (WebCore::createWebKitBundle):
1702         (WebCore::webKitBundle):
1703         * platform/win/WebCoreBundleWin.h: Added.
1704
1705 2013-08-15  Anders Carlsson  <andersca@apple.com>
1706
1707         <https://webkit.org/b/119859> Frame::loader() should return a reference
1708
1709         Reviewed by Andreas Kling.
1710
1711         * Modules/websockets/WebSocketChannel.cpp:
1712         (WebCore::WebSocketChannel::willOpenSocketStream):
1713         * WebCore.xcodeproj/project.pbxproj:
1714         * accessibility/AccessibilityObject.cpp:
1715         (WebCore::AccessibilityObject::press):
1716         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1717         (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
1718         * bindings/ScriptControllerBase.cpp:
1719         (WebCore::ScriptController::canExecuteScripts):
1720         * bindings/js/ScriptController.cpp:
1721         (WebCore::ScriptController::initScript):
1722         * css/CSSFontSelector.cpp:
1723         (WebCore::CSSFontSelector::beginLoadTimerFired):
1724         * dom/DOMImplementation.cpp:
1725         (WebCore::DOMImplementation::createDocument):
1726         * dom/Document.cpp:
1727         (WebCore::Document::Document):
1728         (WebCore::Document::setVisualUpdatesAllowed):
1729         (WebCore::Document::updateTitle):
1730         (WebCore::Document::open):
1731         (WebCore::Document::explicitClose):
1732         (WebCore::Document::implicitClose):
1733         (WebCore::Document::userAgent):
1734         (WebCore::Document::canNavigate):
1735         (WebCore::Document::processHttpEquiv):
1736         (WebCore::Document::referrer):
1737         (WebCore::Document::documentDidResumeFromPageCache):
1738         (WebCore::Document::openSearchDescriptionURL):
1739         (WebCore::Document::finishedParsing):
1740         (WebCore::Document::addIconURL):
1741         (WebCore::Document::initSecurityContext):
1742         (WebCore::Document::updateURLForPushOrReplaceState):
1743         (WebCore::Document::loadEventDelayTimerFired):
1744         (WebCore::Document::loader):
1745         (WebCore::Document::decrementActiveParserCount):
1746         * history/CachedFrame.cpp:
1747         (WebCore::CachedFrameBase::CachedFrameBase):
1748         (WebCore::CachedFrameBase::restore):
1749         (WebCore::CachedFrame::CachedFrame):
1750         (WebCore::CachedFrame::open):
1751         (WebCore::CachedFrame::destroy):
1752         * history/PageCache.cpp:
1753         (WebCore::logCanCacheFrameDecision):
1754         (WebCore::logCanCachePageDecision):
1755         (WebCore::PageCache::canCachePageContainingThisFrame):
1756         (WebCore::PageCache::canCache):
1757         * html/HTMLAnchorElement.cpp:
1758         (WebCore::HTMLAnchorElement::handleClick):
1759         * html/HTMLAppletElement.cpp:
1760         (WebCore::HTMLAppletElement::updateWidget):
1761         * html/HTMLElement.cpp:
1762         (WebCore::HTMLElement::rendererIsNeeded):
1763         * html/HTMLEmbedElement.cpp:
1764         (WebCore::HTMLEmbedElement::updateWidget):
1765         * html/HTMLFormElement.cpp:
1766         (WebCore::HTMLFormElement::prepareForSubmission):
1767         (WebCore::HTMLFormElement::submit):
1768         * html/HTMLFrameElementBase.cpp:
1769         (WebCore::HTMLFrameElementBase::openURL):
1770         * html/HTMLFrameOwnerElement.cpp:
1771         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
1772         * html/HTMLFrameSetElement.cpp:
1773         (WebCore::HTMLFrameSetElement::insertedInto):
1774         (WebCore::HTMLFrameSetElement::removedFrom):
1775         * html/HTMLHtmlElement.cpp:
1776         (WebCore::HTMLHtmlElement::insertedByParser):
1777         * html/HTMLMediaElement.cpp:
1778         (WebCore::HTMLMediaElement::createRenderer):
1779         (WebCore::HTMLMediaElement::attach):
1780         (WebCore::HTMLMediaElement::loadResource):
1781         (WebCore::HTMLMediaElement::getPluginProxyParams):
1782         (WebCore::HTMLMediaElement::createMediaPlayerProxy):
1783         (WebCore::HTMLMediaElement::updateWidget):
1784         (WebCore::HTMLMediaElement::mediaPlayerReferrer):
1785         (WebCore::HTMLMediaElement::mediaPlayerUserAgent):
1786         * html/HTMLObjectElement.cpp:
1787         (WebCore::HTMLObjectElement::parametersForPlugin):
1788         (WebCore::HTMLObjectElement::updateWidget):
1789         * html/HTMLPlugInImageElement.cpp:
1790         (WebCore::HTMLPlugInImageElement::isImageType):
1791         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
1792         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
1793         * html/HTMLVideoElement.cpp:
1794         (WebCore::HTMLVideoElement::setDisplayMode):
1795         * html/ImageDocument.cpp:
1796         (WebCore::ImageDocumentParser::appendBytes):
1797         (WebCore::ImageDocumentParser::finish):
1798         (WebCore::ImageDocument::createDocumentStructure):
1799         * html/MediaDocument.cpp:
1800         (WebCore::MediaDocumentParser::createDocumentStructure):
1801         * html/PluginDocument.cpp:
1802         (WebCore::PluginDocumentParser::createDocumentStructure):
1803         (WebCore::PluginDocumentParser::appendBytes):
1804         (WebCore::PluginDocument::detach):
1805         (WebCore::PluginDocument::cancelManualPluginLoad):
1806         * html/canvas/WebGLRenderingContext.cpp:
1807         (WebCore::WebGLRenderingContext::create):
1808         (WebCore::WebGLRenderingContext::loseContextImpl):
1809         (WebCore::WebGLRenderingContext::maybeRestoreContext):
1810         * html/parser/HTMLConstructionSite.cpp:
1811         (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
1812         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
1813         * html/parser/HTMLParserOptions.cpp:
1814         (WebCore::HTMLParserOptions::HTMLParserOptions):
1815         * html/parser/XSSAuditor.cpp:
1816         (WebCore::XSSAuditor::init):
1817         * html/parser/XSSAuditorDelegate.cpp:
1818         (WebCore::XSSAuditorDelegate::generateViolationReport):
1819         (WebCore::XSSAuditorDelegate::didBlockScript):
1820         * inspector/InspectorApplicationCacheAgent.cpp:
1821         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
1822         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1823         * inspector/InspectorFrontendClientLocal.cpp:
1824         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1825         * inspector/InspectorFrontendHost.cpp:
1826         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
1827         * inspector/InspectorOverlay.cpp:
1828         (WebCore::InspectorOverlay::overlayPage):
1829         * inspector/InspectorPageAgent.cpp:
1830         (WebCore::InspectorPageAgent::mainResourceContent):
1831         (WebCore::InspectorPageAgent::reload):
1832         (WebCore::InspectorPageAgent::navigate):
1833         (WebCore::allResourcesURLsForFrame):
1834         (WebCore::InspectorPageAgent::searchInResource):
1835         (WebCore::InspectorPageAgent::assertDocumentLoader):
1836         (WebCore::InspectorPageAgent::buildObjectForFrame):
1837         * inspector/InspectorResourceAgent.cpp:
1838         (WebCore::InspectorResourceAgent::didFailLoading):
1839         * loader/CookieJar.cpp:
1840         (WebCore::networkingContext):
1841         * loader/DocumentLoader.cpp:
1842         (WebCore::DocumentLoader::frameLoader):
1843         (WebCore::DocumentLoader::document):
1844         (WebCore::DocumentLoader::stopLoading):
1845         (WebCore::DocumentLoader::removeSubresourceLoader):
1846         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
1847         (WebCore::DocumentLoader::iconLoadDecisionAvailable):
1848         (WebCore::DocumentLoader::continueIconLoadWithDecision):
1849         * loader/DocumentThreadableLoader.cpp:
1850         (WebCore::DocumentThreadableLoader::didReceiveResponse):
1851         (WebCore::DocumentThreadableLoader::didFinishLoading):
1852         (WebCore::DocumentThreadableLoader::didFail):
1853         (WebCore::DocumentThreadableLoader::preflightFailure):
1854         (WebCore::DocumentThreadableLoader::loadRequest):
1855         * loader/DocumentWriter.cpp:
1856         (WebCore::DocumentWriter::replaceDocument):
1857         (WebCore::DocumentWriter::createDocument):
1858         (WebCore::DocumentWriter::begin):
1859         * loader/FrameLoader.cpp:
1860         (WebCore::FrameLoader::~FrameLoader):
1861         (WebCore::FrameLoader::allChildrenAreComplete):
1862         (WebCore::FrameLoader::allAncestorsAreComplete):
1863         (WebCore::FrameLoader::loadURLIntoChildFrame):
1864         (WebCore::FrameLoader::outgoingReferrer):
1865         (WebCore::FrameLoader::setOpener):
1866         (WebCore::FrameLoader::completed):
1867         (WebCore::FrameLoader::started):
1868         (WebCore::FrameLoader::loadFrameRequest):
1869         (WebCore::FrameLoader::loadURL):
1870         (WebCore::FrameLoader::load):
1871         (WebCore::FrameLoader::loadWithDocumentLoader):
1872         (WebCore::FrameLoader::stopAllLoaders):
1873         (WebCore::FrameLoader::closeOldDataSources):
1874         (WebCore::FrameLoader::subframeIsLoading):
1875         (WebCore::FrameLoader::subresourceCachePolicy):
1876         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1877         (WebCore::FrameLoader::detachChildren):
1878         (WebCore::FrameLoader::checkLoadComplete):
1879         (WebCore::FrameLoader::detachFromParent):
1880         (WebCore::FrameLoader::loadPostRequest):
1881         (WebCore::FrameLoader::loadResourceSynchronously):
1882         (WebCore::FrameLoader::shouldClose):
1883         (WebCore::FrameLoader::handleBeforeUnloadEvent):
1884         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1885         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1886         (WebCore::createWindow):
1887         * loader/HistoryController.cpp:
1888         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1889         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1890         (WebCore::HistoryController::saveDocumentState):
1891         (WebCore::HistoryController::saveDocumentAndScrollState):
1892         (WebCore::isAssociatedToRequestedHistoryItem):
1893         (WebCore::HistoryController::restoreDocumentState):
1894         (WebCore::HistoryController::shouldStopLoadingForHistoryItem):
1895         (WebCore::HistoryController::goToItem):
1896         (WebCore::HistoryController::updateForBackForwardNavigation):
1897         (WebCore::HistoryController::updateForReload):
1898         (WebCore::HistoryController::updateForStandardLoad):
1899         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
1900         (WebCore::HistoryController::updateForClientRedirect):
1901         (WebCore::HistoryController::updateForCommit):
1902         (WebCore::HistoryController::recursiveUpdateForCommit):
1903         (WebCore::HistoryController::updateForSameDocumentNavigation):
1904         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
1905         (WebCore::HistoryController::initializeItem):
1906         (WebCore::HistoryController::createItemTree):
1907         (WebCore::HistoryController::recursiveSetProvisionalItem):
1908         (WebCore::HistoryController::recursiveGoToItem):
1909         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
1910         (WebCore::HistoryController::updateCurrentItem):
1911         (WebCore::HistoryController::pushState):
1912         (WebCore::HistoryController::replaceState):
1913         * loader/ImageLoader.cpp:
1914         (WebCore::pageIsBeingDismissed):
1915         * loader/MixedContentChecker.cpp:
1916         (WebCore::MixedContentChecker::client):
1917         * loader/NavigationScheduler.cpp:
1918         (WebCore::ScheduledURLNavigation::fire):
1919         (WebCore::ScheduledURLNavigation::didStartTimer):
1920         (WebCore::ScheduledURLNavigation::didStopTimer):
1921         (WebCore::ScheduledRedirect::shouldStartTimer):
1922         (WebCore::ScheduledRedirect::fire):
1923         (WebCore::ScheduledRefresh::fire):
1924         (WebCore::ScheduledHistoryNavigation::fire):
1925         (WebCore::ScheduledFormSubmission::fire):
1926         (WebCore::ScheduledFormSubmission::didStartTimer):
1927         (WebCore::ScheduledFormSubmission::didStopTimer):
1928         (WebCore::NavigationScheduler::mustLockBackForwardList):
1929         (WebCore::NavigationScheduler::scheduleLocationChange):
1930         (WebCore::NavigationScheduler::scheduleFormSubmission):
1931         (WebCore::NavigationScheduler::scheduleRefresh):
1932         (WebCore::NavigationScheduler::schedule):
1933         * loader/PingLoader.cpp:
1934         (WebCore::PingLoader::loadImage):
1935         (WebCore::PingLoader::sendPing):
1936         (WebCore::PingLoader::sendViolationReport):
1937         (WebCore::PingLoader::PingLoader):
1938         * loader/PolicyChecker.cpp:
1939         (WebCore::PolicyChecker::checkNavigationPolicy):
1940         (WebCore::PolicyChecker::checkNewWindowPolicy):
1941         (WebCore::PolicyChecker::checkContentPolicy):
1942         (WebCore::PolicyChecker::cancelCheck):
1943         (WebCore::PolicyChecker::stopCheck):
1944         (WebCore::PolicyChecker::cannotShowMIMEType):
1945         (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
1946         (WebCore::PolicyChecker::continueAfterNavigationPolicy):
1947         (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
1948         (WebCore::PolicyChecker::handleUnimplementablePolicy):
1949         * loader/ProgressTracker.cpp:
1950         (WebCore::ProgressTracker::progressStarted):
1951         (WebCore::ProgressTracker::progressCompleted):
1952         (WebCore::ProgressTracker::finalProgressComplete):
1953         (WebCore::ProgressTracker::incrementProgress):
1954         (WebCore::ProgressTracker::progressHeartbeatTimerFired):
1955         * loader/ResourceLoadNotifier.cpp:
1956         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
1957         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
1958         (WebCore::ResourceLoadNotifier::willSendRequest):
1959         (WebCore::ResourceLoadNotifier::didFailToLoad):
1960         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
1961         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
1962         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
1963         (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
1964         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
1965         (WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
1966         * loader/ResourceLoader.cpp:
1967         (WebCore::ResourceLoader::ResourceLoader):
1968         (WebCore::ResourceLoader::start):
1969         (WebCore::ResourceLoader::frameLoader):
1970         (WebCore::ResourceLoader::willSendRequest):
1971         * loader/SubframeLoader.cpp:
1972         (WebCore::SubframeLoader::pluginIsLoadable):
1973         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
1974         (WebCore::SubframeLoader::createJavaAppletWidget):
1975         (WebCore::SubframeLoader::loadOrRedirectSubframe):
1976         (WebCore::SubframeLoader::loadSubframe):
1977         (WebCore::SubframeLoader::allowPlugins):
1978         (WebCore::SubframeLoader::shouldUsePlugin):
1979         (WebCore::SubframeLoader::loadPlugin):
1980         * loader/appcache/ApplicationCacheGroup.cpp:
1981         (WebCore::ApplicationCacheGroup::selectCache):
1982         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
1983         (WebCore::ApplicationCacheGroup::update):
1984         (WebCore::ApplicationCacheGroup::createResourceHandle):
1985         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1986         (WebCore::ApplicationCacheGroup::didFinishLoading):
1987         (WebCore::ApplicationCacheGroup::didFail):
1988         (WebCore::ApplicationCacheGroup::addEntry):
1989         (WebCore::CallCacheListenerTask::performTask):
1990         (WebCore::ApplicationCacheGroup::postListenerTask):
1991         * loader/appcache/DOMApplicationCache.cpp:
1992         (WebCore::DOMApplicationCache::applicationCacheHost):
1993         * loader/archive/cf/LegacyWebArchive.cpp:
1994         (WebCore::LegacyWebArchive::create):
1995         (WebCore::LegacyWebArchive::createFromSelection):
1996         * loader/cache/CachedResource.cpp:
1997         (WebCore::CachedResource::addAdditionalRequestHeaders):
1998         (WebCore::CachedResource::load):
1999         * loader/cache/CachedResourceLoader.cpp:
2000         (WebCore::CachedResourceLoader::requestImage):
2001         (WebCore::CachedResourceLoader::checkInsecureContent):
2002         (WebCore::CachedResourceLoader::canRequest):
2003         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
2004         (WebCore::CachedResourceLoader::requestResource):
2005         (WebCore::CachedResourceLoader::clientDefersImage):
2006         (WebCore::CachedResourceLoader::cachePolicy):
2007         (WebCore::CachedResourceLoader::loadDone):
2008         * loader/icon/IconController.cpp:
2009         (WebCore::IconController::commitToDatabase):
2010         (WebCore::IconController::startLoader):
2011         (WebCore::IconController::continueLoadWithDecision):
2012         * loader/icon/IconLoader.cpp:
2013         (WebCore::IconLoader::startLoading):
2014         (WebCore::IconLoader::notifyFinished):
2015         * page/Chrome.cpp:
2016         (WebCore::canRunModalIfDuringPageDismissal):
2017         * page/ContextMenuController.cpp:
2018         (WebCore::openNewWindow):
2019         (WebCore::ContextMenuController::contextMenuItemSelected):
2020         (WebCore::ContextMenuController::populate):
2021         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2022         * page/DOMWindow.cpp:
2023         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
2024         (WebCore::DOMWindow::postMessageTimerFired):
2025         (WebCore::DOMWindow::close):
2026         (WebCore::DOMWindow::print):
2027         (WebCore::DOMWindow::stop):
2028         (WebCore::DOMWindow::setName):
2029         (WebCore::DOMWindow::opener):
2030         (WebCore::DOMWindow::dispatchLoadEvent):
2031         (WebCore::DOMWindow::setLocation):
2032         (WebCore::DOMWindow::createWindow):
2033         (WebCore::DOMWindow::open):
2034         * page/DOMWindowExtension.cpp:
2035         (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
2036         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
2037         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
2038         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
2039         (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
2040         * page/DragController.cpp:
2041         (WebCore::DragController::performDrag):
2042         * page/EventHandler.cpp:
2043         (WebCore::EventHandler::handleMousePressEvent):
2044         (WebCore::EventHandler::keyEvent):
2045         * page/Frame.cpp:
2046         (WebCore::Frame::~Frame):
2047         (WebCore::Frame::setView):
2048         (WebCore::Frame::injectUserScripts):
2049         (WebCore::Frame::willDetachPage):
2050         * page/Frame.h:
2051         (WebCore::Frame::loader):
2052         * page/FrameView.cpp:
2053         (WebCore::FrameView::mediaType):
2054         (WebCore::FrameView::setFixedVisibleContentRect):
2055         (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
2056         (WebCore::FrameView::performPostLayoutTasks):
2057         (WebCore::FrameView::autoSizeIfEnabled):
2058         (WebCore::FrameView::scrollTo):
2059         (WebCore::FrameView::shouldSuspendScrollAnimations):
2060         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
2061         (WebCore::FrameView::wheelEvent):
2062         (WebCore::FrameView::firePaintRelatedMilestones):
2063         * page/History.cpp:
2064         (WebCore::History::stateInternal):
2065         (WebCore::History::stateObjectAdded):
2066         * page/Location.cpp:
2067         (WebCore::Location::setLocation):
2068         * page/Navigator.cpp:
2069         (WebCore::Navigator::userAgent):
2070         * page/Page.cpp:
2071         (WebCore::Page::goToItem):
2072         (WebCore::Page::refreshPlugins):
2073         (WebCore::Page::setDefersLoading):
2074         (WebCore::Page::setMemoryCacheClientCallsEnabled):
2075         (WebCore::Page::addRelevantRepaintedObject):
2076         * page/Performance.cpp:
2077         (WebCore::Performance::now):
2078         * page/PerformanceNavigation.cpp:
2079         (WebCore::PerformanceNavigation::type):
2080         (WebCore::PerformanceNavigation::redirectCount):
2081         * page/PerformanceResourceTiming.cpp:
2082         (WebCore::monotonicTimeToDocumentMilliseconds):
2083         * page/mac/PageMac.cpp:
2084         (WebCore::Page::addSchedulePair):
2085         (WebCore::Page::removeSchedulePair):
2086         * platform/ios/PasteboardIOS.mm:
2087         (WebCore::documentFragmentWithImageResource):
2088         (WebCore::documentFragmentWithRTF):
2089         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
2090         * platform/mac/HTMLConverter.mm:
2091         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
2092         (-[WebHTMLConverter _loadFromDOMRange]):
2093         * platform/mac/PasteboardMac.mm:
2094         (WebCore::documentFragmentWithImageResource):
2095         (WebCore::documentFragmentWithRTF):
2096         (WebCore::fragmentFromWebArchive):
2097         * plugins/DOMMimeType.cpp:
2098         (WebCore::DOMMimeType::enabledPlugin):
2099         * rendering/RenderLayer.cpp:
2100         (WebCore::RenderLayer::scrollTo):
2101         * svg/SVGAElement.cpp:
2102         (WebCore::SVGAElement::defaultEventHandler):
2103         * svg/graphics/SVGImage.cpp:
2104         (WebCore::SVGImage::~SVGImage):
2105         (WebCore::SVGImage::dataChanged):
2106         * testing/Internals.cpp:
2107         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
2108         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
2109         (WebCore::Internals::getReferencedFilePaths):
2110         (WebCore::Internals::forceReload):
2111         * xml/XSLTProcessorLibxslt.cpp:
2112         (WebCore::docLoaderFunc):
2113         * xml/parser/XMLDocumentParserLibxml2.cpp:
2114         (WebCore::openFunc):
2115         (WebCore::XMLDocumentParser::startElementNs):
2116
2117 2013-08-15  Daniel Bates  <dabates@apple.com>
2118
2119         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
2120
2121         Reviewed by David Kilzer.
2122
2123         Use the same UUIDs for EditorIOS.mm and the group ios as in the iOS tree
2124         so as to make it straightforward to merge changes to the WebCore Xcode
2125         project file on WebKit.org with changes to the same file in the iOS tree.
2126
2127         * WebCore.xcodeproj/project.pbxproj:
2128
2129 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
2130
2131         [Windows] Unreviewed build fix after r15417.
2132
2133         * DerivedSources.cpp: Remove classes that now live in JSC.
2134         * WebCore.vcxproj/WebCore.vcxproj: Remove classes no longer included in WebCore.
2135         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2136         * bindings/js/WebCoreTypedArrayController.cpp: Add explicit namespace to avoid conflict
2137         with Windows 'Unknown' type.
2138         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
2139         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2140
2141 2013-08-15  Daniel Bates  <dabates@apple.com>
2142
2143         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
2144
2145         Reviewed by David Kilzer.
2146
2147         * WebCore.xcodeproj/project.pbxproj:
2148         * editing/ios/EditorIOS.mm: Added.
2149         (WebCore::Editor::newGeneralClipboard):
2150         (WebCore::Editor::showFontPanel):
2151         (WebCore::Editor::showStylesPanel):
2152         (WebCore::Editor::showColorPanel):
2153         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2154         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
2155         (WebCore::styleForSelectionStart):
2156         (WebCore::Editor::fontForSelection):
2157         (WebCore::Editor::fontAttributesForSelectionStart):
2158         (WebCore::Editor::removeUnchangeableStyles):
2159
2160 2013-08-15  Dirk Schulze  <krit@webkit.org>
2161
2162         Implement CSS Image filter() function
2163         https://bugs.webkit.org/show_bug.cgi?id=119845
2164
2165         Reviewed by Dean Jackson.
2166
2167         The Filter Effects specification defines a new CSS Image function called
2168         filter(). This function takes another CSS Image as well as a filter function
2169         list as input and can be used by various CSS properties.
2170
2171         Example:
2172
2173             background-image: -webkit-filter(url(image.png), brightness(0.5))
2174
2175         This patch implements the current definition of filter() based on other
2176         image generation classes like CSSCrossfadeValue.
2177         A new class called CSSFilterImageValue was added together with an
2178         image observer.
2179
2180         The function is implemented prefixed and behind the compiler flag CSS_FILTERS.
2181
2182         Tests: fast/filter-image/filter-image.html
2183                fast/filter-image/parse-filter-image.html
2184
2185         * CMakeLists.txt: Added new files to build systems.
2186         * GNUmakefile.list.am:
2187         * Target.pri:
2188         * WebCore.vcxproj/WebCore.vcxproj:
2189         * WebCore.xcodeproj/project.pbxproj:
2190         * css/CSSAllInOne.cpp:
2191         * css/CSSCrossfadeValue.cpp: Share code together with CSSFilterImageValue
2192             in CSSImageGeneratorValue.cpp.
2193         (WebCore::CSSCrossfadeValue::isPending):
2194         (WebCore::CSSCrossfadeValue::loadSubimages):
2195         * css/CSSFilterImageValue.cpp: Added.
2196         (WebCore::CSSFilterImageValue::~CSSFilterImageValue):
2197         (WebCore::CSSFilterImageValue::customCssText):
2198         (WebCore::CSSFilterImageValue::fixedSize):
2199         (WebCore::CSSFilterImageValue::isPending):
2200         (WebCore::CSSFilterImageValue::knownToBeOpaque):
2201         (WebCore::CSSFilterImageValue::loadSubimages):
2202         (WebCore::CSSFilterImageValue::image):
2203         (WebCore::CSSFilterImageValue::filterImageChanged):
2204         (WebCore::CSSFilterImageValue::createFilterOperations):
2205         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::imageChanged):
2206         (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources):
2207         (WebCore::CSSFilterImageValue::equals):
2208         * css/CSSFilterImageValue.h: Added.
2209         (WebCore::CSSFilterImageValue::create):
2210         (WebCore::CSSFilterImageValue::isFixedSize):
2211         (WebCore::CSSFilterImageValue::CSSFilterImageValue):
2212         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::FilterSubimageObserverProxy):
2213         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::~FilterSubimageObserverProxy):
2214         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::setReady):
2215         * css/CSSImageGeneratorValue.cpp: Shared code between CSSCrossfadeValue and
2216             CSSFilterImageValue.
2217         (WebCore::CSSImageGeneratorValue::image):
2218         (WebCore::CSSImageGeneratorValue::isFixedSize):
2219         (WebCore::CSSImageGeneratorValue::fixedSize):
2220         (WebCore::CSSImageGeneratorValue::isPending):
2221         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
2222         (WebCore::CSSImageGeneratorValue::loadSubimages):
2223         (WebCore::CSSImageGeneratorValue::subimageIsPending):
2224         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
2225         * css/CSSImageGeneratorValue.h:
2226         * css/CSSParser.cpp: Added parsing information for new image function.
2227         (WebCore::CSSParser::parseValue):
2228         (WebCore::CSSParser::isGeneratedImageValue):
2229         (WebCore::CSSParser::parseGeneratedImage):
2230         (WebCore::CSSParser::parseFilterImage):
2231         (WebCore::CSSParser::parseFilter):
2232         * css/CSSParser.h:
2233         * css/CSSValue.cpp:
2234         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
2235         (WebCore::CSSValue::equals):
2236         (WebCore::CSSValue::cssText):
2237         (WebCore::CSSValue::destroy):
2238         * css/CSSValue.h:
2239         (WebCore::CSSValue::isFilterImageValue):
2240         * css/StyleResolver.cpp:
2241         (WebCore::StyleResolver::applyProperty):
2242         (WebCore::StyleResolver::generatedOrPendingFromValue):
2243         (WebCore::StyleResolver::createFilterOperations):
2244         * css/StyleResolver.h: StyleResolver needs to be passed to
2245             CSSFilterImageValue in order to resolve blur() and
2246             drop-shadow() function. Both needs to be resolved together
2247             with all other properties and can't be done earlier or later.
2248         * rendering/FilterEffectRenderer.cpp:
2249         (WebCore::FilterEffectRenderer::build): Pass an argument whether the
2250             intermediate filter results should be clipped or not. The filter
2251             property for instance doesn't clip but scales the intermediate
2252             image sizes.
2253         * rendering/FilterEffectRenderer.h:
2254
2255 2013-08-15  Filip Pizlo  <fpizlo@apple.com>
2256
2257         Unreviewed, fix bindings tests after http://trac.webkit.org/changeset/154127
2258
2259         * bindings/scripts/test/JS/JSTestCallback.cpp:
2260         (WebCore::JSTestCallback::callbackWithArrayParam):
2261         * bindings/scripts/test/JS/JSTestCallback.h:
2262         * bindings/scripts/test/JS/JSTestObj.cpp:
2263         (WebCore::setJSTestObjTypedArrayAttr):
2264         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2265         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
2266         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2267         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
2268         * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
2269         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2270         * bindings/scripts/test/TestTypedArray.idl: Removed.
2271
2272 2013-08-15  Ryosuke Niwa  <rniwa@webkit.org>
2273
2274         Qt minimum build fix after r154116.
2275
2276         * page/FrameView.cpp:
2277         (WebCore::FrameView::sendResizeEventIfNeeded):
2278
2279 2013-08-14  Filip Pizlo  <fpizlo@apple.com>
2280
2281         Typed arrays should be rewritten
2282         https://bugs.webkit.org/show_bug.cgi?id=119064
2283
2284         Reviewed by Oliver Hunt.
2285
2286         Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
2287         client of them. There is only one layering violation: WebCore installs a
2288         WebCoreTypedArrayController on VM, which makes the
2289         ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
2290         JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
2291         alive but if ArrayBuffer is kept alive from native code then the
2292         JSArrayByffer may die. WebCoreTypedArrayController will keep the
2293         JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
2294         
2295         To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
2296         changed to make most references to wrappers refer to JSObject* rather than
2297         JSDOMWrapper*.
2298         
2299         Array buffer views are now transient; the JS array buffer view wrappers
2300         don't own them or keep them alive. This required a bunch of changes to make
2301         bindings code use RefPtr<ArrayBufferView> to hold onto their views.
2302         
2303         Also there is a bunch of new code to make JSC-provided array buffers and
2304         views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
2305         
2306         Finally, the DataView API is now completely different: the JSDataView
2307         provides the same user-visible JS API but using its own internal magic; the
2308         C++ code that uses DataView now uses a rather different API that is not
2309         aware of usual DOM semantics, since it's in JSC and not WebCore. It's
2310         equally useful for all of WebCore's purposes, but some code had to change
2311         to adapt the new conventions.
2312         
2313         Some tests have been changed or rebased due to changes in behavior, that
2314         bring us into conformance with where the standards are going and allow us to
2315         match Firefox behavior.
2316
2317         Automake work and some additional GTK changes courtesy of
2318         Zan Dobersek <zdobersek@igalia.com>.
2319         
2320         Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.
2321
2322         * CMakeLists.txt:
2323         * DerivedSources.make:
2324         * ForwardingHeaders/runtime/DataView.h: Added.
2325         * ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
2326         * ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
2327         * ForwardingHeaders/runtime/JSDataView.h: Added.
2328         * ForwardingHeaders/runtime/JSTypedArrays.h: Added.
2329         * ForwardingHeaders/runtime/TypedArrayController.h: Added.
2330         * ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
2331         * ForwardingHeaders/runtime/TypedArrays.h: Added.
2332         * GNUmakefile.list.am:
2333         * Modules/webaudio/RealtimeAnalyser.h:
2334         * Target.pri:
2335         * UseJSC.cmake:
2336         * WebCore.exp.in:
2337         * WebCore.vcxproj/WebCore.vcxproj:
2338         * WebCore.xcodeproj/project.pbxproj:
2339         * bindings/js/DOMWrapperWorld.h:
2340         * bindings/js/JSArrayBufferCustom.cpp: Removed.
2341         * bindings/js/JSArrayBufferViewHelper.h: Removed.
2342         * bindings/js/JSAudioContextCustom.cpp:
2343         * bindings/js/JSBindingsAllInOne.cpp:
2344         * bindings/js/JSBlobCustom.cpp:
2345         * bindings/js/JSCSSRuleCustom.cpp:
2346         (WebCore::toJS):
2347         * bindings/js/JSCSSValueCustom.cpp:
2348         (WebCore::toJS):
2349         * bindings/js/JSCryptoCustom.cpp:
2350         (WebCore::JSCrypto::getRandomValues):
2351         * bindings/js/JSDOMBinding.h:
2352         (WebCore::wrapperOwner):
2353         (WebCore::wrapperContext):
2354         (WebCore::getInlineCachedWrapper):
2355         (WebCore::setInlineCachedWrapper):
2356         (WebCore::clearInlineCachedWrapper):
2357         (WebCore::getCachedWrapper):
2358         (WebCore::cacheWrapper):
2359         (WebCore::uncacheWrapper):
2360         (WebCore::wrap):
2361         (WebCore::toJS):
2362         (WebCore::toArrayBufferView):
2363         (WebCore::toInt8Array):
2364         (WebCore::toInt16Array):
2365         (WebCore::toInt32Array):
2366         (WebCore::toUint8Array):
2367         (WebCore::toUint8ClampedArray):
2368         (WebCore::toUint16Array):
2369         (WebCore::toUint32Array):
2370         (WebCore::toFloat32Array):
2371         (WebCore::toFloat64Array):
2372         (WebCore::toDataView):
2373         * bindings/js/JSDataViewCustom.cpp: Removed.
2374         * bindings/js/JSDictionary.cpp:
2375         * bindings/js/JSDictionary.h:
2376         * bindings/js/JSDocumentCustom.cpp:
2377         (WebCore::JSDocument::location):
2378         (WebCore::toJS):
2379         * bindings/js/JSEventCustom.cpp:
2380         (WebCore::toJS):
2381         * bindings/js/JSFileReaderCustom.cpp:
2382         * bindings/js/JSHTMLCollectionCustom.cpp:
2383         (WebCore::toJS):
2384         * bindings/js/JSHTMLTemplateElementCustom.cpp:
2385         (WebCore::JSHTMLTemplateElement::content):
2386         * bindings/js/JSImageDataCustom.cpp:
2387         (WebCore::toJS):
2388         * bindings/js/JSInjectedScriptHostCustom.cpp:
2389         * bindings/js/JSMessageEventCustom.cpp:
2390         * bindings/js/JSMessagePortCustom.cpp:
2391         * bindings/js/JSSVGPathSegCustom.cpp:
2392         (WebCore::toJS):
2393         * bindings/js/JSStyleSheetCustom.cpp:
2394         (WebCore::toJS):
2395         * bindings/js/JSTrackCustom.cpp:
2396         (WebCore::toJS):
2397         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2398         * bindings/js/JSXMLHttpRequestCustom.cpp:
2399         (WebCore::JSXMLHttpRequest::send):
2400         * bindings/js/SerializedScriptValue.cpp:
2401         (WebCore::SerializedScriptValue::transferArrayBuffers):
2402         * bindings/js/WebCoreJSClientData.h:
2403         (WebCore::initNormalWorldClientData):
2404         * bindings/js/WebCoreTypedArrayController.cpp: Added.
2405         (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
2406         (WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
2407         (WebCore::WebCoreTypedArrayController::toJS):
2408         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
2409         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2410         * bindings/js/WebCoreTypedArrayController.h: Added.
2411         (WebCore::WebCoreTypedArrayController::wrapperOwner):
2412         * bindings/scripts/CodeGenerator.pm:
2413         (ForAllParents):
2414         (ParseInterface):
2415         (SkipIncludeHeader):
2416         (IsTypedArrayType):
2417         (IsWrapperType):
2418         * bindings/scripts/CodeGeneratorJS.pm:
2419         (AddIncludesForType):
2420         (GenerateHeader):
2421         (GenerateImplementation):
2422         (GenerateParametersCheck):
2423         (GetNativeType):
2424         (JSValueToNative):
2425         (NativeToJSValue):
2426         (GenerateConstructorDefinition):
2427         (GenerateConstructorHelperMethods):
2428         * fileapi/WebKitBlobBuilder.cpp:
2429         (WebCore::BlobBuilder::append):
2430         * fileapi/WebKitBlobBuilder.h:
2431         * html/canvas/ArrayBuffer.idl: Removed.
2432         * html/canvas/ArrayBufferView.idl: Removed.
2433         * html/canvas/DataView.cpp: Removed.
2434         * html/canvas/DataView.h: Removed.
2435         * html/canvas/DataView.idl: Removed.
2436         * html/canvas/Float32Array.idl: Removed.
2437         * html/canvas/Float64Array.idl: Removed.
2438         * html/canvas/Int16Array.idl: Removed.
2439         * html/canvas/Int32Array.idl: Removed.
2440         * html/canvas/Int8Array.idl: Removed.
2441         * html/canvas/Uint16Array.idl: Removed.
2442         * html/canvas/Uint32Array.idl: Removed.
2443         * html/canvas/Uint8Array.idl: Removed.
2444         * html/canvas/Uint8ClampedArray.idl: Removed.
2445         * html/canvas/WebGLRenderingContext.cpp:
2446         (WebCore::WebGLRenderingContext::readPixels):
2447         (WebCore::WebGLRenderingContext::validateTexFuncData):
2448         * page/Crypto.cpp:
2449         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2450         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2451         (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
2452         * platform/graphics/filters/FECustomFilter.h:
2453         * platform/graphics/filters/FEGaussianBlur.cpp:
2454         * platform/graphics/filters/FilterEffect.cpp:
2455         * testing/MockCDM.cpp:
2456
2457 2013-08-15  Chris Fleizach  <cfleizach@apple.com>
2458
2459         <https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
2460
2461         Reviewed by Darin Adler.
2462
2463         Incorporate review feedback from Darin.
2464
2465         * accessibility/AccessibilityScrollView.cpp:
2466         (WebCore::AccessibilityScrollView::canSetFocusAttribute):
2467         (WebCore::AccessibilityScrollView::isFocused):
2468         * accessibility/AccessibilityScrollView.h:
2469
2470 2013-08-15  Andreas Kling  <akling@apple.com>
2471
2472         <https://webkit.org/b/119826> Page::focusController() should return a reference.
2473
2474         Reviewed by Anders Carlsson.
2475
2476         Page::focusController() is never null so make it return a reference.
2477         Some unnecessary checks were removed as a result.
2478
2479 2013-08-15  Rob Buis  <rwlbuis@webkit.org>
2480
2481         ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
2482         https://bugs.webkit.org/show_bug.cgi?id=116979
2483
2484         Reviewed by Alexey Proskuryakov.
2485
2486         Make constructors private since only ::create should use them.
2487
2488         * html/shadow/MeterShadowElement.h:
2489         * html/shadow/ProgressShadowElement.h:
2490
2491 2013-08-15  Tim Horton  <timothy_horton@apple.com>
2492
2493         FrameView should have an isMainFrameView()
2494         https://bugs.webkit.org/show_bug.cgi?id=119435
2495
2496         Reviewed by Simon Fraser.
2497
2498         No new tests, just refactoring.
2499
2500         * page/FrameView.cpp:
2501         (WebCore::FrameView::FrameView):
2502         (WebCore::FrameView::isMainFrameView):
2503         (WebCore::FrameView::setFrameRect):
2504         (WebCore::FrameView::createScrollbar):
2505         (WebCore::FrameView::applyOverflowToViewport):
2506         (WebCore::FrameView::setHeaderHeight):
2507         (WebCore::FrameView::setFooterHeight):
2508         (WebCore::FrameView::minimumScrollPosition):
2509         (WebCore::FrameView::maximumScrollPosition):
2510         (WebCore::FrameView::performPostLayoutTasks):
2511         (WebCore::FrameView::sendResizeEventIfNeeded):
2512         (WebCore::FrameView::pagination):
2513         (WebCore::FrameView::visibleContentScaleFactor):
2514         (WebCore::FrameView::setVisibleScrollerThumbRect):
2515         (WebCore::FrameView::scrollbarStyleChanged):
2516         (WebCore::FrameView::paintScrollCorner):
2517         (WebCore::FrameView::paintScrollbar):
2518         (WebCore::FrameView::paintOverhangAreas):
2519         * page/FrameView.h:
2520         Add isMainFrameView and adopt it wherever we were previously checking if
2521         the FrameView's frame was the same as its page's main frame.
2522
2523 2013-08-15  Andy Estes  <aestes@apple.com>
2524
2525         <https://webkit.org/b/119853> REGRESSION (r139343): WebKit crashes when canceling a load inside webView:resource:didFinishLoadingFromDataSource:
2526
2527         Reviewed by Brady Eidson.
2528
2529         A client implementing webView:resource:didFinishLoadingFromDataSource:
2530         might decide to call stopLoading: for the identifier that just finished
2531         loading. If this happens we re-enter the loader and attempt to cancel a
2532         load that has already finished and been removed from the set of active
2533         loaders. Prevent this by clearing DocumentLoader's
2534         m_identifierForLoadWithoutResourceLoader before calling
2535         dispatchDidFinishLoading().
2536
2537         New API test: WebKit1.StopLoadingFromDidFinishLoading.
2538
2539         * loader/DocumentLoader.cpp:
2540         (WebCore::DocumentLoader::finishedLoading): Set
2541         m_identifierForLoadWithoutResourceLoader to 0 before calling
2542         dispatchDidFinishLoading().
2543
2544 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
2545
2546         [Mac] Remove "legacy" media UI
2547         https://bugs.webkit.org/show_bug.cgi?id=119752
2548
2549         Reviewed by Jer Noble.
2550
2551         * WebCore.exp.in: Remove _wkMediaControllerThemeAvailable.
2552
2553         * platform/mac/WebCoreSystemInterface.h: Update for API change.
2554         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2555
2556         * rendering/RenderThemeMac.h: Don't override hasOwnDisabledStateHandlingFor.
2557         * rendering/RenderThemeMac.mm:
2558         (WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Remove code to deal with legacy theme.
2559         (WebCore::getUnzoomedRectAndAdjustCurrentContext): Ditto.
2560         (WebCore::RenderThemeMac::paintMediaFullscreenButton): wkDrawMediaUIPart doesn't need to know
2561             the current theme.
2562         (WebCore::RenderThemeMac::paintMediaMuteButton): Ditto.
2563         (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
2564         (WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto.
2565         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto.
2566         (WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto.
2567         (WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto.
2568         (WebCore::RenderThemeMac::paintMediaRewindButton): Ditto.
2569         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
2570         (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
2571         (WebCore::RenderThemeMac::paintMediaCurrentTime): Ditto.
2572         (WebCore::RenderThemeMac::paintMediaTimeRemaining): Ditto.
2573         (WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): Ditto.
2574         (WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): Ditto.
2575         (WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): Ditto.
2576         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack): Ditto.
2577         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb): Ditto.
2578         (WebCore::RenderThemeMac::extraMediaControlsStyleSheet): We only have one theme.
2579         (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Ditto.
2580         (WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Ditto.
2581
2582 2013-08-15  Antti Koivisto  <antti@apple.com>
2583
2584         <https://webkit.org/b/119834> Remove ElementShadow
2585
2586         Reviewed by Anders Carlsson.
2587
2588         It is 1:1 with ShadowRoot and has virtually no functionality. What little there is can be moved to ShadowRoot or Element.
2589
2590         * CMakeLists.txt:
2591         * GNUmakefile.list.am:
2592         * Target.pri:
2593         * WebCore.exp.in:
2594         * WebCore.xcodeproj/project.pbxproj:
2595         * css/StyleResolver.cpp:
2596         (WebCore::StyleResolver::locateCousinList):
2597         * css/StyleScopeResolver.cpp:
2598         (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
2599         (WebCore::StyleScopeResolver::matchHostRules):
2600         * dom/ComposedShadowTreeWalker.cpp:
2601         (WebCore::nodeCanBeDistributed):
2602         (WebCore::ComposedShadowTreeWalker::traverseChild):
2603         * dom/ContainerNode.cpp:
2604         (WebCore::childAttachedAllowedWhenAttachingChildren):
2605         * dom/ContainerNodeAlgorithms.cpp:
2606         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
2607         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
2608         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
2609         (WebCore::assertConnectedSubrameCountIsConsistent):
2610         * dom/ContainerNodeAlgorithms.h:
2611         (WebCore::ChildFrameDisconnector::collectFrameOwners):
2612         * dom/DOMAllInOne.cpp:
2613         * dom/Document.cpp:
2614         * dom/Element.cpp:
2615         (WebCore::Element::~Element):
2616         (WebCore::Element::attach):
2617         (WebCore::Element::detach):
2618         (WebCore::Element::shadowRoot):
2619         (WebCore::Element::didAffectSelector):
2620         (WebCore::Element::addShadowRoot):
2621         (WebCore::Element::removeShadowRoot):
2622         
2623             Move addShadowRoot and removeShadowRoot here from ElementShadow.
2624
2625         (WebCore::Element::createShadowRoot):
2626         (WebCore::Element::authorShadowRoot):
2627         (WebCore::Element::userAgentShadowRoot):
2628         (WebCore::Element::ensureUserAgentShadowRoot):
2629         (WebCore::Element::childrenChanged):
2630         (WebCore::Element::removeAllEventListeners):
2631         * dom/Element.h:
2632         (WebCore::isShadowHost):
2633         * dom/ElementRareData.h:
2634         (WebCore::ElementRareData::clearShadowRoot):
2635         (WebCore::ElementRareData::shadowRoot):
2636         (WebCore::ElementRareData::setShadowRoot):
2637         (WebCore::ElementRareData::~ElementRareData):
2638         * dom/ElementShadow.cpp: Removed.
2639         * dom/ElementShadow.h: Removed.
2640         * dom/EventDispatcher.cpp:
2641         * dom/EventPathWalker.cpp:
2642         (WebCore::EventPathWalker::moveToParent):
2643         * dom/Node.cpp:
2644         (WebCore::Node::needsShadowTreeWalkerSlow):
2645         * dom/NodeRenderingContext.cpp:
2646         * dom/NodeRenderingContext.h:
2647         * dom/ShadowRoot.cpp:
2648         (WebCore::ShadowRoot::attach):
2649         (WebCore::ShadowRoot::detach):
2650         
2651             Move attached() tests from ElementShadow.
2652
2653         (WebCore::ShadowRoot::childrenChanged):
2654         (WebCore::ShadowRoot::removeAllEventListeners):
2655         
2656             Move here from ElementShadow.
2657
2658         * dom/ShadowRoot.h:
2659         (WebCore::Node::shadowRoot):
2660         * dom/TreeScopeAdopter.cpp:
2661         * html/ColorInputType.cpp:
2662         (WebCore::ColorInputType::createShadowSubtree):
2663         * html/FileInputType.cpp:
2664         (WebCore::FileInputType::createShadowSubtree):
2665         (WebCore::FileInputType::disabledAttributeChanged):
2666         (WebCore::FileInputType::multipleAttributeChanged):
2667         * html/HTMLFormControlElement.cpp:
2668         * html/HTMLImageElement.cpp:
2669         (WebCore::HTMLImageElement::canStartSelection):
2670         * html/HTMLInputElement.cpp:
2671         (WebCore::HTMLInputElement::updateType):
2672         * html/HTMLKeygenElement.cpp:
2673         * html/HTMLMediaElement.cpp:
2674         * html/HTMLTextAreaElement.cpp:
2675         * html/InputType.cpp:
2676         * html/RangeInputType.cpp:
2677         (WebCore::RangeInputType::handleMouseDownEvent):
2678         (WebCore::RangeInputType::createShadowSubtree):
2679         * html/TextFieldInputType.cpp:
2680         (WebCore::TextFieldInputType::createShadowSubtree):
2681         * html/ValidationMessage.cpp:
2682         * html/shadow/ContentDistributor.cpp:
2683         (WebCore::ContentDistributor::distribute):
2684         (WebCore::ContentDistributor::ensureDistribution):
2685         * html/shadow/ContentDistributor.h:
2686         (WebCore::ContentDistributor::isValid):
2687         * html/shadow/InsertionPoint.cpp:
2688         (WebCore::InsertionPoint::childrenChanged):
2689         (WebCore::InsertionPoint::insertedInto):
2690         (WebCore::InsertionPoint::removedFrom):
2691         (WebCore::resolveReprojection):
2692         * html/shadow/InsertionPoint.h:
2693         (WebCore::shadowRootOfParentForDistribution):
2694         * html/shadow/SliderThumbElement.cpp:
2695         * inspector/InspectorDOMAgent.cpp:
2696         (WebCore::InspectorDOMAgent::unbind):
2697         (WebCore::InspectorDOMAgent::buildObjectForNode):
2698         * page/FocusController.cpp:
2699         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
2700         * rendering/RenderFileUploadControl.cpp:
2701         (WebCore::RenderFileUploadControl::uploadButton):
2702         * rendering/RenderTheme.cpp:
2703         * style/StyleResolveTree.cpp:
2704         (WebCore::Style::resolveTree):
2705         * svg/SVGTRefElement.cpp:
2706         (WebCore::SVGTRefElement::updateReferencedText):
2707         (WebCore::SVGTRefElement::detachTarget):
2708         * svg/SVGUseElement.cpp:
2709         (WebCore::SVGUseElement::clearResourceReferences):
2710         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2711         (WebCore::SVGUseElement::buildShadowTree):
2712         * testing/Internals.cpp:
2713         (WebCore::Internals::ensureShadowRoot):
2714         (WebCore::Internals::shadowRoot):
2715
2716 2013-08-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2717
2718         [Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
2719         https://bugs.webkit.org/show_bug.cgi?id=118532
2720
2721         Reviewed by Jocelyn Turcotte.
2722
2723         We don't need to allocate FontPlatformData on the heap
2724         since getCachedFontData makes a deep copy anyway.
2725
2726         * platform/graphics/qt/FontCacheQt.cpp:
2727         (WebCore::FontCache::getLastResortFallbackFont):
2728
2729 2013-08-15  Rob Buis  <rwlbuis@webkit.org>
2730
2731         ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
2732         https://bugs.webkit.org/show_bug.cgi?id=116979
2733
2734         Reviewed by Antti Koivisto.
2735
2736         Make sure adoptRef is called before calling setPseudo, for all progress shadow elements.
2737
2738         * html/shadow/ProgressShadowElement.cpp:
2739         (WebCore::ProgressInnerElement::ProgressInnerElement):
2740         (WebCore::ProgressBarElement::ProgressBarElement):
2741         (WebCore::ProgressValueElement::ProgressValueElement):
2742         * html/shadow/ProgressShadowElement.h:
2743         (WebCore::ProgressInnerElement::create):
2744         (WebCore::ProgressBarElement::create):
2745         (WebCore::ProgressValueElement::create):
2746
2747 2013-08-14  Ryuan Choi  <ryuan.choi@samsung.com>
2748
2749         <https://webkit.org/b/119786> [EFL] decoration of search type is different from other platforms
2750
2751         Reviewed by Gyuyoung Kim.
2752
2753         Other platforms except EFL port draw a magnifying icon for
2754         -webkit-search-results-button and -webkit-search-results-decoration in search field,
2755         but Efl port draws it for -webkit-search-decoration.
2756
2757         This patch makes Efl port draw icon in first two cases like other ports.
2758
2759         Tests: fast/css/input-search-padding.html
2760            fast/css/text-input-with-webkit-border-radius.html
2761            fast/css/text-overflow-input.html
2762            fast/forms/box-shadow-override.html
2763            fast/forms/control-restrict-line-height.html
2764            fast/forms/input-appearance-height.html
2765            fast/forms/placeholder-position.html
2766            fast/forms/placeholder-pseudo-style.html
2767            fast/forms/search-cancel-button-style-sharing.html
2768            fast/forms/search-display-none-cancel-button.html
2769            fast/forms/search-rtl.html
2770            fast/forms/search-vertical-alignment.html
2771            fast/forms/searchfield-heights.html
2772            fast/repaint/search-field-cancel.html
2773
2774         * platform/efl/DefaultTheme/widget/search/cancel/search_cancel.edc:
2775         Moved results_button alias to search_decoration.edc
2776         * platform/efl/DefaultTheme/widget/search/decoration/search_decoration.edc:
2777         * platform/efl/RenderThemeEfl.cpp:
2778         Updated size of ResultsButtonStyle and ResultsDecorationStyle to show icon.
2779         In addition, removed adjustSearchFieldResultsButtonStyle and paintSearchFieldDecoration.
2780         (WebCore::toEdjeGroup): Removed decoration group.
2781         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
2782         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle):
2783         * platform/efl/RenderThemeEfl.h:
2784
2785 2013-08-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2786
2787         [CSS] Introduce new structure to pass image orientation values.
2788         https://bugs.webkit.org/show_bug.cgi?id=119418
2789
2790         Reviewed by Beth Dakin.
2791
2792         Add a ImageOrientationDescription struct in order to reduce count of argument for
2793         image orientation.
2794
2795         No new tests, no behavior change.
2796
2797         * html/HTMLCanvasElement.cpp:
2798         (WebCore::HTMLCanvasElement::paint):
2799         * page/DragController.cpp:
2800         (WebCore::DragController::doImageDrag):
2801         * page/Frame.cpp:
2802         (WebCore::Frame::nodeImage):
2803         (WebCore::Frame::dragImageForSelection):
2804         * platform/DragImage.h:
2805         * platform/blackberry/DragImageBlackBerry.cpp:
2806         (WebCore::createDragImageFromImage):
2807         * platform/efl/DragImageEfl.cpp:
2808         (WebCore::createDragImageFromImage):
2809         * platform/graphics/BitmapImage.cpp:
2810         (WebCore::BitmapImage::updateSize):
2811         * platform/graphics/BitmapImage.h:
2812         * platform/graphics/GraphicsContext.cpp:
2813         (WebCore::GraphicsContext::drawImage):
2814         * platform/graphics/GraphicsContext.h:
2815         * platform/graphics/Image.cpp:
2816         (WebCore::Image::draw):
2817         * platform/graphics/Image.h:
2818         * platform/graphics/ImageOrientation.h:
2819         (WebCore::ImageOrientationDescription::ImageOrientationDescription):
2820         (WebCore::ImageOrientationDescription::respectImageOrientation):
2821         (WebCore::ImageOrientationDescription::imageOrientation):
2822         * platform/graphics/ImageSource.cpp:
2823         (WebCore::ImageSource::size):
2824         (WebCore::ImageSource::frameSizeAtIndex):
2825         * platform/graphics/ImageSource.h:
2826         * platform/graphics/blackberry/ImageBlackBerry.cpp:
2827         (WebCore::BitmapImage::draw):
2828         * platform/graphics/cairo/BitmapImageCairo.cpp:
2829         (WebCore::BitmapImage::draw):
2830         * platform/graphics/cairo/ImageBufferCairo.cpp:
2831         (WebCore::ImageBuffer::draw):
2832         * platform/graphics/cg/BitmapImageCG.cpp:
2833         (WebCore::BitmapImage::draw):
2834         * platform/graphics/cg/ImageSourceCG.cpp:
2835         (WebCore::ImageSource::frameSizeAtIndex):
2836         (WebCore::ImageSource::size):
2837         (WebCore::ImageSource::frameBytesAtIndex):
2838         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2839         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2840         * platform/graphics/qt/ImageBufferQt.cpp:
2841         (WebCore::ImageBuffer::draw):
2842         * platform/graphics/wince/ImageBufferWinCE.cpp:
2843         (WebCore::ImageBuffer::draw):
2844         * platform/gtk/ClipboardGtk.cpp:
2845         (WebCore::Clipboard::createDragImage):
2846         * platform/gtk/DragImageGtk.cpp:
2847         (WebCore::createDragImageFromImage):
2848         * platform/mac/DragImageMac.mm:
2849         (WebCore::createDragImageFromImage):
2850         * platform/qt/ClipboardQt.cpp:
2851         (WebCore::Clipboard::createDragImage):
2852         * platform/qt/DragImageQt.cpp:
2853         (WebCore::createDragImageFromImage):
2854         * platform/win/ClipboardWin.cpp:
2855         (WebCore::Clipboard::createDragImage):
2856         * platform/win/DragImageCGWin.cpp:
2857         (WebCore::createDragImageFromImage):
2858         * platform/win/DragImageCairoWin.cpp:
2859         (WebCore::createDragImageFromImage):
2860         * rendering/RenderEmbeddedObject.cpp:
2861         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2862         * rendering/RenderImage.cpp:
2863         (WebCore::RenderImage::paintReplaced):
2864         (WebCore::RenderImage::paintIntoRect):
2865         * rendering/RenderSnapshottedPlugIn.cpp:
2866         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2867
2868 2013-08-14  Sam Weinig  <sam@webkit.org>
2869
2870         Update binding test results.  Follow up fix for <https://webkit.org/b/119664>
2871
2872         * bindings/scripts/test/JS/JSTestCallback.cpp:
2873         (WebCore::JSTestCallback::JSTestCallback):
2874         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2875         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2876
2877 2013-08-14  Joseph Pecoraro  <pecoraro@apple.com>
2878
2879         <https://webkit.org/b/119810> [Mac] No AutoreleasePool leaks when dragging image out of WebView
2880
2881         Reviewed by Dan Bernstein.
2882
2883         This code was just running a block of code asynchronously using a
2884         pthread. Convert this to use a dispatch block, which does provide
2885         an autorelease pool so there are no leaks and ends up much simpler.
2886
2887         * platform/mac/FileSystemMac.mm:
2888         (WebCore::setMetadataURL):
2889
2890 2013-08-14  Tim Horton  <timothy_horton@apple.com>
2891
2892         Un-inline dataLog dumpers for IntSize and IntPoint
2893         https://bugs.webkit.org/show_bug.cgi?id=119697
2894
2895         Reviewed by Sam Weinig.
2896
2897         Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.
2898
2899         * CMakeLists.txt:
2900         * GNUmakefile.list.am:
2901         * Target.pri:
2902         * WebCore.vcxproj/WebCore.vcxproj:
2903         * WebCore.vcxproj/WebCore.vcxproj.filters:
2904         * WebCore.xcodeproj/project.pbxproj:
2905         * platform/graphics/IntPoint.cpp: Added.
2906         (WebCore::IntPoint::dump):
2907         * platform/graphics/IntPoint.h:
2908         * platform/graphics/IntSize.cpp: Added.
2909         (WebCore::IntSize::dump):
2910         * platform/graphics/IntSize.h:
2911
2912 2013-08-14  Chris Fleizach  <cfleizach@apple.com>
2913
2914         <https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
2915
2916         Reviewed by Tim Horton.
2917
2918         VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls. 
2919         We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.
2920
2921         There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.
2922
2923         * accessibility/AccessibilityScrollView.cpp:
2924         (WebCore::AccessibilityScrollView::canSetFocusAttribute):
2925         (WebCore::AccessibilityScrollView::isFocused):
2926         (WebCore::AccessibilityScrollView::setFocused):
2927         * accessibility/AccessibilityScrollView.h:
2928
2929 2013-08-14  Hans Muller  <hmuller@adobe.com>
2930
2931         [CSS Exclusions] Minimal support for using an image to define a shape
2932         https://bugs.webkit.org/show_bug.cgi?id=116643
2933
2934         Reviewed by Alexandru Chiculita.
2935
2936         This is a first small step towards supporting CSS shapes defined by an
2937         image URL and a alpha channel threshold. To keep the patch as small as
2938         possible, there are many limitations and remaining work items. For
2939         example images are currently restricted to same-origin, although CORS
2940         should be supported. See https://bugs.webkit.org/show_bug.cgi?id=116348
2941         for the current list.
2942
2943         Test: fast/exclusions/shape-inside/shape-inside-image-001.html
2944         Test: fast/exclusions/shape-inside/shape-inside-image-002.html
2945
2946         * CMakeLists.txt:
2947         * GNUmakefile.list.am:
2948         * Target.pri:
2949         * WebCore.vcxproj/WebCore.vcxproj:
2950         * WebCore.xcodeproj/project.pbxproj:
2951         * rendering/RenderBlock.cpp:
2952         (WebCore::RenderBlock::imageChanged): When the image has finished loading, request a layout.
2953         * rendering/RenderBlock.h:
2954         * rendering/RenderObject.cpp:
2955         (WebCore::RenderObject::setStyle): Add notify clients for shape images.
2956         (WebCore::RenderObject::updateShapeImage):
2957         (WebCore::removeShapeImageClient):
2958         (WebCore::RenderObject::arenaDelete): Remove notify clients for shape images.
2959         * rendering/RenderObject.h:
2960         * rendering/shapes/RasterShape.cpp: Added. A Shape defined by thresholding an image's alpha channel.
2961         (WebCore::RasterShapeIntervals::bounds):
2962         (WebCore::RasterShapeIntervals::addInterval): Add a single run to the shape.
2963         (WebCore::alignedRect):
2964         (WebCore::RasterShapeIntervals::getIntervals): Return the shape's runs that fall within a horizonal box.
2965         (WebCore::RasterShape::marginIntervals): Internal representation of the shape with shape-margin factored in.  Currently only a stub.
2966         (WebCore::RasterShape::paddingIntervals): Internal representation of the shape with shape-padding factored in.  Currently only a stub.
2967         (WebCore::RasterShape::getExcludedIntervals):
2968         (WebCore::RasterShape::getIncludedIntervals):
2969         (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
2970         * rendering/shapes/RasterShape.h:
2971         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Internal run length encoded representation of a RasterShape.
2972         (WebCore::RasterShapeIntervals::isEmpty):
2973         (WebCore::RasterShape::RasterShape):
2974         * rendering/shapes/Shape.cpp:
2975         (WebCore::Shape::createShape): Support for creating a Shape based on a RasterShapeIntervals object.
2976         * rendering/shapes/Shape.h:
2977         * rendering/shapes/ShapeInfo.cpp:
2978         (WebCore::::computedShape): Added support for the Image ShapeValue type.
2979         * rendering/shapes/ShapeInsideInfo.cpp:
2980         (WebCore::ShapeInsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
2981         * rendering/shapes/ShapeOutsideInfo.cpp:
2982         (WebCore::ShapeOutsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
2983         * rendering/style/ShapeValue.h:
2984         (WebCore::ShapeValue::isImageValid): True if the shape's image is ready to be be processed.
2985
2986 2013-08-14  Alexandru Chiculita  <achicu@adobe.com>
2987
2988         [CSS Regions] RenderRegions should have a RenderLayer+Backing when they contain a Composited RenderLayer
2989         https://bugs.webkit.org/show_bug.cgi?id=117365
2990
2991         Reviewed by David Hyatt.
2992
2993         After the RenderFlowThread has a new layout we need to check if any of the children layers
2994         had been moved to a new render region. We are only checking for the first level of layers,
2995         as they are the only ones supported right now. Also, added code to make Regions require a layer
2996         based on the layers that fit in their clipping area.
2997
2998         Tests: fast/regions/layers/dynamic-layer-added-with-no-layout.html
2999                fast/regions/layers/dynamic-layer-removed-with-no-layout.html
3000                fast/regions/layers/float-region-promoted-to-layer.html
3001                fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html
3002                fast/regions/layers/regions-promoted-to-layers-vertical-lr.html
3003                fast/regions/layers/regions-promoted-to-layers-vertical-rl.html
3004                fast/regions/layers/regions-promoted-to-layers.html
3005
3006         * rendering/FlowThreadController.cpp:
3007         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded): Iterate on all the flow threads and updateLayerToRegionMappings if needed. 
3008         * rendering/FlowThreadController.h:
3009         * rendering/RenderBlock.cpp:
3010         (WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer): Checks if the FloatingObject
3011         needs to be painted by the current block or not.
3012         (WebCore::RenderBlock::updateFloatingObjectsPaintingContainer): Helper function to lookup what is the right
3013         container that would need to paint a FloatingObject.
3014         (WebCore::RenderBlock::updateAllDescendantsFloatingObjectsPaintingContainer):
3015         * rendering/RenderBlock.h:
3016         * rendering/RenderBox.cpp:
3017         (WebCore::RenderBox::outermostBlockContainingFloatingObject): Looks up the ancestor RenderBlock that contains all
3018         the FloatingObjects of a float.
3019         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): Extracted the code for outermostBlockContainingFloatingObject
3020         into its own method.
3021         (WebCore::RenderBox::updatePaintingContainerForFloatingObject): Helper method to update the "m_shouldPaint" flag
3022         of all the FloatingObjects created for a floating RenderObject. Normally, that flag is maintained during layout,
3023         but we need to patch it for the floating RenderRegions after the layout is already finished.
3024         (WebCore::RenderBox::updateLayerIfNeeded): Overwrite of the RenderLayerModelObject::updateLayerIfNeeded that is also
3025         calling updatePaintingContainerForFloatingObject if a new layer was created or destroyed.
3026         * rendering/RenderBox.h:
3027         * rendering/RenderFlowThread.cpp:
3028         (WebCore::RenderFlowThread::layout): Added code to call updateLayerToRegionMappings when needed.
3029         (WebCore::RenderFlowThread::regionForCompositedLayer): Looks up the first RenderRegion to display a specific layer.
3030         It only cares about the top most point of the element and ignores transforms.
3031         (WebCore::RenderFlowThread::updateRegionForRenderLayer): Helper method to update the mapped region of a layer.
3032         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Iterates all the first level layers of the flow thread
3033         and updates the region. Will return true if there was any change.
3034         * rendering/RenderFlowThread.h:
3035         * rendering/RenderLayer.cpp:
3036         (WebCore::RenderLayer::dirtyZOrderLists): When new layers are added or removed we need to update the layer map in the flow thread.
3037         (WebCore::RenderLayer::dirtyNormalFlowList):
3038         (WebCore::RenderLayer::shouldBeNormalFlowOnly): CSS Regions might become layers because they contain RenderLayers,
3039         but they should not become stacking contexts for that reason. This will prevent the RenderRegions from rendering
3040         in front of other layers.
3041         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
3042         * rendering/RenderLayerCompositor.cpp:
3043         (WebCore::RenderLayerCompositor::updateCompositingLayers): Call updateRenderFlowThreadLayersIfNeeded when there's a layer hierarchy update.
3044         (WebCore::RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded): Update the render flow thread layer maps when they are dirty.
3045         * rendering/RenderLayerCompositor.h:
3046         * rendering/RenderLayer.h:
3047         (WebCore::RenderLayer::isDirtyRenderFlowThread): Used to check if the RenderLayers had changed their order,
3048         so that we can update the list of layers associated with a region. In a following patch we will need to 
3049         rebuild the composited layers.
3050         * rendering/RenderLayerModelObject.cpp:
3051         (WebCore::RenderLayerModelObject::updateLayerIfNeeded): Adds or removes a layer when the "requiresLayer" changes
3052         after the styleDidChange already happened. This is needed for Regions as we only know if they still require a layer,
3053         only after the content of the flow thread is computed.
3054         * rendering/RenderLayerModelObject.h:
3055         * rendering/RenderRegion.cpp:
3056         (WebCore::RenderRegion::RenderRegion):
3057         (WebCore::RenderRegion::setRequiresLayerForCompositing):
3058         * rendering/RenderRegion.h:
3059         (WebCore::RenderRegion::requiresLayer):
3060         * rendering/RenderTreeAsText.cpp:
3061         (WebCore::writeRenderRegionList): Updated the output to print the fact that the layer has a layer.
3062
3063 2013-08-14  Bem Jones-Bey  <bjonesbe@adobe.com>
3064
3065         Finish making FloatingObject a real class with private members
3066         https://bugs.webkit.org/show_bug.cgi?id=119807
3067
3068         This is a port from Blink of
3069         http://src.chromium.org/viewvc/blink?view=revision&revision=155964
3070         Original patch by Eric Seidel.
3071
3072         From his comments on the Blink change:
3073
3074         Previously FloatingObject was in a half-done state where it had
3075         accessors for many members, but also many members were public.
3076
3077         This CL makes all members private and adds the necessary remaining
3078         accessors.
3079
3080         Reviewed by David Hyatt.
3081
3082         No new tests, no behavior change.
3083
3084         * rendering/RenderBlock.cpp:
3085         (WebCore::RenderBlock::deleteLineBoxTree):
3086         (WebCore::RenderBlock::addOverflowFromFloats):
3087         (WebCore::RenderBlock::repaintOverhangingFloats):
3088         (WebCore::RenderBlock::paintFloats):
3089         (WebCore::RenderBlock::selectionGaps):
3090         (WebCore::RenderBlock::insertFloatingObject):
3091         (WebCore::RenderBlock::removeFloatingObject):
3092         (WebCore::RenderBlock::removeFloatingObjectsBelow):
3093         (WebCore::RenderBlock::positionNewFloats):
3094         (WebCore::RenderBlock::clearFloats):
3095         (WebCore::RenderBlock::addOverhangingFloats):
3096         (WebCore::RenderBlock::addIntrudingFloats):
3097         (WebCore::RenderBlock::hitTestFloats):
3098         (WebCore::RenderBlock::adjustForBorderFit):
3099         * rendering/RenderBlock.h:
3100         (WebCore::RenderBlock::FloatingObject::paginationStrut):
3101         (WebCore::RenderBlock::FloatingObject::setPaginationStrut):
3102         (WebCore::RenderBlock::FloatingObject::setRenderer):
3103         (WebCore::RenderBlock::FloatingObject::originatingLine):
3104         (WebCore::RenderBlock::FloatingObject::setOriginatingLine):
3105         (WebCore::RenderBlock::FloatingObjectHashFunctions::hash):
3106         (WebCore::RenderBlock::FloatingObjectHashFunctions::equal):
3107         (WebCore::RenderBlock::FloatingObjectHashTranslator::equal):
3108         * rendering/RenderBlockLineLayout.cpp:
3109         (WebCore::RenderBlock::appendFloatingObjectToLastLine):
3110         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
3111         (WebCore::RenderBlock::linkToEndLineIfNeeded):
3112         (WebCore::RenderBlock::determineStartPosition):
3113         (WebCore::RenderBlock::positionNewFloatOnLine):
3114
3115 2013-08-14  Rob Buis  <rwlbuis@webkit.org>
3116
3117         Assertion failure in RenderObject::drawLineForBoxSide
3118         https://bugs.webkit.org/show_bug.cgi?id=108187
3119
3120         Reviewed by David Hyatt.
3121
3122         Don't draw the outline if the rectangle to draw is empty.
3123
3124         Test: fast/css/outline-negative.html
3125
3126         * rendering/RenderInline.cpp:
3127         (WebCore::RenderInline::paintOutlineForLine):
3128
3129 2013-08-13  Chris Fleizach  <cfleizach@apple.com>
3130
3131         AX: Headings not longer have an AXTitle if they have a link as the only child
3132         https://bugs.webkit.org/show_bug.cgi?id=119699
3133
3134         Reviewed by Anders Carlsson.
3135
3136         Normally, focusable content is not incuded when looking at the visible text of an element.
3137         One case where we need an exception is with headings, where there is usually link content inside the heading
3138         that we want to be used as the visible text.
3139
3140         Test: accessibility/heading-title-includes-links.html
3141
3142         * accessibility/AccessibilityNodeObject.cpp:
3143         (WebCore::AccessibilityNodeObject::visibleText):
3144         (WebCore::shouldUseAccessiblityObjectInnerText):
3145         (WebCore::AccessibilityNodeObject::title):
3146         * accessibility/AccessibilityNodeObject.h:
3147         * accessibility/AccessibilityObject.h:
3148         (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
3149         (WebCore::AccessibilityObject::textUnderElement):
3150         * accessibility/AccessibilityRenderObject.cpp:
3151         (WebCore::AccessibilityRenderObject::textUnderElement):
3152         * accessibility/AccessibilityRenderObject.h:
3153
3154 2013-08-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3155
3156         Move id attribute to parent Element interface
3157         https://bugs.webkit.org/show_bug.cgi?id=119706
3158
3159         Reviewed by Ryosuke Niwa.
3160
3161         Move id attribute from SVGElement / HTMLElement to their Element parent
3162         interface to match the latest DOM specification and avoid duplication:
3163         http://dom.spec.whatwg.org/#dom-element-id
3164
3165         There is no web-exposed behavior change because we haven't moved
3166         properties from instances to their prototype, as per the Web IDL
3167         specification (http://dev.w3.org/2006/webapi/WebIDL/#es-attributes).
3168
3169         Firefox already exposes the id property of Element's prototype.
3170
3171         This patch also drops the comment about returning the empty string when
3172         no id is present (introduced in http://trac.webkit.org/changeset/4417).
3173         This comment is redundant since the id property is already marked to
3174         "reflect" the id attribute. Returning the empty string when the
3175         attribute is not present is the normal behavior when reflecting:
3176         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect
3177
3178         No new test, no web-exposed behavior change.
3179
3180         * dom/Element.idl:
3181         * html/HTMLElement.idl:
3182         * svg/SVGElement.idl:
3183
3184 2013-08-14  Arpita Bahuguna  <a.bah@samsung.com>
3185
3186         createAttribute/setAttributeNode does not properly normalize case
3187         https://bugs.webkit.org/show_bug.cgi?id=90341
3188
3189         Reviewed by Darin Adler.
3190
3191         setAttributeNode() verifies for existing attributes in a case sensitive
3192         manner. Thus, it would add another attribute if specified in a case
3193         different from the existing one. Instead, like setAttribute(), it too
3194         should modify the existing attribute's value.
3195
3196         Tests: fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
3197                fast/dom/Element/setAttributeNode-case-insensitivity.html
3198
3199         * dom/Element.cpp:
3200         (WebCore::Element::setAttributeNode):
3201         Passing the second param (shouldIgnoreAttributeCase) to
3202         findAttributeIndexByNameForAttributeNode() method. We are now letting
3203         findAttributeIndexByNameForAttributeNode() handle the case-sensitive/insensitive
3204         checking.
3205
3206         (WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
3207         * dom/Element.h:
3208         Added shouldIgnoreAttributeCase boolean param to the method. It passes
3209         this on to QualifiedName::matchesIgnoringCaseForLocalName() method.
3210
3211         * dom/QualifiedName.h:
3212         (WebCore::QualifiedName::matchesIgnoringCaseForLocalName):
3213         New method added for doing a case-insensitive comparison based on the
3214         shouldIgnoreCase param passed to this method.
3215
3216 2013-08-14  Gabor Abraham  <abrhm@inf.u-szeged.hu>
3217
3218         [CMake] Fix building with bison-3.0.
3219         https://bugs.webkit.org/show_bug.cgi?id=119788
3220
3221         Reviewed by Zoltan Herczeg.
3222
3223         No new tests, just build fix.
3224
3225         * CMakeLists.txt:
3226
3227 2013-08-14  Rob Buis  <rwlbuis@webkit.org>
3228
3229         ASSERTION FAILED: resultAnimationElement->m_animatedType in WebCore::SVGAnimateElement::calculateAnimatedValue
3230         https://bugs.webkit.org/show_bug.cgi?id=119748
3231
3232         Reviewed by Dirk Schulze.
3233
3234         Avoid animation when attributeType="CSS" is used on an animateTransform.
3235
3236         Tests: svg/animations/animateTransform-translate-attributetype-auto.html
3237                svg/animations/animateTransform-translate-invalid-attributetype.html
3238
3239         * svg/SVGAnimateTransformElement.cpp:
3240         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
3241
3242 2013-08-14  Antti Koivisto  <antti@apple.com>
3243
3244         Try to fix Qt build.
3245         
3246         Not reviewed.
3247
3248         * xml/parser/XMLDocumentParserQt.cpp:
3249         (WebCore::XMLDocumentParser::parseProcessingInstruction):
3250         (WebCore::XMLDocumentParser::parseCdata):
3251         (WebCore::XMLDocumentParser::parseComment):
3252
3253 2013-08-13  Antti Koivisto  <antti@apple.com>
3254
3255         Remove Node::attach() and ContainerNode::attach()
3256         https://bugs.webkit.org/show_bug.cgi?id=119698
3257
3258         Reviewed by Andreas Kling.
3259
3260         Currently attach() is a virtual function on Node. However only Elements have style and so a corresponding 
3261         independent render object. Attaching should be made Element level concept.
3262         
3263         This patch merges Node::attach() and ContainerNode::attach() to Element::attach(). Other related functions
3264         (detach(), reattach(), etc) move similarly.
3265         
3266         Next step here is to make attach non-virtual in common case and move it out from the DOM tree.
3267
3268         * dom/ContainerNode.cpp:
3269         (WebCore::attachChild):
3270         (WebCore::detachChild):
3271         
3272             Temporary helpers. Further refactoring should get rid of these.
3273
3274         (WebCore::ContainerNode::takeAllChildrenFrom):
3275         (WebCore::ContainerNode::removeBetween):
3276         (WebCore::updateTreeAfterInsertion):
3277         * dom/ContainerNode.h:
3278         * dom/Document.cpp:
3279         (WebCore::Document::attach):
3280         (WebCore::Document::detach):
3281         
3282             Copy the relevant parts of the code from base class attach/detach here. It is not much.
3283
3284         * dom/Document.h:
3285         * dom/Element.cpp:
3286         (WebCore::Element::~Element):
3287         
3288             Node destructor no longer detaches.
3289
3290         (WebCore::Element::attachChildren):
3291         (WebCore::Element::attach):
3292         
3293             Combine Node::attach(), ContainerNode::attach() and Element::attach().
3294
3295         (WebCore::Element::detachChildren):
3296         (WebCore::Element::detach):
3297         
3298             Combine Node::detach(), ContainerNode::detach() and Element::detach().
3299
3300         (WebCore::Element::reattach):
3301         (WebCore::Element::reattachIfAttached):
3302         (WebCore::Element::lazyReattach):
3303         (WebCore::Element::lazyAttach):
3304         
3305             This stuff moves from ContainerNode/Node.
3306
3307         * dom/Element.h:
3308         (WebCore::Element::AttachContext::AttachContext):
3309         * dom/ElementShadow.cpp:
3310         (WebCore::ElementShadow::removeShadowRoot):
3311         (WebCore::ElementShadow::attach):
3312         (WebCore::ElementShadow::detach):
3313         * dom/ElementShadow.h:
3314         * dom/Node.cpp:
3315         (WebCore::Node::~Node):
3316         
3317             Assert that we are not attached at this point.
3318
3319         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
3320         * dom/Node.h:
3321         (WebCore::Node::setAttached):
3322         (WebCore::Node::setStyleChange):
3323         
3324             Make available.
3325
3326         * dom/NodeRenderingContext.cpp:
3327         (WebCore::NodeRenderingContext::NodeRenderingContext):
3328         * dom/NodeRenderingContext.h:
3329         * dom/ShadowRoot.cpp:
3330         (WebCore::ShadowRoot::attach):
3331         (WebCore::ShadowRoot::detach):
3332         * dom/ShadowRoot.h:
3333         * dom/Text.cpp:
3334         (WebCore::Text::~Text):
3335         
3336             Node destructor no longer detaches. Add destructor.
3337
3338         (WebCore::Text::createTextRenderersForSiblingsAfterAttachIfNeeded):
3339         
3340             Factor the code that updates sibling text renderers after attach into a function.
3341
3342         (WebCore::Text::attachText):
3343         (WebCore::Text::detachText):
3344         
3345             Text::attachText/detachText replace virtual Node::attach/detach. They do the part of the work text nodes actually ended up doing.
3346
3347         (WebCore::Text::updateTextRenderer):
3348         * dom/Text.h:
3349         * html/HTMLViewSourceDocument.cpp:
3350         (WebCore::HTMLViewSourceDocument::addText):
3351         * html/PluginDocument.cpp:
3352         (WebCore::PluginDocument::detach):
3353         * html/PluginDocument.h:
3354         * html/parser/HTMLConstructionSite.cpp:
3355         (WebCore::executeTask):
3356         * html/shadow/ContentDistributor.cpp:
3357         (WebCore::ContentDistributor::invalidateDistribution):
3358         * html/shadow/InsertionPoint.cpp:
3359         (WebCore::InsertionPoint::attach):
3360         (WebCore::InsertionPoint::detach):
3361         * loader/PlaceholderDocument.cpp:
3362         (WebCore::PlaceholderDocument::attach):
3363         * loader/PlaceholderDocument.h:
3364         * style/StyleResolveTree.cpp:
3365         (WebCore::Style::resolveLocal):
3366         (WebCore::Style::updateTextStyle):
3367         * xml/parser/XMLDocumentParser.cpp:
3368         (WebCore::XMLDocumentParser::exitText):
3369         * xml/parser/XMLDocumentParserLibxml2.cpp:
3370         (WebCore::XMLDocumentParser::processingInstruction):
3371         (WebCore::XMLDocumentParser::cdataBlock):
3372         (WebCore::XMLDocumentParser::comment):
3373         
3374             No need to attach non-rendered nodes.
3375
3376 2013-08-14  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3377
3378         ASSERT(m_frame->view() == this) fails
3379         https://bugs.webkit.org/show_bug.cgi?id=119015
3380
3381         Reviewed by Simon Fraser.
3382
3383         Introduced the method fixedLayoutSizeChanged and made it chack if the view
3384         is attached to the frame before issuing contentsResized.
3385
3386         * page/FrameView.cpp:
3387         (WebCore::FrameView::fixedLayoutSizeChanged):
3388         * page/FrameView.h:
3389         * platform/ScrollView.cpp:
3390         (WebCore::ScrollView::setFixedLayoutSize):
3391         (WebCore::ScrollView::setUseFixedLayout):
3392         (WebCore::ScrollView::fixedLayoutSizeChanged):
3393         * platform/ScrollView.h:
3394
3395 2013-08-13  Sergio Villar Senin  <svillar@igalia.com>
3396
3397         [CSS Grid Layout] Align our grid-line handling with the updated specification
3398         https://bugs.webkit.org/show_bug.cgi?id=113546
3399
3400         Reviewed by Andreas Kling.
3401
3402         From Blink r148091 by <jchaffraix@chromium.org>
3403
3404         This change makes us match the updated specification by making
3405         grid line numbers to always resolve against the
3406         grid-{column|row}-start edge (the previous code would resolve
3407         grid-{column|row}-end grid lines against the grid-{column|row}-end
3408         edge).
3409
3410         To keep feature parity, negative numbers resolve against the
3411         grid-{column|row}-end edge of the 'explicit grid'.
3412
3413         Test: fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html
3414
3415         * rendering/RenderGrid.cpp:
3416         (WebCore::estimatedGridSizeForPosition):
3417         (WebCore::RenderGrid::explicitGridColumnCount): New utility function.
3418         (WebCore::RenderGrid::explicitGridRowCount): Ditto.
3419         (WebCore::RenderGrid::maximumIndexInDirection): Use explicitGridXXXCount().
3420         (WebCore::RenderGrid::resolveGridPositionsFromStyle): Check that row-end > row-start.
3421         (WebCore::RenderGrid::resolveGridPositionFromStyle): Clamp negative values to the first line.
3422         * rendering/RenderGrid.h:
3423         * rendering/style/GridPosition.h:
3424
3425 2013-08-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3426
3427         Add toSVGTextPathElement(), and use it
3428         https://bugs.webkit.org/show_bug.cgi?id=119783
3429
3430         Reviewed by Ryosuke Niwa.
3431
3432         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGTextPathElement*> can
3433         be changed with toSVGTextPathElement().
3434
3435         * rendering/svg/RenderSVGTextPath.cpp:
3436         (WebCore::RenderSVGTextPath::layoutPath):
3437         (WebCore::RenderSVGTextPath::startOffset):
3438         (WebCore::RenderSVGTextPath::exactAlignment):
3439         (WebCore::RenderSVGTextPath::stretchMethod):
3440         * svg/SVGTextPathElement.h:
3441         (WebCore::toSVGTextPathElement):
3442
3443 2013-08-14  Jinwoo Jeong  <jw00.jeong@samsung.com>
3444
3445         FEComponentTransfer could be faster.
3446         https://bugs.webkit.org/show_bug.cgi?id=119671
3447
3448         Reviewed by Christophe Dumez.
3449
3450         Use direct writing to target data instead of calling Uint8ClampedArray::set() function.
3451         This change reduces at least 80% time in the loop of that function.
3452
3453         The Uint8ClampedArray::set() function has index checking code, value checking code and value casting code.
3454         But the index is managed by for loop condition, the value is generated by transferFunction.
3455         And the value is already defined as unsigned char.
3456         Thus all works in Uint8ClampedArray::set() function is redundant.
3457         Removing the call to Uint8ClampedArray::set() function does not reduce stability but improves performance.
3458
3459         * platform/graphics/filters/FEComponentTransfer.cpp:
3460         (WebCore::FEComponentTransfer::platformApplySoftware):
3461
3462 2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3463
3464         The length of scheme is at least five characters even when the scheme has 'web+' prefix
3465         https://bugs.webkit.org/show_bug.cgi?id=119779
3466
3467         Reviewed by Ryosuke Niwa.
3468
3469         The content-scheme handler specification requires that it is SecurityError if the length of
3470         scheme isn't five characters at least, including 'web+' prefix. Thus, we need to check the length
3471         of scheme on the 'web+' scheme.
3472
3473         Spec: http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers
3474
3475         No new tests, just modify existing tests.
3476
3477         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3478         (WebCore::verifyProtocolHandlerScheme):
3479
3480 2013-08-13  Filip Pizlo  <fpizlo@apple.com>
3481
3482         Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
3483         https://bugs.webkit.org/show_bug.cgi?id=119770
3484
3485         Reviewed by Mark Hahnenberg.
3486
3487         No new tests because no new behavior.
3488
3489         * bindings/js/IDBBindingUtilities.cpp:
3490         (WebCore::createIDBKeyFromValue):
3491         * bindings/js/JSAttrCustom.cpp:
3492         (WebCore::JSAttr::visitChildren):
3493         * bindings/js/JSAudioTrackCustom.cpp:
3494         (WebCore::JSAudioTrack::visitChildren):
3495         * bindings/js/JSAudioTrackListCustom.cpp:
3496         (WebCore::JSAudioTrackList::visitChildren):
3497         * bindings/js/JSBlobCustom.cpp:
3498         (WebCore::JSBlobConstructor::constructJSBlob):
3499         * bindings/js/JSCSSRuleCustom.cpp:
3500         (WebCore::JSCSSRule::visitChildren):
3501         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3502         (WebCore::JSCSSStyleDeclaration::visitChildren):
3503         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
3504         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3505         (WebCore::toHTMLCanvasStyle):
3506         * bindings/js/JSCanvasRenderingContextCustom.cpp:
3507         (WebCore::JSCanvasRenderingContext::visitChildren):
3508         * bindings/js/JSDOMBinding.cpp:
3509         (WebCore::valueToDate):
3510         * bindings/js/JSDOMBinding.h:
3511         (WebCore::DOMConstructorObject::createStructure):
3512         (WebCore::getDOMStructure):
3513         (WebCore::toRefPtrNativeArray):
3514         (WebCore::getStaticValueSlotEntryWithoutCaching):
3515         * bindings/js/JSDOMFormDataCustom.cpp:
3516         (WebCore::toHTMLFormElement):
3517         (WebCore::JSDOMFormData::append):
3518         * bindings/js/JSDOMGlobalObject.cpp:
3519         (WebCore::JSDOMGlobalObject::finishCreation):
3520         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
3521         (WebCore::JSDOMGlobalObject::visitChildren):
3522         * bindings/js/JSDOMGlobalObject.h:
3523         (WebCore::JSDOMGlobalObject::info):
3524         (WebCore::JSDOMGlobalObject::createStructure):
3525         (WebCore::getDOMConstructor):
3526         * bindings/js/JSDOMStringListCustom.cpp:
3527         (WebCore::toDOMStringList):
3528         * bindings/js/JSDOMWindowBase.cpp:
3529         (WebCore::JSDOMWindowBase::finishCreation):
3530         (WebCore::toJSDOMWindow):
3531         * bindings/js/JSDOMWindowBase.h:
3532         (WebCore::JSDOMWindowBase::createStructure):
3533         * bindings/js/JSDOMWindowCustom.cpp:
3534         (WebCore::JSDOMWindow::visitChildren):
3535         (WebCore::JSDOMWindow::getOwnPropertySlot):
3536         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
3537         (WebCore::toDOMWindow):
3538         * bindings/js/JSDOMWindowShell.cpp:
3539         (WebCore::JSDOMWindowShell::finishCreation):
3540         * bindings/js/JSDOMWindowShell.h:
3541         (WebCore::JSDOMWindowShell::createStructure):
3542         * bindings/js/JSEventTargetCustom.cpp:
3543         (WebCore::toEventTarget):
3544         * bindings/js/JSHistoryCustom.cpp:
3545         (WebCore::JSHistory::getOwnPropertySlotDelegate):
3546         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
3547         * bindings/js/JSImageConstructor.cpp:
3548         (WebCore::JSImageConstructor::finishCreation):
3549         * bindings/js/JSImageConstructor.h:
3550         (WebCore::JSImageConstructor::createStructure):
3551         * bindings/js/JSInjectedScriptHostCustom.cpp:
3552         (WebCore::JSInjectedScriptHost::isHTMLAllCollection):
3553         (WebCore::JSInjectedScriptHost::type):
3554         (WebCore::JSInjectedScriptHost::functionDetails):
3555         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3556         (WebCore::populateContextMenuItems):
3557         * bindings/js/JSLocationCustom.cpp:
3558         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3559         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
3560         (WebCore::JSLocation::putDelegate):
3561         * bindings/js/JSMessageChannelCustom.cpp:
3562         (WebCore::JSMessageChannel::visitChildren):
3563         * bindings/js/JSMessagePortCustom.cpp:
3564         (WebCore::JSMessagePort::visitChildren):
3565         * bindings/js/JSNodeCustom.cpp:
3566         (WebCore::JSNode::pushEventHandlerScope):
3567         (WebCore::JSNode::visitChildren):
3568         * bindings/js/JSNodeFilterCustom.cpp:
3569         (WebCore::JSNodeFilter::visitChildren):
3570         (WebCore::toNodeFilter):
3571         * bindings/js/JSNodeIteratorCustom.cpp:
3572         (WebCore::JSNodeIterator::visitChildren):
3573         * bindings/js/JSPluginElementFunctions.h:
3574         (WebCore::pluginElementCustomGetOwnPropertySlot):
3575         (WebCore::pluginElementCustomGetOwnPropertyDescriptor):
3576         * bindings/js/JSSVGElementInstanceCustom.cpp:
3577         (WebCore::JSSVGElementInstance::visitChildren):
3578         * bindings/js/JSSharedWorkerCustom.cpp:
3579         (WebCore::JSSharedWorker::visitChildren):
3580         * bindings/js/JSStyleSheetCustom.cpp:
3581         (WebCore::JSStyleSheet::visitChildren):
3582         * bindings/js/JSTextTrackCueCustom.cpp:
3583         (WebCore::JSTextTrackCue::visitChildren):
3584         * bindings/js/JSTextTrackCustom.cpp:
3585         (WebCore::JSTextTrack::visitChildren):
3586         * bindings/js/JSTextTrackListCustom.cpp:
3587         (WebCore::JSTextTrackList::visitChildren):
3588         * bindings/js/JSTrackCustom.cpp:
3589         (WebCore::toTrack):
3590         * bindings/js/JSTreeWalkerCustom.cpp:
3591         (WebCore::JSTreeWalker::visitChildren):
3592         * bindings/js/JSVideoTrackCustom.cpp:
3593         (WebCore::JSVideoTrack::visitChildren):
3594         * bindings/js/JSVideoTrackListCustom.cpp:
3595         (WebCore::JSVideoTrackList::visitChildren):
3596         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3597         (WebCore::JSWebGLRenderingContext::visitChildren):
3598         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
3599         (WebCore::JSWebGLRenderingContext::getProgramParameter):
3600         (WebCore::JSWebGLRenderingContext::getShaderParameter):
3601         (WebCore::JSWebGLRenderingContext::getUniform):
3602         (WebCore::dataFunctionf):
3603         (WebCore::dataFunctioni):
3604         (WebCore::dataFunctionMatrix):
3605         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3606         (WebCore::JSWorkerGlobalScopeBase::finishCreation):
3607         (WebCore::toJSDedicatedWorkerGlobalScope):
3608         (WebCore::toJSSharedWorkerGlobalScope):
3609         * bindings/js/JSWorkerGlobalScopeBase.h:
3610         (WebCore::JSWorkerGlobalScopeBase::createStructure):
3611         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3612         (WebCore::JSWorkerGlobalScope::visitChildren):
3613         * bindings/js/JSXMLHttpRequestCustom.cpp:
3614         (WebCore::JSXMLHttpRequest::visitChildren):
3615         (WebCore::JSXMLHttpRequest::send):
3616         * bindings/js/JSXPathResultCustom.cpp:
3617         (WebCore::JSXPathResult::visitChildren):
3618         * bindings/js/ScriptDebugServer.cpp:
3619         (WebCore::ScriptDebugServer::dispatchDidPause):
3620         * bindings/js/ScriptState.cpp:
3621         (WebCore::domWindowFromScriptState):
3622         (WebCore::scriptExecutionContextFromScriptState):
3623         * bindings/js/SerializedScriptValue.cpp:
3624         (WebCore::CloneSerializer::isArray):
3625         (WebCore::CloneSerializer::dumpArrayBufferView):
3626         (WebCore::CloneSerializer::dumpIfTerminal):
3627         (WebCore::CloneSerializer::serialize):
3628         (WebCore::CloneDeserializer::CloneDeserializer):
3629         (WebCore::CloneDeserializer::readArrayBufferView):
3630         * bindings/objc/DOM.mm:
3631         (+[DOMNode _nodeFromJSWrapper:]):
3632         * bindings/objc/DOMUtility.mm:
3633         (JSC::createDOMWrapper):
3634         * bindings/objc/WebScriptObject.mm:
3635         (+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
3636         * bindings/scripts/CodeGeneratorJS.pm:
3637         (GenerateGetOwnPropertySlotBody):
3638         (GenerateGetOwnPropertyDescriptorBody):
3639         (GenerateHeader):
3640         (GenerateParametersCheckExpression):
3641         (GenerateImplementation):
3642         (GenerateParametersCheck):
3643         (GenerateConstructorDeclaration):
3644         (GenerateConstructorHelperMethods):
3645         * bindings/scripts/test/JS/JSFloat64Array.cpp:
3646         (WebCore::JSFloat64ArrayConstructor::finishCreation):
3647         (WebCore::JSFloat64Array::finishCreation):
3648         (WebCore::JSFloat64Array::getOwnPropertySlot):
3649         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
3650         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
3651         (WebCore::JSFloat64Array::put):
3652         (WebCore::JSFloat64Array::putByIndex):
3653         (WebCore::JSFloat64Array::getOwnPropertyNames):
3654         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
3655         (WebCore::jsFloat64ArrayPrototypeFunctionSet):
3656         (WebCore::JSFloat64Array::getByIndex):
3657         (WebCore::toFloat64Array):
3658         * bindings/scripts/test/JS/JSFloat64Array.h:
3659         (WebCore::JSFloat64Array::createStructure):
3660         (WebCore::JSFloat64ArrayPrototype::createStructure):
3661         (WebCore::JSFloat64ArrayConstructor::createStructure):
3662         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3663         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
3664         (WebCore::JSTestActiveDOMObject::finishCreation):
3665         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
3666         (WebCore::JSTestActiveDOMObject::getOwnPropertyDescriptor):
3667         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
3668         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
3669         (WebCore::toTestActiveDOMObject):
3670         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3671         (WebCore::JSTestActiveDOMObject::createStructure):
3672         (WebCore::JSTestActiveDOMObjectPrototype::createStructure):
3673         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
3674         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3675         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
3676         (WebCore::JSTestCustomNamedGetter::finishCreation):
3677         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
3678         (WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
3679         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
3680         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
3681         (WebCore::toTestCustomNamedGetter):
3682         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3683         (WebCore::JSTestCustomNamedGetter::createStructure):
3684         (WebCore::JSTestCustomNamedGetterPrototype::createStructure):
3685         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
3686         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3687         (WebCore::JSTestEventConstructorConstructor::finishCreation):
3688         (WebCore::JSTestEventConstructor::finishCreation):
3689         (WebCore::JSTestEventConstructor::getOwnPropertySlot):
3690         (WebCore::JSTestEventConstructor::getOwnPropertyDescriptor):
3691         (WebCore::toTestEventConstructor):
3692         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3693         (WebCore::JSTestEventConstructor::createStructure):
3694         (WebCore::JSTestEventConstructorPrototype::createStructure):
3695         (WebCore::JSTestEventConstructorConstructor::createStructure):
3696         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3697         (WebCore::JSTestEventTargetConstructor::finishCreation):
3698         (WebCore::JSTestEventTarget::finishCreation):
3699         (WebCore::JSTestEventTarget::getOwnPropertySlot):
3700         (WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
3701         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
3702         (WebCore::JSTestEventTarget::getOwnPropertyNames):
3703         (WebCore::jsTestEventTargetPrototypeFunctionItem):
3704         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
3705         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
3706         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
3707         (WebCore::JSTestEventTarget::visitChildren):
3708         (WebCore::JSTestEventTarget::indexGetter):
3709         (WebCore::toTestEventTarget):
3710         * bindings/scripts/test/JS/JSTestEventTarget.h:
3711         (WebCore::JSTestEventTarget::createStructure):
3712         (WebCore::JSTestEventTargetPrototype::createStructure):
3713         (WebCore::JSTestEventTargetConstructor::createStructure):
3714         * bindings/scripts/test/JS/JSTestException.cpp:
3715         (WebCore::JSTestExceptionConstructor::finishCreation):
3716         (WebCore::JSTestException::finishCreation):
3717         (WebCore::JSTestException::getOwnPropertySlot):
3718         (WebCore::JSTestException::getOwnPropertyDescriptor):
3719         (WebCore::toTestException):
3720         * bindings/scripts/test/JS/JSTestException.h:
3721         (WebCore::JSTestException::createStructure):
3722         (WebCore::JSTestExceptionPrototype::createStructure):
3723         (WebCore::JSTestExceptionConstructor::createStructure):
3724         * bindings/scripts/test/JS/JSTestInterface.cpp:
3725         (WebCore::JSTestInterfaceConstructor::finishCreation):
3726         (WebCore::JSTestInterface::finishCreation):
3727         (WebCore::JSTestInterface::getOwnPropertySlot):
3728         (WebCore::JSTestInterface::getOwnPropertyDescriptor):
3729         (WebCore::JSTestInterface::put):
3730         (WebCore::JSTestInterface::putByIndex):
3731         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
3732         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
3733         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
3734         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
3735         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
3736         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
3737         (WebCore::toTestInterface):
3738         * bindings/scripts/test/JS/JSTestInterface.h:
3739         (WebCore::JSTestInterface::createStructure):
3740         (WebCore::JSTestInterfacePrototype::createStructure):
3741         (WebCore::JSTestInterfaceConstructor::createStructure):
3742         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3743         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
3744         (WebCore::JSTestMediaQueryListListener::finishCreation):
3745         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
3746         (WebCore::JSTestMediaQueryListListener::getOwnPropertyDescriptor):
3747         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
3748         (WebCore::toTestMediaQueryListListener):
3749         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3750         (WebCore::JSTestMediaQueryListListener::createStructure):
3751         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
3752         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
3753         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3754         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
3755         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
3756         (WebCore::JSTestNamedConstructor::finishCreation):
3757         (WebCore::JSTestNamedConstructor::getOwnPropertySlot):
3758         (WebCore::JSTestNamedConstructor::getOwnPropertyDescriptor):
3759         (WebCore::toTestNamedConstructor):
3760         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3761         (WebCore::JSTestNamedConstructor::createStructure):
3762         (WebCore::JSTestNamedConstructorPrototype::createStructure):
3763         (WebCore::JSTestNamedConstructorConstructor::createStructure):
3764         (WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
3765         * bindings/scripts/test/JS/JSTestNode.cpp:
3766         (WebCore::JSTestNodeConstructor::finishCreation):
3767         (WebCore::JSTestNode::finishCreation):
3768         (WebCore::JSTestNode::getOwnPropertySlot):
3769         (WebCore::JSTestNode::getOwnPropertyDescriptor):
3770         (WebCore::JSTestNode::visitChildren):
3771         * bindings/scripts/test/JS/JSTestNode.h:
3772         (WebCore::JSTestNode::createStructure):
3773         (WebCore::JSTestNodePrototype::createStructure):
3774         (WebCore::JSTestNodeConstructor::createStructure):
3775         * bindings/scripts/test/JS/JSTestObj.cpp:
3776         (WebCore::JSTestObjConstructor::finishCreation):
3777         (WebCore::JSTestObj::finishCreation):
3778         (WebCore::JSTestObj::getOwnPropertySlot):
3779         (WebCore::JSTestObj::getOwnPropertyDescriptor):
3780         (WebCore::JSTestObj::put):
3781         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
3782         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
3783         (WebCore::jsTestObjPrototypeFunctionByteMethod):
3784         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
3785         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
3786         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
3787         (WebCore::jsTestObjPrototypeFunctionLongMethod):
3788         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
3789         (WebCore::jsTestObjPrototypeFunctionObjMethod):
3790         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
3791         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
3792         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
3793         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
3794         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
3795         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
3796         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
3797         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
3798         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
3799         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
3800         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
3801         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
3802         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
3803         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
3804         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
3805         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
3806         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
3807         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
3808         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
3809         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
3810         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
3811         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
3812         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
3813         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
3814         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
3815         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
3816         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
3817         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
3818         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
3819         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
3820         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
3821         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
3822         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
3823         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
3824         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
3825         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
3826         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
3827         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
3828         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
3829         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
3830         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
3831         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
3832         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
3833         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
3834         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
3835         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
3836         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
3837         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
3838         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
3839         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
3840         (WebCore::jsTestObjPrototypeFunctionConvert1):
3841         (WebCore::jsTestObjPrototypeFunctionConvert2):
3842         (WebCore::jsTestObjPrototypeFunctionConvert4):
3843         (WebCore::jsTestObjPrototypeFunctionConvert5):
3844         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
3845         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
3846         (WebCore::jsTestObjPrototypeFunctionOrange):
3847         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
3848         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
3849         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
3850         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
3851         (WebCore::JSTestObj::visitChildren):
3852         (WebCore::toTestObj):
3853         * bindings/scripts/test/JS/JSTestObj.h:
3854         (WebCore::JSTestObj::createStructure):
3855         (WebCore::JSTestObjPrototype::createStructure):
3856         (WebCore::JSTestObjConstructor::createStructure):
3857         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3858         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
3859         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3860         (WebCore::JSTestOverloadedConstructors::finishCreation):
3861         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
3862         (WebCore::JSTestOverloadedConstructors::getOwnPropertyDescriptor):
3863         (WebCore::toTestOverloadedConstructors):
3864         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3865         (WebCore::JSTestOverloadedConstructors::createStructure):
3866         (WebCore::JSTestOverloadedConstructorsPrototype::createStructure):
3867         (WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
3868         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3869         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
3870         (WebCore::JSTestSerializedScriptValueInterface::finishCreation):
3871         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
3872         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertyDescriptor):
3873         (WebCore::JSTestSerializedScriptValueInterface::put):
3874         (WebCore::JSTestSerializedScriptValueInterface::visitChildren):
3875         (WebCore::toTestSerializedScriptValueInterface):
3876         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3877         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
3878         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
3879         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
3880         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3881         (WebCore::JSTestTypedefsConstructor::finishCreation):
3882         (WebCore::JSTestTypedefs::finishCreation):
3883         (WebCore::JSTestTypedefs::getOwnPropertySlot):
3884         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
3885         (WebCore::JSTestTypedefs::put):
3886         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
3887         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
3888         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
3889         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
3890         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
3891         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
3892         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
3893         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
3894         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
3895         (WebCore::toTestTypedefs):
3896         * bindings/scripts/test/JS/JSTestTypedefs.h:
3897         (WebCore::JSTestTypedefs::createStructure):
3898         (WebCore::JSTestTypedefsPrototype::createStructure):
3899         (WebCore::JSTestTypedefsConstructor::createStructure):
3900         * bridge/c/CRuntimeObject.cpp:
3901         (JSC::Bindings::CRuntimeObject::finishCreation):
3902         * bridge/c/CRuntimeObject.h:
3903         (JSC::Bindings::CRuntimeObject::createStructure):
3904         * bridge/c/c_instance.cpp:
3905         (JSC::Bindings::CRuntimeMethod::createStructure):
3906         (JSC::Bindings::CRuntimeMethod::finishCreation):
3907         (JSC::Bindings::CInstance::invokeMethod):
3908         * bridge/c/c_utility.cpp:
3909         (JSC::Bindings::convertValueToNPVariant):
3910         * bridge/objc/ObjCRuntimeObject.h:
3911         (JSC::Bindings::ObjCRuntimeObject::createStructure):
3912         * bridge/objc/objc_instance.mm:
3913         (ObjCRuntimeMethod::finishCreation):
3914         (ObjcInstance::invokeMethod):
3915         * bridge/objc/objc_runtime.h:
3916         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
3917         * bridge/objc/objc_runtime.mm:
3918         (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
3919         (JSC::Bindings::callObjCFallbackObject):
3920         * bridge/qt/qt_instance.cpp:
3921         (JSC::Bindings::QtRuntimeObject::createStructure):
3922         (JSC::Bindings::QtInstance::getInstance):
3923         * bridge/qt/qt_pixmapruntime.cpp:
3924         (JSC::Bindings::assignToHTMLImageElement):
3925         (JSC::Bindings::QtPixmapRuntime::toQt):
3926         * bridge/qt/qt_runtime.cpp:
3927         (JSC::Bindings::isJSUint8Array):
3928         (JSC::Bindings::isJSArray):
3929         (JSC::Bindings::isJSDate):
3930         (JSC::Bindings::isQtObject):
3931         (JSC::Bindings::unwrapBoxedPrimitive):
3932         (JSC::Bindings::convertQVariantToValue):
3933         * bridge/runtime_array.cpp:
3934         (JSC::RuntimeArray::finishCreation):
3935         * bridge/runtime_array.h:
3936         (JSC::RuntimeArray::createStructure):
3937         * bridge/runtime_method.cpp:
3938         (JSC::RuntimeMethod::finishCreation):
3939         (JSC::callRuntimeMethod):
3940         * bridge/runtime_method.h:
3941         (JSC::RuntimeMethod::createStructure):
3942         * bridge/runtime_object.cpp:
3943         (JSC::Bindings::RuntimeObject::finishCreation):
3944         (JSC::Bindings::callRuntimeObject):
3945         (JSC::Bindings::callRuntimeConstructor):
3946         * bridge/runtime_object.h:
3947         (JSC::Bindings::RuntimeObject::createStructure):
3948
3949 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
3950
3951         REGRESSION(r150187): Safari fails to render allrecipe.com comment popups
3952         https://bugs.webkit.org/show_bug.cgi?id=119780
3953
3954         Reviewed by Benjamin Poulain.
3955
3956         The bug was caused by SelectorDataList::executeFastPathForIdSelector not verifying that
3957         elements found by getAllElementsById are descendents of rootNode when there are multiple
3958         elements of the same id. This resulted in querySelector and querySelectorAll of an element
3959         returning nodes outside of the element.
3960
3961         Fixed the bug by checking this condition when we have multiple elements of the same id.
3962
3963         Test: fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html
3964
3965         * dom/SelectorQuery.cpp:
3966         (WebCore::SelectorDataList::executeFastPathForIdSelector):
3967
3968 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
3969
3970         Fix orphan needsLayout state in RenderTextControlSingleLine
3971         https://bugs.webkit.org/show_bug.cgi?id=119726
3972
3973         Reviewed by Kent Tamura.
3974
3975         Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59
3976
3977         We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
3978         in cases of input[type=search] and input[type=number], dirty.
3979
3980         * rendering/RenderTextControlSingleLine.cpp:
3981         (WebCore::setNeedsLayoutOnAncestors):
3982         (WebCore::RenderTextControlSingleLine::layout):
3983
3984 2013-08-13  Sam Weinig  <sam@webkit.org>
3985
3986         [Re-land] Cleanup MediaQueryListListener
3987         https://bugs.webkit.org/show_bug.cgi?id=119664
3988
3989         Reviewed by Andreas Kling.
3990
3991         Make MediaQueryListListener a proper WebIDL callback.
3992
3993         * CMakeLists.txt:
3994         * DerivedSources.cpp:
3995         * DerivedSources.make:
3996         * DerivedSources.pri:
3997         * GNUmakefile.list.am:
3998         * Target.pri:
3999         * WebCore.vcxproj/WebCore.vcxproj:
4000         * WebCore.vcxproj/WebCore.vcxproj.filters:
4001         * WebCore.xcodeproj/project.pbxproj:
4002         Update project files.
4003
4004         * bindings/scripts/CodeGeneratorJS.pm:
4005         (GenerateCallbackHeader):
4006         (GenerateCallbackImplementation):
4007         (JSValueToNative):
4008         * bindings/scripts/IDLAttributes.txt:
4009         Add support for CallbackNeedsOperatorEqual, which adds an operator==.