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