a6dc4fba4b0fd445bd65a996311d45a6fc893e41
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-29  Brian J. Burg  <burg@cs.washington.edu>
2
3         Web Inspector: InspectorValues should use references for out parameters
4         https://bugs.webkit.org/show_bug.cgi?id=137190
5
6         Reviewed by Joseph Pecoraro.
7
8         Clean up some call sites to explicitly check for cast success, and simplify
9         some exceptional control flows.
10
11         No new tests, no behavior changed.
12
13         * inspector/CommandLineAPIHost.cpp:
14         (WebCore::CommandLineAPIHost::inspectImpl):
15         * inspector/InspectorCSSAgent.cpp:
16         (WebCore::computePseudoClassMask):
17         * inspector/InspectorDOMAgent.cpp:
18         (WebCore::parseColor):
19         (WebCore::parseConfigColor):
20         (WebCore::parseQuad):
21         (WebCore::InspectorDOMAgent::performSearch):
22         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
23         (WebCore::InspectorDOMAgent::innerHighlightQuad):
24         (WebCore::InspectorDOMAgent::highlightFrame):
25         * inspector/InspectorDOMStorageAgent.cpp:
26         (WebCore::InspectorDOMStorageAgent::findStorageArea):
27         * inspector/InspectorIndexedDBAgent.cpp: Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
28         * inspector/InspectorPageAgent.cpp:
29         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
30         * inspector/InspectorReplayAgent.cpp:
31         (WebCore::InspectorReplayAgent::replayToPosition):
32         * inspector/InspectorResourceAgent.cpp:
33         (WebCore::InspectorResourceAgent::willSendRequest):
34         * inspector/InspectorStyleSheet.cpp:
35         (WebCore::InspectorStyle::styleWithProperties):
36         * inspector/InspectorStyleSheet.h:
37         (WebCore::InspectorCSSId::InspectorCSSId):
38         * inspector/InspectorTimelineAgent.cpp:
39         (WebCore::InspectorTimelineAgent::startFromConsole):
40         (WebCore::InspectorTimelineAgent::stopFromConsole):
41         * inspector/InspectorWorkerAgent.cpp:
42
43 2014-09-29  Christophe Dumez  <cdumez@apple.com>
44
45         Use is<>() / downcast<>() for Document
46         https://bugs.webkit.org/show_bug.cgi?id=137221
47
48         Reviewed by Andreas Kling.
49
50         Use is<>() / downcast<>() for Document instead of isDocumentNode() /
51         toDocument().
52
53         No new tests, no behavior change.
54
55         * Modules/geolocation/Geolocation.cpp:
56         (WebCore::Geolocation::document):
57         (WebCore::Geolocation::frame):
58         (WebCore::Geolocation::page):
59         * Modules/indexeddb/IDBFactory.cpp:
60         * Modules/mediasource/SourceBuffer.cpp:
61         (WebCore::SourceBuffer::document):
62         * Modules/mediastream/RTCPeerConnection.cpp:
63         (WebCore::RTCPeerConnection::RTCPeerConnection):
64         * Modules/notifications/Notification.cpp:
65         (WebCore::Notification::Notification):
66         (WebCore::Notification::show):
67         (WebCore::Notification::permission):
68         (WebCore::Notification::requestPermission):
69         * Modules/webaudio/AudioContext.cpp:
70         (WebCore::AudioContext::document):
71         * Modules/webaudio/OfflineAudioContext.cpp:
72         (WebCore::OfflineAudioContext::create):
73         * Modules/webdatabase/DatabaseContext.cpp:
74         (WebCore::DatabaseContext::allowDatabaseAccess):
75         (WebCore::DatabaseContext::databaseExceededQuota):
76         * Modules/websockets/ThreadableWebSocketChannel.cpp:
77         (WebCore::ThreadableWebSocketChannel::create):
78         * Modules/websockets/WebSocket.cpp:
79         (WebCore::WebSocket::connect):
80         * Modules/websockets/WebSocketHandshake.cpp:
81         (WebCore::WebSocketHandshake::clientHandshakeMessage):
82         (WebCore::WebSocketHandshake::clientHandshakeRequest):
83         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
84         (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
85         * bindings/gobject/WebKitDOMPrivate.cpp:
86         (WebKit::wrap):
87         * bindings/js/DOMConstructorWithDocument.h:
88         (WebCore::DOMConstructorWithDocument::document):
89         * bindings/js/DOMRequestState.h:
90         (WebCore::DOMRequestState::DOMRequestState):
91         (WebCore::DOMRequestState::clear):
92         * bindings/js/JSAudioContextCustom.cpp:
93         (WebCore::constructJSAudioContext):
94         * bindings/js/JSDOMGlobalObject.cpp:
95         (WebCore::toJSDOMGlobalObject):
96         * bindings/js/JSLazyEventListener.cpp:
97         (WebCore::JSLazyEventListener::initializeJSFunction):
98         * bindings/js/JSNodeCustom.cpp:
99         (WebCore::createWrapperInline):
100         * bindings/js/ScheduledAction.cpp:
101         (WebCore::ScheduledAction::execute):
102         * bindings/js/ScriptState.cpp:
103         (WebCore::frameFromExecState):
104         * crypto/SubtleCrypto.cpp:
105         (WebCore::SubtleCrypto::document):
106         * dom/Comment.cpp:
107         (WebCore::Comment::create):
108         * dom/ContainerNode.cpp:
109         (WebCore::checkAcceptChild):
110         * dom/ContainerNodeAlgorithms.cpp:
111         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
112         * dom/Document.h:
113         (WebCore::isDocument):
114         * dom/DocumentFragment.cpp:
115         (WebCore::DocumentFragment::create):
116         * dom/Element.cpp:
117         (WebCore::Element::computeInheritedLanguage):
118         * dom/EventDispatcher.cpp:
119         (WebCore::WindowEventContext::WindowEventContext):
120         * dom/EventTarget.cpp:
121         (WebCore::EventTarget::fireEventListeners):
122         * dom/NamedFlowCollection.cpp:
123         (WebCore::NamedFlowCollection::document):
124         * dom/Node.cpp:
125         (WebCore::Node::isDefaultNamespace):
126         (WebCore::Node::lookupPrefix):
127         (WebCore::Node::lookupNamespaceURI):
128         (WebCore::Node::removedLastRef):
129         * dom/Range.cpp:
130         (WebCore::Range::create):
131         * dom/ScriptExecutionContext.cpp:
132         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
133         * dom/Text.cpp:
134         (WebCore::Text::create):
135         * editing/MarkupAccumulator.cpp:
136         (WebCore::MarkupAccumulator::appendStartMarkup):
137         * html/HTMLDocument.h:
138         (WebCore::isHTMLDocument):
139         * html/HTMLNameCollection.h:
140         (WebCore::HTMLNameCollection::document):
141         * html/HTMLStyleElement.cpp:
142         (WebCore::HTMLStyleElement::insertedInto):
143         * html/ImageDocument.h:
144         (WebCore::isImageDocument):
145         * html/MediaDocument.h:
146         (WebCore::isMediaDocument):
147         * html/PluginDocument.h:
148         (WebCore::isPluginDocument):
149         * html/track/TextTrackCue.h:
150         (WebCore::TextTrackCue::ownerDocument):
151         * html/track/VTTCue.cpp:
152         (WebCore::VTTCue::initialize):
153         * html/track/VTTRegion.h:
154         (WebCore::VTTRegion::ownerDocument):
155         * inspector/InspectorDOMAgent.cpp:
156         (WebCore::InspectorDOMAgent::assertDocument):
157         (WebCore::InspectorDOMAgent::buildObjectForNode):
158         (WebCore::InspectorDOMAgent::innerParentNode):
159         * inspector/InspectorInstrumentation.cpp:
160         (WebCore::frameForScriptExecutionContext):
161         * inspector/InspectorInstrumentation.h:
162         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
163         * loader/TextTrackLoader.cpp:
164         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
165         (WebCore::TextTrackLoader::notifyFinished):
166         (WebCore::TextTrackLoader::load):
167         * loader/ThreadableLoader.cpp:
168         (WebCore::ThreadableLoader::create):
169         (WebCore::ThreadableLoader::loadResourceSynchronously):
170         * loader/WorkerThreadableLoader.cpp:
171         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
172         * page/ContentSecurityPolicy.cpp:
173         (WebCore::ContentSecurityPolicy::reportViolation):
174         * page/Crypto.cpp:
175         (WebCore::Crypto::document):
176         * page/DOMTimer.cpp:
177         (WebCore::DOMTimer::install):
178         (WebCore::DOMTimer::fired):
179         * page/DOMWindow.cpp:
180         (WebCore::DOMWindow::focus):
181         (WebCore::DOMWindow::close):
182         (WebCore::DOMWindow::document):
183         (WebCore::DOMWindow::styleMedia):
184         (WebCore::DOMWindow::getComputedStyle):
185         * page/DragController.cpp:
186         (WebCore::DragController::dragExited):
187         (WebCore::DragController::dragEnteredOrUpdated):
188         * page/EventSource.cpp:
189         (WebCore::EventSource::create):
190         * page/FocusController.cpp:
191         (WebCore::FocusController::advanceFocusDirectionally):
192         * page/History.cpp:
193         (WebCore::History::go):
194         * page/SpatialNavigation.cpp:
195         (WebCore::scrollInDirection):
196         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
197         (WebCore::canScrollInDirection):
198         (WebCore::nodeRectInAbsoluteCoordinates):
199         * svg/SVGDocument.h:
200         (WebCore::isSVGDocument):
201         * testing/Internals.cpp:
202         (WebCore::Internals::contextDocument):
203         (WebCore::Internals::frame):
204         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
205         * testing/js/WebCoreTestSupport.cpp:
206         (WebCoreTestSupport::injectInternalsObject):
207         (WebCoreTestSupport::resetInternalsObject):
208         * workers/DefaultSharedWorkerRepository.cpp:
209         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
210         * workers/WorkerMessagingProxy.cpp:
211         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
212         * xml/XMLHttpRequest.cpp:
213         (WebCore::XMLHttpRequest::document):
214         (WebCore::XMLHttpRequest::open):
215
216 2014-09-29  David Hyatt  <hyatt@apple.com>
217
218         REGRESSION (r168046): Confused column spans when combined with dynamic animations
219         https://bugs.webkit.org/show_bug.cgi?id=134048.
220
221         Reviewed by Dean Jackson.
222
223         Added fast/multicol/multicol-fieldset-span-changes.html
224
225         * rendering/RenderMultiColumnFlowThread.cpp:
226         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
227         Refactor handling of insertions into the multicolumn flow thread into
228         a helper function, processPossibleSpannerDescendant. This makes it easier
229         to call the code from more than one place.
230
231         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
232         Modify the nested columns span shifting code to avoid problems. The
233         new code suppresses notifications and does the move of the spanner back
234         into the original spot *before* removing the placeholder. This ensures that
235         the placeholder parent still exists.
236         
237         The stale placeholder is then removed and destroyed after the spanner has been put back
238         into place.
239
240         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
241         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
242         Refactor the removal notifications for spanners into a helper function so that it can
243         be called to do cleanup from the code that cleans up stale placeholders on a shift.
244
245         * rendering/RenderMultiColumnFlowThread.h:
246         Modified to add the new helpers.
247
248 2014-09-29  Christophe Dumez  <cdumez@apple.com>
249
250         Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement
251         https://bugs.webkit.org/show_bug.cgi?id=137222
252
253         Reviewed by Ryosuke Niwa.
254
255         Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement instead of
256         NODE_TYPE_CASTS() + NodeTypeCastTraits template specialization.
257
258         No new tests, no behavior change.
259
260         * accessibility/AccessibilityNodeObject.cpp:
261         (WebCore::AccessibilityNodeObject::accessibilityDescription):
262         * accessibility/AccessibilityRenderObject.cpp:
263         (WebCore::AccessibilityRenderObject::isMathElement):
264         * css/CSSDefaultStyleSheets.cpp:
265         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
266         * mathml/MathMLElement.cpp:
267         (WebCore::MathMLElement::attributeChanged):
268         * mathml/MathMLElement.h:
269         (WebCore::isMathMLElement):
270         * mathml/MathMLSelectElement.cpp:
271         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
272
273 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
274
275         [Mac] Remove MediaPlayerPrivateQTKit frame rate code
276         https://bugs.webkit.org/show_bug.cgi?id=137217
277
278         Reviewed by Carlos Garcia Campos.
279
280         No new tests, this removes obsolete code.
281
282         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
283         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
284         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
285         (WebCore::MediaPlayerPrivateQTKit::play):
286         (WebCore::MediaPlayerPrivateQTKit::pause):
287         (WebCore::MediaPlayerPrivateQTKit::didEnd):
288         (WebCore::MediaPlayerPrivateQTKit::repaint):
289         (WebCore::MediaPlayerPrivateQTKit::paint):
290
291 2014-09-29  Chris Fleizach  <cfleizach@apple.com>
292
293         AX: in an aria-labelledby computation, do not traverse into elements whose nameFrom value does not include 'contents'
294         https://bugs.webkit.org/show_bug.cgi?id=136714
295
296         Reviewed by Darin Adler.
297
298         There are certain ARIA elements that tell us we should not query their children when determining the name of the object.
299         Those ones have the "nameFrom" property set to "author" instead of "contents." WebKit needs to honor that status.
300
301         Test: accessibility/aria-namefrom-author.html
302               Modified: accessibility/aria-labelledby-with-descendants.html
303
304         * accessibility/AccessibilityNodeObject.cpp:
305         (WebCore::shouldUseAccessiblityObjectInnerText):
306         (WebCore::shouldAddSpaceBeforeAppendingNextElement):
307         (WebCore::appendNameToStringBuilder):
308         (WebCore::AccessibilityNodeObject::textUnderElement):
309         (WebCore::accessibleNameForNode):
310         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
311         * accessibility/AccessibilityObject.cpp:
312         (WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
313         (WebCore::initializeRoleMap):
314         * accessibility/AccessibilityObject.h:
315
316 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
317
318         [iOS] Optimize media controls AirPlay discovery
319         https://bugs.webkit.org/show_bug.cgi?id=137180
320
321         Reviewed by Darin Adler.
322         
323         AirPlay discovery mode uses increases power consumption, so don't enable it when there
324         is no chance an AirPlay target picker will be useful.
325
326         * Modules/mediacontrols/mediaControlsiOS.js:
327         (ControllerIOS): Initialize isListeningForPlaybackTargetAvailabilityEvent.
328         (ControllerIOS.prototype.addVideoListeners): Don't enable register wireless playback event
329             listeners, it isn't possible to show the target picker until there is an inline controller.
330         (ControllerIOS.prototype.removeVideoListeners): Call setShouldListenForPlaybackTargetAvailabilityEvent.
331         (ControllerIOS.prototype.setControlsType): Add wireless event listers on when not showing 
332             the one button controller.
333         (ControllerIOS.prototype.updateStatusDisplay): Unregister wireless event listeners when the
334             media element is in an error state.
335         (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): New, add or
336             remove event listeners. 
337
338 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
339
340         [iOS] Remove obsolete playbackTargetAvailabilityChanged methods
341         https://bugs.webkit.org/show_bug.cgi?id=137179
342
343         Reviewed by Darin Adler.
344
345         No new tests, this just removes unused code.
346
347         * html/HTMLMediaElement.cpp:
348         (WebCore::HTMLMediaElement::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.
349         * html/HTMLMediaElement.h:
350
351         * platform/graphics/MediaPlayer.cpp:
352         (WebCore::MediaPlayer::playbackTargetAvailabilityChanged): Deleted.
353         * platform/graphics/MediaPlayer.h:
354         (WebCore::MediaPlayerClient::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.
355
356 2014-09-29  Christophe Dumez  <cdumez@apple.com>
357
358         Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
359         https://bugs.webkit.org/show_bug.cgi?id=137199
360
361         Reviewed by Darin Adler.
362
363         Use the new is<>() / downcast<>() for ShadowRoot and StyledElement and
364         move towards getting rid of the NODE_TYPE_CASTS() macro.
365
366         No new tests, no behavior change.
367
368         * css/ElementRuleCollector.cpp:
369         (WebCore::ElementRuleCollector::matchAllRules):
370         * css/StyleResolver.cpp:
371         (WebCore::StyleResolver::State::initElement):
372         (WebCore::StyleResolver::State::initForStyleResolve):
373         (WebCore::StyleResolver::locateCousinList):
374         (WebCore::StyleResolver::findSiblingForStyleSharing):
375         * dom/Attr.cpp:
376         (WebCore::Attr::style):
377         * dom/Element.cpp:
378         (WebCore::Element::removeAttribute):
379         * dom/EventDispatcher.cpp:
380         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
381         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
382         (WebCore::eventTargetRespectingTargetRules):
383         (WebCore::EventPath::EventPath):
384         * dom/Node.cpp:
385         (WebCore::Node::containingShadowRoot):
386         (WebCore::Node::parentOrShadowHostElement):
387         (WebCore::Node::showNodePathForThis):
388         * dom/NodeRenderingTraversal.cpp:
389         (WebCore::NodeRenderingTraversal::traverseParent):
390         * dom/ShadowRoot.h:
391         (WebCore::isShadowRoot):
392         (WebCore::Node::shadowRoot):
393         (WebCore::Node::parentOrShadowHostNode):
394         * dom/StyledElement.h:
395         (WebCore::StyledElement::presentationAttributeStyle):
396         (WebCore::isStyledElement):
397         * dom/Text.cpp:
398         (WebCore::isSVGShadowText):
399         * dom/TreeScope.cpp:
400         (WebCore::TreeScope::focusedElement):
401         * dom/TreeScopeAdopter.cpp:
402         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
403         * editing/ApplyStyleCommand.cpp:
404         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
405         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
406         * editing/EditingStyle.cpp:
407         (WebCore::EditingStyle::wrappingStyleForSerialization):
408         * editing/Editor.cpp:
409         (WebCore::Editor::applyEditingStyleToElement):
410         * editing/ReplaceSelectionCommand.cpp:
411         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
412         * editing/cocoa/HTMLConverter.mm:
413         (HTMLConverterCaches::inlineStylePropertyForElement):
414         * editing/markup.cpp:
415         (WebCore::StyledMarkupAccumulator::appendElement):
416         * inspector/InspectorCSSAgent.cpp:
417         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
418         * inspector/InspectorOverlay.cpp:
419         (WebCore::buildObjectForElementInfo):
420         * page/DragController.cpp:
421         (WebCore::asFileInput):
422         * page/EventHandler.cpp:
423         (WebCore::EventHandler::handleMousePressEvent):
424         * page/FocusController.cpp:
425         (WebCore::FocusNavigationScope::owner):
426         * page/PageSerializer.cpp:
427         (WebCore::PageSerializer::serializeFrame):
428         * rendering/RenderLayer.cpp:
429         (WebCore::RenderLayer::resize):
430         * svg/SVGElement.cpp:
431         (WebCore::SVGElement::title):
432         * testing/Internals.cpp:
433         (WebCore::Internals::shadowRoot):
434         (WebCore::Internals::shadowRootType):
435         (WebCore::Internals::includerFor):
436
437 2014-09-29  Christophe Dumez  <cdumez@apple.com>
438
439         Use the new is<>() / downcast<>() for Text Nodes
440         https://bugs.webkit.org/show_bug.cgi?id=137188
441
442         Reviewed by Darin Adler.
443
444         Use the new is<>() / downcast<>() functions for Text Nodes instead of
445         isText() / toText().
446
447         No new tests, no behavior change.
448
449         * accessibility/AccessibilityNodeObject.cpp:
450         (WebCore::AccessibilityNodeObject::textUnderElement):
451         * bindings/gobject/WebKitDOMPrivate.cpp:
452         (WebKit::wrap):
453         * css/SelectorChecker.cpp:
454         (WebCore::SelectorChecker::checkOne):
455         * dom/CharacterData.cpp:
456         (WebCore::CharacterData::parserAppendData):
457         (WebCore::CharacterData::setDataAndUpdate):
458         * dom/ContainerNode.cpp:
459         (WebCore::destroyRenderTreeIfNeeded):
460         * dom/Node.cpp:
461         (WebCore::Node::normalize):
462         * dom/Position.cpp:
463         (WebCore::Position::containerNode):
464         (WebCore::Position::containerText):
465         (WebCore::Position::isRenderedCharacter):
466         (WebCore::Position::leadingWhitespacePosition):
467         * dom/Range.cpp:
468         (WebCore::Range::insertNode):
469         (WebCore::Range::getBorderAndTextQuads):
470         * dom/Text.cpp:
471         (WebCore::earliestLogicallyAdjacentTextNode):
472         (WebCore::latestLogicallyAdjacentTextNode):
473         * dom/Text.h:
474         (WebCore::isText):
475         * dom/TextNodeTraversal.cpp:
476         (WebCore::TextNodeTraversal::contentsAsString):
477         * dom/TextNodeTraversal.h:
478         (WebCore::TextNodeTraversal::firstTextChildTemplate):
479         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
480         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
481         (WebCore::TextNodeTraversal::nextSibling):
482         * editing/ApplyBlockElementCommand.cpp:
483         (WebCore::isNewLineAtPosition):
484         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
485         * editing/ApplyStyleCommand.cpp:
486         (WebCore::ApplyStyleCommand::splitTextAtEnd):
487         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
488         (WebCore::ApplyStyleCommand::joinChildTextNodes):
489         * editing/BreakBlockquoteCommand.cpp:
490         (WebCore::BreakBlockquoteCommand::doApply):
491         * editing/CompositeEditCommand.cpp:
492         (WebCore::CompositeEditCommand::insertNodeAt):
493         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
494         (WebCore::CompositeEditCommand::canRebalance):
495         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
496         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
497         (WebCore::CompositeEditCommand::deleteInsignificantText):
498         (WebCore::CompositeEditCommand::removePlaceholderAt):
499         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
500         (WebCore::CompositeEditCommand::moveParagraphs):
501         * editing/DeleteSelectionCommand.cpp:
502         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
503         (WebCore::DeleteSelectionCommand::fixupWhitespace):
504         (WebCore::DeleteSelectionCommand::doApply):
505         * editing/Editor.cpp:
506         (WebCore::Editor::setComposition):
507         * editing/InsertLineBreakCommand.cpp:
508         (WebCore::InsertLineBreakCommand::doApply):
509         * editing/InsertParagraphSeparatorCommand.cpp:
510         (WebCore::InsertParagraphSeparatorCommand::doApply):
511         * editing/InsertTextCommand.cpp:
512         (WebCore::InsertTextCommand::insertTab):
513         * editing/MarkupAccumulator.cpp:
514         (WebCore::MarkupAccumulator::appendStartMarkup):
515         * editing/ReplaceSelectionCommand.cpp:
516         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
517         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
518         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
519         (WebCore::ReplaceSelectionCommand::insertAsListItems):
520         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
521         * editing/TextIterator.cpp:
522         (WebCore::TextIterator::handleTextNode):
523         (WebCore::TextIterator::handleTextBox):
524         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
525         * editing/VisibleUnits.cpp:
526         (WebCore::startPositionForLine):
527         (WebCore::endPositionForLine):
528         (WebCore::startOfParagraph):
529         (WebCore::endOfParagraph):
530         * editing/htmlediting.cpp:
531         (WebCore::lineBreakExistsAtPosition):
532         * editing/markup.cpp:
533         (WebCore::StyledMarkupAccumulator::renderedText):
534         (WebCore::replaceChildrenWithFragment):
535         (WebCore::replaceChildrenWithText):
536         * html/HTMLElement.cpp:
537         (WebCore::mergeWithNextTextNode):
538         (WebCore::HTMLElement::setOuterHTML):
539         (WebCore::HTMLElement::setOuterText):
540         * html/HTMLObjectElement.cpp:
541         (WebCore::HTMLObjectElement::hasFallbackContent):
542         (WebCore::HTMLObjectElement::updateDocNamedItem):
543         * html/HTMLOptionElement.cpp:
544         (WebCore::HTMLOptionElement::setText):
545         * html/HTMLScriptElement.cpp:
546         (WebCore::HTMLScriptElement::setText):
547         * html/HTMLTextFormControlElement.cpp:
548         (WebCore::HTMLTextFormControlElement::innerTextValue):
549         (WebCore::positionForIndex):
550         (WebCore::HTMLTextFormControlElement::indexForPosition):
551         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
552         * html/HTMLTitleElement.cpp:
553         (WebCore::HTMLTitleElement::setText):
554         * html/parser/HTMLConstructionSite.cpp:
555         (WebCore::HTMLConstructionSite::insertTextNode):
556         * inspector/InspectorDOMAgent.cpp:
557         (WebCore::InspectorDOMAgent::setNodeValue):
558         * rendering/RenderCombineText.h:
559         * rendering/RenderNamedFlowThread.cpp:
560         (WebCore::RenderNamedFlowThread::getRanges):
561         * rendering/RenderText.cpp:
562         (WebCore::RenderText::textNode):
563         * rendering/svg/RenderSVGInlineText.h:
564         * style/StyleResolveTree.cpp:
565         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
566         (WebCore::Style::attachChildren):
567         (WebCore::Style::attachDistributedChildren):
568         (WebCore::Style::detachDistributedChildren):
569         (WebCore::Style::detachChildren):
570         (WebCore::Style::resolveShadowTree):
571         (WebCore::Style::resolveTree):
572
573 2014-09-29  Christophe Dumez  <cdumez@apple.com>
574
575         Remove remaining uses of NODE_TYPE_CASTS() from html/
576         https://bugs.webkit.org/show_bug.cgi?id=137172
577
578         Reviewed by Darin Adler.
579
580         Remove remaining uses of NODE_TYPE_CASTS() from html/ and use the new
581         SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
582         works for those types.
583
584         No new tests, no behavior change.
585
586         * css/SelectorCheckerTestFunctions.h:
587         (WebCore::matchesLangPseudoClass):
588         (WebCore::matchesFutureCuePseudoClass):
589         (WebCore::matchesPastCuePseudoClass):
590         * css/StyleResolver.cpp:
591         (WebCore::StyleResolver::canShareStyleWithElement):
592         The new casting function found a bad cast from a StyledElement to VTTElement.
593         Those two types are unrelated as VTTElement inherits directly from Element.
594         Knowing that |element| in this method cannot be a VTTElement simplifies the
595         logic a bit.
596
597         * dom/NodeRenderingTraversal.cpp:
598         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints):
599         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints):
600         (WebCore::NodeRenderingTraversal::traverseParent):
601         * html/HTMLLabelElement.cpp:
602         (WebCore::nodeAsSupportedLabelableElement):
603         * html/HTMLTextAreaElement.cpp:
604         (WebCore::HTMLTextAreaElement::innerTextElement):
605         * html/LabelableElement.h:
606         (WebCore::isLabelableElement):
607         * html/shadow/ContentDistributor.cpp:
608         (WebCore::ContentDistributor::ensureInsertionPointList):
609         * html/shadow/InsertionPoint.h:
610         (WebCore::isInsertionPoint):
611         (WebCore::isActiveInsertionPoint):
612         (WebCore::parentNodeForDistribution):
613         * html/shadow/TextControlInnerElements.h:
614         (WebCore::isTextControlInnerTextElement):
615         * html/track/VTTCue.cpp:
616         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
617         (WebCore::VTTCue::markFutureAndPastNodes):
618         * html/track/WebVTTElement.h:
619         (WebCore::isWebVTTElement):
620         * html/track/WebVTTParser.cpp:
621         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
622         * style/StyleResolveTree.cpp:
623         (WebCore::Style::attachRenderTree):
624         (WebCore::Style::detachChildren):
625
626 2014-09-29  Christophe Dumez  <cdumez@apple.com>
627
628         Make is<>() / downcast<>() work for HTMLDocument and its subclasses
629         https://bugs.webkit.org/show_bug.cgi?id=137169
630
631         Reviewed by Darin Adler.
632
633         Make is<>() / downcast<>() work for HTMLDocument and its subclasses by
634         using the SPECIALIZE_TYPE_TRAITS_*() macro. Drop the DOCUMENT_TYPE_CASTS()
635         macro as it is no longer needed.
636
637         No new tests, no behavior change.
638
639         * bindings/js/JSDOMWindowCustom.cpp:
640         (WebCore::namedItemGetter):
641         (WebCore::JSDOMWindow::getOwnPropertySlot):
642         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
643         * dom/Document.cpp:
644         (WebCore::Document::prepareForDestruction):
645         (WebCore::Document::processHttpEquiv):
646         (WebCore::eventTargetElementForDocument):
647         * dom/Document.h:
648         * dom/Element.cpp:
649         (WebCore::Element::insertedInto):
650         (WebCore::Element::removedFrom):
651         (WebCore::Element::updateName):
652         (WebCore::Element::updateId):
653         * html/HTMLDocument.h:
654         (WebCore::isHTMLDocument):
655         * html/HTMLElement.cpp:
656         (WebCore::HTMLElement::matchesReadWritePseudoClass):
657         * html/HTMLEmbedElement.cpp:
658         (WebCore::HTMLEmbedElement::updateWidget):
659         * html/HTMLImageElement.cpp:
660         (WebCore::HTMLImageElement::parseAttribute):
661         * html/HTMLMediaElement.cpp:
662         (WebCore::HTMLMediaElement::parseAttribute):
663         * html/HTMLObjectElement.cpp:
664         (WebCore::HTMLObjectElement::updateDocNamedItem):
665         * html/ImageDocument.cpp:
666         (WebCore::ImageDocumentParser::document):
667         * html/ImageDocument.h:
668         (WebCore::isImageDocument):
669         * html/MediaDocument.h:
670         (WebCore::isMediaDocument):
671         * html/PluginDocument.cpp:
672         (WebCore::PluginDocumentParser::createDocumentStructure):
673         * html/PluginDocument.h:
674         (WebCore::isPluginDocument):
675         * loader/SubframeLoader.cpp:
676         (WebCore::SubframeLoader::loadPlugin):
677         * page/DragController.cpp:
678         (WebCore::DragController::operationForLoad):
679         * page/FrameView.cpp:
680         (WebCore::determineLayerFlushThrottleState):
681
682 2014-09-29  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
683
684         Revert "Support for :enabled selector on Anchor & Area elements"
685         https://bugs.webkit.org/show_bug.cgi?id=134826
686
687         Reviewed by Darin Adler.
688
689         HTML spec has been modified [1] to disable support for :enabled CSS
690         selector on Anchor, Area & Link elements, after discussion on W3C
691         Bugzilla [2].
692
693         This reverts r171671.
694
695         [1] https://html5.org/r/8818
696         [2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26622
697
698         * css/SelectorCheckerTestFunctions.h:
699         (WebCore::isEnabled):
700         * html/HTMLAnchorElement.cpp:
701         (WebCore::HTMLAnchorElement::parseAttribute):
702
703 2014-09-29  Darin Adler  <darin@apple.com>
704
705         Tweak and tighten SVG font converter
706         https://bugs.webkit.org/show_bug.cgi?id=136956
707
708         Reviewed by Myles Maxfield.
709
710         * svg/SVGToOTFFontConversion.cpp: Fixed copyright date.
711         (WebCore::overwrite32): Changed to use normal subscripting for clarity.
712         (WebCore::overwrite16): Added.
713         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Added a move
714         to make constructing each GlyphData less expensive.
715         (WebCore::SVGToOTFFontConverter::KerningData): Removed the < operator
716         since it the struct contains more than what we want to sort it by, so it's
717         not elegant to build the sorting rule into the struct.
718         (WebCore::SVGToOTFFontConverter): Removed "k" prefix from some constants.
719         Replaced many function templates with non-template functions. Changed
720         key type for m_codepointToIndexMap to UChar32.
721         (WebCore::integralLog2): Tweaked formatting.
722         (WebCore::SVGToOTFFontConverter::appendCMAPTable): Removed a stray
723         cast that doesn't have any effect. Use the Glyph type to index m_glyphs.
724         (WebCore::SVGToOTFFontConverter::appendHEADTable): Append the magic
725         number in a more straightforward way.
726         (WebCore::clampTo): Tweak formatting of the template function.
727         (WebCore::SVGToOTFFontConverter::appendHHEATable): Made some minor
728         style changes and improved some comments.
729         (WebCore::SVGToOTFFontConverter::appendOS2Table): Made some minor
730         style changes and tightened up code that did parsing a bit, removing the
731         dynamically allocated array for the fixed length Panose number.
732         Also use first and last instead of hand-coded versions of those.
733         (WebCore::appendValidCFFString): Renamed.
734         (WebCore::SVGToOTFFontConverter::appendCFFTable): Made various tweaks,
735         including more specific of null for the "no weight" value instead of
736         either empty or null.
737         (WebCore::SVGToOTFFontConverter::appendVORGTable): Simplified some of
738         the numeric parsing, since toInt is guaranteed to return 0 when it also
739         would return "false" for ok. Also got rid of a local vector and instead
740         just fixed up the size of the table afterward.
741         (WebCore::SVGToOTFFontConverter::appendVHEATable): Tweaked comment.
742         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Use isValidKey
743         instead of a local hardcoded rule to check hash table key validity.
744         Check for zero in the result of get rather than using find on the HashMap.
745         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Ditto.
746         (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
747         (WebCore::SVGToOTFFontConverter::addKerningPair): Added. Factored out from
748         appendKERNSubtable to reduce template bloat and improve clarity.
749         (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Tweaked formatting.
750         Moved the bulk of the function into non-template function.
751         (WebCore::SVGToOTFFontConverter::finishAppendingKERNSubtable): Added.
752         Non-template part of appendKERNSubtable. Also changed std::sort to supply
753         custom comparison function rather than trying to use the < operator directly
754         on KerningData.
755         (WebCore::writeCFFEncodedNumber): Don't use powf just to multiply by
756         2^16. It's pretty easy to do that with plain old multiplication.
757         (WebCore::CFFBuilder::CFFBuilder): Renamed m_firstPoint to
758         m_hasBoundingBox.
759         (WebCore::CFFBuilder::boundingBox): Made this public and const and made
760         the rest of the class private.
761         (WebCore::CFFBuilder::updateBoundingBox): Used early return and revised
762         to use m_hasBoundingBox.
763         (WebCore::CFFBuilder::writePoint): Added. Used to keep the other
764         functions below smaller.
765         (WebCore::CFFBuilder::moveTo): Marked virtual and simplified using writePoint.
766         Might find a way to simplify even further by teaching writePoint about
767         the PathCoordinateMode.
768         (WebCore::CFFBuilder::lineTo): Ditto.
769         (WebCore::CFFBuilder::curveToCubic): Ditto. Also removed comment that said
770         the function could be faster. Not sure that's important to state like this.
771         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths): Changed into a
772         non-template function. Tweaked logic and formatting a bit.
773         (WebCore::SVGToOTFFontConverter::processGlyphElement): Changed into a
774         non-template function. Moved the code from appendGlyphData in here.
775         Use WTF::move so we don't copy the glyph paths when creating a GlyphData.
776         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Updated a bit for
777         function changes above. Changed code to use isValidKey to check if we can
778         add to m_codepointToIndexMap. Parse font-style rather than parsing
779         font-weight twice. Round weights instead of truncating them. Change rule
780         to "first wins" instead of "last wins" when there are multiple segments.
781         Removed one vague and non-helpful comment.
782         (WebCore::isFourByteAligned): Fixed minor formatting issue by making the
783         function non-abstract. No reason not to hard-code the number 3 when the
784         number four appears in the function name.
785         (WebCore::calculateChecksum): Removed unneeded comment about why the
786         checksum is little-endian; since this came from Windows documentation there
787         is no doubt that little-endian is correct, so we don't need a comment creating
788         fear, uncertainty, and doubt. If the checksum computation is wrong, it should
789         become obvious that we have a bad checksum. Also changed the for loop to use
790         its own loop variable instead of changing startingOffset, which is not logical.
791         (WebCore::SVGToOTFFontConverter::appendTable): Updated for name changes.
792         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto. Also streamlined
793         the checksum code a little. The comment still is a little peculiar; I was
794         tempted to take it out.
795
796 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
797
798         [GTK] Remove MainFrameScrollbarGtk.cpp
799         https://bugs.webkit.org/show_bug.cgi?id=137211
800
801         Reviewed by Philippe Normand.
802
803         This was only used by WebKit1.
804
805         * PlatformGTK.cmake:
806         * platform/gtk/MainFrameScrollbarGtk.cpp: Removed.
807         * platform/gtk/MainFrameScrollbarGtk.h: Removed.
808
809 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
810
811         [GTK] Remove IntPointGtk.cpp and IntRectGtk.cpp
812         https://bugs.webkit.org/show_bug.cgi?id=137209
813
814         Reviewed by Philippe Normand.
815
816         IntPointGtk is unused and IntRectGtk is only required by GTK+2 and
817         only used when building with GTK+2 in GtkInputMethodFilter.cpp
818         that can be easily replaced.
819
820         * PlatformGTK.cmake:
821         * platform/graphics/IntPoint.h:
822         * platform/graphics/IntRect.h:
823         * platform/graphics/gtk/IntPointGtk.cpp: Removed.
824         * platform/graphics/gtk/IntRectGtk.cpp: Removed.
825         * platform/gtk/GtkInputMethodFilter.cpp:
826         (WebCore::GtkInputMethodFilter::setCursorRect):
827
828 2014-09-02  Sergio Villar Senin  <svillar@igalia.com>
829
830         [CSS Grid Layout] Handle percentages of indefinite sizes in minmax() and grid-auto-*
831         https://bugs.webkit.org/show_bug.cgi?id=136453
832
833         Reviewed by Darin Adler.
834
835         After r165048 percentages of indefinite sizes were correctly
836         computed to "auto". The problem is that we were not doing it when
837         the percentage was inside the minmax() function. In those cases it
838         should compute to min-content for the min track sizing function or
839         to max-content for the max track sizing function.
840
841         We were not doing it also for the track sizes specified in
842         grid-auto-{column|row} properties. Fixed as well as the code is
843         the same.
844
845         Tests: fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
846                fast/css-grid-layout/percent-of-indefinite-track-size-in-minmax-crash.html
847                fast/css-grid-layout/percent-of-indefinite-track-size.html
848
849         * rendering/RenderGrid.cpp:
850         (WebCore::RenderGrid::gridTrackSize):
851         * rendering/RenderGrid.h:
852         * rendering/style/GridLength.h:
853         (WebCore::GridLength::isPercentage):
854         * rendering/style/GridTrackSize.h:
855         (WebCore::GridTrackSize::GridTrackSize):
856
857 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
858
859         Unreviewed. Move sources not using GTK+ from WebCorePlatformGTK_SOURCES to WebCore_SOURCES.
860
861         * PlatformGTK.cmake:
862
863 2014-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
864
865         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for NamedNodeMap
866         https://bugs.webkit.org/show_bug.cgi?id=137201
867
868         Reviewed by Darin Adler.
869
870         No new tests, just refactoring patch.
871
872         * dom/ElementRareData.h: Use std::unique_ptr instead of OwnPtr.
873         (WebCore::ElementRareData::setAttributeMap): Use std::unique_ptr. 
874         * dom/NamedNodeMap.h:
875         (WebCore::NamedNodeMap::create): ditto.
876
877 2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
878
879         Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
880         https://bugs.webkit.org/show_bug.cgi?id=137197
881
882         Reviewed by Alexey Proskuryakov.
883
884         No new tests because there is no behavior change.
885
886         * WebCore.exp.in:
887         * WebCore.order:
888         * WebCore.xcodeproj/project.pbxproj:
889         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
890         (WebCore::GlyphPage::fill): Use SPI call instead of WKSI call
891         * platform/mac/WebCoreSystemInterface.h:
892         * platform/mac/WebCoreSystemInterface.mm:
893         * platform/spi/cocoa/CGFontUnicodeSupport.h: Added for SPI call.
894
895 2014-09-28  Christophe Dumez  <cdumez@apple.com>
896
897         Automatically generate template specializations for most Elements
898         https://bugs.webkit.org/show_bug.cgi?id=137174
899
900         Reviewed by Darin Adler.
901
902         Previously, the template specializations to make is<>() / downcast<>()
903         work for HTML/SVG/MathML elements were only generated if
904         "generateTypeHelpers" parameter was explicitly specified for the
905         corresponding tag name in the *Tags.in file.
906
907         We are however able to generate the template specializations for most
908         types so this patch drops the "generateTypeHelpers" parameter and
909         generates those template specializations by default.
910
911         One case we cannot generate the specialization ifor is when a class is
912         associated to several tag names but this patch updates the
913         make_names.pl script to detect this and skip those classes.
914
915         No new tests, no behavior change.
916
917         * CMakeLists.txt:
918         * WebCore.xcodeproj/project.pbxproj:
919         * dom/make_names.pl:
920         (defaultTagPropertyHash):
921         (printTypeHelpers):
922         * html/HTMLTagNames.in:
923         * mathml/mathtags.in:
924         * svg/SVGAllInOne.cpp:
925         * svg/SVGAnimateColorElement.cpp:
926         (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
927         (WebCore::SVGAnimateColorElement::determinePropertyValueTypes):
928         * svg/SVGAnimateColorElement.h:
929         * svg/SVGAnimateElement.cpp:
930         (WebCore::SVGAnimateElement::SVGAnimateElement):
931         (WebCore::SVGAnimateElement::~SVGAnimateElement): Deleted.
932         (WebCore::SVGAnimateElement::hasValidAttributeType): Deleted.
933         (WebCore::SVGAnimateElement::determineAnimatedPropertyType): Deleted.
934         (WebCore::SVGAnimateElement::calculateAnimatedValue): Deleted.
935         (WebCore::SVGAnimateElement::calculateToAtEndOfDurationValue): Deleted.
936         (WebCore::SVGAnimateElement::calculateFromAndToValues): Deleted.
937         (WebCore::SVGAnimateElement::calculateFromAndByValues): Deleted.
938         (WebCore::propertyTypesAreConsistent): Deleted.
939         (WebCore::SVGAnimateElement::resetAnimatedType): Deleted.
940         (WebCore::applyCSSPropertyToTarget): Deleted.
941         (WebCore::removeCSSPropertyFromTarget): Deleted.
942         (WebCore::applyCSSPropertyToTargetAndInstances): Deleted.
943         (WebCore::removeCSSPropertyFromTargetAndInstances): Deleted.
944         (WebCore::notifyTargetAboutAnimValChange): Deleted.
945         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Deleted.
946         (WebCore::SVGAnimateElement::clearAnimatedType): Deleted.
947         (WebCore::SVGAnimateElement::applyResultsToTarget): Deleted.
948         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition): Deleted.
949         (WebCore::SVGAnimateElement::isAdditive): Deleted.
950         (WebCore::SVGAnimateElement::calculateDistance): Deleted.
951         (WebCore::SVGAnimateElement::setTargetElement): Deleted.
952         (WebCore::SVGAnimateElement::setAttributeName): Deleted.
953         (WebCore::SVGAnimateElement::resetAnimatedPropertyType): Deleted.
954         (WebCore::SVGAnimateElement::ensureAnimator): Deleted.
955         * svg/SVGAnimateElement.h:
956         (WebCore::isSVGAnimateElement): Deleted.
957         * svg/SVGAnimateElementBase.cpp: Copied from Source/WebCore/svg/SVGAnimateElement.cpp.
958         (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
959         (WebCore::SVGAnimateElementBase::~SVGAnimateElementBase):
960         (WebCore::SVGAnimateElementBase::hasValidAttributeType):
961         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType):
962         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
963         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
964         (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
965         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
966         (WebCore::propertyTypesAreConsistent):
967         (WebCore::SVGAnimateElementBase::resetAnimatedType):
968         (WebCore::applyCSSPropertyToTarget):
969         (WebCore::removeCSSPropertyFromTarget):
970         (WebCore::applyCSSPropertyToTargetAndInstances):
971         (WebCore::removeCSSPropertyFromTargetAndInstances):
972         (WebCore::notifyTargetAboutAnimValChange):
973         (WebCore::notifyTargetAndInstancesAboutAnimValChange):
974         (WebCore::SVGAnimateElementBase::clearAnimatedType):
975         (WebCore::SVGAnimateElementBase::applyResultsToTarget):
976         (WebCore::SVGAnimateElementBase::animatedPropertyTypeSupportsAddition):
977         (WebCore::SVGAnimateElementBase::isAdditive):
978         (WebCore::SVGAnimateElementBase::calculateDistance):
979         (WebCore::SVGAnimateElementBase::setTargetElement):
980         (WebCore::SVGAnimateElementBase::setAttributeName):
981         (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType):
982         (WebCore::SVGAnimateElementBase::ensureAnimator):
983         * svg/SVGAnimateElementBase.h: Copied from Source/WebCore/svg/SVGAnimateElement.h.
984         (WebCore::isSVGAnimateElementBase):
985         * svg/SVGAnimateTransformElement.cpp:
986         (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
987         (WebCore::SVGAnimateTransformElement::parseAttribute):
988         * svg/SVGAnimateTransformElement.h:
989         * svg/SVGAnimatedAngle.cpp:
990         * svg/SVGAnimatedBoolean.cpp:
991         * svg/SVGAnimatedColor.cpp:
992         * svg/SVGAnimatedInteger.cpp:
993         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
994         * svg/SVGAnimatedLength.cpp:
995         * svg/SVGAnimatedLengthList.cpp:
996         * svg/SVGAnimatedNumber.cpp:
997         * svg/SVGAnimatedNumberList.cpp:
998         * svg/SVGAnimatedNumberOptionalNumber.cpp:
999         * svg/SVGAnimatedPath.cpp:
1000         * svg/SVGAnimatedPointList.cpp:
1001         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1002         * svg/SVGAnimatedRect.cpp:
1003         * svg/SVGAnimatedString.cpp:
1004         * svg/SVGAnimationElement.cpp:
1005         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1006         * svg/SVGSetElement.cpp:
1007         (WebCore::SVGSetElement::SVGSetElement):
1008         * svg/SVGSetElement.h:
1009         * svg/svgtags.in:
1010
1011 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1012
1013         Use std::unique_ptr for ContextMenuController
1014         https://bugs.webkit.org/show_bug.cgi?id=137178
1015
1016         Reviewed by Darin Adler.
1017
1018         Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
1019         for ContextMenuController class. Inherited class is changed by this use as well.
1020
1021         No new tests, no behavior changes.
1022
1023         * loader/EmptyClients.cpp:
1024         (WebCore::EmptyContextMenuClient::customizeMenu):
1025         * loader/EmptyClients.h:
1026         * page/ContextMenuClient.h:
1027         * page/ContextMenuController.cpp:
1028         (WebCore::ContextMenuController::clearContextMenu):
1029         (WebCore::ContextMenuController::maybeCreateContextMenu):
1030         (WebCore::ContextMenuController::showContextMenu):
1031         * page/ContextMenuController.h:
1032
1033 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1034
1035         Move ColorInputType class to std::unique_ptr
1036         https://bugs.webkit.org/show_bug.cgi?id=137173
1037
1038         Reviewed by Darin Adler.
1039
1040         Replace uses of PassOwnPtr in code under ColorInputType class with std::unique_ptr.
1041         Child classes follow this change as well.
1042
1043         No new tests, no behavior changes.
1044
1045         * html/ColorInputType.cpp:
1046         (WebCore::ColorInputType::didEndChooser):
1047         * html/ColorInputType.h:
1048         * loader/EmptyClients.cpp:
1049         (WebCore::EmptyChromeClient::createColorChooser):
1050         * loader/EmptyClients.h:
1051         * page/Chrome.cpp:
1052         (WebCore::Chrome::createColorChooser):
1053         * page/Chrome.h:
1054         * page/ChromeClient.h:
1055
1056 2014-09-28  Sungmann Cho  <sungmann.cho@navercorp.com>
1057
1058         Fix some minor typos: psuedo -> pseudo
1059         https://bugs.webkit.org/show_bug.cgi?id=137192
1060
1061         Reviewed by Alexey Proskuryakov.
1062
1063         No new tests, no behavior change.
1064
1065         * css/CSSSelector.cpp:
1066         (WebCore::CSSSelector::specificityForOneSelector):
1067
1068 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1069
1070         Unreviewed. Move RenderThemeGtk.h from platform/gtk to rendering.
1071
1072         I forgot to move this file in r173111.
1073
1074         * rendering/RenderThemeGtk.h: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.h.
1075
1076 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1077
1078         [ATK] WebKitAccessibleWrapperAtk should not depend on GTK
1079         https://bugs.webkit.org/show_bug.cgi?id=137177
1080
1081         Reviewed by Martin Robinson.
1082
1083         It's used to get the web view widget, but there's no GtkWidget in
1084         the web process and platformPageClient is always NULL.
1085
1086         * PlatformGTK.cmake: Move accessibility sources to the WebCore
1087         sources list.
1088         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1089         (atkParentOfRootObject): Remove code to get view GtkWidget.
1090         * editing/atk/FrameSelectionAtk.cpp: Remove unneeded header include.
1091
1092 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1093
1094         [GTK] Remove unused GtkPluginWidget
1095         https://bugs.webkit.org/show_bug.cgi?id=137176
1096
1097         Reviewed by Csaba Osztrogon√°c.
1098
1099         It was only used by WebKit1.
1100
1101         * PlatformGTK.cmake:
1102         * platform/gtk/GtkPluginWidget.cpp: Removed.
1103         * platform/gtk/GtkPluginWidget.h: Removed.
1104
1105 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1106
1107         [cairo] GraphicsContext should not depend on GTK+
1108         https://bugs.webkit.org/show_bug.cgi?id=137175
1109
1110         Reviewed by Martin Robinson.
1111
1112         Remove the unused methods depending on GDK and simplify
1113         GraphicsContext::drawFocusRing() using only cairo API.
1114
1115         * PlatformGTK.cmake: Move GraphicsContextCairo.cpp to the webcore sources.
1116         * platform/graphics/GraphicsContext.h:
1117         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1118         (WebCore::GraphicsContext::drawFocusRing): Iterate the rectangles
1119         instead of creating a region for the rectangles and call gdk_cairo_region().
1120         (WebCore::GraphicsContext::setGdkExposeEvent): Deleted.
1121         (WebCore::GraphicsContext::gdkExposeEvent): Deleted.
1122         (WebCore::GraphicsContext::gdkWindow): Deleted.
1123         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1124         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1125
1126 2014-09-27  Chris Dumez  <cdumez@apple.com>
1127
1128         HTMLPlugInElement::isUserObservable() is causing layout
1129         https://bugs.webkit.org/show_bug.cgi?id=137156
1130
1131         Reviewed by Ryosuke Niwa.
1132
1133         While profiling the page load of nytimes.com, I noticed that we were
1134         spending ~4-5% of cpu time in HTMLPlugInElement::isUserObservable().
1135         The reason is that the function calls pluginWidget(), which causes a
1136         layout update in HTMLObjectElement::renderWidgetForJSBindings(), to
1137         make sure the plugin is loaded and its renderer is created.
1138
1139         HTMLPlugInElement::isUserObservable() shouldn't need to do a layout.
1140         This patch does the following to address the problem:
1141         - Rename renderWidgetForJSBindings() to renderWidgetLoadingPlugin()
1142           because this function is not always called from the JS Bindings
1143           nowadays. The new name makes it clearer that this will load the
1144           plugin if needed (to make sure the renderer is created, and by
1145           doing a layout).
1146         - Add a PluginLoadingPolicy argument to
1147           HTMLPlugInElement::pluginWidget() to let the caller control if the
1148           plugin should be loaded or not.
1149         - Update the call to pluginWidget() in isUserObservable() so that
1150           we do not attempt to load the plugin (thus not causing a layout).
1151
1152         No new tests, no behavior change.
1153
1154         * WebCore.exp.in:
1155         * WebCore.order:
1156         * html/HTMLAppletElement.cpp:
1157         (WebCore::HTMLAppletElement::renderWidgetLoadingPlugin):
1158         (WebCore::HTMLAppletElement::renderWidgetForJSBindings): Deleted.
1159         * html/HTMLAppletElement.h:
1160         * html/HTMLEmbedElement.cpp:
1161         (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
1162         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings): Deleted.
1163         * html/HTMLEmbedElement.h:
1164         * html/HTMLObjectElement.cpp:
1165         (WebCore::HTMLObjectElement::renderWidgetLoadingPlugin):
1166         (WebCore::HTMLObjectElement::renderWidgetForJSBindings): Deleted.
1167         * html/HTMLObjectElement.h:
1168         * html/HTMLPlugInElement.cpp:
1169         (WebCore::HTMLPlugInElement::pluginWidget):
1170         (WebCore::HTMLPlugInElement::isUserObservable):
1171         * html/HTMLPlugInElement.h:
1172
1173 2014-09-27  Christophe Dumez  <cdumez@apple.com>
1174
1175         Use the new is<>() / downcast<>() for more Node subclasses
1176         https://bugs.webkit.org/show_bug.cgi?id=137184
1177
1178         Reviewed by Ryosuke Niwa.
1179
1180         Use the new is<>() / downcast<>() for more Node subclasses:
1181         CDATASection, CharacterData, Comment, DocumentType,
1182         ProcessingInstruction, and PseudoElement.
1183
1184         No new tests, no behavior change.
1185
1186         * dom/CDATASection.h:
1187         (WebCore::isCDATASection):
1188         * dom/CharacterData.cpp:
1189         (WebCore::CharacterData::setDataAndUpdate):
1190         * dom/CharacterData.h:
1191         (WebCore::isCharacterData):
1192         * dom/Comment.h:
1193         (WebCore::isComment):
1194         * dom/DocumentStyleSheetCollection.cpp:
1195         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1196         * dom/DocumentType.h:
1197         (WebCore::isDocumentType):
1198         * dom/EventDispatcher.cpp:
1199         (WebCore::eventTargetRespectingTargetRules):
1200         (WebCore::nodeOrHostIfPseudoElement):
1201         * dom/Node.cpp:
1202         (WebCore::markAncestorsWithChildNeedsStyleRecalc):
1203         (WebCore::Node::pseudoAwarePreviousSibling):
1204         (WebCore::Node::pseudoAwareNextSibling):
1205         * dom/NodeTraversal.cpp:
1206         (WebCore::NodeTraversal::previousIncludingPseudo):
1207         (WebCore::NodeTraversal::nextIncludingPseudo):
1208         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
1209         * dom/ProcessingInstruction.h:
1210         (WebCore::isProcessingInstruction):
1211         * dom/PseudoElement.h:
1212         (WebCore::isPseudoElement):
1213         * dom/Range.cpp:
1214         (WebCore::lengthOfContentsInNode):
1215         (WebCore::Range::processContentsBetweenOffsets):
1216         (WebCore::Range::checkNodeWOffset):
1217         * editing/Editor.cpp:
1218         (WebCore::Editor::shouldInsertFragment):
1219         * editing/MarkupAccumulator.cpp:
1220         (WebCore::MarkupAccumulator::appendStartMarkup):
1221         * editing/cocoa/HTMLConverter.mm:
1222         (HTMLConverter::_traverseNode):
1223         * inspector/InspectorDOMAgent.cpp:
1224         (WebCore::InspectorDOMAgent::buildObjectForNode):
1225         * inspector/InspectorLayerTreeAgent.cpp:
1226         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1227         * rendering/HitTestResult.cpp:
1228         (WebCore::HitTestResult::setInnerNode):
1229         (WebCore::HitTestResult::setInnerNonSharedNode):
1230         * rendering/RenderListItem.cpp:
1231         (WebCore::enclosingList):
1232         * rendering/RenderObject.cpp:
1233         (WebCore::RenderObject::generatingPseudoHostElement):
1234         * xml/XPathFunctions.cpp:
1235         (WebCore::XPath::expandedNameLocalPart):
1236
1237 2014-09-27  Christophe Dumez  <cdumez@apple.com>
1238
1239         Use the new is<>() / downcast<>() for Attr Nodes
1240         https://bugs.webkit.org/show_bug.cgi?id=137183
1241
1242         Reviewed by Ryosuke Niwa.
1243
1244         Use the new is<>() / downcast<>() for Attr Nodes instead of isAttr() /
1245         toAttr().
1246
1247         No new tests, no behavior change.
1248
1249         * dom/Attr.h:
1250         (WebCore::isAttr):
1251         * dom/Document.cpp:
1252         (WebCore::Document::importNode):
1253         (WebCore::Document::adoptNode):
1254         * dom/NamedNodeMap.cpp:
1255         (WebCore::NamedNodeMap::setNamedItem):
1256         * dom/Node.cpp:
1257         (WebCore::Node::compareDocumentPosition):
1258         * inspector/InspectorDOMAgent.cpp:
1259         (WebCore::InspectorDOMAgent::buildObjectForNode):
1260         * inspector/InspectorNodeFinder.cpp:
1261         (WebCore::InspectorNodeFinder::searchUsingXPath):
1262         * xml/XPathNodeSet.cpp:
1263         (WebCore::XPath::sortBlock):
1264         (WebCore::XPath::NodeSet::sort):
1265         (WebCore::XPath::findRootNode):
1266
1267 2014-09-27  Brian J. Burg  <burg@cs.washington.edu>
1268
1269         Web Replay: Playback position updates should be sent before the next event loop input is dispatched
1270         https://bugs.webkit.org/show_bug.cgi?id=137162
1271
1272         Reviewed by Timothy Hatcher.
1273
1274         To drive playback position updates in the Inspector UI, we send playbackHitPosition protocol
1275         messages as the replay backend dispatches inputs. However, right now the semantics of that
1276         message are muddy. The update is sent *after* the input at the offset is dispatched. This leads
1277         to unexpected results if the debugger pauses while the input is being dispatched: the frontend
1278         will only know about the previous (stale) playback position when the debugger pauses.
1279
1280         With this patch, the backend sends the playbackHitPosition(segmentOffset=n, inputOffset=m)
1281         message when backend is about to dispatch input m, but has not yet begun to do so. Thus, any
1282         subsequent page execution events (profiling, debugger pauses, etc) until the next
1283         playbackHitPosition are caused by input m's being dispatched.
1284
1285         * inspector/protocol/Replay.json: Clarify the message's semantics.
1286         * replay/ReplayController.cpp:
1287         (WebCore::ReplayController::willDispatchInput):
1288         (WebCore::ReplayController::didDispatchInput):
1289
1290 2014-09-27  Benjamin Poulain  <bpoulain@apple.com>
1291
1292         Chaining multiple :nth-child() does not work properly
1293         https://bugs.webkit.org/show_bug.cgi?id=137032
1294
1295         Reviewed by Gavin Barraclough.
1296
1297         When multiple :nth-child() are chained, the evaluation of each "An+B" could depend on
1298         the execution of the previous "An+B". The reason is that the register holding the position
1299         of the current element could be modified by the evaluation of "An+B".
1300
1301         There are two cases in which the register was used as the destination of an operation:
1302         1) When A and B are positive, the counter would be the destination of "counter - B".
1303         2) When A is not 1 or 2, the modulo operation was not preserving the input register.
1304
1305         For (1), we a copy of the counter in that case of generateElementIsNthChild().
1306
1307         For (2), we also preserve a copy of the input if it is used by the operation. In this case,
1308         if the input register is one of the argument we need for idiv, we preserve it on the stack
1309         or in a register depending on what is available.
1310
1311         This increases the register requirements by 2 in the worst case on x86. The extra registers
1312         can push generateElementIsNthChild() above the 4 available registers. To accomodate for that,
1313         minimumRegisterRequirements() reserve more registers on x86.
1314
1315         The extra register pressure has strictly no effect on performance, x86_64 has 9 registers
1316         available without pushing anything. The extra allocation is only necessary for debugging.
1317
1318         Tests: fast/selectors/nth-child-basics.html
1319                fast/selectors/nth-child-chained.html
1320                fast/selectors/nth-child-of-basics-2.html
1321                fast/selectors/nth-child-of-chained.html
1322
1323         * cssjit/SelectorCompiler.cpp:
1324         (WebCore::SelectorCompiler::minimumRegisterRequirements):
1325         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
1326         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1327
1328 2014-09-26  Christophe Dumez  <cdumez@apple.com>
1329
1330         Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements
1331         https://bugs.webkit.org/show_bug.cgi?id=137137
1332
1333         Reviewed by Benjamin Poulain.
1334
1335         Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements and use the
1336         new SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() /
1337         downcast<>() works for those types.
1338
1339         No new tests, no behavior change.
1340
1341         * accessibility/AccessibilityNodeObject.cpp:
1342         (WebCore::AccessibilityNodeObject::labelForElement):
1343         (WebCore::AccessibilityNodeObject::text):
1344         * accessibility/AccessibilityTable.cpp:
1345         (WebCore::AccessibilityTable::isDataTable):
1346         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1347         (webkitAccessibleGetName):
1348         (webkitAccessibleGetDescription):
1349         * bindings/gobject/WebKitDOMPrivate.cpp:
1350         (WebKit::wrap):
1351         * bindings/js/JSElementCustom.cpp:
1352         (WebCore::toJSNewlyCreated):
1353         * bindings/js/JSNodeCustom.cpp:
1354         (WebCore::createWrapperInline):
1355         * bindings/js/JSPluginElementFunctions.cpp:
1356         (WebCore::pluginInstance):
1357         (WebCore::pluginScriptObjectFromPluginViewBase):
1358         (WebCore::pluginScriptObject):
1359         (WebCore::pluginElementCustomPut):
1360         (WebCore::isPluginElement): Deleted.
1361         * bindings/objc/DOM.mm:
1362         (kitClass):
1363         * css/ElementRuleCollector.cpp:
1364         (WebCore::ElementRuleCollector::matchAllRules):
1365         * css/SelectorChecker.cpp:
1366         (WebCore::SelectorChecker::checkOne):
1367         * css/StyleResolver.cpp:
1368         (WebCore::StyleResolver::locateCousinList):
1369         (WebCore::elementHasDirectionAuto):
1370         * cssjit/SelectorCompiler.cpp:
1371         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1372         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1373         (WebCore::SelectorCompiler::isPlaceholderShown):
1374         * dom/ContainerNodeAlgorithms.cpp:
1375         (WebCore::assertConnectedSubrameCountIsConsistent):
1376         (WebCore::collectFrameOwners):
1377         (WebCore::disconnectSubframes):
1378         * dom/Document.cpp:
1379         (WebCore::Document::adoptNode):
1380         (WebCore::Document::setBody):
1381         (WebCore::Document::iconURLs):
1382         (WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
1383         (WebCore::Document::updateHoverActiveState):
1384         * dom/DocumentStyleSheetCollection.cpp:
1385         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1386         * dom/Range.cpp:
1387         (WebCore::Range::createContextualFragment):
1388         * dom/make_names.pl:
1389         (printTypeHelpers):
1390         * editing/ApplyStyleCommand.cpp:
1391         (WebCore::isLegacyAppleStyleSpan):
1392         (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
1393         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
1394         (WebCore::isEmptyFontTag):
1395         (WebCore::ApplyStyleCommand::applyBlockStyle):
1396         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1397         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1398         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1399         (WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
1400         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
1401         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
1402         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1403         (WebCore::ApplyStyleCommand::removeInlineStyle):
1404         (WebCore::ApplyStyleCommand::shouldSplitTextElement):
1405         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
1406         * editing/DeleteButtonController.cpp:
1407         (WebCore::enclosingDeletableElement):
1408         * editing/Editor.cpp:
1409         (WebCore::Editor::selectionForCommand):
1410         (WebCore::Editor::setBaseWritingDirection):
1411         (WebCore::findFirstMarkable):
1412         * editing/FrameSelection.cpp:
1413         (WebCore::FrameSelection::selectAll):
1414         (WebCore::scanForForm):
1415         * editing/InsertListCommand.cpp:
1416         (WebCore::InsertListCommand::mergeWithNeighboringLists):
1417         * editing/MarkupAccumulator.cpp:
1418         (WebCore::MarkupAccumulator::elementCannotHaveEndTag):
1419         * editing/ReplaceSelectionCommand.cpp:
1420         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1421         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1422         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1423         (WebCore::ReplaceSelectionCommand::doApply):
1424         (WebCore::ReplaceSelectionCommand::insertAsListItems):
1425         * editing/TextIterator.cpp:
1426         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
1427         (WebCore::shouldEmitExtraNewlineForNode):
1428         * editing/cocoa/HTMLConverter.mm:
1429         (HTMLConverter::_addTableCellForElement):
1430         (HTMLConverter::_processElement):
1431         * editing/htmlediting.cpp:
1432         (WebCore::enclosingList):
1433         (WebCore::embeddedSublist):
1434         (WebCore::appendedSublist):
1435         * editing/ios/EditorIOS.mm:
1436         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1437         * editing/mac/EditorMac.mm:
1438         (WebCore::maybeCopyNodeAttributesToFragment):
1439         * editing/markup.cpp:
1440         (WebCore::StyledMarkupAccumulator::appendElement):
1441         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1442         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
1443         * html/ColorInputType.cpp:
1444         (WebCore::ColorInputType::shadowColorSwatch):
1445         * html/HTMLBodyElement.cpp:
1446         (WebCore::HTMLBodyElement::insertedInto):
1447         * html/HTMLCollection.cpp:
1448         (WebCore::HTMLCollection::namedItem):
1449         (WebCore::HTMLCollection::updateNamedElementCache):
1450         * html/HTMLElement.cpp:
1451         (WebCore::HTMLElement::matchesReadWritePseudoClass):
1452         (WebCore::HTMLElement::setOuterHTML):
1453         (WebCore::elementAffectsDirectionality):
1454         (WebCore::HTMLElement::directionality):
1455         (WebCore::HTMLElement::dirAttributeChanged):
1456         * html/HTMLElement.h:
1457         (WebCore::isHTMLElement):
1458         (WebCore::Node::hasTagName):
1459         * html/HTMLFormElement.cpp:
1460         (WebCore::HTMLFormElement::getNamedElements):
1461         * html/HTMLFrameElementBase.h:
1462         (WebCore::isHTMLFrameElementBase):
1463         * html/HTMLFrameOwnerElement.h:
1464         (WebCore::isHTMLFrameOwnerElement):
1465         * html/HTMLMediaElement.h:
1466         (WebCore::isHTMLMediaElement):
1467         * html/HTMLOptionElement.cpp:
1468         (WebCore::HTMLOptionElement::isDisabledFormControl):
1469         * html/HTMLPlugInElement.h:
1470         (WebCore::isHTMLPlugInElement):
1471         * html/HTMLPlugInImageElement.cpp:
1472         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
1473         * html/HTMLPlugInImageElement.h:
1474         (WebCore::isHTMLPlugInImageElement):
1475         * html/HTMLSelectElement.cpp:
1476         (WebCore::HTMLSelectElement::setOption):
1477         (WebCore::HTMLSelectElement::setLength):
1478         (WebCore::HTMLSelectElement::recalcListItems):
1479         * html/HTMLSourceElement.cpp:
1480         (WebCore::HTMLSourceElement::insertedInto):
1481         (WebCore::HTMLSourceElement::removedFrom):
1482         * html/HTMLTableCellElement.cpp:
1483         (WebCore::HTMLTableCellElement::cellAbove):
1484         * html/HTMLTableCellElement.h:
1485         (WebCore::isHTMLTableCellElement):
1486         * html/HTMLTableElement.cpp:
1487         (WebCore::HTMLTableElement::tHead):
1488         (WebCore::HTMLTableElement::tFoot):
1489         (WebCore::HTMLTableElement::lastBody):
1490         * html/HTMLTableRowElement.cpp:
1491         (WebCore::HTMLTableRowElement::rowIndex):
1492         * html/HTMLTableRowsCollection.cpp:
1493         (WebCore::isInSection):
1494         * html/HTMLTableSectionElement.h:
1495         (WebCore::isHTMLTableSectionElement):
1496         * html/HTMLTagNames.in:
1497         * html/HTMLTextFormControlElement.cpp:
1498         (WebCore::enclosingTextFormControl):
1499         * html/HTMLTextFormControlElement.h:
1500         (WebCore::isHTMLTextFormControlElement):
1501         * html/HTMLTrackElement.cpp:
1502         (WebCore::HTMLTrackElement::removedFrom):
1503         (WebCore::HTMLTrackElement::mediaElement):
1504         * html/LabelableElement.h:
1505         (WebCore::isLabelableElement):
1506         * html/RangeInputType.cpp:
1507         (WebCore::RangeInputType::sliderTrackElement):
1508         * html/shadow/MediaControlElementTypes.cpp:
1509         (WebCore::parentMediaElement):
1510         (WebCore::mediaControlElementType):
1511         * html/shadow/TextControlInnerElements.h:
1512         (WebCore::isTextControlInnerTextElement):
1513         * inspector/InspectorDOMAgent.cpp:
1514         (WebCore::InspectorDOMAgent::buildObjectForNode):
1515         * inspector/InspectorNodeFinder.cpp:
1516         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
1517         * loader/SubframeLoader.cpp:
1518         (WebCore::SubframeLoader::loadSubframe):
1519         * loader/archive/cf/LegacyWebArchive.cpp:
1520         (WebCore::LegacyWebArchive::create):
1521         * mathml/MathMLElement.cpp:
1522         (WebCore::MathMLElement::isPhrasingContent):
1523         (WebCore::MathMLElement::isFlowContent):
1524         (WebCore::MathMLElement::childShouldCreateRenderer):
1525         * mathml/mathtags.in:
1526         * page/DragController.cpp:
1527         (WebCore::DragController::canProcessDrag):
1528         * page/EventHandler.cpp:
1529         (WebCore::targetIsFrame):
1530         * page/FocusController.cpp:
1531         (WebCore::hasCustomFocusLogic):
1532         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
1533         (WebCore::FocusController::advanceFocusInDocumentOrder):
1534         * page/Frame.cpp:
1535         (WebCore::Frame::searchForLabelsBeforeElement):
1536         * page/FrameView.cpp:
1537         (WebCore::FrameView::init):
1538         (WebCore::FrameView::addEmbeddedObjectToUpdate):
1539         (WebCore::FrameView::updateEmbeddedObject):
1540         * page/PageSerializer.cpp:
1541         (WebCore::isCharsetSpecifyingNode):
1542         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
1543         * page/SpatialNavigation.cpp:
1544         (WebCore::frameOwnerElement):
1545         * rendering/HitTestResult.cpp:
1546         (WebCore::HitTestResult::absolutePDFURL):
1547         (WebCore::HitTestResult::mediaElement):
1548         * rendering/RenderBlockFlow.cpp:
1549         (WebCore::resizeTextPermitted):
1550         * rendering/RenderEmbeddedObject.cpp:
1551         (WebCore::RenderEmbeddedObject::paintContents):
1552         (WebCore::RenderEmbeddedObject::layout):
1553         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
1554         * rendering/RenderLayer.cpp:
1555         (WebCore::RenderLayer::scrollRectToVisible):
1556         (WebCore::RenderLayer::updateSnapOffsets):
1557         * rendering/RenderLayerBacking.cpp:
1558         (WebCore::RenderLayerBacking::updateConfiguration):
1559         (WebCore::isRestartedPlugin):
1560         * rendering/RenderMedia.h:
1561         (WebCore::RenderMedia::mediaElement):
1562         * rendering/RenderObject.cpp:
1563         (WebCore::RenderObject::offsetParent):
1564         * rendering/RenderSnapshottedPlugIn.cpp:
1565         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
1566         * rendering/RenderTableCell.cpp:
1567         (WebCore::RenderTableCell::parseColSpanFromDOM):
1568         (WebCore::RenderTableCell::parseRowSpanFromDOM):
1569         * rendering/RenderTextControl.cpp:
1570         (WebCore::RenderTextControl::textFormControlElement):
1571         * rendering/RenderThemeGtk.cpp:
1572         (WebCore::getMediaElementFromRenderObject):
1573         * rendering/RenderThemeMac.mm:
1574         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1575         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1576         * rendering/RenderTreeAsText.cpp:
1577         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
1578         * rendering/RenderWidget.h:
1579         (WebCore::RenderWidget::frameOwnerElement):
1580         * testing/Internals.cpp:
1581         (WebCore::Internals::visiblePlaceholder):
1582         (WebCore::Internals::simulateAudioInterruption):
1583         (WebCore::Internals::isPluginSnapshotted):
1584         * xml/XPathStep.cpp:
1585         (WebCore::XPath::nodeMatchesBasicTest):
1586
1587 2014-09-26  Joseph Pecoraro  <pecoraro@apple.com>
1588
1589         Web Inspector: Automatic Inspection should continue once all breakpoints are loaded
1590         https://bugs.webkit.org/show_bug.cgi?id=137038
1591
1592         Reviewed by Timothy Hatcher.
1593
1594         Handle frontend initialization messages even though pages cannot
1595         be automatically inspected yet.
1596
1597         * inspector/InspectorController.cpp:
1598         (WebCore::InspectorController::InspectorController):
1599         (WebCore::InspectorController::connectFrontend):
1600         (WebCore::InspectorController::disconnectFrontend):
1601         (WebCore::InspectorController::frontendInitialized):
1602         * inspector/InspectorController.h:
1603         * inspector/WorkerInspectorController.h:
1604         * page/Page.h:
1605         (WebCore::Page::inspectorDebuggable):
1606
1607 2014-09-26  David Kilzer  <ddkilzer@apple.com>
1608
1609         REGRESSION (r173988): Fix unused variable warning in PDFDocumentImage.cpp
1610
1611         Fixes the following build failure in release builds:
1612
1613             WebCore/platform/graphics/cg/PDFDocumentImage.cpp:230:12: error: unused variable 'pageCount' [-Werror,-Wunused-variable]
1614
1615         * platform/graphics/cg/PDFDocumentImage.cpp:
1616         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage): Change
1617         ASSERT() to call pageCount().
1618
1619 2014-09-26  Brian J. Burg  <burg@cs.washington.edu>
1620
1621         StorageTracker::deleteOrigin being called off the main thread (ASSERTs in inspector/test-harness-trivially-works.html test)
1622         https://bugs.webkit.org/show_bug.cgi?id=129642
1623
1624         Apply post-review comments from Alexey Proskuryakov.
1625
1626         * storage/StorageAreaSync.cpp:
1627         (WebCore::StorageAreaSync::deleteEmptyDatabase): Make a thread-safe isolated copy of the string.
1628
1629 2014-09-26  Myles C. Maxfield  <mmaxfield@apple.com>
1630
1631         SVG -> OTF converter bug gardening
1632         https://bugs.webkit.org/show_bug.cgi?id=137088
1633
1634         Reviewed by Darin Adler.
1635
1636         This test fixes some (but not all) of the svg/ layout tests that never worked with the
1637         SVG -> OTF font converter. The actual list of tests this fixes is shown below. I will be
1638         filing bugs for the remaining issues along with the relevant tests that those issues
1639         cause to fail.
1640
1641         Tests: svg/W3C-SVG-1.1/fonts-elem-05-t.svg
1642                svg/W3C-SVG-1.1/fonts-kern-01-t.svg
1643                svg/custom/glyph-setting-d-attribute.svg
1644                svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html
1645                svg/custom/skip-underline-missing-glyph.html
1646                svg/custom/svg-fonts-fallback.xhtml
1647                svg/custom/svg-fonts-in-text-controls.html
1648
1649         * svg/SVGToOTFFontConversion.cpp:
1650         (WebCore::SVGToOTFFontConverter::appendHEADTable): We use the font's minimum and maximum
1651         bounding box information to size <textarea>s and <input>s.
1652         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Codepoint ranges are closed.
1653         (WebCore::SVGToOTFFontConverter::computeKerningData): Typo in appending glyphs to the
1654         wrong set.
1655         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths): Use the font's horizontal
1656         origin if the glyph doesn't have one.
1657         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): r173852 implemented vhea, vmtx,
1658         and kern.
1659         (WebCore::transcodeGlyphPaths): Moved inside SVGToOTFFontConverter.
1660
1661 2014-09-26  Dan Bernstein  <mitz@apple.com>
1662
1663         iOS build fix following r173989.
1664
1665         * page/ios/FrameIOS.mm:
1666         (WebCore::ancestorRespondingToClickEvents):
1667
1668 2014-09-26  Javier Fernandez  <jfernandez@igalia.com>
1669
1670         [CSS Grid Layout] Empty string case already covered by containesOnlyWhiteSpace.
1671         https://bugs.webkit.org/show_bug.cgi?id=137146
1672
1673         Reviewed by Sergio Villar Senin.
1674
1675         When checking out for white-space only strings in the grid-template-areas
1676         property values, it's not neccessary to check out for empty strings as
1677         such case is already covered.
1678
1679         No new tests, already covered by fast/css-grid-layout/grid-template-areas-empty-string-crash.html.
1680
1681         * css/CSSParser.cpp:
1682         (WebCore::CSSParser::parseGridTemplateAreasRow):
1683
1684 2014-09-23  Sergio Villar Senin  <svillar@igalia.com>
1685
1686         [CSS Grid Layout] Fix the handling of infinity in track growth limits
1687         https://bugs.webkit.org/show_bug.cgi?id=137019
1688
1689         Reviewed by Darin Adler.
1690
1691         The growth limit of content sized tracks is initialized to
1692         infinity which is internally represented as -1. We were not
1693         specialcasing this situation, and thus, -1 was used in the
1694         computations as any other value. This change makes the code aware
1695         of the existence of infinites (like when sorting tracks by growth
1696         potential or when initializing the track growth limits).
1697
1698         There was another bug related to infinities. The code that was
1699         replacing a infinite growth limit by a finite one was not using
1700         the proper indexes so the tracks that were being updated were the
1701         wrong ones.
1702
1703         Test: fast/css-grid-layout/grid-content-sized-columns-resolution.html
1704
1705         * rendering/RenderGrid.cpp:
1706         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1707         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1708         (WebCore::sortByGridTrackGrowthPotential):
1709         (WebCore::RenderGrid::distributeSpaceToTracks):
1710
1711 2014-09-26  Lorenzo Tilve  <ltilve@igalia.com>
1712
1713         [GTK] Fix support for the initial-letter CSS property to first-letter
1714         https://bugs.webkit.org/show_bug.cgi?id=137108
1715
1716         Reviewed by Alejandro G. Castro.
1717
1718         Add support for cap-height to the font system.
1719
1720         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1721         (WebCore::SimpleFontData::platformInit):
1722
1723 2014-09-25  Brian J. Burg  <burg@cs.washington.edu>
1724
1725         Web Inspector: FunctionCall timeline records omit profile data if the debugger has paused
1726         https://bugs.webkit.org/show_bug.cgi?id=136805
1727
1728         Reviewed by Timothy Hatcher.
1729
1730         TimelineAgent was mismanaging its call stack depth counter, which caused nested FunctionCall
1731         records to steal the parent FunctionCall's captured profile in the child's didCallFunction().
1732         Thus, the top FunctionCall node had no profile data and nested FunctionCall nodes each had
1733         their own profiles. The frontend expected just one profile, so it didn't show anything when
1734         it couldn't be found.
1735
1736         Test: inspector/timeline/debugger-paused-while-recording.html
1737
1738         * inspector/InspectorTimelineAgent.cpp: Rename m_recordingProfileDepth to m_callStackDepth.
1739         (WebCore::InspectorTimelineAgent::willCallFunction): Fix the call stack depth management.
1740         (WebCore::InspectorTimelineAgent::didCallFunction):
1741         (WebCore::InspectorTimelineAgent::willEvaluateScript):
1742         (WebCore::InspectorTimelineAgent::didEvaluateScript):
1743         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1744         * inspector/InspectorTimelineAgent.h:
1745
1746 2014-09-25  Brian J. Burg  <burg@cs.washington.edu>
1747
1748         StorageTracker::deleteOrigin being called off the main thread (ASSERTs in inspector/test-harness-trivially-works.html test)
1749         https://bugs.webkit.org/show_bug.cgi?id=129642
1750
1751         Reviewed by Brady Eidson.
1752
1753         When tearing down the inspector frontend's page, we trigger a threading violation
1754         in StorageAreaSync's final sync code underneath StorageAreaSync::deleteEmptyDatabase().
1755
1756         No new tests. Regression is covered by inspector/test-harness-trivially-works.html.
1757
1758         * storage/StorageAreaSync.cpp:
1759         (WebCore::StorageAreaSync::deleteEmptyDatabase): add a missing callOnMainThread() when
1760         calling StorageTracker::deleteOriginWithIdentifier().
1761
1762 2014-09-25  Sungmann Cho  <sungmann.cho@navercorp.com>
1763
1764         Unprefix CSS cursor values zoom-in and zoom-out.
1765         https://bugs.webkit.org/show_bug.cgi?id=137061
1766
1767         Reviewed by Benjamin Poulain.
1768
1769         This patch unprefixes CSS cursor values zoom-in and zoom-out.
1770         -webkit-zoom-in and -webkit-zoom-out are kept as aliases.
1771         ECursor members use InterCaps with an initial capital letter for now.
1772
1773         * css/CSSParser.cpp:
1774         (WebCore::CSSParser::parseValue):
1775         * css/CSSPrimitiveValueMappings.h:
1776         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1777         (WebCore::CSSPrimitiveValue::operator ECursor):
1778         * css/CSSValueKeywords.in:
1779         * css/DeprecatedStyleBuilder.cpp:
1780         (WebCore::ApplyPropertyCursor::applyValue):
1781         * html/ImageDocument.cpp:
1782         (WebCore::ImageDocument::resizeImageToFit):
1783         (WebCore::ImageDocument::restoreImageSize):
1784         (WebCore::ImageDocument::windowSizeChanged):
1785         * page/EventHandler.cpp:
1786         (WebCore::EventHandler::selectCursor):
1787         * rendering/style/RenderStyle.h:
1788         * rendering/style/RenderStyleConstants.h:
1789
1790 2014-09-25  Brent Fulgham  <bfulgham@apple.com>
1791
1792         [Win] Debug builds of TestWebKitAPI are crashing.
1793         https://bugs.webkit.org/show_bug.cgi?id=133553
1794
1795         Reviewed by Dean Jackson.
1796
1797         Avoid crash on shutdown due to invalid mutex state in the
1798         HashMap debug implementation during a static destruction operation.
1799
1800         * dom/Node.cpp:
1801         (WebCore::ignoreSet): Convert static value into a NeverDestroyed.
1802         (WebCore::Node::trackForDebugging): Use new NeverDestroyed call.
1803         (WebCore::Node::~Node): Ditto.
1804
1805 2014-09-25  Christophe Dumez  <cdumez@apple.com>
1806
1807         Add support for is<SVGDocument>() / downcast<SVGDocument>()
1808         https://bugs.webkit.org/show_bug.cgi?id=137128
1809
1810         Reviewed by Ryosuke Niwa.
1811
1812         Add support for is<SVGDocument>() / downcast<SVGDocument>() by using
1813         the SPECIALIZE_TYPE_TRAITS_*() macro, instead of the
1814         DOCUMENT_TYPE_CASTS() one.
1815
1816         No new tests, no behavior change.
1817
1818         * accessibility/AccessibilityRenderObject.cpp:
1819         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1820         * html/HTMLFrameOwnerElement.cpp:
1821         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
1822         * page/EventHandler.cpp:
1823         (WebCore::EventHandler::handleMousePressEvent):
1824         (WebCore::EventHandler::handleMouseMoveEvent):
1825         (WebCore::EventHandler::handleMouseReleaseEvent):
1826         * page/Frame.cpp:
1827         (WebCore::Frame::setPageAndTextZoomFactors):
1828         * page/FrameView.cpp:
1829         (WebCore::FrameView::scrollToAnchor):
1830         * svg/SVGDocument.h:
1831         (WebCore::isSVGDocument):
1832         * svg/graphics/SVGImage.cpp:
1833         (WebCore::SVGImage::hasSingleSecurityOrigin):
1834         (WebCore::SVGImage::setContainerSize):
1835         (WebCore::SVGImage::containerSize):
1836         (WebCore::SVGImage::embeddedContentBox):
1837         (WebCore::SVGImage::hasRelativeWidth):
1838         (WebCore::SVGImage::hasRelativeHeight):
1839         (WebCore::SVGImage::computeIntrinsicDimensions):
1840         (WebCore::SVGImage::startAnimation):
1841         (WebCore::SVGImage::stopAnimation):
1842
1843 2014-09-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
1844
1845         Rename CSSKeyframesRule insertRule to appendRule (57910)
1846         https://bugs.webkit.org/show_bug.cgi?id=57910
1847
1848         Reviewed by Dean Jackson.
1849
1850         Tests: animations/change-keyframes.html
1851
1852         * css/WebKitCSSKeyframesRule.h:
1853         (WebCore::WebKitCSSKeyframesRule::appendRule):
1854         -- Make WebKitCSSKeyframesRule::appendRule to be an alias of WebKitCSSKeyframesRule::insertRule()
1855            to conform with CSS specs
1856         * css/WebKitCSSKeyframesRule.idl:
1857         -- Add the new method WebKitCSSKeyframesRule::appendRule() but keep the original method
1858            WebKitCSSKeyframesRule::appendRule() to not break exiting customers' pages.
1859
1860 2014-09-25  Tim Horton  <timothy_horton@apple.com>
1861
1862         Null deref in setStateScrollingNodeSnapOffsetsAsFloat
1863         https://bugs.webkit.org/show_bug.cgi?id=137133
1864         <rdar://problem/18447820>
1865
1866         Reviewed by Beth Dakin.
1867
1868         * page/scrolling/AsyncScrollingCoordinator.cpp:
1869         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1870         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
1871         Get the deviceScaleFactor from m_page instead of various other places,
1872         because scrolledContentsLayer can be null in the case of non-composited
1873         overflow scroll.
1874
1875 2014-09-25  Christophe Dumez  <cdumez@apple.com>
1876
1877         Use is<HTML*Element>() instead of isHTML*Element() - Part 2
1878         https://bugs.webkit.org/show_bug.cgi?id=137103
1879
1880         Reviewed by Benjamin Poulain.
1881
1882         Use is<HTML*Element>() instead of isHTML*Element() and drop support for
1883         the generated isHTML*Element() macros.
1884
1885         No new tests, no behavior change.
1886
1887         * accessibility/AXObjectCache.cpp:
1888         (WebCore::AXObjectCache::focusedUIElementForPage):
1889         (WebCore::AXObjectCache::getOrCreate):
1890         (WebCore::AXObjectCache::handleAttributeChanged):
1891         (WebCore::AXObjectCache::labelChanged):
1892         * accessibility/AccessibilityListBoxOption.cpp:
1893         (WebCore::AccessibilityListBoxOption::isEnabled):
1894         (WebCore::AccessibilityListBoxOption::stringValue):
1895         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
1896         * accessibility/AccessibilityNodeObject.cpp:
1897         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1898         (WebCore::AccessibilityNodeObject::isNativeImage):
1899         (WebCore::AccessibilityNodeObject::anchorElement):
1900         (WebCore::AccessibilityNodeObject::alternativeText):
1901         * accessibility/AccessibilityRenderObject.cpp:
1902         (WebCore::AccessibilityRenderObject::anchorElement):
1903         (WebCore::AccessibilityRenderObject::labelElementContainer):
1904         (WebCore::AccessibilityRenderObject::internalLinkElement):
1905         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1906         (WebCore::AccessibilityRenderObject::url):
1907         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1908         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
1909         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
1910         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1911         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
1912         (WebCore::AccessibilityRenderObject::isLinked):
1913         * accessibility/AccessibilityTable.cpp:
1914         (WebCore::AccessibilityTable::tableElement):
1915         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
1916         (WebCore::AccessibilityTable::title):
1917         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1918         (webkitAccessibleTableGetCaption):
1919         * bindings/js/JSHTMLDocumentCustom.cpp:
1920         (WebCore::JSHTMLDocument::nameGetter):
1921         * bindings/js/JSNodeCustom.cpp:
1922         (WebCore::isReachableFromDOM):
1923         * css/CSSDefaultStyleSheets.cpp:
1924         (WebCore::elementCanUseSimpleDefaultStyle):
1925         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
1926         * css/CSSStyleSheet.cpp:
1927         (WebCore::isAcceptableCSSStyleSheetParent):
1928         * css/StyleResolver.cpp:
1929         (WebCore::StyleResolver::adjustRenderStyle):
1930         * css/StyleSheetList.cpp:
1931         (WebCore::StyleSheetList::getNamedItem):
1932         * dom/CurrentScriptIncrementer.h:
1933         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
1934         * dom/DataTransfer.cpp:
1935         (WebCore::DataTransfer::setDragImage):
1936         * dom/DocumentOrderedMap.cpp:
1937         (WebCore::keyMatchesMapName):
1938         (WebCore::keyMatchesLowercasedMapName):
1939         (WebCore::keyMatchesLowercasedUsemap):
1940         (WebCore::keyMatchesLabelForAttribute):
1941         * dom/DocumentStyleSheetCollection.cpp:
1942         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1943         * dom/Node.cpp:
1944         (WebCore::Node::enclosingLinkEventParentOrSelf):
1945         * dom/Position.cpp:
1946         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
1947         * dom/ScriptElement.cpp:
1948         (WebCore::toScriptElementIfPossible):
1949         * dom/VisitedLinkState.cpp:
1950         (WebCore::linkHashForElement):
1951         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
1952         * dom/make_names.pl:
1953         (printTypeHelpers):
1954         * editing/DeleteSelectionCommand.cpp:
1955         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1956         * editing/Editor.cpp:
1957         (WebCore::imageElementFromImageDocument):
1958         * editing/FrameSelection.cpp:
1959         (WebCore::scanForForm):
1960         * editing/InsertLineBreakCommand.cpp:
1961         (WebCore::InsertLineBreakCommand::doApply):
1962         * editing/InsertParagraphSeparatorCommand.cpp:
1963         (WebCore::InsertParagraphSeparatorCommand::doApply):
1964         * editing/ReplaceSelectionCommand.cpp:
1965         (WebCore::removeHeadContents):
1966         * editing/cocoa/HTMLConverter.mm:
1967         (HTMLConverter::_processElement):
1968         * editing/htmlediting.cpp:
1969         (WebCore::isNonTableCellHTMLBlockElement):
1970         * editing/markup.cpp:
1971         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
1972         (WebCore::collectElementsToRemoveFromFragment):
1973         * html/FTPDirectoryDocument.cpp:
1974         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
1975         * html/FormAssociatedElement.cpp:
1976         (WebCore::FormAssociatedElement::findAssociatedForm):
1977         * html/HTMLAnchorElement.cpp:
1978         (WebCore::appendServerMapMousePosition):
1979         * html/HTMLAreaElement.cpp:
1980         (WebCore::HTMLAreaElement::imageElement):
1981         * html/HTMLDocument.cpp:
1982         (WebCore::HTMLDocument::bgColor):
1983         (WebCore::HTMLDocument::setBgColor):
1984         (WebCore::HTMLDocument::fgColor):
1985         (WebCore::HTMLDocument::setFgColor):
1986         (WebCore::HTMLDocument::alinkColor):
1987         (WebCore::HTMLDocument::setAlinkColor):
1988         (WebCore::HTMLDocument::linkColor):
1989         (WebCore::HTMLDocument::setLinkColor):
1990         (WebCore::HTMLDocument::vlinkColor):
1991         (WebCore::HTMLDocument::setVlinkColor):
1992         (WebCore::HTMLDocument::isFrameSet):
1993         * html/HTMLElement.cpp:
1994         (WebCore::HTMLElement::setInnerHTML):
1995         * html/HTMLFieldSetElement.cpp:
1996         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
1997         (WebCore::HTMLFieldSetElement::disabledStateChanged):
1998         * html/HTMLFormControlElement.cpp:
1999         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
2000         * html/HTMLFormControlsCollection.cpp:
2001         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
2002         (WebCore::HTMLFormControlsCollection::formControlElements):
2003         (WebCore::HTMLFormControlsCollection::formImageElements):
2004         (WebCore::HTMLFormControlsCollection::namedItem):
2005         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
2006         * html/HTMLFormElement.cpp:
2007         (WebCore::HTMLFormElement::rendererIsNeeded):
2008         * html/HTMLFrameElementBase.h:
2009         (WebCore::isHTMLFrameElementBase):
2010         * html/HTMLImageLoader.cpp:
2011         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2012         * html/HTMLInputElement.cpp:
2013         (WebCore::HTMLInputElement::dataList):
2014         * html/HTMLLegendElement.cpp:
2015         (WebCore::HTMLLegendElement::virtualForm):
2016         * html/HTMLMediaElement.cpp:
2017         (WebCore::HTMLMediaElement::parseAttribute):
2018         * html/HTMLNameCollection.cpp:
2019         (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
2020         (WebCore::DocumentNameCollection::elementMatches):
2021         * html/HTMLOptionElement.cpp:
2022         (WebCore::HTMLOptionElement::ownerDataListElement):
2023         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
2024         (WebCore::HTMLOptionElement::isDisabledFormControl):
2025         * html/HTMLSelectElement.cpp:
2026         (WebCore::HTMLSelectElement::recalcListItems):
2027         * html/HTMLTableElement.cpp:
2028         (WebCore::HTMLTableElement::caption):
2029         * html/HTMLTablePartElement.cpp:
2030         (WebCore::HTMLTablePartElement::findParentTable):
2031         * html/HTMLTableRowElement.cpp:
2032         (WebCore::HTMLTableRowElement::rowIndex):
2033         * html/HTMLTableRowsCollection.cpp:
2034         (WebCore::HTMLTableRowsCollection::rowAfter):
2035         (WebCore::HTMLTableRowsCollection::lastRow):
2036         * html/HTMLTagNames.in:
2037         * html/LabelsNodeList.cpp:
2038         (WebCore::LabelsNodeList::elementMatches):
2039         * html/MediaDocument.cpp:
2040         (WebCore::descendentVideoElement):
2041         (WebCore::ancestorVideoElement):
2042         * html/RadioInputType.cpp:
2043         (WebCore::RadioInputType::handleKeydownEvent):
2044         * html/RadioNodeList.cpp:
2045         (WebCore::RadioNodeList::RadioNodeList):
2046         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2047         * html/parser/HTMLConstructionSite.cpp:
2048         (WebCore::hasImpliedEndTag):
2049         (WebCore::insert):
2050         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
2051         (WebCore::HTMLConstructionSite::insertTextNode):
2052         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
2053         * html/parser/HTMLElementStack.cpp:
2054         (WebCore::HTMLNames::isScopeMarker):
2055         (WebCore::HTMLNames::isTableScopeMarker):
2056         * html/parser/HTMLTreeBuilder.cpp:
2057         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2058         (WebCore::HTMLTreeBuilder::processStartTag):
2059         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
2060         (WebCore::HTMLTreeBuilder::processEndTag):
2061         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
2062         * inspector/InspectorDOMAgent.cpp:
2063         (WebCore::InspectorDOMAgent::buildObjectForNode):
2064         * inspector/InspectorStyleSheet.cpp:
2065         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
2066         * page/DragController.cpp:
2067         (WebCore::DragController::draggableElement):
2068         * page/FocusController.cpp:
2069         (WebCore::FocusController::advanceFocusDirectionally):
2070         * page/PageSerializer.cpp:
2071         (WebCore::PageSerializer::serializeFrame):
2072         * page/SpatialNavigation.cpp:
2073         (WebCore::FocusCandidate::FocusCandidate):
2074         (WebCore::areElementsOnSameLine):
2075         * page/ios/FrameIOS.mm:
2076         (WebCore::ancestorRespondingToClickEvents):
2077         * rendering/HitTestResult.cpp:
2078         (WebCore::HitTestResult::altDisplayString):
2079         (WebCore::HitTestResult::mediaSupportsFullscreen):
2080         (WebCore::HitTestResult::mediaElement):
2081         (WebCore::HitTestResult::enterFullscreenForVideo):
2082         (WebCore::HitTestResult::mediaIsVideo):
2083         (WebCore::HitTestResult::isLiveLink):
2084         * rendering/RenderCounter.cpp:
2085         (WebCore::planCounter):
2086         * rendering/RenderImage.cpp:
2087         (WebCore::RenderImage::RenderImage):
2088         (WebCore::RenderImage::paintAreaElementFocusRing):
2089         (WebCore::RenderImage::paintIntoRect):
2090         (WebCore::RenderImage::imageMap):
2091         (WebCore::RenderImage::updateAltText):
2092         * rendering/RenderListBox.cpp:
2093         (WebCore::RenderListBox::updateFromElement):
2094         (WebCore::RenderListBox::paintItemForeground):
2095         * rendering/RenderMarquee.cpp:
2096         (WebCore::RenderMarquee::marqueeSpeed):
2097         * rendering/RenderMenuList.cpp:
2098         (RenderMenuList::itemText):
2099         (RenderMenuList::itemIsEnabled):
2100         (RenderMenuList::itemIsLabel):
2101         * rendering/RenderMeter.cpp:
2102         (WebCore::RenderMeter::meterElement):
2103         * rendering/RenderObject.cpp:
2104         (WebCore::RenderObject::shouldRespectImageOrientation):
2105         (WebCore::RenderObject::getTextDecorationColors):
2106         (WebCore::RenderObject::offsetParent):
2107         * rendering/RenderProgress.cpp:
2108         (WebCore::RenderProgress::progressElement):
2109         * rendering/RenderTable.cpp:
2110         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
2111         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2112         * svg/graphics/SVGImageCache.cpp:
2113         (WebCore::SVGImageCache::imageForRenderer):
2114         * testing/Internals.cpp:
2115         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
2116         * xml/parser/XMLDocumentParserLibxml2.cpp:
2117         (WebCore::XMLDocumentParser::startElementNs):
2118
2119 2014-09-25  Brian J. Burg  <burg@cs.washington.edu>
2120
2121         Web Replay: Check event loop input extents during replay too
2122         https://bugs.webkit.org/show_bug.cgi?id=136316
2123
2124         Reviewed by Timothy Hatcher.
2125
2126         Sometimes we see different nondeterminism during capture and replay
2127         executions, so we should support determinism checks during replay too.
2128
2129         Move the withinEventLoopInputExtent flag to the base class.
2130
2131         No new tests, no behavior changed.
2132
2133         * replay/CapturingInputCursor.cpp:
2134         (WebCore::CapturingInputCursor::CapturingInputCursor):
2135         (WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Deleted.
2136         * replay/CapturingInputCursor.h:
2137         * replay/EventLoopInput.cpp:
2138         (WebCore::EventLoopInputExtent::EventLoopInputExtent):
2139         (WebCore::EventLoopInputExtent::~EventLoopInputExtent):
2140         Make m_cursor a pointer and add a new constructor so we can conditionally
2141         enter event loop input extents. This is useful in some network replay situations.
2142
2143         * replay/EventLoopInput.h:
2144         * replay/ReplayController.cpp:
2145         (WebCore::ReplayController::willDispatchEvent): Expand the assertion to include replaying.
2146
2147 2014-09-25  Jeremy Jones  <jeremyj@apple.com>
2148
2149         Race in ref pointer for WebVideoFullscreenInterfaceAVKit.
2150         https://bugs.webkit.org/show_bug.cgi?id=137123
2151
2152         Reviewed by Eric Carlson.
2153
2154         Add WebThreadRun to prevent race with RefPtr of WebVideoFullscreenInterfaceAVKit.
2155
2156         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2157         (-[WebVideoFullscreenController didSetupFullscreen]): add WebThreadRun
2158         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2159         (WebVideoFullscreenInterfaceAVKit::setDuration): ditto
2160         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
2161         (WebVideoFullscreenInterfaceAVKit::setRate): ditto
2162         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
2163         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
2164         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
2165         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
2166         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto
2167         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto
2168         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
2169         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
2170         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
2171         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
2172
2173 2014-09-25  Chris Dumez  <cdumez@apple.com>
2174
2175         Unreviewed iOS build fix after r173944.
2176
2177         Add a missing header include.
2178         See <rdar://problem/18454708> for more details.
2179
2180         * html/parser/HTMLTreeBuilder.cpp:
2181
2182 2014-09-25  Christophe Dumez  <cdumez@apple.com>
2183
2184         Stop using legacy NODE_TYPE_CASTS() macro in svg/
2185         https://bugs.webkit.org/show_bug.cgi?id=137106
2186
2187         Reviewed by Ryosuke Niwa.
2188
2189         Stop using legacy NODE_TYPE_CASTS() in svg/ and use the new
2190         SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
2191         can be used for those types.
2192
2193         No new tests, no behavior change.
2194
2195         * css/CSSComputedStyleDeclaration.cpp:
2196         (WebCore::ComputedStyleExtractor::propertyValue):
2197         * dom/Element.h:
2198         * dom/Node.h:
2199         (WebCore::is):
2200         * dom/make_names.pl:
2201         (printTypeHelpers):
2202         * html/HTMLElement.h:
2203         * html/HTMLMediaElement.h:
2204         * html/HTMLPlugInImageElement.h:
2205         * html/LabelableElement.h:
2206         * mathml/MathMLElement.h:
2207         Rename NodeTypeCastTraits::is() to NodeTypeCastTraits::isType() to
2208         avoid naming conflict with the global is<>() function. This was an
2209         issue when is<>() was called from one of the template specializations.
2210
2211         * rendering/svg/RenderSVGBlock.h:
2212         (WebCore::RenderSVGBlock::graphicsElement):
2213         * rendering/svg/RenderSVGGradientStop.cpp:
2214         (WebCore::RenderSVGGradientStop::gradientElement):
2215         * rendering/svg/RenderSVGInline.h:
2216         (WebCore::RenderSVGInline::graphicsElement):
2217         * rendering/svg/RenderSVGResourceClipper.cpp:
2218         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
2219         * rendering/svg/RenderSVGResourceContainer.cpp:
2220         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
2221         * rendering/svg/RenderSVGShape.h:
2222         (WebCore::RenderSVGShape::graphicsElement):
2223         * rendering/svg/RenderSVGTransformableContainer.h:
2224         * rendering/svg/SVGRenderSupport.cpp:
2225         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
2226         * rendering/svg/SVGRenderTreeAsText.cpp:
2227         (WebCore::operator<<):
2228         * rendering/svg/SVGRenderingContext.cpp:
2229         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2230         * rendering/svg/SVGResources.cpp:
2231         (WebCore::targetReferenceFromResource):
2232         * svg/SVGAElement.cpp:
2233         (WebCore::SVGAElement::defaultEventHandler):
2234         * svg/SVGAnimateElement.cpp:
2235         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2236         (WebCore::isSVGAnimateElement): Deleted.
2237         Use is<>() / downcast<>() where appropriate.
2238
2239         * svg/SVGAnimateElement.h:
2240         (WebCore::isSVGAnimateElement):
2241         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
2242         overload for isSVGAnimateElement() taking an SVGElement in argument to
2243         bypass the is<SVGElement>() check when the input type is an SVGElement.
2244
2245         * svg/SVGAnimationElement.cpp:
2246         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2247         * svg/SVGElement.cpp:
2248         (WebCore::SVGElement::getBoundingBox):
2249         Use is<>() / downcast<>() where appropriate.
2250
2251         * svg/SVGElement.h:
2252         * svg/SVGFilterPrimitiveStandardAttributes.h:
2253         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
2254         the pre-existing NodeTypeCastTraits template specialization as it is
2255         now generated by the macro.
2256
2257         * svg/SVGGradientElement.cpp:
2258         (WebCore::isSVGGradientElement): Deleted.
2259         * svg/SVGGradientElement.h:
2260         (WebCore::isSVGGradientElement):
2261         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
2262         overload for isSVGAnimateElement() taking an SVGElement in argument to
2263         bypass the is<SVGElement>() check when the input type is an SVGElement.
2264
2265         * svg/SVGGraphicsElement.h:
2266         (WebCore::isSVGGraphicsElement):
2267         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().
2268
2269         * svg/SVGLinearGradientElement.cpp:
2270         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
2271         * svg/SVGLocatable.cpp:
2272         (WebCore::SVGLocatable::getTransformToElement):
2273         * svg/SVGPolyElement.cpp:
2274         (WebCore::SVGPolyElement::synchronizePoints):
2275         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
2276         (WebCore::isSVGPolyElement): Deleted.
2277         Use is<>() / downcast<>() where appropriate.
2278
2279         * svg/SVGPolyElement.h:
2280         (WebCore::isSVGPolyElement):
2281         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
2282         overload for isPolyElement() taking an SVGElement in argument to
2283         bypass the is<SVGElement>() check when the input type is an SVGElement.
2284
2285         * svg/SVGRadialGradientElement.cpp:
2286         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
2287         * svg/SVGTextContentElement.cpp:
2288         (WebCore::SVGTextContentElement::synchronizeTextLength):
2289         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
2290         (WebCore::SVGTextContentElement::elementFromRenderer):
2291         Use is<>() / downcast<>() where appropriate.
2292
2293         * svg/SVGTextContentElement.h:
2294         WebCore::isSVGTextContentElement):
2295         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().
2296
2297         * svg/SVGUseElement.cpp:
2298         (WebCore::SVGUseElement::toClipPath):
2299         Use is<>() / downcast<>() where appropriate. Also use tighter typing
2300         for value returned by shadowTreeElement().
2301
2302         * svg/animation/SVGSMILElement.cpp:
2303         (WebCore::SVGSMILElement::buildPendingResource):
2304         (WebCore::SVGSMILElement::connectConditions):
2305         (WebCore::SVGSMILElement::disconnectConditions):
2306         Use is<>() / downcast<>() where appropriate.
2307
2308         * svg/animation/SVGSMILElement.h:
2309         (WebCore::isSVGSMILElement):
2310         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
2311         the pre-existing NodeTypeCastTraits template specialization as it is
2312         now generated by the macro.
2313
2314 2014-09-25  Brent Fulgham  <bfulgham@apple.com>
2315
2316         Minor refactoring to mediaType/presentationType
2317         https://bugs.webkit.org/show_bug.cgi?id=137085
2318
2319         Reviewed by Eric Carlson.
2320
2321         Add overloads for presentationType for the audio and video
2322         HTML elements so that we don't have to explicity check the
2323         tag name (via string comparison) to identify the type of
2324         element.
2325
2326         No new tests. Should create no change in behavior.
2327
2328         * html/HTMLAudioElement.h: Overload presentationType to always
2329         indicate audio type.
2330         * html/HTMLMediaElement.cpp:
2331         (WebCore::HTMLMediaElement::mediaType): Use the presentationType
2332         method implementation, rather than duplicating that code.
2333         * html/HTMLVideoElement.h: Overload presentationType to always
2334         return video type.
2335
2336 2014-09-25  Javier Fernandez  <jfernandez@igalia.com>
2337
2338         ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow
2339         https://bugs.webkit.org/show_bug.cgi?id=136945
2340
2341         Reviewed by Sergio Villar Senin.
2342
2343         Checking out whether the grid-template-areas value contains a white-space only
2344         string, which is not valid as it does not produce a cell token.
2345
2346         Test: fast/css-grid-layout/grid-template-areas-empty-string-crash.html
2347
2348         * css/CSSParser.cpp:
2349         (WebCore::CSSParser::parseGridTemplateAreasRow):
2350
2351 2014-09-25  Csaba Osztrogon√°c  <ossy@webkit.org>
2352
2353         Remove WinCE port from trunk
2354         https://bugs.webkit.org/show_bug.cgi?id=136951
2355
2356         Reviewed by Alex Christensen.
2357
2358         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
2359         * PlatformWinCE.cmake: Removed.
2360         * accessibility/AXObjectCache.cpp:
2361         * editing/FrameSelection.cpp:
2362         (WebCore::FrameSelection::modifyMovingRight):
2363         * loader/icon/wince/IconDatabaseWinCE.cpp: Removed.
2364         * page/EventHandler.cpp:
2365         (WebCore::EventHandler::sendContextMenuEventForKey):
2366         * page/Settings.cpp:
2367         * page/win/EventHandlerWin.cpp:
2368         (WebCore::EventHandler::createDraggingDataTransfer):
2369         * platform/ContextMenu.h:
2370         * platform/DragImage.cpp:
2371         * platform/FileSystem.h:
2372         * platform/graphics/BitmapImage.cpp:
2373         (WebCore::BitmapImage::mayFillWithSolidColor):
2374         * platform/graphics/FontGlyphs.cpp:
2375         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2376         * platform/graphics/FontPlatformData.h:
2377         * platform/graphics/ImageBufferData.h:
2378         * platform/graphics/MediaPlayer.cpp:
2379         * platform/graphics/SimpleFontData.h:
2380         * platform/graphics/opentype/OpenTypeUtilities.cpp:
2381         (WebCore::renameAndActivateFont):
2382         * platform/graphics/opentype/OpenTypeUtilities.h:
2383         * platform/graphics/win/DIBPixelData.cpp:
2384         (WebCore::DIBPixelData::setRGBABitmapAlpha):
2385         * platform/graphics/win/GDIExtras.cpp: Removed.
2386         * platform/graphics/win/GDIExtras.h:
2387         (WebCore::hasAlphaBlendSupport):
2388         (WebCore::alphaBlendIfSupported):
2389         * platform/graphics/win/IconWin.cpp:
2390         (WebCore::Icon::createIconForFiles):
2391         (WebCore::Icon::paint):
2392         * platform/graphics/win/SimpleFontDataWin.cpp:
2393         (WebCore::SimpleFontData::initGDIFont):
2394         (WebCore::SimpleFontData::platformDestroy):
2395         (WebCore::SimpleFontData::boundsForGDIGlyph):
2396         (WebCore::SimpleFontData::widthForGDIGlyph):
2397         (WebCore::SimpleFontData::scriptFontProperties):
2398         * platform/graphics/wince/FontCacheWinCE.cpp: Removed.
2399         * platform/graphics/wince/FontCustomPlatformData.cpp: Removed.
2400         * platform/graphics/wince/FontCustomPlatformData.h: Removed.
2401         * platform/graphics/wince/FontPlatformData.cpp: Removed.
2402         * platform/graphics/wince/FontPlatformData.h: Removed.
2403         * platform/graphics/wince/FontWinCE.cpp: Removed.
2404         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp: Removed.
2405         * platform/graphics/wince/GradientWinCE.cpp: Removed.
2406         * platform/graphics/wince/GraphicsContextWinCE.cpp: Removed.
2407         * platform/graphics/wince/ImageBufferDataWince.h: Removed.
2408         * platform/graphics/wince/ImageBufferWinCE.cpp: Removed.
2409         * platform/graphics/wince/ImageWinCE.cpp: Removed.
2410         * platform/graphics/wince/MediaPlayerPrivateWinCE.h: Removed.
2411         * platform/graphics/wince/MediaPlayerProxy.cpp: Removed.
2412         * platform/graphics/wince/MediaPlayerProxy.h: Removed.
2413         * platform/graphics/wince/PathWinCE.cpp: Removed.
2414         * platform/graphics/wince/PlatformPathWinCE.cpp: Removed.
2415         * platform/graphics/wince/PlatformPathWinCE.h: Removed.
2416         * platform/graphics/wince/SharedBitmap.cpp: Removed.
2417         * platform/graphics/wince/SharedBitmap.h: Removed.
2418         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Removed.
2419         * platform/graphics/wince/WinCEGraphicsExtras.h: Removed.
2420         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2421         * platform/network/win/NetworkStateNotifierWin.cpp:
2422         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
2423         * platform/win/COMPtr.h:
2424         * platform/win/ClipboardUtilitiesWin.cpp:
2425         * platform/win/ContextMenuItemWin.cpp:
2426         * platform/win/ContextMenuWin.cpp:
2427         (WebCore::ContextMenu::getContextMenuItems):
2428         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
2429         * platform/win/DragImageWin.cpp:
2430         (WebCore::dragLabelFont):
2431         * platform/win/FileSystemWin.cpp:
2432         (WebCore::pathByAppendingComponent):
2433         (WebCore::pathGetFileName):
2434         (WebCore::storageDirectory):
2435         * platform/win/LoggingWin.cpp:
2436         (WebCore::logLevelString):
2437         * platform/win/PasteboardWin.cpp:
2438         (WebCore::PasteboardOwnerWndProc):
2439         (WebCore::Pasteboard::createForCopyAndPaste):
2440         (WebCore::pathRemoveBadFSCharacters):
2441         (WebCore::filesystemPathFromUrlOrTitle):
2442         (WebCore::createGlobalHDropContent):
2443         * platform/win/PlatformMouseEventWin.cpp:
2444         (WebCore::messageToEventType):
2445         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2446         * platform/win/PlatformScreenWin.cpp:
2447         (WebCore::deviceInfoForWidget):
2448         (WebCore::screenIsMonochrome):
2449         * platform/win/PopupMenuWin.cpp:
2450         (WebCore::PopupMenuWin::show):
2451         (WebCore::PopupMenuWin::paint):
2452         (WebCore::PopupMenuWin::registerClass):
2453         (WebCore::PopupMenuWin::wndProc):
2454         * platform/win/ScrollbarThemeWin.cpp:
2455         (WebCore::ScrollbarThemeWin::paintButton):
2456         * platform/win/SharedBufferWin.cpp:
2457         * platform/win/SharedTimerWin.cpp:
2458         (WebCore::TimerWindowWndProc):
2459         (WebCore::initializeOffScreenTimerWindow):
2460         (WebCore::queueTimerProc):
2461         (WebCore::setSharedTimerFireInterval):
2462         (WebCore::stopSharedTimer):
2463         * platform/win/SoftLinking.h:
2464         * platform/win/SystemInfo.cpp:
2465         (WebCore::windowsVersion):
2466         (WebCore::processorArchitecture):
2467         (WebCore::architectureTokenForUAString):
2468         * platform/win/WCDataObject.cpp:
2469         (WebCore::WCDataObject::CopyMedium):
2470         * plugins/PluginDatabase.cpp:
2471         * plugins/PluginView.cpp:
2472         (WebCore::PluginView::stop):
2473         * plugins/PluginViewNone.cpp:
2474         * plugins/win/PluginDatabaseWin.cpp:
2475         (WebCore::addWindowsMediaPlayerPluginDirectory):
2476         (WebCore::addMacromediaPluginDirectories):
2477         * plugins/win/PluginPackageWin.cpp:
2478         (WebCore::PluginPackage::load):
2479         * plugins/win/PluginViewWin.cpp:
2480         (WebCore::setUpOffscreenPaintingHooks):
2481         (WebCore::registerPluginView):
2482         (WebCore::PluginView::wndProc):
2483         (WebCore::PluginView::updatePluginWidget):
2484         (WebCore::PluginView::paintIntoTransformedContext):
2485         (WebCore::PluginView::paint):
2486         (WebCore::PluginView::handleMouseEvent):
2487         (WebCore::PluginView::setParent):
2488         (WebCore::PluginView::setNPWindowRect):
2489         (WebCore::PluginView::platformStart):
2490         * rendering/RenderThemeWinCE.cpp: Removed.
2491         * rendering/RenderThemeWinCE.h: Removed.
2492         * storage/wince/DatabaseThreadWinCE.cpp: Removed.
2493         * storage/wince/DatabaseThreadWinCE.h: Removed.
2494         * storage/wince/StorageThreadWinCE.cpp: Removed.
2495         * storage/wince/StorageThreadWinCE.h: Removed.
2496
2497 2014-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2498
2499         Unreviewed. Fix GTK+ build after r173944.
2500
2501         * page/ContextMenuController.cpp: Add missing include.
2502
2503 2014-09-24  Christophe Dumez  <cdumez@apple.com>
2504
2505         Use tighter typing for render objects in RenderGeometryMap
2506         https://bugs.webkit.org/show_bug.cgi?id=137102
2507
2508         Reviewed by Ryosuke Niwa.
2509
2510         Use tighter typing for render objects in RenderGeometryMap for clarity
2511         and efficiency.
2512
2513         In particular, using RenderElement type instead of RenderObject
2514         in canMapBetweenRenderers() allows us to call the faster
2515         RenderElement::style() instead of RenderObject::style().
2516
2517         No new tests, no behavior change.
2518
2519         * rendering/RenderGeometryMap.cpp:
2520         (WebCore::canMapBetweenRenderers):
2521         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
2522
2523 2014-09-24  Christophe Dumez  <cdumez@apple.com>
2524
2525         Add initial is<>() / downcast<>() support for any type of Nodes
2526         https://bugs.webkit.org/show_bug.cgi?id=137056
2527
2528         Reviewed by Benjamin Poulain.
2529
2530         Add initial is<>() / downcast<>() support for any type of Nodes, not
2531         just Elements by:
2532         - Moving the is<>() / downcast<>() declarations from Element.h to
2533           Node.h
2534         - Introducing a SPECIALIZE_TYPE_TRAITS_*() macro that generates the
2535           needed template specializations for is<>() / downcast<>() to work.
2536           This macro will replace NODE_TYPE_CASTS() entirely once the code base
2537           is fully ported.
2538
2539         This patch makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
2540         HTMLFormControlElement, that is an HTMLElement for which the template
2541         specializations cannot be automatically generated because it requires
2542         special handling.
2543
2544         This patch also makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
2545         DocumentFragment to show that it can be used for non-Element Nodes.
2546
2547         No new tests, no behavior change.
2548
2549         * accessibility/AccessibilityNodeObject.cpp:
2550         (WebCore::AccessibilityNodeObject::isReadOnly):
2551         (WebCore::AccessibilityNodeObject::isRequired):
2552         (WebCore::AccessibilityNodeObject::isControl):
2553         * css/SelectorCheckerTestFunctions.h:
2554         (WebCore::isAutofilled):
2555         (WebCore::isDisabled):
2556         (WebCore::isEnabled):
2557         * css/StyleResolver.cpp:
2558         (WebCore::StyleResolver::canShareStyleWithElement):
2559         (WebCore::StyleResolver::adjustRenderStyle):
2560         * dom/Document.cpp:
2561         (WebCore::Document::importNode):
2562         (WebCore::Document::setFocusedElement):
2563         * dom/DocumentFragment.h:
2564         (WebCore::isDocumentFragment):
2565         * dom/Element.cpp:
2566         (WebCore::Element::focus):
2567         * dom/Element.h:
2568         (WebCore::is): Deleted.
2569         (WebCore::downcast): Deleted.
2570         * dom/Node.h:
2571         (WebCore::is):
2572         (WebCore::downcast):
2573         * dom/make_names.pl:
2574         (printTypeHelpers):
2575         * editing/FrameSelection.cpp:
2576         (WebCore::scanForForm):
2577         * editing/TextIterator.cpp:
2578         (WebCore::isRendererReplacedElement):
2579         * html/FormAssociatedElement.h:
2580         * html/HTMLElement.h:
2581         * html/HTMLFieldSetElement.cpp:
2582         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
2583         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
2584         * html/HTMLFormControlElement.cpp:
2585         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
2586         * html/HTMLFormControlElement.h:
2587         (WebCore::isHTMLFormControlElement):
2588         * html/HTMLFormElement.cpp:
2589         (WebCore::HTMLFormElement::submitImplicitly):
2590         (WebCore::submitElementFromEvent):
2591         (WebCore::HTMLFormElement::validateInteractively):
2592         (WebCore::HTMLFormElement::submit):
2593         (WebCore::HTMLFormElement::reset):
2594         (WebCore::HTMLFormElement::formElementIndex):
2595         (WebCore::HTMLFormElement::defaultButton):
2596         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
2597         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
2598         * html/HTMLMediaElement.h:
2599         * html/HTMLPlugInImageElement.h:
2600         * html/HTMLSummaryElement.cpp:
2601         (WebCore::isClickableControl):
2602         * html/LabelableElement.h:
2603         * html/RadioNodeList.cpp:
2604         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2605         (WebCore::RadioNodeList::elementMatches):
2606         * html/parser/HTMLConstructionSite.cpp:
2607         (WebCore::HTMLConstructionSite::findFosterSite):
2608         * html/parser/HTMLTreeBuilder.cpp:
2609         (WebCore::disallowTelephoneNumberParsing):
2610         * loader/FormSubmission.cpp:
2611         (WebCore::FormSubmission::create):
2612         * mathml/MathMLElement.h:
2613         * page/ContextMenuController.cpp:
2614         (WebCore::ContextMenuController::populate):
2615         * page/Frame.cpp:
2616         (WebCore::Frame::searchForLabelsBeforeElement):
2617         * rendering/RenderButton.cpp:
2618         (WebCore::RenderButton::formControlElement):
2619         * rendering/RenderLayer.cpp:
2620         (WebCore::RenderLayer::resize):
2621         * rendering/RenderTheme.cpp:
2622         (WebCore::RenderTheme::isReadOnlyControl):
2623         * svg/SVGElement.h:
2624         * svg/SVGFilterPrimitiveStandardAttributes.h:
2625         * svg/animation/SVGSMILElement.h:
2626
2627 2014-09-24  Darin Adler  <darin@apple.com>
2628
2629         Old Turkic characters behave as left-to-right instead of right-to-left, because they are encoded as surrogate pairs.
2630         https://bugs.webkit.org/show_bug.cgi?id=70029
2631
2632         Reviewed by Dan Bernstein.
2633
2634         Test: fast/text/international/old-turkic-direction.html
2635
2636         * CMakeLists.txt: Added InlineIterator.cpp.
2637         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2638         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2639         * WebCore.xcodeproj/project.pbxproj: Ditto.
2640         * rendering/RenderingAllInOne.cpp: Ditto.
2641
2642         * rendering/InlineIterator.cpp: Added.
2643         (WebCore::InlineIterator::surrogateTextDirection): New function used to compute the direction
2644         when a surrogate pair is involved.
2645         * rendering/InlineIterator.h: Made the characterAt function private.
2646         (WebCore::InlineIterator::previousInSameNode): Took out unneeded range check. A zero will underflow
2647         and become a large number and the characterAt function will return 0 in that case.
2648         (WebCore::InlineIterator::direction): Added code to check U16_IS_SINGLE before calling
2649         u_charDirection, and call surrogateTextDirection instead.
2650
2651 2014-09-24  Christophe Dumez  <cdumez@apple.com>
2652
2653         Unreviewed build fix after r173941.
2654
2655         Rename shadow to m_shadow.
2656
2657         * rendering/TextPainter.h:
2658         (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
2659
2660 2014-09-22  Myles C. Maxfield  <mmaxfield@apple.com>
2661
2662         REGRESSION: Text with a zero offset, zero blur shadow vanishes
2663         https://bugs.webkit.org/show_bug.cgi?id=136801
2664
2665         Reviewed by Darin Adler.
2666
2667         This patch performs some cleanup regarding TextPainter's shadow logic and handles an
2668         additional case of empty shadows. Previously, there was tight coupling between
2669         applyShadowToGraphicalContext() and paintTextWithShadows(), as they both used a
2670         collection of variables to determine how shadows are to be drawn. This complexity has
2671         been moved into a helper class, ShadowApplier, which performs what
2672         applyShadowToGraphicsContext() used to do, and cleans up correctly in its destructor.
2673         This removes the tight coupling mentioned earlier.
2674
2675         Test: fast/text/empty-shadow.html
2676
2677         * rendering/InlineTextBox.cpp:
2678         (WebCore::InlineTextBox::applyShadowToGraphicsContext): Moved to ShadowApplier.
2679         * rendering/InlineTextBox.h: Deleted applyShadowToGraphicsContext signature.
2680         * rendering/TextPainter.cpp:
2681         (WebCore::ShadowApplier::ShadowApplier): Perform the contents of applyShadowToGraphicsContext()
2682         (WebCore::ShadowApplier::~ShadowApplier): Undo the work done previously
2683         (WebCore::paintTextWithShadows): Create a ShadowApplier to do the relevant shadow work. In addition,
2684         refactor some boolean flags to more meaningful ones with relation to the computation at hand.
2685         (WebCore::isEmptyShadow): Moved to TextPainter.h, named shadowIsCompletelyCoveredByText()
2686         * rendering/TextPainter.h:
2687         (WebCore::ShadowApplier::ShadowApplier): Moved from InlineTextBox::applyShadowToGraphicsContext().
2688         (WebCore::ShadowApplier::extraOffset): Getter.
2689         (WebCore::ShadowApplier::~ShadowApplier): Moved from TextPainter::paintTextWithShadows().
2690         (WebCore::isLastShadowIteration): Helper function.
2691         (WebCore::shadowIsCompletelyCoveredByText): Determines whether or not we should not draw the shadow.
2692         * rendering/svg/SVGInlineTextBox.cpp:
2693         (WebCore::SVGInlineTextBox::paintTextWithShadows): Update to use ShadowApplier.
2694
2695 2014-09-24  Brian J. Burg  <burg@cs.washington.edu>
2696
2697         Web Inspector: subtract elapsed time while debugger is paused from profile nodes
2698         https://bugs.webkit.org/show_bug.cgi?id=136796
2699
2700         Reviewed by Timothy Hatcher.
2701
2702         * inspector/TimelineRecordFactory.cpp:
2703         (WebCore::buildInspectorObject):
2704
2705 2014-09-24  Christophe Dumez  <cdumez@apple.com>
2706
2707         Use is<HTML*Element>() instead of isHTML*Element() - Part 1
2708         https://bugs.webkit.org/show_bug.cgi?id=137068
2709
2710         Reviewed by Ryosuke Niwa.
2711
2712         Start using is<HTML*Element>() instead of isHTML*Element().
2713         Remaining usages will be updated in a follow-up patch to
2714         reduce the size of the change.
2715
2716         No new tests, no behavior change.
2717
2718         * accessibility/AccessibilityListBoxOption.cpp:
2719         (WebCore::AccessibilityListBoxOption::isSelected):
2720         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
2721         (WebCore::AccessibilityListBoxOption::stringValue):
2722         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
2723         * accessibility/AccessibilityMediaControls.cpp:
2724         (WebCore::AccessibilityMediaTimeline::valueDescription):
2725         * accessibility/AccessibilityMenuListOption.cpp:
2726         (WebCore::AccessibilityMenuListOption::setElement):
2727         * accessibility/AccessibilityMenuListPopup.cpp:
2728         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
2729         * accessibility/AccessibilityNodeObject.cpp:
2730         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2731         (WebCore::AccessibilityNodeObject::isNativeTextControl):
2732         (WebCore::AccessibilityNodeObject::isNativeImage):
2733         (WebCore::AccessibilityNodeObject::isInputImage):
2734         (WebCore::AccessibilityNodeObject::isReadOnly):
2735         (WebCore::AccessibilityNodeObject::valueForRange):
2736         (WebCore::AccessibilityNodeObject::maxValueForRange):
2737         (WebCore::AccessibilityNodeObject::minValueForRange):
2738         (WebCore::isNodeActionElement):
2739         (WebCore::AccessibilityNodeObject::titleElementText):
2740         (WebCore::AccessibilityNodeObject::visibleText):
2741         (WebCore::AccessibilityNodeObject::title):
2742         (WebCore::AccessibilityNodeObject::colorValue):
2743         (WebCore::accessibleNameForNode):
2744         * accessibility/AccessibilityRenderObject.cpp:
2745         (WebCore::AccessibilityRenderObject::isFileUploadButton):
2746         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
2747         (WebCore::AccessibilityRenderObject::setValue):
2748         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
2749         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2750         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
2751         * accessibility/atk/AXObjectCacheAtk.cpp:
2752         (WebCore::notifyChildrenSelectionChange):
2753         * css/SelectorCheckerTestFunctions.h:
2754         (WebCore::isDisabled):
2755         (WebCore::isEnabled):
2756         (WebCore::isChecked):
2757         * css/StyleResolver.cpp:
2758         (WebCore::StyleResolver::adjustRenderStyle):
2759         * dom/EventDispatcher.cpp:
2760         (WebCore::EventDispatcher::dispatchEvent):
2761         * editing/FrameSelection.cpp:
2762         (WebCore::FrameSelection::selectAll):
2763         * editing/ReplaceSelectionCommand.cpp:
2764         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
2765         * editing/VisibleSelection.cpp:
2766         (WebCore::VisibleSelection::isInPasswordField):
2767         * editing/cocoa/HTMLConverter.mm:
2768         (HTMLConverter::_processElement):
2769         * editing/gtk/EditorGtk.cpp:
2770         (WebCore::elementURL):
2771         * editing/ios/EditorIOS.mm:
2772         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2773         * editing/markup.cpp:
2774         (WebCore::StyledMarkupAccumulator::appendText):
2775         (WebCore::isPlainTextMarkup):
2776         (WebCore::collectElementsToRemoveFromFragment):
2777         * html/HTMLCollection.cpp:
2778         (WebCore::isMatchingElement):
2779         * html/HTMLEmbedElement.cpp:
2780         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2781         * html/HTMLFormControlElement.cpp:
2782         (WebCore::shouldAutofocus):
2783         * html/HTMLFormElement.cpp:
2784         (WebCore::HTMLFormElement::getTextFieldValues):
2785         (WebCore::HTMLFormElement::formElementIndex):
2786         * html/HTMLImageLoader.cpp:
2787         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2788         (WebCore::HTMLImageLoader::notifyFinished):
2789         * html/HTMLNameCollection.cpp:
2790         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
2791         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
2792         (WebCore::DocumentNameCollection::elementMatches):
2793         * html/HTMLOptGroupElement.cpp:
2794         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
2795         (WebCore::HTMLOptGroupElement::ownerSelectElement):
2796         * html/HTMLOptionElement.cpp:
2797         (WebCore::HTMLOptionElement::index):
2798         (WebCore::HTMLOptionElement::ownerSelectElement):
2799         * html/HTMLSelectElement.cpp:
2800         (WebCore::HTMLSelectElement::add):
2801         (WebCore::HTMLSelectElement::value):
2802         (WebCore::HTMLSelectElement::setValue):
2803         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
2804         (WebCore::HTMLSelectElement::setLength):
2805         (WebCore::HTMLSelectElement::nextValidIndex):
2806         (WebCore::HTMLSelectElement::saveLastSelection):
2807         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
2808         (WebCore::HTMLSelectElement::updateListBoxSelection):
2809         (WebCore::HTMLSelectElement::listBoxOnChange):
2810         (WebCore::HTMLSelectElement::recalcListItems):
2811         (WebCore::HTMLSelectElement::selectedIndex):
2812         (WebCore::HTMLSelectElement::selectOption):
2813         (WebCore::HTMLSelectElement::optionToListIndex):
2814         (WebCore::HTMLSelectElement::listToOptionIndex):
2815         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
2816         (WebCore::HTMLSelectElement::saveFormControlState):
2817         (WebCore::HTMLSelectElement::searchOptionsForValue):
2818         (WebCore::HTMLSelectElement::restoreFormControlState):
2819         (WebCore::HTMLSelectElement::appendFormData):
2820         (WebCore::HTMLSelectElement::reset):
2821         (WebCore::HTMLSelectElement::updateSelectedState):
2822         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2823         (WebCore::HTMLSelectElement::lastSelectedListIndex):
2824         (WebCore::HTMLSelectElement::optionAtIndex):
2825         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
2826         (WebCore::HTMLSelectElement::length):
2827         * html/HTMLTagNames.in:
2828         * html/RadioInputType.cpp:
2829         (WebCore::RadioInputType::handleKeydownEvent):
2830         (WebCore::RadioInputType::isKeyboardFocusable):
2831         * html/parser/HTMLConstructionSite.cpp:
2832         (WebCore::hasImpliedEndTag):
2833         * html/parser/HTMLElementStack.cpp:
2834         (WebCore::HTMLNames::isSelectScopeMarker):
2835         * html/parser/HTMLTreeBuilder.cpp:
2836         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2837         (WebCore::HTMLTreeBuilder::processStartTag):
2838         (WebCore::HTMLTreeBuilder::processEndTag):
2839         * html/shadow/MediaControlElementTypes.cpp:
2840         (WebCore::mediaControlElementType):
2841         * loader/FormSubmission.cpp:
2842         (WebCore::FormSubmission::create):
2843         * loader/FrameLoader.cpp:
2844         (WebCore::FrameLoader::handleFallbackContent):
2845         * loader/ImageLoader.cpp:
2846         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
2847         * loader/SubframeLoader.cpp:
2848         (WebCore::SubframeLoader::requestObject):
2849         * loader/archive/cf/LegacyWebArchive.cpp:
2850         (WebCore::LegacyWebArchive::create):
2851         * page/Chrome.cpp:
2852         (WebCore::Chrome::setToolTip):
2853         * page/EventHandler.cpp:
2854         (WebCore::isSubmitImage):
2855         (WebCore::EventHandler::handleMousePressEvent):
2856         * page/FocusController.cpp:
2857         (WebCore::clearSelectionIfNeeded):
2858         * page/FrameView.cpp:
2859         (WebCore::FrameView::addEmbeddedObjectToUpdate):
2860         (WebCore::FrameView::updateEmbeddedObject):
2861         * page/PageSerializer.cpp:
2862         (WebCore::frameOwnerURLAttributeName):
2863         * page/SpatialNavigation.cpp:
2864         (WebCore::canScrollInDirection):
2865         * rendering/HitTestResult.cpp:
2866         (WebCore::HitTestResult::altDisplayString):
2867         (WebCore::HitTestResult::absoluteImageURL):
2868         (WebCore::HitTestResult::absolutePDFURL):
2869         (WebCore::HitTestResult::isContentEditable):
2870         * rendering/RenderBlockFlow.cpp:
2871         (WebCore::resizeTextPermitted):
2872         * rendering/RenderBox.cpp:
2873         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
2874         * rendering/RenderButton.cpp:
2875         (WebCore::RenderButton::updateFromElement):
2876         (WebCore::RenderButton::canHaveGeneratedChildren):
2877         * rendering/RenderDetailsMarker.cpp:
2878         (WebCore::RenderDetailsMarker::isOpen):
2879         * rendering/RenderFileUploadControl.cpp:
2880         (WebCore::RenderFileUploadControl::uploadButton):
2881         * rendering/RenderImage.cpp:
2882         (WebCore::RenderImage::updateAltText):
2883         * rendering/RenderListBox.cpp:
2884         (WebCore::RenderListBox::updateFromElement):
2885         (WebCore::RenderListBox::addFocusRingRects):
2886         (WebCore::RenderListBox::paintItemForeground):
2887         (WebCore::RenderListBox::paintItemBackground):
2888         * rendering/RenderMenuList.cpp:
2889         (WebCore::selectedOptionCount):
2890         (RenderMenuList::updateOptionsWidth):
2891         (RenderMenuList::setTextFromOption):
2892         (RenderMenuList::itemText):
2893         (RenderMenuList::itemIsEnabled):
2894         (RenderMenuList::itemIsSelected):
2895         * rendering/RenderTheme.cpp:
2896         (WebCore::RenderTheme::paintSliderTicks):
2897         * testing/Internals.cpp:
2898         (WebCore::Internals::selectColorInColorChooser):
2899         (WebCore::Internals::wasLastChangeUserEdit):
2900         (WebCore::Internals::isSelectPopupVisible):
2901         * xml/parser/XMLDocumentParserLibxml2.cpp:
2902         (WebCore::XMLDocumentParser::startElementNs):
2903
2904 2014-09-24  Eric Carlson  <eric.carlson@apple.com>
2905
2906         [iOS] Remove MediaPlayer::setHasPlaybackTargetAvailabilityListeners
2907         https://bugs.webkit.org/show_bug.cgi?id=137075
2908
2909         Reviewed by Dean Jackson.
2910
2911         No new tests, this just removes unused code.
2912
2913         * platform/graphics/MediaPlayer.cpp:
2914         (WebCore::MediaPlayer::setHasPlaybackTargetAvailabilityListeners): Deleted.
2915         * platform/graphics/MediaPlayer.h:
2916         * platform/graphics/MediaPlayerPrivate.h:
2917         (WebCore::MediaPlayerPrivateInterface::setHasPlaybackTargetAvailabilityListeners): Deleted.
2918
2919 2014-09-21  Timothy Hatcher  <timothy@apple.com>
2920
2921         Make the Web Inspector use a separate web process.
2922
2923         https://bugs.webkit.org/show_bug.cgi?id=135120
2924
2925         Reviewed by Anders Carlsson.
2926
2927         * English.lproj/Localizable.strings: Updated.
2928
2929         * WebCore.exp.in:
2930         * WebCore.xcodeproj/project.pbxproj:
2931         * bindings/js/ScriptGlobalObject.h:
2932         * bindings/js/ScriptState.h:
2933         * inspector/InspectorFrontendHost.h:
2934         * inspector/InspectorPageAgent.h:
2935         * page/Chrome.h:
2936         Exported a few functions and private headers.
2937
2938         * inspector/InspectorController.cpp:
2939         (WebCore::InspectorController::InspectorController):
2940         (WebCore::InspectorController::setInspectorFrontendClient):
2941         (WebCore::InspectorController::hasInspectorFrontendClient):
2942         (WebCore::InspectorController::show):
2943         * inspector/InspectorController.h:
2944         Make InspectorFrontendClient a pointer instead of a std::unique_ptr.
2945         This makes it easier to implement InspectorFrontendClient as
2946         part of an existing object that is externally owned.
2947
2948         * testing/Internals.cpp:
2949         (WebCore::Internals::openDummyInspectorFrontend):
2950         (WebCore::Internals::closeDummyInspectorFrontend):
2951         * testing/Internals.h:
2952         Change InspectorFrontendClientDummy from being moved to owned.
2953
2954 2014-09-23  Dean Jackson  <dino@apple.com>
2955
2956         [Yosemite] Button text doesn't go white while pushing the button, like it does for real buttons
2957         https://bugs.webkit.org/show_bug.cgi?id=137054
2958         rdar://problem/17559038
2959
2960         Reviewed by Sam Weinig.
2961
2962         On Yosemite and above, system buttons paint with white-ish text when they
2963         are pressed. Since this isn't exposed by API, I've hardcoded the value
2964         into RenderThemeMac.
2965
2966         The actual state is exposed by adding a :active rule to html.css that
2967         uses a new CSSValueKeyword: ActiveButtonText.
2968
2969         Unfortunately I can't find a way to test this, because the active state isn't
2970         testable. We should really expose the Inspector's forcePseudoState function into
2971         window.internals.
2972
2973         * css/CSSValueKeywords.in: Add "activebuttontext".
2974         * css/html.css:
2975         (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
2976         button elements.
2977         * rendering/RenderTheme.cpp:
2978         (WebCore::RenderTheme::systemColor): Handle CSSValueActivebuttontext as black.
2979         * rendering/RenderThemeMac.mm:
2980         (WebCore::RenderThemeMac::systemColor): Handle CSSValueActivebuttontext as
2981         white with 75% opacity.
2982
2983 2014-09-24  Christophe Dumez  <cdumez@apple.com>
2984
2985         Use is<SVG*Element>() instead of isSVG*Element()
2986         https://bugs.webkit.org/show_bug.cgi?id=137058
2987
2988         Reviewed by Dirk Schulze.
2989
2990         Use is<SVG*Element>() instead of isSVG*Element() and drop support for
2991         generated isSVG*Element().
2992
2993         No new tests, no behavior change.
2994
2995         * css/CSSCursorImageValue.cpp:
2996         (WebCore::resourceReferencedByCursorElement):
2997         * css/StyleResolver.cpp:
2998         (WebCore::StyleResolver::useSVGZoomRulesForLength):
2999         * dom/DocumentStyleSheetCollection.cpp:
3000         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
3001         * dom/ScriptElement.cpp:
3002         (WebCore::toScriptElementIfPossible):
3003         * dom/make_names.pl:
3004         (printTypeHelpers):
3005         * editing/gtk/EditorGtk.cpp:
3006         (WebCore::elementURL):
3007         * rendering/HitTestResult.cpp:
3008         (WebCore::HitTestResult::absoluteImageURL):
3009         (WebCore::HitTestResult::isLiveLink):
3010         * rendering/svg/RenderSVGEllipse.cpp:
3011         (WebCore::RenderSVGEllipse::calculateRadiiAndCenter):
3012         * rendering/svg/RenderSVGTransformableContainer.cpp:
3013         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
3014         * rendering/svg/SVGPathData.cpp:
3015         (WebCore::updatePathFromCircleElement):
3016         * rendering/svg/SVGRenderTreeAsText.cpp:
3017         (WebCore::operator<<):
3018         * rendering/svg/SVGResources.cpp:
3019         (WebCore::targetReferenceFromResource):
3020         * svg/SVGAltGlyphDefElement.cpp:
3021         (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
3022         * svg/SVGAltGlyphElement.cpp:
3023         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
3024         * svg/SVGAnimateMotionElement.cpp:
3025         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
3026         * svg/SVGDocument.cpp:
3027         (WebCore::SVGDocument::rootElement):
3028         * svg/SVGElement.cpp:
3029         (WebCore::SVGElement::isOutermostSVGSVGElement):
3030         (WebCore::SVGElement::ownerSVGElement):
3031         (WebCore::SVGElement::viewportElement):
3032         * svg/SVGFEComponentTransferElement.cpp:
3033         (WebCore::SVGFEComponentTransferElement::build):
3034         * svg/SVGFELightElement.cpp:
3035         (WebCore::SVGFELightElement::findLightElement):
3036         * svg/SVGFontData.cpp:
3037         (WebCore::SVGFontData::applySVGGlyphSelection):
3038         * svg/SVGFontElement.cpp:
3039         (WebCore::SVGFontElement::ensureGlyphCache):
3040         * svg/SVGFontFaceElement.cpp:
3041         (WebCore::SVGFontFaceElement::associatedFontElement):
3042         (WebCore::SVGFontFaceElement::rebuildFontFace):
3043         * svg/SVGFontFaceSrcElement.cpp:
3044         (WebCore::SVGFontFaceSrcElement::srcValue):
3045         (WebCore::SVGFontFaceSrcElement::childrenChanged):
3046         * svg/SVGGlyphElement.cpp:
3047         (WebCore::SVGGlyphElement::invalidateGlyphCache):
3048         * svg/SVGHKernElement.cpp:
3049         (WebCore::SVGHKernElement::insertedInto):
3050         (WebCore::SVGHKernElement::removedFrom):
3051         * svg/SVGLengthContext.cpp:
3052         (WebCore::SVGLengthContext::determineViewport):
3053         * svg/SVGLocatable.cpp:
3054         (WebCore::isViewportElement):
3055         * svg/SVGMPathElement.cpp:
3056         (WebCore::SVGMPathElement::pathElement):
3057         (WebCore::SVGMPathElement::notifyParentOfPathChange):
3058         * svg/SVGPathElement.cpp:
3059         (WebCore::SVGPathElement::invalidateMPathDependencies):
3060         * svg/SVGPatternElement.cpp:
3061         (WebCore::SVGPatternElement::collectPatternAttributes):
3062         * svg/SVGSVGElement.cpp:
3063         (WebCore::SVGSVGElement::setupInitialView):
3064         * svg/SVGUseElement.cpp:
3065         (WebCore::dumpInstanceTree):
3066         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
3067         * svg/SVGVKernElement.cpp:
3068         (WebCore::SVGVKernElement::insertedInto):
3069         (WebCore::SVGVKernElement::removedFrom):
3070
3071 2014-09-24  Benjamin Poulain  <bpoulain@apple.com>
3072
3073         Remove the style marking from :nth-child()
3074         https://bugs.webkit.org/show_bug.cgi?id=137055
3075
3076         Reviewed by Andreas Kling.
3077
3078         Previously, :nth-child() had to mark the RenderStyle as unique in order
3079         to prevent it from being used for style sharing.
3080
3081         After r173229, :nth-child() use the more generic element marking
3082         "StyleIsAffectedByPreviousSibling".
3083
3084         In StyleResolver::canShareStyleWithElement(), StyleIsAffectedByPreviousSibling
3085         is already used to prevent style sharing of those elements, making the "Unique"
3086         flag redundant.
3087
3088         Since it is now useless, remove the style marking from SelectorChecker and the CSS JIT.
3089
3090         Tests: fast/css/nth-child-style-sharing-even.html
3091                fast/css/nth-child-style-sharing-fixed-integer.html
3092                fast/css/nth-child-style-sharing-odd.html
3093
3094         * css/SelectorChecker.cpp:
3095         (WebCore::SelectorChecker::checkOne):
3096         * cssjit/SelectorCompiler.cpp:
3097         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
3098         (WebCore::SelectorCompiler::setElementChildIndexAndUpdateStyle): Deleted.
3099         * rendering/style/RenderStyle.h:
3100
3101 2014-09-23  Chris Dumez  <cdumez@apple.com>
3102
3103         Add support for is<HTML*Element>() for type checking
3104         https://bugs.webkit.org/show_bug.cgi?id=137015
3105
3106         Reviewed by Benjamin Poulain.
3107
3108         Add support for is<HTML*Element>() for type checking while keeping
3109         support for the legacy toHTML*Element() form until the code base is
3110         ported.
3111
3112         toHTML*Element() helpers are now macros to the new is<HTML*Element>()
3113         type checking helpers.
3114
3115         No new tests, no behavior change.
3116
3117         * dom/Document.cpp:
3118         (WebCore::Document::setTitle):
3119         * dom/Element.cpp:
3120         (WebCore::Element::childShouldCreateRenderer):
3121         * dom/Element.h:
3122         (WebCore::is):
3123         (WebCore::downcast):
3124         (WebCore::isElementOfType): Deleted.
3125         * dom/ElementAncestorIterator.h:
3126         (WebCore::lineageOfType):
3127         * dom/ElementIterator.h:
3128         (WebCore::findElementAncestorOfType):
3129         * dom/ElementTraversal.h:
3130         (WebCore::Traversal<ElementType>::firstChildTemplate):
3131         (WebCore::Traversal<ElementType>::lastChildTemplate):
3132         (WebCore::Traversal<ElementType>::firstWithinTemplate):
3133         (WebCore::Traversal<ElementType>::lastWithinTemplate):
3134         (WebCore::Traversal<ElementType>::nextTemplate):
3135         (WebCore::Traversal<ElementType>::previous):
3136         (WebCore::Traversal<ElementType>::nextSibling):
3137         (WebCore::Traversal<ElementType>::previousSibling):
3138         (WebCore::Traversal<ElementType>::nextSkippingChildren):
3139         * dom/TypedElementDescendantIterator.h:
3140         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
3141         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
3142         * dom/make_names.pl:
3143         (printTypeHelpers):
3144
3145 2014-09-23  Benjamin Poulain  <bpoulain@apple.com>
3146
3147         The style resolution cache applies properties incorrectly whenever direction != ltr
3148         https://bugs.webkit.org/show_bug.cgi?id=137052
3149
3150         Reviewed by Andreas Kling.
3151
3152         The optimization r135021 introduced a bug whenever the direction of subtree is not
3153         uniform in the whole page.
3154
3155         When StyleResolver::applyMatchedProperties() resolves the style, some properties are
3156         resolved differently based on the writing-mode and the direction.
3157
3158         In isCacheableInMatchedPropertiesCache(), the cases for writing-mode are already handled
3159         by not caching any style with anything else than the default.
3160         The direction was ignored, causing the bugs solved here.
3161
3162         Tests: css3/flexbox/flex-flow-2.html
3163                fast/css/style-resolver-cache-direction-1.html
3164                fast/css/style-resolver-cache-direction-2.html
3165                fast/css/style-resolver-cache-direction-3.html
3166
3167         * css/StyleResolver.cpp:
3168         (WebCore::isCacheableInMatchedPropertiesCache):
3169
3170 2014-09-23  Chris Dumez  <cdumez@apple.com>
3171
3172         Have CSS classes' methods return more references
3173         https://bugs.webkit.org/show_bug.cgi?id=137036
3174
3175         Reviewed by Ryosuke Niwa.
3176
3177         Have CSS classes' methods return more references instead of pointers
3178         when possible.
3179
3180         No new tests, no behavior change.
3181
3182         * css/CSSFontFaceRule.cpp:
3183         (WebCore::CSSFontFaceRule::style):
3184         * css/CSSFontFaceRule.h:
3185         * css/CSSGroupingRule.cpp:
3186         (WebCore::CSSGroupingRule::cssRules):
3187         * css/CSSGroupingRule.h:
3188         * css/CSSImportRule.cpp:
3189         (WebCore::CSSImportRule::media):
3190         * css/CSSImportRule.h:
3191         * css/CSSPageRule.cpp:
3192         (WebCore::CSSPageRule::style):
3193         * css/CSSPageRule.h:
3194         * css/CSSStyleRule.cpp:
3195         (WebCore::CSSStyleRule::style):
3196         * css/CSSStyleRule.h:
3197         * css/WebKitCSSKeyframeRule.cpp:
3198         (WebCore::WebKitCSSKeyframeRule::style):
3199         * css/WebKitCSSKeyframeRule.h:
3200         * css/WebKitCSSKeyframesRule.cpp:
3201         (WebCore::WebKitCSSKeyframesRule::cssRules):
3202         * css/WebKitCSSKeyframesRule.h:
3203         * css/WebKitCSSViewportRule.cpp:
3204         (WebCore::WebKitCSSViewportRule::style):
3205         * css/WebKitCSSViewportRule.h:
3206         * inspector/InspectorStyleSheet.cpp:
3207         (WebCore::asCSSRuleList):
3208         (WebCore::fillMediaListChain):
3209         (WebCore::InspectorStyleSheet::setRuleSelector):
3210         (WebCore::InspectorStyleSheet::deleteRule):
3211         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
3212         (WebCore::InspectorStyleSheet::buildObjectForRule):
3213         (WebCore::InspectorStyleSheet::styleForId):
3214         (WebCore::InspectorStyleSheet::ruleIndexByStyle):
3215         (WebCore::InspectorStyleSheet::ruleId):
3216         (WebCore::InspectorStyleSheet::revalidateStyle):
3217
3218 2014-09-23  Roger Fong  <roger_fong@apple.com>
3219
3220         [Windows] Enable CSS Supports Rule on Windows.
3221
3222         * css/CSSAllInOne.cpp:
3223
3224 2014-09-23  Christophe Dumez  <cdumez@apple.com>
3225
3226         Unreviewed build fix after r173893.
3227
3228         Partial revert of r173893 to fix debug builds.
3229
3230         * accessibility/AccessibilityNodeObject.cpp:
3231         (WebCore::AccessibilityNodeObject::text):
3232         * bindings/js/JSDOMWindowCustom.cpp:
3233         (WebCore::namedItemGetter):
3234         (WebCore::JSDOMWindow::getOwnPropertySlot):
3235         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3236         * css/SelectorChecker.cpp:
3237         (WebCore::SelectorChecker::checkOne):
3238         * cssjit/SelectorCompiler.cpp:
3239         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
3240         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
3241         (WebCore::SelectorCompiler::isPlaceholderShown):
3242         * dom/Document.cpp:
3243         (WebCore::Document::processHttpEquiv):
3244         * dom/Element.cpp:
3245         (WebCore::Element::insertedInto):
3246         (WebCore::Element::removedFrom):
3247         (WebCore::Element::updateName):
3248         (WebCore::Element::updateId):
3249         * editing/Editor.cpp:
3250         (WebCore::Editor::selectionForCommand):
3251         (WebCore::findFirstMarkable):
3252         * editing/FrameSelection.cpp:
3253         (WebCore::FrameSelection::selectAll):
3254         * html/HTMLElement.cpp:
3255         (WebCore::HTMLElement::matchesReadWritePseudoClass):
3256         (WebCore::HTMLElement::directionality):
3257         * html/HTMLImageElement.cpp:
3258         (WebCore::HTMLImageElement::parseAttribute):
3259         * html/HTMLObjectElement.cpp:
3260         (WebCore::HTMLObjectElement::updateDocNamedItem):
3261         * html/HTMLPlugInImageElement.cpp:
3262         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
3263         * html/HTMLTextFormControlElement.cpp:
3264         (WebCore::enclosingTextFormControl):
3265         * page/FrameView.cpp:
3266         (WebCore::FrameView::addEmbeddedObjectToUpdate):
3267         (WebCore::FrameView::updateEmbeddedObject):
3268         * rendering/HitTestResult.cpp:
3269         (WebCore::HitTestResult::absolutePDFURL):
3270         * rendering/RenderEmbeddedObject.cpp:
3271         (WebCore::RenderEmbeddedObject::paintContents):
3272         (WebCore::RenderEmbeddedObject::layout):
3273         * rendering/RenderSnapshottedPlugIn.cpp:
3274         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
3275         * rendering/RenderTextControl.cpp:
3276         (WebCore::RenderTextControl::textFormControlElement):
3277         * rendering/RenderThemeMac.mm:
3278         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3279         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3280         * testing/Internals.cpp:
3281         (WebCore::Internals::visiblePlaceholder):
3282
3283 2014-09-22  Wenson Hsieh  <wenson_hsieh@apple.com>
3284
3285         Implement snapping behavior for Mac overflow scrolling
3286         https://bugs.webkit.org/show_bug.cgi?id=135774
3287
3288         Reviewed by Beth Dakin.
3289
3290         Hooks into AxisScrollSnapAnimator to implement overflow scroll snapping on Mac.
3291
3292         We need to find a way to test this!
3293
3294         * dom/Element.cpp:
3295         (WebCore::Element::dispatchWheelEvent):
3296         * page/EventHandler.cpp:
3297         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis):
3298         * platform/ScrollAnimator.cpp:
3299         (WebCore::ScrollAnimator::handleWheelEvent):
3300         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
3301         (WebCore::ScrollAnimator::scrollOffsetInAxis):
3302         (WebCore::ScrollAnimator::immediateScrollInAxis):
3303         (WebCore::ScrollAnimator::startScrollSnapTimer):
3304         (WebCore::ScrollAnimator::stopScrollSnapTimer):
3305         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
3306         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
3307         * platform/ScrollAnimator.h:
3308         * platform/mac/AxisScrollSnapAnimator.h:
3309         * platform/mac/AxisScrollSnapAnimator.mm:
3310         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator):
3311         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation):
3312         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation):
3313         (WebCore::AxisScrollSnapAnimator::initializeGlideParameters):
3314         * rendering/RenderLayer.cpp:
3315         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3316
3317 2014-09-23  Chris Dumez  <cdumez@apple.com>
3318
3319         Use downcast<HTML*Element>() instead of toHTML*Element()
3320         https://bugs.webkit.org/show_bug.cgi?id=137007
3321
3322         Reviewed by Benjamin Poulain.
3323
3324         Use downcast<HTML*Element>() instead of toHTML*Element() and drop
3325         transition macros for toHTML*Element().
3326
3327         This patch also cleans up the surrounding code.
3328
3329         No new tests, no behavior change.
3330
3331         * accessibility/AXObjectCache.cpp:
3332         (WebCore::AXObjectCache::focusedUIElementForPage):
3333         (WebCore::AXObjectCache::labelChanged):
3334         * accessibility/AccessibilityListBox.cpp:
3335         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
3336         (WebCore::AccessibilityListBox::addChildren):
3337         * accessibility/AccessibilityListBoxOption.cpp:
3338         (WebCore::AccessibilityListBoxOption::isSelected):
3339         (WebCore::AccessibilityListBoxOption::stringValue):
3340         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
3341         * accessibility/AccessibilityMediaControls.cpp:
3342         (WebCore::AccessibilityMediaTimeline::valueDescription):
3343         * accessibility/AccessibilityMenuListOption.cpp:
3344         (WebCore::AccessibilityMenuListOption::isEnabled):
3345         (WebCore::AccessibilityMenuListOption::isSelected):
3346         (WebCore::AccessibilityMenuListOption::setSelected):
3347         (WebCore::AccessibilityMenuListOption::stringValue):
3348         * accessibility/AccessibilityMenuListPopup.cpp:
3349         (WebCore::AccessibilityMenuListPopup::addChildren):
3350         * accessibility/AccessibilityNodeObject.cpp:
3351         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3352         (WebCore::AccessibilityNodeObject::isNativeTextControl):
3353         (WebCore::AccessibilityNodeObject::isNativeImage):
3354         (WebCore::AccessibilityNodeObject::isInputImage):
3355         (WebCore::AccessibilityNodeObject::isMultiSelectable):
3356         (WebCore::AccessibilityNodeObject::isReadOnly):
3357         (WebCore::AccessibilityNodeObject::valueForRange):
3358         (WebCore::AccessibilityNodeObject::maxValueForRange):
3359         (WebCore::AccessibilityNodeObject::minValueForRange):
3360         (WebCore::isNodeActionElement):
3361         (WebCore::AccessibilityNodeObject::alternativeText):
3362         (WebCore::AccessibilityNodeObject::visibleText):
3363         (WebCore::AccessibilityNodeObject::title):
3364         (WebCore::AccessibilityNodeObject::text):
3365         (WebCore::AccessibilityNodeObject::stringValue):
3366         (WebCore::AccessibilityNodeObject::colorValue):
3367         (WebCore::accessibleNameForNode):
3368         * accessibility/AccessibilityRenderObject.cpp:
3369         (WebCore::AccessibilityRenderObject::isFileUploadButton):
3370         (WebCore::AccessibilityRenderObject::stringValue):
3371         (WebCore::AccessibilityRenderObject::labelElementContainer):
3372         (WebCore::AccessibilityRenderObject::internalLinkElement):
3373         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
3374         (WebCore::AccessibilityRenderObject::url):
3375         (WebCore::AccessibilityRenderObject::setValue):
3376         (WebCore::AccessibilityRenderObject::getDocumentLinks):
3377         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
3378         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
3379         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3380         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
3381         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
3382         (WebCore::AccessibilityRenderObject::isLinked):
3383         * accessibility/AccessibilitySlider.cpp:
3384         (WebCore::AccessibilitySlider::inputElement):
3385         (WebCore::AccessibilitySliderThumb::elementRect):
3386         * accessibility/AccessibilityTable.cpp:
3387         (WebCore::AccessibilityTable::tableElement):
3388         (WebCore::AccessibilityTable::title):
3389         * accessibility/atk/AXObjectCacheAtk.cpp:
3390         (WebCore::notifyChildrenSelectionChange):
3391         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
3392         (optionFromSelection):
3393         (webkitAccessibleSelectionGetSelectionCount):
3394         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
3395         (webkitAccessibleTableGetCaption):
3396         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3397         (webkitAccessibleGetDescription):
3398         * accessibility/ios/AccessibilityObjectIOS.mm:
3399         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
3400         * bindings/js/JSDOMWindowCustom.cpp:
3401         (WebCore::namedItemGetter):
3402         (WebCore::JSDOMWindow::getOwnPropertySlot):
3403         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3404         * bindings/js/JSHTMLDocumentCustom.cpp:
3405         (WebCore::JSHTMLDocument::nameGetter):
3406         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3407         (WebCore::JSHTMLFrameSetElement::nameGetter):
3408         * bindings/js/JSNodeCustom.cpp:
3409         (WebCore::isReachableFromDOM):
3410         * css/SelectorChecker.cpp:
3411         (WebCore::SelectorChecker::checkOne):
3412         * css/SelectorCheckerTestFunctions.h:
3413         (WebCore::isChecked):
3414         * css/StyleResolver.cpp:
3415         (WebCore::StyleResolver::adjustRenderStyle):
3416         * css/StyleSheetList.cpp:
3417         (WebCore::StyleSheetList::getNamedItem):
3418         * cssjit/SelectorCompiler.cpp:
3419         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
3420         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
3421         (WebCore::SelectorCompiler::isPlaceholderShown):
3422         * dom/CurrentScriptIncrementer.h:
3423         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
3424         * dom/DataTransfer.cpp:
3425         (WebCore::DataTransfer::setDragImage):
3426         * dom/Document.cpp:
3427         (WebCore::Document::setTitle):
3428         (WebCore::Document::processHttpEquiv):
3429         (WebCore::Document::iconURLs):
3430         * dom/DocumentOrderedMap.cpp:
3431         (WebCore::keyMatchesMapName):
3432         (WebCore::keyMatchesLowercasedMapName):
3433         (WebCore::keyMatchesLowercasedUsemap):
3434         (WebCore::DocumentOrderedMap::getElementByMapName):
3435         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
3436         (WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
3437         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
3438         * dom/DocumentStyleSheetCollection.cpp:
3439         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
3440         * dom/Element.cpp:
3441         (WebCore::Element::insertedInto):
3442         (WebCore::Element::removedFrom):
3443         (WebCore::Element::updateName):
3444         (WebCore::Element::updateId):
3445         (WebCore::Element::updateLabel):
3446         (WebCore::Element::ensureCachedHTMLCollection):
3447         * dom/EventDispatcher.cpp:
3448         (WebCore::EventDispatcher::dispatchEvent):
3449         * dom/ScriptElement.cpp:
3450         (WebCore::toScriptElementIfPossible):
3451         * dom/VisitedLinkState.cpp:
3452         (WebCore::linkHashForElement):
3453         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
3454         * dom/make_names.pl:
3455         (printTypeHelpers):
3456         * editing/Editor.cpp:
3457         (WebCore::Editor::selectionForCommand):
3458         (WebCore::imageElementFromImageDocument):
3459         (WebCore::findFirstMarkable):
3460         * editing/FrameSelection.cpp:
3461         (WebCore::FrameSelection::selectAll):
3462         (WebCore::scanForForm):
3463         * editing/MarkupAccumulator.cpp:
3464         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
3465         * editing/ReplaceSelectionCommand.cpp:
3466         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
3467         * editing/VisibleSelection.cpp:
3468         (WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
3469         (WebCore::VisibleSelection::isInPasswordField):
3470         * editing/cocoa/HTMLConverter.mm:
3471         (HTMLConverter::_processElement):
3472         * editing/ios/EditorIOS.mm:
3473         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3474         * editing/markup.cpp:
3475         (WebCore::isPlainTextMarkup):
3476         * html/ColorInputType.cpp:
3477         (WebCore::ColorInputType::suggestions):
3478         * html/FTPDirectoryDocument.cpp:
3479         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
3480         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
3481         * html/FormAssociatedElement.cpp:
3482         (WebCore::FormAssociatedElement::findAssociatedForm):
3483         * html/HTMLAnchorElement.cpp:
3484         (WebCore::appendServerMapMousePosition):
3485         * html/HTMLAreaElement.cpp:
3486         (WebCore::HTMLAreaElement::imageElement):
3487         * html/HTMLCollection.cpp:
3488         (WebCore::isMatchingElement):
3489         * html/HTMLElement.cpp:
3490         (WebCore::HTMLElement::matchesReadWritePseudoClass):
3491         (WebCore::HTMLElement::setInnerHTML):
3492         (WebCore::HTMLElement::directionality):
3493         * html/HTMLEmbedElement.cpp:
3494         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3495         * html/HTMLFieldSetElement.cpp:
3496         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
3497         * html/HTMLFormControlElement.cpp:
3498         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
3499         (WebCore::shouldAutofocus):
3500         * html/HTMLFormControlsCollection.cpp:
3501         (WebCore::HTMLFormControlsCollection::formControlElements):
3502         (WebCore::HTMLFormControlsCollection::formImageElements):
3503         * html/HTMLFormElement.cpp:
3504         (WebCore::HTMLFormElement::getTextFieldValues):
3505         (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap):
3506         * html/HTMLImageElement.cpp:
3507         (WebCore::HTMLImageElement::parseAttribute):
3508         * html/HTMLImageLoader.cpp:
3509         (WebCore::HTMLImageLoader::notifyFinished):
3510         * html/HTMLInputElement.cpp:
3511         (WebCore::HTMLInputElement::dataList):
3512         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
3513         * html/HTMLKeygenElement.cpp:
3514         (WebCore::HTMLKeygenElement::shadowSelect):
3515         * html/HTMLLegendElement.cpp:
3516         (WebCore::HTMLLegendElement::virtualForm):
3517         * html/HTMLMediaElement.cpp:
3518         (WebCore::HTMLMediaElement::parseAttribute):
3519         * html/HTMLNameCollection.cpp:
3520         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
3521         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
3522         (WebCore::DocumentNameCollection::elementMatches):
3523         * html/HTMLObjectElement.cpp:
3524         (WebCore::HTMLObjectElement::updateDocNamedItem):
3525         (WebCore::HTMLObjectElement::containsJavaApplet):
3526         * html/HTMLOptGroupElement.cpp:
3527         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
3528         (WebCore::HTMLOptGroupElement::ownerSelectElement):
3529         * html/HTMLOptionElement.cpp:
3530         (WebCore::HTMLOptionElement::ownerDataListElement):
3531         (WebCore::HTMLOptionElement::ownerSelectElement):
3532         * html/HTMLOptionsCollection.cpp:
3533         (WebCore::HTMLOptionsCollection::add):
3534         * html/HTMLOptionsCollection.h:
3535         * html/HTMLPlugInImageElement.cpp:
3536         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
3537         * html/HTMLSelectElement.cpp:
3538         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
3539         (WebCore::HTMLSelectElement::value):
3540         (WebCore::HTMLSelectElement::setValue):
3541         (WebCore::HTMLSelectElement::saveLastSelection):
3542         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3543         (WebCore::HTMLSelectElement::updateListBoxSelection):
3544         (WebCore::HTMLSelectElement::listBoxOnChange):
3545         (WebCore::HTMLSelectElement::recalcListItems):
3546         (WebCore::HTMLSelectElement::selectedIndex):
3547         (WebCore::HTMLSelectElement::selectOption):
3548         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
3549         (WebCore::HTMLSelectElement::saveFormControlState):
3550         (WebCore::HTMLSelectElement::searchOptionsForValue):
3551         (WebCore::HTMLSelectElement::restoreFormControlState):
3552         (WebCore::HTMLSelectElement::appendFormData):
3553         (WebCore::HTMLSelectElement::reset):
3554         (WebCore::HTMLSelectElement::updateSelectedState):
3555         (WebCore::HTMLSelectElement::lastSelectedListIndex):
3556         (WebCore::HTMLSelectElement::optionAtIndex):
3557         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3558         * html/HTMLSummaryElement.cpp:
3559         (WebCore::HTMLSummaryElement::detailsElement):
3560         * html/HTMLTableElement.cpp:
3561         (WebCore::HTMLTableElement::caption):
3562         * html/HTMLTablePartElement.cpp:
3563         (WebCore::HTMLTablePartElement::findParentTable):
3564         * html/HTMLTableRowElement.cpp:
3565         (WebCore::HTMLTableRowElement::rowIndex):
3566         * html/HTMLTableRowsCollection.cpp:
3567         (WebCore::HTMLTableRowsCollection::rowAfter):
3568         (WebCore::HTMLTableRowsCollection::lastRow):
3569         (WebCore::HTMLTableRowsCollection::customElementAfter):
3570         * html/HTMLTableRowsCollection.h:
3571         * html/HTMLTemplateElement.cpp:
3572         (WebCore::HTMLTemplateElement::cloneNode):
3573         * html/HTMLTextFormControlElement.cpp:
3574         (WebCore::enclosingTextFormControl):
3575         * html/ImageDocument.cpp:
3576         (WebCore::ImageDocument::createDocumentStructure):
3577         * html/LabelsNodeList.cpp:
3578         (WebCore::LabelsNodeList::elementMatches):
3579         * html/MediaDocument.cpp:
3580         (WebCore::MediaDocumentParser::createDocumentStructure):
3581         (WebCore::descendentVideoElement):
3582         (WebCore::ancestorVideoElement):
3583         (WebCore::MediaDocument::replaceMediaElementTimerFired):
3584         * html/PluginDocument.cpp:
3585         (WebCore::PluginDocumentParser::createDocumentStructure):
3586         * html/RadioInputType.cpp:
3587         (WebCore::RadioInputType::handleKeydownEvent):
3588         (WebCore::RadioInputType::isKeyboardFocusable):
3589         * html/RadioNodeList.cpp:
3590         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
3591         * html/RangeInputType.cpp:
3592         (WebCore::RangeInputType::updateTickMarkValues):
3593         * html/parser/HTMLConstructionSite.cpp:
3594         (WebCore::insert):
3595         (WebCore::HTMLConstructionSite::insertTextNode):
3596         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
3597         * html/parser/HTMLTreeBuilder.cpp:
3598         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3599         * html/shadow/DetailsMarkerControl.cpp:
3600         (WebCore::DetailsMarkerControl::rendererIsNeeded):
3601         * html/shadow/MediaControlElements.cpp:
3602         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3603         * html/shadow/MeterShadowElement.cpp:
3604         (WebCore::MeterShadowElement::meterElement):
3605         * html/shadow/ProgressShadowElement.cpp:
3606         (WebCore::ProgressShadowElement::progressElement):
3607         * html/shadow/TextControlInnerElements.cpp:
3608         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
3609         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
3610         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
3611         * inspector/InspectorCSSAgent.cpp:
3612         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
3613         * inspector/InspectorDOMAgent.cpp:
3614         (WebCore::InspectorDOMAgent::buildObjectForNode):
3615         * loader/FormSubmission.cpp:
3616         (WebCore::FormSubmission::create):
3617         * loader/FrameLoader.cpp:
3618         (WebCore::FrameLoader::handleFallbackContent):
3619         * loader/ImageLoader.cpp:
3620         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
3621         * loader/SubframeLoader.cpp:
3622         (WebCore::SubframeLoader::requestObject):
3623         * page/Chrome.cpp:
3624         (WebCore::Chrome::setToolTip):
3625         * page/DragController.cpp:
3626         (WebCore::DragController::draggableElement):
3627         * page/EventHandler.cpp:
3628         (WebCore::isSubmitImage):
3629         * page/FocusController.cpp:
3630         (WebCore::FocusController::advanceFocusDirectionally):
3631         * page/FrameView.cpp:
3632         (WebCore::FrameView::addEmbeddedObjectToUpdate):
3633         (WebCore::FrameView::updateEmbeddedObject):
3634         * page/PageSerializer.cpp:
3635         (WebCore::PageSerializer::serializeFrame):
3636         * page/SpatialNavigation.cpp:
3637         (WebCore::FocusCandidate::FocusCandidate):
3638         * page/ios/FrameIOS.mm:
3639         (WebCore::ancestorRespondingToClickEvents):
3640         * rendering/HitTestResult.cpp:
3641         (WebCore::HitTestResult::altDisplayString):
3642         (WebCore::HitTestResult::absolutePDFURL):
3643         (WebCore::HitTestResult::enterFullscreenForVideo):
3644         (WebCore::HitTestResult::mediaControlsEnabled):
3645         (WebCore::HitTestResult::isLiveLink):
3646         (WebCore::HitTestResult::isContentEditable):
3647         * rendering/RenderButton.cpp:
3648         (WebCore::RenderButton::updateFromElement):
3649         * rendering/RenderCounter.cpp:
3650         (WebCore::planCounter):
3651         * rendering/RenderEmbeddedObject.cpp:
3652         (WebCore::RenderEmbeddedObject::paintContents):
3653         (WebCore::RenderEmbeddedObject::layout):
3654         * rendering/RenderFieldset.h:
3655         * rendering/RenderFileUploadControl.cpp:
3656         (WebCore::RenderFileUploadControl::inputElement):
3657         (WebCore::RenderFileUploadControl::uploadButton):
3658         * rendering/RenderFrame.cpp:
3659         (WebCore::RenderFrame::frameElement):
3660         * rendering/RenderFrameSet.cpp:
3661         (WebCore::RenderFrameSet::frameSetElement):
3662         * rendering/RenderHTMLCanvas.cpp:
3663         (WebCore::RenderHTMLCanvas::canvasElement):
3664         * rendering/RenderIFrame.cpp:
3665         (WebCore::RenderIFrame::iframeElement):
3666         * rendering/RenderImage.cpp:
3667         (WebCore::RenderImage::RenderImage):
3668         (WebCore::RenderImage::paintAreaElementFocusRing):
3669         (WebCore::RenderImage::paintIntoRect):
3670         (WebCore::RenderImage::imageMap):
3671         (WebCore::RenderImage::updateAltText):
3672         * rendering/RenderLayerBacking.cpp:
3673         (WebCore::canvasCompositingStrategy):
3674         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
3675         (WebCore::RenderLayerBacking::updateConfiguration):
3676         * rendering/RenderLayerCompositor.cpp:
3677         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
3678         * rendering/RenderListBox.cpp:
3679         (WebCore::RenderListBox::selectElement):
3680         (WebCore::RenderListBox::updateFromElement):
3681         (WebCore::RenderListBox::paintItemForeground):
3682         (WebCore::RenderListBox::paintItemBackground):
3683         * rendering/RenderListItem.cpp:
3684         (WebCore::RenderListItem::calcValue):
3685         (WebCore::RenderListItem::updateListMarkerNumbers):
3686         * rendering/RenderMarquee.cpp:
3687         (WebCore::RenderMarquee::marqueeSpeed):
3688         * rendering/RenderMenuList.cpp:
3689         (WebCore::selectedOptionCount):
3690         (RenderMenuList::selectElement):
3691         (RenderMenuList::updateOptionsWidth):
3692         (RenderMenuList::setTextFromOption):
3693         (RenderMenuList::itemText):
3694         (RenderMenuList::itemIsSelected):
3695         * rendering/RenderMeter.cpp:
3696         (WebCore::RenderMeter::meterElement):
3697         * rendering/RenderProgress.cpp:
3698         (WebCore::RenderProgress::progressElement):
3699         * rendering/RenderSlider.cpp:
3700         (WebCore::RenderSlider::element):
3701         * rendering/RenderSnapshottedPlugIn.cpp:
3702         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
3703         * rendering/RenderTextControl.cpp:
3704         (WebCore::RenderTextControl::textFormControlElement):
3705         * rendering/RenderTextControlMultiLine.cpp:
3706         (WebCore::RenderTextControlMultiLine::textAreaElement):
3707         * rendering/RenderTextControlSingleLine.cpp:
3708         (WebCore::RenderTextControlSingleLine::inputElement):
3709         * rendering/RenderTheme.cpp:
3710         (WebCore::RenderTheme::paintSliderTicks):
3711         * rendering/RenderThemeIOS.mm:
3712         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
3713         * rendering/RenderThemeMac.mm:
3714         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3715         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3716         * rendering/RenderVideo.cpp:
3717         (WebCore::RenderVideo::videoElement):
3718         * svg/graphics/SVGImageCache.cpp:
3719         (WebCore::SVGImageCache::imageForRenderer):
3720         * svg/svgtags.in:
3721         Generate helpers to SVGAElement so that isSVGAElement() can be used
3722         instead of hasTagName(SVGNames::aTag). I did such update in this
3723         patch.
3724
3725         * testing/Internals.cpp:
3726         (WebCore::Internals::visiblePlaceholder):
3727         (WebCore::Internals::wasLastChangeUserEdit):
3728         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
3729         (WebCore::Internals::isSelectPopupVisible):
3730         * xml/parser/XMLDocumentParserLibxml2.cpp:
3731         (WebCore::XMLDocumentParser::startElementNs):
3732
3733 2014-09-23  Chris Dumez  <cdumez@apple.com>
3734
3735         Have DataTransfer::files() return a reference
3736         https://bugs.webkit.org/show_bug.cgi?id=137039
3737
3738         Reviewed by Ryosuke Niwa.
3739
3740         Have DataTransfer::files() return a reference instead of a pointer as
3741         it can never return null.
3742
3743         No new tests, no behavior change.
3744
3745         * dom/DataTransfer.cpp:
3746         (WebCore::DataTransfer::files):
3747         * dom/DataTransfer.h:
3748
3749 2014-09-23  Chris Dumez  <cdumez@apple.com>
3750
3751         Have NamedNodeMap::element() and DOMStringMap::element() return a reference
3752         https://bugs.webkit.org/show_bug.cgi?id=137040
3753
3754         Reviewed by Ryosuke Niwa.
3755
3756         Have NamedNodeMap::element() and DOMStringMap::element() return a
3757         reference instead of a pointer as they can never return null.
3758
3759         No new tests, no behavior change.
3760
3761         * dom/DatasetDOMStringMap.h:
3762         * dom/NamedNodeMap.h:
3763         (WebCore::NamedNodeMap::element):
3764
3765 2014-09-23  Chris Dumez  <cdumez@apple.com>
3766
3767         Have DOMImplementation::document() and Element::attributes() return references
3768         https://bugs.webkit.org/show_bug.cgi?id=137035
3769
3770         Reviewed by Andreas Kling.
3771
3772         Have DOMImplementation::document() and Element::attributes() return
3773         references instead of pointers as they can never return null.
3774
3775         No new tests, no behavior change.
3776
3777         * bindings/scripts/CodeGeneratorJS.pm:
3778         (GenerateImplementation):
3779         Update the JS Bindings code generator to use WTF::getPtr() in a couple
3780         more places so that the implementation can return references instead
3781         of pointers even when [GenerateIsReachable=xxx] IDL extended attribute
3782         is used.
3783
3784         * dom/DOMImplementation.h:
3785         (WebCore::DOMImplementation::document):
3786         * dom/Element.cpp:
3787         (WebCore::Element::attributes):
3788         * dom/Element.h:
3789         (WebCore::Node::attributes):
3790
3791 2014-09-23  Chris Dumez  <cdumez@apple.com>
3792
3793         Have Document::ensureTemplateDocument() return a reference
3794         https://bugs.webkit.org/show_bug.cgi?id=137033
3795
3796         Reviewed by Ryosuke Niwa.
3797
3798         Have Document::ensureTemplateDocument() return a reference instead of
3799         a pointer as it can never return null.
3800
3801         No new tests, no behavior change.
3802
3803         * dom/Document.cpp:
3804         (WebCore::Document::ensureTemplateDocument):
3805         * dom/Document.h:
3806         * editing/markup.cpp:
3807         (WebCore::createFragmentForInnerOuterHTML):
3808         * html/HTMLTemplateElement.cpp:
3809         (WebCore::HTMLTemplateElement::content):
3810         (WebCore::HTMLTemplateElement::didMoveToNewDocument):
3811
3812 2014-09-23  Chris Dumez  <cdumez@apple.com>
3813
3814         Have Document::accessSVGExtensions() return a reference
3815         https://bugs.webkit.org/show_bug.cgi?id=137030
3816
3817         Reviewed by Ryosuke Niwa.
3818
3819         Have Document::accessSVGExtensions() return a reference instead of a
3820         pointer as it can never return null.
3821
3822         No new tests, no behavior change.
3823
3824         * dom/ContainerNode.cpp:
3825         (WebCore::ContainerNode::removeChild):
3826         (WebCore::ContainerNode::removeChildren):
3827         * dom/Document.cpp:
3828         (WebCore::Document::commonTeardown):
3829         (WebCore::Document::implicitClose):
3830         (WebCore::Document::accessSVGExtensions):
3831         * dom/Document.h:
3832         * dom/Element.cpp:
3833         (WebCore::Element::~Element):
3834         (WebCore::Element::removedFrom):
3835         * editing/markup.cpp:
3836         (WebCore::isPlainTextMarkup):
3837         * history/CachedFrame.cpp:
3838         (WebCore::CachedFrameBase::restore):
3839         * rendering/FilterEffectRenderer.cpp:
3840         (WebCore::FilterEffectRenderer::buildReferenceFilter):
3841         * rendering/svg/RenderSVGResource.cpp:
3842         (WebCore::removeFromCacheAndInvalidateDependencies):
3843         * rendering/svg/RenderSVGResourceContainer.cpp:
3844         (WebCore::svgExtensionsFromElement):
3845         * rendering/svg/RenderSVGResourceContainer.h:
3846         (WebCore::getRenderSVGResourceContainerById):
3847         (WebCore::getRenderSVGResourceById):
3848         * rendering/svg/SVGResources.cpp:
3849         (WebCore::registerPendingResource):
3850         (WebCore::SVGResources::buildCachedResources):
3851         * rendering/svg/SVGResourcesCache.cpp:
3852         (WebCore::resourcesCacheFromRenderer):
3853         (WebCore::SVGResourcesCache::resourceDestroyed):
3854         * svg/SVGElement.cpp:
3855         (WebCore::SVGElement::~SVGElement):
3856         (WebCore::SVGElement::reportAttributeParsingError):
3857         (WebCore::SVGElement::removedFrom):
3858         (WebCore::SVGElement::viewportElement):
3859         (WebCore::SVGElement::attributeChanged):
3860         (WebCore::SVGElement::buildPendingResourcesIfNeeded):
3861         (WebCore::SVGElement::accessDocumentSVGExtensions): Deleted.
3862         * svg/SVGElement.h:
3863         * svg/SVGFEConvolveMatrixElement.cpp:
3864         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
3865         * svg/SVGFEGaussianBlurElement.cpp:
3866         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
3867         * svg/SVGFEImageElement.cpp:
3868         (WebCore::SVGFEImageElement::clearResourceReferences):
3869         (WebCore::SVGFEImageElement::buildPendingResource):
3870         * svg/SVGFitToViewBox.cpp:
3871         (WebCore::SVGFitToViewBox::parseViewBox):
3872         * svg/SVGFontFaceElement.cpp:
3873         (WebCore::SVGFontFaceElement::insertedInto):
3874         (WebCore::SVGFontFaceElement::removedFrom):
3875         * svg/SVGMPathElement.cpp:
3876         (WebCore::SVGMPathElement::buildPendingResource):
3877         (WebCore::SVGMPathElement::clearResourceReferences):
3878         * svg/SVGPathElement.cpp:
3879         (WebCore::SVGPathElement::parseAttribute):
3880         (WebCore::SVGPathElement::invalidateMPathDependencies):
3881         * svg/SVGPolyElement.cpp:
3882         (WebCore::SVGPolyElement::parseAttribute):
3883         * svg/SVGSVGElement.cpp:
3884         (WebCore::SVGSVGElement::~SVGSVGElement):
3885         (WebCore::SVGSVGElement::insertedInto):
3886         (WebCore::SVGSVGElement::removedFrom):
3887         * svg/SVGTRefElement.cpp:
3888         (WebCore::SVGTRefElement::detachTarget):
3889         (WebCore::SVGTRefElement::buildPendingResource):
3890         * svg/SVGTextPathElement.cpp:
3891         (WebCore::SVGTextPathElement::clearResourceReferences):
3892         (WebCore::SVGTextPathElement::buildPendingResource):
3893         * svg/SVGUseElement.cpp:
3894         (WebCore::SVGUseElement::clearResourceReferences):
3895         (WebCore::SVGUseElement::buildPendingResource):
3896         (WebCore::SVGUseElement::toClipPath):
3897         (WebCore::SVGUseElement::buildInstanceTree):
3898         * svg/animation/SVGSMILElement.cpp:
3899         (WebCore::SVGSMILElement::clearResourceReferences):
3900         (WebCore::SVGSMILElement::buildPendingResource):
3901
3902 2014-09-23  Joseph Pecoraro  <pecoraro@apple.com>
3903
3904         Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
3905         https://bugs.webkit.org/show_bug.cgi?id=136893
3906
3907         Reviewed by Timothy Hatcher.
3908
3909         Automatic inspection is currently disabled for web pages.
3910         This just updates the interfaces that changed.
3911
3912         * WebCore.exp.in:
3913         * inspector/InspectorController.cpp:
3914         (WebCore::InspectorController::connectFrontend):
3915         (WebCore::InspectorController::show):
3916         * inspector/InspectorController.h:
3917         * page/PageDebuggable.cpp:
3918         (WebCore::PageDebuggable::connect):
3919         * page/PageDebuggable.h:
3920         * testing/Internals.cpp:
3921         (WebCore::Internals::openDummyInspectorFrontend):
3922
3923 2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>
3924
3925         [GTK] Adds implementation of subtle crypto HMAC algorithm
3926         https://bugs.webkit.org/show_bug.cgi?id=133320
3927
3928         Reviewed by Philippe Normand.
3929
3930         Tests are already in place under crypto/subtle/hmac-*.html
3931
3932         * crypto/gtk/CryptoAlgorithmHMACGtk.cpp:
3933         (WebCore::getGnutlsDigestAlgorithm):
3934         (WebCore::calculateSignature):
3935         (WebCore::CryptoAlgorithmHMAC::platformSign):
3936         (WebCore::CryptoAlgorithmHMAC::platformVerify):
3937
3938 2014-09-23  Eduardo Lima Mitev  <elima@igalia.com>
3939
3940         [GTK] Adds implementation of Subtle Crypto digest algorithms
3941         https://bugs.webkit.org/show_bug.cgi?id=133319
3942
3943         Reviewed by Philippe Normand.
3944
3945         Tests are already in place under crypto/subtle/sha-*.html
3946
3947         * crypto/gtk/CryptoDigestGtk.cpp:
3948         (WebCore::CryptoDigest::CryptoDigest):
3949         (WebCore::CryptoDigest::~CryptoDigest):
3950         (WebCore::CryptoDigest::create):
3951         (WebCore::CryptoDigest::addBytes):
3952         (WebCore::CryptoDigest::computeHash):
3953
3954 2014-09-15  Sergio Villar Senin  <svillar@igalia.com>
3955
3956         [CSS Grid Layout] Do not grow tracks when the growth factor is 0
3957         https://bugs.webkit.org/show_bug.cgi?id=136575
3958
3959         Reviewed by Darin Adler.
3960
3961         A couple of performance optimizations for the track sizing
3962         algorithm. On the one hand we avoid the computation of the
3963         available logical space share if the track has no growth potential
3964         (the current breadth is the maximum breadth) and on the other
3965         hand, we avoid calling RenderGrid::distributeSpaceToTracks() if
3966         the available logical space is not greater than 0.
3967
3968         The combined effect of these two changes is an impressive +16%
3969         improvement in auto-grid-lots-of-data.html performance test.
3970
3971         No new tests as there is no change in the functionality.
3972
3973         * rendering/RenderGrid.cpp:
3974         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3975         (WebCore::RenderGrid::distributeSpaceToTracks):
3976
3977 2014-09-23  Ion Rosca  <rosca@adobe.com>
3978
3979         [CSS Blending] The composited layers isolated by the page group should blend with the default white background color.
3980         https://bugs.webkit.org/show_bug.cgi?id=136563
3981
3982         Reviewed by Simon Fraser.
3983
3984         If a blending layer is not isolated, then it should blend with a white backdrop:
3985         http://dev.w3.org/fxtf/compositing-1/#pagebackdrop
3986
3987         Tests: css3/blending/blend-mode-body-composited-child-background-color.html
3988                css3/blending/blend-mode-body-composited-child.html
3989
3990         * rendering/RenderLayerBacking.cpp:
3991         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3992         If the isolating composited layer is the root renderer, then it should have a backing store
3993         into which the initial white backdrop will be painted.
3994
3995 2014-09-22  Christophe Dumez  <cdumez@apple.com>
3996
3997         Unreviewed build fix after r173859.
3998
3999         Partial revert to fix debug build after r173859.
4000
4001         * accessibility/AccessibilityRenderObject.cpp:
4002         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
4003         * html/HTMLFrameOwnerElement.cpp:
4004         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
4005         * page/EventHandler.cpp:
4006         (WebCore::EventHandler::handleMousePressEvent):
4007         (WebCore::EventHandler::handleMouseMoveEvent):
4008         (WebCore::EventHandler::handleMouseReleaseEvent):
4009         * page/Frame.cpp:
4010         (WebCore::Frame::setPageAndTextZoomFactors):
4011         * page/FrameView.cpp:
4012         (WebCore::FrameView::scrollToAnchor):
4013         * rendering/svg/RenderSVGBlock.h:
4014         (WebCore::RenderSVGBlock::graphicsElement):
4015         * rendering/svg/RenderSVGGradientStop.cpp:
4016         (WebCore::RenderSVGGradientStop::gradientElement):
4017         * rendering/svg/RenderSVGInline.h:
4018         (WebCore::RenderSVGInline::graphicsElement):
4019         * rendering/svg/RenderSVGResourceClipper.cpp:
4020         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
4021         * rendering/svg/RenderSVGResourceContainer.cpp:
4022         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
4023         * rendering/svg/RenderSVGShape.h:
4024         (WebCore::RenderSVGShape::graphicsElement):
4025         * rendering/svg/RenderSVGTransformableContainer.h:
4026         * rendering/svg/SVGRenderSupport.cpp:
4027         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
4028         * rendering/svg/SVGRenderTreeAsText.cpp:
4029         (WebCore::operator<<):
4030         * rendering/svg/SVGRenderingContext.cpp:
4031         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
4032         * rendering/svg/SVGResources.cpp:
4033         (WebCore::targetReferenceFromResource):
4034         * svg/SVGAElement.cpp:
4035         (WebCore::SVGAElement::defaultEventHandler):
4036