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