Clean up interface to Font::expansionOpportunityCount()
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         Clean up interface to Font::expansionOpportunityCount()
4         https://bugs.webkit.org/show_bug.cgi?id=137355
5
6         Reviewed by Dean Jackson.
7
8         There are two overloads of Font::expansionOpportunityCount() which perform the same
9         operation. One overload takes a UChar*, the other takes an LChar*, and they both
10         take a length. This is the abstraction that StringView was designed to be. Instead
11         of forcing each caller to take a different overload based on if their data is
12         8 bit or not, allow the caller to construct a StringView and pass that into
13         Font::expansionOpportunityCount() instead of a raw pointer/length.
14
15         No new tests because there is no behavior change.
16
17         * platform/graphics/Font.cpp:
18         (WebCore::Font::expansionOpportunityCountInternal): Original two functions,
19         renamed.
20         (WebCore::Font::expansionOpportunityCount): Takes a StringView, calls 
21         expansionOpportunityCountInternal().
22         * platform/graphics/Font.h: Update signatures.
23         * platform/graphics/WidthIterator.cpp:
24         (WebCore::WidthIterator::WidthIterator): Use new signature to
25         Font::expansionOpportunityCount().
26         * platform/graphics/mac/ComplexTextController.cpp:
27         (WebCore::ComplexTextController::ComplexTextController): Ditto.
28         * rendering/RenderBlockLineLayout.cpp:
29         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Ditto.
30         * rendering/RenderText.cpp:
31         (WebCore::RenderText::stringView): Accessor to encapsulate character pointer
32         and length.
33         * rendering/RenderText.h: Signature of new accessor.
34
35 2014-10-03  Brent Fulgham  <bfulgham@apple.com>
36
37         [Win] Unreviewed build fix for MSVC 2013 SP 3.
38
39         The std::array initializer is not fully implemented in SP3 and causes a
40         build error.
41
42         * platform/graphics/transforms/AffineTransform.cpp: Use old style assignment
43         initialization for MSVC builds until this bug is fixed.
44
45 2014-10-03  Tim Horton  <timothy_horton@apple.com>
46
47         WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
48         https://bugs.webkit.org/show_bug.cgi?id=137383
49         <rdar://problem/18535439>
50
51         Reviewed by Sam Weinig.
52
53         * rendering/RenderView.cpp:
54         (WebCore::RenderView::paintBoxDecorations):
55         Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.
56
57 2014-10-03  Dean Jackson  <dino@apple.com>
58
59         webkit-appearance: default-button styling does not set the button font color to white
60         https://bugs.webkit.org/show_bug.cgi?id=137399
61         rdar://problem/17788616
62
63         Reviewed by Dave Hyatt.
64
65         When a button is styled with -webkit-appearance: default-button, it should
66         use the CSSValueActivebuttontext value for its text color when the window
67         is active, and the normal value when the window is inactive.
68
69         Since activating (focus/blur) windows doesn't cause a style recalculation, this
70         is applied as a paint-time operation. However, the render tree children that
71         paint the text don't know that they are contained within a RenderButton
72         and that the button is a default type. So I added an inherited flag, similar
73         to what we use for visited links, to remember if we're in a button. And then
74         computeTextPaintStyle chooses the correct value.
75
76         We can't test this because our LayoutTest system doesn't have
77         an active window, and thus the default button renders like a normal
78         button. This should cause no regressions though. Also, the appearance is
79         protected behind an SPI (or Setting), so this is not exposed to the Web.
80
81         * rendering/RenderTheme.cpp:
82         (WebCore::RenderTheme::adjustStyle): Set the flag if we're inside a default button.
83         * rendering/TextPaintStyle.cpp:
84         (WebCore::computeTextPaintStyle): If we're in a default button inside an active window,
85         use the CSSValueActivebuttontext color.
86         * rendering/style/RenderStyle.cpp:
87         (WebCore::RenderStyle::RenderStyle): Add and expose the new inherited flag: ._insideDefaultButton.
88         (WebCore::RenderStyle::changeRequiresRepaint): Ditto.
89         * rendering/style/RenderStyle.h: Ditto.
90
91 2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
92
93         [SVG -> OTF Converter] Support non-BMP codepoints
94         https://bugs.webkit.org/show_bug.cgi?id=137097
95
96         Reviewed by Darin Adler.
97
98         This patch has two pieces:
99
100         1) Moves write16(), overwrite32() and overwrite16() inside SVGToOTFFontConverter. This
101         is so that we don't have to keep passing around references to m_result everywhere. Instead,
102         put the output vector inside the class as an instance member variable. In addition, rename
103         write32() and write16() to append32() and append16(), and provide a copy of append32 inside
104         SVGToOTFFontConverter.
105
106         2) Change the "Codepoint" typedef to be a String, and rename it to Codepoints. This is so that
107         we can implement ligatures later on. Update all the places that use this variable to work with
108         a String of multiple codepoints.
109
110         This patch updates the CMAP table to use format 12 instead of format 4. It currently only maps
111         single codepoints to glyph IDs and skips all multi-codepoint glyphs. We will implement
112         ligatures in another patch.
113
114         Test: svg/custom/glyph-selection-non-bmp.svg
115
116         * svg/SVGToOTFFontConversion.cpp:
117         (WebCore::append32): Append a result to a given vector. This is for the path transcoder.
118         (WebCore::SVGToOTFFontConverter::releaseResult): WTF::move()'s the result.
119         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Update to take Codepoints instead of Codepoint.
120         (WebCore::SVGToOTFFontConverter::append32): Piece 1 above.
121         (WebCore::SVGToOTFFontConverter::append16): Ditto.
122         (WebCore::SVGToOTFFontConverter::append4ByteCode): Convenience function.
123         (WebCore::SVGToOTFFontConverter::overwrite32): Piece 1 above.
124         (WebCore::SVGToOTFFontConverter::overwrite16): Ditto.
125         (WebCore::SVGToOTFFontConverter::appendCMAPTable): Update to format 12.
126         (WebCore::SVGToOTFFontConverter::appendHEADTable): Passing in a result vector is no longer necessary.
127         (WebCore::SVGToOTFFontConverter::appendHHEATable): Ditto.
128         (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto.
129         (WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto.
130         (WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto.
131         (WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto.
132         (WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto.
133         (WebCore::isValidStringForCFF): Ditto.
134         (WebCore::SVGToOTFFontConverter::appendCFFValidString): Ditto.
135         (WebCore::SVGToOTFFontConverter::appendCFFTable): Ditto.
136         (WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.
137         (WebCore::SVGToOTFFontConverter::appendVHEATable): Ditto.
138         (WebCore::SVGToOTFFontConverter::appendVMTXTable): Ditto.
139         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Update for Codepoints.
140         (WebCore::SVGToOTFFontConverter::addCodepoints): Ditto.
141         (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
142         (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Ditto.
143         (WebCore::SVGToOTFFontConverter::appendKERNTable): Ditto.
144         (WebCore::writeCFFEncodedNumber): Passing in a result vector is no longer necessary.
145         (WebCore::SVGToOTFFontConverter::appendGlyphData): Update for Codepoints.
146         (WebCore::SVGToOTFFontConverter::processGlyphElement): Update for Codepoints.
147         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically): Comparing Codepoints
148         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Update for Codepoints.
149         (WebCore::SVGToOTFFontConverter::calculateChecksum): Passing in a result vector is no longer necessary.
150         (WebCore::SVGToOTFFontConverter::appendTable): Ditto.
151         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto.
152         (WebCore::convertSVGToOTFFont): Move out of the result vector.
153         (WebCore::write32): Deleted.
154         (WebCore::write16): Deleted.
155         (WebCore::overwrite32): Deleted.
156         (WebCore::appendCFFValidString): Deleted.
157         (WebCore::transcodeGlyphPaths): Deleted.
158         (WebCore::calculateChecksum): Deleted.
159
160 2014-10-03  Commit Queue  <commit-queue@webkit.org>
161
162         Unreviewed, rolling out r174270.
163         https://bugs.webkit.org/show_bug.cgi?id=137397
164
165         crashes on the bots (Requested by dethbakin on #webkit).
166
167         Reverted changeset:
168
169         "EventSender dispatches should be per-Document"
170         https://bugs.webkit.org/show_bug.cgi?id=136051
171         http://trac.webkit.org/changeset/174270
172
173 2014-10-03  Jer Noble  <jer.noble@apple.com>
174
175         [iOS] Back-to-back fullscreen videos result in incorrectly sized videos
176         https://bugs.webkit.org/show_bug.cgi?id=137380
177
178         Reviewed by Eric Carlson.
179
180         During a normal workflow, a <video> element will create an AVPlayerLayer, then it will get a
181         fullscreen (hosted) parent layer, then it will be told an explicit fullscreen size. But when
182         a <video> element creates an AVPlayerLayer after the <video> element is already in
183         fullscreen mode, it sets that AVPlayerLayer's frame using the size of the hosted parent
184         layer, rather than the explicit fullscreen size. Instead, use the (already set) explicit
185         fullscreen size after creating the AVPlayerLayer.
186
187         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
188         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerLayer):
189         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
190
191 2014-10-03 Bear Travis <betravis@adobe.com>
192
193         REGRESSION (r173531): Use after free in WebCore::RenderStyle::fontMetrics /
194         WebCore::CSSPrimitiveValue::computeLengthDouble
195         https://bugs.webkit.org/show_bug.cgi?id=136864
196
197         Reviewed by Andreas Kling.
198
199         FontLoader previously called updateDocumentStyleIfNeeded,
200         which would reset styles currently in use as part of
201         the tabIndex calculation. The FontLoader should instead
202         wait for pending stylesheets to load.
203
204         Tests: fast/css/fontloader-tab-index.html
205
206         * css/FontLoader.cpp:
207         (WebCore::FontLoader::notifyWhenFontsReady): Do not immediately
208         call loadingDone().
209         (WebCore::FontLoader::loadingDone): Wait for stylesheets to
210         finish loading rather than updating document styles.
211         * css/FontLoader.h:
212         (WebCore::FontLoader::loading): Include JS font loads when testing
213         for the loading state.
214
215 2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>
216
217         Unreviewed build fix.
218
219         Fixing the Windows build after r174269.
220
221         * platform/graphics/win/UniscribeController.cpp:
222         (WebCore::UniscribeController::shapeAndPlaceItem):
223
224 2014-10-01  Brian J. Burg  <burg@cs.washington.edu>
225
226         EventSender dispatches should be per-Document
227         https://bugs.webkit.org/show_bug.cgi?id=136051
228
229         Reviewed by Andreas Kling.
230
231         EventSender uses a Timer to asynchronously dispatch the same event to multiple
232         elements of the same type on a future run loop. However, we previously dispatched events
233         to elements from any Document rather than the one that requested the event send.
234
235         This patch changes EventSender to be associated with a single Document. EventSenders
236         for each Document are lazily allocated. Further per-Document or global optimizations
237         are possible.
238
239         This change also lays the groundwork for making EventSender-related DOM events
240         deterministic during web replay, tracked at <https://webkit.org/b/137090>.
241
242         No new tests, covered by fast/text/svg-font-trigger-load-event.html.
243
244         * CMakeLists.txt:
245         * WebCore.vcxproj/WebCore.vcxproj:
246         * WebCore.vcxproj/WebCore.vcxproj.filters:
247         * WebCore.xcodeproj/project.pbxproj:
248         * dom/DOMAllInOne.cpp:
249         * dom/Document.cpp:
250         (WebCore::Document::Document):
251         (WebCore::Document::implicitClose):
252         Dispatch pending events for this document only. Rename local variable f to frame.
253
254         * dom/Document.h:
255         (WebCore::Document::sharedEventSenders):
256         * dom/EventSender.h:
257         (WebCore::EventSender::EventSender):
258         (WebCore::EventSender::hasPendingEvents):
259         (WebCore::EventSender<T>::dispatchEventSoon):
260         (WebCore::EventSender<T>::cancelEvent):
261         (WebCore::EventSender<T>::dispatchPendingEvents):
262         (WebCore::EventSender<T>::EventSender): Deleted. The type argument was not necessary.
263         * dom/SharedEventSenders.cpp: Added. Lazily creates event senders as they are requested.
264         (WebCore::SharedEventSenders::linkLoadEventSender):
265         (WebCore::SharedEventSenders::styleLoadEventSender):
266         (WebCore::SharedEventSenders::imageBeforeloadEventSender):
267         (WebCore::SharedEventSenders::imageLoadEventSender):
268         (WebCore::SharedEventSenders::imageErrorEventSender):
269         * dom/SharedEventSenders.h: Added.
270         (WebCore::SharedEventSenders::SharedEventSenders):
271         * html/HTMLLinkElement.cpp:
272         (WebCore::HTMLLinkElement::~HTMLLinkElement):
273         (WebCore::HTMLLinkElement::dispatchPendingEvent):
274         (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
275         (WebCore::linkLoadEventSender): Deleted.
276         (WebCore::HTMLLinkElement::dispatchPendingLoadEvents): Deleted.
277         * html/HTMLLinkElement.h:
278         * html/HTMLStyleElement.cpp:
279         (WebCore::HTMLStyleElement::~HTMLStyleElement):
280         (WebCore::HTMLStyleElement::dispatchPendingEvent):
281         (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
282         (WebCore::styleLoadEventSender): Deleted.
283         (WebCore::HTMLStyleElement::dispatchPendingLoadEvents): Deleted.
284         * html/HTMLStyleElement.h:
285         * loader/ImageLoader.cpp:
286         (WebCore::ImageLoader::beforeLoadEventSender):
287         (WebCore::ImageLoader::loadEventSender):
288         (WebCore::ImageLoader::errorEventSender):
289         (WebCore::ImageLoader::dispatchPendingEvent):
290         (WebCore::beforeLoadEventSender): Deleted.
291         (WebCore::loadEventSender): Deleted.
292         (WebCore::errorEventSender): Deleted.
293         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvents): Deleted.
294         (WebCore::ImageLoader::dispatchPendingLoadEvents): Deleted.
295         (WebCore::ImageLoader::dispatchPendingErrorEvents): Deleted.
296         * loader/ImageLoader.h:
297         * xml/parser/XMLDocumentParser.cpp:
298         (WebCore::XMLDocumentParser::append): Remove an early call to the EventSender for image
299         beforeload events. This was a performance optimization, but is no longer safe since the
300         document (and thus the event sender) may not be available in a synchronous document write.
301
302 2014-10-03  Myles C. Maxfield  <mmaxfield@apple.com>
303
304         TextRun::length() should return an unsigned
305         https://bugs.webkit.org/show_bug.cgi?id=137354
306
307         Reviewed by Antti Koivisto.
308
309         Currently, the m_len instance variable that backs the TextRun::length() function is
310         an unsigned, but the length() function implicitly casts that to an int when
311         returning it. This patch makes the function return an unsigned, and makes the
312         do any casting if necessary.
313
314         No new tests because there is no behavior change.
315
316         * platform/graphics/Font.cpp:
317         (WebCore::Font::drawText): Cast result to int.
318         (WebCore::Font::drawEmphasisMarks): Ditto.
319         (WebCore::Font::adjustSelectionRectForText): Ditto.
320         (WebCore::computeUnderlineType): Update internal type to be unsigned.
321         * platform/graphics/GlyphBuffer.h:
322         (WebCore::GlyphBuffer::add): Update sentinel value to be unsigned.
323         (WebCore::GlyphBuffer::saveOffsetsInString): Ditto.
324         * platform/graphics/GraphicsContext.cpp: Update internal type to be unsigned.
325         * platform/graphics/TextRun.h:
326         (WebCore::TextRun::length): Update return type.
327         (WebCore::TextRun::charactersLength): Ditto.
328         * platform/graphics/WidthIterator.cpp:
329         (WebCore::WidthIterator::advanceInternal): Cast result to int.
330         * rendering/svg/SVGTextMetricsBuilder.cpp:
331         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair): Remove
332         unnecessary casts.
333         (WebCore::SVGTextMetricsBuilder::advance): Ditto.
334         * svg/SVGFontData.cpp:
335         (WebCore::SVGFontData::applySVGGlyphSelection): Cast result to int.
336
337 2014-10-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
338
339         [EFL] Fix build break since r174231 and r174256
340         https://bugs.webkit.org/show_bug.cgi?id=137384
341
342         Unreviewed, EFL build fix.
343
344         r174231 and r174256 didn't consider EFL port and CoordinatedGraphics area.
345
346         * css/WebKitCSSViewportRule.cpp:
347         (WebCore::WebKitCSSViewportRule::WebKitCSSViewportRule):
348         * css/WebKitCSSViewportRule.h:
349
350 2014-10-03  Yusuke Suzuki  <utatane.tea@gmail.com>
351
352         CSS Selectors Level 4: Add parsing for :matches
353         https://bugs.webkit.org/show_bug.cgi?id=137348
354
355         Reviewed by Benjamin Poulain.
356
357         Add initial parsing functionality of :matches pseudo class in Selectors Level 4.
358         It accepts selector list as a parameter. It can contain pseudo elements.
359         And now at the parsing phase, multiple pseudo elements are allowed.
360         Currently :not doesn't accept any functional pseudo classes, :not(:matches(...)) is rejected.
361         And currently, :matches(:visited, :link) is allowed in the parsing phase.
362
363         * css/CSSGrammar.y.in:
364         * css/CSSParser.cpp:
365         (WebCore::CSSParser::detectFunctionTypeToken):
366         * css/CSSSelector.cpp:
367         (WebCore::appendSelectorList):
368         (WebCore::CSSSelector::selectorText):
369         * css/CSSSelector.h:
370         * css/SelectorChecker.cpp:
371         (WebCore::SelectorChecker::checkOne):
372         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
373         * cssjit/SelectorCompiler.cpp:
374         (WebCore::SelectorCompiler::addPseudoClassType):
375
376 2014-10-02  Andreas Kling  <akling@apple.com>
377
378         CSSOM rule wrappers always have a corresponding internal style object.
379         <https://webkit.org/b/137379>
380
381         Make the CSSOM rule wrapper classes use references & Ref instead of
382         raw pointers and RefPtr for pointing to the internal style rule.
383
384         Also changed the signature of reattach() to take a StyleRuleBase&
385         since it's never called with a null pointer.
386
387         Finally marked the rule classes final.
388
389         Reviewed by Geoffrey Garen.
390
391         * css/CSSCharsetRule.h:
392         * css/CSSFontFaceRule.cpp:
393         (WebCore::CSSFontFaceRule::CSSFontFaceRule):
394         (WebCore::CSSFontFaceRule::reattach):
395         * css/CSSFontFaceRule.h:
396         (WebCore::CSSFontFaceRule::create): Deleted.
397         * css/CSSGroupingRule.cpp:
398         (WebCore::CSSGroupingRule::CSSGroupingRule):
399         (WebCore::CSSGroupingRule::reattach):
400         * css/CSSGroupingRule.h:
401         * css/CSSImportRule.cpp:
402         (WebCore::CSSImportRule::CSSImportRule):
403         (WebCore::CSSImportRule::href):
404         (WebCore::CSSImportRule::media):
405         (WebCore::CSSImportRule::cssText):
406         (WebCore::CSSImportRule::styleSheet):
407         (WebCore::CSSImportRule::reattach):
408         * css/CSSImportRule.h:
409         (WebCore::CSSImportRule::create): Deleted.
410         * css/CSSMediaRule.cpp:
411         (WebCore::CSSMediaRule::CSSMediaRule):
412         (WebCore::CSSMediaRule::mediaQueries):
413         (WebCore::CSSMediaRule::reattach):
414         * css/CSSMediaRule.h:
415         (WebCore::CSSMediaRule::create): Deleted.
416         * css/CSSPageRule.cpp:
417         (WebCore::CSSPageRule::CSSPageRule):
418         (WebCore::CSSPageRule::reattach):
419         * css/CSSPageRule.h:
420         (WebCore::CSSPageRule::create): Deleted.
421         * css/CSSRule.h:
422         * css/CSSStyleRule.cpp:
423         (WebCore::CSSStyleRule::CSSStyleRule):
424         (WebCore::CSSStyleRule::reattach):
425         * css/CSSStyleRule.h:
426         (WebCore::CSSStyleRule::create): Deleted.
427         (WebCore::CSSStyleRule::styleRule): Deleted.
428         * css/CSSStyleSheet.cpp:
429         (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
430         * css/CSSSupportsRule.cpp:
431         (WebCore::CSSSupportsRule::CSSSupportsRule):
432         (WebCore::CSSSupportsRule::conditionText):
433         * css/CSSSupportsRule.h:
434         (WebCore::CSSSupportsRule::create):
435         * css/CSSUnknownRule.h:
436         * css/StyleRule.cpp:
437         (WebCore::StyleRuleBase::createCSSOMWrapper):
438         * css/StyleRuleImport.h:
439         (WebCore::StyleRuleImport::mediaQueries):
440         * css/WebKitCSSKeyframeRule.cpp:
441         (WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
442         (WebCore::WebKitCSSKeyframeRule::reattach):
443         * css/WebKitCSSKeyframeRule.h:
444         * css/WebKitCSSKeyframesRule.cpp:
445         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
446         (WebCore::WebKitCSSKeyframesRule::item):
447         (WebCore::WebKitCSSKeyframesRule::reattach):
448         * css/WebKitCSSKeyframesRule.h:
449         (WebCore::WebKitCSSKeyframesRule::create):
450         * css/WebKitCSSRegionRule.cpp:
451         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
452         (WebCore::WebKitCSSRegionRule::cssText):
453         * css/WebKitCSSRegionRule.h:
454         (WebCore::WebKitCSSRegionRule::create):
455         * css/WebKitCSSViewportRule.cpp:
456         (WebCore::WebKitCSSViewportRule::reattach):
457         * css/WebKitCSSViewportRule.h:
458
459 2014-10-02  Christophe Dumez  <cdumez@apple.com>
460
461         Use is<>() / downcast<>() for CSSRule subclasses
462         https://bugs.webkit.org/show_bug.cgi?id=137364
463
464         Reviewed by Benjamin Poulain.
465
466         Use is<>() / downcast<>() functions for CSSRule subclasses.
467
468         No new tests, no behavior change.
469
470         * css/CSSFontFaceRule.h:
471         * css/CSSImportRule.h:
472         * css/CSSMediaRule.h:
473         * css/CSSRule.h:
474         * css/CSSStyleRule.h:
475         * css/CSSSupportsRule.h:
476         * css/InspectorCSSOMWrappers.cpp:
477         (WebCore::InspectorCSSOMWrappers::collect):
478         * css/WebKitCSSKeyframesRule.h:
479         * css/WebKitCSSRegionRule.h:
480         * inspector/InspectorCSSAgent.cpp:
481         (WebCore::InspectorCSSAgent::asCSSStyleRule):
482         (WebCore::InspectorCSSAgent::collectStyleSheets):
483         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
484         * inspector/InspectorStyleSheet.cpp:
485         (WebCore::asCSSRuleList):
486         (WebCore::fillMediaListChain):
487         (WebCore::InspectorStyleSheet::addRule):
488         (WebCore::InspectorStyleSheet::collectFlatRules):
489         * page/PageSerializer.cpp:
490         (WebCore::PageSerializer::serializeCSSStyleSheet):
491
492 2014-10-02  Dan Bernstein  <mitz@apple.com>
493
494         <rdar://problem/18531395> REGRESSION (r173272): Crash in ResourceResponse::platformSuggestedFilename() when called on the null response
495         https://bugs.webkit.org/show_bug.cgi?id=137239
496
497         Reviewed by Pratik Solanki.
498
499         * platform/network/cf/ResourceResponseCFNet.cpp:
500         (WebCore::ResourceResponse::platformSuggestedFilename): Return the null String if
501         m_cfResponse is null.
502
503 2014-10-02  Andy Estes  <aestes@apple.com>
504
505         [iOS] Create an SPI wrapper for _UIHighlightView and use it in WKContentView
506         https://bugs.webkit.org/show_bug.cgi?id=137370
507
508         Reviewed by Tim Horton.
509
510         Added _UIHighlightViewSPI.h. When building against the internal SDK it imports <UIKit/_UIHighlightView.h>. Otherwise, it redeclares the SPI we use in WebKit2.
511
512         * WebCore.xcodeproj/project.pbxproj:
513         * platform/spi/ios/_UIHighlightViewSPI.h: Added.
514
515 2014-10-02  Benjamin Poulain  <benjamin@webkit.org>
516
517         CSS JIT: add the initial implementation of :nth-child(An+B of selector)
518         https://bugs.webkit.org/show_bug.cgi?id=137285
519
520         Reviewed by Andreas Kling.
521
522         This patch adds the baseline support for JIT compiling :nth-child(An+B of selector).
523
524         The simple optimizations from the classic :nth-child() are carried over to :nth-child(An+B of selector),
525         but the new code generation is pretty much left completely unoptimized.
526
527         The main challenge introduced with the new functional pseudo classes is the possibility of backtracking
528         while already inside a backtracking chain.
529
530         For example:
531             :nth-child(odd of a+a+a~a)+b+b~b
532         has to backtrack the chain a+a+a while already in the backtracking chain b+b+b.
533
534         The easiest way to solve this would have been to have each subselector generate a new function.
535         The generator for :nth-child() would simply call the function call for each sibling.
536
537         In the example, we would have:
538             functionA(): a+a+a~a
539             selectorChecker(): :nth-child(odd of functionA())+b+b~b
540
541         I decided against explicit functions because I believe the would be counterproductive for the common cases.
542         I expect most use of :nth-child(of) to be done with a light filter without combinators, things like:
543             :nth-child(odd of .class)
544             :nth-child(odd of type.class)
545             :nth-child(odd of type[attribute=value])
546             etc.
547
548         For simple cases, inlining the internal filter will greatly simplify the generated code.
549
550         In this particular patch, the selector checkers are inlined, but we do not attempt to have good code generation.
551         The optimizations will come later.
552
553         To implement backtracking in the subselectors, the backtracking implementation was abstracted into the structure
554         BacktrackingLevel. Every time the code generator starts a new subselector, a new BacktrackingLevel is pushed onto
555         the multilevel backtracking stack. The code generation always use the latest BacktrackingLevel for code generation
556         until the subselector is finished, and code generation can continue with the existing state.
557
558         Tests: fast/selectors/nth-child-of-backtracking-adjacent-2.html
559                fast/selectors/nth-child-of-backtracking-adjacent-optimized.html
560                fast/selectors/nth-child-of-backtracking-adjacent.html
561                fast/selectors/nth-child-of-boundaries-1.html
562                fast/selectors/nth-child-of-boundaries-2.html
563                fast/selectors/nth-child-of-boundaries-3.html
564                fast/selectors/nth-child-of-chained-2.html
565                fast/selectors/nth-child-of-has-parent.html
566                fast/selectors/nth-child-of-never-matching-selector.html
567                fast/selectors/nth-child-of-with-invalid-An+B.html
568
569         * cssjit/SelectorCompiler.cpp:
570         (WebCore::SelectorCompiler::addPseudoClassType):
571         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
572         (WebCore::SelectorCompiler::minimumRegisterRequirements):
573         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
574         Previously, we only needed stack space for the adjacent backtracking entry.
575
576         Now we can have several backtracking level active at the same time. We compute how much stack we need
577         initially and each backtracking level take stack references as needed.
578
579         (WebCore::SelectorCompiler::computeBacktrackingInformation):
580         The entire backtracking infrastructure already works great for multilevel backtracking. It is actually
581         amazing how everything fits nicely together :)
582
583         The only addition here is logging facility in case we run into a bug.
584
585         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
586         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
587         generateSelectorChecker() has handling for pseudo elements, which should not be used
588         for :nth-child(of). The core generator was moved to generateSelectorCheckerExcludingPseudoElements()
589         to be used for code generation of subselectors.
590
591         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
592         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
593         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
594         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
595         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
596         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
597         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
598         The two main changes are:
599         1) Adopt the BacktrackingLevel to handle multilevel generation.
600         2) Descendant backtracking can use the stack if we have multi level descendant backtracking.
601            In that case, we just use the stack like for adjacent backtracking.
602
603         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
604         This is very similar to generateElementIsNthChild(). The main difference is we cannot use
605         the cache in this case.
606
607         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
608         (WebCore::SelectorCompiler::nthFilterIsAlwaysSatisified):
609         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
610         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):
611
612 2014-10-02  Pratik Solanki  <psolanki@apple.com>
613
614         [iOS] Networking process stops loading web pages while running Alexa test with random URL list
615         https://bugs.webkit.org/show_bug.cgi?id=137362
616         <rdar://problem/18507382>
617
618         Reviewed by Alexey Proskuryakov.
619
620         ResourceHandleCFURLConnectionDelegateWithOperationQueue needs to signal threads waiting on
621         its semaphore when the handle is being destroyed. Otherwise, we can leave dispatch threads
622         hanging around waiting for a response. This can happen when the Web Content process dies.
623         Any thread/queue waiting on a response from that web process will leak and stay around
624         forever. If we reach the dispatch queue limit of 64, then all networking will cease to
625         happen in the Networking process. Fix this by signalling waiting threads and clearing out
626         our state in much the same way that -[WebCoreResourceHandleAsOperationQueueDelegate
627         detachHandle] does for Mac.
628
629         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
630         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
631         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::releaseHandle):
632         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
633
634 2014-10-02  Christophe Dumez  <cdumez@apple.com>
635
636         Use is<>() / downcast<>() for CSSBasicShape objects
637         https://bugs.webkit.org/show_bug.cgi?id=137331
638
639         Reviewed by Andreas Kling.
640
641         Use is<>() / downcast<>() for CSSBasicShape objects.
642
643         No new tests, no behavior change.
644
645         * css/BasicShapeFunctions.cpp:
646         (WebCore::basicShapeForValue):
647         * css/CSSBasicShapes.cpp:
648         (WebCore::CSSBasicShapeCircle::equals):
649         (WebCore::CSSBasicShapeEllipse::equals):
650         (WebCore::CSSBasicShapePolygon::equals):
651         (WebCore::CSSBasicShapeInset::equals):
652         * css/CSSBasicShapes.h:
653
654 2014-10-02  Chris Dumez  <cdumez@apple.com>
655
656         XMLHttpRequestProgressEventThrottle shouldn't throttle / defer progress events if there are no listeners
657         https://bugs.webkit.org/show_bug.cgi?id=137346
658
659         Reviewed by Alexey Proskuryakov.
660
661         Previously XMLHttpRequestProgressEventThrottle would throttle / defer
662         progress events, which involves queueing events and starting timers,
663         even if there were no listeners for those events (which is fairly
664         common case).
665
666         This patch updates XMLHttpRequestProgressEventThrottle to make sure
667         there are actual progress event listeners *before* attempting to
668         throttle and do extra processing, to avoid doing unnecessary work.
669
670         This patch also makes XMLHttpRequestProgressEventThrottle::dispatchEvent()
671         private as this method is only called from other dispatch methods of
672         the class and never from the outside.
673
674         No new tests, no behavior change.
675
676         * xml/XMLHttpRequestProgressEventThrottle.cpp:
677         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchThrottledProgressEvent):
678         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchProgressEvent):
679
680 2014-10-01  Myles C. Maxfield  <mmaxfield@apple.com>
681
682         [Subpixel] Use floats instead of ints for text justification expansion
683         https://bugs.webkit.org/show_bug.cgi?id=137327
684
685         Reviewed by Zalan Bujtas.
686
687         Use a float instead of an int for the expansion variable in InlineBox. The int was inside an inner class
688         that held a collection of bitfields, and this patch removes that inner-inner variable.
689
690         No new tests because there is plenty of existing coverage and existing tests are rebaselined.
691
692         * rendering/InlineBox.cpp: Update static_assert for the size of InlineBox.
693         * rendering/InlineBox.h: Use a float for the justification expansion amount instead of an int bitfield.
694         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields): Remove int bitfield.
695         (WebCore::InlineBox::InlineBox): Initialize float expansion.
696         (WebCore::InlineBox::expansion): Return a float.
697         (WebCore::InlineBox::setExpansion): Take a float.
698         (WebCore::InlineBox::InlineBoxBitfields::expansion): Deleted. Moved to InlineBox.
699         (WebCore::InlineBox::InlineBoxBitfields::setExpansion): Deleted. Ditto.
700         * rendering/InlineTextBox.h:
701         (WebCore::InlineTextBox::setExpansion): Take a float.
702
703 2014-10-02  Tim Horton  <timothy_horton@apple.com>
704
705         Move PageOverlay[Controller] to WebCore
706         https://bugs.webkit.org/show_bug.cgi?id=137164
707         <rdar://problem/18508258>
708
709         Reviewed by Anders Carlsson.
710
711         * CMakeLists.txt:
712         * WebCore.vcxproj/WebCore.vcxproj:
713         * WebCore.vcxproj/WebCore.vcxproj.filters:
714         * WebCore.xcodeproj/project.pbxproj:
715         Make the appropriate build system changes.
716
717         * WebCore.exp.in:
718         Export the new PageOverlay[Controller] symbols from WebCore.
719
720         * loader/EmptyClients.h:
721         * page/ChromeClient.h:
722         (WebCore::ChromeClient::documentOverlayLayerForFrame): Deleted.
723         Add attachViewOverlayGraphicsLayer, which allows PageOverlayController
724         to push view-relative page overlay root layers down to WebKit to be
725         installed just inside the view.
726
727         Remove documentOverlayLayerForFrame because RenderLayerCompositor can now
728         talk directly to PageOverlayController.
729
730         * page/EventHandler.cpp:
731         (WebCore::EventHandler::handleMousePressEvent):
732         (WebCore::EventHandler::mouseMoved):
733         (WebCore::EventHandler::handleMouseReleaseEvent):
734         When the mouse is moved, pressed, or released, give PageOverlayController
735         the first shot at handling the event.
736
737         * page/FrameView.cpp:
738         (WebCore::FrameView::setFrameRect):
739         Inform PageOverlayController that the main FrameView's size changed,
740         so it can update the size of view-relative overlays.
741
742         (WebCore::FrameView::setContentsSize):
743         Inform PageOverlayController that the main FrameView's contents size changed,
744         so it can update the size of document-relative overlays.
745
746         (WebCore::FrameView::setFixedVisibleContentRect):
747         (WebCore::FrameView::didChangeScrollOffset):
748         (WebCore::FrameView::scrollTo):
749         (WebCore::FrameView::wheelEvent):
750         Inform PageOverlayController that something scrolled.
751
752         (WebCore::FrameView::setExposedRect):
753         Inform PageOverlayController that the exposed rect changed, so it can push
754         the new exposed rect down to the overlays.
755
756         * page/FrameView.h:
757         Add didChangeScrollOffset.
758
759         * page/MainFrame.cpp:
760         (WebCore::MainFrame::MainFrame):
761         * page/MainFrame.h:
762         Keep one PageOverlayController per MainFrame.
763
764         * page/Page.cpp:
765         (WebCore::Page::setDeviceScaleFactor):
766         Inform PageOverlayController that the device scale factor changed.
767
768         (WebCore::Page::setSessionID):
769         Remove a blank line.
770
771         * page/PageOverlay.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp.
772         Move PageOverlay from WebKit2 to WebCore.
773         A few overarching changes that I won't detail in each place:
774             - references instead of pointers in many places
775             - WebCore types instead of WebKit2 types everywhere
776
777         (WebCore::PageOverlay::bounds):
778         It is possible to install an overlay before we have a FrameView.
779         We will eventually get a view/contents size changed notification and try again.
780
781         (WebCore::PageOverlay::copyAccessibilityAttributeStringValueForPoint):
782         (WebCore::PageOverlay::copyAccessibilityAttributeBoolValueForPoint):
783         (WebCore::PageOverlay::copyAccessibilityAttributeNames):
784         Split copyAccessibilityAttribute into "StringValueForPoint" and "BoolValueForPoint"
785         variants, because we don't have anything like WKTypeRef here.
786
787         * page/PageOverlay.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.h.
788         Make PageOverlay a normal RefCounted object instead of a WebKit2 API object.
789         Leave a comment noting that we should move the PageOverlay's GraphicsLayer
790         to PageOverlay instead of a map on PageOverlayController.
791
792         * page/PageOverlayController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp.
793         Move PageOverlayController from WebKit2 to WebCore.
794         A few overarching changes that I won't detail in each place:
795             - references instead of pointers in many places
796             - WebCore types instead of WebKit2 types everywhere
797
798         Leave a FIXME that didChangeSettings is not currently called when settings change.
799         This is not a problem for normal use of overlays, only for dynamically changing
800         layer border/repaint counter settings.
801
802         (WebCore::PageOverlayController::PageOverlayController):
803         (WebCore::PageOverlayController::createRootLayersIfNeeded):
804         We will now lazily initialize the root layers when we first try to use them,
805         because otherwise we try to create them before the ChromeClient's GraphicsLayerFactory
806         is hooked up, in some cases, and that can cause us to create the wrong kind of GraphicsLayers.
807
808         (WebCore::PageOverlayController::installPageOverlay):
809         Enter compositing mode when installing a PageOverlay.
810         Avoid pushing the Page to the PageOverlay until after we've set up
811         its root layer, so that the installation process can make use of that layer;
812         clients may, for example, expect to be able to setNeedsDisplay() in the
813         didMoveToPage callback.
814         Avoid updateOverlayGeometry until the layer is created and we've pushed
815         the Page down, so that e.g. bounds() will use the right Page.
816
817         (WebCore::PageOverlayController::didChangeSettings):
818         Leave a FIXME about a future improvement to didChangeSettings.
819
820         (WebCore::PageOverlayController::deviceScaleFactor):
821         (WebCore::PageOverlayController::notifyFlushRequired):
822         Null-check Page; these can get called when tearing down the Frame.
823
824         * page/PageOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.h.
825
826         * platform/graphics/GraphicsLayerClient.h:
827         Add wtf/Forward.h, because GraphicsLayerClient.h uses String.
828
829         * rendering/RenderLayer.cpp:
830         (WebCore::RenderLayer::scrollTo):
831         Inform PageOverlayController that something scrolled.
832
833         * rendering/RenderLayerCompositor.cpp:
834         (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers):
835         Make hasAnyAdditionalCompositedLayers return true if there are any page overlays,
836         because we need to avoid falling out of compositing mode if we still have
837         page overlays.
838
839         (WebCore::RenderLayerCompositor::updateCompositingLayers):
840         Enter compositing mode if we have page overlays.
841
842         (WebCore::RenderLayerCompositor::appendOverlayLayers): Deleted.
843         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
844         Rename appendOverlayLayers -> appendDocumentOverlayLayers.
845
846         (WebCore::RenderLayerCompositor::attachRootLayer):
847         (WebCore::RenderLayerCompositor::detachRootLayer):
848         Attach/detach the view overlay root layer when attaching/detaching the
849         normal compositing root layer.
850
851         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
852         * rendering/RenderLayerCompositor.h:
853
854 2014-10-02  Myles C. Maxfield  <mmaxfield@apple.com>
855
856         Back TextRun with a StringView
857         https://bugs.webkit.org/show_bug.cgi?id=137352
858
859         Reviewed by Antti Koivisto.
860
861         TextRun contains a union of a UChar* and an LChar* as well as a length, which is the abstraction
862         that StringView is intended to be. This patch cleans up TextRun by replacing the union and length
863         with a StringView instance member.
864
865         No new tests because there is no behavior change.
866
867         * platform/graphics/TextRun.h:
868         (WebCore::TextRun::TextRun):
869         (WebCore::TextRun::subRun):
870         (WebCore::TextRun::operator[]):
871         (WebCore::TextRun::data8):
872         (WebCore::TextRun::data16):
873         (WebCore::TextRun::characters8):
874         (WebCore::TextRun::characters16):
875         (WebCore::TextRun::is8Bit):
876         (WebCore::TextRun::length):
877         (WebCore::TextRun::string):
878         (WebCore::TextRun::setText):
879         (WebCore::TextRun::stringView):
880
881 2014-10-01  Christophe Dumez  <cdumez@apple.com>
882
883         Have is<>(T*) function do a null check on the pointer argument
884         https://bugs.webkit.org/show_bug.cgi?id=137333
885
886         Reviewed by Gavin Barraclough.
887
888         Have is<>(T*) function do a null check on the argument instead of a
889         simple assertion. This makes sense for 2 reasons:
890         1. It is more consistent with downcast<>(T*), which will succeed even
891            if the argument is a nullptr.
892         2. It simplifies the code a bit as it gets rid of a lot of explicit
893            null checks.
894
895         No new tests, no behavior change.
896
897         * Modules/indexeddb/IDBFactory.cpp:
898         * Modules/webaudio/OfflineAudioContext.cpp:
899         (WebCore::OfflineAudioContext::create):
900         * Modules/websockets/ThreadableWebSocketChannel.cpp:
901         (WebCore::ThreadableWebSocketChannel::create):
902         * Modules/websockets/WebSocket.cpp:
903         (WebCore::WebSocket::connect):
904         * Modules/websockets/WebSocketHandshake.cpp:
905         (WebCore::WebSocketHandshake::clientHandshakeMessage):
906         * accessibility/AXObjectCache.cpp:
907         (WebCore::AXObjectCache::focusedUIElementForPage):
908         (WebCore::createFromRenderer):
909         (WebCore::AXObjectCache::getOrCreate):
910         (WebCore::AXObjectCache::handleLiveRegionCreated):
911         (WebCore::AXObjectCache::handleAttributeChanged):
912         (WebCore::AXObjectCache::labelChanged):
913         (WebCore::AXObjectCache::rootAXEditableElement):
914         (WebCore::isNodeAriaVisible):
915         * accessibility/AccessibilityListBoxOption.cpp:
916         (WebCore::AccessibilityListBoxOption::isEnabled):
917         (WebCore::AccessibilityListBoxOption::isSelected):
918         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
919         (WebCore::AccessibilityListBoxOption::stringValue):
920         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
921         * accessibility/AccessibilityMediaControls.cpp:
922         (WebCore::AccessibilityMediaTimeline::valueDescription):
923         * accessibility/AccessibilityMenuListPopup.cpp:
924         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
925         * accessibility/AccessibilityNodeObject.cpp:
926         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
927         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
928         (WebCore::AccessibilityNodeObject::isNativeTextControl):
929         (WebCore::AccessibilityNodeObject::isNativeImage):
930         (WebCore::AccessibilityNodeObject::isInputImage):
931         (WebCore::AccessibilityNodeObject::isEnabled):
932         (WebCore::AccessibilityNodeObject::isPressed):
933         (WebCore::AccessibilityNodeObject::isHovered):
934         (WebCore::AccessibilityNodeObject::isReadOnly):
935         (WebCore::AccessibilityNodeObject::isRequired):
936         (WebCore::AccessibilityNodeObject::valueForRange):
937         (WebCore::AccessibilityNodeObject::maxValueForRange):
938         (WebCore::AccessibilityNodeObject::minValueForRange):
939         (WebCore::AccessibilityNodeObject::isControl):
940         (WebCore::AccessibilityNodeObject::anchorElement):
941         (WebCore::isNodeActionElement):
942         (WebCore::AccessibilityNodeObject::mouseButtonListener):
943         (WebCore::AccessibilityNodeObject::labelForElement):
944         (WebCore::AccessibilityNodeObject::titleElementText):
945         (WebCore::AccessibilityNodeObject::alternativeText):
946         (WebCore::AccessibilityNodeObject::visibleText):
947         (WebCore::AccessibilityNodeObject::accessibilityDescription):
948         (WebCore::AccessibilityNodeObject::helpText):
949         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
950         (WebCore::AccessibilityNodeObject::textUnderElement):
951         (WebCore::AccessibilityNodeObject::title):
952         (WebCore::AccessibilityNodeObject::colorValue):
953         (WebCore::accessibleNameForNode):
954         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
955         * accessibility/AccessibilityObject.cpp:
956         (WebCore::AccessibilityObject::press):
957         (WebCore::AccessibilityObject::hasTagName):
958         (WebCore::AccessibilityObject::hasAttribute):
959         (WebCore::AccessibilityObject::element):
960         (WebCore::AccessibilityObject::classList):
961         * accessibility/AccessibilityRenderObject.cpp:
962         (WebCore::AccessibilityRenderObject::isFileUploadButton):
963         (WebCore::AccessibilityRenderObject::anchorElement):
964         (WebCore::AccessibilityRenderObject::helpText):
965         (WebCore::AccessibilityRenderObject::labelElementContainer):
966         (WebCore::AccessibilityRenderObject::internalLinkElement):
967         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
968         (WebCore::AccessibilityRenderObject::titleUIElement):
969         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
970         (WebCore::AccessibilityRenderObject::accessKey):
971         (WebCore::AccessibilityRenderObject::url):
972         (WebCore::AccessibilityRenderObject::setElementAttributeValue):
973         (WebCore::AccessibilityRenderObject::setFocused):
974         (WebCore::AccessibilityRenderObject::setValue):
975         (WebCore::AccessibilityRenderObject::getDocumentLinks):
976         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
977         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
978         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
979         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
980         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
981         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
982         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
983         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
984         (WebCore::AccessibilityRenderObject::setAccessibleName):
985         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
986         (WebCore::AccessibilityRenderObject::isLinked):
987         (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
988         (WebCore::AccessibilityRenderObject::isMathElement):
989         * accessibility/AccessibilitySearchFieldButtons.cpp:
990         (WebCore::AccessibilitySearchFieldCancelButton::press):
991         * accessibility/AccessibilityTable.cpp:
992         (WebCore::AccessibilityTable::tableElement):
993         (WebCore::AccessibilityTable::isDataTable):
994         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
995         (WebCore::AccessibilityTable::title):
996         * accessibility/atk/AXObjectCacheAtk.cpp:
997         (WebCore::notifyChildrenSelectionChange):
998         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
999         (webkitAccessibleTableGetCaption):
1000         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1001         (webkitAccessibleGetName):
1002         (webkitAccessibleGetDescription):
1003         (webkitAccessibleGetAttributes):
1004         * bindings/gobject/WebKitDOMPrivate.cpp:
1005         (WebKit::wrap):
1006         * bindings/js/JSAudioContextCustom.cpp:
1007         (WebCore::constructJSAudioContext):
1008         * bindings/js/JSDOMGlobalObject.cpp:
1009         (WebCore::toJSDOMGlobalObject):
1010         * bindings/js/JSDOMWindowCustom.cpp:
1011         (WebCore::namedItemGetter):
1012         (WebCore::JSDOMWindow::getOwnPropertySlot):
1013         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1014         * bindings/js/JSElementCustom.cpp:
1015         (WebCore::toJSNewlyCreated):
1016         * bindings/js/JSErrorHandler.cpp:
1017         (WebCore::JSErrorHandler::handleEvent):
1018         * bindings/js/JSEventListener.cpp:
1019         (WebCore::JSEventListener::handleEvent):
1020         * bindings/js/JSHTMLDocumentCustom.cpp:
1021         (WebCore::JSHTMLDocument::nameGetter):
1022         * bindings/js/JSLazyEventListener.cpp:
1023         (WebCore::JSLazyEventListener::initializeJSFunction):
1024         * bindings/js/JSNodeCustom.cpp:
1025         (WebCore::isReachableFromDOM):
1026         (WebCore::createWrapperInline):
1027         * bindings/js/ScheduledAction.cpp:
1028         (WebCore::ScheduledAction::execute):
1029         * bindings/js/ScriptState.cpp:
1030         (WebCore::frameFromExecState):
1031         * bindings/objc/DOM.mm:
1032         (kitClass):
1033         * css/CSSCursorImageValue.cpp:
1034         (WebCore::resourceReferencedByCursorElement):
1035         * css/CSSStyleSheet.cpp:
1036         (WebCore::isAcceptableCSSStyleSheetParent):
1037         * css/SelectorChecker.cpp:
1038         (WebCore::SelectorChecker::checkOne):
1039         * css/SelectorCheckerTestFunctions.h:
1040         (WebCore::isAutofilled):
1041         (WebCore::isDisabled):
1042         (WebCore::isEnabled):
1043         (WebCore::isChecked):
1044         (WebCore::matchesLangPseudoClass):
1045         (WebCore::matchesFutureCuePseudoClass):
1046         (WebCore::matchesPastCuePseudoClass):
1047         * css/StyleResolver.cpp:
1048         (WebCore::StyleResolver::State::initElement):
1049         (WebCore::StyleResolver::locateCousinList):
1050         (WebCore::elementHasDirectionAuto):
1051         (WebCore::StyleResolver::canShareStyleWithElement):
1052         (WebCore::StyleResolver::findSiblingForStyleSharing):
1053         (WebCore::StyleResolver::adjustRenderStyle):
1054         (WebCore::StyleResolver::useSVGZoomRulesForLength):
1055         * css/StyleSheetList.cpp:
1056         (WebCore::StyleSheetList::getNamedItem):
1057         * dom/Attr.cpp:
1058         (WebCore::Attr::style):
1059         * dom/CharacterData.cpp:
1060         (WebCore::CharacterData::parserAppendData):
1061         (WebCore::CharacterData::setDataAndUpdate):
1062         * dom/ContainerNode.cpp:
1063         (WebCore::checkAcceptChild):
1064         (WebCore::ContainerNode::notifyChildRemoved):
1065         * dom/ContainerNodeAlgorithms.cpp:
1066         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
1067         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
1068         * dom/CurrentScriptIncrementer.h:
1069         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
1070         * dom/DataTransfer.cpp:
1071         (WebCore::DataTransfer::setDragImage):
1072         * dom/Document.cpp:
1073         (WebCore::Document::elementFromPoint):
1074         (WebCore::Document::setTitle):
1075         (WebCore::Document::iconURLs):
1076         (WebCore::eventTargetElementForDocument):
1077         (WebCore::Document::updateHoverActiveState):
1078         * dom/DocumentStyleSheetCollection.cpp:
1079         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1080         * dom/Element.cpp:
1081         (WebCore::Element::computeInheritedLanguage):
1082         * dom/Element.h:
1083         (WebCore::Node::parentElement):
1084         * dom/ElementTraversal.h:
1085         (WebCore::Traversal<Element>::nextTemplate):
1086         (WebCore::ElementTraversal::previousIncludingPseudo):
1087         (WebCore::ElementTraversal::nextIncludingPseudo):
1088         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
1089         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
1090         * dom/EventDispatcher.cpp:
1091         (WebCore::WindowEventContext::WindowEventContext):
1092         (WebCore::EventDispatcher::dispatchEvent):
1093         (WebCore::nodeOrHostIfPseudoElement):
1094         (WebCore::EventPath::EventPath):
1095         * dom/EventTarget.cpp:
1096         (WebCore::EventTarget::fireEventListeners):
1097         * dom/KeyboardEvent.cpp:
1098         (WebCore::findKeyboardEvent):
1099         * dom/LiveNodeList.cpp:
1100         (WebCore::LiveNodeList::namedItem):
1101         * dom/MessagePort.cpp:
1102         (WebCore::MessagePort::dispatchMessages):
1103         * dom/MouseEvent.cpp:
1104         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
1105         * dom/NamedNodeMap.cpp:
1106         (WebCore::NamedNodeMap::setNamedItem):
1107         * dom/Node.cpp:
1108         (WebCore::Node::dumpStatistics):
1109         (WebCore::Node::pseudoAwarePreviousSibling):
1110         (WebCore::Node::pseudoAwareNextSibling):
1111         (WebCore::Node::computedStyle):
1112         (WebCore::Node::parentOrShadowHostElement):
1113         (WebCore::Node::rootEditableElement):
1114         (WebCore::Node::ancestorElement):
1115         (WebCore::Node::compareDocumentPosition):
1116         (WebCore::appendAttributeDesc):
1117         (WebCore::Node::showNodePathForThis):
1118         (WebCore::Node::enclosingLinkEventParentOrSelf):
1119         (WebCore::Node::dispatchEvent):
1120         (WebCore::Node::defaultEventHandler):
1121         * dom/NodeRenderingTraversal.cpp:
1122         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
1123         (WebCore::NodeRenderingTraversal::traverseParent):
1124         * dom/NodeTraversal.cpp:
1125         (WebCore::NodeTraversal::previousIncludingPseudo):
1126         (WebCore::NodeTraversal::nextIncludingPseudo):
1127         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
1128         * dom/Position.cpp:
1129         (WebCore::Position::element):
1130         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
1131         (WebCore::Position::isRenderedCharacter):
1132         (WebCore::Position::leadingWhitespacePosition):
1133         * dom/Range.cpp:
1134         (WebCore::Range::insertNode):
1135         (WebCore::Range::getBorderAndTextQuads):
1136         * dom/ScriptElement.cpp:
1137         (WebCore::toScriptElementIfPossible):
1138         * dom/ShadowRoot.h:
1139         (WebCore::Node::parentOrShadowHostNode):
1140         * dom/Text.cpp:
1141         (WebCore::earliestLogicallyAdjacentTextNode):
1142         (WebCore::latestLogicallyAdjacentTextNode):
1143         (WebCore::isSVGShadowText):
1144         * dom/TextNodeTraversal.cpp:
1145         (WebCore::TextNodeTraversal::contentsAsString):
1146         * dom/TextNodeTraversal.h:
1147         (WebCore::TextNodeTraversal::firstTextChildTemplate):
1148         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
1149         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
1150         (WebCore::TextNodeTraversal::nextSibling):
1151         * dom/TreeScopeAdopter.cpp:
1152         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1153         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
1154         * editing/ApplyBlockElementCommand.cpp:
1155         (WebCore::isNewLineAtPosition):
1156         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
1157         * editing/ApplyStyleCommand.cpp:
1158         (WebCore::isLegacyAppleStyleSpan):
1159         (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
1160         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
1161         (WebCore::isEmptyFontTag):
1162         (WebCore::ApplyStyleCommand::applyBlockStyle):
1163         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1164         (WebCore::dummySpanAncestorForNode):
1165         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1166         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
1167         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
1168         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
1169         (WebCore::ApplyStyleCommand::splitTextAtEnd):
1170         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
1171         (WebCore::ApplyStyleCommand::shouldSplitTextElement):
1172         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
1173         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
1174         (WebCore::ApplyStyleCommand::joinChildTextNodes):
1175         * editing/BreakBlockquoteCommand.cpp:
1176         (WebCore::BreakBlockquoteCommand::doApply):
1177         * editing/CompositeEditCommand.cpp:
1178         (WebCore::CompositeEditCommand::isRemovableBlock):
1179         (WebCore::CompositeEditCommand::insertNodeAt):
1180         (WebCore::CompositeEditCommand::canRebalance):
1181         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
1182         (WebCore::CompositeEditCommand::deleteInsignificantText):
1183         (WebCore::CompositeEditCommand::removePlaceholderAt):
1184         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
1185         (WebCore::CompositeEditCommand::moveParagraphs):
1186         * editing/DeleteButtonController.cpp:
1187         (WebCore::enclosingDeletableElement):
1188         * editing/DeleteSelectionCommand.cpp:
1189         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1190         (WebCore::DeleteSelectionCommand::fixupWhitespace):
1191         (WebCore::DeleteSelectionCommand::doApply):
1192         * editing/EditingStyle.cpp:
1193         (WebCore::EditingStyle::wrappingStyleForSerialization):
1194         * editing/Editor.cpp:
1195         (WebCore::imageElementFromImageDocument):
1196         (WebCore::Editor::shouldInsertFragment):
1197         (WebCore::Editor::setBaseWritingDirection):
1198         (WebCore::Editor::setComposition):
1199         (WebCore::Editor::isSpellCheckingEnabledFor):
1200         (WebCore::Editor::applyEditingStyleToElement):
1201         * editing/FormatBlockCommand.cpp:
1202         (WebCore::isElementForFormatBlock):
1203         * editing/FrameSelection.cpp:
1204         (WebCore::removingNodeRemovesPosition):
1205         (WebCore::CaretBase::paintCaret):
1206         (WebCore::FrameSelection::debugRenderer):
1207         (WebCore::FrameSelection::selectAll):
1208         (WebCore::scanForForm):
1209         * editing/InsertLineBreakCommand.cpp:
1210         (WebCore::InsertLineBreakCommand::doApply):
1211         * editing/InsertListCommand.cpp:
1212         (WebCore::InsertListCommand::mergeWithNeighboringLists):
1213         * editing/InsertParagraphSeparatorCommand.cpp:
1214         (WebCore::InsertParagraphSeparatorCommand::doApply):
1215         * editing/InsertTextCommand.cpp:
1216         (WebCore::InsertTextCommand::insertTab):
1217         * editing/ReplaceSelectionCommand.cpp:
1218         (WebCore::haveSameTagName):
1219         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1220         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
1221         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
1222         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
1223         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
1224         (WebCore::ReplaceSelectionCommand::insertAsListItems):
1225         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
1226         * editing/SpellChecker.cpp:
1227         (WebCore::SpellChecker::isCheckable):
1228         * editing/SplitTextNodeContainingElementCommand.cpp:
1229         (WebCore::SplitTextNodeContainingElementCommand::doApply):
1230         * editing/TextIterator.cpp:
1231         (WebCore::isRendererReplacedElement):
1232         * editing/VisibleSelection.cpp:
1233         (WebCore::VisibleSelection::isInPasswordField):
1234         * editing/VisibleUnits.cpp:
1235         (WebCore::startPositionForLine):
1236         (WebCore::endPositionForLine):
1237         (WebCore::startOfParagraph):
1238         (WebCore::endOfParagraph):
1239         * editing/cocoa/HTMLConverter.mm:
1240         (HTMLConverter::aggregatedAttributesForAncestors):
1241         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
1242         (WebCore::editingAttributedStringFromRange):
1243         * editing/htmlediting.cpp:
1244         (WebCore::enclosingBlock):
1245         (WebCore::enclosingElementWithTag):
1246         (WebCore::enclosingAnchorElement):
1247         (WebCore::enclosingList):
1248         (WebCore::lineBreakExistsAtPosition):
1249         (WebCore::areIdenticalElements):
1250         (WebCore::isNonTableCellHTMLBlockElement):
1251         (WebCore::deprecatedEnclosingBlockFlowElement):
1252         * editing/ios/EditorIOS.mm:
1253         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1254         * editing/markup.cpp:
1255         (WebCore::StyledMarkupAccumulator::appendText):
1256         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
1257         (WebCore::isPlainTextMarkup):
1258         * fileapi/FileReader.cpp:
1259         (WebCore::FileReader::readAsArrayBuffer):
1260         (WebCore::FileReader::readAsBinaryString):
1261         (WebCore::FileReader::readAsText):
1262         (WebCore::FileReader::readAsDataURL):
1263         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1264         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
1265         * html/FTPDirectoryDocument.cpp:
1266         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
1267         * html/FormAssociatedElement.cpp:
1268         (WebCore::FormAssociatedElement::findAssociatedForm):
1269         * html/HTMLAnchorElement.cpp:
1270         (WebCore::appendServerMapMousePosition):
1271         (WebCore::HTMLAnchorElement::defaultEventHandler):
1272         (WebCore::HTMLAnchorElement::eventType):
1273         (WebCore::isEnterKeyKeydownEvent):
1274         (WebCore::isLinkClick):
1275         * html/HTMLAreaElement.cpp:
1276         (WebCore::HTMLAreaElement::imageElement):
1277         * html/HTMLBodyElement.cpp:
1278         (WebCore::HTMLBodyElement::insertedInto):
1279         * html/HTMLButtonElement.cpp:
1280         (WebCore::HTMLButtonElement::defaultEventHandler):
1281         * html/HTMLCollection.cpp:
1282         (WebCore::HTMLCollection::namedItem):
1283         (WebCore::HTMLCollection::updateNamedElementCache):
1284         * html/HTMLDocument.cpp:
1285         (WebCore::HTMLDocument::bgColor):
1286         (WebCore::HTMLDocument::setBgColor):
1287         (WebCore::HTMLDocument::fgColor):
1288         (WebCore::HTMLDocument::setFgColor):
1289         (WebCore::HTMLDocument::alinkColor):
1290         (WebCore::HTMLDocument::setAlinkColor):
1291         (WebCore::HTMLDocument::linkColor):
1292         (WebCore::HTMLDocument::setLinkColor):
1293         (WebCore::HTMLDocument::vlinkColor):
1294         (WebCore::HTMLDocument::setVlinkColor):
1295         (WebCore::HTMLDocument::isFrameSet):
1296         * html/HTMLElement.cpp:
1297         (WebCore::HTMLElement::matchesReadWritePseudoClass):
1298         (WebCore::mergeWithNextTextNode):
1299         (WebCore::HTMLElement::setOuterHTML):
1300         (WebCore::HTMLElement::setOuterText):
1301         (WebCore::HTMLElement::insertAdjacentElement):
1302         (WebCore::contextElementForInsertion):
1303         (WebCore::HTMLElement::directionality):
1304         (WebCore::HTMLElement::dirAttributeChanged):
1305         * html/HTMLEmbedElement.cpp:
1306         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1307         * html/HTMLFieldSetElement.cpp:
1308         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
1309         (WebCore::HTMLFieldSetElement::disabledStateChanged):
1310         * html/HTMLFormControlElement.cpp:
1311         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
1312         (WebCore::shouldAutofocus):
1313         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
1314         * html/HTMLFormElement.cpp:
1315         (WebCore::HTMLFormElement::rendererIsNeeded):
1316         (WebCore::HTMLFormElement::submitImplicitly):
1317         (WebCore::submitElementFromEvent):
1318         (WebCore::HTMLFormElement::validateInteractively):
1319         (WebCore::HTMLFormElement::submit):
1320         (WebCore::HTMLFormElement::reset):
1321         (WebCore::HTMLFormElement::defaultButton):
1322         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
1323         * html/HTMLFrameOwnerElement.cpp:
1324         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
1325         * html/HTMLFrameSetElement.cpp:
1326         (WebCore::HTMLFrameSetElement::defaultEventHandler):
1327         * html/HTMLInputElement.cpp:
1328         (WebCore::HTMLInputElement::defaultEventHandler):
1329         (WebCore::HTMLInputElement::dataList):
1330         * html/HTMLLabelElement.cpp:
1331         (WebCore::nodeAsSupportedLabelableElement):
1332         * html/HTMLLegendElement.cpp:
1333         (WebCore::HTMLLegendElement::virtualForm):
1334         * html/HTMLMediaElement.cpp:
1335         (WebCore::HTMLMediaElement::parseAttribute):
1336         * html/HTMLObjectElement.cpp:
1337         (WebCore::HTMLObjectElement::hasFallbackContent):
1338         (WebCore::HTMLObjectElement::updateDocNamedItem):
1339         * html/HTMLOptGroupElement.cpp:
1340         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
1341         (WebCore::HTMLOptGroupElement::ownerSelectElement):
1342         * html/HTMLOptionElement.cpp:
1343         (WebCore::HTMLOptionElement::setText):
1344         (WebCore::HTMLOptionElement::index):
1345         (WebCore::HTMLOptionElement::ownerDataListElement):
1346         (WebCore::HTMLOptionElement::ownerSelectElement):
1347         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
1348         (WebCore::HTMLOptionElement::isDisabledFormControl):
1349         (WebCore::HTMLOptionElement::collectOptionInnerText):
1350         * html/HTMLPlugInImageElement.cpp:
1351         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
1352         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
1353         * html/HTMLScriptElement.cpp:
1354         (WebCore::HTMLScriptElement::setText):
1355         * html/HTMLSelectElement.cpp:
1356         (WebCore::HTMLSelectElement::nextValidIndex):
1357         (WebCore::HTMLSelectElement::saveLastSelection):
1358         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
1359         (WebCore::HTMLSelectElement::updateListBoxSelection):
1360         (WebCore::HTMLSelectElement::listBoxOnChange):
1361         (WebCore::HTMLSelectElement::recalcListItems):
1362         (WebCore::HTMLSelectElement::selectedIndex):
1363         (WebCore::HTMLSelectElement::selectOption):
1364         (WebCore::HTMLSelectElement::optionToListIndex):
1365         (WebCore::HTMLSelectElement::listToOptionIndex):
1366         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
1367         (WebCore::HTMLSelectElement::saveFormControlState):
1368         (WebCore::HTMLSelectElement::searchOptionsForValue):
1369         (WebCore::HTMLSelectElement::restoreFormControlState):
1370         (WebCore::HTMLSelectElement::appendFormData):
1371         (WebCore::HTMLSelectElement::reset):
1372         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1373         (WebCore::HTMLSelectElement::updateSelectedState):
1374         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1375         (WebCore::HTMLSelectElement::defaultEventHandler):
1376         (WebCore::HTMLSelectElement::lastSelectedListIndex):
1377         (WebCore::HTMLSelectElement::optionAtIndex):
1378         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
1379         (WebCore::HTMLSelectElement::length):
1380         * html/HTMLSourceElement.cpp:
1381         (WebCore::HTMLSourceElement::insertedInto):
1382         (WebCore::HTMLSourceElement::removedFrom):
1383         * html/HTMLSummaryElement.cpp:
1384         (WebCore::isClickableControl):
1385         (WebCore::HTMLSummaryElement::defaultEventHandler):
1386         * html/HTMLTableElement.cpp:
1387         (WebCore::HTMLTableElement::caption):
1388         * html/HTMLTablePartElement.cpp:
1389         (WebCore::HTMLTablePartElement::findParentTable):
1390         * html/HTMLTableRowElement.cpp:
1391         (WebCore::HTMLTableRowElement::rowIndex):
1392         * html/HTMLTableRowsCollection.cpp:
1393         (WebCore::HTMLTableRowsCollection::rowAfter):
1394         (WebCore::HTMLTableRowsCollection::lastRow):
1395         * html/HTMLTextAreaElement.cpp:
1396         (WebCore::HTMLTextAreaElement::defaultEventHandler):
1397         * html/HTMLTextFormControlElement.cpp:
1398         (WebCore::HTMLTextFormControlElement::innerTextValue):
1399         (WebCore::positionForIndex):
1400         (WebCore::HTMLTextFormControlElement::indexForPosition):
1401         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
1402         * html/HTMLTitleElement.cpp:
1403         (WebCore::HTMLTitleElement::setText):
1404         * html/HTMLTrackElement.cpp:
1405         (WebCore::HTMLTrackElement::mediaElement):
1406         * html/ImageDocument.cpp:
1407         (WebCore::ImageEventListener::handleEvent):
1408         * html/InputType.cpp:
1409         (WebCore::InputType::shouldSubmitImplicitly):
1410         * html/MediaDocument.cpp:
1411         (WebCore::ancestorVideoElement):
1412         (WebCore::MediaDocument::defaultEventHandler):
1413         * html/RadioInputType.cpp:
1414         (WebCore::RadioInputType::handleKeydownEvent):
1415         (WebCore::RadioInputType::isKeyboardFocusable):
1416         * html/TextFieldInputType.cpp:
1417         (WebCore::TextFieldInputType::shouldSubmitImplicitly):
1418         * html/parser/HTMLConstructionSite.cpp:
1419         (WebCore::hasImpliedEndTag):
1420         (WebCore::HTMLConstructionSite::attachLater):
1421         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
1422         (WebCore::HTMLConstructionSite::insertTextNode):
1423         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
1424         (WebCore::HTMLConstructionSite::findFosterSite):
1425         * html/parser/HTMLElementStack.cpp:
1426         (WebCore::HTMLNames::isScopeMarker):
1427         (WebCore::HTMLNames::isTableScopeMarker):
1428         (WebCore::HTMLNames::isSelectScopeMarker):
1429         * html/parser/HTMLTreeBuilder.cpp:
1430         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1431         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1432         (WebCore::HTMLTreeBuilder::processStartTag):
1433         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
1434         (WebCore::HTMLTreeBuilder::processEndTag):
1435         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1436         * html/shadow/InsertionPoint.h:
1437         (WebCore::isActiveInsertionPoint):
1438         (WebCore::parentNodeForDistribution):
1439         (WebCore::parentElementForDistribution):
1440         * html/shadow/MediaControlElementTypes.cpp:
1441         (WebCore::parentMediaElement):
1442         (WebCore::mediaControlElementType):
1443         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
1444         * html/shadow/MediaControlElements.cpp:
1445         (WebCore::MediaControlPanelElement::defaultEventHandler):
1446         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
1447         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
1448         (WebCore::MediaControlTimelineElement::defaultEventHandler):
1449         * html/shadow/MediaControls.cpp:
1450         (WebCore::MediaControls::containsRelatedTarget):
1451         * html/shadow/MediaControlsApple.cpp:
1452         (WebCore::MediaControlsAppleEventListener::handleEvent):
1453         * html/shadow/SliderThumbElement.cpp:
1454         (WebCore::SliderThumbElement::defaultEventHandler):
1455         * html/shadow/SpinButtonElement.cpp:
1456         (WebCore::SpinButtonElement::defaultEventHandler):
1457         (WebCore::SpinButtonElement::forwardEvent):
1458         * html/shadow/TextControlInnerElements.cpp:
1459         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1460         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1461         * html/track/VTTCue.cpp:
1462         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
1463         (WebCore::VTTCue::markFutureAndPastNodes):
1464         * inspector/InspectorCSSAgent.cpp:
1465         (WebCore::InspectorCSSAgent::elementForId):
1466         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
1467         * inspector/InspectorDOMAgent.cpp:
1468         (WebCore::InspectorDOMAgent::unbind):
1469         (WebCore::InspectorDOMAgent::assertDocument):
1470         (WebCore::InspectorDOMAgent::assertElement):
1471         (WebCore::InspectorDOMAgent::querySelector):
1472         (WebCore::InspectorDOMAgent::querySelectorAll):
1473         (WebCore::InspectorDOMAgent::setNodeName):
1474         (WebCore::InspectorDOMAgent::buildObjectForNode):
1475         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1476         (WebCore::InspectorDOMAgent::innerParentNode):
1477         * inspector/InspectorFrontendHost.cpp:
1478         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
1479         * inspector/InspectorInstrumentation.cpp:
1480         (WebCore::frameForScriptExecutionContext):
1481         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
1482         * inspector/InspectorInstrumentation.h:
1483         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
1484         * inspector/InspectorNodeFinder.cpp:
1485         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
1486         (WebCore::InspectorNodeFinder::searchUsingXPath):
1487         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
1488         * inspector/InspectorOverlay.cpp:
1489         (WebCore::buildObjectForElementInfo):
1490         * inspector/InspectorStyleSheet.cpp:
1491         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
1492         * loader/FormSubmission.cpp:
1493         (WebCore::FormSubmission::create):
1494         * loader/FrameLoader.cpp:
1495         (WebCore::FrameLoader::handleFallbackContent):
1496         * loader/SubframeLoader.cpp:
1497         (WebCore::SubframeLoader::loadPlugin):
1498         * loader/ThreadableLoader.cpp:
1499         (WebCore::ThreadableLoader::create):
1500         (WebCore::ThreadableLoader::loadResourceSynchronously):
1501         * loader/cache/MemoryCache.cpp:
1502         (WebCore::MemoryCache::removeRequestFromCache):
1503         (WebCore::MemoryCache::removeRequestFromSessionCaches):
1504         * mathml/MathMLElement.cpp:
1505         (WebCore::MathMLElement::attributeChanged):
1506         * mathml/MathMLSelectElement.cpp:
1507         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
1508         * page/Chrome.cpp:
1509         (WebCore::Chrome::setToolTip):
1510         * page/ContextMenuController.cpp:
1511         (WebCore::ContextMenuController::maybeCreateContextMenu):
1512         (WebCore::ContextMenuController::populate):
1513         * page/DOMTimer.cpp:
1514         (WebCore::DOMTimer::install):
1515         (WebCore::DOMTimer::fired):
1516         * page/DragController.cpp:
1517         (WebCore::elementUnderMouse):
1518         (WebCore::DragController::operationForLoad):
1519         (WebCore::DragController::canProcessDrag):
1520         (WebCore::DragController::draggableElement):
1521         * page/EventHandler.cpp:
1522         (WebCore::EventHandler::handleMousePressEvent):
1523         (WebCore::isSubmitImage):
1524         (WebCore::targetIsFrame):
1525         (WebCore::findDropZone):
1526         (WebCore::EventHandler::updateDragAndDrop):
1527         (WebCore::EventHandler::updateMouseEventTargetNode):
1528         (WebCore::EventHandler::handleTextInputEvent):
1529         * page/FocusController.cpp:
1530         (WebCore::FocusNavigationScope::owner):
1531         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
1532         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
1533         (WebCore::FocusController::findElementWithExactTabIndex):
1534         (WebCore::nextElementWithGreaterTabIndex):
1535         (WebCore::previousElementWithLowerTabIndex):
1536         (WebCore::FocusController::nextFocusableElement):
1537         (WebCore::FocusController::previousFocusableElement):
1538         (WebCore::clearSelectionIfNeeded):
1539         (WebCore::FocusController::advanceFocusDirectionally):
1540         * page/Frame.cpp:
1541         (WebCore::Frame::searchForLabelsBeforeElement):
1542         (WebCore::Frame::setPageAndTextZoomFactors):
1543         * page/FrameView.cpp:
1544         (WebCore::FrameView::init):
1545         (WebCore::FrameView::scrollToAnchor):
1546         * page/PageSerializer.cpp:
1547         (WebCore::PageSerializer::serializeFrame):
1548         * page/SpatialNavigation.cpp:
1549         (WebCore::FocusCandidate::FocusCandidate):
1550         (WebCore::scrollInDirection):
1551         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
1552         (WebCore::canScrollInDirection):
1553         (WebCore::nodeRectInAbsoluteCoordinates):
1554         (WebCore::areElementsOnSameLine):
1555         * page/ios/FrameIOS.mm:
1556         (WebCore::ancestorRespondingToClickEvents):
1557         * platform/network/FormData.cpp:
1558         (WebCore::FormData::appendKeyValuePairItems):
1559         * rendering/HitTestResult.cpp:
1560         (WebCore::HitTestResult::setInnerNode):
1561         (WebCore::HitTestResult::setInnerNonSharedNode):
1562         (WebCore::HitTestResult::title):
1563         (WebCore::HitTestResult::innerTextIfTruncated):
1564         (WebCore::HitTestResult::mediaSupportsFullscreen):
1565         (WebCore::HitTestResult::enterFullscreenForVideo):
1566         (WebCore::HitTestResult::mediaIsVideo):
1567         (WebCore::HitTestResult::innerElement):
1568         (WebCore::HitTestResult::innerNonSharedElement):
1569         * rendering/RenderBlockFlow.cpp:
1570         (WebCore::resizeTextPermitted):
1571         * rendering/RenderBox.cpp:
1572         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
1573         * rendering/RenderCounter.cpp:
1574         (WebCore::planCounter):
1575         * rendering/RenderDetailsMarker.cpp:
1576         (WebCore::RenderDetailsMarker::isOpen):
1577         * rendering/RenderEmbeddedObject.cpp:
1578         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
1579         * rendering/RenderFileUploadControl.cpp:
1580         (WebCore::RenderFileUploadControl::uploadButton):
1581         * rendering/RenderImage.cpp:
1582         (WebCore::RenderImage::paintAreaElementFocusRing):
1583         (WebCore::RenderImage::paintIntoRect):
1584         (WebCore::RenderImage::imageMap):
1585         * rendering/RenderLayer.cpp:
1586         (WebCore::RenderLayer::scrollRectToVisible):
1587         (WebCore::RenderLayer::resize):
1588         (WebCore::RenderLayer::updateSnapOffsets):
1589         * rendering/RenderLayerBacking.cpp:
1590         (WebCore::isRestartedPlugin):
1591         * rendering/RenderListBox.cpp:
1592         (WebCore::RenderListBox::updateFromElement):
1593         (WebCore::RenderListBox::addFocusRingRects):
1594         (WebCore::RenderListBox::paintItemForeground):
1595         (WebCore::RenderListBox::paintItemBackground):
1596         * rendering/RenderMarquee.cpp:
1597         (WebCore::RenderMarquee::marqueeSpeed):
1598         * rendering/RenderMenuList.cpp:
1599         (WebCore::selectedOptionCount):
1600         (RenderMenuList::updateOptionsWidth):
1601         (RenderMenuList::setTextFromOption):
1602         (RenderMenuList::itemText):
1603         (RenderMenuList::itemIsEnabled):
1604         (RenderMenuList::itemIsLabel):
1605         (RenderMenuList::itemIsSelected):
1606         * rendering/RenderMeter.cpp:
1607         (WebCore::RenderMeter::meterElement):
1608         * rendering/RenderNamedFlowThread.cpp:
1609         (WebCore::RenderNamedFlowThread::isChildAllowed):
1610         * rendering/RenderObject.cpp:
1611         (WebCore::RenderObject::addPDFURLRect):
1612         (WebCore::RenderObject::shouldRespectImageOrientation):
1613         (WebCore::RenderObject::updateDragState):
1614         (WebCore::RenderObject::getUncachedPseudoStyle):
1615         (WebCore::RenderObject::getTextDecorationColors):
1616         * rendering/RenderProgress.cpp:
1617         (WebCore::RenderProgress::progressElement):
1618         * rendering/RenderSnapshottedPlugIn.cpp:
1619         (WebCore::RenderSnapshottedPlugIn::handleEvent):
1620         * rendering/RenderTable.cpp:
1621         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
1622         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1623         * rendering/RenderTableCell.cpp:
1624         (WebCore::RenderTableCell::parseColSpanFromDOM):
1625         (WebCore::RenderTableCell::parseRowSpanFromDOM):
1626         * rendering/RenderTheme.cpp:
1627         (WebCore::RenderTheme::isEnabled):
1628         (WebCore::RenderTheme::isFocused):
1629         (WebCore::RenderTheme::isPressed):
1630         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
1631         (WebCore::RenderTheme::isReadOnlyControl):
1632         (WebCore::RenderTheme::isHovered):
1633         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
1634         (WebCore::RenderTheme::paintSliderTicks):
1635         * rendering/RenderThemeGtk.cpp:
1636         (WebCore::getMediaElementFromRenderObject):
1637         (WebCore::nodeHasClass):
1638         * rendering/RenderThemeMac.mm:
1639         (WebCore::RenderThemeMac::updatePressedState):
1640         (WebCore::RenderThemeMac::paintSliderThumb):
1641         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1642         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1643         * rendering/RenderTreeAsText.cpp:
1644         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
1645         (WebCore::RenderTreeAsText::writeRenderObject):
1646         * rendering/TextAutosizer.cpp:
1647         (WebCore::TextAutosizer::isAutosizingContainer):
1648         (WebCore::TextAutosizer::containerContainsOneOfTags):
1649         * rendering/mathml/RenderMathMLBlock.cpp:
1650         (WebCore::RenderMathMLBlock::isChildAllowed):
1651         * rendering/svg/RenderSVGGradientStop.cpp:
1652         (WebCore::RenderSVGGradientStop::gradientElement):
1653         * rendering/svg/RenderSVGTransformableContainer.cpp:
1654         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
1655         * rendering/svg/SVGRenderingContext.cpp:
1656         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1657         * style/StyleResolveTree.cpp:
1658         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
1659         (WebCore::Style::attachChildren):
1660         (WebCore::Style::attachDistributedChildren):
1661         (WebCore::Style::detachDistributedChildren):
1662         (WebCore::Style::detachChildren):
1663         (WebCore::Style::resolveShadowTree):
1664         (WebCore::Style::resolveTree):
1665         * svg/SVGAElement.cpp:
1666         (WebCore::SVGAElement::defaultEventHandler):
1667         * svg/SVGAltGlyphElement.cpp:
1668         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
1669         * svg/SVGAnimateMotionElement.cpp:
1670         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
1671         * svg/SVGDocument.cpp:
1672         (WebCore::SVGDocument::rootElement):
1673         * svg/SVGElement.cpp:
1674         (WebCore::SVGElement::isOutermostSVGSVGElement):
1675         (WebCore::SVGElement::ownerSVGElement):
1676         (WebCore::SVGElement::viewportElement):
1677         * svg/SVGFontData.cpp:
1678         (WebCore::SVGFontData::applySVGGlyphSelection):
1679         * svg/SVGFontFaceElement.cpp:
1680         (WebCore::SVGFontFaceElement::associatedFontElement):
1681         (WebCore::SVGFontFaceElement::rebuildFontFace):
1682         * svg/SVGFontFaceSrcElement.cpp:
1683         (WebCore::SVGFontFaceSrcElement::childrenChanged):
1684         * svg/SVGGlyphElement.cpp:
1685         (WebCore::SVGGlyphElement::invalidateGlyphCache):
1686         * svg/SVGHKernElement.cpp:
1687         (WebCore::SVGHKernElement::insertedInto):
1688         (WebCore::SVGHKernElement::removedFrom):
1689         * svg/SVGLengthContext.cpp:
1690         (WebCore::SVGLengthContext::determineViewport):
1691         * svg/SVGLinearGradientElement.cpp:
1692         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
1693         * svg/SVGLocatable.cpp:
1694         (WebCore::isViewportElement):
1695         (WebCore::SVGLocatable::getTransformToElement):
1696         * svg/SVGMPathElement.cpp:
1697         (WebCore::SVGMPathElement::pathElement):
1698         (WebCore::SVGMPathElement::notifyParentOfPathChange):
1699         * svg/SVGPathElement.cpp:
1700         (WebCore::SVGPathElement::invalidateMPathDependencies):
1701         * svg/SVGPatternElement.cpp:
1702         (WebCore::SVGPatternElement::collectPatternAttributes):
1703         * svg/SVGRadialGradientElement.cpp:
1704         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
1705         * svg/SVGSVGElement.cpp:
1706         (WebCore::SVGSVGElement::setupInitialView):
1707         * svg/SVGTextContentElement.cpp:
1708         (WebCore::SVGTextContentElement::elementFromRenderer):
1709         * svg/SVGUseElement.cpp:
1710         (WebCore::dumpInstanceTree):
1711         (WebCore::SVGUseElement::toClipPath):
1712         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1713         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
1714         * svg/SVGVKernElement.cpp:
1715         (WebCore::SVGVKernElement::insertedInto):
1716         (WebCore::SVGVKernElement::removedFrom):
1717         * svg/animation/SVGSMILElement.cpp:
1718         (WebCore::SVGSMILElement::buildPendingResource):
1719         * svg/graphics/SVGImageCache.cpp:
1720         (WebCore::SVGImageCache::imageForRenderer):
1721         * testing/Internals.cpp:
1722         (WebCore::Internals::shadowRootType):
1723         (WebCore::Internals::visiblePlaceholder):
1724         (WebCore::Internals::selectColorInColorChooser):
1725         (WebCore::Internals::wasLastChangeUserEdit):
1726         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
1727         (WebCore::Internals::isSelectPopupVisible):
1728         * testing/js/WebCoreTestSupport.cpp:
1729         (WebCoreTestSupport::injectInternalsObject):
1730         * xml/XMLHttpRequest.cpp:
1731         (WebCore::XMLHttpRequest::open):
1732         * xml/XPathFunctions.cpp:
1733         (WebCore::XPath::expandedNameLocalPart):
1734         (WebCore::XPath::FunLang::evaluate):
1735         * xml/XPathNodeSet.cpp:
1736         (WebCore::XPath::sortBlock):
1737         (WebCore::XPath::NodeSet::sort):
1738         (WebCore::XPath::findRootNode):
1739         (WebCore::XPath::NodeSet::traversalSort):
1740         * xml/parser/XMLDocumentParserLibxml2.cpp:
1741         (WebCore::XMLDocumentParser::XMLDocumentParser):
1742
1743 2014-10-02  Rik Cabanier  <cabanier@adobe.com>
1744
1745         Clean up loops in CSSGradientValue.cpp
1746         https://bugs.webkit.org/show_bug.cgi?id=137332
1747
1748         Reviewed by Andreas Kling.
1749
1750         This patch cleans up a couple of for loops by using C++11 syntax and
1751         fixes some grammar in a comment.
1752
1753         No new tests, no behavior change.
1754
1755         * css/CSSGradientValue.cpp:
1756         (WebCore::CSSGradientValue::gradientWithStylesResolved): Move for loops to C++11.
1757         (WebCore::CSSGradientValue::addStops): Update grammar in comment for gradient midpoints.
1758
1759 2014-10-02  Krzysztof Czech  <k.czech@samsung.com>
1760
1761         AX: Default orientation for aria scrollbars should be vertical
1762         https://bugs.webkit.org/show_bug.cgi?id=137341
1763
1764         Reviewed by Chris Fleizach.
1765
1766         Default orientation for aria scrollbars regarding w3c spec should be vertical
1767
1768         No new tests, covering by existing one.
1769
1770         * accessibility/AccessibilityRenderObject.cpp:
1771         (WebCore::AccessibilityRenderObject::orientation):
1772
1773 2014-10-02  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1774
1775         Fix minimal build warnings
1776         https://bugs.webkit.org/show_bug.cgi?id=137066
1777
1778         Reviewed by Daniel Bates.
1779
1780         No new tests, no behavior change.
1781
1782         * css/CSSParser.cpp:
1783         (WebCore::isValidKeywordPropertyAndValue):
1784         * html/parser/HTMLPreloadScanner.cpp:
1785         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1786         * page/Page.cpp:
1787         (WebCore::Page::setPageScaleFactor):
1788         * platform/graphics/WidthIterator.cpp:
1789         (WebCore::WidthIterator::glyphDataForCharacter):
1790         * rendering/svg/SVGInlineTextBox.cpp:
1791         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
1792
1793 2014-10-01  Benjamin Poulain  <bpoulain@apple.com>
1794
1795         Click events offset in webkit-overflow-scrolling iframes
1796         https://bugs.webkit.org/show_bug.cgi?id=134596
1797
1798         Reviewed by Sam Weinig.
1799
1800         * platform/ScrollView.cpp:
1801         (WebCore::ScrollView::visibleContentRectInternal):
1802         When converting coordinates from the main frame to a subframe's document, the position
1803         is first converted to the subframe's FrameView coordinate system, then offset by the scroll
1804         offset of the subframe itself.
1805
1806         The bug in this case was that the scroll offset used was the global scroll offset of the frame
1807         in the view instead of the scroll offset of the document in its own frameview.
1808
1809         The regression was introduced by the refactoring r162663. On iOS WebKit1, the coordinate system
1810         is different depending on VisibleContentRectIncludesScrollbars. In r162663, the value was set
1811         such that the rect returned is always in absolute coordinate.
1812
1813         The ideal solution would be to refactor ScrollView::platformVisibleContentRect() to always return
1814         the offsets in scroll view coordinates and verify and update all the call sites to use explicit
1815         conversion to the top frame. In this patch I only reverted the coordinate change of r162663 to avoid
1816         large scale impact.
1817
1818 2014-10-01  Christophe Dumez  <cdumez@apple.com>
1819
1820         Use is<>() / downcast<>() for File
1821         https://bugs.webkit.org/show_bug.cgi?id=137318
1822
1823         Reviewed by Gyuyoung Kim.
1824
1825         Use is<>() / downcast<>() for File instead of isFile() / toFile().
1826
1827         No new tests, no behavior change.
1828
1829         * fileapi/Blob.h:
1830         * fileapi/File.h:
1831         (isType):
1832         * fileapi/FileReader.cpp:
1833         (WebCore::FileReader::readAsArrayBuffer):
1834         (WebCore::FileReader::readAsBinaryString):
1835         (WebCore::FileReader::readAsText):
1836         (WebCore::FileReader::readAsDataURL):
1837         * platform/network/FormData.cpp:
1838         (WebCore::FormData::appendKeyValuePairItems):
1839
1840 2014-10-01  Rik Cabanier  <cabanier@adobe.com>
1841
1842         Add support for midpoint to CSS gradients
1843         https://bugs.webkit.org/show_bug.cgi?id=137171
1844
1845         Reviewed by Darin Adler.
1846
1847         This patch adds support for gradient midpoints. It also updates the 
1848         gradient tests so they use the feature.
1849         Spec: http://dev.w3.org/csswg/css-images-4/#color-interpolation-hint
1850
1851         Tests: fast/gradients/unprefixed-color-stops2.html
1852                fast/gradients/unprefixed-gradient-parsing.html
1853                fast/gradients/unprefixed-linear-angle-gradients2.html
1854                fast/gradients/unprefixed-radial-gradients.html
1855                fast/gradients/unprefixed-radial-gradients2.html
1856                fast/gradients/unprefixed-repeating-linear-gradient.html
1857                fast/gradients/unprefixed-repeating-radial-gradients.html
1858
1859         * css/CSSGradientValue.cpp:
1860         (WebCore::GradientStop::GradientStop): constructor initializes the midpoint variable
1861         (WebCore::CSSGradientValue::gradientWithStylesResolved): this function checks for midpoint color stops
1862         (WebCore::CSSGradientValue::addStops): this function processes midpoints and converts them to regular color stops
1863         (WebCore::CSSLinearGradientValue::customCSSText): this routine was updated to do correct parsing for midpoints
1864         (WebCore::CSSRadialGradientValue::customCSSText):
1865         * css/CSSGradientValue.h:
1866         (WebCore::CSSGradientColorStop::CSSGradientColorStop): this function stores if a stop is a midpoint
1867         * css/CSSParser.cpp:
1868         (WebCore::CSSParser::parseGradientColorStops): this function now allows color stops with no color
1869
1870 2014-10-01  Chris Dumez  <cdumez@apple.com>
1871
1872         Add basic caching for Document.cookie API
1873         https://bugs.webkit.org/show_bug.cgi?id=137225
1874
1875         Reviewed by Alexey Proskuryakov.
1876
1877         While profiling the load of nytimes.com, I noticed that the site is
1878         accessing ~250 times document.cookie, just during page load. Accessing
1879         document.cookie is currently slow because we:
1880         - Call WebPlatformStrategies::cookiesForDOM() virtual function
1881         - Send a sync IPC message to the Network process to retrieve the
1882           cookies
1883             - The Network process gets the list of cookies from CFNetwork then
1884               serializes the result to send it back to the WebProcess
1885         - We unserialize the cookies into an NSList of cookies
1886         - We filter-out the cookies that are 'httpOnly' and construct a new
1887           NSList of cookies
1888         - We create a WTF String out of the cookies NSList
1889
1890         In the case of nytimes.com, it turns out that up to 100 calls to
1891         document.cookie() are made in the same event loop iteration. This patch
1892         thus caches / freezes the cookies until we return to the event
1893         loop so that consecutive calls to document.cookie() are extremely fast.
1894         Doing so seems to be sufficient to achieve a ~87% cache hit for
1895         nytimes.com page load.
1896
1897         The cookies cache is invalidated whenever:
1898         - document.cookie is set
1899         - we return to the event loop
1900         - a network resource is loaded synchronously as it may cause cookies to
1901           be set before we return to the event loop
1902
1903         Test: http/tests/cookies/sync-xhr-set-cookie-invalidates-cache.html
1904
1905         * dom/Document.cpp:
1906         (WebCore::Document::Document):
1907         (WebCore::Document::open):
1908         (WebCore::Document::cookie):
1909         (WebCore::Document::setCookie):
1910         (WebCore::Document::setCookieURL):
1911         (WebCore::Document::initSecurityContext):
1912         (WebCore::Document::setDOMCookieCache):
1913         (WebCore::Document::invalidateDOMCookieCache):
1914         (WebCore::Document::domCookieCacheExpiryTimerFired):
1915         (WebCore::Document::didLoadResourceSynchronously):
1916         * dom/Document.h:
1917         (WebCore::Document::domCookieCache):
1918         (WebCore::Document::isDOMCookieCacheValid):
1919         (WebCore::Document::setCookieURL): Deleted.
1920         * dom/ScriptExecutionContext.cpp:
1921         (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
1922         * dom/ScriptExecutionContext.h:
1923         * loader/ThreadableLoader.cpp:
1924         (WebCore::ThreadableLoader::loadResourceSynchronously):
1925
1926 2014-10-01  Christophe Dumez  <cdumez@apple.com>
1927
1928         Use is<>() / downcast<>() for Event classes
1929         https://bugs.webkit.org/show_bug.cgi?id=137284
1930
1931         Reviewed by Andreas Kling.
1932
1933         Use is<>() / downcast<>() for Event classes.
1934
1935         No new tests, no behavior change.
1936
1937         * bindings/js/JSErrorHandler.cpp:
1938         (WebCore::JSErrorHandler::handleEvent):
1939         * bindings/js/JSEventListener.cpp:
1940         (WebCore::JSEventListener::handleEvent):
1941         * dom/BeforeTextInsertedEvent.h:
1942         * dom/BeforeUnloadEvent.h:
1943         * dom/ErrorEvent.h:
1944         * dom/Event.h:
1945         * dom/EventContext.cpp:
1946         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
1947         * dom/FocusEvent.h:
1948         * dom/KeyboardEvent.cpp:
1949         (WebCore::findKeyboardEvent):
1950         * dom/KeyboardEvent.h:
1951         * dom/MouseEvent.cpp:
1952         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
1953         * dom/MouseEvent.h:
1954         * dom/Node.cpp:
1955         (WebCore::Node::defaultEventHandler):
1956         * dom/TextEvent.h:
1957         * dom/UIEvent.h:
1958         * dom/WheelEvent.h:
1959         * html/HTMLAnchorElement.cpp:
1960         (WebCore::appendServerMapMousePosition):
1961         (WebCore::HTMLAnchorElement::defaultEventHandler):
1962         (WebCore::HTMLAnchorElement::eventType):
1963         (WebCore::isEnterKeyKeydownEvent):
1964         (WebCore::isLinkClick):
1965         * html/HTMLButtonElement.cpp:
1966         (WebCore::HTMLButtonElement::defaultEventHandler):
1967         * html/HTMLFormElement.cpp:
1968         (WebCore::HTMLFormElement::submitImplicitly):
1969         * html/HTMLFormElement.h:
1970         * html/HTMLFrameSetElement.cpp:
1971         (WebCore::HTMLFrameSetElement::defaultEventHandler):
1972         * html/HTMLInputElement.cpp:
1973         (WebCore::HTMLInputElement::willDispatchEvent):
1974         (WebCore::HTMLInputElement::defaultEventHandler):
1975         * html/HTMLPlugInImageElement.cpp:
1976         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
1977         * html/HTMLSelectElement.cpp:
1978         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1979         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1980         (WebCore::HTMLSelectElement::defaultEventHandler):
1981         * html/HTMLSummaryElement.cpp:
1982         (WebCore::HTMLSummaryElement::defaultEventHandler):
1983         * html/HTMLTextAreaElement.cpp:
1984         (WebCore::HTMLTextAreaElement::defaultEventHandler):
1985         * html/ImageDocument.cpp:
1986         (WebCore::ImageEventListener::handleEvent):
1987         * html/ImageInputType.cpp:
1988         (WebCore::ImageInputType::handleDOMActivateEvent):
1989         * html/InputType.cpp:
1990         (WebCore::InputType::shouldSubmitImplicitly):
1991         * html/InputType.h:
1992         * html/MediaDocument.cpp:
1993         (WebCore::MediaDocument::defaultEventHandler):
1994         * html/TextFieldInputType.cpp:
1995         (WebCore::TextFieldInputType::shouldSubmitImplicitly):
1996         * html/TextFieldInputType.h:
1997         * html/shadow/MediaControlElementTypes.cpp:
1998         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
1999         * html/shadow/MediaControlElements.cpp:
2000         (WebCore::MediaControlPanelElement::defaultEventHandler):
2001         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
2002         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2003         * html/shadow/MediaControls.cpp:
2004         (WebCore::MediaControls::containsRelatedTarget):
2005         * html/shadow/MediaControlsApple.cpp:
2006         (WebCore::MediaControlsAppleEventListener::handleEvent):
2007         * html/shadow/SliderThumbElement.cpp:
2008         (WebCore::SliderThumbElement::defaultEventHandler):
2009         * html/shadow/SpinButtonElement.cpp:
2010         (WebCore::SpinButtonElement::defaultEventHandler):
2011         (WebCore::SpinButtonElement::forwardEvent):
2012         * html/shadow/TextControlInnerElements.cpp:
2013         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
2014         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
2015         * inspector/InspectorFrontendHost.cpp:
2016         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
2017         * page/ContextMenuController.cpp:
2018         (WebCore::ContextMenuController::maybeCreateContextMenu):
2019         * page/EventHandler.cpp:
2020         (WebCore::EventHandler::handleTextInputEvent):
2021         * rendering/RenderEmbeddedObject.cpp:
2022         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2023         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2024         * rendering/RenderEmbeddedObject.h:
2025         * rendering/RenderSnapshottedPlugIn.cpp:
2026         (WebCore::RenderSnapshottedPlugIn::handleEvent):
2027
2028 2014-10-01  Zan Dobersek  <zdobersek@igalia.com>
2029
2030         [TexMap] Sprinkle range-based for-loops in GraphicsLayerTextureMapper, TextureMapperLayer
2031         https://bugs.webkit.org/show_bug.cgi?id=137271
2032
2033         Reviewed by Sergio Villar Senin.
2034
2035         Switch to using C++11 range-based for-loops in the
2036         GraphicsLayerTextureMapper and TextureMapperLayer classes.
2037
2038         The for loops that remained unchanged either do further computation
2039         with the loop index or must iterate over the container in reverse.
2040
2041         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2042         (WebCore::toTextureMapperLayerVector):
2043         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
2044         * platform/graphics/texmap/TextureMapperLayer.cpp:
2045         (WebCore::TextureMapperLayer::computeTransformsRecursive):
2046         (WebCore::TextureMapperLayer::paintSelfAndChildren):
2047         (WebCore::TextureMapperLayer::computeOverlapRegions):
2048         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
2049         (WebCore::TextureMapperLayer::~TextureMapperLayer):
2050         (WebCore::TextureMapperLayer::setChildren):
2051         (WebCore::TextureMapperLayer::descendantsOrSelfHaveRunningAnimations):
2052         (WebCore::TextureMapperLayer::applyAnimationsRecursively):
2053
2054 2014-10-01  Dan Bernstein  <mitz@apple.com>
2055
2056         Windows build fix.
2057
2058         * platform/network/cf/ResourceResponseCFNet.cpp:
2059
2060 2014-10-01  Dan Bernstein  <mitz@apple.com>
2061
2062         REGRESSION (r173423): [iOS] Sites with EV certificates appear as normal HTTPS sites
2063         https://bugs.webkit.org/show_bug.cgi?id=137262
2064
2065         Reviewed by Antti Koivisto.
2066
2067         No new tests, because the API test harness doesn’t run an HTTP server to test against.
2068
2069         * platform/network/cf/ResourceResponseCFNet.cpp:
2070         (WebCore::ResourceResponse::platformCertificateInfo): Return a CertificateInfo initialized
2071         with the certificate array from the response.
2072
2073 2014-09-30  Yusuke Suzuki  <utatane.tea@gmail.com>
2074
2075         CSS JIT: Enable multiple stack references allocation by allocateUninitialized
2076         https://bugs.webkit.org/show_bug.cgi?id=135293
2077
2078         Reviewed by Benjamin Poulain.
2079
2080         * cssjit/StackAllocator.h:
2081         (WebCore::StackAllocator::stackTop):
2082             Add stackTop method to check references are allocated easily.
2083         (WebCore::StackAllocator::allocateUninitialized):
2084
2085 2014-09-30  Chris Dumez  <cdumez@apple.com>
2086
2087         Drop getPtr() overload taking a Document reference in argument
2088         https://bugs.webkit.org/show_bug.cgi?id=137280
2089
2090         Reviewed by Daniel Bates.
2091
2092         Drop getPtr() overload taking a Document reference in argument. This is
2093         no longer needed as the generic getPtr() function converts references
2094         into pointers just fine after r173765.
2095
2096         No new tests, no behavior change.
2097
2098         * dom/Document.h:
2099         (WTF::getPtr): Deleted.
2100
2101 2014-09-30  Brian J. Burg  <burg@cs.washington.edu>
2102
2103         Web Inspector: ErrorString should be passed by reference
2104         https://bugs.webkit.org/show_bug.cgi?id=137257
2105
2106         Reviewed by Joseph Pecoraro.
2107
2108         Pass the leading ErrorString argument by reference, since it is always an out parameter.
2109         Clean up callsites where the error message is written.
2110
2111         No new tests, no behavior changed.
2112
2113         * inspector/CommandLineAPIHost.cpp:
2114         (WebCore::CommandLineAPIHost::clearConsoleMessages):
2115         * inspector/DOMEditor.cpp:
2116         (WebCore::populateErrorString):
2117         (WebCore::DOMEditor::insertBefore):
2118         (WebCore::DOMEditor::removeChild):
2119         (WebCore::DOMEditor::setAttribute):
2120         (WebCore::DOMEditor::removeAttribute):
2121         (WebCore::DOMEditor::setOuterHTML):
2122         (WebCore::DOMEditor::replaceWholeText):
2123         * inspector/DOMEditor.h:
2124         * inspector/InspectorApplicationCacheAgent.cpp:
2125         (WebCore::InspectorApplicationCacheAgent::enable):
2126         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2127         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
2128         (WebCore::InspectorApplicationCacheAgent::getManifestForFrame):
2129         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
2130         * inspector/InspectorApplicationCacheAgent.h:
2131         * inspector/InspectorCSSAgent.cpp:
2132         (WebCore::InspectorCSSAgent::enable):
2133         (WebCore::InspectorCSSAgent::disable):
2134         (WebCore::InspectorCSSAgent::didCreateNamedFlow):
2135         (WebCore::InspectorCSSAgent::regionOversetChanged):
2136         (WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement):
2137         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
2138         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2139         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
2140         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2141         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2142         (WebCore::InspectorCSSAgent::getStyleSheet):
2143         (WebCore::InspectorCSSAgent::getStyleSheetText):
2144         (WebCore::InspectorCSSAgent::setStyleSheetText):
2145         (WebCore::InspectorCSSAgent::setStyleText):
2146         (WebCore::InspectorCSSAgent::setPropertyText):
2147         (WebCore::InspectorCSSAgent::toggleProperty):
2148         (WebCore::InspectorCSSAgent::setRuleSelector):
2149         (WebCore::InspectorCSSAgent::addRule):
2150         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
2151         (WebCore::InspectorCSSAgent::forcePseudoState):
2152         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
2153         (WebCore::InspectorCSSAgent::elementForId):
2154         (WebCore::InspectorCSSAgent::assertStyleSheetForId):
2155         (WebCore::InspectorCSSAgent::buildArrayForRegions):
2156         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
2157         * inspector/InspectorCSSAgent.h:
2158         * inspector/InspectorController.cpp:
2159         (WebCore::InspectorController::hideHighlight):
2160         (WebCore::InspectorController::setProfilerEnabled):
2161         (WebCore::InspectorController::resume):
2162         * inspector/InspectorDOMAgent.cpp:
2163         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
2164         (WebCore::InspectorDOMAgent::assertNode):
2165         (WebCore::InspectorDOMAgent::assertDocument):
2166         (WebCore::InspectorDOMAgent::assertElement):
2167         (WebCore::InspectorDOMAgent::assertEditableNode):
2168         (WebCore::InspectorDOMAgent::assertEditableElement):
2169         (WebCore::InspectorDOMAgent::getDocument):
2170         (WebCore::InspectorDOMAgent::pushNodeToFrontend):
2171         (WebCore::InspectorDOMAgent::requestChildNodes):
2172         (WebCore::InspectorDOMAgent::querySelector):
2173         (WebCore::InspectorDOMAgent::querySelectorAll):
2174         (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
2175         (WebCore::InspectorDOMAgent::setAttributeValue):
2176         (WebCore::InspectorDOMAgent::setAttributesAsText):
2177         (WebCore::InspectorDOMAgent::removeAttribute):
2178         (WebCore::InspectorDOMAgent::removeNode):
2179         (WebCore::InspectorDOMAgent::setNodeName):
2180         (WebCore::InspectorDOMAgent::getOuterHTML):
2181         (WebCore::InspectorDOMAgent::setOuterHTML):
2182         (WebCore::InspectorDOMAgent::setNodeValue):
2183         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2184         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
2185         (WebCore::InspectorDOMAgent::performSearch):
2186         (WebCore::InspectorDOMAgent::getSearchResults):
2187         (WebCore::InspectorDOMAgent::discardSearchResults):
2188         (WebCore::InspectorDOMAgent::inspect):
2189         (WebCore::InspectorDOMAgent::setSearchingForNode):
2190         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
2191         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
2192         (WebCore::InspectorDOMAgent::highlightRect):
2193         (WebCore::InspectorDOMAgent::highlightQuad):
2194         (WebCore::InspectorDOMAgent::highlightNode):
2195         (WebCore::InspectorDOMAgent::highlightFrame):
2196         (WebCore::InspectorDOMAgent::hideHighlight):
2197         (WebCore::InspectorDOMAgent::moveTo):
2198         (WebCore::InspectorDOMAgent::undo):
2199         (WebCore::InspectorDOMAgent::redo):
2200         (WebCore::InspectorDOMAgent::markUndoableState):
2201         (WebCore::InspectorDOMAgent::focus):
2202         (WebCore::InspectorDOMAgent::resolveNode):
2203         (WebCore::InspectorDOMAgent::getAttributes):
2204         (WebCore::InspectorDOMAgent::requestNode):
2205         (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
2206         (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend):
2207         * inspector/InspectorDOMAgent.h:
2208         * inspector/InspectorDOMDebuggerAgent.cpp:
2209         (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
2210         (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
2211         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
2212         (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
2213         (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
2214         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
2215         (WebCore::domTypeForName):
2216         (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint):
2217         (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint):
2218         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
2219         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
2220         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
2221         * inspector/InspectorDOMDebuggerAgent.h:
2222         * inspector/InspectorDOMStorageAgent.cpp:
2223         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
2224         (WebCore::InspectorDOMStorageAgent::enable):
2225         (WebCore::InspectorDOMStorageAgent::disable):
2226         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2227         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2228         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2229         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2230         * inspector/InspectorDOMStorageAgent.h:
2231         * inspector/InspectorDatabaseAgent.cpp:
2232         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
2233         (WebCore::InspectorDatabaseAgent::enable):
2234         (WebCore::InspectorDatabaseAgent::disable):
2235         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
2236         (WebCore::InspectorDatabaseAgent::executeSQL):
2237         * inspector/InspectorDatabaseAgent.h:
2238         * inspector/InspectorIndexedDBAgent.cpp:
2239         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
2240         (WebCore::InspectorIndexedDBAgent::enable):
2241         (WebCore::InspectorIndexedDBAgent::disable):
2242         (WebCore::assertDocument):
2243         (WebCore::assertIDBFactory):
2244         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
2245         (WebCore::InspectorIndexedDBAgent::requestDatabase):
2246         (WebCore::InspectorIndexedDBAgent::requestData):
2247         (WebCore::InspectorIndexedDBAgent::clearObjectStore):
2248         * inspector/InspectorIndexedDBAgent.h:
2249         * inspector/InspectorLayerTreeAgent.cpp:
2250         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
2251         (WebCore::InspectorLayerTreeAgent::enable):
2252         (WebCore::InspectorLayerTreeAgent::disable):
2253         (WebCore::InspectorLayerTreeAgent::layersForNode):
2254         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
2255         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
2256         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2257         (WebCore::InspectorLayerTreeAgent::idForNode):
2258         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2259         * inspector/InspectorLayerTreeAgent.h:
2260         * inspector/InspectorPageAgent.cpp:
2261         (WebCore::InspectorPageAgent::cachedResourceContent):
2262         (WebCore::InspectorPageAgent::resourceContent):
2263         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
2264         (WebCore::InspectorPageAgent::enable):
2265         (WebCore::InspectorPageAgent::disable):
2266         (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
2267         (WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad):
2268         (WebCore::InspectorPageAgent::reload):
2269         (WebCore::InspectorPageAgent::navigate):
2270         (WebCore::InspectorPageAgent::getCookies):
2271         (WebCore::InspectorPageAgent::deleteCookie):
2272         (WebCore::InspectorPageAgent::getResourceTree):
2273         (WebCore::InspectorPageAgent::getResourceContent):
2274         (WebCore::InspectorPageAgent::searchInResource):
2275         (WebCore::InspectorPageAgent::searchInResources):
2276         (WebCore::InspectorPageAgent::setDocumentContent):
2277         (WebCore::InspectorPageAgent::setShowPaintRects):
2278         (WebCore::InspectorPageAgent::canShowDebugBorders):
2279         (WebCore::InspectorPageAgent::setShowDebugBorders):
2280         (WebCore::InspectorPageAgent::canShowFPSCounter):
2281         (WebCore::InspectorPageAgent::setShowFPSCounter):
2282         (WebCore::InspectorPageAgent::canContinuouslyPaint):
2283         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
2284         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
2285         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
2286         (WebCore::InspectorPageAgent::assertFrame):
2287         (WebCore::InspectorPageAgent::assertDocumentLoader):
2288         (WebCore::InspectorPageAgent::setTouchEmulationEnabled):
2289         (WebCore::InspectorPageAgent::setEmulatedMedia):
2290         (WebCore::InspectorPageAgent::getCompositingBordersVisible):
2291         (WebCore::InspectorPageAgent::setCompositingBordersVisible):
2292         (WebCore::InspectorPageAgent::snapshotNode):
2293         (WebCore::InspectorPageAgent::snapshotRect):
2294         (WebCore::InspectorPageAgent::handleJavaScriptDialog):
2295         (WebCore::InspectorPageAgent::archive):
2296         * inspector/InspectorPageAgent.h:
2297         * inspector/InspectorReplayAgent.cpp:
2298         (WebCore::InspectorReplayAgent::startCapturing):
2299         (WebCore::InspectorReplayAgent::stopCapturing):
2300         (WebCore::InspectorReplayAgent::replayToPosition):
2301         (WebCore::InspectorReplayAgent::replayToCompletion):
2302         (WebCore::InspectorReplayAgent::pausePlayback):
2303         (WebCore::InspectorReplayAgent::cancelPlayback):
2304         (WebCore::InspectorReplayAgent::switchSession):
2305         (WebCore::InspectorReplayAgent::insertSessionSegment):
2306         (WebCore::InspectorReplayAgent::removeSessionSegment):
2307         (WebCore::InspectorReplayAgent::findSession):
2308         (WebCore::InspectorReplayAgent::findSegment):
2309         (WebCore::InspectorReplayAgent::currentReplayState):
2310         (WebCore::InspectorReplayAgent::getAvailableSessions):
2311         (WebCore::InspectorReplayAgent::getSessionData):
2312         (WebCore::InspectorReplayAgent::getSegmentData):
2313         * inspector/InspectorReplayAgent.h:
2314         * inspector/InspectorResourceAgent.cpp:
2315         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
2316         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
2317         (WebCore::InspectorResourceAgent::enable):
2318         (WebCore::InspectorResourceAgent::disable):
2319         (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
2320         (WebCore::InspectorResourceAgent::getResponseBody):
2321         (WebCore::InspectorResourceAgent::replayXHR):
2322         (WebCore::InspectorResourceAgent::canClearBrowserCache):
2323         (WebCore::InspectorResourceAgent::clearBrowserCache):
2324         (WebCore::InspectorResourceAgent::canClearBrowserCookies):
2325         (WebCore::InspectorResourceAgent::clearBrowserCookies):
2326         (WebCore::InspectorResourceAgent::setCacheDisabled):
2327         (WebCore::InspectorResourceAgent::loadResource):
2328         * inspector/InspectorResourceAgent.h:
2329         * inspector/InspectorStyleSheet.cpp:
2330         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
2331         * inspector/InspectorTimelineAgent.cpp:
2332         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
2333         (WebCore::InspectorTimelineAgent::start):
2334         (WebCore::InspectorTimelineAgent::stop):
2335         * inspector/InspectorTimelineAgent.h:
2336         * inspector/InspectorWorkerAgent.cpp:
2337         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
2338         (WebCore::InspectorWorkerAgent::enable):
2339         (WebCore::InspectorWorkerAgent::disable):
2340         (WebCore::InspectorWorkerAgent::canInspectWorkers):
2341         (WebCore::InspectorWorkerAgent::connectToWorker):
2342         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
2343         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
2344         (WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
2345         * inspector/InspectorWorkerAgent.h:
2346         * inspector/PageConsoleAgent.cpp:
2347         (WebCore::PageConsoleAgent::clearMessages):
2348         (WebCore::PageConsoleAgent::addInspectedNode):
2349         * inspector/PageConsoleAgent.h:
2350         * inspector/PageDebuggerAgent.cpp:
2351         (WebCore::PageDebuggerAgent::injectedScriptForEval):
2352         (WebCore::PageDebuggerAgent::setOverlayMessage):
2353         * inspector/PageDebuggerAgent.h:
2354         * inspector/PageRuntimeAgent.cpp:
2355         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
2356         (WebCore::PageRuntimeAgent::enable):
2357         (WebCore::PageRuntimeAgent::disable):
2358         (WebCore::PageRuntimeAgent::injectedScriptForEval):
2359         * inspector/PageRuntimeAgent.h:
2360         * inspector/WebConsoleAgent.cpp:
2361         (WebCore::WebConsoleAgent::setMonitoringXHREnabled):
2362         * inspector/WebConsoleAgent.h:
2363         * inspector/WorkerConsoleAgent.cpp:
2364         (WebCore::WorkerConsoleAgent::addInspectedNode):
2365         * inspector/WorkerConsoleAgent.h:
2366         * inspector/WorkerDebuggerAgent.cpp:
2367         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
2368         * inspector/WorkerDebuggerAgent.h:
2369         * inspector/WorkerInspectorController.cpp:
2370         (WebCore::WorkerInspectorController::resume):
2371         * inspector/WorkerRuntimeAgent.cpp:
2372         (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
2373         (WebCore::WorkerRuntimeAgent::run):
2374         * inspector/WorkerRuntimeAgent.h:
2375
2376 2014-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2377
2378         Stack overflow with enormous SVG filter
2379         https://bugs.webkit.org/show_bug.cgi?id=63290
2380
2381         Prevent building an SVG filter if it has more than 200 FilterEffect nodes in its map 
2382         regardless whether they will be connected to its lastEffect or not. Also discard any
2383         filter which has more 100 contributing FilterEffect nodes in its tree.
2384
2385         Reviewed by Dean Jackson.
2386
2387         Tests: svg/filters/svg-deeply-nested-crash.html
2388
2389         * platform/graphics/filters/FilterEffect.cpp:
2390         (WebCore::collectEffects):
2391         (WebCore::FilterEffect::totalNumberOfEffectInputs):
2392         * platform/graphics/filters/FilterEffect.h:
2393         -- Add a method to return the total number of input FilterEffect's contributing to a FilterEffect.
2394         * rendering/svg/RenderSVGResourceFilter.cpp:
2395         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2396         -- Do not build a filter if it has more than 200 FilterEffects in its map.
2397         (WebCore::RenderSVGResourceFilter::applyResource):
2398         -- Discard a filter after it was built if it has more than 100 FilterEffects in its tree.
2399
2400 2014-09-30  Christophe Dumez  <cdumez@apple.com>
2401
2402         Use is<>() / downcast<>() for ContainerNode
2403         https://bugs.webkit.org/show_bug.cgi?id=137270
2404
2405         Reviewed by Andreas Kling.
2406
2407         Use is<>() / downcast<>() for ContainerNode instead of isContainerNode()
2408         / toContainerNode(). Also kill the NODE_TYPE_CASTS() macro as this was
2409         its last user.
2410
2411         No new tests, no behavior change.
2412
2413         * dom/ContainerNode.cpp:
2414         (WebCore::collectChildrenAndRemoveFromOldParent):
2415         (WebCore::ContainerNode::willRemoveChild):
2416         (WebCore::cloneChildNodesAvoidingDeleteButton):
2417         * dom/ContainerNode.h:
2418         (WebCore::Node::countChildNodes):
2419         (WebCore::Node::traverseToChildAt):
2420         (WebCore::Node::firstChild):
2421         (WebCore::Node::lastChild):
2422         (isType):
2423         (WebCore::isContainerNode): Deleted.
2424         * dom/ContainerNodeAlgorithms.cpp:
2425         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
2426         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
2427         * dom/ContainerNodeAlgorithms.h:
2428         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
2429         (WebCore::ChildNodeInsertionNotifier::notify):
2430         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
2431         (WebCore::ChildNodeRemovalNotifier::notify):
2432         * dom/Node.cpp:
2433         (WebCore::Node::childNodes):
2434         (WebCore::Node::insertBefore):
2435         (WebCore::Node::replaceChild):
2436         (WebCore::Node::removeChild):
2437         (WebCore::Node::appendChild):
2438         (WebCore::Node::setTextContent):
2439         * dom/Node.h:
2440         * dom/Range.cpp:
2441         (WebCore::Range::surroundContents):
2442         * dom/TextNodeTraversal.cpp:
2443         (WebCore::TextNodeTraversal::contentsAsString):
2444         * editing/ApplyStyleCommand.cpp:
2445         (WebCore::ApplyStyleCommand::applyBlockStyle):
2446         * editing/CompositeEditCommand.cpp:
2447         (WebCore::CompositeEditCommand::insertNodeAt):
2448         * editing/Editor.cpp:
2449         (WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
2450         * html/MediaDocument.cpp:
2451         (WebCore::MediaDocument::defaultEventHandler):
2452         * html/parser/HTMLConstructionSite.h:
2453         (WebCore::HTMLConstructionSiteTask::oldParent):
2454         * html/track/VTTCue.cpp:
2455         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
2456         * inspector/InspectorDOMAgent.cpp:
2457         (WebCore::InspectorDOMAgent::querySelector):
2458         (WebCore::InspectorDOMAgent::querySelectorAll):
2459         * inspector/InspectorNodeFinder.cpp:
2460         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
2461
2462 2014-09-30  Roger Fong  <roger_fong@apple.com>
2463
2464         [Windows] Remove an errant WTFLogAlways that makes test output hard to read and generates stderr output.
2465
2466         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
2467         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
2468
2469 2014-09-30  David Hyatt  <hyatt@apple.com>
2470
2471         Remove a multicolumn ASSERT and replace with a guard.
2472         https://bugs.webkit.org/show_bug.cgi?id=137272
2473         
2474         Reviewed by Alexey Proskuryakov.
2475
2476         * rendering/RenderMultiColumnFlowThread.cpp:
2477         (WebCore::isValidColumnSpanner):
2478         For now remove the assert that is tripping and replace it with a guard
2479         until we can figure out why it's getting hit.
2480
2481 2014-09-30  Christophe Dumez  <cdumez@apple.com>
2482
2483         Generalize is<>() / downcast<>() support to all types
2484         https://bugs.webkit.org/show_bug.cgi?id=137243
2485
2486         Reviewed by Benjamin Poulain.
2487
2488         Generalize is<>() / downcast<>() support to all types, not just Nodes.
2489         To achieve this, the following changes were made:
2490         - Move is<> / downcast<>() and NodeTypeCastTraits from Node.h to a new
2491           wtf/TypeCasts.h header. Also move them to WTF namespace instead of
2492           WebCore namespace as they can be used for classes in other namespaces
2493           (e.g. WebKit namespace).
2494         - Rename NodeTypeCastsTraits to TypeCastTraits as it can be specialized
2495           for non-Nodes.
2496         - Since C++ does not allow template specializations in different
2497           namespaces, I had to move all the SPECIALIZE_TYPE_TRAITS_*() uses to
2498           the global scope and use the WebCore:: namespace explicitly in those.
2499           This is a bit unfortunate but I couldn't find a better way.
2500
2501         This patch also takes care of supporting is<>() / downcast<>() for
2502         the WorkerGlobalScope class, which does not derive from Node.
2503
2504         No new tests, no behavior change.
2505
2506         * Modules/indexeddb/IDBFactory.cpp:
2507         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
2508         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
2509         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2510         (WebCore::ThreadableWebSocketChannel::create):
2511         * bindings/js/JSDOMGlobalObject.cpp:
2512         (WebCore::toJSDOMGlobalObject):
2513         * bindings/js/JSEventListener.cpp:
2514         (WebCore::JSEventListener::handleEvent):
2515         * bindings/js/ScheduledAction.cpp:
2516         (WebCore::ScheduledAction::execute):
2517         * dom/Attr.h:
2518         (isType):
2519         (WebCore::isAttr): Deleted.
2520         * dom/CDATASection.h:
2521         (isType):
2522         (WebCore::isCDATASection): Deleted.
2523         * dom/CharacterData.h:
2524         (isType):
2525         (WebCore::isCharacterData): Deleted.
2526         * dom/Comment.h:
2527         (isType):
2528         (WebCore::isComment): Deleted.
2529         * dom/Document.h:
2530         (isType):
2531         (WebCore::isDocument): Deleted.
2532         * dom/DocumentFragment.h:
2533         (isType):
2534         (WebCore::isDocumentFragment): Deleted.
2535         * dom/DocumentType.h:
2536         (isType):
2537         (WebCore::isDocumentType): Deleted.
2538         * dom/Element.h:
2539         * dom/MessagePort.cpp:
2540         (WebCore::MessagePort::dispatchMessages):
2541         * dom/Node.h:
2542         (WebCore::is): Deleted.
2543         (WebCore::downcast): Deleted.
2544         * dom/ProcessingInstruction.h:
2545         (isType):
2546         (WebCore::isProcessingInstruction): Deleted.
2547         * dom/PseudoElement.h:
2548         (isType):
2549         (WebCore::isPseudoElement): Deleted.
2550         * dom/ScriptExecutionContext.cpp:
2551         (WebCore::ScriptExecutionContext::createdMessagePort):
2552         (WebCore::ScriptExecutionContext::destroyedMessagePort):
2553         (WebCore::ScriptExecutionContext::vm):
2554         * dom/ScriptExecutionContext.h:
2555         * dom/ShadowRoot.h:
2556         (isType):
2557         (WebCore::isShadowRoot): Deleted.
2558         * dom/StyledElement.h:
2559         (isType):
2560         (WebCore::isStyledElement): Deleted.
2561         * dom/Text.h:
2562         (isType):
2563         (WebCore::isText): Deleted.
2564         * dom/make_names.pl:
2565         (printTypeHelpers):
2566         (printTypeHelpersHeaderFile):
2567         * html/HTMLDocument.h:
2568         (isType):
2569         (WebCore::isHTMLDocument): Deleted.
2570         * html/HTMLElement.h:
2571         (isType):
2572         (WebCore::isHTMLElement): Deleted.
2573         * html/HTMLFormControlElement.h:
2574         (isType):
2575         (WebCore::isHTMLFormControlElement): Deleted.
2576         * html/HTMLFrameElementBase.h:
2577         (isType):
2578         (WebCore::isHTMLFrameElementBase): Deleted.
2579         * html/HTMLFrameOwnerElement.h:
2580         (isType):
2581         (WebCore::isHTMLFrameOwnerElement): Deleted.
2582         * html/HTMLMediaElement.h:
2583         (isType):
2584         (WebCore::isHTMLMediaElement): Deleted.
2585         * html/HTMLPlugInElement.h:
2586         (isType):
2587         (WebCore::isHTMLPlugInElement): Deleted.
2588         * html/HTMLPlugInImageElement.h:
2589         (isType):
2590         (WebCore::isHTMLPlugInImageElement): Deleted.
2591         * html/HTMLTableCellElement.h:
2592         (isType):
2593         (WebCore::isHTMLTableCellElement): Deleted.
2594         * html/HTMLTableSectionElement.h:
2595         (isType):
2596         (WebCore::isHTMLTableSectionElement): Deleted.
2597         * html/HTMLTextFormControlElement.h:
2598         (isType):
2599         (WebCore::isHTMLTextFormControlElement): Deleted.
2600         * html/ImageDocument.h:
2601         (isType):
2602         (WebCore::isImageDocument): Deleted.
2603         * html/LabelableElement.h:
2604         (isType):
2605         (WebCore::isLabelableElement): Deleted.
2606         * html/MediaDocument.h:
2607         (isType):
2608         (WebCore::isMediaDocument): Deleted.
2609         * html/PluginDocument.h:
2610         (isType):
2611         (WebCore::isPluginDocument): Deleted.
2612         * html/shadow/InsertionPoint.h:
2613         (isType):
2614         (WebCore::isInsertionPoint): Deleted.
2615         * html/shadow/TextControlInnerElements.h:
2616         (isType):
2617         (WebCore::isTextControlInnerTextElement): Deleted.
2618         * html/track/WebVTTElement.h:
2619         (isType):
2620         (WebCore::isWebVTTElement): Deleted.
2621         * inspector/InspectorInstrumentation.cpp:
2622         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
2623         * loader/ThreadableLoader.cpp:
2624         (WebCore::ThreadableLoader::create):
2625         (WebCore::ThreadableLoader::loadResourceSynchronously):
2626         * loader/cache/MemoryCache.cpp:
2627         (WebCore::MemoryCache::removeRequestFromCache):
2628         (WebCore::MemoryCache::removeRequestFromSessionCaches):
2629         * mathml/MathMLElement.h:
2630         (isType):
2631         (WebCore::isMathMLElement): Deleted.
2632         * svg/SVGAnimateElementBase.h:
2633         (isType):
2634         (WebCore::isSVGAnimateElementBase): Deleted.
2635         * svg/SVGDocument.h:
2636         (isType):
2637         (WebCore::isSVGDocument): Deleted.
2638         * svg/SVGElement.h:
2639         (isType):
2640         (WebCore::isSVGElement): Deleted.
2641         * svg/SVGFilterPrimitiveStandardAttributes.h:
2642         (isType):
2643         (WebCore::isSVGFilterPrimitiveStandardAttributes): Deleted.
2644         * svg/SVGGradientElement.h:
2645         (isType):
2646         (WebCore::isSVGGradientElement): Deleted.
2647         * svg/SVGGraphicsElement.h:
2648         (isType):
2649         (WebCore::isSVGGraphicsElement): Deleted.
2650         * svg/SVGPolyElement.h:
2651         (isType):
2652         (WebCore::isSVGPolyElement): Deleted.
2653         * svg/SVGTextContentElement.h:
2654         (isType):
2655         (WebCore::isSVGTextContentElement): Deleted.
2656         * svg/animation/SVGSMILElement.h:
2657         (isType):
2658         (WebCore::isSVGSMILElement): Deleted.
2659         * workers/DefaultSharedWorkerRepository.cpp:
2660         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
2661         * workers/WorkerGlobalScope.cpp:
2662         (WebCore::WorkerGlobalScope::close):
2663         * workers/WorkerGlobalScope.h:
2664         (isType):
2665         * workers/WorkerMessagingProxy.cpp:
2666         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
2667         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
2668         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2669         (WebCore::WorkerMessagingProxy::connectToInspector):
2670         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2671         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2672         * workers/WorkerScriptLoader.cpp:
2673         (WebCore::WorkerScriptLoader::loadSynchronously):
2674         * workers/WorkerThread.cpp:
2675         (WebCore::WorkerThread::stop):
2676
2677 2014-09-30  Chris Dumez  <cdumez@apple.com>
2678
2679         Use is<>() / downcast<>() for Element
2680         https://bugs.webkit.org/show_bug.cgi?id=137241
2681
2682         Reviewed by Andreas Kling.
2683
2684         Use is<>() / downcast<>() for Element instead of isElementNode() /
2685         toElement().
2686
2687         No new tests, no behavior change.
2688
2689         * accessibility/AXObjectCache.cpp:
2690         (WebCore::nodeHasRole):
2691         (WebCore::createFromRenderer):
2692         (WebCore::AXObjectCache::handleLiveRegionCreated):
2693         (WebCore::AXObjectCache::handleMenuItemSelected):
2694         (WebCore::AXObjectCache::rootAXEditableElement):
2695         (WebCore::isNodeAriaVisible):
2696         * accessibility/AccessibilityMenuList.cpp:
2697         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
2698         * accessibility/AccessibilityNodeObject.cpp:
2699         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2700         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
2701         (WebCore::AccessibilityNodeObject::isEnabled):
2702         (WebCore::AccessibilityNodeObject::isPressed):
2703         (WebCore::AccessibilityNodeObject::isHovered):
2704         (WebCore::AccessibilityNodeObject::anchorElement):
2705         (WebCore::nativeActionElement):
2706         (WebCore::AccessibilityNodeObject::actionElement):
2707         (WebCore::AccessibilityNodeObject::mouseButtonListener):
2708         (WebCore::AccessibilityNodeObject::titleElementText):
2709         (WebCore::AccessibilityNodeObject::helpText):
2710         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
2711         (WebCore::AccessibilityNodeObject::title):
2712         (WebCore::AccessibilityNodeObject::text):
2713         (WebCore::accessibleNameForNode):
2714         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2715         * accessibility/AccessibilityObject.cpp:
2716         (WebCore::AccessibilityObject::press):
2717         (WebCore::AccessibilityObject::hasTagName):
2718         (WebCore::AccessibilityObject::hasAttribute):
2719         (WebCore::AccessibilityObject::element):
2720         (WebCore::AccessibilityObject::classList):
2721         * accessibility/AccessibilityRenderObject.cpp:
2722         (WebCore::AccessibilityRenderObject::anchorElement):
2723         (WebCore::AccessibilityRenderObject::helpText):
2724         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
2725         (WebCore::AccessibilityRenderObject::titleUIElement):
2726         (WebCore::AccessibilityRenderObject::accessKey):
2727         (WebCore::AccessibilityRenderObject::setElementAttributeValue):
2728         (WebCore::AccessibilityRenderObject::setFocused):
2729         (WebCore::AccessibilityRenderObject::setValue):
2730         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2731         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
2732         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
2733         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
2734         (WebCore::AccessibilityRenderObject::setAccessibleName):
2735         (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
2736         * accessibility/AccessibilitySearchFieldButtons.cpp:
2737         (WebCore::AccessibilitySearchFieldCancelButton::press):
2738         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2739         (webkitAccessibleGetAttributes):
2740         * bindings/gobject/WebKitDOMPrivate.cpp:
2741         (WebKit::wrap):
2742         * bindings/js/JSNodeCustom.cpp:
2743         (WebCore::isReachableFromDOM):
2744         * css/CSSComputedStyleDeclaration.cpp:
2745         (WebCore::ComputedStyleExtractor::styledNode):
2746         * css/StyleResolver.cpp:
2747         (WebCore::StyleResolver::locateCousinList):
2748         * dom/ContainerNode.cpp:
2749         (WebCore::destroyRenderTreeIfNeeded):
2750         (WebCore::ContainerNode::notifyChildRemoved):
2751         * dom/ContainerNodeAlgorithms.cpp:
2752         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
2753         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
2754         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
2755         (WebCore::assertConnectedSubrameCountIsConsistent):
2756         * dom/Document.cpp:
2757         (WebCore::Document::importNode):
2758         (WebCore::Document::elementFromPoint):
2759         * dom/DocumentStyleSheetCollection.cpp:
2760         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2761         * dom/Element.cpp:
2762         (WebCore::Element::computeInheritedLanguage):
2763         * dom/Element.h:
2764         (WebCore::isElement):
2765         (WebCore::Node::hasAttributes):
2766         (WebCore::Node::attributes):
2767         (WebCore::Node::parentElement):
2768         * dom/ElementTraversal.h:
2769         (WebCore::Traversal<Element>::nextTemplate):
2770         (WebCore::ElementTraversal::previousIncludingPseudo):
2771         (WebCore::ElementTraversal::nextIncludingPseudo):
2772         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
2773         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
2774         * dom/LiveNodeList.cpp:
2775         (WebCore::LiveNodeList::namedItem):
2776         * dom/Node.cpp:
2777         (WebCore::Node::dumpStatistics):
2778         (WebCore::Node::normalize):
2779         (WebCore::Node::pseudoAwareFirstChild):
2780         (WebCore::Node::pseudoAwareLastChild):
2781         (WebCore::Node::computedStyle):
2782         (WebCore::Node::parentOrShadowHostElement):
2783         (WebCore::Node::rootEditableElement):
2784         (WebCore::Node::isEqualNode):
2785         (WebCore::Node::isDefaultNamespace):
2786         (WebCore::Node::lookupNamespacePrefix):
2787         (WebCore::Node::ancestorElement):
2788         (WebCore::appendAttributeDesc):
2789         (WebCore::Node::showNodePathForThis):
2790         (WebCore::Node::enclosingLinkEventParentOrSelf):
2791         (WebCore::Node::handleLocalEvents):
2792         (WebCore::Node::willRespondToMouseMoveEvents):
2793         (WebCore::Node::willRespondToMouseClickEvents):
2794         * dom/NodeRenderingTraversal.cpp:
2795         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
2796         * dom/Position.cpp:
2797         (WebCore::Position::element):
2798         * dom/Range.cpp:
2799         (WebCore::Range::getBorderAndTextQuads):
2800         * dom/ShadowRoot.h:
2801         (WebCore::Node::shadowRoot):
2802         * dom/StaticNodeList.cpp:
2803         (WebCore::StaticNodeList::namedItem):
2804         * dom/TreeScopeAdopter.cpp:
2805         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2806         * editing/ApplyStyleCommand.cpp:
2807         (WebCore::dummySpanAncestorForNode):
2808         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
2809         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
2810         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
2811         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2812         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
2813         * editing/BreakBlockquoteCommand.cpp:
2814         (WebCore::BreakBlockquoteCommand::doApply):
2815         * editing/CompositeEditCommand.cpp:
2816         (WebCore::CompositeEditCommand::isRemovableBlock):
2817         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
2818         (WebCore::CompositeEditCommand::moveParagraphs):
2819         * editing/DeleteSelectionCommand.cpp:
2820         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
2821         * editing/Editor.cpp:
2822         (WebCore::Editor::isSpellCheckingEnabledFor):
2823         (WebCore::Editor::applyEditingStyleToBodyElement):
2824         * editing/FormatBlockCommand.cpp:
2825         (WebCore::isElementForFormatBlock):
2826         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
2827         * editing/FrameSelection.cpp:
2828         (WebCore::removingNodeRemovesPosition):
2829         (WebCore::CaretBase::paintCaret):
2830         (WebCore::FrameSelection::debugRenderer):
2831         * editing/IndentOutdentCommand.cpp:
2832         (WebCore::IndentOutdentCommand::outdentParagraph):
2833         * editing/InsertParagraphSeparatorCommand.cpp:
2834         (WebCore::InsertParagraphSeparatorCommand::doApply):
2835         * editing/MarkupAccumulator.cpp:
2836         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
2837         (WebCore::MarkupAccumulator::appendStartMarkup):
2838         * editing/MarkupAccumulator.h:
2839         (WebCore::MarkupAccumulator::appendEndTag):
2840         * editing/ModifySelectionListLevel.cpp:
2841         (WebCore::IncreaseSelectionListLevelCommand::doApply):
2842         * editing/ReplaceSelectionCommand.cpp:
2843         (WebCore::isMailPasteAsQuotationNode):
2844         (WebCore::haveSameTagName):
2845         (WebCore::handleStyleSpansBeforeInsertion):
2846         (WebCore::ReplaceSelectionCommand::doApply):
2847         * editing/SpellChecker.cpp:
2848         (WebCore::SpellChecker::isCheckable):
2849         * editing/SplitTextNodeContainingElementCommand.cpp:
2850         (WebCore::SplitTextNodeContainingElementCommand::doApply):
2851         * editing/TextIterator.cpp:
2852         (WebCore::isRendererReplacedElement):
2853         * editing/cocoa/HTMLConverter.mm:
2854         (HTMLConverterCaches::propertyValueForNode):
2855         (HTMLConverterCaches::floatPropertyValueForNode):
2856         (HTMLConverterCaches::colorPropertyValueForNode):
2857         (HTMLConverter::aggregatedAttributesForAncestors):
2858         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
2859         (HTMLConverter::_traverseNode):
2860         (WebCore::editingAttributedStringFromRange):
2861         * editing/htmlediting.cpp:
2862         (WebCore::unsplittableElementForPosition):
2863         (WebCore::enclosingBlock):
2864         (WebCore::enclosingElementWithTag):
2865         (WebCore::enclosingTableCell):
2866         (WebCore::enclosingAnchorElement):
2867         (WebCore::areIdenticalElements):
2868         (WebCore::isNonTableCellHTMLBlockElement):
2869         (WebCore::deprecatedEnclosingBlockFlowElement):
2870         (WebCore::rendererForCaretPainting):
2871         * editing/markup.cpp:
2872         (WebCore::StyledMarkupAccumulator::wrapWithNode):
2873         (WebCore::createMarkupInternal):
2874         (WebCore::createFragmentFromText):
2875         * html/HTMLDetailsElement.cpp:
2876         (WebCore::DetailsSummaryElement::fallbackSummary):
2877         * html/HTMLElement.cpp:
2878         (WebCore::HTMLElement::insertAdjacentElement):
2879         (WebCore::contextElementForInsertion):
2880         (WebCore::HTMLElement::directionality):
2881         * html/HTMLFormControlElement.h:
2882         (WebCore::isHTMLFormControlElement):
2883         * html/HTMLMediaElement.h:
2884         (WebCore::isHTMLMediaElement):
2885         * html/HTMLObjectElement.cpp:
2886         (WebCore::HTMLObjectElement::updateDocNamedItem):
2887         * html/HTMLOptionElement.cpp:
2888         (WebCore::HTMLOptionElement::collectOptionInnerText):
2889         * html/HTMLSourceElement.cpp:
2890         (WebCore::HTMLSourceElement::removedFrom):
2891         * html/HTMLSummaryElement.cpp:
2892         (WebCore::isClickableControl):
2893         * html/HTMLTextFormControlElement.h:
2894         (WebCore::isHTMLTextFormControlElement):
2895         * html/parser/HTMLConstructionSite.cpp:
2896         (WebCore::HTMLConstructionSite::attachLater):
2897         * html/parser/HTMLElementStack.cpp:
2898         (WebCore::HTMLElementStack::htmlElement):
2899         * html/parser/HTMLStackItem.h:
2900         (WebCore::HTMLStackItem::element):
2901         * html/shadow/InsertionPoint.h:
2902         (WebCore::parentElementForDistribution):
2903         (WebCore::shadowRootOfParentForDistribution):
2904         * html/shadow/MediaControlElements.cpp:
2905         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
2906         * html/track/VTTCue.cpp:
2907         (WebCore::VTTCue::markFutureAndPastNodes):
2908         * inspector/DOMPatchSupport.cpp:
2909         (WebCore::DOMPatchSupport::innerPatchNode):
2910         (WebCore::DOMPatchSupport::createDigest):
2911         * inspector/InspectorCSSAgent.cpp:
2912         (WebCore::InspectorCSSAgent::elementForId):
2913         (WebCore::InspectorCSSAgent::buildArrayForRegions):
2914         (WebCore::InspectorCSSAgent::resetPseudoStates):
2915         * inspector/InspectorDOMAgent.cpp:
2916         (WebCore::InspectorDOMAgent::unbind):
2917         (WebCore::InspectorDOMAgent::assertElement):
2918         (WebCore::InspectorDOMAgent::setAttributesAsText):
2919         (WebCore::InspectorDOMAgent::setNodeName):
2920         (WebCore::InspectorDOMAgent::buildObjectForNode):
2921         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2922         (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
2923         * inspector/InspectorNodeFinder.cpp:
2924         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
2925         * inspector/InspectorOverlay.cpp:
2926         (WebCore::buildObjectForElementInfo):
2927         * inspector/InspectorStyleSheet.cpp:
2928         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
2929         * page/DragController.cpp:
2930         (WebCore::elementUnderMouse):
2931         * page/EventHandler.cpp:
2932         (WebCore::findDropZone):
2933         (WebCore::EventHandler::updateDragAndDrop):
2934         (WebCore::EventHandler::updateMouseEventTargetNode):
2935         * page/FocusController.cpp:
2936         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
2937         (WebCore::isFocusableShadowHost):
2938         (WebCore::adjustedTabIndex):
2939         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
2940         (WebCore::FocusController::findElementWithExactTabIndex):
2941         (WebCore::nextElementWithGreaterTabIndex):
2942         (WebCore::previousElementWithLowerTabIndex):
2943         (WebCore::FocusController::nextFocusableElement):
2944         (WebCore::FocusController::previousFocusableElement):
2945         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
2946         * page/PageSerializer.cpp:
2947         (WebCore::PageSerializer::serializeFrame):
2948         * rendering/HitTestResult.cpp:
2949         (WebCore::HitTestResult::title):
2950         (WebCore::HitTestResult::innerTextIfTruncated):
2951         (WebCore::HitTestResult::absoluteImageURL):
2952         (WebCore::HitTestResult::innerElement):
2953         (WebCore::HitTestResult::innerNonSharedElement):
2954         * rendering/RenderDeprecatedFlexibleBox.h:
2955         * rendering/RenderDetailsMarker.cpp:
2956         (WebCore::RenderDetailsMarker::isOpen):
2957         * rendering/RenderElement.h:
2958         (WebCore::RenderElement::element):
2959         (WebCore::RenderElement::nonPseudoElement):
2960         (WebCore::RenderElement::generatingElement):
2961         * rendering/RenderGrid.h:
2962         * rendering/RenderLayerBacking.cpp:
2963         (WebCore::isRestartedPlugin):
2964         * rendering/RenderListItem.h:
2965         * rendering/RenderNamedFlowThread.cpp:
2966         (WebCore::RenderNamedFlowThread::isChildAllowed):
2967         * rendering/RenderObject.cpp:
2968         (WebCore::RenderObject::addPDFURLRect):
2969         (WebCore::RenderObject::updateDragState):
2970         (WebCore::RenderObject::getUncachedPseudoStyle):
2971         * rendering/RenderRuby.h:
2972         * rendering/RenderRubyText.h:
2973         * rendering/RenderTableCaption.h:
2974         * rendering/RenderTableCol.h:
2975         * rendering/RenderTheme.cpp:
2976         (WebCore::RenderTheme::isEnabled):
2977         (WebCore::RenderTheme::isFocused):
2978         (WebCore::RenderTheme::isPressed):
2979         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
2980         (WebCore::RenderTheme::isReadOnlyControl):
2981         (WebCore::RenderTheme::isHovered):
2982         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
2983         * rendering/RenderThemeGtk.cpp:
2984         (WebCore::nodeHasClass):
2985         * rendering/RenderThemeMac.mm:
2986         (WebCore::RenderThemeMac::updatePressedState):
2987         (WebCore::RenderThemeMac::paintSliderThumb):
2988         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2989         * rendering/RenderTreeAsText.cpp:
2990         (WebCore::RenderTreeAsText::writeRenderObject):
2991         * rendering/TextAutosizer.cpp:
2992         (WebCore::TextAutosizer::isAutosizingContainer):
2993         (WebCore::TextAutosizer::containerContainsOneOfTags):
2994         * rendering/mathml/RenderMathMLBlock.cpp:
2995         (WebCore::RenderMathMLBlock::isChildAllowed):
2996         * style/StyleResolveTree.cpp:
2997         (WebCore::Style::attachChildren):
2998         (WebCore::Style::attachDistributedChildren):
2999         (WebCore::Style::detachDistributedChildren):
3000         (WebCore::Style::detachChildren):
3001         (WebCore::Style::resolveShadowTree):
3002         (WebCore::Style::resolveTree):
3003         * svg/SVGUseElement.cpp:
3004         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
3005         * svg/animation/SVGSMILElement.cpp:
3006         (WebCore::SVGSMILElement::buildPendingResource):
3007         * xml/XPathFunctions.cpp:
3008         (WebCore::XPath::FunLang::evaluate):
3009         * xml/XPathNodeSet.cpp:
3010         (WebCore::XPath::NodeSet::traversalSort):
3011         * xml/XPathStep.cpp:
3012         (WebCore::XPath::nodeMatchesBasicTest):
3013         (WebCore::XPath::Step::nodesInAxis):
3014         * xml/parser/XMLDocumentParserLibxml2.cpp:
3015         (WebCore::XMLDocumentParser::XMLDocumentParser):
3016         (WebCore::XMLDocumentParser::endElementNs):
3017
3018 2014-09-30  Brian J. Burg  <burg@cs.washington.edu>
3019
3020         Web Replay: use static Strings instead of AtomicStrings for replay input type tags
3021         https://bugs.webkit.org/show_bug.cgi?id=137086
3022
3023         Reviewed by Joseph Pecoraro.
3024
3025         This pattern doesn't work when we want to define some inputs in WebKit2,
3026         since the ReplayInputTypes class is generated from WebCore inputs only.
3027
3028         Replace tag-checking uses of ReplayInputTypes with InputTraits<T>::type().
3029         Remove thread-local input types, and switch to using a plain const String instead
3030         of const AtomicString.
3031
3032         No new tests, no behavior changed.
3033
3034         * CMakeLists.txt:
3035         * WebCore.xcodeproj/project.pbxproj:
3036         * inspector/InspectorReplayAgent.cpp:
3037         (WebCore::SerializeInputToJSONFunctor::operator()):
3038         * platform/ThreadGlobalData.cpp:
3039         (WebCore::ThreadGlobalData::ThreadGlobalData):
3040         (WebCore::ThreadGlobalData::destroy):
3041         * platform/ThreadGlobalData.h:
3042         (WebCore::ThreadGlobalData::inputTypes): Deleted.
3043         * replay/AllReplayInputs.h:
3044         * replay/EventLoopInput.h:
3045         * replay/EventLoopInputDispatcher.cpp:
3046         (WebCore::EventLoopInputDispatcher::dispatchInput):
3047         * replay/MemoizedDOMResult.cpp:
3048         (WebCore::MemoizedDOMResultBase::type):
3049         (JSC::InputTraits<MemoizedDOMResultBase>::type):
3050         * replay/MemoizedDOMResult.h:
3051         * replay/ReplayInputTypes.cpp: Removed.
3052         * replay/ReplayInputTypes.h: Removed.
3053         * replay/ReplayingInputCursor.cpp:
3054         (WebCore::ReplayingInputCursor::loadInput):
3055         * replay/SegmentedInputStorage.cpp:
3056         (WebCore::SegmentedInputStorage::load):
3057         (WebCore::SegmentedInputStorage::store):
3058         * replay/SerializationMethods.cpp:
3059         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
3060         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
3061
3062 2014-09-30  Eric Carlson  <eric.carlson@apple.com>
3063
3064         [Mac] MediaPlayerPrivateQTKit should not use FrameView
3065         https://bugs.webkit.org/show_bug.cgi?id=137119
3066
3067         Reviewed by Carlos Garcia Campos.
3068
3069         Remove obsolete QTKit code that would fall back to rendering into an NSView.
3070         Aside from being dead code, it was only used when accelerated compositing
3071         was not enabled and tha hasn't been possible for a long time, it required a
3072         layering violation to get the FrameView.
3073
3074         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3075         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3076         (WebCore::MediaPlayerPrivateQTKit::currentRenderingMode):
3077         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
3078         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
3079         (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
3080         (WebCore::MediaPlayerPrivateQTKit::hasSetUpVideoRendering):
3081         (WebCore::MediaPlayerPrivateQTKit::setSize):
3082         (WebCore::MediaPlayerPrivateQTKit::paint):
3083         (WebCore::mainThreadSetNeedsDisplay): Deleted.
3084         (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Deleted.
3085         (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): Deleted.
3086         (-[WebCoreMovieObserver menuForEventDelegate:]): Deleted.
3087         (-[WebCoreMovieObserver setView:]): Deleted.
3088
3089 2014-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
3090
3091         [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
3092         https://bugs.webkit.org/show_bug.cgi?id=137193
3093
3094         Reviewed by Gustavo Noronha Silva.
3095
3096         Remove GtkPopupMenu from platform.
3097
3098         * PlatformGTK.cmake:
3099         * platform/gtk/GtkPopupMenu.cpp: Removed.
3100         * platform/gtk/GtkPopupMenu.h: Removed.
3101
3102 2014-09-30  Zan Dobersek  <zdobersek@igalia.com>
3103
3104         Avoid copying the iterated-over items in range-based for-loops in RenderGrid
3105         https://bugs.webkit.org/show_bug.cgi?id=137246
3106
3107         Reviewed by Sergio Villar Senin.
3108
3109         Adjust the range-based for-loops in RenderGrid to avoid the unnecessary copying
3110         of the items that are being iterated.
3111
3112         * rendering/RenderGrid.cpp:
3113         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
3114         (WebCore::RenderGrid::insertItemIntoGrid):
3115         (WebCore::RenderGrid::gridAreaBreadthForChild):
3116
3117 2014-09-29  Sergio Villar Senin  <svillar@igalia.com>
3118
3119         [CSS Grid Layout] Use modern for-loops in RenderGrid
3120         https://bugs.webkit.org/show_bug.cgi?id=137214
3121
3122         Reviewed by Darin Adler.
3123
3124         New code is already using modern range based for loops. We had some
3125         "old" code pending to be migrated.
3126
3127         No new tests as there is no change in functionality.
3128
3129         * rendering/RenderGrid.cpp:
3130         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
3131         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3132         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
3133         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
3134         (WebCore::RenderGrid::layoutGridItems):
3135
3136 2014-08-01  Sergio Villar Senin  <svillar@igalia.com>
3137
3138         Caret not shown at the end of line in overtype mode
3139         https://bugs.webkit.org/show_bug.cgi?id=135508
3140
3141         Reviewed by Ryosuke Niwa.
3142
3143         When overtype mode is enabled we usually replace the 'normal'
3144         blinking caret shown in contenteditable elements by a block cursor
3145         that covers the next character to be replaced. The exception is the
3146         end of line where we fallback to the blinking caret even in overtype
3147         mode (as there is no next character to replace).
3148
3149         We were not showing anything at the end of lines in overtype mode
3150         because the detection of the end of line was incorrect and not very
3151         understandable. Replaced the old code with a proper and clean end of
3152         line detection mechanism compatible with bidi text.
3153
3154         Tests: editing/selection/block-cursor-overtype-mode-end-of-line-rtl.html
3155                editing/selection/block-cursor-overtype-mode-end-of-line.html
3156
3157         * editing/FrameSelection.cpp:
3158         (WebCore::FrameSelection::updateAppearance):
3159         * editing/VisibleUnits.cpp:
3160         (WebCore::isLogicalEndOfLine):
3161         * editing/VisibleUnits.h:
3162
3163 2014-09-29  Brian J. Burg  <burg@cs.washington.edu>
3164
3165         Web Inspector: InjectedScripts should not be profiled or displayed in Timeline
3166         https://bugs.webkit.org/show_bug.cgi?id=136806
3167
3168         Reviewed by Timothy Hatcher.
3169
3170         Instead of creating timeline records for injected scripts, suspend profiling
3171         of the current page before and after calling injected script functions.
3172
3173         * inspector/InspectorController.cpp:
3174         (WebCore::InspectorController::willCallInjectedScriptFunction):
3175         (WebCore::InspectorController::didCallInjectedScriptFunction):
3176
3177 2014-09-29  Brian J. Burg  <burg@cs.washington.edu>
3178
3179         Web Inspector: InspectorValues should use references for out parameters
3180         https://bugs.webkit.org/show_bug.cgi?id=137190
3181
3182         Reviewed by Joseph Pecoraro.
3183
3184         Clean up some call sites to explicitly check for cast success, and simplify
3185         some exceptional control flows.
3186
3187         No new tests, no behavior changed.
3188
3189         * inspector/CommandLineAPIHost.cpp:
3190         (WebCore::CommandLineAPIHost::inspectImpl):
3191         * inspector/InspectorCSSAgent.cpp:
3192         (WebCore::computePseudoClassMask):
3193         * inspector/InspectorDOMAgent.cpp:
3194         (WebCore::parseColor):
3195         (WebCore::parseConfigColor):
3196         (WebCore::parseQuad):
3197         (WebCore::InspectorDOMAgent::performSearch):
3198         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
3199         (WebCore::InspectorDOMAgent::innerHighlightQuad):
3200         (WebCore::InspectorDOMAgent::highlightFrame):
3201         * inspector/InspectorDOMStorageAgent.cpp:
3202         (WebCore::InspectorDOMStorageAgent::findStorageArea):
3203         * inspector/InspectorIndexedDBAgent.cpp: Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
3204         * inspector/InspectorPageAgent.cpp:
3205         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
3206         * inspector/InspectorReplayAgent.cpp:
3207         (WebCore::InspectorReplayAgent::replayToPosition):
3208         * inspector/InspectorResourceAgent.cpp:
3209         (WebCore::InspectorResourceAgent::willSendRequest):
3210         * inspector/InspectorStyleSheet.cpp:
3211         (WebCore::InspectorStyle::styleWithProperties):
3212         * inspector/InspectorStyleSheet.h:
3213         (WebCore::InspectorCSSId::InspectorCSSId):
3214         * inspector/InspectorTimelineAgent.cpp:
3215         (WebCore::InspectorTimelineAgent::startFromConsole):
3216         (WebCore::InspectorTimelineAgent::stopFromConsole):
3217         * inspector/InspectorWorkerAgent.cpp:
3218
3219 2014-09-29  Christophe Dumez  <cdumez@apple.com>
3220
3221         Use is<>() / downcast<>() for Document
3222         https://bugs.webkit.org/show_bug.cgi?id=137221
3223
3224         Reviewed by Andreas Kling.
3225
3226         Use is<>() / downcast<>() for Document instead of isDocumentNode() /
3227         toDocument().
3228
3229         No new tests, no behavior change.
3230
3231         * Modules/geolocation/Geolocation.cpp:
3232         (WebCore::Geolocation::document):
3233         (WebCore::Geolocation::frame):
3234         (WebCore::Geolocation::page):
3235         * Modules/indexeddb/IDBFactory.cpp:
3236         * Modules/mediasource/SourceBuffer.cpp:
3237         (WebCore::SourceBuffer::document):
3238         * Modules/mediastream/RTCPeerConnection.cpp:
3239         (WebCore::RTCPeerConnection::RTCPeerConnection):
3240         * Modules/notifications/Notification.cpp:
3241         (WebCore::Notification::Notification):
3242         (WebCore::Notification::show):
3243         (WebCore::Notification::permission):
3244         (WebCore::Notification::requestPermission):
3245         * Modules/webaudio/AudioContext.cpp:
3246         (WebCore::AudioContext::document):
3247         * Modules/webaudio/OfflineAudioContext.cpp:
3248         (WebCore::OfflineAudioContext::create):
3249         * Modules/webdatabase/DatabaseContext.cpp:
3250         (WebCore::DatabaseContext::allowDatabaseAccess):
3251         (WebCore::DatabaseContext::databaseExceededQuota):
3252         * Modules/websockets/ThreadableWebSocketChannel.cpp:
3253         (WebCore::ThreadableWebSocketChannel::create):
3254         * Modules/websockets/WebSocket.cpp:
3255         (WebCore::WebSocket::connect):
3256         * Modules/websockets/WebSocketHandshake.cpp:
3257         (WebCore::WebSocketHandshake::clientHandshakeMessage):
3258         (WebCore::WebSocketHandshake::clientHandshakeRequest):
3259         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3260         (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
3261         * bindings/gobject/WebKitDOMPrivate.cpp:
3262         (WebKit::wrap):
3263         * bindings/js/DOMConstructorWithDocument.h:
3264         (WebCore::DOMConstructorWithDocument::document):
3265         * bindings/js/DOMRequestState.h:
3266         (WebCore::DOMRequestState::DOMRequestState):
3267         (WebCore::DOMRequestState::clear):
3268         * bindings/js/JSAudioContextCustom.cpp:
3269         (WebCore::constructJSAudioContext):
3270         * bindings/js/JSDOMGlobalObject.cpp:
3271         (WebCore::toJSDOMGlobalObject):
3272         * bindings/js/JSLazyEventListener.cpp:
3273         (WebCore::JSLazyEventListener::initializeJSFunction):
3274         * bindings/js/JSNodeCustom.cpp:
3275         (WebCore::createWrapperInline):
3276         * bindings/js/ScheduledAction.cpp:
3277         (WebCore::ScheduledAction::execute):
3278         * bindings/js/ScriptState.cpp:
3279         (WebCore::frameFromExecState):
3280         * crypto/SubtleCrypto.cpp:
3281         (WebCore::SubtleCrypto::document):
3282         * dom/Comment.cpp:
3283         (WebCore::Comment::create):
3284         * dom/ContainerNode.cpp:
3285         (WebCore::checkAcceptChild):
3286         * dom/ContainerNodeAlgorithms.cpp:
3287         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
3288         * dom/Document.h:
3289         (WebCore::isDocument):
3290         * dom/DocumentFragment.cpp:
3291         (WebCore::DocumentFragment::create):
3292         * dom/Element.cpp:
3293         (WebCore::Element::computeInheritedLanguage):
3294         * dom/EventDispatcher.cpp:
3295         (WebCore::WindowEventContext::WindowEventContext):
3296         * dom/EventTarget.cpp:
3297         (WebCore::EventTarget::fireEventListeners):
3298         * dom/NamedFlowCollection.cpp:
3299         (WebCore::NamedFlowCollection::document):
3300         * dom/Node.cpp:
3301         (WebCore::Node::isDefaultNamespace):
3302         (WebCore::Node::lookupPrefix):
3303         (WebCore::Node::lookupNamespaceURI):
3304         (WebCore::Node::removedLastRef):
3305         * dom/Range.cpp:
3306         (WebCore::Range::create):
3307         * dom/ScriptExecutionContext.cpp:
3308         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
3309         * dom/Text.cpp:
3310         (WebCore::Text::create):
3311         * editing/MarkupAccumulator.cpp:
3312         (WebCore::MarkupAccumulator::appendStartMarkup):
3313         * html/HTMLDocument.h:
3314         (WebCore::isHTMLDocument):
3315         * html/HTMLNameCollection.h:
3316         (WebCore::HTMLNameCollection::document):
3317         * html/HTMLStyleElement.cpp:
3318         (WebCore::HTMLStyleElement::insertedInto):
3319         * html/ImageDocument.h:
3320         (WebCore::isImageDocument):
3321         * html/MediaDocument.h:
3322         (WebCore::isMediaDocument):
3323         * html/PluginDocument.h:
3324         (WebCore::isPluginDocument):
3325         * html/track/TextTrackCue.h:
3326         (WebCore::TextTrackCue::ownerDocument):
3327         * html/track/VTTCue.cpp:
3328         (WebCore::VTTCue::initialize):
3329         * html/track/VTTRegion.h:
3330         (WebCore::VTTRegion::ownerDocument):
3331         * inspector/InspectorDOMAgent.cpp:
3332         (WebCore::InspectorDOMAgent::assertDocument):
3333         (WebCore::InspectorDOMAgent::buildObjectForNode):
3334         (WebCore::InspectorDOMAgent::innerParentNode):
3335         * inspector/InspectorInstrumentation.cpp:
3336         (WebCore::frameForScriptExecutionContext):
3337         * inspector/InspectorInstrumentation.h:
3338         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
3339         * loader/TextTrackLoader.cpp:
3340         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
3341         (WebCore::TextTrackLoader::notifyFinished):
3342         (WebCore::TextTrackLoader::load):
3343         * loader/ThreadableLoader.cpp:
3344         (WebCore::ThreadableLoader::create):
3345         (WebCore::ThreadableLoader::loadResourceSynchronously):
3346         * loader/WorkerThreadableLoader.cpp:
3347         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
3348         * page/ContentSecurityPolicy.cpp:
3349         (WebCore::ContentSecurityPolicy::reportViolation):
3350         * page/Crypto.cpp:
3351         (WebCore::Crypto::document):
3352         * page/DOMTimer.cpp:
3353         (WebCore::DOMTimer::install):
3354         (WebCore::DOMTimer::fired):
3355         * page/DOMWindow.cpp:
3356         (WebCore::DOMWindow::focus):
3357         (WebCore::DOMWindow::close):
3358         (WebCore::DOMWindow::document):
3359         (WebCore::DOMWindow::styleMedia):
3360         (WebCore::DOMWindow::getComputedStyle):
3361         * page/DragController.cpp:
3362         (WebCore::DragController::dragExited):
3363         (WebCore::DragController::dragEnteredOrUpdated):
3364         * page/EventSource.cpp:
3365         (WebCore::EventSource::create):
3366         * page/FocusController.cpp:
3367         (WebCore::FocusController::advanceFocusDirectionally):
3368         * page/History.cpp:
3369         (WebCore::History::go):
3370         * page/SpatialNavigation.cpp:
3371         (WebCore::scrollInDirection):
3372         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
3373         (WebCore::canScrollInDirection):
3374         (WebCore::nodeRectInAbsoluteCoordinates):
3375         * svg/SVGDocument.h:
3376         (WebCore::isSVGDocument):
3377         * testing/Internals.cpp:
3378         (WebCore::Internals::contextDocument):
3379         (WebCore::Internals::frame):
3380         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
3381         * testing/js/WebCoreTestSupport.cpp:
3382         (WebCoreTestSupport::injectInternalsObject):
3383         (WebCoreTestSupport::resetInternalsObject):
3384         * workers/DefaultSharedWorkerRepository.cpp:
3385         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
3386         * workers/WorkerMessagingProxy.cpp:
3387         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
3388         * xml/XMLHttpRequest.cpp:
3389         (WebCore::XMLHttpRequest::document):
3390         (WebCore::XMLHttpRequest::open):
3391
3392 2014-09-29  David Hyatt  <hyatt@apple.com>
3393
3394         REGRESSION (r168046): Confused column spans when combined with dynamic animations
3395         https://bugs.webkit.org/show_bug.cgi?id=134048.
3396
3397         Reviewed by Dean Jackson.
3398
3399         Added fast/multicol/multicol-fieldset-span-changes.html
3400
3401         * rendering/RenderMultiColumnFlowThread.cpp:
3402         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
3403         Refactor handling of insertions into the multicolumn flow thread into
3404         a helper function, processPossibleSpannerDescendant. This makes it easier
3405         to call the code from more than one place.
3406
3407         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3408         Modify the nested columns span shifting code to avoid problems. The
3409         new code suppresses notifications and does the move of the spanner back
3410         into the original spot *before* removing the placeholder. This ensures that