[Yosemite] Button text doesn't go white while pushing the button, like it does for...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-23  Dean Jackson  <dino@apple.com>
2
3         [Yosemite] Button text doesn't go white while pushing the button, like it does for real buttons
4         https://bugs.webkit.org/show_bug.cgi?id=137054
5         rdar://problem/17559038
6
7         Reviewed by Sam Weinig.
8
9         On Yosemite and above, system buttons paint with white-ish text when they
10         are pressed. Since this isn't exposed by API, I've hardcoded the value
11         into RenderThemeMac.
12
13         The actual state is exposed by adding a :active rule to html.css that
14         uses a new CSSValueKeyword: ActiveButtonText.
15
16         Unfortunately I can't find a way to test this, because the active state isn't
17         testable. We should really expose the Inspector's forcePseudoState function into
18         window.internals.
19
20         * css/CSSValueKeywords.in: Add "activebuttontext".
21         * css/html.css:
22         (input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]::-webkit-file-upload-button:active, button:active): New rule for active
23         button elements.
24         * rendering/RenderTheme.cpp:
25         (WebCore::RenderTheme::systemColor): Handle CSSValueActivebuttontext as black.
26         * rendering/RenderThemeMac.mm:
27         (WebCore::RenderThemeMac::systemColor): Handle CSSValueActivebuttontext as
28         white with 75% opacity.
29
30 2014-09-24  Christophe Dumez  <cdumez@apple.com>
31
32         Use is<SVG*Element>() instead of isSVG*Element()
33         https://bugs.webkit.org/show_bug.cgi?id=137058
34
35         Reviewed by Dirk Schulze.
36
37         Use is<SVG*Element>() instead of isSVG*Element() and drop support for
38         generated isSVG*Element().
39
40         No new tests, no behavior change.
41
42         * css/CSSCursorImageValue.cpp:
43         (WebCore::resourceReferencedByCursorElement):
44         * css/StyleResolver.cpp:
45         (WebCore::StyleResolver::useSVGZoomRulesForLength):
46         * dom/DocumentStyleSheetCollection.cpp:
47         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
48         * dom/ScriptElement.cpp:
49         (WebCore::toScriptElementIfPossible):
50         * dom/make_names.pl:
51         (printTypeHelpers):
52         * editing/gtk/EditorGtk.cpp:
53         (WebCore::elementURL):
54         * rendering/HitTestResult.cpp:
55         (WebCore::HitTestResult::absoluteImageURL):
56         (WebCore::HitTestResult::isLiveLink):
57         * rendering/svg/RenderSVGEllipse.cpp:
58         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
59         * rendering/svg/RenderSVGTransformableContainer.cpp:
60         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
61         * rendering/svg/SVGPathData.cpp:
62         (WebCore::updatePathFromCircleElement):
63         * rendering/svg/SVGRenderTreeAsText.cpp:
64         (WebCore::operator<<):
65         * rendering/svg/SVGResources.cpp:
66         (WebCore::targetReferenceFromResource):
67         * svg/SVGAltGlyphDefElement.cpp:
68         (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
69         * svg/SVGAltGlyphElement.cpp:
70         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
71         * svg/SVGAnimateMotionElement.cpp:
72         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
73         * svg/SVGDocument.cpp:
74         (WebCore::SVGDocument::rootElement):
75         * svg/SVGElement.cpp:
76         (WebCore::SVGElement::isOutermostSVGSVGElement):
77         (WebCore::SVGElement::ownerSVGElement):
78         (WebCore::SVGElement::viewportElement):
79         * svg/SVGFEComponentTransferElement.cpp:
80         (WebCore::SVGFEComponentTransferElement::build):
81         * svg/SVGFELightElement.cpp:
82         (WebCore::SVGFELightElement::findLightElement):
83         * svg/SVGFontData.cpp:
84         (WebCore::SVGFontData::applySVGGlyphSelection):
85         * svg/SVGFontElement.cpp:
86         (WebCore::SVGFontElement::ensureGlyphCache):
87         * svg/SVGFontFaceElement.cpp:
88         (WebCore::SVGFontFaceElement::associatedFontElement):
89         (WebCore::SVGFontFaceElement::rebuildFontFace):
90         * svg/SVGFontFaceSrcElement.cpp:
91         (WebCore::SVGFontFaceSrcElement::srcValue):
92         (WebCore::SVGFontFaceSrcElement::childrenChanged):
93         * svg/SVGGlyphElement.cpp:
94         (WebCore::SVGGlyphElement::invalidateGlyphCache):
95         * svg/SVGHKernElement.cpp:
96         (WebCore::SVGHKernElement::insertedInto):
97         (WebCore::SVGHKernElement::removedFrom):
98         * svg/SVGLengthContext.cpp:
99         (WebCore::SVGLengthContext::determineViewport):
100         * svg/SVGLocatable.cpp:
101         (WebCore::isViewportElement):
102         * svg/SVGMPathElement.cpp:
103         (WebCore::SVGMPathElement::pathElement):
104         (WebCore::SVGMPathElement::notifyParentOfPathChange):
105         * svg/SVGPathElement.cpp:
106         (WebCore::SVGPathElement::invalidateMPathDependencies):
107         * svg/SVGPatternElement.cpp:
108         (WebCore::SVGPatternElement::collectPatternAttributes):
109         * svg/SVGSVGElement.cpp:
110         (WebCore::SVGSVGElement::setupInitialView):
111         * svg/SVGUseElement.cpp:
112         (WebCore::dumpInstanceTree):
113         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
114         * svg/SVGVKernElement.cpp:
115         (WebCore::SVGVKernElement::insertedInto):
116         (WebCore::SVGVKernElement::removedFrom):
117
118 2014-09-24  Benjamin Poulain  <bpoulain@apple.com>
119
120         Remove the style marking from :nth-child()
121         https://bugs.webkit.org/show_bug.cgi?id=137055
122
123         Reviewed by Andreas Kling.
124
125         Previously, :nth-child() had to mark the RenderStyle as unique in order
126         to prevent it from being used for style sharing.
127
128         After r173229, :nth-child() use the more generic element marking
129         "StyleIsAffectedByPreviousSibling".
130
131         In StyleResolver::canShareStyleWithElement(), StyleIsAffectedByPreviousSibling
132         is already used to prevent style sharing of those elements, making the "Unique"
133         flag redundant.
134
135         Since it is now useless, remove the style marking from SelectorChecker and the CSS JIT.
136
137         Tests: fast/css/nth-child-style-sharing-even.html
138                fast/css/nth-child-style-sharing-fixed-integer.html
139                fast/css/nth-child-style-sharing-odd.html
140
141         * css/SelectorChecker.cpp:
142         (WebCore::SelectorChecker::checkOne):
143         * cssjit/SelectorCompiler.cpp:
144         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
145         (WebCore::SelectorCompiler::setElementChildIndexAndUpdateStyle): Deleted.
146         * rendering/style/RenderStyle.h:
147
148 2014-09-23  Chris Dumez  <cdumez@apple.com>
149
150         Add support for is<HTML*Element>() for type checking
151         https://bugs.webkit.org/show_bug.cgi?id=137015
152
153         Reviewed by Benjamin Poulain.
154
155         Add support for is<HTML*Element>() for type checking while keeping
156         support for the legacy toHTML*Element() form until the code base is
157         ported.
158
159         toHTML*Element() helpers are now macros to the new is<HTML*Element>()
160         type checking helpers.
161
162         No new tests, no behavior change.
163
164         * dom/Document.cpp:
165         (WebCore::Document::setTitle):
166         * dom/Element.cpp:
167         (WebCore::Element::childShouldCreateRenderer):
168         * dom/Element.h:
169         (WebCore::is):
170         (WebCore::downcast):
171         (WebCore::isElementOfType): Deleted.
172         * dom/ElementAncestorIterator.h:
173         (WebCore::lineageOfType):
174         * dom/ElementIterator.h:
175         (WebCore::findElementAncestorOfType):
176         * dom/ElementTraversal.h:
177         (WebCore::Traversal<ElementType>::firstChildTemplate):
178         (WebCore::Traversal<ElementType>::lastChildTemplate):
179         (WebCore::Traversal<ElementType>::firstWithinTemplate):
180         (WebCore::Traversal<ElementType>::lastWithinTemplate):
181         (WebCore::Traversal<ElementType>::nextTemplate):
182         (WebCore::Traversal<ElementType>::previous):
183         (WebCore::Traversal<ElementType>::nextSibling):
184         (WebCore::Traversal<ElementType>::previousSibling):
185         (WebCore::Traversal<ElementType>::nextSkippingChildren):
186         * dom/TypedElementDescendantIterator.h:
187         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
188         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
189         * dom/make_names.pl:
190         (printTypeHelpers):
191
192 2014-09-23  Benjamin Poulain  <bpoulain@apple.com>
193
194         The style resolution cache applies properties incorrectly whenever direction != ltr
195         https://bugs.webkit.org/show_bug.cgi?id=137052
196
197         Reviewed by Andreas Kling.
198
199         The optimization r135021 introduced a bug whenever the direction of subtree is not
200         uniform in the whole page.
201
202         When StyleResolver::applyMatchedProperties() resolves the style, some properties are
203         resolved differently based on the writing-mode and the direction.
204
205         In isCacheableInMatchedPropertiesCache(), the cases for writing-mode are already handled
206         by not caching any style with anything else than the default.
207         The direction was ignored, causing the bugs solved here.
208
209         Tests: css3/flexbox/flex-flow-2.html
210                fast/css/style-resolver-cache-direction-1.html
211                fast/css/style-resolver-cache-direction-2.html
212                fast/css/style-resolver-cache-direction-3.html
213
214         * css/StyleResolver.cpp:
215         (WebCore::isCacheableInMatchedPropertiesCache):
216
217 2014-09-23  Chris Dumez  <cdumez@apple.com>
218
219         Have CSS classes' methods return more references
220         https://bugs.webkit.org/show_bug.cgi?id=137036
221
222         Reviewed by Ryosuke Niwa.
223
224         Have CSS classes' methods return more references instead of pointers
225         when possible.
226
227         No new tests, no behavior change.
228
229         * css/CSSFontFaceRule.cpp:
230         (WebCore::CSSFontFaceRule::style):
231         * css/CSSFontFaceRule.h:
232         * css/CSSGroupingRule.cpp:
233         (WebCore::CSSGroupingRule::cssRules):
234         * css/CSSGroupingRule.h:
235         * css/CSSImportRule.cpp:
236         (WebCore::CSSImportRule::media):
237         * css/CSSImportRule.h:
238         * css/CSSPageRule.cpp:
239         (WebCore::CSSPageRule::style):
240         * css/CSSPageRule.h:
241         * css/CSSStyleRule.cpp:
242         (WebCore::CSSStyleRule::style):
243         * css/CSSStyleRule.h:
244         * css/WebKitCSSKeyframeRule.cpp:
245         (WebCore::WebKitCSSKeyframeRule::style):
246         * css/WebKitCSSKeyframeRule.h:
247         * css/WebKitCSSKeyframesRule.cpp:
248         (WebCore::WebKitCSSKeyframesRule::cssRules):
249         * css/WebKitCSSKeyframesRule.h:
250         * css/WebKitCSSViewportRule.cpp:
251         (WebCore::WebKitCSSViewportRule::style):
252         * css/WebKitCSSViewportRule.h:
253         * inspector/InspectorStyleSheet.cpp:
254         (WebCore::asCSSRuleList):
255         (WebCore::fillMediaListChain):
256         (WebCore::InspectorStyleSheet::setRuleSelector):
257         (WebCore::InspectorStyleSheet::deleteRule):
258         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
259         (WebCore::InspectorStyleSheet::buildObjectForRule):
260         (WebCore::InspectorStyleSheet::styleForId):
261         (WebCore::InspectorStyleSheet::ruleIndexByStyle):
262         (WebCore::InspectorStyleSheet::ruleId):
263         (WebCore::InspectorStyleSheet::revalidateStyle):
264
265 2014-09-23  Roger Fong  <roger_fong@apple.com>
266
267         [Windows] Enable CSS Supports Rule on Windows.
268
269         * css/CSSAllInOne.cpp:
270
271 2014-09-23  Christophe Dumez  <cdumez@apple.com>
272
273         Unreviewed build fix after r173893.
274
275         Partial revert of r173893 to fix debug builds.
276
277         * accessibility/AccessibilityNodeObject.cpp:
278         (WebCore::AccessibilityNodeObject::text):
279         * bindings/js/JSDOMWindowCustom.cpp:
280         (WebCore::namedItemGetter):
281         (WebCore::JSDOMWindow::getOwnPropertySlot):
282         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
283         * css/SelectorChecker.cpp:
284         (WebCore::SelectorChecker::checkOne):
285         * cssjit/SelectorCompiler.cpp:
286         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
287         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
288         (WebCore::SelectorCompiler::isPlaceholderShown):
289         * dom/Document.cpp:
290         (WebCore::Document::processHttpEquiv):
291         * dom/Element.cpp:
292         (WebCore::Element::insertedInto):
293         (WebCore::Element::removedFrom):
294         (WebCore::Element::updateName):
295         (WebCore::Element::updateId):
296         * editing/Editor.cpp:
297         (WebCore::Editor::selectionForCommand):
298         (WebCore::findFirstMarkable):
299         * editing/FrameSelection.cpp:
300         (WebCore::FrameSelection::selectAll):
301         * html/HTMLElement.cpp:
302         (WebCore::HTMLElement::matchesReadWritePseudoClass):
303         (WebCore::HTMLElement::directionality):
304         * html/HTMLImageElement.cpp:
305         (WebCore::HTMLImageElement::parseAttribute):
306         * html/HTMLObjectElement.cpp:
307         (WebCore::HTMLObjectElement::updateDocNamedItem):
308         * html/HTMLPlugInImageElement.cpp:
309         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
310         * html/HTMLTextFormControlElement.cpp:
311         (WebCore::enclosingTextFormControl):
312         * page/FrameView.cpp:
313         (WebCore::FrameView::addEmbeddedObjectToUpdate):
314         (WebCore::FrameView::updateEmbeddedObject):
315         * rendering/HitTestResult.cpp:
316         (WebCore::HitTestResult::absolutePDFURL):
317         * rendering/RenderEmbeddedObject.cpp:
318         (WebCore::RenderEmbeddedObject::paintContents):
319         (WebCore::RenderEmbeddedObject::layout):
320         * rendering/RenderSnapshottedPlugIn.cpp:
321         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
322         * rendering/RenderTextControl.cpp:
323         (WebCore::RenderTextControl::textFormControlElement):
324         * rendering/RenderThemeMac.mm:
325         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
326         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
327         * testing/Internals.cpp:
328         (WebCore::Internals::visiblePlaceholder):
329
330 2014-09-22  Wenson Hsieh  <wenson_hsieh@apple.com>
331
332         Implement snapping behavior for Mac overflow scrolling
333         https://bugs.webkit.org/show_bug.cgi?id=135774
334
335         Reviewed by Beth Dakin.
336
337         Hooks into AxisScrollSnapAnimator to implement overflow scroll snapping on Mac.
338
339         We need to find a way to test this!
340
341         * dom/Element.cpp:
342         (WebCore::Element::dispatchWheelEvent):
343         * page/EventHandler.cpp:
344         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
345         * platform/ScrollAnimator.cpp:
346         (WebCore::ScrollAnimator::handleWheelEvent):
347         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
348         (WebCore::ScrollAnimator::scrollOffsetInAxis):
349         (WebCore::ScrollAnimator::immediateScrollInAxis):
350         (WebCore::ScrollAnimator::startScrollSnapTimer):
351         (WebCore::ScrollAnimator::stopScrollSnapTimer):
352         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
353         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
354         * platform/ScrollAnimator.h:
355         * platform/mac/AxisScrollSnapAnimator.h:
356         * platform/mac/AxisScrollSnapAnimator.mm:
357         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
358         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
359         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
360         (WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
361         * rendering/RenderLayer.cpp:
362         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
363
364 2014-09-23  Chris Dumez  <cdumez@apple.com>
365
366         Use downcast<HTML*Element>() instead of toHTML*Element()
367         https://bugs.webkit.org/show_bug.cgi?id=137007
368
369         Reviewed by Benjamin Poulain.
370
371         Use downcast<HTML*Element>() instead of toHTML*Element() and drop
372         transition macros for toHTML*Element().
373
374         This patch also cleans up the surrounding code.
375
376         No new tests, no behavior change.
377
378         * accessibility/AXObjectCache.cpp:
379         (WebCore::AXObjectCache::focusedUIElementForPage):
380         (WebCore::AXObjectCache::labelChanged):
381         * accessibility/AccessibilityListBox.cpp:
382         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
383         (WebCore::AccessibilityListBox::addChildren):
384         * accessibility/AccessibilityListBoxOption.cpp:
385         (WebCore::AccessibilityListBoxOption::isSelected):
386         (WebCore::AccessibilityListBoxOption::stringValue):
387         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
388         * accessibility/AccessibilityMediaControls.cpp:
389         (WebCore::AccessibilityMediaTimeline::valueDescription):
390         * accessibility/AccessibilityMenuListOption.cpp:
391         (WebCore::AccessibilityMenuListOption::isEnabled):
392         (WebCore::AccessibilityMenuListOption::isSelected):
393         (WebCore::AccessibilityMenuListOption::setSelected):
394         (WebCore::AccessibilityMenuListOption::stringValue):
395         * accessibility/AccessibilityMenuListPopup.cpp:
396         (WebCore::AccessibilityMenuListPopup::addChildren):
397         * accessibility/AccessibilityNodeObject.cpp:
398         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
399         (WebCore::AccessibilityNodeObject::isNativeTextControl):
400         (WebCore::AccessibilityNodeObject::isNativeImage):
401         (WebCore::AccessibilityNodeObject::isInputImage):
402         (WebCore::AccessibilityNodeObject::isMultiSelectable):
403         (WebCore::AccessibilityNodeObject::isReadOnly):
404         (WebCore::AccessibilityNodeObject::valueForRange):
405         (WebCore::AccessibilityNodeObject::maxValueForRange):
406         (WebCore::AccessibilityNodeObject::minValueForRange):
407         (WebCore::isNodeActionElement):
408         (WebCore::AccessibilityNodeObject::alternativeText):
409         (WebCore::AccessibilityNodeObject::visibleText):
410         (WebCore::AccessibilityNodeObject::title):
411         (WebCore::AccessibilityNodeObject::text):
412         (WebCore::AccessibilityNodeObject::stringValue):
413         (WebCore::AccessibilityNodeObject::colorValue):
414         (WebCore::accessibleNameForNode):
415         * accessibility/AccessibilityRenderObject.cpp:
416         (WebCore::AccessibilityRenderObject::isFileUploadButton):
417         (WebCore::AccessibilityRenderObject::stringValue):
418         (WebCore::AccessibilityRenderObject::labelElementContainer):
419         (WebCore::AccessibilityRenderObject::internalLinkElement):
420         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
421         (WebCore::AccessibilityRenderObject::url):
422         (WebCore::AccessibilityRenderObject::setValue):
423         (WebCore::AccessibilityRenderObject::getDocumentLinks):
424         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
425         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
426         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
427         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
428         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
429         (WebCore::AccessibilityRenderObject::isLinked):
430         * accessibility/AccessibilitySlider.cpp:
431         (WebCore::AccessibilitySlider::inputElement):
432         (WebCore::AccessibilitySliderThumb::elementRect):
433         * accessibility/AccessibilityTable.cpp:
434         (WebCore::AccessibilityTable::tableElement):
435         (WebCore::AccessibilityTable::title):
436         * accessibility/atk/AXObjectCacheAtk.cpp:
437         (WebCore::notifyChildrenSelectionChange):
438         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
439         (optionFromSelection):
440         (webkitAccessibleSelectionGetSelectionCount):
441         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
442         (webkitAccessibleTableGetCaption):
443         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
444         (webkitAccessibleGetDescription):
445         * accessibility/ios/AccessibilityObjectIOS.mm:
446         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
447         * bindings/js/JSDOMWindowCustom.cpp:
448         (WebCore::namedItemGetter):
449         (WebCore::JSDOMWindow::getOwnPropertySlot):
450         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
451         * bindings/js/JSHTMLDocumentCustom.cpp:
452         (WebCore::JSHTMLDocument::nameGetter):
453         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
454         (WebCore::JSHTMLFrameSetElement::nameGetter):
455         * bindings/js/JSNodeCustom.cpp:
456         (WebCore::isReachableFromDOM):
457         * css/SelectorChecker.cpp:
458         (WebCore::SelectorChecker::checkOne):
459         * css/SelectorCheckerTestFunctions.h:
460         (WebCore::isChecked):
461         * css/StyleResolver.cpp:
462         (WebCore::StyleResolver::adjustRenderStyle):
463         * css/StyleSheetList.cpp:
464         (WebCore::StyleSheetList::getNamedItem):
465         * cssjit/SelectorCompiler.cpp:
466         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
467         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
468         (WebCore::SelectorCompiler::isPlaceholderShown):
469         * dom/CurrentScriptIncrementer.h:
470         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
471         * dom/DataTransfer.cpp:
472         (WebCore::DataTransfer::setDragImage):
473         * dom/Document.cpp:
474         (WebCore::Document::setTitle):
475         (WebCore::Document::processHttpEquiv):
476         (WebCore::Document::iconURLs):
477         * dom/DocumentOrderedMap.cpp:
478         (WebCore::keyMatchesMapName):
479         (WebCore::keyMatchesLowercasedMapName):
480         (WebCore::keyMatchesLowercasedUsemap):
481         (WebCore::DocumentOrderedMap::getElementByMapName):
482         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
483         (WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
484         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
485         * dom/DocumentStyleSheetCollection.cpp:
486         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
487         * dom/Element.cpp:
488         (WebCore::Element::insertedInto):
489         (WebCore::Element::removedFrom):
490         (WebCore::Element::updateName):
491         (WebCore::Element::updateId):
492         (WebCore::Element::updateLabel):
493         (WebCore::Element::ensureCachedHTMLCollection):
494         * dom/EventDispatcher.cpp:
495         (WebCore::EventDispatcher::dispatchEvent):
496         * dom/ScriptElement.cpp:
497         (WebCore::toScriptElementIfPossible):
498         * dom/VisitedLinkState.cpp:
499         (WebCore::linkHashForElement):
500         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
501         * dom/make_names.pl:
502         (printTypeHelpers):
503         * editing/Editor.cpp:
504         (WebCore::Editor::selectionForCommand):
505         (WebCore::imageElementFromImageDocument):
506         (WebCore::findFirstMarkable):
507         * editing/FrameSelection.cpp:
508         (WebCore::FrameSelection::selectAll):
509         (WebCore::scanForForm):
510         * editing/MarkupAccumulator.cpp:
511         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
512         * editing/ReplaceSelectionCommand.cpp:
513         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
514         * editing/VisibleSelection.cpp:
515         (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
516         (WebCore::VisibleSelection::isInPasswordField):
517         * editing/cocoa/HTMLConverter.mm:
518         (HTMLConverter::_processElement):
519         * editing/ios/EditorIOS.mm:
520         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
521         * editing/markup.cpp:
522         (WebCore::isPlainTextMarkup):
523         * html/ColorInputType.cpp:
524         (WebCore::ColorInputType::suggestions):
525         * html/FTPDirectoryDocument.cpp:
526         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
527         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
528         * html/FormAssociatedElement.cpp:
529         (WebCore::FormAssociatedElement::findAssociatedForm):
530         * html/HTMLAnchorElement.cpp:
531         (WebCore::appendServerMapMousePosition):
532         * html/HTMLAreaElement.cpp:
533         (WebCore::HTMLAreaElement::imageElement):
534         * html/HTMLCollection.cpp:
535         (WebCore::isMatchingElement):
536         * html/HTMLElement.cpp:
537         (WebCore::HTMLElement::matchesReadWritePseudoClass):
538         (WebCore::HTMLElement::setInnerHTML):
539         (WebCore::HTMLElement::directionality):
540         * html/HTMLEmbedElement.cpp:
541         (WebCore::HTMLEmbedElement::rendererIsNeeded):
542         * html/HTMLFieldSetElement.cpp:
543         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
544         * html/HTMLFormControlElement.cpp:
545         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
546         (WebCore::shouldAutofocus):
547         * html/HTMLFormControlsCollection.cpp:
548         (WebCore::HTMLFormControlsCollection::formControlElements):
549         (WebCore::HTMLFormControlsCollection::formImageElements):
550         * html/HTMLFormElement.cpp:
551         (WebCore::HTMLFormElement::getTextFieldValues):
552         (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap):
553         * html/HTMLImageElement.cpp:
554         (WebCore::HTMLImageElement::parseAttribute):
555         * html/HTMLImageLoader.cpp:
556         (WebCore::HTMLImageLoader::notifyFinished):
557         * html/HTMLInputElement.cpp:
558         (WebCore::HTMLInputElement::dataList):
559         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
560         * html/HTMLKeygenElement.cpp:
561         (WebCore::HTMLKeygenElement::shadowSelect):
562         * html/HTMLLegendElement.cpp:
563         (WebCore::HTMLLegendElement::virtualForm):
564         * html/HTMLMediaElement.cpp:
565         (WebCore::HTMLMediaElement::parseAttribute):
566         * html/HTMLNameCollection.cpp:
567         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
568         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
569         (WebCore::DocumentNameCollection::elementMatches):
570         * html/HTMLObjectElement.cpp:
571         (WebCore::HTMLObjectElement::updateDocNamedItem):
572         (WebCore::HTMLObjectElement::containsJavaApplet):
573         * html/HTMLOptGroupElement.cpp:
574         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
575         (WebCore::HTMLOptGroupElement::ownerSelectElement):
576         * html/HTMLOptionElement.cpp:
577         (WebCore::HTMLOptionElement::ownerDataListElement):
578         (WebCore::HTMLOptionElement::ownerSelectElement):
579         * html/HTMLOptionsCollection.cpp:
580         (WebCore::HTMLOptionsCollection::add):
581         * html/HTMLOptionsCollection.h:
582         * html/HTMLPlugInImageElement.cpp:
583         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
584         * html/HTMLSelectElement.cpp:
585         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
586         (WebCore::HTMLSelectElement::value):
587         (WebCore::HTMLSelectElement::setValue):
588         (WebCore::HTMLSelectElement::saveLastSelection):
589         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
590         (WebCore::HTMLSelectElement::updateListBoxSelection):
591         (WebCore::HTMLSelectElement::listBoxOnChange):
592         (WebCore::HTMLSelectElement::recalcListItems):
593         (WebCore::HTMLSelectElement::selectedIndex):
594         (WebCore::HTMLSelectElement::selectOption):
595         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
596         (WebCore::HTMLSelectElement::saveFormControlState):
597         (WebCore::HTMLSelectElement::searchOptionsForValue):
598         (WebCore::HTMLSelectElement::restoreFormControlState):
599         (WebCore::HTMLSelectElement::appendFormData):
600         (WebCore::HTMLSelectElement::reset):
601         (WebCore::HTMLSelectElement::updateSelectedState):
602         (WebCore::HTMLSelectElement::lastSelectedListIndex):
603         (WebCore::HTMLSelectElement::optionAtIndex):
604         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
605         * html/HTMLSummaryElement.cpp:
606         (WebCore::HTMLSummaryElement::detailsElement):
607         * html/HTMLTableElement.cpp:
608         (WebCore::HTMLTableElement::caption):
609         * html/HTMLTablePartElement.cpp:
610         (WebCore::HTMLTablePartElement::findParentTable):
611         * html/HTMLTableRowElement.cpp:
612         (WebCore::HTMLTableRowElement::rowIndex):
613         * html/HTMLTableRowsCollection.cpp:
614         (WebCore::HTMLTableRowsCollection::rowAfter):
615         (WebCore::HTMLTableRowsCollection::lastRow):
616         (WebCore::HTMLTableRowsCollection::customElementAfter):
617         * html/HTMLTableRowsCollection.h:
618         * html/HTMLTemplateElement.cpp:
619         (WebCore::HTMLTemplateElement::cloneNode):
620         * html/HTMLTextFormControlElement.cpp:
621         (WebCore::enclosingTextFormControl):
622         * html/ImageDocument.cpp:
623         (WebCore::ImageDocument::createDocumentStructure):
624         * html/LabelsNodeList.cpp:
625         (WebCore::LabelsNodeList::elementMatches):
626         * html/MediaDocument.cpp:
627         (WebCore::MediaDocumentParser::createDocumentStructure):
628         (WebCore::descendentVideoElement):
629         (WebCore::ancestorVideoElement):
630         (WebCore::MediaDocument::replaceMediaElementTimerFired):
631         * html/PluginDocument.cpp:
632         (WebCore::PluginDocumentParser::createDocumentStructure):
633         * html/RadioInputType.cpp:
634         (WebCore::RadioInputType::handleKeydownEvent):
635         (WebCore::RadioInputType::isKeyboardFocusable):
636         * html/RadioNodeList.cpp:
637         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
638         * html/RangeInputType.cpp:
639         (WebCore::RangeInputType::updateTickMarkValues):
640         * html/parser/HTMLConstructionSite.cpp:
641         (WebCore::insert):
642         (WebCore::HTMLConstructionSite::insertTextNode):
643         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
644         * html/parser/HTMLTreeBuilder.cpp:
645         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
646         * html/shadow/DetailsMarkerControl.cpp:
647         (WebCore::DetailsMarkerControl::rendererIsNeeded):
648         * html/shadow/MediaControlElements.cpp:
649         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
650         * html/shadow/MeterShadowElement.cpp:
651         (WebCore::MeterShadowElement::meterElement):
652         * html/shadow/ProgressShadowElement.cpp:
653         (WebCore::ProgressShadowElement::progressElement):
654         * html/shadow/TextControlInnerElements.cpp:
655         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
656         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
657         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
658         * inspector/InspectorCSSAgent.cpp:
659         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
660         * inspector/InspectorDOMAgent.cpp:
661         (WebCore::InspectorDOMAgent::buildObjectForNode):
662         * loader/FormSubmission.cpp:
663         (WebCore::FormSubmission::create):
664         * loader/FrameLoader.cpp:
665         (WebCore::FrameLoader::handleFallbackContent):
666         * loader/ImageLoader.cpp:
667         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
668         * loader/SubframeLoader.cpp:
669         (WebCore::SubframeLoader::requestObject):
670         * page/Chrome.cpp:
671         (WebCore::Chrome::setToolTip):
672         * page/DragController.cpp:
673         (WebCore::DragController::draggableElement):
674         * page/EventHandler.cpp:
675         (WebCore::isSubmitImage):
676         * page/FocusController.cpp:
677         (WebCore::FocusController::advanceFocusDirectionally):
678         * page/FrameView.cpp:
679         (WebCore::FrameView::addEmbeddedObjectToUpdate):
680         (WebCore::FrameView::updateEmbeddedObject):
681         * page/PageSerializer.cpp:
682         (WebCore::PageSerializer::serializeFrame):
683         * page/SpatialNavigation.cpp:
684         (WebCore::FocusCandidate::FocusCandidate):
685         * page/ios/FrameIOS.mm:
686         (WebCore::ancestorRespondingToClickEvents):
687         * rendering/HitTestResult.cpp:
688         (WebCore::HitTestResult::altDisplayString):
689         (WebCore::HitTestResult::absolutePDFURL):
690         (WebCore::HitTestResult::enterFullscreenForVideo):
691         (WebCore::HitTestResult::mediaControlsEnabled):
692         (WebCore::HitTestResult::isLiveLink):
693         (WebCore::HitTestResult::isContentEditable):
694         * rendering/RenderButton.cpp:
695         (WebCore::RenderButton::updateFromElement):
696         * rendering/RenderCounter.cpp:
697         (WebCore::planCounter):
698         * rendering/RenderEmbeddedObject.cpp:
699         (WebCore::RenderEmbeddedObject::paintContents):
700         (WebCore::RenderEmbeddedObject::layout):
701         * rendering/RenderFieldset.h:
702         * rendering/RenderFileUploadControl.cpp:
703         (WebCore::RenderFileUploadControl::inputElement):
704         (WebCore::RenderFileUploadControl::uploadButton):
705         * rendering/RenderFrame.cpp:
706         (WebCore::RenderFrame::frameElement):
707         * rendering/RenderFrameSet.cpp:
708         (WebCore::RenderFrameSet::frameSetElement):
709         * rendering/RenderHTMLCanvas.cpp:
710         (WebCore::RenderHTMLCanvas::canvasElement):
711         * rendering/RenderIFrame.cpp:
712         (WebCore::RenderIFrame::iframeElement):
713         * rendering/RenderImage.cpp:
714         (WebCore::RenderImage::RenderImage):
715         (WebCore::RenderImage::paintAreaElementFocusRing):
716         (WebCore::RenderImage::paintIntoRect):
717         (WebCore::RenderImage::imageMap):
718         (WebCore::RenderImage::updateAltText):
719         * rendering/RenderLayerBacking.cpp:
720         (WebCore::canvasCompositingStrategy):
721         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
722         (WebCore::RenderLayerBacking::updateConfiguration):
723         * rendering/RenderLayerCompositor.cpp:
724         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
725         * rendering/RenderListBox.cpp:
726         (WebCore::RenderListBox::selectElement):
727         (WebCore::RenderListBox::updateFromElement):
728         (WebCore::RenderListBox::paintItemForeground):
729         (WebCore::RenderListBox::paintItemBackground):
730         * rendering/RenderListItem.cpp:
731         (WebCore::RenderListItem::calcValue):
732         (WebCore::RenderListItem::updateListMarkerNumbers):
733         * rendering/RenderMarquee.cpp:
734         (WebCore::RenderMarquee::marqueeSpeed):
735         * rendering/RenderMenuList.cpp:
736         (WebCore::selectedOptionCount):
737         (RenderMenuList::selectElement):
738         (RenderMenuList::updateOptionsWidth):
739         (RenderMenuList::setTextFromOption):
740         (RenderMenuList::itemText):
741         (RenderMenuList::itemIsSelected):
742         * rendering/RenderMeter.cpp:
743         (WebCore::RenderMeter::meterElement):
744         * rendering/RenderProgress.cpp:
745         (WebCore::RenderProgress::progressElement):
746         * rendering/RenderSlider.cpp:
747         (WebCore::RenderSlider::element):
748         * rendering/RenderSnapshottedPlugIn.cpp:
749         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
750         * rendering/RenderTextControl.cpp:
751         (WebCore::RenderTextControl::textFormControlElement):
752         * rendering/RenderTextControlMultiLine.cpp:
753         (WebCore::RenderTextControlMultiLine::textAreaElement):
754         * rendering/RenderTextControlSingleLine.cpp:
755         (WebCore::RenderTextControlSingleLine::inputElement):
756         * rendering/RenderTheme.cpp:
757         (WebCore::RenderTheme::paintSliderTicks):
758         * rendering/RenderThemeIOS.mm:
759         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
760         * rendering/RenderThemeMac.mm:
761         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
762         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
763         * rendering/RenderVideo.cpp:
764         (WebCore::RenderVideo::videoElement):
765         * svg/graphics/SVGImageCache.cpp:
766         (WebCore::SVGImageCache::imageForRenderer):
767         * svg/svgtags.in:
768         Generate helpers to SVGAElement so that isSVGAElement() can be used
769         instead of hasTagName(SVGNames::aTag). I did such update in this
770         patch.
771
772         * testing/Internals.cpp:
773         (WebCore::Internals::visiblePlaceholder):
774         (WebCore::Internals::wasLastChangeUserEdit):
775         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
776         (WebCore::Internals::isSelectPopupVisible):
777         * xml/parser/XMLDocumentParserLibxml2.cpp:
778         (WebCore::XMLDocumentParser::startElementNs):
779
780 2014-09-23  Chris Dumez  <cdumez@apple.com>
781
782         Have DataTransfer::files() return a reference
783         https://bugs.webkit.org/show_bug.cgi?id=137039
784
785         Reviewed by Ryosuke Niwa.
786
787         Have DataTransfer::files() return a reference instead of a pointer as
788         it can never return null.
789
790         No new tests, no behavior change.
791
792         * dom/DataTransfer.cpp:
793         (WebCore::DataTransfer::files):
794         * dom/DataTransfer.h:
795
796 2014-09-23  Chris Dumez  <cdumez@apple.com>
797
798         Have NamedNodeMap::element() and DOMStringMap::element() return a reference
799         https://bugs.webkit.org/show_bug.cgi?id=137040
800
801         Reviewed by Ryosuke Niwa.
802
803         Have NamedNodeMap::element() and DOMStringMap::element() return a
804         reference instead of a pointer as they can never return null.
805
806         No new tests, no behavior change.
807
808         * dom/DatasetDOMStringMap.h:
809         * dom/NamedNodeMap.h:
810         (WebCore::NamedNodeMap::element):
811
812 2014-09-23  Chris Dumez  <cdumez@apple.com>
813
814         Have DOMImplementation::document() and Element::attributes() return references
815         https://bugs.webkit.org/show_bug.cgi?id=137035
816
817         Reviewed by Andreas Kling.
818
819         Have DOMImplementation::document() and Element::attributes() return
820         references instead of pointers as they can never return null.
821
822         No new tests, no behavior change.
823
824         * bindings/scripts/CodeGeneratorJS.pm:
825         (GenerateImplementation):
826         Update the JS Bindings code generator to use WTF::getPtr() in a couple
827         more places so that the implementation can return references instead
828         of pointers even when [GenerateIsReachable=xxx] IDL extended attribute
829         is used.
830
831         * dom/DOMImplementation.h:
832         (WebCore::DOMImplementation::document):
833         * dom/Element.cpp:
834         (WebCore::Element::attributes):
835         * dom/Element.h:
836         (WebCore::Node::attributes):
837
838 2014-09-23  Chris Dumez  <cdumez@apple.com>
839
840         Have Document::ensureTemplateDocument() return a reference
841         https://bugs.webkit.org/show_bug.cgi?id=137033
842
843         Reviewed by Ryosuke Niwa.
844
845         Have Document::ensureTemplateDocument() return a reference instead of
846         a pointer as it can never return null.
847
848         No new tests, no behavior change.
849
850         * dom/Document.cpp:
851         (WebCore::Document::ensureTemplateDocument):
852         * dom/Document.h:
853         * editing/markup.cpp:
854         (WebCore::createFragmentForInnerOuterHTML):
855         * html/HTMLTemplateElement.cpp:
856         (WebCore::HTMLTemplateElement::content):
857         (WebCore::HTMLTemplateElement::didMoveToNewDocument):
858
859 2014-09-23  Chris Dumez  <cdumez@apple.com>
860
861         Have Document::accessSVGExtensions() return a reference
862         https://bugs.webkit.org/show_bug.cgi?id=137030
863
864         Reviewed by Ryosuke Niwa.
865
866         Have Document::accessSVGExtensions() return a reference instead of a
867         pointer as it can never return null.
868
869         No new tests, no behavior change.
870
871         * dom/ContainerNode.cpp:
872         (WebCore::ContainerNode::removeChild):
873         (WebCore::ContainerNode::removeChildren):
874         * dom/Document.cpp:
875         (WebCore::Document::commonTeardown):
876         (WebCore::Document::implicitClose):
877         (WebCore::Document::accessSVGExtensions):
878         * dom/Document.h:
879         * dom/Element.cpp:
880         (WebCore::Element::~Element):
881         (WebCore::Element::removedFrom):
882         * editing/markup.cpp:
883         (WebCore::isPlainTextMarkup):
884         * history/CachedFrame.cpp:
885         (WebCore::CachedFrameBase::restore):
886         * rendering/FilterEffectRenderer.cpp:
887         (WebCore::FilterEffectRenderer::buildReferenceFilter):
888         * rendering/svg/RenderSVGResource.cpp:
889         (WebCore::removeFromCacheAndInvalidateDependencies):
890         * rendering/svg/RenderSVGResourceContainer.cpp:
891         (WebCore::svgExtensionsFromElement):
892         * rendering/svg/RenderSVGResourceContainer.h:
893         (WebCore::getRenderSVGResourceContainerById):
894         (WebCore::getRenderSVGResourceById):
895         * rendering/svg/SVGResources.cpp:
896         (WebCore::registerPendingResource):
897         (WebCore::SVGResources::buildCachedResources):
898         * rendering/svg/SVGResourcesCache.cpp:
899         (WebCore::resourcesCacheFromRenderer):
900         (WebCore::SVGResourcesCache::resourceDestroyed):
901         * svg/SVGElement.cpp:
902         (WebCore::SVGElement::~SVGElement):
903         (WebCore::SVGElement::reportAttributeParsingError):
904         (WebCore::SVGElement::removedFrom):
905         (WebCore::SVGElement::viewportElement):
906         (WebCore::SVGElement::attributeChanged):
907         (WebCore::SVGElement::buildPendingResourcesIfNeeded):
908         (WebCore::SVGElement::accessDocumentSVGExtensions): Deleted.
909         * svg/SVGElement.h:
910         * svg/SVGFEConvolveMatrixElement.cpp:
911         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
912         * svg/SVGFEGaussianBlurElement.cpp:
913         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
914         * svg/SVGFEImageElement.cpp:
915         (WebCore::SVGFEImageElement::clearResourceReferences):
916         (WebCore::SVGFEImageElement::buildPendingResource):
917         * svg/SVGFitToViewBox.cpp:
918         (WebCore::SVGFitToViewBox::parseViewBox):
919         * svg/SVGFontFaceElement.cpp:
920         (WebCore::SVGFontFaceElement::insertedInto):
921         (WebCore::SVGFontFaceElement::removedFrom):
922         * svg/SVGMPathElement.cpp:
923         (WebCore::SVGMPathElement::buildPendingResource):
924         (WebCore::SVGMPathElement::clearResourceReferences):
925         * svg/SVGPathElement.cpp:
926         (WebCore::SVGPathElement::parseAttribute):
927         (WebCore::SVGPathElement::invalidateMPathDependencies):
928         * svg/SVGPolyElement.cpp:
929         (WebCore::SVGPolyElement::parseAttribute):
930         * svg/SVGSVGElement.cpp:
931         (WebCore::SVGSVGElement::~SVGSVGElement):
932         (WebCore::SVGSVGElement::insertedInto):
933         (WebCore::SVGSVGElement::removedFrom):
934         * svg/SVGTRefElement.cpp:
935         (WebCore::SVGTRefElement::detachTarget):
936         (WebCore::SVGTRefElement::buildPendingResource):
937         * svg/SVGTextPathElement.cpp:
938         (WebCore::SVGTextPathElement::clearResourceReferences):
939         (WebCore::SVGTextPathElement::buildPendingResource):
940         * svg/SVGUseElement.cpp:
941         (WebCore::SVGUseElement::clearResourceReferences):
942         (WebCore::SVGUseElement::buildPendingResource):
943         (WebCore::SVGUseElement::toClipPath):
944         (WebCore::SVGUseElement::buildInstanceTree):
945         * svg/animation/SVGSMILElement.cpp:
946         (WebCore::SVGSMILElement::clearResourceReferences):
947         (WebCore::SVGSMILElement::buildPendingResource):
948
949 2014-09-23  Joseph Pecoraro  <pecoraro@apple.com>
950
951         Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
952         https://bugs.webkit.org/show_bug.cgi?id=136893
953
954         Reviewed by Timothy Hatcher.
955
956         Automatic inspection is currently disabled for web pages.
957         This just updates the interfaces that changed.
958
959         * WebCore.exp.in:
960         * inspector/InspectorController.cpp:
961         (WebCore::InspectorController::connectFrontend):
962         (WebCore::InspectorController::show):
963         * inspector/InspectorController.h:
964         * page/PageDebuggable.cpp:
965         (WebCore::PageDebuggable::connect):
966         * page/PageDebuggable.h:
967         * testing/Internals.cpp:
968         (WebCore::Internals::openDummyInspectorFrontend):
969
970 2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>
971
972         [GTK] Adds implementation of subtle crypto HMAC algorithm
973         https://bugs.webkit.org/show_bug.cgi?id=133320
974
975         Reviewed by Philippe Normand.
976
977         Tests are already in place under crypto/subtle/hmac-*.html
978
979         * crypto/gtk/CryptoAlgorithmHMACGtk.cpp:
980         (WebCore::getGnutlsDigestAlgorithm):
981         (WebCore::calculateSignature):
982         (WebCore::CryptoAlgorithmHMAC::platformSign):
983         (WebCore::CryptoAlgorithmHMAC::platformVerify):
984
985 2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>
986
987         [GTK] Adds implementation of Subtle Crypto digest algorithms
988         https://bugs.webkit.org/show_bug.cgi?id=133319
989
990         Reviewed by Philippe Normand.
991
992         Tests are already in place under crypto/subtle/sha-*.html
993
994         * crypto/gtk/CryptoDigestGtk.cpp:
995         (WebCore::CryptoDigest::CryptoDigest):
996         (WebCore::CryptoDigest::~CryptoDigest):
997         (WebCore::CryptoDigest::create):
998         (WebCore::CryptoDigest::addBytes):
999         (WebCore::CryptoDigest::computeHash):
1000
1001 2014-09-15  Sergio Villar Senin  <svillar@igalia.com>
1002
1003         [CSS Grid Layout] Do not grow tracks when the growth factor is 0
1004         https://bugs.webkit.org/show_bug.cgi?id=136575
1005
1006         Reviewed by Darin Adler.
1007
1008         A couple of performance optimizations for the track sizing
1009         algorithm. On the one hand we avoid the computation of the
1010         available logical space share if the track has no growth potential
1011         (the current breadth is the maximum breadth) and on the other
1012         hand, we avoid calling RenderGrid::distributeSpaceToTracks() if
1013         the available logical space is not greater than 0.
1014
1015         The combined effect of these two changes is an impressive +16%
1016         improvement in auto-grid-lots-of-data.html performance test.
1017
1018         No new tests as there is no change in the functionality.
1019
1020         * rendering/RenderGrid.cpp:
1021         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1022         (WebCore::RenderGrid::distributeSpaceToTracks):
1023
1024 2014-09-23  Ion Rosca  <rosca@adobe.com>
1025
1026         [CSS Blending] The composited layers isolated by the page group should blend with the default white background color.
1027         https://bugs.webkit.org/show_bug.cgi?id=136563
1028
1029         Reviewed by Simon Fraser.
1030
1031         If a blending layer is not isolated, then it should blend with a white backdrop:
1032         http://dev.w3.org/fxtf/compositing-1/#pagebackdrop
1033
1034         Tests: css3/blending/blend-mode-body-composited-child-background-color.html
1035                css3/blending/blend-mode-body-composited-child.html
1036
1037         * rendering/RenderLayerBacking.cpp:
1038         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1039         If the isolating composited layer is the root renderer, then it should have a backing store
1040         into which the initial white backdrop will be painted.
1041
1042 2014-09-22  Christophe Dumez  <cdumez@apple.com>
1043
1044         Unreviewed build fix after r173859.
1045
1046         Partial revert to fix debug build after r173859.
1047
1048         * accessibility/AccessibilityRenderObject.cpp:
1049         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1050         * html/HTMLFrameOwnerElement.cpp:
1051         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
1052         * page/EventHandler.cpp:
1053         (WebCore::EventHandler::handleMousePressEvent):
1054         (WebCore::EventHandler::handleMouseMoveEvent):
1055         (WebCore::EventHandler::handleMouseReleaseEvent):
1056         * page/Frame.cpp:
1057         (WebCore::Frame::setPageAndTextZoomFactors):
1058         * page/FrameView.cpp:
1059         (WebCore::FrameView::scrollToAnchor):
1060         * rendering/svg/RenderSVGBlock.h:
1061         (WebCore::RenderSVGBlock::graphicsElement):
1062         * rendering/svg/RenderSVGGradientStop.cpp:
1063         (WebCore::RenderSVGGradientStop::gradientElement):
1064         * rendering/svg/RenderSVGInline.h:
1065         (WebCore::RenderSVGInline::graphicsElement):
1066         * rendering/svg/RenderSVGResourceClipper.cpp:
1067         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1068         * rendering/svg/RenderSVGResourceContainer.cpp:
1069         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
1070         * rendering/svg/RenderSVGShape.h:
1071         (WebCore::RenderSVGShape::graphicsElement):
1072         * rendering/svg/RenderSVGTransformableContainer.h:
1073         * rendering/svg/SVGRenderSupport.cpp:
1074         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
1075         * rendering/svg/SVGRenderTreeAsText.cpp:
1076         (WebCore::operator<<):
1077         * rendering/svg/SVGRenderingContext.cpp:
1078         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1079         * rendering/svg/SVGResources.cpp:
1080         (WebCore::targetReferenceFromResource):
1081         * svg/SVGAElement.cpp:
1082         (WebCore::SVGAElement::defaultEventHandler):
1083         * svg/SVGAnimateElement.cpp:
1084         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1085         * svg/SVGAnimationElement.cpp:
1086         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1087         * svg/SVGElement.cpp:
1088         (WebCore::SVGElement::getBoundingBox):
1089         * svg/SVGLinearGradientElement.cpp:
1090         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
1091         * svg/SVGLocatable.cpp:
1092         (WebCore::SVGLocatable::getTransformToElement):
1093         * svg/SVGPolyElement.cpp:
1094         (WebCore::SVGPolyElement::synchronizePoints):
1095         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
1096         * svg/SVGRadialGradientElement.cpp:
1097         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
1098         * svg/SVGTextContentElement.cpp:
1099         (WebCore::SVGTextContentElement::synchronizeTextLength):
1100         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
1101         (WebCore::SVGTextContentElement::elementFromRenderer):
1102         * svg/SVGUseElement.cpp:
1103         (WebCore::SVGUseElement::toClipPath):
1104         * svg/animation/SVGSMILElement.cpp:
1105         (WebCore::SVGSMILElement::connectConditions):
1106         (WebCore::SVGSMILElement::disconnectConditions):
1107         * svg/graphics/SVGImage.cpp:
1108         (WebCore::SVGImage::hasSingleSecurityOrigin):
1109         (WebCore::SVGImage::setContainerSize):
1110         (WebCore::SVGImage::containerSize):
1111         (WebCore::SVGImage::embeddedContentBox):
1112         (WebCore::SVGImage::hasRelativeWidth):
1113         (WebCore::SVGImage::hasRelativeHeight):
1114         (WebCore::SVGImage::computeIntrinsicDimensions):
1115         (WebCore::SVGImage::startAnimation):
1116         (WebCore::SVGImage::stopAnimation):
1117
1118 2014-09-22  Simon Fraser  <simon.fraser@apple.com>
1119
1120         Ensure that layout is up-to-date before hit-testing via RenderView
1121         https://bugs.webkit.org/show_bug.cgi?id=136651
1122
1123         Reviewed by David Hyatt.
1124
1125         Ensure that layout is up-to-date before we do hit-testing via the RenderView.
1126         Previously, RenderLayer::hitTest() called updateLayout(), but it's better
1127         to push that responsibility onto RenderView before entering the RenderLayer
1128         tree.
1129         
1130         Make callers a little more consistent in getting the RenderView via
1131         Frame::contentRenderer(), though perhaps we should remove that and just
1132         call Document::renderView() everywhere.
1133
1134         * accessibility/AccessibilityObject.cpp:
1135         (WebCore::AccessibilityObject::press): Hit test via the RenderView, rather
1136         than doing so on the RenderView's layer, to ensure that we updateLayout().
1137         * accessibility/AccessibilityRenderObject.cpp:
1138         (WebCore::AccessibilityRenderObject::accessibilityHitTest): This code calls
1139         hitTest() on arbitrary layers, so needs to explicitly update layout.
1140         * editing/FrameSelection.cpp:
1141         (WebCore::FrameSelection::contains):
1142         * page/EventHandler.cpp:
1143         (WebCore::EventHandler::eventMayStartDrag):
1144         (WebCore::EventHandler::updateSelectionForMouseDrag):
1145         (WebCore::EventHandler::hitTestResultAtPoint): The explicit updateLayout() is
1146         no longer needed.
1147         (WebCore::EventHandler::updateCursor):
1148         (WebCore::EventHandler::handleWheelEvent):
1149         (WebCore::EventHandler::hoverTimerFired):
1150         (WebCore::hitTestResultInFrame):
1151         * page/Frame.cpp:
1152         (WebCore::Frame::contentRenderer):
1153         * rendering/RenderLayer.cpp:
1154         (WebCore::RenderLayer::hitTest):
1155         * rendering/RenderView.cpp:
1156         (WebCore::RenderView::hitTest): Here's where we ensure that layout is up-to-date.
1157
1158 2014-09-22  Christophe Dumez  <cdumez@apple.com>
1159
1160         Use downcast<SVG*Element>() instead of toSVG*Element()
1161         https://bugs.webkit.org/show_bug.cgi?id=137004
1162
1163         Reviewed by Benjamin Poulain.
1164
1165         Use downcast<SVG*Element>() instead of toSVG*Element() for casting SVG
1166         Elements and get rid of the transition toSVG*Element() macros.
1167
1168         Also use downcast<MathML*Element>() instead of toMathML*Element() for
1169         casting MathML Elements.
1170
1171         The HTML Elements casting counterparts will be taken care of in a
1172         separate patch.
1173
1174         No new tests, no behavior change.
1175
1176         * accessibility/AccessibilityNodeObject.cpp:
1177         (WebCore::AccessibilityNodeObject::alternativeText):
1178         (WebCore::AccessibilityNodeObject::accessibilityDescription):
1179         * accessibility/AccessibilityRenderObject.cpp:
1180         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1181         * bindings/js/JSElementCustom.cpp:
1182         (WebCore::toJSNewlyCreated):
1183         * bindings/js/JSNodeCustom.cpp:
1184         (WebCore::createWrapperInline):
1185         * css/CSSComputedStyleDeclaration.cpp:
1186         (WebCore::ComputedStyleExtractor::propertyValue):
1187         * css/CSSCursorImageValue.cpp:
1188         (WebCore::resourceReferencedByCursorElement):
1189         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1190         * css/ElementRuleCollector.cpp:
1191         (WebCore::ElementRuleCollector::matchAllRules):
1192         * css/StyleResolver.cpp:
1193         (WebCore::StyleResolver::locateCousinList):
1194         (WebCore::StyleResolver::canShareStyleWithElement):
1195         (WebCore::StyleResolver::locateSharedStyle):
1196         * dom/DocumentStyleSheetCollection.cpp:
1197         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1198         * dom/Element.cpp:
1199         (WebCore::Element::synchronizeAllAttributes):
1200         (WebCore::Element::synchronizeAttribute):
1201         (WebCore::Element::boundsInRootViewSpace):
1202         (WebCore::Element::getBoundingClientRect):
1203         (WebCore::Element::childShouldCreateRenderer):
1204         (WebCore::Element::fastAttributeLookupAllowed):
1205         * dom/EventDispatcher.cpp:
1206         (WebCore::eventTargetRespectingTargetRules):
1207         * dom/ScriptElement.cpp:
1208         (WebCore::toScriptElementIfPossible):
1209         * dom/make_names.pl:
1210         (printTypeHelpers):
1211         * html/HTMLFrameOwnerElement.cpp:
1212         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
1213         * inspector/InspectorCSSAgent.cpp:
1214         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1215         * mathml/MathMLElement.cpp:
1216         (WebCore::MathMLElement::isPhrasingContent):
1217         (WebCore::MathMLElement::childShouldCreateRenderer):
1218         (WebCore::MathMLElement::attributeChanged):
1219         * mathml/MathMLElement.h:
1220         (WebCore::Node::hasTagName):
1221         * mathml/MathMLSelectElement.cpp:
1222         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
1223         * page/EventHandler.cpp:
1224         (WebCore::EventHandler::handleMousePressEvent):
1225         (WebCore::EventHandler::handleMouseMoveEvent):
1226         (WebCore::EventHandler::handleMouseReleaseEvent):
1227         (WebCore::instanceAssociatedWithShadowTreeElement):
1228         * page/Frame.cpp:
1229         (WebCore::Frame::setPageAndTextZoomFactors):
1230         * page/FrameView.cpp:
1231         (WebCore::FrameView::scrollToAnchor):
1232         * rendering/RenderTableCell.cpp:
1233         (WebCore::RenderTableCell::parseColSpanFromDOM):
1234         (WebCore::RenderTableCell::parseRowSpanFromDOM):
1235         (WebCore::RenderTableCell::computePreferredLogicalWidths):
1236         * rendering/mathml/RenderMathMLMenclose.cpp:
1237         (WebCore::RenderMathMLMenclose::addChild):
1238         (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
1239         (WebCore::RenderMathMLMenclose::updateLogicalHeight):
1240         (WebCore::RenderMathMLMenclose::paint):
1241         * rendering/svg/RenderSVGBlock.h:
1242         (WebCore::RenderSVGBlock::graphicsElement):
1243         * rendering/svg/RenderSVGForeignObject.cpp:
1244         (WebCore::RenderSVGForeignObject::foreignObjectElement):
1245         * rendering/svg/RenderSVGGradientStop.cpp:
1246         (WebCore::RenderSVGGradientStop::gradientElement):
1247         * rendering/svg/RenderSVGGradientStop.h:
1248         * rendering/svg/RenderSVGImage.cpp:
1249         (WebCore::RenderSVGImage::imageElement):
1250         * rendering/svg/RenderSVGInline.h:
1251         (WebCore::RenderSVGInline::graphicsElement):
1252         * rendering/svg/RenderSVGModelObject.cpp:
1253         (WebCore::getElementCTM):
1254         (WebCore::RenderSVGModelObject::checkIntersection):
1255         (WebCore::RenderSVGModelObject::checkEnclosure):
1256         * rendering/svg/RenderSVGModelObject.h:
1257         (WebCore::RenderSVGModelObject::element):
1258         * rendering/svg/RenderSVGRect.cpp:
1259         (WebCore::RenderSVGRect::rectElement):
1260         * rendering/svg/RenderSVGResource.cpp:
1261         (WebCore::removeFromCacheAndInvalidateDependencies):
1262         * rendering/svg/RenderSVGResourceClipper.cpp:
1263         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1264         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1265         * rendering/svg/RenderSVGResourceClipper.h:
1266         * rendering/svg/RenderSVGResourceContainer.cpp:
1267         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
1268         * rendering/svg/RenderSVGResourceFilter.h:
1269         * rendering/svg/RenderSVGResourceLinearGradient.h:
1270         * rendering/svg/RenderSVGResourceMarker.h:
1271         * rendering/svg/RenderSVGResourceMasker.h:
1272         * rendering/svg/RenderSVGResourcePattern.cpp:
1273         (WebCore::RenderSVGResourcePattern::patternElement):
1274         * rendering/svg/RenderSVGResourceRadialGradient.h:
1275         * rendering/svg/RenderSVGRoot.cpp:
1276         (WebCore::RenderSVGRoot::svgSVGElement):
1277         * rendering/svg/RenderSVGShape.h:
1278         (WebCore::RenderSVGShape::graphicsElement):
1279         * rendering/svg/RenderSVGText.cpp:
1280         (WebCore::RenderSVGText::textElement):
1281         * rendering/svg/RenderSVGTextPath.cpp:
1282         (WebCore::RenderSVGTextPath::textPathElement):
1283         (WebCore::RenderSVGTextPath::layoutPath):
1284         * rendering/svg/RenderSVGTransformableContainer.cpp:
1285         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
1286         * rendering/svg/RenderSVGTransformableContainer.h:
1287         * rendering/svg/RenderSVGViewportContainer.cpp:
1288         (WebCore::RenderSVGViewportContainer::svgSVGElement):
1289         * rendering/svg/SVGPathData.cpp:
1290         (WebCore::updatePathFromLineElement):
1291         (WebCore::updatePathFromPathElement):
1292         (WebCore::updatePathFromPolygonElement):
1293         (WebCore::updatePathFromPolylineElement):
1294         * rendering/svg/SVGRenderSupport.cpp:
1295         (WebCore::SVGRenderSupport::layoutChildren):
1296         (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
1297         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
1298         * rendering/svg/SVGRenderTreeAsText.cpp:
1299         (WebCore::operator<<):
1300         * rendering/svg/SVGRenderingContext.cpp:
1301         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1302         * rendering/svg/SVGResources.cpp:
1303         (WebCore::targetReferenceFromResource):
1304         (WebCore::SVGResources::buildCachedResources):
1305         * rendering/svg/SVGTextLayoutEngine.cpp:
1306         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
1307         * svg/SVGAElement.cpp:
1308         (WebCore::SVGAElement::createElementRenderer):
1309         (WebCore::SVGAElement::defaultEventHandler):
1310         * svg/SVGAltGlyphDefElement.cpp:
1311         (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
1312         * svg/SVGAltGlyphElement.cpp:
1313         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
1314         * svg/SVGAnimateElement.cpp:
1315         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1316         * svg/SVGAnimatedTransformList.cpp:
1317         (WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator):
1318         * svg/SVGAnimationElement.cpp:
1319         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1320         (WebCore::SVGAnimationElement::adjustForInheritance):
1321         * svg/SVGDocument.cpp:
1322         (WebCore::SVGDocument::rootElement):
1323         * svg/SVGElement.cpp:
1324         (WebCore::SVGElement::ownerSVGElement):
1325         (WebCore::SVGElement::viewportElement):
1326         (WebCore::SVGElement::getBoundingBox):
1327         (WebCore::SVGElement::childShouldCreateRenderer):
1328         (WebCore::SVGElement::title):
1329         (WebCore::SVGElement::updateRelativeLengthsInformation):
1330         * svg/SVGElement.h:
1331         (WebCore::Node::hasTagName):
1332         * svg/SVGFEComponentTransferElement.cpp:
1333         (WebCore::SVGFEComponentTransferElement::build):
1334         * svg/SVGFEImageElement.cpp:
1335         (WebCore::SVGFEImageElement::buildPendingResource):
1336         * svg/SVGFilterElement.cpp:
1337         (WebCore::SVGFilterElement::childShouldCreateRenderer):
1338         * svg/SVGFilterPrimitiveStandardAttributes.h:
1339         (WebCore::isSVGFilterPrimitiveStandardAttributes):
1340         * svg/SVGFontData.cpp:
1341         (WebCore::SVGFontData::applySVGGlyphSelection):
1342         * svg/SVGFontElement.cpp:
1343         (WebCore::SVGFontElement::ensureGlyphCache):
1344         * svg/SVGFontFaceElement.cpp:
1345         (WebCore::SVGFontFaceElement::rebuildFontFace):
1346         * svg/SVGFontFaceFormatElement.cpp:
1347         (WebCore::SVGFontFaceFormatElement::childrenChanged):
1348         * svg/SVGFontFaceSrcElement.cpp:
1349         (WebCore::SVGFontFaceSrcElement::srcValue):
1350         (WebCore::SVGFontFaceSrcElement::childrenChanged):
1351         * svg/SVGFontFaceUriElement.cpp:
1352         (WebCore::SVGFontFaceUriElement::childrenChanged):
1353         * svg/SVGGlyphElement.cpp:
1354         (WebCore::SVGGlyphElement::invalidateGlyphCache):
1355         * svg/SVGGraphicsElement.h:
1356         (WebCore::isSVGGraphicsElement):
1357         * svg/SVGHKernElement.cpp:
1358         (WebCore::SVGHKernElement::insertedInto):
1359         (WebCore::SVGHKernElement::removedFrom):
1360         * svg/SVGImageLoader.cpp:
1361         (WebCore::SVGImageLoader::dispatchLoadEvent):
1362         * svg/SVGLengthContext.cpp:
1363         (WebCore::SVGLengthContext::determineViewport):
1364         * svg/SVGLinearGradientElement.cpp:
1365         (WebCore::setGradientAttributes):
1366         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
1367         * svg/SVGLocatable.cpp:
1368         (WebCore::SVGLocatable::nearestViewportElement):
1369         (WebCore::SVGLocatable::farthestViewportElement):
1370         (WebCore::SVGLocatable::computeCTM):
1371         (WebCore::SVGLocatable::getTransformToElement):
1372         * svg/SVGMPathElement.cpp:
1373         (WebCore::SVGMPathElement::buildPendingResource):
1374         (WebCore::SVGMPathElement::pathElement):
1375         (WebCore::SVGMPathElement::notifyParentOfPathChange):
1376         * svg/SVGMarkerElement.cpp:
1377         (WebCore::SVGMarkerElement::synchronizeOrientType):
1378         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
1379         * svg/SVGPathElement.cpp:
1380         (WebCore::SVGPathElement::invalidateMPathDependencies):
1381         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1382         (WebCore::SVGPathElement::synchronizeD):
1383         * svg/SVGPathSegList.cpp:
1384         (WebCore::SVGPathSegList::commitChange):
1385         * svg/SVGPatternElement.cpp:
1386         (WebCore::SVGPatternElement::collectPatternAttributes):
1387         * svg/SVGPolyElement.cpp:
1388         (WebCore::SVGPolyElement::synchronizePoints):
1389         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
1390         * svg/SVGRadialGradientElement.cpp:
1391         (WebCore::setGradientAttributes):
1392         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
1393         * svg/SVGSVGElement.cpp:
1394         (WebCore::SVGSVGElement::setupInitialView):
1395         * svg/SVGTextContentElement.cpp:
1396         (WebCore::SVGTextContentElement::synchronizeTextLength):
1397         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
1398         (WebCore::SVGTextContentElement::elementFromRenderer):
1399         * svg/SVGTextContentElement.h:
1400         (WebCore::isSVGTextContentElement):
1401         * svg/SVGTextPathElement.cpp:
1402         (WebCore::SVGTextPathElement::buildPendingResource):
1403         * svg/SVGUseElement.cpp:
1404         (WebCore::dumpInstanceTree):
1405         (WebCore::SVGUseElement::buildPendingResource):
1406         (WebCore::SVGUseElement::toClipPath):
1407         (WebCore::SVGUseElement::buildInstanceTree):
1408         (WebCore::SVGUseElement::hasCycleUseReferencing):
1409         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1410         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
1411         * svg/SVGVKernElement.cpp:
1412         (WebCore::SVGVKernElement::insertedInto):
1413         (WebCore::SVGVKernElement::removedFrom):
1414         * svg/SVGViewSpec.cpp:
1415         (WebCore::SVGViewSpec::viewTarget):
1416         * svg/animation/SVGSMILElement.cpp:
1417         (WebCore::SVGSMILElement::buildPendingResource):
1418         (WebCore::SVGSMILElement::connectConditions):
1419         (WebCore::SVGSMILElement::disconnectConditions):
1420         * svg/animation/SVGSMILElement.h:
1421         (WebCore::isSVGSMILElement):
1422         * svg/graphics/SVGImage.cpp:
1423         (WebCore::SVGImage::hasSingleSecurityOrigin):
1424         (WebCore::SVGImage::setContainerSize):
1425         (WebCore::SVGImage::containerSize):
1426         (WebCore::SVGImage::embeddedContentBox):
1427         (WebCore::SVGImage::hasRelativeWidth):
1428         (WebCore::SVGImage::hasRelativeHeight):
1429         (WebCore::SVGImage::computeIntrinsicDimensions):
1430         (WebCore::SVGImage::startAnimation):
1431         (WebCore::SVGImage::stopAnimation):
1432         * svg/graphics/filters/SVGFEImage.cpp:
1433         (WebCore::FEImage::platformApplySoftware):
1434         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1435         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
1436         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
1437         (WebCore::SVGPathSegListPropertyTearOff::contextElement):
1438
1439 2014-09-22  Pratik Solanki  <psolanki@apple.com>
1440
1441         Follow on fix for [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
1442         https://bugs.webkit.org/show_bug.cgi?id=136962
1443
1444         Rubber-stamped by Simon Fraser.
1445
1446         Remove the const per review comment. It is not needed.
1447
1448         * loader/cocoa/DiskCacheMonitorCocoa.mm:
1449         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
1450
1451 2014-09-22  Simon Fraser  <simon.fraser@apple.com>
1452
1453         Move nodeFromPoint() back to Document where it belongs
1454         https://bugs.webkit.org/show_bug.cgi?id=137012
1455
1456         Reviewed by Zalan Bujtas.
1457
1458         nodeFromPoint() was moved into TreeScope for ShadowDOM work, but now we can move
1459         it back to its logical place.
1460         
1461         Make versions of elementFromPoint and caretRangeFromPoint that take LayoutPoints,
1462         and change the current scale/offset code to be in layout units (which results
1463         in a small behavior change).
1464         
1465         elementFromPoint(int, int) and caretRangeFromPoint(int, int) are still required
1466         for bindings code.
1467
1468         * dom/Document.cpp:
1469         (WebCore::Document::nodeFromPoint):
1470         (WebCore::Document::elementFromPoint):
1471         (WebCore::Document::caretRangeFromPoint):
1472         * dom/Document.h:
1473         (WebCore::Document::elementFromPoint): Move logic from TreeScope::elementFromPoint()
1474         here.
1475         * dom/TreeScope.cpp:
1476         (WebCore::nodeFromPoint): Deleted.
1477         (WebCore::TreeScope::elementFromPoint): Deleted.
1478         * dom/TreeScope.h:
1479
1480 2014-09-22  Benjamin Poulain  <bpoulain@apple.com>
1481
1482         Add the baseline implementation of :nth-child(An+B of selector-list)
1483         https://bugs.webkit.org/show_bug.cgi?id=136975
1484
1485         Reviewed by Darin Adler.
1486
1487         Tests: fast/css/nth-child-of-classname.html
1488                fast/css/nth-child-of-complex-selector.html
1489                fast/css/nth-child-of-compound-selector.html
1490                fast/css/nth-child-of-tagname.html
1491                fast/selectors/nth-child-of-basics.html
1492                fast/selectors/nth-child-of-class-style-update.html
1493                fast/selectors/nth-child-of-complex-selectors.html
1494                fast/selectors/nth-child-of-selector-list.html
1495
1496         * css/SelectorChecker.cpp:
1497         (WebCore::SelectorChecker::checkOne):
1498         Pretty basic:
1499         -Go over the previous siblings.
1500         -For each sibling, test the selector list. If it matches, increase the count.
1501
1502         * cssjit/SelectorCompiler.cpp:
1503         (WebCore::SelectorCompiler::addPseudoClassType):
1504         Skip any case of the new selector. This will be implemented separately.
1505
1506 2014-09-19  Myles C. Maxfield  <mmaxfield@apple.com>
1507
1508         Implement 'vhea', 'vmtx', and 'kern' tables in SVG -> OTF converter
1509         https://bugs.webkit.org/show_bug.cgi?id=136971
1510
1511         Reviewed by Darin Adler.
1512
1513         This patch fills in the tables related to vertical metrics and kerning. The vertical metrics tables are
1514         fairly straightforward. On the other hand, the 'kern' table has subtables which can be in a variety
1515         of formats; however, according to Microsoft, Windows only allows one particular format, which doesn't
1516         allow for ranges of glyphs to be described and therefore might lead to a large 'kern' table size. In
1517         the interest of platform agnosticism I have implemented this particular format, and have not actually
1518         witnessed any extremely large 'kern' tables in any of the fonts that I have looked at.
1519
1520         I also added basic support for the horiz-origin-x and horiz-origin-y SVG properties, though support
1521         might not be perfect based on my testing.
1522
1523         Regarding testing, after this patch, almost all of our SVG fonts tests pass (barring tiny rebaselining;
1524         the platform font system calculates slightly different advances than we did. These differences are tiny
1525         and expected from such a dramatic shift in text handling engines.) There are around two dozen failing
1526         tests left that look like they are actually indiciative of code problems.
1527
1528         * svg/SVGFontElement.cpp:
1529         (WebCore::SVGFontElement::ensureGlyphCache): Refactor to accept new signature of
1530         SVG*KernElement::build*KerningPair().
1531         * svg/SVGHKernElement.cpp:
1532         (WebCore::SVGHKernElement::buildHorizontalKerningPair): Refactor to allow for intermediate data to be
1533         returned, which the SVG -> OTF font converter can use.
1534         * svg/SVGHKernElement.h: New signature for buildHorizontalKerningPair().
1535         * svg/SVGToOTFFontConversion.cpp:
1536         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Save the glyph's vertical advance along with
1537         the glyph's horizontal advance.
1538         (WebCore::SVGToOTFFontConverter::KerningData::KerningData): This data represents a record in one of
1539         the two 'kern' subtables, and as such needs to be sorted.
1540         (WebCore::SVGToOTFFontConverter::KerningData::operator<): Sort comparator.
1541         (WebCore::SVGToOTFFontConverter::appendHEADTable): Save the unitsPerEm locally to save a conditional.
1542         (WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto.
1543         (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto. Also use the horizontal advance as opposed to
1544         the vertical advance.
1545         (WebCore::SVGToOTFFontConverter::appendOS2Table): Save the unitsPerEm locally to save a conditional.
1546         Also if the average advance isn't found in the font, use the missing glyph's advance. If there is no
1547         missing glyph, bail and use the unitsPerEm.
1548         (WebCore::SVGToOTFFontConverter::appendVORGTable): If the default vertical origin isn't found in the
1549         font, use the missing glyphs's vertical origin. If there is no missing glyph, bail and use 0.
1550         (WebCore::SVGToOTFFontConverter::appendVHEATable): Parallel of 'hhea' table, except for vertical info.
1551         (WebCore::SVGToOTFFontConverter::appendVMTXTable): Parallel of 'hmtx' table, except for vertical info.
1552         (WebCore::SVGToOTFFontConverter::appendKerningHelperFields): Computes and appends 4 fields that font
1553         parsers need in order to do a binary search on the kern records.
1554         (WebCore::SVGToOTFFontConverter::addCodepointRanges): For each codepoint in the ranges, look up its
1555         representative glyph and append it to a set.
1556         (WebCore::SVGToOTFFontConverter::addCodepoints): For each codepoint in the range, look up its
1557         representative glyph and append it to a set.
1558         (WebCore::SVGToOTFFontConverter::addGlyphNames): For each glyph name, look up its representative glyph
1559         and append it to a set.
1560         (WebCore::SVGToOTFFontConverter::computeKerningData): Call SVG*KernElement::build*KerningPair() and
1561         iterate through all the data it returned, building up records into a Vector.
1562         (WebCore::SVGToOTFFontConverter::appendKERNTable): Go through the vector that computeKerningData()
1563         returned and actually write out the two subtables. One is for horizontal kerning and the other is for
1564         vertical kerning.
1565         (WebCore::CFFBuilder::CFFBuilder): Use the position of the glyph origin to perform the initial moveto
1566         command.
1567         (WebCore::transcodeGlyphPaths): Get the glyph's origin and pass it to the CFFBuilder.
1568         (WebCore::SVGToOTFFontConverter::appendGlyphData): Templated overloading so that the missing glyph
1569         gets a null SVGGlyphElement pointer but the rest of the glyphs get a non-null one.
1570         (WebCore::SVGToOTFFontConverter::processGlyphElement): Called on both SVGGlyphElements and
1571         SVGMissingGlyphElements, this pulls out information from the element and computs its path information.
1572         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Use the new templated version of
1573         processGlyphElement so we can get the same glyph parsing behavior on SVGMissingGlyphElements. In
1574         addition, populate two maps for the kerning table creation function to use.
1575         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Append new tables.
1576         * svg/SVGVKernElement.cpp:
1577         (WebCore::SVGVKernElement::buildVerticalKerningPair): Refactor to allow for intermediate data to be
1578         returned, which the SVG -> OTF font converter can use.
1579         * svg/SVGVKernElement.h: New signature for buildVerticalKerningPair().
1580
1581 2014-09-22  Alexey Proskuryakov  <ap@apple.com>
1582
1583         WebSocket crash when a connection is closed from server side
1584         https://bugs.webkit.org/show_bug.cgi?id=137009
1585         rdar://problem/18333977
1586         rdar://problem/12708225
1587
1588         Reviewed by Brady Eidson.
1589
1590         I don't think that this can be tested with our test server.
1591
1592         * Modules/websockets/WebSocketChannel.cpp:
1593         (WebCore::WebSocketChannel::WebSocketChannel): Added logging.
1594         (WebCore::WebSocketChannel::~WebSocketChannel): Ditto.
1595         (WebCore::WebSocketChannel::close): Protect self, because startClosingHandshake
1596         can release the last reference.
1597         (WebCore::WebSocketChannel::fail): Added an assertion that the channel is always
1598         closed after this function.
1599         (WebCore::WebSocketChannel::startClosingHandshake): Protect self, and don't change
1600         the stack from closed back to closing if after failing to send closing handshake.
1601         (WebCore::WebSocketChannel::processOutgoingFrameQueue): Protect self.
1602
1603 2014-09-22  David Hyatt  <hyatt@apple.com>
1604
1605         Bad cast in isValidColumnSpanner.
1606         https://bugs.webkit.org/show_bug.cgi?id=133380.
1607
1608         Reviewed by Simon Fraser.
1609
1610         Added fast/multicol/multicol-crazy-nesting.html
1611
1612         * rendering/RenderMultiColumnFlowThread.cpp:
1613         (WebCore::isValidColumnSpanner):
1614         The crawl up the chain looking for unsplittable objects should use containing blocks
1615         and not be casting to parent boxes. You can have an inline in the parent chain, so
1616         this was not the right way to walk up the tree.
1617
1618 2014-09-22  David Hyatt  <hyatt@apple.com>
1619
1620         ASSERT in RenderMultiColumnSet::requiresBalancing.
1621         https://bugs.webkit.org/show_bug.cgi?id=136376.
1622
1623         Reviewed by David Kilzer.
1624
1625         Added fast/multicol/multicol-selection.html.
1626
1627         * rendering/RenderMultiColumnFlowThread.cpp:
1628         (WebCore::isValidColumnSpanner):
1629         Don't allow an object to become a spanner if it does not have the flow
1630         thread as its containing block. Otherwise the flow thread won't get notified
1631         of spanner placeholder insertions, and so the spanner ends up orphaned.
1632
1633 2014-09-19  Brent Fulgham  <bfulgham@apple.com>
1634
1635         [Win] Implement cap height in SimpleFontDataWin to enable initial-letter support for Windows.
1636         https://bugs.webkit.org/show_bug.cgi?id=136841
1637
1638         Reviewed by David Hyatt.
1639
1640         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1641         (WebCore::SimpleFontData::platformInit): Add missing calls to set up our fonts.
1642
1643 2014-09-22  Eric Carlson  <eric.carlson@apple.com>
1644
1645         Update HTMLMediaElement logging
1646         https://bugs.webkit.org/show_bug.cgi?id=136991
1647
1648         Reviewed by Alexey Proskuryakov.
1649
1650         No new tests, only logging was changed.
1651
1652         * html/HTMLMediaElement.cpp:
1653         (WebCore::HTMLMediaElement::HTMLMediaElement):
1654         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1655         (WebCore::HTMLMediaElement::parseAttribute):
1656
1657 2014-09-22  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1658
1659         REGRESSION(r173631): It broke the !ENABLE(VIDEO) build
1660         https://bugs.webkit.org/show_bug.cgi?id=136946
1661
1662         Reviewed by Jer Noble.
1663
1664         No new tests required, no new functionality.
1665
1666         * page/DragController.cpp:
1667         (WebCore::DragController::startDrag):
1668
1669 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
1670
1671         [CSSRegions] Use nullptr in regions code
1672         https://bugs.webkit.org/show_bug.cgi?id=137001
1673
1674         Reviewed by Andrei Bucur.
1675
1676         No new tests as no new functionality is introduced.
1677
1678         * dom/DOMNamedFlowCollection.cpp:
1679         (WebCore::DOMNamedFlowCollection::item):
1680         (WebCore::DOMNamedFlowCollection::namedItem):
1681         * dom/NamedFlowCollection.cpp:
1682         (WebCore::NamedFlowCollection::flowByName):
1683         * dom/WebKitNamedFlow.cpp:
1684         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1685         * rendering/RenderFlowThread.cpp:
1686         (WebCore::RenderFlowThread::getLayerListForRegion):
1687         (WebCore::RenderFlowThread::regionForCompositedLayer):
1688         (WebCore::RenderFlowThread::regionAtBlockOffset):
1689         (WebCore::RenderFlowThread::mapFromFlowToRegion):
1690         (WebCore::RenderFlowThread::firstRegion):
1691         (WebCore::RenderFlowThread::lastRegion):
1692         (WebCore::RenderFlowThread::currentActiveRenderBox):
1693         * rendering/RenderNamedFlowThread.cpp:
1694         (WebCore::RenderNamedFlowThread::nextRendererForElement):
1695
1696 2014-09-17  Philippe Normand  <pnormand@igalia.com>
1697
1698         [GStreamer] Cannot play Vimeo video
1699         https://bugs.webkit.org/show_bug.cgi?id=134969
1700
1701         Reviewed by Sergio Villar Senin.
1702
1703         Ensure the GStreamer HTTP source element also sends cookies when
1704         it's sending its requests. Some streaming platforms such as Vimeo
1705         do server-side cookie checks on incoming requests before serving
1706         media data.
1707
1708         Test: http/tests/media/hls/video-cookie.html
1709
1710         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1711         (webKitWebSrcStart): Set first-party cookie URL to the request so
1712         the ResourceLoader properly sets cookies in the HTTP request.
1713
1714 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
1715
1716         Leverage RenderLayerBacking::renderer() instead of m_owningLayer.renderer()
1717         https://bugs.webkit.org/show_bug.cgi?id=136954
1718
1719         Reviewed by Darin Adler.
1720
1721         No new tests just refactoring.
1722
1723         * rendering/RenderLayerBacking.cpp:
1724         (WebCore::RenderLayerBacking::updateCompositedBounds):
1725         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
1726         (WebCore::RenderLayerBacking::paintIntoLayer):
1727
1728 2014-09-22  Mihnea Ovidenie  <mihnea@adobe.com>
1729
1730         [CSS Regions] Assertion failure and null dereference crash when using animations and regions
1731         https://bugs.webkit.org/show_bug.cgi?id=136918
1732
1733         Reviewed by Andrei Bucur.
1734
1735         In some situations, for instance when an image has an attached animation, the style change caused by the animation
1736         triggers a geometry update for the backing store associated with the image's layer. This may occur before
1737         the layout for the image has finished.
1738
1739         Moreover, if the image in such situation - having a composited layer - is displayed in a region,
1740         sicne the layout did not finish yet, the mappings between the layers of the elements collected in the named flow
1741         and the regions associated with the named flow are not updated and cannot be used.
1742
1743         Therefore in those situations, we have to bail out early and use these mappings only after the layout has finished.
1744
1745         This patch also changes RenderLayerBacking method updateAfterDescendents -> updateAfterDescendants.
1746
1747         Test: fast/regions/animated-image-in-region.html
1748
1749         * rendering/RenderFlowThread.cpp:
1750         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
1751         * rendering/RenderLayer.cpp:
1752         (WebCore::RenderLayer::calculateClipRects):
1753         * rendering/RenderLayerBacking.cpp:
1754         (WebCore::RenderLayerBacking::updateAfterDescendants):
1755         * rendering/RenderLayerBacking.h:
1756         * rendering/RenderLayerCompositor.cpp:
1757         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1758         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1759         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1760
1761 2014-09-21  Chris Dumez  <cdumez@apple.com>
1762
1763         Generate Element casting helper functions
1764         https://bugs.webkit.org/show_bug.cgi?id=136839
1765
1766         Reviewed by Darin Adler.
1767
1768         Generate Element casting helper functions instead of requiring explicit
1769         use of NODE_TYPE_CASTS() macro. Casting is now done using the following
1770         form: downcast<HTMLDivElement>(), instead of toHTMLDivElement().
1771
1772         The previous form (i.e. toHTMLDivElement()) is still supported for now
1773         by generating macros that convert these calls into the new form, until
1774         the code base is ported to the new casting helpers.
1775
1776         The plan is also to use is<HTMLDivElement>() instead of
1777         isHTMLDivElement() for consistency but this was not changed in this
1778         patch to avoid blowing up the size.
1779
1780         This CL also updates the way we convert a JSValue into an
1781         implementation pointer. Instead of using toHTMLDivElement(), which
1782         looked like a cast, we now use JSHTMLDivElement::toWrapped(). This
1783         avoids conflicting with the toXXXElement() macros and makes it
1784         clearer this is not a simple cast.
1785
1786         No new tests, no behavior change.
1787
1788         * Modules/plugins/QuickTimePluginReplacement.mm:
1789         (WebCore::QuickTimePluginReplacement::installReplacement):
1790         * WebCore.exp.in:
1791         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
1792         (WebCore::JSAudioBufferSourceNode::setBuffer):
1793         * bindings/js/JSBlobCustom.cpp:
1794         (WebCore::constructJSBlob):
1795         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1796         (WebCore::JSCommandLineAPIHost::getEventListeners):
1797         (WebCore::JSCommandLineAPIHost::databaseId):
1798         (WebCore::JSCommandLineAPIHost::storageId):
1799         * bindings/js/JSDOMFormDataCustom.cpp:
1800         (WebCore::toHTMLFormElementOrNull):
1801         (WebCore::constructJSDOMFormData):
1802         (WebCore::JSDOMFormData::append):
1803         (WebCore::toHTMLFormElement): Deleted.
1804         * bindings/js/JSDOMStringListCustom.cpp:
1805         (WebCore::JSDOMStringList::toWrapped):
1806         (WebCore::toDOMStringList): Deleted.
1807         * bindings/js/JSDOMWindowCustom.cpp:
1808         (WebCore::JSDOMWindow::toWrapped):
1809         (WebCore::toDOMWindow): Deleted.
1810         * bindings/js/JSDictionary.cpp:
1811         (WebCore::JSDictionary::convertValue):
1812         * bindings/js/JSDocumentCustom.cpp:
1813         (WebCore::JSDocument::createTouchList):
1814         * bindings/js/JSEventTargetCustom.cpp:
1815         (WebCore::JSEventTarget::toWrapped):
1816         (WebCore::toEventTarget): Deleted.
1817         * bindings/js/JSExceptionBase.cpp:
1818         (WebCore::toExceptionBase):
1819         * bindings/js/JSHTMLMediaElementCustom.cpp:
1820         (WebCore::JSHTMLMediaElement::setController):
1821         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1822         (WebCore::JSHTMLOptionsCollection::add):
1823         (WebCore::JSHTMLOptionsCollection::remove):
1824         * bindings/js/JSHTMLSelectElementCustom.cpp:
1825         (WebCore::JSHTMLSelectElement::remove):
1826         (WebCore::selectIndexSetter):
1827         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1828         (WebCore::JSInspectorFrontendHost::showContextMenu):
1829         * bindings/js/JSMessageEventCustom.cpp:
1830         (WebCore::handleInitMessageEvent):
1831         * bindings/js/JSMessagePortCustom.cpp:
1832         (WebCore::fillMessagePortArray):
1833         * bindings/js/JSNodeCustom.cpp:
1834         (WebCore::JSNode::insertBefore):
1835         (WebCore::JSNode::replaceChild):
1836         (WebCore::JSNode::removeChild):
1837         (WebCore::JSNode::appendChild):
1838         * bindings/js/JSNodeFilterCustom.cpp:
1839         (WebCore::JSNodeFilter::toWrapped):
1840         (WebCore::toNodeFilter): Deleted.
1841         * bindings/js/JSSubtleCryptoCustom.cpp:
1842         (WebCore::JSSubtleCrypto::encrypt):
1843         (WebCore::JSSubtleCrypto::decrypt):
1844         (WebCore::JSSubtleCrypto::sign):
1845         (WebCore::JSSubtleCrypto::verify):
1846         (WebCore::JSSubtleCrypto::exportKey):
1847         (WebCore::JSSubtleCrypto::wrapKey):
1848         (WebCore::JSSubtleCrypto::unwrapKey):
1849         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1850         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
1851         (WebCore::JSWebGLRenderingContext::getProgramParameter):
1852         (WebCore::JSWebGLRenderingContext::getShaderParameter):
1853         (WebCore::JSWebGLRenderingContext::getUniform):
1854         (WebCore::dataFunctionf):
1855         (WebCore::dataFunctioni):
1856         (WebCore::dataFunctionMatrix):
1857         * bindings/js/JSXMLHttpRequestCustom.cpp:
1858         (WebCore::JSXMLHttpRequest::send):
1859         * bindings/js/SerializedScriptValue.cpp:
1860         (WebCore::CloneSerializer::dumpIfTerminal):
1861         * bindings/scripts/CodeGeneratorJS.pm:
1862         (GenerateHeader):
1863         (GenerateImplementation):
1864         (GenerateParametersCheck):
1865         (JSValueToNative):
1866         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1867         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
1868         (WebCore::JSTestActiveDOMObject::toWrapped):
1869         (WebCore::toTestActiveDOMObject): Deleted.
1870         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1871         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1872         (WebCore::JSTestCustomNamedGetter::toWrapped):
1873         (WebCore::toTestCustomNamedGetter): Deleted.
1874         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1875         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1876         (WebCore::JSTestEventConstructor::toWrapped):
1877         (WebCore::toTestEventConstructor): Deleted.
1878         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1879         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1880         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
1881         (WebCore::JSTestEventTarget::toWrapped):
1882         (WebCore::toTestEventTarget): Deleted.
1883         * bindings/scripts/test/JS/JSTestEventTarget.h:
1884         * bindings/scripts/test/JS/JSTestException.cpp:
1885         (WebCore::JSTestException::toWrapped):
1886         (WebCore::toTestException): Deleted.
1887         * bindings/scripts/test/JS/JSTestException.h:
1888         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1889         (WebCore::JSTestGenerateIsReachable::toWrapped):
1890         (WebCore::toTestGenerateIsReachable): Deleted.
1891         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1892         * bindings/scripts/test/JS/JSTestInterface.cpp:
1893         (WebCore::setJSTestInterfaceImplementsNode):
1894         (WebCore::setJSTestInterfaceSupplementalNode):
1895         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
1896         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1897         (WebCore::JSTestInterface::toWrapped):
1898         (WebCore::toTestInterface): Deleted.
1899         * bindings/scripts/test/JS/JSTestInterface.h:
1900         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1901         (WebCore::JSTestMediaQueryListListener::toWrapped):
1902         (WebCore::toTestMediaQueryListListener): Deleted.
1903         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1904         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1905         (WebCore::JSTestNamedConstructor::toWrapped):
1906         (WebCore::toTestNamedConstructor): Deleted.
1907         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1908         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1909         (WebCore::JSTestNondeterministic::toWrapped):
1910         (WebCore::toTestNondeterministic): Deleted.
1911         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1912         * bindings/scripts/test/JS/JSTestObj.cpp:
1913         (WebCore::setJSTestObjTestObjAttr):
1914         (WebCore::setJSTestObjXMLObjAttr):
1915         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1916         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1917         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1918         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
1919         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1920         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1921         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1922         (WebCore::setJSTestObjMutablePoint):
1923         (WebCore::setJSTestObjImmutablePoint):
1924         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1925         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
1926         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
1927         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1928         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1929         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1930         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1931         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1932         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1933         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
1934         (WebCore::jsTestObjPrototypeFunctionConvert1):
1935         (WebCore::jsTestObjPrototypeFunctionConvert2):
1936         (WebCore::jsTestObjPrototypeFunctionConvert4):
1937         (WebCore::jsTestObjPrototypeFunctionConvert5):
1938         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
1939         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
1940         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
1941         (WebCore::JSTestObj::toWrapped):
1942         (WebCore::toTestObj): Deleted.
1943         * bindings/scripts/test/JS/JSTestObj.h:
1944         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1945         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
1946         (WebCore::JSTestOverloadedConstructors::toWrapped):
1947         (WebCore::toTestOverloadedConstructors): Deleted.
1948         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1949         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1950         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
1951         (WebCore::toTestSerializedScriptValueInterface): Deleted.
1952         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1953         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1954         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1955         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
1956         (WebCore::JSTestTypedefs::toWrapped):
1957         (WebCore::toTestTypedefs): Deleted.
1958         * bindings/scripts/test/JS/JSTestTypedefs.h:
1959         * bindings/scripts/test/JS/JSattribute.cpp:
1960         (WebCore::JSattribute::toWrapped):
1961         (WebCore::toattribute): Deleted.
1962         * bindings/scripts/test/JS/JSattribute.h:
1963         * bindings/scripts/test/JS/JSreadonly.cpp:
1964         (WebCore::JSreadonly::toWrapped):
1965         (WebCore::toreadonly): Deleted.
1966         * bindings/scripts/test/JS/JSreadonly.h:
1967         * dom/Element.h:
1968         (WebCore::downcast):
1969         * dom/make_names.pl:
1970         (printTypeHelpers):
1971         * html/HTMLAnchorElement.h:
1972         * html/HTMLAreaElement.h:
1973         * html/HTMLAudioElement.h:
1974         * html/HTMLBaseElement.h:
1975         * html/HTMLBodyElement.h:
1976         * html/HTMLCanvasElement.h:
1977         * html/HTMLDataListElement.h:
1978         * html/HTMLDetailsElement.h:
1979         * html/HTMLDivElement.h:
1980         * html/HTMLEmbedElement.h:
1981         * html/HTMLFieldSetElement.h:
1982         * html/HTMLFormElement.h:
1983         * html/HTMLFrameElement.h:
1984         * html/HTMLFrameSetElement.h:
1985         * html/HTMLHtmlElement.h:
1986         * html/HTMLIFrameElement.h:
1987         * html/HTMLImageElement.h:
1988         * html/HTMLInputElement.h:
1989         * html/HTMLLabelElement.h:
1990         * html/HTMLLegendElement.h:
1991         * html/HTMLLinkElement.h:
1992         * html/HTMLMapElement.h:
1993         * html/HTMLMarqueeElement.h:
1994         * html/HTMLMetaElement.h:
1995         * html/HTMLMeterElement.h:
1996         * html/HTMLOListElement.h:
1997         * html/HTMLObjectElement.h:
1998         * html/HTMLOptGroupElement.h:
1999         * html/HTMLOptionElement.h:
2000         * html/HTMLParamElement.h:
2001         * html/HTMLProgressElement.h:
2002         * html/HTMLScriptElement.h:
2003         * html/HTMLSelectElement.h:
2004         * html/HTMLSourceElement.h:
2005         * html/HTMLStyleElement.h:
2006         * html/HTMLSummaryElement.h:
2007         * html/HTMLTableCaptionElement.h:
2008         * html/HTMLTableElement.h:
2009         * html/HTMLTableRowElement.h:
2010         * html/HTMLTemplateElement.h:
2011         * html/HTMLTextAreaElement.h:
2012         * html/HTMLTitleElement.h:
2013         * html/HTMLTrackElement.h:
2014         * html/HTMLVideoElement.h:
2015         * inspector/InspectorDOMAgent.cpp:
2016         (WebCore::InspectorDOMAgent::scriptValueAsNode):
2017         * mathml/MathMLMencloseElement.h:
2018         * svg/SVGAltGlyphDefElement.h:
2019         * svg/SVGAltGlyphElement.h:
2020         * svg/SVGAltGlyphItemElement.h:
2021         * svg/SVGAnimateMotionElement.h:
2022         * svg/SVGAnimateTransformElement.h:
2023         * svg/SVGCircleElement.h:
2024         * svg/SVGClipPathElement.h:
2025         * svg/SVGCursorElement.h:
2026         * svg/SVGEllipseElement.h:
2027         * svg/SVGFEDistantLightElement.h:
2028         * svg/SVGFEFuncAElement.h:
2029         * svg/SVGFEFuncBElement.h:
2030         * svg/SVGFEFuncGElement.h:
2031         * svg/SVGFEFuncRElement.h:
2032         * svg/SVGFEMergeNodeElement.h:
2033         * svg/SVGFEPointLightElement.h:
2034         * svg/SVGFESpotLightElement.h:
2035         * svg/SVGFilterElement.h:
2036         * svg/SVGFontElement.h:
2037         * svg/SVGFontFaceElement.h:
2038         * svg/SVGFontFaceNameElement.h:
2039         * svg/SVGFontFaceSrcElement.h:
2040         * svg/SVGFontFaceUriElement.h:
2041         * svg/SVGForeignObjectElement.h:
2042         * svg/SVGGlyphElement.h:
2043         * svg/SVGGlyphRefElement.h:
2044         * svg/SVGHKernElement.h:
2045         * svg/SVGImageElement.h:
2046         * svg/SVGLineElement.h:
2047         * svg/SVGLinearGradientElement.h:
2048         * svg/SVGMPathElement.h:
2049         * svg/SVGMarkerElement.h:
2050         * svg/SVGMaskElement.h:
2051         * svg/SVGMissingGlyphElement.h:
2052         * svg/SVGPathElement.h:
2053         * svg/SVGPatternElement.h:
2054         * svg/SVGPolygonElement.h:
2055         * svg/SVGPolylineElement.h:
2056         * svg/SVGRadialGradientElement.h:
2057         * svg/SVGRectElement.h:
2058         * svg/SVGSVGElement.h:
2059         * svg/SVGScriptElement.h:
2060         * svg/SVGStopElement.h:
2061         * svg/SVGStyleElement.h:
2062         * svg/SVGTextElement.h:
2063         * svg/SVGTextPathElement.h:
2064         * svg/SVGTitleElement.h:
2065         * svg/SVGUseElement.h:
2066         * svg/SVGVKernElement.h:
2067         * svg/SVGViewElement.h:
2068
2069 2014-09-21  Christophe Dumez  <cdumez@apple.com>
2070
2071         Fix post-mortem nits for r173724
2072         https://bugs.webkit.org/show_bug.cgi?id=136986
2073
2074         Reviewed by Darin Adler.
2075
2076         Fix post-mortem nits for r173724.
2077
2078         No new tests, no behavior change.
2079
2080         * editing/EditingStyle.cpp:
2081         (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
2082         (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
2083         Use nullptr instead of 0.
2084
2085         * editing/SplitElementCommand.cpp:
2086         (WebCore::SplitElementCommand::doUnapply):
2087         Use getIdAttribute() / setIdAttribute().
2088
2089         * rendering/RenderTableCell.cpp:
2090         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2091         Use fastHasAttribute() for nowrap and do an early return to avoid
2092         calling styleOrColLogicalWidth() if the nowrap attribute is missing.
2093
2094 2014-09-21  Filip Pizlo  <fpizlo@apple.com>
2095
2096         Unreviewed, speculative build fix.
2097         
2098         If you use typed arrays, you gotta include runtime/TypedArrayInlines.h.
2099
2100         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2101
2102 2014-09-19  Jer Noble  <jer.noble@apple.com>
2103
2104         [EME][Mac] Support secure proof of key release in the com.apple.fps.2_0 keysystem.
2105         https://bugs.webkit.org/show_bug.cgi?id=136898
2106
2107         Reviewed by Eric Carlson.
2108
2109         Add support for proof of key release to the CDM by supporting a new "mime" type called
2110         "keyrelease". When a session of type "keyrelease" is created, the initData is the server
2111         certificate, the keyMessage contains the first stored proof of key release if present,
2112         and closing the session will remove that proof from storage.
2113
2114         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2115         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
2116         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2117         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2118         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
2119         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
2120         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
2121         (WebCore::sessionStorageDirectory):
2122         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2123         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
2124
2125 2014-09-19  Jer Noble  <jer.noble@apple.com>
2126
2127         [Media][Mac] Buffered range slides around as you resize a window
2128         https://bugs.webkit.org/show_bug.cgi?id=136960
2129
2130         Reviewed by Dean Jackson.
2131
2132         Rather than using a canvas as the background image for the timeline slider, use a generated SVG image
2133         to represent the buffered ranges.
2134
2135         * Modules/mediacontrols/mediaControlsApple.css:
2136         (audio::-webkit-media-controls-timeline):
2137         * Modules/mediacontrols/mediaControlsApple.js:
2138         (Controller.prototype.createControls):
2139         (Controller.prototype.updateProgress):
2140
2141 2014-09-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2142
2143         [CoordinatedGraphics][EFL] window.scrollTo(x, y) doesn't work when fixed layout is enabled
2144         https://bugs.webkit.org/show_bug.cgi?id=136917
2145
2146         Reviewed by Darin Adler.
2147
2148         When fixed layout is enabled, scrollTo doesn't work on EFL port with coordinated graphics.
2149         Since updateScrollbars() doesn't update scroll position when delegatesScrolling() is enabled. 
2150         To fix this issue, EFL port should update scroll position based on WK2 port. This patch
2151         update scroll position in FrameView::requestScrollPositionUpdate() as Mac port.
2152
2153         TestWebKitAPI: Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewScrollTo
2154
2155         * page/FrameView.cpp:
2156         (WebCore::FrameView::requestScrollPositionUpdate):
2157
2158 2014-09-19  Brent Fulgham  <bfulgham@apple.com>
2159
2160         Latching in iframes is not working as expected
2161         https://bugs.webkit.org/show_bug.cgi?id=136729
2162         <rdar://problem/18370549>
2163
2164         Reviewed by Simon Fraser.
2165
2166         Test: platform/mac/fast/scrolling/scrolling-iframe-100pct.html
2167
2168         Correct latching behavior by moving the concept of latching from the event handler to the main frame.
2169         The event handlers are per-document, and can improperly latch to the iframe element (rather than the
2170         scrollable content of the iframe) resulting in incorrect behavior.
2171
2172         Also move the wheel event delta tracking to the main frame, as this is similarly "top-level" in nature.
2173
2174         * WebCore.vcxproj/WebCore.vcxproj: Add new LatchedState class.
2175         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2176         * WebCore.xcodeproj/project.pbxproj: Ditto.
2177         * page/EventHandler.cpp:
2178         (WebCore::EventHandler::EventHandler): Update constructor after moving some members to the new
2179         LatchedState object.
2180         (WebCore::EventHandler::clear): Call 'clear' on the LatchedState class.
2181         (WebCore::EventHandler::platformRecordWheelEvent):  Update for new LatchedState class.
2182         (WebCore::EventHandler::handleWheelEvent): Ditto.
2183         (WebCore::EventHandler::clearLatchedState): Ditto.
2184         (WebCore::EventHandler::defaultWheelEventHandler): Ditto.
2185         * page/EventHandler.h:
2186         * page/LatchedState.cpp: Added.
2187         (WebCore::LatchedState::LatchedState):
2188         (WebCore::LatchedState::~LatchedState):
2189         (WebCore::LatchedState::clear):
2190         (WebCore::LatchedState::setWheelEventElement):
2191         (WebCore::LatchedState::setWidgetIsLatched):
2192         (WebCore::LatchedState::setPreviousWheelScrolledElement):
2193         (WebCore::LatchedState::setScrollableContainer):
2194         * page/LatchedState.h: Added.
2195         (WebCore::LatchedState::wheelEventElement):
2196         (WebCore::LatchedState::frame):
2197         (WebCore::LatchedState::setFrame):
2198         (WebCore::LatchedState::widgetIsLatched):
2199         (WebCore::LatchedState::previousWheelScrolledElement):
2200         (WebCore::LatchedState::scrollableContainer):
2201         (WebCore::LatchedState::startedGestureAtScrollLimit):
2202         (WebCore::LatchedState::setStartedGestureAtScrollLimit):
2203         * page/MainFrame.cpp:
2204         (WebCore::MainFrame::MainFrame): Update for new members (LatchedState and WheelEventDeltaTracker)
2205         * page/MainFrame.h:
2206         * page/mac/EventHandlerMac.mm:
2207         (WebCore::EventHandler::platformPrepareForWheelEvents): Use mainFrame-located latching information.
2208         (WebCore::EventHandler::platformRecordWheelEvent): Use mainFrame-located wheel event delta tracking.
2209         (WebCore::EventHandler::platformCompleteWheelEvent): Make sure to use the latched frame as well as
2210         the latched element so that events get routed properly.
2211         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Update for new mainFrame
2212         location for latched state information.
2213
2214 2014-09-19  Chris Dumez  <cdumez@apple.com>
2215
2216         Minimize virtual function calls in MarkupAccumulator
2217         https://bugs.webkit.org/show_bug.cgi?id=136957
2218
2219         Reviewed by Benjamin Poulain.
2220
2221         This patch minimizes the number of virtual function calls in
2222         MarkupAccumulator by:
2223         - De-virtualizing MarkupAccumulator::appendString(), which is never
2224           overridden
2225         - Having MarkupAccumulator::appendEndTag() virtual function take an
2226           Element in argument instead of a Node, as it only applies to Element.
2227           Also add a non-virtual overload that takes a Node in argument and
2228           that does the isElementNode() check so that we don't need to explicitly
2229           do the check at each call site.
2230
2231         No new tests, no behavior change.
2232
2233         * editing/MarkupAccumulator.cpp:
2234         (WebCore::MarkupAccumulator::appendEndTag):
2235         (WebCore::MarkupAccumulator::shouldSelfClose):
2236         (WebCore::MarkupAccumulator::appendEndMarkup):
2237         * editing/MarkupAccumulator.h:
2238         (WebCore::MarkupAccumulator::appendEndTag):
2239         * page/PageSerializer.cpp:
2240         (WebCore::SerializerMarkupAccumulator::appendEndTag):
2241
2242 2014-09-19  Pratik Solanki  <psolanki@apple.com>
2243
2244         [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
2245         https://bugs.webkit.org/show_bug.cgi?id=136962
2246         <rdar://problem/18342344>
2247
2248         Reviewed by Geoffrey Garen.
2249
2250         The disk cache monitor callback code was being executed on the main thread. This is wrong
2251         when the web thread is being used in WebKit1 on iOS. The code needs to run on the web
2252         thread. Use WebThreadRun to dispatch the block to the web thread. This works for WebKit2 as
2253         well since when web thread is not being used, WebThreadRun invokes the block directly.
2254
2255         * loader/cocoa/DiskCacheMonitorCocoa.mm:
2256         (WebCore::DiskCacheMonitor::DiskCacheMonitor):
2257
2258 2014-09-19  Jer Noble  <jer.noble@apple.com>
2259
2260         Unreviewed build fix; pass duration into the lambda.
2261
2262         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2263         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
2264
2265 2014-09-19  Dean Jackson  <dino@apple.com>
2266
2267         Multithreaded WebGL is a bad idea - remove it
2268         https://bugs.webkit.org/show_bug.cgi?id=136964
2269         <rdar://problem/18399858>
2270
2271         Reviewed by Brent Fulgham.
2272
2273         We should not allow multithreaded GL access. Remove the
2274         feature.
2275
2276         * html/canvas/WebGLRenderingContext.cpp:
2277         (WebCore::WebGLRenderingContext::create):
2278         * page/Settings.in:
2279         * platform/graphics/GraphicsContext3D.h:
2280         (WebCore::GraphicsContext3D::Attributes::Attributes):
2281         * platform/graphics/mac/GraphicsContext3DMac.mm:
2282         (WebCore::GraphicsContext3D::GraphicsContext3D):
2283
2284 2014-09-19  Eric Carlson  <eric.carlson@apple.com>
2285
2286         [MSE][Mac] work around AVSampleBufferRenderSynchronizer early callbacks
2287         https://bugs.webkit.org/show_bug.cgi?id=136958
2288
2289         Reviewed by Jer Noble.
2290
2291         No new tests, we have been unable to come up with a test case that reproduces
2292         this issue reliably.
2293
2294         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2295         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged): Set the synchronizer
2296             time to duration when the duration time observer is called early. Add more logging.
2297
2298 2014-09-19  Benjamin Poulain  <bpoulain@apple.com>
2299
2300         CSS JIT: allocate the minimum required register count in debug
2301         https://bugs.webkit.org/show_bug.cgi?id=136933
2302
2303         Reviewed by Andreas Kling.
2304
2305         It is hard to catch bugs of minimumRegisterRequirements() because every CPU has a different
2306         number of registers available by default.
2307
2308         This patch aims at improving testing by creating artificial register pressure when running
2309         in debug. When running in debug, we no longer allocate all the available registers right away.
2310         Instead, we allocate just enough to satisfy minimumRegisterRequirements().
2311
2312         The expectation with this is that under-allocation would be detected quicker since they would
2313         crash debug builds.
2314
2315         * cssjit/RegisterAllocator.h:
2316         (WebCore::RegisterAllocator::RegisterAllocator):
2317         (WebCore::RegisterAllocator::reserveCallerSavedRegisters):
2318         (WebCore::RegisterAllocator::availableRegisterCount): Deleted.
2319         * cssjit/SelectorCompiler.cpp:
2320         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2321
2322 2014-09-19  Benjamin Poulain  <bpoulain@apple.com>
2323
2324         Add a size check for CSSSelector
2325         https://bugs.webkit.org/show_bug.cgi?id=136882
2326
2327         Reviewed by Christophe Dumez.
2328
2329         * css/CSSSelector.cpp:
2330
2331 2014-09-19  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2332
2333         REGRESSION(r173464): It broke the !ENABLE(PICTURE_SIZES) build
2334         https://bugs.webkit.org/show_bug.cgi?id=136942
2335
2336         Reviewed by Simon Fraser.
2337
2338         * html/HTMLImageElement.cpp:
2339         (WebCore::HTMLImageElement::parseAttribute):
2340
2341 2014-09-19  Simon Fraser  <simon.fraser@apple.com>
2342
2343         Provide a default argument for the most commonly used HitTestRequest variant
2344         https://bugs.webkit.org/show_bug.cgi?id=136653
2345
2346         Reviewed by Darin Adler.
2347
2348         Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent
2349         and change call sites using the default flags to use a HitTestRequest temporary.
2350
2351         * dom/TreeScope.cpp:
2352         (WebCore::nodeFromPoint):
2353         * editing/FrameSelection.cpp:
2354         (WebCore::FrameSelection::contains):
2355         * page/DragController.cpp:
2356         (WebCore::elementUnderMouse):
2357         * page/EventHandler.cpp:
2358         (WebCore::EventHandler::handleMouseDraggedEvent):
2359         (WebCore::EventHandler::handleMousePressEvent):
2360         * rendering/HitTestRequest.h:
2361         (WebCore::HitTestRequest::HitTestRequest):
2362
2363 2014-09-19  Chris Dumez  <cdumez@apple.com>
2364
2365         Allow DOM methods to return references instead of pointers
2366         https://bugs.webkit.org/show_bug.cgi?id=136931
2367
2368         Reviewed by Sam Weinig.
2369
2370         It is common practice in WebKit to have methods return a reference
2371         instead of a pointer if the pointer can never be null. However, this
2372         unfortunately did not work for DOM methods (functions called by JS
2373         bindings). This prevented further refactoring.
2374
2375         This patch brings support for having DOM methods to return references
2376         instead of pointers when the pointer cannot be null. The generated
2377         bindings were calling WTF::getPtr() on the pointer type returned by
2378         the implementation already (in case it was a smart pointer type).
2379         This patch leverages this by having WTF::getPtr() convert reference
2380         arguments into raw pointers.
2381
2382         This patch also updates a few DOM methods on Document and Element
2383         classes to return a reference instead of a pointer, to test the change.
2384         There are likely more DOM methods that can be updated though.
2385
2386         No new tests, no behavior change.
2387
2388         * accessibility/AccessibilityObject.cpp:
2389         (WebCore::AccessibilityObject::classList):
2390         * bindings/js/JSDOMBinding.h:
2391         (WTF::getPtr): Deleted.
2392         * dom/Document.cpp:
2393         (WebCore::Document::implementation):
2394         (WebCore::Document::webkitGetNamedFlows):
2395         (WebCore::Document::namedFlows):
2396         (WebCore::Document::setXMLVersion):
2397         (WebCore::Document::setXMLStandalone):
2398         (WebCore::Document::securityPolicy):
2399         (WebCore::Document::styleSheets):
2400         * dom/Document.h:
2401         (WebCore::Document::timing):
2402         * dom/Element.cpp:
2403         (WebCore::Element::classList):
2404         (WebCore::Element::dataset):
2405         * dom/Element.h:
2406         * html/shadow/MediaControlElements.cpp:
2407         (WebCore::MediaControlPanelElement::setPosition):
2408         (WebCore::MediaControlPanelElement::resetPosition):
2409         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
2410         * html/track/VTTRegion.cpp:
2411         (WebCore::VTTRegion::displayLastTextTrackCueBox):
2412         (WebCore::VTTRegion::willRemoveTextTrackCueBox):
2413         * inspector/InspectorCSSAgent.cpp:
2414         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2415         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
2416         * page/PerformanceTiming.cpp:
2417         (WebCore::PerformanceTiming::documentTiming):
2418         * rendering/FlowThreadController.cpp:
2419         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
2420
2421 2014-09-19  Daniel Bates  <dabates@apple.com>
2422
2423         Always assume internal SDK when building configuration Production
2424         https://bugs.webkit.org/show_bug.cgi?id=136925
2425         <rdar://problem/18362399>
2426
2427         Reviewed by Dan Bernstein.
2428
2429         As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
2430         and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.
2431
2432         * Configurations/Base.xcconfig:
2433
2434 2014-09-19  Chris Dumez  <cdumez@apple.com>
2435
2436         Optimize MarkupAccumulator::appendText()
2437         https://bugs.webkit.org/show_bug.cgi?id=136935
2438
2439         Reviewed by Benjamin Poulain.
2440
2441         MarkupAccumulator::appendText() was calling the generic appendNodeValue()
2442         method to append the text. appendNodeValue() supports any kind of Node and
2443         thus calls the Node::nodeValue() virtual function.
2444
2445         Since appendText() is the only caller to appendNodeValue(), this patch
2446         inlines the code in appendText() and makes it specific to Text Node, and
2447         thus more efficient. The code now calls CharacterData::data() instead of
2448         the Node::nodeValue() virtual function. This patch also updates
2449         CharacterData::data() to return a const reference to avoid copying the
2450         return value.
2451
2452         No new tests, no behavior change.
2453
2454         * dom/CharacterData.h:
2455         (WebCore::CharacterData::data):
2456         * editing/MarkupAccumulator.cpp:
2457         (WebCore::MarkupAccumulator::appendText):
2458         (WebCore::MarkupAccumulator::appendNodeValue): Deleted.
2459         * editing/MarkupAccumulator.h:
2460
2461 2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2462
2463         [GTK] Dot not allow to create delete-on-destroy GMainLoopSources
2464         https://bugs.webkit.org/show_bug.cgi?id=136923
2465
2466         Reviewed by Gustavo Noronha Silva.
2467
2468         * platform/gtk/GtkDragAndDropHelper.cpp:
2469         (WebCore::GtkDragAndDropHelper::handleDragLeave): Use GMainLoopSource::scheduleAndDeleteOnDestroy().
2470
2471 2014-09-18  Roger Fong  <roger_fong@apple.com>
2472
2473         Add a move operator and constructor override to HashSet.
2474         https://bugs.webkit.org/show_bug.cgi?id=136934.
2475
2476         * dom/Node.cpp:
2477         (WebCore::Document::invalidateNodeListAndCollectionCaches): Remove the now unneeded call to clear the HashSet.
2478
2479 2014-09-18  Roger Fong  <roger_fong@apple.com>
2480
2481         [Windows] Media tests all fail because they cannot find localized strings.
2482         
2483         * rendering/RenderThemeSafari.cpp:
2484         (WebCore::RenderThemeSafari::mediaControlsScript):
2485         Make sure to use localized strings files in RenderThemeSafari.
2486
2487 2014-09-18  Simon Fraser  <simon.fraser@apple.com>
2488
2489         Remove generator/yield terminology in RenderInline's GeneratorContext
2490         https://bugs.webkit.org/show_bug.cgi?id=119278
2491
2492         Reviewed by Sam Weinig.
2493         
2494         Get rid of the icky Generator/yield syntax used for collecting rects in RenderInline.
2495         Just replace the operator() with an explicit addRect().
2496         
2497         Also some drive-by nullptr cleanup, and removing default arguments from
2498         addChildIgnoringContinuation() calls.
2499
2500         * rendering/RenderInline.cpp:
2501         (WebCore::RenderInline::willBeDestroyed):
2502         (WebCore::RenderInline::styleDidChange):
2503         (WebCore::RenderInline::splitInlines):
2504         (WebCore::RenderInline::addChildToContinuation):
2505         (WebCore::RenderInline::generateLineBoxRects):
2506         (WebCore::RenderInline::generateCulledLineBoxRects):
2507         * rendering/RenderInline.h:
2508
2509 2014-09-18  Jeremy Jones  <jeremyj@apple.com>
2510
2511         Improve fullscreen video rotation animation.
2512         https://bugs.webkit.org/show_bug.cgi?id=136870
2513
2514         Reviewed by Simon Fraser.
2515
2516         Instead of setting the frame on the video layer, set position and bounds separately. This allows the position to be synchronized with the rest of the animation.
2517         When using a fencePort to synchronize animations, if the fence times out, pivoting around the center provides a better fallback.
2518
2519         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2520         (-[WebAVVideoLayer setVideoSublayer:]): added
2521         (-[WebAVVideoLayer videoSublayer]): added
2522         (-[WebAVVideoLayer setBounds:]):  set position and bounds insted of frame.
2523         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): use setVideoSublayer
2524         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2525         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): set bounds and anchorPoint instead of frame
2526         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): set bounds instead of frame.
2527
2528 2014-09-17  Myles C. Maxfield  <mmaxfield@apple.com>
2529
2530         Text laid out with the SVG -> OTF font converter does not have the same metrics as with the SVG font code path
2531         https://bugs.webkit.org/show_bug.cgi?id=136907
2532
2533         Reviewed by Darin Adler.
2534
2535         There are three things that are causing text laid out with the SVG -> OTF font converter to not have metrics that
2536         measure our existing SVG codepath. They are:
2537
2538         1. Creating a font with a 0 ascent or descent makes OS X think that something is wrong with the font, and take
2539         a different codepath when trying to parse ascent and descent information. This patch checks for this condition
2540         and sets the ascent/descent to 1 FUnit instead (which is generally much smaller than a pixel).
2541         2. Our SVG font codepath hardcodes a line gap of 1/10th of the font size for every font. This patch makes the
2542         font converter obey this.
2543         3. The converter was not allowing for default glyph advances as per the SVG font specification. This patch
2544         does so.
2545
2546         No new tests yet, but they will come soon! I promise!
2547
2548         * svg/SVGToOTFFontConversion.cpp:
2549         (WebCore::SVGToOTFFontConverter::appendHHEATable):
2550         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2551
2552 2014-09-18  Daniel Bates  <dabates@apple.com>
2553
2554         REGRESSION (r168921): SVG elements may be unnecessarily rebuilt
2555         https://bugs.webkit.org/show_bug.cgi?id=136373
2556
2557         Reviewed by David Kilzer.
2558
2559         Fixes an issue where a SVG element may be unnecessarily rebuilt. In particular,
2560         it is unnecessary to rebuild a SVG element that will be removed from the document.
2561
2562         Test: svg/custom/remove-subtree-including-use-with-child-textpath-that-references-earlier-path.html
2563
2564         * svg/SVGDocumentExtensions.cpp:
2565         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Modified to remove a SVG element
2566         from the list of elements to be rebuilt.
2567
2568 2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
2569
2570         Unreviewed rollout r173731. Broke multiple builds.
2571
2572         * WebCore.exp.in:
2573         * inspector/InspectorController.cpp:
2574         (WebCore::InspectorController::connectFrontend):
2575         (WebCore::InspectorController::show):
2576         * inspector/InspectorController.h:
2577         * page/PageDebuggable.cpp:
2578         (WebCore::PageDebuggable::connect):
2579         * page/PageDebuggable.h:
2580         * testing/Internals.cpp:
2581         (WebCore::Internals::openDummyInspectorFrontend):
2582
2583 2014-09-18  Beth Dakin  <bdakin@apple.com>
2584
2585         ASSERT in RenderBox::instrinsicScrollbarLogicalWidth opening the inspector
2586         https://bugs.webkit.org/show_bug.cgi?id=136929
2587
2588         Reviewed by Simon Fraser.
2589
2590         This is a regression from http://trac.webkit.org/changeset/173668 
2591         This code is wrong after that change because it assumes that overflow:scroll will 
2592         always have a scrollbar. That is no longer the case. We need to check to make sure 
2593         it’s an overflow:scroll that does NOT have overflow:auto behavior.
2594
2595         * rendering/RenderBox.cpp:
2596         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth):
2597
2598 2014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
2599
2600         Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
2601         https://bugs.webkit.org/show_bug.cgi?id=136893
2602
2603         Reviewed by Timothy Hatcher.
2604
2605         Automatic inspection is currently disabled for web pages.
2606         This just updates the interfaces that changed.
2607
2608         * WebCore.exp.in:
2609         * inspector/InspectorController.cpp:
2610         (WebCore::InspectorController::connectFrontend):
2611         (WebCore::InspectorController::show):
2612         * inspector/InspectorController.h:
2613         * page/PageDebuggable.cpp:
2614         (WebCore::PageDebuggable::connect):
2615         * page/PageDebuggable.h:
2616         * testing/Internals.cpp:
2617         (WebCore::Internals::openDummyInspectorFrontend):
2618
2619 2014-09-18  Chris Dumez  <cdumez@apple.com>
2620
2621         Use fastHasAttribute() / fastGetAttribute() when possible
2622         https://bugs.webkit.org/show_bug.cgi?id=136900
2623
2624         Reviewed by Benjamin Poulain.
2625
2626         Use fastHasAttribute() / fastGetAttribute() when possible, that is when
2627         the attribute is not SVG-animated or the |style| attribute, to avoid
2628         synchronizing attributes unnecessarily.
2629
2630         Also avoid calling hasAttribute(xxxAttr) then getAttribute(xxxAttr) as
2631         it causes 2 linear searches. It is best to call getAttribute(xxxAttr)
2632         directly and check if it returns the nullAtom.
2633
2634         No new tests, no behavior change. Element::fastAttributeLookupAllowed()
2635         is there as a safety set for debug builds.
2636
2637         * accessibility/AccessibilityListBoxOption.cpp:
2638         (WebCore::AccessibilityListBoxOption::isEnabled):
2639         * accessibility/AccessibilityNodeObject.cpp:
2640         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
2641         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
2642         * accessibility/AccessibilityObject.cpp:
2643         (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
2644         * dom/Document.cpp:
2645         (WebCore::Document::hasManifest):
2646         * dom/DocumentOrderedMap.cpp:
2647         (WebCore::keyMatchesLabelForAttribute):
2648         * dom/DocumentStyleSheetCollection.cpp:
2649         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2650         * dom/Element.cpp:
2651         (WebCore::Element::imageSourceURL):
2652         (WebCore::Element::pseudo):
2653         (WebCore::Element::spellcheckAttributeState):
2654         * editing/ApplyStyleCommand.cpp:
2655         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2656         * editing/EditingStyle.cpp:
2657         (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
2658         (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
2659         * editing/SplitElementCommand.cpp:
2660         (WebCore::SplitElementCommand::doUnapply):
2661         * html/HTMLAnchorElement.cpp:
2662         (WebCore::HTMLAnchorElement::draggable):
2663         (WebCore::HTMLAnchorElement::sendPings):
2664         * html/HTMLAppletElement.cpp:
2665         (WebCore::HTMLAppletElement::updateWidget):
2666         * html/HTMLBodyElement.cpp:
2667         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
2668         * html/HTMLButtonElement.cpp:
2669         (WebCore::HTMLButtonElement::value):
2670         * html/HTMLDocument.cpp:
2671         (WebCore::HTMLDocument::dir):
2672         * html/HTMLEmbedElement.cpp:
2673         (WebCore::HTMLEmbedElement::imageSourceURL):
2674         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs):
2675         * html/HTMLFieldSetElement.cpp:
2676         (WebCore::HTMLFieldSetElement::~HTMLFieldSetElement):
2677         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
2678         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
2679         (WebCore::HTMLFieldSetElement::disabledStateChanged):
2680         (WebCore::HTMLFieldSetElement::childrenChanged):
2681         (WebCore::HTMLFieldSetElement::didMoveToNewDocument):
2682         * html/HTMLFormControlElement.cpp:
2683         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
2684         * html/HTMLFormElement.cpp:
2685         (WebCore::HTMLFormElement::action):
2686         * html/HTMLFrameElement.cpp:
2687         (WebCore::HTMLFrameElement::noResize):
2688         * html/HTMLFrameElementBase.cpp:
2689         (WebCore::HTMLFrameElementBase::location):
2690         * html/HTMLHRElement.cpp:
2691         (WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
2692         * html/HTMLHtmlElement.cpp:
2693         (WebCore::HTMLHtmlElement::insertedByParser):
2694         * html/HTMLImageElement.cpp:
2695         (WebCore::HTMLImageElement::altText):
2696         (WebCore::HTMLImageElement::alt):
2697         (WebCore::HTMLImageElement::draggable):
2698         (WebCore::HTMLImageElement::src):
2699         (WebCore::HTMLImageElement::addSubresourceAttributeURLs):
2700         * html/HTMLInputElement.cpp:
2701         (WebCore::HTMLInputElement::finishParsingChildren):
2702         (WebCore::HTMLInputElement::altText):
2703         (WebCore::HTMLInputElement::reset):
2704         * html/HTMLLabelElement.cpp:
2705         (WebCore::HTMLLabelElement::control):
2706         * html/HTMLLinkElement.cpp:
2707         (WebCore::HTMLLinkElement::process):
2708         (WebCore::HTMLLinkElement::rel):
2709         * html/HTMLMetaElement.cpp:
2710         (WebCore::HTMLMetaElement::content):
2711         (WebCore::HTMLMetaElement::httpEquiv):
2712         * html/HTMLObjectElement.cpp:
2713         (WebCore::HTMLObjectElement::imageSourceURL):
2714         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
2715         * html/HTMLOptGroupElement.cpp:
2716         (WebCore::HTMLOptGroupElement::groupLabelText):
2717         * html/HTMLProgressElement.cpp:
2718         (WebCore::HTMLProgressElement::max):
2719         * html/HTMLScriptElement.cpp:
2720         (WebCore::HTMLScriptElement::sourceAttributeValue):
2721         (WebCore::HTMLScriptElement::charsetAttributeValue):
2722         (WebCore::HTMLScriptElement::languageAttributeValue):
2723         (WebCore::HTMLScriptElement::forAttributeValue):
2724         (WebCore::HTMLScriptElement::eventAttributeValue):
2725         * html/HTMLTableCellElement.cpp:
2726         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs):
2727         * html/HTMLTableElement.cpp:
2728         (WebCore::HTMLTableElement::rules):
2729         (WebCore::HTMLTableElement::summary):
2730         (WebCore::HTMLTableElement::addSubresourceAttributeURLs):
2731         * html/HTMLTableSectionElement.cpp:
2732         (WebCore::HTMLTableSectionElement::align):
2733         (WebCore::HTMLTableSectionElement::ch):
2734         (WebCore::HTMLTableSectionElement::vAlign):
2735         * html/HTMLTextAreaElement.cpp:
2736         (WebCore::HTMLTextAreaElement::maxLength):
2737         * html/SearchInputType.cpp:
2738         (WebCore::SearchInputType::searchEventsShouldBeDispatched):
2739         * loader/FormSubmission.cpp:
2740         (WebCore::FormSubmission::create):
2741         * page/Frame.cpp:
2742         (WebCore::Frame::matchLabelsAgainstElement):
2743         * page/PageSerializer.cpp:
2744         (WebCore::PageSerializer::serializeFrame):
2745         * platform/win/PasteboardWin.cpp:
2746         (WebCore::Pasteboard::writeImageToDataObject):
2747         * rendering/HitTestResult.cpp:
2748         (WebCore::HitTestResult::altDisplayString):
2749         * rendering/RenderSearchField.cpp:
2750         (WebCore::RenderSearchField::autosaveName):
2751         * rendering/RenderTableCell.cpp:
2752         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2753         * rendering/svg/RenderSVGResourceClipper.cpp:
2754         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2755
2756 2014-09-18  Chris Dumez  <cdumez@apple.com>
2757
2758         Have LiveNodeLists / HTMLCollections's elementMatches() take a reference
2759         https://bugs.webkit.org/show_bug.cgi?id=136902
2760
2761         Reviewed by Darin Adler.
2762
2763         Have LiveNodeLists / HTMLCollections's elementMatches() take a reference
2764         in argument instead of a pointer as the Element can never be null.
2765
2766         No new tests, no behavior change.
2767
2768         * dom/ClassNodeList.h:
2769         (WebCore::ClassNodeList::elementMatches):
2770         * dom/DocumentOrderedMap.cpp:
2771         (WebCore::keyMatchesWindowNamedItem):
2772         (WebCore::keyMatchesDocumentNamedItem):
2773         * dom/Element.cpp:
2774         (WebCore::Element::updateNameForDocument):
2775         (WebCore::Element::updateIdForDocument):
2776         * dom/LiveNodeList.cpp:
2777         (WebCore::LiveNodeList::namedItem):
2778         * dom/LiveNodeList.h:
2779         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
2780         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
2781         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
2782         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
2783         * dom/NameNodeList.h:
2784         (WebCore::NameNodeList::elementMatches):
2785         * dom/TagNodeList.h:
2786         (WebCore::TagNodeList::elementMatches):
2787         (WebCore::HTMLTagNodeList::elementMatches):
2788         * html/HTMLCollection.cpp:
2789         (WebCore::isMatchingElement):
2790         * html/HTMLNameCollection.cpp:
2791         (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
2792         (WebCore::WindowNameCollection::elementMatches):
2793         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
2794         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
2795         (WebCore::DocumentNameCollection::elementMatches):
2796         * html/HTMLNameCollection.h:
2797         * html/LabelsNodeList.cpp:
2798         (WebCore::LabelsNodeList::elementMatches):
2799         * html/LabelsNodeList.h:
2800         * html/RadioNodeList.cpp:
2801         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2802         (WebCore::RadioNodeList::elementMatches):
2803         * html/RadioNodeList.h:
2804
2805 2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2806
2807         Remove unused methods from MediaPlayerClient
2808         https://bugs.webkit.org/show_bug.cgi?id=136884
2809
2810         Reviewed by Eric Carlson.
2811
2812         Remove unused methods from MediaPlayerClient that introduce
2813         dependencies on WebCore types.
2814
2815         * html/HTMLMediaElement.cpp:
2816         * html/HTMLMediaElement.h:
2817         * platform/graphics/MediaPlayer.h:
2818         (WebCore::MediaPlayerClient::mediaPlayerOwningDocument): Deleted.
2819         (WebCore::MediaPlayerClient::mediaPlayerHostWindow): Deleted.
2820         (WebCore::MediaPlayerClient::mediaPlayerWindowClipRect): Deleted.
2821
2822 2014-09-17  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
2823
2824         [GTK] Add Wayland support to GLContextEGL
2825         https://bugs.webkit.org/show_bug.cgi?id=136829
2826
2827         Reviewed by Martin Robinson.
2828
2829         * platform/graphics/egl/GLContextEGL.cpp:
2830         (WebCore::sharedEGLDisplay): Special-case the shared EGL display initialization
2831         for the GTK port when running under Wayland. In that case the pointer to the
2832         native wl_display object should be passed to eglGetDisplay(). If not running
2833         under Wayland we should fall back to using the shared X11 display (if support
2834         for that display system is enabled) or the EGL_DEFAULT_DISPLAY.
2835
2836 2014-09-17  Daniel Bates  <dabates@apple.com>
2837
2838         Unreviewed, rolling out r173695.
2839
2840         Broke building third-party Legacy WebKit apps; will
2841         investigate offline
2842
2843         Reverted changeset:
2844
2845         "[iOS] Make WebCore build with public iOS SDK"
2846         https://bugs.webkit.org/show_bug.cgi?id=136487
2847         http://trac.webkit.org/changeset/173695
2848
2849 2014-09-17  Roger Fong  <roger_fong@apple.com>
2850
2851         Speculative fix for a fast\dom\html-collections-named-getter failing only in Debug builds.
2852
2853         * dom/Node.cpp:
2854         (WebCore::Document::invalidateNodeListAndCollectionCaches):
2855
2856 2014-09-17  Benjamin Poulain  <bpoulain@apple.com>
2857
2858         Add parsing for :nth-child(An+B of selector)
2859         https://bugs.webkit.org/show_bug.cgi?id=136845
2860
2861         Reviewed by Antti Koivisto.
2862
2863         Add support for parsing :nth-child(of). The implementation of selector matching
2864         will be in a follow up, there are enough edge cases here already.
2865
2866         Spec here: http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo
2867
2868         Test: fast/css/parsing-css-nth-child-of.html
2869
2870         * css/CSSParser.cpp:
2871         (WebCore::CSSParser::detectFunctionTypeToken):
2872         (WebCore::CSSParser::realLex):
2873         The parser generate two new kinds of tokens:
2874         -NTHCHILDFUNCTION, matching the "nth-child" identifier.
2875         -NTHCHILDSELECTORSEPARATOR, matching the "of" keyword separating An+B from the selector list.
2876
2877         NTHCHILDFUNCTION is used to extend the new syntax only for :nth-child() and not all the "nth" functions
2878         (e.g. :nth-of-type()).
2879
2880         NTHCHILDSELECTORSEPARATOR exists for two reasons:
2881         -We must clear the "parsingMode" before parsing selectorList. If we failed to do that, the complex selectors
2882          would be parsed in NthChildMode, which has all kind of bad side effects.
2883         -The second reason is differentiacting "of" for all the other identifiers. Arguably, this could have been done
2884          in the grammar, but it is clearer this way since we already need the branches for the parsingMode.
2885
2886         * css/CSSGrammar.y.in:
2887         Those are pretty much duplicates of the existing FUNCTION rules but supporting the new syntax.
2888
2889         * css/CSSParserValues.cpp:
2890         (WebCore::selectorListMatchesPseudoElement):
2891         (WebCore::CSSParserSelector::matchesPseudoElement):
2892         Matching pseudo elements does not make much sense for those selectorList (e.g. :nth-child(2n of ::before)).
2893         Add helper function to fail parsing of those cases.
2894
2895         * css/CSSParserValues.h:
2896         * css/CSSSelector.cpp:
2897         (WebCore::CSSSelector::selectorText):
2898         * css/CSSSelector.h:
2899         (WebCore::CSSSelector::selectorList):
2900         Updated serialization code for CSS OM.
2901
2902 2014-09-17  Benjamin Poulain  <bpoulain@apple.com>
2903
2904         CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
2905         https://bugs.webkit.org/show_bug.cgi?id=136807
2906
2907         Reviewed by Antti Koivisto.
2908
2909         The spec defines selector lists as token separated by white space.
2910
2911         The definition of white space for CSS Selectors is:
2912         "White space in Selectors consists of the code points SPACE (U+0020),
2913         TAB (U+0009), LINE FEED (U+000A), CARRIAGE RETURN (U+000D), and FORM FEED (U+000C)
2914         can occur in whitespace. Other space-like code points, such as EM SPACE (U+2003)
2915         and IDEOGRAPHIC SPACE (U+3000), are never part of white space."
2916
2917         The old code was only matching SPACE (U+0020) which is buggy. This patch
2918         adds support for the other caracters.
2919
2920         Tests: fast/selectors/attr-list-01.html
2921                fast/selectors/attribute-list-with-whitespace-in-selector.html
2922                fast/selectors/attribute-list-with-whitespace-in-value.html
2923
2924         * css/SelectorChecker.cpp:
2925         (WebCore::attributeValueMatches):
2926         * cssjit/SelectorCompiler.cpp:
2927         (WebCore::SelectorCompiler::constructFragments):
2928         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
2929         Add the missing checks.
2930
2931         * html/track/VTTRegion.cpp:
2932         (WebCore::VTTRegion::setRegionSettings):
2933         (WebCore::VTTRegion::parseSettingValue):
2934         * html/track/WebVTTParser.cpp:
2935         (WebCore::WebVTTParser::hasRequiredFileIdentifier):
2936         (WebCore::WebVTTParser::collectTimingsAndSettings):
2937         * html/track/WebVTTParser.h:
2938         While looking for affected code, I discovered WebVTT redefines isHTMLSpace().
2939         I cleaned that code.
2940
2941 2014-09-17  Gavin Barraclough  <baraclough@apple.com>
2942
2943         Aways have a PageThrottler (sometimes have a UserActivity::Impl)
2944         https://bugs.webkit.org/show_bug.cgi?id=136892
2945
2946         Reviewed by Geoffrey Garen.
2947
2948         Some instances of Page have a PageThrottler to track activity on the Page, and some do not.
2949         (Specifically, those created from WebPage in WK2 do, those related to WK1, SVG & inspector do not).
2950
2951         We do this for three reasons:
2952             * We do not need to take AppNap assertions on WK1.
2953             * Some Pages do not track their visibility correctly, and would always claim to be visible.
2954             * Page VisibilityState is not set until after construction, so if we instantiate
2955
2956         Creating the entire PageThrottler lazily has the drawback that we have to check for its existence at
2957         numerous points throughout the code, and we'll miss activity that occurs between the Page being created
2958         & the PageThrottler added to it (really a theoretical problem right now, since they're currently always
2959         created pretty much back to back).
2960
2961         Instead, Page should always have a PageThrottler, & instead make the UserActivity::Impl on the
2962         PageThrottler be added later.
2963
2964         * WebCore.exp.in:
2965             - createPageThrottler -> enablePageThrottler
2966         * html/HTMLMediaElement.cpp:
2967         (WebCore::HTMLMediaElement::parseAttribute):
2968             - Page::pageThrottler now returns a reference rather than a pointer
2969         * loader/FrameLoader.cpp:
2970         (WebCore::FrameLoader::started):
2971             - Page::pageThrottler now returns a reference rather than a pointer
2972         * page/Page.cpp:
2973         (WebCore::Page::Page):
2974             - instantiate PageThrottler in constructor
2975         (WebCore::Page::enablePageThrottler):
2976             - renamed from createPageThrottler, instead of creating the PageThrottler this method now
2977               instruct PageThrottler to create a UserActivity::Impl
2978         (WebCore::Page::setViewState):
2979             - m_pageThrottler is not a pointer
2980         (WebCore::Page::createPageThrottler): Deleted.
2981             - renamed to enablePageThrottler
2982         * page/Page.h:
2983         (WebCore::Page::pageThrottler):
2984             - now returns a reference
2985         * page/PageThrottler.cpp:
2986         (WebCore::PageThrottler::PageThrottler):
2987             - no longer instantiate m_activity
2988         (WebCore::PageThrottler::createUserActivity):
2989             - lazily instantiate m_activity, call updateUserActivity
2990         (WebCore::PageThrottler::updateUserActivity):
2991             - m_activity may not yet be instantiated; added early return
2992         * page/PageThrottler.h:
2993             - m_activity becomes a std::unique_ptr, added createUserActivity
2994
2995 2014-09-17  Daniel Bates  <dabates@apple.com>
2996
2997         [iOS] Make WebCore build with public iOS SDK
2998         https://bugs.webkit.org/show_bug.cgi?id=136487
2999
3000         Reviewed by David Kilzer.
3001
3002         Add headers that wrap Mac and iOS SPIs and update WebCore source files to include these
3003         headers instead of the corresponding actual SPI header(s).
3004
3005         * WebCore.vcxproj/WebCore.vcxproj:
3006         * WebCore.vcxproj/WebCore.vcxproj.filters:
3007         * WebCore.vcxproj/WebCoreCG.props:
3008         * WebCore.vcxproj/copyForwardingHeaders.cmd:
3009         * WebCore.xcodeproj/project.pbxproj:
3010         * bindings/objc/DOMInternal.mm:
3011         * bridge/objc/objc_instance.mm:
3012         * platform/audio/ios/MediaSessionManagerIOS.mm:
3013         * platform/cocoa/DisplaySleepDisablerCocoa.cpp:
3014         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3015         * platform/graphics/SimpleFontData.h:
3016         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3017         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3018         * platform/graphics/cg/BitmapImageCG.cpp:
3019         * platform/graphics/cg/ColorCG.cpp:
3020         * platform/graphics/cg/GraphicsContextCG.cpp:
3021         * platform/graphics/cg/ImageSourceCG.cpp:
3022         * platform/graphics/cg/PDFDocumentImage.cpp:
3023         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3024         * platform/graphics/ios/FontCacheIOS.mm:
3025         * platform/graphics/ios/FontServicesIOS.mm:
3026         * platform/graphics/ios/SimpleFontDataIOS.mm:
3027         * platform/graphics/mac/FontMac.mm:
3028         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
3029         * platform/graphics/mac/MediaPlayerProxy.h:
3030         * platform/graphics/mac/SimpleFontDataMac.mm:
3031         * platform/ios/LegacyTileCache.mm:
3032         * platform/ios/LegacyTileGrid.mm:
3033         * platform/ios/LegacyTileGridTile.mm:
3034         * platform/ios/PlatformEventFactoryIOS.mm:
3035         * platform/ios/PlatformScreenIOS.mm:
3036         * platform/ios/WebEvent.mm:
3037         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3038         * platform/ios/wak/WAKAppKitStubs.h:
3039         * platform/ios/wak/WAKView.h:
3040         * platform/ios/wak/WKGraphics.h:
3041         * platform/ios/wak/WKGraphics.mm:
3042         * platform/ios/wak/WebCoreThread.mm:
3043         * platform/network/ios/QuickLook.mm:
3044         * platform/spi/ca/CALayerSPI.h: Added.
3045         * platform/spi/ca/CATiledLayerSPI.h: Added.
3046         * platform/spi/cf/CFLocaleSPI.h: Modified to use EXTERN_C.
3047         * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Ditto. Also changed header visibility from private to project.
3048         * platform/spi/cf/CFURLRequestSPI.h: Ditto. Also modified to unconditionally include header <CoreFoundation/CFBase.h>.
3049         * platform/spi/cg/CGColorTransformSPI.h: Added.
3050         * platform/spi/cg/CGContextSPI.h: Added.
3051         * platform/spi/cg/CGFloatSPI.h: Added.
3052         * platform/spi/cg/CGFontGlyphSupportSPI.h: Added.
3053         * platform/spi/cg/CGFontInfoSPI.h: Added.
3054         * platform/spi/cg/CGFontRenderingSPI.h: Added.
3055         * platform/spi/cg/CGFontUnicodeSupportSPI.h: Added.
3056         * platform/spi/cg/CGImageSPI.h: Added.
3057         * platform/spi/cg/CGSRegionSPI.h: Added.
3058         * platform/spi/cocoa/DispatchSPI.h: Added.
3059         * platform/spi/cocoa/IOPMLibSPI.h: Added.
3060         * platform/spi/cocoa/MachVMSPI.h: Added.
3061         * platform/spi/cocoa/NSFileManagerSPI.h: Added.
3062         * platform/spi/cocoa/NSGeometrySPI.h: Added.
3063         * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
3064         * platform/spi/cocoa/dyldSPI.h: Added.
3065         * platform/spi/ios/AVPlayerControllerSPI.h: Added.
3066         * platform/spi/ios/AVPlayerViewControllerSPI.h: Added.
3067         * platform/spi/ios/AVValueTimingSPI.h: Added.
3068         * platform/spi/ios/AVVideoLayerSPI.h: Added.
3069         * platform/spi/ios/CTFontDescriptorSPI.h: Added.
3070         * platform/spi/ios/CTFontSPI.h: Added.
3071         * platform/spi/ios/CUICatalogSPI.h: Added.
3072         * platform/spi/ios/CUIStyleEffectConfigurationSPI.h: Added.
3073         * platform/spi/ios/MPAVRoutingControllerSPI.h: Added.
3074         * platform/spi/ios/MobileGestaltSPI.h: Added.
3075         * platform/spi/ios/QLPreviewConverterSPI.h: Added.
3076         * platform/spi/ios/QuickLookSPI.h: Added.
3077         * rendering/RenderThemeIOS.mm:
3078
3079 2014-09-17  Gavin Barraclough  <barraclough@apple.com>
3080
3081         DOM timer throttling for hidden plugins
3082         https://bugs.webkit.org/show_bug.cgi?id=136197
3083
3084         Reviewed by Geoff Garen & Andreas Kling.
3085
3086         For non-visible web pages we slow timers (since they can't be driving animations, etc).
3087         We should do the same for plugins.
3088
3089         There are a few steps to this:
3090             - JSPluginElementFunctions notifies DOMTimer when script interacts with a plugin.
3091             - DOMTimerFireState keeps a record of events that occur while a timer is firing.
3092             - DOMTimer::fired detects timers that interact with invisible/inaudible plugins, and flags itself for throtting.
3093             - DOMTimer::intervalClampedToMinimum sets timer intervals appropriately.
3094
3095         * bindings/js/JSPluginElementFunctions.cpp:
3096         (WebCore::pluginScriptObject):
3097             - notify DOMTimer when script interacts with a plugin.
3098         * html/HTMLPlugInElement.cpp:
3099         (WebCore::HTMLPlugInElement::isDetectable):
3100         * html/HTMLPlugInElement.h:
3101             - added isDetectable, to check for visible / audible plugins.
3102         * page/DOMTimer.cpp:
3103         (WebCore::DOMTimerFireState::DOMTimerFireState):
3104         (WebCore::DOMTimerFireState::~DOMTimerFireState):
3105             - track current DOMTimerFireState.
3106         (WebCore::DOMTimer::DOMTimer):
3107             - initialize m_throttleState.
3108         (WebCore::DOMTimer::scriptDidInteractWithPlugin):
3109             - if interaction with a plugin occurs while a timer is firing, record on the DOMTimerFireState.
3110         (WebCore::DOMTimer::fired):
3111             - set DOMTimerFireState, and update m_throttleState accordingly.
3112         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
3113             - remove redundant check of maxTimerNestingLevel (covered by intervalClampedToMinimum).
3114         (WebCore::DOMTimer::intervalClampedToMinimum):
3115             - Also take m_throttleState into account when throttling.
3116         * page/DOMTimer.h:
3117             - added scriptDidInteractWithPlugin, m_throttleState.
3118         * platform/audio/AudioHardwareListener.h:
3119             - enum -> enum class.
3120         * plugins/PluginViewBase.h:
3121         (WebCore::PluginViewBase::audioHardwareActivity):
3122             - expose audioHardwareActivity on PluginViewBase (previously available in subclass).
3123
3124 2014-09-16  Gavin Barraclough  <baraclough@apple.com>
3125
3126         Exclude page visibility from PageThrottler's hysteresis
3127         https://bugs.webkit.org/show_bug.cgi?id=136866
3128
3129         Reviewed by Geoff Garen.
3130
3131         Including visibility in the hysteresis mechanism has the effect of prolonging the visually
3132         idle timeout, and causing the page hide event to be run at foreground priority. Neither of
3133         these are particularly desirable. Instead separate visibility from the rest of the page
3134         activities we track (and apply hysteresis to), and feed this directly into determination
3135         of the UserActivity state.
3136
3137         * page/PageThrottler.cpp:
3138         (WebCore::PageThrottler::PageThrottler):
3139             - when the PageThrottler is instantiated call updateUserActivity to set initial UserActivity.
3140         (WebCore::PageThrottler::incrementActivityCount):
3141             - simplified - when m_activityCount becomes non-zero, start m_hysteresis.
3142         (WebCore::PageThrottler::decrementActivityCount):
3143             - simplified - when m_activityCount becomes zero, stop m_hysteresis.
3144         (WebCore::PageThrottler::updateUserActivity):
3145             - end the UserActivity (allow AppNap) if visually idle and no page activity is taking place.
3146         (WebCore::PageThrottler::setViewState):
3147             - when the visually idle state changed call updateUserActivity to update the UserActivity.
3148         (WebCore::PageThrottler::started):
3149         (WebCore::PageThrottler::stopped):
3150             - when the hysteresis state changed call updateUserActivity to update the UserActivity.
3151         (WebCore::PageThrottler::updateHysteresis): Deleted.
3152             - removed: simplified the hysteresis trigger, we now incorporate visually idle state in updateUserActivity.
3153         * page/PageThrottler.h:
3154             - removed updateHysteresis, added updateUserActivity.
3155         * platform/HysteresisActivity.h:
3156         (WebCore::HysteresisActivity::state):
3157             - determine the curent state of the HysteresisActivity - started, waiting, or stopped.
3158
3159 2014-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3160
3161         [GTK] Fix runtime critical warnings when writing to the clipboard after r173687
3162         https://bugs.webkit.org/show_bug.cgi?id=136891
3163
3164         Reviewed by Philippe Normand.
3165
3166         * platform/gtk/PasteboardHelper.cpp:
3167         (WebCore::PasteboardHelper::writeClipboardContents): Check passed
3168         callback is not null before trying to ref/unref it since
3169         g_closure_ref/unref are not null safe.
3170
3171 2014-09-17  Zan Dobersek  <zdobersek@igalia.com>
3172
3173         [GTK] Add a helper function for display system deduction
3174         https://bugs.webkit.org/show_bug.cgi?id=136849
3175
3176         Reviewed by Martin Robinson.
3177
3178         getDisplaySystemType() is a helper function that checks the type of the
3179         default GdkDisplay object and initializes a static variable to the
3180         corresponding value. It then returns the value of that variable.
3181
3182         When building with the GTK+2 API (still the case with the GTK+2 plugin
3183         process) we default to X11.
3184
3185         The function is declared and implemented in GtkUtilities files.
3186
3187         * platform/gtk/GtkUtilities.cpp:
3188         (WebCore::widgetIsOnscreenToplevelWindow):
3189         (WebCore::getDisplaySystemType):
3190         * platform/gtk/GtkUtilities.h:
3191
3192 2014-09-16  Yusuke Suzuki  <utatane.tea@gmail.com>
3193
3194         filterRootById accidentally clears inAdjacentChain flag
3195         https://bugs.webkit.org/show_bug.cgi?id=136851
3196
3197         Reviewed by Benjamin Poulain.
3198
3199         Test: fast/selectors/filter-root-node-with-selector-contains-adjacents.html
3200
3201         * dom/SelectorQuery.cpp:
3202         (WebCore::filterRootById):
3203
3204 2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3205
3206         [GTK] Fix layering violations in PasteboardGtk
3207         https://bugs.webkit.org/show_bug.cgi?id=136802
3208
3209         Reviewed by Darin Adler.
3210
3211         Refactor the Pasteboard code moving the WebCore parts to the Editor.
3212
3213         * PlatformGTK.cmake: Add new file to compilation.
3214         * editing/Editor.cpp:
3215         (WebCore::Editor::performCutOrCopy):
3216         (WebCore::Editor::copyImage):
3217         * editing/Editor.h:
3218         * editing/gtk/EditorGtk.cpp: Added.
3219         (WebCore::createFragmentFromPasteBoardData):
3220         (WebCore::Editor::pasteWithPasteboard):
3221         (WebCore::getImageAndURLForElement):
3222         (WebCore::Editor::writeImageToPasteboard):
3223         (WebCore::Editor::writeSelectionToPasteboard):
3224         * page/DragController.cpp:
3225         (WebCore::DragController::startDrag):
3226         * page/gtk/DragControllerGtk.cpp:
3227         (WebCore::DragController::declareAndWriteDragImage):
3228         * platform/Pasteboard.h:
3229         * platform/gtk/DataObjectGtk.cpp: Remove range member, the caller
3230         should call setText() + setMarkup() intead.
3231         (WebCore::DataObjectGtk::setText):
3232         (WebCore::DataObjectGtk::setMarkup):
3233         (WebCore::DataObjectGtk::clearText):
3234         (WebCore::DataObjectGtk::clearMarkup):
3235         (WebCore::DataObjectGtk::clearAllExceptFilenames):
3236         * platform/gtk/DataObjectGtk.h:
3237         (WebCore::DataObjectGtk::hasText):
3238         (WebCore::DataObjectGtk::hasMarkup):
3239         (WebCore::DataObjectGtk::clearImage):
3240         (WebCore::DataObjectGtk::text):
3241         (WebCore::DataObjectGtk::markup):
3242         (WebCore::DataObjectGtk::setRange): Deleted.
3243         * platform/gtk/GtkDragAndDropHelper.h:
3244         * platform/gtk/PasteboardGtk.cpp:
3245         (WebCore::PasteboardImage::PasteboardImage):
3246         (WebCore::PasteboardImage::~PasteboardImage):
3247         (WebCore::Pasteboard::write):
3248         (WebCore::Pasteboard::writeSelection): Deleted.
3249         (WebCore::getURLForImageElement): Deleted.
3250         (WebCore::Pasteboard::writeImage): Deleted.
3251         (WebCore::Pasteboard::documentFragment): Deleted.
3252         * platform/gtk/PasteboardHelper.cpp:
3253         (WebCore::displayFromFrame): Deleted.
3254         (WebCore::PasteboardHelper::getPrimarySelectionClipboard): Deleted.
3255         * platform/gtk/PasteboardHelper.h:
3256
3257 2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3258
3259         DragData should not depend on Clipboard, DocumentFragment, and Document
3260         https://bugs.webkit.org/show_bug.cgi?id=21358
3261
3262         Reviewed by Darin Adler.
3263
3264         Refactor DragData to not depend on Frame, DocumentFragment,
3265         Document and Range. DragData::asFragment() has been moved to
3266         DragController and implemented in the platform specific file.
3267         DragData methods using Frame has been reworked in Mac to not use
3268         Frame, since all other ports were ignoreing the frame parameter.
3269
3270         * page/DragController.cpp:
3271         (WebCore::DragController::documentFragmentFromDragData): Make it
3272         a static member to be able to use createFragmentFromDragData().
3273         (WebCore::DragController::performDragOperation): Update to
3274         DragData API changes.
3275         (WebCore::DragController::dispatchTextInputEventFor): Ditto.
3276         (WebCore::DragController::concludeEditDrag): Ditto.
3277         (WebCore::documentFragmentFromDragData): Deleted.
3278         * page/DragController.h:
3279         * page/efl/DragControllerEfl.cpp:
3280         (WebCore::DragController::createFragmentFromDragData): Move
3281         DragData::asFragment() implementation here.
3282         * page/gtk/DragControllerGtk.cpp:
3283         (WebCore::DragController::dragOperation):
3284         (WebCore::DragController::createFragmentFromDragData): Ditto.
3285         * page/mac/DragControllerMac.mm:
3286         (WebCore::DragController::dragOperation):
3287         (WebCore::DragController::createFragmentFromDragData): Ditto.
3288         * page/win/DragControllerWin.cpp:
3289         (WebCore::DragController::createFragmentFromDragData): Ditto.
3290         * platform/DragData.h:
3291         * platform/efl/DragDataEfl.cpp:
3292         (WebCore::DragData::asPlainText): Remove Frame parameter.
3293         (WebCore::DragData::containsURL): Ditto.
3294         (WebCore::DragData::asURL): Ditto.
3295         (WebCore::DragData::asFragment): Deleted.
3296         * platform/gtk/DragDataGtk.cpp:
3297         (WebCore::DragData::asPlainText): Remove Frame parameter.
3298         (WebCore::DragData::containsCompatibleContent):
3299         (WebCore::DragData::containsURL): Ditto.
3300         (WebCore::DragData::asURL): Ditto.
3301         (WebCore::DragData::asFragment): Deleted.
3302         * platform/mac/DragDataMac.mm:
3303         (WebCore::DragData::asPlainText): Same implementation as the
3304         Editor.
3305         (WebCore::DragData::containsURL): Remove Frame parameter.
3306         (WebCore::DragData::asURL): Use URLByCanonicalizingURL() instead
3307         of using the Editor client.
3308         (WebCore::DragData::asFragment): Deleted.
3309         * platform/win/DragDataWin.cpp:
3310         (WebCore::DragData::containsURL): Remove Frame parameter.
3311         (WebCore::DragData::asURL): Ditto.
3312         (WebCore::DragData::asPlainText): Ditto.
3313         (WebCore::DragData::containsCompatibleContent):
3314         (WebCore::DragData::asFragment): Deleted.
3315
3316 2014-09-16  Chris Dumez  <cdumez@apple.com>
3317
3318         Rename Node::childNode(index) to traverseToChildAt(index) for clarity
3319         https://bugs.webkit.org/show_bug.cgi?id=136825
3320
3321         Reviewed by Benjamin Poulain.
3322
3323         Rename Node::childNode(index) to traverseToChildAt(index) to make it
3324         clearer that the method is actually traversing the children and thus
3325         potentially expensive.
3326
3327         This patch also avoids calling traverseToChildAt() in a couple of
3328         easily avoidable cases.
3329
3330         No new tests, no behavior change.
3331
3332         * WebCore.exp.in:
3333         * WebCore.order:
3334         Remove symbol for ContainerNode::childNode() as it was renamed. It does
3335         not seem we need to expose ContainerNode::traverseToChildAt().
3336
3337         * accessibility/AccessibilityObject.cpp:
3338         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
3339         (WebCore::AccessibilityObject::lengthForVisiblePositionRange):
3340         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3341         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
3342         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3343         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
3344         Mechanical renaming.
3345
3346         * dom/ContainerNode.cpp:
3347         (WebCore::ContainerNode::traverseToChildAt):
3348         (WebCore::ContainerNode::childNode): Deleted.
3349         * dom/ContainerNode.h:
3350         (WebCore::Node::traverseToChildAt):
3351         (WebCore::Node::childNode): Deleted.
3352         * dom/Node.h:
3353         - Rename Node / ContainerNode's childNode(index) to
3354           traverseToChildAt(index) to make it clear that it is actually
3355           traversing the children and thus potentially expensive.
3356         - Clean up the implementation of ContainerNode::traverseToChildAt()
3357           to avoid the use of an extra |i| variable.
3358
3359         * dom/Position.cpp:
3360         (WebCore::Position::computeNodeBeforePosition):
3361         Avoid calling traverseToChildAt(-1). Relying on the unsigned argument
3362         wrapping and the method returning null in this case is a bit obscure
3363         and causes unnecessary traversal of all children.
3364
3365         (WebCore::Position::computeNodeAfterPosition):
3366         (WebCore::Position::previous):
3367         (WebCore::Position::next):
3368         Mechanical renaming and update variable names to stop using
3369         abbreviations as per coding style.
3370
3371         * dom/PositionIterator.h:
3372         (WebCore::PositionIterator::PositionIterator):
3373         * dom/Range.cpp:
3374         (WebCore::Range::insertNode):
3375         (WebCore::Range::checkNodeWOffset):
3376         (WebCore::Range::firstNode):
3377         (WebCore::Range::pastLastNode):
3378         * dom/RangeBoundaryPoint.h:
3379         (WebCore::RangeBoundaryPoint::set):
3380         * editing/BreakBlockquoteCommand.cpp:
3381         (WebCore::BreakBlockquoteCommand::doApply):
3382         * editing/CompositeEditCommand.cpp:
3383         (WebCore::CompositeEditCommand::removeChildrenInRange):
3384         * editing/DeleteSelectionCommand.cpp:
3385         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3386         * editing/InsertParagraphSeparatorCommand.cpp:
3387         (WebCore::InsertParagraphSeparatorCommand::doApply):
3388         * editing/TextIterator.cpp:
3389         (WebCore::nextInPreOrderCrossingShadowBoundaries):
3390         (WebCore::TextIterator::node):
3391         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3392         * editing/VisibleUnits.cpp:
3393         (WebCore::nextLinePosition):
3394         * editing/cocoa/HTMLConverter.mm:
3395         (WebCore::editingAttributedStringFromRange):
3396         Mechanical renaming.
3397
3398         * inspector/DOMPatchSupport.cpp:
3399         (WebCore::DOMPatchSupport::innerPatchChildren):
3400         Iterate over children while incrementing the |i| variable to avoid
3401         calling traverseToChildAt(index) repeatedly and thus traversing the
3402         children from the beginning every time.
3403
3404 2014-09-16  Joseph Pecoraro  <pecoraro@apple.com>
3405
3406         Web Inspector: Reduce a bit of churn setting initial remote inspection state
3407         https://bugs.webkit.org/show_bug.cgi?id=136875
3408
3409         Reviewed by Timothy Hatcher.
3410
3411         * bindings/js/JSDOMGlobalObject.cpp:
3412         (WebCore::JSDOMGlobalObject::finishCreation):
3413         We no longer need to toggle this state.
3414
3415 2014-09-16  Enrica Casucci  <enrica@apple.com>
3416
3417         Should have an editing behavior specific for IOS.
3418         https://bugs.webkit.org/show_bug.cgi?id=136876
3419
3420         Reviewed by Sam Weinig.
3421
3422         This patch introduces a new editing behavior type to be able
3423         to perform editing tasks that are specific to iOS.
3424         All the existing EditingBehavior