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