Web Inspector: Highlighted selectors in Rules sidebar break with selectors that conta...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-06  Benjamin Poulain  <bpoulain@apple.com>
2
3         Web Inspector: Highlighted selectors in Rules sidebar break with selectors that contain nested selector lists
4         https://bugs.webkit.org/show_bug.cgi?id=137378
5
6         Reviewed by Joseph Pecoraro.
7
8         We should not update the parser's selectorRange when matching a nested selector list.
9
10         To implement this with low risk of unbalanced start+end and good error recovery,
11         I have wrapped the parsing of selector_list between a start/end function at the grammar
12         level. Whenever the parser enter a nested selector list, m_nestedSelectorLevel goes up
13         by one. Any time the parsing is currently in a nested selector list, we never update
14         the selector ranges.
15
16         * css/CSSGrammar.y.in:
17         * css/CSSParser.cpp:
18         (WebCore::CSSParser::CSSParser):
19         (WebCore::CSSParser::markSelectorStart):
20         (WebCore::CSSParser::markSelectorEnd):
21         * css/CSSParser.h:
22         (WebCore::CSSParser::startNestedSelectorList):
23         (WebCore::CSSParser::endNestedSelectorList):
24
25 2014-10-06  Roger Fong  <roger_fong@apple.com>
26
27         [Windows] Build fix for EWS bots.
28
29         * WebCore.vcxproj/WebCoreGenerated.make: Make sure we always regenerate WebCore derived sources.
30
31 2014-10-06  Christophe Dumez  <cdumez@apple.com>
32
33         Add is<>() / downcast<>() support for RenderObject subclasses
34         https://bugs.webkit.org/show_bug.cgi?id=137424
35
36         Reviewed by Benjamin Poulain.
37
38         Add is<>() / downcast<>() support for RenderObject subclasses, and
39         get rid of IsRendererOfType traits struct as we can now rely on the
40         TypeCastsTraits instead.
41
42         toRender*() is still supported for most render objects because I did
43         not want to remove all usages in this patch, to keep the size small.
44         For now, only the MathML render objects were ported over to using
45         is<>() / downcast<>(). Other render objects will be taken care of in
46         follow-up patches and I will drop support for toRender*()
47         incrementally.
48
49         No new tests, no behavior change.
50
51         * accessibility/AccessibilityRenderObject.cpp:
52         (WebCore::AccessibilityRenderObject::isMathFenceOperator):
53         (WebCore::AccessibilityRenderObject::isMathSeparatorOperator):
54         (WebCore::AccessibilityRenderObject::mathLineThickness):
55         * dom/make_names.pl:
56         (printTypeHelpers):
57         * mathml/MathMLInlineContainerElement.cpp:
58         (WebCore::MathMLInlineContainerElement::childrenChanged):
59         * mathml/MathMLTextElement.cpp:
60         (WebCore::MathMLTextElement::didAttachRenderers):
61         (WebCore::MathMLTextElement::childrenChanged):
62         * rendering/RenderAncestorIterator.h:
63         (WebCore::lineageOfType):
64         * rendering/RenderBlock.h:
65         * rendering/RenderBlockFlow.h:
66         * rendering/RenderBox.h:
67         * rendering/RenderBoxModelObject.h:
68         * rendering/RenderButton.h:
69         * rendering/RenderCombineText.h:
70         * rendering/RenderCounter.h:
71         * rendering/RenderDetailsMarker.h:
72         * rendering/RenderElement.h:
73         * rendering/RenderEmbeddedObject.h:
74         * rendering/RenderFieldset.h:
75         * rendering/RenderFileUploadControl.h:
76         * rendering/RenderFlexibleBox.h:
77         * rendering/RenderFlowThread.h:
78         * rendering/RenderFrame.h:
79         * rendering/RenderFrameSet.h:
80         * rendering/RenderFullScreen.h:
81         * rendering/RenderGrid.h:
82         * rendering/RenderHTMLCanvas.h:
83         * rendering/RenderIFrame.h:
84         * rendering/RenderImage.h:
85         * rendering/RenderInline.h:
86         * rendering/RenderIterator.h:
87         (WebCore::isRendererOfType):
88         (WebCore::RenderTraversal::firstChild):
89         (WebCore::RenderTraversal::lastChild):
90         (WebCore::RenderTraversal::nextSibling):
91         (WebCore::RenderTraversal::previousSibling):
92         (WebCore::RenderTraversal::findAncestorOfType):
93         * rendering/RenderLayerModelObject.h:
94         * rendering/RenderLineBreak.h:
95         * rendering/RenderListBox.h:
96         * rendering/RenderListItem.h:
97         * rendering/RenderListMarker.h:
98         * rendering/RenderMedia.h:
99         * rendering/RenderMenuList.h:
100         * rendering/RenderMeter.h:
101         * rendering/RenderMultiColumnFlowThread.h:
102         * rendering/RenderMultiColumnSet.h:
103         * rendering/RenderMultiColumnSpannerPlaceholder.h:
104         * rendering/RenderNamedFlowFragment.h:
105         * rendering/RenderNamedFlowThread.h:
106         * rendering/RenderObject.h:
107         (WebCore::RenderObject>): Deleted.
108         * rendering/RenderProgress.h:
109         * rendering/RenderQuote.h:
110         * rendering/RenderRegion.h:
111         * rendering/RenderReplaced.h:
112         * rendering/RenderRubyRun.h:
113         * rendering/RenderScrollbarPart.h:
114         * rendering/RenderSearchField.h:
115         * rendering/RenderSlider.h:
116         * rendering/RenderSnapshottedPlugIn.h:
117         * rendering/RenderTable.h:
118         * rendering/RenderTableCaption.h:
119         * rendering/RenderTableCell.h:
120         * rendering/RenderTableCol.h:
121         * rendering/RenderTableRow.h:
122         * rendering/RenderTableSection.h:
123         * rendering/RenderText.h:
124         * rendering/RenderTextControl.h:
125         * rendering/RenderTextControlMultiLine.h:
126         * rendering/RenderTextControlSingleLine.h:
127         * rendering/RenderTextFragment.h:
128         * rendering/RenderVideo.h:
129         * rendering/RenderView.h:
130         * rendering/RenderWidget.h:
131         * rendering/mathml/RenderMathMLBlock.h:
132         * rendering/mathml/RenderMathMLFenced.cpp:
133         (WebCore::RenderMathMLFenced::updateFromElement):
134         * rendering/mathml/RenderMathMLFraction.cpp:
135         (WebCore::RenderMathMLFraction::unembellishedOperator):
136         * rendering/mathml/RenderMathMLFraction.h:
137         * rendering/mathml/RenderMathMLOperator.h:
138         * rendering/mathml/RenderMathMLRadicalOperator.h:
139         * rendering/mathml/RenderMathMLRoot.cpp:
140         (WebCore::RenderMathMLRoot::baseWrapper):
141         (WebCore::RenderMathMLRoot::radicalWrapper):
142         (WebCore::RenderMathMLRoot::indexWrapper):
143         (WebCore::RenderMathMLRoot::radicalOperator):
144         (WebCore::RenderMathMLRootWrapper::removeChild):
145         * rendering/mathml/RenderMathMLRoot.h:
146         * rendering/mathml/RenderMathMLRow.cpp:
147         (WebCore::RenderMathMLRow::updateOperatorProperties):
148         (WebCore::RenderMathMLRow::layout):
149         * rendering/mathml/RenderMathMLRow.h:
150         * rendering/mathml/RenderMathMLScripts.cpp:
151         (WebCore::RenderMathMLScripts::addChildInternal):
152         (WebCore::RenderMathMLScripts::removeChildInternal):
153         (WebCore::RenderMathMLScripts::unembellishedOperator):
154         (WebCore::RenderMathMLScripts::layout):
155         (WebCore::RenderMathMLScriptsWrapper::addChildInternal):
156         (WebCore::RenderMathMLScriptsWrapper::addChild):
157         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
158         (WebCore::RenderMathMLScriptsWrapper::removeChild):
159         * rendering/mathml/RenderMathMLScripts.h:
160         * rendering/mathml/RenderMathMLSpace.h:
161         * rendering/mathml/RenderMathMLSquareRoot.h:
162         * rendering/mathml/RenderMathMLToken.h:
163         * rendering/mathml/RenderMathMLUnderOver.cpp:
164         (WebCore::RenderMathMLUnderOver::unembellishedOperator):
165         * rendering/svg/RenderSVGContainer.h:
166         * rendering/svg/RenderSVGGradientStop.h:
167         * rendering/svg/RenderSVGImage.h:
168         * rendering/svg/RenderSVGInlineText.h:
169         * rendering/svg/RenderSVGModelObject.h:
170         * rendering/svg/RenderSVGPath.h:
171         * rendering/svg/RenderSVGResourceContainer.h:
172         * rendering/svg/RenderSVGResourceFilter.h:
173         * rendering/svg/RenderSVGRoot.h:
174         * rendering/svg/RenderSVGShape.h:
175         * rendering/svg/RenderSVGText.h:
176         * rendering/svg/RenderSVGTextPath.h:
177         * rendering/svg/RenderSVGViewportContainer.h:
178
179 2014-10-06  Christophe Dumez  <cdumez@apple.com>
180
181         Use is<>() / downcast<>() for ScrollingTreeNode subclasses
182         https://bugs.webkit.org/show_bug.cgi?id=137451
183
184         Reviewed by Tim Horton.
185
186         Use is<>() / downcast<>() for ScrollingTreeNode subclasses.
187
188         No new tests, no behavior change.
189
190         * page/scrolling/ScrollingTree.cpp:
191         (WebCore::ScrollingTree::handleWheelEvent):
192         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
193         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
194         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
195         * page/scrolling/ScrollingTreeNode.h:
196         * page/scrolling/ScrollingTreeOverflowScrollingNode.h:
197         * page/scrolling/ScrollingTreeScrollingNode.h:
198         * page/scrolling/mac/ScrollingTreeFixedNode.h:
199         * page/scrolling/mac/ScrollingTreeStickyNode.h:
200         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
201         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
202
203 2014-10-06  Myles C. Maxfield  <mmaxfield@apple.com>
204
205         Addressing post-review comment on r174297.
206         https://bugs.webkit.org/show_bug.cgi?id=137355
207
208         Unreviewed.
209
210         * rendering/RenderText.cpp:
211         (WebCore::RenderText::stringView):
212
213 2014-10-06  Myles C. Maxfield  <mmaxfield@apple.com>
214
215         Unreviewed merge fix for r174279.
216         https://bugs.webkit.org/show_bug.cgi?id=137097
217
218         * svg/SVGToOTFFontConversion.cpp:
219         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont):
220
221 2014-10-06  David Hyatt  <hyatt@apple.com>
222
223         REGRESSION (Simple Line Layout): Inline block baselines computed incorrectly
224         https://bugs.webkit.org/show_bug.cgi?id=137461
225
226         Reviewed by Simon Fraser.
227
228         Added fast/inline-block/simple-line-layout.html
229
230         * rendering/SimpleLineLayoutFunctions.h:
231         (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
232         (WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
233         Fix the baseline computation functions in simple line layout to
234         use lineCount rather than runCount.
235
236 2014-10-06  Ada Chan  <adachan@apple.com>
237
238         Add ChromeClient::isPlayingAudioDidChange().
239         https://bugs.webkit.org/show_bug.cgi?id=137220
240
241         Reviewed by Jer Noble.
242
243         This is called when the Page's m_isPlayingAudio changes.
244
245         No new tests, no behavior change.
246
247         * page/ChromeClient.h:
248         (WebCore::ChromeClient::isPlayingAudioDidChange):
249         * page/Page.cpp:
250         (WebCore::Page::updateIsPlayingAudio):
251
252 2014-10-06  Benjamin Poulain  <benjamin@webkit.org>
253
254         Unreviewed, rolling out r174336.
255
256         Mozilla's Dromaeo still relies on the deprecated function.
257
258         Reverted changeset:
259
260         "Add a deprecation warning for Element.webkitMatchesSelector"
261         https://bugs.webkit.org/show_bug.cgi?id=137417
262         http://trac.webkit.org/changeset/174336
263
264 2014-10-06  Christophe Dumez  <cdumez@apple.com>
265
266         Use is<>() / downcast<>() for CryptoKey subclasses
267         https://bugs.webkit.org/show_bug.cgi?id=137436
268
269         Reviewed by Ryosuke Niwa.
270
271         Use is<>() / downcast<>() for CryptoKey subclasses.
272
273         No new tests, no behavior change.
274
275         * bindings/js/JSCryptoKeySerializationJWK.cpp:
276         (WebCore::addJWKAlgorithmToJSON):
277         * bindings/js/SerializedScriptValue.cpp:
278         (WebCore::CloneSerializer::write):
279         * crypto/CryptoKey.h:
280         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
281         (WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches):
282         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
283         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
284         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
285         (WebCore::CryptoAlgorithmAES_KW::keyAlgorithmMatches):
286         (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
287         (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
288         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
289         (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches):
290         (WebCore::CryptoAlgorithmHMAC::sign):
291         (WebCore::CryptoAlgorithmHMAC::verify):
292         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
293         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
294         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
295         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
296         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
297         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches):
298         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
299         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
300         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
301         (WebCore::CryptoAlgorithmRSA_OAEP::keyAlgorithmMatches):
302         (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
303         (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
304         * crypto/keys/CryptoKeyAES.h:
305         (WebCore::isCryptoKeyAES): Deleted.
306         * crypto/keys/CryptoKeyHMAC.h:
307         (WebCore::isCryptoKeyHMAC): Deleted.
308         * crypto/keys/CryptoKeyRSA.h:
309         (WebCore::isCryptoKeyRSA): Deleted.
310
311 2014-10-06  Simon Fraser  <simon.fraser@apple.com>
312
313         Some compositing logic cleanup
314         https://bugs.webkit.org/show_bug.cgi?id=133060
315
316         Reviewed by Zalan Bujtas.
317
318         Move compositing-related code from RenderLayer::styleChanged() to
319         RenderLayerCompositor::layerStyleChanged(). Combine various tests
320         (many clip-related) for changes that require layer rebuilding into 
321         styleChangeRequiresLayerRebuild().
322         
323         Remove code that calls setBackingNeedsRepaint() after filters change
324         between being composited or not; I verified that existing "repaint after
325         style change" code takes care those repaints.
326
327         * rendering/RenderLayer.cpp:
328         (WebCore::RenderLayer::calculateClipRects):
329         (WebCore::RenderLayer::checkIfDescendantClippingContextNeedsUpdate): Deleted.
330         * rendering/RenderLayer.h:
331         * rendering/RenderLayerCompositor.cpp:
332         (WebCore::checkIfDescendantClippingContextNeedsUpdate):
333         (WebCore::styleChangeRequiresLayerRebuild):
334         (WebCore::RenderLayerCompositor::layerStyleChanged):
335         * rendering/RenderLayerCompositor.h:
336
337 2014-10-06  Ada Chan  <adachan@apple.com>
338
339         Fix the iOS build after https://trac.webkit.org/changeset/174353.
340
341         * platform/audio/ios/AudioDestinationIOS.h:
342
343 2014-10-06  Ada Chan  <adachan@apple.com>
344
345         Implement Page::isPlayingAudio().
346         https://bugs.webkit.org/show_bug.cgi?id=137218
347
348         Reviewed by Eric Carlson.
349
350         - Add a hasMediaCharacteristics() method to MediaSession. There are three characteristics:
351         audible, visual, and legible. MediaSession gets the media characteristics information from
352         its MediaSessionClient.
353         - Add a mediaStateDidChange() method to MediaSessionClient that MediaSession can call when its
354         state changes.
355         - Each Document keeps a set of MediaSessions it contains. When that set changes, or when a MediaSession
356         changes state, or when its characteristics change, Document::updateIsPlayingAudio() is called. That method
357         iterates through all its MediaSessions to check if the overall isPlayingAudio state has changed in the Document.
358         - Each Page caches its overall isPlayingAudio state. Whenever a Document's isPlayingAudio state changes,
359         it calls Page::updateIsPlayingAudio() which iterates through its frames' documents to calculate its
360         overall isPlayingAudio state.
361
362         No new tests, no behavior change.
363
364         * dom/Document.cpp:
365         (WebCore::Document::Document):
366         Initialize m_isPlayingAudio.
367         (WebCore::Document::registerMediaSession):
368         Add the MediaSession to m_mediaSessions. Call updateIsPlayingAudio().
369         (WebCore::Document::unregisterMediaSession):
370         Remove the MediaSession from m_mediaSessions. Call updateIsPlayingAudio().
371         (WebCore::Document::updateIsPlayingAudio):
372         Go through all the MediaSessions in this Document and check if any has the Audible characteristic
373         and is playing. If the overall isPlayingAudio state changes, call Page::updateIsPlayingAudio().
374         * dom/Document.h:
375         (WebCore::Document::isPlayingAudio):
376
377         * html/HTMLMediaElement.cpp:
378         (WebCore::HTMLMediaElement::registerWithDocument):
379         Call Document::registerMediaSession().
380         (WebCore::HTMLMediaElement::unregisterWithDocument):
381         Call Document::unregisterMediaSession().
382         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
383         Call Document::updateIsPlayingAudio().
384         (WebCore::HTMLMediaElement::stop):
385         Call MediaSession::clientWillPausePlayback() so the MediaSession's state can be set back to Paused.
386         (WebCore::HTMLMediaElement::hasMediaCharacteristics):
387         Call hasAudio() to check if the HTMLMediaElement has the Audible characteristic. Call hasVideo()
388         to check if it has the Visual characteristic. Call hasClosedCaptions() to check if it has the
389         Legible characteristic.
390         (WebCore::HTMLMediaElement::mediaStateDidChange):
391         Call Document::updateIsPlayingAudio().
392         * html/HTMLMediaElement.h:
393
394         * page/Page.cpp:
395         (WebCore::Page::Page):
396         Initialize m_isPlayingAudio.
397         (WebCore::Page::updateIsPlayingAudio):
398         Iterate through all its frames' documents to check if any has audio playing. If the overall isPlayingAudio
399         state has changed, update m_isPlayingAudio.
400         * page/Page.h:
401         (WebCore::Page::isPlayingAudio):
402
403         * platform/audio/MediaSession.cpp:
404         (WebCore::MediaSession::setState):
405         If the MediaSession's state has changed, call Document::updateIsPlayingAudio().
406         (WebCore::MediaSession::hasMediaCharacteristics):
407         Call MediaSessionClient::hasMediaCharacteristics().
408         * platform/audio/MediaSession.h:
409         (WebCore::MediaSessionClient::mediaStateDidChange):
410
411         * platform/audio/mac/AudioDestinationMac.h:
412         AudioDestination only has the Audible characteristic.
413
414 2014-10-06  Christophe Dumez  <cdumez@apple.com>
415
416         Use is<>() / downcast<>() for ScrollingTree subclasses
417         https://bugs.webkit.org/show_bug.cgi?id=137449
418
419         Reviewed by Ryosuke Niwa.
420
421         Use is<>() / downcast<>() for ScrollingTree subclasses.
422
423         No new tests, no behavior change.
424
425         * page/scrolling/ScrollingTree.h:
426         * page/scrolling/ThreadedScrollingTree.h:
427         * page/scrolling/ios/ScrollingTreeIOS.h:
428         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
429         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
430         (WebCore::ScrollingCoordinatorMac::commitTreeState):
431
432 2014-10-06  Brent Fulgham  <bfulgham@apple.com>
433
434         [Win] Build fix aftr r174347.
435
436         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Use correct build
437         macro to prevent build break when ENCRYPTED_MEDIA_V2 is not enabled.
438
439 2014-10-06  Brent Fulgham  <bfulgham@apple.com>
440
441         [Win] Project file gardening.
442
443         * WebCore.vcxproj/WebCore.vcxproj.filters: Move EditorWin.cpp and
444           MediatTimeAVFoundation to proper folder locations in project.
445
446 2014-10-06  Brent Fulgham  <bfulgham@apple.com>
447
448         [Win] Extend AVFoundationCF Media Implementation
449         https://bugs.webkit.org/show_bug.cgi?id=137409
450
451         Reviewed by Eric Carlson.
452
453         This code is not yet being built and tested by our system. Appropriate
454         tests will be activated when we enable the build.
455
456         Most of this patch involves correcting some misuse of the AVFoundationCF API.
457         1. It is never appropriate in AVCF to pass a null CFErrorRef; instead you must
458            pass a CFErrorRef with error type kCFURLErrorUnknown.
459         2. Because of the asynchronous way we handle the request/response, it is possible
460            for AVCF to make two AVCF requests while negotiating the key exchange.
461
462         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
463         missing declaration.
464         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
465         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): Tighten up scope
466         of 'underlyingError'.
467         (WebCore::CDMSessionAVFoundationCF::update): Add call to complete the
468         loading process.
469         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
470         (WebCore::InbandTextTrackPrivateAVCF::label): Handle null titles CFArray
471         found during testing.
472         (WebCore::InbandTextTrackPrivateAVCF::language): Ditto for a null locale.
473         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
474         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine): Add support
475         for the new 'supportsKeySystem' method.
476         (WebCore::MediaPlayerPrivateAVFoundationCF::createContextVideoRenderer): Add
477         assertion for mainThread.
478         (WebCore::MediaPlayerPrivateAVFoundationCF::destroyContextVideoRenderer): Ditto.
479         (WebCore::MediaPlayerPrivateAVFoundationCF::createVideoLayer): Ditto.
480         (WebCore::MediaPlayerPrivateAVFoundationCF::destroyVideoLayer): Ditto.
481         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Ditto.
482         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayerItem): Ditto.
483         (WebCore::MediaPlayerPrivateAVFoundationCF::platformLayer): Ditto.
484         (WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible): Ditto.
485         (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext): Ditto.
486         (WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto.
487         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem): Added.
488         (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): Add assertion that this
489         is being called on the main thread.
490         (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions): Handle
491         the allows empty media selection properly based on test behavior.
492         (WebCore::AVFWrapper::AVFWrapper): Initialize resource loader callback structure
493         when building with AVFOUNDATION_LOADER_DELEGATE.
494         (WebCore::AVFWrapper::createAssetForURL): Use AVFWrapper's loader callback struct,
495         rather than passing the address of a temporary value.
496         (WebCore::AVFWrapper::processNotification): Stop using the deprecated 
497         'dispatch_get_current_queue' function.
498         (WebCore::AVFWrapper::processCue): Ditto.
499         (WebCore::AVFWrapper::legibleOutputCallback): Ditto.
500         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource): Pass a valid CFError
501         object; nullptr is not allowed as an argument to the "...FinishedLoadingWithError"
502         method.
503         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource): Add support for multiple
504         in-flight requests.
505         (WebCore::AVFWrapper::platformLayer): Assert we are on the main thread.
506         (WebCore::AVFWrapper::setRequestForKey): Add support for multiple in-flight requests.
507         (WebCore::AVFWrapper::takeRequestForKeyURI): Ditto.
508         (WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Ditto.
509         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
510         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Make sure we pass
511         valid CFError objects, rather than nullptr.
512
513 2014-10-06  Chris Fleizach  <cfleizach@apple.com>
514
515         AX: Performance: Certain Web site causes Safari to hang completely while entering form data
516         https://bugs.webkit.org/show_bug.cgi?id=137420
517
518         Reviewed by Mario Sanchez Prada.
519
520         If a website has multiple nested tables that are not "accessibility" tables, the performance of accessibility slows to a crawl because:
521           1) We are re-computing accessibilityIsIgnored many times.
522                As a solution, we can enable the isIgnoredCache when updating children.
523           2) When asking if an object isTableCell, we'd go up the parent chain, asking each of those parents the same question, which exploded into calling this many times.
524               As a solution, I've changed our determination of isTableCell to instead check if the parent is an accessibiltyTable which should be much faster.
525
526         No new functionality. Existing tests cover changes.
527
528         * accessibility/AccessibilityObject.cpp:
529         (WebCore::AccessibilityObject::updateChildrenIfNecessary):
530         (WebCore::AccessibilityObject::accessibilityIsIgnored):
531         * accessibility/AccessibilityTableCell.cpp:
532         (WebCore::AccessibilityTableCell::parentTable):
533         (WebCore::AccessibilityTableCell::isTableCell):
534
535 2014-10-06  Csaba Osztrogon√°c  <ossy@webkit.org>
536
537         Unreviewed, touch testing/Internals.idl to try to fix Windows EWS after r174315.
538
539         * testing/Internals.idl: Remove unnecessary whitespaces.
540
541 2014-10-05  Christophe Dumez  <cdumez@apple.com>
542
543         Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses
544         https://bugs.webkit.org/show_bug.cgi?id=137440
545
546         Reviewed by Ryosuke Niwa.
547
548         Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses.
549
550         No new tests, no behavior change.
551
552         * page/scrolling/AsyncScrollingCoordinator.cpp:
553         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
554         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
555         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
556         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
557         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
558         (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
559         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
560         * page/scrolling/AsyncScrollingCoordinator.h:
561         * page/scrolling/ScrollingCoordinator.h:
562         * page/scrolling/ScrollingStateFixedNode.h:
563         * page/scrolling/ScrollingStateFrameScrollingNode.h:
564         * page/scrolling/ScrollingStateNode.h:
565         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
566         * page/scrolling/ScrollingStateScrollingNode.h:
567         * page/scrolling/ScrollingStateStickyNode.h:
568         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
569         (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
570         * page/scrolling/ScrollingTreeScrollingNode.cpp:
571         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
572         (WebCore::ScrollingTreeScrollingNode::updateAfterChildren):
573         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
574         (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
575         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
576         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren):
577         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren):
578         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
579         (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
580         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
581         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
582         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren):
583         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
584         (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
585
586 2014-10-05  Christophe Dumez  <cdumez@apple.com>
587
588         Use is<>() / downcast<>() for CachedRawResource
589         https://bugs.webkit.org/show_bug.cgi?id=137439
590
591         Reviewed by Ryosuke Niwa.
592
593         Use is<>() / downcast<>() for CachedRawResource.
594
595         No new tests, no behavior change.
596
597         * inspector/InspectorResourceAgent.cpp:
598         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
599         * loader/cache/CachedRawResource.cpp:
600         (WebCore::CachedRawResource::switchClientsToRevalidatedResource):
601         * loader/cache/CachedRawResource.h:
602         (isType):
603         * loader/cache/CachedResourceLoader.cpp:
604         (WebCore::CachedResourceLoader::requestRawResource):
605         (WebCore::CachedResourceLoader::requestMainResource):
606
607 2014-10-05  Christophe Dumez  <cdumez@apple.com>
608
609         Use is<>() / downcast<>() for TextTrack subclasses
610         https://bugs.webkit.org/show_bug.cgi?id=137438
611
612         Reviewed by Ryosuke Niwa.
613
614         Use is<>() / downcast<>() for TextTrack subclasses.
615
616         No new tests, no behavior change.
617
618         * Modules/mediasource/SourceBuffer.cpp:
619         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
620         * html/HTMLMediaElement.cpp:
621         (WebCore::HTMLMediaElement::parseAttribute):
622         * html/track/InbandTextTrack.h:
623         (isType):
624         * html/track/LoadableTextTrack.h:
625         (isType):
626         * html/track/TextTrackList.cpp:
627         (TextTrackList::getTrackIndex):
628         (TextTrackList::append): Deleted.
629
630 2014-10-05  Christophe Dumez  <cdumez@apple.com>
631
632         Use is<>() / downcast<>() for CryptoKeyData subclasses
633         https://bugs.webkit.org/show_bug.cgi?id=137437
634
635         Reviewed by Ryosuke Niwa.
636
637         Use is<>() / downcast<>() for CryptoKeyData subclasses.
638
639         No new tests, no behavior change.
640
641         * bindings/js/JSCryptoKeySerializationJWK.cpp:
642         (WebCore::JSCryptoKeySerializationJWK::serialize):
643         * bindings/js/SerializedScriptValue.cpp:
644         (WebCore::CloneSerializer::write):
645         * crypto/CryptoKeyData.h:
646         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
647         (WebCore::CryptoAlgorithmAES_CBC::importKey):
648         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
649         (WebCore::CryptoAlgorithmAES_KW::importKey):
650         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
651         (WebCore::CryptoAlgorithmHMAC::importKey):
652         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
653         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
654         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
655         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
656         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
657         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
658         * crypto/keys/CryptoKeyDataOctetSequence.h:
659         (WebCore::isCryptoKeyDataOctetSequence): Deleted.
660         * crypto/keys/CryptoKeyDataRSAComponents.h:
661         (WebCore::isCryptoKeyDataRSAComponents): Deleted.
662         * crypto/keys/CryptoKeySerializationRaw.cpp:
663         (WebCore::CryptoKeySerializationRaw::serialize):
664
665 2014-10-05  Benjamin Poulain  <bpoulain@apple.com>
666
667         Add a deprecation warning for Element.webkitMatchesSelector
668         https://bugs.webkit.org/show_bug.cgi?id=137417
669
670         Reviewed by Christophe Dumez.
671
672         Many scripts have assumed that the unprefixed version of ElementwebkitMatchesSelector
673         would be Element.matchesSelector. Feature detection scripts too often test
674         for Element.matchesSelector instead of Element.matches before calling Element.webkitMatchesSelector.
675
676         This patch add a deprecation warning for Element.webkitMatchesSelector with the hope
677         that it will push the adoption of the unprefixed version.
678
679         * dom/Element.cpp:
680         (WebCore::Element::webkitMatchesSelector):
681         * dom/Element.h:
682         * dom/Element.idl:
683
684 2014-10-05  Benjamin Poulain  <benjamin@webkit.org>
685
686         Element.matches()'s argument is not supposed to be optional
687         https://bugs.webkit.org/show_bug.cgi?id=137427
688
689         Reviewed by Christophe Dumez.
690
691         The argument was marked as optional, it is not supposed to:
692         https://dom.spec.whatwg.org/#interface-element
693
694         Also update the webkit-prefixed version: webkitMatchesSelector().
695
696         Tests: fast/dom/SelectorAPI/closest-definition.html
697                fast/dom/SelectorAPI/closest-null-undefined.html
698                fast/dom/SelectorAPI/matches-definition.html
699                fast/dom/SelectorAPI/matches-null-undefined.html
700
701         * dom/Element.idl:
702
703 2014-10-05  Christophe Dumez  <cdumez@apple.com>
704
705         Use is<>() / downcast<>() for CachedResource subclasses
706         https://bugs.webkit.org/show_bug.cgi?id=137431
707
708         Reviewed by Benjamin Poulain.
709
710         Use is<>() / downcast<>() for CachedResource subclasses.
711
712         No new tests, no behavior change.
713
714         * inspector/InspectorPageAgent.cpp:
715         (WebCore::InspectorPageAgent::cachedResourceContent):
716         * loader/cache/CachedCSSStyleSheet.h:
717         * loader/cache/CachedFont.h:
718         * loader/cache/CachedImage.cpp:
719         (WebCore::CachedImage::switchClientsToRevalidatedResource):
720         * loader/cache/CachedImage.h:
721         * loader/cache/CachedResource.h:
722         * loader/cache/CachedResourceLoader.cpp:
723         (WebCore::CachedResourceLoader::requestImage):
724         (WebCore::CachedResourceLoader::requestFont):
725         (WebCore::CachedResourceLoader::requestTextTrack):
726         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
727         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
728         (WebCore::CachedResourceLoader::requestScript):
729         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
730         (WebCore::CachedResourceLoader::requestSVGDocument):
731         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
732         * loader/cache/CachedSVGDocument.h:
733         * loader/cache/CachedScript.h:
734         * loader/cache/CachedTextTrack.h:
735         * loader/cache/CachedXSLStyleSheet.h:
736         * loader/cache/MemoryCache.cpp:
737         (WebCore::MemoryCache::removeImageFromCache):
738
739 2014-10-05  Christophe Dumez  <cdumez@apple.com>
740
741         Use is<>() / downcast<>() for StyleSheet subclasses
742         https://bugs.webkit.org/show_bug.cgi?id=137429
743
744         Reviewed by Benjamin Poulain.
745
746         Use is<>() / downcast<>() for StyleSheet subclasses.
747
748         No new tests, no behavior change.
749
750         * bindings/gobject/WebKitDOMPrivate.cpp:
751         (WebKit::wrap):
752         * css/CSSStyleSheet.h:
753         (isType):
754         * css/StyleSheet.h:
755         * dom/Document.cpp:
756         (WebCore::Document::applyXSLTransform):
757         * dom/DocumentStyleSheetCollection.cpp:
758         (WebCore::filterEnabledNonemptyCSSStyleSheets):
759         * dom/ProcessingInstruction.cpp:
760         (WebCore::ProcessingInstruction::parseStyleSheet):
761         * inspector/InspectorCSSAgent.cpp:
762         (WebCore::InspectorCSSAgent::getAllStyleSheets):
763         * xml/XSLStyleSheet.h:
764         (isType):
765
766 2014-10-05  Christophe Dumez  <cdumez@apple.com>
767
768         Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses
769         https://bugs.webkit.org/show_bug.cgi?id=137432
770
771         Reviewed by Benjamin Poulain.
772
773         Use is<>() / downcast<>() for CryptoAlgorithmParameters subclasses.
774
775         No new tests, no behavior change.
776
777         * bindings/js/JSCryptoKeySerializationJWK.cpp:
778         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
779         * crypto/CryptoAlgorithmParameters.h:
780         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
781         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
782         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
783         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
784         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
785         (WebCore::CryptoAlgorithmAES_KW::generateKey):
786         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
787         (WebCore::CryptoAlgorithmHMAC::sign):
788         (WebCore::CryptoAlgorithmHMAC::verify):
789         (WebCore::CryptoAlgorithmHMAC::generateKey):
790         (WebCore::CryptoAlgorithmHMAC::importKey):
791         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
792         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
793         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
794         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
795         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
796         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
797         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
798         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
799         (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
800         (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
801         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
802         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
803         * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
804         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
805         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
806         * crypto/parameters/CryptoAlgorithmHmacParams.h:
807         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
808         * crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h:
809         * crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
810         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h:
811
812 2014-10-05  Chris Fleizach  <cfleizach@apple.com>
813
814         AX: iOS8: Crash at -[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]
815         https://bugs.webkit.org/show_bug.cgi?id=137289
816
817         Reviewed by Mario Sanchez Prada.
818
819         Casting a NSInteger to an unsigned can bypass the check we were hoping to achieve, 
820         because size_t is not the same as unsigned.
821
822         Test: platform/ios-sim/accessibility/out-of-bounds-child-access.html
823
824         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
825         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
826
827 2014-10-05  Christophe Dumez  <cdumez@apple.com>
828
829         Use is<>() / downcast<>() for ElementData subclasses
830         https://bugs.webkit.org/show_bug.cgi?id=137430
831
832         Reviewed by Benjamin Poulain.
833
834         Use is<>() / downcast<>() for ElementData subclasses.
835
836         No new tests, no behavior change.
837
838         * dom/Element.cpp:
839         (WebCore::Element::cloneAttributesFromElement):
840         (WebCore::Element::createUniqueElementData):
841         * dom/ElementData.cpp:
842         (WebCore::ElementData::destroy):
843         * dom/ElementData.h:
844         (WebCore::ElementData::length):
845         (WebCore::ElementData::attributeBase):
846         (WebCore::ElementData::presentationAttributeStyle):
847         (WebCore::ElementData::attributesIterator):
848         (WebCore::ElementData::findAttributeByName):
849         (isType):
850
851 2014-10-05  Lorenzo Tilve  <ltilve@igalia.com>
852
853         [GTK] Fix build when DRAG_SUPPORT is disabled
854         https://bugs.webkit.org/show_bug.cgi?id=137361
855
856         Reviewed by Carlos Garcia Campos.
857
858         Flag out unbuildable code without DRAG_SUPPORT.
859
860         * platform/gtk/GtkDragAndDropHelper.cpp:
861         * platform/gtk/GtkDragAndDropHelper.h:
862
863 2014-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
864
865         [GTK] Do not generate a symlink in derived sources for every header in WebCore/bindings/gobject
866         https://bugs.webkit.org/show_bug.cgi?id=137389
867
868         Reviewed by Martin Robinson.
869
870         We only need a symlink for static sources that are included in
871         public generated headers, because they are added with as
872         <webkitdom/WebKitDOMFoo.h> so they need to be inside a webkitdom
873         directory. Also use proper targets and commands to create the
874         symlinks only when needed instead of for every build.
875
876         * PlatformGTK.cmake:
877
878 2014-10-04  Myles C. Maxfield  <mmaxfield@apple.com>
879
880         [SVG -> OTF Converter] Arabic forms are not substituted correctly
881         https://bugs.webkit.org/show_bug.cgi?id=137092
882
883         Reviewed by Darin Adler.
884
885         Tests: svg/W3C-SVG-1.1/fonts-glyph-02-t.svg
886                svg/custom/glyph-selection-arabic-forms.svg
887
888         * svg/SVGToOTFFontConversion.cpp:
889         (WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable): Invoked for each of the three
890         Arabic form substitutions.
891         (WebCore::SVGToOTFFontConverter::appendGSUBTable): OpenType "Advanced Typographic Table":
892         "Glyph substitution data"
893         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Re-order the m_codepointsToIndicesMap
894         to prefer isolated forms of glyphs.
895         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Append the GSUB table.
896         (WebCore::calculateChecksum): Deleted.
897
898 2014-10-04  Dhi Aurrahman  <diorahman@rockybars.com>
899
900         Implement Element.closest() API
901         https://bugs.webkit.org/show_bug.cgi?id=137418
902
903         Reviewed by Benjamin Poulain.
904
905         Implement Element.closest() API as specified in [1].
906
907         [1]: https://dom.spec.whatwg.org/#dom-element-closest
908
909         Tests: fast/selectors/closest-general.html
910                fast/selectors/closest-scope.html
911
912         * dom/Element.cpp:
913         (WebCore::Element::closest):
914         * dom/Element.h:
915         * dom/Element.idl:
916         * dom/SelectorQuery.cpp:
917         (WebCore::SelectorDataList::selectorClosest):
918         (WebCore::SelectorDataList::closest):
919         * dom/SelectorQuery.h:
920         (WebCore::SelectorQuery::closest):
921
922 2014-10-04  Brian J. Burg  <burg@cs.washington.edu>
923
924         Unreviewed, rolling out r174319.
925
926         Causes assertions in fast/profiler tests. Needs nontrivial
927         investigation, will take offline.
928
929         Reverted changeset:
930
931         "Web Inspector: timelines should not count time elapsed while
932         paused in the debugger"
933         https://bugs.webkit.org/show_bug.cgi?id=136351
934         http://trac.webkit.org/changeset/174319
935
936 2014-10-04  Brian J. Burg  <burg@cs.washington.edu>
937
938         Web Inspector: timelines should not count time elapsed while paused in the debugger
939         https://bugs.webkit.org/show_bug.cgi?id=136351
940
941         Reviewed by Timothy Hatcher.
942
943         To avoid counting time elapsed while the debugger is paused, timeline records should
944         keep track of time elapsed since the start of timeline capturing, rather than wall clock
945         timestamps. We can easily compute elapsed time by sharing Stopwatch instance among
946         all timeline record-generating code. The stopwatch is paused while the debugger is paused,
947         so subsequent time measurements will not include time elapsed while the debugger is paused.
948
949         Agents use the shared stopwatch to generate timestamps if the timeline agent is active
950         (i.e., a timeline recording is being captured). If not, use a zero timestamp since the timing data is only revealed through the Timeline interface.
951
952         This refactoring is safe because start and end times are only used to graph records; the
953         timestamp's actual value is irrelevant and is not displayed in the user interface. Date
954         timestamps are still included with network-related records as part of their header data.
955
956         No new tests, because we cannot reliably test timing changes induced by debugger pauses.
957         It is possible for records to accrue time before the debugger pauses or after it resumes.
958
959         * inspector/InspectorCSSAgent.cpp: Remove unused include.
960         * inspector/InspectorPageAgent.cpp: Use timestamps from the shared stopwatch.
961         (WebCore::InspectorPageAgent::timestamp):
962         (WebCore::InspectorPageAgent::domContentEventFired):
963         (WebCore::InspectorPageAgent::loadEventFired):
964         * inspector/InspectorPageAgent.h:
965         * inspector/InspectorResourceAgent.cpp: Use timestamps from the shared stopwatch.
966         (WebCore::InspectorResourceAgent::timestamp):
967         (WebCore::InspectorResourceAgent::willSendRequest):
968         (WebCore::InspectorResourceAgent::didReceiveResponse):
969         (WebCore::InspectorResourceAgent::didReceiveData):
970         (WebCore::InspectorResourceAgent::didFinishLoading):
971         (WebCore::InspectorResourceAgent::didFailLoading):
972         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
973         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
974         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
975         (WebCore::InspectorResourceAgent::didCloseWebSocket):
976         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
977         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
978         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
979         * inspector/InspectorResourceAgent.h:
980         * inspector/InspectorTimelineAgent.cpp: Add calls to reset, start, and stop the stopwatch.
981         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
982         (WebCore::InspectorTimelineAgent::internalStart):
983         (WebCore::InspectorTimelineAgent::internalStop):
984         (WebCore::startProfiling):
985         (WebCore::InspectorTimelineAgent::startFromConsole):
986         (WebCore::InspectorTimelineAgent::willCallFunction):
987         (WebCore::InspectorTimelineAgent::willEvaluateScript):
988         (WebCore::InspectorTimelineAgent::didPause):
989         (WebCore::InspectorTimelineAgent::didContinue):
990         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
991         (WebCore::InspectorTimelineAgent::timestamp):
992         (WebCore::TimelineTimeConverter::reset): Deleted.
993         * inspector/InspectorTimelineAgent.h: Make timestamp() public, and remove old timepieces.
994         (WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
995         (WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
996         (WebCore::InspectorTimelineAgent::timeConverter): Deleted.
997         * inspector/TimelineRecordFactory.cpp:
998
999 2014-10-04  Tim Horton  <timothy_horton@apple.com>
1000
1001         Make it possible to test page overlays
1002         https://bugs.webkit.org/show_bug.cgi?id=137339
1003
1004         Reviewed by Dan Bernstein.
1005
1006         Tests: pageoverlay/overlay-installation.html
1007                pageoverlay/overlay-large-document-scrolled.html
1008                pageoverlay/overlay-large-document.html
1009
1010         Do some initial work to make page overlays testable.
1011         There are many more tests to be written, but this lays the groundwork.
1012
1013         * WebCore.exp.in:
1014         * WebCore.xcodeproj/project.pbxproj:
1015         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
1016         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
1017         * CMakeLists.txt:
1018         Add MockPageOverlayClient.
1019
1020         * platform/graphics/GraphicsLayer.h:
1021         * page/PageOverlayController.h:
1022         * page/PageOverlayController.cpp:
1023         (WebCore::PageOverlayController::shouldSkipLayerInDump):
1024         Don't skip PageOverlayController-owned layers in the layer tree dump if the
1025         layerTreeAsText behavior says that we should include them.
1026
1027         * platform/graphics/GraphicsLayer.cpp:
1028         (WebCore::dumpChildren):
1029         
1030         * platform/graphics/GraphicsLayerClient.h:
1031         (WebCore::GraphicsLayerClient::shouldSkipLayerInDump):
1032         * rendering/RenderLayerBacking.cpp:
1033         (WebCore::RenderLayerBacking::shouldSkipLayerInDump):
1034         * rendering/RenderLayerBacking.h:
1035         Pass the LayerTreeAsTextBehavior through shouldSkipLayerInDump.
1036
1037         * testing/Internals.cpp:
1038         (WebCore::Internals::resetToConsistentState):
1039         Uninstall all page overlays when resetting to a consistent state.
1040
1041         (WebCore::Internals::installMockPageOverlay):
1042         (WebCore::Internals::pageOverlayLayerTreeAsText):
1043         Expose two new internals functions.
1044         installMockPageOverlay takes "view" or "document", allowing script
1045         to choose the appropriate overlay type.
1046         pageOverlayLayerTreeAsText dumps both view and document-relative
1047         overlays, from each overlay container layer.
1048
1049         * testing/Internals.h:
1050         * testing/Internals.idl:
1051         Fix some typos.
1052
1053         * testing/MockPageOverlayClient.cpp: Added.
1054         (WebCore::MockPageOverlayClient::shared):
1055         (WebCore::MockPageOverlayClient::MockPageOverlayClient):
1056         (WebCore::MockPageOverlayClient::installOverlay):
1057         (WebCore::MockPageOverlayClient::uninstallAllOverlays):
1058         (WebCore::MockPageOverlayClient::layerTreeAsText):
1059         (WebCore::MockPageOverlayClient::pageOverlayDestroyed):
1060         (WebCore::MockPageOverlayClient::willMoveToPage):
1061         (WebCore::MockPageOverlayClient::didMoveToPage):
1062         When the overlay is parented, mark it as needing repaint.
1063         Future tests might want to test overlays without content,
1064         but for now this is a reasonable default behavior.
1065
1066         (WebCore::MockPageOverlayClient::drawRect):
1067         Paint the overlay rects as described in the LayoutTests ChangeLog.
1068
1069         (WebCore::MockPageOverlayClient::mouseEvent):
1070         (WebCore::MockPageOverlayClient::didScrollFrame):
1071         (WebCore::MockPageOverlayClient::copyAccessibilityAttributeStringValueForPoint):
1072         (WebCore::MockPageOverlayClient::copyAccessibilityAttributeBoolValueForPoint):
1073         (WebCore::MockPageOverlayClient::copyAccessibilityAttributeNames):
1074
1075         * testing/MockPageOverlayClient.h: Added.
1076
1077 2014-10-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1078
1079         Move DragController::createFragmentFromDragData implementation to the editor
1080         https://bugs.webkit.org/show_bug.cgi?id=136819
1081
1082         Reviewed by Darin Adler.
1083
1084         Make Editor::webContentFromPasteboard() common to all ports and
1085         add a implementation for every port.
1086
1087         * PlatformWin.cmake: Add new files to compilation.
1088         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1089         * editing/Editor.cpp:
1090         (WebCore::Editor::pasteWithPasteboard): Move to EditorWin.cpp
1091         since this is only used by windows port.
1092         * editing/Editor.h:
1093         * editing/efl/EditorEfl.cpp:
1094         (WebCore::Editor::webContentFromPasteboard):
1095         * editing/gtk/EditorGtk.cpp:
1096         (WebCore::Editor::webContentFromPasteboard):
1097         * editing/win/EditorWin.cpp: Added.
1098         (WebCore::Editor::pasteWithPasteboard):
1099         (WebCore::Editor::webContentFromPasteboard):
1100         * page/DragController.cpp:
1101         (WebCore::documentFragmentFromDragData): Use the editor instead of
1102         createFragmentFromDragData() that has been removed. Also made this
1103         method a static funtion again.
1104         * page/DragController.h:
1105         * page/efl/DragControllerEfl.cpp: Remove createFragmentFromDragData().
1106         * page/gtk/DragControllerGtk.cpp: Ditto.
1107         * page/mac/DragControllerMac.mm: Ditto.
1108         * page/win/DragControllerWin.cpp: Ditto.
1109         * platform/Pasteboard.h:
1110         (WebCore::Pasteboard::dragDataMap): Add a getter for m_dragDataMap
1111         as required by Editor::webContentFromPasteboard for windows.
1112
1113 2014-10-04  Christophe Dumez  <cdumez@apple.com>
1114
1115         Use is<>() / downcast<>() for CSS StyleProperties
1116         https://bugs.webkit.org/show_bug.cgi?id=137398
1117
1118         Reviewed by Benjamin Poulain.
1119
1120         Use is<>() / downcast<>() for CSS StyleProperties subclasses.
1121
1122         No new tests, no behavior change.
1123
1124         * css/StyleProperties.cpp:
1125         (WebCore::StyleProperties::immutableCopyIfNeeded):
1126         (WebCore::MutableStyleProperties::MutableStyleProperties):
1127         (WebCore::StyleProperties::hasCSSOMWrapper):
1128         * css/StyleProperties.h:
1129         (WebCore::StyleProperties::PropertyReference::propertyMetadata):
1130         (WebCore::StyleProperties::PropertyReference::propertyValue):
1131         (WebCore::StyleProperties::propertyCount):
1132         (WebCore::StyleProperties::deref):
1133         (WebCore::StyleProperties::findPropertyIndex):
1134         (isType):
1135         (WebCore::toMutableStyleProperties): Deleted.
1136         (WebCore::toImmutableStyleProperties): Deleted.
1137         * css/StyleRule.cpp:
1138         (WebCore::StyleRule::mutableProperties):
1139         (WebCore::StyleRulePage::mutableProperties):
1140         (WebCore::StyleRuleFontFace::mutableProperties):
1141         * css/WebKitCSSKeyframeRule.cpp:
1142         (WebCore::StyleKeyframe::mutableProperties):
1143         * dom/StyledElement.cpp:
1144         (WebCore::StyledElement::ensureMutableInlineStyle):
1145         (WebCore::StyledElement::setInlineStyleFromString):
1146
1147 2014-10-04  Zan Dobersek  <zdobersek@igalia.com>
1148
1149         [TexMap] Clean up GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded()
1150         https://bugs.webkit.org/show_bug.cgi?id=137263
1151
1152         Reviewed by Darin Adler.
1153
1154         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1155         (WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded): Clean up
1156         the method a bit. When the backing store will not be in use the change mask
1157         should only get updated if there was a backing store present beforehand.
1158
1159 2014-10-04  Zan Dobersek  <zdobersek@igalia.com>
1160
1161         [TexMap] Remove QDoc comments in GraphicsLayerTextureMapper
1162         https://bugs.webkit.org/show_bug.cgi?id=137264
1163
1164         Reviewed by Andreas Kling.
1165
1166         Remove all the QDoc comments in the class that were
1167         left over by the Qt port.
1168
1169         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1170         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
1171
1172 2014-10-03  Christophe Dumez  <cdumez@apple.com>
1173
1174         Use is<>() / downcast<>() for CSSValue subclasses
1175         https://bugs.webkit.org/show_bug.cgi?id=137381
1176
1177         Reviewed by Benjamin Poulain.
1178
1179         Use is<>() / downcast<>() for CSSValue subclasses.
1180
1181         No new tests, no behavior change.
1182
1183         * css/CSSAspectRatioValue.h:
1184         * css/CSSBorderImageSliceValue.h:
1185         * css/CSSCalculationValue.cpp:
1186         (WebCore::CSSCalcExpressionNodeParser::parseValue):
1187         * css/CSSCalculationValue.h:
1188         * css/CSSCanvasValue.h:
1189         * css/CSSComputedStyleDeclaration.cpp:
1190         (WebCore::getBorderRadiusShorthandValue):
1191         (WebCore::ComputedStyleExtractor::propertyMatches):
1192         * css/CSSCrossfadeValue.cpp:
1193         (WebCore::subimageKnownToBeOpaque):
1194         * css/CSSCrossfadeValue.h:
1195         * css/CSSCursorImageValue.cpp:
1196         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1197         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1198         (WebCore::CSSCursorImageValue::cachedImage):
1199         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
1200         (WebCore::CSSCursorImageValue::isSVGCursor):
1201         * css/CSSCursorImageValue.h:
1202         * css/CSSFilterImageValue.h:
1203         * css/CSSFontFaceSrcValue.h:
1204         * css/CSSFontFeatureValue.h:
1205         * css/CSSFontSelector.cpp:
1206         (WebCore::CSSFontSelector::addFontFaceRule):
1207         * css/CSSFontValue.h:
1208         * css/CSSFunctionValue.h:
1209         * css/CSSGradientValue.cpp:
1210         (WebCore::CSSGradientValue::image):
1211         (WebCore::CSSGradientValue::gradientWithStylesResolved):
1212         * css/CSSGradientValue.h:
1213         * css/CSSGridLineNamesValue.h:
1214         * css/CSSGridTemplateAreasValue.h:
1215         * css/CSSImageGeneratorValue.cpp:
1216         (WebCore::CSSImageGeneratorValue::image):
1217         (WebCore::CSSImageGeneratorValue::isFixedSize):
1218         (WebCore::CSSImageGeneratorValue::fixedSize):
1219         (WebCore::CSSImageGeneratorValue::isPending):
1220         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
1221         (WebCore::CSSImageGeneratorValue::loadSubimages):
1222         (WebCore::CSSImageGeneratorValue::subimageIsPending):
1223         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
1224         * css/CSSImageGeneratorValue.h:
1225         * css/CSSImageSetValue.cpp:
1226         (WebCore::CSSImageSetValue::fillImageSet):
1227         * css/CSSImageSetValue.h:
1228         * css/CSSImageValue.h:
1229         * css/CSSInheritedValue.h:
1230         * css/CSSInitialValue.h:
1231         * css/CSSLineBoxContainValue.h:
1232         * css/CSSParser.cpp:
1233         (WebCore::CSSParser::parseColor):
1234         (WebCore::CSSParser::addFillValue):
1235         (WebCore::CSSParser::addAnimationValue):
1236         (WebCore::CSSParser::parse3ValuesFillPosition):
1237         (WebCore::CSSParser::parseFillPosition):
1238         (WebCore::CSSParser::parseFillRepeat):
1239         (WebCore::gridMissingGridPositionValue):
1240         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
1241         (WebCore::CSSParser::parseBasicShapeCircle):
1242         (WebCore::CSSParser::parseBasicShapeEllipse):
1243         (WebCore::CSSParser::parseDeprecatedGradient):
1244         (WebCore::CSSParser::parseDeprecatedRadialGradient):
1245         (WebCore::CSSParser::parseRadialGradient):
1246         (WebCore::CSSParser::createFontFaceRule):
1247         * css/CSSPrimitiveValue.h:
1248         * css/CSSReflectValue.h:
1249         * css/CSSShadowValue.h:
1250         * css/CSSTimingFunctionValue.h:
1251         * css/CSSToStyleMap.cpp:
1252         (WebCore::CSSToStyleMap::mapFillAttachment):
1253         (WebCore::CSSToStyleMap::mapFillClip):
1254         (WebCore::CSSToStyleMap::mapFillComposite):
1255         (WebCore::CSSToStyleMap::mapFillBlendMode):
1256         (WebCore::CSSToStyleMap::mapFillOrigin):
1257         (WebCore::CSSToStyleMap::mapFillRepeatX):
1258         (WebCore::CSSToStyleMap::mapFillRepeatY):
1259         (WebCore::CSSToStyleMap::mapFillSize):
1260         (WebCore::CSSToStyleMap::mapFillXPosition):
1261         (WebCore::CSSToStyleMap::mapFillYPosition):
1262         (WebCore::CSSToStyleMap::mapFillMaskSourceType):
1263         (WebCore::CSSToStyleMap::mapAnimationDelay):
1264         (WebCore::CSSToStyleMap::mapAnimationDirection):
1265         (WebCore::CSSToStyleMap::mapAnimationDuration):
1266         (WebCore::CSSToStyleMap::mapAnimationFillMode):
1267         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
1268         (WebCore::CSSToStyleMap::mapAnimationName):
1269         (WebCore::CSSToStyleMap::mapAnimationPlayState):
1270         (WebCore::CSSToStyleMap::mapAnimationProperty):
1271         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
1272         (WebCore::CSSToStyleMap::mapNinePieceImage):
1273         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
1274         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
1275         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
1276         * css/CSSUnicodeRangeValue.h:
1277         * css/CSSValue.cpp:
1278         (WebCore::CSSValue::isImplicitInitialValue):
1279         (WebCore::CSSValue::addSubresourceStyleURLs):
1280         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
1281         (WebCore::CSSValue::equals):
1282         (WebCore::CSSValue::cssText):
1283         (WebCore::CSSValue::destroy):
1284         (WebCore::CSSValue::cloneForCSSOM):
1285         * css/CSSValue.h:
1286         * css/CSSValueList.h:
1287         (WebCore::CSSValueListInspector::CSSValueListInspector):
1288         * css/DeprecatedStyleBuilder.cpp:
1289         (WebCore::ApplyPropertyDefault::applyValue):
1290         (WebCore::ApplyPropertyNumber::applyValue):
1291         (WebCore::ApplyPropertyAuto::applyValue):
1292         (WebCore::ApplyPropertyClip::applyValue):
1293         (WebCore::ApplyPropertyColor::applyValue):
1294         (WebCore::ApplyPropertyLength::applyValue):
1295         (WebCore::ApplyPropertyString::applyValue):
1296         (WebCore::ApplyPropertyBorderRadius::applyValue):
1297         (WebCore::ApplyPropertyFillLayer::applyValue):
1298         (WebCore::ApplyPropertyComputeLength::applyValue):
1299         (WebCore::ApplyPropertyFont::applyValue):
1300         (WebCore::ApplyPropertyFontFamily::applyValue):
1301         (WebCore::ApplyPropertyFontSize::applyValue):
1302         (WebCore::ApplyPropertyFontWeight::applyValue):
1303         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
1304         (WebCore::ApplyPropertyCounter::applyValue):
1305         (WebCore::ApplyPropertyCursor::applyValue):
1306         (WebCore::ApplyPropertyTextAlign::applyValue):
1307         (WebCore::ApplyPropertyTextDecoration::applyValue):
1308         (WebCore::ApplyPropertyTextDecorationSkip::applyValue):
1309         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
1310         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
1311         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
1312         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
1313         (WebCore::ApplyPropertyLineHeight::applyValue):
1314         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
1315         (WebCore::ApplyPropertyWordSpacing::applyValue):
1316         (WebCore::ApplyPropertyPageSize::applyValue):
1317         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
1318         (WebCore::ApplyPropertyTextEmphasisPosition::applyValue):
1319         (WebCore::ApplyPropertyResize::applyValue):
1320         (WebCore::ApplyPropertyVerticalAlign::applyValue):
1321         (WebCore::ApplyPropertyAspectRatio::applyValue):
1322         (WebCore::ApplyPropertyZoom::applyValue):
1323         (WebCore::ApplyPropertyDisplay::applyValue):
1324         (WebCore::ApplyPropertyClipPath::applyValue):
1325         (WebCore::ApplyPropertyShape::applyValue):
1326         (WebCore::ApplyPropertyImageResolution::applyValue):
1327         (WebCore::ApplyPropertyTextIndent::applyValue):
1328         * css/MediaList.cpp:
1329         (WebCore::reportMediaQueryWarningIfNeeded):
1330         * css/MediaQueryEvaluator.cpp:
1331         (WebCore::compareAspectRatioValue):
1332         (WebCore::numberValue):
1333         (WebCore::orientationMediaFeatureEval):
1334         (WebCore::evalResolution):
1335         (WebCore::device_pixel_ratioMediaFeatureEval):
1336         (WebCore::resolutionMediaFeatureEval):
1337         (WebCore::computeLength):
1338         (WebCore::view_modeMediaFeatureEval):
1339         (WebCore::pointerMediaFeatureEval):
1340         * css/SVGCSSComputedStyleDeclaration.cpp:
1341         (WebCore::strokeDashArrayToCSSValueList):
1342         (WebCore::ComputedStyleExtractor::svgPropertyValue):
1343         * css/SVGCSSStyleSelector.cpp:
1344         (WebCore::StyleResolver::applySVGProperty):
1345         * css/SourceSizeList.cpp:
1346         (WebCore::computeLength):
1347         * css/StyleProperties.cpp:
1348         (WebCore::StyleProperties::getLayeredShorthandValue):
1349         * css/StyleResolver.cpp:
1350         (WebCore::extractDirectionAndWritingMode):
1351         (WebCore::createGridTrackSize):
1352         (WebCore::createGridTrackList):
1353         (WebCore::createGridPosition):
1354         (WebCore::StyleResolver::parseSnapCoordinate):
1355         (WebCore::StyleResolver::parseSnapPoints):
1356         (WebCore::StyleResolver::applyProperty):
1357         (WebCore::StyleResolver::styleImage):
1358         (WebCore::StyleResolver::generatedOrPendingFromValue):
1359         (WebCore::StyleResolver::createFilterOperations):
1360         * css/TransformFunctions.cpp:
1361         (WebCore::transformsForValue):
1362         * css/ViewportStyleResolver.cpp:
1363         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
1364         * css/WebKitCSSFilterValue.h:
1365         * css/WebKitCSSMatrix.cpp:
1366         (WebCore::WebKitCSSMatrix::setMatrixValue):
1367         * css/WebKitCSSTransformValue.h:
1368         (WebCore::toWebKitCSSTransformValue): Deleted.
1369         * editing/ApplyStyleCommand.cpp:
1370         (WebCore::ApplyStyleCommand::computedFontSize):
1371         * editing/EditingStyle.cpp:
1372         (WebCore::identifierForStyleProperty):
1373         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
1374         (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle):
1375         (WebCore::cssValueToRGBA):
1376         (WebCore::EditingStyle::extractFontSizeDelta):
1377         (WebCore::EditingStyle::textDirection):
1378         (WebCore::EditingStyle::prepareToApplyAt):
1379         (WebCore::EditingStyle::mergeStyle):
1380         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1381         (WebCore::EditingStyle::legacyFontSize):
1382         (WebCore::EditingStyle::textDirectionForSelection):
1383         (WebCore::StyleChange::extractTextStyles):
1384         (WebCore::diffTextDecorations):
1385         (WebCore::fontWeightIsBold):
1386         (WebCore::isTransparentColorValue):
1387         * editing/EditorCommand.cpp:
1388         (WebCore::executeToggleStyleInList):
1389         * editing/cocoa/HTMLConverter.mm:
1390         (stringFromCSSValue):
1391         (HTMLConverterCaches::floatPropertyValueForNode):
1392         (HTMLConverterCaches::colorPropertyValueForNode):
1393         * editing/markup.cpp:
1394         (WebCore::propertyMissingOrEqualToNone):
1395         * page/PageSerializer.cpp:
1396         (WebCore::PageSerializer::retrieveResourcesForProperties):
1397         * page/animation/CSSPropertyAnimation.cpp:
1398         (WebCore::blendFunc):
1399         * rendering/RenderTextControl.cpp:
1400         (WebCore::RenderTextControl::adjustInnerTextStyle):
1401         * rendering/style/StylePendingImage.h:
1402         (WebCore::StylePendingImage::cssImageValue):
1403         (WebCore::StylePendingImage::cssCursorImageValue):
1404         (WebCore::StylePendingImage::cssImageSetValue):
1405         * svg/SVGColor.h:
1406         * svg/SVGFontFaceElement.cpp:
1407         (WebCore::SVGFontFaceElement::rebuildFontFace):
1408         * svg/SVGPaint.h:
1409
1410 2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>
1411
1412         Clean up interface to Font::expansionOpportunityCount()
1413         https://bugs.webkit.org/show_bug.cgi?id=137355
1414
1415         Reviewed by Dean Jackson.
1416
1417         There are two overloads of Font::expansionOpportunityCount() which perform the same
1418         operation. One overload takes a UChar*, the other takes an LChar*, and they both
1419         take a length. This is the abstraction that StringView was designed to be. Instead
1420         of forcing each caller to take a different overload based on if their data is
1421         8 bit or not, allow the caller to construct a StringView and pass that into
1422         Font::expansionOpportunityCount() instead of a raw pointer/length.
1423
1424         No new tests because there is no behavior change.
1425
1426         * platform/graphics/Font.cpp:
1427         (WebCore::Font::expansionOpportunityCountInternal): Original two functions,
1428         renamed.
1429         (WebCore::Font::expansionOpportunityCount): Takes a StringView, calls 
1430         expansionOpportunityCountInternal().
1431         * platform/graphics/Font.h: Update signatures.
1432         * platform/graphics/WidthIterator.cpp:
1433         (WebCore::WidthIterator::WidthIterator): Use new signature to
1434         Font::expansionOpportunityCount().
1435         * platform/graphics/mac/ComplexTextController.cpp:
1436         (WebCore::ComplexTextController::ComplexTextController): Ditto.
1437         * rendering/RenderBlockLineLayout.cpp:
1438         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Ditto.
1439         * rendering/RenderText.cpp:
1440         (WebCore::RenderText::stringView): Accessor to encapsulate character pointer
1441         and length.
1442         * rendering/RenderText.h: Signature of new accessor.
1443
1444 2014-10-03  Brent Fulgham  <bfulgham@apple.com>
1445
1446         [Win] Unreviewed build fix for MSVC 2013 SP 3.
1447
1448         The std::array initializer is not fully implemented in SP3 and causes a
1449         build error.
1450
1451         * platform/graphics/transforms/AffineTransform.cpp: Use old style assignment
1452         initialization for MSVC builds until this bug is fixed.
1453
1454 2014-10-03  Tim Horton  <timothy_horton@apple.com>
1455
1456         WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
1457         https://bugs.webkit.org/show_bug.cgi?id=137383
1458         <rdar://problem/18535439>
1459
1460         Reviewed by Sam Weinig.
1461
1462         * rendering/RenderView.cpp:
1463         (WebCore::RenderView::paintBoxDecorations):
1464         Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.
1465
1466 2014-10-03  Dean Jackson  <dino@apple.com>
1467
1468         webkit-appearance: default-button styling does not set the button font color to white
1469         https://bugs.webkit.org/show_bug.cgi?id=137399
1470         rdar://problem/17788616
1471
1472         Reviewed by Dave Hyatt.
1473
1474         When a button is styled with -webkit-appearance: default-button, it should
1475         use the CSSValueActivebuttontext value for its text color when the window
1476         is active, and the normal value when the window is inactive.
1477
1478         Since activating (focus/blur) windows doesn't cause a style recalculation, this
1479         is applied as a paint-time operation. However, the render tree children that
1480         paint the text don't know that they are contained within a RenderButton
1481         and that the button is a default type. So I added an inherited flag, similar
1482         to what we use for visited links, to remember if we're in a button. And then
1483         computeTextPaintStyle chooses the correct value.
1484
1485         We can't test this because our LayoutTest system doesn't have
1486         an active window, and thus the default button renders like a normal
1487         button. This should cause no regressions though. Also, the appearance is
1488         protected behind an SPI (or Setting), so this is not exposed to the Web.
1489
1490         * rendering/RenderTheme.cpp:
1491         (WebCore::RenderTheme::adjustStyle): Set the flag if we're inside a default button.
1492         * rendering/TextPaintStyle.cpp:
1493         (WebCore::computeTextPaintStyle): If we're in a default button inside an active window,
1494         use the CSSValueActivebuttontext color.
1495         * rendering/style/RenderStyle.cpp:
1496         (WebCore::RenderStyle::RenderStyle): Add and expose the new inherited flag: ._insideDefaultButton.
1497         (WebCore::RenderStyle::changeRequiresRepaint): Ditto.
1498         * rendering/style/RenderStyle.h: Ditto.
1499
1500 2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
1501
1502         [SVG -> OTF Converter] Support non-BMP codepoints
1503         https://bugs.webkit.org/show_bug.cgi?id=137097
1504
1505         Reviewed by Darin Adler.
1506
1507         This patch has two pieces:
1508
1509         1) Moves write16(), overwrite32() and overwrite16() inside SVGToOTFFontConverter. This
1510         is so that we don't have to keep passing around references to m_result everywhere. Instead,
1511         put the output vector inside the class as an instance member variable. In addition, rename
1512         write32() and write16() to append32() and append16(), and provide a copy of append32 inside
1513         SVGToOTFFontConverter.
1514
1515         2) Change the "Codepoint" typedef to be a String, and rename it to Codepoints. This is so that
1516         we can implement ligatures later on. Update all the places that use this variable to work with
1517         a String of multiple codepoints.
1518
1519         This patch updates the CMAP table to use format 12 instead of format 4. It currently only maps
1520         single codepoints to glyph IDs and skips all multi-codepoint glyphs. We will implement
1521         ligatures in another patch.
1522
1523         Test: svg/custom/glyph-selection-non-bmp.svg
1524
1525         * svg/SVGToOTFFontConversion.cpp:
1526         (WebCore::append32): Append a result to a given vector. This is for the path transcoder.
1527         (WebCore::SVGToOTFFontConverter::releaseResult): WTF::move()'s the result.
1528         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Update to take Codepoints instead of Codepoint.
1529         (WebCore::SVGToOTFFontConverter::append32): Piece 1 above.
1530         (WebCore::SVGToOTFFontConverter::append16): Ditto.
1531         (WebCore::SVGToOTFFontConverter::append4ByteCode): Convenience function.
1532         (WebCore::SVGToOTFFontConverter::overwrite32): Piece 1 above.
1533         (WebCore::SVGToOTFFontConverter::overwrite16): Ditto.
1534         (WebCore::SVGToOTFFontConverter::appendCMAPTable): Update to format 12.
1535         (WebCore::SVGToOTFFontConverter::appendHEADTable): Passing in a result vector is no longer necessary.
1536         (WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto.
1537         (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto.
1538         (WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto.
1539         (WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto.
1540         (WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto.
1541         (WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto.
1542         (WebCore::isValidStringForCFF): Ditto.
1543         (WebCore::SVGToOTFFontConverter::appendCFFValidString): Ditto.
1544         (WebCore::SVGToOTFFontConverter::appendCFFTable): Ditto.
1545         (WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.
1546         (WebCore::SVGToOTFFontConverter::appendVHEATable): Ditto.
1547         (WebCore::SVGToOTFFontConverter::appendVMTXTable): Ditto.
1548         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Update for Codepoints.
1549         (WebCore::SVGToOTFFontConverter::addCodepoints): Ditto.
1550         (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
1551         (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Ditto.
1552         (WebCore::SVGToOTFFontConverter::appendKERNTable): Ditto.
1553         (WebCore::writeCFFEncodedNumber): Passing in a result vector is no longer necessary.
1554         (WebCore::SVGToOTFFontConverter::appendGlyphData): Update for Codepoints.
1555         (WebCore::SVGToOTFFontConverter::processGlyphElement): Update for Codepoints.
1556         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically): Comparing Codepoints
1557         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Update for Codepoints.
1558         (WebCore::SVGToOTFFontConverter::calculateChecksum): Passing in a result vector is no longer necessary.
1559         (WebCore::SVGToOTFFontConverter::appendTable): Ditto.
1560         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto.
1561         (WebCore::convertSVGToOTFFont): Move out of the result vector.
1562         (WebCore::write32): Deleted.
1563         (WebCore::write16): Deleted.
1564         (WebCore::overwrite32): Deleted.
1565         (WebCore::appendCFFValidString): Deleted.
1566         (WebCore::transcodeGlyphPaths): Deleted.
1567         (WebCore::calculateChecksum): Deleted.
1568
1569 2014-10-03  Commit Queue  <commit-queue@webkit.org>
1570
1571         Unreviewed, rolling out r174270.
1572         https://bugs.webkit.org/show_bug.cgi?id=137397
1573
1574         crashes on the bots (Requested by dethbakin on #webkit).
1575
1576         Reverted changeset:
1577
1578         "EventSender dispatches should be per-Document"
1579         https://bugs.webkit.org/show_bug.cgi?id=136051
1580         http://trac.webkit.org/changeset/174270
1581
1582 2014-10-03  Jer Noble  <jer.noble@apple.com>
1583
1584         [iOS] Back-to-back fullscreen videos result in incorrectly sized videos
1585         https://bugs.webkit.org/show_bug.cgi?id=137380
1586
1587         Reviewed by Eric Carlson.
1588
1589         During a normal workflow, a <video> element will create an AVPlayerLayer, then it will get a
1590         fullscreen (hosted) parent layer, then it will be told an explicit fullscreen size. But when
1591         a <video> element creates an AVPlayerLayer after the <video> element is already in
1592         fullscreen mode, it sets that AVPlayerLayer's frame using the size of the hosted parent
1593         layer, rather than the explicit fullscreen size. Instead, use the (already set) explicit
1594         fullscreen size after creating the AVPlayerLayer.
1595
1596         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1597         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerLayer):
1598         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
1599
1600 2014-10-03 Bear Travis <betravis@adobe.com>
1601
1602         REGRESSION (r173531): Use after free in WebCore::RenderStyle::fontMetrics /
1603         WebCore::CSSPrimitiveValue::computeLengthDouble
1604         https://bugs.webkit.org/show_bug.cgi?id=136864
1605
1606         Reviewed by Andreas Kling.
1607
1608         FontLoader previously called updateDocumentStyleIfNeeded,
1609         which would reset styles currently in use as part of
1610         the tabIndex calculation. The FontLoader should instead
1611         wait for pending stylesheets to load.
1612
1613         Tests: fast/css/fontloader-tab-index.html
1614
1615         * css/FontLoader.cpp:
1616         (WebCore::FontLoader::notifyWhenFontsReady): Do not immediately
1617         call loadingDone().
1618         (WebCore::FontLoader::loadingDone): Wait for stylesheets to
1619         finish loading rather than updating document styles.
1620         * css/FontLoader.h:
1621         (WebCore::FontLoader::loading): Include JS font loads when testing
1622         for the loading state.
1623
1624 2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>
1625
1626         Unreviewed build fix.
1627
1628         Fixing the Windows build after r174269.
1629
1630         * platform/graphics/win/UniscribeController.cpp:
1631         (WebCore::UniscribeController::shapeAndPlaceItem):
1632
1633 2014-10-01  Brian J. Burg  <burg@cs.washington.edu>
1634
1635         EventSender dispatches should be per-Document
1636         https://bugs.webkit.org/show_bug.cgi?id=136051
1637
1638         Reviewed by Andreas Kling.
1639
1640         EventSender uses a Timer to asynchronously dispatch the same event to multiple
1641         elements of the same type on a future run loop. However, we previously dispatched events
1642         to elements from any Document rather than the one that requested the event send.
1643
1644         This patch changes EventSender to be associated with a single Document. EventSenders
1645         for each Document are lazily allocated. Further per-Document or global optimizations
1646         are possible.
1647
1648         This change also lays the groundwork for making EventSender-related DOM events
1649         deterministic during web replay, tracked at <https://webkit.org/b/137090>.
1650
1651         No new tests, covered by fast/text/svg-font-trigger-load-event.html.
1652
1653         * CMakeLists.txt:
1654         * WebCore.vcxproj/WebCore.vcxproj:
1655         * WebCore.vcxproj/WebCore.vcxproj.filters:
1656         * WebCore.xcodeproj/project.pbxproj:
1657         * dom/DOMAllInOne.cpp:
1658         * dom/Document.cpp:
1659         (WebCore::Document::Document):
1660         (WebCore::Document::implicitClose):
1661         Dispatch pending events for this document only. Rename local variable f to frame.
1662
1663         * dom/Document.h:
1664         (WebCore::Document::sharedEventSenders):
1665         * dom/EventSender.h:
1666         (WebCore::EventSender::EventSender):
1667         (WebCore::EventSender::hasPendingEvents):
1668         (WebCore::EventSender<T>::dispatchEventSoon):
1669         (WebCore::EventSender<T>::cancelEvent):
1670         (WebCore::EventSender<T>::dispatchPendingEvents):
1671         (WebCore::EventSender<T>::EventSender): Deleted. The type argument was not necessary.
1672         * dom/SharedEventSenders.cpp: Added. Lazily creates event senders as they are requested.
1673         (WebCore::SharedEventSenders::linkLoadEventSender):
1674         (WebCore::SharedEventSenders::styleLoadEventSender):
1675         (WebCore::SharedEventSenders::imageBeforeloadEventSender):
1676         (WebCore::SharedEventSenders::imageLoadEventSender):
1677         (WebCore::SharedEventSenders::imageErrorEventSender):
1678         * dom/SharedEventSenders.h: Added.
1679         (WebCore::SharedEventSenders::SharedEventSenders):
1680         * html/HTMLLinkElement.cpp:
1681         (WebCore::HTMLLinkElement::~HTMLLinkElement):
1682         (WebCore::HTMLLinkElement::dispatchPendingEvent):
1683         (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
1684         (WebCore::linkLoadEventSender): Deleted.
1685         (WebCore::HTMLLinkElement::dispatchPendingLoadEvents): Deleted.
1686         * html/HTMLLinkElement.h:
1687         * html/HTMLStyleElement.cpp:
1688         (WebCore::HTMLStyleElement::~HTMLStyleElement):
1689         (WebCore::HTMLStyleElement::dispatchPendingEvent):
1690         (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
1691         (WebCore::styleLoadEventSender): Deleted.
1692         (WebCore::HTMLStyleElement::dispatchPendingLoadEvents): Deleted.
1693         * html/HTMLStyleElement.h:
1694         * loader/ImageLoader.cpp:
1695         (WebCore::ImageLoader::beforeLoadEventSender):
1696         (WebCore::ImageLoader::loadEventSender):
1697         (WebCore::ImageLoader::errorEventSender):
1698         (WebCore::ImageLoader::dispatchPendingEvent):
1699         (WebCore::beforeLoadEventSender): Deleted.
1700         (WebCore::loadEventSender): Deleted.
1701         (WebCore::errorEventSender): Deleted.
1702         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvents): Deleted.
1703         (WebCore::ImageLoader::dispatchPendingLoadEvents): Deleted.
1704         (WebCore::ImageLoader::dispatchPendingErrorEvents): Deleted.
1705         * loader/ImageLoader.h:
1706         * xml/parser/XMLDocumentParser.cpp:
1707         (WebCore::XMLDocumentParser::append): Remove an early call to the EventSender for image
1708         beforeload events. This was a performance optimization, but is no longer safe since the
1709         document (and thus the event sender) may not be available in a synchronous document write.
1710
1711 2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>
1712
1713         TextRun::length() should return an unsigned
1714         https://bugs.webkit.org/show_bug.cgi?id=137354
1715
1716         Reviewed by Antti Koivisto.
1717
1718         Currently, the m_len instance variable that backs the TextRun::length() function is
1719         an unsigned, but the length() function implicitly casts that to an int when
1720         returning it. This patch makes the function return an unsigned, and makes the
1721         do any casting if necessary.
1722
1723         No new tests because there is no behavior change.
1724
1725         * platform/graphics/Font.cpp:
1726         (WebCore::Font::drawText): Cast result to int.
1727         (WebCore::Font::drawEmphasisMarks): Ditto.
1728         (WebCore::Font::adjustSelectionRectForText): Ditto.
1729         (WebCore::computeUnderlineType): Update internal type to be unsigned.
1730         * platform/graphics/GlyphBuffer.h:
1731         (WebCore::GlyphBuffer::add): Update sentinel value to be unsigned.
1732         (WebCore::GlyphBuffer::saveOffsetsInString): Ditto.
1733         * platform/graphics/GraphicsContext.cpp: Update internal type to be unsigned.
1734         * platform/graphics/TextRun.h:
1735         (WebCore::TextRun::length): Update return type.
1736         (WebCore::TextRun::charactersLength): Ditto.
1737         * platform/graphics/WidthIterator.cpp:
1738         (WebCore::WidthIterator::advanceInternal): Cast result to int.
1739         * rendering/svg/SVGTextMetricsBuilder.cpp:
1740         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair): Remove
1741         unnecessary casts.
1742         (WebCore::SVGTextMetricsBuilder::advance): Ditto.
1743         * svg/SVGFontData.cpp:
1744         (WebCore::SVGFontData::applySVGGlyphSelection): Cast result to int.
1745
1746 2014-10-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1747
1748         [EFL] Fix build break since r174231 and r174256
1749         https://bugs.webkit.org/show_bug.cgi?id=137384
1750
1751         Unreviewed, EFL build fix.
1752
1753         r174231 and r174256 didn't consider EFL port and CoordinatedGraphics area.
1754
1755         * css/WebKitCSSViewportRule.cpp:
1756         (WebCore::WebKitCSSViewportRule::WebKitCSSViewportRule):
1757         * css/WebKitCSSViewportRule.h:
1758
1759 2014-10-03  Yusuke Suzuki  <utatane.tea@gmail.com>
1760
1761         CSS Selectors Level 4: Add parsing for :matches
1762         https://bugs.webkit.org/show_bug.cgi?id=137348
1763
1764         Reviewed by Benjamin Poulain.
1765
1766         Add initial parsing functionality of :matches pseudo class in Selectors Level 4.
1767         It accepts selector list as a parameter. It can contain pseudo elements.
1768         And now at the parsing phase, multiple pseudo elements are allowed.
1769         Currently :not doesn't accept any functional pseudo classes, :not(:matches(...)) is rejected.
1770         And currently, :matches(:visited, :link) is allowed in the parsing phase.
1771
1772         * css/CSSGrammar.y.in:
1773         * css/CSSParser.cpp:
1774         (WebCore::CSSParser::detectFunctionTypeToken):
1775         * css/CSSSelector.cpp:
1776         (WebCore::appendSelectorList):
1777         (WebCore::CSSSelector::selectorText):
1778         * css/CSSSelector.h:
1779         * css/SelectorChecker.cpp:
1780         (WebCore::SelectorChecker::checkOne):
1781         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1782         * cssjit/SelectorCompiler.cpp:
1783         (WebCore::SelectorCompiler::addPseudoClassType):
1784
1785 2014-10-02  Andreas Kling  <akling@apple.com>
1786
1787         CSSOM rule wrappers always have a corresponding internal style object.
1788         <https://webkit.org/b/137379>
1789
1790         Make the CSSOM rule wrapper classes use references & Ref instead of
1791         raw pointers and RefPtr for pointing to the internal style rule.
1792
1793         Also changed the signature of reattach() to take a StyleRuleBase&
1794         since it's never called with a null pointer.
1795
1796         Finally marked the rule classes final.
1797
1798         Reviewed by Geoffrey Garen.
1799
1800         * css/CSSCharsetRule.h:
1801         * css/CSSFontFaceRule.cpp:
1802         (WebCore::CSSFontFaceRule::CSSFontFaceRule):
1803         (WebCore::CSSFontFaceRule::reattach):
1804         * css/CSSFontFaceRule.h:
1805         (WebCore::CSSFontFaceRule::create): Deleted.
1806         * css/CSSGroupingRule.cpp:
1807         (WebCore::CSSGroupingRule::CSSGroupingRule):
1808         (WebCore::CSSGroupingRule::reattach):
1809         * css/CSSGroupingRule.h:
1810         * css/CSSImportRule.cpp:
1811         (WebCore::CSSImportRule::CSSImportRule):
1812         (WebCore::CSSImportRule::href):
1813         (WebCore::CSSImportRule::media):
1814         (WebCore::CSSImportRule::cssText):
1815         (WebCore::CSSImportRule::styleSheet):
1816         (WebCore::CSSImportRule::reattach):
1817         * css/CSSImportRule.h:
1818         (WebCore::CSSImportRule::create): Deleted.
1819         * css/CSSMediaRule.cpp:
1820         (WebCore::CSSMediaRule::CSSMediaRule):
1821         (WebCore::CSSMediaRule::mediaQueries):
1822         (WebCore::CSSMediaRule::reattach):
1823         * css/CSSMediaRule.h:
1824         (WebCore::CSSMediaRule::create): Deleted.
1825         * css/CSSPageRule.cpp:
1826         (WebCore::CSSPageRule::CSSPageRule):
1827         (WebCore::CSSPageRule::reattach):
1828         * css/CSSPageRule.h:
1829         (WebCore::CSSPageRule::create): Deleted.
1830         * css/CSSRule.h:
1831         * css/CSSStyleRule.cpp:
1832         (WebCore::CSSStyleRule::CSSStyleRule):
1833         (WebCore::CSSStyleRule::reattach):
1834         * css/CSSStyleRule.h:
1835         (WebCore::CSSStyleRule::create): Deleted.
1836         (WebCore::CSSStyleRule::styleRule): Deleted.
1837         * css/CSSStyleSheet.cpp:
1838         (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
1839         * css/CSSSupportsRule.cpp:
1840         (WebCore::CSSSupportsRule::CSSSupportsRule):
1841         (WebCore::CSSSupportsRule::conditionText):
1842         * css/CSSSupportsRule.h:
1843         (WebCore::CSSSupportsRule::create):
1844         * css/CSSUnknownRule.h:
1845         * css/StyleRule.cpp:
1846         (WebCore::StyleRuleBase::createCSSOMWrapper):
1847         * css/StyleRuleImport.h:
1848         (WebCore::StyleRuleImport::mediaQueries):
1849         * css/WebKitCSSKeyframeRule.cpp:
1850         (WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
1851         (WebCore::WebKitCSSKeyframeRule::reattach):
1852         * css/WebKitCSSKeyframeRule.h:
1853         * css/WebKitCSSKeyframesRule.cpp:
1854         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
1855         (WebCore::WebKitCSSKeyframesRule::item):
1856         (WebCore::WebKitCSSKeyframesRule::reattach):
1857         * css/WebKitCSSKeyframesRule.h:
1858         (WebCore::WebKitCSSKeyframesRule::create):
1859         * css/WebKitCSSRegionRule.cpp:
1860         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
1861         (WebCore::WebKitCSSRegionRule::cssText):
1862         * css/WebKitCSSRegionRule.h:
1863         (WebCore::WebKitCSSRegionRule::create):
1864         * css/WebKitCSSViewportRule.cpp:
1865         (WebCore::WebKitCSSViewportRule::reattach):
1866         * css/WebKitCSSViewportRule.h:
1867
1868 2014-10-02  Christophe Dumez  <cdumez@apple.com>
1869
1870         Use is<>() / downcast<>() for CSSRule subclasses
1871         https://bugs.webkit.org/show_bug.cgi?id=137364
1872
1873         Reviewed by Benjamin Poulain.
1874
1875         Use is<>() / downcast<>() functions for CSSRule subclasses.
1876
1877         No new tests, no behavior change.
1878
1879         * css/CSSFontFaceRule.h:
1880         * css/CSSImportRule.h:
1881         * css/CSSMediaRule.h:
1882         * css/CSSRule.h:
1883         * css/CSSStyleRule.h:
1884         * css/CSSSupportsRule.h:
1885         * css/InspectorCSSOMWrappers.cpp:
1886         (WebCore::InspectorCSSOMWrappers::collect):
1887         * css/WebKitCSSKeyframesRule.h:
1888         * css/WebKitCSSRegionRule.h:
1889         * inspector/InspectorCSSAgent.cpp:
1890         (WebCore::InspectorCSSAgent::asCSSStyleRule):
1891         (WebCore::InspectorCSSAgent::collectStyleSheets):
1892         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
1893         * inspector/InspectorStyleSheet.cpp:
1894         (WebCore::asCSSRuleList):
1895         (WebCore::fillMediaListChain):
1896         (WebCore::InspectorStyleSheet::addRule):
1897         (WebCore::InspectorStyleSheet::collectFlatRules):
1898         * page/PageSerializer.cpp:
1899         (WebCore::PageSerializer::serializeCSSStyleSheet):
1900
1901 2014-10-02  Dan Bernstein  <mitz@apple.com>
1902
1903         <rdar://problem/18531395> REGRESSION (r173272): Crash in ResourceResponse::platformSuggestedFilename() when called on the null response
1904         https://bugs.webkit.org/show_bug.cgi?id=137239
1905
1906         Reviewed by Pratik Solanki.
1907
1908         * platform/network/cf/ResourceResponseCFNet.cpp:
1909         (WebCore::ResourceResponse::platformSuggestedFilename): Return the null String if
1910         m_cfResponse is null.
1911
1912 2014-10-02  Andy Estes  <aestes@apple.com>
1913
1914         [iOS] Create an SPI wrapper for _UIHighlightView and use it in WKContentView
1915         https://bugs.webkit.org/show_bug.cgi?id=137370
1916
1917         Reviewed by Tim Horton.
1918
1919         Added _UIHighlightViewSPI.h. When building against the internal SDK it imports <UIKit/_UIHighlightView.h>. Otherwise, it redeclares the SPI we use in WebKit2.
1920
1921         * WebCore.xcodeproj/project.pbxproj:
1922         * platform/spi/ios/_UIHighlightViewSPI.h: Added.
1923
1924 2014-10-02  Benjamin Poulain  <benjamin@webkit.org>
1925
1926         CSS JIT: add the initial implementation of :nth-child(An+B of selector)
1927         https://bugs.webkit.org/show_bug.cgi?id=137285
1928
1929         Reviewed by Andreas Kling.
1930
1931         This patch adds the baseline support for JIT compiling :nth-child(An+B of selector).
1932
1933         The simple optimizations from the classic :nth-child() are carried over to :nth-child(An+B of selector),
1934         but the new code generation is pretty much left completely unoptimized.
1935
1936         The main challenge introduced with the new functional pseudo classes is the possibility of backtracking
1937         while already inside a backtracking chain.
1938
1939         For example:
1940             :nth-child(odd of a+a+a~a)+b+b~b
1941         has to backtrack the chain a+a+a while already in the backtracking chain b+b+b.
1942
1943         The easiest way to solve this would have been to have each subselector generate a new function.
1944         The generator for :nth-child() would simply call the function call for each sibling.
1945
1946         In the example, we would have:
1947             functionA(): a+a+a~a
1948             selectorChecker(): :nth-child(odd of functionA())+b+b~b
1949
1950         I decided against explicit functions because I believe the would be counterproductive for the common cases.
1951         I expect most use of :nth-child(of) to be done with a light filter without combinators, things like:
1952             :nth-child(odd of .class)
1953             :nth-child(odd of type.class)
1954             :nth-child(odd of type[attribute=value])
1955             etc.
1956
1957         For simple cases, inlining the internal filter will greatly simplify the generated code.
1958
1959         In this particular patch, the selector checkers are inlined, but we do not attempt to have good code generation.
1960         The optimizations will come later.
1961
1962         To implement backtracking in the subselectors, the backtracking implementation was abstracted into the structure
1963         BacktrackingLevel. Every time the code generator starts a new subselector, a new BacktrackingLevel is pushed onto
1964         the multilevel backtracking stack. The code generation always use the latest BacktrackingLevel for code generation
1965         until the subselector is finished, and code generation can continue with the existing state.
1966
1967         Tests: fast/selectors/nth-child-of-backtracking-adjacent-2.html
1968                fast/selectors/nth-child-of-backtracking-adjacent-optimized.html
1969                fast/selectors/nth-child-of-backtracking-adjacent.html
1970                fast/selectors/nth-child-of-boundaries-1.html
1971                fast/selectors/nth-child-of-boundaries-2.html
1972                fast/selectors/nth-child-of-boundaries-3.html
1973                fast/selectors/nth-child-of-chained-2.html
1974                fast/selectors/nth-child-of-has-parent.html
1975                fast/selectors/nth-child-of-never-matching-selector.html
1976                fast/selectors/nth-child-of-with-invalid-An+B.html
1977
1978         * cssjit/SelectorCompiler.cpp:
1979         (WebCore::SelectorCompiler::addPseudoClassType):
1980         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1981         (WebCore::SelectorCompiler::minimumRegisterRequirements):
1982         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
1983         Previously, we only needed stack space for the adjacent backtracking entry.
1984
1985         Now we can have several backtracking level active at the same time. We compute how much stack we need
1986         initially and each backtracking level take stack references as needed.
1987
1988         (WebCore::SelectorCompiler::computeBacktrackingInformation):
1989         The entire backtracking infrastructure already works great for multilevel backtracking. It is actually
1990         amazing how everything fits nicely together :)
1991
1992         The only addition here is logging facility in case we run into a bug.
1993
1994         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1995         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
1996         generateSelectorChecker() has handling for pseudo elements, which should not be used
1997         for :nth-child(of). The core generator was moved to generateSelectorCheckerExcludingPseudoElements()
1998         to be used for code generation of subselectors.
1999
2000         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
2001         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
2002         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
2003         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
2004         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
2005         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
2006         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
2007         The two main changes are:
2008         1) Adopt the BacktrackingLevel to handle multilevel generation.
2009         2) Descendant backtracking can use the stack if we have multi level descendant backtracking.
2010            In that case, we just use the stack like for adjacent backtracking.
2011
2012         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
2013         This is very similar to generateElementIsNthChild(). The main difference is we cannot use
2014         the cache in this case.
2015
2016         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2017         (WebCore::SelectorCompiler::nthFilterIsAlwaysSatisified):
2018         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2019         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):
2020
2021 2014-10-02  Pratik Solanki  <psolanki@apple.com>
2022
2023         [iOS] Networking process stops loading web pages while running Alexa test with random URL list
2024         https://bugs.webkit.org/show_bug.cgi?id=137362
2025         <rdar://problem/18507382>
2026
2027         Reviewed by Alexey Proskuryakov.
2028
2029         ResourceHandleCFURLConnectionDelegateWithOperationQueue needs to signal threads waiting on
2030         its semaphore when the handle is being destroyed. Otherwise, we can leave dispatch threads
2031         hanging around waiting for a response. This can happen when the Web Content process dies.
2032         Any thread/queue waiting on a response from that web process will leak and stay around
2033         forever. If we reach the dispatch queue limit of 64, then all networking will cease to
2034         happen in the Networking process. Fix this by signalling waiting threads and clearing out
2035         our state in much the same way that -[WebCoreResourceHandleAsOperationQueueDelegate
2036         detachHandle] does for Mac.
2037
2038         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
2039         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
2040         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::releaseHandle):
2041         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
2042
2043 2014-10-02  Christophe Dumez  <cdumez@apple.com>
2044
2045         Use is<>() / downcast<>() for CSSBasicShape objects
2046         https://bugs.webkit.org/show_bug.cgi?id=137331
2047
2048         Reviewed by Andreas Kling.
2049
2050         Use is<>() / downcast<>() for CSSBasicShape objects.
2051
2052         No new tests, no behavior change.
2053
2054         * css/BasicShapeFunctions.cpp:
2055         (WebCore::basicShapeForValue):
2056         * css/CSSBasicShapes.cpp:
2057         (WebCore::CSSBasicShapeCircle::equals):
2058         (WebCore::CSSBasicShapeEllipse::equals):
2059         (WebCore::CSSBasicShapePolygon::equals):
2060         (WebCore::CSSBasicShapeInset::equals):
2061         * css/CSSBasicShapes.h:
2062
2063 2014-10-02  Chris Dumez  <cdumez@apple.com>
2064
2065         XMLHttpRequestProgressEventThrottle shouldn't throttle / defer progress events if there are no listeners
2066         https://bugs.webkit.org/show_bug.cgi?id=137346
2067
2068         Reviewed by Alexey Proskuryakov.
2069
2070         Previously XMLHttpRequestProgressEventThrottle would throttle / defer
2071         progress events, which involves queueing events and starting timers,
2072         even if there were no listeners for those events (which is fairly
2073         common case).
2074
2075         This patch updates XMLHttpRequestProgressEventThrottle to make sure
2076         there are actual progress event listeners *before* attempting to
2077         throttle and do extra processing, to avoid doing unnecessary work.
2078
2079         This patch also makes XMLHttpRequestProgressEventThrottle::dispatchEvent()
2080         private as this method is only called from other dispatch methods of
2081         the class and never from the outside.
2082
2083         No new tests, no behavior change.
2084
2085         * xml/XMLHttpRequestProgressEventThrottle.cpp:
2086         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEvent):
2087         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchProgressEvent):
2088
2089 2014-10-01  Myles C. Maxfield  <mmaxfield@apple.com>
2090
2091         [Subpixel] Use floats instead of ints for text justification expansion
2092         https://bugs.webkit.org/show_bug.cgi?id=137327
2093
2094         Reviewed by Zalan Bujtas.
2095
2096         Use a float instead of an int for the expansion variable in InlineBox. The int was inside an inner class
2097         that held a collection of bitfields, and this patch removes that inner-inner variable.
2098
2099         No new tests because there is plenty of existing coverage and existing tests are rebaselined.
2100
2101         * rendering/InlineBox.cpp: Update static_assert for the size of InlineBox.
2102         * rendering/InlineBox.h: Use a float for the justification expansion amount instead of an int bitfield.
2103         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields): Remove int bitfield.
2104         (WebCore::InlineBox::InlineBox): Initialize float expansion.
2105         (WebCore::InlineBox::expansion): Return a float.
2106         (WebCore::InlineBox::setExpansion): Take a float.
2107         (WebCore::InlineBox::InlineBoxBitfields::expansion): Deleted. Moved to InlineBox.
2108         (WebCore::InlineBox::InlineBoxBitfields::setExpansion): Deleted. Ditto.
2109         * rendering/InlineTextBox.h:
2110         (WebCore::InlineTextBox::setExpansion): Take a float.
2111
2112 2014-10-02  Tim Horton  <timothy_horton@apple.com>
2113
2114         Move PageOverlay[Controller] to WebCore
2115         https://bugs.webkit.org/show_bug.cgi?id=137164
2116         <rdar://problem/18508258>
2117
2118         Reviewed by Anders Carlsson.
2119
2120         * CMakeLists.txt:
2121         * WebCore.vcxproj/WebCore.vcxproj:
2122         * WebCore.vcxproj/WebCore.vcxproj.filters:
2123         * WebCore.xcodeproj/project.pbxproj:
2124         Make the appropriate build system changes.
2125
2126         * WebCore.exp.in:
2127         Export the new PageOverlay[Controller] symbols from WebCore.
2128
2129         * loader/EmptyClients.h:
2130         * page/ChromeClient.h:
2131         (WebCore::ChromeClient::documentOverlayLayerForFrame): Deleted.
2132         Add attachViewOverlayGraphicsLayer, which allows PageOverlayController
2133         to push view-relative page overlay root layers down to WebKit to be
2134         installed just inside the view.
2135
2136         Remove documentOverlayLayerForFrame because RenderLayerCompositor can now
2137         talk directly to PageOverlayController.
2138
2139         * page/EventHandler.cpp:
2140         (WebCore::EventHandler::handleMousePressEvent):
2141         (WebCore::EventHandler::mouseMoved):
2142         (WebCore::EventHandler::handleMouseReleaseEvent):
2143         When the mouse is moved, pressed, or released, give PageOverlayController
2144         the first shot at handling the event.
2145
2146         * page/FrameView.cpp:
2147         (WebCore::FrameView::setFrameRect):
2148         Inform PageOverlayController that the main FrameView's size changed,
2149         so it can update the size of view-relative overlays.
2150
2151         (WebCore::FrameView::setContentsSize):
2152         Inform PageOverlayController that the main FrameView's contents size changed,
2153         so it can update the size of document-relative overlays.
2154
2155         (WebCore::FrameView::setFixedVisibleContentRect):
2156         (WebCore::FrameView::didChangeScrollOffset):
2157         (WebCore::FrameView::scrollTo):
2158         (WebCore::FrameView::wheelEvent):
2159         Inform PageOverlayController that something scrolled.
2160
2161         (WebCore::FrameView::setExposedRect):
2162         Inform PageOverlayController that the exposed rect changed, so it can push
2163         the new exposed rect down to the overlays.
2164
2165         * page/FrameView.h:
2166         Add didChangeScrollOffset.
2167
2168         * page/MainFrame.cpp:
2169         (WebCore::MainFrame::MainFrame):
2170         * page/MainFrame.h:
2171         Keep one PageOverlayController per MainFrame.
2172
2173         * page/Page.cpp:
2174         (WebCore::Page::setDeviceScaleFactor):
2175         Inform PageOverlayController that the device scale factor changed.
2176
2177         (WebCore::Page::setSessionID):
2178         Remove a blank line.
2179
2180         * page/PageOverlay.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp.
2181         Move PageOverlay from WebKit2 to WebCore.
2182         A few overarching changes that I won't detail in each place:
2183             - references instead of pointers in many places
2184             - WebCore types instead of WebKit2 types everywhere
2185
2186         (WebCore::PageOverlay::bounds):
2187         It is possible to install an overlay before we have a FrameView.
2188         We will eventually get a view/contents size changed notification and try again.
2189
2190         (WebCore::PageOverlay::copyAccessibilityAttributeStringValueForPoint):
2191         (WebCore::PageOverlay::copyAccessibilityAttributeBoolValueForPoint):
2192         (WebCore::PageOverlay::copyAccessibilityAttributeNames):
2193         Split copyAccessibilityAttribute into "StringValueForPoint" and "BoolValueForPoint"
2194         variants, because we don't have anything like WKTypeRef here.
2195
2196         * page/PageOverlay.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.h.
2197         Make PageOverlay a normal RefCounted object instead of a WebKit2 API object.
2198         Leave a comment noting that we should move the PageOverlay's GraphicsLayer
2199         to PageOverlay instead of a map on PageOverlayController.
2200
2201         * page/PageOverlayController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp.
2202         Move PageOverlayController from WebKit2 to WebCore.
2203         A few overarching changes that I won't detail in each place:
2204             - references instead of pointers in many places
2205             - WebCore types instead of WebKit2 types everywhere
2206
2207         Leave a FIXME that didChangeSettings is not currently called when settings change.
2208         This is not a problem for normal use of overlays, only for dynamically changing
2209         layer border/repaint counter settings.
2210
2211         (WebCore::PageOverlayController::PageOverlayController):
2212         (WebCore::PageOverlayController::createRootLayersIfNeeded):
2213         We will now lazily initialize the root layers when we first try to use them,
2214         because otherwise we try to create them before the ChromeClient's GraphicsLayerFactory
2215         is hooked up, in some cases, and that can cause us to create the wrong kind of GraphicsLayers.
2216
2217         (WebCore::PageOverlayController::installPageOverlay):
2218         Enter compositing mode when installing a PageOverlay.
2219         Avoid pushing the Page to the PageOverlay until after we've set up
2220         its root layer, so that the installation process can make use of that layer;
2221         clients may, for example, expect to be able to setNeedsDisplay() in the
2222         didMoveToPage callback.
2223         Avoid updateOverlayGeometry until the layer is created and we've pushed
2224         the Page down, so that e.g. bounds() will use the right Page.
2225
2226         (WebCore::PageOverlayController::didChangeSettings):
2227         Leave a FIXME about a future improvement to didChangeSettings.
2228
2229         (WebCore::PageOverlayController::deviceScaleFactor):
2230         (WebCore::PageOverlayController::notifyFlushRequired):
2231         Null-check Page; these can get called when tearing down the Frame.
2232
2233         * page/PageOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.h.
2234
2235         * platform/graphics/GraphicsLayerClient.h:
2236         Add wtf/Forward.h, because GraphicsLayerClient.h uses String.
2237
2238         * rendering/RenderLayer.cpp:
2239         (WebCore::RenderLayer::scrollTo):
2240         Inform PageOverlayController that something scrolled.
2241
2242         * rendering/RenderLayerCompositor.cpp:
2243         (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers):
2244         Make hasAnyAdditionalCompositedLayers return true if there are any page overlays,
2245         because we need to avoid falling out of compositing mode if we still have
2246         page overlays.
2247
2248         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2249         Enter compositing mode if we have page overlays.
2250
2251         (WebCore::RenderLayerCompositor::appendOverlayLayers): Deleted.
2252         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
2253         Rename appendOverlayLayers -> appendDocumentOverlayLayers.
2254
2255         (WebCore::RenderLayerCompositor::attachRootLayer):
2256         (WebCore::RenderLayerCompositor::detachRootLayer):
2257         Attach/detach the view overlay root layer when attaching/detaching the
2258         normal compositing root layer.
2259
2260         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
2261         * rendering/RenderLayerCompositor.h:
2262
2263 2014-10-02  Myles C. Maxfield  <mmaxfield@apple.com>
2264
2265         Back TextRun with a StringView
2266         https://bugs.webkit.org/show_bug.cgi?id=137352
2267
2268         Reviewed by Antti Koivisto.
2269
2270         TextRun contains a union of a UChar* and an LChar* as well as a length, which is the abstraction
2271         that StringView is intended to be. This patch cleans up TextRun by replacing the union and length
2272         with a StringView instance member.
2273
2274         No new tests because there is no behavior change.
2275
2276         * platform/graphics/TextRun.h:
2277         (WebCore::TextRun::TextRun):
2278         (WebCore::TextRun::subRun):
2279         (WebCore::TextRun::operator[]):
2280         (WebCore::TextRun::data8):
2281         (WebCore::TextRun::data16):
2282         (WebCore::TextRun::characters8):
2283         (WebCore::TextRun::characters16):
2284         (WebCore::TextRun::is8Bit):
2285         (WebCore::TextRun::length):
2286         (WebCore::TextRun::string):
2287         (WebCore::TextRun::setText):
2288         (WebCore::TextRun::stringView):
2289
2290 2014-10-01  Christophe Dumez  <cdumez@apple.com>
2291
2292         Have is<>(T*) function do a null check on the pointer argument
2293         https://bugs.webkit.org/show_bug.cgi?id=137333
2294
2295         Reviewed by Gavin Barraclough.
2296
2297         Have is<>(T*) function do a null check on the argument instead of a
2298         simple assertion. This makes sense for 2 reasons:
2299         1. It is more consistent with downcast<>(T*), which will succeed even
2300            if the argument is a nullptr.
2301         2. It simplifies the code a bit as it gets rid of a lot of explicit
2302            null checks.
2303
2304         No new tests, no behavior change.
2305
2306         * Modules/indexeddb/IDBFactory.cpp:
2307         * Modules/webaudio/OfflineAudioContext.cpp:
2308         (WebCore::OfflineAudioContext::create):
2309         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2310         (WebCore::ThreadableWebSocketChannel::create):
2311         * Modules/websockets/WebSocket.cpp:
2312         (WebCore::WebSocket::connect):
2313         * Modules/websockets/WebSocketHandshake.cpp:
2314         (WebCore::WebSocketHandshake::clientHandshakeMessage):
2315         * accessibility/AXObjectCache.cpp:
2316         (WebCore::AXObjectCache::focusedUIElementForPage):
2317         (WebCore::createFromRenderer):
2318         (WebCore::AXObjectCache::getOrCreate):
2319         (WebCore::AXObjectCache::handleLiveRegionCreated):
2320         (WebCore::AXObjectCache::handleAttributeChanged):
2321         (WebCore::AXObjectCache::labelChanged):
2322         (WebCore::AXObjectCache::rootAXEditableElement):
2323         (WebCore::isNodeAriaVisible):
2324         * accessibility/AccessibilityListBoxOption.cpp:
2325         (WebCore::AccessibilityListBoxOption::isEnabled):
2326         (WebCore::AccessibilityListBoxOption::isSelected):
2327         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
2328         (WebCore::AccessibilityListBoxOption::stringValue):
2329         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
2330         * accessibility/AccessibilityMediaControls.cpp:
2331         (WebCore::AccessibilityMediaTimeline::valueDescription):
2332         * accessibility/AccessibilityMenuListPopup.cpp:
2333         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
2334         * accessibility/AccessibilityNodeObject.cpp:
2335         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2336         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
2337         (WebCore::AccessibilityNodeObject::isNativeTextControl):
2338         (WebCore::AccessibilityNodeObject::isNativeImage):
2339         (WebCore::AccessibilityNodeObject::isInputImage):
2340         (WebCore::AccessibilityNodeObject::isEnabled):
2341         (WebCore::AccessibilityNodeObject::isPressed):
2342         (WebCore::AccessibilityNodeObject::isHovered):
2343         (WebCore::AccessibilityNodeObject::isReadOnly):
2344         (WebCore::AccessibilityNodeObject::isRequired):
2345         (WebCore::AccessibilityNodeObject::valueForRange):
2346         (WebCore::AccessibilityNodeObject::maxValueForRange):
2347         (WebCore::AccessibilityNodeObject::minValueForRange):
2348         (WebCore::AccessibilityNodeObject::isControl):
2349         (WebCore::AccessibilityNodeObject::anchorElement):
2350         (WebCore::isNodeActionElement):
2351         (WebCore::AccessibilityNodeObject::mouseButtonListener):
2352         (WebCore::AccessibilityNodeObject::labelForElement):
2353         (WebCore::AccessibilityNodeObject::titleElementText):
2354         (WebCore::AccessibilityNodeObject::alternativeText):
2355         (WebCore::AccessibilityNodeObject::visibleText):
2356         (WebCore::AccessibilityNodeObject::accessibilityDescription):
2357         (WebCore::AccessibilityNodeObject::helpText):
2358         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
2359         (WebCore::AccessibilityNodeObject::textUnderElement):
2360         (WebCore::AccessibilityNodeObject::title):
2361         (WebCore::AccessibilityNodeObject::colorValue):
2362         (WebCore::accessibleNameForNode):
2363         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2364         * accessibility/AccessibilityObject.cpp:
2365         (WebCore::AccessibilityObject::press):
2366         (WebCore::AccessibilityObject::hasTagName):
2367         (WebCore::AccessibilityObject::hasAttribute):
2368         (WebCore::AccessibilityObject::element):
2369         (WebCore::AccessibilityObject::classList):
2370         * accessibility/AccessibilityRenderObject.cpp:
2371         (WebCore::AccessibilityRenderObject::isFileUploadButton):
2372         (WebCore::AccessibilityRenderObject::anchorElement):
2373         (WebCore::AccessibilityRenderObject::helpText):
2374         (WebCore::AccessibilityRenderObject::labelElementContainer):
2375         (WebCore::AccessibilityRenderObject::internalLinkElement):
2376         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
2377         (WebCore::AccessibilityRenderObject::titleUIElement):
2378         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2379         (WebCore::AccessibilityRenderObject::accessKey):
2380         (WebCore::AccessibilityRenderObject::url):
2381         (WebCore::AccessibilityRenderObject::setElementAttributeValue):
2382         (WebCore::AccessibilityRenderObject::setFocused):
2383         (WebCore::AccessibilityRenderObject::setValue):
2384         (WebCore::AccessibilityRenderObject::getDocumentLinks):
2385         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
2386         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
2387         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
2388         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
2389         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2390         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
2391         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
2392         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
2393         (WebCore::AccessibilityRenderObject::setAccessibleName):
2394         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
2395         (WebCore::AccessibilityRenderObject::isLinked):
2396         (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
2397         (WebCore::AccessibilityRenderObject::isMathElement):
2398         * accessibility/AccessibilitySearchFieldButtons.cpp:
2399         (WebCore::AccessibilitySearchFieldCancelButton::press):
2400         * accessibility/AccessibilityTable.cpp:
2401         (WebCore::AccessibilityTable::tableElement):
2402         (WebCore::AccessibilityTable::isDataTable):
2403         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
2404         (WebCore::AccessibilityTable::title):
2405         * accessibility/atk/AXObjectCacheAtk.cpp:
2406         (WebCore::notifyChildrenSelectionChange):
2407         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2408         (webkitAccessibleTableGetCaption):
2409         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2410         (webkitAccessibleGetName):
2411         (webkitAccessibleGetDescription):
2412         (webkitAccessibleGetAttributes):
2413         * bindings/gobject/WebKitDOMPrivate.cpp:
2414         (WebKit::wrap):
2415         * bindings/js/JSAudioContextCustom.cpp:
2416         (WebCore::constructJSAudioContext):
2417         * bindings/js/JSDOMGlobalObject.cpp:
2418         (WebCore::toJSDOMGlobalObject):
2419         * bindings/js/JSDOMWindowCustom.cpp:
2420         (WebCore::namedItemGetter):
2421         (WebCore::JSDOMWindow::getOwnPropertySlot):
2422         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2423         * bindings/js/JSElementCustom.cpp:
2424         (WebCore::toJSNewlyCreated):
2425         * bindings/js/JSErrorHandler.cpp:
2426         (WebCore::JSErrorHandler::handleEvent):
2427         * bindings/js/JSEventListener.cpp:
2428         (WebCore::JSEventListener::handleEvent):
2429         * bindings/js/JSHTMLDocumentCustom.cpp:
2430         (WebCore::JSHTMLDocument::nameGetter):
2431         * bindings/js/JSLazyEventListener.cpp:
2432         (WebCore::JSLazyEventListener::initializeJSFunction):
2433         * bindings/js/JSNodeCustom.cpp:
2434         (WebCore::isReachableFromDOM):
2435         (WebCore::createWrapperInline):
2436         * bindings/js/ScheduledAction.cpp:
2437         (WebCore::ScheduledAction::execute):
2438         * bindings/js/ScriptState.cpp:
2439         (WebCore::frameFromExecState):
2440         * bindings/objc/DOM.mm:
2441         (kitClass):
2442         * css/CSSCursorImageValue.cpp:
2443         (WebCore::resourceReferencedByCursorElement):
2444         * css/CSSStyleSheet.cpp:
2445         (WebCore::isAcceptableCSSStyleSheetParent):
2446         * css/SelectorChecker.cpp:
2447         (WebCore::SelectorChecker::checkOne):
2448         * css/SelectorCheckerTestFunctions.h:
2449         (WebCore::isAutofilled):
2450         (WebCore::isDisabled):
2451         (WebCore::isEnabled):
2452         (WebCore::isChecked):
2453         (WebCore::matchesLangPseudoClass):
2454         (WebCore::matchesFutureCuePseudoClass):
2455         (WebCore::matchesPastCuePseudoClass):
2456         * css/StyleResolver.cpp:
2457         (WebCore::StyleResolver::State::initElement):
2458         (WebCore::StyleResolver::locateCousinList):
2459         (WebCore::elementHasDirectionAuto):
2460         (WebCore::StyleResolver::canShareStyleWithElement):
2461         (WebCore::StyleResolver::findSiblingForStyleSharing):
2462         (WebCore::StyleResolver::adjustRenderStyle):
2463         (WebCore::StyleResolver::useSVGZoomRulesForLength):
2464         * css/StyleSheetList.cpp:
2465         (WebCore::StyleSheetList::getNamedItem):
2466         * dom/Attr.cpp:
2467         (WebCore::Attr::style):
2468         * dom/CharacterData.cpp:
2469         (WebCore::CharacterData::parserAppendData):
2470         (WebCore::CharacterData::setDataAndUpdate):
2471         * dom/ContainerNode.cpp:
2472         (WebCore::checkAcceptChild):
2473         (WebCore::ContainerNode::notifyChildRemoved):
2474         * dom/ContainerNodeAlgorithms.cpp:
2475         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
2476         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
2477         * dom/CurrentScriptIncrementer.h:
2478         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
2479         * dom/DataTransfer.cpp:
2480         (WebCore::DataTransfer::setDragImage):
2481         * dom/Document.cpp:
2482         (WebCore::Document::elementFromPoint):
2483         (WebCore::Document::setTitle):
2484         (WebCore::Document::iconURLs):
2485         (WebCore::eventTargetElementForDocument):
2486         (WebCore::Document::updateHoverActiveState):
2487         * dom/DocumentStyleSheetCollection.cpp:
2488         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2489         * dom/Element.cpp:
2490         (WebCore::Element::computeInheritedLanguage):
2491         * dom/Element.h:
2492         (WebCore::Node::parentElement):
2493         * dom/ElementTraversal.h:
2494         (WebCore::Traversal<Element>::nextTemplate):
2495         (WebCore::ElementTraversal::previousIncludingPseudo):
2496         (WebCore::ElementTraversal::nextIncludingPseudo):
2497         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
2498         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
2499         * dom/EventDispatcher.cpp:
2500         (WebCore::WindowEventContext::WindowEventContext):
2501         (WebCore::EventDispatcher::dispatchEvent):
2502         (WebCore::nodeOrHostIfPseudoElement):
2503         (WebCore::EventPath::EventPath):
2504         * dom/EventTarget.cpp:
2505         (WebCore::EventTarget::fireEventListeners):
2506         * dom/KeyboardEvent.cpp:
2507         (WebCore::findKeyboardEvent):
2508         * dom/LiveNodeList.cpp:
2509         (WebCore::LiveNodeList::namedItem):
2510         * dom/MessagePort.cpp:
2511         (WebCore::MessagePort::dispatchMessages):
2512         * dom/MouseEvent.cpp:
2513         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
2514         * dom/NamedNodeMap.cpp:
2515         (WebCore::NamedNodeMap::setNamedItem):
2516         * dom/Node.cpp:
2517         (WebCore::Node::dumpStatistics):
2518         (WebCore::Node::pseudoAwarePreviousSibling):
2519         (WebCore::Node::pseudoAwareNextSibling):
2520         (WebCore::Node::computedStyle):
2521         (WebCore::Node::parentOrShadowHostElement):
2522         (WebCore::Node::rootEditableElement):
2523         (WebCore::Node::ancestorElement):
2524         (WebCore::Node::compareDocumentPosition):
2525         (WebCore::appendAttributeDesc):
2526         (WebCore::Node::showNodePathForThis):
2527         (WebCore::Node::enclosingLinkEventParentOrSelf):
2528         (WebCore::Node::dispatchEvent):
2529         (WebCore::Node::defaultEventHandler):
2530         * dom/NodeRenderingTraversal.cpp:
2531         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
2532         (WebCore::NodeRenderingTraversal::traverseParent):
2533         * dom/NodeTraversal.cpp:
2534         (WebCore::NodeTraversal::previousIncludingPseudo):
2535         (WebCore::NodeTraversal::nextIncludingPseudo):
2536         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
2537         * dom/Position.cpp:
2538         (WebCore::Position::element):
2539         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
2540         (WebCore::Position::isRenderedCharacter):
2541         (WebCore::Position::leadingWhitespacePosition):
2542         * dom/Range.cpp:
2543         (WebCore::Range::insertNode):
2544         (WebCore::Range::getBorderAndTextQuads):
2545         * dom/ScriptElement.cpp:
2546         (WebCore::toScriptElementIfPossible):
2547         * dom/ShadowRoot.h:
2548         (WebCore::Node::parentOrShadowHostNode):
2549         * dom/Text.cpp:
2550         (WebCore::earliestLogicallyAdjacentTextNode):
2551         (WebCore::latestLogicallyAdjacentTextNode):
2552         (WebCore::isSVGShadowText):
2553         * dom/TextNodeTraversal.cpp:
2554         (WebCore::TextNodeTraversal::contentsAsString):
2555         * dom/TextNodeTraversal.h:
2556         (WebCore::TextNodeTraversal::firstTextChildTemplate):
2557         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
2558         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
2559         (WebCore::TextNodeTraversal::nextSibling):
2560         * dom/TreeScopeAdopter.cpp:
2561         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2562         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2563         * editing/ApplyBlockElementCommand.cpp:
2564         (WebCore::isNewLineAtPosition):
2565         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
2566         * editing/ApplyStyleCommand.cpp:
2567         (WebCore::isLegacyAppleStyleSpan):
2568         (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
2569         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
2570         (WebCore::isEmptyFontTag):
2571         (WebCore::ApplyStyleCommand::applyBlockStyle):
2572         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2573         (WebCore::dummySpanAncestorForNode):
2574         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
2575         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2576         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
2577         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
2578         (WebCore::ApplyStyleCommand::splitTextAtEnd):
2579         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
2580         (WebCore::ApplyStyleCommand::shouldSplitTextElement):
2581         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
2582         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
2583         (WebCore::ApplyStyleCommand::joinChildTextNodes):
2584         * editing/BreakBlockquoteCommand.cpp:
2585         (WebCore::BreakBlockquoteCommand::doApply):
2586         * editing/CompositeEditCommand.cpp:
2587         (WebCore::CompositeEditCommand::isRemovableBlock):
2588         (WebCore::CompositeEditCommand::insertNodeAt):
2589         (WebCore::CompositeEditCommand::canRebalance):
2590         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
2591         (WebCore::CompositeEditCommand::deleteInsignificantText):
2592         (WebCore::CompositeEditCommand::removePlaceholderAt):
2593         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
2594         (WebCore::CompositeEditCommand::moveParagraphs):
2595         * editing/DeleteButtonController.cpp:
2596         (WebCore::enclosingDeletableElement):
2597         * editing/DeleteSelectionCommand.cpp:
2598         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2599         (WebCore::DeleteSelectionCommand::fixupWhitespace):
2600         (WebCore::DeleteSelectionCommand::doApply):
2601         * editing/EditingStyle.cpp:
2602         (WebCore::EditingStyle::wrappingStyleForSerialization):
2603         * editing/Editor.cpp:
2604         (WebCore::imageElementFromImageDocument):
2605         (WebCore::Editor::shouldInsertFragment):
2606         (WebCore::Editor::setBaseWritingDirection):
2607         (WebCore::Editor::setComposition):
2608         (WebCore::Editor::isSpellCheckingEnabledFor):
2609         (WebCore::Editor::applyEditingStyleToElement):
2610         * editing/FormatBlockCommand.cpp:
2611         (WebCore::isElementForFormatBlock):
2612         * editing/FrameSelection.cpp:
2613         (WebCore::removingNodeRemovesPosition):
2614         (WebCore::CaretBase::paintCaret):
2615         (WebCore::FrameSelection::debugRenderer):
2616         (WebCore::FrameSelection::selectAll):
2617         (WebCore::scanForForm):
2618         * editing/InsertLineBreakCommand.cpp:
2619         (WebCore::InsertLineBreakCommand::doApply):
2620         * editing/InsertListCommand.cpp:
2621         (WebCore::InsertListCommand::mergeWithNeighboringLists):
2622         * editing/InsertParagraphSeparatorCommand.cpp:
2623         (WebCore::InsertParagraphSeparatorCommand::doApply):
2624         * editing/InsertTextCommand.cpp:
2625         (WebCore::InsertTextCommand::insertTab):
2626         * editing/ReplaceSelectionCommand.cpp:
2627         (WebCore::haveSameTagName):
2628         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2629         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
2630         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
2631         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
2632         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
2633         (WebCore::ReplaceSelectionCommand::insertAsListItems):
2634         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
2635         * editing/SpellChecker.cpp:
2636         (WebCore::SpellChecker::isCheckable):
2637         * editing/SplitTextNodeContainingElementCommand.cpp:
2638         (WebCore::SplitTextNodeContainingElementCommand::doApply):
2639         * editing/TextIterator.cpp:
2640         (WebCore::isRendererReplacedElement):
2641         * editing/VisibleSelection.cpp:
2642         (WebCore::VisibleSelection::isInPasswordField):
2643         * editing/VisibleUnits.cpp:
2644         (WebCore::startPositionForLine):
2645         (WebCore::endPositionForLine):
2646         (WebCore::startOfParagraph):
2647         (WebCore::endOfParagraph):
2648         * editing/cocoa/HTMLConverter.mm:
2649         (HTMLConverter::aggregatedAttributesForAncestors):
2650         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
2651         (WebCore::editingAttributedStringFromRange):
2652         * editing/htmlediting.cpp:
2653         (WebCore::enclosingBlock):
2654         (WebCore::enclosingElementWithTag):
2655         (WebCore::enclosingAnchorElement):
2656         (WebCore::enclosingList):
2657         (WebCore::lineBreakExistsAtPosition):
2658         (WebCore::areIdenticalElements):
2659         (WebCore::isNonTableCellHTMLBlockElement):
2660         (WebCore::deprecatedEnclosingBlockFlowElement):
2661         * editing/ios/EditorIOS.mm:
2662         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2663         * editing/markup.cpp:
2664         (WebCore::StyledMarkupAccumulator::appendText):
2665         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
2666         (WebCore::isPlainTextMarkup):
2667         * fileapi/FileReader.cpp:
2668         (WebCore::FileReader::readAsArrayBuffer):
2669         (WebCore::FileReader::readAsBinaryString):
2670         (WebCore::FileReader::readAsText):
2671         (WebCore::FileReader::readAsDataURL):
2672         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
2673         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
2674         * html/FTPDirectoryDocument.cpp:
2675         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
2676         * html/FormAssociatedElement.cpp:
2677         (WebCore::FormAssociatedElement::findAssociatedForm):
2678         * html/HTMLAnchorElement.cpp:
2679         (WebCore::appendServerMapMousePosition):
2680         (WebCore::HTMLAnchorElement::defaultEventHandler):
2681         (WebCore::HTMLAnchorElement::eventType):
2682         (WebCore::isEnterKeyKeydownEvent):
2683         (WebCore::isLinkClick):
2684         * html/HTMLAreaElement.cpp:
2685         (WebCore::HTMLAreaElement::imageElement):
2686         * html/HTMLBodyElement.cpp:
2687         (WebCore::HTMLBodyElement::insertedInto):
2688         * html/HTMLButtonElement.cpp:
2689         (WebCore::HTMLButtonElement::defaultEventHandler):
2690         * html/HTMLCollection.cpp:
2691         (WebCore::HTMLCollection::namedItem):
2692         (WebCore::HTMLCollection::updateNamedElementCache):
2693         * html/HTMLDocument.cpp:
2694         (WebCore::HTMLDocument::bgColor):
2695         (WebCore::HTMLDocument::setBgColor):
2696         (WebCore::HTMLDocument::fgColor):
2697         (WebCore::HTMLDocument::setFgColor):
2698         (WebCore::HTMLDocument::alinkColor):
2699         (WebCore::HTMLDocument::setAlinkColor):
2700         (WebCore::HTMLDocument::linkColor):
2701         (WebCore::HTMLDocument::setLinkColor):
2702         (WebCore::HTMLDocument::vlinkColor):
2703         (WebCore::HTMLDocument::setVlinkColor):
2704         (WebCore::HTMLDocument::isFrameSet):
2705         * html/HTMLElement.cpp:
2706         (WebCore::HTMLElement::matchesReadWritePseudoClass):
2707         (WebCore::mergeWithNextTextNode):
2708         (WebCore::HTMLElement::setOuterHTML):
2709         (WebCore::HTMLElement::setOuterText):
2710         (WebCore::HTMLElement::insertAdjacentElement):
2711         (WebCore::contextElementForInsertion):
2712         (WebCore::HTMLElement::directionality):
2713         (WebCore::HTMLElement::dirAttributeChanged):
2714         * html/HTMLEmbedElement.cpp:
2715         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2716         * html/HTMLFieldSetElement.cpp:
2717         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
2718         (WebCore::HTMLFieldSetElement::disabledStateChanged):
2719         * html/HTMLFormControlElement.cpp:
2720         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
2721         (WebCore::shouldAutofocus):
2722         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
2723         * html/HTMLFormElement.cpp:
2724         (WebCore::HTMLFormElement::rendererIsNeeded):
2725         (WebCore::HTMLFormElement::submitImplicitly):
2726         (WebCore::submitElementFromEvent):
2727         (WebCore::HTMLFormElement::validateInteractively):
2728         (WebCore::HTMLFormElement::submit):
2729         (WebCore::HTMLFormElement::reset):
2730         (WebCore::HTMLFormElement::defaultButton):
2731         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
2732         * html/HTMLFrameOwnerElement.cpp:
2733         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
2734         * html/HTMLFrameSetElement.cpp:
2735         (WebCore::HTMLFrameSetElement::defaultEventHandler):
2736         * html/HTMLInputElement.cpp:
2737         (WebCore::HTMLInputElement::defaultEventHandler):
2738         (WebCore::HTMLInputElement::dataList):
2739         * html/HTMLLabelElement.cpp:
2740         (WebCore::nodeAsSupportedLabelableElement):
2741         * html/HTMLLegendElement.cpp:
2742         (WebCore::HTMLLegendElement::virtualForm):
2743         * html/HTMLMediaElement.cpp:
2744         (WebCore::HTMLMediaElement::parseAttribute):
2745         * html/HTMLObjectElement.cpp:
2746         (WebCore::HTMLObjectElement::hasFallbackContent):
2747         (WebCore::HTMLObjectElement::updateDocNamedItem):
2748         * html/HTMLOptGroupElement.cpp:
2749         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
2750         (WebCore::HTMLOptGroupElement::ownerSelectElement):
2751         * html/HTMLOptionElement.cpp:
2752         (WebCore::HTMLOptionElement::setText):
2753         (WebCore::HTMLOptionElement::index):
2754         (WebCore::HTMLOptionElement::ownerDataListElement):
2755         (WebCore::HTMLOptionElement::ownerSelectElement):
2756         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
2757         (WebCore::HTMLOptionElement::isDisabledFormControl):
2758         (WebCore::HTMLOptionElement::collectOptionInnerText):
2759         * html/HTMLPlugInImageElement.cpp:
2760         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
2761         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
2762         * html/HTMLScriptElement.cpp:
2763         (WebCore::HTMLScriptElement::setText):
2764         * html/HTMLSelectElement.cpp:
2765         (WebCore::HTMLSelectElement::nextValidIndex):
2766         (WebCore::HTMLSelectElement::saveLastSelection):
2767         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
2768         (WebCore::HTMLSelectElement::updateListBoxSelection):
2769         (WebCore::HTMLSelectElement::listBoxOnChange):
2770         (WebCore::HTMLSelectElement::recalcListItems):
2771         (WebCore::HTMLSelectElement::selectedIndex):
2772         (WebCore::HTMLSelectElement::selectOption):
2773         (WebCore::HTMLSelectElement::optionToListIndex):
2774         (WebCore::HTMLSelectElement::listToOptionIndex):
2775         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
2776         (WebCore::HTMLSelectElement::saveFormControlState):
2777         (WebCore::HTMLSelectElement::searchOptionsForValue):
2778         (WebCore::HTMLSelectElement::restoreFormControlState):
2779         (WebCore::HTMLSelectElement::appendFormData):
2780         (WebCore::HTMLSelectElement::reset):
2781         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2782         (WebCore::HTMLSelectElement::updateSelectedState):
2783         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2784         (WebCore::HTMLSelectElement::defaultEventHandler):
2785         (WebCore::HTMLSelectElement::lastSelectedListIndex):
2786         (WebCore::HTMLSelectElement::optionAtIndex):
2787         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
2788         (WebCore::HTMLSelectElement::length):
2789         * html/HTMLSourceElement.cpp:
2790         (WebCore::HTMLSourceElement::insertedInto):
2791         (WebCore::HTMLSourceElement::removedFrom):
2792         * html/HTMLSummaryElement.cpp:
2793         (WebCore::isClickableControl):
2794         (WebCore::HTMLSummaryElement::defaultEventHandler):
2795         * html/HTMLTableElement.cpp:
2796         (WebCore::HTMLTableElement::caption):
2797         * html/HTMLTablePartElement.cpp:
2798         (WebCore::HTMLTablePartElement::findParentTable):
2799         * html/HTMLTableRowElement.cpp:
2800         (WebCore::HTMLTableRowElement::rowIndex):
2801         * html/HTMLTableRowsCollection.cpp:
2802         (WebCore::HTMLTableRowsCollection::rowAfter):
2803         (WebCore::HTMLTableRowsCollection::lastRow):
2804         * html/HTMLTextAreaElement.cpp:
2805         (WebCore::HTMLTextAreaElement::defaultEventHandler):
2806         * html/HTMLTextFormControlElement.cpp:
2807         (WebCore::HTMLTextFormControlElement::innerTextValue):
2808         (WebCore::positionForIndex):
2809         (WebCore::HTMLTextFormControlElement::indexForPosition):
2810         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
2811         * html/HTMLTitleElement.cpp:
2812         (WebCore::HTMLTitleElement::setText):
2813         * html/HTMLTrackElement.cpp:
2814         (WebCore::HTMLTrackElement::mediaElement):
2815         * html/ImageDocument.cpp:
2816         (WebCore::ImageEventListener::handleEvent):
2817         * html/InputType.cpp:
2818         (WebCore::InputType::shouldSubmitImplicitly):
2819         * html/MediaDocument.cpp:
2820         (WebCore::ancestorVideoElement):
2821         (WebCore::MediaDocument::defaultEventHandler):
2822         * html/RadioInputType.cpp:
2823         (WebCore::RadioInputType::handleKeydownEvent):
2824         (WebCore::RadioInputType::isKeyboardFocusable):
2825         * html/TextFieldInputType.cpp:
2826         (WebCore::TextFieldInputType::shouldSubmitImplicitly):
2827         * html/parser/HTMLConstructionSite.cpp:
2828         (WebCore::hasImpliedEndTag):
2829         (WebCore::HTMLConstructionSite::attachLater):
2830         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
2831         (WebCore::HTMLConstructionSite::insertTextNode):
2832         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
2833         (WebCore::HTMLConstructionSite::findFosterSite):
2834         * html/parser/HTMLElementStack.cpp:
2835         (WebCore::HTMLNames::isScopeMarker):
2836         (WebCore::HTMLNames::isTableScopeMarker):
2837         (WebCore::HTMLNames::isSelectScopeMarker):
2838         * html/parser/HTMLTreeBuilder.cpp:
2839         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2840         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2841         (WebCore::HTMLTreeBuilder::processStartTag):
2842         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
2843         (WebCore::HTMLTreeBuilder::processEndTag):
2844         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
2845         * html/shadow/InsertionPoint.h:
2846         (WebCore::isActiveInsertionPoint):
2847         (WebCore::parentNodeForDistribution):
2848         (WebCore::parentElementForDistribution):
2849         * html/shadow/MediaControlElementTypes.cpp:
2850         (WebCore::parentMediaElement):
2851         (WebCore::mediaControlElementType):
2852         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
2853         * html/shadow/MediaControlElements.cpp:
2854         (WebCore::MediaControlPanelElement::defaultEventHandler):
2855         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
2856         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
2857         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2858         * html/shadow/MediaControls.cpp:
2859         (WebCore::MediaControls::containsRelatedTarget):
2860         * html/shadow/MediaControlsApple.cpp:
2861         (WebCore::MediaControlsAppleEventListener::handleEvent):
2862         * html/shadow/SliderThumbElement.cpp:
2863         (WebCore::SliderThumbElement::defaultEventHandler):
2864         * html/shadow/SpinButtonElement.cpp:
2865         (WebCore::SpinButtonElement::defaultEventHandler):
2866         (WebCore::SpinButtonElement::forwardEvent):
2867         * html/shadow/TextControlInnerElements.cpp:
2868         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
2869         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
2870         * html/track/VTTCue.cpp:
2871         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
2872         (WebCore::VTTCue::markFutureAndPastNodes):
2873         * inspector/InspectorCSSAgent.cpp:
2874         (WebCore::InspectorCSSAgent::elementForId):
2875         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2876         * inspector/InspectorDOMAgent.cpp:
2877         (WebCore::InspectorDOMAgent::unbind):
2878         (WebCore::InspectorDOMAgent::assertDocument):
2879         (WebCore::InspectorDOMAgent::assertElement):
2880         (WebCore::InspectorDOMAgent::querySelector):
2881         (WebCore::InspectorDOMAgent::querySelectorAll):
2882         (WebCore::InspectorDOMAgent::setNodeName):
2883         (WebCore::InspectorDOMAgent::buildObjectForNode):
2884         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2885         (WebCore::InspectorDOMAgent::innerParentNode):
2886         * inspector/InspectorFrontendHost.cpp:
2887         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
2888         * inspector/InspectorInstrumentation.cpp:
2889         (WebCore::frameForScriptExecutionContext):
2890         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
2891         * inspector/InspectorInstrumentation.h:
2892         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
2893         * inspector/InspectorNodeFinder.cpp:
2894         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
2895         (WebCore::InspectorNodeFinder::searchUsingXPath):
2896         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
2897         * inspector/InspectorOverlay.cpp:
2898         (WebCore::buildObjectForElementInfo):
2899         * inspector/InspectorStyleSheet.cpp:
2900         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
2901         * loader/FormSubmission.cpp:
2902         (WebCore::FormSubmission::create):
2903         * loader/FrameLoader.cpp:
2904         (WebCore::FrameLoader::handleFallbackContent):
2905         * loader/SubframeLoader.cpp:
2906         (WebCore::SubframeLoader::loadPlugin):
2907         * loader/ThreadableLoader.cpp:
2908         (WebCore::ThreadableLoader::create):
2909         (WebCore::ThreadableLoader::loadResourceSynchronously):
2910         * loader/cache/MemoryCache.cpp:
2911         (WebCore::MemoryCache::removeRequestFromCache):
2912         (WebCore::MemoryCache::removeRequestFromSessionCaches):
2913         * mathml/MathMLElement.cpp:
2914         (WebCore::MathMLElement::attributeChanged):
2915         * mathml/MathMLSelectElement.cpp:
2916         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
2917         * page/Chrome.cpp:
2918         (WebCore::Chrome::setToolTip):
2919         * page/ContextMenuController.cpp:
2920         (WebCore::ContextMenuController::maybeCreateContextMenu):
2921         (WebCore::ContextMenuController::populate):
2922         * page/DOMTimer.cpp:
2923         (WebCore::DOMTimer::install):
2924         (WebCore::DOMTimer::fired):
2925         * page/DragController.cpp:
2926         (WebCore::elementUnderMouse):
2927         (WebCore::DragController::operationForLoad):
2928         (WebCore::DragController::canProcessDrag):
2929         (WebCore::DragController::draggableElement):
2930         * page/EventHandler.cpp:
2931         (WebCore::EventHandler::handleMousePressEvent):
2932         (WebCore::isSubmitImage):
2933         (WebCore::targetIsFrame):
2934         (WebCore::findDropZone):
2935         (WebCore::EventHandler::updateDragAndDrop):
2936         (WebCore::EventHandler::updateMouseEventTargetNode):
2937         (WebCore::EventHandler::handleTextInputEvent):
2938         * page/FocusController.cpp:
2939         (WebCore::FocusNavigationScope::owner):
2940         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
2941         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
2942         (WebCore::FocusController::findElementWithExactTabIndex):
2943         (WebCore::nextElementWithGreaterTabIndex):
2944         (WebCore::previousElementWithLowerTabIndex):
2945         (WebCore::FocusController::nextFocusableElement):
2946         (WebCore::FocusController::previousFocusableElement):
2947         (WebCore::clearSelectionIfNeeded):
2948         (WebCore::FocusController::advanceFocusDirectionally):
2949         * page/Frame.cpp:
2950         (WebCore::Frame::searchForLabelsBeforeElement):
2951         (WebCore::Frame::setPageAndTextZoomFactors):
2952         * page/FrameView.cpp:
2953         (WebCore::FrameView::init):
2954         (WebCore::FrameView::scrollToAnchor):
2955         * page/PageSerializer.cpp:
2956         (WebCore::PageSerializer::serializeFrame):
2957         * page/SpatialNavigation.cpp:
2958         (WebCore::FocusCandidate::FocusCandidate):
2959         (WebCore::scrollInDirection):
2960         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
2961         (WebCore::canScrollInDirection):
2962         (WebCore::nodeRectInAbsoluteCoordinates):
2963         (WebCore::areElementsOnSameLine):
2964         * page/ios/FrameIOS.mm:
2965         (WebCore::ancestorRespondingToClickEvents):
2966         * platform/network/FormData.cpp:
2967         (WebCore::FormData::appendKeyValuePairItems):
2968         * rendering/HitTestResult.cpp:
2969         (WebCore::HitTestResult::setInnerNode):
2970         (WebCore::HitTestResult::setInnerNonSharedNode):
2971         (WebCore::HitTestResult::title):
2972         (WebCore::HitTestResult::innerTextIfTruncated):
2973         (WebCore::HitTestResult::mediaSupportsFullscreen):
2974         (WebCore::HitTestResult::enterFullscreenForVideo):
2975         (WebCore::HitTestResult::mediaIsVideo):
2976         (WebCore::HitTestResult::innerElement):
2977         (WebCore::HitTestResult::innerNonSharedElement):
2978         * rendering/RenderBlockFlow.cpp:
2979         (WebCore::resizeTextPermitted):
2980         * rendering/RenderBox.cpp:
2981         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
2982         * rendering/RenderCounter.cpp:
2983         (WebCore::planCounter):
2984         * rendering/RenderDetailsMarker.cpp:
2985         (WebCore::RenderDetailsMarker::isOpen):
2986         * rendering/RenderEmbeddedObject.cpp:
2987         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2988         * rendering/RenderFileUploadControl.cpp:
2989         (WebCore::RenderFileUploadControl::uploadButton):
2990         * rendering/RenderImage.cpp:
2991         (WebCore::RenderImage::paintAreaElementFocusRing):
2992         (WebCore::RenderImage::paintIntoRect):
2993         (WebCore::RenderImage::imageMap):
2994         * rendering/RenderLayer.cpp:
2995         (WebCore::RenderLayer::scrollRectToVisible):
2996         (WebCore::RenderLayer::resize):
2997         (WebCore::RenderLayer::updateSnapOffsets):
2998         * rendering/RenderLayerBacking.cpp:
2999         (WebCore::isRestartedPlugin):
3000         * rendering/RenderListBox.cpp:
3001         (WebCore::RenderListBox::updateFromElement):
3002         (WebCore::RenderListBox::addFocusRingRects):
3003         (WebCore::RenderListBox::paintItemForeground):
3004         (WebCore::RenderListBox::paintItemBackground):
3005         * rendering/RenderMarquee.cpp:
3006         (WebCore::RenderMarquee::marqueeSpeed):
3007         * rendering/RenderMenuList.cpp:
3008         (WebCore::selectedOptionCount):
3009         (RenderMenuList::updateOptionsWidth):
3010         (RenderMenuList::setTextFromOption):
3011         (RenderMenuList::itemText):
3012         (RenderMenuList::itemIsEnabled):
3013         (RenderMenuList::itemIsLabel):
3014         (RenderMenuList::itemIsSelected):
3015         * rendering/RenderMeter.cpp:
3016         (WebCore::RenderMeter::meterElement):
3017         * rendering/RenderNamedFlowThread.cpp:
3018         (WebCore::RenderNamedFlowThread::isChildAllowed):
3019         * rendering/RenderObject.cpp:
3020         (WebCore::RenderObject::addPDFURLRect):
3021         (WebCore::RenderObject::shouldRespectImageOrientation):
3022         (WebCore::RenderObject::updateDragState):
3023         (WebCore::RenderObject::getUncachedPseudoStyle):
3024         (WebCore::RenderObject::getTextDecorationColors):
3025         * rendering/RenderProgress.cpp:
3026         (WebCore::RenderProgress::progressElement):
3027         * rendering/RenderSnapshottedPlugIn.cpp:
3028         (WebCore::RenderSnapshottedPlugIn::handleEvent):
3029         * rendering/RenderTable.cpp:
3030         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
3031         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3032         * rendering/RenderTableCell.cpp:
3033         (WebCore::RenderTableCell::parseColSpanFromDOM):
3034         (WebCore::RenderTableCell::parseRowSpanFromDOM):
3035         * rendering/RenderTheme.cpp:
3036         (WebCore::RenderTheme::isEnabled):
3037         (WebCore::RenderTheme::isFocused):
3038         (WebCore::RenderTheme::isPressed):
3039         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
3040         (WebCore::RenderTheme::isReadOnlyControl):
3041         (WebCore::RenderTheme::isHovered):
3042         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
3043         (WebCore::RenderTheme::paintSliderTicks):
3044         * rendering/RenderThemeGtk.cpp:
3045         (WebCore::getMediaElementFromRenderObject):
3046         (WebCore::nodeHasClass):
3047         * rendering/RenderThemeMac.mm:
3048         (WebCore::RenderThemeMac::updatePressedState):
3049         (WebCore::RenderThemeMac::paintSliderThumb):
3050         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3051         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3052         * rendering/RenderTreeAsText.cpp:
3053         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
3054         (WebCore::RenderTreeAsText::writeRenderObject):
3055         * rendering/TextAutosizer.cpp:
3056         (WebCore::TextAutosizer::isAutosizingContainer):
3057         (WebCore::TextAutosizer::containerContainsOneOfTags):
3058         * rendering/mathml/RenderMathMLBlock.cpp:
3059         (WebCore::RenderMathMLBlock::isChildAllowed):
3060         * rendering/svg/RenderSVGGradientStop.cpp:
3061         (WebCore::RenderSVGGradientStop::gradientElement):
3062         * rendering/svg/RenderSVGTransformableContainer.cpp:
3063         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
3064         * rendering/svg/SVGRenderingContext.cpp:
3065         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3066         * style/StyleResolveTree.cpp:
3067         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
3068         (WebCore::Style::attachChildren):
3069         (WebCore::Style::attachDistributedChildren):
3070         (WebCore::Style::detachDistributedChildren):
3071         (WebCore::Style::detachChildren):
3072         (WebCore::Style::resolveShadowTree):
3073         (WebCore::Style::resolveTree):
3074         * svg/SVGAElement.cpp:
3075         (WebCore::SVGAElement::defaultEventHandler):
3076         * svg/SVGAltGlyphElement.cpp:
3077         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
3078         * svg/SVGAnimateMotionElement.cpp:
3079         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
3080         * svg/SVGDocument.cpp:
3081         (WebCore::SVGDocument::rootElement):
3082         * svg/SVGElement.cpp:
3083         (WebCore::SVGElement::isOutermostSVGSVGElement):
3084         (WebCore::SVGElement::ownerSVGElement):
3085         (WebCore::SVGElement::viewportElement):
3086         * svg/SVGFontData.cpp:
3087         (WebCore::SVGFontData::applySVGGlyphSelection):
3088         * svg/SVGFontFaceElement.cpp:
3089         (WebCore::SVGFontFaceElement::associatedFontElement):
3090         (WebCore::SVGFontFaceElement::rebuildFontFace):
3091         * svg/SVGFontFaceSrcElement.cpp:
3092         (WebCore::SVGFontFaceSrcElement::childrenChanged):
3093         * svg/SVGGlyphElement.cpp:
3094         (WebCore::SVGGlyphElement::invalidateGlyphCache):
3095         * svg/SVGHKernElement.cpp:
3096         (WebCore::SVGHKernElement::insertedInto):
3097         (WebCore::SVGHKernElement::removedFrom):
3098         * svg/SVGLengthContext.cpp:
3099         (WebCore::SVGLengthContext::determineViewport):
3100         * svg/SVGLinearGradientElement.cpp:
3101         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
3102         * svg/SVGLocatable.cpp:
3103         (WebCore::isViewportElement):
3104         (WebCore::SVGLocatable::getTransformToElement):
3105         * svg/SVGMPathElement.cpp:
3106         (WebCore::SVGMPathElement::pathElement):
3107         (WebCore::SVGMPathElement::notifyParentOfPathChange):
3108         * svg/SVGPathElement.cpp:
3109         (WebCore::SVGPathElement::invalidateMPathDependencies):
3110         * svg/SVGPatternElement.cpp:
3111         (WebCore::SVGPatternElement::collectPatternAttributes):
3112         * svg/SVGRadialGradientElement.cpp:
3113         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
3114         * svg/SVGSVGElement.cpp:
3115         (WebCore::SVGSVGElement::setupInitialView):
3116         * svg/SVGTextContentElement.cpp:
3117         (WebCore::SVGTextContentElement::elementFromRenderer):
3118         * svg/SVGUseElement.cpp:
3119         (WebCore::dumpInstanceTree):
3120         (WebCore::SVGUseElement::toClipPath):
3121         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
3122         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
3123         * svg/SVGVKernElement.cpp:
3124         (WebCore::SVGVKernElement::insertedInto):
3125         (WebCore::SVGVKernElement::removedFrom):
3126         * svg/animation/SVGSMILElement.cpp:
3127         (WebCore::SVGSMILElement::buildPendingResource):
3128         * svg/graphics/SVGImageCache.cpp:
3129         (WebCore::SVGImageCache::imageForRenderer):
3130         * testing/Internals.cpp:
3131         (WebCore::Internals::shadowRootType):
3132         (WebCore::Internals::visiblePlaceholder):
3133         (WebCore::Internals::selectColorInColorChooser):
3134         (WebCore::Internals::wasLastChangeUserEdit):
3135         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
3136         (WebCore::Internals::isSelectPopupVisible):
3137         * testing/js/WebCoreTestSupport.cpp:
3138         (WebCoreTestSupport::injectInternalsObject):
3139         * xml/XMLHttpRequest.cpp:
3140         (WebCore::XMLHttpRequest::open):
3141         * xml/XPathFunctions.cpp:
3142         (WebCore::XPath::expandedNameLocalPart):
3143         (WebCore::XPath::FunLang::evaluate):
3144         * xml/XPathNodeSet.cpp:
3145         (WebCore::XPath::sortBlock):
3146         (WebCore::XPath::NodeSet::sort):
3147         (WebCore::XPath::findRootNode):
3148         (WebCore::XPath::NodeSet::traversalSort):
3149         * xml/parser/XMLDocumentParserLibxml2.cpp:
3150         (WebCore::XMLDocumentParser::XMLDocumentParser):
3151
3152 2014-10-02  Rik Cabanier  <cabanier@adobe.com>
3153
3154         Clean up loops in CSSGradientValue.cpp
3155         https://bugs.webkit.org/show_bug.cgi?id=137332
3156
3157         Reviewed by Andreas Kling.
3158
3159         This patch cleans up a couple of for loops by using C++11 syntax and
3160         fixes some grammar in a comment.
3161
3162         No new tests, no behavior change.
3163
3164         * css/CSSGradientValue.cpp:
3165         (WebCore::CSSGradientValue::gradientWithStylesResolved): Move for loops to C++11.
3166         (WebCore::CSSGradientValue::addStops): Update grammar in comment for gradient midpoints.
3167
3168 2014-10-02  Krzysztof Czech  <k.czech@samsung.com>
3169
3170         AX: Default orientation for aria scrollbars should be vertical
3171         https://bugs.webkit.org/show_bug.cgi?id=137341
3172
3173         Reviewed by Chris Fleizach.
3174
3175         Default orientation for aria scrollbars regarding w3c spec should be vertical
3176
3177         No new tests, covering by existing one.
3178
3179         * accessibility/AccessibilityRenderObject.cpp:
3180         (WebCore::AccessibilityRenderObject::orientation):
3181
3182 2014-10-02  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
3183
3184         Fix minimal build warnings
3185         https://bugs.webkit.org/show_bug.cgi?id=137066
3186
3187         Reviewed by Daniel Bates.
3188
3189         No new tests, no behavior change.
3190
3191         * css/CSSParser.cpp:
3192         (WebCore::isValidKeywordPropertyAndValue):
3193         * html/parser/HTMLPreloadScanner.cpp:
3194         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3195         * page/Page.cpp:
3196         (WebCore::Page::setPageScaleFactor):
3197         * platform/graphics/WidthIterator.cpp:
3198         (WebCore::WidthIterator::glyphDataForCharacter):
3199         * rendering/svg/SVGInlineTextBox.cpp:
3200         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
3201
3202 2014-10-01  Benjamin Poulain  <bpoulain@apple.com>
3203
3204         Click events offset in webkit-overflow-scrolling iframes
3205         https://bugs.webkit.org/show_bug.cgi?id=134596
3206
3207         Reviewed by Sam Weinig.
3208
3209         * platform/ScrollView.cpp:
3210         (WebCore::ScrollView::visibleContentRectInternal):
3211         When converting coordinates from the main frame to a subframe's document, the position
3212         is first converted to the subframe's FrameView coordinate system, then offset by the scroll
3213         offset of the subframe itself.
3214
3215         The bug in this case was that the scroll offset used was the global scroll offset of the frame
3216         in the view instead of the scroll offset of the document in its own frameview.
3217
3218         The regression was introduced by the refactoring r162663. On iOS WebKit1, the coordinate system
3219         is different depending on VisibleContentRectIncludesScrollbars. In r162663, the value was set
3220         such that the rect returned is always in absolute coordinate.
3221
3222         The ideal solution would be to refactor ScrollView::platformVisibleContentRect() to always return
3223         the offsets in scroll view coordinates and verify and update all the call sites to use explicit
3224         conversion to the top frame. In this patch I only reverted the coordinate change of r162663 to avoid
3225         large scale impact.
3226
3227 2014-10-01  Christophe Dumez  <cdumez@apple.com>
3228
3229         Use is<>() / downcast<>() for File
3230         https://bugs.webkit.org/show_bug.cgi?id=137318
3231
3232         Reviewed by Gyuyoung Kim.
3233
3234         Use is<>() / downcast<>() for File instead of isFile() / toFile().
3235
3236         No new tests, no behavior change.
3237
3238         * fileapi/Blob.h:
3239         * fileapi/File.h:
3240         (isType):
3241         * fileapi/FileReader.cpp:
3242         (WebCore::FileReader::readAsArrayBuffer):
3243         (WebCore::FileReader::readAsBinaryString):
3244         (WebCore::FileReader::readAsText):
3245         (WebCore::FileReader::readAsDataURL):
3246         * platform/network/FormData.cpp:
3247         (WebCore::FormData::appendKeyValuePairItems):
3248
3249 2014-10-01  Rik Cabanier  <cabanier@adobe.com>
3250
3251         Add support for midpoint to CSS gradients
3252         https://bugs.webkit.org/show_bug.cgi?id=137171
3253
3254         Reviewed by Darin Adler.
3255
3256         This patch adds support for gradient midpoints. It also updates the 
3257         gradient tests so they use the feature.
3258         Spec: http://dev.w3.org/csswg/css-images-4/#color-interpolation-hint
3259
3260         Tests: fast/gradients/unprefixed-color-stops2.html
3261                fast/gradients/unprefixed-gradient-parsing.html
3262                fast/gradients/unprefixed-linear-angle-gradients2.html
3263                fast/gradients/unprefixed-radial-gradients.html
3264                fast/gradients/unprefixed-radial-gradients2.html
3265                fast/gradients/unprefixed-repeating-linear-gradient.html
3266                fast/gradients/unprefixed-repeating-radial-gradients.html
3267
3268         * css/CSSGradientValue.cpp:
3269         (WebCore::GradientStop::GradientStop): constructor initializes the midpoint variable
3270         (WebCore::CSSGradientValue::gradientWithStylesResolved): this function checks for midpoint color stops
3271         (WebCore::CSSGradientValue::addStops): this function processes midpoints and converts them to regular color stops
3272         (WebCore::CSSLinearGradientValue::customCSSText): this routine was updated to do correct parsing for midpoints
3273         (WebCore::CSSRadialGradientValue::customCSSText):
3274         * css/CSSGradientValue.h:
3275         (WebCore::CSSGradientColorStop::CSSGradientColorStop): this function stores if a stop is a midpoint
3276         * css/CSSParser.cpp:
3277         (WebCore::CSSParser::parseGradientColorStops): this function now allows color stops with no color
3278
3279 2014-10-01  Chris Dumez  <cdumez@apple.com>
3280
3281         Add basic caching for Document.cookie API
3282         https://bugs.webkit.org/show_bug.cgi?id=137225
3283
3284         Reviewed by Alexey Proskuryakov.
3285
3286         While profiling the load of nytimes.com, I noticed that the site is
3287         accessing ~250 times document.cookie, just during page load. Accessing
3288         document.cookie is currently slow because we:
3289         - Call WebPlatformStrategies::cookiesForDOM() virtual function
3290         - Send a sync IPC message to the Network process to retrieve the
3291           cookies
3292             - The Network process gets the list of cookies from CFNetwork then
3293               serializes the result to send it back to the WebProcess
3294         - We unserialize the cookies into an NSList of cookies
3295         - We filter-out the cookies that are 'httpOnly' and construct a new
3296           NSList of cookies
3297         - We create a WTF String out of the cookies NSList
3298
3299         In the case of nytimes.com, it turns out that up to 100 calls to
3300         document.cookie() are made in the same event loop iteration. This patch
3301         thus caches / freezes the cookies until we return to the event
3302         loop so that consecutive calls to document.cookie() are extremely fast.
3303         Doing so seems to be sufficient to achieve a ~87% cache hit for
3304         nytimes.com page load.
3305
3306         The cookies cache is invalidated whenever:
3307         - document.cookie is set
3308         - we return to the event loop
3309         - a network resource is loaded synchronously as it may cause cookies to
3310           be set before we return to the event loop
3311
3312         Test: http/tests/cookies/sync-xhr-set-cookie-invalidates-cache.html
3313
3314         * dom/Document.cpp:
3315         (WebCore::Document::Document):
3316         (WebCore::Document::open):
3317         (WebCore::Document::cookie):
3318         (WebCore::Document::setCookie):
3319         (WebCore::Document::setCookieURL):
3320         (WebCore::Document::initSecurityContext):
3321         (WebCore::Document::setDOMCookieCache):
3322         (WebCore::Document::invalidateDOMCookieCache):
3323         (WebCore::Document::domCookieCacheExpiryTimerFired):
3324         (WebCore::Document::didLoadResourceSynchronously):
3325         * dom/Document.h:
3326         (WebCore::Document::domCookieCache):
3327         (WebCore::Document::isDOMCookieCacheValid):
3328         (WebCore::Document::setCookieURL): Deleted.
3329         * dom/ScriptExecutionContext.cpp:
3330         (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
3331         * dom/ScriptExecutionContext.h:
3332         * loader/ThreadableLoader.cpp:
3333         (WebCore::ThreadableLoader::loadResourceSynchronously):
3334
3335 2014-10-01  Christophe Dumez  <cdumez@apple.com>
3336
3337         Use is<>() / downcast<>() for Event classes
3338         https://bugs.webkit.org/show_bug.cgi?id=137284
3339
3340         Reviewed by Andreas Kling.
3341
3342         Use is<>() / downcast<>() for Event classes.
3343
3344         No new tests, no behavior change.
3345
3346         * bindings/js/JSErrorHandler.cpp:
3347         (WebCore::JSErrorHandler::handleEvent):
3348         * bindings/js/JSEventListener.cpp:
3349         (WebCore::JSEventListener::handleEvent):
3350         * dom/BeforeTextInsertedEvent.h:
3351         * dom/BeforeUnloadEvent.h:
3352         * dom/ErrorEvent.h:
3353         * dom/Event.h:
3354         * dom/EventContext.cpp:
3355         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
3356         * dom/FocusEvent.h:
3357         * dom/KeyboardEvent.cpp:
3358         (WebCore::findKeyboardEvent):
3359         * dom/KeyboardEvent.h:
3360         * dom/MouseEvent.cpp:
3361         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
3362         * dom/MouseEvent.h:
3363         * dom/Node.cpp:
3364         (WebCore::Node::defaultEventHandler):
3365         * dom/TextEvent.h:
3366         * dom/UIEvent.h:
3367         * dom/WheelEvent.h:
3368         * html/HTMLAnchorElement.cpp:
3369         (WebCore::appendServerMapMousePosition):
3370         (WebCore::HTMLAnchorElement::defaultEventHandler):
3371         (WebCore::HTMLAnchorElement::eventType):
3372         (WebCore::isEnterKeyKeydownEvent):
3373         (WebCore::isLinkClick):
3374         * html/HTMLButtonElement.cpp:
3375         (WebCore::HTMLButtonElement::defaultEventHandler):
3376         * html/HTMLFormElement.cpp:
3377         (WebCore::HTMLFormElement::submitImplicitly):
3378         * html/HTMLFormElement.h:
3379         * html/HTMLFrameSetElement.cpp:
3380         (WebCore::HTMLFrameSetElement::defaultEventHandler):
3381         * html/HTMLInputElement.cpp:
3382         (WebCore::HTMLInputElement::willDispatchEvent):
3383         (WebCore::HTMLInputElement::defaultEventHandler):
3384         * html/HTMLPlugInImageElement.cpp:
3385         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
3386         * html/HTMLSelectElement.cpp:
3387         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
3388         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3389         (WebCore::HTMLSelectElement::defaultEventHandler):
3390         * html/HTMLSummaryElement.cpp:
3391         (WebCore::HTMLSummaryElement::defaultEventHandler):
3392         * html/HTMLTextAreaElement.cpp:
3393         (WebCore::HTMLTextAreaElement::defaultEventHandler):
3394         * html/ImageDocument.cpp:
3395         (WebCore::ImageEventListener::handleEvent):
3396         * html/ImageInputType.cpp:
3397         (WebCore::ImageInputType::handleDOMActivateEvent):
3398         * html/InputType.cpp:
3399         (WebCore::InputType::shouldSubmitImplicitly):
3400         * html/InputType.h:
3401         * html/MediaDocument.cpp:
3402         (WebCore::MediaDocument::defaultEventHandler):
3403         * html/TextFieldInputType.cpp:
3404         (WebCore::TextFieldInputType::shouldSubmitImplicitly):
3405         * html/TextFieldInputType.h:
3406         * html/shadow/MediaControlElementTypes.cpp:
3407         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
3408         * html/shadow/MediaControlElements.cpp:
3409         (WebCore::MediaControlPanelElement::defaultEventHandler):
3410         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
3411         (WebCore::MediaControlTimelineElement::defaultEventHandler):
3412         * html/shadow/MediaControls.cpp:
3413         (WebCore::MediaControls::containsRelatedTarget):
3414         * html/shadow/MediaControlsApple.cpp:
3415