d2478b46d50f95ad5d59d13ae2c683968679bfb8
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         [OS X] Migrate off of CTFontSetRenderingParameters()
4         https://bugs.webkit.org/show_bug.cgi?id=148113
5
6         Reviewed by Lucas Forschler.
7
8         Instead, use CTFontSetRenderingStyle().
9
10         No new tests because there is no behavior change.
11
12         * platform/spi/cocoa/CoreTextSPI.h:
13
14 2015-08-17  Alex Christensen  <achristensen@webkit.org>
15
16         Build Debug Suffix on Windows with CMake
17         https://bugs.webkit.org/show_bug.cgi?id=148083
18
19         Reviewed by Brent Fulgham.
20
21         * CMakeLists.txt:
22         * PlatformAppleWin.cmake:
23         * PlatformWin.cmake:
24         Add DEBUG_SUFFIX
25
26 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
27
28         Implement IntegerHasher
29         https://bugs.webkit.org/show_bug.cgi?id=147866
30
31         Reviewed by Darin Adler and Anders Carlsson.
32
33         Rename StringHasher.h to Hasher.
34
35         No new tests because there is no behavior difference.
36
37         * contentextensions/DFAMinimizer.cpp: Use new #include.
38         * contentextensions/HashableActionList.h: Ditto.
39         * platform/graphics/FontFeatureSettings.cpp:
40         (WebCore::FontFeatureSettings::hash): Use new IntegerHasher class.
41         (WebCore::FontFeature::hash): Deleted.
42         * platform/graphics/FontFeatureSettings.h: Remove unnecessary function.
43         * platform/graphics/Gradient.cpp: Use new #include.
44         * platform/graphics/WidthCache.h: Ditto.
45
46 2015-08-17  Chris Dumez  <cdumez@apple.com>
47
48         Log actual PageCache retrieval success rate using diagnostic logging
49         https://bugs.webkit.org/show_bug.cgi?id=147937
50
51         Reviewed by Antti Koivisto.
52
53         Log actual PageCache retrieval success rate using diagnostic logging.
54         Previously, we would only log how successful we are at saving entries
55         into the cache, which is not the most interesting metric.
56
57         * history/PageCache.cpp:
58         (WebCore::canCachePage):
59         * loader/FrameLoader.cpp:
60         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
61         * page/DiagnosticLoggingKeys.cpp:
62         (WebCore::DiagnosticLoggingKeys::canCacheKey):
63         * page/DiagnosticLoggingKeys.h:
64
65 2015-08-17  Alex Christensen  <achristensen@webkit.org>
66
67         Move some commands from ./CMakeLists.txt to Source/cmake
68         https://bugs.webkit.org/show_bug.cgi?id=148003
69
70         Reviewed by Brent Fulgham.
71
72         * CMakeLists.txt:
73         Added commands needed to build WebCore by itself.
74
75 2015-08-17  Alex Christensen  <achristensen@webkit.org>
76
77         Remove unused multisampling check
78         https://bugs.webkit.org/show_bug.cgi?id=148030
79
80         Reviewed by Dean Jackson.
81
82         No change in behavior.
83         Extensions3DOpenGLCommon.m_maySupportMultisampling is always true.
84
85         * platform/graphics/Extensions3D.h:
86         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
87         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
88         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
89         (WebCore::Extensions3DOpenGLCommon::isImagination):
90         (WebCore::Extensions3DOpenGLCommon::vendor):
91         (WebCore::Extensions3DOpenGLCommon::requiresBuiltInFunctionEmulation):
92         (WebCore::Extensions3DOpenGLCommon::requiresRestrictedMaximumTextureSize):
93         (WebCore::Extensions3DOpenGLCommon::maySupportMultisampling): Deleted.
94         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
95         (WebCore::GraphicsContext3D::validateDepthStencil):
96
97 2015-08-17  Andy Estes  <aestes@apple.com>
98
99         REGRESSION (r188486): Crash in SubresourceLoader::didReceiveResponse() when TemporaryChange goes out of scope
100         https://bugs.webkit.org/show_bug.cgi?id=148082
101
102         Reviewed by Alexey Proskuryakov.
103
104         Covered by existing tests run under ASan or Guard Malloc.
105
106         * loader/SubresourceLoader.cpp:
107         (WebCore::SubresourceLoader::didReceiveResponse): Ensure that callingDidReceiveResponse is destroyed while the
108         SubresourceLoader is still alive by declaring it after protect.
109
110 2015-08-17  Simon Fraser  <simon.fraser@apple.com>
111
112         will-change should sometimes trigger compositing
113         https://bugs.webkit.org/show_bug.cgi?id=148072
114
115         Reviewed by Tim Horton.
116         
117         Implement the compositing side-effects of will-change, if any of the
118         following properties are specified:
119             opacity
120             filter (as -webkit-filter)
121             backdrop-filter (as -webkit-backdrop-filter)
122             transform (on transformable elements only)
123
124         Tests: compositing/layer-creation/will-change-change.html
125                compositing/layer-creation/will-change-layer-creation.html
126
127         * inspector/InspectorLayerTreeAgent.cpp:
128         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): Tell the inspector
129         about will-change.
130         * rendering/RenderElement.cpp:
131         (WebCore::RenderElement::adjustStyleDifference): Need to trigger a recomposite if
132         will-change includes a compositing trigger property. This gets called before and
133         after setting the style, so this checks both states.
134         (WebCore::RenderElement::shouldWillChangeCreateStackingContext):
135         * rendering/RenderElement.h:
136         (WebCore::RenderElement::willChangeCreatesStackingContext): Helper function that
137         RenderInline uses to determine if it needs to create a RenderLayer, since RenderInline
138         doesn't get automatic layer RenderLayers as a side effect of having non-auto z-index
139         in the style.
140         * rendering/RenderInline.h: Need to trigger a RenderLayer if will-change includes
141         a property that applies to inlines.
142         * rendering/RenderLayerCompositor.cpp:
143         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Call requiresCompositingForWillChange().
144         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Call requiresCompositingForWillChange().
145         (WebCore::RenderLayerCompositor::reasonsForCompositing): Include requiresCompositingForWillChange().
146         (WebCore::RenderLayerCompositor::requiresCompositingForWillChange): If will-change contains a
147         property that would trigger compositing on this element, return true.
148         * rendering/RenderLayerCompositor.h:
149         * rendering/style/RenderStyle.cpp:
150         (WebCore::RenderStyle::changeRequiresLayout): Set ContextSensitivePropertyWillChange in
151         changedContextSensitiveProperties if will-change changes.
152         * rendering/style/RenderStyle.h: Rename for clarity.
153         * rendering/style/RenderStyleConstants.h: Add ContextSensitivePropertyWillChange.
154         * rendering/style/WillChangeData.cpp:
155         (WebCore::propertyCreatesStackingContext): Subset of properties that create stacking
156         context on any element.
157         (WebCore::propertyCreatesStackingContextOnBoxesOnly): Additional properties that
158         create stacking context on boxes.
159         (WebCore::propertyTriggersCompositing): Properties that trigger compositing on
160         any element.
161         (WebCore::propertyTriggersCompositingOnBoxesOnly): Additional properties that
162         trigger compositing on boxes.
163         (WebCore::WillChangeData::addFeature): As features are added, manage a set of
164         flags to know if they trigger stacking context or compositing, on inlines and boxes.
165         (WebCore::WillChangeData::createsStackingContext): Deleted.
166         * rendering/style/WillChangeData.h:
167         (WebCore::WillChangeData::canCreateStackingContext):
168         (WebCore::WillChangeData::canCreateStackingContextOnInline):
169         (WebCore::WillChangeData::canTriggerCompositing):
170         (WebCore::WillChangeData::canTriggerCompositingOnInline):
171
172 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
173
174         Holes for find matches that span multiple lines are completely wrong
175         https://bugs.webkit.org/show_bug.cgi?id=148065
176         <rdar://problem/5305002>
177
178         Reviewed by Simon Fraser.
179
180         Test: fast/text/mark-matches-broken-line-rendering.html
181
182         Two big problems with find holes:
183             - RenderedDocumentMarker only has one rect, but a marker can be painted
184               by multiple text runs, each with their own rendered rect
185             - paintTextMatchMarker does std::max((unsigned)a, (unsigned)0), which is
186               obviously an overflow problem/not going to work if a is negative
187
188         The combination of these issues causes the holes for find matches to be
189         very broken: text that isn't part of the match is highlighted, and some
190         text that is part of the match isn't highlighted.
191
192         To fix, make RenderedDocumentMarker support multiple rects, and use signed
193         math (like paintDocumentMarker already did) when computing positions in paintTextMatchMarker.
194
195         * dom/DocumentMarkerController.cpp:
196         (WebCore::DocumentMarkerController::addTextMatchMarker):
197         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
198         * dom/RenderedDocumentMarker.h:
199         (WebCore::RenderedDocumentMarker::RenderedDocumentMarker):
200         (WebCore::RenderedDocumentMarker::isRendered):
201         (WebCore::RenderedDocumentMarker::contains):
202         (WebCore::RenderedDocumentMarker::addRenderedRect):
203         (WebCore::RenderedDocumentMarker::renderedRects):
204         (WebCore::RenderedDocumentMarker::invalidate):
205         (WebCore::RenderedDocumentMarker::setRenderedRect): Deleted.
206         (WebCore::RenderedDocumentMarker::renderedRect): Deleted.
207         (WebCore::RenderedDocumentMarker::invalidMarkerRect): Deleted.
208         * rendering/InlineTextBox.cpp:
209         (WebCore::InlineTextBox::paintDocumentMarker):
210         (WebCore::InlineTextBox::paintTextMatchMarker):
211         (WebCore::InlineTextBox::computeRectForReplacementMarker):
212         * rendering/svg/SVGInlineFlowBox.cpp:
213         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
214
215 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
216
217         Adopt shrink-wrapping for TextIndicators on Mac
218         https://bugs.webkit.org/show_bug.cgi?id=148064
219
220         Reviewed by Beth Dakin.
221
222         Instead of indicating the bounding rect when there are multiple text rects,
223         use shrink-wrapping for TextIndicatorWindow (on Mac), like we do on iOS.
224
225         * bindings/objc/DOM.mm:
226         (-[DOMNode getPreviewSnapshotImage:andRects:]):
227         Make getPreviewSnapshotImage use the same options that iOS WebKit2 uses.
228         This fixes a regression from r188420 where iOS WebKit1 TextIndicators lost
229         all of the relevant (previously hardcoded inside TextIndicator) options.
230
231         * page/TextIndicator.cpp:
232         (WebCore::TextIndicator::createWithRange):
233         (WebCore::TextIndicator::createWithSelectionInFrame):
234         (WebCore::initializeIndicator):
235         Don't keep indicatesCurrentSelection in TextIndicatorData. Instead,
236         just pass it through to initializeIndicator. Add a flag which stops us
237         from zeroing out the margin if indicatesCurrentSelection is true.
238         Move default margins into TextIndicator so they can be applied to the stored rects
239         just like on iOS, instead of trying to apply them later like we used to on Mac.
240
241         * page/TextIndicator.h:
242         (WebCore::TextIndicator::indicatesCurrentSelection): Deleted.
243         * page/mac/TextIndicatorWindow.h:
244         * page/mac/TextIndicatorWindow.mm:
245         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
246         (WebCore::TextIndicatorWindow::setTextIndicator):
247         (outsetIndicatorRectIncludingShadow): Deleted.
248         (textIndicatorsForTextRectsOverlap): Deleted.
249         Make use of pathsWithShrinkWrappedRects for TextIndicatorWindow, instead
250         of just smushing all intersecting rects together. Use the computed path
251         for the shadows and to mask the yellow highlight and snapshot layer.
252
253         * platform/graphics/PathUtilities.cpp:
254         (WebCore::PathUtilities::pathsWithShrinkWrappedRects):
255         (WebCore::PathUtilities::pathWithShrinkWrappedRects):
256         * platform/graphics/PathUtilities.h:
257         Make it possible to retrieve each non-intersecting path individually, instead
258         of just a single giant Path, so that TextIndicatorWindow can make separate
259         layers for each one (so they can bounce separately).
260
261 2015-08-17  Simon Fraser  <simon.fraser@apple.com>
262
263         Remove some includes from Node.cpp
264         https://bugs.webkit.org/show_bug.cgi?id=148000
265
266         Reviewed by Anders Carlsson.
267
268         No need for these includes.
269
270         * dom/Node.cpp:
271
272 2015-08-17  Chris Dumez  <cdumez@apple.com>
273
274         Accessing HTMLCollection.length is slow
275         https://bugs.webkit.org/show_bug.cgi?id=148039
276
277         Reviewed by Ryosuke Niwa.
278
279         Accessing was HTMLCollection.length is slow, much slower than accessing
280         NodeList.length. The reason is that HTMLCollection's bindings code is
281         slightly different. In particular, HTMLCollection's GetOwnPropertySlot()
282         has an extra check to see if the PropertyName is available on the
283         prototype before doing:
284         1. Check static properties (getStaticValueSlotEntryWithoutCaching())
285         2. Indexed getter
286         3. Named getter
287         4. Check own properties (getStaticValueSlot())
288
289         This means that everytime the JavaScript was accessing HTMLCollection.length
290         or HTMLCollection[index], we would check if length / index was present on the
291         prototype before calling HTMLCollection::length() / HTMLCollection::item(i).
292         The prototype check is fairly expensive and was making traversing an
293         HTMLCollection much slower than traversing a NodeList.
294
295         In this patch, I refactored GetOwnPropertySlot() to do:
296         1. Indexed getter
297         2. Check static properties
298         3. Prototype check
299         4. Named getter
300         5. Check own properties
301
302         This way, the prototype check is no longer slowing down HTMLCollection
303         traversal. What matters is that we do the prototype check *before* calling
304         the named getter as we don't want named properties to mask properties on
305         the prototype.
306
307         Note that this patch takes the minimal approach to get the performance win
308         while limiting the risk of breakage. Indeed, the current behavior still
309         does not match the WebIDL specification, which seems to indicate the order
310         should be:
311         1. Indexed getter
312         2. Check static / own properties
313         3. Prototype check
314         4. Named getter
315
316         Once we match the specification, I believe we will be able to drop the
317         JSC::HasImpureGetOwnPropertySlot flag on HTMLCollection, which currently
318         makes HTMLCollection.length not cacheable. Right now, I believe we still
319         need this flag because named properties can still mask own properties.
320
321         Performance:
322         /Bindings/childNodes-traversal: 5597.54 +/- 0.7% -> 5572.10 +/- 0.4%
323         /Bindings/children-traversal: 3852.61 +/- 0.3% -> 4731.03 +/- 0.3% (~23% better)
324
325         Test: fast/dom/htmlcollection-getownproperty.html
326
327         * bindings/scripts/CodeGeneratorJS.pm:
328         (GenerateGetOwnPropertySlotBody):
329         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
330         (WebCore::JSTestEventTarget::getOwnPropertySlot):
331
332 2015-08-17  Jinyoung Hur  <hur.ims@navercorp.com>
333
334         Fix possible EGL and GLX makeCurrent problem of GLPlatformContext and GLPlatformSurface
335         https://bugs.webkit.org/show_bug.cgi?id=147695
336
337         Reviewed by Gyuyoung Kim.
338
339         GLPLatformContext::makeCurrent is implemented to do no-op when it thinks, comparing with a static
340         variable declared in GLPlatformContext.cpp, there is no changes. This can lead to not-working 
341         makeCurrent when other part of codes, e.g., Cairo-gl, change EGL or GLX current context by calling
342         something like eglMakeCurrent. So modify GLPLatformContext::makeCurrent to use the return value of
343         eglGetCurrentContext or glXGetCurrentContext as a comparing target rather than a static variable.
344         In addition, GLPlatformSurface::isCurrentDrawable is also modified to use eglGetCurrentSurface or
345         glXGetCurrentDrawable rather than a static variable.
346
347         There are no tests because already existing GL tests will verify this change.
348
349         * platform/graphics/opengl/GLPlatformContext.cpp:
350         (WebCore::GLPlatformContext::makeCurrent):
351         (WebCore::GLPlatformContext::releaseCurrent):
352         (WebCore::GLCurrentContextWrapper::GLCurrentContextWrapper): Deleted.
353         (WebCore::GLPlatformContext::~GLPlatformContext): Deleted.
354         (WebCore::GLPlatformContext::isCurrentContext): Deleted.
355         (WebCore::GLPlatformContext::getCurrent): Deleted.
356         * platform/graphics/opengl/GLPlatformContext.h:
357         * platform/graphics/opengl/GLPlatformSurface.cpp:
358         (WebCore::GLPlatformSurface::~GLPlatformSurface): Deleted.
359         (WebCore::GLPlatformSurface::isCurrentDrawable): Deleted.
360         (WebCore::GLPlatformSurface::onMakeCurrent): Deleted.
361         (WebCore::GLPlatformSurface::destroy): Deleted.
362         * platform/graphics/opengl/GLPlatformSurface.h:
363         * platform/graphics/surfaces/egl/EGLSurface.cpp:
364         (WebCore::EGLTransportSurface::isCurrentDrawable):
365         (WebCore::EGLOffScreenSurface::isCurrentDrawable):
366         * platform/graphics/surfaces/egl/EGLSurface.h:
367         * platform/graphics/surfaces/glx/GLXSurface.cpp:
368         (WebCore::GLXTransportSurface::isCurrentContext):
369         (WebCore::GLXOffScreenSurface::isCurrentContext):
370         * platform/graphics/surfaces/glx/GLXSurface.h:
371
372 2015-08-15  Chris Dumez  <cdumez@apple.com>
373
374         Refactor HTMLCollection to be as fast as CachedLiveNodeList
375         https://bugs.webkit.org/show_bug.cgi?id=147979
376
377         Reviewed by Ryosuke Niwa and Antti Koivisto.
378
379         Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
380         preparation of having getElementsByTagName*() / getElementsByClassName()
381         return an HTMLCollection instead of a NodeList, as per the
382         specification. Chrome and Firefox already match the specification in
383         this case.
384
385         Traversing an HTMLCollection was slow because of all the extra
386         branching it had compared to CachedLiveNodeList. To address the issue,
387         this patch introduces a new templated CachedHTMLCollection subclass,
388         which behaves in a similar way as CachedLiveNodeList. The 2 template
389         parameters are:
390         1. The type of the subclass of CachedHTMLCollection, so we can call
391            elementMatches() directly on the subclass, without needed any
392            virtual function call or switch statement. This is the same approach
393            as in CachedLiveNodeList.
394         2. The type of tree traversal used (Descendants, ChildrenOnly,
395            CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to
396            support these 3 types of tree traversal. These were causing extra
397            branching for every item() call. We are now able to choose the right
398            type of traversal for the CachedHTMLCollection at compile time.
399
400         * WebCore.xcodeproj/project.pbxproj:
401         Add new files to the Project.
402
403         * dom/ContainerNode.cpp:
404         (WebCore::ContainerNode::children):
405         (WebCore::ContainerNode::cachedHTMLCollection): Deleted.
406         * dom/ContainerNode.h:
407         Drop ContainerNode::ensureCachedHTMLCollection() and use
408         NodeListsNodeData::addCachedCollection() directly at call sites
409         instead. We need access to the CollectionType at build-time so
410         we can resolve the CollectionTraversalType parameter for the
411         GenericCachedHTMLCollection using CollectionTypeTraits.
412
413         * dom/Document.cpp:
414         * dom/Document.h:
415         Update ensureCachedCollection() so the CollectionType is now a template
416         parameter instead of a method argument. We need to know the
417         CollectionType at build time to construct the GenericCachedHTMLCollection.
418
419         * dom/ElementChildIterator.h:
420         (WebCore::ElementChildIterator<ElementType>::operator):
421         (WebCore::ElementChildConstIterator<ElementType>::operator):
422         Add support for decrementing an ElementChildIterator, for consistency
423         with ElementDescendantIterator. We need this to support backward
424         traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
425         of traversal.
426
427         * dom/LiveNodeList.h:
428         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
429         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
430         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
431         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
432         Move traversal implementation to CollectionTraversal.h, so it can be
433         shared with achedHTMLCollection.h.
434
435         * html/CachedHTMLCollection.h: Added.
436         (WebCore::traversalType>::CachedHTMLCollection):
437         (WebCore::traversalType>::~CachedHTMLCollection):
438         (WebCore::traversalType>::CachedHTMLCollection::memoryCost):
439         (WebCore::traversalType>::collectionCanTraverseBackward):
440         (WebCore::traversalType>::collectionTraverseForward):
441         (WebCore::traversalType>::collectionTraverseBackward):
442         (WebCore::traversalType>::willValidateIndexCache):
443         (WebCore::traversalType>::length):
444         (WebCore::traversalType>::item):
445         (WebCore::traversalType>::invalidateCache):
446         (WebCore::traversalType>::elementMatches):
447         (WebCore::nameShouldBeVisibleInDocumentAll):
448         (WebCore::traversalType>::namedItem):
449
450         * html/CollectionTraversal.h: Added.
451         Add new template class that provide the collection traversal code
452         needed by CollectionIndexCache. It has template specializations for
453         all 3 types of traversal: Descendants, ChildrenOnly, and
454         CustomForwardOnly.
455
456         * html/CollectionType.h:
457         Add CollectionTypeTraits traits so we can resolve the
458         CollectionTraversalType used by a specific CollectionType at
459         compile-time. This is needed for the second template parameter of
460         CachedHTMLCollection.
461
462         * html/GenericCachedHTMLCollection.cpp: Added.
463         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
464         * html/GenericCachedHTMLCollection.h: Added.
465         Add CachedHTMLCollection subclass is the generic one used for all
466         CollectionTypes that do not have their own subclass (e.g. NodeChildren).
467         This has an elementMatches() method with a switch() statement handling
468         all these CollectionTypes. Those are not normally not performance
469         sensitive.
470
471         * html/HTMLAllCollection.cpp:
472         (WebCore::HTMLAllCollection::HTMLAllCollection):
473         * html/HTMLAllCollection.h:
474         Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
475         an elementMatches() method that simply returns true as we want to
476         match all elements.
477
478         * html/HTMLCollection.cpp:
479         (WebCore::HTMLCollection::HTMLCollection):
480         Move CollectionIndexCache member to the subclass and drop the 2 other
481         members as they are replaced with the CollectionTraversalType template
482         parameter of CachedHTMLCollection.
483
484         (WebCore::HTMLCollection::~HTMLCollection):
485         Move Document::unregisterCollection() call to ~CachedHTMLCollection()
486         as we needed to check if the CollectionIndexCache was valid first.
487
488         (WebCore::HTMLCollection::updateNamedElementCache):
489         Move part of the implementation to the CachedHTMLCollection subclass
490         as it needs to know about the type of traversal and it needs to be
491         able to call elementMatches().
492
493         * html/HTMLCollection.h:
494         (WebCore::HTMLCollection::rootNode):
495         Inline for performance reasons and consistency with CachedLiveNodeList.
496
497         (WebCore::HTMLCollection::memoryCost):
498         Make virtual and move part of the implementation to the
499         CachedHTMLCollection subclass to compute the cost of the
500         CollectionIndexCache.
501
502         (WebCore::HTMLCollection::invalidateCache):
503         Move part of the implementation to the subclass to invalidate the
504         CollectionIndexCache.
505
506         * html/HTMLFieldSetElement.cpp:
507         (WebCore::HTMLFieldSetElement::elements):
508
509         * html/HTMLFormControlsCollection.cpp:
510         * html/HTMLFormControlsCollection.h:
511         Subclass CachedHTMLCollection instead of HTMLCollection.
512         customElementAfter() no longer needs to be virtual as it
513         is called directly by CachedHTMLCollection on the subclass.
514
515         * html/HTMLFormElement.cpp:
516         (WebCore::HTMLFormElement::elements):
517         * html/HTMLMapElement.cpp:
518         (WebCore::HTMLMapElement::areas):
519         Call NodeListsNodeData::addCachedCollection() directly.
520
521         * html/HTMLNameCollection.cpp:
522         * html/HTMLNameCollection.h:
523         Subclass CachedHTMLCollection instead of HTMLCollection.
524
525         * html/HTMLOptionsCollection.cpp:
526         * html/HTMLOptionsCollection.h:
527         Subclass CachedHTMLCollection instead of HTMLCollection.
528
529         * html/HTMLSelectElement.cpp:
530         (WebCore::HTMLSelectElement::selectedOptions):
531         (WebCore::HTMLSelectElement::options):
532         * html/HTMLTableElement.cpp:
533         (WebCore::HTMLTableElement::rows):
534         (WebCore::HTMLTableElement::tBodies):
535         * html/HTMLTableRowElement.cpp:
536         (WebCore::HTMLTableRowElement::cells):
537         Call NodeListsNodeData::addCachedCollection() directly.
538
539         * html/HTMLTableRowsCollection.cpp:
540         * html/HTMLTableRowsCollection.h:
541         Subclass CachedHTMLCollection instead of HTMLCollection.
542         customElementAfter() no longer needs to be virtual as it
543         is called directly by CachedHTMLCollection on the subclass.
544
545         * html/HTMLTableSectionElement.cpp:
546         (WebCore::HTMLTableSectionElement::rows):
547         Call NodeListsNodeData::addCachedCollection() directly.
548
549 2015-08-15  Timothy Horton  <timothy_horton@apple.com>
550
551         REGRESSION (r168327): ImageDocuments with margins zoom to the wrong position when clicked
552         https://bugs.webkit.org/show_bug.cgi?id=148063
553
554         Reviewed by Simon Fraser.
555
556         No new test because it doesn't seem possible to click on a window.open'd ImageDocument.
557
558         * html/ImageDocument.cpp:
559         (WebCore::ImageEventListener::handleEvent):
560         Use <img>-relative coordinates, not document-relative coordinates,
561         because after r168327, the image can be centered.
562
563 2015-08-15  Simon Fraser  <simon.fraser@apple.com>
564
565         Have will-change create stacking context when necessary
566         https://bugs.webkit.org/show_bug.cgi?id=148060
567
568         Reviewed by Zalan Bujtas.
569         
570         If will-change includes a property whose non-initial value can create
571         stacking context, create stacking context for that element.
572
573         Test: fast/css/will-change/will-change-creates-stacking-context.html
574
575         * css/StyleResolver.cpp:
576         (WebCore::StyleResolver::adjustRenderStyle):
577         * rendering/style/RenderStyle.h: Add willChangeCreatesStackingContext(),
578         which on most cases is a fast, inlined 'return false'. Otherwise ask
579         the WillChangeData.
580         * rendering/style/WillChangeData.cpp:
581         (WebCore::propertyCreatesStackingContext):
582         (WebCore::WillChangeData::createsStackingContext):
583         * rendering/style/WillChangeData.h:
584
585 2015-08-15  Commit Queue  <commit-queue@webkit.org>
586
587         Unreviewed, rolling out r188508.
588         https://bugs.webkit.org/show_bug.cgi?id=148058
589
590         Caused 10 tests to crash (Requested by smfr on #webkit).
591
592         Reverted changeset:
593
594         "Refactor HTMLCollection to be as fast as CachedLiveNodeList"
595         https://bugs.webkit.org/show_bug.cgi?id=147979
596         http://trac.webkit.org/changeset/188508
597
598 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
599
600         Implement parsing for CSS will-change
601         https://bugs.webkit.org/show_bug.cgi?id=148052
602
603         Reviewed by Dean Jackson.
604         
605         Syntax is
606             will-change: auto | <animateable-feature>#
607         where
608             <animateable-feature> = scroll-position | contents | <custom-ident>
609             
610         To support this, add WillChangeData which stores a vector of "feature"
611         and CSS property squished into 16 bits. This is stored in rareNonInheritedData.
612         If null or an empty list, the property value is 'auto'. The list preserves
613         unknown properties.
614
615         Test: fast/css/will-change-parsing.html
616
617         * CMakeLists.txt:
618         * WebCore.vcxproj/WebCore.vcxproj:
619         * WebCore.vcxproj/WebCore.vcxproj.filters:
620         * WebCore.xcodeproj/project.pbxproj:
621         * css/CSSComputedStyleDeclaration.cpp:
622         (WebCore::getWillChangePropertyValue):
623         (WebCore::ComputedStyleExtractor::propertyValue):
624         * css/CSSParser.cpp:
625         (WebCore::CSSParser::parseValue):
626         (WebCore::isValidGridPositionCustomIdent): Renamed from isValidCustomIdent(),
627         since it's grid-specific.
628         (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
629         (WebCore::valueIsCSSKeyword): Returns true for the "CSS-wide" keywords like
630         "initial", "inherit" and "default".
631         (WebCore::CSSParser::parseFontFamily):
632         (WebCore::isValidWillChangeAnimatableFeature):
633         (WebCore::CSSParser::parseWillChange):
634         (WebCore::isValidCustomIdent): Deleted.
635         * css/CSSParser.h:
636         * css/CSSPrimitiveValue.h:
637         (WebCore::CSSPrimitiveValue::isPropertyID): New utility function.
638         * css/CSSPropertyNames.in:
639         * css/CSSValueKeywords.in:
640         * css/StyleBuilderCustom.h:
641         (WebCore::StyleBuilderCustom::applyValueWillChange):
642         * rendering/style/RenderStyle.cpp:
643         (WebCore::RenderStyle::setWillChange):
644         * rendering/style/RenderStyle.h:
645         * rendering/style/StyleAllInOne.cpp:
646         * rendering/style/StyleRareNonInheritedData.cpp:
647         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
648         (WebCore::StyleRareNonInheritedData::operator==):
649         (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent):
650         * rendering/style/StyleRareNonInheritedData.h:
651         * rendering/style/WillChangeData.cpp: Added.
652         (WebCore::WillChangeData::operator==):
653         (WebCore::WillChangeData::containsScrollPosition):
654         (WebCore::WillChangeData::containsContents):
655         (WebCore::WillChangeData::containsProperty):
656         (WebCore::WillChangeData::addFeature):
657         (WebCore::WillChangeData::featureAt):
658         * rendering/style/WillChangeData.h: Added.
659         (WebCore::WillChangeData::create):
660         (WebCore::WillChangeData::operator!=):
661         (WebCore::WillChangeData::isAuto):
662         (WebCore::WillChangeData::numFeatures):
663         (WebCore::WillChangeData::WillChangeData):
664         (WebCore::WillChangeData::AnimatableFeature::feature):
665         (WebCore::WillChangeData::AnimatableFeature::property):
666         (WebCore::WillChangeData::AnimatableFeature::featurePropertyPair):
667         (WebCore::WillChangeData::AnimatableFeature::AnimatableFeature):
668         (WebCore::WillChangeData::AnimatableFeature::operator==):
669
670 2015-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
671
672         Build fix after r188510
673
674         * platform/mac/ThemeMac.mm:
675         (WebCore::paintToggleButton): Pass a raw pointer to drawCellOrFocusRingWithViewIntoContext.
676
677 2015-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
678
679         Search fields should scale when rendering while zoomed
680         https://bugs.webkit.org/show_bug.cgi?id=147867
681
682         Reviewed by Daniel Bates.
683
684         When rendering zoomed search fields, draw to an image buffer instead of drawing directly into the context. This
685         allows us to scale the image buffer up before rendering. Also refactors common logic used to draw both selects
686         (paintMenuList) and search fields into the new private method paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
687
688         * rendering/RenderThemeMac.h: Changed drawCellOrFocusRingWithViewIntoContext to take a raw pointer.
689         * rendering/RenderThemeMac.mm:
690         (WebCore::paintToggleButton): Passes a raw pointer to drawCellOrFocusRingWithViewIntoContext.
691         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Changed to take a raw pointer.
692         * rendering/RenderThemeMac.h:
693         * rendering/RenderThemeMac.mm:
694         (WebCore::RenderThemeMac::paintMenuList): Refactored to use paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
695         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Contains logic common to painting
696             both selects and search fields.
697         (WebCore::RenderThemeMac::paintSearchField): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
698             to render search fields, utilizing an offscreen image buffer only when necessary.
699
700 2015-08-14  Chris Dumez  <cdumez@apple.com>
701
702         Refactor HTMLCollection to be as fast as CachedLiveNodeList
703         https://bugs.webkit.org/show_bug.cgi?id=147979
704
705         Reviewed by Ryosuke Niwa.
706
707         Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
708         preparation of having getElementsByTagName*() / getElementsByClassName()
709         return an HTMLCollection instead of a NodeList, as per the
710         specification. Chrome and Firefox already match the specification in
711         this case.
712
713         Traversing an HTMLCollection was slow because of all the extra
714         branching it had compared to CachedLiveNodeList. To address the issue,
715         this patch introduces a new templated CachedHTMLCollection subclass,
716         which behaves in a similar way as CachedLiveNodeList. The 2 template
717         parameters are:
718         1. The type of the subclass of CachedHTMLCollection, so we can call
719            elementMatches() directly on the subclass, without needed any
720            virtual function call or switch statement. This is the same approach
721            as in CachedLiveNodeList.
722         2. The type of tree traversal used (Descendants, ChildrenOnly,
723            CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to
724            support these 3 types of tree traversal. These were causing extra
725            branching for every item() call. We are now able to choose the right
726            type of traversal for the CachedHTMLCollection at compile time.
727
728         * WebCore.xcodeproj/project.pbxproj:
729         Add new files to the Project.
730
731         * dom/ContainerNode.cpp:
732         (WebCore::ContainerNode::children):
733         (WebCore::ContainerNode::cachedHTMLCollection): Deleted.
734         * dom/ContainerNode.h:
735         Drop ContainerNode::ensureCachedHTMLCollection() and use
736         NodeListsNodeData::addCachedCollection() directly at call sites
737         instead. We need access to the CollectionType at build-time so
738         we can resolve the CollectionTraversalType parameter for the
739         GenericCachedHTMLCollection using CollectionTypeTraits.
740
741         * dom/Document.cpp:
742         * dom/Document.h:
743         Update ensureCachedCollection() so the CollectionType is now a template
744         parameter instead of a method argument. We need to know the
745         CollectionType at build time to construct the GenericCachedHTMLCollection.
746
747         * dom/ElementChildIterator.h:
748         (WebCore::ElementChildIterator<ElementType>::operator):
749         (WebCore::ElementChildConstIterator<ElementType>::operator):
750         Add support for decrementing an ElementChildIterator, for consistency
751         with ElementDescendantIterator. We need this to support backward
752         traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
753         of traversal.
754
755         * dom/LiveNodeList.h:
756         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
757         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
758         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
759         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
760         Move traversal implementation to CollectionTraversal.h, so it can be
761         shared with achedHTMLCollection.h.
762
763         * html/CachedHTMLCollection.h: Added.
764         (WebCore::traversalType>::CachedHTMLCollection):
765         (WebCore::traversalType>::~CachedHTMLCollection):
766         (WebCore::traversalType>::CachedHTMLCollection::memoryCost):
767         (WebCore::traversalType>::collectionCanTraverseBackward):
768         (WebCore::traversalType>::collectionTraverseForward):
769         (WebCore::traversalType>::collectionTraverseBackward):
770         (WebCore::traversalType>::willValidateIndexCache):
771         (WebCore::traversalType>::length):
772         (WebCore::traversalType>::item):
773         (WebCore::traversalType>::invalidateCache):
774         (WebCore::traversalType>::elementMatches):
775         (WebCore::nameShouldBeVisibleInDocumentAll):
776         (WebCore::traversalType>::namedItem):
777
778         * html/CollectionTraversal.h: Added.
779         Add new template class that provide the collection traversal code
780         needed by CollectionIndexCache. It has template specializations for
781         all 3 types of traversal: Descendants, ChildrenOnly, and
782         CustomForwardOnly.
783
784         * html/CollectionType.h:
785         Add CollectionTypeTraits traits so we can resolve the
786         CollectionTraversalType used by a specific CollectionType at
787         compile-time. This is needed for the second template parameter of
788         CachedHTMLCollection.
789
790         * html/GenericCachedHTMLCollection.cpp: Added.
791         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
792         * html/GenericCachedHTMLCollection.h: Added.
793         Add CachedHTMLCollection subclass is the generic one used for all
794         CollectionTypes that do not have their own subclass (e.g. NodeChildren).
795         This has an elementMatches() method with a switch() statement handling
796         all these CollectionTypes. Those are not normally not performance
797         sensitive.
798
799         * html/HTMLAllCollection.cpp:
800         (WebCore::HTMLAllCollection::HTMLAllCollection):
801         * html/HTMLAllCollection.h:
802         Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
803         an elementMatches() method that simply returns true as we want to
804         match all elements.
805
806         * html/HTMLCollection.cpp:
807         (WebCore::HTMLCollection::HTMLCollection):
808         Move CollectionIndexCache member to the subclass and drop the 2 other
809         members as they are replaced with the CollectionTraversalType template
810         parameter of CachedHTMLCollection.
811
812         (WebCore::HTMLCollection::~HTMLCollection):
813         Move Document::unregisterCollection() call to ~CachedHTMLCollection()
814         as we needed to check if the CollectionIndexCache was valid first.
815
816         (WebCore::HTMLCollection::updateNamedElementCache):
817         Move part of the implementation to the CachedHTMLCollection subclass
818         as it needs to know about the type of traversal and it needs to be
819         able to call elementMatches().
820
821         * html/HTMLCollection.h:
822         (WebCore::HTMLCollection::rootNode):
823         Inline for performance reasons and consistency with CachedLiveNodeList.
824
825         (WebCore::HTMLCollection::memoryCost):
826         Make virtual and move part of the implementation to the
827         CachedHTMLCollection subclass to compute the cost of the
828         CollectionIndexCache.
829
830         (WebCore::HTMLCollection::invalidateCache):
831         Move part of the implementation to the subclass to invalidate the
832         CollectionIndexCache.
833
834         * html/HTMLFieldSetElement.cpp:
835         (WebCore::HTMLFieldSetElement::elements):
836
837         * html/HTMLFormControlsCollection.cpp:
838         * html/HTMLFormControlsCollection.h:
839         Subclass CachedHTMLCollection instead of HTMLCollection.
840         customElementAfter() no longer needs to be virtual as it
841         is called directly by CachedHTMLCollection on the subclass.
842
843         * html/HTMLFormElement.cpp:
844         (WebCore::HTMLFormElement::elements):
845         * html/HTMLMapElement.cpp:
846         (WebCore::HTMLMapElement::areas):
847         Call NodeListsNodeData::addCachedCollection() directly.
848
849         * html/HTMLNameCollection.cpp:
850         * html/HTMLNameCollection.h:
851         Subclass CachedHTMLCollection instead of HTMLCollection.
852
853         * html/HTMLOptionsCollection.cpp:
854         * html/HTMLOptionsCollection.h:
855         Subclass CachedHTMLCollection instead of HTMLCollection.
856
857         * html/HTMLSelectElement.cpp:
858         (WebCore::HTMLSelectElement::selectedOptions):
859         (WebCore::HTMLSelectElement::options):
860         * html/HTMLTableElement.cpp:
861         (WebCore::HTMLTableElement::rows):
862         (WebCore::HTMLTableElement::tBodies):
863         * html/HTMLTableRowElement.cpp:
864         (WebCore::HTMLTableRowElement::cells):
865         Call NodeListsNodeData::addCachedCollection() directly.
866
867         * html/HTMLTableRowsCollection.cpp:
868         * html/HTMLTableRowsCollection.h:
869         Subclass CachedHTMLCollection instead of HTMLCollection.
870         customElementAfter() no longer needs to be virtual as it
871         is called directly by CachedHTMLCollection on the subclass.
872
873         * html/HTMLTableSectionElement.cpp:
874         (WebCore::HTMLTableSectionElement::rows):
875         Call NodeListsNodeData::addCachedCollection() directly.
876
877 2015-08-14  Matthew Daiter  <mdaiter@apple.com>
878
879         Implementing enumerateDevices
880         https://bugs.webkit.org/show_bug.cgi?id=146426
881         <rdar://problem/21599847>
882
883         Reviewed by Eric Carlson.
884
885         * CMakeLists.txt:
886         * Modules/mediastream/MediaDeviceInfo.idl:
887         * Modules/mediastream/UserMediaRequest.cpp:
888         (WebCore::UserMediaRequest::enumerateDevices):
889         * WebCore.xcodeproj/project.pbxproj:
890         * platform/mediastream/MediaDevicesPrivate.cpp:
891         (WebCore::MediaDevicesPrivate::create):
892         (WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
893         (WebCore::MediaDevicesPrivate::didCompleteRequest):
894         (WebCore::MediaDevicesPrivate::availableMediaDevices):
895         * platform/mediastream/MediaDevicesPrivate.h:
896         (WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
897         (WebCore::MediaDevicesPrivate::capturedDevices):
898
899 2015-08-13  Andy Estes  <aestes@apple.com>
900
901         [Cocoa] Downloads do not start if policy decision is made asynchronously
902         https://bugs.webkit.org/show_bug.cgi?id=147985
903
904         Reviewed by Brady Eidson.
905
906         It's only possible to convert a NSURLConnection to a download while the connection delegate's
907         -connection:didReceiveResponse: is being called. However, WebKit clients can decide content policy
908         asynchronously. If a client chooses to download a response asynchronously, we can no longer convert the
909         connection to a download, so we should start a new download instead.
910
911         New API test: _WKDownload.AsynchronousDownloadPolicy
912
913         * dom/Document.cpp: Updated to include SubresourceLoader.h.
914         * loader/DocumentLoader.cpp:
915         (WebCore::DocumentLoader::mainResourceLoader): Updated to return a SubresourceLoader.
916         (WebCore::DocumentLoader::continueAfterContentPolicy): Cast mainResourceLoader() to a ResourceLoader since
917         didFail() is private in SubresourceLoader.
918         * loader/DocumentLoader.h:
919         * loader/SubresourceLoader.cpp:
920         (WebCore::SubresourceLoader::SubresourceLoader): Initialized m_callingDidReceiveResponse to false.
921         (WebCore::SubresourceLoader::didReceiveResponse): Used TemporaryChange<> to set m_callingDidReceiveResponse to true.
922         * loader/SubresourceLoader.h:
923         * loader/appcache/ApplicationCacheHost.cpp: Updated to include SubresourceLoader.h.
924         * loader/mac/DocumentLoaderMac.cpp: Ditto.
925
926 2015-08-14  Zalan Bujtas  <zalan@apple.com>
927
928         RenderBlock::simplifiedLayout should pop LayoutStateMaintainer when early returns.
929         https://bugs.webkit.org/show_bug.cgi?id=148031
930
931         Reviewed by Simon Fraser.
932
933         LayoutStateMaintainer push/pop calls need to be balanced to ensure layout consistency.
934
935         Unable to make a test case for this.
936
937         * rendering/RenderBlock.cpp:
938         (WebCore::RenderBlock::simplifiedLayout):
939         * rendering/RenderView.h:
940         (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer): ASSERT the state properly.
941         (WebCore::LayoutStateMaintainer::push):
942         (WebCore::LayoutStateMaintainer::pop):
943         (WebCore::LayoutStateMaintainer::didPush):
944         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): Deleted.
945
946 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
947
948         Remove a few includes from RenderObject.h
949         https://bugs.webkit.org/show_bug.cgi?id=148007
950
951         Reviewed by Tim Horton.
952
953         Shrink down the RenderObject.h includes a little.
954
955         * rendering/RenderElement.h:
956         * rendering/RenderObject.h:
957         * rendering/RenderText.h:
958
959 2015-08-14  Tim Horton  <timothy_horton@apple.com>
960
961         Fix the Mavericks build.
962
963         * platform/spi/mac/LookupSPI.h:
964
965 2015-08-14  Tim Horton  <timothy_horton@apple.com>
966
967         Fix the build.
968
969         * platform/spi/mac/LookupSPI.h:
970
971 2015-08-14  Philippe Normand  <pnormand@igalia.com>
972
973         [GStreamer] Handle missing plugins better at runtime
974         https://bugs.webkit.org/show_bug.cgi?id=146999
975
976         Reviewed by Carlos Garcia Campos.
977
978         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
979         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Warn the
980         user if autoaudiosink wasn't found at runtime. In that case
981         playbin will try to be smart by itself, hopefully. Also moved a
982         couple GST_WARNING calls to WARN_MEDIA_MESSAGE.
983         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Use
984         WARN_MEDIA_MESSAGE here as well.
985
986 2015-08-13  Antti Koivisto  <antti@apple.com>
987
988         Cover memory cache subresource validation policy with cache tests
989         https://bugs.webkit.org/show_bug.cgi?id=147830
990
991         Reviewed by Alexey Proskuryakov.
992
993         Existing tests under http/tests/cache/disk-cache currently cover disk and XHR memory cache validation behaviors.
994         They can be extended to cover the regular subresource policy too.
995
996         Add window.internals API to disable CachedRawResource validation behavior. This makes XHR validate like
997         other resources and allows existing tests (that use XHR) to cover normal subresource policy .
998
999         Test results reveal some bugs. For example subresources in memory cache don't respect Vary header.
1000
1001         It is generally bad that we have a separate XHR-and-main-resource validation policy in memory cache. Network cache
1002         doesn't have one.
1003
1004         * loader/FrameLoader.cpp:
1005         (WebCore::FrameLoader::clearTestingOverrides):
1006         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
1007         * loader/FrameLoader.h:
1008         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
1009         (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
1010         (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting):
1011         (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting):
1012         (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL):
1013         * loader/cache/CachedRawResource.h:
1014         * loader/cache/CachedResource.h:
1015         (WebCore::CachedResource::setLoadFinishTime):
1016         (WebCore::CachedResource::loadFinishTime):
1017         (WebCore::CachedResource::canReuse): Deleted.
1018
1019             Made canReuse non-virtual and removed it from the base. Only CachedRawResource has implementation.
1020
1021         * loader/cache/CachedResourceLoader.cpp:
1022         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1023         * testing/Internals.cpp:
1024         (WebCore::Internals::setOverrideResourceLoadPriority):
1025         (WebCore::Internals::setStrictRawResourceValidationPolicyDisabled):
1026         (WebCore::Internals::clearMemoryCache):
1027         * testing/Internals.h:
1028
1029 2015-08-13  Tim Horton  <timothy_horton@apple.com>
1030
1031         Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
1032         https://bugs.webkit.org/show_bug.cgi?id=148012
1033         <rdar://problem/19238094>
1034
1035         Reviewed by Simon Fraser.
1036
1037         * platform/spi/mac/LookupSPI.h:
1038         Add some SPI.
1039
1040 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1041
1042         Another Windows build fix.
1043
1044         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1045
1046 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1047
1048         Try to fix Windows build after r188430.
1049
1050         * platform/graphics/ca/win/PlatformCALayerWin.h:
1051
1052 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1053
1054         Generated files don't all need to include ScriptExecutionContext.h
1055         https://bugs.webkit.org/show_bug.cgi?id=148011
1056
1057         Reviewed by Alexey Proskuryakov.
1058         
1059         Generated files which are not callbacks or constructors do not need to include
1060         ScriptExecutionContext.h.
1061
1062         * bindings/scripts/CodeGeneratorJS.pm:
1063         (GenerateImplementation): Deleted.
1064         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1065         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1066         * bindings/scripts/test/JS/JSTestException.cpp:
1067         * bindings/scripts/test/JS/JSTestInterface.cpp:
1068         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1069         * bindings/scripts/test/JS/JSTestObj.cpp:
1070         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1071         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1072         * bindings/scripts/test/JS/JSattribute.cpp:
1073
1074 2015-08-13  Commit Queue  <commit-queue@webkit.org>
1075
1076         Unreviewed, rolling out r188428.
1077         https://bugs.webkit.org/show_bug.cgi?id=148015
1078
1079         broke cmake build (Requested by alexchristensen on #webkit).
1080
1081         Reverted changeset:
1082
1083         "Move some commands from ./CMakeLists.txt to Source/cmake"
1084         https://bugs.webkit.org/show_bug.cgi?id=148003
1085         http://trac.webkit.org/changeset/188428
1086
1087 2015-08-13  Zalan Bujtas  <zalan@apple.com>
1088
1089         Remove pixelSnapped* functions from RenderBoxModelObject/RenderBox.
1090         https://bugs.webkit.org/show_bug.cgi?id=147982
1091
1092         Reviewed by Simon Fraser.
1093
1094         RenderBoxModelObject/RenderBox::pixelSnapped* functions are misleading.
1095         They all round to integral values, while the rest of the pixel snapping
1096         functions round to device pixels.
1097         This patch moves integral rounding to the callers. (Note that they all will eventually
1098         go away as we convert additional modules to subpixel rendering (tables, scrolling etc).)
1099
1100         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1101         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1102         * dom/Element.cpp:
1103         (WebCore::Element::offsetLeft):
1104         (WebCore::Element::offsetTop):
1105         (WebCore::Element::offsetWidth):
1106         (WebCore::Element::offsetHeight):
1107         (WebCore::Element::clientWidth):
1108         (WebCore::Element::clientHeight):
1109         * dom/Position.cpp:
1110         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1111         * html/HTMLImageElement.cpp:
1112         (WebCore::HTMLImageElement::width):
1113         (WebCore::HTMLImageElement::height):
1114         * html/shadow/SpinButtonElement.cpp:
1115         (WebCore::SpinButtonElement::defaultEventHandler):
1116         * inspector/InspectorOverlay.cpp:
1117         (WebCore::buildObjectForElementData):
1118         * page/FrameView.cpp:
1119         (WebCore::FrameView::applyPaginationToViewport):
1120         (WebCore::FrameView::calculateScrollbarModesForLayout):
1121         (WebCore::FrameView::calculateExtendedBackgroundMode):
1122         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
1123         * page/PrintContext.cpp:
1124         (WebCore::PrintContext::pageNumberForElement):
1125         * platform/graphics/LayoutRect.h:
1126         (WebCore::LayoutRect::pixelSnappedSize): Deleted.
1127         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1128         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1129         * rendering/RenderBox.cpp:
1130         (WebCore::RenderBox::pixelSnappedClientWidth): Deleted.
1131         (WebCore::RenderBox::pixelSnappedClientHeight): Deleted.
1132         (WebCore::RenderBox::pixelSnappedOffsetWidth): Deleted.
1133         (WebCore::RenderBox::pixelSnappedOffsetHeight): Deleted.
1134         * rendering/RenderBox.h:
1135         (WebCore::RenderBox::pixelSnappedLogicalHeight): Deleted.
1136         (WebCore::RenderBox::pixelSnappedLogicalWidth): Deleted.
1137         (WebCore::RenderBox::pixelSnappedSize): Deleted.
1138         (WebCore::RenderBox::pixelSnappedBorderBoxRect): Deleted.
1139         * rendering/RenderBoxModelObject.cpp:
1140         (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth): Deleted.
1141         (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight): Deleted.
1142         * rendering/RenderBoxModelObject.h:
1143         (WebCore::RenderBoxModelObject::pixelSnappedOffsetLeft): Deleted.
1144         (WebCore::RenderBoxModelObject::pixelSnappedOffsetTop): Deleted.
1145         * rendering/RenderFileUploadControl.cpp:
1146         (WebCore::nodeWidth):
1147         (WebCore::nodeHeight):
1148         (WebCore::RenderFileUploadControl::maxFilenameWidth):
1149         * rendering/RenderLayer.cpp:
1150         (WebCore::RenderLayer::updateLayerPosition):
1151         (WebCore::RenderLayer::perspectiveTransform):
1152         (WebCore::RenderLayer::clampScrollOffset):
1153         (WebCore::RenderLayer::visibleSize):
1154         (WebCore::RenderLayer::positionOverflowControls):
1155         (WebCore::RenderLayer::hasHorizontalOverflow):
1156         (WebCore::RenderLayer::hasVerticalOverflow):
1157         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1158         (WebCore::RenderLayer::overflowControlsIntersectRect):
1159         (WebCore::RenderLayer::isPointInResizeControl):
1160         * rendering/RenderLayerBacking.cpp:
1161         (WebCore::RenderLayerBacking::updateGeometry):
1162         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1163         (WebCore::RenderLayerBacking::startAnimation):
1164         (WebCore::RenderLayerBacking::startTransition):
1165         * rendering/RenderLayerBacking.h:
1166         * rendering/RenderListBox.cpp:
1167         (WebCore::RenderListBox::scrollWidth):
1168         (WebCore::RenderListBox::scrollHeight):
1169         * rendering/RenderMediaControlElements.cpp:
1170         (WebCore::RenderMediaVolumeSliderContainer::layout):
1171         * rendering/RenderScrollbar.cpp:
1172         (WebCore::RenderScrollbar::buttonRect):
1173         * rendering/RenderTable.cpp:
1174         (WebCore::RenderTable::addOverflowFromChildren):
1175         * rendering/RenderTableCell.cpp:
1176         (WebCore::RenderTableCell::computeIntrinsicPadding):
1177         (WebCore::RenderTableCell::paintCollapsedBorders):
1178         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1179         (WebCore::RenderTableCell::paintBoxDecorations):
1180         (WebCore::RenderTableCell::paintMask):
1181         * rendering/RenderTableCell.h:
1182         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1183         * rendering/RenderTheme.cpp:
1184         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
1185         * rendering/RenderTheme.h:
1186         * rendering/RenderThemeMac.mm:
1187         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1188         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
1189         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
1190         * rendering/RenderTreeAsText.cpp:
1191         (WebCore::write):
1192         * rendering/mathml/RenderMathMLFraction.cpp:
1193         (WebCore::RenderMathMLFraction::paint):
1194         * rendering/mathml/RenderMathMLRoot.cpp:
1195         (WebCore::RenderMathMLRoot::paint):
1196         * rendering/svg/RenderSVGRoot.cpp:
1197         (WebCore::RenderSVGRoot::paintReplaced):
1198         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
1199
1200 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1201
1202         Minor GraphicsLayer.h/PlatformCALayer.h cleanup
1203         https://bugs.webkit.org/show_bug.cgi?id=148009
1204
1205         Reviewed by Tim Horton.
1206
1207         Remove some #includes.
1208
1209         * platform/graphics/GraphicsLayer.h:
1210         * platform/graphics/ca/PlatformCALayer.h:
1211
1212 2015-08-13  Alex Christensen  <achristensen@webkit.org>
1213
1214         Move some commands from ./CMakeLists.txt to Source/cmake
1215         https://bugs.webkit.org/show_bug.cgi?id=148003
1216
1217         Reviewed by Brent Fulgham.
1218
1219         * CMakeLists.txt:
1220         Added commands needed to build WebCore by itself.
1221
1222 2015-08-13  Tim Horton  <timothy_horton@apple.com>
1223
1224         Refactor and improve TextIndicator to prepare for tests
1225         https://bugs.webkit.org/show_bug.cgi?id=147622
1226
1227         Reviewed by Simon Fraser.
1228
1229         No new tests because they're coming soon!
1230
1231         * page/TextIndicator.cpp:
1232         (WebCore::TextIndicator::TextIndicator):
1233         (WebCore::TextIndicator::~TextIndicator):
1234         (WebCore::TextIndicator::createWithRange):
1235         (WebCore::TextIndicator::createWithSelectionInFrame):
1236         (WebCore::hasNonInlineOrReplacedElements):
1237         (WebCore::snapshotOptionsForTextIndicatorOptions):
1238         (WebCore::takeSnapshot):
1239         (WebCore::takeSnapshots):
1240         (WebCore::initializeIndicator):
1241         (WebCore::snapshotSelectionWithHighlight): Deleted.
1242         (WebCore::TextIndicator::wantsBounce): Deleted.
1243         (WebCore::TextIndicator::wantsContentCrossfade): Deleted.
1244         (WebCore::TextIndicator::wantsFadeIn): Deleted.
1245         (WebCore::TextIndicator::wantsManualAnimation): Deleted.
1246         * page/TextIndicator.h:
1247         (WebCore::TextIndicator::indicatesCurrentSelection):
1248         (WebCore::TextIndicator::setWantsMargin): Deleted.
1249         (WebCore::TextIndicator::wantsMargin): Deleted.
1250         Rename wantsMargin to indicatesCurrentSelection. It's really about whether
1251         the TextIndicator indicates the existing selection, and the Mac presentation
1252         just uses that to determine whether or not to show a margin, but that
1253         margin has nothing to do with the cross-platform TextIndicator code.
1254
1255         Move most of the snapshotting and rect gathering code to initializeTextIndicator, and call it
1256         from both ::createWithRange and ::createWithSelectionInFrame, instead of calling
1257         ::createWithSelectionInFrame from ::createWithRange after setting the selection.
1258         This way, the range passed into ::createWithRange is preserved for use in initializeTextIndicator,
1259         instead of round-tripping through selection code, which can change it (e.g. in the case
1260         of user-select: none; elements).
1261
1262         Add TextIndicatorOptions, which allow callers to adjust the behavior of TextIndicator
1263         instead of having #if PLATFORM(X) strewn throughout TextIndicator.
1264
1265         Add an option which was previously implemented at the iOS-specific callsites,
1266         TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges,
1267         which falls back to indicating a bounding rect and not doing a range-only paint
1268         if the given range includes any non-inline elements or any replaced elements.
1269         This makes it so that we do something reasonable-looking for very complex ranges,
1270         like article links on the New York Times, which include multiple disparate paragraphs
1271         of text and one or more images, and also so that indicating a range that only
1272         includes an image does something fairly reasonable.
1273
1274         Move presentation-specific functions (wantsBounce, wantsContentCrossfade, etc.)
1275         to TextIndicatorWindow. Ideally TextIndicatorPresentationTransition would also move,
1276         but that is a fairly large and complicated change that should be made separately.
1277
1278         * page/mac/TextIndicatorWindow.h:
1279         * page/mac/TextIndicatorWindow.mm:
1280         (indicatorWantsBounce):
1281         (indicatorWantsContentCrossfade):
1282         (indicatorWantsFadeIn):
1283         (indicatorWantsManualAnimation):
1284         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
1285         (-[WebTextIndicatorView _animationDuration]):
1286         (-[WebTextIndicatorView present]):
1287         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
1288         (WebCore::TextIndicatorWindow::clearTextIndicator):
1289         (WebCore::TextIndicatorWindow::setTextIndicator):
1290         Rename TextIndicatorDismissalAnimation to TextIndicatorWindowDismissalAnimation,
1291         and TextIndicatorLifetime to TextIndicatorWindowLifetime, because
1292         they are TextIndicatorWindow specific.
1293
1294         * accessibility/AccessibilityRenderObject.cpp:
1295         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
1296         * bindings/objc/DOM.mm:
1297         (-[DOMNode getPreviewSnapshotImage:andRects:]):
1298         (-[DOMRange boundingBox]):
1299         (-[DOMRange textRects]):
1300         * dom/DocumentMarkerController.cpp:
1301         (WebCore::DocumentMarkerController::addTextMatchMarker):
1302         * dom/Node.cpp:
1303         (WebCore::Node::textRects):
1304         * dom/Range.cpp:
1305         (WebCore::Range::intersectsNode):
1306         (WebCore::Range::absoluteBoundingBox):
1307         (WebCore::Range::absoluteTextRects):
1308         (WebCore::Range::absoluteTextQuads):
1309         (WebCore::Range::getClientRects):
1310         (WebCore::Range::getBoundingClientRect):
1311         (WebCore::Range::getBorderAndTextQuads):
1312         (WebCore::Range::boundingRectInternal):
1313         (WebCore::Range::absoluteBoundingRect):
1314         (WebCore::Range::boundingBox): Deleted.
1315         (WebCore::Range::textRects): Deleted.
1316         (WebCore::Range::textQuads): Deleted.
1317         (WebCore::Range::boundingRect): Deleted.
1318         * dom/Range.h:
1319         * editing/AlternativeTextController.cpp:
1320         (WebCore::AlternativeTextController::rootViewRectForRange):
1321         * editing/Editor.cpp:
1322         (WebCore::Editor::findStringAndScrollToVisible):
1323         * editing/FrameSelection.cpp:
1324         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
1325         * editing/mac/DataDetection.mm:
1326         (WebCore::DataDetection::detectItemAroundHitTestResult):
1327         * rendering/RenderObject.cpp:
1328         (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
1329         Rename various Range methods to make it clear whether they return absolute or client rects.
1330
1331 2015-08-13  Jer Noble  <jer.noble@apple.com>
1332
1333         Don't short circuit seeking
1334         https://bugs.webkit.org/show_bug.cgi?id=147892
1335
1336         Reviewed by Eric Carlson.
1337
1338         When two seekWithTolerance() requests come in before the first is acted upon in seekTask(),
1339         the second will result in a "no seek required" conditional, because the new "currentTime" is
1340         assumed to be the destination time of the first seek.
1341
1342         When cancelling a pending seek, first replace the "now" value with the "now" value from the
1343         replaced seek, thus preserving the original currentTime across all replacement seeks.
1344
1345         Drive-by fix: some added logging causes occasional crashes, due to the underlying object being
1346         accessed having been deleted.
1347
1348         * html/HTMLMediaElement.cpp:
1349         (WebCore::HTMLMediaElement::seekWithTolerance):
1350         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1351         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
1352
1353 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
1354
1355         Prospective Mac/iOS build fix after the last Windows build fix.
1356
1357         * page/CaptionUserPreferences.cpp:
1358         * page/UserContentController.cpp:
1359
1360 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
1361
1362         [Win] More build fixes.
1363
1364         * dom/make_event_factory.pl:
1365         (generateImplementation):
1366         * page/CaptionUserPreferences.cpp:
1367         * page/PageGroup.cpp:
1368         * page/UserContentController.cpp:
1369
1370 2015-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
1371
1372         A focused node should not be assisted when handling touch events synchronously
1373         https://bugs.webkit.org/show_bug.cgi?id=147836
1374         <rdar://problem/22204108>
1375
1376         Reviewed by Enrica Casucci.
1377
1378         Makes interaction with touch handlers no longer assist the currently focused element in the
1379         general case. Added plumbing to reassist a currently focused node when dispatching touch events,
1380         so that an input that programmatically focuses itself and prevents default on a touch event will
1381         be properly assisted when it has been programmatically focused (either through Javascript or the
1382         autofocus attribute) prior to receiving the touch event. This patch also removes the now
1383         unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
1384         upon autofocus.
1385
1386         * dom/Element.cpp:
1387         (WebCore::Element::focus): Notifies the chrome client that the element has refocused before
1388             returning early.
1389         * page/ChromeClient.h: Refocusing an element does nothing by default.
1390         * platform/RuntimeApplicationChecksIOS.h: Removed special casing for Gmail Add Account.
1391         * platform/RuntimeApplicationChecksIOS.mm: See above.
1392         (WebCore::applicationIsGmailAddAccountOnIOS): See above.
1393
1394 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
1395
1396         [Win] Unreviewed build fix.
1397
1398         * accessibility/AXObjectCache.cpp: Add missing 'DataLog.h' include.
1399
1400 2015-08-13 Wenson Hsieh  <wenson_hsieh@apple.com>
1401
1402         Selects should scale when rendering while zoomed
1403         https://bugs.webkit.org/show_bug.cgi?id=147868
1404
1405         Reviewed by Daniel Bates.
1406
1407         When rendering zoomed <select> elements, draw to an image buffer instead of drawing directly
1408         into the context. This allows us to scale the image buffer up before rendering.
1409
1410         * rendering/RenderThemeMac.mm:
1411         (WebCore::RenderThemeMac::paintMenuList): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
1412             to render search fields, utilizing an offscreen image buffer only when necessary.
1413
1414 2015-08-13  Alex Christensen  <achristensen@webkit.org>
1415
1416         [Win] Unreviewed build fix after r188388.
1417
1418         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1419         * dom/EventFactory.h:
1420         * rendering/RenderThemeWin.cpp:
1421         Strange things happen when you change including headers.  This fixed my local build.
1422
1423 2015-08-13  Geoffrey Garen  <ggaren@apple.com>
1424
1425         Standardize on the phrase "delete code"
1426         https://bugs.webkit.org/show_bug.cgi?id=147984
1427
1428         Reviewed by Mark Lam.
1429
1430         Use "delete" when we talk about throwing away code, as opposed to
1431         "invalidate" or "discard".
1432
1433         * bindings/js/GCController.cpp:
1434         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
1435         (WebCore::GCController::deleteAllCode):
1436         (WebCore::GCController::discardAllCompiledCode): Deleted.
1437         * bindings/js/GCController.h:
1438         * platform/MemoryPressureHandler.cpp:
1439         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1440
1441 2015-08-13  Eric Carlson  <eric.carlson@apple.com>
1442
1443         Don't short circuit seeking
1444         https://bugs.webkit.org/show_bug.cgi?id=147892
1445
1446         Reviewed by Jer Noble.
1447
1448         Test: media/video-seek-to-current-time.html
1449
1450         * html/HTMLMediaElement.cpp:
1451         (WebCore::HTMLMediaElement::prepareForLoad): Call clearSeeking.
1452         (WebCore::HTMLMediaElement::fastSeek): Add logging.
1453         (WebCore::HTMLMediaElement::seekWithTolerance): Add logging. Set m_pendingSeekType.
1454         (WebCore::HTMLMediaElement::seekTask):  Call clearSeeking. Don't short circuit a
1455           if the current or pending seek is a fast seek. Set m_seeking to true immediately
1456           before calling media engine as it may have been cleared before the seek task
1457           queue ran.
1458         (WebCore::HTMLMediaElement::clearSeeking): New.
1459         * html/HTMLMediaElement.h:
1460         * html/HTMLMediaElementEnums.h:
1461
1462         * platform/GenericTaskQueue.h:
1463         (WebCore::GenericTaskQueue::enqueueTask): Clear m_pendingTasks.
1464
1465         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1466         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Don't return early
1467           when asked to seek to the current time.
1468         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration): Remove some 
1469           extremely noisy logging.
1470
1471         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1472         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Add logging.
1473
1474 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1475
1476         FilterOperation.h should not include FilterEffect.h
1477         https://bugs.webkit.org/show_bug.cgi?id=147970
1478
1479         Reviewed by Daniel Bates.
1480
1481         FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
1482         so move its include to FilterOperation.cpp.
1483         
1484         Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
1485
1486         * platform/graphics/filters/FilterOperation.cpp:
1487         (WebCore::ReferenceFilterOperation::setFilterEffect):
1488         * platform/graphics/filters/FilterOperation.h:
1489         (WebCore::ReferenceFilterOperation::setFilterEffect): Deleted.
1490
1491 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1492
1493         ScriptExecutionContext.h pulls in all the JSC headers
1494         https://bugs.webkit.org/show_bug.cgi?id=147969
1495
1496         Reviewed by Alexey Proskuryakov.
1497
1498         ScriptExecutionContext.h included ScheduledAction.h, which pulled in all the
1499         JSC headers via JSDOMBinding.h. There was no need for this #include, so remove
1500         it and fix the fallout.
1501
1502         * Modules/webdatabase/DatabaseTracker.cpp:
1503         * Modules/webdatabase/SQLTransaction.h:
1504         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1505         * contentextensions/ContentExtensionStyleSheet.cpp:
1506         * dom/ScriptExecutionContext.h:
1507         * html/FTPDirectoryDocument.cpp:
1508         * html/canvas/WebGLRenderingContext.cpp:
1509         * html/parser/HTMLTreeBuilder.h:
1510
1511 2015-08-12  Anders Carlsson  <andersca@apple.com>
1512
1513         Use WTF::Optional in WindowFeatures
1514         https://bugs.webkit.org/show_bug.cgi?id=147956
1515
1516         Reviewed by Sam Weinig.
1517
1518         * loader/FrameLoader.cpp:
1519         (WebCore::createWindow):
1520         * page/WindowFeatures.cpp:
1521         (WebCore::WindowFeatures::WindowFeatures):
1522         (WebCore::WindowFeatures::setWindowFeature):
1523         (WebCore::WindowFeatures::boolFeature):
1524         (WebCore::WindowFeatures::floatFeature):
1525         (WebCore::WindowFeatures::parseDialogFeatures):
1526         * page/WindowFeatures.h:
1527         (WebCore::WindowFeatures::WindowFeatures):
1528
1529 2015-08-13  Matthew Daiter  <mdaiter@apple.com>
1530
1531         UserMediaRequest should supply IDs of devices selected by user
1532         https://bugs.webkit.org/show_bug.cgi?id=147263
1533         <rdar://problem/21983345>
1534
1535         Reviewed by Jer Noble.
1536
1537         * Modules/mediastream/UserMediaRequest.cpp:
1538         (WebCore::UserMediaRequest::userMediaAccessGranted):
1539         * Modules/mediastream/UserMediaRequest.h:
1540         * platform/mock/UserMediaClientMock.h:
1541
1542 2015-08-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1543
1544         [Cairo] Improve image quality when using newer versions of cairo/pixman
1545         https://bugs.webkit.org/show_bug.cgi?id=147826
1546
1547         Reviewed by Martin Robinson.
1548
1549         Since cairo 1.14 the image filters changed a bit:
1550
1551          - CAIRO_FILTER_GOOD uses a box filter when downscaling if the
1552            scale factor is less than 0.75, otherwise it uses a filter
1553            equivalent to CAIRO_FILTER_BILINEAR.
1554          - CAIRO_FILTER_BEST uses always a Catmull-Rom filter.
1555
1556         We are currently using CAIRO_FILTER_BILINEAR for medium, high and
1557         default interpolation levels. We could use CAIRO_FILTER_GOOD for
1558         medium and default, and CAIRO_FILTER_BEST for high. This will not
1559         have any effect in previous versions of cairo because before 1.14
1560         CAIRO_FILTER_GOOD, CAIRO_FILTER_BILINEAR and CAIRO_FILTER_BEST had
1561         the same implementation in pixman.
1562
1563         * platform/graphics/cairo/PlatformContextCairo.cpp:
1564         (WebCore::PlatformContextCairo::drawSurfaceToContext):
1565
1566 2015-08-12  Myles C. Maxfield  <mmaxfield@apple.com>
1567
1568         [Cocoa] [CJK-configured device] System font has vertical punctuation
1569         https://bugs.webkit.org/show_bug.cgi?id=147964
1570         <rdar://problem/22256660>
1571
1572         Reviewed by Dean Jackson.
1573
1574         GlyphPage::fill() has multiple code paths to accomplish its goal. It uses the shouldUseCoreText() helper
1575         function to determine which one of the paths should be taken. However, not all of the code paths in
1576         GlyphPage::fill() are able of handling all situations. Indeed, the CoreText code paths in GlyphPage::fill()
1577         are only able to handle the situations which shouldUseCoreText() returns true for. This happens in the
1578         following cases:
1579
1580         1. If the font is a composite font
1581         2. If the font is used for text-combine
1582         3. If the font has vertical glyphs
1583
1584         In r187693, I added one more case to this list: If the font is the system font. However, I failed to add
1585         the necessary support to GlyphPage::fill() for this case. Becasue of this, we just happened to fall into
1586         the case of vertical fonts (just by coincidence), which causes us to use
1587         CTFontGetVerticalGlyphsForCharacters() instead of CTFontGetGlyphsForCharacters().
1588
1589         The solution is to adopt the same behavior we were using before r187693. Back then, we were using
1590         CGFontGetGlyphsForUnichars(), which always returned horizontal glyphs. We should simply adopt this same
1591         behavior, except in the Core Text case. Therefore, this patch is just a simple check to see if we are
1592         using the system font when determining which Core Text function to use.
1593
1594         Test: fast/text/system-font-punctuation.html
1595
1596         * platform/graphics/FontDescription.h:
1597         (WebCore::FontDescription::setWidthVariant):
1598         * platform/graphics/FontPlatformData.h:
1599         (WebCore::FontPlatformData::isForTextCombine):
1600         * platform/graphics/mac/GlyphPageMac.cpp:
1601         (WebCore::shouldUseCoreText):
1602         (WebCore::GlyphPage::fill):
1603         * rendering/RenderCombineText.cpp:
1604         (WebCore::RenderCombineText::combineText):
1605
1606 2015-08-12  Jinyoung Hur  <hur.ims@navercorp.com>
1607
1608         [WinCairo] Turn on WOFF font
1609         https://bugs.webkit.org/show_bug.cgi?id=147878
1610
1611         WOFF is already usable in Windows Cairo. Just turn it on.
1612
1613         Reviewed by Myles C. Maxfield.
1614
1615         Test: fast\css\font-face-woff.html
1616
1617         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1618         (WebCore::FontCustomPlatformData::supportsFormat):
1619
1620 2015-08-12  Brent Fulgham  <bfulgham@apple.com>
1621
1622         Move RenderBox-specific Scroll Snap code from RenderElement to RenderBox
1623         https://bugs.webkit.org/show_bug.cgi?id=147963
1624
1625         Reviewed by Simon Fraser.
1626
1627         No new tests: No change in functionality.
1628
1629         * rendering/RenderBox.cpp:
1630         (WebCore::RenderBox::styleWillChange): Remove RenderBox-specific code.
1631         (WebCore::RenderBox::willBeRemovedFromTree): Ditto.
1632         * rendering/RenderBox.h:
1633         * rendering/RenderElement.cpp:
1634         (WebCore::RenderElement::styleWillChange): Move code from RenderElement to
1635         handle Scroll Snap Points.
1636         (WebCore::RenderElement::willBeRemovedFromTree): Added new override to handle
1637         scroll-snap point logic.
1638
1639 2015-08-12  Antti Koivisto  <antti@apple.com>
1640
1641         CachedResource leak in validation code
1642         https://bugs.webkit.org/show_bug.cgi?id=147941
1643
1644         Reviewed by Chris Dumez.
1645
1646         While adding test coverage I discovered a way to hit ASSERT(!resource->m_proxyResource) in CachedResource::setResourceToRevalidate.
1647         I think this ends up leaking a resource too.
1648
1649         Test: http/tests/cache/recursive-validation.html
1650
1651         * loader/cache/CachedRawResource.cpp:
1652         (WebCore::CachedRawResource::didAddClient):
1653
1654             Tighten the condition.
1655
1656         * loader/cache/CachedResource.cpp:
1657         (WebCore::CachedResource::setResourceToRevalidate):
1658         (WebCore::CachedResource::clearResourceToRevalidate):
1659
1660             Replace workaround for this bug with an assert.
1661
1662         * loader/cache/CachedResource.h:
1663         (WebCore::CachedResource::validationInProgress):
1664         (WebCore::CachedResource::validationCompleting):
1665         (WebCore::CachedResource::didSendData):
1666         * loader/cache/CachedResourceLoader.cpp:
1667         (WebCore::CachedResourceLoader::revalidateResource):
1668         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1669
1670             Fix the bug by using (instead of revalidating) resource that we are just finishing revalidating.
1671             This can happen when a succesful revalidation synchronously triggers another load for the same resource.
1672
1673 2015-08-12  Matthew Daiter  <mdaiter@apple.com>
1674
1675         Need to add stubs to enumerateDevices
1676         https://bugs.webkit.org/show_bug.cgi?id=147903
1677
1678         Reviewed by Eric Carlson.
1679
1680         * Modules/mediastream/MediaDevices.cpp:
1681         (WebCore::MediaDevices::enumerateDevices):
1682         * Modules/mediastream/MediaDevices.h:
1683         * Modules/mediastream/UserMediaRequest.cpp:
1684         (WebCore::UserMediaRequest::enumerateDevices):
1685         * Modules/mediastream/UserMediaRequest.h:
1686
1687 2015-08-12  Matt Rajca  <mrajca@apple.com>
1688
1689         Fixed the Release build when MEDIA_SESSION is enabled.
1690
1691         * testing/Internals.cpp:
1692         (WebCore::interruptingCategoryFromString):
1693
1694 2015-08-07  Matt Rajca  <mrajca@apple.com>
1695
1696         Media Session: notify the UI process when media controls are enabled/disabled
1697         https://bugs.webkit.org/show_bug.cgi?id=147802
1698
1699         Reviewed by Eric Carlson.
1700
1701         * Modules/mediasession/MediaRemoteControls.cpp:
1702         (WebCore::MediaRemoteControls::MediaRemoteControls): Keep track of the parent session.
1703         (WebCore::MediaRemoteControls::~MediaRemoteControls): Removed unnecessary line.
1704         (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Tell the session a control was enabled/disabled.
1705         (WebCore::MediaRemoteControls::setNextTrackEnabled): Tell the session a control was enabled/disabled.
1706         * Modules/mediasession/MediaRemoteControls.h:
1707         (WebCore::MediaRemoteControls::create):
1708         (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Moved to implementation file.
1709         (WebCore::MediaRemoteControls::setNextTrackEnabled): Moved to implementation file.
1710         * Modules/mediasession/MediaSession.cpp:
1711         (WebCore::MediaSession::MediaSession): Keep track of the remote controls' parent session.
1712         (WebCore::MediaSession::controlIsEnabledDidChange): Propagate the new media state to the UI process.
1713         * Modules/mediasession/MediaSession.h:
1714         * dom/Document.cpp:
1715         (WebCore::Document::updateIsPlayingMedia): Include whether we can skip to the previous/next track.
1716         * page/MediaProducer.h:
1717
1718 2015-08-12  Alex Christensen  <achristensen@webkit.org>
1719
1720         Fix Debug CMake builds on Windows
1721         https://bugs.webkit.org/show_bug.cgi?id=147940
1722
1723         Reviewed by Chris Dumez.
1724
1725         * PlatformWin.cmake:
1726         Copy localized strings to the WebKit.resources directory.
1727
1728 2015-08-12  Alex Christensen  <achristensen@webkit.org>
1729
1730         Unreviewed build fix after r188339.
1731
1732         * bindings/js/GCController.cpp:
1733         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
1734         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
1735         (WebCore::GCController::releaseExecutableMemory): Deleted.
1736         * bindings/js/GCController.h:
1737         Commit WebCore part of patch.
1738
1739 2015-08-12  Brent Fulgham  <bfulgham@apple.com>
1740
1741         REGRESSION(r185606): ASSERT in WebCore::RenderElement::styleWillChange
1742         https://bugs.webkit.org/show_bug.cgi?id=147596
1743         <rdar://problem/21963355>
1744
1745         Reviewed by Jon Honeycutt.
1746
1747         Only add (or remove) a RenderElement from the container of RenderBoxes with
1748         scroll snap coordinates if the element actually is a RenderBox.
1749
1750         Tested by css3/scroll-snap/improper-snap-points-crash.html.
1751
1752         * rendering/RenderElement.cpp:
1753         (WebCore::RenderElement::styleWillChange):
1754         (WebCore::RenderElement::willBeRemovedFromTree):
1755
1756 2015-08-12  Devin Rousso  <drousso@apple.com>
1757
1758         Web Inspector: Implement selector highlighting for iOS
1759         https://bugs.webkit.org/show_bug.cgi?id=147919
1760
1761         Reviewed by Timothy Hatcher.
1762
1763         * inspector/InspectorOverlay.cpp:
1764         (WebCore::InspectorOverlay::getHighlight):
1765         If the current highlight is a nodeList, generate highlights for each node in the list and
1766         return the concatenated value of those highlights.
1767
1768 2015-08-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1769
1770         Remove promise attribute specific handling from binding generator
1771         https://bugs.webkit.org/show_bug.cgi?id=147828
1772
1773         Reviewed by Darin Adler.
1774
1775         Reverting http://trac.webkit.org/changeset/184643, as CachedAttribute is used instead.
1776
1777         * bindings/scripts/CodeGeneratorJS.pm:
1778         (GenerateHeader): Deleted.
1779         * bindings/scripts/test/JS/JSTestObj.cpp:
1780         (WebCore::jsTestObjConstructor): Deleted.
1781         (WebCore::setJSTestObjConstructorStaticStringAttr): Deleted.
1782         * bindings/scripts/test/JS/JSTestObj.h:
1783         * bindings/scripts/test/ObjC/DOMTestObj.h:
1784         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1785         (-[DOMTestObj voidMethod]): Deleted.
1786         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]): Deleted.
1787         * bindings/scripts/test/TestObj.idl:
1788
1789 2015-08-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1790
1791         XHR.setRequestHeader should remove trailing and leading whitespaces from the header value
1792         https://bugs.webkit.org/show_bug.cgi?id=147445
1793
1794         Reviewed by Darin Adler.
1795
1796         Covered by added and modifed tests.
1797
1798         * platform/network/HTTPParsers.h:
1799         (WebCore::isHTTPSpace):
1800         (WebCore::stripLeadingAndTrailingHTTPSpaces):
1801         * xml/XMLHttpRequest.cpp:
1802         (WebCore::XMLHttpRequest::setRequestHeader): strip trailing and leading whitespace before testing for header value validity and storing.
1803
1804 2015-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1805
1806         NetworkProcess: DNS prefetch happens in the Web Process
1807         https://bugs.webkit.org/show_bug.cgi?id=147824
1808
1809         Reviewed by Alexey Proskuryakov.
1810
1811         Use FrameLoaderClient to do the DNS prefetch.
1812
1813         * html/HTMLAnchorElement.cpp:
1814         (WebCore::HTMLAnchorElement::parseAttribute):
1815         * loader/FrameLoaderClient.h:
1816         * loader/LinkLoader.cpp:
1817         (WebCore::LinkLoader::loadLink):
1818         * page/Chrome.cpp:
1819         (WebCore::Chrome::mouseDidMoveOverElement):
1820
1821 2015-08-11  Mark Lam  <mark.lam@apple.com>
1822
1823         Implementation JavaScript watchdog using WTF::WorkQueue.
1824         https://bugs.webkit.org/show_bug.cgi?id=147107
1825
1826         Reviewed by Geoffrey Garen.
1827
1828         No new tests because we're not introducing any behavior change to WebCore here.
1829         We're only #include'ing Watchdog.h directly instead of going through VM.h.
1830
1831         * ForwardingHeaders/runtime/Watchdog.h: Added.
1832         * PlatformEfl.cmake:
1833         * WebCore.vcxproj/WebCore.vcxproj:
1834         * WebCore.vcxproj/WebCore.vcxproj.filters:
1835         * bindings/js/JSEventListener.cpp:
1836         * bindings/js/WorkerScriptController.cpp:
1837
1838 2015-08-11  Simon Fraser  <simon.fraser@apple.com>
1839
1840         [iOS WK2] ASSERT(!m_properties.backingStore || owner()) sometimes on zooming
1841         https://bugs.webkit.org/show_bug.cgi?id=147854
1842
1843         Reviewed by Tim Horton.
1844
1845         When destroying a TileGrid, the container layer remains alive by virtue of being
1846         in the layer tree, and it and its tiles get visited during layer tree transaction
1847         building but we assert because we've cleared the owner on the tile layers.
1848
1849         The real bug is that TileController doesn't tell GraphicsLayerCA when the custom
1850         sublayers change. Make this possible via a new PlatformCALayerClient function,
1851         and make TileController use this when rearranging its tile grids.
1852
1853         * platform/graphics/ca/GraphicsLayerCA.cpp:
1854         (WebCore::GraphicsLayerCA::platformCALayerCustomSublayersChanged):
1855         (WebCore::GraphicsLayerCA::updateContentsScale): No need to explicitly set
1856         the ChildrenChanged flag now.
1857         * platform/graphics/ca/GraphicsLayerCA.h:
1858         * platform/graphics/ca/PlatformCALayerClient.h:
1859         (WebCore::PlatformCALayerClient::platformCALayerCustomSublayersChanged):
1860         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
1861         * platform/graphics/ca/TileController.cpp:
1862         (WebCore::TileController::setNeedsDisplay):
1863         (WebCore::TileController::setContentsScale):
1864         (WebCore::TileController::setZoomedOutContentsScale):
1865         (WebCore::TileController::revalidateTiles):
1866         (WebCore::TileController::clearZoomedOutTileGrid):
1867         (WebCore::TileController::tileGridsChanged):
1868         (WebCore::TileController::tileRevalidationTimerFired):
1869         * platform/graphics/ca/TileController.h:
1870         * platform/graphics/ca/TileGrid.h: Default param.
1871
1872 2015-08-11  Zalan Bujtas  <zalan@apple.com>
1873
1874         Disconnect LayoutStateDisabler logic and RenderView pointer.
1875         https://bugs.webkit.org/show_bug.cgi?id=147906
1876
1877         Reviewed by Simon Fraser.
1878
1879         LayoutStateDisabler should disable layout state unconditionally.
1880         The only place where it was actually conditional was the subtree layout branch.
1881         Create a dedicated SubtreeLayoutStateMaintainer to manage the subtree layout case.
1882
1883         No change in behaviour.
1884
1885         * page/FrameView.cpp:
1886         (WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
1887         (WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
1888         (WebCore::FrameView::layout):
1889         * rendering/RenderBlock.cpp:
1890         (WebCore::RenderBlock::updateFirstLetterStyle):
1891         (WebCore::RenderBlock::updateFirstLetter):
1892         * rendering/RenderBlockFlow.cpp:
1893         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
1894         * rendering/RenderFlowThread.cpp:
1895         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1896         * rendering/RenderListBox.cpp:
1897         (WebCore::RenderListBox::layout):
1898         * rendering/RenderListItem.cpp:
1899         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
1900         * rendering/RenderMediaControlElements.cpp:
1901         (WebCore::RenderMediaVolumeSliderContainer::layout):
1902         (WebCore::RenderMediaControlTimelineContainer::layout):
1903         (WebCore::RenderTextTrackContainerElement::layout):
1904         * rendering/RenderMultiColumnFlowThread.cpp:
1905         (WebCore::RenderMultiColumnFlowThread::populate):
1906         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
1907         * rendering/RenderView.h:
1908         (WebCore::LayoutStateDisabler::LayoutStateDisabler):
1909         (WebCore::LayoutStateDisabler::~LayoutStateDisabler):
1910         * rendering/svg/RenderSVGRoot.cpp:
1911         (WebCore::RenderSVGRoot::layout):
1912
1913 2015-08-11  Simon Fraser  <simon.fraser@apple.com>
1914
1915         Fix ViewportConfiguration dumping.
1916         
1917         ViewportConfiguration::dump() was dumping parameters.width as parameters.initialScale.
1918
1919         * page/ViewportConfiguration.cpp:
1920         (WebCore::ViewportConfigurationTextStream::operator<<):
1921
1922 2015-08-11  Myles C. Maxfield  <mmaxfield@apple.com>
1923
1924         [font-features] Map OpenType feature tags to TrueType feature selectors
1925         https://bugs.webkit.org/show_bug.cgi?id=147819
1926
1927         Reviewed by Dean Jackson.
1928
1929         Allow uses of font-feature-settings even on TrueType fonts.
1930
1931         Test: css3/font-feature-settings-preinstalled-fonts.html
1932
1933         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1934         (WebCore::appendRawTrueTypeFeature):
1935         (WebCore::appendTrueTypeFeature):
1936
1937 2015-08-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1938
1939         Reduce use of PassRefPtr in WebCore/css
1940         https://bugs.webkit.org/show_bug.cgi?id=147821
1941
1942         Reviewed by Daniel Bates.
1943
1944         Use RefPtr when returning nullptr or RefPtr, if not, use Ref.
1945
1946         * css/CSSBasicShapes.cpp:
1947         (WebCore::buildSerializablePositionOffset):
1948         (WebCore::CSSBasicShapeCircle::cssText):
1949         (WebCore::CSSBasicShapeEllipse::cssText):
1950         * css/CSSBasicShapes.h:
1951         * css/CSSCalculationValue.cpp:
1952         (WebCore::determineCategory):
1953         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
1954         (WebCore::createBlendHalf):
1955         (WebCore::createCSS):
1956         * css/CSSCanvasValue.cpp:
1957         (WebCore::CSSCanvasValue::image):
1958         * css/CSSCanvasValue.h:
1959         * css/CSSComputedStyleDeclaration.cpp:
1960         (WebCore::positionOffsetValue):
1961         (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
1962         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1963         (WebCore::counterToCSSValue):
1964         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
1965         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1966         (WebCore::computeRenderStyleForProperty):
1967         (WebCore::valueForItemPositionWithOverflowAlignment):
1968         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
1969         (WebCore::ComputedStyleExtractor::propertyValue):
1970         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
1971         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
1972         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
1973         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal):
1974         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1975         * css/CSSComputedStyleDeclaration.h:
1976         * css/CSSCrossfadeValue.cpp:
1977         (WebCore::CSSCrossfadeValue::image):
1978         (WebCore::CSSCrossfadeValue::blend):
1979         * css/CSSCrossfadeValue.h:
1980         * css/CSSFilterImageValue.cpp:
1981         (WebCore::CSSFilterImageValue::image):
1982         * css/CSSFilterImageValue.h:
1983         * css/CSSGradientValue.cpp:
1984         (WebCore::CSSGradientValue::image):
1985         (WebCore::CSSGradientValue::gradientWithStylesResolved):
1986         (WebCore::CSSLinearGradientValue::createGradient):
1987         (WebCore::CSSRadialGradientValue::createGradient):
1988         * css/CSSGradientValue.h:
1989         * css/CSSImageSetValue.cpp:
1990         (WebCore::CSSImageSetValue::cloneForCSSOM):
1991         * css/CSSImageSetValue.h:
1992         * css/CSSImageValue.cpp:
1993         (WebCore::CSSImageValue::cloneForCSSOM):
1994         * css/CSSImageValue.h:
1995         * css/CSSParser.cpp:
1996         (WebCore::CSSParser::parseRule):
1997         (WebCore::CSSParser::parseKeyframeRule):
1998         (WebCore::CSSParser::parseFontFaceValue):
1999         (WebCore::CSSParser::parseValidPrimitive):
2000         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
2001         (WebCore::CSSParser::parseAttr):
2002         (WebCore::CSSParser::parseBackgroundColor):
2003         (WebCore::CSSParser::parsePositionX):
2004         (WebCore::CSSParser::parsePositionY):
2005         (WebCore::CSSParser::parseFillPositionComponent):
2006         (WebCore::CSSParser::parseFillSize):
2007         (WebCore::CSSParser::parseAnimationDelay):
2008         (WebCore::CSSParser::parseAnimationDirection):
2009         (WebCore::CSSParser::parseAnimationDuration):
2010         (WebCore::CSSParser::parseAnimationFillMode):
2011         (WebCore::CSSParser::parseAnimationIterationCount):
2012         (WebCore::CSSParser::parseAnimationName):
2013         (WebCore::CSSParser::parseAnimationPlayState):
2014         (WebCore::CSSParser::parseAnimationTrigger):
2015         (WebCore::CSSParser::parseAnimationProperty):
2016         (WebCore::CSSParser::parseAnimationTimingFunction):
2017         (WebCore::CSSParser::parseGridPosition):
2018         (WebCore::gridMissingGridPositionValue):
2019         (WebCore::CSSParser::parseGridTrackList):
2020         (WebCore::CSSParser::parseGridTrackSize):
2021         (WebCore::CSSParser::parseGridBreadth):
2022         (WebCore::CSSParser::parseGridAutoFlow):
2023         (WebCore::CSSParser::parseGridTemplateAreas):
2024         (WebCore::CSSParser::parseCounterContent):
2025         (WebCore::CSSParser::parseInsetRoundedCorners):
2026         (WebCore::CSSParser::parseBasicShapeInset):
2027         (WebCore::CSSParser::parseShapeRadius):
2028         (WebCore::CSSParser::parseBasicShapeCircle):
2029         (WebCore::CSSParser::parseBasicShapeEllipse):
2030         (WebCore::CSSParser::parseBasicShapePolygon):
2031         (WebCore::CSSParser::parseBasicShapeAndOrBox):
2032         (WebCore::CSSParser::parseShapeProperty):
2033         (WebCore::CSSParser::parseClipPath):
2034         (WebCore::CSSParser::parseBasicShape):
2035         (WebCore::CSSParser::parseFontFamily):
2036         (WebCore::CSSParser::parseColor):
2037         (WebCore::CSSParser::parseShadow):
2038         (WebCore::CSSParser::parseImageResolution):
2039         (WebCore::CSSParser::parseImageSet):
2040         (WebCore::CSSParser::parseTransform):
2041         (WebCore::CSSParser::parseTransformValue):
2042         (WebCore::CSSParser::parseBuiltinFilterArguments):
2043         (WebCore::CSSParser::parseTextIndent):
2044         (WebCore::CSSParser::createImportRule):
2045         (WebCore::CSSParser::createMediaRule):
2046         (WebCore::CSSParser::createEmptyMediaRule):
2047         (WebCore::CSSParser::createSupportsRule):
2048         (WebCore::CSSParser::popSupportsRuleData):
2049         (WebCore::CSSParser::createKeyframesRule):
2050         (WebCore::CSSParser::createStyleRule):
2051         (WebCore::CSSParser::createFontFaceRule):
2052         (WebCore::CSSParser::createPageRule):
2053         (WebCore::CSSParser::createRegionRule):
2054         (WebCore::CSSParser::createKeyframe):
2055         * css/CSSParser.h:
2056         * css/CSSPrimitiveValue.cpp:
2057         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2058         * css/CSSPrimitiveValue.h:
2059         * css/CSSStyleDeclaration.h:
2060         * css/CSSStyleSheet.cpp:
2061         (WebCore::CSSStyleSheet::rules):
2062         (WebCore::CSSStyleSheet::cssRules):
2063         * css/CSSStyleSheet.h:
2064         * css/CSSToStyleMap.cpp:
2065         (WebCore::CSSToStyleMap::styleImage):
2066         * css/CSSToStyleMap.h:
2067         * css/CSSValue.cpp:
2068         (WebCore::CSSValue::cloneForCSSOM):
2069         * css/CSSValue.h:
2070         * css/CSSValueList.cpp:
2071         (WebCore::CSSValueList::cloneForCSSOM):
2072         * css/CSSValueList.h:
2073         * css/MediaList.h:
2074         (WebCore::MediaQuerySet::copy):
2075         * css/MediaQueryMatcher.cpp:
2076         (WebCore::MediaQueryMatcher::matchMedia):
2077         * css/MediaQueryMatcher.h:
2078         * css/PropertySetCSSStyleDeclaration.cpp:
2079         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
2080         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
2081         * css/PropertySetCSSStyleDeclaration.h:
2082         * css/RGBColor.cpp:
2083         (WebCore::RGBColor::red):
2084         (WebCore::RGBColor::green):
2085         (WebCore::RGBColor::blue):
2086         (WebCore::RGBColor::alpha):
2087         * css/RGBColor.h:
2088         * css/SVGCSSComputedStyleDeclaration.cpp:
2089         (WebCore::glyphOrientationToCSSPrimitiveValue):
2090         (WebCore::strokeDashArrayToCSSValueList):
2091         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
2092         (WebCore::ComputedStyleExtractor::svgPropertyValue):
2093         * css/SVGCSSParser.cpp:
2094         (WebCore::CSSParser::parseSVGStrokeDasharray):
2095         (WebCore::CSSParser::parseSVGPaint):
2096         (WebCore::CSSParser::parseSVGColor):
2097         (WebCore::CSSParser::parsePaintOrder):
2098         * css/WebKitCSSFilterValue.cpp:
2099         (WebCore::WebKitCSSFilterValue::cloneForCSSOM):
2100         * css/WebKitCSSFilterValue.h:
2101         * css/WebKitCSSMatrix.cpp:
2102         (WebCore::WebKitCSSMatrix::multiply):
2103         (WebCore::WebKitCSSMatrix::inverse):
2104         (WebCore::WebKitCSSMatrix::translate):
2105         (WebCore::WebKitCSSMatrix::scale):
2106         (WebCore::WebKitCSSMatrix::rotate):
2107         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
2108         (WebCore::WebKitCSSMatrix::skewX):
2109         (WebCore::WebKitCSSMatrix::skewY):
2110         * css/WebKitCSSMatrix.h:
2111         * css/WebKitCSSTransformValue.cpp:
2112         (WebCore::WebKitCSSTransformValue::cloneForCSSOM):
2113         * css/WebKitCSSTransformValue.h:
2114
2115 2015-08-11  Sam Weinig  <sam@webkit.org>
2116
2117         Move CountQueuingStrategy and related to files to their correct place in the Xcode project
2118         https://bugs.webkit.org/show_bug.cgi?id=147901
2119
2120         Reviewed by Anders Carlsson.
2121
2122         * WebCore.xcodeproj/project.pbxproj:
2123
2124 2015-08-11  Zalan Bujtas  <zalan@apple.com>
2125
2126         Use more references in FrameView.
2127         https://bugs.webkit.org/show_bug.cgi?id=147899
2128
2129         Reviewed by Simon Fraser.
2130
2131         No change in functionality.
2132
2133         * page/FrameView.cpp:
2134         (WebCore::FrameView::flushCompositingStateForThisFrame):
2135         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
2136         (WebCore::FrameView::addSlowRepaintObject):
2137         (WebCore::FrameView::scrollElementToRect):
2138         * page/FrameView.h:
2139         * rendering/RenderObject.cpp:
2140         (WebCore::RenderObject::willBeDestroyed):
2141         * rendering/RenderScrollbarPart.cpp:
2142         (WebCore::RenderScrollbarPart::imageChanged):
2143         * testing/Internals.cpp:
2144         (WebCore::Internals::scrollElementToRect):
2145
2146 2015-08-11  Zalan Bujtas  <zalan@apple.com>
2147
2148         Invalid FrameView::m_viewportRenderer after layout is finished.
2149         https://bugs.webkit.org/show_bug.cgi?id=147848
2150         rdar://problem/22205197
2151
2152         Reviewed by Simon Fraser.
2153
2154         We cache the current viewport renderer (FrameView::m_viewportRenderer) right before layout.
2155         It gets dereferenced later when layout is finished to update the overflow status.
2156         If the viewport renderer gets destroyed during layout, we end up with a dangling pointer.
2157         This patch replaces the pointer caching with type caching (none, body, document).
2158
2159         Unable to construct a test case.
2160
2161 2015-08-11  Brent Fulgham  <bfulgham@apple.com>
2162
2163         [Win] Switch Windows build to Visual Studio 2015
2164         https://bugs.webkit.org/show_bug.cgi?id=147887
2165         <rdar://problem/22235098>
2166
2167         Reviewed by Alex Christensen.
2168
2169         Update Visual Studio project file settings to use the current Visual
2170         Studio and compiler. Continue targeting binaries to run on our minimum
2171         supported configuration of Windows 7.
2172
2173         No change in behavior, so no new tests.
2174
2175         * WebCore.vcxproj/WebCore.vcxproj:
2176         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
2177         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2178
2179 2015-08-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
2180
2181         feMorphology is not rendered correctly on Retina display
2182         https://bugs.webkit.org/show_bug.cgi?id=147589
2183
2184         Reviewed by Dean Jackson.
2185
2186         The result ImageBuffer of any FilterEffect is already scaled up for 2x
2187         display. The FEMorphology needs to fix its painting data dimension and
2188         radius by multiplying them by the filter scale factor.
2189  
2190         Test: fast/hidpi/filters-morphology.html
2191
2192         * platform/graphics/filters/FEMorphology.cpp:
2193         (WebCore::FEMorphology::platformApplySoftware):
2194
2195 2015-08-11  Myles C. Maxfield  <mmaxfield@apple.com>
2196
2197         [iOS] Arabic letter Yeh is drawn in LastResort
2198         https://bugs.webkit.org/show_bug.cgi?id=147862
2199         <rdar://problem/22202935>
2200
2201         Reviewed by Darin Adler.
2202
2203         In order to perform font fallback, we must know which fonts support which characters. We
2204         perform this check by asking each font to map a sequence of codepoints to glyphs, and
2205         any glyphs which end up with a 0 value are unsupported by the font.
2206
2207         One of the mechanisms that we use to do this is to combine the code points into a string,
2208         and tell Core Text to lay out the string. However, this is fundamentally a different
2209         operation than the one we are trying to perform. Strings combine adjacent codepoints into
2210         grapheme clusters, and CoreText operates on these. However, we are trying to gain
2211         information regarding codepoints, not grapheme clusters.
2212
2213         Instead of taking this string-based approach, we should try harder to use Core Text
2214         functions which operate on ordered collections of characters, rather than strings. In
2215         particular, CTFontGetGlyphsForCharacters() and CTFontGetVerticalGlyphsForCharacters()
2216         have the behavior we want where any unmapped characters end up with a 0 value glyph.
2217
2218         Previously, we were only using the result of those functions if they were successfully
2219         able to map their entire input. However, given the fact that we can degrade gracefully
2220         in the case of a partial mapping, we shouldn't need to bail completely to the
2221         string-based approach should a partial mapping occur.
2222
2223         At some point we should delete the string-based approach entirely. However, this path
2224         is still explicitly used for composite fonts. Fixing that use case is out of scope
2225         for this patch.
2226
2227         Test: fast/text/arabic-glyph-cache-fill-combine.html
2228
2229         * platform/graphics/mac/GlyphPageMac.cpp:
2230         (WebCore::GlyphPage::fill):
2231
2232 2015-08-11  Chris Dumez  <cdumez@apple.com>
2233
2234         The 'length' property on interface objects should be configurable
2235         https://bugs.webkit.org/show_bug.cgi?id=147858
2236
2237         Reviewed by Daniel Bates.
2238
2239         Make the 'length' property configurable on interface objects to comply
2240         with the Web IDL specification [1] and to align our behavior with
2241         Firefox 38 and Chrome 44.
2242
2243         This behavior is also covered by the following W3C test suite:
2244         http://w3c-test.org/dom/interfaces.html
2245
2246         [1] http://heycam.github.io/webidl/#es-interface-call (17 July 2015)
2247
2248         Test: fast/dom/length-property-configurable.html
2249
2250         * bindings/scripts/CodeGeneratorJS.pm:
2251         (GenerateConstructorHelperMethods):
2252         Make the 'length' property configurable on interface objects.
2253
2254         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2255         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2256         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2257         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2258         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2259         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2260         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2261         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2262         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2263         (WebCore::JSTestEventTargetConstructor::finishCreation):
2264         * bindings/scripts/test/JS/JSTestException.cpp:
2265         (WebCore::JSTestExceptionConstructor::finishCreation):
2266         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2267         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2268         * bindings/scripts/test/JS/JSTestInterface.cpp:
2269         (WebCore::JSTestInterfaceConstructor::finishCreation):
2270         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2271         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2272         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2273         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2274         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2275         * bindings/scripts/test/JS/JSTestNode.cpp:
2276         (WebCore::JSTestNodeConstructor::finishCreation):
2277         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2278         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2279         * bindings/scripts/test/JS/JSTestObj.cpp:
2280         (WebCore::JSTestObjConstructor::finishCreation):
2281         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2282         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2283         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2284         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2285         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2286         (WebCore::JSTestTypedefsConstructor::finishCreation):
2287         * bindings/scripts/test/JS/JSattribute.cpp:
2288         (WebCore::JSattributeConstructor::finishCreation):
2289         * bindings/scripts/test/JS/JSreadonly.cpp:
2290         (WebCore::JSreadonlyConstructor::finishCreation):
2291         Rebaseline bindings tests.
2292
2293 2015-08-11  Per Arne Vollan  <peavo@outlook.com>
2294
2295         [Win] Popup menus have incorrect placement when device scale factor != 1.
2296         https://bugs.webkit.org/show_bug.cgi?id=147880
2297
2298         Reviewed by Brent Fulgham.
2299
2300         We need to take the device scaling factor into account when calculating
2301         the position and size of the popup menu.
2302
2303         * platform/win/PopupMenuWin.cpp:
2304         (WebCore::PopupMenuWin::calculatePositionAndSize):
2305
2306 2015-08-11  Chris Dumez  <cdumez@apple.com>
2307
2308         [WebIDL] All interface objects must have a property named "name"
2309         https://bugs.webkit.org/show_bug.cgi?id=147865
2310
2311         Reviewed by Darin Adler.
2312
2313         As per the Web IDL specification, all interface objects must have a
2314         property named "name" with attributes
2315         { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
2316         whose value is the identifier of the corresponding interface:
2317         http://heycam.github.io/webidl/#es-interface-call
2318         http://heycam.github.io/webidl/#named-constructors
2319
2320         Previously, our interface objects had no such property, this patch
2321         addresses the problem.
2322
2323         Both Firefox 38 and Chrome 44 comply with the Web IDL specification
2324         here.
2325
2326         Test: fast/dom/interface-name-property.html
2327
2328         * bindings/scripts/CodeGeneratorJS.pm:
2329         (GenerateConstructorHelperMethods):
2330
2331         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2332         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2333         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2334         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2335         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2336         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2337         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2338         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2339         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2340         (WebCore::JSTestEventTargetConstructor::finishCreation):
2341         * bindings/scripts/test/JS/JSTestException.cpp:
2342         (WebCore::JSTestExceptionConstructor::finishCreation):
2343         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2344         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2345         * bindings/scripts/test/JS/JSTestInterface.cpp:
2346         (WebCore::JSTestInterfaceConstructor::finishCreation):
2347         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2348         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2349         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2350         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2351         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2352         * bindings/scripts/test/JS/JSTestNode.cpp:
2353         (WebCore::JSTestNodeConstructor::finishCreation):
2354         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2355         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2356         * bindings/scripts/test/JS/JSTestObj.cpp:
2357         (WebCore::JSTestObjConstructor::finishCreation):
2358         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2359         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2360         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2361         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2362         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2363         (WebCore::JSTestTypedefsConstructor::finishCreation):
2364         * bindings/scripts/test/JS/JSattribute.cpp:
2365         (WebCore::JSattributeConstructor::finishCreation):
2366         * bindings/scripts/test/JS/JSreadonly.cpp:
2367         (WebCore::JSreadonlyConstructor::finishCreation):
2368         Rebaseline bindings tests.
2369
2370 2015-08-11  Ting-Wei Lan  <lantw44@gmail.com>
2371
2372         Fix debug build when optimization is enabled
2373         https://bugs.webkit.org/show_bug.cgi?id=147816
2374
2375         Reviewed by Alexey Proskuryakov.
2376
2377         No new tests because this is only a build fix.
2378
2379         * editing/InsertNodeBeforeCommand.cpp:
2380
2381 2015-08-11  Chris Dumez  <cdumez@apple.com>
2382
2383         Unreviewed, rebaseline bindings tests after r188252.
2384
2385         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2386         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2387         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2388         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2389         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2390         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2391         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2392         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2393         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2394         (WebCore::JSTestEventTargetConstructor::finishCreation):
2395         * bindings/scripts/test/JS/JSTestException.cpp:
2396         (WebCore::JSTestExceptionConstructor::finishCreation):
2397         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2398         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2399         * bindings/scripts/test/JS/JSTestInterface.cpp:
2400         (WebCore::JSTestInterfaceConstructor::finishCreation):
2401         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2402         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2403         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2404         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2405         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2406         * bindings/scripts/test/JS/JSTestNode.cpp:
2407         (WebCore::JSTestNodeConstructor::finishCreation):
2408         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2409         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2410         * bindings/scripts/test/JS/JSTestObj.cpp:
2411         (WebCore::JSTestObjConstructor::finishCreation):
2412         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2413         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2414         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2415         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2416         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2417         (WebCore::JSTestTypedefsConstructor::finishCreation):
2418         * bindings/scripts/test/JS/JSattribute.cpp:
2419         (WebCore::JSattributeConstructor::finishCreation):
2420         * bindings/scripts/test/JS/JSreadonly.cpp:
2421         (WebCore::JSreadonlyConstructor::finishCreation):
2422
2423 2015-08-10  Chris Dumez  <cdumez@apple.com>
2424
2425         The 'prototype' property on interface objects should not be enumerable
2426         https://bugs.webkit.org/show_bug.cgi?id=147861
2427
2428         Reviewed by Darin Adler.
2429
2430         1. Make the 'prototype' property not enumerable on interface object to
2431            comply with the Web IDL specification [1] and to align our behavior
2432            with Firefox 38 and Chrome 44.
2433
2434         2. Also update the 'prototype' property on named constructors to have the
2435            following attributes:
2436            { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }
2437
2438            Previously, all these were true in WebKit. The new behavior complies
2439            with the Web IDL specification [2] and aligns our behavior with
2440            Firefox 38. On Chrome 44, the attributes are as follows:
2441            { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false }
2442
2443         This behavior is also covered by the following W3C test suite:
2444         http://w3c-test.org/dom/interfaces.html
2445
2446         [1] http://heycam.github.io/webidl/#interface-object
2447         [2] http://heycam.github.io/webidl/#named-constructors
2448
2449         Test: fast/dom/prototype-property-not-enumerable.html
2450
2451         * bindings/scripts/CodeGeneratorJS.pm:
2452         (GenerateConstructorHelperMethods):
2453
2454 2015-08-10  Alex Christensen  <achristensen@webkit.org>
2455
2456         Build fix after r188239.
2457
2458         * PlatformWinCairo.cmake:
2459         MediaPlayerPrivateMediaFoundation is needed on WinCairo with video properly enabled.
2460
2461 2015-08-10  Myles C. Maxfield  <mmaxfield@apple.com>
2462
2463         Post-review fixup after r188195
2464         https://bugs.webkit.org/show_bug.cgi?id=147806
2465
2466         Unreviewed.
2467
2468         Covered by fast/text/crash-obscure-text.html.
2469
2470         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2471         (WebCore::FontPlatformData::objectForEqualityCheck):
2472
2473 2015-08-10  Alex Christensen  <achristensen@webkit.org>
2474
2475         Build TestWebKitAPI with CMake on Windows
2476         https://bugs.webkit.org/show_bug.cgi?id=147851
2477
2478         Reviewed by Chris Dumez.
2479
2480         * PlatformWin.cmake:
2481         Remove RenderThemeWin.cpp which is included in RenderingAllInOne.cpp.
2482         * WebCorePrefix.h:
2483         Include cmakeconfig.h before wtf/Platform.h like we do in JavaScriptCore's config.h to avoid warnings and redefining ENABLE_*  macros.
2484
2485 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
2486
2487         HTMLMediaElement needs way to find MediaDeviceInfo
2488         https://bugs.webkit.org/show_bug.cgi?id=147842
2489
2490         Reviewed by Jer Noble.
2491
2492         * html/HTMLMediaElement.cpp:
2493         (WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory):
2494         * html/HTMLMediaElement.h:
2495         * page/Settings.h:
2496         (WebCore::Settings::setMediaDeviceIdentifierStorageDirectory):
2497         (WebCore::Settings::mediaDeviceIdentifierStorageDirectory):
2498         * platform/graphics/MediaPlayer.h:
2499         (WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory):
2500
2501 2015-08-10  Chris Dumez  <cdumez@apple.com>
2502
2503         Simplify code for making Page-cacheability decision
2504         https://bugs.webkit.org/show_bug.cgi?id=147829
2505
2506         Reviewed by Antti Koivisto.
2507
2508         Simplify code for making Page-cacheability decision by merging logging
2509         code and decision making code. Having the same checks in two places was
2510         redundant and error-prone as we needed to keep them in sync.
2511
2512         Also get rid of failure reason enum values as those have not been used
2513         in a while.
2514
2515         * history/PageCache.cpp:
2516         (WebCore::canCacheFrame):
2517         (WebCore::canCachePage):
2518         (WebCore::PageCache::canCache):
2519         (WebCore::logPageCacheFailureDiagnosticMessage): Deleted.
2520         (WebCore::PageCache::singleton): Deleted.
2521         (WebCore::PageCache::setMaxSize): Deleted.
2522         (WebCore::PageCache::frameCount): Deleted.
2523         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
2524         (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
2525         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Deleted.
2526         (WebCore::PageCache::markPagesForContentsSizeChanged): Deleted.
2527         (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Deleted.
2528         (WebCore::pruningReasonToDiagnosticLoggingKey): Deleted.
2529         * page/DiagnosticLoggingKeys.cpp:
2530         (WebCore::DiagnosticLoggingKeys::isDisabledKey):
2531         (WebCore::DiagnosticLoggingKeys::redirectKey):
2532         (WebCore::DiagnosticLoggingKeys::replaceKey):
2533         (WebCore::DiagnosticLoggingKeys::sourceKey):
2534         (WebCore::DiagnosticLoggingKeys::underMemoryPressureKey):
2535         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey): Deleted.
2536         * page/DiagnosticLoggingKeys.h:
2537
2538 2015-08-10  Devin Rousso  <drousso@apple.com>
2539
2540         Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
2541         https://bugs.webkit.org/show_bug.cgi?id=147033
2542
2543         Reviewed by Joseph Pecoraro.
2544
2545         Implement systemFontFamilies for iOS.
2546
2547         * platform/graphics/ios/FontCacheIOS.mm:
2548         (WebCore::FontCache::systemFontFamilies):
2549
2550 2015-08-10  Devin Rousso  <drousso@apple.com>
2551
2552         Web Inspector: Invalid selectors can be applied to the stylesheet
2553         https://bugs.webkit.org/show_bug.cgi?id=147230
2554
2555         Reviewed by Timothy Hatcher.
2556
2557         * inspector/InspectorStyleSheet.cpp:
2558         (WebCore::isValidSelectorListString):
2559         (WebCore::InspectorStyleSheet::setRuleSelector):
2560         Now checks to see that the supplied selector is valid before trying to commit it to the rule.
2561         (WebCore::InspectorStyleSheet::addRule):
2562         (WebCore::checkStyleRuleSelector): Deleted.
2563
2564 2015-08-10  James Craig  <jcraig@apple.com>
2565
2566         AX: Address follow-up comments in bug 145684
2567         https://bugs.webkit.org/show_bug.cgi?id=147817
2568
2569         Reviewed by Dean Jackson.
2570
2571         Minor cleanup and style updates requested by Dean.
2572         Updated Existing Test Expectations.
2573
2574         * Modules/mediacontrols/mediaControlsApple.css:
2575         (video::-webkit-media-show-controls):
2576         * Modules/mediacontrols/mediaControlsiOS.css:
2577         (video::-webkit-media-show-controls):
2578
2579 2015-08-07  Antti Koivisto  <antti@apple.com>
2580
2581         Expand network cache tests to cover memory cache behavior
2582         https://bugs.webkit.org/show_bug.cgi?id=147783
2583
2584         Reviewed by Alexey Proskuryakov.
2585
2586         To support testing, include memory cache as a possible source type to XHR responses.
2587
2588         * loader/ResourceLoader.cpp:
2589         (WebCore::logResourceResponseSource):
2590         * loader/cache/CachedRawResource.cpp:
2591         (WebCore::CachedRawResource::didAddClient):
2592         * loader/cache/CachedResource.h:
2593         (WebCore::CachedResource::revalidationInProgress):
2594         * platform/network/ResourceResponseBase.h:
2595         * testing/Internals.cpp:
2596         (WebCore::Internals::xhrResponseSource):
2597
2598 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2599
2600         Compile warning (-Wsign-compare) on 32-bits at WebCore/platform/FileSystem.cpp
2601         https://bugs.webkit.org/show_bug.cgi?id=146414
2602
2603         Reviewed by Darin Adler.
2604
2605         No behavioral changes.
2606
2607         * platform/FileSystem.cpp:
2608         (WebCore::MappedFileData::MappedFileData): Making use of convertSafely.
2609         * platform/posix/SharedBufferPOSIX.cpp:
2610         (WebCore::SharedBuffer::createFromReadingFile): Making use of convertSafely.
2611
2612 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2613
2614         [Streams API] ReadableStreamReader closed promise should use CachedAttribute
2615         https://bugs.webkit.org/show_bug.cgi?id=147487
2616
2617         Reviewed by Darin Adler.
2618
2619         Covered by existing tests.
2620
2621         * Modules/streams/ReadableStreamReader.idl: Made closed a CachedAttribute.
2622         * bindings/js/JSReadableStreamReaderCustom.cpp:
2623         (WebCore::JSReadableStreamReader::closed): Updated according CachedAttribute specific field.
2624
2625 2015-08-09  Hunseop Jeong  <hs85.jeong@samsung.com>
2626
2627         [EFL] Use the non-overlay scrollbar
2628         https://bugs.webkit.org/show_bug.cgi?id=147725
2629
2630         Reviewed by Gyuyoung Kim.
2631
2632         No new tests because there is no behavior change.
2633
2634         * platform/efl/ScrollbarThemeEfl.cpp:
2635         (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
2636         Changed the condition of the 'usesOverlayScrollbars' to use the
2637         setting value.
2638         * platform/efl/ScrollbarThemeEfl.h:
2639
2640 2015-08-09  Chris Dumez  <cdumez@apple.com>
2641
2642         Page cache doesn't work for pages actively using Geolocation
2643         https://bugs.webkit.org/show_bug.cgi?id=147785
2644         <rdar://problem/11147901>
2645
2646         Reviewed by Darin Adler.
2647
2648         Allow pages actively using Geolocation into the PageCache.
2649
2650         Tests: fast/history/page-cache-geolocation-active-oneshot.html
2651                fast/history/page-cache-geolocation-active-watcher.html
2652
2653         * Modules/geolocation/Geolocation.cpp:
2654         (WebCore::Geolocation::canSuspendForPageCache):
2655         (WebCore::Geolocation::suspend): Deleted.
2656         * history/PageCache.cpp:
2657
2658 2015-08-09  Nan Wang  <n_wang@apple.com>
2659
2660         AX: CSS table display styles can cause malformed, inaccessible AXTables to be exposed to the AX tree
2661         https://bugs.webkit.org/show_bug.cgi?id=136415
2662         <rdar://problem/22026625>
2663
2664         Reviewed by Chris Fleizach.
2665
2666         Applying CSS display styles to tables can end up inserting anonymous RenderTableRows, which is not handled well by the 
2667         accessibility code, which treats these as the actual rows. We can address this by diving deeper into anonymous nodes 
2668         and finding the real rows and cells we want. In addition, another thing also causing malformed tables is that "grid" 
2669         roles are being exposed as AXGrid instead of AXTable.
2670
2671         Test: accessibility/mac/malformed-table.html
2672
2673         * accessibility/AccessibilityARIAGrid.cpp:
2674         (WebCore::AccessibilityARIAGrid::addRowDescendant):
2675         * accessibility/AccessibilityTable.cpp:
2676         (WebCore::AccessibilityTable::addChildren):
2677         (WebCore::AccessibilityTable::addTableCellChild):
2678         (WebCore::AccessibilityTable::addChildrenFromSection):
2679         * accessibility/AccessibilityTable.h:
2680         * accessibility/AccessibilityTableCell.cpp:
2681         (WebCore::AccessibilityTableCell::parentTable):
2682         (WebCore::AccessibilityTableCell::rowIndexRange):
2683         * accessibility/AccessibilityTableRow.cpp:
2684         (WebCore::AccessibilityTableRow::parentTable):
2685         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2686         (createAccessibilityRoleMap):
2687
2688 2015-08-08  Darin Adler  <darin@apple.com>
2689
2690         Remove -webkit-color-correction CSS property
2691         https://bugs.webkit.org/show_bug.cgi?id=147812
2692
2693         Reviewed by Maciej Stachowiak.
2694
2695         Covered by existing tests.
2696
2697         I am doing some general cleanup of handling of color spaces in WebKit.
2698         This removes the obsolete web-visible property that allowed clients to
2699         get color correction on older Apple platforms where we chose not to do
2700         it all the time for performance reasons. Currently, it has no effect on
2701         any supported platform.
2702
2703         Now that this property is removed, a website can detect that it's not
2704         there if it uses getComputedStyle, but I don't expect this to have
2705         significant compatibility fallout. It's harmless to continue using the
2706         property in legacy content or websites that have not been updated, since
2707         unknown property names are ignored and it had no effect before anyway.
2708
2709         * css/CSSComputedStyleDeclaration.cpp: Removed
2710         CSSPropertyWebkitColorCorrection from the list of computed properties.
2711         (WebCore::ComputedStyleExtractor::propertyValue): Removed the
2712         CSSPropertyWebkitColorCorrection case.
2713
2714         * css/CSSParser.cpp:
2715         (WebCore::isValidKeywordPropertyAndValue): Removed the
2716         CSSPropertyWebkitColorCorrection case.
2717         (WebCore::isKeywordPropertyID): Ditto.
2718         (WebCore::CSSParser::parseValue): Ditto.
2719
2720         * css/CSSPrimitiveValueMappings.h:
2721         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted the overload
2722         of this that converts a ColorSpace to a CSSPrimitiveValue.
2723         (WebCore::CSSPrimitiveValue::operator ColorSpace): Deleted.
2724
2725         * css/CSSPropertyNames.in: Removed -webkit-color-correction.
2726
2727         * css/CSSValueKeywords.in: Removed the -webkit-color-correction section,
2728         which contained sRGB.
2729
2730         * css/SVGCSSValueKeywords.in: Uncommented sRGB now that it's not shared
2731         with -webkit-color-correction.
2732
2733         * rendering/style/RenderStyle.h: Removed setColorSpace and initialColorSpace.
2734         Kept colorSpace around for now, but it simply returns ColorSpaceSRGB.
2735         This prevents us from needing to touch every single call site that passes
2736         the color space in to functions in the platform graphics abstraction.
2737         We'll touch most of those call sites when we change Color to include the
2738         color space and eventually we can delete this.
2739
2740         * rendering/style/StyleRareInheritedData.cpp: Deleted colorSpace.
2741         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted
2742         code to initialize colorSpace and to copy colorSpace.
2743         (WebCore::StyleRareInheritedData::operator==): Deleted code to compare
2744         colorSpace.
2745
2746 2015-08-09  Eric Carlson  <eric.carlson@apple.com>
2747
2748         [Mac] Always require ExternalDeviceAutoPlayCandidate flag to AirPlay automatically
2749         https://bugs.webkit.org/show_bug.cgi?id=147801
2750
2751         Reviewed by Dean Jackson.
2752
2753         Test: http/tests/media/video-media-document-disposition-download.html
2754
2755         * Modules/mediasession/WebMediaSessionManager.cpp:
2756         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't tell the last element
2757           to begin playing to the target unless the ExternalDeviceAutoPlayCandidate flag is set and 
2758           it is not currently playing.
2759
2760 2015-08-09  Myles C. Maxfield  <mmaxfield@apple.com>
2761
2762         Crash in ComplexTextController when laying out obscure text
2763         https://bugs.webkit.org/show_bug.cgi?id=147806
2764         <rdar://problem/22102378>
2765
2766         Reviewed by Darin Adler.
2767
2768         CTFontDescriptorCopyAttribute(fontDescriptor.get(), kCTFontReferenceURLAttribute) can return nullptr.
2769
2770         Test: fast/text/crash-obscure-text.html
2771
2772         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2773         (WebCore::safeCFEqual):
2774         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2775
2776 2015-08-08  Dean Jackson  <dino@apple.com>
2777
2778         Remove the webkit prefix from CanvasRenderingContext2D imageSmoothingEnabled
2779         https://bugs.webkit.org/show_bug.cgi?id=147803
2780         <rdar://problem/22200553>
2781
2782         Reviewed by Sam Weinig.
2783
2784         Rename webkitImageSmoothingEnabled to imageSmoothingEnabled.
2785
2786         Updated existing tests, and made sure that the prefixed version is
2787         identical to the standard version.
2788
2789         * html/canvas/CanvasRenderingContext2D.cpp:
2790         (WebCore::CanvasRenderingContext2D::imageSmoothingEnabled): Renamed from webkitImageSmoothingEnabled.
2791         (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled): Renamed from setWebkitImageSmoothingEnabled.
2792         (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled): Deleted.
2793         (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled): Deleted.
2794         * html/canvas/CanvasRenderingContext2D.h: Rename the methods.
2795         * html/canvas/CanvasRenderingContext2D.idl: Add the non-prefixed form, and mark is as the
2796         implementation of the prefixed form.
2797
2798 2015-08-09  Andreas Kling  <akling@apple.com>
2799
2800         Ref-ify some functions that always succeed in constructing Documents.
2801         <https://webkit.org/b/147552>
2802
2803         Reviewed by Sam Weinig.
2804
2805         Update some functions involved in the construction of new Document objects
2806         to codify that they always construct objects.
2807
2808         Bonus: DOMImplementation::createCSSStyleSheet().
2809
2810         * dom/DOMImplementation.cpp:
2811         (WebCore::DOMImplementation::createCSSStyleSheet):
2812         (WebCore::DOMImplementation::createHTMLDocument):
2813         (WebCore::DOMImplementation::createDocument):
2814         * dom/DOMImplementation.h:
2815         * loader/DocumentWriter.cpp:
2816         (WebCore::DocumentWriter::createDocument):
2817         (WebCore::DocumentWriter::begin):
2818         * loader/DocumentWriter.h:
2819         * xml/DOMParser.cpp:
2820         (WebCore::DOMParser::parseFromString):
2821         * xml/DOMParser.h:
2822         * xml/XSLTProcessor.cpp:
2823         (WebCore::XSLTProcessor::createDocumentFromSource):
2824         * xml/XSLTProcessor.h:
2825
2826 2015-08-08  Commit Queue  <commit-queue@webkit.org>
2827
2828         Unreviewed, rolling out r179871.
2829         https://bugs.webkit.org/show_bug.cgi?id=147810
2830
2831         Breaks product images on http://www.apple.com/shop/buy-
2832         mac/macbook (Requested by smfr on #webkit).
2833
2834         Reverted changeset:
2835
2836         "Render: properly update body's background image"
2837         https://bugs.webkit.org/show_bug.cgi?id=140183
2838         http://trac.webkit.org/changeset/179871
2839
2840 2015-08-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2841
2842         Reduce uses of PassRefPtr in bindings
2843         https://bugs.webkit.org/show_bug.cgi?id=147781
2844
2845         Reviewed by Chris Dumez.
2846
2847         Use RefPtr when function can return null or an instance. If not, Ref is used.
2848
2849         * bindings/gobject/GObjectNodeFilterCondition.h:
2850         * bindings/gobject/GObjectXPathNSResolver.h:
2851         * bindings/gobject/WebKitDOMNodeFilter.cpp:
2852         (WebKit::core):
2853         * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
2854         * bindings/gobject/WebKitDOMXPathNSResolver.cpp:
2855         (WebKit::core):
2856         * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h:
2857         * bindings/js/CallbackFunction.h:
2858         (WebCore::createFunctionOnlyCallback):
2859         * bindings/js/Dictionary.h:
2860         (WebCore::Dictionary::getEventListener):
2861         * bindings/js/IDBBindingUtilities.cpp:
2862         (WebCore::createIDBKeyFromValue):
2863         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
2864         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
2865         (WebCore::scriptValueToIDBKey):
2866         * bindings/js/IDBBindingUtilities.h:
2867         * bindings/js/JSDOMBinding.h:
2868         (WebCore::toInt8Array):
2869         (WebCore::toInt16Array):
2870         (WebCore::toInt32Array):
2871         (WebCore::toUint8Array):
2872         (WebCore::toUint8ClampedArray):
2873         (WebCore::toUint16Array):
2874         (WebCore::toUint32Array):
2875         (WebCore::toFloat32Array):
2876         (WebCore::toFloat64Array):
2877         * bindings/js/JSDOMStringListCustom.cpp:
2878         (WebCore::JSDOMStringList::toWrapped):
2879         * bindings/js/JSDeviceMotionEventCustom.cpp:
2880         (WebCore::readAccelerationArgument):
2881         (WebCore::readRotationRateArgument):
2882         * bindings/js/JSErrorHandler.h:
2883         (WebCore::createJSErrorHandler):
2884         * bindings/js/JSGeolocationCustom.cpp:
2885         (WebCore::createPositionOptions):
2886         * bindings/js/JSNodeCustom.cpp:
2887         * bindings/js/JSNodeFilterCustom.cpp:
2888         (WebCore::JSNodeFilter::toWrapped):
2889         * bindings/js/ScriptController.cpp:
2890         (WebCore::ScriptController::createWorld):
2891         (WebCore::ScriptController::createRootObject):
2892         (WebCore::ScriptController::createScriptInstanceForWidget):
2893         * bindings/js/ScriptController.h:
2894         * bindings/js/ScriptControllerMac.mm:
2895         (WebCore::ScriptController::createScriptInstanceForWidget):
2896         * bindings/js/SerializedScriptValue.cpp:
2897         (WebCore::SerializedScriptValue::create):
2898         * bindings/js/SerializedScriptValue.h:
2899         * bindings/objc/DOMUIKitExtensions.mm:
2900         (-[DOMNode rangeOfContainingParagraph]):
2901         * bindings/objc/ObjCNodeFilterCondition.h:
2902         * bindings/scripts/CodeGeneratorJS.pm:
2903         (GenerateHeader):
2904
2905 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
2906
2907         [OS X] Remove dead code from FontCache::createFontPlatformData()
2908         https://bugs.webkit.org/show_bug.cgi?id=147804
2909
2910         Reviewed by Zalan Bujtas.
2911
2912         CTFontCreateForCSS() always returns the best font.
2913
2914         No new tests because there is no behavior change.
2915
2916         * platform/graphics/mac/FontCacheMac.mm:
2917         (WebCore::fontWithFamily):
2918
2919 2015-08-07  Zalan Bujtas  <zalan@apple.com>
2920
2921         Move painting functions from RenderObject to RenderElement.
2922         https://bugs.webkit.org/show_bug.cgi?id=147764
2923
2924         Reviewed by Simon Fraser.
2925
2926         Ideally they should live in RenderBoxModelObject, but the current SVG architecture makes is difficult
2927         to move them there.
2928
2929         No change in functionality.
2930
2931         * platform/graphics/FloatRect.h:
2932         (WebCore::FloatRect::FloatRect):
2933         * rendering/RenderBoxModelObject.cpp:
2934         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2935         * rendering/RenderElement.cpp:
2936         (WebCore::RenderElement::drawLineForBoxSide):
2937         (WebCore::RenderElement::paintFocusRing):
2938         (WebCore::RenderElement::paintOutline):
2939         * rendering/RenderElement.h:
2940         * rendering/RenderInline.cpp:
2941         (WebCore::RenderInline::paintOutline):
2942         (WebCore::RenderInline::paintOutlineForLine):
2943         * rendering/RenderMultiColumnSet.cpp:
2944         (WebCore::RenderMultiColumnSet::paintColumnRules):
2945         * rendering/RenderObject.cpp:
2946         (WebCore::RenderObject::drawLineForBoxSide): Deleted.
2947         (WebCore::RenderObject::paintFocusRing): Deleted.
2948         (WebCore::RenderObject::paintOutline): Deleted.
2949         * rendering/RenderObject.h:
2950         * rendering/RenderTableCell.cpp:
2951         (WebCore::RenderTableCell::paintCollapsedBorders):
2952         * rendering/RenderTableSection.cpp:
2953         (WebCore::RenderTableSection::paintRowGroupBorder):
2954         * rendering/RenderTheme.h:
2955         (WebCore::RenderTheme::paintMenuListButtonDecorations):
2956         * rendering/RenderThemeIOS.h:
2957         * rendering/RenderThemeIOS.mm:
2958         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
2959         * rendering/RenderThemeMac.h:
2960         * rendering/RenderThemeMac.mm:
2961         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
2962
2963 2015-08-07  James Craig  <jcraig@apple.com>
2964
2965         REGRESSION(r184722) AX: WebKit video playback toolbar removed from DOM; no longer accessible to VoiceOver
2966         https://bugs.webkit.org/show_bug.cgi?id=145684
2967
2968         Reviewed by Dean Jackson.
2969
2970         Updated Apple Video controls to add an invisible but focusable button that allows VoiceOver 
2971         users (and when unblocked, keyboard users) to re-display the video controls.
2972
2973         Test: media/video-controls-show-on-kb-or-ax-event.html
2974
2975         * English.lproj/mediaControlsLocalizedStrings.js:
2976         * Modules/mediacontrols/mediaControlsApple.css:
2977         (audio::-webkit-media-show-controls):
2978         (video::-webkit-media-show-controls):
2979         * Modules/mediacontrols/mediaControlsApple.js:
2980         (Controller.prototype.createControls):
2981         (Controller.prototype.handleFullscreenChange):
2982         (Controller.prototype.handleShowControlsClick):
2983         (Controller.prototype.handleWrapperMouseMove):
2984         (Controller.prototype.updateForShowingControls):
2985         (Controller.prototype.showControls):
2986         (Controller.prototype.hideControls):
2987         (Controller.prototype.setNeedsUpdateForDisplayedWidth):
2988         * Modules/mediacontrols/mediaControlsiOS.css:
2989         (audio::-webkit-media-show-controls):
2990         (video::-webkit-media-show-controls):
2991
2992 2015-08-07  Alex Christensen  <achristensen@webkit.org>
2993
2994         Build more testing binaries with CMake on Windows
2995         https://bugs.webkit.org/show_bug.cgi?id=147799
2996
2997         Reviewed by Brent Fulgham.
2998
2999         * CMakeLists.txt:
3000         MockCDM.cpp needs to be part of WebCoreTestSupport, not WebCore.
3001         * PlatformWin.cmake:
3002         Added files needed for AppleWin port.
3003
3004 2015-08-07  Anders Carlsson  <andersca@apple.com>
3005
3006         Being moving away from using SQLTransactionStateMachine in SQLTransactionBackend
3007         https://bugs.webkit.org/show_bug.cgi?id=147798
3008
3009         Reviewed by Geoffrey Garen.
3010
3011         This is the first step towards getting rid of the state machine so we can ultimately merge SQLTransactionBackend
3012         into SQLTransaction.
3013
3014         Instead of having the state machine run our functions, just run them ourselves where we can. For states that need
3015         to be handled in the frontend, call SQLTransaction::requestTransitToState explicitly.
3016
3017         * Modules/webdatabase/SQLTransactionBackend.cpp:
3018         (WebCore::SQLTransactionBackend::stateFunctionFor):
3019         (WebCore::SQLTransactionBackend::lockAcquired):
3020         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
3021         (WebCore::SQLTransactionBackend::runStatements):
3022         (WebCore::SQLTransactionBackend::runCurrentStatement):
3023         (WebCore::SQLTransactionBackend::handleCurrentStatementError):
3024         (WebCore::SQLTransactionBackend::handleTransactionError):
3025         (WebCore::SQLTransactionBackend::postflightAndCommit):
3026         (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): Deleted.
3027         (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): Deleted.
3028         (WebCore::SQLTransactionBackend::nextStateForTransactionError): Deleted.
3029         (WebCore::SQLTransactionBackend::sendToFrontendState): Deleted.
3030         * Modules/webdatabase/SQLTransactionBackend.h:
3031
3032 2015-08-07  Filip Pizlo  <fpizlo@apple.com>
3033
3034         Lightweight locks should be adaptive
3035         https://bugs.webkit.org/show_bug.cgi?id=147545
3036
3037         Reviewed by Geoffrey Garen.
3038
3039         * bindings/objc/WebScriptObject.mm:
3040         (WebCore::getJSWrapper):
3041         (WebCore::addJSWrapper):
3042         (WebCore::removeJSWrapper):
3043         (WebCore::removeJSWrapperIfRetainCountOne):
3044         * platform/audio/mac/CARingBuffer.cpp:
3045         (WebCore::CARingBuffer::setCurrentFrameBounds):
3046         (WebCore::CARingBuffer::getCurrentFrameBounds):
3047         * platform/audio/mac/CARingBuffer.h:
3048         * platform/ios/wak/WAKWindow.mm:
3049         (-[WAKWindow setExposedScrollViewRect:]):
3050         (-[WAKWindow exposedScrollViewRect]):
3051
3052 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
3053
3054         Post-review comments on r188146
3055         https://bugs.webkit.org/show_bug.cgi?id=147793
3056
3057         Reviewed by Daniel Bates.
3058
3059         No new tests because there is no behavior change.
3060
3061         * platform/graphics/FontCache.h:
3062         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3063         (WebCore::appendTrueTypeFeature):
3064         (WebCore::appendOpenTypeFeature):
3065         (WebCore::applyFontFeatureSettings):
3066         * platform/graphics/ios/FontCacheIOS.mm:
3067         (WebCore::FontCache::getSystemFontFallbackForCharacters):
3068         (WebCore::FontCache::createFontPlatformData):
3069         * platform/graphics/mac/FontCacheMac.mm:
3070         (WebCore::fontWithFamily):
3071         (WebCore::FontCache::systemFallbackForCharacters):
3072         * platform/graphics/mac/FontCustomPlatformData.cpp:
3073         (WebCore::FontCustomPlatformData::fontPlatformData):
3074         * rendering/RenderThemeIOS.mm:
3075         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3076
3077 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
3078
3079         [Cocoa] Font fallback is not language-sensitive
3080         https://bugs.webkit.org/show_bug.cgi?id=147390
3081
3082         Reviewed by Dean Jackson.
3083
3084         We need to make our font fallback code sensitive to locale.
3085
3086         This patch rolls r187729 back in. However, only particular versions of iOS and OS X are
3087         performant enough to enable this language-sensitivity.
3088
3089         This patch also applies to iOS.
3090
3091         Test: fast/text/fallback-language-han.html
3092
3093         * platform/graphics/mac/FontCacheMac.mm:
3094         (WebCore::lookupCTFont):
3095         (WebCore::FontCache::systemFallbackForCharacters):
3096         * platform/graphics/mac/FontCacheIOS.mm:
3097         (WebCore::FontCache::systemFallbackForCharacters):
3098
3099 2015-08-07  Zalan Bujtas  <zalan@apple.com>
3100
3101         RenderTheme::volumeSliderOffsetFromMuteButton should take const& RenderBox.
3102         https://bugs.webkit.org/show_bug.cgi?id=147731
3103
3104         Reviewed by Simon Fraser.
3105
3106         No change in functionality.
3107
3108         * rendering/RenderMediaControlElements.cpp:
3109         (WebCore::RenderMediaVolumeSliderContainer::layout):
3110         * rendering/RenderMediaControls.cpp:
3111         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): Deleted.
3112         * rendering/RenderMediaControls.h:
3113         * rendering/RenderTheme.cpp:
3114         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
3115         * rendering/RenderTheme.h:
3116
3117 2015-08-07  Zalan Bujtas  <zalan@apple.com>
3118
3119         Replace RenderObject::isRooted() logic with isDescendantOf().
3120         https://bugs.webkit.org/show_bug.cgi?id=147788
3121
3122         Reviewed by Simon Fraser.
3123
3124         And some related cleanups.
3125
3126         No change in functionality.
3127
3128         * page/FrameView.cpp:
3129         (WebCore::FrameView::scheduleRelayoutOfSubtree):
3130         (WebCore::FrameView::extendedBackgroundRectForPainting):
3131         * rendering/RenderBox.cpp:
3132         (WebCore::RenderBox::paintRootBoxFillLayers):
3133         * rendering/RenderElement.cpp:
3134         (WebCore::shouldRepaintForImageAnimation):
3135         * rendering/RenderObject.cpp:
3136         (WebCore::RenderObject::isDescendantOf):
3137         (WebCore::scheduleRelayoutForSubtree):
3138         (WebCore::RenderObject::repaint):
3139         (WebCore::RenderObject::repaintRectangle):
3140         (WebCore::RenderObject::repaintSlowRepaintObject):
3141         (WebCore::RenderObject::isRooted):
3142         * rendering/RenderObject.h:
3143         * rendering/RenderView.cpp:
3144         (WebCore::RenderView::unextendedBackgroundRect):
3145         (WebCore::RenderView::backgroundRect):
3146         * rendering/RenderView.h:
3147
3148 2015-08-07  Zalan Bujtas  <zalan@apple.com>
3149
3150         Subtree layout code should use RenderElement.
3151         https://bugs.webkit.org/show_bug.cgi?id=147694
3152
3153         Reviewed by Simon Fraser.
3154
3155         Subtree layout will never begin at a RenderText, so tighten up
3156         the code to operate on RenderElements instead of RenderObjects.
3157         (This patch is based on webkit.org/b/126878)
3158
3159         No change in functionality.
3160
3161         * inspector/InspectorTimelineAgent.cpp:
3162         (WebCore::InspectorTimelineAgent::willLayout):
3163         * page/FrameView.cpp:
3164         (WebCore::FrameView::FrameView): Deleted.
3165         (WebCore::FrameView::layoutRoot): Deleted.
3166         * page/FrameView.h:
3167         * rendering/RenderBox.cpp:
3168         (WebCore::RenderBox::computeLogicalWidthInRegion):
3169         * rendering/RenderElement.cpp:
3170         (WebCore::RenderElement::clearLayoutRootIfNeeded):
3171         (WebCore::RenderElement::willBeDestroyed):
3172         * rendering/RenderElement.h:
3173         * rendering/RenderObject.cpp:
3174         (WebCore::RenderObject::clearLayoutRootIfNeeded): Deleted.
3175         (WebCore::RenderObject::willBeDestroyed): Deleted.
3176         * rendering/RenderObject.h:
3177
3178 2015-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
3179
3180         Temporarily allow programmatic input assistance for adding Gmail account
3181         https://bugs.webkit.org/show_bug.cgi?id=147792
3182
3183         Reviewed by Enrica Casucci.
3184         <rdar://problem/22126518>
3185
3186         Temporary fix for keyboard input sliding out and immediately back in upon user interaction
3187         in the Gmail 2-factor authentication page.
3188
3189         * platform/RuntimeApplicationChecksIOS.h:
3190         * platform/RuntimeApplicationChecksIOS.mm:
3191         (WebCore::applicationIsGmailAddAccountOnIOS): Added bundle ID for Gmail settings.
3192
3193 2015-08-07  Andy Estes  <aestes@apple.com>
3194
3195         Crash when following a Google search link to Twitter with Limit Adult Content enabled
3196         https://bugs.webkit.org/show_bug.cgi?id=147651
3197
3198         Reviewed by Brady Eidson.
3199
3200         When a loaded CachedRawResource gets a new client, it synthesizes the callbacks that the new client would have
3201         received while the resource was loading. Unlike a real network load, it synthesizes these callbacks in a single
3202         run loop iteration. When DocumentLoader receives a redirect, and finds substitute data in the app cache for the
3203         redirect URL, it schedules a timer that removes DocumentLoader as a client of the CachedRawResource then
3204         synthesizes its own set of CachedRawResourceClient callbacks. But since CachedRawResource has already delivered
3205         client callbacks before the app cache timer fires, DocumentLoader unexpectedly ends up getting two sets of
3206         client callbacks and badness ensues.
3207
3208         The fix is to let CachedRawResource detect if a redirect will trigger the client to load substitute data. If so,
3209         stop delivering client callbacks.
3210
3211         Layout test to follow.
3212
3213         * loader/DocumentLoader.cpp:
3214         (WebCore::DocumentLoader::syntheticRedirectReceived): If there is valid substitute data, do not continue.
3215         * loader/DocumentLoader.h:
3216         * loader/cache/CachedRawResource.cpp: Returned early if syntheticRedirectReceived() said not to continue.
3217         (WebCore::CachedRawResource::didAddClient):
3218         * loader/cache/CachedRawResourceClient.h:
3219         (WebCore::CachedRawResourceClient::syntheticRedirectReceived):
3220
3221 2015-08-06  Dean Jackson  <dino@apple.com>
3222
3223         Shadows don't draw on fillText when using a gradient fill
3224         https://bugs.webkit.org/show_bug.cgi?id=147758
3225         <rdar://problem/20860912>
3226
3227         Reviewed by Myles Maxfield.
3228
3229         Since we use a mask to render a pattern or gradient
3230         into text, any shadow was being clipped out. Change
3231         this to draw the shadow before the mask + fill operation,
3232         using a technique similar to text-shadow.
3233
3234         Test: fast/canvas/gradient-text-with-shadow.html
3235
3236         * html/canvas/CanvasRenderingContext2D.cpp:
3237         (WebCore::CanvasRenderingContext2D::drawTextInternal): Get the current shadow
3238         style, paint the text with a transformed shadow offset so that we only
3239         see the shadow and not the text, then combine with the existing pattern/gradient
3240         fill.
3241
3242 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
3243
3244         Implement font-feature-settings
3245         https://bugs.webkit.org/show_bug.cgi?id=147722
3246
3247         Reviewed by Simon Fraser.
3248
3249         Fonts with features are simply modeled as new font objects. Font
3250         feature information is contained within FontDescription, and our
3251         caches are correctly sensitive to this information. Therefore,
3252         we just need to make our font lookup code honor the request to
3253         use certain features.
3254
3255         This patch creates a file, FontCacheCoreText.cpp, which will be the
3256         new home of all shared OS X / iOS FontCache code. Over time, I will
3257         be moving more and more source into this file, until there is
3258         nothing left of FontCacheMac.mm and FontCacheIOS.mm. For now, the
3259         only function in this file is the code which applies font features.
3260
3261         Test: css3/font-feature-settings-preinstalled-fonts.html
3262
3263         * WebCore.xcodeproj/project.pbxproj: Add FontCacheCoreText.cpp.
3264         * platform/graphics/FontCache.h:
3265         * platform/graphics/cocoa/FontCacheCoreText.cpp: Added.
3266         (WebCore::appendTrueTypeFeature): What the name says.
3267         (WebCore::appendOpenTypeFeature): Ditto.
3268         (WebCore::applyFontFeatureSettings): Ditto.
3269         * platform/graphics/ios/FontCacheIOS.mm:
3270         (WebCore::FontCache::getSystemFontFallbackForCharacters): Call
3271         applyFontFeatureSettings().
3272         (WebCore::FontCache::createFontPlatformData): Ditto.
3273         * platform/graphics/mac/FontCacheMac.mm:
3274         (WebCore::fontWithFamily): Ditto.
3275         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
3276         (WebCore::FontCache::createFontPlatformData): Ditto.
3277         * platform/graphics/mac/FontCustomPlatformData.cpp:
3278         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
3279         * rendering/RenderThemeIOS.mm:
3280         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3281         Ditto.
3282
3283 2015-08-07  Commit Queue  <commit-queue@webkit.org>
3284
3285         Unreviewed, rolling out r187907.
3286         https://bugs.webkit.org/show_bug.cgi?id=147789
3287
3288         taking a different approach to the fix (Requested by estes on
3289         #webkit).
3290
3291         Reverted changeset:
3292
3293         "Crash when following a Google search link to Twitter with
3294         Limit Adult Content enabled."
3295         https://bugs.webkit.org/show_bug.cgi?id=147651
3296         http://trac.webkit.org/changeset/187907
3297
3298 2015-08-07  Alex Christensen  <achristensen@webkit.org>
3299
3300         Fix WinCairo build after r188130.
3301
3302         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
3303         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3304         (WebCore::FontCustomPlatformData::fontPlatformData):
3305         I forgot the parameter name.
3306
3307 2015-08-07  Alex Christensen  <achristensen@webkit.org>
3308
3309         Fix WinCairo build after r188130.
3310
3311         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
3312         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3313         (WebCore::FontCustomPlatformData::fontPlatformData):
3314         Update fontPlatformData parameters.
3315
3316 2015-08-07  Daniel Bates  <dabates@apple.com>
3317
3318         Attempt to fix the Windows build after <http://trac.webkit.org/changeset/188130>
3319         (https://bugs.webkit.org/show_bug.cgi?id=147775)
3320
3321         Include header FontDescription.h.
3322
3323         * platform/graphics/win/FontCustomPlatformData.cpp:
3324         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
3325
3326 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
3327
3328         Allow FontCustomPlatformData to consult with FontDescription
3329         https://bugs.webkit.org/show_bug.cgi?id=147775
3330
3331         Reviewed by Zalan Bujtas.
3332
3333         In order to implement font-feature-settings, web fonts need to be
3334         able to consult with the set of active font features. Rather than
3335         add yet another argument to all the functions in this flow, this
3336         patch passes around a reference to the FontDescription itself instead
3337         of copies of constituent members of it.
3338
3339         No new tests because there is no behavior change.
3340
3341         * css/CSSFontFaceSource.cpp:
3342         (WebCore::CSSFontFaceSource::font):
3343         * loader/cache/CachedFont.cpp:
3344         (WebCore::CachedFont::createFont):
3345         (WebCore::CachedFont::platformDataFromCustomData):
3346         * loader/cache/CachedFont.h:
3347         * loader/cache/CachedSVGFont.cpp:
3348         (WebCore::CachedSVGFont::platformDataFromCustomData):
3349         * loader/cache/CachedSVGFont.h:
3350         * platform/graphics/cairo/FontCustomPlatformData.h:
3351         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
3352         (WebCore::FontCustomPlatformData::fontPlatformData):
3353         * platform/graphics/freetype/FontPlatformData.h:
3354         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3355         (WebCore::FontPlatformData::FontPlatformData):
3356         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3357         (WebCore::Font::platformCreateScaledFont):
3358         * platform/graphics/mac/FontCustomPlatformData.cpp:
3359         (WebCore::FontCustomPlatformData::fontPlatformData):
3360         * platform/graphics/mac/FontCustomPlatformData.h:
3361         * platform/graphics/win/FontCustomPlatformData.cpp:
3362         (WebCore::FontCustomPlatformData::fontPlatformData):
3363         * platform/graphics/win/FontCustomPlatformData.h:
3364
3365 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3366
3367         [Streams API] Create CountQueuingStrategy object as per spec
3368         https://bugs.webkit.org/show_bug.cgi?id=146594
3369
3370         Reviewed by Geoffrey Garen.
3371
3372         CountQueuingStrategy is a class part of the Streams API that can be found at
3373         https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
3374         natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
3375         the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
3376         do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
3377         property taking it from the argument.
3378
3379         Covered by current tests
3380         (LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
3381         LayoutTests/streams/reference-implementation/brand-checks.html).
3382
3383         * CMakeLists.txt:
3384         * DerivedSources.cpp:
3385         * DerivedSources.make:
3386         * PlatformMac.cmake:
3387         * WebCore.vcxproj/WebCore.vcxproj:
3388         * WebCore.vcxproj/WebCore.vcxproj.filters:
3389         * WebCore.xcodeproj/project.pbxproj:
3390         * bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
3391         * Modules/streams/CountQueuingStrategy.h: Added.
3392         (WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
3393         (WebCore::CountQueuingStrategy::size): Returns 1.
3394         * Modules/streams/CountQueuingStrategy.idl: Added.
3395         * bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
3396         (WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
3397         (WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
3398         and returns it.
3399         * bindings/js/JSDOMBinding.h:
3400         (WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
3401         (WebCore::setPropertyToObject): Added to create a property into an object.
3402         * bindings/js/ReadableJSStream.cpp:
3403         (WebCore::getPropertyFromObject): Deleted.
3404
3405 2015-08-07  Brady Eidson  <beidson@apple.com>
3406
3407         Move concrete KeyedDecoder/Encoder implementations to WebCore.
3408         https://bugs.webkit.org/show_bug.cgi?id=147757.
3409
3410         Rubberstamped by Andy Estes.
3411
3412         * PlatformEfl.cmake:
3413         * PlatformGTK.cmake:
3414         * WebCore.xcodeproj/project.pbxproj:
3415
3416         * platform/KeyedCoding.h:
3417         (WebCore::KeyedDecoder::KeyedDecoder): Static constructor to be implemented per-platform.
3418         (WebCore::KeyedEncoder::KeyedEncoder): Ditto.
3419
3420         * platform/cf/KeyedDecoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.cpp.
3421         (WebCore::KeyedDecoder::decoder):
3422         (WebCore::KeyedDecoderCF::KeyedDecoderCF):
3423         (WebCore::KeyedDecoderCF::~KeyedDecoderCF):
3424         (WebCore::KeyedDecoderCF::decodeBytes):
3425         (WebCore::KeyedDecoderCF::decodeBool):
3426         (WebCore::KeyedDecoderCF::decodeUInt32):
3427         (WebCore::KeyedDecoderCF::decodeInt32):
3428         (WebCore::KeyedDecoderCF::decodeInt64):
3429         (WebCore::KeyedDecoderCF::decodeFloat):
3430         (WebCore::KeyedDecoderCF::decodeDouble):
3431         (WebCore::KeyedDecoderCF::decodeString):
3432         (WebCore::KeyedDecoderCF::beginObject):
3433         (WebCore::KeyedDecoderCF::endObject):
3434         (WebCore::KeyedDecoderCF::beginArray):
3435         (WebCore::KeyedDecoderCF::beginArrayElement):
3436         (WebCore::KeyedDecoderCF::endArrayElement):
3437         (WebCore::KeyedDecoderCF::endArray):
3438         * platform/cf/KeyedDecoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.h.
3439         
3440         * platform/cf/KeyedEncoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.cpp.
3441         (WebCore::KeyedEncoder::encoder):
3442         (WebCore::createDictionary):
3443         (WebCore::KeyedEncoderCF::KeyedEncoderCF):
3444         (WebCore::KeyedEncoderCF::~KeyedEncoderCF):
3445         (WebCore::KeyedEncoderCF::encodeBytes):
3446         (WebCore::KeyedEncoderCF::encodeBool):
3447         (WebCore::KeyedEncoderCF::encodeUInt32):
3448         (WebCore::KeyedEncoderCF::encodeInt32):
3449         (WebCore::KeyedEncoderCF::encodeInt64):
3450         (WebCore::KeyedEncoderCF::encodeFloat):
3451         (WebCore::KeyedEncoderCF::encodeDouble):
3452         (WebCore::KeyedEncoderCF::encodeString):
3453         (WebCore::KeyedEncoderCF::beginObject):
3454         (WebCore::KeyedEncoderCF::endObject):
3455         (WebCore::KeyedEncoderCF::beginArray):
3456         (WebCore::KeyedEncoderCF::beginArrayElement):
3457         (WebCore::KeyedEncoderCF::endArrayElement):
3458         (WebCore::KeyedEncoderCF::endArray):
3459         (WebCore::KeyedEncoderCF::finishEncoding):
3460         * platform/cf/KeyedEncoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.h.
3461         
3462         * platform/glib/KeyedDecoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.cpp.
3463         (WebCore::KeyedDecoder::decoder):
3464         (WebCore::KeyedDecoderGlib::KeyedDecoderGlib):
3465         (WebCore::KeyedDecoderGlib::~KeyedDecoderGlib):
3466         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
3467         (WebCore::KeyedDecoderGlib::decodeBytes):
3468         (WebCore::KeyedDecoderGlib::decodeSimpleValue):
3469         (WebCore::KeyedDecoderGlib::decodeBool):
3470         (WebCore::KeyedDecoderGlib::decodeUInt32):
3471         (WebCore::KeyedDecoderGlib::decodeInt32):
3472         (WebCore::KeyedDecoderGlib::decodeInt64):
3473         (WebCore::KeyedDecoderGlib::decodeFloat):
3474         (WebCore::KeyedDecoderGlib::decodeDouble):
3475         (WebCore::KeyedDecoderGlib::decodeString):
3476         (WebCore::KeyedDecoderGlib::beginObject):
3477         (WebCore::KeyedDecoderGlib::endObject):
3478         (WebCore::KeyedDecoderGlib::beginArray):
3479         (WebCore::KeyedDecoderGlib::beginArrayElement):
3480         (WebCore::KeyedDecoderGlib::endArrayElement):
3481         (WebCore::KeyedDecoderGlib::endArray):
3482         * platform/glib/KeyedDecoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.h.
3483         
3484         * platform/glib/KeyedEncoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.cpp.
3485         (WebCore::KeyedEncoder::encoder):
3486         (WebCore::KeyedEncoderGlib::KeyedEncoderGlib):
3487         (WebCore::KeyedEncoderGlib::~KeyedEncoderGlib):
3488         (WebCore::KeyedEncoderGlib::encodeBytes):
3489         (WebCore::KeyedEncoderGlib::encodeBool):
3490         (WebCore::KeyedEncoderGlib::encodeUInt32):
3491         (WebCore::KeyedEncoderGlib::encodeInt32):
3492         (WebCore::KeyedEncoderGlib::encodeInt64):
3493         (WebCore::KeyedEncoderGlib::encodeFloat):
3494         (WebCore::KeyedEncoderGlib::encodeDouble):
3495         (WebCore::KeyedEncoderGlib::encodeString):
3496         (WebCore::KeyedEncoderGlib::beginObject):
3497         (WebCore::KeyedEncoderGlib::endObject):
3498         (WebCore::KeyedEncoderGlib::beginArray):
3499         (WebCore::KeyedEncoderGlib::beginArrayElement):
3500         (WebCore::KeyedEncoderGlib::endArrayElement):
3501         (WebCore::KeyedEncoderGlib::endArray):
3502         (WebCore::KeyedEncoderGlib::finishEncoding):
3503         * platform/glib/KeyedEncoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.h.
3504
3505 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
3506
3507         [GStreamer] Do not automatically show PackageKit codec installation notifications
3508         https://bugs.webkit.org/show_bug.cgi?id=135973
3509
3510         Reviewed by Philippe Normand.
3511
3512         Add description parameter to requestInstallMissingPlugins() that
3513         will be used by the API layer.
3514
3515         * html/HTMLMediaElement.cpp:
3516         (WebCore::HTMLMediaElement::requestInstallMissingPlugins):
3517         * html/HTMLMediaElement.h:
3518         * page/ChromeClient.h:
3519         * platform/graphics/MediaPlayer.h:
3520         (WebCore::MediaPlayerClient::requestInstallMissingPlugins):
3521         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3522         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3523
3524 2015-08-07  Doug Russell  <d_russell@apple.com>
3525
3526         AX: Bug 147737 is causing test failures in Mavericks WK1
3527         https://bugs.webkit.org/show_bug.cgi?id=147763
3528
3529         Restrict change made in 147737 to ElCapitan+ because it is causing tests
3530         to fail in Mavericks.
3531
3532         Reviewed by Chris Fleizach.
3533
3534         Fixes failing tests.
3535
3536         * accessibility/AXObjectCache.cpp:
3537         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
3538
3539 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3540
3541         Create [CustomBinding] extended IDL attribute
3542         https://bugs.webkit.org/show_bug.cgi?id=146593
3543
3544         Reviewed by Geoffrey Garen.
3545
3546         Added the [CustomBinding] IDL extended attribute. The idea is that when using this attribute, bindings generate
3547         only the signature of the JS functions and we have to implement all the access in the Custom.cpp files, meaning
3548         accessing the implementations at our wish.
3549
3550         Added customBindingMethod, customBindingMethodWithArgs to the generator tests.
3551
3552         * bindings/scripts/CodeGeneratorGObject.pm:
3553         (SkipFunction): Skipped [CustomBinding] methods.
3554         * bindings/scripts/CodeGeneratorJS.pm:
3555         (GenerateHeader): Consider CustomBinding as ForwardDeclareInHeader.
3556         (GenerateImplementation): Avoid printing both header and implementation of the function.
3557         * bindings/scripts/CodeGeneratorObjC.pm:
3558         (SkipFunction): Skipped [CustomBinding] methods.
3559         * bindings/scripts/IDLAttributes.txt: Added [CustomBinding] IDL extended attribute.
3560         * bindings/scripts/test/JS/JSTestObj.cpp:
3561         * bindings/scripts/test/TestObj.idl: Added customBindingMethod, customBindingMethodWithArgs and their
3562         expectations.
3563
3564 2015-08-06  Zan Dobersek  <zdobersek@igalia.com>
3565
3566         Source/WebCore/crypto code should pass std::function<> objects through rvalue references
3567         https://bugs.webkit.org/show_bug.cgi?id=147332
3568
3569         Reviewed by Anders Carlsson.
3570
3571         Pass the std::function<> callbacks through CryptoAlgorithm methods via
3572         rvlaue references. This avoids generation of unnecessary move and copy
3573         constructors for std::function<> objects that are being handled.
3574
3575         * crypto/CryptoAlgorithm.cpp:
3576         (WebCore::CryptoAlgorithm::encrypt):
3577         (WebCore::CryptoAlgorithm::decrypt):
3578         (WebCore::CryptoAlgorithm::sign):
3579         (WebCore::CryptoAlgorithm::verify):
3580         (WebCore::CryptoAlgorithm::digest):
3581         (WebCore::CryptoAlgorithm::generateKey):
3582         (WebCore::CryptoAlgorithm::deriveKey):
3583         (WebCore::CryptoAlgorithm::deriveBits):
3584         (WebCore::CryptoAlgorithm::importKey):
3585         (WebCore::CryptoAlgorithm::encryptForWrapKey):
3586         (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
3587         * crypto/CryptoAlgorithm.h:
3588         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
3589         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
3590         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
3591         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
3592         (WebCore::CryptoAlgorithmAES_CBC::importKey):
3593         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
3594         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
3595         (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
3596         (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
3597         (WebCore::CryptoAlgorithmAES_KW::generateKey):
3598         (WebCore::CryptoAlgorithmAES_KW::importKey):
3599         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
3600         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3601         (WebCore::CryptoAlgorithmHMAC::sign):
3602         (WebCore::CryptoAlgorithmHMAC::verify):
3603         (WebCore::CryptoAlgorithmHMAC::generateKey):
3604         (WebCore::CryptoAlgorithmHMAC::importKey):
3605         * crypto/algorithms/CryptoAlgorithmHMAC.h:
3606         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
3607         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
3608         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
3609         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
3610         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
3611         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
3612         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
3613         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
3614         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
3615         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
3616         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
3617         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
3618         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
3619         (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
3620         (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
3621         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
3622         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
3623         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
3624         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
3625         (WebCore::CryptoAlgorithmSHA1::digest):
3626         * crypto/algorithms/CryptoAlgorithmSHA1.h:
3627         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
3628         (WebCore::CryptoAlgorithmSHA224::digest):
3629         * crypto/algorithms/CryptoAlgorithmSHA224.h:
3630         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
3631         (WebCore::CryptoAlgorithmSHA256::digest):
3632         * crypto/algorithms/CryptoAlgorithmSHA256.h:
3633         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
3634         (WebCore::CryptoAlgorithmSHA384::digest):
3635         * crypto/algorithms/CryptoAlgorithmSHA384.h:
3636         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
3637         (WebCore::CryptoAlgorithmSHA512::digest):
3638         * crypto/algorithms/CryptoAlgorithmSHA512.h:
3639         * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
3640         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
3641         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
3642         * crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
3643         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
3644         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
3645         * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
3646         (WebCore::CryptoAlgorithmHMAC::platformSign):
3647         (WebCore::CryptoAlgorithmHMAC::platformVerify):
3648         * crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
3649         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
3650         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
3651         * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
3652         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
3653         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
3654         * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
3655         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
3656         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
3657         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
3658         (WebCore::transformAES_CBC):
3659         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
3660         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
3661         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
3662         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
3663         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
3664         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
3665         (WebCore::CryptoAlgorithmHMAC::platformSign):
3666         (WebCore::CryptoAlgorithmHMAC::platformVerify):
3667         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
3668         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
3669         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
3670         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3671         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
3672         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
3673         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
3674         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
3675         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
3676
3677 2015-08-06  Alex Christensen  <achristensen@webkit.org>
3678
3679         Fix GTK clean build after r187997
3680         https://bugs.webkit.org/show_bug.cgi?id=147723
3681
3682         Reviewed by Gyuyoung Kim.
3683
3684         * CMakeLists.txt:
3685         r187997 made it so WebCoreTestSupport does not link with WebCore, which is necessary to get DumpRenderTree to link.
3686         It also made it so WebCoreTestSupport is no longer dependent on WebCore, which causes it to build at the same time.
3687         This caused problems because WebCoreTestSupport uses headers that are generated for WebCore, such as WebKitFontFamilyNames.h.
3688         Adding a dependency makes it so that WebCoreTestSupport waits until WebCore is done compiling before compiling,
3689         which is what it used to do, but it does not cause linking problems with DumpRenderTree.
3690
3691 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
3692
3693         CSSSegmentedFontFace::fontRanges() does not handle duplicate fonts correctly
3694         https://bugs.webkit.org/show_bug.cgi?id=147765
3695
3696         Reviewed by Filip Pizlo.
3697
3698         CSSSegmentedFontFace::fontRanges() was trying to hash on FontDescriptors by
3699         picking a few specific pieces of data out of the FontDescriptor, computing
3700         a hash on it, and using that unsigned as a key in a HashMap. This has two
3701         problems: it doesn't handle equality correctly, as hash collisions cannot
3702         depend on an equality operator to dedup, and it doesn't hash on all the
3703         members of a FontDescription.
3704
3705         Instead, this HashMap should use FontDescriptionKey, which represents a
3706         FontDescription, and is designed exactly for the purpose of being used as a
3707         key in a HashMap.
3708
3709         No new tests because there is no behavior change (because a problem occurs
3710         when two different FontDescriptions hash to the same value, which is rare).
3711
3712         * css/CSSSegmentedFontFace.cpp:
3713         (WebCore::CSSSegmentedFontFace::fontRanges):
3714         * css/CSSSegmentedFontFace.h:
3715         * platform/graphics/FontCache.h:
3716         (WebCore::FontDescriptionKeyHash::hash):
3717         (WebCore::FontDescriptionKeyHash::equal):
3718
3719 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
3720
3721         [iOS] Remove dead code from FontCache::createFontPlatformData()
3722         https://bugs.webkit.org/show_bug.cgi?id=147762
3723
3724         Reviewed by Andy Estes.
3725
3726         No new tests because there is no behavior change.
3727
3728         * platform/graphics/ios/FontCacheIOS.mm:
3729         (WebCore::FontCache::createFontPlatformData): Deleted.
3730
3731 2015-08-06  Alex Christensen  <achristensen@webkit.org>
3732
3733         Revert part of my "build fix" in r188101.
3734
3735         * CMakeLists.txt:
3736         MockCDM was already conditionally added to WebCore_SOURCES, and that change causes dependency cycles when bug 147723 is fixed.
3737
3738 2015-08-06  Alex Christensen  <achristensen@webkit.org>
3739
3740         [Win] CMake build fix after r188098.
3741
3742         * CMakeLists.txt:
3743         MockCDM is necessary for testing if ENCRYPTED_MEDIA_V2 is enabled.
3744
3745 2015-08-06  Alex Christensen  <achristensen@webkit.org>
3746
3747         [Win] Enable all Windows features in CMake
3748         https://bugs.webkit.org/show_bug.cgi?id=147744
3749
3750         Reviewed by Tim Horton.
3751
3752         * PlatformWin.cmake:
3753         Add a file needed for enabling video.
3754
3755 2015-08-06  Anders Carlsson  <andersca@apple.com>
3756
3757         Rename SQLStatementBackend to SQLStatement
3758         https://bugs.webkit.org/show_bug.cgi?id=147755
3759
3760         Reviewed by Geoffrey Garen.
3761
3762         * CMakeLists.txt:
3763         * Modules/webdatabase/SQLStatement.h: Renamed from Source/WebCore/Modules/webdatabase/SQLStatementBackend.h.
3764         (WebCore::SQLStatement::hasStatementCallback):
3765         (WebCore::SQLStatement::hasStatementErrorCallback):
3766         * Modules/webdatabase/SQLStatementBackend.cpp: Removed.
3767         (WebCore::SQLStatementBackend::SQLStatementBackend): Deleted.
3768         (WebCore::SQLStatementBackend::~SQLStatementBackend): Deleted.
3769         (WebCore::SQLStatementBackend::sqlError): Deleted.
3770         (WebCore::SQLStatementBackend::sqlResultSet): Deleted.
3771         (WebCore::SQLStatementBackend::execute): Deleted.
3772         (WebCore::SQLStatementBackend::performCallback): Deleted.
3773         (WebCore::SQLStatementBackend::setDatabaseDeletedError): Deleted.
3774         (WebCore::SQLStatementBackend::setVersionMismatchedError): Deleted.
3775         (WebCore::SQLStatementBackend::setFailureDueToQuota): Deleted.
3776         (WebCore::SQLStatementBackend::clearFailureDueToQuota): Deleted.
3777         (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota): Deleted.
3778         * Modules/webdatabase/SQLStatementBackend.h:
3779         (WebCore::SQLStatementBackend::hasStatementCallback): Deleted.
3780         (WebCore::SQLStatementBackend::hasStatementErrorCallback): Deleted.
3781         * Modules/webdatabase/SQLTransaction.cpp:
3782         (WebCore::SQLTransaction::deliverStatementCallback):
3783         (WebCore::SQLTransaction::executeSQL):
3784         * Modules/webdatabase/SQLTransactionBackend.cpp:
3785         (WebCore::SQLTransactionBackend::currentStatement):
3786         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
3787         (WebCore::SQLTransactionBackend::executeSQL):
3788         * Modules/webdatabase/SQLTransactionBackend.h:
3789         * WebCore.vcxproj/WebCore.vcxproj:
3790         * WebCore.vcxproj/WebCore.vcxproj.filters:
3791         * WebCore.xcodeproj/project.pbxproj:
3792
3793 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
3794
3795         Make FontDescriptionKey sensitive to FontFeatureSettings
3796         https://bugs.webkit.org/show_bug.cgi?id=147751
3797
3798         Reviewed by Anders Carlsson.
3799
3800         Just like how FontDescription hashes should be sensitive to locale, they should
3801         also be sensitive to font features.
3802
3803         This patch also fixes operator== for FontDescriptionKey, which was previously
3804         comparing hashes for equality instead of the underlying data. Comparing hashes
3805         for equality is useless inside hashmaps.
3806
3807         This is in preparation for implementing font-feature-settings.
3808
3809         No new tests because there is no behavior change.
3810
3811         * platform/graphics/FontCache.cpp:
3812         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
3813         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
3814         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Deleted.
3815         * platform/graphics/FontCache.h:
3816         (WebCore::FontDescriptionKey::FontDescriptionKey):
3817         (WebCore::FontDescriptionKey::operator==):
3818         (WebCore::FontDescriptionKey::operator!=):
3819         (WebCore::FontDescriptionKey::isHashTableDeletedValue):
3820         (WebCore::FontDescriptionKey::computeHash):
3821         * platform/graphics/FontFeatureSettings.cpp:
3822         (WebCore::FontFeature::hash):
3823         (WebCore::FontFeatureSettings::hash):
3824         * platform/graphics/FontFeatureSettings.h:
3825
3826 2015-08-06  Anders Carlsson  <andersca@apple.com>
3827
3828         Merge SQLStatement into SQLStatementBackend
3829         https://bugs.webkit.org/show_bug.cgi?id=147754
3830
3831         Reviewed by Geoffrey Garen.
3832
3833         * CMakeLists.txt:
3834         * Modules/webdatabase/Database.h:
3835         * Modules/webdatabase/SQLStatement.cpp: Removed.
3836         (WebCore::SQLStatement::SQLStatement): Deleted.
3837         (WebCore::SQLStatement::setBackend): Deleted.
3838         (WebCore::SQLStatement::hasCallback): Deleted.
3839         (WebCore::SQLStatement::hasErrorCallback): Deleted.
3840         (WebCore::SQLStatement::performCallback): Deleted.
3841         * Modules/webdatabase/SQLStatement.h: Removed.
3842         * Modules/webdatabase/SQLStatementBackend.cpp:
3843         (WebCore::SQLStatementBackend::SQLStatementBackend):
3844         (WebCore::SQLStatementBackend::performCallback):
3845         (WebCore::SQLStatementBackend::frontend): Deleted.
3846         * Modules/webdatabase/SQLStatementBackend.h:
3847         (WebCore::SQLStatementBackend::hasStatementCallback):
3848         (WebCore::SQLStatementBackend::hasStatementErrorCallback):
3849         * Modules/webdatabase/SQLTransaction.cpp:
3850         (WebCore::SQLTransaction::deliverStatementCallback):
3851         (WebCore::SQLTransaction::executeSQL):
3852         * Modules/webdatabase/SQLTransaction.h:
3853         * Modules/webdatabase/SQLTransactionBackend.cpp:
3854         (WebCore::SQLTransactionBackend::currentStatement):
3855         (WebCore::SQLTransactionBackend::executeSQL):
3856         * Modules/webdatabase/SQLTransactionBackend.h:
3857         * WebCore.vcxproj/WebCore.vcxproj:
3858         * WebCore.vcxproj/WebCore.vcxproj.filters:
3859         * WebCore.xcodeproj/project.pbxproj:
3860         * bindings/js/JSSQLTransactionCustom.cpp:
3861
3862 2015-08-06  Chris Dumez  <cdumez@apple.com>
3863
3864         Toggle GPS state based on page visibility to save battery
3865         https://bugs.webkit.org/show_bug.cgi?id=147685
3866
3867         Reviewed by Benjamin Poulain.
3868
3869         Toggle GPS state based on page visibility to save battery. Previously,
3870         if the site you were viewing was watching your position and you
3871         switched tab, the GPS would stay on. This was bad for battery life.
3872
3873         Tests: fast/dom/Geolocation/startUpdatingOnlyWhenPageVisible.html
3874                fast/dom/Geolocation/stopUpdatingForHiddenPage.html
3875
3876         * Modules/geolocation/GeolocationController.cpp:
3877         (WebCore::GeolocationController::addObserver):
3878         (WebCore::GeolocationController::viewStateDidChange):
3879
3880 2015-08-06  Anders Carlsson  <andersca@apple.com>
3881
3882         SQLStatementBackend doesn't need to be refcounted
3883         https://bugs.webkit.org/show_bug.cgi?id=147748
3884
3885         Reviewed by Geoffrey Garen.
3886
3887         There's no shared ownership of SQLStatementBackend so we can just use std::unique_ptr.
3888
3889         * Modules/webdatabase/SQLStatementBackend.cpp:
3890         (WebCore::SQLStatementBackend::create): Deleted.
3891         * Modules/webdatabase/SQLStatementBackend.h:
3892         * Modules/webdatabase/SQLTransactionBackend.cpp:
3893         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
3894         (WebCore::SQLTransactionBackend::executeSQL):
3895         * Modules/webdatabase/SQLTransactionBackend.h:
3896
3897 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
3898
3899         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
3900         https://bugs.webkit.org/show_bug.cgi?id=147734
3901         rdar://problem/22028179
3902
3903         Reviewed by Andy Estes.
3904
3905         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
3906
3907         * dom/Document.cpp:
3908         (WebCore::Document::initSecurityContext): Use applyContentDispositionAttachmentSandbox
3909           instead of setting sandbox flags directly.
3910         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Don't special
3911           case MediaDocument.
3912         (WebCore::Document::applyContentDispositionAttachmentSandbox): Apply sandbox flags
3913           according to document type.
3914         * dom/Document.h:
3915
3916 2015-08-06  Anders Carlsson  <andersca@apple.com>
3917
3918         Get rid of DatabaseBackendBase
3919         https://bugs.webkit.org/show_bug.cgi?id=147733
3920
3921         Reviewed by Geoffrey Garen.
3922
3923         * CMakeLists.txt:
3924         * Modules/webdatabase/Database.cpp:
3925         (WebCore::Database::Database):
3926         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
3927         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
3928         * Modules/webdatabase/Database.h:
3929         * Modules/webdatabase/DatabaseBackendBase.cpp: Removed.
3930         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
3931         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
3932         * Modules/webdatabase/DatabaseBackendBase.h: Removed.
3933         * Modules/webdatabase/DatabaseManager.cpp:
3934         * Modules/webdatabase/DatabaseManager.h:
3935         * Modules/webdatabase/DatabaseTracker.cpp:
3936         * WebCore.vcxproj/WebCore.vcxproj:
3937         * WebCore.vcxproj/WebCore.vcxproj.filters:
3938         * WebCore.xcodeproj/project.pbxproj:
3939
3940 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
3941
3942         Add comment to CSSParserString
3943         https://bugs.webkit.org/show_bug.cgi?id=147724
3944
3945         Reviewed by Dean Jackson.
3946
3947         No new tests because there is no behavior change.
3948
3949         * css/CSSParserValues.h:
3950
3951 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
3952
3953         Font feature settings comparisons are order-dependent and case-dependent
3954         https://bugs.webkit.org/show_bug.cgi?id=147719
3955
3956         Reviewed by Benjamin Poulain.
3957
3958         We should make our settings vector order-independent and case-independent.
3959
3960         Test: css3/font-feature-settings-parsing.html
3961
3962         * css/CSSParser.cpp:
3963         (WebCore::CSSParser::parseFontFeatureTag):
3964         * css/StyleBuilderConverter.h:
3965         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
3966         * platform/graphics/FontFeatureSettings.cpp:
3967         (WebCore::FontFeature::FontFeature):
3968         (WebCore::FontFeature::operator==):
3969         (WebCore::FontFeatureSettings::FontFeatureSettings):
3970         * platform/graphics/FontFeatureSettings.h:
3971         (WebCore::FontFeature::FontFeature):
3972         (WebCore::FontFeature::operator==):
3973         (WebCore::FontFeature::operator<):
3974         (WebCore::FontFeatureSettings::insert):
3975         (WebCore::FontFeatureSettings::FontFeatureSettings):
3976         (WebCore::FontFeatureSettings::append): Deleted.
3977
3978 2015-08-06  Doug Russell  <d_russell@apple.com>
3979
3980         AX: AXLoadComplete that comes before AX API access won't fire
3981         https://bugs.webkit.org/show_bug.cgi?id=147737
3982
3983         Reviewed by Chris Fleizach.
3984
3985         Treat setEnhancedUserInterfaceAccessibility() as AX API access and if true,
3986         enableAccessibility().
3987
3988         Test: accessibility/mac/loaded-notification.html
3989
3990         * accessibility/AXObjectCache.cpp:
3991         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
3992
3993 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
3994
3995         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
3996         https://bugs.webkit.org/show_bug.cgi?id=147734
3997         rdar://problem/22028179
3998
3999         Reviewed by Dean Jackson.
4000
4001         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
4002
4003         * dom/Document.cpp:
4004         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Return
4005           early if the Document is a MediaDocument.
4006
4007 2015-08-06  Matt Rajca  <mrajca@apple.com>
4008
4009         Media Session: remove media elements from the ID <-> element map on destruction
4010         https://bugs.webkit.org/show_bug.cgi?id=147707
4011
4012         Reviewed by Eric Carlson.
4013
4014         * html/HTMLMediaElement.cpp:
4015         (WebCore::HTMLMediaElement::~HTMLMediaElement):
4016
4017 2015-08-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
4018
4019         [CoordinatedGraphics] Remove unused functions in Coordinated TiledBackingStore
4020         https://bugs.webkit.org/show_bug.cgi?id=147621
4021
4022         Reviewed by Csaba Osztrogon√°c.
4023
4024         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Remove setTileSize() and tileSize().
4025         (WebCore::TiledBackingStore::setTileSize):
4026
4027 2015-08-06  Anders Carlsson  <andersca@apple.com>
4028
4029         Move the last remnants of DatabaseBackendBase to Database
4030         https://bugs.webkit.org/show_bug.cgi?id=147730
4031
4032         Reviewed by Tim Horton.
4033
4034         * Modules/webdatabase/Database.cpp:
4035         (WebCore::Database::Database):
4036         (WebCore::Database::performOpenAndVerify):
4037         * Modules/webdatabase/Database.h:
4038         * Modules/webdatabase/DatabaseBackendBase.cpp:
4039         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
4040         * Modules/webdatabase/DatabaseBackendBase.h:
4041         (WebCore::DatabaseBackendBase::databaseContext): Deleted.
4042         (WebCore::DatabaseBackendBase::setFrontend): Deleted.
4043
4044 2015-08-06  Alex Christensen  <achristensen@webkit.org>
4045
4046         Fix build without ENABLE(VIDEO) after r188030.
4047