Fixed status features JSON formatting.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-21  Jonathan Davis  <jond@apple.com>
2
3         Fixed status features JSON formatting.
4
5         * features.json:
6
7 2015-08-21  Chris Dumez  <cdumez@apple.com>
8
9         Have more getElementsBy*() methods return a Ref<>
10         https://bugs.webkit.org/show_bug.cgi?id=148287
11
12         Reviewed by Sam Weinig.
13
14         Have more getElementsBy*() methods return a Ref<> instaed of a RefPtr<>
15         as they cannot return null.
16
17         * dom/ContainerNode.cpp:
18         (WebCore::ContainerNode::getElementsByTagName):
19         (WebCore::ContainerNode::getElementsByTagNameNS):
20         (WebCore::ContainerNode::getElementsByName):
21         (WebCore::ContainerNode::getElementsByClassName):
22         (WebCore::ContainerNode::getElementsByClassNameForObjC):
23         (WebCore::ContainerNode::radioNodeList):
24         * dom/ContainerNode.h:
25
26 2015-08-21  Chris Dumez  <cdumez@apple.com>
27
28         Drop NodeListBase class
29         https://bugs.webkit.org/show_bug.cgi?id=148290
30
31         Reviewed by Ryosuke Niwa.
32
33         Drop NodeListBase class and have HTMLCollection subclass NodeList
34         directly. There is no reason we need another base class.
35
36         * WebCore.xcodeproj/project.pbxproj:
37         * bindings/scripts/CodeGeneratorObjC.pm:
38         (GetImplClassName): Deleted.
39         * dom/ContainerNode.cpp:
40         (WebCore::ContainerNode::getElementsByClassNameForObjC):
41         * dom/ContainerNode.h:
42         * dom/NodeList.h:
43         * dom/NodeListBase.h: Removed.
44         * html/HTMLCollection.h:
45
46 2015-08-20  Yusuke Suzuki  <utatane.tea@gmail.com>
47
48         [ES6] prototyping module loader in JSC shell
49         https://bugs.webkit.org/show_bug.cgi?id=147876
50
51         Reviewed by Saam Barati.
52
53         Just fill Loader hooks with nullptr.
54
55         * bindings/js/JSDOMWindowBase.cpp:
56         * bindings/js/JSWorkerGlobalScopeBase.cpp:
57
58 2015-08-20  Chris Dumez  <cdumez@apple.com>
59
60         Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker()
61         https://bugs.webkit.org/show_bug.cgi?id=148257
62
63         Reviewed by Darin Adler.
64
65         Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker().
66         It is supposed to be translated into a *null* NodeFilter. However, WebKit was constructing a
67         NodeFilter in this case.
68
69         Chrome and Firefox do not create a NodeFilter in this case.
70
71         No new tests, already covered by:
72         fast/dom/createNodeIterator-parameters.html
73         fast/dom/createTreeWalker-parameters.html
74
75         * bindings/js/JSNodeFilterCustom.cpp:
76         (WebCore::JSNodeFilter::toWrapped):
77
78 2015-08-20  Zalan Bujtas  <zalan@apple.com>
79
80         Make outline: auto repaint rect inflate more explicit.
81         https://bugs.webkit.org/show_bug.cgi?id=148263
82
83         Reviewed by Simon Fraser.
84
85         Use RenderObject::adjustRectWithMaximumOutline() when inflating is conditional and call
86         RenderView::maximalOutlineSize() when it is not.
87         After this changeset, we can clearly tell calls when inflating is unconditional (adjusting the size of the compositing layer) apart from
88         calls when we just simply inflate the repaint rect during outline painting phase.
89
90         No change in behaviour.
91
92         * rendering/InlineFlowBox.cpp:
93         (WebCore::InlineFlowBox::paint):
94         * rendering/RenderBlock.cpp:
95         (WebCore::RenderBlock::paint):
96         * rendering/RenderBlockFlow.cpp:
97         (WebCore::RenderBlockFlow::layoutBlock):
98         * rendering/RenderDetailsMarker.cpp:
99         (WebCore::RenderDetailsMarker::paint):
100         * rendering/RenderElement.cpp:
101         (WebCore::RenderElement::computeMaxOutlineSize):
102         * rendering/RenderLayer.cpp:
103         (WebCore::RenderLayer::calculateClipRects):
104         * rendering/RenderLineBoxList.cpp:
105         (WebCore::isOutlinePhase):
106         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
107         (WebCore::RenderLineBoxList::paint):
108         * rendering/RenderListMarker.cpp:
109         (WebCore::RenderListMarker::paint):
110         * rendering/RenderObject.cpp:
111         (WebCore::RenderObject::adjustRectWithMaximumOutline):
112         (WebCore::RenderObject::maximalOutlineSize): Deleted.
113         * rendering/RenderObject.h:
114         * rendering/RenderRegion.cpp:
115         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
116         * rendering/RenderReplaced.cpp:
117         (WebCore::RenderReplaced::shouldPaint):
118         * rendering/RenderTable.cpp:
119         (WebCore::RenderTable::paint):
120         * rendering/RenderTableCell.cpp:
121         (WebCore::RenderTableCell::paintCollapsedBorders):
122         * rendering/RenderTableSection.cpp:
123         (WebCore::RenderTableSection::paintObject):
124         * rendering/RenderView.cpp:
125         (WebCore::RenderView::setMaximalOutlineSize):
126         (WebCore::RenderView::RenderView): Deleted.
127         * rendering/RenderView.h:
128
129 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
130
131         [OS X] Cleaup after r188591
132         https://bugs.webkit.org/show_bug.cgi?id=148219
133
134         Unreviewed.
135
136         Forgot to update a call site of FontPlatformData().
137
138         * platform/graphics/mac/FontCacheMac.mm:
139         (WebCore::FontCache::systemFallbackForCharacters):
140
141 2015-08-20  Alex Christensen  <achristensen@webkit.org>
142
143         Build fix after r188716.
144
145         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
146         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
147         Add some scope so we can declare a variable (weakPtr) inside a switch statement.
148
149 2015-08-20  Alex Christensen  <achristensen@webkit.org>
150
151         Build fix after r188716.
152
153         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
154         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
155         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
156         Replace m_weakFactory with m_weakPtrFactory which actually exists.
157
158 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
159
160         [iOS] Adopt OS X's emoji behavior.
161         https://bugs.webkit.org/show_bug.cgi?id=148265
162
163         Reviewed by Simon Fraser.
164
165         Remove our hardcoded hacks which limit the sizes of emoji. This is how
166         OS X behaves with emoji.
167
168         Test: fast/text/emoji.html
169
170         * platform/graphics/FontPlatformData.h:
171         (WebCore::FontPlatformData::hash):
172         (WebCore::FontPlatformData::isEmoji): Deleted.
173         (WebCore::FontPlatformData::setIsEmoji): Deleted.
174         * platform/graphics/cocoa/FontCascadeCocoa.mm:
175         (WebCore::FontCascade::drawGlyphs):
176         (WebCore::isOnOrAfterIOS6): Deleted.
177         (WebCore::pointAdjustedForEmoji): Deleted.
178         * platform/graphics/cocoa/FontCocoa.mm:
179         (WebCore::canUseFastGlyphAdvanceGetter):
180         (WebCore::Font::platformInit): Deleted.
181         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
182         (WebCore::FontPlatformData::ctFont):
183         (WebCore::FontPlatformData::platformDataInit): Deleted.
184         (WebCore::FontPlatformData::platformDataAssign): Deleted.
185         (WebCore::FontPlatformData::platformIsEqual): Deleted.
186         (WebCore::FontPlatformData::ctFontSize): Deleted.
187         * platform/graphics/ios/FontCacheIOS.mm:
188         (WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
189         (WebCore::FontCache::createFontPlatformData): Deleted.
190         * platform/graphics/mac/ComplexTextController.cpp:
191         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Deleted.
192
193 2015-08-20  Chris Dumez  <cdumez@apple.com>
194
195         getElementsByClassName() should return an HTMLCollection
196         https://bugs.webkit.org/show_bug.cgi?id=147980
197
198         Reviewed by Darin Adler.
199
200         Update Document.getElementsByClassName() and Element.getElementsByClassName()
201         to return an HTMLCollection instead of a NodeList, as per the specification:
202         - https://dom.spec.whatwg.org/#interface-document
203         - https://dom.spec.whatwg.org/#interface-element
204
205         This behavior is also consistent with other major browsers. Due to this and
206         the fact that NodeList / HTMLCollection pretty much the same API, the
207         compatibility risk should be fairly low.
208
209         I also verified that the performance is the same according to the following
210         performance test:
211         PerformanceTests/DOM/get-elements-by-class-name-traversal-uncached.html
212
213         Tests: fast/dom/getElementsByClassName/dumpHTMLCollection.html
214                fast/dom/getElementsByClassName/return-type.html
215
216         * CMakeLists.txt:
217         * WebCore.vcxproj/WebCore.vcxproj:
218         * WebCore.xcodeproj/project.pbxproj:
219         Rename ClassNodeList.cpp file.
220
221         * bindings/scripts/CodeGeneratorObjC.pm:
222         (GetImplClassName):
223         Indicate that NodeList is implemented as NodeListBase. This is
224         needed so that DOMNodeList can have either an HTMLCollection or
225         a NodeList as internal representation. NodeListBase is a new
226         common base class for HTMLCollection and NodeList.
227
228         * dom/ClassCollection.cpp: Renamed from Source/WebCore/dom/ClassNodeList.cpp.
229         (WebCore::ClassCollection::create):
230         (WebCore::ClassCollection::~ClassCollection):
231         * dom/ClassCollection.h: Renamed from Source/WebCore/dom/ClassNodeList.h.
232         (WebCore::ClassCollection::ClassCollection):
233         (WebCore::ClassCollection::elementMatches):
234         Rename ClassNodeList to ClassCollection and have it subclass
235         CachedHTMLCollection instead of ClassNodeList.
236
237         * dom/ContainerNode.cpp:
238         (WebCore::ContainerNode::getElementsByClassName):
239         Have getElementsByClassName return an HTMLCollection instead of a
240         NodeList.
241
242         (WebCore::ContainerNode::getElementsByClassNameForObjC):
243         New method returns a NodeListBase for ObjC bindings, so they can
244         convert the return value into a DOMNodeList. We need this to not
245         break ObjC API compatibility.
246
247         * dom/Document.idl:
248         * dom/Element.idl:
249         Have getElementsByClassName return an HTMLCollection instead of a
250         NodeList, except for ObjC bindings.
251
252         * dom/NodeList.h:
253         Have NodeList subclass NodeListBase.
254
255         * dom/NodeListBase.h: Added.
256         New common base interface for HTMLCollection and NodeList. This is
257         so that the internal representation for ObjC's DOMNodeList can be
258         a NodeListBase instead of a NodeList. This way, the ObjC API can
259         keep returning a DOMNodeList, even though our implementation now
260         returns an HTMLCollection instead of a NodeList.
261
262         * dom/NodeRareData.h:
263         (WebCore::NodeListTypeIdentifier<NameNodeList>::value):
264         (WebCore::NodeListTypeIdentifier<TagNodeList>::value):
265         (WebCore::NodeListTypeIdentifier<HTMLTagNodeList>::value):
266         (WebCore::NodeListTypeIdentifier<RadioNodeList>::value):
267         (WebCore::NodeListTypeIdentifier<LabelsNodeList>::value):
268         Drop ClassNodeList from the NodeListTypeIndentifiers.
269
270         * html/CollectionType.h:
271         Add new ByClass CollectionType for ClassCollection.
272
273         * html/GenericCachedHTMLCollection.cpp:
274         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
275         Handle new ByClass CollectionType in the switch statement.
276
277         * html/HTMLCollection.cpp:
278         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
279         (WebCore::HTMLCollection::~HTMLCollection):
280         Add support for new ByClass Collection type.
281
282         * html/HTMLCollection.h:
283         Have HTMLCollection subclass the NodeListBase interface.
284
285 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
286
287         Fix the iOS build after r188726
288         https://bugs.webkit.org/show_bug.cgi?id=148278
289
290         Unreviewed.
291
292         * platform/graphics/ios/FontCacheIOS.mm:
293         (WebCore::FontCache::systemFallbackForCharacters):
294
295 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
296
297         Cleanup after r188726
298         https://bugs.webkit.org/show_bug.cgi?id=148278
299
300         Unreviewed.
301
302         No new tests because there is no behavior change.
303
304         * platform/graphics/ios/FontCacheIOS.mm:
305         (WebCore::FontCache::systemFallbackForCharacters):
306
307 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
308
309         [iOS] Delete dead code
310         https://bugs.webkit.org/show_bug.cgi?id=148278
311
312         Reviewed by Dean Jackson.
313
314         No new tests because there is no behavior change.
315
316         * platform/graphics/cocoa/FontCocoa.mm:
317         (WebCore::Font::platformInit):
318         * platform/graphics/ios/FontCacheIOS.mm:
319         (WebCore::copyFontCharacterSet): Deleted.
320         (WebCore::appleColorEmojiCharacterSet): Deleted.
321         (WebCore::phoneFallbackCharacterSet): Deleted.
322         (WebCore::languageSpecificFallbackFont): Deleted.
323         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
324
325 2015-08-20  Tim Horton  <timothy_horton@apple.com>
326
327         Unreviewed, rolling out r188712.
328         https://bugs.webkit.org/show_bug.cgi?id=148274
329
330         broke allllll the tests (Requested by thorton on #webkit).
331
332         Reverted changeset:
333
334         "WK1 can re-enter layout during FrameView destruction and
335         crash"
336         https://bugs.webkit.org/show_bug.cgi?id=148237
337         http://trac.webkit.org/changeset/188712
338
339 2015-08-20  Commit Queue  <commit-queue@webkit.org>
340
341         Unreviewed, rolling out r188717 and r188719.
342         https://bugs.webkit.org/show_bug.cgi?id=148272
343
344         Broke the Mavericks build (Requested by andersca on #webkit).
345
346         Reverted changesets:
347
348         "Merge Lock and LockBase"
349         https://bugs.webkit.org/show_bug.cgi?id=148266
350         http://trac.webkit.org/changeset/188717
351
352         "Merge ConditionBase and Condition"
353         https://bugs.webkit.org/show_bug.cgi?id=148270
354         http://trac.webkit.org/changeset/188719
355
356 2015-08-20  Anders Carlsson  <andersca@apple.com>
357
358         Merge ConditionBase and Condition
359         https://bugs.webkit.org/show_bug.cgi?id=148270
360
361         Reviewed by Filip Pizlo.
362
363         Change StaticCondition to Condition.
364
365         * platform/network/cf/LoaderRunLoopCF.cpp:
366
367 2015-08-20  Anders Carlsson  <andersca@apple.com>
368
369         Stop using cancelCallOnMainThread in MediaPlayerPrivateMediaFoundation
370         https://bugs.webkit.org/show_bug.cgi?id=148252
371
372         Reviewed by Tim Horton.
373
374         Replace cancelCallOnMainThread with WeakPtrs.
375
376         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
377         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
378         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
379         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
380         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
381         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
382         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
383         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
384
385 2015-08-20  Beth Dakin  <bdakin@apple.com>
386
387         WK1 can re-enter layout during FrameView destruction and crash
388         https://bugs.webkit.org/show_bug.cgi?id=148237
389         -and corresponding-
390         rdar://problem/22356782
391
392         Reviewed by Zalan Bujtas.
393
394         This is a safe fix for the time being. We won't resetScrollbars() for a FrameView 
395         that is in the PageCache because resetting scrollbars can re-enter layout for the 
396         Frame's new FrameView, which leads to updating pages in the page cache, which 
397         leads to a crash because we're in the process of destroying something
398         in the page cache. We should not be able to get into this mess at all.
399         * page/FrameView.cpp:
400         (WebCore::FrameView::~FrameView):
401
402 2015-08-20  Chris Dumez  <cdumez@apple.com>
403
404         Default value for createNodeIterator() / createTreeWalker()'s whatToShow parameter should be 0xFFFFFFFF
405         https://bugs.webkit.org/show_bug.cgi?id=148238
406
407         Reviewed by Ryosuke Niwa.
408
409         Default value for createNodeIterator() / createTreeWalker()'s whatToShow
410         parameter should be 0xFFFFFFFF as per the specification:
411         - http://w3c-test.org/dom/traversal/NodeIterator.html
412         - http://w3c-test.org/dom/traversal/TreeWalker.html
413
414         Firefox and Chrome conform to the specification. However, WebKit was
415         using 0 as default value.
416
417         We still don't behave as expected in some cases, as visible from
418         the checks that are still failing in the new layout tests. Those
419         will be addressed separately.
420
421         Tests: fast/dom/createNodeIterator-parameters.html
422                fast/dom/createTreeWalker-parameters.html
423
424         * dom/Document.cpp:
425         (WebCore::Document::createNodeIterator):
426         (WebCore::Document::createTreeWalker):
427         (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
428         (WebCore::Document::scheduleStyleRecalc): Deleted.
429         * dom/Document.h:
430         * dom/Document.idl:
431         * dom/NodeIterator.cpp:
432         (WebCore::NodeIterator::NodeIterator):
433         * dom/NodeIterator.h:
434         (WebCore::NodeIterator::create):
435         * dom/Traversal.cpp:
436         (WebCore::NodeIteratorBase::NodeIteratorBase):
437         * dom/Traversal.h:
438         (WebCore::NodeIteratorBase::whatToShow):
439         * dom/TreeWalker.cpp:
440         (WebCore::TreeWalker::TreeWalker):
441         * dom/TreeWalker.h:
442         (WebCore::TreeWalker::create):
443
444 2015-08-20  Anders Carlsson  <andersca@apple.com>
445
446         Stop using cancelCallOnMainThread in MediaPlayerPrivateAVFoundation
447         https://bugs.webkit.org/show_bug.cgi?id=148248
448
449         Reviewed by Tim Horton.
450
451         Replace cancelCallOnMainThread with WeakPtrs, just like in MediaPlayerPrivateAVFoundationObjC.
452
453         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
454         (WebCore::MediaPlayerPrivateAVFoundation::mainThreadCallback):
455         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
456         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
457         (WebCore::MediaPlayerPrivateAVFoundation::~MediaPlayerPrivateAVFoundation): Deleted.
458         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
459
460 2015-08-20  Anders Carlsson  <andersca@apple.com>
461
462         Stop using cancelCallOnMainThread in DisplayRefreshMonitorMac
463         https://bugs.webkit.org/show_bug.cgi?id=148241
464
465         Reviewed by Tim Horton.
466
467         Create a WeakPtrFactory in DisplayRefreshMonitorMac and bind a WeakPtr in the function passed
468         to callOnMainThread so we can check if the DisplayRefreshMonitorMac has gone away.
469
470         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
471         (WebCore::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac):
472         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
473         (WebCore::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac):
474         * platform/graphics/mac/DisplayRefreshMonitorMac.h:
475
476 2015-08-20  Alex Christensen  <achristensen@webkit.org>
477
478         AppleWin CMake build fix after r188696.
479
480         * PlatformWin.cmake:
481         No ${} fixes the problem and keeps the desired behavior.
482
483 2015-08-20  Per Arne Vollan  <peavo@outlook.com>
484
485         [WinCairo] Link errors when building with VS2015.
486         https://bugs.webkit.org/show_bug.cgi?id=148233
487
488         Reviewed by Alex Christensen.
489
490         Include some inline function definitions.
491
492         * bindings/js/JSWebGLRenderingContextCustom.cpp:
493         * html/canvas/WebGLRenderingContext.cpp:
494
495 2015-08-20  Alex Christensen  <achristensen@webkit.org>
496
497         Clean up CMake build after r188673
498         https://bugs.webkit.org/show_bug.cgi?id=148234
499
500         Reviewed by Tim Horton.
501
502         * CMakeLists.txt:
503         * PlatformEfl.cmake:
504         * PlatformGTK.cmake:
505         * PlatformWin.cmake:
506         Make including ANGLE headers platform specific because EFL and GTK don't want to copy headers,
507         but we need to in order to get the Windows build working with each Source subdirectory isolated.
508
509 2015-08-20  Beth Dakin  <bdakin@apple.com>
510
511         Standalone image documents should send their size to the UIClient just like 
512         standalone media documents
513         https://bugs.webkit.org/show_bug.cgi?id=148195
514         -and corresponding-
515         rdar://problem/21951253
516
517         Reviewed by Tim Horton.
518
519         This patch re-names mediaDocumentNaturalSizeChanged() to 
520         imageOrMediaDocumentSizeChanged(), and, as the new name implies, uses the 
521         function for both media documents and images.
522
523         * html/ImageDocument.cpp:
524         (WebCore::ImageDocument::imageUpdated):
525         * html/MediaDocument.cpp:
526         (WebCore::MediaDocument::mediaElementNaturalSizeChanged):
527         * page/ChromeClient.h:
528
529 2015-08-20  Simon Fraser  <simon.fraser@apple.com>
530
531         Add myself as the will-change contact.
532
533         * features.json:
534
535 2015-08-20  Chris Dumez  <cdumez@apple.com>
536
537         [Cocoa] Treat Epoch as invalid value for "Last-Modified" header
538         https://bugs.webkit.org/show_bug.cgi?id=148162
539         rdar://problem/22330837
540
541         Reviewed by Antti Koivisto.
542
543         Ignore "Last-Modified" header when computing heuristic freshness if it
544         is Epoch. CFNetwork currently converts a malformed date for Last-Modified
545         into Epoch so there is no way for us to distinguish Epoch from invalid
546         input. Without this, we would end up with cached resources that have a
547         giant lifetime (> 4 years) due to a malformed HTTP header.
548
549         Some Websites (e.g. www.popehat.com) also wrongly return Epoch as
550         Last-Modified value and we would end up caching it overly aggressively.
551         Now that we consider Epoch as an invalid value for Last-Modified, it will
552         also work around this content bug.
553
554         Test: http/tests/cache/disk-cache/disk-cache-last-modified.html
555
556         * platform/network/ResourceResponseBase.cpp:
557         (WebCore::ResourceResponseBase::lastModified):
558
559 2015-08-19  Brian Burg  <bburg@apple.com>
560
561         Web Inspector: add TestHarness option to tee all commands to system console
562         https://bugs.webkit.org/show_bug.cgi?id=148181
563
564         Reviewed by Joseph Pecoraro.
565
566         * inspector/InspectorFrontendHost.cpp:
567         (WebCore::InspectorFrontendHost::unbufferedLog): Remove log prefix so output
568         to stderr can be diffed against expected results without processing.
569
570 2015-08-19  Brent Fulgham  <bfulgham@apple.com>
571
572         [Win] Unreviewed build fix after r188663.
573
574         The new bindings file was added to the Visual Studio project, but was marked to not
575         be built. It should have also been added to the "JSBindingsAllInOne.cpp" file so
576         that the new code gets compiled.
577
578         * bindings/js/JSBindingsAllInOne.cpp:
579
580 2015-08-19  Alex Christensen  <achristensen@webkit.org>
581
582         CMake Windows build should not include files directly from other Source directories
583         https://bugs.webkit.org/show_bug.cgi?id=148198
584
585         Reviewed by Brent Fulgham.
586
587         * CMakeLists.txt:
588         * PlatformEfl.cmake:
589         * PlatformGTK.cmake:
590         * PlatformWin.cmake:
591
592 2015-08-19  Wenson Hsieh  <wenson_hsieh@apple.com>
593
594         Select validation does not correctly work when handling change event
595         https://bugs.webkit.org/show_bug.cgi?id=145869
596
597         Reviewed by Dean Jackson.
598
599         When selecting an option in a <select> with validation that also has an onchange listener, calling
600         checkValidity() for the select within the onchange handler would produce incorrect results and (on
601         a debug build) crash at an assertion. This is because the change events were being dispatched before
602         form validity was updated. Making the validation step come before the change event dispatch fixes
603         this issue.
604
605         Test: fast/forms/onchange-select-check-validity.html
606
607         * html/HTMLSelectElement.cpp:
608         (WebCore::HTMLSelectElement::selectOption): Update validity before dispatching change events.
609
610 2015-08-19  Jinyoung Hur  <hur.ims@navercorp.com>
611
612         GraphicsContext3D::activeTexture should not be called with zero-based index
613         https://bugs.webkit.org/show_bug.cgi?id=148020
614
615         Reviewed by Alex Christensen.
616
617         GraphicsContext3D::activeTexture should be called with an argument that is greater than or equal to 
618         GraphicsContext3D::TEXTURE0.
619
620         Test: fast/canvas/webgl/texture-complete.html
621
622         * html/canvas/WebGLRenderingContextBase.cpp:
623         (WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
624
625 2015-08-19  Chris Dumez  <cdumez@apple.com>
626
627         Avoid double hash lookup in our JS bindings named property getter code
628         https://bugs.webkit.org/show_bug.cgi?id=148193
629
630         Reviewed by Geoffrey Garen.
631
632         Avoid double hash lookup in our JS bindings named property getter code
633         for performance reasons.
634
635         * CMakeLists.txt:
636         * WebCore.xcodeproj/project.pbxproj:
637         Add new file.
638
639         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp: Added.
640         (WebCore::JSDOMNamedFlowCollection::nameGetter):
641         Moved custom named getter code for DOMNamedFlowCollection from the
642         bindings generator to an actual custom bindings file.
643
644         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
645         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
646         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
647         * bindings/scripts/test/JS/JSTestEventTarget.h:
648         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
649         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
650         Rebaseline bindings tests.
651
652 2015-08-19  Simon Fraser  <simon.fraser@apple.com>
653
654         Add CSS will-change to the feature list
655         https://bugs.webkit.org/show_bug.cgi?id=148199
656
657         Reviewed by Dean Jackson.
658
659         * features.json:
660
661 2015-08-19  Eric Carlson  <eric.carlson@apple.com>
662
663         Remove ENABLE_WEBVTT_REGIONS
664         https://bugs.webkit.org/show_bug.cgi?id=148184
665
666         Reviewed by Jer Noble.
667
668         * Configurations/FeatureDefines.xcconfig: Remove ENABLE_WEBVTT_REGIONS.
669         * html/HTMLMediaElement.cpp:
670         (WebCore::HTMLMediaElement::textTrackRemoveCue):
671         * html/shadow/MediaControlElements.cpp:
672         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
673         * html/track/InbandGenericTextTrack.cpp:
674         (WebCore::InbandGenericTextTrack::newCuesParsed):
675         (WebCore::InbandGenericTextTrack::newRegionsParsed):
676         (WebCore::InbandGenericTextTrack::fileFailedToParse):
677         * html/track/InbandGenericTextTrack.h:
678         * html/track/InbandWebVTTTextTrack.cpp:
679         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
680         (WebCore::InbandWebVTTTextTrack::newRegionsParsed):
681         (WebCore::InbandWebVTTTextTrack::fileFailedToParse):
682         * html/track/InbandWebVTTTextTrack.h:
683         * html/track/LoadableTextTrack.cpp:
684         (WebCore::LoadableTextTrack::cueLoadingCompleted):
685         (WebCore::LoadableTextTrack::newRegionsAvailable):
686         (WebCore::LoadableTextTrack::id):
687         * html/track/LoadableTextTrack.h:
688         * html/track/TextTrack.cpp:
689         (WebCore::TextTrack::TextTrack):
690         (WebCore::TextTrack::~TextTrack):
691         (WebCore::TextTrack::removeCue):
692         (WebCore::TextTrack::ensureVTTRegionList):
693         (WebCore::TextTrack::removeRegion):
694         (WebCore::TextTrack::cueWillChange):
695         * html/track/TextTrack.h:
696         * html/track/TextTrack.idl:
697         * html/track/TextTrackCue.cpp:
698         * html/track/VTTCue.cpp:
699         (WebCore::VTTCueBox::applyCSSProperties):
700         (WebCore::VTTCue::createCueRenderingTree):
701         (WebCore::VTTCue::setRegionId):
702         (WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
703         (WebCore::VTTCue::setIsActive):
704         (WebCore::VTTCue::removeDisplayTree):
705         (WebCore::VTTCue::settingName):
706         (WebCore::VTTCue::setCueSettings):
707         (WebCore::VTTCue::getCSSAlignment):
708         * html/track/VTTCue.h:
709         (WebCore::VTTCue::regionId):
710         * html/track/VTTCue.idl:
711         * html/track/VTTRegion.cpp:
712         * html/track/VTTRegion.h:
713         * html/track/VTTRegion.idl:
714         * html/track/VTTRegionList.cpp:
715         * html/track/VTTRegionList.h:
716         * html/track/VTTRegionList.idl:
717         * html/track/WebVTTParser.cpp:
718         (WebCore::WebVTTParser::parseFloatPercentageValue):
719         (WebCore::WebVTTParser::parseFloatPercentageValuePair):
720         (WebCore::WebVTTParser::WebVTTParser):
721         (WebCore::WebVTTParser::getNewCues):
722         (WebCore::WebVTTParser::getNewRegions):
723         (WebCore::WebVTTParser::parseFileHeader):
724         (WebCore::WebVTTParser::parse):
725         (WebCore::WebVTTParser::collectMetadataHeader):
726         (WebCore::WebVTTParser::collectCueId):
727         (WebCore::WebVTTParser::resetCueValues):
728         (WebCore::WebVTTParser::createNewRegion):
729         (WebCore::WebVTTParser::collectTimeStamp):
730         * html/track/WebVTTParser.h:
731         (WebCore::WebVTTParserClient::~WebVTTParserClient):
732         * loader/TextTrackLoader.cpp:
733         (WebCore::TextTrackLoader::newCuesParsed):
734         (WebCore::TextTrackLoader::newRegionsParsed):
735         (WebCore::TextTrackLoader::fileFailedToParse):
736         (WebCore::TextTrackLoader::getNewCues):
737         (WebCore::TextTrackLoader::getNewRegions):
738         * loader/TextTrackLoader.h:
739         * rendering/RenderVTTCue.cpp:
740         (WebCore::RenderVTTCue::layout):
741
742 2015-08-19  Brent Fulgham  <bfulgham@apple.com>
743
744         Scrollable area container is not properly cleared when page is going into the PageCache
745         https://bugs.webkit.org/show_bug.cgi?id=148182
746         <rdar://problem/21969170>
747
748         Reviewed by Dean Jackson.
749
750         Must be tested manually going back and forth in history several times.
751
752         * history/CachedFrame.cpp:
753         (WebCore::CachedFrame::CachedFrame): Clear the cached ScrollableAreas from the FrameView.
754         * page/FrameView.cpp:
755         (WebCore::FrameView::clearScrollableAreas): Added.
756         * page/FrameView.h:
757
758 2015-08-19  Zalan Bujtas  <zalan@apple.com>
759
760         outline-style: auto leaves bits behind on strava's flyby view.
761         https://bugs.webkit.org/show_bug.cgi?id=148178
762
763         Reviewed by Simon Fraser.
764
765         RenderView::m_maximalOutlineSize should include outline-offset.
766
767         Test: fast/repaint/outline-auto-with-width-less-than-focus-ring-width-and-offset-repaint.html
768
769         * rendering/RenderElement.cpp:
770         (WebCore::RenderElement::computeMaxOutlineSize):
771         * rendering/RenderObject.cpp:
772         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
773
774 2015-08-19  Anders Carlsson  <andersca@apple.com>
775
776         Fix errors on bots.
777
778         Ask the backend to cleanup and terminate
779
780         * Modules/webdatabase/SQLTransaction.cpp:
781         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
782
783 2015-08-19  Dean Jackson  <dino@apple.com>
784
785         Clean up our CSS files (e.g. remove prefixes)
786         https://bugs.webkit.org/show_bug.cgi?id=148194
787         <rdar://problem/22351034>
788
789         Reviewed by Brent Fulgham.
790
791         A lot of our internal CSS was still using prefixed forms of properties.
792         As I started cleaning those up, I noticed lots of small things
793         like missing semicolons and whitespace.
794
795         No change in behaviour for testing.
796
797         * css/fullscreen.css:
798         * css/html.css:
799         * css/mathml.css:
800         * css/mediaControls.css:
801         * css/mediaControlsGtk.css:
802         * css/plugIns.css:
803
804 2015-08-19  Zalan Bujtas  <zalan@apple.com>
805
806         Cleanup outline-style: auto painting.
807         https://bugs.webkit.org/show_bug.cgi?id=148159
808
809         Reviewed by Simon Fraser.
810
811         Old platform style required the focus ring to be painted with an offset. (https://trac.webkit.org/r5358)
812         (and it has the side effect of growing outline-width adds further, unwanted offset)
813         Default css for :focus is adjusted to remove this offset by setting the outline-width to 5px
814         and the outline-offset to -2px. (https://trac.webkit.org/r13639)
815         This patch removes both the old logic and the workaround for getting rid of the unwanted offset.
816
817         Test: fast/repaint/outline-auto-with-default-width-and-offset-repaint.html
818
819         * css/html.css:
820         (:focus):
821         (input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus): Deleted.
822         * platform/graphics/mac/GraphicsContextMac.mm:
823         (WebCore::GraphicsContext::drawFocusRing):
824         * rendering/RenderElement.cpp:
825         (WebCore::RenderElement::computeMaxOutlineSize):
826         (WebCore::RenderElement::paintFocusRing):
827         (WebCore::RenderElement::paintOutline): Short circuit painting outline when painting is disabled. It
828         only change behaviour for non-auto outlines -which are anyway not supposed to be painted when painting is disabled.
829         * rendering/RenderObject.cpp:
830         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
831         * rendering/RenderTheme.h:
832         (WebCore::RenderTheme::platformFocusRingWidth):
833         (WebCore::RenderTheme::platformFocusRingMaxWidth): Deleted.
834
835 2015-08-18  Dean Jackson  <dino@apple.com>
836
837         Support CSS filters without webkit prefix
838         https://bugs.webkit.org/show_bug.cgi?id=148138
839         <rdar://problem/22331434>
840
841         Reviewed by Sam Weinig.
842
843         Add support for the un-prefixed form of the CSS filter property.
844         This was straightforward for the general case on HTML content.
845         It was a bit more tricky on SVG content, where there already
846         was an existing "filter" property/attribute. The parsing
847         code is now shared between SVG and HTML, as is the
848         computed style output.
849
850         Covered by updating the existing tests, and
851         adding one new test: css3/filters/unprefixed.html
852
853         * css/CSSComputedStyleDeclaration.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter.
854         (WebCore::isLayoutDependent):
855         (WebCore::ComputedStyleExtractor::propertyValue):
856
857         * css/CSSFilterImageValue.cpp:
858         (WebCore::CSSFilterImageValue::customCSSText): Use "filter(" as the prefix.
859
860         * css/CSSParser.cpp:
861         (WebCore::CSSParser::parseValue): Rename CSSPropertyWebkitFilter to CSSPropertyFilter.
862         (WebCore::CSSParser::isGeneratedImageValue): Add support for "filter()".
863         (WebCore::CSSParser::parseGeneratedImage): Ditto.
864         (WebCore::CSSParser::parseBuiltinFilterArguments):
865
866         * css/CSSPropertyNames.in: Add filter. Make -webkit-filter an alias.
867
868         * css/SVGCSSComputedStyleDeclaration.cpp:
869         (WebCore::ComputedStyleExtractor::svgPropertyValue): Deleted.
870
871         * page/animation/CSSPropertyAnimation.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter.
872         (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter):
873         * page/animation/KeyframeAnimation.cpp: Ditto.
874         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists):
875
876         * platform/graphics/GraphicsLayer.cpp: Rename AnimatedPropertyWebkitFilter to AnimatedPropertyFilter.
877         (WebCore::GraphicsLayer::validateFilterOperations):
878         * platform/graphics/GraphicsLayerClient.h: Ditto.
879         * platform/graphics/ca/GraphicsLayerCA.cpp: Ditto.
880         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
881         (WebCore::GraphicsLayerCA::addAnimation):
882         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
883         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
884
885         * rendering/RenderLayer.cpp:
886         (WebCore::RenderLayer::updateOrRemoveFilterClients): SVG manages its own filter resources,
887         so we shouldn't add a layer that has an SVG root to the filter clients.
888
889         * rendering/RenderLayerBacking.cpp: Renaming.
890         (WebCore::RenderLayerBacking::startAnimation):
891         (WebCore::RenderLayerBacking::startTransition):
892         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
893         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
894         * rendering/RenderLayerCompositor.cpp: Ditto.
895         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
896
897         * rendering/style/SVGRenderStyle.h: Remove the SVG filter style.
898         (WebCore::SVGRenderStyle::isolatesBlending): No need to check for hasFilter().
899         (WebCore::SVGRenderStyle::initialFilterResource): Deleted.
900         (WebCore::SVGRenderStyle::setFilterResource): Deleted.
901         (WebCore::SVGRenderStyle::filterResource): Deleted.
902         (WebCore::SVGRenderStyle::hasFilter): Deleted.
903
904         * rendering/style/SVGRenderStyleDefs.cpp: Remove the filter resource.
905         (WebCore::StyleResourceData::StyleResourceData): Deleted.
906         (WebCore::StyleResourceData::operator==): Deleted.
907         * rendering/style/SVGRenderStyleDefs.h:
908
909         * rendering/style/WillChangeData.cpp: Renaming.
910         (WebCore::propertyCreatesStackingContext):
911         (WebCore::propertyTriggersCompositing):
912
913         * rendering/svg/SVGRenderSupport.cpp:
914         (WebCore::SVGRenderSupport::isolatesBlending): Since SVGRenderStyle no longer checks
915         hasFilter() in its isolatesBlending(), we need to do it here.
916
917         * rendering/svg/SVGRenderingContext.cpp:
918         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
919
920         * rendering/svg/SVGRenderTreeAsText.cpp:
921         (WebCore::writeResources): Dump from the CSS style value.
922         * rendering/svg/SVGResources.cpp: Ditto.
923         (WebCore::SVGResources::buildCachedResources):
924         * rendering/svg/SVGResources.h:
925         * rendering/svg/SVGResourcesCache.cpp:
926         (WebCore::SVGResourcesCache::addResourcesFromRenderer):
927
928         * platform/graphics/texmap/TextureMapperLayer.cpp: Renaming.
929         * platform/graphics/texmap/TextureMapperAnimation.cpp:
930         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
931
932 2015-08-18  Anders Carlsson  <andersca@apple.com>
933
934         More work on simplifying the WebSQL code
935         https://bugs.webkit.org/show_bug.cgi?id=148145
936
937         Reviewed by Tim Horton.
938
939         Eliminate SQLTransaction::sendToBackendState.
940
941         * Modules/webdatabase/SQLTransaction.cpp:
942         (WebCore::SQLTransaction::stateFunctionFor):
943         Change sendToBackendState to unreachableState,
944
945         (WebCore::SQLTransaction::deliverTransactionCallback):
946         Call deliverTransactionErrorCallback directly and schedule RunStatements on the backend.
947
948         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
949         Schedule CleanupAfterTransactionErrorCallback on the backend.
950
951         (WebCore::SQLTransaction::deliverStatementCallback):
952         Fold nextStateForTransactionError into here. Schedule backend states explicitly.
953
954         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
955         Schedule RunStatements on the backend.
956
957         (WebCore::SQLTransaction::deliverSuccessCallback):
958         Schedule CleanupAndTerminate on the backend.
959
960         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
961         The return value of this function isn't used to make it return void.
962
963         (WebCore::SQLTransaction::nextStateForTransactionError): Deleted.
964         Remove this, it's been folded into deliverStatementCallback.
965
966         (WebCore::SQLTransaction::sendToBackendState): Deleted.
967         Get rid of this.
968
969         * Modules/webdatabase/SQLTransaction.h:
970         Update member functions.
971
972         * Modules/webdatabase/SQLTransactionBackend.cpp:
973         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
974         Just call runStatements() directly.
975
976         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
977         Just call cleanupAndTerminate() directly.
978
979         (WebCore::SQLTransactionBackend::shouldPerformWhilePaused): Deleted.
980         Get rid of an iOS member function that's no longer used.
981
982         * Modules/webdatabase/SQLTransactionBackend.h:
983         Remove member function.
984
985 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
986
987         Replace all uses of std::mutex/std::condition_variable with WTF::Lock/WTF::Condition
988         https://bugs.webkit.org/show_bug.cgi?id=148140
989
990         Reviewed by Geoffrey Garen.
991
992         No new tests because no new behavior.
993
994         * Modules/webaudio/AudioBufferSourceNode.cpp:
995         (WebCore::AudioBufferSourceNode::process):
996         (WebCore::AudioBufferSourceNode::setBuffer):
997         * Modules/webaudio/AudioBufferSourceNode.h:
998         * Modules/webaudio/AudioParamTimeline.cpp:
999         (WebCore::AudioParamTimeline::insertEvent):
1000         (WebCore::AudioParamTimeline::cancelScheduledValues):
1001         (WebCore::AudioParamTimeline::valueForContextTime):
1002         (WebCore::AudioParamTimeline::valuesForTimeRange):
1003         * Modules/webaudio/AudioParamTimeline.h:
1004         * Modules/webaudio/ConvolverNode.cpp:
1005         (WebCore::ConvolverNode::process):
1006         (WebCore::ConvolverNode::reset):
1007         (WebCore::ConvolverNode::setBuffer):
1008         * Modules/webaudio/ConvolverNode.h:
1009         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
1010         (WebCore::MediaElementAudioSourceNode::process):
1011         * Modules/webaudio/MediaElementAudioSourceNode.h:
1012         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
1013         (WebCore::MediaStreamAudioSourceNode::setFormat):
1014         (WebCore::MediaStreamAudioSourceNode::process):
1015         * Modules/webaudio/MediaStreamAudioSourceNode.h:
1016         * Modules/webaudio/OscillatorNode.cpp:
1017         (WebCore::OscillatorNode::process):
1018         (WebCore::OscillatorNode::setPeriodicWave):
1019         * Modules/webaudio/OscillatorNode.h:
1020         * Modules/webaudio/PannerNode.cpp:
1021         (WebCore::PannerNode::process):
1022         (WebCore::PannerNode::setPanningModel):
1023         * Modules/webaudio/PannerNode.h:
1024         * Modules/webaudio/WaveShaperProcessor.cpp:
1025         (WebCore::WaveShaperProcessor::setCurve):
1026         (WebCore::WaveShaperProcessor::setOversample):
1027         (WebCore::WaveShaperProcessor::process):
1028         * Modules/webaudio/WaveShaperProcessor.h:
1029         * Modules/webdatabase/Database.cpp:
1030         (WebCore::retrieveTextResultFromDatabase):
1031         (WebCore::guidToVersionMap):
1032         (WebCore::Database::Database):
1033         (WebCore::Database::performOpenAndVerify):
1034         (WebCore::Database::closeDatabase):
1035         (WebCore::Database::getCachedVersion):
1036         (WebCore::Database::setCachedVersion):
1037         (WebCore::guidMutex): Deleted.
1038         * Modules/webdatabase/DatabaseManager.cpp:
1039         (WebCore::DatabaseManager::existingDatabaseContextFor):
1040         (WebCore::DatabaseManager::registerDatabaseContext):
1041         (WebCore::DatabaseManager::unregisterDatabaseContext):
1042         (WebCore::DatabaseManager::didConstructDatabaseContext):
1043         (WebCore::DatabaseManager::didDestructDatabaseContext):
1044         (WebCore::DatabaseManager::addProposedDatabase):
1045         (WebCore::DatabaseManager::removeProposedDatabase):
1046         (WebCore::DatabaseManager::fullPathForDatabase):
1047         (WebCore::DatabaseManager::detailsForNameAndOrigin):
1048         * Modules/webdatabase/DatabaseManager.h:
1049         * bindings/objc/DOMInternal.mm:
1050         (getDOMWrapper):
1051         (addDOMWrapper):
1052         (removeDOMWrapper):
1053         (wrapperCacheLock): Deleted.
1054         * crypto/CryptoAlgorithmRegistry.cpp:
1055         (WebCore::CryptoAlgorithmRegistry::singleton):
1056         (WebCore::CryptoAlgorithmRegistry::CryptoAlgorithmRegistry):
1057         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
1058         (WebCore::CryptoAlgorithmRegistry::nameForIdentifier):
1059         (WebCore::CryptoAlgorithmRegistry::create):
1060         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
1061         (WebCore::registryMutex): Deleted.
1062         * inspector/WorkerDebuggerAgent.cpp:
1063         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
1064         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
1065         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
1066         * page/WheelEventTestTrigger.cpp:
1067         (WebCore::WheelEventTestTrigger::clearAllTestDeferrals):
1068         (WebCore::WheelEventTestTrigger::setTestCallbackAndStartNotificationTimer):
1069         (WebCore::WheelEventTestTrigger::deferTestsForReason):
1070         (WebCore::WheelEventTestTrigger::removeTestDeferralForReason):
1071         (WebCore::WheelEventTestTrigger::triggerTestTimerFired):
1072         * page/WheelEventTestTrigger.h:
1073         * page/scrolling/ScrollingThread.cpp:
1074         (WebCore::ScrollingThread::dispatch):
1075         (WebCore::ScrollingThread::createThreadIfNeeded):
1076         (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
1077         * page/scrolling/ScrollingThread.h:
1078         * page/scrolling/mac/ScrollingThreadMac.mm:
1079         (WebCore::ScrollingThread::initializeRunLoop):
1080         * platform/audio/ReverbConvolver.cpp:
1081         (WebCore::ReverbConvolver::~ReverbConvolver):
1082         (WebCore::ReverbConvolver::backgroundThreadEntry):
1083         (WebCore::ReverbConvolver::process):
1084         (WebCore::ReverbConvolver::reset):
1085         * platform/audio/ReverbConvolver.h:
1086         * platform/ios/wak/WebCoreThreadRun.cpp:
1087         * platform/mac/Language.mm:
1088         (WebCore::preferredLanguages):
1089         (+[WebLanguageChangeObserver languagePreferencesDidChange:]):
1090         (WebCore::platformUserPreferredLanguages):
1091         (WebCore::preferredLanguagesMutex): Deleted.
1092         * platform/network/cf/LoaderRunLoopCF.cpp:
1093         (WebCore::emptyPerform):
1094         (WebCore::runLoaderThread):
1095         (WebCore::loaderRunLoop):
1096         (WebCore::loaderRunLoopMutex): Deleted.
1097         (WebCore::loaderRunLoopConditionVariable): Deleted.
1098         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1099         (WebCore::callOnMainThreadAndWait):
1100         * platform/network/curl/SocketStreamHandle.h:
1101         * platform/network/curl/SocketStreamHandleCurl.cpp:
1102         (WebCore::SocketStreamHandle::platformSend):
1103         (WebCore::SocketStreamHandle::sendData):
1104         * platform/sql/SQLiteDatabaseTracker.cpp:
1105         (WebCore::SQLiteDatabaseTracker::setClient):
1106         (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
1107         (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
1108         (WebCore::SQLiteDatabaseTracker::transactionInProgressMutex): Deleted.
1109         * platform/text/TextBreakIterator.cpp:
1110         (WebCore::compareAndSwapNonSharedCharacterBreakIterator):
1111         * platform/text/TextEncodingRegistry.cpp:
1112         (WebCore::newTextCodec):
1113         (WebCore::atomicCanonicalTextEncodingName):
1114         (WebCore::dumpTextEncodingNameMap):
1115         (WebCore::encodingRegistryMutex): Deleted.
1116         * workers/WorkerThread.cpp:
1117         (WebCore::workerThreads):
1118         (WebCore::WorkerThread::workerThreadCount):
1119         (WebCore::WorkerThread::WorkerThread):
1120         (WebCore::WorkerThread::~WorkerThread):
1121         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
1122         (WebCore::threadSetMutex): Deleted.
1123
1124 2015-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
1125
1126         Scroll snapping should trigger when receiving a momentum end wheel event
1127         https://bugs.webkit.org/show_bug.cgi?id=148155
1128
1129         Reviewed by Alexey Proskuryakov.
1130
1131         No new tests, since the purpose of this patch is to get existing tests to pass when
1132         allowing similar wheel events to coalesce. To accomplish this, we relax our assumption
1133         that the user must have generated at least 3 momentum wheel events in order for the
1134         gliding animation to trigger. Upon receiving a wheel event indicating the end of the
1135         momentum phase, we now kick off the gliding animation as long as any momentum event
1136         was tracked earlier in the gesture with a nonzero wheel delta.
1137
1138         * platform/cocoa/ScrollController.mm:
1139         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added logic to
1140             begin a glide animation if we have received a momentum end event but have not
1141             yet triggered a gliding animation.
1142         * platform/cocoa/ScrollSnapAnimatorState.h:
1143         * platform/cocoa/ScrollSnapAnimatorState.mm:
1144         (WebCore::ScrollSnapAnimatorState::wheelDeltaTrackingIsInProgress): Minor refactoring
1145             to make the wheel event processing code more readable.
1146         (WebCore::ScrollSnapAnimatorState::hasFinishedTrackingWheelDeltas): Ditto.
1147
1148 2015-08-18  Myles C. Maxfield  <mmaxfield@apple.com>
1149
1150         [Cocoa] Punctuation near Hindi text is garbled when styled with the system font
1151         https://bugs.webkit.org/show_bug.cgi?id=148164
1152
1153         Reviewed by Brian Burg.
1154
1155         Fonts cache whether or not they are the system font. This caching took place at the end of Font::platformInit().
1156         However, in the middle of Font::platformInit(), we look up a glyph, which calls GlyphPage::fill() which consults
1157         with this cache. However, at this point, the cache has not been constructed yet. The solution is just to
1158         construct the cache earlier (at the beginning of the function).
1159
1160         Consulting with the cache before it is populated causes it to erroneously say that no fonts are system fonts.
1161         Then, we use Core Graphics to ask for glyphs instead of Core Text. Core Graphics, however, is incapable of
1162         handling the system font, and returns us garbled results. In particular, when the system language is set to
1163         Japanese, the system font does not support punctuation, and Core Text tells us so. However, Core Graphics
1164         erroneously tells us that the system font does support punctuation.
1165
1166         Then, if text is near the punctuation which causes us to take the complex text codepath (such as Hindi text),
1167         we tell Core Text to explicitly lay out the punctuation using the system font (which does not support
1168         punctuation). Core Text then replies that the provided font doesn't support the punctuation, and that we should
1169         use LastResort with some other glyphs instead. WebKit then disregards the font CoreText told us to use (because
1170         we are oh-so-sure that the font in question supports punctuation) and uses the LastResort glyph IDs with our
1171         font, which causes arbitrary glyphs to be shown.
1172
1173         Test: fast/text/hindi-system-font-punctuation.html
1174
1175         * platform/graphics/cocoa/FontCocoa.mm:
1176         (WebCore::Font::platformInit):
1177
1178 2015-08-18  Joseph Pecoraro  <pecoraro@apple.com>
1179
1180         Web Inspector: Links for rules in <style> are incorrect, do not account for <style> offset in the document
1181         https://bugs.webkit.org/show_bug.cgi?id=148141
1182
1183         Reviewed by Brian Burg.
1184
1185         Test: inspector/css/getAllStyleSheets.html
1186
1187         * css/CSSStyleSheet.h:
1188         * css/CSSStyleSheet.cpp:
1189         (WebCore::CSSStyleSheet::create):
1190         (WebCore::CSSStyleSheet::createInline):
1191         (WebCore::CSSStyleSheet::CSSStyleSheet):
1192         Include the starting position when created by the Parser.
1193         Default to the minimum position, which should never be
1194         possible for an inline <style> because the "<style>" characters
1195         themselves require at least some offset.
1196
1197         * dom/InlineStyleSheetOwner.cpp:
1198         (WebCore::InlineStyleSheetOwner::createSheet):
1199         Provide the start position offset for this stylesheet if it was inline.
1200
1201         * inspector/InspectorStyleSheet.cpp:
1202         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
1203         Include new protocol values for the style sheet.
1204
1205 2015-08-18  Dean Jackson  <dino@apple.com>
1206
1207         Add null check in ImageBufferData::getData
1208         https://bugs.webkit.org/show_bug.cgi?id=148156
1209         <rdar://problem/22337157>
1210
1211         Reviewed by Simon Fraser.
1212
1213         We're getting a number of crash reports that suggest the allocation
1214         of the result buffer has failed, but have been unable to reproduce.
1215         This patch adds a null check to the allocation, and logs a message
1216         to the system console. This might avoid the crashes, and hopefully
1217         we'll see the message.
1218
1219         No new tests, since we're unable to reproduce this crash.
1220
1221         * platform/graphics/cg/ImageBufferDataCG.cpp:
1222         (WebCore::ImageBufferData::getData): Add a null-check and early
1223         return.
1224
1225 2015-08-18  Chris Dumez  <cdumez@apple.com>
1226
1227         Use CSSValuePool::singleton() instead of cssValuePool()
1228         https://bugs.webkit.org/show_bug.cgi?id=148132
1229
1230         Reviewed by Simon Fraser.
1231
1232         Use CSSValuePool::singleton() instead of cssValuePool() to access the
1233         global CSSValuePool instance, as per coding style.
1234
1235 2015-08-17  Matt Rajca  <mrajca@apple.com>
1236
1237         Media Session: don't begin listening for interruptions when an interruption provider is created
1238         https://bugs.webkit.org/show_bug.cgi?id=148109
1239
1240         Reviewed by Eric Carlson.
1241
1242         If we call `beginListeningForInterruption` in MediaSessionInterruptionProvider's constructor, the current
1243         class's implementation will get called, not implementations provided by subclasses (this makes sense since base
1244         classes are initialized before derived classes). To fix this, we let clients of
1245         MediaSessionInterruptionProvider start listening for interruptions instead. As a corollary of this, we can
1246         make MediaSessionInterruptionProvider's methods pure virtual.
1247
1248         * Modules/mediasession/MediaSessionManager.cpp:
1249         (WebCore::MediaSessionManager::MediaSessionManager):
1250         * platform/mediasession/MediaSessionInterruptionProvider.h:
1251         * platform/mediasession/MediaSessionInterruptionProvider.cpp:
1252         (WebCore::MediaSessionInterruptionProvider::MediaSessionInterruptionProvider):
1253
1254 2015-08-18  Eric Carlson  <eric.carlson@apple.com>
1255
1256         Remove "platform text track menu"
1257         https://bugs.webkit.org/show_bug.cgi?id=148139
1258
1259         Reviewed by Jer Noble.
1260
1261         No new tests, this patch removes unused code.
1262
1263         * WebCore.xcodeproj/project.pbxproj: Remove PlatformTextTrackMenu.h.
1264         * html/HTMLMediaElement.cpp:
1265         (WebCore::HTMLMediaElement::scheduleDelayedAction): Remove PLATFORM_TEXT_TRACK_MENU.
1266         (WebCore::HTMLMediaElement::pendingActionTimerFired):
1267         (WebCore::HTMLMediaElement::textTrackModeChanged):
1268         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack):
1269         (WebCore::HTMLMediaElement::closeCaptionTracksChanged):
1270         (WebCore::HTMLMediaElement::addAudioTrack):
1271         (WebCore::HTMLMediaElement::clearMediaPlayer):
1272         (WebCore::HTMLMediaElement::setSelectedTextTrack): Deleted.
1273         (WebCore::HTMLMediaElement::platformTextTracks): Deleted.
1274         (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Deleted.
1275         (WebCore::HTMLMediaElement::platformTextTrackMenu): Deleted.
1276         * html/HTMLMediaElement.h:
1277         (WebCore::HTMLMediaElement::player):
1278         * html/track/InbandTextTrack.h:
1279         * html/track/TextTrack.cpp:
1280         (WebCore::TextTrack::hasCue):
1281         (WebCore::TextTrack::isMainProgramContent):
1282         (WebCore::TextTrack::platformTextTrack): Deleted.
1283         * html/track/TextTrack.h:
1284         (WebCore::TextTrack::create):
1285         * platform/graphics/MediaPlayer.cpp:
1286         (WebCore::MediaPlayer::resetMediaEngines):
1287         (WebCore::MediaPlayer::implementsTextTrackControls): Deleted.
1288         (WebCore::MediaPlayer::textTrackMenu): Deleted.
1289         * platform/graphics/MediaPlayer.h:
1290         * platform/graphics/MediaPlayerPrivate.h:
1291         (WebCore::MediaPlayerPrivateInterface::tracksChanged):
1292         (WebCore::MediaPlayerPrivateInterface::simulateAudioInterruption):
1293         (WebCore::MediaPlayerPrivateInterface::implementsTextTrackControls): Deleted.
1294         (WebCore::MediaPlayerPrivateInterface::textTrackMenu): Deleted.
1295         * platform/graphics/PlatformTextTrack.h:
1296         * platform/graphics/PlatformTextTrackMenu.h: Removed.
1297
1298 2015-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
1299
1300         Search input results and clear icons are misaligned when padding is added
1301         https://bugs.webkit.org/show_bug.cgi?id=148146
1302         <rdar://problem/22310951>
1303
1304         Reviewed by Zalan Bujtas.
1305
1306         Use content box rect to determine where to draw the results and cancel buttons
1307         of a search field that has -webkit-appearance: textfield. Previously, we used
1308         the bounding box, which caused the buttons to render in the input's padding
1309         region.
1310
1311         Test: platform/mac/fast/forms/search/search-padding-cancel-results-buttons.html
1312
1313         * rendering/RenderThemeMac.mm:
1314         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Use content box to
1315             compute where to render cancel button.
1316         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Use content box to
1317             compute where to render results button.
1318
1319 2015-08-18  Dean Jackson  <dino@apple.com>
1320
1321         CAOpenGLLayer doesn't need an SPI declaration
1322         https://bugs.webkit.org/show_bug.cgi?id=148151
1323
1324         Reviewed by Tim Horton.
1325
1326         Follow-up to https://trac.webkit.org/r188608.
1327         The property is in the public SDK, so we don't need
1328         to declare it.
1329
1330         * platform/spi/cocoa/QuartzCoreSPI.h:
1331
1332 2015-08-18  Myles C. Maxfield  <mmaxfield@apple.com>
1333
1334         [El Capitan] Fix the open source build
1335         https://bugs.webkit.org/show_bug.cgi?id=148134
1336
1337         Reviewed by Anders Carlsson.
1338
1339         No new tests because there is no behavior change.
1340
1341         Need to declare CGFontRenderingStyle.
1342
1343         * platform/spi/cocoa/CoreTextSPI.h:
1344
1345 2015-08-18  Dean Jackson  <dino@apple.com>
1346
1347         CAOpenGLLayer needs a named class extension for non-internal installs
1348         https://bugs.webkit.org/show_bug.cgi?id=148151
1349         <rdar://problem/22335111>
1350
1351         Reviewed by Tim Horton.
1352
1353         In order to build using the public SDK on El Capitan, we can't
1354         use a class extension to declare this SPI.
1355
1356         No change in behaviour, so no new tests.
1357
1358         * platform/spi/cocoa/QuartzCoreSPI.h:
1359
1360 2015-08-18  Simon Fraser  <simon.fraser@apple.com>
1361
1362         will-change: backface-visibility should not cause stacking context
1363         https://bugs.webkit.org/show_bug.cgi?id=148091
1364
1365         Reviewed by Zalan Bujtas.
1366         
1367         Take CSSPropertyWebkitBackfaceVisibility out of the list of properties that causes
1368         will-change to create stacking context, since no value of the property creates
1369         stacking.
1370
1371         Move willChangeCreatesStackingContext() and shouldWillChangeCreateStackingContext()
1372         into RenderInline since it's only called from there.
1373
1374         * rendering/RenderElement.cpp:
1375         (WebCore::RenderElement::shouldWillChangeCreateStackingContext): Deleted.
1376         * rendering/RenderElement.h:
1377         (WebCore::RenderElement::willChangeCreatesStackingContext): Deleted.
1378         * rendering/RenderInline.h:
1379         (WebCore::RenderInline::willChangeCreatesStackingContext):
1380         * rendering/style/WillChangeData.cpp:
1381         (WebCore::propertyCreatesStackingContext): Deleted.
1382
1383 2015-08-18  Alex Christensen  <achristensen@webkit.org>
1384
1385         Unreviewed, fix the cairo build after r188594.
1386
1387         * platform/network/curl/CurlDownload.h:
1388         * platform/network/curl/ResourceHandleManager.cpp:
1389         Include Lock.h
1390
1391 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
1392
1393         Unreviewed, fix the cairo build.
1394
1395         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1396
1397 2015-08-17  Filip Pizlo  <fpizlo@apple.com>
1398
1399         Replace all remaining uses of WTF::Mutex with WTF::Lock
1400         https://bugs.webkit.org/show_bug.cgi?id=148089
1401
1402         Reviewed by Geoffrey Garen.
1403
1404         No new tests because no new behavior.
1405
1406         * Modules/webaudio/AsyncAudioDecoder.cpp:
1407         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
1408         (WebCore::AsyncAudioDecoder::runLoop):
1409         * Modules/webaudio/AsyncAudioDecoder.h:
1410         * Modules/webaudio/AudioContext.h:
1411         * Modules/webaudio/MediaStreamAudioSource.cpp:
1412         (WebCore::MediaStreamAudioSource::addAudioConsumer):
1413         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
1414         (WebCore::MediaStreamAudioSource::setAudioFormat):
1415         (WebCore::MediaStreamAudioSource::consumeAudio):
1416         * Modules/webaudio/MediaStreamAudioSource.h:
1417         * Modules/webdatabase/Database.cpp:
1418         (WebCore::Database::close):
1419         (WebCore::Database::runTransaction):
1420         (WebCore::Database::inProgressTransactionCompleted):
1421         (WebCore::Database::hasPendingTransaction):
1422         * Modules/webdatabase/Database.h:
1423         * Modules/webdatabase/DatabaseTask.cpp:
1424         (WebCore::DatabaseTaskSynchronizer::taskCompleted):
1425         * Modules/webdatabase/DatabaseTask.h:
1426         * Modules/webdatabase/DatabaseThread.cpp:
1427         (WebCore::DatabaseThread::start):
1428         (WebCore::DatabaseThread::databaseThread):
1429         * Modules/webdatabase/DatabaseThread.h:
1430         * Modules/webdatabase/DatabaseTracker.cpp:
1431         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
1432         (WebCore::DatabaseTracker::canEstablishDatabase):
1433         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1434         (WebCore::DatabaseTracker::hasEntryForOrigin):
1435         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1436         (WebCore::DatabaseTracker::closeAllDatabases):
1437         (WebCore::DatabaseTracker::fullPathForDatabase):
1438         (WebCore::DatabaseTracker::origins):
1439         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1440         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1441         (WebCore::DatabaseTracker::setDatabaseDetails):
1442         (WebCore::DatabaseTracker::doneCreatingDatabase):
1443         (WebCore::DatabaseTracker::addOpenDatabase):
1444         (WebCore::DatabaseTracker::removeOpenDatabase):
1445         (WebCore::DatabaseTracker::getOpenDatabases):
1446         (WebCore::DatabaseTracker::originLockFor):
1447         (WebCore::DatabaseTracker::quotaForOrigin):
1448         (WebCore::DatabaseTracker::setQuota):
1449         (WebCore::DatabaseTracker::deleteOrigin):
1450         (WebCore::DatabaseTracker::deleteDatabase):
1451         (WebCore::DatabaseTracker::deleteDatabaseFile):
1452         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1453         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
1454         (WebCore::DatabaseTracker::openDatabaseMutex):
1455         (WebCore::DatabaseTracker::setClient):
1456         (WebCore::notificationMutex):
1457         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1458         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1459         * Modules/webdatabase/DatabaseTracker.h:
1460         * Modules/webdatabase/OriginLock.h:
1461         * Modules/webdatabase/SQLCallbackWrapper.h:
1462         (WebCore::SQLCallbackWrapper::clear):
1463         (WebCore::SQLCallbackWrapper::unwrap):
1464         (WebCore::SQLCallbackWrapper::hasCallback):
1465         * Modules/webdatabase/SQLTransactionBackend.cpp:
1466         (WebCore::SQLTransactionBackend::doCleanup):
1467         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
1468         (WebCore::SQLTransactionBackend::getNextStatement):
1469         * Modules/webdatabase/SQLTransactionBackend.h:
1470         * bindings/js/WorkerScriptController.cpp:
1471         (WebCore::WorkerScriptController::scheduleExecutionTermination):
1472         (WebCore::WorkerScriptController::isExecutionTerminating):
1473         * bindings/js/WorkerScriptController.h:
1474         * dom/default/PlatformMessagePortChannel.cpp:
1475         (WebCore::MessagePortChannel::postMessageToRemote):
1476         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
1477         (WebCore::MessagePortChannel::isConnectedTo):
1478         (WebCore::MessagePortChannel::hasPendingActivity):
1479         (WebCore::MessagePortChannel::locallyEntangledPort):
1480         (WebCore::PlatformMessagePortChannel::setRemotePort):
1481         (WebCore::PlatformMessagePortChannel::entangledChannel):
1482         (WebCore::PlatformMessagePortChannel::closeInternal):
1483         * dom/default/PlatformMessagePortChannel.h:
1484         * loader/icon/IconDatabase.cpp:
1485         (WebCore::IconDatabase::removeAllIcons):
1486         (WebCore::IconDatabase::synchronousIconForPageURL):
1487         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
1488         (WebCore::IconDatabase::synchronousIconURLForPageURL):
1489         (WebCore::IconDatabase::retainIconForPageURL):
1490         (WebCore::IconDatabase::performRetainIconForPageURL):
1491         (WebCore::IconDatabase::releaseIconForPageURL):
1492         (WebCore::IconDatabase::performReleaseIconForPageURL):
1493         (WebCore::IconDatabase::setIconDataForIconURL):
1494         (WebCore::IconDatabase::setIconURLForPageURL):
1495         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
1496         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
1497         (WebCore::IconDatabase::pageURLMappingCount):
1498         (WebCore::IconDatabase::retainedPageURLCount):
1499         (WebCore::IconDatabase::iconRecordCount):
1500         (WebCore::IconDatabase::iconRecordCountWithData):
1501         (WebCore::IconDatabase::wakeSyncThread):
1502         (WebCore::IconDatabase::scheduleOrDeferSyncTimer):
1503         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
1504         (WebCore::IconDatabase::databasePath):
1505         (WebCore::IconDatabase::getOrCreatePageURLRecord):
1506         (WebCore::IconDatabase::iconDatabaseSyncThread):
1507         (WebCore::IconDatabase::performOpenInitialization):
1508         (WebCore::IconDatabase::performURLImport):
1509         (WebCore::IconDatabase::syncThreadMainLoop):
1510         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
1511         (WebCore::IconDatabase::readFromDatabase):
1512         (WebCore::IconDatabase::writeToDatabase):
1513         (WebCore::IconDatabase::pruneUnretainedIcons):
1514         (WebCore::IconDatabase::cleanupSyncThread):
1515         * loader/icon/IconDatabase.h:
1516         * page/scrolling/ScrollingTree.cpp:
1517         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
1518         (WebCore::ScrollingTree::commitNewTreeState):
1519         (WebCore::ScrollingTree::setMainFramePinState):
1520         (WebCore::ScrollingTree::mainFrameScrollPosition):
1521         (WebCore::ScrollingTree::setMainFrameScrollPosition):
1522         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
1523         (WebCore::ScrollingTree::isRubberBandInProgress):
1524         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
1525         (WebCore::ScrollingTree::isScrollSnapInProgress):
1526         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
1527         (WebCore::ScrollingTree::setCanRubberBandState):
1528         (WebCore::ScrollingTree::rubberBandsAtLeft):
1529         (WebCore::ScrollingTree::rubberBandsAtRight):
1530         (WebCore::ScrollingTree::rubberBandsAtBottom):
1531         (WebCore::ScrollingTree::rubberBandsAtTop):
1532         (WebCore::ScrollingTree::setScrollPinningBehavior):
1533         (WebCore::ScrollingTree::scrollPinningBehavior):
1534         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
1535         (WebCore::ScrollingTree::latchedNode):
1536         (WebCore::ScrollingTree::setLatchedNode):
1537         (WebCore::ScrollingTree::clearLatchedNode):
1538         * page/scrolling/ScrollingTree.h:
1539         * platform/MemoryPressureHandler.h:
1540         * platform/audio/HRTFDatabaseLoader.cpp:
1541         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
1542         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
1543         * platform/audio/HRTFDatabaseLoader.h:
1544         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1545         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
1546         (WebCore::MemoryPressureHandler::clearMemoryPressure):
1547         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
1548         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
1549         * platform/graphics/DisplayRefreshMonitor.cpp:
1550         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
1551         * platform/graphics/DisplayRefreshMonitor.h:
1552         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
1553         (WebCore::DisplayRefreshMonitor::mutex):
1554         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1555         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
1556         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
1557         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1558         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1559         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1560         (WebCore::AVFWrapper::callbackContext):
1561         (WebCore::AVFWrapper::~AVFWrapper):
1562         (WebCore::AVFWrapper::mapLock):
1563         (WebCore::AVFWrapper::addToMap):
1564         (WebCore::AVFWrapper::removeFromMap):
1565         (WebCore::AVFWrapper::periodicTimeObserverCallback):
1566         (WebCore::AVFWrapper::processNotification):
1567         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
1568         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
1569         (WebCore::AVFWrapper::seekCompletedCallback):
1570         (WebCore::AVFWrapper::processCue):
1571         (WebCore::AVFWrapper::legibleOutputCallback):
1572         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
1573         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
1574         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1575         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
1576         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
1577         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1578         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1579         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1580         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1581         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1582         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1583         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
1584         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
1585         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1586         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
1587         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
1588         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
1589         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1590         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
1591         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1592         * platform/ios/LegacyTileCache.h:
1593         * platform/ios/LegacyTileCache.mm:
1594         (WebCore::LegacyTileCache::setTilesOpaque):
1595         (WebCore::LegacyTileCache::doLayoutTiles):
1596         (WebCore::LegacyTileCache::setCurrentScale):
1597         (WebCore::LegacyTileCache::commitScaleChange):
1598         (WebCore::LegacyTileCache::layoutTilesNow):
1599         (WebCore::LegacyTileCache::layoutTilesNowForRect):
1600         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
1601         (WebCore::LegacyTileCache::removeAllTiles):
1602         (WebCore::LegacyTileCache::removeForegroundTiles):
1603         (WebCore::LegacyTileCache::setContentReplacementImage):
1604         (WebCore::LegacyTileCache::contentReplacementImage):
1605         (WebCore::LegacyTileCache::tileCreationTimerFired):
1606         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
1607         (WebCore::LegacyTileCache::updateTilingMode):
1608         (WebCore::LegacyTileCache::setTilingMode):
1609         (WebCore::LegacyTileCache::doPendingRepaints):
1610         (WebCore::LegacyTileCache::flushSavedDisplayRects):
1611         (WebCore::LegacyTileCache::prepareToDraw):
1612         * platform/ios/LegacyTileLayerPool.h:
1613         * platform/ios/LegacyTileLayerPool.mm:
1614         (WebCore::LegacyTileLayerPool::addLayer):
1615         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
1616         (WebCore::LegacyTileLayerPool::setCapacity):
1617         (WebCore::LegacyTileLayerPool::prune):
1618         (WebCore::LegacyTileLayerPool::drain):
1619         * platform/network/curl/CurlDownload.cpp:
1620         (WebCore::CurlDownloadManager::add):
1621         (WebCore::CurlDownloadManager::remove):
1622         (WebCore::CurlDownloadManager::getActiveDownloadCount):
1623         (WebCore::CurlDownloadManager::getPendingDownloadCount):
1624         (WebCore::CurlDownloadManager::stopThreadIfIdle):
1625         (WebCore::CurlDownloadManager::updateHandleList):
1626         (WebCore::CurlDownload::~CurlDownload):
1627         (WebCore::CurlDownload::init):
1628         (WebCore::CurlDownload::getTempPath):
1629         (WebCore::CurlDownload::getUrl):
1630         (WebCore::CurlDownload::getResponse):
1631         (WebCore::CurlDownload::closeFile):
1632         (WebCore::CurlDownload::didReceiveHeader):
1633         (WebCore::CurlDownload::didReceiveData):
1634         (WebCore::CurlDownload::didFail):
1635         * platform/network/curl/CurlDownload.h:
1636         * platform/network/curl/ResourceHandleManager.cpp:
1637         (WebCore::cookieJarPath):
1638         (WebCore::sharedResourceMutex):
1639         (WebCore::curl_lock_callback):
1640         (WebCore::curl_unlock_callback):
1641         * platform/network/ios/QuickLook.mm:
1642         (WebCore::QLDirectoryAttributes):
1643         (qlPreviewConverterDictionaryMutex):
1644         (WebCore::addQLPreviewConverterWithFileForURL):
1645         (WebCore::qlPreviewConverterUTIForURL):
1646         (WebCore::removeQLPreviewConverterForURL):
1647         (WebCore::safeQLURLForDocumentURLAndResourceURL):
1648         * platform/sql/SQLiteDatabase.cpp:
1649         (WebCore::SQLiteDatabase::close):
1650         (WebCore::SQLiteDatabase::maximumSize):
1651         (WebCore::SQLiteDatabase::setMaximumSize):
1652         (WebCore::SQLiteDatabase::pageSize):
1653         (WebCore::SQLiteDatabase::freeSpaceSize):
1654         (WebCore::SQLiteDatabase::totalSize):
1655         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
1656         (WebCore::SQLiteDatabase::setAuthorizer):
1657         * platform/sql/SQLiteDatabase.h:
1658         (WebCore::SQLiteDatabase::databaseMutex):
1659         * platform/sql/SQLiteStatement.cpp:
1660         (WebCore::SQLiteStatement::prepare):
1661         (WebCore::SQLiteStatement::step):
1662         * workers/WorkerThread.cpp:
1663         (WebCore::WorkerThread::start):
1664         (WebCore::WorkerThread::workerThread):
1665         (WebCore::WorkerThread::stop):
1666         * workers/WorkerThread.h:
1667
1668 2015-08-18  Myles C. Maxfield  <mmaxfield@apple.com>
1669
1670         [Cocoa] Honor the 'trak' table by opting in via text-rendering: optimizeLegibility
1671         https://bugs.webkit.org/show_bug.cgi?id=148119
1672         <rdar://problem/22291561>
1673
1674         Reviewed by Tim Horton.
1675
1676         When the author has opted in by specifying "text-rendering: optimizeLegibility;", we should
1677         honor the font's 'trak' table. We do this by specifying kCTFontOpticalSizeAttribute at font
1678         creation time, and by using CTFontGetAdvancesForGlyphs() instead of
1679         CGFontGetGlyphAdvancesForStyle().
1680
1681         Test: fast/text/trak-optimizeLegibility.html
1682
1683         * platform/graphics/FontCache.h:
1684         (WebCore::FontDescriptionKey::makeFlagKey): Make our caches sensitive to TextRenderingMode.
1685         * platform/graphics/FontPlatformData.cpp:
1686         (WebCore::FontPlatformData::FontPlatformData): Add a TextRenderingMode member variable.
1687         (WebCore::FontPlatformData::operator=): Update to consult with the new member.
1688         * platform/graphics/FontPlatformData.h:
1689         (WebCore::FontPlatformData::textRenderingMode): Getter.
1690         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1691         (WebCore::preparePlatformFont): Specify kCTFontOpticalSizeAttribute.
1692         (WebCore::applyFontFeatureSettings): Deleted.
1693         * platform/graphics/cocoa/FontCocoa.mm:
1694         (WebCore::canUseFastGlyphAdvanceGetter): Use CTFontGetAdvancesForGlyphs() if we are
1695         optimizeLegibility.
1696         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1697         (WebCore::FontPlatformData::FontPlatformData): Pass the TextRenderingMode around.
1698         * platform/graphics/ios/FontCacheIOS.mm:
1699         (WebCore::FontCache::getSystemFontFallbackForCharacters): Update to call renamed function.
1700         (WebCore::FontCache::createFontPlatformData): Ditto.
1701         * platform/graphics/mac/FontCacheMac.mm:
1702         (WebCore::fontWithFamily): Ditto.
1703         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
1704         (WebCore::FontCache::createFontPlatformData): Ditto.
1705         * platform/graphics/mac/FontCustomPlatformData.cpp:
1706         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
1707         * platform/spi/cocoa/CoreTextSPI.h:
1708         * rendering/RenderThemeIOS.mm:
1709         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): Ditto.
1710
1711 2015-08-18  Chris Dumez  <cdumez@apple.com>
1712
1713         Make our bindings' GetOwnPropertySlot() behave according to specification
1714         https://bugs.webkit.org/show_bug.cgi?id=148092
1715
1716         Reviewed by Geoffrey Garen.
1717
1718         Make our bindings' GetOwnPropertySlot() behave according to
1719         specification. In particular, our bindings use to do:
1720         1. Indexed getter
1721         2. Check static properties
1722         3. Prototype check
1723         4. Named getter
1724         5. Check own properties
1725
1726         According to the specification [1][2], we should do:
1727         - If the interface has [OverrideBuiltins]:
1728             1. Indexed getter
1729             2. Named getter
1730             3. Static / own properties
1731         - Otherwise:
1732             1. Indexed getter
1733             2. Static / own properties
1734             3. Prototype check
1735             4. Named getter
1736
1737         This patch adds support for the [OverrideBuiltins] IDL extended
1738         attribute [3] and aligns our bindings implementation with the Web IDL
1739         specification weither that IDL extended attribute is present or
1740         not.
1741         
1742         [1] https://heycam.github.io/webidl/#getownproperty-guts
1743         [2] https://heycam.github.io/webidl/#dfn-named-property-visibility
1744         [3] https://heycam.github.io/webidl/#OverrideBuiltins
1745
1746         Performance:
1747         - PerformanceTests/Bindings/childNodes-traversal.html: ~Same
1748         - PerformanceTests/Bindings/children-traversal.html: +104% :)
1749
1750         No new tests, covered by:
1751         fast/dom/htmlcollection-getownproperty.html
1752         fast/dom/collection-length-should-not-be-overridden.html
1753         fast/forms/input-named-action-overrides-action-attribute.html
1754
1755         * bindings/js/JSHTMLCollectionCustom.cpp:
1756         (WebCore::JSHTMLCollection::nameGetter):
1757         Add assertions to make sure we don't use HTMLCollection's namedGetter()
1758         for HTMLFormControlsCollection / HTMLOptionsCollection subclasses.
1759         We should use the subclasses' namedGetter() instead.
1760
1761         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1762         (WebCore::JSHTMLOptionsCollection::canGetItemsForName):
1763         (WebCore::JSHTMLOptionsCollection::nameGetter):
1764         Add code for handling named getter requests on
1765         HTMLOptionsCollection.
1766
1767         * bindings/js/JSNodeListCustom.cpp:
1768         (WebCore::JSNodeList::canGetItemsForName):
1769         (WebCore::JSNodeList::nameGetter):
1770         Refactor custom code for the NodeList named getter, now that the
1771         IDL interface is using [CustomNamedGetter] instead of
1772         [JSCustomGetOwnPropertySlotAndDescriptor].
1773
1774         * bindings/scripts/CodeGeneratorJS.pm:
1775         (GenerateGetOwnPropertySlotBody):
1776         (GenerateHeaderContentHeader): Deleted.
1777         - Add support for the [OverrideBuiltins] IDL extended attribute and
1778         update the generated getOwnPropertySlot() methods to match the
1779         Web IDL specification.
1780         - Also drop the JSC::HasImpureGetOwnPropertySlot flag for interfaces
1781         that have a named getter but NOT the [OverrideBuiltins] IDL extended
1782         attribute. Without [OverrideBuiltins], named properties can no longer
1783         shadow own properties so we no longer need to mark GetOwnPropertySlot
1784         as impure. This allows caching of properties.
1785
1786         * bindings/scripts/IDLAttributes.txt:
1787         Add [OverrideBuiltins] IDL extended attribute [3].
1788
1789         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1790         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
1791         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1792         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
1793         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1794         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1795         * bindings/scripts/test/JS/JSTestException.cpp:
1796         (WebCore::JSTestException::getOwnPropertySlot):
1797         * bindings/scripts/test/JS/JSTestInterface.cpp:
1798         (WebCore::JSTestInterface::getOwnPropertySlot):
1799         * bindings/scripts/test/JS/JSTestObj.cpp:
1800         (WebCore::JSTestObj::getOwnPropertySlot):
1801         Rebaseline the bindings tests as their getOwnPropertySlot() method
1802         is now different.
1803
1804         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltins.cpp: Added.
1805         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltins.h: Added.
1806         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltinsPrivate.h: Added.
1807         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: Added.
1808         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: Added.
1809         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1810         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.h: Added.
1811         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm: Added.
1812         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltinsInternal.h: Added.
1813         * bindings/scripts/test/TestOverrideBuiltins.idl: Added.
1814         Add bindings test coverage for the new [OverrideBuiltins] IDL extended
1815         attribute [3].
1816
1817         * dom/DOMStringMap.idl:
1818         Add [OverrideBuiltins] IDL extended attribute to match the specification:
1819         https://html.spec.whatwg.org/multipage/infrastructure.html#domstringmap
1820
1821         * dom/NodeList.idl:
1822         Use CustomNamedGetter IDL extended attribute instead of
1823         JSCustomGetOwnPropertySlotAndDescriptor as NodeList merely implements
1824         a custom named getter. This makes sure that the order in which the
1825         named getter is called is correct as per the Web IDL specification.
1826
1827         * html/HTMLDocument.idl:
1828         Add [OverrideBuiltins] IDL extended attribute to match the specification:
1829         https://html.spec.whatwg.org/multipage/dom.html#the-document-object
1830
1831         * html/HTMLFormElement.idl:
1832         Add [OverrideBuiltins] IDL extended attribute to match the specification:
1833         https://html.spec.whatwg.org/multipage/forms.html#the-form-element
1834
1835         * html/HTMLOptionsCollection.idl:
1836         Add missing 'getter' in front of the named getter, as the per the HTML
1837         specification. Without this, HTMLOptionsCollection would not be
1838         recognized as a named properties object, which means that we would not
1839         check the HTMLOptionsCollection prototype before querying the named
1840         getter on HTMLCollection. This used to work because the bindings
1841         generator was hard-coding the prototype check for every HTML*Collection
1842         IDL interface. In this patch, we generalized the check to every
1843         interface that has a named getter.
1844
1845 2015-08-18  Per Arne Vollan  <peavo@outlook.com>
1846
1847         [Win] Popup menu displayed at incorrect position when page is scrolled and device scale factor != 1.
1848         https://bugs.webkit.org/show_bug.cgi?id=148130
1849
1850         Reviewed by Alex Christensen.
1851
1852         Scale WebView coordinates with device scale factor.
1853
1854         * platform/win/PopupMenuWin.cpp:
1855         (WebCore::PopupMenuWin::calculatePositionAndSize):
1856
1857 2015-08-18  Javier Fernandez  <jfernandez@igalia.com>
1858
1859         [CSS Grid Layout] Do not stretch always grid items with auto width
1860         https://bugs.webkit.org/show_bug.cgi?id=148069
1861
1862         Reviewed by Darin Adler.
1863
1864         We assumed that any grid item with 'auto' width will be stretched
1865         to fill all the available space in its grid area. We assumed this
1866         because grid area acts as item's container.
1867
1868         However, Grid Layout specification states on its Alignment section
1869         that items will be stretched by default, unless either
1870         justify-self or align-self compute to a value other than stretch
1871         or margins are auto. In those cases, grid items will auto-size to
1872         fit their contents.
1873
1874         Tests:
1875         fast/css-grid-layout/grid-align-justify-stretch.html
1876         fast/css-grid-layout/grid-item-auto-margins-and-stretch.html
1877         fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html
1878
1879         * rendering/RenderBox.cpp:
1880         (WebCore::RenderBox::computeLogicalWidthInRegion):
1881         * rendering/RenderGrid.cpp:
1882         (WebCore::RenderGrid::layoutGridItems):
1883         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1884         (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
1885         * rendering/RenderGrid.h:
1886
1887 2015-08-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1888
1889         [Streams API] Update implementation with the latest spec
1890         https://bugs.webkit.org/show_bug.cgi?id=147978
1891
1892         Reviewed by Darin Adler.
1893
1894         Changed the way the read and closed promises are resolved and the stream is released when an even closes or
1895         errors the stream.
1896
1897         Current tests suffice after changing the order of the promise resolution according to the new spec.
1898
1899         * Modules/streams/ReadableStream.cpp:
1900         (WebCore::ReadableStream::releaseReader): Changed how the promises are resolved.
1901         (WebCore::ReadableStream::changeStateToErrored): Changed how the promises are resolved and manually releasing
1902         the stream instead of calling releaseReader according to the spec.
1903
1904 2015-08-17  Zalan Bujtas  <zalan@apple.com>
1905
1906         Outline with auto style leaves bits behind when the the box is moved.
1907         https://bugs.webkit.org/show_bug.cgi?id=148100
1908
1909         Reviewed by Simon Fraser.
1910
1911         We paint the focus ring when 'outline-style: auto' is present, however
1912         we don't take the focus ring width into account when the repaint rect
1913         is computed.
1914
1915         Tests: fast/repaint/outline-with1px-auto-repaint-rect.html
1916                fast/repaint/outline-with2px-auto-repaint-rect.html
1917                fast/repaint/outline-with3px-auto-repaint-rect.html
1918
1919         * rendering/RenderObject.cpp:
1920         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
1921         * rendering/RenderThemeMac.h:
1922         * rendering/RenderThemeMac.mm:
1923         (WebCore::RenderThemeMac::platformFocusRingMaxWidth): Deleted. : 0 as focus ring width is incorrect.
1924         The reason why r169699 fixed the failing cases was because they all had outline width < 3 (but no auto outline style).
1925         The correct fix is to check if the style requires focus ring painting and use the RenderTheme::platformFocusRingMaxWidth
1926         accordingly.
1927
1928 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
1929
1930         [Cocoa] Address post-commit review
1931         https://bugs.webkit.org/show_bug.cgi?id=147864
1932
1933         Reviewed by Darin Adler.
1934
1935         Create helper functions to cast between NSFont*s and CTFontRefs.
1936
1937         No new tests because there is no behavior change.
1938
1939         * platform/graphics/FontPlatformData.h:
1940         (WebCore::toCTFont):
1941         (WebCore::toNSFont):
1942         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1943         * platform/graphics/cocoa/FontCocoa.mm:
1944         (WebCore::Font::platformCreateScaledFont):
1945         (WebCore::Font::compositeFontReferenceFont):
1946         * platform/graphics/mac/FontCacheMac.mm:
1947         (WebCore::FontCache::platformPurgeInactiveFontData):
1948         (WebCore::lookupCTFont):
1949         (WebCore::FontCache::systemFallbackForCharacters):
1950         (WebCore::FontCache::createFontPlatformData):
1951         * platform/mac/DragImageMac.mm:
1952         (WebCore::fontFromNSFont):
1953         (WebCore::widthWithFont):
1954         (WebCore::drawAtPoint):
1955         * platform/spi/mac/NSFontSPI.h:
1956
1957 2015-08-17  Alex Christensen  <achristensen@webkit.org>
1958
1959         WinCairo build fix after r188566
1960
1961         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1962         (WebCore::FontPlatformData::FontPlatformData):
1963         Remove reference to removed m_isCompositeFontReference.
1964
1965 2015-08-17  Alex Christensen  <achristensen@webkit.org>
1966
1967         Add const to content extension parser
1968         https://bugs.webkit.org/show_bug.cgi?id=148044
1969
1970         Reviewed by Benjamin Poulain.
1971
1972         * contentextensions/ContentExtensionParser.cpp:
1973         (WebCore::ContentExtensions::containsOnlyASCIIWithNoUppercase):
1974         (WebCore::ContentExtensions::getDomainList):
1975         (WebCore::ContentExtensions::getTypeFlags):
1976         (WebCore::ContentExtensions::loadTrigger):
1977         (WebCore::ContentExtensions::loadAction):
1978         (WebCore::ContentExtensions::loadRule):
1979         (WebCore::ContentExtensions::loadEncodedRules):
1980         Add const.  No change in behavior.
1981
1982 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
1983
1984         [OS X] Remove support for composite fonts
1985         https://bugs.webkit.org/show_bug.cgi?id=147920
1986
1987         Reviewed by Dan Bernstein.
1988
1989         Composite fonts were first introduced in [1]. These composite fonts are extremely rare
1990         because:
1991         1. None of the preinstalled fonts on either OS X nor iOS are composite fonts,
1992         2. WebKit does not support loading web fonts from composite font files, and
1993         3. WebKit's support only ever existed on OS X (none of the other ports).
1994
1995         In fact, no one I've consulted with has ever seen any of these fonts used in the wild.
1996         The fonts also require a fundamentally broken code path, and add complexity to WebKit.
1997
1998         [1] https://bugs.webkit.org/attachment.cgi?id=134923&action=review
1999
2000         No new tests.
2001
2002         * platform/graphics/Font.h:
2003         * platform/graphics/FontPlatformData.cpp:
2004         (WebCore::FontPlatformData::FontPlatformData): Deleted.
2005         (WebCore::FontPlatformData::operator=): Deleted.
2006         * platform/graphics/FontPlatformData.h:
2007         (WebCore::FontPlatformData::isCompositeFontReference): Deleted.
2008         (WebCore::FontPlatformData::operator==): Deleted.
2009         * platform/graphics/cocoa/FontCocoa.mm:
2010         (WebCore::Font::compositeFontReferenceFont): Deleted.
2011         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2012         (WebCore::FontPlatformData::FontPlatformData): Deleted.
2013         (WebCore::FontPlatformData::setFont): Deleted.
2014         * platform/graphics/mac/GlyphPageMac.cpp:
2015         (WebCore::shouldUseCoreText):
2016         (WebCore::GlyphPage::fill):
2017
2018 2015-08-17  Tim Horton  <timothy_horton@apple.com>
2019
2020         Some functions on DictionaryLookup.h should just be generic functions elsewhere
2021         https://bugs.webkit.org/show_bug.cgi?id=138567
2022
2023         Reviewed by Dean Jackson.
2024
2025         No new tests, just refactoring.
2026
2027         * dom/Range.cpp:
2028         (WebCore::Range::contains):
2029         * dom/Range.h:
2030         Add a Range::contains(VisiblePosition).
2031         It's simpler than the old thing from DictionaryLookup.mm, but does the same thing.
2032         It's so simple that it doesn't necessarily need to exist, but it seems useful.
2033
2034         * editing/VisiblePosition.cpp:
2035         (WebCore::makeRange):
2036         nullptrs
2037
2038         * editing/mac/DictionaryLookup.h:
2039         * editing/mac/DictionaryLookup.mm:
2040         (WebCore::selectionContainsPosition):
2041         (WebCore::rangeForDictionaryLookupAtHitTestResult):
2042         (WebCore::isPositionInRange): Deleted.
2043         (WebCore::shouldUseSelection): Deleted.
2044         Move isPositionInRange to Range.
2045         Rename shouldUseSelection to what it really means.
2046         I didn't move selectionContainsPosition to VisibleSelection because it
2047         only handles Range selections, not any of the ohers, and thus isn't
2048         generic enough to put there.
2049
2050 2015-08-17  Alex Christensen  <achristensen@webkit.org>
2051
2052         [Win CMake] Allow WebKitLibraries directory to be set from the command line
2053         https://bugs.webkit.org/show_bug.cgi?id=148112
2054
2055         Reviewed by Brent Fulgham.
2056
2057         * PlatformAppleWin.cmake:
2058         * PlatformWinCairo.cmake:
2059         Don't use an environment variable for WEBKIT_LIBRARIES_DIR.  
2060
2061 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
2062
2063         [OS X] Migrate off of CTFontSetRenderingParameters()
2064         https://bugs.webkit.org/show_bug.cgi?id=148113
2065
2066         Reviewed by Lucas Forschler.
2067
2068         Instead, use CTFontSetRenderingStyle().
2069
2070         No new tests because there is no behavior change.
2071
2072         * platform/spi/cocoa/CoreTextSPI.h:
2073
2074 2015-08-17  Alex Christensen  <achristensen@webkit.org>
2075
2076         Build Debug Suffix on Windows with CMake
2077         https://bugs.webkit.org/show_bug.cgi?id=148083
2078
2079         Reviewed by Brent Fulgham.
2080
2081         * CMakeLists.txt:
2082         * PlatformAppleWin.cmake:
2083         * PlatformWin.cmake:
2084         Add DEBUG_SUFFIX
2085
2086 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
2087
2088         Implement IntegerHasher
2089         https://bugs.webkit.org/show_bug.cgi?id=147866
2090
2091         Reviewed by Darin Adler and Anders Carlsson.
2092
2093         Rename StringHasher.h to Hasher.
2094
2095         No new tests because there is no behavior difference.
2096
2097         * contentextensions/DFAMinimizer.cpp: Use new #include.
2098         * contentextensions/HashableActionList.h: Ditto.
2099         * platform/graphics/FontFeatureSettings.cpp:
2100         (WebCore::FontFeatureSettings::hash): Use new IntegerHasher class.
2101         (WebCore::FontFeature::hash): Deleted.
2102         * platform/graphics/FontFeatureSettings.h: Remove unnecessary function.
2103         * platform/graphics/Gradient.cpp: Use new #include.
2104         * platform/graphics/WidthCache.h: Ditto.
2105
2106 2015-08-17  Chris Dumez  <cdumez@apple.com>
2107
2108         Log actual PageCache retrieval success rate using diagnostic logging
2109         https://bugs.webkit.org/show_bug.cgi?id=147937
2110
2111         Reviewed by Antti Koivisto.
2112
2113         Log actual PageCache retrieval success rate using diagnostic logging.
2114         Previously, we would only log how successful we are at saving entries
2115         into the cache, which is not the most interesting metric.
2116
2117         * history/PageCache.cpp:
2118         (WebCore::canCachePage):
2119         * loader/FrameLoader.cpp:
2120         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2121         * page/DiagnosticLoggingKeys.cpp:
2122         (WebCore::DiagnosticLoggingKeys::canCacheKey):
2123         * page/DiagnosticLoggingKeys.h:
2124
2125 2015-08-17  Alex Christensen  <achristensen@webkit.org>
2126
2127         Move some commands from ./CMakeLists.txt to Source/cmake
2128         https://bugs.webkit.org/show_bug.cgi?id=148003
2129
2130         Reviewed by Brent Fulgham.
2131
2132         * CMakeLists.txt:
2133         Added commands needed to build WebCore by itself.
2134
2135 2015-08-17  Alex Christensen  <achristensen@webkit.org>
2136
2137         Remove unused multisampling check
2138         https://bugs.webkit.org/show_bug.cgi?id=148030
2139
2140         Reviewed by Dean Jackson.
2141
2142         No change in behavior.
2143         Extensions3DOpenGLCommon.m_maySupportMultisampling is always true.
2144
2145         * platform/graphics/Extensions3D.h:
2146         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2147         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
2148         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2149         (WebCore::Extensions3DOpenGLCommon::isImagination):
2150         (WebCore::Extensions3DOpenGLCommon::vendor):
2151         (WebCore::Extensions3DOpenGLCommon::requiresBuiltInFunctionEmulation):
2152         (WebCore::Extensions3DOpenGLCommon::requiresRestrictedMaximumTextureSize):
2153         (WebCore::Extensions3DOpenGLCommon::maySupportMultisampling): Deleted.
2154         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2155         (WebCore::GraphicsContext3D::validateDepthStencil):
2156
2157 2015-08-17  Andy Estes  <aestes@apple.com>
2158
2159         REGRESSION (r188486): Crash in SubresourceLoader::didReceiveResponse() when TemporaryChange goes out of scope
2160         https://bugs.webkit.org/show_bug.cgi?id=148082
2161
2162         Reviewed by Alexey Proskuryakov.
2163
2164         Covered by existing tests run under ASan or Guard Malloc.
2165
2166         * loader/SubresourceLoader.cpp:
2167         (WebCore::SubresourceLoader::didReceiveResponse): Ensure that callingDidReceiveResponse is destroyed while the
2168         SubresourceLoader is still alive by declaring it after protect.
2169
2170 2015-08-17  Simon Fraser  <simon.fraser@apple.com>
2171
2172         will-change should sometimes trigger compositing
2173         https://bugs.webkit.org/show_bug.cgi?id=148072
2174
2175         Reviewed by Tim Horton.
2176         
2177         Implement the compositing side-effects of will-change, if any of the
2178         following properties are specified:
2179             opacity
2180             filter (as -webkit-filter)
2181             backdrop-filter (as -webkit-backdrop-filter)
2182             transform (on transformable elements only)
2183
2184         Tests: compositing/layer-creation/will-change-change.html
2185                compositing/layer-creation/will-change-layer-creation.html
2186
2187         * inspector/InspectorLayerTreeAgent.cpp:
2188         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): Tell the inspector
2189         about will-change.
2190         * rendering/RenderElement.cpp:
2191         (WebCore::RenderElement::adjustStyleDifference): Need to trigger a recomposite if
2192         will-change includes a compositing trigger property. This gets called before and
2193         after setting the style, so this checks both states.
2194         (WebCore::RenderElement::shouldWillChangeCreateStackingContext):
2195         * rendering/RenderElement.h:
2196         (WebCore::RenderElement::willChangeCreatesStackingContext): Helper function that
2197         RenderInline uses to determine if it needs to create a RenderLayer, since RenderInline
2198         doesn't get automatic layer RenderLayers as a side effect of having non-auto z-index
2199         in the style.
2200         * rendering/RenderInline.h: Need to trigger a RenderLayer if will-change includes
2201         a property that applies to inlines.
2202         * rendering/RenderLayerCompositor.cpp:
2203         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Call requiresCompositingForWillChange().
2204         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Call requiresCompositingForWillChange().
2205         (WebCore::RenderLayerCompositor::reasonsForCompositing): Include requiresCompositingForWillChange().
2206         (WebCore::RenderLayerCompositor::requiresCompositingForWillChange): If will-change contains a
2207         property that would trigger compositing on this element, return true.
2208         * rendering/RenderLayerCompositor.h:
2209         * rendering/style/RenderStyle.cpp:
2210         (WebCore::RenderStyle::changeRequiresLayout): Set ContextSensitivePropertyWillChange in
2211         changedContextSensitiveProperties if will-change changes.
2212         * rendering/style/RenderStyle.h: Rename for clarity.
2213         * rendering/style/RenderStyleConstants.h: Add ContextSensitivePropertyWillChange.
2214         * rendering/style/WillChangeData.cpp:
2215         (WebCore::propertyCreatesStackingContext): Subset of properties that create stacking
2216         context on any element.
2217         (WebCore::propertyCreatesStackingContextOnBoxesOnly): Additional properties that
2218         create stacking context on boxes.
2219         (WebCore::propertyTriggersCompositing): Properties that trigger compositing on
2220         any element.
2221         (WebCore::propertyTriggersCompositingOnBoxesOnly): Additional properties that
2222         trigger compositing on boxes.
2223         (WebCore::WillChangeData::addFeature): As features are added, manage a set of
2224         flags to know if they trigger stacking context or compositing, on inlines and boxes.
2225         (WebCore::WillChangeData::createsStackingContext): Deleted.
2226         * rendering/style/WillChangeData.h:
2227         (WebCore::WillChangeData::canCreateStackingContext):
2228         (WebCore::WillChangeData::canCreateStackingContextOnInline):
2229         (WebCore::WillChangeData::canTriggerCompositing):
2230         (WebCore::WillChangeData::canTriggerCompositingOnInline):
2231
2232 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
2233
2234         Holes for find matches that span multiple lines are completely wrong
2235         https://bugs.webkit.org/show_bug.cgi?id=148065
2236         <rdar://problem/5305002>
2237
2238         Reviewed by Simon Fraser.
2239
2240         Test: fast/text/mark-matches-broken-line-rendering.html
2241
2242         Two big problems with find holes:
2243             - RenderedDocumentMarker only has one rect, but a marker can be painted
2244               by multiple text runs, each with their own rendered rect
2245             - paintTextMatchMarker does std::max((unsigned)a, (unsigned)0), which is
2246               obviously an overflow problem/not going to work if a is negative
2247
2248         The combination of these issues causes the holes for find matches to be
2249         very broken: text that isn't part of the match is highlighted, and some
2250         text that is part of the match isn't highlighted.
2251
2252         To fix, make RenderedDocumentMarker support multiple rects, and use signed
2253         math (like paintDocumentMarker already did) when computing positions in paintTextMatchMarker.
2254
2255         * dom/DocumentMarkerController.cpp:
2256         (WebCore::DocumentMarkerController::addTextMatchMarker):
2257         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
2258         * dom/RenderedDocumentMarker.h:
2259         (WebCore::RenderedDocumentMarker::RenderedDocumentMarker):
2260         (WebCore::RenderedDocumentMarker::isRendered):
2261         (WebCore::RenderedDocumentMarker::contains):
2262         (WebCore::RenderedDocumentMarker::addRenderedRect):
2263         (WebCore::RenderedDocumentMarker::renderedRects):
2264         (WebCore::RenderedDocumentMarker::invalidate):
2265         (WebCore::RenderedDocumentMarker::setRenderedRect): Deleted.
2266         (WebCore::RenderedDocumentMarker::renderedRect): Deleted.
2267         (WebCore::RenderedDocumentMarker::invalidMarkerRect): Deleted.
2268         * rendering/InlineTextBox.cpp:
2269         (WebCore::InlineTextBox::paintDocumentMarker):
2270         (WebCore::InlineTextBox::paintTextMatchMarker):
2271         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2272         * rendering/svg/SVGInlineFlowBox.cpp:
2273         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2274
2275 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
2276
2277         Adopt shrink-wrapping for TextIndicators on Mac
2278         https://bugs.webkit.org/show_bug.cgi?id=148064
2279
2280         Reviewed by Beth Dakin.
2281
2282         Instead of indicating the bounding rect when there are multiple text rects,
2283         use shrink-wrapping for TextIndicatorWindow (on Mac), like we do on iOS.
2284
2285         * bindings/objc/DOM.mm:
2286         (-[DOMNode getPreviewSnapshotImage:andRects:]):
2287         Make getPreviewSnapshotImage use the same options that iOS WebKit2 uses.
2288         This fixes a regression from r188420 where iOS WebKit1 TextIndicators lost
2289         all of the relevant (previously hardcoded inside TextIndicator) options.
2290
2291         * page/TextIndicator.cpp:
2292         (WebCore::TextIndicator::createWithRange):
2293         (WebCore::TextIndicator::createWithSelectionInFrame):
2294         (WebCore::initializeIndicator):
2295         Don't keep indicatesCurrentSelection in TextIndicatorData. Instead,
2296         just pass it through to initializeIndicator. Add a flag which stops us
2297         from zeroing out the margin if indicatesCurrentSelection is true.
2298         Move default margins into TextIndicator so they can be applied to the stored rects
2299         just like on iOS, instead of trying to apply them later like we used to on Mac.
2300
2301         * page/TextIndicator.h:
2302         (WebCore::TextIndicator::indicatesCurrentSelection): Deleted.
2303         * page/mac/TextIndicatorWindow.h:
2304         * page/mac/TextIndicatorWindow.mm:
2305         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
2306         (WebCore::TextIndicatorWindow::setTextIndicator):
2307         (outsetIndicatorRectIncludingShadow): Deleted.
2308         (textIndicatorsForTextRectsOverlap): Deleted.
2309         Make use of pathsWithShrinkWrappedRects for TextIndicatorWindow, instead
2310         of just smushing all intersecting rects together. Use the computed path
2311         for the shadows and to mask the yellow highlight and snapshot layer.
2312
2313         * platform/graphics/PathUtilities.cpp:
2314         (WebCore::PathUtilities::pathsWithShrinkWrappedRects):
2315         (WebCore::PathUtilities::pathWithShrinkWrappedRects):
2316         * platform/graphics/PathUtilities.h:
2317         Make it possible to retrieve each non-intersecting path individually, instead
2318         of just a single giant Path, so that TextIndicatorWindow can make separate
2319         layers for each one (so they can bounce separately).
2320
2321 2015-08-17  Simon Fraser  <simon.fraser@apple.com>
2322
2323         Remove some includes from Node.cpp
2324         https://bugs.webkit.org/show_bug.cgi?id=148000
2325
2326         Reviewed by Anders Carlsson.
2327
2328         No need for these includes.
2329
2330         * dom/Node.cpp:
2331
2332 2015-08-17  Chris Dumez  <cdumez@apple.com>
2333
2334         Accessing HTMLCollection.length is slow
2335         https://bugs.webkit.org/show_bug.cgi?id=148039
2336
2337         Reviewed by Ryosuke Niwa.
2338
2339         Accessing was HTMLCollection.length is slow, much slower than accessing
2340         NodeList.length. The reason is that HTMLCollection's bindings code is
2341         slightly different. In particular, HTMLCollection's GetOwnPropertySlot()
2342         has an extra check to see if the PropertyName is available on the
2343         prototype before doing:
2344         1. Check static properties (getStaticValueSlotEntryWithoutCaching())
2345         2. Indexed getter
2346         3. Named getter
2347         4. Check own properties (getStaticValueSlot())
2348
2349         This means that everytime the JavaScript was accessing HTMLCollection.length
2350         or HTMLCollection[index], we would check if length / index was present on the
2351         prototype before calling HTMLCollection::length() / HTMLCollection::item(i).
2352         The prototype check is fairly expensive and was making traversing an
2353         HTMLCollection much slower than traversing a NodeList.
2354
2355         In this patch, I refactored GetOwnPropertySlot() to do:
2356         1. Indexed getter
2357         2. Check static properties
2358         3. Prototype check
2359         4. Named getter
2360         5. Check own properties
2361
2362         This way, the prototype check is no longer slowing down HTMLCollection
2363         traversal. What matters is that we do the prototype check *before* calling
2364         the named getter as we don't want named properties to mask properties on
2365         the prototype.
2366
2367         Note that this patch takes the minimal approach to get the performance win
2368         while limiting the risk of breakage. Indeed, the current behavior still
2369         does not match the WebIDL specification, which seems to indicate the order
2370         should be:
2371         1. Indexed getter
2372         2. Check static / own properties
2373         3. Prototype check
2374         4. Named getter
2375
2376         Once we match the specification, I believe we will be able to drop the
2377         JSC::HasImpureGetOwnPropertySlot flag on HTMLCollection, which currently
2378         makes HTMLCollection.length not cacheable. Right now, I believe we still
2379         need this flag because named properties can still mask own properties.
2380
2381         Performance:
2382         /Bindings/childNodes-traversal: 5597.54 +/- 0.7% -> 5572.10 +/- 0.4%
2383         /Bindings/children-traversal: 3852.61 +/- 0.3% -> 4731.03 +/- 0.3% (~23% better)
2384
2385         Test: fast/dom/htmlcollection-getownproperty.html
2386
2387         * bindings/scripts/CodeGeneratorJS.pm:
2388         (GenerateGetOwnPropertySlotBody):
2389         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2390         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2391
2392 2015-08-17  Jinyoung Hur  <hur.ims@navercorp.com>
2393
2394         Fix possible EGL and GLX makeCurrent problem of GLPlatformContext and GLPlatformSurface
2395         https://bugs.webkit.org/show_bug.cgi?id=147695
2396
2397         Reviewed by Gyuyoung Kim.
2398
2399         GLPLatformContext::makeCurrent is implemented to do no-op when it thinks, comparing with a static
2400         variable declared in GLPlatformContext.cpp, there is no changes. This can lead to not-working 
2401         makeCurrent when other part of codes, e.g., Cairo-gl, change EGL or GLX current context by calling
2402         something like eglMakeCurrent. So modify GLPLatformContext::makeCurrent to use the return value of
2403         eglGetCurrentContext or glXGetCurrentContext as a comparing target rather than a static variable.
2404         In addition, GLPlatformSurface::isCurrentDrawable is also modified to use eglGetCurrentSurface or
2405         glXGetCurrentDrawable rather than a static variable.
2406
2407         There are no tests because already existing GL tests will verify this change.
2408
2409         * platform/graphics/opengl/GLPlatformContext.cpp:
2410         (WebCore::GLPlatformContext::makeCurrent):
2411         (WebCore::GLPlatformContext::releaseCurrent):
2412         (WebCore::GLCurrentContextWrapper::GLCurrentContextWrapper): Deleted.
2413         (WebCore::GLPlatformContext::~GLPlatformContext): Deleted.
2414         (WebCore::GLPlatformContext::isCurrentContext): Deleted.
2415         (WebCore::GLPlatformContext::getCurrent): Deleted.
2416         * platform/graphics/opengl/GLPlatformContext.h:
2417         * platform/graphics/opengl/GLPlatformSurface.cpp:
2418         (WebCore::GLPlatformSurface::~GLPlatformSurface): Deleted.
2419         (WebCore::GLPlatformSurface::isCurrentDrawable): Deleted.
2420         (WebCore::GLPlatformSurface::onMakeCurrent): Deleted.
2421         (WebCore::GLPlatformSurface::destroy): Deleted.
2422         * platform/graphics/opengl/GLPlatformSurface.h:
2423         * platform/graphics/surfaces/egl/EGLSurface.cpp:
2424         (WebCore::EGLTransportSurface::isCurrentDrawable):
2425         (WebCore::EGLOffScreenSurface::isCurrentDrawable):
2426         * platform/graphics/surfaces/egl/EGLSurface.h:
2427         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2428         (WebCore::GLXTransportSurface::isCurrentContext):
2429         (WebCore::GLXOffScreenSurface::isCurrentContext):
2430         * platform/graphics/surfaces/glx/GLXSurface.h:
2431
2432 2015-08-15  Chris Dumez  <cdumez@apple.com>
2433
2434         Refactor HTMLCollection to be as fast as CachedLiveNodeList
2435         https://bugs.webkit.org/show_bug.cgi?id=147979
2436
2437         Reviewed by Ryosuke Niwa and Antti Koivisto.
2438
2439         Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
2440         preparation of having getElementsByTagName*() / getElementsByClassName()
2441         return an HTMLCollection instead of a NodeList, as per the
2442         specification. Chrome and Firefox already match the specification in
2443         this case.
2444
2445         Traversing an HTMLCollection was slow because of all the extra
2446         branching it had compared to CachedLiveNodeList. To address the issue,
2447         this patch introduces a new templated CachedHTMLCollection subclass,
2448         which behaves in a similar way as CachedLiveNodeList. The 2 template
2449         parameters are:
2450         1. The type of the subclass of CachedHTMLCollection, so we can call
2451            elementMatches() directly on the subclass, without needed any
2452            virtual function call or switch statement. This is the same approach
2453            as in CachedLiveNodeList.
2454         2. The type of tree traversal used (Descendants, ChildrenOnly,
2455            CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to
2456            support these 3 types of tree traversal. These were causing extra
2457            branching for every item() call. We are now able to choose the right
2458            type of traversal for the CachedHTMLCollection at compile time.
2459
2460         * WebCore.xcodeproj/project.pbxproj:
2461         Add new files to the Project.
2462
2463         * dom/ContainerNode.cpp:
2464         (WebCore::ContainerNode::children):
2465         (WebCore::ContainerNode::cachedHTMLCollection): Deleted.
2466         * dom/ContainerNode.h:
2467         Drop ContainerNode::ensureCachedHTMLCollection() and use
2468         NodeListsNodeData::addCachedCollection() directly at call sites
2469         instead. We need access to the CollectionType at build-time so
2470         we can resolve the CollectionTraversalType parameter for the
2471         GenericCachedHTMLCollection using CollectionTypeTraits.
2472
2473         * dom/Document.cpp:
2474         * dom/Document.h:
2475         Update ensureCachedCollection() so the CollectionType is now a template
2476         parameter instead of a method argument. We need to know the
2477         CollectionType at build time to construct the GenericCachedHTMLCollection.
2478
2479         * dom/ElementChildIterator.h:
2480         (WebCore::ElementChildIterator<ElementType>::operator):
2481         (WebCore::ElementChildConstIterator<ElementType>::operator):
2482         Add support for decrementing an ElementChildIterator, for consistency
2483         with ElementDescendantIterator. We need this to support backward
2484         traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
2485         of traversal.
2486
2487         * dom/LiveNodeList.h:
2488         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
2489         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
2490         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
2491         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
2492         Move traversal implementation to CollectionTraversal.h, so it can be
2493         shared with achedHTMLCollection.h.
2494
2495         * html/CachedHTMLCollection.h: Added.
2496         (WebCore::traversalType>::CachedHTMLCollection):
2497         (WebCore::traversalType>::~CachedHTMLCollection):
2498         (WebCore::traversalType>::CachedHTMLCollection::memoryCost):
2499         (WebCore::traversalType>::collectionCanTraverseBackward):
2500         (WebCore::traversalType>::collectionTraverseForward):
2501         (WebCore::traversalType>::collectionTraverseBackward):
2502         (WebCore::traversalType>::willValidateIndexCache):
2503         (WebCore::traversalType>::length):
2504         (WebCore::traversalType>::item):
2505         (WebCore::traversalType>::invalidateCache):
2506         (WebCore::traversalType>::elementMatches):
2507         (WebCore::nameShouldBeVisibleInDocumentAll):
2508         (WebCore::traversalType>::namedItem):
2509
2510         * html/CollectionTraversal.h: Added.
2511         Add new template class that provide the collection traversal code
2512         needed by CollectionIndexCache. It has template specializations for
2513         all 3 types of traversal: Descendants, ChildrenOnly, and
2514         CustomForwardOnly.
2515
2516         * html/CollectionType.h:
2517         Add CollectionTypeTraits traits so we can resolve the
2518         CollectionTraversalType used by a specific CollectionType at
2519         compile-time. This is needed for the second template parameter of
2520         CachedHTMLCollection.
2521
2522         * html/GenericCachedHTMLCollection.cpp: Added.
2523         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
2524         * html/GenericCachedHTMLCollection.h: Added.
2525         Add CachedHTMLCollection subclass is the generic one used for all
2526         CollectionTypes that do not have their own subclass (e.g. NodeChildren).
2527         This has an elementMatches() method with a switch() statement handling
2528         all these CollectionTypes. Those are not normally not performance
2529         sensitive.
2530
2531         * html/HTMLAllCollection.cpp:
2532         (WebCore::HTMLAllCollection::HTMLAllCollection):
2533         * html/HTMLAllCollection.h:
2534         Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
2535         an elementMatches() method that simply returns true as we want to
2536         match all elements.
2537
2538         * html/HTMLCollection.cpp:
2539         (WebCore::HTMLCollection::HTMLCollection):
2540         Move CollectionIndexCache member to the subclass and drop the 2 other
2541         members as they are replaced with the CollectionTraversalType template
2542         parameter of CachedHTMLCollection.
2543
2544         (WebCore::HTMLCollection::~HTMLCollection):
2545         Move Document::unregisterCollection() call to ~CachedHTMLCollection()
2546         as we needed to check if the CollectionIndexCache was valid first.
2547
2548         (WebCore::HTMLCollection::updateNamedElementCache):
2549         Move part of the implementation to the CachedHTMLCollection subclass
2550         as it needs to know about the type of traversal and it needs to be
2551         able to call elementMatches().
2552
2553         * html/HTMLCollection.h:
2554         (WebCore::HTMLCollection::rootNode):
2555         Inline for performance reasons and consistency with CachedLiveNodeList.
2556
2557         (WebCore::HTMLCollection::memoryCost):
2558         Make virtual and move part of the implementation to the
2559         CachedHTMLCollection subclass to compute the cost of the
2560         CollectionIndexCache.
2561
2562         (WebCore::HTMLCollection::invalidateCache):
2563         Move part of the implementation to the subclass to invalidate the
2564         CollectionIndexCache.
2565
2566         * html/HTMLFieldSetElement.cpp:
2567         (WebCore::HTMLFieldSetElement::elements):
2568
2569         * html/HTMLFormControlsCollection.cpp:
2570         * html/HTMLFormControlsCollection.h:
2571         Subclass CachedHTMLCollection instead of HTMLCollection.
2572         customElementAfter() no longer needs to be virtual as it
2573         is called directly by CachedHTMLCollection on the subclass.
2574
2575         * html/HTMLFormElement.cpp:
2576         (WebCore::HTMLFormElement::elements):
2577         * html/HTMLMapElement.cpp:
2578         (WebCore::HTMLMapElement::areas):
2579         Call NodeListsNodeData::addCachedCollection() directly.
2580
2581         * html/HTMLNameCollection.cpp:
2582         * html/HTMLNameCollection.h:
2583         Subclass CachedHTMLCollection instead of HTMLCollection.
2584
2585         * html/HTMLOptionsCollection.cpp:
2586         * html/HTMLOptionsCollection.h:
2587         Subclass CachedHTMLCollection instead of HTMLCollection.
2588
2589         * html/HTMLSelectElement.cpp:
2590         (WebCore::HTMLSelectElement::selectedOptions):
2591         (WebCore::HTMLSelectElement::options):
2592         * html/HTMLTableElement.cpp:
2593         (WebCore::HTMLTableElement::rows):
2594         (WebCore::HTMLTableElement::tBodies):
2595         * html/HTMLTableRowElement.cpp:
2596         (WebCore::HTMLTableRowElement::cells):
2597         Call NodeListsNodeData::addCachedCollection() directly.
2598
2599         * html/HTMLTableRowsCollection.cpp:
2600         * html/HTMLTableRowsCollection.h:
2601         Subclass CachedHTMLCollection instead of HTMLCollection.
2602         customElementAfter() no longer needs to be virtual as it
2603         is called directly by CachedHTMLCollection on the subclass.
2604
2605         * html/HTMLTableSectionElement.cpp:
2606         (WebCore::HTMLTableSectionElement::rows):
2607         Call NodeListsNodeData::addCachedCollection() directly.
2608
2609 2015-08-15  Timothy Horton  <timothy_horton@apple.com>
2610
2611         REGRESSION (r168327): ImageDocuments with margins zoom to the wrong position when clicked
2612         https://bugs.webkit.org/show_bug.cgi?id=148063
2613
2614         Reviewed by Simon Fraser.
2615
2616         No new test because it doesn't seem possible to click on a window.open'd ImageDocument.
2617
2618         * html/ImageDocument.cpp:
2619         (WebCore::ImageEventListener::handleEvent):
2620         Use <img>-relative coordinates, not document-relative coordinates,
2621         because after r168327, the image can be centered.
2622
2623 2015-08-15  Simon Fraser  <simon.fraser@apple.com>
2624
2625         Have will-change create stacking context when necessary
2626         https://bugs.webkit.org/show_bug.cgi?id=148060
2627
2628         Reviewed by Zalan Bujtas.
2629         
2630         If will-change includes a property whose non-initial value can create
2631         stacking context, create stacking context for that element.
2632
2633         Test: fast/css/will-change/will-change-creates-stacking-context.html
2634
2635         * css/StyleResolver.cpp:
2636         (WebCore::StyleResolver::adjustRenderStyle):
2637         * rendering/style/RenderStyle.h: Add willChangeCreatesStackingContext(),
2638         which on most cases is a fast, inlined 'return false'. Otherwise ask
2639         the WillChangeData.
2640         * rendering/style/WillChangeData.cpp:
2641         (WebCore::propertyCreatesStackingContext):
2642         (WebCore::WillChangeData::createsStackingContext):
2643         * rendering/style/WillChangeData.h:
2644
2645 2015-08-15  Commit Queue  <commit-queue@webkit.org>
2646
2647         Unreviewed, rolling out r188508.
2648         https://bugs.webkit.org/show_bug.cgi?id=148058
2649
2650         Caused 10 tests to crash (Requested by smfr on #webkit).
2651
2652         Reverted changeset:
2653
2654         "Refactor HTMLCollection to be as fast as CachedLiveNodeList"
2655         https://bugs.webkit.org/show_bug.cgi?id=147979
2656         http://trac.webkit.org/changeset/188508
2657
2658 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
2659
2660         Implement parsing for CSS will-change
2661         https://bugs.webkit.org/show_bug.cgi?id=148052
2662
2663         Reviewed by Dean Jackson.
2664         
2665         Syntax is
2666             will-change: auto | <animateable-feature>#
2667         where
2668             <animateable-feature> = scroll-position | contents | <custom-ident>
2669             
2670         To support this, add WillChangeData which stores a vector of "feature"
2671         and CSS property squished into 16 bits. This is stored in rareNonInheritedData.
2672         If null or an empty list, the property value is 'auto'. The list preserves
2673         unknown properties.
2674
2675         Test: fast/css/will-change-parsing.html
2676
2677         * CMakeLists.txt:
2678         * WebCore.vcxproj/WebCore.vcxproj:
2679         * WebCore.vcxproj/WebCore.vcxproj.filters:
2680         * WebCore.xcodeproj/project.pbxproj:
2681         * css/CSSComputedStyleDeclaration.cpp:
2682         (WebCore::getWillChangePropertyValue):
2683         (WebCore::ComputedStyleExtractor::propertyValue):
2684         * css/CSSParser.cpp:
2685         (WebCore::CSSParser::parseValue):
2686         (WebCore::isValidGridPositionCustomIdent): Renamed from isValidCustomIdent(),
2687         since it's grid-specific.
2688         (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
2689         (WebCore::valueIsCSSKeyword): Returns true for the "CSS-wide" keywords like
2690         "initial", "inherit" and "default".
2691         (WebCore::CSSParser::parseFontFamily):
2692         (WebCore::isValidWillChangeAnimatableFeature):
2693         (WebCore::CSSParser::parseWillChange):
2694         (WebCore::isValidCustomIdent): Deleted.
2695         * css/CSSParser.h:
2696         * css/CSSPrimitiveValue.h:
2697         (WebCore::CSSPrimitiveValue::isPropertyID): New utility function.
2698         * css/CSSPropertyNames.in:
2699         * css/CSSValueKeywords.in:
2700         * css/StyleBuilderCustom.h:
2701         (WebCore::StyleBuilderCustom::applyValueWillChange):
2702         * rendering/style/RenderStyle.cpp:
2703         (WebCore::RenderStyle::setWillChange):
2704         * rendering/style/RenderStyle.h:
2705         * rendering/style/StyleAllInOne.cpp:
2706         * rendering/style/StyleRareNonInheritedData.cpp:
2707         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2708         (WebCore::StyleRareNonInheritedData::operator==):
2709         (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent):
2710         * rendering/style/StyleRareNonInheritedData.h:
2711         * rendering/style/WillChangeData.cpp: Added.
2712         (WebCore::WillChangeData::operator==):
2713         (WebCore::WillChangeData::containsScrollPosition):
2714         (WebCore::WillChangeData::containsContents):
2715         (WebCore::WillChangeData::containsProperty):
2716         (WebCore::WillChangeData::addFeature):
2717         (WebCore::WillChangeData::featureAt):
2718         * rendering/style/WillChangeData.h: Added.
2719         (WebCore::WillChangeData::create):
2720         (WebCore::WillChangeData::operator!=):
2721         (WebCore::WillChangeData::isAuto):
2722         (WebCore::WillChangeData::numFeatures):
2723         (WebCore::WillChangeData::WillChangeData):
2724         (WebCore::WillChangeData::AnimatableFeature::feature):
2725         (WebCore::WillChangeData::AnimatableFeature::property):
2726         (WebCore::WillChangeData::AnimatableFeature::featurePropertyPair):
2727         (WebCore::WillChangeData::AnimatableFeature::AnimatableFeature):
2728         (WebCore::WillChangeData::AnimatableFeature::operator==):
2729
2730 2015-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2731
2732         Build fix after r188510
2733
2734         * platform/mac/ThemeMac.mm:
2735         (WebCore::paintToggleButton): Pass a raw pointer to drawCellOrFocusRingWithViewIntoContext.
2736
2737 2015-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2738
2739         Search fields should scale when rendering while zoomed
2740         https://bugs.webkit.org/show_bug.cgi?id=147867
2741
2742         Reviewed by Daniel Bates.
2743
2744         When rendering zoomed search fields, draw to an image buffer instead of drawing directly into the context. This
2745         allows us to scale the image buffer up before rendering. Also refactors common logic used to draw both selects
2746         (paintMenuList) and search fields into the new private method paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
2747
2748         * rendering/RenderThemeMac.h: Changed drawCellOrFocusRingWithViewIntoContext to take a raw pointer.
2749         * rendering/RenderThemeMac.mm:
2750         (WebCore::paintToggleButton): Passes a raw pointer to drawCellOrFocusRingWithViewIntoContext.
2751         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Changed to take a raw pointer.
2752         * rendering/RenderThemeMac.h:
2753         * rendering/RenderThemeMac.mm:
2754         (WebCore::RenderThemeMac::paintMenuList): Refactored to use paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
2755         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Contains logic common to painting
2756             both selects and search fields.
2757         (WebCore::RenderThemeMac::paintSearchField): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
2758             to render search fields, utilizing an offscreen image buffer only when necessary.
2759
2760 2015-08-14  Chris Dumez  <cdumez@apple.com>
2761
2762         Refactor HTMLCollection to be as fast as CachedLiveNodeList
2763         https://bugs.webkit.org/show_bug.cgi?id=147979
2764
2765         Reviewed by Ryosuke Niwa.
2766
2767         Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
2768         preparation of having getElementsByTagName*() / getElementsByClassName()
2769         return an HTMLCollection instead of a NodeList, as per the
2770         specification. Chrome and Firefox already match the specification in
2771         this case.
2772
2773         Traversing an HTMLCollection was slow because of all the extra
2774         branching it had compared to CachedLiveNodeList. To address the issue,
2775         this patch introduces a new templated CachedHTMLCollection subclass,
2776         which behaves in a similar way as CachedLiveNodeList. The 2 template
2777         parameters are:
2778         1. The type of the subclass of CachedHTMLCollection, so we can call
2779            elementMatches() directly on the subclass, without needed any
2780            virtual function call or switch statement. This is the same approach
2781            as in CachedLiveNodeList.
2782         2. The type of tree traversal used (Descendants, ChildrenOnly,
2783            CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to
2784            support these 3 types of tree traversal. These were causing extra
2785            branching for every item() call. We are now able to choose the right
2786            type of traversal for the CachedHTMLCollection at compile time.
2787
2788         * WebCore.xcodeproj/project.pbxproj:
2789         Add new files to the Project.
2790
2791         * dom/ContainerNode.cpp:
2792         (WebCore::ContainerNode::children):
2793         (WebCore::ContainerNode::cachedHTMLCollection): Deleted.
2794         * dom/ContainerNode.h:
2795         Drop ContainerNode::ensureCachedHTMLCollection() and use
2796         NodeListsNodeData::addCachedCollection() directly at call sites
2797         instead. We need access to the CollectionType at build-time so
2798         we can resolve the CollectionTraversalType parameter for the
2799         GenericCachedHTMLCollection using CollectionTypeTraits.
2800
2801         * dom/Document.cpp:
2802         * dom/Document.h:
2803         Update ensureCachedCollection() so the CollectionType is now a template
2804         parameter instead of a method argument. We need to know the
2805         CollectionType at build time to construct the GenericCachedHTMLCollection.
2806
2807         * dom/ElementChildIterator.h:
2808         (WebCore::ElementChildIterator<ElementType>::operator):
2809         (WebCore::ElementChildConstIterator<ElementType>::operator):
2810         Add support for decrementing an ElementChildIterator, for consistency
2811         with ElementDescendantIterator. We need this to support backward
2812         traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
2813         of traversal.
2814
2815         * dom/LiveNodeList.h:
2816         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
2817         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
2818         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
2819         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
2820         Move traversal implementation to CollectionTraversal.h, so it can be
2821         shared with achedHTMLCollection.h.
2822
2823         * html/CachedHTMLCollection.h: Added.
2824         (WebCore::traversalType>::CachedHTMLCollection):
2825         (WebCore::traversalType>::~CachedHTMLCollection):
2826         (WebCore::traversalType>::CachedHTMLCollection::memoryCost):
2827         (WebCore::traversalType>::collectionCanTraverseBackward):
2828         (WebCore::traversalType>::collectionTraverseForward):
2829         (WebCore::traversalType>::collectionTraverseBackward):
2830         (WebCore::traversalType>::willValidateIndexCache):
2831         (WebCore::traversalType>::length):
2832         (WebCore::traversalType>::item):
2833         (WebCore::traversalType>::invalidateCache):
2834         (WebCore::traversalType>::elementMatches):
2835         (WebCore::nameShouldBeVisibleInDocumentAll):
2836         (WebCore::traversalType>::namedItem):
2837
2838         * html/CollectionTraversal.h: Added.
2839         Add new template class that provide the collection traversal code
2840         needed by CollectionIndexCache. It has template specializations for
2841         all 3 types of traversal: Descendants, ChildrenOnly, and
2842         CustomForwardOnly.
2843
2844         * html/CollectionType.h:
2845         Add CollectionTypeTraits traits so we can resolve the
2846         CollectionTraversalType used by a specific CollectionType at
2847         compile-time. This is needed for the second template parameter of
2848         CachedHTMLCollection.
2849
2850         * html/GenericCachedHTMLCollection.cpp: Added.
2851         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
2852         * html/GenericCachedHTMLCollection.h: Added.
2853         Add CachedHTMLCollection subclass is the generic one used for all
2854         CollectionTypes that do not have their own subclass (e.g. NodeChildren).
2855         This has an elementMatches() method with a switch() statement handling
2856         all these CollectionTypes. Those are not normally not performance
2857         sensitive.
2858
2859         * html/HTMLAllCollection.cpp:
2860         (WebCore::HTMLAllCollection::HTMLAllCollection):
2861         * html/HTMLAllCollection.h:
2862         Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
2863         an elementMatches() method that simply returns true as we want to
2864         match all elements.
2865
2866         * html/HTMLCollection.cpp:
2867         (WebCore::HTMLCollection::HTMLCollection):
2868         Move CollectionIndexCache member to the subclass and drop the 2 other
2869         members as they are replaced with the CollectionTraversalType template
2870         parameter of CachedHTMLCollection.
2871
2872         (WebCore::HTMLCollection::~HTMLCollection):
2873         Move Document::unregisterCollection() call to ~CachedHTMLCollection()
2874         as we needed to check if the CollectionIndexCache was valid first.
2875
2876         (WebCore::HTMLCollection::updateNamedElementCache):
2877         Move part of the implementation to the CachedHTMLCollection subclass
2878         as it needs to know about the type of traversal and it needs to be
2879         able to call elementMatches().
2880
2881         * html/HTMLCollection.h:
2882         (WebCore::HTMLCollection::rootNode):
2883         Inline for performance reasons and consistency with CachedLiveNodeList.
2884
2885         (WebCore::HTMLCollection::memoryCost):
2886         Make virtual and move part of the implementation to the
2887         CachedHTMLCollection subclass to compute the cost of the
2888         CollectionIndexCache.
2889
2890         (WebCore::HTMLCollection::invalidateCache):
2891         Move part of the implementation to the subclass to invalidate the
2892         CollectionIndexCache.
2893
2894         * html/HTMLFieldSetElement.cpp:
2895         (WebCore::HTMLFieldSetElement::elements):
2896
2897         * html/HTMLFormControlsCollection.cpp:
2898         * html/HTMLFormControlsCollection.h:
2899         Subclass CachedHTMLCollection instead of HTMLCollection.
2900         customElementAfter() no longer needs to be virtual as it
2901         is called directly by CachedHTMLCollection on the subclass.
2902
2903         * html/HTMLFormElement.cpp:
2904         (WebCore::HTMLFormElement::elements):
2905         * html/HTMLMapElement.cpp:
2906         (WebCore::HTMLMapElement::areas):
2907         Call NodeListsNodeData::addCachedCollection() directly.
2908
2909         * html/HTMLNameCollection.cpp:
2910         * html/HTMLNameCollection.h:
2911         Subclass CachedHTMLCollection instead of HTMLCollection.
2912
2913         * html/HTMLOptionsCollection.cpp:
2914         * html/HTMLOptionsCollection.h:
2915         Subclass CachedHTMLCollection instead of HTMLCollection.
2916
2917         * html/HTMLSelectElement.cpp:
2918         (WebCore::HTMLSelectElement::selectedOptions):
2919         (WebCore::HTMLSelectElement::options):
2920         * html/HTMLTableElement.cpp:
2921         (WebCore::HTMLTableElement::rows):
2922         (WebCore::HTMLTableElement::tBodies):
2923         * html/HTMLTableRowElement.cpp:
2924         (WebCore::HTMLTableRowElement::cells):
2925         Call NodeListsNodeData::addCachedCollection() directly.
2926
2927         * html/HTMLTableRowsCollection.cpp:
2928         * html/HTMLTableRowsCollection.h:
2929         Subclass CachedHTMLCollection instead of HTMLCollection.
2930         customElementAfter() no longer needs to be virtual as it
2931         is called directly by CachedHTMLCollection on the subclass.
2932
2933         * html/HTMLTableSectionElement.cpp:
2934         (WebCore::HTMLTableSectionElement::rows):
2935         Call NodeListsNodeData::addCachedCollection() directly.
2936
2937 2015-08-14  Matthew Daiter  <mdaiter@apple.com>
2938
2939         Implementing enumerateDevices
2940         https://bugs.webkit.org/show_bug.cgi?id=146426
2941         <rdar://problem/21599847>
2942
2943         Reviewed by Eric Carlson.
2944
2945         * CMakeLists.txt:
2946         * Modules/mediastream/MediaDeviceInfo.idl:
2947         * Modules/mediastream/UserMediaRequest.cpp:
2948         (WebCore::UserMediaRequest::enumerateDevices):
2949         * WebCore.xcodeproj/project.pbxproj:
2950         * platform/mediastream/MediaDevicesPrivate.cpp:
2951         (WebCore::MediaDevicesPrivate::create):
2952         (WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
2953         (WebCore::MediaDevicesPrivate::didCompleteRequest):
2954         (WebCore::MediaDevicesPrivate::availableMediaDevices):
2955         * platform/mediastream/MediaDevicesPrivate.h:
2956         (WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
2957         (WebCore::MediaDevicesPrivate::capturedDevices):
2958
2959 2015-08-13  Andy Estes  <aestes@apple.com>
2960
2961         [Cocoa] Downloads do not start if policy decision is made asynchronously
2962         https://bugs.webkit.org/show_bug.cgi?id=147985
2963
2964         Reviewed by Brady Eidson.
2965
2966         It's only possible to convert a NSURLConnection to a download while the connection delegate's
2967         -connection:didReceiveResponse: is being called. However, WebKit clients can decide content policy
2968         asynchronously. If a client chooses to download a response asynchronously, we can no longer convert the
2969         connection to a download, so we should start a new download instead.
2970
2971         New API test: _WKDownload.AsynchronousDownloadPolicy
2972
2973         * dom/Document.cpp: Updated to include SubresourceLoader.h.
2974         * loader/DocumentLoader.cpp:
2975         (WebCore::DocumentLoader::mainResourceLoader): Updated to return a SubresourceLoader.
2976         (WebCore::DocumentLoader::continueAfterContentPolicy): Cast mainResourceLoader() to a ResourceLoader since
2977         didFail() is private in SubresourceLoader.
2978         * loader/DocumentLoader.h:
2979         * loader/SubresourceLoader.cpp:
2980         (WebCore::SubresourceLoader::SubresourceLoader): Initialized m_callingDidReceiveResponse to false.
2981         (WebCore::SubresourceLoader::didReceiveResponse): Used TemporaryChange<> to set m_callingDidReceiveResponse to true.
2982         * loader/SubresourceLoader.h:
2983         * loader/appcache/ApplicationCacheHost.cpp: Updated to include SubresourceLoader.h.
2984         * loader/mac/DocumentLoaderMac.cpp: Ditto.
2985
2986 2015-08-14  Zalan Bujtas  <zalan@apple.com>
2987
2988         RenderBlock::simplifiedLayout should pop LayoutStateMaintainer when early returns.
2989         https://bugs.webkit.org/show_bug.cgi?id=148031
2990
2991         Reviewed by Simon Fraser.
2992
2993         LayoutStateMaintainer push/pop calls need to be balanced to ensure layout consistency.
2994
2995         Unable to make a test case for this.
2996
2997         * rendering/RenderBlock.cpp:
2998         (WebCore::RenderBlock::simplifiedLayout):
2999         * rendering/RenderView.h:
3000         (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer): ASSERT the state properly.
3001         (WebCore::LayoutStateMaintainer::push):
3002         (WebCore::LayoutStateMaintainer::pop):
3003         (WebCore::LayoutStateMaintainer::didPush):
3004         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): Deleted.
3005
3006 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
3007
3008         Remove a few includes from RenderObject.h
3009         https://bugs.webkit.org/show_bug.cgi?id=148007
3010
3011         Reviewed by Tim Horton.
3012
3013         Shrink down the RenderObject.h includes a little.
3014
3015         * rendering/RenderElement.h:
3016         * rendering/RenderObject.h:
3017         * rendering/RenderText.h:
3018
3019 2015-08-14  Tim Horton  <timothy_horton@apple.com>
3020
3021         Fix the Mavericks build.
3022
3023         * platform/spi/mac/LookupSPI.h:
3024
3025 2015-08-14  Tim Horton  <timothy_horton@apple.com>
3026
3027         Fix the build.
3028
3029         * platform/spi/mac/LookupSPI.h:
3030
3031 2015-08-14  Philippe Normand  <pnormand@igalia.com>
3032
3033         [GStreamer] Handle missing plugins better at runtime
3034         https://bugs.webkit.org/show_bug.cgi?id=146999
3035
3036         Reviewed by Carlos Garcia Campos.
3037
3038         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3039         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Warn the
3040         user if autoaudiosink wasn't found at runtime. In that case
3041         playbin will try to be smart by itself, hopefully. Also moved a
3042         couple GST_WARNING calls to WARN_MEDIA_MESSAGE.
3043         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Use
3044         WARN_MEDIA_MESSAGE here as well.
3045
3046 2015-08-13  Antti Koivisto  <antti@apple.com>
3047
3048         Cover memory cache subresource validation policy with cache tests
3049         https://bugs.webkit.org/show_bug.cgi?id=147830
3050
3051         Reviewed by Alexey Proskuryakov.
3052
3053         Existing tests under http/tests/cache/disk-cache currently cover disk and XHR memory cache validation behaviors.
3054         They can be extended to cover the regular subresource policy too.
3055
3056         Add window.internals API to disable CachedRawResource validation behavior. This makes XHR validate like
3057         other resources and allows existing tests (that use XHR) to cover normal subresource policy .
3058
3059         Test results reveal some bugs. For example subresources in memory cache don't respect Vary header.
3060
3061         It is generally bad that we have a separate XHR-and-main-resource validation policy in memory cache. Network cache
3062         doesn't have one.
3063
3064         * loader/FrameLoader.cpp:
3065         (WebCore::FrameLoader::clearTestingOverrides):
3066         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
3067         * loader/FrameLoader.h:
3068         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
3069         (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
3070         (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting):
3071         (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting):
3072         (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL):
3073         * loader/cache/CachedRawResource.h:
3074         * loader/cache/CachedResource.h:
3075         (WebCore::CachedResource::setLoadFinishTime):
3076         (WebCore::CachedResource::loadFinishTime):
3077         (WebCore::CachedResource::canReuse): Deleted.
3078
3079             Made canReuse non-virtual and removed it from the base. Only CachedRawResource has implementation.
3080
3081         * loader/cache/CachedResourceLoader.cpp:
3082         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
3083         * testing/Internals.cpp:
3084         (WebCore::Internals::setOverrideResourceLoadPriority):
3085         (WebCore::Internals::setStrictRawResourceValidationPolicyDisabled):
3086         (WebCore::Internals::clearMemoryCache):
3087         * testing/Internals.h:
3088
3089 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3090
3091         Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
3092         https://bugs.webkit.org/show_bug.cgi?id=148012
3093         <rdar://problem/19238094>
3094
3095         Reviewed by Simon Fraser.
3096
3097         * platform/spi/mac/LookupSPI.h:
3098         Add some SPI.
3099
3100 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
3101
3102         Another Windows build fix.
3103
3104         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3105
3106 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
3107
3108         Try to fix Windows build after r188430.
3109
3110         * platform/graphics/ca/win/PlatformCALayerWin.h:
3111
3112 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
3113
3114         Generated files don't all need to include ScriptExecutionContext.h
3115         https://bugs.webkit.org/show_bug.cgi?id=148011
3116
3117         Reviewed by Alexey Proskuryakov.
3118         
3119         Generated files which are not callbacks or constructors do not need to include
3120         ScriptExecutionContext.h.
3121
3122         * bindings/scripts/CodeGeneratorJS.pm:
3123         (GenerateImplementation): Deleted.
3124         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3125         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3126         * bindings/scripts/test/JS/JSTestException.cpp:
3127         * bindings/scripts/test/JS/JSTestInterface.cpp:
3128         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3129         * bindings/scripts/test/JS/JSTestObj.cpp:
3130         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3131         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3132         * bindings/scripts/test/JS/JSattribute.cpp:
3133
3134 2015-08-13  Commit Queue  <commit-queue@webkit.org>
3135
3136         Unreviewed, rolling out r188428.
3137         https://bugs.webkit.org/show_bug.cgi?id=148015
3138
3139         broke cmake build (Requested by alexchristensen on #webkit).
3140
3141         Reverted changeset:
3142
3143         "Move some commands from ./CMakeLists.txt to Source/cmake"
3144         https://bugs.webkit.org/show_bug.cgi?id=148003
3145         http://trac.webkit.org/changeset/188428
3146
3147 2015-08-13  Zalan Bujtas  <zalan@apple.com>
3148
3149         Remove pixelSnapped* functions from RenderBoxModelObject/RenderBox.
3150         https://bugs.webkit.org/show_bug.cgi?id=147982
3151
3152         Reviewed by Simon Fraser.
3153
3154         RenderBoxModelObject/RenderBox::pixelSnapped* functions are misleading.
3155         They all round to integral values, while the rest of the pixel snapping
3156         functions round to device pixels.
3157         This patch moves integral rounding to the callers. (Note that they all will eventually
3158         go away as we convert additional modules to subpixel rendering (tables, scrolling etc).)
3159
3160         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3161         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3162         * dom/Element.cpp:
3163         (WebCore::Element::offsetLeft):
3164         (WebCore::Element::offsetTop):
3165         (WebCore::Element::offsetWidth):
3166         (WebCore::Element::offsetHeight):
3167         (WebCore::Element::clientWidth):
3168         (WebCore::Element::clientHeight):
3169         * dom/Position.cpp:
3170         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
3171         * html/HTMLImageElement.cpp:
3172         (WebCore::HTMLImageElement::width):
3173         (WebCore::HTMLImageElement::height):
3174         * html/shadow/SpinButtonElement.cpp:
3175         (WebCore::SpinButtonElement::defaultEventHandler):
3176         * inspector/InspectorOverlay.cpp:
3177         (WebCore::buildObjectForElementData):
3178         * page/FrameView.cpp:
3179         (WebCore::FrameView::applyPaginationToViewport):
3180         (WebCore::FrameView::calculateScrollbarModesForLayout):
3181         (WebCore::FrameView::calculateExtendedBackgroundMode):
3182         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
3183         * page/PrintContext.cpp:
3184         (WebCore::PrintContext::pageNumberForElement):
3185         * platform/graphics/LayoutRect.h:
3186         (WebCore::LayoutRect::pixelSnappedSize): Deleted.
3187         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3188         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3189         * rendering/RenderBox.cpp:
3190         (WebCore::RenderBox::pixelSnappedClientWidth): Deleted.
3191         (WebCore::RenderBox::pixelSnappedClientHeight): Deleted.
3192         (WebCore::RenderBox::pixelSnappedOffsetWidth): Deleted.
3193         (WebCore::RenderBox::pixelSnappedOffsetHeight): Deleted.
3194         * rendering/RenderBox.h:
3195         (WebCore::RenderBox::pixelSnappedLogicalHeight): Deleted.
3196         (WebCore::RenderBox::pixelSnappedLogicalWidth): Deleted.
3197         (WebCore::RenderBox::pixelSnappedSize): Deleted.
3198         (WebCore::RenderBox::pixelSnappedBorderBoxRect): Deleted.
3199         * rendering/RenderBoxModelObject.cpp:
3200         (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth): Deleted.
3201         (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight): Deleted.
3202         * rendering/RenderBoxModelObject.h:
3203         (WebCore::RenderBoxModelObject::pixelSnappedOffsetLeft): Deleted.
3204         (WebCore::RenderBoxModelObject::pixelSnappedOffsetTop): Deleted.
3205         * rendering/RenderFileUploadControl.cpp:
3206         (WebCore::nodeWidth):
3207         (WebCore::nodeHeight):
3208         (WebCore::RenderFileUploadControl::maxFilenameWidth):
3209         * rendering/RenderLayer.cpp:
3210         (WebCore::RenderLayer::updateLayerPosition):
3211         (WebCore::RenderLayer::perspectiveTransform):
3212         (WebCore::RenderLayer::clampScrollOffset):
3213         (WebCore::RenderLayer::visibleSize):
3214         (WebCore::RenderLayer::positionOverflowControls):
3215         (WebCore::RenderLayer::hasHorizontalOverflow):
3216         (WebCore::RenderLayer::hasVerticalOverflow):
3217         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
3218         (WebCore::RenderLayer::overflowControlsIntersectRect):
3219         (WebCore::RenderLayer::isPointInResizeControl):
3220         * rendering/RenderLayerBacking.cpp:
3221         (WebCore::RenderLayerBacking::updateGeometry):
3222         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
3223         (WebCore::RenderLayerBacking::startAnimation):
3224         (WebCore::RenderLayerBacking::startTransition):
3225         * rendering/RenderLayerBacking.h:
3226         * rendering/RenderListBox.cpp:
3227         (WebCore::RenderListBox::scrollWidth):
3228         (WebCore::RenderListBox::scrollHeight):
3229         * rendering/RenderMediaControlElements.cpp:
3230         (WebCore::RenderMediaVolumeSliderContainer::layout):
3231         * rendering/RenderScrollbar.cpp:
3232         (WebCore::RenderScrollbar::buttonRect):
3233         * rendering/RenderTable.cpp:
3234         (WebCore::RenderTable::addOverflowFromChildren):
3235         * rendering/RenderTableCell.cpp:
3236         (WebCore::RenderTableCell::computeIntrinsicPadding):
3237         (WebCore::RenderTableCell::paintCollapsedBorders):
3238         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3239         (WebCore::RenderTableCell::paintBoxDecorations):
3240         (WebCore::RenderTableCell::paintMask):
3241         * rendering/RenderTableCell.h:
3242         (WebCore::RenderTableCell::logicalHeightForRowSizing):
3243         * rendering/RenderTheme.cpp:
3244         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
3245         * rendering/RenderTheme.h:
3246         * rendering/RenderThemeMac.mm:
3247         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3248         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
3249         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
3250         * rendering/RenderTreeAsText.cpp:
3251         (WebCore::write):
3252         * rendering/mathml/RenderMathMLFraction.cpp:
3253         (WebCore::RenderMathMLFraction::paint):
3254         * rendering/mathml/RenderMathMLRoot.cpp:
3255         (WebCore::RenderMathMLRoot::paint):
3256         * rendering/svg/RenderSVGRoot.cpp:
3257         (WebCore::RenderSVGRoot::paintReplaced):
3258         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
3259
3260 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
3261
3262         Minor GraphicsLayer.h/PlatformCALayer.h cleanup
3263         https://bugs.webkit.org/show_bug.cgi?id=148009
3264
3265         Reviewed by Tim Horton.
3266
3267         Remove some #includes.
3268
3269         * platform/graphics/GraphicsLayer.h:
3270         * platform/graphics/ca/PlatformCALayer.h:
3271
3272 2015-08-13  Alex Christensen  <achristensen@webkit.org>
3273
3274         Move some commands from ./CMakeLists.txt to Source/cmake
3275         https://bugs.webkit.org/show_bug.cgi?id=148003
3276
3277         Reviewed by Brent Fulgham.
3278
3279         * CMakeLists.txt:
3280         Added commands needed to build WebCore by itself.
3281
3282 2015-08-13  Tim Horton  <timothy_horton@apple.com>
3283
3284         Refactor and improve TextIndicator to prepare for tests
3285         https://bugs.webkit.org/show_bug.cgi?id=147622
3286
3287         Reviewed by Simon Fraser.
3288
3289         No new tests because they're coming soon!
3290
3291         * page/TextIndicator.cpp:
3292         (WebCore::TextIndicator::TextIndicator):
3293         (WebCore::TextIndicator::~TextIndicator):
3294         (WebCore::TextIndicator::createWithRange):
3295         (WebCore::TextIndicator::createWithSelectionInFrame):
3296         (WebCore::hasNonInlineOrReplacedElements):
3297         (WebCore::snapshotOptionsForTextIndicatorOptions):
3298         (WebCore::takeSnapshot):
3299         (WebCore::takeSnapshots):
3300         (WebCore::initializeIndicator):
3301         (WebCore::snapshotSelectionWithHighlight): Deleted.
3302         (WebCore::TextIndicator::wantsBounce): Deleted.
3303         (WebCore::TextIndicator::wantsContentCrossfade): Deleted.
3304         (WebCore::TextIndicator::wantsFadeIn): Deleted.
3305         (WebCore::TextIndicator::wantsManualAnimation): Deleted.
3306         * page/TextIndicator.h:
3307         (WebCore::TextIndicator::indicatesCurrentSelection):
3308         (WebCore::TextIndicator::setWantsMargin): Deleted.
3309         (WebCore::TextIndicator::wantsMargin): Deleted.
3310         Rename wantsMargin to indicatesCurrentSelection. It's really about whether
3311         the TextIndicator indicates the existing selection, and the Mac presentation
3312         just uses that to determine whether or not to show a margin, but that
3313         margin has nothing to do with the cross-platform TextIndicator code.
3314
3315         Move most of the snapshotting and rect gathering code to initializeTextIndicator, and call it
3316         from both ::createWithRange and ::createWithSelectionInFrame, instead of calling
3317         ::createWithSelectionInFrame from ::createWithRange after setting the selection.
3318         This way, the range passed into ::createWithRange is preserved for use in initializeTextIndicator,
3319         instead of round-tripping through selection code, which can change it (e.g. in the case
3320         of user-select: none; elements).
3321
3322         Add TextIndicatorOptions, which allow callers to adjust the behavior of TextIndicator
3323         instead of having #if PLATFORM(X) strewn throughout TextIndicator.
3324
3325         Add an option which was previously implemented at the iOS-specific callsites,
3326         TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges,
3327         which falls back to indicating a bounding rect and not doing a range-only paint
3328         if the given range includes any non-inline elements or any replaced elements.
3329         This makes it so that we do something reasonable-looking for very complex ranges,
3330         like article links on the New York Times, which include multiple disparate paragraphs
3331         of text and one or more images, and also so that indicating a range that only
3332         includes an image does something fairly reasonable.
3333
3334         Move presentation-specific functions (wantsBounce, wantsContentCrossfade, etc.)
3335         to TextIndicatorWindow. Ideally TextIndicatorPresentationTransition would also move,
3336         but that is a fairly large and complicated change that should be made separately.
3337
3338         * page/mac/TextIndicatorWindow.h:
3339         * page/mac/TextIndicatorWindow.mm:
3340         (indicatorWantsBounce):
3341         (indicatorWantsContentCrossfade):
3342         (indicatorWantsFadeIn):
3343         (indicatorWantsManualAnimation):
3344         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
3345         (-[WebTextIndicatorView _animationDuration]):
3346         (-[WebTextIndicatorView present]):
3347         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
3348         (WebCore::TextIndicatorWindow::clearTextIndicator):
3349         (WebCore::TextIndicatorWindow::setTextIndicator):
3350         Rename TextIndicatorDismissalAnimation to TextIndicatorWindowDismissalAnimation,
3351         and TextIndicatorLifetime to TextIndicatorWindowLifetime, because
3352         they are TextIndicatorWindow specific.
3353
3354         * accessibility/AccessibilityRenderObject.cpp:
3355         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
3356         * bindings/objc/DOM.mm:
3357         (-[DOMNode getPreviewSnapshotImage:andRects:]):
3358         (-[DOMRange boundingBox]):
3359         (-[DOMRange textRects]):
3360         * dom/DocumentMarkerController.cpp:
3361         (WebCore::DocumentMarkerController::addTextMatchMarker):
3362         * dom/Node.cpp:
3363         (WebCore::Node::textRects):
3364         * dom/Range.cpp:
3365         (WebCore::Range::intersectsNode):
3366         (WebCore::Range::absoluteBoundingBox):
3367         (WebCore::Range::absoluteTextRects):
3368         (WebCore::Range::absoluteTextQuads):
3369         (WebCore::Range::getClientRects):
3370         (WebCore::Range::getBoundingClientRect):
3371         (WebCore::Range::getBorderAndTextQuads):
3372         (WebCore::Range::boundingRectInternal):
3373         (WebCore::Range::absoluteBoundingRect):
3374         (WebCore::Range::boundingBox): Deleted.
3375         (WebCore::Range::textRects): Deleted.
3376         (WebCore::Range::textQuads): Deleted.
3377         (WebCore::Range::boundingRect): Deleted.
3378         * dom/Range.h:
3379         * editing/AlternativeTextController.cpp:
3380         (WebCore::AlternativeTextController::rootViewRectForRange):
3381         * editing/Editor.cpp:
3382         (WebCore::Editor::findStringAndScrollToVisible):
3383         * editing/FrameSelection.cpp:
3384         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
3385         * editing/mac/DataDetection.mm:
3386         (WebCore::DataDetection::detectItemAroundHitTestResult):
3387         * rendering/RenderObject.cpp:
3388         (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
3389         Rename various Range methods to make it clear whether they return absolute or client rects.
3390
3391 2015-08-13  Jer Noble  <jer.noble@apple.com>
3392
3393         Don't short circuit seeking
3394         https://bugs.webkit.org/show_bug.cgi?id=147892
3395
3396         Reviewed by Eric Carlson.
3397
3398         When two seekWithTolerance() requests come in before the first is acted upon in seekTask(),
3399         the second will result in a "no seek required" conditional, because the new "currentTime" is
3400         assumed to be the destination time of the first seek.
3401
3402         When cancelling a pending seek, first replace the "now" value with the "now" value from the
3403         replaced seek, thus preserving the original currentTime across all replacement seeks.
3404
3405         Drive-by fix: some added logging causes occasional crashes, due to the underlying object being
3406         accessed having been deleted.
3407
3408         * html/HTMLMediaElement.cpp:
3409         (WebCore::HTMLMediaElement::seekWithTolerance):
3410         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3411         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
3412
3413 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
3414
3415         Prospective Mac/iOS build fix after the last Windows build fix.
3416
3417         * page/CaptionUserPreferences.cpp:
3418         * page/UserContentController.cpp:
3419
3420 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
3421
3422         [Win] More build fixes.
3423
3424         * dom/make_event_factory.pl:
3425         (generateImplementation):
3426         * page/CaptionUserPreferences.cpp:
3427         * page/PageGroup.cpp:
3428         * page/UserContentController.cpp:
3429
3430 2015-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
3431
3432         A focused node should not be assisted when handling touch events synchronously
3433         https://bugs.webkit.org/show_bug.cgi?id=147836
3434         <rdar://problem/22204108>
3435
3436         Reviewed by Enrica Casucci.
3437
3438         Makes interaction with touch handlers no longer assist the currently focused element in the
3439         general case. Added plumbing to reassist a currently focused node when dispatching touch events,
3440         so that an input that programmatically focuses itself and prevents default on a touch event will