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