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