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