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