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