AX: Do the early return when role is different than UnknownRole
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
2
3         AX: Do the early return when role is different than UnknownRole
4         https://bugs.webkit.org/show_bug.cgi?id=137880
5
6         Reviewed by Chris Fleizach.
7
8         We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
9         Just check m_ariaRole instead.
10
11         No new tests, no behavior change, just some cleanup
12
13         * accessibility/AccessibilityNodeObject.cpp:
14         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
15         * accessibility/AccessibilityRenderObject.cpp:
16         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
17         * accessibility/AccessibilityTableRow.cpp:
18         (WebCore::AccessibilityTableRow::determineAccessibilityRole):
19
20 2014-10-23  Yusuke Suzuki  <utatane.tea@gmail.com>
21
22         CSS JIT: Implement :matches
23         https://bugs.webkit.org/show_bug.cgi?id=137947
24
25         Reviewed by Benjamin Poulain.
26
27         Initial patch for supporting :matches in CSS JIT.
28         In this patch, we implement :matches
29         by leveraging the generalized nested backtracking implementation.
30
31         Tests: fast/selectors/matches-backtracking.html
32                fast/selectors/matches-complex.html
33
34         * cssjit/SelectorCompiler.cpp:
35         (WebCore::SelectorCompiler::addPseudoClassType):
36         (WebCore::SelectorCompiler::hasAnyCombinators):
37         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
38         (WebCore::SelectorCompiler::computeBacktrackingInformation):
39         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
40         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):
41
42 2014-10-23  Milan Crha  <mcrha@redhat.com>
43
44         RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
45         <https://webkit.org/b/137970>.
46
47         Reviewed by Carlos Garcia Campos.
48
49         * rendering/RenderThemeGtk.cpp:
50
51 2014-10-22  Milan Crha  <mcrha@redhat.com>
52
53         Do not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
54         <https://webkit.org/b/137969>.
55
56         Reviewed by Carlos Garcia Campos.
57
58         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
59
60 2014-10-22  Milan Crha  <mcrha@redhat.com>
61
62         Do not build WidgetBackingStoreGtkX11 when not used.
63         <https://webkit.org/b/137972>.
64
65         Reviewed by Carlos Garcia Campos.
66
67         * platform/gtk/WidgetBackingStoreGtkX11.cpp:
68         * platform/gtk/WidgetBackingStoreGtkX11.h:
69
70 2014-10-22  Simon Fraser  <simon.fraser@apple.com>
71
72         [iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
73         https://bugs.webkit.org/show_bug.cgi?id=137999
74         rdar://problem/18425550
75
76         Reviewed by Zalan Bujtas.
77         
78         When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
79         we'd fail to do a compositing layer rebuild, which caused various issues like unparented
80         descendants, and misplaced and unrepainted content.
81         
82         This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
83         with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
84         updateCompositingLayers() would be a no-op.
85         
86         Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
87         of an element changes, as we do for changes in clip.
88
89         Test: compositing/scrolling/touch-scroll-to-clip.html
90
91         * rendering/RenderLayerCompositor.cpp:
92         (WebCore::isScrollableOverflow):
93         (WebCore::styleHasTouchScrolling):
94         (WebCore::styleChangeRequiresLayerRebuild):
95
96 2014-10-22  Chris Dumez  <cdumez@apple.com>
97
98         Clean up virtual functions in rendering/
99         https://bugs.webkit.org/show_bug.cgi?id=137984
100
101         Reviewed by Darin Adler.
102
103         Clean up virtual functions in rendering/ by:
104         - Making virtual functions final when possible
105         - Making classes final when possible
106         - Using 'override' when appropriate
107         - Explicitly marking functions / destructors as virtual when they are
108           inherently virtual
109         - Dropping virtual destructors when the class does not have subclasses
110           and mark the class as final, to get rid of unnecessary vtables
111         - Making isXXX() virtual functions private on XXX classes to avoid
112           unnecessary type checks
113         - De-virtualizing some functions that do not need to be virtual
114         - Dropping final for virtual functions in classes already marked as
115           final
116
117         No new tests, no behavior change.
118
119         * html/shadow/SliderThumbElement.cpp:
120         * rendering/AutoTableLayout.h:
121         * rendering/ClipPathOperation.h:
122         (WebCore::ClipPathOperation::type):
123         (WebCore::ClipPathOperation::isSameType):
124         * rendering/EllipsisBox.h:
125         * rendering/FixedTableLayout.h:
126         * rendering/InlineElementBox.h:
127         * rendering/RenderBlockFlow.h:
128         * rendering/RenderCombineText.h:
129         * rendering/RenderCounter.h:
130         * rendering/RenderDeprecatedFlexibleBox.h:
131         * rendering/RenderFlexibleBox.h:
132         * rendering/RenderFullScreen.h:
133         * rendering/RenderGrid.h:
134         * rendering/RenderLayer.h:
135         * rendering/RenderLayerBacking.h:
136         * rendering/RenderLayerCompositor.h:
137         * rendering/RenderLayerFilterInfo.h:
138         * rendering/RenderLineBreak.h:
139         * rendering/RenderMarquee.h:
140         * rendering/RenderMediaControlElements.h:
141         * rendering/RenderMultiColumnFlowThread.h:
142         * rendering/RenderMultiColumnSet.h:
143         * rendering/RenderMultiColumnSpannerPlaceholder.h:
144         * rendering/RenderNamedFlowFragment.h:
145         * rendering/RenderNamedFlowThread.h:
146         * rendering/RenderQuote.h:
147         * rendering/RenderRegion.h:
148         (WebCore::RenderRegion::renderName): Deleted.
149         * rendering/RenderReplica.h:
150         * rendering/RenderRubyBase.h:
151         * rendering/RenderRubyRun.h:
152         * rendering/RenderScrollbar.h:
153         * rendering/RenderScrollbarPart.h:
154         * rendering/RenderScrollbarTheme.h:
155         (WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): Deleted.
156         (WebCore::RenderScrollbarTheme::scrollbarThickness): Deleted.
157         (WebCore::RenderScrollbarTheme::buttonsPlacement): Deleted.
158         (WebCore::RenderScrollbarTheme::supportsControlTints): Deleted.
159         (WebCore::RenderScrollbarTheme::shouldCenterOnThumb): Deleted.
160         (WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): Deleted.
161         (WebCore::RenderScrollbarTheme::autoscrollTimerDelay): Deleted.
162         (WebCore::RenderScrollbarTheme::registerScrollbar): Deleted.
163         (WebCore::RenderScrollbarTheme::unregisterScrollbar): Deleted.
164         * rendering/RenderSnapshottedPlugIn.h:
165         * rendering/RenderTextControlMultiLine.h:
166         * rendering/RenderTextFragment.h:
167         * rendering/RenderThemeGtk.h:
168         * rendering/RenderThemeIOS.h:
169         * rendering/RenderThemeWin.h:
170         * rendering/RenderVideo.h:
171         * rendering/TextAutosizer.h:
172         * rendering/TrailingFloatsRootInlineBox.h:
173         * rendering/mathml/RenderMathMLBlock.h:
174         * rendering/mathml/RenderMathMLMenclose.h:
175         * rendering/mathml/RenderMathMLOperator.h:
176         * rendering/mathml/RenderMathMLRadicalOperator.h:
177         * rendering/mathml/RenderMathMLRoot.h:
178         * rendering/mathml/RenderMathMLRow.h:
179         * rendering/mathml/RenderMathMLScripts.h:
180         * rendering/mathml/RenderMathMLToken.h:
181         * rendering/mathml/RenderMathMLUnderOver.h:
182         * rendering/shapes/BoxShape.h:
183         * rendering/shapes/PolygonShape.h:
184         * rendering/shapes/RasterShape.h:
185         * rendering/shapes/RectangleShape.h:
186         * rendering/style/BasicShapes.h:
187         * rendering/style/StylePendingImage.h:
188         (WebCore::StylePendingImage::computeIntrinsicDimensions): Deleted.
189         * rendering/svg/RenderSVGBlock.h:
190         * rendering/svg/RenderSVGContainer.h:
191         * rendering/svg/RenderSVGEllipse.h:
192         * rendering/svg/RenderSVGForeignObject.h:
193         * rendering/svg/RenderSVGImage.h:
194         * rendering/svg/RenderSVGPath.h:
195         * rendering/svg/RenderSVGRect.h:
196         * rendering/svg/RenderSVGResourceClipper.h:
197         * rendering/svg/RenderSVGResourceFilter.h:
198         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
199         * rendering/svg/RenderSVGResourceLinearGradient.h:
200         * rendering/svg/RenderSVGResourceMarker.h:
201         * rendering/svg/RenderSVGResourceMasker.h:
202         * rendering/svg/RenderSVGResourcePattern.h:
203         * rendering/svg/RenderSVGResourceRadialGradient.h:
204         * rendering/svg/RenderSVGRoot.h:
205         * rendering/svg/RenderSVGTSpan.h:
206         * rendering/svg/RenderSVGText.h:
207         * rendering/svg/RenderSVGTransformableContainer.h:
208         * rendering/svg/RenderSVGViewportContainer.h:
209         * rendering/svg/SVGInlineTextBox.h:
210         * rendering/svg/SVGRootInlineBox.h:
211
212 2014-10-22  Jer Noble  <jer.noble@apple.com>
213
214         REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
215         https://bugs.webkit.org/show_bug.cgi?id=137990
216
217         Reviewed by Alexey Proskuryakov.
218
219         NULL-check m_mediaSource before using.
220
221         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
222         (WebCore::SourceBufferPrivateAVFObjC::destroyParser):
223
224 2014-10-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
225
226         SVG loaded through html <img> can't request to load any external resources.
227         https://bugs.webkit.org/show_bug.cgi?id=137762.
228
229         Reviewed by Daniel Bates.
230
231         SVG images have unique security rules that prevent them from loading any external
232         resources. This patch enforces these rules in CachedResourceLoader::canRequest for
233         all non-data-uri resources.
234
235         The fix and the tests are ported but modified a little from the chromium fix:
236         http://src.chromium.org/viewvc/blink?view=rev&rev=176084
237
238         Test: http/tests/security/svg-image-with-cached-remote-image.html
239               http/tests/security/svg-image-with-css-cross-domain.html
240
241         For the SVG image, prevent loading any external sub-resource except for data urls.
242         * loader/cache/CachedResourceLoader.cpp:
243         (WebCore::CachedResourceLoader::canRequest):
244
245 2014-10-21  Ada Chan  <adachan@apple.com>
246
247         MediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audible AVMediaSelectionOption selected
248         https://bugs.webkit.org/show_bug.cgi?id=137935
249
250         Reviewed by Eric Carlson.
251
252         Set hasAudio to true if there's a selected audible AVMediaSelectionOption
253         after the call to updateAudioTracks(). Ditto for video.
254
255         Test: http/tests/media/hls/hls-audio-tracks-has-audio.html
256
257         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
258         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
259
260         * testing/Internals.cpp:
261         (WebCore::Internals::mediaElementHasCharacteristic):
262         * testing/Internals.h:
263         * testing/Internals.idl:
264         Add internals.mediaElementHasCharacteristic for the new test.
265
266 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
267
268         Remove WidgetBackingStoreCairo::create() factory function
269         https://bugs.webkit.org/show_bug.cgi?id=137943
270
271         Reviewed by Darin Adler.
272
273         WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
274         Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
275
276         No new tests, no behavior changes.
277
278         * platform/cairo/WidgetBackingStoreCairo.cpp:
279         (WebCore::WidgetBackingStoreCairo::create): Deleted.
280         * platform/cairo/WidgetBackingStoreCairo.h:
281         * platform/gtk/WidgetBackingStoreGtkX11.cpp:
282         (WebCore::WidgetBackingStoreGtkX11::create): Deleted.
283         * platform/gtk/WidgetBackingStoreGtkX11.h:
284
285 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
286
287         Remove TextCheckerEnchant::create() factory function
288         https://bugs.webkit.org/show_bug.cgi?id=137944
289
290         Reviewed by Darin Adler.
291
292         TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
293
294         No new tests, no behavior change.
295
296         * platform/text/enchant/TextCheckerEnchant.h:
297         (WebCore::TextCheckerEnchant::create): Deleted.
298
299 2014-10-22  Chris Dumez  <cdumez@apple.com>
300
301         Avoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
302         https://bugs.webkit.org/show_bug.cgi?id=137899
303
304         Reviewed by Darin Adler.
305
306         Avoid confusion between AccessibilityObject::isTable() and
307         isAccessibilityTable(). isTable() is equivalent to
308         is<AccessibilityTable>(), while isAccessibilityTable() is an
309         AccessibilityTable that is exposed as an AccessibilityTable to the
310         platform.
311
312         This patch is renaming isAccessibilityTable() to
313         isExposableThroughAccessibility(), makes it non-virtual and defines it
314         on AccessibilityTable only, for clarity.
315
316         This patch also renames isTableExposableThroughAccessibility() to
317         computeIisTableExposableThroughAccessibility() as it is called only
318         once to initialize the m_isExposableThroughAccessibility data member.
319
320         No new tests, no behavior change.
321
322         * accessibility/AccessibilityARIAGrid.cpp:
323         (WebCore::AccessibilityARIAGrid::addChildren):
324         * accessibility/AccessibilityARIAGrid.h:
325         * accessibility/AccessibilityARIAGridCell.cpp:
326         (WebCore::AccessibilityARIAGridCell::parentTable):
327         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
328         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
329         * accessibility/AccessibilityARIAGridRow.cpp:
330         (WebCore::AccessibilityARIAGridRow::disclosedRows):
331         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
332         (WebCore::AccessibilityARIAGridRow::parentTable):
333         * accessibility/AccessibilityNodeObject.cpp:
334         (WebCore::shouldUseAccessiblityObjectInnerText):
335         * accessibility/AccessibilityObject.cpp:
336         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
337         (WebCore::appendChildrenToArray):
338         * accessibility/AccessibilityObject.h:
339         (WebCore::AccessibilityObject::isAccessibilityTable): Deleted.
340         * accessibility/AccessibilityRenderObject.cpp:
341         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
342         * accessibility/AccessibilityTable.cpp:
343         (WebCore::AccessibilityTable::AccessibilityTable):
344         (WebCore::AccessibilityTable::init):
345         (WebCore::AccessibilityTable::isExposableThroughAccessibility):
346         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
347         (WebCore::AccessibilityTable::addChildren):
348         (WebCore::AccessibilityTable::tableLevel):
349         (WebCore::AccessibilityTable::roleValue):
350         (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
351         (WebCore::AccessibilityTable::title):
352         (WebCore::AccessibilityTable::isAccessibilityTable): Deleted.
353         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility): Deleted.
354         * accessibility/AccessibilityTable.h:
355         * accessibility/AccessibilityTableCell.cpp:
356         (WebCore::AccessibilityTableCell::isTableCell):
357         * accessibility/AccessibilityTableColumn.cpp:
358         (WebCore::AccessibilityTableColumn::headerObject):
359         (WebCore::AccessibilityTableColumn::addChildren):
360         * accessibility/AccessibilityTableHeaderContainer.cpp:
361         (WebCore::AccessibilityTableHeaderContainer::addChildren):
362         * accessibility/AccessibilityTableRow.cpp:
363         (WebCore::AccessibilityTableRow::isTableRow):
364         (WebCore::AccessibilityTableRow::parentTable):
365         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
366         (webkitAccessibleGetNChildren):
367         (webkitAccessibleRefChild):
368         (webkitAccessibleGetAttributes):
369         * accessibility/mac/AXObjectCacheMac.mm:
370         (WebCore::AXObjectCache::postPlatformNotification):
371         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
372         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
373         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
374         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
375         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
376         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
377         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
378
379 2014-10-22  Chris Dumez  <cdumez@apple.com>
380
381         Avoid repeated is<MutableStyleProperties>() checks in StyleProperties
382         https://bugs.webkit.org/show_bug.cgi?id=137978
383
384         Reviewed by Andreas Kling.
385
386         Reduce the amount of is<MutableStyleProperties>() checks in
387         StyleProperties by:
388         - Removing the checks in each method of StyleProperties::PropertyReference,
389           and replace them by a single check in StyleProperties::propertyAt().
390         - Providing faster propertyCount() / propertyAt() / isEmpty() methods on
391           MutableStyleProperties / ImmutableStyleProperties as a lot of callers use
392           tight typing.
393         - Using tighter typing at call sites whenever possible.
394
395         Ideally, we could be able to use iterators instead of propertyCount() /
396         propertyAt() but this is not trivial to do efficiently as the
397         representation in memory is fundamentally different for MutableStyleProperties
398         / ImmutableStyleProperties. We may be able to do better longer term, but
399         this is already more efficient short term at least.
400
401         No new tests, no behavior change.
402
403         * css/StyleProperties.cpp:
404         (WebCore::MutableStyleProperties::MutableStyleProperties):
405         (WebCore::StyleProperties::PropertyReference::cssText):
406         * css/StyleProperties.h:
407         (WebCore::StyleProperties::PropertyReference::PropertyReference):
408         (WebCore::StyleProperties::PropertyReference::id):
409         (WebCore::StyleProperties::PropertyReference::shorthandID):
410         (WebCore::StyleProperties::PropertyReference::isImportant):
411         (WebCore::StyleProperties::PropertyReference::isInherited):
412         (WebCore::StyleProperties::PropertyReference::isImplicit):
413         (WebCore::StyleProperties::PropertyReference::value):
414         (WebCore::StyleProperties::PropertyReference::toCSSProperty):
415         (WebCore::StyleProperties::isEmpty):
416         (WebCore::ImmutableStyleProperties::isEmpty):
417         (WebCore::MutableStyleProperties::isEmpty):
418         (WebCore::ImmutableStyleProperties::propertyAt):
419         (WebCore::MutableStyleProperties::propertyAt):
420         (WebCore::StyleProperties::propertyAt):
421         (WebCore::StyleProperties::propertyCount):
422         (WebCore::StyleProperties::PropertyReference::propertyMetadata): Deleted.
423         (WebCore::StyleProperties::PropertyReference::propertyValue): Deleted.
424         * editing/EditingStyle.cpp:
425         (WebCore::removePropertiesInStyle):
426         (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
427
428 2014-10-22  Eric Carlson  <eric.carlson@apple.com>
429
430         [Mac][MediaStream] clean up bit rot
431         https://bugs.webkit.org/show_bug.cgi?id=137976
432
433         Reviewed by Jer Noble.
434
435         No new tests, this just gets the Mac port compiling again.
436
437         * Modules/mediastream/MediaStream.h: Add a virtual destructor to Observer since it has 
438             a virtual method.
439
440         * WebCore.exp.in: Export RTCPeerConnectionHandler::create and RTCPeerConnectionHandlerMock::create(WebCore::RTCPeerConnectionHandlerClient*),
441             they are both use by Internals for testing.
442
443         * WebCore.xcodeproj/project.pbxproj: Add RTC and MediaStream files.
444
445         * html/HTMLMediaElement.h: Forward declare MediaStream instead of including MediaStream.h.
446
447         * platform/mediastream/RTCPeerConnectionHandler.h: EXPORT the create method.
448
449         * platform/mock/MediaConstraintsMock.cpp:
450         (WebCore::isSupported): Make static.
451         (WebCore::isValid): Ditto.
452
453         * platform/mock/RTCPeerConnectionHandlerMock.h: EXPORT the create method.
454
455 2014-10-22  Chris Dumez  <cdumez@apple.com>
456
457         [Mac][WK2] Fix applicationIsSafari() detection
458         https://bugs.webkit.org/show_bug.cgi?id=137893
459
460         Reviewed by Alexey Proskuryakov.
461
462         I noticed when profiling Safari on Mac that we were exercising a code
463         path we shouldn't because it is meant for other applications that
464         Safari.
465
466         The detection relies on the applicationIsSafari() function in
467         RuntimeApplicationChecks.cpp. This was in some cases returning false on
468         my machine even though I was running Safari so I investigated a bit and
469         noticed that the check relies on the main bundle identifier string and
470         is doing:
471         isSafari = mainBundleIsEqualTo("com.apple.Safari")
472             || mainBundleIsEqualTo("com.apple.WebProcess");
473
474         This WebProcess detection is very unreliable because:
475         - It matches other apps than Safari's WebProcesses
476         - The bundle name for the WebProcess is sometimes
477         "com.apple.WebKit.WebContent" or
478         "com.apple.WebKit.WebContent.Development".
479
480         The solution used in this patch is to move the applicationIsSafari()
481         check to the UIProcess so that the check actually succeeds reliably.
482         The call site for applicationIsSafari() was in
483         ResourceRequest::useQuickLookResourceCachingQuirks(). This match
484         removes that logic from ResourceRequest and move it to
485         FrameLoaderClient as only the FrameLoader is interested in this
486         information. The logic to determine if we should use QuickLook
487         resource caching quirks is moved to a new QuickLook class under
488         platform/ as the code needs to be shared between WebKit and WebKit2.
489         On WebKit2, we make use that code on the UIProcess side and pass
490         the flag as a parameter when constructing the WebProcess. The flag
491         is then stored on the WebProcess and queried by WebFrameLoaderClient.
492
493         Previously, we would spend ~1% of the WebProcess cpu time (when loading
494         apple.com) trying to detect if we should use QuickLook resource caching
495         quirks even though that check was supposed to be disabled and return
496         early when running Safari.
497
498         No new tests, not easily testable.
499
500         * WebCore.exp.in:
501         * WebCore.xcodeproj/project.pbxproj:
502         * loader/EmptyClients.h:
503         * loader/FrameLoader.cpp:
504         (WebCore::FrameLoader::subresourceCachePolicy):
505         * loader/FrameLoaderClient.h:
506         * platform/RuntimeApplicationChecks.cpp:
507         (WebCore::applicationIsSafari):
508         Remove "com.apple.WebProcess" bundle name matching as this causes false
509         positives (matches other applications than Safari's WebProcesses) and
510         it is no longer needed now that applicationIsSafari() is always called
511         from the UIProcess.
512
513         * platform/mac/QuickLookMac.h: Added.
514         * platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
515         (WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
516         * platform/network/cf/ResourceRequest.h:
517         * platform/network/ios/ResourceRequestIOS.mm:
518         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
519         * platform/network/mac/ResourceRequestMac.mm:
520         (WebCore::initQuickLookResourceCachingQuirks): Deleted.
521         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
522
523 2014-10-22  Shivakumar JM  <shiva.jm@samsung.com>
524
525         XMLHttpRequest should support attribute responseURL as per latest XHR spec.
526         https://bugs.webkit.org/show_bug.cgi?id=136938
527
528         Reviewed by Alexey Proskuryakov.
529
530         Tests: http/tests/xmlhttprequest/basic-auth-responseURL.html
531                http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html
532                http/tests/xmlhttprequest/redirect-credentials-responseURL.html
533                http/tests/xmlhttprequest/xmlhttprequest-responseURL.html
534
535         XMLHttpRequest should support attribute responseURL
536
537         * xml/XMLHttpRequest.cpp:
538         (WebCore::XMLHttpRequest::responseURL):
539         * xml/XMLHttpRequest.h:
540         * xml/XMLHttpRequest.idl:
541
542 2014-10-22  Chris Dumez  <cdumez@apple.com>
543
544         Add initial support for generating the StyleBuilder from CSSPropertyNames.in
545         https://bugs.webkit.org/show_bug.cgi?id=137910
546
547         Reviewed by Andreas Kling.
548
549         Add initial support for generating the StyleBuilder from
550         CSSPropertyNames.in. This is a first step towards getting rid of the
551         legacy DeprecatedStyleBuilder class and having everything defined in one
552         place (CSSPropertyNames.in).
553
554         This patch updates makeprop.pl script to generate a StyleBuilder.cpp
555         file that generate a the StyleBuilder::applyProperty() method
556         implementation using a huge switch statement for all the CSS
557         properties. With this patch, we are now generating the new StyleBuilder
558         code for all the "simple" CSS properties (i.e. those that were using
559         ApplyPropertyDefault<> in DeprecatedStyleBuilder.cpp). I am using a
560         "NewStyleBuilder" option in CSSPropertyNames.in for properties that
561         we generate to help with improving incrementally the generator. Once
562         we are able to generate all properties, this transition option will
563         do away and become the default.
564
565         By default, the generator will make an educated guess for the type
566         name, the getter, the setter and the initial function of each property.
567         For example, for the border-collapse property, it will use:
568         - TypeName: EBorderCollapse (i.e. 'E' + PropertyId)
569         - Getter: borderCollapse() (i.e. PropertyId with first letter lowercased)
570         - Setter: setBorderCollapse() (i.e. 'set' + PropertyId)
571         - Initial: initialBorderCollapse() (i.e. 'initial' + PropertyId)
572
573         This works for most properties. For properties that need
574         special-casing, developers can use the following options in
575         CSSPropertyNames.in:
576         - TypeName: Overrides the type name
577         - Getter: Overrides the getter name
578         - Setter: Overrides the setter name
579         - Initial: Overrides the initial function name
580         - NameForMethods: Overrides the Getter / Setter / Initial function
581           names. For e.g. "NameForMethods=OverflowWrap" will use
582           "overflowWrap() / setOverflowWrap() / initialOverflowWrap()".
583
584         The patch is inspired by the following Blink revision by
585         <timloh@chromium.org>:
586         https://src.chromium.org/viewvc/blink?view=rev&revision=150424
587
588         No new tests, no behavior change.
589
590         * CMakeLists.txt:
591         * DerivedSources.make:
592         * WebCore.vcxproj/WebCore.vcxproj:
593         * WebCore.vcxproj/WebCore.vcxproj.filters:
594         * WebCore.xcodeproj/project.pbxproj:
595         * css/CSSPropertyNames.in:
596         * css/DeprecatedStyleBuilder.cpp:
597         (WebCore::ApplyPropertyVerticalAlign::createHandler):
598         (WebCore::ApplyPropertyDisplay::applyInitialValue):
599         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
600         * css/StyleBuilder.h: Added.
601         * css/StyleResolver.cpp:
602         (WebCore::StyleResolver::adjustRenderStyle):
603         (WebCore::StyleResolver::applyProperty):
604         * css/makeprop.pl:
605         * rendering/style/RenderStyle.h:
606         Move the initialXXX() methods that were in NonInheritedFlags to
607         RenderStyle class, with the other initialXXX() methods to facilitate
608         code generation.
609
610         * rendering/style/StyleMultiColData.cpp:
611         (WebCore::StyleMultiColData::StyleMultiColData):
612         * rendering/style/StyleRareNonInheritedData.cpp:
613         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
614
615 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
616
617         Unreviewed. Fix GStreamer debug build after r175050.
618
619         Explicitly include wtf/MainThread.h.
620
621         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
622
623 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
624
625         [GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other WebCore types
626         https://bugs.webkit.org/show_bug.cgi?id=137064
627
628         Reviewed by Philippe Normand.
629
630         Move the media resource loader to a new class in WebCore/loader
631         that inherits from a PlatformMediaResourceLoader class defined in
632         the platform layer. The platform specific behaviour is implemented
633         using a client also defined in the platform layer, implemented by
634         every media backend, and used by the WebCore MediaResourceLoader.
635
636         * CMakeLists.txt: Add new files to compilation.
637         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
638         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
639         * WebCore.xcodeproj/project.pbxproj: Ditto.
640         * html/HTMLMediaElement.cpp:
641         (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
642         Create a MediaResourceLoader.
643         (WebCore::HTMLMediaElement::mediaPlayerCORSMode): Deleted. This is
644         no longer used.
645         * html/HTMLMediaElement.h:
646         * loader/MediaResourceLoader.cpp: Added.
647         (WebCore::MediaResourceLoader::MediaResourceLoader):
648         (WebCore::MediaResourceLoader::~MediaResourceLoader):
649         (WebCore::MediaResourceLoader::start): Start a new load for the
650         given request and load options.
651         (WebCore::MediaResourceLoader::stop): Stop the load if needed.
652         (WebCore::MediaResourceLoader::setDefersLoading):
653         (WebCore::MediaResourceLoader::responseReceived): Handle CORS
654         access check and notify the client about the response.
655         (WebCore::MediaResourceLoader::dataReceived): Notify the client.
656         (WebCore::MediaResourceLoader::notifyFinished): Ditto.
657         (WebCore::MediaResourceLoader::getOrCreateReadBuffer): Ask the
658         client to create the read buffer.
659         * loader/MediaResourceLoader.h: Added.
660         * platform/graphics/MediaPlayer.cpp:
661         (WebCore::MediaPlayer::createResourceLoader): Call
662         mediaPlayerCreateResourceLoader() if there's a client.
663         * platform/graphics/MediaPlayer.h:
664         (WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
665         (WebCore::MediaPlayerClient::mediaPlayerCORSMode): Deleted.
666         * platform/graphics/PlatformMediaResourceLoader.h: Added.
667         (WebCore::PlatformMediaResourceLoaderClient::responseReceived):
668         (WebCore::PlatformMediaResourceLoaderClient::dataReceived):
669         (WebCore::PlatformMediaResourceLoaderClient::bufferReceived):
670         (WebCore::PlatformMediaResourceLoaderClient::accessControlCheckFailed):
671         (WebCore::PlatformMediaResourceLoaderClient::loadFailed):
672         (WebCore::PlatformMediaResourceLoaderClient::loadFinished):
673         (WebCore::PlatformMediaResourceLoaderClient::getOrCreateReadBuffer):
674         (WebCore::PlatformMediaResourceLoader::~PlatformMediaResourceLoader):
675         (WebCore::PlatformMediaResourceLoader::stop):
676         (WebCore::PlatformMediaResourceLoader::setDefersLoading):
677         (WebCore::PlatformMediaResourceLoader::didPassAccessControlCheck):
678         (WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
679         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
680         (webKitWebSrcStop): Also delete the PlatformMediaResourceLoader.
681         (webKitWebSrcStart): Create a new resource loader using
682         MediaPlayer::createResourceLoader() with a new
683         CachedResourceStreamingClient as client.
684         (webKitWebSrcNeedDataMainCb): Call setDefersLoading() for the
685         resource loader if there's one.
686         (webKitWebSrcEnoughDataMainCb): Ditto.
687         (webKitSrcPassedCORSAccessCheck): Return didPassAccessControlCheck.
688         (StreamingClient::handleResponseReceived): Remove the CORS check
689         result parameter since that's now handled by MediaResourceLoader.
690         (CachedResourceStreamingClient::CachedResourceStreamingClient):
691         (CachedResourceStreamingClient::~CachedResourceStreamingClient):
692         (CachedResourceStreamingClient::getOrCreateReadBuffer):
693         (CachedResourceStreamingClient::responseReceived): Update didPassAccessControlCheck.
694         (CachedResourceStreamingClient::dataReceived):
695         (CachedResourceStreamingClient::accessControlCheckFailed): Log the
696         error and stop the load.
697         (CachedResourceStreamingClient::loadFailed): Log the error if it
698         was not a cancellation.
699         (CachedResourceStreamingClient::loadFinished):
700         (ResourceHandleStreamingClient::didReceiveResponse):
701         (CachedResourceStreamingClient::setDefersLoading): Deleted.
702         (CachedResourceStreamingClient::notifyFinished): Deleted.
703
704 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
705
706         [GTK] Move GtkInputMethodFilter from Platform to WebKit2
707         https://bugs.webkit.org/show_bug.cgi?id=137884
708
709         Reviewed by Gustavo Noronha Silva.
710
711         Remove GtkInputMethodFilter.
712
713         * PlatformGTK.cmake:
714         * platform/gtk/GtkInputMethodFilter.cpp: Removed.
715         * platform/gtk/GtkInputMethodFilter.h: Removed.
716
717 2014-10-22  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
718
719         Match spec for font-weight: bolder|lighter
720         https://bugs.webkit.org/show_bug.cgi?id=137919
721
722         Reviewed by Andreas Kling.
723
724         This patch is a merge of Blink's
725         https://chromiumcodereview.appspot.com/15994009
726         
727         Currently, bolder and lighter change font-weight in a non-compliant way.
728         The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
729         exactly what the computed values should be given the inherited weight values,
730         so we should match those.
731         
732         The removed FIXME's for selecting the next lightest/heaviest weight from
733         the used font family seems to refer to behaviour from
734         CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
735         with a simpler procedure for resolving bolder and lighter in font weights
736         in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).
737         
738         and https://codereview.chromium.org/137813004
739         
740         According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
741         weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
742         that inherited weight before calculating 'lighter' and 'bolder'.
743
744         Tests: css3/font-weight-multiple-selectors.html
745                css3/font-weight.html
746
747         * css/DeprecatedStyleBuilder.cpp:
748         (WebCore::ApplyPropertyFontWeight::applyValue):
749         * platform/graphics/FontDescription.cpp:
750         (WebCore::FontDescription::lighterWeight):
751         (WebCore::FontDescription::bolderWeight):
752
753 2014-10-22  Rohit Kumar  <kumar.rohit@samsung.com>
754
755         [GTK]: Fix unused parameter build warnings in WebCore/platform module
756         https://bugs.webkit.org/show_bug.cgi?id=137921
757
758         Reviewed by Carlos Garcia Campos.
759
760         * platform/ScrollAnimatorNone.cpp:
761         (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData):
762         (WebCore::ScrollAnimatorNone::animationTimerFired):
763
764 2014-10-22  Dhi Aurrahman  <diorahman@rockybars.com>
765
766         Add relList to the anchor, area and link elements
767         https://bugs.webkit.org/show_bug.cgi?id=137860
768
769         Reviewed by Darin Adler and Chris Dumez.
770
771         Add relList to reflect the rel content attribute for anchor[1],
772         area[2] and link[3] elements.
773
774         [1] https://html.spec.whatwg.org/multipage/semantics.html#dom-a-rellist 
775         [2] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-area-rellist
776         [3] https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist
777
778         Tests: fast/dom/rel-list-gc.html
779                fast/dom/rel-list.html
780                perf/rel-list-remove.html
781
782         * CMakeLists.txt:
783         * WebCore.vcxproj/WebCore.vcxproj:
784         * WebCore.vcxproj/WebCore.vcxproj.filters:
785         * WebCore.xcodeproj/project.pbxproj:
786         * dom/SpaceSplitString.cpp:
787         (WebCore::SpaceSplitString::set):
788         * html/HTMLAnchorElement.cpp:
789         (WebCore::HTMLAnchorElement::parseAttribute):
790         (WebCore::HTMLAnchorElement::relList):
791         (WebCore::HTMLAnchorElement::setRel): Deleted.
792         * html/HTMLAnchorElement.h:
793         * html/HTMLAnchorElement.idl:
794         * html/HTMLAreaElement.idl:
795         * html/HTMLLinkElement.cpp:
796         (WebCore::HTMLLinkElement::parseAttribute):
797         (WebCore::HTMLLinkElement::relList):
798         * html/HTMLLinkElement.h:
799         * html/HTMLLinkElement.idl:
800         * html/RelList.cpp: Added.
801         (WebCore::RelList::RelList):
802         (WebCore::RelList::ref):
803         (WebCore::RelList::deref):
804         (WebCore::RelList::length):
805         (WebCore::RelList::item):
806         (WebCore::RelList::element):
807         (WebCore::RelList::updateRelAttribute):
808         (WebCore::RelList::containsInternal):
809         (WebCore::RelList::value):
810         (WebCore::RelList::setValue):
811         * html/RelList.h: Added.
812
813 2014-10-21  Andy Estes  <aestes@apple.com>
814
815         One more iOS build fix after r175013.
816
817         * platform/graphics/ios/FontCacheIOS.mm:
818         (WebCore::FontCache::createFontPlatformData):
819
820 2014-10-21  Benjamin Poulain  <bpoulain@apple.com>
821
822         CSS Rule features are ignored for nested CSS Selector lists
823         https://bugs.webkit.org/show_bug.cgi?id=137908
824
825         Reviewed by Andreas Kling.
826
827         When Rule feature sets were collected, any selector list nested inside an other
828         selector list was ignored when collecting properties of the CSS Selector.
829
830         As a result, style was not invalidated properly when any property listed in
831         the nested selectors.
832
833         This patch fixes the issue by make RuleFeatureSet::collectFeaturesFromSelector()
834         recursive, evaluating every chain of every selector lists.
835
836         Tests: fast/css/class-style-invalidation-optimization.html
837                fast/css/direct-adjacent-style-sharing-1.html
838                fast/css/direct-adjacent-style-sharing-2.html
839                fast/css/direct-adjacent-style-sharing-3.html
840                fast/css/id-style-invalidation-optimization.html
841                fast/selectors/class-style-update-with-not.html
842                fast/selectors/class-style-update-with-nth-child-of.html
843                fast/selectors/class-style-update.html
844
845         * css/RuleFeature.cpp:
846         (WebCore::recursivelyCollectFeaturesFromSelector):
847         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
848         * css/RuleFeature.h:
849         * css/RuleSet.cpp:
850         (WebCore::collectFeaturesFromRuleData):
851
852 2014-10-21  Tim Horton  <timothy_horton@apple.com>
853
854         Try to fix the iOS build after r175013.
855
856         * platform/graphics/ios/FontCacheIOS.mm:
857         (WebCore::FontCache::createFontPlatformData):
858
859 2014-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
860
861         Use std::unique_ptr | std::make_unique in FontCacheFoo
862         https://bugs.webkit.org/show_bug.cgi?id=137905
863
864         Reviewed by Darin Adler.
865
866         Clean up PassOwnPtr|OwnPtr using std::unique_ptr|std::make_unique.
867
868         No new tests, no behavior changes.
869
870         * platform/graphics/FontCache.cpp:
871         (WebCore::FontCache::getCachedFontPlatformData):
872         * platform/graphics/FontCache.h:
873         * platform/graphics/freetype/FontCacheFreeType.cpp:
874         (WebCore::FontCache::createFontPlatformData):
875         * platform/graphics/ios/FontCacheIOS.mm:
876         (WebCore::FontCache::createFontPlatformData):
877         * platform/graphics/mac/FontCacheMac.mm:
878         (WebCore::FontCache::createFontPlatformData):
879         * platform/graphics/win/FontCacheWin.cpp:
880         (WebCore::FontCache::createFontPlatformData):
881
882 2014-10-21  Ada Chan  <adachan@apple.com>
883
884         Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
885         https://bugs.webkit.org/show_bug.cgi?id=137305
886
887         Reviewed by Darin Adler.
888
889         This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
890         GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
891         volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
892         behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
893         m_volumeInitialized is true.
894
895         * html/HTMLMediaElement.cpp:
896         (WebCore::HTMLMediaElement::updateVolume):
897
898 2014-10-21  Jer Noble  <jer.noble@apple.com>
899
900         [EME][Mac] Update to match new AVStreamSession API and requirements.
901         https://bugs.webkit.org/show_bug.cgi?id=137923
902
903         Reviewed by Eric Carlson.
904
905         The session identifier has moved from AVStreamDataParser to -[AVStreamSession contentProtectionSessionIdentifier]
906         and the property is no longer KVObservable. A new notification key has been added in place of KVO.
907
908         Additionally, the requirements for using AVStreamDataParser with AVStreamSession have changed. It is now
909         required that AVStreamDataParsers be added to an AVStreamSession before the 
910         -streamSession:didProvideContentKeyRequestInitializationData:forTrackID delegate method is called. A
911         -streamParserWillProvideContentKeyRequestInitializationData:forTrackID delegate has been added, and
912         an AVStreamSession must be created and the AVStreamDataParser added to it during the scope of that delegate
913         method.
914
915         To facilitate this, the MediaPlayerPrivateMediaSourceAVFObjC object will lazily create and own a AVStreamSession
916         object when requested. The SourceBufferPrivateAVFObjC object will listen for the -willProvide delegate call
917         and will add its AVStreamDataParser to that AVStreamSession when called.
918
919         The CDMSessionMediaSourceAVFObjC object is no longer responsible for creating the AVStreamSession, and because
920         the session identifier has moved from many AVStreamDataParsers to a single AVStreamSession, the
921         CDMSessionMediaSourceAVFObjCObserver class can become much simpler, as it only has to observe a single object.
922
923         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
924         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
925         (-[CDMSessionMediaSourceAVFObjCObserver dealloc]): Deleted.
926         (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): Deleted.
927         (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): Deleted.
928         (-[CDMSessionMediaSourceAVFObjCObserver invalidate]): Deleted.
929         (-[CDMSessionMediaSourceAVFObjCObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
930         (-[CDMSessionMediaSourceAVFObjCObserver contentProtectionSessionIdentifierChanged:]): Added.
931         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Call setStreamSession(nullptr).
932         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): The sessionId is now a value in the dictionary, not the key.
933         (WebCore::CDMSessionMediaSourceAVFObjC::update): No longer create an AVStreamSession.
934         (WebCore::CDMSessionMediaSourceAVFObjC::setStreamSession): Add and remove observers as appropriate.
935         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): No longer add or remove parsers from AVStreamSessions.
936         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Ditto.
937         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
938         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
939         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Simple getter.
940         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Lazy initializing getter.
941         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Call setStreamSession().
942         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
943         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
944         (-[WebAVStreamDataParserListener streamParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Synchronously pass to SourceBufferPrivateAVFObjC.
945         (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): Add the parser to an AVStreamSession.
946         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Check the trackId.
947         * platform/mac/SoftLinking.h:
948
949 2014-10-21  Jaehun Lim  <ljaehun.lim@samsung.com>
950
951         'true' isn't a valid value for justify-self
952         https://bugs.webkit.org/show_bug.cgi?id=137913
953
954         Reviewed by Andreas Kling.
955
956         Merged from Blink (patch by dstockwell):
957         <https://src.chromium.org/viewvc/blink?view=rev&revision=174638>
958
959         CSS Box Alignment Module Level 3:
960         http://dev.w3.org/csswg/css-align/#justify-self-property
961
962         No new tests, modify existing test case.
963
964         * css/CSSParser.cpp:
965         (WebCore::CSSParser::parseJustifySelf):
966
967 2014-10-21  Michael Saboff  <msaboff@apple.com>
968
969         Add operator==(PropertyName, const char*)
970         https://bugs.webkit.org/show_bug.cgi?id=137925
971
972         Reviewed by Mark Lam.
973
974         Use new == operator to compare a PropertyName with a string literal.
975
976         * bindings/js/JSHTMLDocumentCustom.cpp:
977         (WebCore::JSHTMLDocument::getOwnPropertySlot):
978
979 2014-10-21  Chris Dumez  <cdumez@apple.com>
980
981         Unreviewed iOS build fix after r174921.
982
983         Export new symbol after function rename.
984
985         * WebCore.exp.in:
986         * WebCore.order:
987
988 2014-10-21  Chris Dumez  <cdumez@apple.com>
989
990         Unreviewed iOS build fix after r174921.
991
992         Remove symbol from export files that no longer exists.
993
994         * WebCore.exp.in:
995         * WebCore.order:
996
997 2014-10-21  peavo@outlook.com  <peavo@outlook.com>
998
999         [Curl] Optimization; avoid string reallocation.
1000         https://bugs.webkit.org/show_bug.cgi?id=137920
1001
1002         Reviewed by Brent Fulgham.
1003
1004         Profiling reveals that the cookiesForDOM function is spending time on removing a character from a string.
1005
1006         * platform/network/curl/CookieJarCurl.cpp:
1007         (WebCore::domainMatch):
1008         (WebCore::addMatchingCurlCookie):
1009
1010 2014-10-21  Joanmarie Diggs  <jdiggs@igalia.com>
1011
1012         AX: [ATK] CSS-generated text content not exposed to assistive technologies
1013         https://bugs.webkit.org/show_bug.cgi?id=137669
1014
1015         Reviewed by Chris Fleizach.
1016
1017         Do not use a text iterator to get the text for elements which include
1018         pseudo elements.
1019
1020         Test: accessibility/css-content-attribute.html
1021
1022         * accessibility/AccessibilityRenderObject.cpp:
1023         (WebCore::AccessibilityRenderObject::textUnderElement):
1024
1025 2014-10-21  Chris Dumez  <cdumez@apple.com>
1026
1027         REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
1028         https://bugs.webkit.org/show_bug.cgi?id=137916
1029
1030         Reviewed by Csaba Osztrogon√°c.
1031
1032         Fix the !ENABLE(VIDEO) build by adding an #if ENABLE(VIDEO) where
1033         needed.
1034
1035         * rendering/RenderLayerBacking.cpp:
1036         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
1037
1038 2014-10-21  Zalan Bujtas  <zalan@apple.com>
1039
1040         REGRESSION: Google Search (mobile) video thumbnails are too large.
1041         https://bugs.webkit.org/show_bug.cgi?id=137895
1042
1043         Reviewed by Simon Fraser.
1044
1045         This patch fixes layer clipping when an ancestor layer has border-radius clipping.
1046
1047         In cases, where the current layer has non-radius cliprect, while an ancestor layer
1048         has border-radius clipping, we only use the border-radius rect to clip.
1049
1050         Test: fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html
1051
1052         * rendering/RenderLayer.cpp:
1053         (WebCore::RenderLayer::clipToRect):
1054         (WebCore::RenderLayer::restoreClip):
1055         (WebCore::RenderLayer::collectFragments):
1056         (WebCore::RenderLayer::calculateClipRects):
1057         * rendering/RenderLayer.h:
1058         (WebCore::ClipRect::ClipRect):
1059         (WebCore::ClipRect::effectedByRadius):
1060         (WebCore::ClipRect::setEffectedByRadius):
1061         (WebCore::ClipRect::operator==):
1062         (WebCore::ClipRect::operator!=):
1063         (WebCore::ClipRect::intersect):
1064         (WebCore::ClipRect::hasRadius): Deleted.
1065         (WebCore::ClipRect::setHasRadius): Deleted.
1066
1067 2014-10-20  Michael Saboff  <msaboff@apple.com>
1068
1069         Don't create cached functions for HTMLDocument.write*()
1070         https://bugs.webkit.org/show_bug.cgi?id=137906
1071
1072         Reviewed by Darin Adler.
1073
1074         Made it so that JSHTMLDocument::write() and ::writeln() are always created for every prototype.
1075         This is similar to the change in r174847.
1076
1077         This change is alread covered by the tests:
1078         LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
1079         LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
1080         LayoutTests/http/tests/security/aboutBlank/security-context-write.html
1081         LayoutTests/http/tests/security/aboutBlank/security-context-writeln.html
1082         LayoutTests/http/tests/xmlhttprequest/request-from-popup.html
1083         LayoutTests/http/tests/navigation/new-window-redirect-history.html
1084         LayoutTests/http/tests/misc/window-open-then-write.html
1085
1086         * bindings/js/JSHTMLDocumentCustom.cpp:
1087         (WebCore::JSHTMLDocument::getOwnPropertySlot):
1088         * html/HTMLDocument.idl:
1089
1090 2014-10-21  Chris Dumez  <cdumez@apple.com>
1091
1092         REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
1093         https://bugs.webkit.org/show_bug.cgi?id=137916
1094
1095         Unreviewed build fix. Add missing header include.
1096
1097         * rendering/RenderLayerBacking.cpp:
1098
1099 2014-10-21  Jer Noble  <jer.noble@apple.com>
1100
1101         REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
1102         https://bugs.webkit.org/show_bug.cgi?id=137805
1103
1104         Reviewed by Dan Bernstein.
1105
1106         Test: media/video-volume-slider-drag.html
1107
1108         Respond to the 'input' event rather than the 'change' event for the volume slider, so that
1109         volume changes are continuous during drag operations.
1110
1111         Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
1112         during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
1113         as current, but using 'change' instead of 'mouseup' to do the final currentTime change.
1114
1115         * Modules/mediacontrols/mediaControlsApple.js:
1116         (Controller.prototype.createControls):
1117         (Controller.prototype.handleTimelineInput):
1118         (Controller.prototype.handleTimelineChange):
1119         (Controller.prototype.handleTimelineMouseUp):
1120         (Controller.prototype.handleVolumeSliderInput):
1121         (Controller.prototype.handlePlayButtonClicked): Deleted.
1122         (Controller.prototype.handleMaxButtonClicked): Deleted.
1123
1124 2014-10-21  Manuel Rego Casasnovas  <rego@igalia.com>
1125
1126         ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid
1127         https://bugs.webkit.org/show_bug.cgi?id=136939
1128
1129         Reviewed by Darin Adler.
1130
1131         In some particular situations computeIntrinsicLogicalWidths() is called
1132         in the middle of layoutGridItems(). In these cases we do not need to
1133         populate the grid again, so we should avoid calling placeItemsOnGrid().
1134         In addition, we do not need to clean the grid either, as that will be
1135         done later by layoutGridItems().
1136
1137         Test: fast/css-grid-layout/grid-was-populated-assert.html
1138
1139         * rendering/RenderGrid.cpp:
1140         (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to
1141         placeItemsOnGrid() and clearGrid() if the grid was already populated.
1142         * rendering/RenderGrid.h: Move gridWasPopulated() header out of the
1143         debug ifdefs.
1144
1145 2014-10-21  Zan Dobersek  <zdobersek@igalia.com>
1146
1147         [Cairo] Make dashPattern, dotPattern in GraphicsContext::setPlatformStrokeStyle() const
1148         https://bugs.webkit.org/show_bug.cgi?id=137912
1149
1150         Reviewed by Carlos Garcia Campos.
1151
1152         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1153         (WebCore::GraphicsContext::setPlatformStrokeStyle): Make the two static variables
1154         constants since their value doesn't change after initialization.
1155
1156 2014-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1157
1158         [GTK] Several labels are white instead of black
1159         https://bugs.webkit.org/show_bug.cgi?id=137803
1160
1161         Reviewed by Martin Robinson.
1162
1163         Recent GTK+ versions require to explicitly set the state before
1164         getting a color.
1165
1166         * rendering/RenderThemeGtk.cpp:
1167         (WebCore::styleColor): Helper function to get a color from a
1168         GtkStylecontext that explicitly sets the state before getting the color.
1169         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor): Use styleColor().
1170         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor): Ditto.
1171         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor): Ditto.
1172         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor): Ditto.
1173         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor): Ditto.
1174         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor): Ditto.
1175         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor): Ditto.
1176         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor): Ditto.
1177         (WebCore::RenderThemeGtk::systemColor): Ditto.
1178
1179 2014-10-20  YongGeol Jung  <yg48.jung@samsung.com>
1180
1181         [Coordinated Graphics] '-webkit-mask-image: -webkit-gradient' doesn't work for AC layer.
1182         https://bugs.webkit.org/show_bug.cgi?id=125326
1183
1184         Reviewed by Gyuyoung Kim.
1185
1186         Mask layer hasn't requested to synchronize with AC layer in CoordinatedGraphics so far.
1187         That's why the mask layer isn't shown under CoordinatedGraphics.
1188         Thus this patch lets the mask layer synchronize with the AC layer whenever AC layer is updated.
1189
1190         Below layout test case is related to this issue when --pixel test is enabled.
1191         Unfortunately EFL WebKitTestRunner doesn't support AC mode yet.
1192         When EFL test framework supports AC mode, the test will be passed.
1193
1194         Test: compositing/masks/mask-of-clipped-layer.html
1195
1196         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1197         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
1198
1199 2014-10-17  Jeffrey Pfau  <jpfau@apple.com>
1200
1201         Ensure attached frame count doesn't exceed the maximum allowed frames
1202         https://bugs.webkit.org/show_bug.cgi?id=136457
1203
1204         Reviewed by Alexey Proskuryakov.
1205
1206         Test: fast/frames/exponential-frames.html
1207
1208         * html/HTMLFrameElementBase.cpp:
1209         (WebCore::HTMLFrameElementBase::isURLAllowed):
1210
1211 2014-10-20  Chris Dumez  <cdumez@apple.com>
1212
1213         ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
1214         https://bugs.webkit.org/show_bug.cgi?id=137797
1215
1216         Reviewed by Darin Adler.
1217
1218         ResourceRequest deserialization was unnecessarily calling partitionName()
1219         on the decoded cache partition. In the deserialization case, we already
1220         know the cache partition is a valid partition name so we can bypass the
1221         call to partitionName() (which is fairly expensive) for performance.
1222
1223         This patch adds a setDomainForCachePartion() method to ResourceRequest
1224         that calls partitionName() on the domain argument, and moves all the
1225         callers of setCachedPartition() to this new setter, except
1226         ArgumentCoder<ResourceRequest>::decode().
1227
1228         This patch updates the setCachedPartition() to merely set the
1229         m_cachePartition member, without calling partitionName() on the
1230         argument. There is also a new assertion in place to make sure the
1231         argument is a valid partition name.
1232
1233         No new tests, no behavior change.
1234
1235         * html/DOMURL.cpp:
1236         (WebCore::DOMURL::revokeObjectURL):
1237         * inspector/InspectorPageAgent.cpp:
1238         (WebCore::InspectorPageAgent::cachedResource):
1239         * inspector/InspectorResourceAgent.cpp:
1240         (WebCore::InspectorResourceAgent::replayXHR):
1241         * loader/FrameLoader.cpp:
1242         (WebCore::FrameLoader::loadURL):
1243         * loader/archive/cf/LegacyWebArchive.cpp:
1244         (WebCore::LegacyWebArchive::create):
1245         * loader/cache/CachedResourceLoader.cpp:
1246         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1247         (WebCore::CachedResourceLoader::requestResource):
1248         * loader/cache/MemoryCache.cpp:
1249         (WebCore::MemoryCache::addImageToCache):
1250         (WebCore::MemoryCache::removeImageFromCache):
1251         * loader/cache/MemoryCache.h:
1252         * page/SecurityOrigin.cpp:
1253         (WebCore::SecurityOrigin::domainForCachePartition):
1254         (WebCore::SecurityOrigin::cachePartition): Deleted.
1255         Rename cachePartition() getter to domainForCachePartition() to make it
1256         clear it returns a domain and not a partition name. As such, the caller
1257         should then use ResourceRequest::setDomainForCachePartition(), not
1258         setCachePartition().
1259
1260         * page/SecurityOrigin.h:
1261         * platform/network/cf/ResourceRequest.h:
1262         (WebCore::ResourceRequest::setCachePartition):
1263         (WebCore::ResourceRequest::setDomainForCachePartition):
1264
1265 2014-10-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1266
1267         Tighten XMLHttpRequest setRequestHeader value check
1268         https://bugs.webkit.org/show_bug.cgi?id=128593
1269
1270         Reviewed by Darin Adler.
1271
1272         Test: http/tests/xmlhttprequest/set-bad-headervalue.html
1273
1274         * platform/network/HTTPParsers.cpp:
1275         (WebCore::isValidHTTPHeaderValue): Updated header values check according RFC 7230.
1276         (WebCore::isValidHTTPToken): Renamed variable name and updated RFC related comment.
1277
1278 2014-10-20  Michael Saboff  <msaboff@apple.com>
1279
1280         Make post checkin suggested changes to r174847
1281         https://bugs.webkit.org/show_bug.cgi?id=137885
1282
1283         Reviewed by Mark Lam.
1284
1285         Eliminated the creation of a temporary Identifier when comparing propertyName to "open".
1286         Made the suggested post checkin change to put the declaration of "entry" into the if.
1287
1288         * bindings/js/JSHTMLDocumentCustom.cpp:
1289         (WebCore::JSHTMLDocument::getOwnPropertySlot):
1290
1291 2014-10-20  Chris Dumez  <cdumez@apple.com>
1292
1293         Use is<>() / downcast<>() for SpinButtonElement
1294         https://bugs.webkit.org/show_bug.cgi?id=137896
1295
1296         Reviewed by Gyuyoung Kim.
1297
1298         Use is<>() / downcast<>() for SpinButtonElement instead of
1299         isSpinButtonElement() / static_cast for consistency with the rest of
1300         the code and for safety.
1301
1302         No new tests, no behavior change.
1303
1304         * accessibility/AccessibilityRenderObject.cpp:
1305         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
1306         * html/shadow/SpinButtonElement.h:
1307         (isType):
1308         * rendering/RenderTheme.cpp:
1309         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
1310         (WebCore::RenderTheme::isHovered):
1311         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
1312
1313 2014-10-20  Roger Fong  <roger_fong@apple.com>
1314
1315         Use glFlush instead of glFinish when drawing WebGL output to screen.
1316         https://bugs.webkit.org/show_bug.cgi?id=137897.
1317         <rdar://problem/15846550>
1318
1319         Reviewed by Brent Fulgham.
1320
1321         Passes all conformance tests.
1322         Performance tested by http://threejs.org/examples/#webgl_performance and Unity WebGL performance tests.
1323
1324         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1325         (WebCore::GraphicsContext3D::prepareTexture):
1326         Use glFlush instead of glFinish. glFinish is a blocking operation pushed out queued up WebGL operations and then waits until 
1327         every operation has completed before returning and every pixel has been updated. This causes severe performance problems,
1328         about a 10 fps difference on http://threejs.org/examples/#webgl_performance. glFlush, like glFinish,
1329         forces all queued WebGL operations to take place, but returns immediately. Switching to glFlush does not seem
1330         make our rendering quality any worse for the handful of sites I've tested and makes our performance on WebGL much better.
1331         However, we should continue to be on the watch for any potential rendering issues after this lands.
1332
1333 2014-10-20  Benjamin Poulain  <bpoulain@apple.com>
1334
1335         Generalize the compilation of :not() to support arbitrary selector lists
1336         https://bugs.webkit.org/show_bug.cgi?id=137843
1337
1338         Reviewed by Andreas Kling.
1339
1340         This builds :not() on top of the code created for :nth-child(An+B of selectorList)
1341         to support any selector list.
1342
1343         The tests for the JIT were added previously:
1344         -not-boundaries.html
1345         -not-backtracking.html
1346
1347         * cssjit/SelectorCompiler.cpp:
1348         (WebCore::SelectorCompiler::addPseudoClassType):
1349         Any :not() of a selector is handled through a simple selector list. Cases like
1350         :not(foo, bar) simply generate not([fragmentFoo, bragmentBar]).
1351
1352         Old cases like :not(foo):not(bar) simply add those cases to the selector list,
1353         generating not([fragmentFoo, bragmentBar]).
1354
1355         (WebCore::SelectorCompiler::minimumRegisterRequirements):
1356         Register pressure is now tracked through computeBacktrackingMemoryRequirements.
1357
1358         (WebCore::SelectorCompiler::hasAnyCombinators):
1359         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
1360         (WebCore::SelectorCompiler::computeBacktrackingInformation):
1361         Abstract the code creating Selector Lists from :nth-child(of). Use that for :not()
1362         and  :nth-child(of).
1363
1364         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
1365
1366 2014-10-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1367
1368         Use std::unique_ptr<>|make_unique<> in PluginView::scheduleRequest()
1369         https://bugs.webkit.org/show_bug.cgi?id=137874
1370
1371         Reviewed by Andreas Kling.
1372
1373         No new tests, no behavior change.
1374
1375         * plugins/PluginView.cpp:
1376         (WebCore::PluginView::requestTimerFired):
1377         (WebCore::PluginView::scheduleRequest): Replace PassOwnPtr with std::unique_ptr.
1378         (WebCore::PluginView::load): Create PluginRequest using std::make_unique.
1379         * plugins/PluginView.h:
1380
1381 2014-10-20  Beth Dakin  <bdakin@apple.com>
1382
1383         Speculative build fix.
1384
1385         * platform/spi/mac/NSViewSPI.h:
1386
1387 2014-10-20  Beth Dakin  <bdakin@apple.com>
1388
1389         Add support for action menus
1390         https://bugs.webkit.org/show_bug.cgi?id=137891
1391         rdar://problem/18451638
1392         rdar://problem/18694470
1393
1394         Reviewed by Anders Carlsson.
1395
1396         New SPI that is needed for this.
1397         * WebCore.exp.in:
1398         * WebCore.xcodeproj/project.pbxproj:
1399         * platform/spi/mac: Added.
1400         * platform/spi/mac/NSViewSPI.h: Added.
1401
1402 2014-10-20  Dean Jackson  <dino@apple.com>
1403
1404         [Mac] Support "inverted-colors" and "monochrome" media feature.
1405         https://bugs.webkit.org/show_bug.cgi?id=137535
1406         <rdar://problem/18586398>
1407
1408         Rolling out the Windows part of this to fix the build.
1409
1410         * platform/win/PlatformScreenWin.cpp:
1411         (WebCore::screenHasInvertedColors): Revert to a stub function.
1412
1413 2014-10-20  Chris Dumez  <cdumez@apple.com>
1414
1415         Unreviewed EFL / GTK build fix after r174898.
1416
1417         Add missing header include.
1418
1419         * accessibility/AccessibilityARIAGrid.cpp:
1420
1421 2014-10-20  Dean Jackson  <dino@apple.com>
1422
1423         [Mac] Support "inverted-colors" and "monochrome" media feature.
1424         https://bugs.webkit.org/show_bug.cgi?id=137535
1425         <rdar://problem/18586398>
1426
1427         Reviewed by Brent Fulgham.
1428
1429         Add a new media query from CSS Level 4, "inverted-colors", and
1430         implement the Apple backends for the "monochrome" media query.
1431
1432         The platform code went into PlatformScreenMac, which already
1433         had a screenIsMonochrome method. This now calls into Core
1434         Graphics via SPI. I added a screenHasInvertedColors
1435         method which tests for inversion. On iOS, there is public API
1436         for both queries. On Windows, we try to use CoreGraphics.
1437
1438         At the moment neither of these media queries re-evaluate
1439         automatically if the user changes their mode. The page will
1440         need to be reloaded. It is possible to detect a change on iOS,
1441         but not OS X.
1442         https://bugs.webkit.org/show_bug.cgi?id=137868
1443
1444         I decided to not add an ENABLE flag for this, mostly because it
1445         is such an isolated feature and seems very unlikely to be
1446         controversial. I don't expect the syntax to change. (I'm sure
1447         this comment will come back to haunt me.)
1448
1449         Testing this automatically is slightly tricky. We'd need
1450         to expose SPI to invert the user's screen, but then we get
1451         inverted images from our testing which could interfere with concurrent
1452         operations. Instead I've included some tests that exercise
1453         the "false" parts of the media query, with explanations as
1454         to why they would fail if the display is inverted.
1455
1456         Tests: fast/media/mq-inverted-colors.html
1457                fast/media/mq-monochrome.html
1458
1459         * css/CSSValueKeywords.in: Add the "inverted" keyword for "inverted-colors".
1460         * css/MediaFeatureNames.h: Add the "inverted-colors" feature name.
1461         * css/MediaQueryEvaluator.cpp:
1462         (WebCore::inverted_colorsMediaFeatureEval): Implementation of the new media query.
1463         * css/MediaQueryExp.cpp:
1464         (WebCore::featureWithCSSValueID): The new query takes an id...
1465         (WebCore::featureWithoutValue): ... or no value.
1466         * platform/PlatformScreen.h: Add "screenHasInvertedColors".
1467         * platform/efl/PlatformScreenEfl.cpp:
1468         (WebCore::screenHasInvertedColors): Stub implementation.
1469         * platform/gtk/PlatformScreenGtk.cpp:
1470         (WebCore::screenHasInvertedColors): Ditto.
1471         * platform/ios/PlatformScreenIOS.mm:
1472         (WebCore::screenHasInvertedColors): Call into the platform accessibility API.
1473         (WebCore::screenIsMonochrome): Ditto.
1474         * platform/mac/PlatformScreenMac.mm:
1475         (WebCore::screenIsMonochrome): Call into the CoreGraphics SPI.
1476         (WebCore::screenHasInvertedColors): Call into the CoreGraphics SPI.
1477         * platform/win/PlatformScreenWin.cpp:
1478         (WebCore::screenHasInvertedColors): Call into CoreGraphics if we're using it.
1479
1480 2014-10-20  Chris Dumez  <cdumez@apple.com>
1481
1482         Use is<>() / downcast<>() for Accessibility objects
1483         https://bugs.webkit.org/show_bug.cgi?id=137286
1484
1485         Reviewed by Darin Adler.
1486
1487         Use is<>() / downcast<>() for Accessibility objects and clean up the
1488         surrounding code.
1489
1490         No new tests, no behavior change.
1491
1492         * accessibility/AXObjectCache.cpp:
1493         (WebCore::AXObjectCache::focusedImageMapUIElement):
1494         (WebCore::AXObjectCache::notificationPostTimerFired):
1495         * accessibility/AccessibilityARIAGrid.cpp:
1496         (WebCore::AccessibilityARIAGrid::addTableCellChild):
1497         (WebCore::AccessibilityARIAGrid::addChildren):
1498         * accessibility/AccessibilityARIAGridCell.cpp:
1499         (WebCore::AccessibilityARIAGridCell::parentTable):
1500         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
1501         * accessibility/AccessibilityARIAGridRow.cpp:
1502         (WebCore::AccessibilityARIAGridRow::disclosedRows):
1503         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
1504         (WebCore::AccessibilityARIAGridRow::parentTable):
1505         * accessibility/AccessibilityARIAGridRow.h:
1506         * accessibility/AccessibilityImageMapLink.cpp:
1507         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
1508         * accessibility/AccessibilityImageMapLink.h:
1509         * accessibility/AccessibilityList.h:
1510         * accessibility/AccessibilityListBox.cpp:
1511         (WebCore::AccessibilityListBox::setSelectedChildren):
1512         (WebCore::AccessibilityListBox::selectedChildren):
1513         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
1514         * accessibility/AccessibilityListBox.h:
1515         * accessibility/AccessibilityListBoxOption.h:
1516         * accessibility/AccessibilityMenuList.cpp:
1517         (WebCore::AccessibilityMenuList::addChildren):
1518         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
1519         * accessibility/AccessibilityMenuList.h:
1520         * accessibility/AccessibilityMenuListOption.h:
1521         * accessibility/AccessibilityMenuListPopup.cpp:
1522         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
1523         * accessibility/AccessibilityMenuListPopup.h:
1524         * accessibility/AccessibilityMockObject.h:
1525         * accessibility/AccessibilityNodeObject.cpp:
1526         (WebCore::AccessibilityNodeObject::textUnderElement):
1527         * accessibility/AccessibilityNodeObject.h:
1528         * accessibility/AccessibilityObject.cpp:
1529         (WebCore::appendChildrenToArray):
1530         (WebCore::AccessibilityObject::scrollViewAncestor):
1531         * accessibility/AccessibilityObject.h:
1532         * accessibility/AccessibilityRenderObject.cpp:
1533         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1534         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1535         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
1536         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1537         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
1538         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1539         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
1540         * accessibility/AccessibilityRenderObject.h:
1541         * accessibility/AccessibilitySVGRoot.h:
1542         * accessibility/AccessibilityScrollView.cpp:
1543         (WebCore::AccessibilityScrollView::addChildScrollbar):
1544         * accessibility/AccessibilityScrollView.h:
1545         * accessibility/AccessibilityScrollbar.h:
1546         * accessibility/AccessibilitySlider.cpp:
1547         (WebCore::AccessibilitySlider::addChildren):
1548         * accessibility/AccessibilitySlider.h:
1549         * accessibility/AccessibilitySpinButton.cpp:
1550         (WebCore::AccessibilitySpinButton::addChildren):
1551         (WebCore::AccessibilitySpinButtonPart::press):
1552         * accessibility/AccessibilitySpinButton.h:
1553         * accessibility/AccessibilityTable.cpp:
1554         (WebCore::AccessibilityTable::addChildren):
1555         (WebCore::AccessibilityTable::addChildrenFromSection):
1556         (WebCore::AccessibilityTable::headerContainer):
1557         (WebCore::AccessibilityTable::columnHeaders):
1558         (WebCore::AccessibilityTable::rowHeaders):
1559         (WebCore::AccessibilityTable::cellForColumnAndRow):
1560         * accessibility/AccessibilityTable.h:
1561         Make isAccessibilityTable() public and mark as final so that callers
1562         can benefit from tighter typing, as isAccessibilityTable() is
1563         stricter than isTable(). isTable() indicates that the object is an
1564         AccessibilityTable and is equivalent to is<AccessibilityTable>(object).
1565         isAccessibilityTable() is equivalent to "isTable() && renderer()".
1566
1567         * accessibility/AccessibilityTableCell.cpp:
1568         (WebCore::AccessibilityTableCell::parentTable):
1569         * accessibility/AccessibilityTableCell.h:
1570         * accessibility/AccessibilityTableColumn.cpp:
1571         (WebCore::AccessibilityTableColumn::headerObject):
1572         (WebCore::AccessibilityTableColumn::addChildren):
1573         * accessibility/AccessibilityTableColumn.h:
1574         * accessibility/AccessibilityTableHeaderContainer.cpp:
1575         (WebCore::AccessibilityTableHeaderContainer::addChildren):
1576         * accessibility/AccessibilityTableRow.cpp:
1577         (WebCore::AccessibilityTableRow::parentTable):
1578         (WebCore::AccessibilityTableRow::headerObject):
1579         * accessibility/AccessibilityTableRow.h:
1580         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1581         (webkitAccessibleSelectionClearSelection):
1582         (webkitAccessibleSelectionSelectAllSelection):
1583         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1584         (core):
1585         (cell):
1586         (cellAtIndex):
1587         (webkitAccessibleTableGetIndexAt):
1588         (webkitAccessibleTableGetNColumns):
1589         (webkitAccessibleTableGetNRows):
1590         (webkitAccessibleTableGetColumnHeader):
1591         (webkitAccessibleTableGetRowHeader):
1592         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
1593         (webkitAccessibleTableCellGetColumnHeaderCells):
1594         (webkitAccessibleTableCellGetRowHeaderCells):
1595         (webkitAccessibleTableCellGetColumnSpan):
1596         (webkitAccessibleTableCellGetRowSpan):
1597         (webkitAccessibleTableCellGetPosition):
1598         * accessibility/ios/AccessibilityObjectIOS.mm:
1599         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
1600         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1601         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
1602         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
1603         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1604         (AXAttributeStringSetElement):
1605         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1606         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
1607         (-[WebAccessibilityObjectWrapper subrole]):
1608         (-[WebAccessibilityObjectWrapper roleDescription]):
1609         (-[WebAccessibilityObjectWrapper scrollViewParent]):
1610         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1611         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
1612         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1613         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1614         * inspector/InspectorDOMAgent.cpp:
1615         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1616         * rendering/RenderMenuList.cpp:
1617         (RenderMenuList::didUpdateActiveOption):
1618
1619 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1620
1621         Web Inspector: Generate all Inspector domains together in JavaScriptCore
1622         https://bugs.webkit.org/show_bug.cgi?id=137748
1623
1624         Reviewed by Brian Burg.
1625
1626         After moving the json files into JavaScriptCore update the includes,
1627         and names of functions that were previously prefixed.
1628
1629         * CMakeLists.txt:
1630         * DerivedSources.make:
1631         * ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
1632         * ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
1633         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
1634         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
1635         * ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
1636         * ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
1637         * WebCore.vcxproj/WebCore.vcxproj:
1638         * WebCore.vcxproj/WebCore.vcxproj.filters:
1639         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1640         * WebCore.xcodeproj/project.pbxproj:
1641         * inspector/CommandLineAPIHost.cpp:
1642         * inspector/InspectorApplicationCacheAgent.cpp:
1643         * inspector/InspectorApplicationCacheAgent.h:
1644         * inspector/InspectorCSSAgent.cpp:
1645         * inspector/InspectorCSSAgent.h:
1646         * inspector/InspectorController.cpp:
1647         * inspector/InspectorDOMAgent.cpp:
1648         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1649         * inspector/InspectorDOMAgent.h:
1650         * inspector/InspectorDOMDebuggerAgent.cpp:
1651         * inspector/InspectorDOMDebuggerAgent.h:
1652         * inspector/InspectorDOMStorageAgent.cpp:
1653         * inspector/InspectorDOMStorageAgent.h:
1654         * inspector/InspectorDatabaseAgent.cpp:
1655         * inspector/InspectorDatabaseAgent.h:
1656         * inspector/InspectorDatabaseResource.cpp:
1657         * inspector/InspectorDatabaseResource.h:
1658         * inspector/InspectorFrontendClientLocal.cpp:
1659         * inspector/InspectorIndexedDBAgent.cpp:
1660         * inspector/InspectorIndexedDBAgent.h:
1661         * inspector/InspectorLayerTreeAgent.cpp:
1662         * inspector/InspectorLayerTreeAgent.h:
1663         * inspector/InspectorPageAgent.cpp:
1664         * inspector/InspectorPageAgent.h:
1665         * inspector/InspectorReplayAgent.cpp:
1666         * inspector/InspectorReplayAgent.h:
1667         * inspector/InspectorResourceAgent.cpp:
1668         * inspector/InspectorResourceAgent.h:
1669         * inspector/InspectorStyleSheet.cpp:
1670         * inspector/InspectorStyleSheet.h:
1671         * inspector/InspectorTimelineAgent.cpp:
1672         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
1673         * inspector/InspectorTimelineAgent.h:
1674         * inspector/InspectorWorkerAgent.cpp:
1675         * inspector/InspectorWorkerAgent.h:
1676         * inspector/PageRuntimeAgent.h:
1677         * inspector/TimelineRecordFactory.cpp:
1678         * inspector/WorkerInspectorController.cpp:
1679
1680 2014-10-20  Andy Estes  <aestes@apple.com>
1681
1682         Fix the GTK build.
1683
1684         * dom/RenderedDocumentMarker.h:
1685
1686 2014-10-19  Antti Koivisto  <antti@apple.com>
1687
1688         Avoid unnecessary NSURLResponse construction for QuickLook on iOS
1689         https://bugs.webkit.org/show_bug.cgi?id=137876
1690
1691         Reviewed by Andy Estes.
1692
1693         QuickLook specific code path creates NSURLResponse in the web process for every response.
1694         It is rarely needed so this is unnecessary work.
1695
1696         * WebCore.exp.in:
1697         * platform/network/ios/QuickLook.h:
1698         * platform/network/ios/QuickLook.mm:
1699         (WebCore::isMainResourceLoader):
1700         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
1701
1702             Separate function for testing if QuickLookHandle is needed.
1703
1704         (WebCore::QuickLookHandle::create):
1705
1706             Switch the interface to take ResourceResponse.
1707
1708 2014-10-20  Andy Estes  <aestes@apple.com>
1709
1710         Fix the iOS build.
1711
1712         * WebCore.xcodeproj/project.pbxproj:
1713         * dom/RenderedDocumentMarker.h:
1714         * page/ios/FrameIOS.mm:
1715         (WebCore::Frame::interpretationsForCurrentRoot):
1716
1717 2014-10-20  Benjamin Poulain  <benjamin@webkit.org>
1718
1719         Update the <link>'s link status
1720         https://bugs.webkit.org/show_bug.cgi?id=137861
1721
1722         Reviewed by Chris Dumez.
1723
1724         In the latest HTML spec, <link> has the link status
1725         if it has a 'href' attribute, exactly like <a> and <area>:
1726             https://html.spec.whatwg.org/multipage/scripting.html#selector-link
1727
1728         This patch updates WebKit accordingly.
1729
1730         Tests: fast/css/link-basics.html
1731                fast/selectors/link-basics-xhtml.xhtml
1732                fast/selectors/link-basics.html
1733                fast/selectors/webkit-any-link-basics.html
1734
1735         * html/HTMLLinkElement.cpp:
1736         (WebCore::HTMLLinkElement::parseAttribute):
1737
1738 2014-10-20  Chris Dumez  <cdumez@apple.com>
1739
1740         [Mac] Optimize cookiesForDOM() by filtering and serializing cookies in a single pass
1741         https://bugs.webkit.org/show_bug.cgi?id=137869
1742
1743         Reviewed by Darin Adler.
1744
1745         Optimize cookiesForDOM() by filtering and serializing in 1 pass instead of 2.
1746
1747         Previously, when accessing document.cookie, we ended up doing the following:
1748         1. Call wkHTTPCookiesForURL() to get an NSArray of NSHTTPCookies.
1749         2. Call filterCookies() to filter out cookies that are httpOnly or with an
1750            empty name, thus allocating a new NSMutableArray.
1751         3. Call NSHTTPCookie's requestHeaderFieldsWithCookies() to serialize the
1752            cookies
1753         4. Construct a WTF::String from the NSString*
1754
1755         There were several inefficiencies here:
1756         1. We needed to pre-filter the cookies and allocate a new NSMutableArray
1757            before calling requestHeaderFieldsWithCookies()
1758         2. requestHeaderFieldsWithCookies() does more things that we actually need.
1759            It constructs a Dictionary of header fields, of which we query the
1760            "Cookie" field, even though we merely want a ';'-separated string
1761            representation of the cookies in "key=value" form.
1762
1763         With this patch, we now take care of the string serialization ourselves,
1764         using a StringBuilder as it is trivial to do. This also allows us to filter
1765         out the httpOnly/invalid cookies as we do the serialization instead of
1766         having a first pass to do so.
1767
1768         When scrolling the http://www.apple.com/iphone/ entire page down, then up,
1769         se were spending ~13.1% of the NetworkProcess time in cookiesForDOM()
1770         (~96ms) on my machine. With the patch, we spend ~23% less time in
1771         cookiesForDOM() (~74ms).
1772
1773         No new tests, no behavior change.
1774
1775         * platform/network/mac/CookieJarMac.mm:
1776         (WebCore::cookiesForSession):
1777         (WebCore::cookiesForDOM):
1778         (WebCore::cookieRequestHeaderFieldValue):
1779
1780 2014-10-19  Chris Dumez  <cdumez@apple.com>
1781
1782         Kill toRenderedDocumentMarker() by using tighter typing
1783         https://bugs.webkit.org/show_bug.cgi?id=137858
1784
1785         Reviewed by Darin Adler.
1786
1787         Kill toRenderedDocumentMarker() by using tighter typing. This method
1788         was doing no type validation, just a static_cast<>().
1789
1790         No new tests, no behavior change.
1791
1792         * dom/DocumentMarkerController.cpp:
1793         (WebCore::DocumentMarkerController::addTextMatchMarker):
1794         (WebCore::DocumentMarkerController::markersFor):
1795         (WebCore::DocumentMarkerController::markersInRange):
1796         (DocumentMarkerController::hasMarkers):
1797         * dom/DocumentMarkerController.h:
1798         * dom/RenderedDocumentMarker.h:
1799         (WebCore::toRenderedDocumentMarker): Deleted.
1800         * editing/AlternativeTextController.cpp:
1801         (WebCore::markersHaveIdenticalDescription):
1802         (WebCore::AlternativeTextController::respondToChangedSelection):
1803         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
1804         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
1805         (WebCore::AlternativeTextController::applyDictationAlternative):
1806         * editing/CompositeEditCommand.cpp:
1807         (WebCore::copyMarkers):
1808         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1809         * editing/DeleteSelectionCommand.cpp:
1810         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
1811         * editing/Editor.cpp:
1812         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1813         (WebCore::Editor::selectionStartHasMarkerFor):
1814         * rendering/InlineTextBox.cpp:
1815         (WebCore::InlineTextBox::paintDocumentMarker):
1816         (WebCore::InlineTextBox::paintTextMatchMarker):
1817         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1818         (WebCore::InlineTextBox::paintDocumentMarkers):
1819         * rendering/InlineTextBox.h:
1820         * rendering/svg/SVGInlineFlowBox.cpp:
1821         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1822         * testing/Internals.cpp:
1823         (WebCore::Internals::markerAt):
1824         (WebCore::Internals::markerRangeForNode):
1825         (WebCore::Internals::markerDescriptionForNode):
1826         * testing/Internals.h:
1827
1828 2014-10-19  Chris Dumez  <cdumez@apple.com>
1829
1830         Use is<>() / downcast<>() for all remaining RenderObject subclasses
1831         https://bugs.webkit.org/show_bug.cgi?id=137845
1832
1833         Reviewed by Darin Adler.
1834
1835         Use is<>() / downcast<>() for all remaining RenderObject subclasses and
1836         clean up the surrounding code.
1837
1838         No new tests, no behavior change.
1839
1840         * accessibility/AccessibilityProgressIndicator.cpp:
1841         (WebCore::AccessibilityProgressIndicator::progressElement):
1842         (WebCore::AccessibilityProgressIndicator::meterElement):
1843         * accessibility/AccessibilityRenderObject.cpp:
1844         (WebCore::AccessibilityRenderObject::layoutCount):
1845         (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
1846         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
1847         * dom/Document.cpp:
1848         (WebCore::widgetForElement):
1849         * dom/Position.cpp:
1850         (WebCore::Position::getInlineBoxAndOffset):
1851         * dom/WebKitNamedFlow.cpp:
1852         (WebCore::WebKitNamedFlow::overset):
1853         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
1854         (WebCore::WebKitNamedFlow::getRegionsByContent):
1855         (WebCore::WebKitNamedFlow::getRegions):
1856         * editing/FrameSelection.cpp:
1857         (WebCore::isFrameElement):
1858         * html/HTMLEmbedElement.cpp:
1859         (WebCore::findWidgetRenderer):
1860         * html/HTMLFrameOwnerElement.cpp:
1861         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
1862         (WebCore::HTMLFrameOwnerElement::renderWidget):
1863         * html/HTMLMediaElement.cpp:
1864         (WebCore::HTMLMediaElement::parseAttribute):
1865         * html/HTMLMeterElement.cpp:
1866         (WebCore::HTMLMeterElement::renderMeter):
1867         * html/HTMLPlugInElement.cpp:
1868         (WebCore::HTMLPlugInElement::supportsFocus):
1869         * html/HTMLPlugInImageElement.cpp:
1870         (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
1871         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
1872         * html/HTMLProgressElement.cpp:
1873         (WebCore::HTMLProgressElement::renderProgress):
1874         * html/PluginDocument.cpp:
1875         (WebCore::PluginDocument::pluginWidget):
1876         * html/shadow/MediaControlElements.cpp:
1877         (WebCore::MediaControlTimelineElement::defaultEventHandler):
1878         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
1879         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
1880         * inspector/InspectorLayerTreeAgent.cpp:
1881         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
1882         * inspector/InspectorOverlay.cpp:
1883         (WebCore::buildObjectForElementInfo):
1884         * loader/SubframeLoader.cpp:
1885         (WebCore::SubframeLoader::loadSubframe):
1886         * page/Frame.cpp:
1887         (WebCore::Frame::ownerRenderer):
1888         * page/FrameView.cpp:
1889         (WebCore::FrameView::layout):
1890         * page/gtk/EventHandlerGtk.cpp:
1891         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1892         * page/ios/EventHandlerIOS.mm:
1893         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1894         (WebCore::EventHandler::passSubframeEventToSubframe):
1895         * page/mac/EventHandlerMac.mm:
1896         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
1897         (WebCore::EventHandler::passSubframeEventToSubframe):
1898         (WebCore::widgetForEventTarget):
1899         * platform/efl/RenderThemeEfl.cpp:
1900         (WebCore::RenderThemeEfl::applyEdjeRTLState):
1901         * rendering/InlineTextBox.cpp:
1902         (WebCore::fontToUse):
1903         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
1904         (WebCore::InlineTextBox::paint):
1905         * rendering/LayoutState.cpp:
1906         (WebCore::LayoutState::LayoutState):
1907         * rendering/RenderBlock.cpp:
1908         (WebCore::RenderBlock::collapseAnonymousBoxChild):
1909         (WebCore::RenderBlock::simplifiedLayout):
1910         (WebCore::RenderBlock::paintObject):
1911         (WebCore::RenderBlock::selectionGaps):
1912         (WebCore::RenderBlock::nodeAtPoint):
1913         * rendering/RenderBlockFlow.cpp:
1914         (WebCore::RenderBlockFlow::layoutBlock):
1915         (WebCore::RenderBlockFlow::hitTestFloats):
1916         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
1917         * rendering/RenderBlockLineLayout.cpp:
1918         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1919         * rendering/RenderBox.cpp:
1920         (WebCore::RenderBox::scroll):
1921         (WebCore::RenderBox::nodeAtPoint):
1922         (WebCore::RenderBox::repaintLayerRectsForImage):
1923         (WebCore::RenderBox::mapLocalToContainer):
1924         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1925         * rendering/RenderCombineText.h:
1926         * rendering/RenderElement.cpp:
1927         (WebCore::RenderElement::adjustStyleDifference):
1928         (WebCore::addLayers):
1929         (WebCore::RenderElement::removeLayers):
1930         (WebCore::RenderElement::moveLayers):
1931         (WebCore::RenderElement::setNeedsPositionedMovementLayout):
1932         (WebCore::RenderElement::renderNamedFlowThreadWrapper):
1933         * rendering/RenderEmbeddedObject.h:
1934         * rendering/RenderFlowThread.cpp:
1935         (WebCore::RenderFlowThread::validateRegions):
1936         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
1937         (WebCore::RenderFlowThread::regionForCompositedLayer):
1938         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
1939         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
1940         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1941         (WebCore::RenderFlowThread::addForcedRegionBreak):
1942         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1943         * rendering/RenderFlowThread.h:
1944         * rendering/RenderLayer.cpp:
1945         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1946         (WebCore::transparencyClipBox):
1947         (WebCore::accumulateOffsetTowardsAncestor):
1948         (WebCore::RenderLayer::collectFragments):
1949         (WebCore::RenderLayer::hitTest):
1950         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
1951         (WebCore::RenderLayer::calculateClipRects):
1952         * rendering/RenderLayerBacking.cpp:
1953         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
1954         (WebCore::RenderLayerBacking::updateConfiguration):
1955         (WebCore::isRestartedPlugin):
1956         (WebCore::isCompositedPlugin):
1957         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
1958         (WebCore::RenderLayerBacking::containsPaintedContent):
1959         * rendering/RenderLayerCompositor.cpp:
1960         (WebCore::RenderLayerCompositor::updateBacking):
1961         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1962         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1963         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
1964         (WebCore::RenderLayerCompositor::reasonsForCompositing):
1965         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1966         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
1967         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
1968         * rendering/RenderLayerModelObject.h:
1969         * rendering/RenderLineBreak.h:
1970         * rendering/RenderMeter.h:
1971         * rendering/RenderMultiColumnFlowThread.cpp:
1972         (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
1973         (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
1974         (WebCore::RenderMultiColumnFlowThread::layout):
1975         (WebCore::RenderMultiColumnFlowThread::addRegionToThread):
1976         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
1977         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
1978         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
1979         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
1980         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
1981         (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
1982         (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
1983         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
1984         * rendering/RenderMultiColumnFlowThread.h:
1985         * rendering/RenderMultiColumnSet.cpp:
1986         (WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
1987         (WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
1988         * rendering/RenderMultiColumnSet.h:
1989         * rendering/RenderMultiColumnSpannerPlaceholder.h:
1990         * rendering/RenderNamedFlowFragment.cpp:
1991         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
1992         (WebCore::RenderNamedFlowFragment::namedFlowThread):
1993         * rendering/RenderNamedFlowFragment.h:
1994         * rendering/RenderNamedFlowThread.cpp:
1995         (WebCore::RenderNamedFlowThread::updateWritingMode):
1996         (WebCore::addFragmentToList):
1997         (WebCore::RenderNamedFlowThread::addRegionToThread):
1998         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1999         (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
2000         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
2001         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
2002         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
2003         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
2004         * rendering/RenderNamedFlowThread.h:
2005         * rendering/RenderObject.cpp:
2006         (WebCore::scheduleRelayoutForSubtree):
2007         (WebCore::RenderObject::setLayerNeedsFullRepaint):
2008         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
2009         (WebCore::RenderObject::repaintUsingContainer):
2010         (WebCore::RenderObject::selectionRoot):
2011         (WebCore::RenderObject::shouldUseTransformFromContainer):
2012         (WebCore::RenderObject::getTransformFromContainer):
2013         (WebCore::RenderObject::isRooted):
2014         (WebCore::RenderObject::willBeDestroyed):
2015         (WebCore::RenderObject::isComposited):
2016         (WebCore::RenderObject::currentRenderNamedFlowFragment):
2017         * rendering/RenderObject.h:
2018         * rendering/RenderProgress.h:
2019         * rendering/RenderRuby.cpp:
2020         (WebCore::lastRubyRun):
2021         * rendering/RenderRubyBase.cpp:
2022         (WebCore::RenderRubyBase::rubyRun):
2023         * rendering/RenderRubyRun.cpp:
2024         (WebCore::RenderRubyRun::removeChild):
2025         * rendering/RenderRubyRun.h:
2026         * rendering/RenderSlider.h:
2027         * rendering/RenderText.cpp:
2028         (WebCore::RenderText::widthFromCache):
2029         * rendering/RenderThemeGtk.cpp:
2030         (WebCore::RenderThemeGtk::calculateProgressRect):
2031         * rendering/RenderThemeIOS.mm:
2032         (WebCore::RenderThemeIOS::paintProgressBar):
2033         * rendering/RenderThemeMac.mm:
2034         (WebCore::RenderThemeMac::paintMeter):
2035         (WebCore::RenderThemeMac::paintProgressBar):
2036         * rendering/RenderThemeSafari.cpp:
2037         (WebCore::RenderThemeSafari::paintMeter):
2038         * rendering/RenderThemeWin.cpp:
2039         (WebCore::RenderThemeWin::paintMeter):
2040         * rendering/RenderTreeAsText.cpp:
2041         (WebCore::writeRenderRegionList):
2042         (WebCore::writeLayers):
2043         * rendering/RenderVideo.h:
2044         * rendering/RenderView.cpp:
2045         (WebCore::SelectionIterator::checkForSpanner):
2046         (WebCore::isComposited):
2047         * rendering/RenderView.h:
2048         * rendering/RenderWidget.h:
2049         * rendering/line/BreakingContextInlineHeaders.h:
2050         (WebCore::BreakingContext::handleText):
2051         * rendering/line/LineBreaker.cpp:
2052         (WebCore::LineBreaker::skipLeadingWhitespace):
2053         * testing/Internals.cpp:
2054         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
2055
2056 2014-10-19  Chris Dumez  <cdumez@apple.com>
2057
2058         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
2059         https://bugs.webkit.org/show_bug.cgi?id=137854
2060
2061         Reviewed by Darin Adler.
2062
2063         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
2064         custom toRenderScrollbar() function, for consistency.
2065
2066         No new tests, no behavior change.
2067
2068         * rendering/RenderScrollbar.h:
2069         (isType):
2070         (WebCore::toRenderScrollbar): Deleted.
2071         * rendering/RenderScrollbarTheme.cpp:
2072         (WebCore::RenderScrollbarTheme::minimumThumbLength):
2073         (WebCore::RenderScrollbarTheme::backButtonRect):
2074         (WebCore::RenderScrollbarTheme::forwardButtonRect):
2075         (WebCore::RenderScrollbarTheme::trackRect):
2076         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
2077         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
2078         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
2079         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
2080         (WebCore::RenderScrollbarTheme::paintTrackBackground):
2081         (WebCore::RenderScrollbarTheme::paintTrackPiece):
2082         (WebCore::RenderScrollbarTheme::paintButton):
2083         (WebCore::RenderScrollbarTheme::paintThumb):
2084
2085 2014-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2086
2087         [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
2088         https://bugs.webkit.org/show_bug.cgi?id=137422
2089
2090         Reviewed by Martin Robinson.
2091
2092         Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.
2093
2094         * PlatformGTK.cmake:
2095         * platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
2096         * platform/gtk/ClipboardUtilitiesGtk.h: Removed.
2097         * platform/gtk/GtkDragAndDropHelper.cpp: Removed.
2098         * platform/gtk/GtkDragAndDropHelper.h: Removed.
2099
2100 2014-10-19  Roger Fong  <roger_fong@apple.com>
2101
2102         Unreviewed. Style fix following r174855.
2103
2104         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2105         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
2106
2107 2014-10-18  Antti Koivisto  <antti@apple.com>
2108
2109         REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
2110         https://bugs.webkit.org/show_bug.cgi?id=137855
2111
2112         Reviewed by Dan Bernstein.
2113
2114         We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
2115         backchannel data that the synthesized response doesn't have.
2116
2117         Test: http/tests/mime/mime-type-sniff.html
2118
2119         * platform/network/mac/ResourceResponseMac.mm:
2120         (WebCore::ResourceResponse::initNSURLResponse):
2121
2122             When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.
2123
2124 2014-10-18  Chris Dumez  <cdumez@apple.com>
2125
2126         [Mac] Use Fast enumeration consistently in WebFontCache.mm
2127         https://bugs.webkit.org/show_bug.cgi?id=137791
2128
2129         Reviewed by Darin Adler.
2130
2131         Use fast enumeration consistently in WebFontCache.mm as this results in
2132         more efficient, concise and safer code.
2133
2134         No new tests, no behavior change.
2135
2136         * platform/mac/WebFontCache.mm:
2137         (+[WebFontCache getTraits:inFamily:]):
2138         Reserve Vector capacity before the loop as we know how many traits we
2139         are going to append. Also use uncheckedAppend() for performance.
2140
2141         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2142
2143 2014-10-18  Chris Fleizach  <cfleizach@apple.com>
2144
2145         AX: Tables with <colgroups> are not reporting table column headers
2146         https://bugs.webkit.org/show_bug.cgi?id=137846
2147
2148         Reviewed by Mario Sanchez Prada.
2149
2150         The code to search for header objects was getting stuck on anonymous RenderTableSections.
2151         We also need to check more rows for headers, in case the first row or more is not visible or is empty.
2152
2153         Test: accessibility/table-column-headers-with-captions.html
2154
2155         * accessibility/AccessibilityTableColumn.cpp:
2156         (WebCore::AccessibilityTableColumn::headerObject):
2157         (WebCore::AccessibilityTableColumn::headerObjectForSection):
2158
2159 2014-10-18  KwangHyuk Kim  <hyuki.kim@samsung.com>
2160
2161         [EFL] build break occurs on webkit efl build.
2162         https://bugs.webkit.org/show_bug.cgi?id=137844
2163
2164         Reviewed by Gyuyoung Kim.
2165
2166         As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.
2167
2168         No new tests because it's just to fix build break.
2169
2170         * cssjit/SelectorCompiler.cpp:
2171         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2172
2173 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2174
2175         Apply std::unique_ptr to FooFont classes
2176         https://bugs.webkit.org/show_bug.cgi?id=137769
2177
2178         Reviewed by Andreas Kling.
2179
2180         As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.
2181
2182         No new tests, no behavior changes.
2183
2184         * platform/graphics/Font.cpp:
2185         (WebCore::retrieveOrAddCachedFontGlyphs):
2186         (WebCore::Font::createLayout):
2187         * platform/graphics/SimpleFontData.cpp:
2188         (WebCore::SimpleFontData::DerivedFontData::create):
2189         * platform/graphics/SimpleFontData.h:
2190         Remove create() factory function because public ctor and std::make_unique<> can replace it.
2191         * platform/graphics/mac/ComplexTextController.cpp:
2192         (WebCore::Font::createLayout):
2193
2194 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2195
2196         Use std::unique_ptr in WebCore/bindings
2197         https://bugs.webkit.org/show_bug.cgi?id=137808
2198
2199         Reviewed by Andreas Kling.
2200
2201         Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
2202         and WTF::move.
2203
2204         No new tests, no behavior changes.
2205
2206         * bindings/generic/ActiveDOMCallback.h:
2207         * bindings/js/JSMessageEventCustom.cpp:
2208         (WebCore::handleInitMessageEvent):
2209         * bindings/js/SerializedScriptValue.cpp:
2210         (WebCore::SerializedScriptValue::SerializedScriptValue):
2211         (WebCore::SerializedScriptValue::transferArrayBuffers):
2212         (WebCore::SerializedScriptValue::create):
2213         * bindings/js/SerializedScriptValue.h:
2214         * bindings/js/WorkerScriptDebugServer.cpp:
2215         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
2216         * bindings/js/WorkerScriptDebugServer.h:
2217         * inspector/WorkerDebuggerAgent.cpp:
2218         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
2219
2220 2014-10-16  Roger Fong  <roger_fong@apple.com>
2221
2222         Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
2223         https://bugs.webkit.org/show_bug.cgi?id=137793.
2224         <rdar://problem/15408133>
2225
2226         Reviewed by Dean Jackson.
2227
2228         This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.
2229
2230         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2231         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
2232         On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.
2233
2234 2014-10-17  Chris Dumez  <cdumez@apple.com>
2235
2236         Use is<>() / downcast<>() for all SVG RenderObjects
2237         https://bugs.webkit.org/show_bug.cgi?id=137840
2238
2239         Reviewed by Benjamin Poulain.
2240
2241         Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
2242         surrounding code.
2243
2244         No new tests, no behaviro change.
2245
2246         * accessibility/AccessibilityRenderObject.cpp:
2247         (WebCore::AccessibilityRenderObject::supportsPath):
2248         (WebCore::AccessibilityRenderObject::elementPath):
2249         * page/FrameView.cpp:
2250         (WebCore::FrameView::applyOverflowToViewport):
2251         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
2252         * rendering/RenderLayerFilterInfo.cpp:
2253         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
2254         * rendering/svg/RenderSVGGradientStop.cpp:
2255         (WebCore::RenderSVGGradientStop::styleDidChange):
2256         * rendering/svg/RenderSVGImage.h:
2257         * rendering/svg/RenderSVGInlineText.h:
2258         * rendering/svg/RenderSVGResourceContainer.cpp:
2259         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
2260         * rendering/svg/RenderSVGResourceContainer.h:
2261         * rendering/svg/RenderSVGRoot.cpp:
2262         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
2263         * rendering/svg/RenderSVGRoot.h:
2264         * rendering/svg/RenderSVGShape.h:
2265         * rendering/svg/RenderSVGText.cpp:
2266         (WebCore::collectLayoutAttributes):
2267         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
2268         (WebCore::RenderSVGText::subtreeTextDidChange):
2269         (WebCore::updateFontInAllDescendants):
2270         * rendering/svg/RenderSVGText.h:
2271         * rendering/svg/SVGInlineTextBox.h:
2272         * rendering/svg/SVGRenderSupport.cpp:
2273         (WebCore::SVGRenderSupport::mapLocalToContainer):
2274         (WebCore::SVGRenderSupport::pushMappingToContainer):
2275         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
2276         * rendering/svg/SVGRenderTreeAsText.cpp:
2277         (WebCore::writeStyle):
2278         * rendering/svg/SVGRenderingContext.cpp:
2279         (WebCore::SVGRenderingContext::bufferForeground):
2280         * rendering/svg/SVGResourcesCycleSolver.cpp:
2281         (WebCore::SVGResourcesCycleSolver::resolveCycles):
2282         * rendering/svg/SVGRootInlineBox.cpp:
2283         (WebCore::SVGRootInlineBox::renderSVGText):
2284         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
2285         * svg/SVGCircleElement.cpp:
2286         (WebCore::SVGCircleElement::svgAttributeChanged):
2287         * svg/SVGElement.cpp:
2288         (WebCore::SVGElement::svgAttributeChanged):
2289         * svg/SVGEllipseElement.cpp:
2290         (WebCore::SVGEllipseElement::svgAttributeChanged):
2291         * svg/SVGImageElement.cpp:
2292         (WebCore::SVGImageElement::svgAttributeChanged):
2293         (WebCore::SVGImageElement::didAttachRenderers):
2294         * svg/SVGLineElement.cpp:
2295         (WebCore::SVGLineElement::svgAttributeChanged):
2296         * svg/SVGPolyElement.cpp:
2297         (WebCore::SVGPolyElement::svgAttributeChanged):
2298         * svg/SVGRectElement.cpp:
2299         (WebCore::SVGRectElement::svgAttributeChanged):
2300         * svg/SVGSVGElement.cpp:
2301         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2302         (WebCore::SVGSVGElement::currentViewBoxRect):
2303         * svg/graphics/SVGImage.cpp:
2304         (WebCore::SVGImage::setContainerSize):
2305         (WebCore::SVGImage::containerSize):
2306
2307 2014-10-17  Chris Dumez  <cdumez@apple.com>
2308
2309         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
2310         https://bugs.webkit.org/show_bug.cgi?id=137836
2311
2312         Reviewed by Andreas Kling.
2313
2314         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
2315         This function is only called from WidthIterator::applyFontTransforms(),
2316         which already makes sure to call applyTransforms() if isSVGFont()
2317         returns false. This patch replaces the check with a simple assertion.
2318
2319         No new tests, no behavior change.
2320
2321         * platform/graphics/SimpleFontData.h:
2322         * svg/SVGFontData.h:
2323
2324 2014-10-17  Michael Saboff  <msaboff@apple.com>
2325
2326         Don't create cached functions that access lexicalGlobalObject()
2327         https://bugs.webkit.org/show_bug.cgi?id=137839
2328
2329         Reviewed by Geoffrey Garen.
2330
2331         Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
2332         are always created as needed for every prototype.  Made it so that JSHTMLDocument does
2333         the same for open().  Updated test to account for these methods not being cached
2334
2335         Updated tests accordingly.
2336
2337         * bindings/js/JSDOMWindowCustom.cpp: 
2338         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
2339         special functions.
2340         * bindings/js/JSHTMLDocumentCustom.cpp:
2341         (WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
2342         it is first accessed.
2343         * html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.
2344
2345 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
2346
2347         [iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
2348         https://bugs.webkit.org/show_bug.cgi?id=137837
2349         rdar://problem/18545452
2350
2351         Reviewed by Tim Horton.
2352
2353         Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
2354         in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
2355         and a null check.
2356
2357         * rendering/RenderLayerCompositor.cpp:
2358         (WebCore::RenderLayerCompositor::attachScrollingNode):
2359
2360 2014-10-17  Andreas Kling  <akling@apple.com>
2361
2362         Re-arrange parentheses for compilation purposes.
2363
2364         * cssjit/SelectorCompiler.cpp:
2365         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2366
2367 2014-10-17  Andreas Kling  <akling@apple.com>
2368
2369         Unreviewed build fix after r174838.
2370
2371         Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.
2372
2373         * cssjit/SelectorCompiler.cpp:
2374         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2375
2376 2014-10-17  Chris Dumez  <cdumez@apple.com>
2377
2378         Use is<>() / downcast<>() for RenderBox
2379         https://bugs.webkit.org/show_bug.cgi?id=137804
2380
2381         Reviewed by Andreas Kling.
2382
2383         Use is<>() / downcast<>() for RenderBox and clean up the surrounding
2384         code.
2385
2386         No new tests, no behavior change.
2387
2388         * accessibility/AccessibilityRenderObject.cpp:
2389         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2390         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
2391         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
2392         (WebCore::AccessibilityRenderObject::scrollTo):
2393         * bindings/objc/DOMHTML.mm:
2394         (-[DOMHTMLElement scrollYOffset]):
2395         (-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
2396         * bindings/objc/DOMUIKitExtensions.mm:
2397         (-[DOMNode borderRadii]):
2398         * css/CSSComputedStyleDeclaration.cpp:
2399         (WebCore::sizingBox):
2400         (WebCore::computedTransform):
2401         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
2402         (WebCore::ComputedStyleExtractor::propertyValue):
2403         * dom/ContainerNode.cpp:
2404         (WebCore::ContainerNode::getLowerRightCorner):
2405         * dom/Document.cpp:
2406         (WebCore::Document::webkitWillEnterFullScreenForElement):
2407         * dom/Element.cpp:
2408         (WebCore::Element::scrollByUnits):
2409         * dom/Node.cpp:
2410         (WebCore::Node::defaultEventHandler):
2411         * dom/Position.cpp:
2412         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
2413         * editing/DeleteButtonController.cpp:
2414         (WebCore::isDeletableElement):
2415         * editing/EditorCommand.cpp:
2416         (WebCore::verticalScrollDistance):
2417         * editing/FrameSelection.cpp:
2418         (WebCore::CaretBase::paintCaret):
2419         * editing/TextIterator.cpp:
2420         (WebCore::fullyClipsContents):
2421         (WebCore::shouldEmitExtraNewlineForNode):
2422         * editing/htmlediting.cpp:
2423         (WebCore::absoluteBoundsForLocalCaretRect):
2424         * html/HTMLFormControlElement.cpp:
2425         (WebCore::HTMLFormControlElement::isFocusable):
2426         * html/HTMLPlugInImageElement.cpp:
2427         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
2428         * html/HTMLSelectElement.cpp:
2429         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2430         * html/shadow/SliderThumbElement.cpp:
2431         (WebCore::SliderThumbElement::setPositionFromPoint):
2432         * inspector/InspectorOverlay.cpp:
2433         (WebCore::buildObjectForElementInfo):
2434         * page/AutoscrollController.cpp:
2435         (WebCore::AutoscrollController::updateAutoscrollRenderer):
2436         * page/EventHandler.cpp:
2437         (WebCore::EventHandler::startPanScrolling):
2438         * page/FrameView.cpp:
2439         (WebCore::FrameView::embeddedContentBox):
2440         * page/GestureTapHighlighter.cpp:
2441         * page/SpatialNavigation.cpp:
2442         (WebCore::isScrollableNode):
2443         * page/animation/CSSPropertyAnimation.cpp:
2444         (WebCore::blendFunc):
2445         * platform/efl/RenderThemeEfl.cpp:
2446         (WebCore::RenderThemeEfl::baselinePosition):
2447         * plugins/PluginView.cpp:
2448         (WebCore::PluginView::invalidateWindowlessPluginRect):
2449         * rendering/InlineBox.cpp:
2450         (WebCore::InlineBox::logicalHeight):
2451         (WebCore::InlineBox::adjustPosition):
2452         * rendering/InlineElementBox.cpp:
2453         (WebCore::InlineElementBox::deleteLine):
2454         (WebCore::InlineElementBox::extractLine):
2455         (WebCore::InlineElementBox::attachLine):
2456         (WebCore::InlineElementBox::paint):
2457         (WebCore::InlineElementBox::nodeAtPoint):
2458         * rendering/InlineFlowBox.cpp:
2459         (WebCore::InlineFlowBox::addToLine):
2460         (WebCore::InlineFlowBox::addReplacedChildOverflow):
2461         * rendering/LayoutState.cpp:
2462         (WebCore::LayoutState::LayoutState):
2463         * rendering/RenderBlock.cpp:
2464         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
2465         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
2466         (WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
2467         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2468         (WebCore::RenderBlock::addFocusRingRects):
2469         * rendering/RenderBlockFlow.cpp:
2470         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
2471         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
2472         * rendering/RenderBlockLineLayout.cpp:
2473         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
2474         (WebCore::RenderBlockFlow::layoutLineBoxes):
2475         * rendering/RenderBox.cpp:
2476         (WebCore::RenderBox::findAutoscrollable):
2477         (WebCore::computeBlockStaticDistance):
2478         (WebCore::RenderBox::positionForPoint):
2479         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2480         * rendering/RenderBox.h:
2481         (WebCore::RenderBox::previousSiblingBox):
2482         (WebCore::RenderBox::nextSiblingBox):
2483         (WebCore::RenderBox::parentBox):
2484         (WebCore::RenderBox::firstChildBox):
2485         (WebCore::RenderBox::lastChildBox):
2486         * rendering/RenderBoxModelObject.cpp:
2487         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2488         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
2489         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
2490         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2491         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2492         * rendering/RenderElement.cpp:
2493         (WebCore::RenderElement::removeChildInternal):
2494         (WebCore::RenderElement::styleWillChange):
2495         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
2496         * rendering/RenderEmbeddedObject.cpp:
2497         (WebCore::RenderEmbeddedObject::layout):
2498         * rendering/RenderFieldset.cpp:
2499         (WebCore::RenderFieldset::findLegend):
2500         * rendering/RenderFlowThread.cpp:
2501         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
2502         (WebCore::RenderFlowThread::currentActiveRenderBox):
2503         * rendering/RenderFlowThread.h:
2504         * rendering/RenderFullScreen.cpp:
2505         (WebCore::RenderFullScreen::unwrapRenderer):
2506         * rendering/RenderImage.cpp:
2507         (WebCore::RenderImage::layoutShadowControls):
2508         (WebCore::RenderImage::computeIntrinsicRatioInformation):
2509         * rendering/RenderInline.cpp:
2510         (WebCore::RenderInline::absoluteRects):
2511         (WebCore::RenderInline::addFocusRingRects):
2512         * rendering/RenderLayer.cpp:
2513         (WebCore::RenderLayer::updateLayerPosition):
2514         (WebCore::RenderLayer::perspectiveTransform):
2515         (WebCore::RenderLayer::perspectiveOrigin):
2516         (WebCore::parentLayerCrossFrame):
2517         (WebCore::RenderLayer::enclosingScrollableLayer):
2518         (WebCore::RenderLayer::resize):
2519         (WebCore::RenderLayer::scrollsOverflow):
2520         (WebCore::computeReferenceBox):
2521         (WebCore::RenderLayer::calculateClipRects):
2522         * rendering/RenderLayer.h:
2523         * rendering/RenderLayerBacking.cpp:
2524         (WebCore::RenderLayerBacking::updateTransform):
2525         (WebCore::RenderLayerBacking::updateGeometry):
2526         (WebCore::RenderLayerBacking::resetContentsRect):
2527         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
2528         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2529         (WebCore::RenderLayerBacking::contentsBox):
2530         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
2531         (WebCore::RenderLayerBacking::startAnimation):
2532         (WebCore::RenderLayerBacking::startTransition):
2533         * rendering/RenderLineBoxList.cpp:
2534         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2535         * rendering/RenderMediaControlElements.cpp:
2536         (WebCore::RenderMediaVolumeSliderContainer::layout):
2537         * rendering/RenderMultiColumnFlowThread.cpp:
2538         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
2539         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
2540         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
2541         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
2542         (WebCore::isValidColumnSpanner):
2543         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
2544         * rendering/RenderNamedFlowThread.cpp:
2545         (WebCore::RenderNamedFlowThread::getRanges):
2546         * rendering/RenderObject.cpp:
2547         (WebCore::RenderObject::computeRectForRepaint):
2548         (WebCore::RenderObject::showRegionsInformation):
2549         (WebCore::RenderObject::showRenderObject):
2550         (WebCore::RenderObject::mapLocalToContainer):
2551         (WebCore::RenderObject::pushMappingToContainer):
2552         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
2553         (WebCore::RenderObject::addAnnotatedRegions):
2554         * rendering/RenderTable.cpp:
2555         (WebCore::RenderTable::nodeAtPoint):
2556         * rendering/RenderTextControlMultiLine.cpp:
2557         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
2558         * rendering/RenderTheme.cpp:
2559         (WebCore::RenderTheme::baselinePosition):
2560         * rendering/RenderThemeGtk.cpp:
2561         (WebCore::RenderThemeGtk::baselinePosition):
2562         (WebCore::centerRectVerticallyInParentInputElement):
2563         * rendering/RenderThemeIOS.mm:
2564         (WebCore::RenderThemeIOS::baselinePosition):
2565         * rendering/RenderThemeSafari.cpp:
2566         (WebCore::RenderThemeSafari::baselinePosition):
2567         * rendering/RenderThemeWin.cpp:
2568         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
2569         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
2570         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
2571         * rendering/RenderTreeAsText.cpp:
2572         (WebCore::RenderTreeAsText::writeRenderObject):
2573         (WebCore::externalRepresentation):
2574         * rendering/RenderView.cpp:
2575         (WebCore::RenderView::paintBoxDecorations):
2576         * rendering/RootInlineBox.cpp:
2577         (WebCore::RootInlineBox::setLineBreakInfo):
2578         * rendering/line/BreakingContextInlineHeaders.h:
2579         (WebCore::BreakingContext::handleOutOfFlowPositioned):
2580         (WebCore::BreakingContext::handleFloat):
2581         (WebCore::BreakingContext::handleReplaced):
2582         * rendering/line/LineBreaker.cpp:
2583         (WebCore::LineBreaker::skipTrailingWhitespace):
2584         (WebCore::LineBreaker::skipLeadingWhitespace):
2585         * rendering/mathml/RenderMathMLUnderOver.cpp:
2586         (WebCore::RenderMathMLUnderOver::layout):
2587         * svg/graphics/SVGImage.cpp:
2588         (WebCore::SVGImage::embeddedContentBox):
2589
2590 2014-10-17  Andreas Kling  <akling@apple.com>
2591
2592         Get rid of wrapperContext() in DOM bindings.
2593         <https://webkit.org/b/137834>
2594
2595         Reviewed by Chris Dumez.
2596
2597         The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
2598         already, we don't need a separate mechanism to get at the context.
2599
2600         The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)
2601
2602         * bindings/js/JSDOMBinding.h:
2603         (WebCore::setInlineCachedWrapper):
2604         (WebCore::cacheWrapper):
2605         (WebCore::wrapperContext): Deleted.
2606         * bindings/scripts/CodeGeneratorJS.pm:
2607         (GenerateHeader):
2608
2609 2014-10-17  Benjamin Poulain  <benjamin@webkit.org>
2610
2611         Make a better use of the available registers when compiling nested selector lists
2612         https://bugs.webkit.org/show_bug.cgi?id=137802
2613
2614         Reviewed by Andreas Kling.
2615
2616         Previously, when compiling a nested selector list, the compiler would start by pushing all
2617         the allocated registers to the stack to free them for the compiled selector list.
2618         While neat to ensure register allocation is correct, this is very inefficient.
2619
2620         This patch brings the first step for reducing the overhead. Instead of pushing everything
2621         to the stack, we just push as many registers as we need for compiling the selector list.
2622
2623         In most cases, we have so many registers that we don't even need to push anything to the stack.
2624
2625         Test: fast/selectors/nth-child-of-register-requirement.html
2626
2627         * cssjit/SelectorCompiler.cpp:
2628         Add an explicit type for SelectorList to keep information aggregated from all
2629         SelectorFragmentList inside it.
2630
2631         SelectorFragmentList is also extended to include its register and stack requirements.
2632         This information is then used to create a SelectorList and to compile the SelectorFragmentList.
2633
2634         (WebCore::SelectorCompiler::hasAnyCombinators):
2635         We only change the elementAddressRegister when moving over combinators. This is used to detect
2636         if a selector list clobber the elementAddressRegister or leave it untouched.
2637
2638         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
2639         (WebCore::SelectorCompiler::computeBacktrackingInformation):
2640         Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.
2641
2642         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
2643         This is where the fun happen.
2644         First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.
2645
2646         Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
2647         to the stack and give them back to the register allocator.
2648
2649         With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
2650         of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
2651         of SelectorCompiler and it is quite a bit more efficient in the common cases.
2652
2653         Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
2654         because in the vast majority of cases it is 1 or 2 pop.
2655
2656         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2657         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
2658         * cssjit/StackAllocator.h:
2659         (WebCore::StackAllocator::push):
2660
2661 2014-10-17  Chris Dumez  <cdumez@apple.com>
2662
2663         Use is<>() / downcast<>() for StyleImage
2664         https://bugs.webkit.org/show_bug.cgi?id=137824
2665
2666         Reviewed by Andreas Kling.
2667
2668         Use is<>() / downcast<>() for StyleImage and clean up the surrouding
2669         code.
2670
2671         No new tests, no behavior change.
2672
2673         * css/CSSCursorImageValue.cpp:
2674         (WebCore::CSSCursorImageValue::detachPendingImage):
2675         (WebCore::CSSCursorImageValue::cachedImage):
2676         (WebCore::CSSCursorImageValue::cachedImageURL):
2677         * css/CSSImageSetValue.cpp:
2678         (WebCore::CSSImageSetValue::detachPendingImage):
2679         (WebCore::CSSImageSetValue::~CSSImageSetValue):
2680         (WebCore::CSSImageSetValue::cachedImageSet):
2681         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
2682         * css/CSSImageValue.cpp:
2683         (WebCore::CSSImageValue::detachPendingImage):
2684         (WebCore::CSSImageValue::cachedImage):
2685         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
2686         * css/StyleResolver.cpp:
2687         (WebCore::StyleResolver::loadPendingShapeImage):
2688         (WebCore::StyleResolver::loadPendingImages):
2689         * page/PageSerializer.cpp:
2690         (WebCore::PageSerializer::retrieveResourcesForProperties):
2691         * page/animation/CSSPropertyAnimation.cpp:
2692         (WebCore::blendFunc):
2693         * rendering/style/StyleCachedImage.h:
2694         * rendering/style/StyleCachedImageSet.h:
2695         * rendering/style/StyleGeneratedImage.h:
2696         * rendering/style/StyleImage.h:
2697         * rendering/style/StylePendingImage.h:
2698
2699 2014-10-17  Dean Jackson  <dino@apple.com>
2700
2701         [Media] Always update controls for <audio> since they are always visible
2702         https://bugs.webkit.org/show_bug.cgi?id=137829
2703         <rdar://problem/18693987>
2704
2705         Reviewed by Brent Fulgham.
2706
2707         Revision 174756 made a change to only update the display of the controls
2708         while they are visible. However, <audio> elements didn't detect visibility
2709         the same way, since their controls do not auto-hide.
2710
2711         Change controlsAreHidden to check if we're an audio element.
2712
2713         * Modules/mediacontrols/mediaControlsApple.js:
2714         (Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
2715
2716 2014-10-17  peavo@outlook.com  <peavo@outlook.com>
2717
2718         [WinCairo] Accelerated compositing is not implemented.
2719         https://bugs.webkit.org/show_bug.cgi?id=137345
2720
2721         Reviewed by Brent Fulgham.
2722
2723         This patch is based on GTK, and the texture mapper graphics layer type.
2724
2725         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
2726         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
2727         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
2728         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2729         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
2730         (WebCore::GraphicsLayerTextureMapper::startedAnimation):
2731         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
2732         Otherwise glLinkProgram() will fail, and nothing will be rendered.
2733
2734 2014-10-17  Alexey Proskuryakov  <ap@apple.com>
2735
2736         [iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
2737         https://bugs.webkit.org/show_bug.cgi?id=137826
2738         rdar://problem/17329599
2739
2740         Reviewed by Brady Eidson.
2741
2742         No new tests, as we don't have a way to simulate details of user interaction with
2743         an auth dialog.
2744
2745         * platform/network/cf/ResourceHandleCFNet.cpp:
2746         (WebCore::ResourceHandle::receivedCredential):
2747         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
2748         (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
2749         (WebCore::ResourceHandle::receivedChallengeRejection):
2750         Added null checks before passing m_connection for CFNetwork functions, making this
2751         match what Mac code does when sending a message to a nil receiver.
2752
2753 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
2754
2755         Fix the iOS build.
2756
2757         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2758         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
2759
2760 2014-10-16  Jer Noble  <jer.noble@apple.com>
2761
2762         [Mac] Represent AVMediaSelectionOptions as AudioTracks
2763         https://bugs.webkit.org/show_bug.cgi?id=137474
2764
2765         Reviewed by Brent Fulgham.
2766
2767         Test: http/tests/media/hls/hls-audio-tracks.html
2768
2769         Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
2770         as entries in the video's AudioTrackList.
2771
2772         AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
2773         are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
2774         wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
2775         time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
2776         selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
2777         inconsistent. Because setting the selected option multiple times in the same run-loop can
2778         cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
2779         the actual selection in the next run-loop.
2780
2781         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
2782         (WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
2783         (WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
2784         (WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
2785         (WebCore::MediaSelectionGroupAVFObjC::options):  Simple accessor.
2786         (WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
2787         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
2788         (WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
2789         (WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
2790         (WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
2791         (WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
2792         (WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
2793         (WebCore::MediaSelectionGroupAVFObjC::create):
2794         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
2795         (WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
2796         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
2797         (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
2798         (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.
2799
2800         Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
2801         MediaSelectionOptionAVFObjC objects.
2802
2803         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
2804         (WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
2805         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2806         (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):  Simple constructor.
2807         (WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
2808         (WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
2809         (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
2810         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
2811         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
2812         (WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
2813         (WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
2814         (WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
2815         (WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
2816         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
2817         (WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.
2818
2819         Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
2820         a MediaSelectionOptionAVFObjC.
2821
2822         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
2823         (WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
2824         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
2825         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
2826         (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
2827         (WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
2828         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
2829         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
2830         (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
2831         (WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
2832         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
2833
2834         Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
2835         use the index of the track or option instead of it's self-declared ID for ordering for the
2836         trackIndex.
2837
2838         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
2839         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
2840         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
2841         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
2842
2843         Rather than making allowing the AVPlayerItem to automatically select the "best"
2844         AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
2845         and thereafter allow the users manual selections "stick".
2846
2847         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2848         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2849         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
2850         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):
2851
2852         Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.
2853
2854         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2855         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
2856         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
2857         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
2858         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
2859         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
2860         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
2861             AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.
2862         
2863         Add new files to project.
2864         * WebCore.xcodeproj/project.pbxproj:
2865
2866 2014-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2867
2868         [EFL] window.screen.width returns wrong value if more displays are available
2869         https://bugs.webkit.org/show_bug.cgi?id=137778
2870
2871         Reviewed by Gyuyoung Kim.
2872
2873         ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
2874         having two displays of 1680x1050, it will return 3360x1050.
2875
2876         Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
2877
2878         No new tests. Hardware specific bug including multiple displays.
2879
2880         * platform/efl/PlatformScreenEfl.cpp:
2881         (WebCore::screenRect):
2882         Use ecore's xrandr to determine the screen on which browser window is displayed.
2883
2884 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2885
2886         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
2887         https://bugs.webkit.org/show_bug.cgi?id=137782
2888
2889         Reviewed by Sergio Villar Senin.
2890
2891         * platform/gtk/SharedTimerGtk.cpp:
2892         (WebCore::setSharedTimerFireInterval): Use microseconds instead of
2893         milliseconds.
2894
2895 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2896
2897         [GTK] Move touch events handling from Platform to WebKit2
2898         https://bugs.webkit.org/show_bug.cgi?id=137735
2899
2900         Reviewed by Sergio Villar Senin.
2901
2902         Remove GtkTouchContextHelper.
2903
2904         * PlatformGTK.cmake:
2905         * platform/gtk/GtkTouchContextHelper.cpp: Removed.
2906         * platform/gtk/GtkTouchContextHelper.h: Removed.
2907
2908 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2909
2910         Remove unused function in WorkerThreadableLoader.h 
2911         https://bugs.webkit.org/show_bug.cgi?id=137811
2912
2913         Reviewed by Csaba Osztrogon√°c.
2914
2915         mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.
2916
2917         * loader/WorkerThreadableLoader.h:
2918
2919 2014-10-15  Yusuke Suzuki  <utatane.tea@gmail.com>
2920
2921         CSS Selectors Level 4: Implement :matches in SelectorChecker
2922         https://bugs.webkit.org/show_bug.cgi?id=137393
2923
2924         Reviewed by Benjamin Poulain.
2925
2926         In this patch, we introduce initial :matches implementation.
2927         In this current implementation, we don't consider pseudo elements.
2928
2929         Test: fast/selectors/querySelector-matches.html
2930
2931         * css/SelectorChecker.cpp:
2932         (WebCore::SelectorChecker::checkOne):
2933
2934 2014-10-16  Yusuke Suzuki  <utatane.tea@gmail.com>
2935
2936         CSS JIT: Introduce StackAllocator::addressOf
2937         https://bugs.webkit.org/show_bug.cgi?id=137771
2938
2939         Reviewed by Benjamin Poulain.
2940
2941         Introduce StackAllocator::addressOf and drop offsetToStackReference, it's too primitive.
2942
2943         * cssjit/SelectorCompiler.cpp:
2944         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2945         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
2946         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
2947         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
2948         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
2949         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
2950         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
2951         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
2952         * cssjit/StackAllocator.h:
2953         (WebCore::StackAllocator::addressOf):
2954         (WebCore::StackAllocator::offsetToStackReference):
2955
2956 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
2957
2958         REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
2959         https://bugs.webkit.org/show_bug.cgi?id=137679
2960         rdar://problem/18450335
2961
2962         Reviewed by Enrica Casucci.
2963
2964         Test: platform/mac/editing/input/selected-composed-text-painting.html
2965
2966         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
2967         selection beckground for unconfirmed text with underlines, so we should use a regular
2968         style for text painting, as well.
2969
2970 2014-10-16  Chris Dumez  <cdumez@apple.com>
2971
2972         Use is<>() / downcast<>() for BasicShape subclasses
2973         https://bugs.webkit.org/show_bug.cgi?id=137766
2974
2975         Reviewed by Andreas Kling.
2976
2977         Use is<>() / downcast<>() for BasicShape subclasses and clean up the
2978         surrounding code.
2979
2980         No new tests, no behavior change.
2981
2982         * css/BasicShapeFunctions.cpp:
2983         (WebCore::valueForBasicShape):
2984         (WebCore::basicShapeForValue):
2985         * css/BasicShapeFunctions.h:
2986         * css/CSSComputedStyleDeclaration.cpp:
2987         (WebCore::shapePropertyValue):
2988         * page/animation/CSSPropertyAnimation.cpp:
2989         (WebCore::blendFunc):
2990         * rendering/ClipPathOperation.h:
2991         (WebCore::ShapeClipPathOperation::create):
2992         Take a PassRef<BasicShape> in argument to make it obvious it is never
2993         null.
2994
2995         (WebCore::ShapeClipPathOperation::basicShape):
2996         Return a reference instead of a pointer as it can never return null.
2997
2998         (WebCore::ShapeClipPathOperation::windRule):
2999         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
3000         Make it non-const due to the const-correctness of Ref::get().
3001
3002         (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
3003         * rendering/RenderBlock.cpp:
3004         (WebCore::RenderBlock::nodeAtPoint):
3005         * rendering/RenderLayer.cpp:
3006         (WebCore::RenderLayer::setupClipPath):
3007         * rendering/shapes/Shape.cpp:
3008         (WebCore::Shape::createShape):
3009         * rendering/shapes/Shape.h:
3010         * rendering/shapes/ShapeOutsideInfo.cpp:
3011         (WebCore::ShapeOutsideInfo::computedShape):
3012         * rendering/style/BasicShapes.cpp:
3013         (WebCore::BasicShape::canBlend):
3014         (WebCore::BasicShapeCircle::blend):
3015         (WebCore::BasicShapeEllipse::blend):
3016         (WebCore::BasicShapePolygon::blend):
3017         (WebCore::BasicShapeInset::blend):
3018         * rendering/style/BasicShapes.h:
3019         * rendering/svg/SVGRenderingContext.cpp:
3020         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3021
3022 2014-10-16  Chris Dumez  <cdumez@apple.com>
3023
3024         Leverage the new RenderElement::m_isCSSAnimating flag in more places
3025         https://bugs.webkit.org/show_bug.cgi?id=137786
3026
3027         Reviewed by Simon Fraser.
3028
3029         Leverage the new RenderElement::m_isCSSAnimating flag that was introduced
3030         in r174703 in more places, for performance. This avoids doing extra work
3031         for renderers on which we are not running animations on. This patch also
3032         updates the API a bit to use more references instead of pointers, making
3033         it clear the RenderElement cannot be null and thus avoiding unnecessary
3034         null checks.
3035
3036         No new tests, no behavior change.
3037
3038         * css/CSSComputedStyleDeclaration.cpp:
3039         (WebCore::computeRenderStyleForProperty):
3040         * page/animation/AnimationController.cpp:
3041         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
3042         (WebCore::AnimationControllerPrivate::clear):
3043         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
3044         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
3045         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
3046         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
3047         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
3048         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
3049         (WebCore::AnimationController::cancelAnimations):
3050         (WebCore::AnimationController::updateAnimations):
3051         (WebCore::AnimationController::getAnimatedStyleForRenderer):
3052         (WebCore::AnimationController::notifyAnimationStarted):
3053         (WebCore::AnimationController::isRunningAnimationOnRenderer):
3054         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
3055         * page/animation/AnimationController.h:
3056         * page/animation/AnimationControllerPrivate.h:
3057         * rendering/RenderElement.cpp:
3058         (WebCore::RenderElement::willBeDestroyed):
3059         * rendering/RenderLayer.cpp:
3060         (WebCore::RenderLayer::currentTransform):
3061         * rendering/RenderLayerBacking.cpp:
3062         (WebCore::RenderLayerBacking::updateGeometry):
3063         (WebCore::RenderLayerBacking::notifyAnimationStarted):
3064         * rendering/RenderLayerCompositor.cpp:
3065         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3066         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
3067
3068 2014-10-16  Adrien Destugues  <pulkomandy@gmail.com>
3069
3070         Missing RefPtr.release() calls in TextureMapper
3071         https://bugs.webkit.org/show_bug.cgi?id=137777
3072
3073         Reviewed by Chris Dumez.
3074
3075         No new tests: no functional change, cleanup/optimization.
3076
3077         Avoids useless ref/deref cycle when returning from functions.
3078
3079         * platform/graphics/texmap/TextureMapper.cpp:
3080         (WebCore::TextureMapper::acquireTextureFromPool):
3081         * platform/graphics/texmap/TextureMapperLayer.cpp:
3082         (WebCore::TextureMapperLayer::paintIntoSurface):
3083
3084 2014-10-16  Chris Dumez  <cdumez@apple.com>
3085
3086         Use is<>() / downcast<>() for ContentData subclasses
3087         https://bugs.webkit.org/show_bug.cgi?id=137768
3088
3089         Reviewed by Andreas Kling.
3090
3091         Use is<>() / downcast<>() for ContentData subclasses.
3092
3093         No new tests, no behavior change.
3094
3095         * css/CSSComputedStyleDeclaration.cpp:
3096         (WebCore::contentToCSSValue):
3097         * css/StyleResolver.cpp:
3098         (WebCore::StyleResolver::loadPendingImages):
3099         * rendering/RenderElement.cpp:
3100         (WebCore::RenderElement::createFor):
3101         * rendering/style/ContentData.h:
3102         (WebCore::operator==):
3103         * rendering/style/RenderStyle.cpp:
3104         (WebCore::RenderStyle::setContent):
3105
3106 2014-10-16  Commit Queue  <commit-queue@webkit.org>
3107
3108         Unreviewed, rolling out r174744.
3109         https://bugs.webkit.org/show_bug.cgi?id=137790
3110
3111         Caused another WebGL conformance test to fail (Requested by
3112         rfong on #webkit).
3113
3114         Reverted changeset:
3115
3116         "glReadPixels on NVIDIA cards returns the wrong values for the
3117         alpha channel when alpha is off."
3118         https://bugs.webkit.org/show_bug.cgi?id=137752
3119         http://trac.webkit.org/changeset/174744
3120
3121 2014-10-16  Tim Horton  <timothy_horton@apple.com>
3122
3123         Implement selection services menu for Legacy WebKit
3124         https://bugs.webkit.org/show_bug.cgi?id=137582
3125         <rdar://problem/18604241>
3126
3127         Reviewed by Brady Eidson.
3128
3129         * WebCore.exp.in:
3130         * editing/Editor.h:
3131         * editing/ios/EditorIOS.mm:
3132         (WebCore::Editor::replaceSelectionWithAttributedString):
3133         * editing/mac/EditorMac.mm:
3134         (WebCore::Editor::replaceSelectionWithAttributedString):
3135         Add replaceSelectionWithAttributedString, which replaces the selection
3136         with the given attributed string (converting to plain text if the destination
3137         is not richly editable).
3138
3139 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
3140
3141         Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
3142         https://bugs.webkit.org/show_bug.cgi?id=137779
3143         rdar://problem/18679320
3144
3145         Reviewed by Brady Eidson.
3146
3147         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
3148         (WebCore::ResourceHandleCFURLConnectionDelegate::retain):
3149         (WebCore::ResourceHandleCFURLConnectionDelegate::release):
3150         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
3151         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
3152         Implemented retain/release. They are necessary, as ResourceHandle goes away when
3153         it's canceled, and there is noone else to keep the client object alive but
3154         CFURLConnection itself.
3155
3156         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3157         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
3158         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
3159         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
3160         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
3161         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
3162         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
3163         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
3164         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
3165         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
3166         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
3167         Added a FIXME about potential improvements that I spotted while invsestigating this.
3168
3169 2014-10-15  Andrei Bucur  <abucur@adobe.com>
3170
3171         ASSERTION  FAILED in WebCore::RenderFlowThread::getRegionRangeForBox
3172         https://bugs.webkit.org/show_bug.cgi?id=135563
3173
3174         Reviewed by David Hyatt.
3175
3176         The new multi-column code doesn't work correctly when the document contains nested fragmentation
3177         contexts. The problem is the current flow thread concept that can store only one RenderFlowThread
3178         at a time and use it during layout.
3179
3180         The stored flow thread is always correct for regions because named flow threads are absolutley positioned
3181         so every child renderer is contained inside them (with the expcetion of fixed positioned elements which are
3182         treated separately).
3183
3184         For multi-column elements this is no longer the case. An absolutely positioned element inside a static
3185         multi-column element will be contained by a block outside the fragmentation context. It can even be
3186         contained by a different multi-column element in the case of nested flow threads.
3187
3188         The patch below explores a solution that's not based on a current flow thread stored globally. The proposed
3189         patch makes every block to store a pointer to its fragmentation context and a flag that states if this pointer
3190         needs to be updated or not. If the renderer is not a block it will get its flow thread from the containing
3191         block. Once the containing flow thread is requested for the block, the pointer is computed and cached until
3192         invalidated:
3193         - when a subtree is removed from a flow thread
3194         - when the position property of an element inside a flow thread changes
3195
3196         The process is recursive and it doesn't affect elements that are not nested inside a flow thread. If a block
3197         changes position from relative to static, any element that was contained by it can only be contained by an
3198         ancestor of the block. This ancestor will still be outside of any flow thread. This ensures that non-fragmentation
3199         code is not affected from a performance perspective.
3200
3201         The patch affects the results of the performance tests:
3202         - the regions layout tests have a decreased performance raging from 2% to 5-6%
3203         - the regions selection tests have an increased performance raging from 1-2% to 10%
3204         - the multicolumn layout tests (now pending review in b137687) have an increased performance
3205         raging from 1.8% to 5%
3206
3207         Tests: fast/multicol/multicol-all-positioned-crash.html
3208                fast/multicol/multicol-transform-containing-block.html
3209
3210         * rendering/FlowThreadController.cpp:
3211         (WebCore::FlowThreadController::FlowThreadController):
3212         * rendering/FlowThreadController.h:
3213         (WebCore::FlowThreadController::currentRenderFlowThread): Deleted.
3214         (WebCore::FlowThreadController::setCurrentRenderFlowThread): Deleted.
3215         * rendering/LayoutState.h:
3216         (WebCore::LayoutState::currentRenderFlowThread):
3217         (WebCore::LayoutState::setCurrentRenderFlowThread):
3218         * rendering/RenderBlock.cpp:
3219         (WebCore::RenderBlockRareData::RenderBlockRareData):
3220         (WebCore::RenderBlock::styleWillChange):
3221         (WebCore::RenderBlock::styleDidChange):
3222         (WebCore::RenderBlock::collapseAnonymousBoxChild):
3223         (WebCore::RenderBlock::cachedFlowThreadContainingBlock):
3224         (WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
3225         (WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
3226         (WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
3227         (WebCore::RenderBlock::locateFlowThreadContainingBlock):
3228         * rendering/RenderBlock.h:
3229         * rendering/RenderBlockFlow.cpp:
3230         (WebCore::RenderBlockFlow::styleWillChange):
3231         * rendering/RenderBox.cpp:
3232         (WebCore::RenderBox::borderBoxRectInRegion):
3233         * rendering/RenderFlowThread.cpp:
3234         (WebCore::RenderFlowThread::layout):
3235         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
3236         (WebCore::RenderFlowThread::repaintRectangleInRegions):
3237         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): Deleted.
3238         (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): Deleted.
3239         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): Deleted.
3240         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): Deleted.
3241         * rendering/RenderFlowThread.h:
3242         * rendering/RenderLayer.cpp:
3243         (WebCore::RenderLayer::paintLayer):
3244         (WebCore::RenderLayer::hitTestLayer):
3245         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
3246         (WebCore::RenderLayer::calculateClipRects):
3247         * rendering/RenderObject.cpp:
3248         (WebCore::RenderObject::showRegionsInformation):
3249         (WebCore::RenderObject::insertedIntoTree):
3250         (WebCore::RenderObject::removeFromRenderFlowThread):
3251         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
3252         (WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
3253         (WebCore::RenderObject::currentRenderNamedFlowFragment):
3254         (WebCore::RenderObject::locateFlowThreadContainingBlock):
3255         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache): Deleted.
3256         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Deleted.
3257         * rendering/RenderObject.h:
3258         (WebCore::RenderObject::flowThreadContainingBlock):
3259         * rendering/RenderRegion.cpp:
3260         (WebCore::RenderRegion::computeOverflowFromFlowThread):
3261         * rendering/RenderView.cpp:
3262         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
3263         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
3264         * rendering/RenderView.h:
3265
3266 2014-10-15  Chris Dumez  <cdumez@apple.com>
3267
3268         Use is<>() / downcast<>() for list-related render objects
3269         https://bugs.webkit.org/show_bug.cgi?id=137764
3270
3271         Reviewed by Benjamin Poulain.
3272
3273         Use is<>() / downcast<>() for list-related render objects and clean up
3274         the surrounding code.
3275
3276         No new tests, no behavior change.
3277
3278         * accessibility/AccessibilityListBox.cpp:
3279         (WebCore::AccessibilityListBox::visibleChildren):
3280         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
3281         * accessibility/AccessibilityListBoxOption.cpp:
3282         (WebCore::AccessibilityListBoxOption::elementRect):
3283         * accessibility/AccessibilityObject.cpp:
3284         (WebCore::renderListItemContainerForNode):
3285         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
3286         (getRangeLengthForObject):
3287         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3288         (accessibilityObjectLength):
3289         (offsetAdjustmentForListItem):
3290         (webkitAccessibleTextGetText):
3291         * editing/BreakBlockquoteCommand.cpp:
3292         (WebCore::BreakBlockquoteCommand::doApply):
3293         * html/HTMLLIElement.cpp:
3294         (WebCore::HTMLLIElement::didAttachRenderers):
3295         (WebCore::HTMLLIElement::parseValue):
3296         * html/HTMLSelectElement.cpp:
3297         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
3298         (WebCore::HTMLSelectElement::scrollToSelection):
3299         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
3300         (WebCore::HTMLSelectElement::selectOption):
3301         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
3302         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
3303         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3304         * html/HTMLSelectElementWin.cpp:
3305         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
3306         * page/mac/EventHandlerMac.mm:
3307         (WebCore::EventHandler::platformPrepareForWheelEvents):
3308         * rendering/InlineFlowBox.cpp:
3309         (WebCore::InlineFlowBox::addToLine):
3310         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
3311         * rendering/RenderCounter.cpp:
3312         (WebCore::planCounter):
3313         * rendering/RenderListBox.h:
3314         * rendering/RenderListItem.cpp:
3315         (WebCore::nextListItem):
3316         (WebCore::previousListItem):
3317         * rendering/RenderListItem.h:
3318         * rendering/RenderListMarker.h:
3319         * rendering/RenderMenuList.h:
3320         * rendering/RenderTreeAsText.cpp:
3321         (WebCore::markerTextForListItem):
3322         * rendering/TextAutoSizing.cpp:
3323         (WebCore::TextAutoSizingValue::adjustNodeSizes):
3324         * rendering/line/BreakingContextInlineHeaders.h:
3325         (WebCore::BreakingContext::handleReplaced):
3326         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
3327         * testing/Internals.cpp:
3328         (WebCore::Internals::isSelectPopupVisible):
3329
3330 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3331
3332         Use std::unique_ptr for CachedResource
3333         https://bugs.webkit.org/show_bug.cgi?id=137736
3334
3335         Reviewed by Darin Adler.
3336
3337         No new tests, no behavior change.
3338
3339         * loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
3340         (WebCore::CachedResource::removeClient):
3341         * loader/cache/CachedResource.h: Set ctor from private to public.
3342         (WebCore::CachedResource::CachedResourceCallback::schedule):
3343
3344 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3345
3346         Move TextCodec classes to std::unique_ptr
3347         https://bugs.webkit.org/show_bug.cgi?id=137738
3348
3349         Reviewed by Darin Adler.
3350
3351         Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
3352         To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
3353         related classes follow this change as well.
3354
3355         No new tests, no behavior change.
3356
3357         * html/parser/HTMLMetaCharsetParser.h:
3358         * loader/TextResourceDecoder.cpp:
3359         (WebCore::TextResourceDecoder::setEncoding):
3360         (WebCore::TextResourceDecoder::flush):
3361         * loader/TextResourceDecoder.h:
3362         * platform/text/TextCodec.h:
3363         * platform/text/TextCodecICU.cpp:
3364         (WebCore::TextCodecICU::create):
3365         * platform/text/TextCodecICU.h:
3366         * platform/text/TextCodecLatin1.cpp:
3367         (WebCore::newStreamingTextDecoderWindowsLatin1):
3368         * platform/text/TextCodecUTF16.cpp:
3369         (WebCore::newStreamingTextDecoderUTF16LE):
3370         (WebCore::newStreamingTextDecoderUTF16BE):
3371         * platform/text/TextCodecUTF8.cpp:
3372         (WebCore::TextCodecUTF8::create):
3373         * platform/text/TextCodecUTF8.h:
3374         * platform/text/TextCodecUserDefined.cpp:
3375         (WebCore::newStreamingTextDecoderUserDefined):
3376         * platform/text/TextEncodingRegistry.cpp:
3377         (WebCore::newTextCodec):
3378         * platform/text/TextEncodingRegistry.h:
3379         * platform/text/mac/TextCodecMac.cpp:
3380         (WebCore::newTextCodecMac):
3381
3382 2014-10-15  Dean Jackson  <dino@apple.com>
3383
3384         [Media] Reduce style updates (painting) in controls
3385         https://bugs.webkit.org/show_bug.cgi?id=137763
3386         <rdar://problem/17833045>
3387
3388         Reviewed by Simon Fraser.
3389
3390         Media controls were causing a lot of repaints they were
3391         constantly updating the style of the widgets, the value
3392         of the forms, or the text in the display.
3393
3394         This is necessary when the controls are visible, but not
3395         necessary when they are hidden. Return immediately in that case.
3396
3397         * Modules/mediacontrols/mediaControlsApple.js:
3398         (Controller.prototype.createControls): Initialise the slider to a zero value.
3399         (Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
3400         (Controller.prototype.updateProgress): Don't update if we're hidden.
3401         (Controller.prototype.updateTime): Ditto.
3402         * Modules/mediacontrols/mediaControlsiOS.js:
3403         (ControllerIOS.prototype.updateProgress): Ditto.
3404
3405 2014-10-15  Chris Dumez  <cdumez@apple.com>
3406
3407         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
3408         https://bugs.webkit.org/show_bug.cgi?id=137721
3409
3410         Reviewed by Darin Adler.
3411
3412         Follow-up patch to r174717 addressing review comments made after the patch landed:
3413         - Use modern C++ loop
3414         - Remove explicit calls to String(NSString*) constructor
3415
3416         No new tests, no new tests.
3417
3418         * platform/network/mac/ResourceResponseMac.mm:
3419         (WebCore::ResourceResponse::platformLazyInit):
3420
3421 2014-10-15  Chris Dumez  <cdumez@apple.com>
3422
3423         Use is<>() / downcast<>() for InlineBox subclasses
3424         https://bugs.webkit.org/show_bug.cgi?id=137749
3425
3426         Reviewed by Darin Adler.
3427
3428         Use is<>() / downcast<>() for InlineBox subclasses and clean up the
3429         surrounding code.
3430