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