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