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