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