Rename InlineBox::remove() to removeFromParent
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-10-13  Antti Koivisto  <antti@apple.com>
2
3         Rename InlineBox::remove() to removeFromParent
4         https://bugs.webkit.org/show_bug.cgi?id=122725
5
6         Reviewed by Andreas Kling.
7
8         Also make it clear from the code that all InlineTextBoxes have behavesLikeText set.
9
10 2013-10-13  Antti Koivisto  <antti@apple.com>
11
12         Make absoluteQuads/Rects functions return Vectors
13         https://bugs.webkit.org/show_bug.cgi?id=122722
14
15         Reviewed by Andreas Kling.
16
17         * dom/Document.cpp:
18         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
19         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):
20             
21             Take RenderStyle instead of RenderObject
22
23         * dom/Document.h:
24         * dom/Element.cpp:
25         (WebCore::Element::getClientRects):
26         (WebCore::Element::getBoundingClientRect):
27         * dom/Range.cpp:
28         (WebCore::Range::textRects):
29         (WebCore::Range::textQuads):
30         (WebCore::Range::getBorderAndTextQuads):
31             
32             Adapt to the changes.
33
34         * rendering/RenderObject.h:
35         
36             Removed unnecessary adjustFloatQuad/RectForAbsoluteZoom functions, inline code to
37             adjustFloatQuads/RectForScrollAndAbsoluteZoomAndFrameScale.
38
39         * rendering/RenderText.cpp:
40         (WebCore::RenderText::absoluteRects):
41         (WebCore::RenderText::absoluteRectsForRange):
42         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
43         (WebCore::RenderText::absoluteQuads):
44         (WebCore::RenderText::absoluteQuadsForRange):
45         * rendering/RenderText.h:
46         * rendering/RenderTextLineBoxes.cpp:
47         (WebCore::RenderTextLineBoxes::absoluteRects):
48         (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
49         (WebCore::RenderTextLineBoxes::absoluteQuads):
50         (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
51         * rendering/RenderTextLineBoxes.h:
52         
53             Use return value instead of an out-arg, except for the virtual versions.
54
55 2013-10-13  Andreas Kling  <akling@apple.com>
56
57         LiveNodeList: rootNode() and document() should return references.
58         <https://webkit.org/b/122720>
59
60         Reviewed by Antti Koivisto.
61
62         Tighten up this code a bit by having rootNode() and document()
63         return references. Also replaced some handwritten traversal
64         with a call to Node::lastDescendant().
65
66 2013-10-13  Andreas Kling  <akling@apple.com>
67
68         Document::createRenderTree() should assert that there is no arena.
69         <https://webkit.org/b/122723>
70
71         Reviewed by Antti Koivisto.
72
73         Calling createRenderTree() with a RenderArena already in place would
74         be a programming error.
75
76 2013-10-13  Andreas Kling  <akling@apple.com>
77
78         Remove dead ENABLE(CUSTOM_ELEMENTS) code.
79         <https://webkit.org/b/122721>
80
81         Reviewed by Antti Koivisto.
82
83         There are no ports building with this flag since April and the code
84         has bitrotted since. Remove it for now. If someone wants to resurrect
85         the feature someday, getting back to this point is trivial.
86
87 2013-10-12  Antti Koivisto  <antti@apple.com>
88
89         Move absoluteRects/Quads to RenderTextLineBoxes
90         https://bugs.webkit.org/show_bug.cgi?id=122706
91
92         Reviewed by Andreas Kling.
93
94         * rendering/RenderTextLineBoxes.cpp:
95         (WebCore::RenderTextLineBoxes::absoluteRects):
96         (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
97         (WebCore::RenderTextLineBoxes::absoluteQuads):
98         (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
99         
100             These move.
101
102         (WebCore::RenderTextLineBoxes::selectionRectForRange):
103         (WebCore::RenderTextLineBoxes::setSelectionState):
104         
105             Also moved a few smaller functions.
106
107 2013-10-13  Andreas Kling  <akling@apple.com>
108
109         Remove dead code hiding behind ENABLE(TOUCH_EVENT_TRACKING).
110         <https://webkit.org/b/122719>
111
112         Reviewed by Antti Koivisto.
113
114         Nobody is building with this flag, and it has broken-looking code
115         behind it anyway. Nuke from orbit.
116
117 2013-10-13  Andreas Kling  <akling@apple.com>
118
119         RenderLayer: Check SVG bit instead of element namespace in isTransparent().
120         <https://webkit.org/b/118171>
121
122         Reviewed by Darin Adler.
123
124         Replace the (virtual) namespaceURI() check with an isSVGElement() bit check.
125
126         * rendering/RenderLayer.cpp:
127         (WebCore::RenderLayer::isTransparent):
128
129 2013-10-12  Darin Adler  <darin@apple.com>
130
131         Use nullptr in Document.cpp
132         https://bugs.webkit.org/show_bug.cgi?id=122715
133
134         Reviewed by Sam Weinig.
135
136         * dom/Document.cpp:
137         (WebCore::widgetForElement):
138         (WebCore::Document::Document):
139         (WebCore::Document::~Document):
140         (WebCore::Document::dropChildren):
141         (WebCore::Document::getElementByAccessKey):
142         (WebCore::Document::doctype):
143         (WebCore::Document::createElement):
144         (WebCore::Document::createElementNS):
145         (WebCore::Document::registerElement):
146         (WebCore::Document::createCDATASection):
147         (WebCore::Document::createProcessingInstruction):
148         (WebCore::Document::createEntityReference):
149         (WebCore::Document::importNode):
150         (WebCore::Document::adoptNode):
151         (WebCore::Document::webkitGetNamedFlows):
152         (WebCore::Document::elementFromPoint):
153         (WebCore::Document::caretRangeFromPoint):
154         (WebCore::Document::setTitle):
155         (WebCore::Document::removeTitle):
156         (WebCore::Document::view):
157         (WebCore::Document::page):
158         (WebCore::Document::settings):
159         (WebCore::Document::createNodeIterator):
160         (WebCore::Document::createTreeWalker):
161         (WebCore::Document::updateStyleIfNeeded):
162         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
163         (WebCore::Document::disconnectFromFrame):
164         (WebCore::Document::destroyRenderTree):
165         (WebCore::Document::existingAXObjectCache):
166         (WebCore::Document::axObjectCache):
167         (WebCore::Document::scriptableDocumentParser):
168         (WebCore::Document::body):
169         (WebCore::Document::head):
170         (WebCore::Document::processBaseElement):
171         (WebCore::Document::findUnsafeParentScrollPropagationBoundary):
172         (WebCore::Document::cloneNode):
173         (WebCore::Document::styleResolverChanged):
174         (WebCore::Document::removeFocusedNodeOfSubtree):
175         (WebCore::Document::setFocusedElement):
176         (WebCore::Document::getWindowAttributeEventListener):
177         (WebCore::Document::createEvent):
178         (WebCore::Document::getOverrideStyle):
179         (WebCore::Document::ownerElement):
180         (WebCore::Document::setInPageCache):
181         (WebCore::Document::parentDocument):
182         (WebCore::Document::createAttributeNS):
183         (WebCore::Document::initSecurityContext):
184         (WebCore::Document::resetHiddenFocusElementTimer):
185         (WebCore::Document::getCSSCanvasContext):
186         (WebCore::Document::enqueuePopstateEvent):
187         (WebCore::Document::takeAnyMediaCanStartListener):
188         (WebCore::Document::requestFullScreenForElement):
189         (WebCore::Document::webkitExitFullscreen):
190         (WebCore::Document::webkitWillEnterFullScreenForElement):
191         (WebCore::Document::webkitDidExitFullScreenForElement):
192         (WebCore::Document::fullScreenRendererDestroyed):
193         (WebCore::Document::webkitPointerLockElement):
194         (WebCore::Document::seamlessParentIFrame):
195         (WebCore::Document::loader):
196         (WebCore::eventTargetElementForDocument):
197         (WebCore::nearestCommonHoverAncestor):
198         (WebCore::Document::ensureTemplateDocument):
199         Use nullptr in many places we were using 0.
200
201 2013-10-12  Darin Adler  <darin@apple.com>
202
203         Get rid of the toHTMLElement helper for casting FormAssociatedElement to HTMLElement
204         https://bugs.webkit.org/show_bug.cgi?id=122713
205
206         Reviewed by Sam Weinig.
207
208         Since we are using the function name toHTMLElement for casting to an HTMLElement
209         from a Node or Element, it's awkward to also use it for a quite different type of
210         type conversion on a FormAssociatedElement. We already have an asHTMLElement member
211         function, so lets use that.
212
213         * html/DOMFormData.cpp:
214         (WebCore::DOMFormData::DOMFormData): Use references instead of pointers, and
215         asHTMLElement instead of toHTMLElement.
216
217         * html/FormAssociatedElement.cpp: Made FormAttributeTargetObserver FINAL, made
218         its private inheritance explicit, made its constructor public so we can use it
219         with make_unique and got rid of its creation function. Also use reference instead
220         of a pointer.
221         (WebCore::FormAssociatedElement::FormAssociatedElement): Use nullptr.
222         (WebCore::FormAssociatedElement::~FormAssociatedElement): Ditto.
223         (WebCore::FormAssociatedElement::didMoveToNewDocument): Use asHTMLElement instead
224         of toHTMLElement and use a reference instead of a pointer.
225         (WebCore::FormAssociatedElement::insertedInto): Ditto.
226         (WebCore::FormAssociatedElement::removedFrom): Ditto.
227         (WebCore::FormAssociatedElement::formRemovedFromTree): Ditto.
228         (WebCore::FormAssociatedElement::resetFormOwner): Ditto.
229         (WebCore::FormAssociatedElement::formAttributeChanged): Ditto.
230         (WebCore::FormAssociatedElement::customError): Ditto.
231         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Use make_unique
232         instead of create here.
233         (WebCore::FormAssociatedElement::name): Use asHTMLElement.
234         (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver): Ditto.
235         (WebCore::FormAttributeTargetObserver::idTargetChanged): Updated since m_element is
236         now a reference.
237
238         * html/FormAssociatedElement.h: Removed some unneeded class declarations.
239         Made isFormAssociatedElement const. Use std::unique_ptr instead of OwnPtr.
240
241         * html/FormNamedItem.h: Made asHTMLElement return a reference, and overloaded it
242         for both const and non-const. Made isFormAssociatedElement const.
243
244         * html/HTMLFormControlElement.h: Updated for FormNamedItem changes. Removed an
245         unneeded class declaration.
246
247         * html/HTMLFormControlsCollection.cpp:
248         (WebCore::HTMLFormControlsCollection::virtualItemAfter): Use references, asHTMLElement,
249         and nullptr.
250         (WebCore::firstNamedItem): Ditto.
251         (WebCore::HTMLFormControlsCollection::namedItem): Ditto.
252         (WebCore::HTMLFormControlsCollection::updateNameCache): Ditto.
253
254         * html/HTMLFormElement.cpp:
255         (WebCore::HTMLFormElement::validateInteractively): Use asHTMLElement and references.
256         (WebCore::HTMLFormElement::getTextFieldValues): Ditto.
257         (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Ditto.
258         (WebCore::HTMLFormElement::formElementIndex): Ditto.
259         (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Ditto.
260         (WebCore::HTMLFormElement::elementFromPastNamesMap): Ditto, and nullptr.
261
262         * html/HTMLImageElement.h: Updated for FormNamedItem changes.
263         * html/HTMLObjectElement.h: Ditto.
264
265         * loader/FormSubmission.cpp:
266         (WebCore::FormSubmission::create): Use asHTMLElement and references.
267
268 2013-10-12  Darin Adler  <darin@apple.com>
269
270         Use nullptr instead of 0 in TreeScope.cpp
271         https://bugs.webkit.org/show_bug.cgi?id=122711
272
273         Reviewed by Andreas Kling.
274
275         * dom/TreeScope.cpp:
276         (WebCore::TreeScope::TreeScope):
277         (WebCore::TreeScope::~TreeScope):
278         (WebCore::TreeScope::clearDocumentScope):
279         (WebCore::TreeScope::getElementById):
280         (WebCore::TreeScope::getAllElementsById):
281         (WebCore::TreeScope::getElementByName):
282         (WebCore::TreeScope::ancestorInThisScope):
283         (WebCore::TreeScope::getImageMap):
284         (WebCore::nodeFromPoint):
285         (WebCore::TreeScope::labelElementForId):
286         (WebCore::TreeScope::getSelection):
287         (WebCore::TreeScope::findAnchor):
288         (WebCore::focusedFrameOwnerElement):
289         (WebCore::TreeScope::focusedElement):
290         (WebCore::commonTreeScope):
291         Use a lot more nullptr, and also rewrite one while loop as a for loop.
292
293 2013-10-12  Darin Adler  <darin@apple.com>
294
295         Remove the not-much-used isShadowHost function from Element.h
296         https://bugs.webkit.org/show_bug.cgi?id=122710
297
298         Reviewed by Andreas Kling.
299
300         * dom/Element.h: Removed isShadowHost, which just checks if shadowRoot is null.
301
302         * page/FocusController.cpp:
303         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost): Added
304         individual assertions instead of just asserting isShadowHost.
305         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame): Broke an
306         assertion with && in it into two assertions.
307         (WebCore::hasCustomFocusLogic): Changed argument type to be Element& and take
308         a reference instead of a pointer.
309         (WebCore::isNonFocusableShadowHost): Made arguments references instead of pointers.
310         Replaced isShadowHost check with a direct check of whether shadowRoot returns null
311         or not, which seems nearly as clear.
312         (WebCore::isFocusableShadowHost): Ditto.
313         (WebCore::adjustedTabIndex): Ditto.
314         (WebCore::shouldVisit): Ditto.
315         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
316         Updated for changes above.
317         (WebCore::FocusController::advanceFocusInDocumentOrder): Ditto. Also some nullptr.
318         (WebCore::FocusController::findFocusableElementAcrossFocusScope): Ditto.
319         (WebCore::FocusController::findFocusableElementRecursively): Ditto.
320         (WebCore::FocusController::findElementWithExactTabIndex): Ditto.
321         (WebCore::nextElementWithGreaterTabIndex): Ditto.
322         (WebCore::previousElementWithLowerTabIndex): Ditto.
323         (WebCore::FocusController::nextFocusableElement): Ditto.
324         (WebCore::FocusController::previousFocusableElement): Ditto.
325
326 2013-10-12  Darin Adler  <darin@apple.com>
327
328         Move querySelector from Node to ContainerNode and use references instead of pointers
329         https://bugs.webkit.org/show_bug.cgi?id=122709
330
331         Reviewed by Anders Carlsson.
332
333         * dom/ContainerNode.cpp:
334         (WebCore::ContainerNode::querySelector): Moved here from Node. Pass a reference instead
335         of a pointer to SelectorQuery. Changed return types to RefPtr and raw pointer instead of
336         PassRefPtr.
337         (WebCore::ContainerNode::querySelectorAll): Ditto.
338         * dom/ContainerNode.h: Added the new functions.
339
340         * dom/Element.cpp:
341         (WebCore::Element::webkitMatchesSelector): Use && instead of an if statement and a reference rather than
342         a pointer.
343
344         * dom/Node.cpp: Sorted includes, removed SelectorQuery.h, removed the querySelector functions.
345         (WebCore::Node::ownerDocument): Use document instead of doc and nullptr instead of 0.
346         * dom/Node.h: Removed the querySelector functions.
347
348         * dom/SelectorQuery.cpp:
349         (WebCore::SelectorDataList::selectorMatches): Take references instead of pointers.
350         (WebCore::SelectorDataList::matches): Ditto.
351         (WebCore::SelectorDataList::queryAll): Return a RefPtr instead of PassRefPtr.
352         (WebCore::SelectorDataList::queryFirst): Ditto. Also use nullptr.
353         (WebCore::selectorForIdLookup): Take references instead of pointers.
354         (WebCore::isTreeScopeRoot): Ditto.
355         (WebCore::SelectorDataList::executeFastPathForIdSelector): Ditto.
356         (WebCore::isSingleTagNameSelector): Ditto.
357         (WebCore::elementsForLocalName): Ditto. Also use iterators instead of traversal.
358         (WebCore::anyElement): Ditto.
359         (WebCore::SelectorDataList::executeSingleTagNameSelectorData): Ditto.
360         (WebCore::isSingleClassNameSelector): Ditto.
361         (WebCore::SelectorDataList::executeSingleClassNameSelectorData): Ditto.
362         (WebCore::SelectorDataList::executeSingleSelectorData): Ditto.
363         (WebCore::SelectorDataList::executeSingleMultiSelectorData): Ditto.
364         (WebCore::SelectorDataList::execute): Ditto.
365         (WebCore::SelectorQueryCache::add): Ditto.
366
367         * dom/SelectorQuery.h: Update to use ContainerNode, references, and RefPtr and raw pointers
368         rather than PassRefPtr.
369
370         * dom/TreeScope.cpp:
371         (WebCore::TreeScope::getElementById): Use nullptr instead of 0.
372         (WebCore::TreeScope::getAllElementsById): Ditto.
373         (WebCore::TreeScope::getElementByName): Ditto.
374         (WebCore::TreeScope::ancestorInThisScope): Ditto.
375
376         * inspector/InspectorDOMAgent.cpp:
377         (WebCore::InspectorDOMAgent::assertNode): Use nullptr instead of 0.
378         (WebCore::InspectorDOMAgent::assertDocument): Ditto.
379         (WebCore::InspectorDOMAgent::assertElement): Ditto. Also use isElementNode instead of nodeType.
380         (WebCore::InspectorDOMAgent::assertEditableNode): Use nullptr instead of 0.
381         (WebCore::InspectorDOMAgent::assertEditableElement): Ditto.
382         (WebCore::InspectorDOMAgent::getDocument): Use document instead of doc.
383         (WebCore::InspectorDOMAgent::querySelector): Changed to pass a ContainerNode.
384         (WebCore::InspectorDOMAgent::querySelectorAll): Ditto.
385
386 2013-10-12  Darin Adler  <darin@apple.com>
387
388         Move code to find elements in slider shadow tree into RangeInputType class, since it creates that tree
389         https://bugs.webkit.org/show_bug.cgi?id=122708
390
391         Reviewed by Anders Carlsson.
392
393         * accessibility/AccessibilitySlider.cpp:
394         (WebCore::AccessibilitySliderThumb::elementRect): Use HTMLInputElement::sliderThumbElement
395         to find the thumb, rather than using the sliderThumbElementOf function.
396
397         * html/InputType.h: Use nullptr instead of 0. Tweak formatting a bit.
398
399         * html/RangeInputType.cpp:
400         (WebCore::RangeInputType::handleMouseDownEvent): Use typedSliderThumbElement function.
401         (WebCore::RangeInputType::handleTouchEvent): Ditto.
402         (WebCore::RangeInputType::createShadowSubtree): Fixed assertion to match the code below.
403         (WebCore::RangeInputType::sliderTrackElement): Moved next to the createShadowSubtree function
404         since it is finding an element in that subtree. Changed to do the work here instead of calling
405         a function in another file.
406         (WebCore::RangeInputType::typedSliderThumbElement): Added. Finds the slider thumb element,
407         and returns it as a reference with a specific type.
408         (WebCore::RangeInputType::sliderThumbElement): Changed to call typedSliderThumbElement, loosening
409         the type, and returning a pointer Changed to call typedSliderThumbElement, loosening
410         the type, and returning a pointer.
411         (WebCore::RangeInputType::minOrMaxAttributeChanged): Use typedSliderThumbElement.
412         (WebCore::RangeInputType::setValue): Ditto.
413         (WebCore::RangeInputType::listAttributeTargetChanged): Ditto.
414
415         * html/RangeInputType.h: Marked the class FINAL. Tweaked formatting a bit.
416         Added the typedSliderThumbElement function.
417
418         * html/shadow/SliderThumbElement.cpp:
419         (WebCore::SliderThumbElement::setPositionFromPoint): Call the HTMLInputElement::sliderTrackElement
420         function instead of having the input element's shadow subtree hierarchy hard-coded here.
421         (WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Moved here from the header,
422         since it's a virtual function that won't be inlined.
423
424         * html/shadow/SliderThumbElement.h: Removed unneeded forward declarations. Made more virtual
425         functions private and added more OVERRIDE. Removed the toSliderThumbElement, sliderThumbElementOf,
426         and sliderTrackElementOf functions.
427
428         * rendering/RenderSlider.cpp:
429         (WebCore::RenderSlider::layout): Use HTMLInputElement::sliderThumbElement.
430         (WebCore::RenderSlider::inDragMode): Ditto.
431
432 2013-10-12  Darin Adler  <darin@apple.com>
433
434         Remove unneeded extra memory allocation and indirection for ValidityState
435         https://bugs.webkit.org/show_bug.cgi?id=122705
436
437         Reviewed by Anders Carlsson.
438
439         * CMakeLists.txt: Removed ValidityState.cpp.
440         * GNUmakefile.list.am: Ditto.
441         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
442         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
443         * WebCore.xcodeproj/project.pbxproj: Ditto.
444
445         * html/FormAssociatedElement.cpp: Removed ValidityState.h include and the
446         FormAssociatedElement::validity function. That function is now an inline
447         in the ValidityState.h header.
448
449         * html/FormAssociatedElement.h: Added badInput function, the only function
450         from the ValidityState interface that was not already present here. Removed
451         m_validityState.
452
453         * html/HTMLFormControlElement.cpp: Removed include of ValidityState.h.
454         (WebCore::HTMLFormControlElement::isValidFormControlElement): Use the valid
455         function directly instead of indirectly through the validity state.
456         (WebCore::HTMLFormControlElement::setNeedsValidityCheck): Ditto.
457
458         * html/ValidityState.cpp: Removed.
459
460         * html/ValidityState.h: Removed the body of the ValidityState class and
461         made it effectively a "typedef" for FormAssociatedElement. It's actually
462         a derived class that adds no members, which is not quite right but will
463         work just fine for this.
464         (WebCore::FormAssociatedElement::validity): Implemented; just returns the
465         FormAssociatedElement, which the bindings expose as a ValidityState.
466
467         * html/ValidityState.idl: Use SkipVTableValidation instead of
468         ImplementationLacksVTable because FormAssociatedElement does have a vtable.
469
470 2013-10-12  Darin Adler  <darin@apple.com>
471
472         Rename toParentMediaElement to parentMediaElement, since it's not a type cast
473         https://bugs.webkit.org/show_bug.cgi?id=122707
474
475         Reviewed by Eric Carlson.
476
477         * accessibility/AccessibilityMediaControls.cpp:
478         (WebCore::AccessibilityMediaControlsContainer::controllingVideoElement): Call the
479         function by its new name, and also remove unnecessary type casting.
480
481         * html/shadow/MediaControlElementTypes.cpp:
482         (WebCore::parentMediaElement): Renamed from toParentMediaElement. Changed to use
483         nullptr. Removed an unnecessary null check.
484
485         * html/shadow/MediaControlElementTypes.h: Renamed from toParentMediaElement.
486         Changed the argument to the RenderObject overload to be a reference rather than
487         a pointer since it doesn't handle null.
488
489         * html/shadow/MediaControlElements.cpp:
490         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
491         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
492         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
493         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
494         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
495         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
496         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
497         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
498         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
499         Updated to use the new name. Also use nullptr.
500
501         * html/shadow/MediaControlsBlackBerry.cpp:
502         (WebCore::MediaControlFullscreenFullscreenButtonElement::defaultEventHandler):
503         Updated to use the new name.
504
505         * platform/blackberry/RenderThemeBlackBerry.cpp:
506         (WebCore::determineFullScreenMultiplier):
507         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
508         (WebCore::RenderThemeBlackBerry::paintMediaPlayButton):
509         (WebCore::RenderThemeBlackBerry::paintMediaRewindButton):
510         (WebCore::RenderThemeBlackBerry::paintMediaMuteButton):
511         (WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
512         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
513         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
514         Updated to use the new name.
515
516         * platform/efl/RenderThemeEfl.cpp:
517         (WebCore::RenderThemeEfl::paintMediaSliderTrack):
518         Updated to use the new name.
519
520         * platform/gtk/RenderThemeGtk.cpp:
521         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
522         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
523         Updated to use the new name.
524
525         * rendering/RenderMediaControls.cpp:
526         (WebCore::RenderMediaControls::paintMediaControlsPart):
527         Call the function by its new name and with a reference instead of a pointer.
528
529 2013-10-12  Antti Koivisto  <antti@apple.com>
530
531         Move positionForPoint to RenderTextLineBoxes
532         https://bugs.webkit.org/show_bug.cgi?id=122703
533
534         Reviewed by Andreas Kling.
535
536 2013-10-12  Andreas Kling  <akling@apple.com>
537
538         Remove unused ScrollingCoordinator hooks.
539         <https://webkit.org/b/122701>
540
541         Reviewed by Anders Carlsson.
542
543         Remove leftover ScrollingCoordinator hooks that were only used
544         by the Chromium port.
545
546 2013-10-12  Zan Dobersek  <zdobersek@igalia.com>
547
548         [Soup] The NeverDestroyed<std::unique_ptr<NetworkStorageSession>> variable in defaultSession() should be static
549         https://bugs.webkit.org/show_bug.cgi?id=122700
550
551         Reviewed by Anders Carlsson.
552
553         * platform/network/soup/NetworkStorageSessionSoup.cpp:
554         (WebCore::defaultSession): The NeverDestroyed variable should be static to avoid its reinitialization every time
555         the function is called. This was exposed by r157337 and should fix the subsequent crashes.
556
557 2013-10-12  Antti Koivisto  <antti@apple.com>
558
559         Move line dirtying code to RenderTextLineBoxes
560         https://bugs.webkit.org/show_bug.cgi?id=122699
561
562         Reviewed by Andreas Kling.
563
564         * rendering/RenderTextLineBoxes.cpp:
565         (WebCore::RenderTextLineBoxes::removeAllFromParent):
566         
567             Also moved the removal loop.
568
569         (WebCore::RenderTextLineBoxes::dirtyAll):
570         (WebCore::RenderTextLineBoxes::dirtyRange):
571
572 2013-10-12  Antti Koivisto  <antti@apple.com>
573
574         Move more code to RenderTextLineBoxes
575         https://bugs.webkit.org/show_bug.cgi?id=122697
576
577         Reviewed by Andreas Kling.
578
579         * rendering/RenderTextLineBoxes.cpp:
580         (WebCore::RenderTextLineBoxes::boundingBox):
581         (WebCore::RenderTextLineBoxes::visualOverflowBoundingBox):
582         (WebCore::RenderTextLineBoxes::hasRenderedText):
583         (WebCore::RenderTextLineBoxes::caretMinOffset):
584         (WebCore::RenderTextLineBoxes::caretMaxOffset):
585         
586             Moved these.
587
588 2013-10-12  Alexey Proskuryakov  <ap@apple.com>
589
590         Add a feature define for SubtleCrypto
591         https://bugs.webkit.org/show_bug.cgi?id=122683
592
593         Reviewed by Anders Carlsson.
594
595         * Configurations/FeatureDefines.xcconfig:
596
597 2013-10-12  Andreas Kling  <akling@apple.com>
598
599         Generate tighter isFooElement() functions for HTML elements.
600         <https://webkit.org/b/122696>
601
602         Reviewed by Antti Koivisto.
603
604         Specialize HTML element type checking helpers to only compare the
605         localName and not the fully qualified tag name.
606
607 2013-09-27  Jessica Pease  <jessica_n_pease@apple.com>
608
609         Replace static cast ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
610         https://bugs.webkit.org/show_bug.cgi?id=120803
611
612         Reviewed by Andreas Kling.
613
614         No new tests because we're just changing assertions.
615
616         * accessibility/AccessibilityMockObject.h:
617         (WebCore::toAccessibilityMockObject):
618         * bindings/js/JSCanvasRenderingContextCustom.cpp:
619         (WebCore::toJS):
620         * bindings/js/ScheduledAction.cpp:
621         (WebCore::ScheduledAction::execute):
622         * css/CSSGradientValue.cpp:
623         (WebCore::CSSGradientValue::image):
624         * css/DeprecatedStyleBuilder.cpp:
625         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
626         * dom/Element.cpp:
627         (WebCore::Element::elementRareData):
628         (WebCore::Element::synchronizeAttribute):
629         * dom/FocusEvent.h:
630         (WebCore::toFocusEvent):
631         * dom/MouseEvent.h:
632         (WebCore::toMouseEvent):
633         * dom/Node.cpp:
634         (WebCore::Node::rareData):
635         * dom/StyledElement.cpp:
636         (WebCore::StyledElement::ensureMutableInlineStyle):
637         * dom/TouchEvent.h:
638         (WebCore::toTouchEvent):
639         * editing/CompositeEditCommand.h:
640         (WebCore::toCompositeEditCommand):
641         * html/HTMLObjectElement.cpp:
642         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
643         * html/track/AudioTrack.h:
644         (WebCore::toAudioTrack):
645         * html/track/TextTrack.h:
646         (WebCore::toTextTrack):
647         * html/track/VideoTrack.h:
648         (WebCore::toVideoTrack):
649         * inspector/InspectorCSSAgent.cpp:
650         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
651         * loader/cache/CachedResourceClientWalker.h:
652         (WebCore::CachedResourceClientWalker::next):
653         * page/FrameView.h:
654         (WebCore::toFrameView):
655         * rendering/InlineBox.cpp:
656         (WebCore::InlineBox::root):
657         * rendering/RenderBlockLineLayout.cpp:
658         (WebCore::RenderBlock::createLineBoxesFromBidiRuns):
659         * rendering/svg/SVGPathData.cpp:
660         (WebCore::updatePathFromEllipseElement):
661         (WebCore::updatePathFromLineElement):
662         (WebCore::updatePathFromPolygonElement):
663         (WebCore::updatePathFromPolylineElement):
664         * workers/WorkerMessagingProxy.cpp:
665         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
666         * xml/XMLHttpRequest.cpp:
667         (WebCore::XMLHttpRequest::document):
668
669 2013-09-06  Jessica Pease  <jessica_n_pease@apple.com>
670
671         Replace bounds checking ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
672         https://bugs.webkit.org/show_bug.cgi?id=120893
673
674         Reviewed by Darin Adler.
675
676         * Modules/indexeddb/IDBKeyPath.cpp:
677         (WebCore::IDBKeyPathLexer::lex):
678         * Modules/indexeddb/IDBLevelDBCoding.cpp:
679         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys):
680         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
681         (WebCore::cssPropertyIDForJSCSSPropertyName):
682         * css/CSSFontSelector.cpp:
683         (WebCore::compareFontFaces):
684         * css/CSSParser.cpp:
685         (WebCore::CSSParser::rewriteSpecifiers):
686         * html/HTMLCollection.cpp:
687         (WebCore::traverseMatchingElementsForwardToOffset):
688         (WebCore::LiveNodeListBase::traverseChildNodeListForwardToOffset):
689         (WebCore::HTMLCollection::traverseForwardToOffset):
690         * html/HTMLFontElement.cpp:
691         (WebCore::parseFontSize):
692         * html/parser/HTMLParserIdioms.cpp:
693         (WebCore::parseHTMLIntegerInternal):
694         (WebCore::parseHTMLNonNegativeIntegerInternal):
695         * inspector/InspectorStyleSheet.h:
696         (WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration):
697         * platform/graphics/StringTruncator.cpp:
698         (WebCore::centerTruncateToBuffer):
699         (WebCore::rightTruncateToBuffer):
700         (WebCore::truncateString):
701         * platform/graphics/TextRun.h:
702         (WebCore::TextRun::subRun):
703         * platform/text/BidiRunList.h:
704         (WebCore::::reverseRuns):
705         * rendering/svg/SVGInlineTextBox.cpp:
706         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
707         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
708         * rendering/svg/SVGTextChunkBuilder.cpp:
709         (WebCore::SVGTextChunkBuilder::buildTextChunks):
710         * rendering/svg/SVGTextLayoutEngine.cpp:
711         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
712         * rendering/svg/SVGTextQuery.cpp:
713         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
714         * svg/SVGAnimationElement.cpp:
715         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
716         * svg/SVGPathByteStreamSource.h:
717         (WebCore::SVGPathByteStreamSource::readType):
718
719 2013-10-12  Antti Koivisto  <antti@apple.com>
720
721         Factor line box code from RenderText to a class
722         https://bugs.webkit.org/show_bug.cgi?id=122694
723
724         Reviewed by Andreas Kling.
725
726         Create RenderTextLineBoxes and move some line box specific code there.
727
728 2013-10-12  Antti Koivisto  <antti@apple.com>
729
730         Replace RenderText::renderedTextLength with hasRenderedText
731         https://bugs.webkit.org/show_bug.cgi?id=122693
732
733         Reviewed by Andreas Kling.
734
735 2013-10-12  Darin Adler  <darin@apple.com>
736
737         Use unique_ptr instead of delete in a few places
738         https://bugs.webkit.org/show_bug.cgi?id=122639
739
740         Reviewed by Anders Carlsson.
741
742         * Modules/webdatabase/DatabaseBackendBase.cpp:
743         (WebCore::guidToDatabaseMap): Use NeverDestroyed instead of DEFINE_STATIC_LOCAL.
744         (WebCore::guidForOriginAndName): Ditto.
745         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Removed unneeded initialization
746         of m_guid, which is set in the body of the constructor explicitly anyway. Use emptyString.
747         Use unique_ptr for the values in the map. Use the add idiom instead of the get/set idiom.
748         (WebCore::DatabaseBackendBase::closeDatabase): Use the find/remove idiom instead of the
749         get/remove idiom.
750         (WebCore::DatabaseBackendBase::performOpenAndVerify): Use auto here to avoid having to
751         use the map type by name.
752
753         * loader/cache/CachedFont.cpp:
754         (WebCore::CachedFont::CachedFont): Don't initialize m_fontData to 0; unique_ptr will do that.
755         (WebCore::CachedFont::~CachedFont): Don't delete m_fontData. unique_ptr will do that.
756         (WebCore::CachedFont::ensureCustomFontData): Add a get.
757         (WebCore::CachedFont::allClientsRemoved): Don't delete m_fontData. Use nullptr instead of 0.
758         * loader/cache/CachedFont.h: Changed m_fontData to a unique_ptr.
759
760         * platform/graphics/BitmapImage.cpp:
761         (WebCore::BitmapImage::BitmapImage): Don't initialize m_frameTimer to 0; unique_ptr will do that.
762         (WebCore::BitmapImage::startAnimation): Use make_unique to create the timer.
763         (WebCore::BitmapImage::stopAnimation): Don't delete m_frameTimer. Use nullptr instead of 0.
764         * platform/graphics/BitmapImage.h: Changed m_FrameTimer to a unique_ptr.
765         * platform/graphics/cg/BitmapImageCG.cpp:
766         (WebCore::BitmapImage::BitmapImage): Don't initialize m_frameTimer to 0; unique_ptr will do that.
767
768         * platform/graphics/mac/FontCustomPlatformData.cpp:
769         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Don't call CGFontRelease on m_cgFont.
770         (WebCore::FontCustomPlatformData::fontPlatformData): Use get on m_cgFont.
771         (WebCore::createFontCustomPlatformData): Use nullptr instead of 0, and make_unique instead of new.
772         * platform/graphics/mac/FontCustomPlatformData.h: Chnaged m_cgFont to be a RetainPtr, and the
773         return value from createFontCustomPlatformData to be a unique_ptr.
774
775         * platform/graphics/blackberry/FontCustomPlatformData.h:
776         * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp:
777         (WebCore::createFontCustomPlatformData):
778         * platform/graphics/cairo/BitmapImageCairo.cpp:
779         (WebCore::BitmapImage::BitmapImage):
780         * platform/graphics/cairo/FontCustomPlatformData.h:
781         * platform/graphics/cg/BitmapImageCG.cpp:
782         (WebCore::BitmapImage::BitmapImage):
783         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
784         (WebCore::createFontCustomPlatformData):
785         * platform/graphics/win/FontCustomPlatformData.cpp:
786         (WebCore::createFontCustomPlatformData):
787         * platform/graphics/win/FontCustomPlatformData.h:
788         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
789         (WebCore::createFontCustomPlatformData):
790         * platform/graphics/wince/FontCustomPlatformData.cpp:
791         (WebCore::createFontCustomPlatformData):
792         * platform/graphics/wince/FontCustomPlatformData.h:
793         Same thing on all the other platforms.
794
795         * platform/network/NetworkStorageSession.h: Changed return value of createPrivateBrowsingSession
796         to a unique_ptr, and made constructors public.
797
798         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
799         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Use make_unique.
800
801         * platform/network/soup/NetworkStorageSessionSoup.cpp:
802         (WebCore::defaultSession):
803         (WebCore::NetworkStorageSession::defaultStorageSession):
804         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
805         (WebCore::NetworkStorageSession::switchToNewTestingSession):
806         Same thing on all the other platforms.
807
808 2013-10-11  Andreas Kling  <akling@apple.com>
809
810         Make LayoutState not arena-allocated.
811         <https://webkit.org/b/122649>
812
813         Reviewed by Antti Koivisto.
814
815         Let RenderView own a singly-linked chain of LayoutState objects
816         managed by unique_ptr.
817
818 2013-10-10  Andreas Kling  <akling@apple.com>
819
820         Make RenderLayer not arena-allocated.
821         <https://webkit.org/b/87523>
822
823         Reviewed by Antti Koivisto.
824
825         Let RenderLayerModelObject store its RenderLayer in a unique_ptr.
826         Layers are relatively low-volume objects and this looks neutral
827         on our performance tests.
828
829         Re-landing this since the original commit exposed a problem with
830         the destruction order. This pattern:
831
832             m_someRenderer->destroy();
833             m_someRenderer = nullptr;
834
835         ..is different from what we get with unique_ptr, which clears
836         the pointer storage before calling the destructor.
837         I believe that the new order is strictly better as it removes
838         one path to accessing an object that is undergoing destruction.
839
840         The exposed bug was in RLC::fixedRootBackgroundLayerChanged()
841         where we were dereferencing the RenderView's layer() without
842         checking, despite it being called below ~RenderLayer.
843
844 2013-10-11  Zoltan Horvath  <zoltan@webkit.org>
845
846         Move firstPositiveWidth/adjustLogicalLineTop functions where they're actually used
847         https://bugs.webkit.org/show_bug.cgi?id=122685
848
849         Reviewed by Darin Adler.
850
851         I'm working on the refactoring of RenderBlockLineLayout, progress tracked under bug #121261. For the better readability, I moved
852         firstPositiveWidth and adjustLogicalLineTop functions above pushShapeContentOverflowBelowTheContentBox, where these're actually used.
853
854         No new tests, no behavior change.
855
856         * rendering/RenderBlockLineLayout.cpp:
857         (WebCore::firstPositiveWidth):
858         (WebCore::adjustLogicalLineTop):
859
860 2013-10-11  Ryosuke Niwa  <rniwa@webkit.org>
861
862         Extract an iterator/resolver class from calculateAdjustedNodes
863         https://bugs.webkit.org/show_bug.cgi?id=122687
864
865         Reviewed by Darin Adler.
866
867         Extracted EventRelatedNodeResolver out of calculateAdjustedNodes and replaced calls to calculateAdjustedNodes
868         in updateTouchListsInEventPath and setRelatedTarget by the use of this newly added class.
869
870         * dom/EventContext.h: Added some helper functions to TouchEventContext so that updateTouchListsInEventPath
871         could obtain respective TouchList* without having to hard-code the name.
872         * dom/EventDispatcher.cpp:
873         (WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Added.
874         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost): Extracted from calculateAdjustedNodes.
875         (WebCore::EventPath::updateTouchListsInEventPath): Updated to use EventRelatedNodeResolver. Also made this
876         a member function of EventPath.
877         (WebCore::EventPath::updateTouchLists): Removed local Vectors to TouchList now that updateTouchListsInEventPath
878         can obtain TouchList* on demand.
879         (WebCore::EventPath::setRelatedTarget): Upsed to use EventRelatedNodeResolver.
880
881 2013-10-11  Darin Adler  <darin@apple.com>
882
883         Change most call sites to call ICU directly instead of through WTF::Unicode
884         https://bugs.webkit.org/show_bug.cgi?id=122635
885
886         Reviewed by Alexey Proskuryakov.
887
888         * Modules/indexeddb/IDBKeyPath.cpp:
889         (isIdentifierStartCharacter): Use U_GET_GC_MASK instead of WTF::Unicode::category.
890         (isIdentifierCharacter): Ditto.
891
892         * css/CSSParser.cpp:
893         (WebCore::makeLower): Use u_tolower instead of WTF::Unicode::toLower.
894         Also assert the character fits in a UChar.
895
896         * dom/Document.cpp:
897         (WebCore::isValidNameStart): Use U_GET_GC_MASK instead of WTF::Unicode::category,
898         and u_getIntPropertyValue instead of WTF::Unicode::decompositionType.
899         (WebCore::isValidNamePart): Ditto.
900         (WebCore::canonicalizedTitle): Ditto.
901
902         * editing/Editor.cpp:
903         (WebCore::Editor::insertTextWithoutSendingTextEvent): Use u_isPunct instead of
904         WTF::Unicode::isPunct.
905
906         * editing/TextIterator.cpp:
907         (WebCore::SearchBuffer::append): Use u_strFoldCase instead of WTF::Unicode::foldCase.
908
909         * html/HTMLElement.cpp:
910         (WebCore::HTMLElement::directionality): Use UCharDirection instead of
911         WTF::Unicode::Direction.
912
913         * html/HTMLSelectElement.cpp:
914         (WebCore::HTMLSelectElement::defaultEventHandler): Use u_isprint instead of
915         WTF::Unicode::isPrintableChar.
916
917         * html/TypeAhead.cpp:
918         (WebCore::stripLeadingWhiteSpace): Use u_charDirection instead of
919         WTF::Unicode::direction.
920
921         * html/track/TextTrackCue.cpp:
922         (WebCore::isCueParagraphSeparator): Use u_charType instead of
923         WTF::Unicode::category.
924         (WebCore::TextTrackCue::determineTextDirection): Use u_charDirection instead of
925         WTF::Unicode::direction.
926
927         * page/ContextMenuController.cpp:
928         (WebCore::selectionContainsPossibleWord): Use U_GET_GC_MASK instead of
929         WTF::Unicode::category.
930         * platform/graphics/Font.cpp:
931         (WebCore::Font::canReceiveTextEmphasis): Ditto.
932
933         * platform/graphics/FontGlyphs.cpp:
934         (WebCore::FontGlyphs::glyphDataAndPageForCharacter): Use u_toupper instead of
935         WTF::Unicode::toUpper. Use u_charMirror instead of WTF::Unicode::mirroredChar.
936
937         * platform/graphics/GraphicsContext.cpp:
938         (WebCore::TextRunIterator::direction): Use u_charDirection instead of
939         WTF::Unicode::direction.
940
941         * platform/graphics/SVGGlyph.cpp:
942         (WebCore::charactersWithArabicForm): Use ublock_getCode instead of
943         WTF::Unicode::isArabicChar.
944
945         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
946         (WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks): Use
947         u_getCombiningClass instead of WTF::Unicode::combiningClass.
948
949         * platform/graphics/WidthIterator.cpp:
950         (WebCore::WidthIterator::advanceInternal): Use u_toupper instead of
951         WTF::Unicode::toUpper.
952
953         * platform/graphics/mac/ComplexTextController.cpp:
954         (WebCore::ComplexTextController::collectComplexTextRuns): Added some
955         assertions about the user of u_toupper and tweaked coding style a bit.
956
957         * platform/text/BidiContext.cpp:
958         (WebCore::BidiContext::createUncached): Use UCharDirection instead of
959         WTF::Unicode::Direction.
960         (WebCore::BidiContext::create): Ditto.
961         (WebCore::copyContextAndRebaselineLevel): Ditto.
962         * platform/text/BidiContext.h:
963         (WebCore::BidiContext::dir): Ditto.
964         (WebCore::BidiContext::BidiContext): Ditto.
965         * platform/text/BidiResolver.h:
966         (WebCore::BidiStatus::BidiStatus): Ditto.
967         (WebCore::BidiEmbedding::BidiEmbedding): Ditto.
968         (WebCore::BidiEmbedding::direction): Ditto.
969         (WebCore::BidiCharacterRun::BidiCharacterRun): Ditto.
970         (WebCore::BidiResolver::BidiResolver): Ditto.
971         (WebCore::BidiResolver::setLastDir): Ditto.
972         (WebCore::BidiResolver::setLastStrongDir): Ditto.
973         (WebCore::BidiResolver::setEorDir): Ditto.
974         (WebCore::BidiResolver::dir): Ditto.
975         (WebCore::BidiResolver::setDir): Ditto.
976         (WebCore::BidiResolver::appendRun): Ditto.
977         (WebCore::BidiResolver::embed): Ditto.
978         (WebCore::BidiResolver::checkDirectionInLowerRaiseEmbeddingLevel): Ditto.
979         (WebCore::BidiResolver::lowerExplicitEmbeddingLevel): Ditto.
980         (WebCore::BidiResolver::raiseExplicitEmbeddingLevel): Ditto.
981         (WebCore::BidiResolver::commitExplicitEmbedding): Ditto.
982         (WebCore::BidiResolver::updateStatusLastFromCurrentDirection): Ditto.
983         (WebCore::BidiResolver::createBidiRunsForLine): Ditto.
984
985         * platform/text/SegmentedString.h:
986         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Use u_foldCase
987         instead of WTF::Unicode::foldCase.
988
989         * platform/text/TextBoundaries.cpp:
990         (WebCore::findNextWordFromIndex): Use u_isalnum instead of
991         WTF::Unicode::isAlphanumeric.
992
993         * platform/text/TextBoundaries.h:
994         (WebCore::requiresContextForWordBoundary): Use u_getIntPropertyValue directly
995         instead of WTF::Unicode::requiresComplexContextForWordBreaking.
996
997         * platform/text/mac/TextBoundaries.mm: Removed explicit use of WTF::Unicode,
998         which was unneeded and also will no longer compile.
999
1000         * rendering/BidiRun.h:
1001         (WebCore::BidiRun::BidiRun): Use UCharDirection instead of WTF::Unicode::Direction.
1002         * rendering/InlineFlowBox.h: Ditto.
1003         * rendering/InlineIterator.h:
1004         (WebCore::embedCharFromDirection): Ditto.
1005         (WebCore::notifyObserverWillExitObject): Ditto.
1006         (WebCore::InlineIterator::direction): Ditto.
1007         (WebCore::IsolateTracker::embed): Ditto.
1008         (WebCore::InlineBidiResolver::appendRun): Ditto.
1009
1010         * rendering/RenderBlock.cpp:
1011         (WebCore::isPunctuationForFirstLetter): Use U_GET_GC_MASK instead of
1012         WTF::Unicode::category.
1013
1014         * rendering/RenderBlockLineLayout.cpp:
1015         (WebCore::determineDirectionality): Use u_charDirection instead of
1016         WTF::Unicode::direction.
1017         (WebCore::RenderBlockFlow::handleTrailingSpaces): Ditto.
1018         (WebCore::statusWithDirection): Ditto.
1019         (WebCore::LineBreaker::nextSegmentBreak): Use U_GET_GC_MASK instead of
1020         WTF::Unicode::category.
1021
1022         * rendering/RenderListMarker.cpp:
1023         (WebCore::RenderListMarker::paint): Use u_charDirection instead of
1024         WTF::Unicode::direction.
1025
1026         * rendering/RenderMenuList.cpp:
1027         (WebCore::RenderMenuList::adjustInnerStyle): Use UCharDirection instead of
1028         WTF::Unicode::Direction.
1029
1030         * rendering/RenderText.cpp:
1031         (WebCore::makeCapitalized): Use u_totile instead of WTF::Unicode::toTitleCase.
1032         Also added a comment about the fact that we need to use u_strToTitle instead.
1033
1034         * rendering/RootInlineBox.cpp:
1035         (WebCore::RootInlineBox::lineBreakBidiStatus): Use UCharDirection instead of
1036         WTF::Unicode::Direction.
1037
1038         * svg/SVGFontData.cpp:
1039         (WebCore::SVGFontData::createStringWithMirroredCharacters): Use u_charMirror
1040         instead of WTF::Unicode::mirroredChar.
1041
1042         * xml/XPathParser.cpp:
1043         (WebCore::XPath::charCat): Use U_GET_GC_MASK instead of WTF::Unicode::category.
1044
1045         * platform/graphics/win/UniscribeController.cpp:
1046         (WebCore::UniscribeController::advance):
1047         * platform/win/PopupMenuWin.cpp:
1048         (WebCore::PopupMenuWin::paint):
1049         * platform/win/WebCoreTextRenderer.cpp:
1050         (WebCore::isOneLeftToRightRun):
1051         More of the same for Windows.
1052
1053 2013-10-11  Ryosuke Niwa  <rniwa@webkit.org>
1054
1055         Dramatically simplify calculateAdjustedNodes
1056         https://bugs.webkit.org/show_bug.cgi?id=122680
1057
1058         Reviewed by Antti Koivisto.
1059
1060         Without insertion points, we never have to worry about entering a shadow DOM we've already climbed out of.
1061         Deleted the logic to deal with insertion points in calculateAdjustedNodes accordingly.
1062
1063         * dom/EventDispatcher.cpp:
1064         (WebCore::EventPath::EventPath):
1065         (WebCore::calculateAdjustedNodes):
1066         (WebCore::updateTouchListsInEventPath):
1067         (WebCore::EventPath::updateTouchLists):
1068         (WebCore::EventPath::setRelatedTarget):
1069
1070 2013-10-11  Roger Fong  <roger_fong@apple.com>
1071
1072         [Windows] Fix for fast/xpath test regressions caused by r157205.
1073         https://bugs.webkit.org/show_bug.cgi?id=122658.
1074
1075         Reviewed by Darin Adler.
1076
1077         * xml/XPathStep.h:
1078         (WebCore::XPath::Step::NodeTest::NodeTest):
1079         (WebCore::XPath::Step::NodeTest::operator=):
1080         We were incorrectly setting the predicate list to null instead of the predicate list of the NodeTest being passed in.
1081
1082 2013-10-11  Zoltan Horvath  <zoltan@webkit.org>
1083
1084         [CSS Shapes] Use the floatingObject's logical coordinates to determine its size in computeLogicalLocationForFloat
1085         https://bugs.webkit.org/show_bug.cgi?id=122663
1086
1087         Reviewed by David Hyatt.
1088
1089         Covered by existing float tests in fast/shapes/shape-inside.
1090         I'll add additional tests in bug #122664.
1091
1092         * rendering/RenderBlockFlow.cpp:
1093         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
1094
1095 2013-10-11  Anders Carlsson  <andersca@apple.com>
1096
1097         Remove gesture event support from WebCore
1098         https://bugs.webkit.org/show_bug.cgi?id=122650
1099
1100         Reviewed by Ryosuke Niwa.
1101
1102         * CMakeLists.txt:
1103         * GNUmakefile.list.am:
1104         * WebCore.exp.in:
1105         * WebCore.xcodeproj/project.pbxproj:
1106         * dom/GestureEvent.cpp: Removed.
1107         * dom/GestureEvent.h: Removed.
1108         * dom/Node.cpp:
1109         * dom/Node.h:
1110         * page/EventHandler.cpp:
1111         (WebCore::EventHandler::EventHandler):
1112         (WebCore::EventHandler::clear):
1113         (WebCore::EventHandler::sendContextMenuEventForKey):
1114         * page/EventHandler.h:
1115         * platform/PlatformGestureEvent.h: Removed.
1116         * platform/Scrollbar.cpp:
1117         * platform/Scrollbar.h:
1118         * platform/mac/PlatformEventFactoryMac.h:
1119         * platform/mac/PlatformEventFactoryMac.mm:
1120
1121 2013-10-11  Tim Horton  <timothy_horton@apple.com>
1122
1123         Remove some dead code from PlatformCALayer*
1124         https://bugs.webkit.org/show_bug.cgi?id=122641
1125
1126         Reviewed by Anders Carlsson.
1127
1128         Remove some unused getters from PlatformCALayer and its implementations.
1129
1130         No new tests, just removing dead code.
1131
1132         * platform/graphics/ca/PlatformCALayer.h:
1133         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1134         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1135
1136 2013-10-11  Adam Roben  <aroben@webkit.org>
1137
1138         Confusing CGImageRef memory management in ImageBuffer::copyImage
1139         https://bugs.webkit.org/show_bug.cgi?id=122605
1140
1141         BitmapImage::create was adopting the CGImage passed into it, which
1142         resulted in some strange contortions in ImageBuffer::copyImage that
1143         made it look like it was leaking CGImages, when in fact it was just
1144         relying on BitmapImage to adopt the extra references.
1145
1146         BitmapImage::create now retains the passed-in CGImage, and I updated
1147         the two callers to it to expect that (one here, one in WebKit2). I
1148         also changed ImageBuffer::copyNativeImage to return a RetainPtr to
1149         reduce the number of adoptCF()s needed and make it harder to make
1150         programming mistakes.
1151
1152         Reviewed by Simon Fraser.
1153
1154         No new tests because this is just a code cleanup.
1155
1156         * platform/graphics/ImageBuffer.h: Changed copyNativeImage to return a
1157         RetainPtr<CGImageRef.
1158
1159         * platform/graphics/cg/BitmapImageCG.cpp:
1160         (WebCore::BitmapImage::BitmapImage): Adopt the passed-in CGImage,
1161         since we're taking ownership of it. (We release it in
1162         FrameData::clear.)
1163
1164         * platform/graphics/cg/ImageBufferCG.cpp:
1165         (WebCore::ImageBuffer::copyImage): Updated for copyNativeImage's new
1166         return type and to take into account BitmapImage::create's new
1167         retaining semantics. This makes this function not have to be so clever
1168         about retain counts.
1169
1170         (WebCore::ImageBuffer::copyNativeImage): Changed to return a
1171         RetainPtr<CGImageRef>.
1172
1173         (WebCore::ImageBuffer::draw):
1174         (WebCore::ImageBuffer::clip):
1175         (WebCore::ImageBuffer::putByteArray):
1176         (WebCore::ImageBuffer::toDataURL):
1177         Updated for changes to copyNativeImage.
1178
1179 2013-10-11  Bear Travis  <betravis@adobe.com>
1180
1181         [CSS Shapes] Shape-Image-Threshold should be animatable
1182         https://bugs.webkit.org/show_bug.cgi?id=122622
1183
1184         Reviewed by Darin Adler.
1185
1186         Make the shape-image-threshold property respond to dynamic changes
1187         made through JS or CSS animations. Responding to changes made to
1188         shape-image-threshold is handled in RenderBox::updateShapeOutsideInfoAfterStyleChange,
1189         while CSSPropertyAnimation.cpp adds the property to the list of
1190         animatable properties.
1191
1192         Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-image-threshold.html
1193                fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html
1194
1195         * page/animation/CSSPropertyAnimation.cpp:
1196         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add
1197         shape-image-threshold to the list of animatable properties.
1198         * rendering/RenderBox.cpp:
1199         (WebCore::RenderBox::styleDidChange): updateShapeOutsideInfoAfterStyleChange
1200         needs to take two RenderStyle arguments to compare multiple shape properties,
1201         rather than just the shape-outside property.
1202         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Compare
1203         shape-image-threshold values to see if they changed, and invalidate the layout
1204         if necessary.
1205         * rendering/RenderBox.h:
1206
1207 2013-10-11  Brent Fulgham  <bfulgham@apple.com>
1208
1209         Unreviewed gardening. Remove a Windows work-around that is not needed.
1210
1211         * dom/Range.cpp:
1212         (WebCore::rangeOfContents): Move implementation back to source file.
1213         * dom/Range.h: Remove inline I added to work around a compiler bug.
1214
1215 2013-10-11  Commit Queue  <commit-queue@webkit.org>
1216
1217         Unreviewed, rolling out r157297.
1218         http://trac.webkit.org/changeset/157297
1219         https://bugs.webkit.org/show_bug.cgi?id=122651
1220
1221         Caused crashes on multiple platform/mac-wk2/tiled-drawing
1222         tests (Requested by ap on #webkit).
1223
1224         * rendering/RenderLayer.cpp:
1225         (WebCore::RenderLayer::operator new):
1226         (WebCore::RenderLayer::operator delete):
1227         (WebCore::RenderLayer::destroy):
1228         * rendering/RenderLayer.h:
1229         * rendering/RenderLayerModelObject.cpp:
1230         (WebCore::RenderLayerModelObject::RenderLayerModelObject):
1231         (WebCore::RenderLayerModelObject::destroyLayer):
1232         (WebCore::RenderLayerModelObject::ensureLayer):
1233         * rendering/RenderLayerModelObject.h:
1234         (WebCore::RenderLayerModelObject::layer):
1235
1236 2013-10-11  Darin Adler  <darin@apple.com>
1237
1238         Fix build.
1239
1240         * html/HTMLElement.cpp:
1241         (WebCore::HTMLElement::translate): Do a const_cast when creating the
1242         lineage, since it doesn't yet work with const pointers.
1243
1244 2013-10-11  Darin Adler  <darin@apple.com>
1245
1246         Do a bit of optimization and cleanup in the HTMLElement class
1247         https://bugs.webkit.org/show_bug.cgi?id=122640
1248
1249         Reviewed by Andreas Kling.
1250
1251         * html/HTMLElement.cpp:
1252         (WebCore::unicodeBidiAttributeForDirAuto): Take a reference.
1253         (WebCore::HTMLElement::collectStyleForPresentationAttribute): Pass one.
1254         (WebCore::mergeWithNextTextNode): Take a reference to a Text node instead
1255         of a PassRefPtr to a Node. Also removed unnecessary check of parentNode.
1256         Also update to new calling convention for mergeWithNextTextNode.
1257         (WebCore::HTMLElement::setOuterHTML): Use parentElement instead of
1258         parentNode, since Antti says that's the future, and either will work here.
1259         Also use nullptr.
1260         (WebCore::HTMLElement::textToFragment): Fix indentation and use nullptr.
1261         (WebCore::HTMLElement::setOuterText): Use a RefPtr for the parent here,
1262         since otherwise there is no guarantee it survives. Also use nullptr and
1263         update to new calling convention for mergeWithNextTextNode.
1264         (WebCore::HTMLElement::insertAdjacent): Use nullptr.
1265         (WebCore::HTMLElement::insertAdjacentElement): Use nullptr.
1266         (WebCore::contextElementForInsertion): Use nullptr.
1267         (WebCore::HTMLElement::contentEditable): Use ASCIILiteral.
1268         (WebCore::HTMLElement::setContentEditable): Use AtomicString::ConstructFromLiteral.
1269         (WebCore::HTMLElement::draggable): Use fastGetAttribute.
1270         (WebCore::HTMLElement::setDraggable): Use AtomicString::ConstructFromLiteral.
1271         (WebCore::HTMLElement::setSpellcheck): Use AtomicString::ConstructFromLiteral.
1272         (WebCore::HTMLElement::click): Use nullptr.
1273         (WebCore::HTMLElement::accessKeyAction): Use nullptr.
1274         (WebCore::HTMLElement::title): Use fastGetAttribute.
1275         (WebCore::HTMLElement::translateAttributeMode): Use fastGetAttribute, isNull,
1276         and isEmpty.
1277         (WebCore::HTMLElement::translate): Use parentElement and toHTMLElement.
1278         Use early-continue style instead of nesting the whole loop body inside an if.
1279         (WebCore::setHasDirAutoFlagRecursively): Use nullptr.
1280         (WebCore::HTMLElement::hasDirectionAuto): Use isNull.
1281         (WebCore::HTMLElement::directionality): Use nullptr.
1282         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): Use nullptr.
1283         (WebCore::HTMLElement::addHTMLLengthToStyle): Use longer variable names.
1284
1285         * html/HTMLTableCellElement.cpp:
1286         (WebCore::HTMLTableCellElement::abbr): Use fastGetAttribute.
1287         (WebCore::HTMLTableCellElement::axis): Ditto.
1288         (WebCore::HTMLTableCellElement::headers): Ditto.
1289         (WebCore::HTMLTableCellElement::scope): Ditto.
1290         * html/HTMLTableColElement.cpp:
1291         (WebCore::HTMLTableColElement::width): Ditto.
1292
1293 2013-10-10  Darin Adler  <darin@apple.com>
1294
1295         Use after free in WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded
1296         https://bugs.webkit.org/show_bug.cgi?id=121033
1297
1298         Reviewed by Dean Jackson.
1299
1300         For safe iteration, use a set rather than a vector, and remove the clients from
1301         the set if they are removed during iteration.
1302
1303         Test: fast/animation/request-animation-frame-remove-client.html
1304
1305         * platform/graphics/DisplayRefreshMonitor.cpp:
1306         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): Initialize the
1307         m_clientsToBeNotified pointer to null.
1308         (WebCore::DisplayRefreshMonitor::removeClient): If there is a m_clientsToBeNotified
1309         set, remove from it as well as the real m_clients set.
1310         (WebCore::DisplayRefreshMonitor::displayDidRefresh): Use a HashSet instead of a
1311         vector for the copy of the clients set we iterate.
1312
1313         * platform/graphics/DisplayRefreshMonitor.h: Moved some of the BlackBerry-specific
1314         part of this out of the header. Added a new HashSet pointer, m_clientsToBeNotified,
1315         to be used to remove clients during the notification process. Also added a FIXME.
1316
1317         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: Moved the
1318         DisplayAnimationClient class in here.
1319
1320 2013-10-10  Dean Jackson  <dino@apple.com>
1321
1322         Use after free in WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded
1323         http://webkit.org/b/121033
1324
1325         Reviewed by Darin Adler.
1326
1327         Add an ASSERT to detect if an animation client will be removed
1328         during the callback dispatch.
1329
1330         Test: fast/animation/request-animation-frame-remove-client.html
1331
1332         * platform/graphics/DisplayRefreshMonitor.cpp:
1333         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
1334
1335 2013-10-11  Andreas Kling  <akling@apple.com>
1336
1337         Make RenderLayer not arena-allocated.
1338         <https://webkit.org/b/87523>
1339
1340         Reviewed by Antti Koivisto.
1341
1342         Let RenderLayerModelObject store its RenderLayer in a unique_ptr.
1343         Layers are relatively low-volume objects and this looks neutral
1344         on our performance tests.
1345
1346 2013-10-11  Zalan Bujtas  <zalan@apple.com>
1347
1348         REGRESSION (r155607): Javascript site does not load visually on panerabread.com
1349         https://bugs.webkit.org/show_bug.cgi?id=122461
1350
1351         Reviewed by Simon Fraser.
1352         
1353         Do not modify the composited layer backing's internal layer structure directly 
1354         when the clipping behaviour changes.
1355         
1356         When we directly create/destroy RenderLayerBacking::m_ancestorClippingLayer to 
1357         reflect the new clipping state, other, depending layers need updating. In order to
1358         not to corrupt the internal hierarchy, mark the compositing layers dirty and let
1359         the normal updating mechanism take care of creating/destroying the ancestor layers.
1360
1361         Existing tests are extended.
1362
1363         * rendering/RenderLayer.cpp:
1364         (WebCore::RenderLayer::checkIfDescendantClippingContextNeedsUpdate):
1365         (WebCore::RenderLayer::styleChanged):
1366         * rendering/RenderLayer.h:
1367         * rendering/RenderLayerBacking.h:
1368
1369 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
1370
1371         Make EventPath private to EventDispatcher.cpp
1372         https://bugs.webkit.org/show_bug.cgi?id=122638
1373
1374         Reviewed by Darin Adler.
1375
1376         Move the declaration of EventPath into EventDispatcher.cpp since EventPath is only used in this file.
1377         Also make EventDispatcher a namespace since it is never instantiated since r157250.
1378
1379         * dom/EventDispatcher.cpp:
1380         (WebCore::EventPath::isEmpty):
1381         (WebCore::EventPath::size):
1382         (WebCore::EventPath::contextAt):
1383         (WebCore::EventPath::lastContextIfExists):
1384         * dom/EventDispatcher.h:
1385         * inspector/InspectorInstrumentation.h:
1386         (WebCore::InspectorInstrumentation::willDispatchEvent):
1387
1388 2013-10-10  Santosh Mahto  <santosh.ma@samsung.com>
1389
1390         contentEditable with "position:relative" paragraphs is buggy
1391         https://bugs.webkit.org/show_bug.cgi?id=33950
1392
1393         Reviewed by Darin Adler.
1394
1395         When paragraph is positioned(relative/absolute/fixed) then deleting
1396         that paragraph cause wrong merging of other(below) paragraphs. This is
1397         happening because positioned element is treated as special element and
1398         on deletion complete paragraph element is removed. The ranges become
1399         paragraph. This issue happens when all the content of special element
1400         are deleted. So the merging of paragraph is avoided in this scenario.
1401
1402         Test: editing/deleting/deleting-relative-positioned-special-element.html
1403
1404         * editing/DeleteSelectionCommand.cpp:
1405         (WebCore::DeleteSelectionCommand::initializeStartEnd):Avoid merging
1406         block when special candidate are included in deletion range
1407
1408 2013-10-10  Brendan Long  <b.long@cablelabs.com>
1409
1410         Track controls show metadata and chapter tracks
1411         https://bugs.webkit.org/show_bug.cgi?id=122468
1412
1413         Reviewed by Darin Adler.
1414
1415         Test: media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html
1416
1417         * page/CaptionUserPreferences.cpp:
1418         (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Only show captions, descriptions and subtitles in the track controls.
1419
1420 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
1421
1422         EventContext should be used only in EventDispatcher.cpp
1423         https://bugs.webkit.org/show_bug.cgi?id=122631
1424
1425         Reviewed by Anders Carlsson.
1426
1427         Merged WindowEventContext into EventDispatcher. Moved the code to avoid dispatching load event on
1428         window into dispatchEventInDOM so that WindowEventContext's constructor doesn't need Event.
1429
1430         Also replaced DOMWindow, Node, and EventPath arguments to InspectorInstrumentation::willDispatchEvent
1431         by a single boolean indicating whether window, the origin, or the event path has an event listener.
1432
1433         * CMakeLists.txt:
1434         * GNUmakefile.list.am:
1435         * WebCore.vcxproj/WebCore.vcxproj:
1436         * WebCore.vcxproj/WebCore.vcxproj.filters:
1437         * WebCore.xcodeproj/project.pbxproj:
1438         * dom/DOMAllInOne.cpp:
1439         * dom/EventDispatcher.cpp:
1440         (WebCore::WindowEventContext::window): Moved from WindowEventContext.
1441         (WebCore::WindowEventContext::target): Ditto.
1442         (WebCore::WindowEventContext::WindowEventContext): Ditto; removed the code to avoid dispatching load
1443         event on window since that's checked in dispatchEventInDOM now.
1444         (WebCore::WindowEventContext::handleLocalEvents): Ditto.
1445         (WebCore::dispatchEventInDOM): Avoid calling handleLocalEvent on a load event with WindowEventContext.
1446         (WebCore::EventDispatcher::dispatchEvent): Pass a boolean to indicate whether window, the origin, or
1447         the event path contains any event listener to InspectorInstrumentation::willDispatchEvent to hide
1448         EventPath from the inspector code.
1449         * dom/EventDispatcher.h:
1450         * dom/Node.cpp:
1451         * dom/Node.h:
1452         * dom/WindowEventContext.cpp: Removed.
1453         * dom/WindowEventContext.h: Removed.
1454         * inspector/InspectorDOMAgent.cpp:
1455         * inspector/InspectorInstrumentation.cpp:
1456         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1457         * inspector/InspectorInstrumentation.h:
1458         (WebCore::InspectorInstrumentation::willDispatchEvent):
1459
1460 2013-10-10  Darin Adler  <darin@apple.com>
1461
1462         REGRESSION (r157205?): Leaks in XPath
1463         https://bugs.webkit.org/show_bug.cgi?id=122609
1464
1465         Reviewed by Andreas Kling.
1466
1467         * xml/XPathGrammar.y: Fixed warnings by adding missing "$$ = $1" to various rules.
1468         Added local unique_ptr for NodeTest and ArgumentList in three rules, so they
1469         won't be leaked.
1470
1471 2013-10-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1472
1473         Add toSVGColor|Paint() to cleanup static_cast<>, and use it 
1474         https://bugs.webkit.org/show_bug.cgi?id=122630
1475
1476         Reviewed by Andreas Kling.
1477
1478         SVGColor and SVGPaint can't use CSS_VALUE_TYPE_CASTS(), this cl adds
1479         toSVGColor() and toSVGPaint() manually. Those functions will help to
1480         detect bad type cast.
1481
1482         * css/CSSValue.cpp:
1483         (WebCore::CSSValue::cssText):
1484         (WebCore::CSSValue::destroy):
1485         (WebCore::CSSValue::cloneForCSSOM):
1486         * css/SVGCSSStyleSelector.cpp:
1487         (WebCore::StyleResolver::applySVGProperty):
1488         * svg/SVGColor.h:
1489         (WebCore::toSVGColor):
1490         * svg/SVGPaint.h:
1491         (WebCore::toSVGPaint):
1492
1493 2013-10-10  Andreas Kling  <akling@apple.com>
1494
1495         Kill WebCore::BindingState.
1496         <https://webkit.org/b/122606>
1497
1498         Reviewed by Darin Adler.
1499
1500         Just use JSC::ExecState directly instead.
1501
1502 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
1503
1504         Remove EventRetargeter.h/cpp
1505         https://bugs.webkit.org/show_bug.cgi?id=122625
1506
1507         Reviewed by Anders Carlsson.
1508
1509         Merged the remaining contents of EventRetargeter.h and EventRetargter.cpp into EventDispatcher.cpp.
1510
1511         * CMakeLists.txt:
1512         * GNUmakefile.list.am:
1513         * Modules/indieui/UIRequestEvent.cpp:
1514         * WebCore.xcodeproj/project.pbxproj:
1515         * dom/DOMAllInOne.cpp:
1516         * dom/Event.cpp:
1517         * dom/Event.h:
1518         * dom/EventDispatcher.cpp:
1519         (WebCore::eventTargetRespectingTargetRules):
1520         (WebCore::shouldEventCrossShadowBoundary):
1521         (WebCore::nodeOrHostIfPseudoElement):
1522         (WebCore::EventPath::EventPath):
1523         (WebCore::buildRelatedNodeMap):
1524         (WebCore::addRelatedNodeForUnmapedTreeScopes):
1525         (WebCore::calculateAdjustedNodes):
1526         (WebCore::updateTouchListsInEventPath):
1527         (WebCore::EventPath::updateTouchLists):
1528         (WebCore::EventPath::setRelatedTarget):
1529         * dom/EventRetargeter.cpp: Removed.
1530         * dom/EventRetargeter.h: Removed.
1531         * dom/FocusEvent.cpp:
1532         * dom/GestureEvent.h:
1533         * dom/KeyboardEvent.h:
1534         * dom/MouseEvent.cpp:
1535         * dom/MouseEvent.h:
1536         * dom/TouchEvent.cpp:
1537         * dom/UIEvent.cpp:
1538         * dom/WheelEvent.cpp:
1539
1540 2013-10-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1541
1542         Making the base implementation of isAudioStreamSource, in MediaStreamSource, return the correct value
1543         https://bugs.webkit.org/show_bug.cgi?id=122612
1544
1545         Reviewed by Jer Noble.
1546
1547         There is no reason for this implementation, in the base class, to always return false
1548         if we already have the information about the type of the source.
1549
1550         No new tests needed.
1551
1552         * Modules/webaudio/MediaStreamAudioSource.h:
1553         * platform/mediastream/MediaStreamSource.h:
1554         (WebCore::MediaStreamSource::isAudioStreamSource):
1555
1556 2013-10-10  Timothy Hatcher  <timothy@apple.com>
1557
1558         Web Inspector: Remove the old front-end from WebKit.
1559
1560         https://bugs.webkit.org/show_bug.cgi?id=122295
1561
1562         * inspector/front-end/AceTextEditor.js: Removed.
1563         * inspector/front-end/AdvancedSearchController.js: Removed.
1564         * inspector/front-end/ApplicationCacheItemsView.js: Removed.
1565         * inspector/front-end/ApplicationCacheModel.js: Removed.
1566         * inspector/front-end/AuditCategories.js: Removed.
1567         * inspector/front-end/AuditController.js: Removed.
1568         * inspector/front-end/AuditFormatters.js: Removed.
1569         * inspector/front-end/AuditLauncherView.js: Removed.
1570         * inspector/front-end/AuditResultView.js: Removed.
1571         * inspector/front-end/AuditRules.js: Removed.
1572         * inspector/front-end/AuditsPanel.js: Removed.
1573         * inspector/front-end/BottomUpProfileDataGridTree.js: Removed.
1574         * inspector/front-end/BreakpointManager.js: Removed.
1575         * inspector/front-end/BreakpointsSidebarPane.js: Removed.
1576         * inspector/front-end/CPUProfileView.js: Removed.
1577         * inspector/front-end/CSSMetadata.js: Removed.
1578         * inspector/front-end/CSSNamedFlowCollectionsView.js: Removed.
1579         * inspector/front-end/CSSNamedFlowView.js: Removed.
1580         * inspector/front-end/CSSSelectorProfileView.js: Removed.
1581         * inspector/front-end/CSSStyleModel.js: Removed.
1582         * inspector/front-end/CallStackSidebarPane.js: Removed.
1583         * inspector/front-end/CanvasProfileView.js: Removed.
1584         * inspector/front-end/Checkbox.js: Removed.
1585         * inspector/front-end/CodeMirrorTextEditor.js: Removed.
1586         * inspector/front-end/Color.js: Removed.
1587         * inspector/front-end/CompilerScriptMapping.js: Removed.
1588         * inspector/front-end/ConsoleMessage.js: Removed.
1589         * inspector/front-end/ConsoleModel.js: Removed.
1590         * inspector/front-end/ConsolePanel.js: Removed.
1591         * inspector/front-end/ConsoleView.js: Removed.
1592         * inspector/front-end/ContentProvider.js: Removed.
1593         * inspector/front-end/ContentProviderBasedProjectDelegate.js: Removed.
1594         * inspector/front-end/ContentProviders.js: Removed.
1595         * inspector/front-end/ContextMenu.js: Removed.
1596         * inspector/front-end/CookieItemsView.js: Removed.
1597         * inspector/front-end/CookieParser.js: Removed.
1598         * inspector/front-end/CookiesTable.js: Removed.
1599         * inspector/front-end/DOMAgent.js: Removed.
1600         * inspector/front-end/DOMBreakpointsSidebarPane.js: Removed.
1601         * inspector/front-end/DOMCountersGraph.js: Removed.
1602         * inspector/front-end/DOMExtension.js: Removed.
1603         * inspector/front-end/DOMPresentationUtils.js: Removed.
1604         * inspector/front-end/DOMStorage.js: Removed.
1605         * inspector/front-end/DOMStorageItemsView.js: Removed.
1606         * inspector/front-end/DOMSyntaxHighlighter.js: Removed.
1607         * inspector/front-end/DataGrid.js: Removed.
1608         * inspector/front-end/Database.js: Removed.
1609         * inspector/front-end/DatabaseQueryView.js: Removed.
1610         * inspector/front-end/DatabaseTableView.js: Removed.
1611         * inspector/front-end/DebuggerModel.js: Removed.
1612         * inspector/front-end/DebuggerScriptMapping.js: Removed.
1613         * inspector/front-end/DefaultScriptMapping.js: Removed.
1614         * inspector/front-end/DefaultTextEditor.js: Removed.
1615         * inspector/front-end/Dialog.js: Removed.
1616         * inspector/front-end/DirectoryContentView.js: Removed.
1617         * inspector/front-end/DockController.js: Removed.
1618         * inspector/front-end/Drawer.js: Removed.
1619         * inspector/front-end/ElementsPanel.js: Removed.
1620         * inspector/front-end/ElementsPanelDescriptor.js: Removed.
1621         * inspector/front-end/ElementsTreeOutline.js: Removed.
1622         * inspector/front-end/EmptyView.js: Removed.
1623         * inspector/front-end/EventListenersSidebarPane.js: Removed.
1624         * inspector/front-end/ExtensionAPI.js: Removed.
1625         * inspector/front-end/ExtensionAuditCategory.js: Removed.
1626         * inspector/front-end/ExtensionPanel.js: Removed.
1627         * inspector/front-end/ExtensionRegistryStub.js: Removed.
1628         * inspector/front-end/ExtensionServer.js: Removed.
1629         * inspector/front-end/ExtensionView.js: Removed.
1630         * inspector/front-end/FileContentView.js: Removed.
1631         * inspector/front-end/FileManager.js: Removed.
1632         * inspector/front-end/FileMapping.js: Removed.
1633         * inspector/front-end/FileSystemMapping.js: Removed.
1634         * inspector/front-end/FileSystemModel.js: Removed.
1635         * inspector/front-end/FileSystemProjectDelegate.js: Removed.
1636         * inspector/front-end/FileSystemView.js: Removed.
1637         * inspector/front-end/FileUtils.js: Removed.
1638         * inspector/front-end/FilteredItemSelectionDialog.js: Removed.
1639         * inspector/front-end/FlameChart.js: Removed.
1640         * inspector/front-end/FontView.js: Removed.
1641         * inspector/front-end/GoToLineDialog.js: Removed.
1642         * inspector/front-end/HAREntry.js: Removed.
1643         * inspector/front-end/HandlerRegistry.js: Removed.
1644         * inspector/front-end/HeapSnapshot.js: Removed.
1645         * inspector/front-end/HeapSnapshotDataGrids.js: Removed.
1646         * inspector/front-end/HeapSnapshotGridNodes.js: Removed.
1647         * inspector/front-end/HeapSnapshotLoader.js: Removed.
1648         * inspector/front-end/HeapSnapshotProxy.js: Removed.
1649         * inspector/front-end/HeapSnapshotView.js: Removed.
1650         * inspector/front-end/HeapSnapshotWorker.js: Removed.
1651         * inspector/front-end/HeapSnapshotWorkerDispatcher.js: Removed.
1652         * inspector/front-end/HelpScreen.js: Removed.
1653         * inspector/front-end/ImageView.js: Removed.
1654         * inspector/front-end/Images/addIcon.png: Removed.
1655         * inspector/front-end/Images/applicationCache.png: Removed.
1656         * inspector/front-end/Images/back.png: Removed.
1657         * inspector/front-end/Images/breakpointBorder.png: Removed.
1658         * inspector/front-end/Images/breakpointConditionalBorder.png: Removed.
1659         * inspector/front-end/Images/breakpointConditionalCounterBorder.png: Removed.
1660         * inspector/front-end/Images/breakpointCounterBorder.png: Removed.
1661         * inspector/front-end/Images/checker.png: Removed.
1662         * inspector/front-end/Images/closeButtons.png: Removed.
1663         * inspector/front-end/Images/cookie.png: Removed.
1664         * inspector/front-end/Images/database.png: Removed.
1665         * inspector/front-end/Images/databaseTable.png: Removed.
1666         * inspector/front-end/Images/debuggerContinue.png: Removed.
1667         * inspector/front-end/Images/debuggerPause.png: Removed.
1668         * inspector/front-end/Images/debuggerStepInto.png: Removed.
1669         * inspector/front-end/Images/debuggerStepOut.png: Removed.
1670         * inspector/front-end/Images/debuggerStepOver.png: Removed.
1671         * inspector/front-end/Images/deleteIcon.png: Removed.
1672         * inspector/front-end/Images/disclosureTriangleSmallDown.png: Removed.
1673         * inspector/front-end/Images/disclosureTriangleSmallDownBlack.png: Removed.
1674         * inspector/front-end/Images/disclosureTriangleSmallDownWhite.png: Removed.
1675         * inspector/front-end/Images/disclosureTriangleSmallRight.png: Removed.
1676         * inspector/front-end/Images/disclosureTriangleSmallRightBlack.png: Removed.
1677         * inspector/front-end/Images/disclosureTriangleSmallRightDown.png: Removed.
1678         * inspector/front-end/Images/disclosureTriangleSmallRightDownBlack.png: Removed.
1679         * inspector/front-end/Images/disclosureTriangleSmallRightDownWhite.png: Removed.
1680         * inspector/front-end/Images/disclosureTriangleSmallRightWhite.png: Removed.
1681         * inspector/front-end/Images/domain.png: Removed.
1682         * inspector/front-end/Images/errorIcon.png: Removed.
1683         * inspector/front-end/Images/errorMediumIcon.png: Removed.
1684         * inspector/front-end/Images/errorRedDot.png: Removed.
1685         * inspector/front-end/Images/fileSystem.png: Removed.
1686         * inspector/front-end/Images/forward.png: Removed.
1687         * inspector/front-end/Images/frame.png: Removed.
1688         * inspector/front-end/Images/glossyHeader.png: Removed.
1689         * inspector/front-end/Images/glossyHeaderPressed.png: Removed.
1690         * inspector/front-end/Images/glossyHeaderSelected.png: Removed.
1691         * inspector/front-end/Images/glossyHeaderSelectedPressed.png: Removed.
1692         * inspector/front-end/Images/goArrow.png: Removed.
1693         * inspector/front-end/Images/graphLabelCalloutLeft.png: Removed.
1694         * inspector/front-end/Images/graphLabelCalloutRight.png: Removed.
1695         * inspector/front-end/Images/indexedDB.png: Removed.
1696         * inspector/front-end/Images/indexedDBIndex.png: Removed.
1697         * inspector/front-end/Images/indexedDBObjectStore.png: Removed.
1698         * inspector/front-end/Images/localStorage.png: Removed.
1699         * inspector/front-end/Images/namedFlowOverflow.png: Removed.
1700         * inspector/front-end/Images/navigatorShowHideButton.png: Removed.
1701         * inspector/front-end/Images/paneAddButtons.png: Removed.
1702         * inspector/front-end/Images/paneBottomGrow.png: Removed.
1703         * inspector/front-end/Images/paneBottomGrowActive.png: Removed.
1704         * inspector/front-end/Images/paneElementStateButtons.png: Removed.
1705         * inspector/front-end/Images/paneFilterButtons.png: Removed.
1706         * inspector/front-end/Images/paneGrowHandleLine.png: Removed.
1707         * inspector/front-end/Images/paneRefreshButtons.png: Removed.
1708         * inspector/front-end/Images/paneSettingsButtons.png: Removed.
1709         * inspector/front-end/Images/popoverArrows.png: Removed.
1710         * inspector/front-end/Images/popoverBackground.png: Removed.
1711         * inspector/front-end/Images/profileGroupIcon.png: Removed.
1712         * inspector/front-end/Images/profileIcon.png: Removed.
1713         * inspector/front-end/Images/profileSmallIcon.png: Removed.
1714         * inspector/front-end/Images/profilesSilhouette.png: Removed.
1715         * inspector/front-end/Images/programCounterBorder.png: Removed.
1716         * inspector/front-end/Images/radioDot.png: Removed.
1717         * inspector/front-end/Images/regionEmpty.png: Removed.
1718         * inspector/front-end/Images/regionFit.png: Removed.
1719         * inspector/front-end/Images/regionOverset.png: Removed.
1720         * inspector/front-end/Images/resourceCSSIcon.png: Removed.
1721         * inspector/front-end/Images/resourceDocumentIcon.png: Removed.
1722         * inspector/front-end/Images/resourceDocumentIconSmall.png: Removed.
1723         * inspector/front-end/Images/resourceJSIcon.png: Removed.
1724         * inspector/front-end/Images/resourcePlainIcon.png: Removed.
1725         * inspector/front-end/Images/resourcePlainIconSmall.png: Removed.
1726         * inspector/front-end/Images/resourcesSizeGraphIcon.png: Removed.
1727         * inspector/front-end/Images/resourcesTimeGraphIcon.png: Removed.
1728         * inspector/front-end/Images/scriptsSilhouette.png: Removed.
1729         * inspector/front-end/Images/searchNext.png: Removed.
1730         * inspector/front-end/Images/searchPrev.png: Removed.
1731         * inspector/front-end/Images/searchSmallBlue.png: Removed.
1732         * inspector/front-end/Images/searchSmallBrightBlue.png: Removed.
1733         * inspector/front-end/Images/searchSmallGray.png: Removed.
1734         * inspector/front-end/Images/searchSmallWhite.png: Removed.
1735         * inspector/front-end/Images/segment.png: Removed.
1736         * inspector/front-end/Images/segmentEnd.png: Removed.
1737         * inspector/front-end/Images/segmentHover.png: Removed.
1738         * inspector/front-end/Images/segmentHoverEnd.png: Removed.
1739         * inspector/front-end/Images/segmentSelected.png: Removed.
1740         * inspector/front-end/Images/segmentSelectedEnd.png: Removed.
1741         * inspector/front-end/Images/sessionStorage.png: Removed.
1742         * inspector/front-end/Images/spinner.gif: Removed.
1743         * inspector/front-end/Images/spinnerActive.gif: Removed.
1744         * inspector/front-end/Images/spinnerActiveSelected.gif: Removed.
1745         * inspector/front-end/Images/spinnerInactive.gif: Removed.
1746         * inspector/front-end/Images/spinnerInactiveSelected.gif: Removed.
1747         * inspector/front-end/Images/splitviewDimple.png: Removed.
1748         * inspector/front-end/Images/splitviewDividerBackground.png: Removed.
1749         * inspector/front-end/Images/statusbarButtonGlyphs.png: Removed.
1750         * inspector/front-end/Images/statusbarButtonGlyphs2x.png: Removed.
1751         * inspector/front-end/Images/statusbarResizerHorizontal.png: Removed.
1752         * inspector/front-end/Images/statusbarResizerVertical.png: Removed.
1753         * inspector/front-end/Images/successGreenDot.png: Removed.
1754         * inspector/front-end/Images/thumbActiveHoriz.png: Removed.
1755         * inspector/front-end/Images/thumbActiveVert.png: Removed.
1756         * inspector/front-end/Images/thumbHoriz.png: Removed.
1757         * inspector/front-end/Images/thumbHoverHoriz.png: Removed.
1758         * inspector/front-end/Images/thumbHoverVert.png: Removed.
1759         * inspector/front-end/Images/thumbVert.png: Removed.
1760         * inspector/front-end/Images/tickMark.png: Removed.
1761         * inspector/front-end/Images/timelineHollowPillBlue.png: Removed.
1762         * inspector/front-end/Images/timelineHollowPillGray.png: Removed.
1763         * inspector/front-end/Images/timelineHollowPillGreen.png: Removed.
1764         * inspector/front-end/Images/timelineHollowPillOrange.png: Removed.
1765         * inspector/front-end/Images/timelineHollowPillPurple.png: Removed.
1766         * inspector/front-end/Images/timelineHollowPillRed.png: Removed.
1767         * inspector/front-end/Images/timelineHollowPillYellow.png: Removed.
1768         * inspector/front-end/Images/timelinePillBlue.png: Removed.
1769         * inspector/front-end/Images/timelinePillGray.png: Removed.
1770         * inspector/front-end/Images/timelinePillGreen.png: Removed.
1771         * inspector/front-end/Images/timelinePillOrange.png: Removed.
1772         * inspector/front-end/Images/timelinePillPurple.png: Removed.
1773         * inspector/front-end/Images/timelinePillRed.png: Removed.
1774         * inspector/front-end/Images/timelinePillYellow.png: Removed.
1775         * inspector/front-end/Images/toolbarIcons.png: Removed.
1776         * inspector/front-end/Images/toolbarIconsSmall.png: Removed.
1777         * inspector/front-end/Images/toolbarItemSelected.png: Removed.
1778         * inspector/front-end/Images/trackHoriz.png: Removed.
1779         * inspector/front-end/Images/trackVert.png: Removed.
1780         * inspector/front-end/Images/treeDownTriangleBlack.png: Removed.
1781         * inspector/front-end/Images/treeDownTriangleWhite.png: Removed.
1782         * inspector/front-end/Images/treeRightTriangleBlack.png: Removed.
1783         * inspector/front-end/Images/treeRightTriangleWhite.png: Removed.
1784         * inspector/front-end/Images/treeUpTriangleBlack.png: Removed.
1785         * inspector/front-end/Images/treeUpTriangleWhite.png: Removed.
1786         * inspector/front-end/Images/userInputIcon.png: Removed.
1787         * inspector/front-end/Images/userInputPreviousIcon.png: Removed.
1788         * inspector/front-end/Images/userInputResultIcon.png: Removed.
1789         * inspector/front-end/Images/warningIcon.png: Removed.
1790         * inspector/front-end/Images/warningMediumIcon.png: Removed.
1791         * inspector/front-end/Images/warningOrangeDot.png: Removed.
1792         * inspector/front-end/Images/warningsErrors.png: Removed.
1793         * inspector/front-end/IndexedDBModel.js: Removed.
1794         * inspector/front-end/IndexedDBViews.js: Removed.
1795         * inspector/front-end/InspectElementModeController.js: Removed.
1796         * inspector/front-end/InspectorBackend.js: Removed.
1797         * inspector/front-end/InspectorBackendCommands.qrc: Removed.
1798         * inspector/front-end/InspectorFrontendAPI.js: Removed.
1799         * inspector/front-end/InspectorFrontendHostStub.js: Removed.
1800         * inspector/front-end/InspectorView.js: Removed.
1801         * inspector/front-end/IsolatedFileSystem.js: Removed.
1802         * inspector/front-end/IsolatedFileSystemManager.js: Removed.
1803         * inspector/front-end/JSHeapSnapshot.js: Removed.
1804         * inspector/front-end/JavaScriptFormatter.js: Removed.
1805         * inspector/front-end/JavaScriptSourceFrame.js: Removed.
1806         * inspector/front-end/KeyboardShortcut.js: Removed.
1807         * inspector/front-end/Linkifier.js: Removed.
1808         * inspector/front-end/LiveEditSupport.js: Removed.
1809         * inspector/front-end/MemoryStatistics.js: Removed.
1810         * inspector/front-end/MetricsSidebarPane.js: Removed.
1811         * inspector/front-end/NativeBreakpointsSidebarPane.js: Removed.
1812         * inspector/front-end/NativeHeapSnapshot.js: Removed.
1813         * inspector/front-end/NativeMemoryGraph.js: Removed.
1814         * inspector/front-end/NavigatorOverlayController.js: Removed.
1815         * inspector/front-end/NavigatorView.js: Removed.
1816         * inspector/front-end/NetworkItemView.js: Removed.
1817         * inspector/front-end/NetworkLog.js: Removed.
1818         * inspector/front-end/NetworkManager.js: Removed.
1819         * inspector/front-end/NetworkPanel.js: Removed.
1820         * inspector/front-end/NetworkPanelDescriptor.js: Removed.
1821         * inspector/front-end/NetworkRequest.js: Removed.
1822         * inspector/front-end/NetworkUISourceCodeProvider.js: Removed.
1823         * inspector/front-end/Object.js: Removed.
1824         * inspector/front-end/ObjectPopoverHelper.js: Removed.
1825         * inspector/front-end/ObjectPropertiesSection.js: Removed.
1826         * inspector/front-end/OverridesView.js: Removed.
1827         * inspector/front-end/OverviewGrid.js: Removed.
1828         * inspector/front-end/Panel.js: Removed.
1829         * inspector/front-end/PanelEnablerView.js: Removed.
1830         * inspector/front-end/ParsedURL.js: Removed.
1831         * inspector/front-end/Placard.js: Removed.
1832         * inspector/front-end/Popover.js: Removed.
1833         * inspector/front-end/PresentationConsoleMessageHelper.js: Removed.
1834         * inspector/front-end/ProfileDataGridTree.js: Removed.
1835         * inspector/front-end/ProfileLauncherView.js: Removed.
1836         * inspector/front-end/ProfilesPanel.js: Removed.
1837         * inspector/front-end/ProfilesPanelDescriptor.js: Removed.
1838         * inspector/front-end/Progress.js: Removed.
1839         * inspector/front-end/ProgressIndicator.js: Removed.
1840         * inspector/front-end/PropertiesSection.js: Removed.
1841         * inspector/front-end/PropertiesSidebarPane.js: Removed.
1842         * inspector/front-end/RawSourceCode.js: Removed.
1843         * inspector/front-end/RemoteObject.js: Removed.
1844         * inspector/front-end/RequestCookiesView.js: Removed.
1845         * inspector/front-end/RequestHTMLView.js: Removed.
1846         * inspector/front-end/RequestHeadersView.js: Removed.
1847         * inspector/front-end/RequestJSONView.js: Removed.
1848         * inspector/front-end/RequestPreviewView.js: Removed.
1849         * inspector/front-end/RequestResponseView.js: Removed.
1850         * inspector/front-end/RequestTimingView.js: Removed.
1851         * inspector/front-end/RequestView.js: Removed.
1852         * inspector/front-end/Resource.js: Removed.
1853         * inspector/front-end/ResourceScriptMapping.js: Removed.
1854         * inspector/front-end/ResourceTreeModel.js: Removed.
1855         * inspector/front-end/ResourceType.js: Removed.
1856         * inspector/front-end/ResourceUtils.js: Removed.
1857         * inspector/front-end/ResourceView.js: Removed.
1858         * inspector/front-end/ResourceWebSocketFrameView.js: Removed.
1859         * inspector/front-end/ResourcesPanel.js: Removed.
1860         * inspector/front-end/RevisionHistoryView.js: Removed.
1861         * inspector/front-end/RuntimeModel.js: Removed.
1862         * inspector/front-end/SASSSourceMapping.js: Removed.
1863         * inspector/front-end/ScopeChainSidebarPane.js: Removed.
1864         * inspector/front-end/Script.js: Removed.
1865         * inspector/front-end/ScriptFormatter.js: Removed.
1866         * inspector/front-end/ScriptFormatterWorker.js: Removed.
1867         * inspector/front-end/ScriptSnippetModel.js: Removed.
1868         * inspector/front-end/ScriptsNavigator.js: Removed.
1869         * inspector/front-end/ScriptsPanel.js: Removed.
1870         * inspector/front-end/ScriptsPanelDescriptor.js: Removed.
1871         * inspector/front-end/ScriptsSearchScope.js: Removed.
1872         * inspector/front-end/SearchController.js: Removed.
1873         * inspector/front-end/Section.js: Removed.
1874         * inspector/front-end/Settings.js: Removed.
1875         * inspector/front-end/SettingsScreen.js: Removed.
1876         * inspector/front-end/ShortcutsScreen.js: Removed.
1877         * inspector/front-end/ShowMoreDataGridNode.js: Removed.
1878         * inspector/front-end/SidebarOverlay.js: Removed.
1879         * inspector/front-end/SidebarPane.js: Removed.
1880         * inspector/front-end/SidebarTreeElement.js: Removed.
1881         * inspector/front-end/SidebarView.js: Removed.
1882         * inspector/front-end/SimpleWorkspaceProvider.js: Removed.
1883         * inspector/front-end/SnippetJavaScriptSourceFrame.js: Removed.
1884         * inspector/front-end/SnippetStorage.js: Removed.
1885         * inspector/front-end/SoftContextMenu.js: Removed.
1886         * inspector/front-end/SourceCSSTokenizer.js: Removed.
1887         * inspector/front-end/SourceCSSTokenizer.re2js: Removed.
1888         * inspector/front-end/SourceFrame.js: Removed.
1889         * inspector/front-end/SourceHTMLTokenizer.js: Removed.
1890         * inspector/front-end/SourceHTMLTokenizer.re2js: Removed.
1891         * inspector/front-end/SourceJavaScriptTokenizer.js: Removed.
1892         * inspector/front-end/SourceJavaScriptTokenizer.re2js: Removed.
1893         * inspector/front-end/SourceMap.js: Removed.
1894         * inspector/front-end/SourceMapping.js: Removed.
1895         * inspector/front-end/SourceTokenizer.js: Removed.
1896         * inspector/front-end/Spectrum.js: Removed.
1897         * inspector/front-end/SplitView.js: Removed.
1898         * inspector/front-end/StatusBarButton.js: Removed.
1899         * inspector/front-end/StyleSheetOutlineDialog.js: Removed.
1900         * inspector/front-end/StylesSidebarPane.js: Removed.
1901         * inspector/front-end/StylesSourceMapping.js: Removed.
1902         * inspector/front-end/SuggestBox.js: Removed.
1903         * inspector/front-end/TabbedEditorContainer.js: Removed.
1904         * inspector/front-end/TabbedPane.js: Removed.
1905         * inspector/front-end/TestController.js: Removed.
1906         * inspector/front-end/TextEditor.js: Removed.
1907         * inspector/front-end/TextEditorHighlighter.js: Removed.
1908         * inspector/front-end/TextEditorModel.js: Removed.
1909         * inspector/front-end/TextPrompt.js: Removed.
1910         * inspector/front-end/TextUtils.js: Removed.
1911         * inspector/front-end/TimelineFrameController.js: Removed.
1912         * inspector/front-end/TimelineGrid.js: Removed.
1913         * inspector/front-end/TimelineManager.js: Removed.
1914         * inspector/front-end/TimelineModel.js: Removed.
1915         * inspector/front-end/TimelineOverviewPane.js: Removed.
1916         * inspector/front-end/TimelinePanel.js: Removed.
1917         * inspector/front-end/TimelinePanelDescriptor.js: Removed.
1918         * inspector/front-end/TimelinePresentationModel.js: Removed.
1919         * inspector/front-end/Toolbar.js: Removed.
1920         * inspector/front-end/TopDownProfileDataGridTree.js: Removed.
1921         * inspector/front-end/UISourceCode.js: Removed.
1922         * inspector/front-end/UISourceCodeFrame.js: Removed.
1923         * inspector/front-end/UIString.js: Removed.
1924         * inspector/front-end/UIUtils.js: Removed.
1925         * inspector/front-end/UglifyJS/parse-js.js: Removed.
1926         * inspector/front-end/UserAgentSupport.js: Removed.
1927         * inspector/front-end/UserMetrics.js: Removed.
1928         * inspector/front-end/View.js: Removed.
1929         * inspector/front-end/ViewportControl.js: Removed.
1930         * inspector/front-end/WatchExpressionsSidebarPane.js: Removed.
1931         * inspector/front-end/WebKit.qrc: Removed.
1932         * inspector/front-end/WorkerManager.js: Removed.
1933         * inspector/front-end/WorkersSidebarPane.js: Removed.
1934         * inspector/front-end/Workspace.js: Removed.
1935         * inspector/front-end/ace/LICENSE.txt: Removed.
1936         * inspector/front-end/ace/ace.js: Removed.
1937         * inspector/front-end/ace/acedevtools.css: Removed.
1938         * inspector/front-end/ace/mode_css.js: Removed.
1939         * inspector/front-end/ace/mode_html.js: Removed.
1940         * inspector/front-end/ace/mode_javascript.js: Removed.
1941         * inspector/front-end/ace/theme_textmate.js: Removed.
1942         * inspector/front-end/auditsPanel.css: Removed.
1943         * inspector/front-end/breadcrumbList.css: Removed.
1944         * inspector/front-end/breakpointsList.css: Removed.
1945         * inspector/front-end/buildSystemOnly.js: Removed.
1946         * inspector/front-end/canvasProfiler.css: Removed.
1947         * inspector/front-end/cm/LICENSE: Removed.
1948         * inspector/front-end/cm/closebrackets.js: Removed.
1949         * inspector/front-end/cm/cmdevtools.css: Removed.
1950         * inspector/front-end/cm/codemirror.css: Removed.
1951         * inspector/front-end/cm/codemirror.js: Removed.
1952         * inspector/front-end/cm/css.js: Removed.
1953         * inspector/front-end/cm/htmlmixed.js: Removed.
1954         * inspector/front-end/cm/javascript.js: Removed.
1955         * inspector/front-end/cm/matchbrackets.js: Removed.
1956         * inspector/front-end/cm/xml.js: Removed.
1957         * inspector/front-end/cssNamedFlows.css: Removed.
1958         * inspector/front-end/dataGrid.css: Removed.
1959         * inspector/front-end/dialog.css: Removed.
1960         * inspector/front-end/elementsPanel.css: Removed.
1961         * inspector/front-end/externs.js: Removed.
1962         * inspector/front-end/filteredItemSelectionDialog.css: Removed.
1963         * inspector/front-end/flameChart.css: Removed.
1964         * inspector/front-end/heapProfiler.css: Removed.
1965         * inspector/front-end/helpScreen.css: Removed.
1966         * inspector/front-end/indexedDBViews.css: Removed.
1967         * inspector/front-end/inspector.css: Removed.
1968         * inspector/front-end/inspector.html: Removed.
1969         * inspector/front-end/inspector.js: Removed.
1970         * inspector/front-end/inspectorCommon.css: Removed.
1971         * inspector/front-end/inspectorSyntaxHighlight.css: Removed.
1972         * inspector/front-end/jsdifflib.js: Removed.
1973         * inspector/front-end/navigatorView.css: Removed.
1974         * inspector/front-end/networkLogView.css: Removed.
1975         * inspector/front-end/networkPanel.css: Removed.
1976         * inspector/front-end/panelEnablerView.css: Removed.
1977         * inspector/front-end/popover.css: Removed.
1978         * inspector/front-end/profilesPanel.css: Removed.
1979         * inspector/front-end/resourceView.css: Removed.
1980         * inspector/front-end/resourcesPanel.css: Removed.
1981         * inspector/front-end/revisionHistory.css: Removed.
1982         * inspector/front-end/scriptsPanel.css: Removed.
1983         * inspector/front-end/sidebarPane.css: Removed.
1984         * inspector/front-end/spectrum.css: Removed.
1985         * inspector/front-end/splitView.css: Removed.
1986         * inspector/front-end/tabbedPane.css: Removed.
1987         * inspector/front-end/test-runner.html: Removed.
1988         * inspector/front-end/textEditor.css: Removed.
1989         * inspector/front-end/textPrompt.css: Removed.
1990         * inspector/front-end/timelinePanel.css: Removed.
1991         * inspector/front-end/treeoutline.js: Removed.
1992         * inspector/front-end/utilities.js: Removed.
1993
1994 2013-10-10  Marcelo Morais  <m.morais@samsung.com>
1995
1996         Web Inspector: Remove the old front-end from WebKit
1997         https://bugs.webkit.org/show_bug.cgi?id=122295
1998
1999         Reviewed by Timothy Hatcher.
2000
2001         Updating the project files to remove all references from the old 
2002         inspector front-end.
2003
2004         * WebCore.vcxproj/WebCore.vcxproj: Removed the references for the old
2005         inspector front-end.
2006         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2007         * WebCore.xcodeproj/project.pbxproj: Ditto.
2008         * inspector/compile-front-end.py: Removed.
2009
2010 2013-10-10  Ryuan Choi  <ryuan.choi@samsung.com>
2011
2012         Unreviewed build fix with ENABLE_DEVICE_ORIENTATION after r157215
2013
2014         Now, impl() return reference instead of a pointer.
2015
2016         * bindings/js/JSDeviceMotionEventCustom.cpp:
2017         (WebCore::JSDeviceMotionEvent::acceleration):
2018         (WebCore::JSDeviceMotionEvent::accelerationIncludingGravity):
2019         (WebCore::JSDeviceMotionEvent::rotationRate):
2020         (WebCore::JSDeviceMotionEvent::interval):
2021         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
2022         * bindings/js/JSDeviceOrientationEventCustom.cpp:
2023         (WebCore::JSDeviceOrientationEvent::alpha):
2024         (WebCore::JSDeviceOrientationEvent::beta):
2025         (WebCore::JSDeviceOrientationEvent::gamma):
2026         (WebCore::JSDeviceOrientationEvent::absolute):
2027         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
2028
2029 2013-10-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2030
2031         [MediaStream API] update MediaStream object to match spec
2032         https://bugs.webkit.org/show_bug.cgi?id=121939
2033
2034         Reviewed by Jer Noble.
2035
2036         Test: fast/mediastream/MediaStream-clone.html
2037
2038         * Modules/mediastream/MediaStream.cpp:
2039         (WebCore::MediaStream::MediaStream):
2040         (WebCore::MediaStream::ended):
2041         (WebCore::MediaStream::clone):
2042         (WebCore::MediaStream::cloneMediaStreamTrackVector):
2043         (WebCore::MediaStream::contextDestroyed):
2044         (WebCore::MediaStream::scheduledEventTimerFired):
2045         * Modules/mediastream/MediaStream.h:
2046         * Modules/mediastream/MediaStream.idl:
2047
2048 2013-10-10  Beth Dakin  <bdakin@apple.com>
2049
2050         Calling setUsePresentationValue on MountainLion results in unrecognized selector 
2051         warnings
2052         https://bugs.webkit.org/show_bug.cgi?id=122624
2053
2054         Reviewed by Tim Horton.
2055
2056         Only call setUsePresentationValue if the scrollbar supports updates on a secondary 
2057         thread.
2058         * platform/mac/ScrollAnimatorMac.mm:
2059         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2060
2061 2013-10-10  Seokju Kwon  <seokju@webkit.org>
2062
2063         Unreviewed build fix after r157250
2064
2065         * dom/EventDispatcher.cpp:
2066         (WebCore::EventDispatcher::dispatchEvent):
2067
2068 2013-10-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2069
2070         Create MediaStream object with ended attribute set if all tracks that are being used on its creation are ended
2071         https://bugs.webkit.org/show_bug.cgi?id=122358
2072
2073         Reviewed by Jer Noble.
2074
2075         Spec tells that if all tracks that belongs to a new MediaStream object being created are ended,
2076         then the ended attribute of this MediaStream must be set to true.
2077         http://www.w3.org/TR/mediacapture-streams/#widl-MediaStream-ended
2078
2079         Since there is no port supporting MediaStream yet, we are skipping this test for now.
2080
2081         Test: fast/mediastream/MediaStream-construct-with-ended-tracks.html
2082
2083         * Modules/mediastream/MediaStream.cpp:
2084         (WebCore::createFromSourceVectors):
2085         (WebCore::MediaStream::create):
2086         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2087         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
2088         * platform/mediastream/MediaStreamDescriptor.cpp:
2089         (WebCore::MediaStreamDescriptor::create):
2090         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
2091         * platform/mediastream/MediaStreamDescriptor.h:
2092         * platform/mock/MockMediaStreamCenter.cpp:
2093         (WebCore::MockMediaStreamCenter::createMediaStream):
2094
2095 2013-10-10  Andy Estes  <aestes@apple.com>
2096
2097         Add SPI for telling WebKit to prefer pictograph glyphs over monochrome ones
2098         https://bugs.webkit.org/show_bug.cgi?id=122608
2099
2100         Reviewed by Dan Bernstein.
2101
2102         Based on patches by Dan Bernstein.
2103
2104         Test: fonts/font-fallback-prefers-pictographs.html
2105
2106         Created a mechanism to append a font to the end of a font's fallback
2107         list, before the system fallback list. This mechanism is used when
2108         Settings::fontFallbackPrefersPictographs() is true to insert a
2109         pictograph font ahead of a monochrome one from the system fallback list.
2110
2111         * WebCore.exp.in: Moved
2112         __ZN7WebCore8Settings33setFontFallbackPrefersPictographsEb outside of
2113         an iOS platform guard.
2114         * css/CSSFontSelector.cpp:
2115         (WebCore::CSSFontSelector::fallbackFontDataCount): Retuned 1 if
2116         pictograph fonts are preferred.
2117         (WebCore::CSSFontSelector::getFallbackFontData): Returned the
2118         pictograph font's FontData if it is preferred.
2119         * css/CSSFontSelector.h:
2120         * page/Settings.cpp:
2121         (WebCore::Settings::Settings): Initialized
2122         m_fontFallbackPrefersPictographs to false.
2123         (WebCore::Settings::setFontFallbackPrefersPictographs): Set
2124         m_fontFallbackPrefersPictographs and called
2125         Page::setNeedsRecalcStyleInAllFrames().
2126         * page/Settings.h:
2127         (WebCore::Settings::fontFallbackPrefersPictographs):
2128         * platform/graphics/FontGlyphs.cpp:
2129         (WebCore::FontGlyphs::realizeFontDataAt): Realized the selector's
2130         fallback font if necessary.
2131         * platform/graphics/FontSelector.h:
2132         * style/StyleResolveTree.cpp:
2133         (WebCore::Style::resolveTree): Removed iOS platform guards.
2134         * testing/InternalSettings.cpp:
2135         (WebCore::InternalSettings::setFontFallbackPrefersPictographs): Set the
2136         corresponding WebCore::Setting.
2137         * testing/InternalSettings.h: Defined an internal setting for the test.
2138         * testing/InternalSettings.idl: Ditto.
2139
2140 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
2141
2142         Remove unused attribute in CoordinatedTile class
2143         https://bugs.webkit.org/show_bug.cgi?id=122619
2144
2145         Reviewed by Noam Rosenthal.
2146
2147         No new tests, covered by existing ones.
2148
2149         * platform/graphics/texmap/coordinated/CoordinatedTile.h: Remove
2150         m_localBuffer.
2151
2152 2013-10-10  Beth Dakin  <bdakin@apple.com>
2153
2154         Scrollbars are updated on the main thread rather than the scrolling thread 
2155         (causing scroll bars not to appear/update quickly in some cases)
2156         https://bugs.webkit.org/show_bug.cgi?id=122585
2157         -and corresponding-
2158         <rdar://problem/10710775>
2159
2160         Reviewed by Simon Fraser.
2161
2162         This patch does a few things in order to allow scrollbars to be updated on the 
2163         scrolling thread:
2164
2165         1. This patch adds the ability to know if the lower-level APIs necessary to get 
2166         this to work right are available, AND if the content is actually capable of taking 
2167         advantage of this feature. This is currently implemented as 
2168         Scrollbar::supportsUpdateOnSecondaryThread() which makes use of a new 
2169         ScrollableArea function called updatesScrollLayerPositionOnMainThread()
2170         
2171         2. To update on the scrolling thread, the scrolling tree needs to know about the 
2172         ScrollbarPainters.
2173         
2174         3. Once it knows about them, it should update the presentation value whenever the 
2175         layer position changes.
2176         
2177         4. Presentation value is basically the same thing as double value. There is a bit 
2178         of code we maintain currently to compute that. This patch moves that code to a 
2179         static function on ScrollableArea that can be called from both the main thread and 
2180         the scrolling thread.
2181         
2182         5. ScrollbarPainter API needs to know about the layers we have created for the 
2183         vertical and horizontal scrollbars, then they will use those layers and the 
2184         presentation value that we set on the scrolling thread to move the layers around.
2185
2186         This is part of #1 above. 
2187         * page/FrameView.cpp:
2188         (WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
2189         * page/FrameView.h:
2190
2191         This is part of #2. ScrollingStateScrollingNodes now have vertical and horizontal 
2192         ScrollbarPainters for Mac only.
2193         * page/scrolling/ScrollingStateScrollingNode.cpp:
2194         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2195         * page/scrolling/ScrollingStateScrollingNode.h:
2196         (WebCore::ScrollingStateScrollingNode::verticalScrollbarPainter):
2197         (WebCore::ScrollingStateScrollingNode::horizontalScrollbarPainter):
2198
2199         Also part of #2. Make sure to set the ScrollbarPainters for scrolling nodes when 
2200         appropriate.
2201         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2202         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2203         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2204
2205         Implement this function that was just stubbed out before. This is part of #5 in 
2206         that is will allow the ScrollbarPainter API to know about any layer changes. 
2207         (WebCore::ScrollingCoordinatorMac::scrollableAreaScrollbarLayerDidChange):
2208
2209         Back to #2, making sure we properly set the ScrollbarPainters to send over to the 
2210         scrolling thread.
2211         (WebCore::ScrollingCoordinatorMac::setScrollbarPaintersForNode):
2212         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
2213         (WebCore::ScrollingStateScrollingNode::setScrollbarPainters):
2214
2215         This code achieves #3. It uses new ScrollbarPainter API to adjust the position of 
2216         the scrollbars from the scrolling thread.
2217         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2218         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2219         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
2220         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2221         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2222
2223         This is for #5. ScrollbarPainter needs to know about our scrollbar layers.
2224         * platform/ScrollAnimator.h:
2225         (WebCore::ScrollAnimator::verticalScrollbarLayerDidChange):
2226         (WebCore::ScrollAnimator::horizontalScrollbarLayerDidChange):
2227         * platform/ScrollableArea.cpp:
2228         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
2229         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
2230
2231         This is for #4. This code computes the scrollbar’s value and current overhang 
2232         amount.
2233         (WebCore::ScrollableArea::computeScrollbarValueAndOverhang):
2234         * platform/ScrollableArea.h:
2235         (WebCore::ScrollableArea::layerForHorizontalScrollbar):
2236         (WebCore::ScrollableArea::layerForVerticalScrollbar):
2237         (WebCore::ScrollableArea::layerForScrolling):
2238
2239         This is for #1. We need to know if we have the ability to update scrollbars on a 
2240         different thread. We can do that only on certain versions of the OS, only when 
2241         threaded scrolling is enabled, and only when the current page is actually using 
2242         the scrolling thread to scroll.
2243         * platform/Scrollbar.cpp:
2244         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
2245         * platform/Scrollbar.h:
2246         * platform/ScrollbarThemeClient.h:
2247
2248         New ScrollbarPainter APIs.
2249         * platform/mac/NSScrollerImpDetails.h:
2250
2251         This is for #5, letting the ScrollbarPainter API  know about the layers.
2252         * platform/mac/ScrollAnimatorMac.h:
2253         * platform/mac/ScrollAnimatorMac.mm:
2254         (-[WebScrollbarPainterDelegate layer]):
2255         (-[WebScrollbarPainterDelegate convertRectToLayer:]):
2256         (-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
2257
2258         Before we kick off a scroll animation, set the current painting characteristics so 
2259         they are up-to-date in case we are scrolling on the scrolling thread.
2260         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
2261         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2262         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2263         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2264         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2265         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
2266         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
2267
2268         Only paint the scrollbars through ScrollbarThemeMac if they are NOT being updated 
2269         by the scrolling thread.
2270         * platform/mac/ScrollbarThemeMac.h:
2271         * platform/mac/ScrollbarThemeMac.mm:
2272         (WebCore::ScrollbarThemeMac::setCurrentPaintCharacteristics):
2273         (WebCore::scrollbarPainterPaint):
2274         (WebCore::ScrollbarThemeMac::paint):
2275
2276         Back to #1.
2277         * rendering/RenderLayer.cpp:
2278         (WebCore::RenderLayer::updatesScrollLayerPositionOnMainThread):
2279         * rendering/RenderLayer.h:
2280         * rendering/RenderLayerCompositor.cpp:
2281         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2282         * rendering/RenderListBox.h:
2283
2284 2013-10-10  Brent Fulgham  <bfulgham@apple.com>
2285
2286         [Win] Unreviewed build fix after r157228
2287
2288         The changes in r157228 trigger a bug in VS2010. This patch works around the compiler bug
2289         to allow this platform to build.
2290
2291         * dom/Range.cpp: Move implementation to header file.
2292         * dom/Range.h: Inline the method.
2293         * page/DOMWindow.cpp:
2294         (WebCore::DOMWindow::open): Add stub method (with pointer arguments) to call the real
2295         method with references.
2296         * page/DOMWindow.h: Declare stub method taking pointer arguments to avoid compiler bug.
2297         * testing/Internals.cpp:
2298         (WebCore::Internals::openDummyInspectorFrontend): Use work-around method when building under
2299         the buggy version of Visual Studio.
2300
2301 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
2302
2303         Make all functions of EventDispatcher static
2304         https://bugs.webkit.org/show_bug.cgi?id=122591
2305
2306         Reviewed by Antti Koivisto.
2307
2308         Now that EventDispatchMediator is gone, we don't have to have an EventDispatcher object.
2309         Turn EventDispatcher into an empty class with a bunch of static functions.
2310
2311         We can convert it to a namespace or whatever later.
2312
2313         * dom/EventDispatcher.cpp:
2314         (WebCore::EventDispatcher::dispatchSimulatedClick):
2315         (WebCore::EventDispatcher::dispatchEvent):
2316         * dom/EventDispatcher.h:
2317
2318 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
2319
2320         Convert some OwnPtr/PassOwnPtr in CoordinatedGraphics code to std::unique_ptr's
2321         https://bugs.webkit.org/show_bug.cgi?id=122614
2322
2323         Reviewed by Anders Carlsson.
2324
2325         No new tests, covered by existing ones.
2326
2327         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2328         (WebCore::CompositingCoordinator::paintToSurface):
2329         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
2330         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
2331         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2332         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
2333         (WebCore::CoordinatedGraphicsLayer::createBackingStore):
2334         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2335         (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
2336         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2337         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2338         (WebCore::CoordinatedGraphicsScene::createLayer):
2339         (WebCore::CoordinatedGraphicsScene::deleteLayer):
2340         (WebCore::CoordinatedGraphicsScene::ensureRootLayer):
2341         (WebCore::CoordinatedGraphicsScene::purgeGLResources):
2342         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2343         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp:
2344         (WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
2345         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h:
2346         * platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
2347         (WebCore::UpdateAtlas::buildLayoutIfNeeded):
2348         (WebCore::UpdateAtlas::didSwapBuffers):
2349         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
2350         (WebCore::UpdateAtlas::isInUse):
2351
2352 2013-10-10  Roger Fong  <roger_fong@apple.com>
2353
2354         Validate uniform input when setting texture sampler uniforms.
2355         https://bugs.webkit.org/show_bug.cgi?id=122610.
2356
2357         Reviewed by Dean Jackson.
2358
2359         Covered by Khronos Conformance Suite 1.0.2.
2360         Specifically, conformance/uniforms/uniform-samplers-test.html.
2361
2362         * html/canvas/WebGLRenderingContext.cpp:
2363         (WebCore::WebGLRenderingContext::uniform1i):
2364         (WebCore::WebGLRenderingContext::uniform1iv):
2365
2366 2013-10-10  Roger Fong  <roger_fong@apple.com>
2367
2368         Store uniform type information in WebGLUniformationLocation.
2369         https://bugs.webkit.org/show_bug.cgi?id=122607.
2370
2371         Reviewed by Dean Jackson.
2372
2373         Covered by Khronos Conformance Suite 1.0.2.
2374
2375         * html/canvas/WebGLRenderingContext.cpp:
2376         (WebCore::WebGLRenderingContext::getUniform):
2377         (WebCore::WebGLRenderingContext::getUniformLocation):
2378         * html/canvas/WebGLUniformLocation.cpp:
2379         (WebCore::WebGLUniformLocation::create):
2380         (WebCore::WebGLUniformLocation::WebGLUniformLocation):
2381         (WebCore::WebGLUniformLocation::type):
2382         * html/canvas/WebGLUniformLocation.h:
2383
2384 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
2385
2386         REGRESSION(r157203): WebKit crashes after dispatching gesture event
2387         https://bugs.webkit.org/show_bug.cgi?id=122615
2388
2389         Reviewed by Anders Carlsson.
2390
2391         Don't release the event until the end of the function where we call member functions on it.
2392
2393         * dom/Node.cpp:
2394         (WebCore::Node::dispatchGestureEvent):
2395
2396 2013-10-10  Ryosuke Niwa  <rniwa@webkit.org>
2397
2398         Move the rest of EventRetargeter functions to EventPath
2399         https://bugs.webkit.org/show_bug.cgi?id=122586
2400
2401         Reviewed by Andreas Kling.
2402
2403         Moved the rest of EventRetargeter functiosn either static local or EventPath member functions.
2404
2405         * dom/EventDispatcher.cpp:
2406         (WebCore::EventDispatcher::dispatchScopedEvent):
2407         (WebCore::EventDispatcher::dispatch):
2408         (WebCore::EventDispatcher::dispatchEventPostProcess):
2409         * dom/EventDispatcher.h:
2410         * dom/EventRetargeter.cpp:
2411         (WebCore::EventPath::EventPath):
2412         (WebCore::calculateAdjustedNodes): Made static local. Also takes const EventPath and returns the size
2413         to which EventPath should be shrunk; this allows us to remove EventPath::shrink.
2414         (WebCore::updateTouchListsInEventPath): Moved and renamed from EventRetargeter::adjustTouchList.
2415         (WebCore::EventPath::updateTouchLists): Moved and renamed from EventRetargeter::adjustForTouchEvent.
2416         (WebCore::EventPath::setRelatedTarget): Moved.
2417         * dom/EventRetargeter.h:
2418         (WebCore::eventTargetRespectingTargetRules): Renamed from EventRetargeter::eventTargetRespectingTargetRules.
2419
2420 2013-10-10  Mark Rowe  <mrowe@apple.com>
2421
2422         <rdar://problem/13341666> WebKit should always build against an SDK.
2423
2424         Have all projects default to building against the OS X Internal SDK for the Production
2425         configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
2426         to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.
2427
2428         Reviewed by Dan Bernstein.
2429
2430
2431         * Configurations/Base.xcconfig:
2432         * Configurations/DebugRelease.xcconfig:
2433
2434 2013-10-10  Hans Muller  <hmuller@adobe.com>
2435
2436         [CSS Shapes] clampToUnsigned() should return unsigned, not int
2437         https://bugs.webkit.org/show_bug.cgi?id=122601
2438
2439         Reviewed by Andreas Kling.
2440
2441         Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
2442         No new tests since this is just an internal refactoring of existing code.
2443
2444         * rendering/shapes/RasterShape.cpp:
2445         (WebCore::RasterShape::marginIntervals): Use the redefined clampToUnsigned method.
2446
2447 2013-10-10  Bem Jones-Bey  <bjonesbe@adobe.com>
2448
2449         [CSS Shapes] New positioning model: Shape cropped to margin box
2450         https://bugs.webkit.org/show_bug.cgi?id=118092
2451
2452         Reviewed by Alexandru Chiculita.
2453
2454         Clip the shape to the margin box when it extends out the left or right
2455         edges. Also added a few local variables to make the code easier to
2456         read.
2457
2458         Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-ref.html
2459                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html
2460                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005.html
2461                csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006.html
2462
2463         * rendering/shapes/ShapeOutsideInfo.cpp:
2464         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
2465
2466 2013-10-10  Daniel Bates  <dabates@apple.com>
2467
2468         Avoid resizing the internal buffer of SharedBuffer when creating a PurgeableBuffer
2469         https://bugs.webkit.org/show_bug.cgi?id=122516
2470
2471         Reviewed by Darin Adler.
2472
2473         Currently when we create a PurgeableBuffer from a SharedBuffer we may
2474         resize the internal buffer of the SharedBuffer so that it can fit the
2475         concatenated contents of all of its segments before copying this
2476         internal buffer to the internal buffer of the PurgeableBuffer. Instead,
2477         we can avoid resizing the internal buffer of SharedBuffer by allocating
2478         a PurgeableBuffer and then copying the internal buffer of SharedBuffer
2479         and its segments directly into it.
2480
2481         * platform/PurgeableBuffer.h:
2482         (WebCore::PurgeableBuffer::createUninitialized): Add inline implementation
2483         when building with ENABLE_PURGEABLE_MEMORY disabled.
2484         * platform/SharedBuffer.cpp:
2485         (WebCore::SharedBuffer::createPurgeableBuffer): Implemented in terms of
2486         SharedBuffer::{copyBufferAndClear, createUninitialized}().
2487         (WebCore::SharedBuffer::copyBufferAndClear): Added.
2488         (WebCore::SharedBuffer::buffer): Moved logic to copy segments/data array to
2489         SharedBuffer::copyBufferAndClear() and modified this function to use it.
2490         * platform/SharedBuffer.h:
2491         * platform/cf/SharedBufferCF.cpp:
2492         (WebCore::SharedBuffer::copyBufferAndClear): Renamed; formerly called SharedBuffer::copyDataArrayAndClear.
2493         * platform/mac/PurgeableBufferMac.cpp:
2494         (WebCore::allocatePurgeableBuffer): Added.
2495         (WebCore::PurgeableBuffer::createUninitialized): Added.
2496         (WebCore::PurgeableBuffer::create): Moved logic to allocate a purgeable buffer into
2497         PurgeableBuffer::createUninitialized() and modified this function to use it.
2498
2499 2013-10-09  Chris Fleizach  <cfleizach@apple.com>
2500
2501         AX: VoiceOver speaking too much when group elements with tabindex=-1 are used
2502         https://bugs.webkit.org/show_bug.cgi?id=122574
2503
2504         Reviewed by Mario Sanchez Prada.
2505
2506         Tests: accessibility/negative-tabindex-does-not-expose-label.html
2507
2508         Elements that expose tabindex=-1 are being identified as generic focusable elements for accessibility.
2509         Which among other things, determines whether to create an accessible name for the object. 
2510         This has the negative effect of causing VoiceOver to speak way too much information when navigating inside
2511         a <div> with this attribute.
2512
2513         * accessibility/AccessibilityNodeObject.cpp:
2514         (WebCore::AccessibilityNodeObject::visibleText):
2515         (WebCore::AccessibilityNodeObject::title):
2516
2517 2013-10-10  Andreas Kling  <akling@apple.com>
2518
2519         Remove custom finalizer for Node JS wrappers.
2520         <https://webkit.org/b/122603>
2521
2522         Reviewed by Geoff Garen.
2523
2524         Node can just use the auto-generated finalizer, the custom one was
2525         identical to what the generator would output.
2526
2527 2013-10-10  Andreas Kling  <akling@apple.com>
2528
2529         CTTE: activeDOMWindow() and firstDOMWindow() should return references.
2530         <https://webkit.org/b/122598>
2531
2532         Reviewed by Anders Carlsson.
2533
2534         Now that wrappers vend references to their WebCore objects, follow
2535         up and make these two return references as well.
2536
2537 2013-10-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2538
2539         [ATK] Missing checks in returnIfWebKitAccessibleIsInvalid
2540         https://bugs.webkit.org/show_bug.cgi?id=122600
2541
2542         Reviewed by Chris Fleizach.
2543
2544         Check that the AccessibilityObject associated to the ATK wrapper
2545         is not NULL and contains a valid reference to the document before
2546         calling AccessibilityObject::updateBackingStore().
2547
2548         * accessibility/atk/WebKitAccessibleUtil.h: Add extra checks.
2549
2550 2013-10-10  Andreas Kling  <akling@apple.com>
2551
2552         Clean up JSDOMWindowShell a little.
2553         <https://webkit.org/b/122599>
2554
2555         Reviewed by Anders Carlsson.
2556
2557         - Have impl() return a DOMWindow& instead of a pointer.
2558         - Store the DOMWrapperWorld in a Ref instead of a RefPtr.
2559         - Reuse TRY_TO_UNWRAP_WITH_INTERFACE in EventTarget bindings.
2560
2561 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
2562
2563         Make XPathGrammar.y bison3-friendly again after r157205
2564         https://bugs.webkit.org/show_bug.cgi?id=122595
2565
2566         Reviewed by Anders Carlsson.
2567
2568         No new tests, build fix.
2569
2570         * xml/XPathGrammar.y: Replace YYLEX_PARAM with %lex-param, as the
2571         former was removed in bison3.
2572
2573 2013-10-10  Andreas Kling  <akling@apple.com>
2574
2575         SVGUseElement: Use iterative traversal to find disallowed elements.
2576         <https://webkit.org/b/122596>
2577
2578         Reviewed by Antti Koivisto.
2579
2580         Rewrote subtreeContainsDisallowedElement() in SVGUseElement.cpp to
2581         use iterative traversal with descendantsOfType<Element> instead of
2582         recursing through the tree.
2583
2584 2013-10-10  Andreas Kling  <akling@apple.com>
2585
2586         Move RenderObject::layout() to RenderElement.
2587         <https://webkit.org/b/122537>
2588
2589         Reviewed by Antti Koivisto.
2590
2591         RenderText will ASSERT_NOT_REACHED() in its layout(), so move this
2592         to RenderElement. This allows us to use the fast firstChild()
2593         instead of virtual dispatch.
2594
2595         The needsLayout() bit remains on RenderObject for now. Moving that
2596         to RenderElement is a far more involved change.
2597
2598 2013-10-10  Chris Fleizach  <cfleizach@apple.com>
2599
2600         AX: Crash at WebCore::accessibleNameForNode when visiting Facebook
2601         https://bugs.webkit.org/show_bug.cgi?id=122572
2602
2603         Reviewed by Mario Sanchez Prada.
2604
2605         Test: accessibility/aria-labeled-with-hidden-node.html
2606
2607         Handle the case where aria-labelledby references a non-rendered node.
2608
2609         * accessibility/AccessibilityNodeObject.cpp:
2610         (WebCore::accessibleNameForNode):
2611
2612 2013-10-10  Zan Dobersek  <zdobersek@igalia.com>
2613
2614         REGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for platforms using GCC
2615         https://bugs.webkit.org/show_bug.cgi?id=122592
2616
2617         Reviewed by Gustavo Noronha Silva.
2618
2619         * dom/ScopedEventQueue.cpp:
2620         (WebCore::ScopedEventQueue::dispatchEvent): When calling EventDispatcher::dispatchEvent(), the GCC-compiled code
2621         first creates a copy of the PassRefPtr<Event> object that's being passed into the method call. The copy will be used
2622         in that method while the original is left with a null pointer. Only after that is the original queried for its pointer
2623         while trying to get the Event's target, resulting in a crash due to calling the Event::target() on a null pointer.
2624         To avoid it, pass a naked Event pointer to the method call. This will create a new PassRefPtr object without nullifying
2625         the original one.
2626
2627 2013-10-10  Andreas Kling  <akling@apple.com>
2628
2629         Use more Element iterators in SVG code.
2630         <http://webkit.org/b/121127>
2631
2632         Reviewed by Antti Koivisto.
2633
2634         Use childrenOfType to iterate over only SVGElement (or even more
2635         specific) children in a bunch of places.
2636
2637         Also auto-generate type helpers for SVGElement and SVGStopElement.
2638
2639 2013-10-10  Andreas Kling  <akling@apple.com>
2640
2641         JS DOM wrappers' impl() functions should return references.
2642         <https://webkit.org/b/122497>
2643
2644         Reviewed by Antti Koivisto.
2645
2646         JS DOM wrappers always have a corresponding WebCore object during
2647         their lifetime, so make impl() return a reference.
2648
2649 2013-10-10  Sergio Correia  <sergio.correia@openbossa.org>
2650
2651         Fix debug build after r157210
2652         https://bugs.webkit.org/show_bug.cgi?id=122593
2653
2654         Reviewed by Andreas Kling.
2655
2656         No new tests, build fix.
2657
2658         * dom/EventContext.cpp:
2659         (WebCore::TouchEventContext::handleLocalEvents): Fix ASSERT, now that
2660         event is a reference instead of a pointer.
2661
2662 2013-10-10  Andreas Kling  <akling@apple.com>
2663
2664         Tighten some renderer access in Document.
2665         <https://webkit.org/b/121865>
2666
2667         Reviewed by Antti Koivisto.
2668
2669         A bit of Node/Element and RenderObject/RenderElement tightening.
2670
2671 2013-10-08  Andreas Kling  <akling@apple.com>
2672
2673         rangeOfContents() should take a Node&.
2674         <https://webkit.org/b/122438>
2675
2676         Reviewed by Darin Adler.
2677
2678         All callers of rangeOfContents() either have a Node& already,
2679         or do some kind of null-checking before calling it.
2680
2681 2013-10-08  Sergio Villar Senin  <svillar@igalia.com>
2682
2683         [CSS Grid Layout] Implement support for grid-template
2684         https://bugs.webkit.org/show_bug.cgi?id=103313
2685
2686         Reviewed by Dean Jackson.
2687
2688         Based on Blink r153427, r155199 and r155712 by <jchaffraix@chromium.org>
2689
2690         Test: fast/css-grid-layout/grid-template-get-set.html
2691
2692         Recognize, parse, store and return properly the value of
2693         grid-template. It required some extra parsing code because the
2694         specs mandates to check that the defined grid areas are indeed
2695         rectangular. Named grid areas are still not fully supported, will
2696         be done in a follow up patch.
2697
2698         As validating involves building the grid areas a new CSSValue was
2699         added to hold the computed value. Note that we have to track the
2700         explicit size of the named grid areas as the named grid areas
2701         (".") are not tracked in our HashMap of grid areas.
2702
2703         This change also involves moving GridCoordinate and GridSpan to a
2704         separate file in order to share the code that describes the grid
2705         area coordinates.
2706
2707         * CMakeLists.txt: Added new files to the build.
2708         * GNUmakefile.list.am: Ditto.
2709         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2710         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2711         * WebCore.xcodeproj/project.pbxproj: Ditto.
2712         * css/CSSComputedStyleDeclaration.cpp:
2713         (WebCore::ComputedStyleExtractor::propertyValue):
2714         * css/CSSGridTemplateValue.cpp: Added.
2715         (WebCore::CSSGridTemplateValue::CSSGridTemplateValue):
2716         (WebCore::stringForPosition):
2717         (WebCore::CSSGridTemplateValue::customCSSText):
2718         * css/CSSGridTemplateValue.h: Added.
2719         (WebCore::CSSGridTemplateValue::create):
2720         (WebCore::CSSGridTemplateValue::~CSSGridTemplateValue):
2721         (WebCore::CSSGridTemplateValue::gridAreaMap):
2722         (WebCore::CSSGridTemplateValue::rowCount):
2723         (WebCore::CSSGridTemplateValue::columnCount):
2724         (WebCore::toCSSGridTemplateValue):
2725         * css/CSSParser.cpp:
2726         (WebCore::CSSParser::parseValue):
2727         (WebCore::CSSParser::parseGridTemplate): create the grid areas and
2728         validate that they define rectangular sections.
2729         * css/CSSParser.h:
2730         * css/CSSPropertyNames.in: Added -webkit-grid-template.
2731         * css/CSSValue.cpp:
2732         (WebCore::CSSValue::equals): add support for the new CSSGridTemplateValue.
2733         (WebCore::CSSValue::cssText): Ditto.
2734         (WebCore::CSSValue::destroy): Ditto.
2735         * css/CSSValue.h:
2736         (WebCore::CSSValue::isGridTemplateValue):
2737         * css/StyleResolver.cpp:
2738         (WebCore::StyleResolver::applyProperty):
2739         * rendering/RenderGrid.cpp:
2740         (WebCore::RenderGrid::cachedGridCoordinate): Replaced RenderGrid::GridSpan by WebCore::GridSpan.
2741         (WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition): Ditto.
2742         (WebCore::RenderGrid::resolveGridPositionsFromStyle): Ditto.
2743         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition): Ditto.
2744         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition): Ditto.
2745         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Ditto.
2746         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
2747         * rendering/RenderGrid.h: Took GridSpan and GridCoordinate out.
2748         * rendering/style/GridCoordinate.h: Added.
2749         (WebCore::GridSpan::create):
2750         (WebCore::GridSpan::GridSpan):
2751         (WebCore::GridSpan::operator==):
2752         (WebCore::GridCoordinate::GridCoordinate):
2753         (WebCore::GridCoordinate::operator==):
2754         (WebCore::GridCoordinate::operator!=):
2755         * rendering/style/RenderStyle.h:
2756         * rendering/style/StyleGridData.cpp:
2757         (WebCore::StyleGridData::StyleGridData):
2758         * rendering/style/StyleGridData.h:
2759         (WebCore::StyleGridData::operator==):
2760
2761 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
2762
2763         Make EventDispatcher::dispatch comprehensible
2764         https://bugs.webkit.org/show_bug.cgi?id=122588
2765
2766         Reviewed by Andreas Kling.
2767
2768         Merged EventDispatcher::dispatchEventAtCapturing, EventDispatcher::dispatchEventAtTarget,
2769         EventDispatcher::dispatchEventAtBubbling, and EventDispatcher::dispatchEventPostProcess into EventDispatcher::dispatch,
2770         and extracted static local callDefaultEventHandlersInTheBubblingOrder and dispatchEventInDOM out of it.
2771
2772         Also made handleLocalEvents of subclasses of EventContext and Node take Event& instead of Event*.
2773
2774         * dom/EventContext.cpp: The following functions now take Event& instead of Event*.
2775         (WebCore::EventContext::handleLocalEvents):
2776         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
2777         (WebCore::TouchEventContext::handleLocalEvents):
2778         * dom/EventContext.h:
2779
2780         * dom/EventDispatcher.cpp:
2781         (WebCore::callDefaultEventHandlersInTheBubblingOrder): Extracted from EventDispatcher::dispatchEventPostProcess,
2782         which is now merged into EventDispatcher::dispatch.
2783         (WebCore::dispatchEventInDOM): Extracted out of EventDispatcher::dispatch, EventDispatcher::dispatchEventAtCapturing,
2784         EventDispatcher::dispatchEventAtTarget and EventDispatcher::dispatchEventAtBubbling. This function is responsible for
2785         dispatching the event for capturing, at the target, and then bubbling through the event path chain.
2786         (WebCore::EventDispatcher::dispatch): EventDispatcher::dispatchEventPostProcess got merged into this. The calls to
2787         dispatchEventAtCapturing, dispatchEventAtTarget, and dispatchEventAtBubbling are replaced by a single call to
2788         dispatchEventInDOM.
2789         * dom/EventDispatcher.h:
2790
2791         * dom/FocusEvent.h:
2792         (WebCore::toFocusEvent): Added the version that takes a reference.
2793         * dom/MouseEvent.h:
2794         (WebCore::toMouseEvent): Ditto.
2795         * dom/TouchEvent.h:
2796         (WebCore::toTouchEvent): Ditto.
2797         * dom/Node.cpp:
2798         (WebCore::Node::handleLocalEvents): Now takes Event& instead of Event*.
2799         * dom/Node.h:
2800         * dom/WindowEventContext.cpp:
2801         (WebCore::WindowEventContext::handleLocalEvents): Ditto.
2802         * dom/WindowEventContext.h:
2803         * html/HTMLFormElement.cpp:
2804         (WebCore::HTMLFormElement::handleLocalEvents): Ditto.
2805         * html/HTMLFormElement.h:
2806
2807 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
2808
2809         Another build fix after r157204.
2810
2811         * dom/EventDispatcher.cpp:
2812         (WebCore::EventDispatcher::dispatch):
2813
2814 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
2815
2816         Build fix after r157204.
2817
2818         * dom/EventDispatcher.cpp:
2819         (WebCore::EventDispatcher::dispatch):
2820
2821 2013-10-07  Darin Adler  <darin@apple.com>
2822
2823         Use unique_ptr instead of deleteAllValues in XPath
2824         https://bugs.webkit.org/show_bug.cgi?id=121082
2825
2826         Reviewed by Anders Carlsson.
2827
2828         * dom/Attr.h: Made the namespaceURI function public so it can be called by
2829         code in XPath. Since the class is FINAL, calls won't do virtual dispatch.
2830
2831         * xml/XPathExpression.cpp:
2832         (WebCore::XPathExpression::XPathExpression): Added. Use std::move.
2833         (WebCore::XPathExpression::createExpression): Use the new Parser::parseStatement
2834         and more std::move.
2835         (WebCore::XPathExpression::~XPathExpression): Removed now-unneeded delete.
2836         * xml/XPathExpression.h: Removed unused create function. Use std::unique_ptr.
2837
2838         * xml/XPathExpressionNode.cpp:
2839         (WebCore::XPath::Expression::evaluationContext): Use NeverDestroyed instead of
2840         DEFINE_STATIC_LOCAL.
2841         (WebCore::XPath::Expression::setSubexpressions): Added. Used to set all the
2842         subexpressions at once rather than adding one at a time.
2843
2844         * xml/XPathExpressionNode.h: Use plain unsigned instead of unsigned long.
2845         Eliminated the ParseNode class, used only by the parser to delete objects,
2846         which we now do with %destructor. Made more functions protected. Fixed the
2847         capitalization of the word "subexpression". Made m_subexpressions be a Vector
2848         of std::unique_ptr.
2849
2850         * xml/XPathFunctions.cpp: Marked all the classes FINAL and all their virtual
2851         functions OVERRIDE. Reduced some of the boilerplate.
2852         (WebCore::XPath::Function::setArguments): Passed in the name so we don't have
2853         to store the function names in all the function objects.
2854         (WebCore::XPath::FunId::evaluate): Use std::move instead of Value::adopt.
2855         (WebCore::XPath::FunLocalName::evaluate): Use emptyString instead of "".
2856         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
2857         (WebCore::XPath::FunName::evaluate): Ditto.
2858         (WebCore::XPath::FunSubstringBefore::evaluate): Ditto.
2859         (WebCore::XPath::FunSubstringAfter::evaluate): Ditto.
2860         (WebCore::XPath::FunSubstring::evaluate): Ditto.
2861         (WebCore::XPath::FunLang::evaluate): Use Value(false) so we can make the
2862         constructor that takes a boolean explicit.
2863         (WebCore::XPath::FunFalse::evaluate): Ditto.
2864         (WebCore::XPath::populateFunctionMap): Changed idiom slightly to match other
2865         maps we set up.
2866         (WebCore::XPath::Function::create): Refactored createFunction into three
2867         member functions of this name.
2868
2869         * xml/XPathFunctions.h: Made all the Function members private or protected
2870         except for Function::create.
2871
2872         * xml/XPathGrammar.y: Changed the parser to use a reference instead of
2873         a pointer, and to pass the reference through to yylex as well. Break up
2874         the union into pieces and add %destructor as needed to make sure everything
2875         gets deallocated if parsing fails. Added a new top level rule "Top" so that
2876         we would not try to set the parse result multiple times during parsing.
2877         Call setParseResult instead of setting m_topExpr directly. Use std::unique_ptr
2878         to adopt pointers from the union. Removed all the register/unregister calls
2879         that used to be used to manage storage. Also changed the four different node
2880         types to be separate tokens instead of using string matching at this level
2881         for them.
2882
2883         * xml/XPathNodeSet.cpp:
2884         (WebCore::XPath::NodeSet::sort): Removed const_cast since m_isSorted and
2885         m_nodes are now both marked mutable. Also set m_isSorted after sorting; this
2886         was an oversight that hurt performance before.
2887         (WebCore::XPath::NodeSet::traversalSort): Ditto.
2888         (WebCore::XPath::NodeSet::firstNode): Use nullptr.
2889         (WebCore::XPath::NodeSet::anyNode): Ditto.
2890
2891         * xml/XPathNodeSet.h: Removed unneeded extra includes. Removed the
2892         WTF_MAKE_FAST_ALLOCATED for NodeSet since we never allocate these on the heap.
2893         Added a constructor that takes a single node. Deleted the swap function, since
2894         we now move instead of swap. Deleted the append function that takes a raw Node*,
2895         since calling the PassRefPtr<Node> overload does the same thing. Removed the
2896         unused reverse function. Marked both m_isSorted and m_nodes mutable so the
2897         sort function can be const.
2898
2899         * xml/XPathParser.cpp: Moved the Token struct in here instead of the header.
2900         (WebCore::XPath::populateAxisNamesMap):Renamed to match our normal naming scheme,
2901         and changed to use add instead of set, use WTF_ARRAY_LENGTH, and not use a typedef.
2902         (WebCore::XPath::parseAxisName): Related style changes, including renaming to
2903         better reflect the way this works with a boolean.
2904         (WebCore::XPath::Parser::nextTokenInternal): Updated to call parseAxisName,
2905         and to produce four separate tokens for the four node type functions.
2906         (WebCore::XPath::Parser::nextToken): Renamed local variable.
2907         (WebCore::XPath::Parser::Parser): Made this a real constructor that takes arguments
2908         and initializes all the fields. Deleted the unneeded reset function.
2909         (WebCore::XPath::Parser::lex): Changed to take an argument of an appropriate type
2910         instead of casting from void*. Also changed the string code to leak a StringImpl,
2911         which is now what the grammar code expects.
2912         (WebCore::XPath::Parser::expandQualifiedName): Renamed from expandQName. Changed
2913         to set m_sawNamespaceError instead of relying on code in the grammar to do it.
2914         (WebCore::XPath::Parser::parseStatement): Removed most of the code in this function.
2915         Changed to a much simpler model. Also made this a static member function so it
2916         takes care of creating the parser itself and does not need to call reset. Also
2917         changed return value to be a std::unique_ptr to make ownership more clear.
2918
2919         * xml/XPathParser.h: Added a declaration of YYSTYPE. Removed unneeded forward
2920         declarations and moved Token into the cpp file. Deleted most public functions,
2921         leaving only parseStatement, the entry point, and the three functions needed by
2922         the grammar, lex, expandQualifiedName, and setParseResult.
2923
2924         * xml/XPathPath.cpp:
2925         (WebCore::XPath::Filter::Filter): Move in the arguments instead of copying them.
2926         (WebCore::XPath::Filter::evaluate): Updated for name and type changes.
2927         (WebCore::XPath::LocationPath::LocationPath): Ditto.
2928         (WebCore::XPath::LocationPath::evaluate): Ditto. Also use std::move instead of
2929         Value::adopt and instead of swap.
2930         (WebCore::XPath::LocationPath::appendStep): Changed to take ownership of a
2931         unique_ptr.
2932         (WebCore::XPath::LocationPath::prependStep): Ditto. Renamed from insertFirstStep.
2933         (WebCore::XPath::Path::Path): Move in the arguments.
2934
2935         * xml/XPathPath.h: Removed unneeded includes. Changed arugument types to use
2936         std::unique_ptr to pass ownership in. Added override to all virtual functions.
2937         Changed data members to use std::unique_ptr.
2938
2939         * xml/XPathPredicate.cpp:
2940         (WebCore::XPath::StringExpression::StringExpression): Use move.
2941         (WebCore::XPath::Negative::Negative): Added.
2942         (WebCore::XPath::Negative::evaluate): Updated for name changes.
2943         (WebCore::XPath::NumericOp::NumericOp): Use move.
2944         (WebCore::XPath::NumericOp::evaluate): Tweak formatting.
2945         (WebCore::XPath::EqTestOp::EqTestOp): Use move.
2946         (WebCore::XPath::EqTestOp::evaluate): Updated for name changes.
2947         (WebCore::XPath::LogicalOp::LogicalOp): Use move.
2948         (WebCore::XPath::LogicalOp::shortCircuitOn): Made shorter.
2949         (WebCore::XPath::LogicalOp::evaluate): Updated for name changes.
2950         (WebCore::XPath::Union::Union): Added.
2951         (WebCore::XPath::Union::evaluate): Updated for name changes.
2952         (WebCore::XPath::evaluatePredicate): Updated for name changes, to use
2953         ASCIILiteral, and to be a free function that takes an expression.
2954         (WebCore::XPath::predicateIsContextPositionSensitive): Added.
2955         Replaces the Predicate::isContextPositionSensitive function.
2956
2957         * xml/XPathPredicate.h: Made all the classes FINAL and added a lot of OVERRIDE.
2958         Added a constructor for Negative and Union. Got rid of the Predicate class and
2959         instead provided two functions that operate on an Expression.
2960
2961         * xml/XPathStep.cpp:
2962         (WebCore::XPath::Step::Step): Use move instea dof copying.
2963         (WebCore::XPath::Step::~Step): Removed calls to deleteAllValues.
2964         (WebCore::XPath::Step::optimize): Use move instead of swap and copy. Also
2965         operate directly on the data members of the node test instead of using functions
2966         that just return references to those data members.
2967         (WebCore::XPath::optimizeStepPair): Use references instead of pointers, move
2968         instead of swap, and early return instead of nested if statements.
2969         (WebCore::XPath::Step::predicatesAreContextListInsensitive): Use references.
2970         (WebCore::XPath::Step::evaluate): Use references instead of pointers and move
2971         instead of swap.
2972         (WebCore::XPath::nodeMatchesBasicTest): Use references instead of pointers and
2973         more specific types when possible.
2974         (WebCore::XPath::nodeMatches): Ditto.
2975         (WebCore::XPath::Step::nodesInAxis): Use references instead of pointers. Added
2976         braces to match style. Use words instead of letters for local variable names.
2977
2978         * xml/XPathStep.h: Make almost everything in NodeTest private since callers
2979         just set these up and Step is what actually uses them. Changed the predicate
2980         vectors to be vectors of Predicate instead of Predicate*, since a Predicate
2981         is just a wrapper around a single std::unique_ptr<Expression>. Changed to use
2982         move instead of copy when making a Step and to use references instead of pointers.
2983
2984         * xml/XPathValue.cpp: Use std::numeric_limits explicitly instead of using using.
2985         Got rid of Value::adopt.
2986         (WebCore::XPath::Value::toNodeSet): Use NeverDestroyed instead of DEFINE_STATE_LOCAL.
2987         Updated for name changes.
2988         (WebCore::XPath::Value::modifiableNodeSet): Ditto.
2989         (WebCore::XPath::Value::toBoolean): Ditto.
2990         (WebCore::XPath::Value::toNumber): Ditto.
2991         (WebCore::XPath::Value::toString): Ditto. Use ASCIILiteral.
2992
2993         * xml/XPathValue.h: Moved ValueData class inside the Value class and renamed
2994         it Value::Data. Removed fancy trick that avoids turning pointers into bool, and
2995         just take the risk. Made many, but not all, of the Value constructors explicit
2996         since we normally are explicit at call sites. Removed unneeded unsigned long
2997         overload of the constructor. Changed the NodeSet version of the constructor to
2998         use std::move and use that instead of AdoptTag.
2999
3000 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
3001
3002         Build fix. Add back the missing call to EventRetargeter::adjustForTouchEvent.
3003
3004         * dom/EventDispatcher.cpp:
3005         (WebCore::EventDispatcher::dispatch):
3006
3007 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
3008
3009         EventDispatchMediator is goner
3010         https://bugs.webkit.org/show_bug.cgi?id=122581
3011
3012         Reviewed by Antti Koivisto.
3013
3014         Killed the death.
3015
3016         * CMakeLists.txt:
3017         * GNUmakefile.list.am:
3018         * WebCore.vcxproj/WebCore.vcxproj:
3019         * WebCore.vcxproj/WebCore.vcxproj.filters:
3020         * WebCore.xcodeproj/project.pbxproj:
3021         * dom/DOMAllInOne.cpp:
3022         * dom/Element.cpp:
3023         (WebCore::Element::dispatchWheelEvent):
3024         (WebCore::Element::dispatchKeyEvent):
3025         (WebCore::Element::dispatchFocusEvent):
3026         (WebCore::Element::dispatchBlurEvent):
3027         * dom/EventDispatchMediator.cpp: Removed.
3028         * dom/EventDispatchMediator.h: Removed.
3029         * dom/EventDispatcher.cpp:
3030         (WebCore::EventDispatcher::dispatchEvent):
3031         (WebCore::EventDispatcher::dispatchScopedEvent):
3032         * dom/EventDispatcher.h:
3033         * dom/KeyboardEvent.h:
3034         * dom/MouseEvent.h:
3035         * dom/Node.cpp:
3036         (WebCore::Node::dispatchScopedEvent):
3037         (WebCore::Node::dispatchEvent):
3038         (WebCore::Node::dispatchGestureEvent):
3039         (WebCore::Node::dispatchTouchEvent):
3040         (WebCore::Node::dispatchUIRequestEvent):
3041         * dom/Node.h:
3042         * dom/ScopedEventQueue.cpp:
3043         (WebCore::ScopedEventQueue::~ScopedEventQueue):
3044         (WebCore::ScopedEventQueue::enqueueEvent):
3045         (WebCore::ScopedEventQueue::dispatchAllEvents):
3046         (WebCore::ScopedEventQueue::dispatchEvent):
3047         * dom/ScopedEventQueue.h:
3048         * dom/TouchEvent.cpp:
3049         * dom/TouchEvent.h:
3050         * dom/UIEvent.h:
3051         * dom/WheelEvent.h:
3052
3053 2013-10-09  Andreas Kling  <akling@apple.com>
3054
3055         Kill some RenderObject::firstChildSlow/lastChildSlow usage.
3056         <https://webkit.org/b/122582>
3057
3058         Reviewed by Antti Koivisto.
3059
3060         Use tighter typing in some random places to flush out unnecessary use
3061         of virtual first/last child getters on RenderObject.
3062
3063         There are more of these opportunities, but I left them untouched to
3064         avoid snowballing this patch.
3065
3066 2013-10-09  Simon Fraser  <simon.fraser@apple.com>
3067
3068         Fix some bad paths in the Xcode project
3069         https://bugs.webkit.org/show_bug.cgi?id=122583
3070
3071         Reviewed by Mark Rowe.
3072
3073         Fix paths for some storage quota-related files, and remove
3074         reference to mediaControlsQuickTime.css which was removed in r156546.
3075
3076         * WebCore.xcodeproj/project.pbxproj:
3077
3078 2013-10-09  Alexandru Chiculita  <achicu@adobe.com>
3079
3080         Web Inspector: [CSS Regions] Display the correct fragment boxes for content inside flow threads
3081         https://bugs.webkit.org/show_bug.cgi?id=122291
3082
3083         Reviewed by Timothy Hatcher.
3084
3085         Tests: inspector/elements/highlight-regions-flow-horiz-bt.html
3086                inspector/elements/highlight-regions-flow-transform-horiz-bt.html
3087                inspector/elements/highlight-regions-flow-transform-vert-lr.html
3088                inspector/elements/highlight-regions-flow-transform-vert-rl.html
3089                inspector/elements/highlight-regions-flow-transform.html
3090                inspector/elements/highlight-regions-flow-vert-lr.html
3091                inspector/elements/highlight-regions-flow-vert-rl.html
3092                inspector/elements/highlight-regions-flow.html
3093
3094         Nodes inside a RenderFlowThread can be split across multiple regions. This patch adds the required
3095         code to compute "fragments" for each region. Each fragment will display its own label.
3096
3097         There are a couple of changes:
3098         1. The node highlight object now has a "scroll" property to hold the main view's scroll offset.
3099         2. There's a "fragment" array to get a list of quads for each renderer fragment. Renderers outside 
3100         RenderFlowThreads will just have one fragment.
3101         3. ElementInfo now has two more properties: "regionFlowInfo" (renamed from former flowInfo) and "contentFlowInfo".
3102         If the renderer is a RenderRegion it will have a regionFlowInfo. If the renderer is inside a RenderFlowThread
3103         then it will have a "contentFlowInfo".
3104
3105         * inspector/InspectorOverlay.cpp:
3106         (WebCore::InspectorOverlay::getHighlight): It should now take a "region" parameter to customize the output for a specific
3107         containing region.
3108         (WebCore::buildObjectForHighlight):
3109         (WebCore::buildObjectForCSSRegionContentClip): We need to know how to clip the fragments inside regions.
3110         (WebCore::buildObjectForRendererFragments): Extracted code from buildObjectForHighlight and added
3111         the new regions lookup code.
3112         (WebCore::buildObjectForElementInfo): Extracted from buildObjectForHighlight.
3113         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
3114         (WebCore::InspectorOverlay::drawQuadHighlight):
3115         * inspector/InspectorOverlayPage.css: There can be multiple labels on screen at once, so I've
3116         created the #element-title-template element that we clone for each label. .element-title-container is now
3117         holding all the .element-title elements, so that we can remove them all at once.
3118         (.element-title-container):
3119         (.element-title):
3120         (#element-title-template):
3121         (.tag-name):
3122         (.node-id):
3123         (.class-name):
3124         * inspector/InspectorOverlayPage.html:
3125         * inspector/InspectorOverlayPage.js:
3126         (reset):
3127         (_toggleOptionalValue):
3128         (_createElementTitle): Creates an element populated with data read from elementInfo.
3129         (_drawElementTitle): Added code to create more labels for multiple fragments.
3130         (_drawRegionsHighlight):
3131         (_drawFragmentHighlight):
3132         (drawNodeHighlight): Consolidated the scroll property into a canvas.transform.
3133
3134 2013-10-09  Simon Fraser  <simon.fraser@apple.com>
3135
3136         Layout assertion failure in WebCore::RenderView::paint
3137         https://bugs.webkit.org/show_bug.cgi?id=121925
3138
3139         Reviewed by Tim Horton.
3140
3141         This fixes the assertion seen when running WK2 API tests.
3142         
3143         If RenderLayerCompositor::flushPendingLayerChanges() was called before
3144         the root layer was attached, it would set m_shouldFlushOnReattach
3145         to do the flush later, after attaching (bypassing the runloop observer
3146         that updated layout if necessary).
3147         
3148         This could cause us to get to a CA commit without having updated
3149         layout, hence the assertion.
3150         
3151         Fix by having attachRootLayer() schedule a layer flush, rather than doing
3152         one right away.
3153
3154         * rendering/RenderLayerCompositor.cpp:
3155         (WebCore::RenderLayerCompositor::attachRootLayer):
3156
3157 2013-10-09  Bem Jones-Bey  <bjonesbe@adobe.com>
3158
3159         Move float logical location/dimension methods to RenderBlockFlow
3160         https://bugs.webkit.org/show_bug.cgi?id=122282
3161
3162         Reviewed by David Hyatt.
3163
3164         I recently moved the logical location and dimension methods from
3165         RenderBlock to FloatingObject. This made it so that the methods needed
3166         to take in the horizontal writing mode of the FloatingObject's
3167         container in order to do their thing. When looking into how to fix
3168         this, I came to understand why RenderBlock has methods to determine
3169         the logical location and dimensions of its children, when the children
3170         themselves have those methods: the methods on RenderBlock are for
3171         determining the logical value in the writing mode of that RenderBlock,
3172         and the method on the child is for determining the logical value in
3173         the writing mode of the child.
3174
3175         Since the floating object list has moved from RenderBlock to
3176         RenderBlockFlow, this change moves the logical dimension methods from
3177         FloatingObject to RenderBlockFlow.
3178
3179         No new tests, no new behavior.
3180
3181         * rendering/FloatingObjects.cpp:
3182         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
3183         (WebCore::FloatingObjects::FloatingObjects):
3184         (WebCore::::updateOffsetIfNeeded):
3185         (WebCore::::collectIfNeeded):
3186         (WebCore::::getHeightRemaining):
3187         * rendering/FloatingObjects.h:
3188         * rendering/LineWidth.cpp:
3189         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
3190         * rendering/RenderBlockFlow.cpp:
3191         (WebCore::RenderBlockFlow::clearFloats):
3192         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
3193         (WebCore::RenderBlockFlow::insertFloatingObject):
3194         (WebCore::RenderBlockFlow::removeFloatingObject):
3195         (WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
3196         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
3197         (WebCore::RenderBlockFlow::positionNewFloats):
3198         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
3199         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
3200         (WebCore::RenderBlockFlow::addOverhangingFloats):
3201         (WebCore::RenderBlockFlow::hasOverhangingFloat):
3202         (WebCore::RenderBlockFlow::addIntrudingFloats):
3203         * rendering/RenderBlockFlow.h:
3204         (WebCore::RenderBlockFlow::logicalTopForFloat):
3205         (WebCore::RenderBlockFlow::logicalBottomForFloat):
3206         (WebCore::RenderBlockFlow::logicalLeftForFloat):
3207         (WebCore::RenderBlockFlow::logicalRightForFloat):
3208         (WebCore::RenderBlockFlow::logicalWidthForFloat):
3209         (WebCore::RenderBlockFlow::logicalHeightForFloat):
3210         (WebCore::RenderBlockFlow::logicalSizeForFloat):
3211         (WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat):
3212         (WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat):
3213         (WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat):
3214         (WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat):
3215         (WebCore::RenderBlockFlow::setLogicalTopForFloat):
3216         (WebCore::RenderBlockFlow::setLogicalLeftForFloat):
3217         (WebCore::RenderBlockFlow::setLogicalHeightForFloat):
3218         (WebCore::RenderBlockFlow::setLogicalWidthForFloat):
3219         * rendering/RenderBlockLineLayout.cpp:
3220         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
3221         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
3222         (WebCore::updateSegmentsForShapes):
3223         (WebCore::LineBreaker::nextSegmentBreak):
3224         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3225         * rendering/shapes/ShapeOutsideInfo.cpp:
3226         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
3227         * rendering/shapes/ShapeOutsideInfo.h:
3228
3229 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
3230
3231         Remove MouseEventDispatchMediator
3232         https://bugs.webkit.org/show_bug.cgi?id=122580
3233
3234         Reviewed by Antti Koivisto.
3235
3236         Removed. Will remove EventDispatchMediator next.
3237
3238         * dom/Element.cpp:
3239         (WebCore::Element::dispatchMouseEvent):
3240         * dom/MouseEvent.cpp:
3241         * dom/MouseEvent.h:
3242         * dom/Node.cpp:
3243         (WebCore::Node::dispatchEvent):
3244         (WebCore::Node::dispatchTouchEvent):
3245
3246 2013-10-09  Ryosuke Niwa  <rniwa@webkit.org>
3247
3248         Remove all subclasses of EventDispatchMediator except MouseEventDispatchMediator
3249         https://bugs.webkit.org/show_bug.cgi?id=122579
3250
3251         Reviewed by Antti Koivisto.
3252
3253         Removed UIRequestEventDispatchMediator, GestureEventDispatchMediator, KeyboardEventDispatchMediator,
3254         and WheelEventDispatchMediator. Moved the code in the respective mediateAndDispatchEvent functions
3255         to their respective dispatch*Event functions in Node.cpp and Element.cpp.
3256
3257         * Modules/indieui/UIRequestEvent.cpp:
3258         (WebCore::UIRequestEvent::eventInterface):
3259         * Modules/indieui/UIRequestEvent.h:
3260         * dom/Element.cpp:
3261         (WebCore::deltaMode):
3262         (WebCore::Element::dispatchWheelEvent):
3263         (WebCore::Element::dispatchKeyEvent):
3264         * dom/GestureEvent.cpp:
3265         * dom/GestureEvent.h:
3266         * dom/KeyboardEvent.cpp:
3267         * dom/KeyboardEvent.h:
3268         * dom/Node.cpp:
3269         (WebCore::Node::dispatchGestureEvent):
3270         (WebCore::Node::dispatchUIRequestEvent):
3271         * dom/WheelEvent.cpp:
3272         * dom/WheelEvent.h:
3273
3274 2013-10-09  Bem Jones-Bey  <bjonesbe@adobe.com>
3275
3276         [CSS Shapes] Lines that don't intersect shape-outside should ignore both left and right margins
3277         https://bugs.webkit.org/show_bug.cgi?id=122570
3278
3279         Reviewed by Alexandru Chiculita.
3280
3281         Due to an oversight, the left margin on left floats and the right
3282         margin on right floats was having an effect on lines that did not
3283         intersect the shape (but did intersect the margin box of the float).
3284         By the spec, lines that do not intersect the shape should act as if
3285         the float isn't there, so those margins should have no effect on
3286         those lines. This patch fixes this.
3287
3288         No new tests, it is covered by the existing tests now that they have
3289         been fixed to have the proper behavior.
3290
3291         * rendering/shapes/ShapeOutsideInfo.cpp:
3292         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
3293
3294 2013-10-09  Bem Jones-Bey  <bjonesbe@adobe.com>
3295
3296         [CSS Shapes] Clip shape-outside to the bottom of the margin box
3297         https://bugs.webkit.org/show_bug.cgi?id=122562
3298
3299         Reviewed by Alexandru Chiculita.
3300
3301         The spec says that a shape-outside shape must be clipped to the
3302         margin box. This implements clipping the bottom of the shape to the
3303         bottom of the margin box.
3304
3305         Test: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-000.html
3306               csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html
3307               csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-002.html
3308               csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html
3309
3310         * rendering/RenderBlockFlow.cpp:
3311         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
3312
3313 2013-10-09  Sergio Correia  <sergio.correia@openbossa.org>
3314
3315         [CoordinatedGraphics] ASSERTION FAILED: !m_flushingLayers (after r156291)
3316         https://bugs.webkit.org/show_bug.cgi?id=122016
3317
3318         Reviewed by Noam Rosenthal.
3319
3320         To prevent calling scheduleLayerFlush() inside flushCompositingState(),
3321         we now only call m_client->notifyFlushRequired() - which will trigger
3322         scheduleLayerFlush() - if we are not already flushing layer changes.
3323
3324         No new tests, covered by existing ones.
3325
3326         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
3327         (WebCore::CompositingCoordinator::notifyFlushRequired): Check if we
3328         are already flushing layer changes before calling notifyFlushRequired.
3329         (WebCore::CompositingCoordinator::sizeDidChange): Use notifyFlushRequired()
3330         from CompositingCoordinator instead of calling the one from m_client
3331         directly.
3332         (WebCore::CompositingCoordinator::createGraphicsLayer): Ditto.
3333         (WebCore::CompositingCoordinator::detachLayer): Ditto.
3334         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3335         (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Added helper
3336         to check whether we are flushing layer changes before calling client()'s
3337         notifyFlushRequired(). It returns a boolean indicating whether it
3338         called the client's method.
3339         (WebCore::CoordinatedGraphicsLayer::didChangeLayerState): Use the
3340         notifyFlushRequired() helper.
3341         (WebCore::CoordinatedGraphicsLayer::didChangeAnimations): Ditto.
3342         (WebCore::CoordinatedGraphicsLayer::didChangeChildren): Ditto.
3343         (WebCore::CoordinatedGraphicsLayer::didChangeFilters): Ditto.
3344         (WebCore::CoordinatedGraphicsLayer::didChangeImageBacking): Ditto.
3345         (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay): Ditto.
3346         (WebCore::CoordinatedGraphicsLayer::setContentsToCanvas): Ditto.
3347         (WebCore::CoordinatedGraphicsLayer::flushCompositingState): Ditto.
3348         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):Ditto.
3349         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3350         Declaration of the notifyFlushRequired() helper.
3351
3352 2013-10-09  Chris Fleizach  <cfleizach@apple.com>
3353
3354         AX: VoiceOver double speaks all items in <li> nodes
3355         https://bugs.webkit.org/show_bug.cgi?id=122564
3356
3357         Reviewed by Brent Fulgham.
3358
3359         Test: platform/mac/accessibility/native-list-item-should-not-expose-label.html
3360
3361         * accessibility/AccessibilityNodeObject.cpp:
3362         (WebCore::AccessibilityNodeObject::visibleText):
3363
3364 2013-10-09  Sergio Correia  <sergio.correia@openbossa.org>
3365
3366         CoordinatedGraphics: Fix integer rounding when computing pixel alignment
3367         https://bugs.webkit.org/show_bug.cgi?id=122565
3368
3369         Reviewed by Noam Rosenthal.
3370
3371         Replace roundedIntRect call in computePixelAlignment() with enclosingIntRect,
3372         so that very small rectangles (after content scaling) don't appear to be empty,
3373         creating a crash later.
3374
3375         Test: transforms/3d/general/rotate-45-degrees-long-inner-text-in-dt.html
3376
3377         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3378         (WebCore::CoordinatedGraphicsLayer::computePixelAlignment):
3379
3380 2013-10-08  Ryosuke Niwa  <rniwa@webkit.org>
3381
3382         Rename EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget
3383         https://bugs.webkit.org/show_bug.cgi?id=122539
3384
3385         Reviewed by Darin Adler.
3386
3387         Renamed EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget and got rid of
3388         EventDispatchMediators for focus events. We set the related target inside EventDispatcher's
3389         dispatch via Event::relatedTarget, which is now virtual and overridden by mouse/focus events.
3390
3391         * dom/Element.cpp: The following functions no longer use FocusEventDispatchMediators.
3392         (WebCore::Element::dispatchFocusInEvent):
3393         (WebCore::Element::dispatchFocusOutEvent):
3394         (WebCore::Element::dispatchFocusEvent):
3395         (WebCore::Element::dispatchBlurEvent):
3396