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