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