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