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