570e6dc86d6b846d6a70f53229ae50cb6ccb070a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
2
3         Factor out Lookup invocation
4         https://bugs.webkit.org/show_bug.cgi?id=148509
5
6         Reviewed by Anders Carlsson.
7
8         There's a ton of duplicated code in legacy and modern WebKit to talk to
9         Lookup. And, it's pretty messy. As a first step to making it less messy,
10         make it so we only have it in one place instead of four (or two).
11
12         * editing/DictionaryPopupInfo.h:
13         Move DictionaryPopupInfo into WebCore. This was duplicated
14         in both legacy and modern WebKit.
15
16         * editing/mac/DictionaryLookup.h:
17         * editing/mac/DictionaryLookup.mm:
18         (WebCore::DictionaryLookup::rangeForSelection):
19         (WebCore::DictionaryLookup::rangeAtHitTestResult):
20         (WebCore::DictionaryLookup::stringForPDFSelection):
21         (WebCore::showPopupOrCreateAnimationController):
22         (WebCore::DictionaryLookup::showPopup):
23         (WebCore::DictionaryLookup::hidePopup):
24         (WebCore::DictionaryLookup::animationControllerForPopup):
25         (WebCore::rangeForDictionaryLookupForSelection): Deleted.
26         (WebCore::rangeForDictionaryLookupAtHitTestResult): Deleted.
27         (WebCore::dictionaryLookupForPDFSelection): Deleted.
28         Move DictionaryLookup stuff into a class for better names.
29
30         Move showPopup, hidePopup, and animationControllerForPopup here.
31         showPopup and animationControllerForPopup both bottleneck through
32         a single function, where previously we duplicated all of the code
33         for both of them, and in both legacy and modern WebKit.
34
35         showPopup and animationControllerForPopup take a block that they *may*
36         call if we have support for overriding Lookup's indicator with TextIndicator,
37         because the installation process is different per WebKit.
38
39         * page/mac/EventHandlerMac.mm:
40         (WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
41         * testing/Internals.cpp:
42         (WebCore::Internals::rangeForDictionaryLookupAtLocation):
43         Adjust to the new naming.
44
45 2015-08-27  Jon Davis  <jond@apple.com>
46
47         Add IndexedDB to the feature status page.
48         https://bugs.webkit.org/show_bug.cgi?id=148094
49
50         Reviewed by Timothy Hatcher.
51
52         * features.json:
53
54 2015-08-27  Anders Carlsson  <andersca@apple.com>
55
56         REGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
57         https://bugs.webkit.org/show_bug.cgi?id=148497
58         <rdar://problem/22459541>
59
60         Reviewed by Andy Estes.
61
62         Don't return early if iterations is 0.
63
64         * platform/graphics/filters/FEConvolveMatrix.cpp:
65         (WebCore::FEConvolveMatrix::platformApplySoftware):
66
67 2015-08-27  Antti Koivisto  <antti@apple.com>
68
69         Decode redirected data URLs in web process
70         https://bugs.webkit.org/show_bug.cgi?id=148386
71
72         Reviewed by Zalan Bujtas.
73
74         Redirected data URLs still end up to networking layer for decoding. Handle them locally as well.
75
76         Covered by existing tests.
77
78         * loader/ResourceLoader.cpp:
79         (WebCore::ResourceLoader::~ResourceLoader):
80         (WebCore::ResourceLoader::finishNetworkLoad):
81
82             Factor to a function.
83
84         (WebCore::ResourceLoader::releaseResources):
85         (WebCore::ResourceLoader::willSendRequestInternal):
86
87             When receiving redirect to a data URL end the network load and decode it locally.
88
89         (WebCore::ResourceLoader::willSendRequest):
90         * loader/ResourceLoader.h:
91
92 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
93
94         [Cocoa] Generic font families do not consult with the user's preferred language
95         https://bugs.webkit.org/show_bug.cgi?id=148499
96         <rdar://problem/22407296>
97
98         Reviewed by Antti Koivisto.
99
100         When WebKit encounters markup like lang="zh" style="font-family: sans-serif;"
101         we currently always use Simplified Chinese fonts. However, the user may
102         have specifically selected Traditional Chinese in their user preferences.
103         In this absence of other signals, we should consult with the user
104         preferences when determining which font to pick.
105
106         Tests: fast/text/international/generic-font-family-language-simplified.html
107                fast/text/international/generic-font-family-language-traditional.html
108
109         * platform/Language.cpp:
110         (WebCore::observerMap):
111         (WebCore::overrideUserPreferredLanguages):
112         * platform/graphics/FontGenericFamilies.cpp:
113         (WebCore::computeUserPrefersSimplified):
114         (WebCore::cachedUserPrefersSimplified):
115         (WebCore::languageChanged):
116         (WebCore::genericFontFamilyForScript):
117         (WebCore::FontGenericFamilies::FontGenericFamilies):
118         * platform/text/LocaleToScriptMappingDefault.cpp:
119         (WebCore::scriptNameToCode):
120
121 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
122
123         Update Grid Layout to use fewer magic -1s
124         https://bugs.webkit.org/show_bug.cgi?id=148505
125
126         Reviewed by Javier Fernandez.
127
128         After r188873, there were still some -1s left in Grid Layout code. This patch cleans them
129         up after consulting with Javier Fernandez.
130
131         No new tests because there is no behavior change.
132
133         * rendering/RenderBox.cpp:
134         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
135         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
136         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
137         * rendering/RenderGrid.cpp:
138         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
139
140 2015-08-27  Brian Burg  <bburg@apple.com>
141
142         Web Inspector: FrontendChannel should know its own connection type
143         https://bugs.webkit.org/show_bug.cgi?id=148482
144
145         Reviewed by Joseph Pecoraro.
146
147         To prepare for multiple attached frontends, the frontend connection should
148         be able to report its type rather than explicitly setting connection type
149         via a getter.
150
151         No behavior change, no new tests.
152
153         * inspector/InspectorController.cpp:
154         (WebCore::InspectorController::hasLocalFrontend): Ask the channel what it is.
155         (WebCore::InspectorController::hasRemoteFrontend): Ask the channel what it is.
156         (WebCore::InspectorController::connectFrontend): Use hasRemoteFrotend().
157         (WebCore::InspectorController::disconnectFrontend): Use hasRemoteFrontend().
158         (WebCore::InspectorController::InspectorController): Deleted.
159         * inspector/InspectorController.h: Initialize a few members here.
160         (WebCore::InspectorController::hasFrontend): Deleted, it was unused.
161         (WebCore::InspectorController::setHasRemoteFrontend): Deleted.
162         * inspector/WorkerInspectorController.cpp:
163         * page/PageDebuggable.cpp:
164         (WebCore::PageDebuggable::connect):
165         (WebCore::PageDebuggable::disconnect):
166         * testing/Internals.cpp: Add connectionType().
167
168 2015-08-27  Eric Carlson  <eric.carlson@apple.com>
169
170         Media Session: MediaSession constructor 'kind' argument optional
171         https://bugs.webkit.org/show_bug.cgi?id=148527
172
173         Reviewed by Jer Noble.
174
175         No new tests, updated media/session/session-creation.html.
176
177         * Modules/mediasession/MediaSession.cpp:
178         (WebCore::MediaSession::parseKind): Treat null kind "content".
179         (WebCore::MediaSession::MediaSession): Delete Document* version.
180         * Modules/mediasession/MediaSession.h: Make constructor private.
181         * Modules/mediasession/MediaSession.idl:
182
183         * WebCore.xcodeproj/project.pbxproj: Add JSMediaSessionCustom.cpp.
184
185         * bindings/js/JSMediaSessionCustom.cpp: Added.
186         (WebCore::constructJSMediaSession):
187
188         * dom/Document.cpp:
189         (WebCore::Document::defaultMediaSession): Call MediaSession::create.
190
191         * html/HTMLMediaElement.cpp:
192         (WebCore::HTMLMediaElement::session): Compare session with document.defaultMediaSession, not
193           its kind.
194         (WebCore::HTMLMediaElement::setSession): Update comments.
195
196 2015-08-27  Zalan Bujtas  <zalan@apple.com>
197
198         Simple line layout: Use float types wherever possible to match line tree.
199         https://bugs.webkit.org/show_bug.cgi?id=148444
200
201         Reviewed by Antti Koivisto.
202
203         To match inline tree output, we should try to match the data types as far as precision goes.
204
205         This patch also fixes the confusing mismatch between Run::baseline().x() and Run::rect().x(). 
206         They are both supposed to return the left edge of the run. However Run::rect().x() returns a rounded
207         LayoutUnit of the logical left, while Run::baseline().x() returns the correct logical left.          
208         With this patch 
209           1. baseline position does not include logical left anymore.
210           2. Run::rect().x() does not round the logical left coordinate anymore.
211
212         * rendering/RenderTreeAsText.cpp:
213         (WebCore::writeSimpleLine):
214         * rendering/SimpleLineLayoutFunctions.cpp:
215         (WebCore::SimpleLineLayout::paintFlow):
216         (WebCore::SimpleLineLayout::collectFlowOverflow):
217         (WebCore::SimpleLineLayout::collectAbsoluteRects):
218         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
219         * rendering/SimpleLineLayoutResolver.cpp:
220         (WebCore::SimpleLineLayout::linePosition):
221         (WebCore::SimpleLineLayout::lineSize):
222         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
223         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
224         (WebCore::SimpleLineLayout::baselinePosition): Deleted.
225         (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
226         * rendering/SimpleLineLayoutResolver.h:
227         (WebCore::SimpleLineLayout::RunResolver::Run::baselinePosition):
228         (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):
229
230 2015-08-27  Zalan Bujtas  <zalan@apple.com>
231
232         Subpixel positioned iframe's repaint area calculation problem.
233         https://bugs.webkit.org/show_bug.cgi?id=148422
234
235         When the repaint rect position is floored for iframes, we need
236         to expand the size so that it still covers the content.
237
238         Reviewed by Simon Fraser.
239
240         Test: fast/repaint/content-inside-subpixel-positioned-iframe.html
241
242         * rendering/RenderBox.cpp:
243         (WebCore::RenderBox::computeRectForRepaint):
244
245 2015-08-27  Enrica Casucci  <enrica@apple.com>
246
247         Add some new emoji with modifiers and new sequence.
248         https://bugs.webkit.org/show_bug.cgi?id=148202
249         rdar://problem/21849857
250
251         Reviewed by Sam Weinig.
252
253         Adding support for some new emoji with modifiers and
254         one new emoji sequence.
255
256         * platform/graphics/FontCascade.cpp:
257         (WebCore::FontCascade::characterRangeCodePath):
258         * platform/text/CharacterProperties.h:
259         (WebCore::isEmojiGroupCandidate):
260         (WebCore::isEmojiModifier):
261         * platform/text/TextBreakIterator.cpp:
262         (WebCore::cursorMovementIterator):
263
264 2015-08-27  Dean Jackson  <dino@apple.com>
265
266         Initial infrastructure of media controls testing
267         https://bugs.webkit.org/show_bug.cgi?id=148426
268         <rdar://problem/22417286>
269
270         Reviewed by Eric Carlson.
271
272         Expose a JS API from Internals that allows a layout test
273         to ask the controls instance what it thinks it is
274         doing.
275
276         Test: media/controls/basic.html
277
278         * Modules/mediacontrols/mediaControlsApple.js:
279         (Controller.prototype.getCurrentControlsStatus): New method. Currently
280         returns a simple JSON string.
281         * html/HTMLMediaElement.cpp:
282         (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): Call into
283         the controls instance.
284         * html/HTMLMediaElement.h:
285         * testing/Internals.cpp:
286         (WebCore::Internals::getCurrentMediaControlsStatusForElement): Link
287         between the Internals API and the HTMLMediaElement.
288         * testing/Internals.h:
289         * testing/Internals.idl:
290
291 2015-08-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
292
293         [EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
294         https://bugs.webkit.org/show_bug.cgi?id=148511
295
296         Reviewed by Csaba Osztrogonác.
297
298         To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.
299
300         Additionally this patch fixes style errors in RenderThemeEfl.cpp
301
302         * PlatformEfl.cmake:
303         * rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
304         (WebCore::toEdjeGroup):
305         (WebCore::setSourceGroupForEdjeObject):
306         (WebCore::RenderThemeEfl::adjustSizeConstraints):
307         (WebCore::isFormElementTooLargeToDisplay):
308         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
309         (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
310         (WebCore::RenderThemeEfl::getThemePartFromCache):
311         (WebCore::RenderThemeEfl::clearThemePartCache):
312         (WebCore::RenderThemeEfl::applyEdjeStateFromForm):
313         (WebCore::RenderThemeEfl::applyEdjeRTLState):
314         (WebCore::RenderThemeEfl::isControlStyled):
315         (WebCore::RenderThemeEfl::paintThemePart):
316         (WebCore::RenderThemeEfl::create):
317         (WebCore::RenderTheme::themeForPage):
318         (WebCore::applyColorCallback):
319         (WebCore::fillColorsFromEdjeClass):
320         (WebCore::RenderThemeEfl::setColorFromThemeClass):
321         (WebCore::RenderThemeEfl::setThemePath):
322         (WebCore::RenderThemeEfl::themePath):
323         (WebCore::RenderThemeEfl::loadTheme):
324         (WebCore::RenderThemeEfl::applyPartDescriptionFallback):
325         (WebCore::RenderThemeEfl::applyPartDescription):
326         (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
327         (WebCore::RenderThemeEfl::RenderThemeEfl):
328         (WebCore::RenderThemeEfl::~RenderThemeEfl):
329         (WebCore::supportsFocus):
330         (WebCore::RenderThemeEfl::supportsFocusRing):
331         (WebCore::RenderThemeEfl::controlSupportsTints):
332         (WebCore::RenderThemeEfl::baselinePosition):
333         (WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
334         (WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
335         (WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
336         (WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
337         (WebCore::RenderThemeEfl::platformFocusRingColor):
338         (WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
339         (WebCore::RenderThemeEfl::paintSliderTrack):
340         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
341         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
342         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
343         (WebCore::RenderThemeEfl::sliderTickSize):
344         (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
345         (WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
346         (WebCore::RenderThemeEfl::supportsDataListUI):
347         (WebCore::RenderThemeEfl::paintSliderThumb):
348         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
349         (WebCore::RenderThemeEfl::paintCheckbox):
350         (WebCore::RenderThemeEfl::adjustRadioStyle):
351         (WebCore::RenderThemeEfl::paintRadio):
352         (WebCore::RenderThemeEfl::adjustButtonStyle):
353         (WebCore::RenderThemeEfl::paintButton):
354         (WebCore::RenderThemeEfl::adjustMenuListStyle):
355         (WebCore::RenderThemeEfl::paintMenuList):
356         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
357         (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
358         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
359         (WebCore::RenderThemeEfl::paintTextField):
360         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
361         (WebCore::RenderThemeEfl::paintTextArea):
362         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
363         (WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
364         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
365         (WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
366         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
367         (WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
368         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
369         (WebCore::RenderThemeEfl::paintSearchField):
370         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
371         (WebCore::RenderThemeEfl::paintInnerSpinButton):
372         (WebCore::RenderThemeEfl::setDefaultFontSize):
373         (WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
374         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
375         (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
376         (WebCore::RenderThemeEfl::animationDurationForProgressBar):
377         (WebCore::RenderThemeEfl::paintProgressBar):
378         (WebCore::RenderThemeEfl::mediaControlsStyleSheet):
379         (WebCore::RenderThemeEfl::mediaControlsScript):
380         * rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.
381
382 2015-08-26  Mark Lam  <mark.lam@apple.com>
383
384         watchdog m_didFire state erroneously retained.
385         https://bugs.webkit.org/show_bug.cgi?id=131082
386
387         Reviewed by Geoffrey Garen.
388
389         No new tests.  The new code is covered by the JSC API tests and an existing test:
390         fast/workers/worker-terminate-forever.html
391
392         * bindings/js/JSEventListener.cpp:
393         (WebCore::JSEventListener::handleEvent):
394         * bindings/js/WorkerScriptController.cpp:
395         (WebCore::WorkerScriptController::WorkerScriptController):
396         - Always create a watchdog for the Web Worker's VM.  We need this in order to support
397           Worker.terminate().
398         (WebCore::WorkerScriptController::evaluate):
399         (WebCore::WorkerScriptController::scheduleExecutionTermination):
400         (WebCore::WorkerScriptController::isTerminatingExecution):
401         (WebCore::WorkerScriptController::forbidExecution):
402         (WebCore::WorkerScriptController::isExecutionTerminating): Deleted.
403         * bindings/js/WorkerScriptController.h:
404
405 2015-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
406
407         [Cocoa] PerformanceTest Layout/RegionsShapes.html is failing
408         https://bugs.webkit.org/show_bug.cgi?id=148464
409
410         Reviewed by Andy Estes.
411
412         The test is failing because Core Text emits a warning message when you use CTFontCreateWithName()
413         and it cannot find the name you provide. However, this is exactly the situation we are creating
414         (by attempting to auto-activate a font if we could not otherwise find it). The fix is to simply
415         not use that API function in favor of using CTFontCreateWithFontDescriptor(), which does not emit
416         a warning message..
417
418         No new tests because there is no behavior change.
419
420         * platform/graphics/cocoa/FontCacheCoreText.cpp:
421         (WebCore::autoActivateFont):
422         (WebCore::FontCache::createFontPlatformData):
423
424 2015-08-26  Joseph Pecoraro  <pecoraro@apple.com>
425
426         Web Inspector: Implement tracking of active stylesheets in the frontend
427         https://bugs.webkit.org/show_bug.cgi?id=105828
428
429         Reviewed by Timothy Hatcher.
430
431         Tests: inspector/css/stylesheet-events-basic.html
432                inspector/css/stylesheet-events-imports.html
433                inspector/css/stylesheet-events-inspector-stylesheet.html
434
435         * inspector/InspectorInstrumentation.cpp:
436         (WebCore::InspectorInstrumentation::documentDetachedImpl):
437         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdatedImpl):
438         * inspector/InspectorInstrumentation.h:
439         (WebCore::InspectorInstrumentation::documentDetached):
440         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdated):
441         New hooks for when a document is detached or a document's style sheets are updated.
442
443         * dom/Document.cpp:
444         (WebCore::Document::prepareForDestruction):
445         Inform the inspector so the CSSAgent can remove document related data.
446
447         * dom/DocumentStyleSheetCollection.h:
448         * dom/DocumentStyleSheetCollection.cpp:
449         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
450         Inform the inspector so the CSSAgent can push stylesheet related events.
451
452         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsForInspector): Added.
453         CSSStyleSheets for the inspector include non-disabled author stylesheets
454         even if they are empty.
455
456         * inspector/InspectorCSSAgent.h:
457         * inspector/InspectorCSSAgent.cpp:
458         (WebCore::InspectorCSSAgent::reset):
459         (WebCore::InspectorCSSAgent::documentDetached):
460         Handling for the new list of known document to CSSStyleSheets map.
461
462         (WebCore::InspectorCSSAgent::enable):
463         When the CSS domain is enabled, tell the frontend about known stylesheets.
464
465         (WebCore::InspectorCSSAgent::activeStyleSheetsUpdated):
466         (WebCore::InspectorCSSAgent::setActiveStyleSheetsForDocument):
467         Diff the old list of known stylesheets to the new list of stylesheets
468         for an individual document. Then send appropriate added/removed events.
469
470         (WebCore::InspectorCSSAgent::collectAllStyleSheets):
471         (WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
472         (WebCore::InspectorCSSAgent::collectStyleSheets):
473         Collect stylesheets recursively. A stylesheet may link to other stylesheets
474         through @import statements.
475
476         (WebCore::InspectorCSSAgent::getAllStyleSheets):
477         Use the new methods, this command should go away as it will no longer be useful.
478
479         (WebCore::InspectorCSSAgent::unbindStyleSheet):
480         (WebCore::InspectorCSSAgent::bindStyleSheet):
481         Create an InspectorStyleSheet from a CSSStyleSheet and add to the appropriate lists.
482         Likewise, unbinding will remove from the appropriate lists.
483
484         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
485         (WebCore::InspectorCSSAgent::detectOrigin):
486         When creating the inspector stylesheet, which is a <style> element,
487         it will push a StyleSheetAdded event. In the process of binding this
488         new stylesheet use the m_creatingViaInspectorStyleSheet to add it to
489         out list of Inspector Stylesheets.
490
491 2015-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
492
493         Add comment to LocaleToScriptMappingDefault.cpp
494         <rdar://problem/22407296>
495
496         Unreviewed.
497
498         We currently map lang="zh" to USCRIPT_SIMPLIFIED_HAN, which is incorrect.
499         Instead, we should consult with an external source, such as the user's
500         language preferences.
501
502         * platform/text/LocaleToScriptMappingDefault.cpp:
503
504 2015-08-26  Chris Dumez  <cdumez@apple.com>
505
506         Distinguish Web IDL callback interfaces from Web IDL callback functions
507         https://bugs.webkit.org/show_bug.cgi?id=148434
508
509         Reviewed by Geoffrey Garen.
510
511         Distinguish Web IDL callback interfaces [1] from Web IDL callback
512         functions [2].
513
514         One Web-exposed difference is that when using a callback interface,
515         the user can pass either a function / callable object or a non-callable
516         object that has a method with the same name as the callback interface
517         operation:
518         https://heycam.github.io/webidl/#es-user-objects
519
520         When using a callback function, the user needs to pass a function /
521         callable object:
522         https://heycam.github.io/webidl/#es-callback-function
523
524         This patch adds a new [Callback=FunctionOnly] IDL extended attribute to
525         indicate that a callback interface should be function-only (i.e. a callback
526         function in the latest Web IDL specification). Without this IDL extended
527         attribute, the callback interface will be treated as a regular callback
528         interface. This will be needed for Bug 148415, as NodeFilter should be
529         an actual callback interface.
530
531         Note that longer term, we should really drop the old-style
532         [Callback=FunctionOnly] extendd attribute and use actual IDL callback
533         functions as per the latest Web IDL specification. However, I did not
534         do this in this patch to minimize patch size.
535
536         This patch adds Callback=FunctionOnly] IDL extended attribute to all
537         our pre-existing callback interfaces so that there is no behavior
538         change.
539
540        [1] https://heycam.github.io/webidl/#dfn-callback-interface
541        [2] https://heycam.github.io/webidl/#idl-callback-functions
542
543         * Modules/geolocation/PositionCallback.idl:
544         * Modules/geolocation/PositionErrorCallback.idl:
545         * Modules/mediastream/MediaStreamTrackSourcesCallback.idl:
546         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
547         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
548         * Modules/mediastream/RTCPeerConnectionErrorCallback.idl:
549         * Modules/mediastream/RTCSessionDescriptionCallback.idl:
550         * Modules/mediastream/RTCStatsCallback.idl:
551         * Modules/notifications/NotificationPermissionCallback.idl:
552         * Modules/quota/StorageErrorCallback.idl:
553         * Modules/quota/StorageQuotaCallback.idl:
554         * Modules/quota/StorageUsageCallback.idl:
555         * Modules/webaudio/AudioBufferCallback.idl:
556         * Modules/webdatabase/DatabaseCallback.idl:
557         * Modules/webdatabase/SQLStatementCallback.idl:
558         * Modules/webdatabase/SQLStatementErrorCallback.idl:
559         * Modules/webdatabase/SQLTransactionCallback.idl:
560         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
561         * bindings/js/JSCallbackData.cpp:
562         (WebCore::JSCallbackData::invokeCallback):
563         * bindings/js/JSCallbackData.h:
564         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
565         (WebCore::JSSQLStatementErrorCallback::handleEvent):
566         * bindings/scripts/CodeGenerator.pm:
567         (trim):
568         (IsFunctionOnlyCallbackInterface):
569         * bindings/scripts/CodeGeneratorJS.pm:
570         (GenerateParametersCheckExpression):
571         (GenerateParametersCheck):
572         (GenerateCallbackImplementation):
573         * bindings/scripts/IDLAttributes.txt:
574         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp: Added.
575         (WebKit::kit):
576         (WebKit::core):
577         (WebKit::wrapTestCallbackFunction):
578         (webkit_dom_test_callback_function_finalize):
579         (webkit_dom_test_callback_function_constructor):
580         (webkit_dom_test_callback_function_class_init):
581         (webkit_dom_test_callback_function_init):
582         (webkit_dom_test_callback_function_callback_with_no_param):
583         (webkit_dom_test_callback_function_callback_with_array_param):
584         (webkit_dom_test_callback_function_callback_with_serialized_script_value_param):
585         (webkit_dom_test_callback_function_callback_with_non_bool_return_type):
586         (webkit_dom_test_callback_function_callback_with_string_list):
587         (webkit_dom_test_callback_function_callback_with_boolean):
588         (webkit_dom_test_callback_function_callback_requires_this_to_pass):
589         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h: Added.
590         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h: Copied from Source/WebCore/css/MediaQueryListListener.idl.
591         * bindings/scripts/test/JS/JSTestCallback.cpp:
592         (WebCore::JSTestCallback::callbackWithNoParam):
593         (WebCore::JSTestCallback::callbackWithArrayParam):
594         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
595         (WebCore::JSTestCallback::callbackWithStringList):
596         (WebCore::JSTestCallback::callbackWithBoolean):
597         (WebCore::JSTestCallback::callbackRequiresThisToPass):
598         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
599         (WebCore::JSTestCallbackFunction::JSTestCallbackFunction):
600         (WebCore::JSTestCallbackFunction::~JSTestCallbackFunction):
601         (WebCore::JSTestCallbackFunction::callbackWithNoParam):
602         (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
603         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
604         (WebCore::JSTestCallbackFunction::callbackWithStringList):
605         (WebCore::JSTestCallbackFunction::callbackWithBoolean):
606         (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
607         * bindings/scripts/test/JS/JSTestCallbackFunction.h: Added.
608         (WebCore::JSTestCallbackFunction::create):
609         (WebCore::JSTestCallbackFunction::scriptExecutionContext):
610         * bindings/scripts/test/JS/JSTestObj.cpp:
611         (WebCore::JSTestObjConstructor::constructJSTestObj):
612         (WebCore::JSTestObjConstructor::finishCreation):
613         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
614         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
615         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
616         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
617         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
618         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
619         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
620         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
621         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
622         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
623         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): Deleted.
624         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): Deleted.
625         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
626         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
627         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Copied from Source/WebCore/html/VoidCallback.idl.
628         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Added.
629         (-[DOMTestCallbackFunction dealloc]):
630         (-[DOMTestCallbackFunction finalize]):
631         (-[DOMTestCallbackFunction callbackWithNoParam]):
632         (-[DOMTestCallbackFunction callbackWithArrayParam:]):
633         (-[DOMTestCallbackFunction callbackWithSerializedScriptValueParam:strArg:]):
634         (-[DOMTestCallbackFunction callbackWithNonBoolReturnType:]):
635         (-[DOMTestCallbackFunction customCallback:class6Param:]):
636         (-[DOMTestCallbackFunction callbackWithStringList:]):
637         (-[DOMTestCallbackFunction callbackWithBoolean:]):
638         (-[DOMTestCallbackFunction callbackRequiresThisToPass:testNodeParam:]):
639         (core):
640         (kit):
641         * bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Copied from Source/WebCore/html/VoidCallback.idl.
642         * bindings/scripts/test/TestCallbackFunction.idl: Copied from Source/WebCore/Modules/webdatabase/DatabaseCallback.idl.
643         * bindings/scripts/test/TestObj.idl:
644         * css/MediaQueryListListener.idl:
645         * dom/RequestAnimationFrameCallback.idl:
646         * dom/StringCallback.idl:
647         * html/VoidCallback.idl:
648
649 2015-08-26  Beth Dakin  <bdakin@apple.com>
650
651         REGRESSION: Safari navigates after a cancelled force click
652         https://bugs.webkit.org/show_bug.cgi?id=148491
653         -and corresponding-
654         rdar://problem/22394323
655
656         Reviewed by Tim Horton.
657
658         This regression was introduced on El Capitan because AppKit sends ‘cancel’ to 
659         gesture recognizer BEFORE it sends the mouseUp. So the ImmediateActionStage needs 
660         to track whether a cancel happened after updates or without any updates since they 
661         signify different things. 
662
663         Don’t perform default behaviors when the stage is ActionCancelledAfterUpdate.
664         * page/EventHandler.cpp:
665         (WebCore::EventHandler::handleMouseReleaseEvent):
666
667         New possible stages, and new getter for the current stage.
668         * page/EventHandler.h:
669         (WebCore::EventHandler::immediateActionStage):
670
671 2015-08-26  Anders Carlsson  <andersca@apple.com>
672
673         Fix failing tests.
674
675         Add fallback code for the case when iterations is 0.
676
677         * platform/graphics/filters/FEConvolveMatrix.cpp:
678         (WebCore::FEConvolveMatrix::platformApplySoftware):
679
680 2015-08-26  Anders Carlsson  <andersca@apple.com>
681
682         Use WorkQueue::concurrentApply in FEConvolveMatrix
683         https://bugs.webkit.org/show_bug.cgi?id=148490
684
685         Reviewed by Tim Horton.
686
687         Using WorkQueue::concurrentApply lets us simplify the code a lot, and measurements show
688         no difference in performance. The striding has been slightly tweaked to make more sense
689         (we no longer divide up the remainder across some of the iterations, instead we just process 
690         it separately last).
691
692         * platform/graphics/filters/FEConvolveMatrix.cpp:
693         (WebCore::FEConvolveMatrix::platformApplySoftware):
694         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker): Deleted.
695         * platform/graphics/filters/FEConvolveMatrix.h:
696
697 2015-08-26  Eric Carlson  <eric.carlson@apple.com>
698
699         Media Session: make MediaSessionMetadata a class
700         https://bugs.webkit.org/show_bug.cgi?id=148486
701
702         Reviewed by Jer Noble.
703
704         No new tests, no observable changes.
705
706         * Modules/mediasession/MediaSessionMetadata.h: Make it a class.
707         * page/ChromeClient.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
708
709 2015-08-26  Per Arne Vollan  <peavo@outlook.com>
710
711         [Curl] Deadlock when downloading.
712         https://bugs.webkit.org/show_bug.cgi?id=148438
713
714         Reviewed by Alex Christensen.
715
716         A thread should not try locking when it already has got the lock,
717         this will create a deadlock.
718
719         * platform/network/curl/CurlDownload.cpp:
720         (WebCore::CurlDownloadManager::startThreadIfNeeded):
721         (WebCore::CurlDownloadManager::stopThread):
722         (WebCore::CurlDownloadManager::stopThreadIfIdle):
723         (WebCore::CurlDownload::~CurlDownload):
724         (WebCore::CurlDownload::moveFileToDestination):
725         (WebCore::CurlDownload::didFail):
726         * platform/network/curl/CurlDownload.h:
727         (WebCore::CurlDownloadManager::getMultiHandle):
728         (WebCore::CurlDownloadManager::runThread):
729         (WebCore::CurlDownloadManager::setRunThread):
730
731 2015-08-26  Jinyoung Hur  <hur.ims@navercorp.com>
732
733         [Cairo] Accelerated canvas should fall back to non-accelerated canvas on creation failure
734         https://bugs.webkit.org/show_bug.cgi?id=148476
735
736         Reviewed by Brent Fulgham.
737
738         Cairo-gl backed surface might fail to be created with large dimensions, e.g., 50x32000, depending on 
739         the gl implementations. In case of Mac port, ImageBufferCG falls back to a software surface when it fails to create
740         IOSurface, an accelerated surface. Though the unaccelerated surface could be slower, it would be better
741         to create a working surface than nothing.
742
743         Because the max dimensions of gl texture might vary among the OpenGL implementations, below test can't guarantee
744         the verification of behavior difference depending on the running platform.
745
746         Test: fast/canvas/canvas-large-dimensions.html
747
748         * platform/graphics/cairo/ImageBufferCairo.cpp:
749         (WebCore::ImageBuffer::ImageBuffer):
750
751 2015-08-26  Commit Queue  <commit-queue@webkit.org>
752
753         Unreviewed, rolling out r188960.
754         https://bugs.webkit.org/show_bug.cgi?id=148479
755
756         Broke all the tests (Requested by ap on #webkit).
757
758         Reverted changeset:
759
760         "Add some new emoji with modifiers and new sequence."
761         https://bugs.webkit.org/show_bug.cgi?id=148202
762         http://trac.webkit.org/changeset/188960
763
764 2015-08-25  Philippe Normand  <pnormand@igalia.com>
765
766         [GStreamer] "method" property for the webkitwebsrc element
767         https://bugs.webkit.org/show_bug.cgi?id=148433
768
769         Reviewed by Carlos Garcia Campos.
770
771         This new property is sometimes used by the GStreamer uridownloader
772         when time synchronization is required for DASH. The same property
773         was added to the souphttpsrc element.
774
775         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
776         (webKitWebSrcSetProperty):
777         (webKitWebSrcGetProperty):
778         (webKitWebSrcStart):
779
780 2015-08-26  Enrica Casucci  <enrica@apple.com>
781
782         Add some new emoji with modifiers and new sequence.
783         https://bugs.webkit.org/show_bug.cgi?id=148202
784         rdar://problem/21849857
785
786         Reviewed by Sam Weinig.
787
788         Adding support for some new emoji with modifiers and
789         one new emoji sequence.
790
791         * platform/graphics/FontCascade.cpp:
792         (WebCore::FontCascade::characterRangeCodePath):
793         * platform/text/CharacterProperties.h:
794         (WebCore::isEmojiGroupCandidate):
795         (WebCore::isEmojiModifier):
796         * platform/text/TextBreakIterator.cpp:
797         (WebCore::cursorMovementIterator):
798
799 2015-08-25  Nan Wang  <n_wang@apple.com>
800
801         AX: Enable accessibility/aria-controls.html test for mac
802         https://bugs.webkit.org/show_bug.cgi?id=148458
803
804         Reviewed by Chris Fleizach.
805
806         Re-enabled accessibility/aria-controls.html test for mac.
807
808         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
809         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
810
811 2015-08-25  Zalan Bujtas  <zalan@apple.com>
812
813         Using the filter functional notation for background images results in wrong background-size rendering
814         https://bugs.webkit.org/show_bug.cgi?id=148221
815         rdar://problem/22379518
816
817         Reviewed by Daniel Bates.
818
819         Do not ignore the size argument, when the filter image is being drawn onto the context.
820         When the size is ignored, we end up painting the image with its native size while the filter
821         is applied on the size of the generated image.
822
823         Test: fast/filter-image/background-filter-image.html
824
825         * css/CSSFilterImageValue.cpp:
826         (WebCore::CSSFilterImageValue::image):
827
828 2015-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
829
830         IconDatabase: syncThreadMainLoop() is unlocking m_syncLock twice when thread termination is requested
831         https://bugs.webkit.org/show_bug.cgi?id=148429
832
833         Reviewed by Filip Pizlo.
834
835         The lock is released an locked on every loop iteration, and then
836         unlocked again after the loop. There's an early break in the loop
837         when thread termination is requested that happens after the lock
838         is released but before is locked again, so that the unlock after
839         the loop is trying to unlock the lock again. This was not a
840         problem before, but the new Lock has an assertion to ensure that a
841         lock is not released twice.
842
843         * loader/icon/IconDatabase.cpp:
844         (WebCore::IconDatabase::syncThreadMainLoop): Clean up the thread
845         and return instead of breaking the loop when thread termination is
846         requested.
847
848 2015-08-25  Nan Wang  <n_wang@apple.com>
849
850         [Mac] accessibility/document-attributes.html fails
851         https://bugs.webkit.org/show_bug.cgi?id=116636
852
853         Reviewed by Chris Fleizach.
854
855         Re-enabled accessibility/document-attributes.html test.
856
857         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
858         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
859
860 2015-08-25  Csaba Osztrogonác  <ossy@webkit.org>
861
862         Fix the !ENABLE(VIDEO) build after r188693
863         https://bugs.webkit.org/show_bug.cgi?id=148424
864
865         Reviewed by Tim Horton.
866
867         * page/ChromeClient.h:
868
869 2015-08-25  Eric Carlson  <eric.carlson@apple.com>
870
871         [iOS] Don't clear AVPlayerItem when pausing if AirPlay is active
872         https://bugs.webkit.org/show_bug.cgi?id=148319
873
874         Reviewed by Jer Noble.
875
876         * html/HTMLMediaElement.cpp:
877         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible): Do nothing if the session
878           is allowed to load data when in the background and we are not under memory pressure.
879
880         * platform/audio/ios/MediaSessionManagerIOS.mm:
881         (WebCore::MediaSessionManageriOS::sessionCanLoadMedia): Call base class.
882
883 2015-08-25  Csaba Osztrogonác  <ossy@webkit.org>
884
885         Fix the !ENABLE(CSS_REGIONS) build after r188663
886         https://bugs.webkit.org/show_bug.cgi?id=148425
887
888         Reviewed by Chris Dumez.
889
890         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
891
892 2015-08-24  Brent Fulgham  <bfulgham@apple.com>
893
894         Wheel events stop propagating when target element is removed from DOM
895         https://bugs.webkit.org/show_bug.cgi?id=148384
896         <rdar://problem/19732211>
897
898         Reviewed by David Hyatt.
899
900         Tested by tiled-drawing/scrolling/latched-to-deleted-node.html
901
902         We need to reset our latching state if the targeted node is removed from the DOM.
903         Add a check in 'platformPrepareForWheelEvents' that checks if the expected latching
904         target node was already removed from the DOM. If it was, we should not send events
905         to it, and should reset latching state so we can attach to the next relevant node.
906
907         * dom/Element.cpp:
908         (WebCore::Element::removedFrom): Remove any latched wheel event state objects that
909         match the current element.
910         * page/MainFrame.cpp:
911         (WebCore::MainFrame::removeLatchingStateForTarget): Remove any latched wheel event
912         state structures that match the passed wheel event target.
913         * page/MainFrame.h:
914
915 2015-08-25  Wenson Hsieh  <wenson_hsieh@apple.com>
916
917         Fix crash due to search field disappearing when showing results menu
918         https://bugs.webkit.org/show_bug.cgi?id=148410
919         <rdar://problem/22399850>
920
921         Reviewed by Brent Fulgham.
922
923         When clicking on the results button of a search field that hides upon being focused, WebKit will crash because we
924         attempt to toggle the results menu using the search field's renderer which is null. This is addressed by adding a null
925         check to make sure the search field has not been hidden before toggling the menu.
926
927         Test: fast/forms/search/search-results-hidden-crash.html
928
929         * html/shadow/TextControlInnerElements.cpp:
930         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Add a null check for the search field's renderer.
931
932 2015-08-25  Chris Dumez  <cdumez@apple.com>
933
934         compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
935         https://bugs.webkit.org/show_bug.cgi?id=119316
936
937         Reviewed by Darin Adler.
938
939         As the latest DOM specification, compareDocumentPosition() should report
940         PRECEDING or FOLLOWING information even if nodes are disconnected:
941         - http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
942
943         This behavior is consistent with both IE10, Firefox and Chrome.
944
945         The implementation relies on the comparison of cryptographic hashes
946         (SHA1) of the Node pointers so that the results returned by the function
947         are consistent. We don't compare Node pointers directly as it was done
948         previously in r153660 to avoid leaking information about our memory
949         model to the Web.
950
951         Test: fast/dom/compare-document-position-disconnected-nodes.html
952         W3C Test suite: http://w3c-test.org/dom/nodes/Node-compareDocumentPosition.html
953
954         * dom/Node.cpp:
955         (WebCore::hashPointer):
956         (WebCore::compareDetachedElementsPosition):
957         (WebCore::Node::compareDocumentPosition):
958
959 2015-08-25  Chris Dumez  <cdumez@apple.com>
960
961         Add support for callback interfaces using other callback names than "handleEvent"
962         https://bugs.webkit.org/show_bug.cgi?id=148418
963
964         Reviewed by Ryosuke Niwa.
965
966         Add support for callback interfaces using other callback names than
967         "handleEvent" [1].
968
969         This is a pre-requirement for Bug 148415, as NodeFilter's callback
970         function name is "acceptNode":
971         - https://dom.spec.whatwg.org/#interface-nodefilter
972
973         [1] https://heycam.github.io/webidl/#es-user-objects
974
975         * bindings/js/JSCallbackData.cpp:
976         (WebCore::JSCallbackData::invokeCallback):
977         * bindings/js/JSCallbackData.h:
978         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
979         (WebCore::JSSQLStatementErrorCallback::handleEvent):
980         * bindings/scripts/CodeGeneratorJS.pm:
981         (GenerateCallbackImplementation):
982         * bindings/scripts/test/JS/JSTestCallback.cpp:
983         (WebCore::JSTestCallback::callbackWithNoParam):
984         (WebCore::JSTestCallback::callbackWithArrayParam):
985         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
986         (WebCore::JSTestCallback::callbackWithStringList):
987         (WebCore::JSTestCallback::callbackWithBoolean):
988         (WebCore::JSTestCallback::callbackRequiresThisToPass):
989
990 2015-08-25  Chris Dumez  <cdumez@apple.com>
991
992         Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
993         https://bugs.webkit.org/show_bug.cgi?id=148417
994
995         Reviewed by Sam Weinig.
996
997         Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
998         by improving the bindings generator. In this case, the problem was that the
999         bindings generator did not know how to convert a double parameter into a
1000         JSValue. The new code leverages the pre-existing NativeToJSValue subroutine
1001         to do the conversion instead of duplicating complex support here.
1002
1003         * WebCore.xcodeproj/project.pbxproj:
1004         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: Removed.
1005         * bindings/scripts/CodeGeneratorJS.pm:
1006         (GenerateCallbackImplementation):
1007         * bindings/scripts/test/JS/JSTestCallback.cpp:
1008         (WebCore::JSTestCallback::callbackWithArrayParam):
1009         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
1010         (WebCore::JSTestCallback::callbackWithStringList):
1011         (WebCore::JSTestCallback::callbackWithBoolean):
1012         (WebCore::JSTestCallback::callbackRequiresThisToPass):
1013         * dom/RequestAnimationFrameCallback.idl:
1014
1015 2015-08-24  Jinyoung Hur  <hur.ims@navercorp.com>
1016
1017         Clear cairo-gl surface for initialization
1018         https://bugs.webkit.org/show_bug.cgi?id=148307
1019
1020         Reviewed by Martin Robinson.
1021
1022         A cairo-gl surface that is created from an uninitialized texture, should be cleared before use.
1023         A texture memory created by calling glTexImage2D with null data parameter, is uninitialized.
1024         And cairo_gl_surface_create_for_texture doesn't clear the provided texture for initialization.
1025         So it seems safe to clear the surface explicitly.
1026
1027         It is hard to verify this behavior change because the texture memory status is undefined. Undefined means
1028         it can be either initialized or not, though mostly initialized in my experiences.
1029
1030         * platform/graphics/cairo/ImageBufferCairo.cpp:
1031         (WebCore::clearSurface):
1032         (WebCore::createCairoGLSurface):
1033
1034 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
1035
1036         Fix the build fixes in r188875 and r188874
1037
1038         Unreviewed.
1039
1040         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1041         (WebCore::FontCache::createFontPlatformData):
1042         * platform/graphics/mac/FontCacheMac.mm:
1043         (WebCore::toNSFontTraits):
1044
1045 2015-08-24  Tim Horton  <timothy_horton@apple.com>
1046
1047         Try to fix the build.
1048
1049         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1050         (WebCore::FontCache::createFontPlatformData):
1051
1052 2015-08-24  Tim Horton  <timothy_horton@apple.com>
1053
1054         Fix the build.
1055
1056         * platform/graphics/mac/FontCacheMac.mm:
1057         (WebCore::toNSFontWeight):
1058         (WebCore::toNSFontTraits):
1059         (WebCore::platformFontWithFamilySpecialCase):
1060
1061 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
1062
1063         Use Optionals in RenderBox height computations
1064         https://bugs.webkit.org/show_bug.cgi?id=147253
1065
1066         Reviewed by David Hyatt.
1067
1068         No new tests because there is no behavior change.
1069
1070         * rendering/RenderBox.cpp:
1071         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
1072         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
1073         (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth):
1074         (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight):
1075         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
1076         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
1077         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
1078         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
1079         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
1080         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
1081         (WebCore::RenderBox::computeLogicalHeight):
1082         (WebCore::RenderBox::computeLogicalHeightUsing):
1083         (WebCore::RenderBox::computeContentLogicalHeight):
1084         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
1085         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1086         (WebCore::RenderBox::computePercentageLogicalHeight):
1087         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1088         (WebCore::RenderBox::availableLogicalHeight):
1089         (WebCore::RenderBox::availableLogicalHeightUsing):
1090         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1091         (WebCore::logicalWidthIsResolvable):
1092         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
1093         (WebCore::RenderBox::hasDefiniteLogicalHeight):
1094         * rendering/RenderBox.h:
1095         * rendering/RenderFlexibleBox.cpp:
1096         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1097         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
1098         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1099         * rendering/RenderFlexibleBox.h:
1100         * rendering/RenderFlowThread.cpp:
1101         (WebCore::RenderFlowThread::addForcedRegionBreak):
1102         * rendering/RenderGrid.cpp:
1103         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1104         (WebCore::RenderGrid::logicalContentHeightForChild):
1105         (WebCore::RenderGrid::minContentForChild):
1106         (WebCore::RenderGrid::maxContentForChild):
1107         (WebCore::RenderGrid::layoutGridItems):
1108         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1109         * rendering/RenderMultiColumnSet.cpp:
1110         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
1111         * rendering/RenderTable.cpp:
1112         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1113
1114 2015-08-24  Anders Carlsson  <andersca@apple.com>
1115
1116         Fix failing tests.
1117         
1118         It's OK to call runStateMachine with an idle state. Just bail early when that happens.
1119
1120         * Modules/webdatabase/SQLTransactionStateMachine.h:
1121         (WebCore::SQLTransactionStateMachine<T>::runStateMachine):
1122
1123 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
1124
1125         [Cocoa] Unify FontCache
1126         https://bugs.webkit.org/show_bug.cgi?id=148358
1127
1128         Reviewed by Antti Koivisto.
1129
1130         Move all the duplicate code to FontCacheCoreText.
1131
1132         No new tests because there is no behavior change.
1133
1134         * platform/graphics/FontCache.h:
1135         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1136         (WebCore::fontWeightFromCoreText):
1137         (WebCore::toTraitsMask):
1138         (WebCore::isFontWeightBold):
1139         (WebCore::toCoreTextFontWeight):
1140         (WebCore::invalidateFontCache):
1141         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
1142         (WebCore::FontCache::platformInit):
1143         (WebCore::FontCache::systemFontFamilies):
1144         (WebCore::computeTraits):
1145         (WebCore::computeNecessarySynthesis):
1146         (WebCore::fontWhitelist):
1147         (WebCore::FontCache::setFontWhitelist):
1148         (WebCore::platformFontLookupWithFamily):
1149         (WebCore::fontWithFamily):
1150         (WebCore::shouldAutoActivateFontIfNeeded):
1151         (WebCore::FontCache::createFontPlatformData):
1152         (WebCore::fallbackDedupSet):
1153         (WebCore::FontCache::platformPurgeInactiveFontData):
1154         (WebCore::FontCache::systemFallbackForCharacters):
1155         * platform/graphics/ios/FontCacheIOS.mm:
1156         (WebCore::platformInvalidateFontCache):
1157         (WebCore::getSystemFontFallbackForCharacters):
1158         (WebCore::platformLookupFallbackFont):
1159         (WebCore::FontCache::lastResortFallbackFont):
1160         (WebCore::FontCache::weightOfCTFont):
1161         (WebCore::platformFontWithFamilySpecialCase):
1162         (WebCore::FontCache::platformInit): Deleted.
1163         (WebCore::isFontWeightBold): Deleted.
1164         (WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
1165         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
1166         (WebCore::FontCache::systemFontFamilies): Deleted.
1167         (WebCore::createCTFontWithTextStyle): Deleted.
1168         (WebCore::createCTFontWithFamilyNameAndWeight): Deleted.
1169         (WebCore::toCTFontWeight): Deleted.
1170         (WebCore::FontCache::createFontPlatformData): Deleted.
1171         * platform/graphics/mac/FontCacheMac.mm:
1172         (WebCore::appkitWeightToFontWeight):
1173         (WebCore::toNSFontTraits):
1174         (WebCore::platformFontWithFamilySpecialCase):
1175         (WebCore::platformFontWithFamily):
1176         (WebCore::platformInvalidateFontCache):
1177         (WebCore::platformLookupFallbackFont):
1178         (WebCore::FontCache::lastResortFallbackFont):
1179         (WebCore::toCoreTextFontWeight): Deleted.
1180         (WebCore::fontWhitelist): Deleted.
1181         (WebCore::FontCache::setFontWhitelist): Deleted.
1182         (WebCore::fontWithFamilySpecialCase): Deleted.
1183         (WebCore::fontWithFamily): Deleted.
1184         (WebCore::invalidateFontCache): Deleted.
1185         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Deleted.
1186         (WebCore::FontCache::platformInit): Deleted.
1187         (WebCore::isAppKitFontWeightBold): Deleted.
1188         (WebCore::shouldAutoActivateFontIfNeeded): Deleted.
1189         (WebCore::fallbackDedupSet): Deleted.
1190         (WebCore::FontCache::platformPurgeInactiveFontData): Deleted.
1191         (WebCore::lookupCTFont): Deleted.
1192         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
1193         (WebCore::FontCache::systemFontFamilies): Deleted.
1194         (WebCore::FontCache::createFontPlatformData): Deleted.
1195         * rendering/RenderThemeIOS.mm:
1196         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1197         (WebCore::fromCTFontWeight): Deleted.
1198
1199 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1200
1201         Unreviewed, attempt to fix iOS build after r188860
1202
1203         * page/WheelEventDeltaFilter.cpp:
1204         (WebCore::WheelEventDeltaFilter::isFilteringDeltas): Moved implementation out of header.
1205         (WebCore::WheelEventDeltaFilter::filteredDelta): Moved implementation out of header.
1206         * page/WheelEventDeltaFilter.h:
1207         (WebCore::WheelEventDeltaFilter::isFilteringDeltas): Deleted.
1208         (WebCore::WheelEventDeltaFilter::filteredDelta): Deleted.
1209
1210 2015-08-21  Anders Carlsson  <andersca@apple.com>
1211
1212         Remove unused return values from SQLTransaction state functions
1213         https://bugs.webkit.org/show_bug.cgi?id=148344
1214
1215         Reviewed by Tim Horton.
1216
1217         * Modules/webdatabase/SQLTransaction.cpp:
1218         (WebCore::SQLTransaction::deliverTransactionCallback):
1219         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
1220         (WebCore::SQLTransaction::deliverStatementCallback):
1221         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
1222         (WebCore::SQLTransaction::deliverSuccessCallback):
1223         (WebCore::SQLTransaction::unreachableState):
1224         * Modules/webdatabase/SQLTransaction.h:
1225         * Modules/webdatabase/SQLTransactionBackend.cpp:
1226         (WebCore::SQLTransactionBackend::acquireLock):
1227         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1228         (WebCore::SQLTransactionBackend::runStatements):
1229         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
1230         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
1231         (WebCore::SQLTransactionBackend::unreachableState):
1232         * Modules/webdatabase/SQLTransactionBackend.h:
1233         * Modules/webdatabase/SQLTransactionStateMachine.h:
1234         (WebCore::SQLTransactionStateMachine<T>::runStateMachine):
1235
1236 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1237
1238         Unreviewed, fix build after r188860
1239
1240         * page/mac/WheelEventDeltaFilterMac.mm:
1241         (WebCore::WheelEventDeltaFilterMac::updateFromDelta): Convert argument explicitly to an NSPoint.
1242
1243 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1244
1245         Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
1246         https://bugs.webkit.org/show_bug.cgi?id=147320
1247
1248         Reviewed by Simon Fraser.
1249
1250         Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
1251         employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
1252         as a fallback. Here, we refactor EventHandler to use the new filters for overflow scrolling and replace
1253         the MainFrame's WheelEventDeltaTracker with an appropriate type of WheelEventDeltaFilter.
1254
1255         In the case where an _NSScrollingPredominantAxisFilter is unavailable, the platform-invariant wheel
1256         event delta filter simply uses the existing wheel event delta tracker to compute the current predominant
1257         axis. It uses the predominant axis to determine which axis (if any) should have its delta zeroed out.
1258
1259         This patch also introduces NSScrollingInputFilterSPI.h, which either imports the internal input filter
1260         header from AppKit or declares relevant interfaces and functions.
1261
1262         No new tests, since this change does not add new functionality.
1263
1264         * CMakeLists.txt: Add page/WheelEventDeltaFilter.cpp.
1265         * WebCore.vcxproj/WebCore.vcxproj: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
1266         * WebCore.vcxproj/WebCore.vcxproj.filters: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
1267         * WebCore.xcodeproj/project.pbxproj: Add WheelEventDeltaFilter.cpp, WheelEventDeltaFilter.h, and their Mac counterparts.
1268         * page/EventHandler.cpp:
1269         (WebCore::didScrollInScrollableArea): Refactored to no longer handle axes separately.
1270         (WebCore::handleWheelEventInAppropriateEnclosingBox): Ditto.
1271         (WebCore::EventHandler::platformRecordWheelEvent): Refactored to update the wheel delta filter.
1272         (WebCore::EventHandler::clearLatchedState): Ditto.
1273         (WebCore::EventHandler::defaultWheelEventHandler): Refactored to use wheel delta filters. No longer splits wheel events
1274                 and handles them on separate axes.
1275         (WebCore::didScrollInScrollableAreaForSingleAxis): Deleted.
1276         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Deleted.
1277         * page/EventHandler.h:
1278         * page/MainFrame.cpp:
1279         (WebCore::MainFrame::MainFrame): Initializes the appropriate type of WheelEventDeltaFilter.
1280         * page/MainFrame.h:
1281         * page/WheelEventDeltaFilter.cpp: Added.
1282         (WebCore::WheelEventDeltaFilter::WheelEventDeltaFilter):
1283         (WebCore::WheelEventDeltaFilter::~WheelEventDeltaFilter):
1284         (WebCore::WheelEventDeltaFilter::create):
1285         (WebCore::BasicWheelEventDeltaFilter::BasicWheelEventDeltaFilter):
1286         (WebCore::BasicWheelEventDeltaFilter::updateFromDelta):
1287         (WebCore::BasicWheelEventDeltaFilter::beginFilteringDeltas):
1288         (WebCore::BasicWheelEventDeltaFilter::endFilteringDeltas):
1289         (WebCore::deltaIsPredominantlyVertical):
1290         (WebCore::BasicWheelEventDeltaFilter::dominantScrollGestureDirection):
1291         * page/WheelEventDeltaFilter.h: Refactored WheelEventDeltaTracker logic to work as a filter instead.
1292         * page/mac/EventHandlerMac.mm:
1293         (WebCore::EventHandler::platformPrepareForWheelEvents): Refactored to use wheel delta filters.
1294         (WebCore::EventHandler::platformRecordWheelEvent): Ditto.
1295         * page/mac/WheelEventDeltaFilterMac.h: Wraps the new _NSScrollingPredominantAxisFilter.
1296         * page/mac/WheelEventDeltaFilterMac.mm: Added.
1297         (WebCore::WheelEventDeltaFilterMac::WheelEventDeltaFilterMac):
1298         (WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
1299         (WebCore::WheelEventDeltaFilterMac::updateFromDelta):
1300         (WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):
1301         * platform/PlatformWheelEvent.h:
1302         (WebCore::PlatformWheelEvent::copyWithDeltas): Used to create a copy of the platform wheel event with filtered deltas.
1303         (WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta): Deleted. No longer necessary, since we won't be handling wheel
1304                 events on separate axes.
1305         (WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta): Ditto.
1306         * platform/spi/mac/NSScrollingInputFilterSPI.h: Added.
1307
1308 2015-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>
1309
1310         Unreviewed, fix typo in a comment ("unsused" -> "unused")
1311
1312         * bindings/scripts/CodeGeneratorGObject.pm:
1313         (GenerateFunction):
1314
1315 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1316
1317         Unreviewed. Fix cairo performance regression introduced in r188379.
1318
1319         A missing break in a switch was making us to use High image
1320         interpolation quality by default.
1321
1322         * platform/graphics/cairo/PlatformContextCairo.cpp:
1323         (WebCore::PlatformContextCairo::drawSurfaceToContext): Add the
1324         missing break.
1325
1326 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1327
1328         Unreviewed. Fix GObject DOM bindings API break test after r188809.
1329
1330         element.getElementsByTagName and element.getElementsByClassName
1331         were also changed in r188809 to return an HTMLCollection. The
1332         build didn't fail because we don't use those in our tests, but the
1333         API breaks need to be fixed too.
1334
1335         * bindings/gobject/WebKitDOMDeprecated.cpp:
1336         (webkit_dom_element_get_elements_by_tag_name):
1337         (webkit_dom_element_get_elements_by_tag_name_ns):
1338         (webkit_dom_element_get_elements_by_class_name):
1339         * bindings/gobject/WebKitDOMDeprecated.h:
1340         * bindings/gobject/WebKitDOMDeprecated.symbols:
1341         * bindings/gobject/webkitdom.symbols:
1342         * bindings/scripts/CodeGeneratorGObject.pm:
1343         (GetEffectiveFunctionName):
1344
1345 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1346
1347         Unreviewed. Fix GObject DOM bindings API break test after r188735.
1348
1349         document.getElementsByClassName returns an HTMLCollection since
1350         r188735. So, rename it as
1351         webkit_dom_document_get_elements_by_class_name_as_html_collection,
1352         and deprecate the old method returning a NodeList.
1353
1354         * bindings/gobject/WebKitDOMDeprecated.cpp:
1355         (webkit_dom_document_get_elements_by_class_name): Use the
1356         implementation returning a NodeList.
1357         * bindings/gobject/WebKitDOMDeprecated.h:
1358         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
1359         * bindings/gobject/webkitdom.symbols: Ditto.
1360         * bindings/scripts/CodeGeneratorGObject.pm:
1361         (GetEffectiveFunctionName): Also check getElementsByClassName.
1362
1363 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1364
1365         Unreviewed. Fix GTK+ build after r188711.
1366
1367         Since r188711 document.createNodeIterator and
1368         document.createTreeWalker, don't raise exceptions anymore. Keep
1369         the GError parameter even if it's ignored to not break the API
1370         compatibility.
1371
1372         * bindings/scripts/CodeGeneratorGObject.pm:
1373         (FunctionUsedToRaiseException):
1374         (GenerateFunction):
1375
1376 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1377
1378         Unreviewed. Fix GTK+ build after r188809.
1379
1380         document.getElementsByTagName returns an HTMLCollection since
1381         r188809. So, rename it as
1382         webkit_dom_document_get_elements_by_tag_name_as_html_collection,
1383         and deprecate the old methods returning a NodeList.
1384
1385         * bindings/gobject/WebKitDOMDeprecated.cpp:
1386         (webkit_dom_document_get_elements_by_tag_name): Use the
1387         implementation returning a NodeList.
1388         (webkit_dom_document_get_elements_by_tag_name_ns): Ditto.
1389         * bindings/gobject/WebKitDOMDeprecated.h:
1390         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
1391         * bindings/gobject/webkitdom.symbols: Ditto.
1392         * bindings/scripts/CodeGeneratorGObject.pm:
1393         (GetEffectiveFunctionName): Bring back this method, now that we
1394         have deprecated API again and add the checks for
1395         getElementsByTagName methods.
1396         (GenerateFunction): Use GetEffectiveFunctionName().
1397
1398 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
1399
1400         @font-face related cleanup
1401         https://bugs.webkit.org/show_bug.cgi?id=148355
1402
1403         Reviewed by Darin Adler.
1404
1405         This patch cleans up much of our code related to web fonts. In general, it
1406         migrates to using C++ for-each style loops, uses Ref instead of RefPtr when
1407         things can't be nullptr, migrates to C++ Rvalue-references instead of
1408         PassRefPtr, and refactors CSSFontSelector::addFontFaceRule() to use helper
1409         functions.
1410
1411         No new tests because there is no behavior change.
1412
1413         * css/CSSFontFace.cpp:
1414         (WebCore::CSSFontFace::fontLoaded): Use a C++ for-each loop.
1415         * css/CSSFontFace.h:
1416         (WebCore::CSSFontFace::create): Use C++ Rvalue-references instead of
1417         PassRefPtr.
1418         (WebCore::CSSFontFace::CSSFontFace): Ditto.
1419         * css/CSSFontSelector.cpp:
1420         (WebCore::computeTraitsMask): Migrated a chunk of
1421         CSSFontSelector::addFontFaceRule() into this helper function.
1422         (WebCore::createFontFace): Ditto.
1423         (WebCore::familyNameFromPrimitive): Ditto.
1424         (WebCore::CSSFontSelector::addFontFaceRule): Call the newly-created helper
1425         functions. In addition, migrate to Refs instead of RefPtrs.
1426         (WebCore::compareFontFaces): Migrate to references instead of pointers.
1427         (WebCore::CSSFontSelector::getFontFace): Migrate to Refs instead of
1428         RefPtrs. Also use C++ for-each loops.
1429         * css/CSSFontSelector.h:
1430         * css/CSSSegmentedFontFace.cpp:
1431         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace): Use C++ for-each
1432         loops.
1433         (WebCore::CSSSegmentedFontFace::isValid): Ditto.
1434         (WebCore::CSSSegmentedFontFace::appendFontFace): Migrate to Rvalue-
1435         references instead of PassRefPtr.
1436         * css/CSSSegmentedFontFace.h:
1437         * platform/graphics/FontCache.h:
1438         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1439         (WebCore::FontCache::getTraitsInFamily): Return the result instead of being
1440         passed an out parameter.
1441         * platform/graphics/freetype/FontCacheFreeType.cpp:
1442         (WebCore::FontCache::getTraitsInFamily): Ditto.
1443         * platform/graphics/win/FontCacheWin.cpp:
1444         (WebCore::traitsInFamilyEnumProc): Ditto.
1445         (WebCore::FontCache::getTraitsInFamily): Ditto.
1446
1447 2015-08-23  Andy Estes  <aestes@apple.com>
1448
1449         [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
1450         https://bugs.webkit.org/show_bug.cgi?id=147872
1451         rdar://problem/22044000
1452
1453         Reviewed by Dan Bernstein.
1454
1455         Passed the ResourceLoader request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
1456
1457         New API test: ContentFiltering.ServerRedirect
1458
1459         * WebCore.xcodeproj/project.pbxproj:
1460         * loader/EmptyClients.h:
1461         * loader/FrameLoaderClient.h: Added a URL argument to dispatchDidReceiveServerRedirectForProvisionalLoad().
1462         * loader/ResourceLoader.cpp:
1463         (WebCore::ResourceLoader::willSendRequestInternal): Passed the request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
1464         * testing/Internals.cpp:
1465         (WebCore::Internals::Internals): Stopped calling MockContentFilter::ensureInstalled().
1466         * testing/MockContentFilterSettings.cpp:
1467         (WebCore::MockContentFilterSettings::setEnabled): Called MockContentFilter::ensureInstalled() to ensure the
1468         mock is installed whenever the filter is enabled.
1469         * testing/MockContentFilterSettings.h: Exported member functions used by TestWebKitAPI.
1470
1471 2015-08-23  Geoffrey Garen  <ggaren@apple.com>
1472
1473         Unreviewed, rolling back in r188803.
1474
1475         "Debugger's VM should never be null"
1476         https://bugs.webkit.org/show_bug.cgi?id=148341
1477         http://trac.webkit.org/changeset/188803
1478
1479         * bindings/js/WorkerScriptDebugServer.cpp:
1480         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1481         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1482         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1483         * inspector/PageScriptDebugServer.cpp:
1484         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
1485         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1486         (WebCore::PageScriptDebugServer::didPause):
1487         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
1488
1489 2015-08-23  Antti Koivisto  <antti@apple.com>
1490
1491         Remove SVGFrameLoaderClient and dataProtocolFrameLoader
1492         https://bugs.webkit.org/show_bug.cgi?id=148370
1493
1494         Reviewed by Darin Adler.
1495
1496         With data protocol handled internally in WebKit these are no longer needed.
1497
1498         This mostly reverts code changes from http://trac.webkit.org/179626 keeping the tests.
1499
1500         * loader/FrameLoaderClient.h:
1501         * loader/ResourceLoader.cpp:
1502         (WebCore::ResourceLoader::loadDataURL):
1503         (WebCore::ResourceLoader::setDataBufferingPolicy):
1504         (WebCore::ResourceLoader::dataProtocolFrameLoader): Deleted.
1505         * loader/ResourceLoader.h:
1506         (WebCore::ResourceLoader::documentLoader):
1507         (WebCore::ResourceLoader::originalRequest):
1508         * loader/cache/CachedImage.cpp:
1509         (WebCore::CachedImage::finishLoading):
1510         * svg/graphics/SVGImage.cpp:
1511         (WebCore::SVGImage::dataChanged):
1512         * svg/graphics/SVGImage.h:
1513         * svg/graphics/SVGImageClients.h:
1514
1515 2015-08-22  Chris Dumez  <cdumez@apple.com>
1516
1517         NodeList should not have a named getter
1518         https://bugs.webkit.org/show_bug.cgi?id=148117
1519
1520         Reviewed by Darin Adler.
1521
1522         Drop the named property getter on NodeList to match the specification:
1523         https://dom.spec.whatwg.org/#interface-nodelist
1524
1525         This change could be a bit risky but:
1526         1. Firefox and IE never had this named property getter on NodeList.
1527         2. Chrome successfuly dropped this named property getter in early 2014:
1528            https://src.chromium.org/viewvc/blink?revision=166356&view=revision
1529         3. Our named property getter on NodeList is only partly functional:
1530            It only matches by 'id' attribute, not by 'name' attribute.
1531         4. Our APIs that were wrongly returning a NodeList instead of an
1532            HTMLCollection (getElementsByTagName() / getElementsByClassName())
1533            have been fixed in r188735 and r188809. HTMLCollection does have
1534            a named property getter.
1535         5. This named getter adds code complexity.
1536
1537         * bindings/js/JSNodeListCustom.cpp:
1538         (WebCore::createWrapper): Deleted.
1539         * dom/ChildNodeList.cpp:
1540         (WebCore::ChildNodeList::invalidateCache): Deleted.
1541         * dom/ChildNodeList.h:
1542         * dom/LiveNodeList.cpp:
1543         * dom/LiveNodeList.h:
1544         * dom/NodeList.h:
1545         * dom/NodeList.idl:
1546         * dom/StaticNodeList.cpp:
1547         (WebCore::StaticElementList::length): Deleted.
1548         (WebCore::StaticElementList::item): Deleted.
1549         * dom/StaticNodeList.h:
1550         * html/HTMLCollection.h:
1551
1552 2015-08-22  Andreas Kling  <akling@apple.com>
1553
1554         [JSC] Static hash tables should be 100% compile-time constant.
1555         <https://webkit.org/b/148359>
1556
1557         Reviewed by Michael Saboff.
1558
1559         Adjust WebCore bindings generator for new JSC::HashTable layout
1560         and rebaseline the bindings tests for that change.
1561
1562         * bindings/scripts/CodeGeneratorJS.pm:
1563         (GenerateHashTable):
1564         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1565         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1566         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1567         * bindings/scripts/test/JS/JSTestException.cpp:
1568         * bindings/scripts/test/JS/JSTestInterface.cpp:
1569         * bindings/scripts/test/JS/JSTestObj.cpp:
1570         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1571         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1572
1573 2015-08-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1574
1575         Unreviewed, fix build without ENABLE_CSS_GRID_LAYOUT after r188582
1576
1577         * rendering/RenderBox.cpp:
1578         (WebCore::RenderBox::computeLogicalWidthInRegion):
1579
1580 2015-08-22  Zalan Bujtas  <zalan@apple.com>
1581
1582         Page::renderTreeSize() does not include anonymous renderers.
1583         https://bugs.webkit.org/show_bug.cgi?id=148352
1584
1585         Reviewed by Andreas Kling.
1586
1587         Anonymous renderes take the document as their node. Instead
1588         of checking whether the node is the document, we could just check
1589         if the RenderView is available.
1590
1591         * rendering/RenderObject.cpp:
1592         (WebCore::RenderObject::RenderObject):
1593         (WebCore::RenderObject::~RenderObject):
1594         * rendering/RenderView.cpp:
1595         (WebCore::RenderView::RenderView): Deleted.
1596         * rendering/RenderView.h: Include the RenderView in render tree size as well.
1597
1598 2015-08-22  Antti Koivisto  <antti@apple.com>
1599
1600         Decode data URLs in web process
1601         https://bugs.webkit.org/show_bug.cgi?id=148128
1602
1603         Reviewed by Darin Adler.
1604
1605         We currenly send data URLs to networking layer for decoding. This involves a long and slow roundtrip through IPC and API layers.
1606
1607         * WebCore.xcodeproj/project.pbxproj:
1608         * loader/ResourceLoadScheduler.cpp:
1609         (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Deleted.
1610
1611             Remove this awkward interface for WebKit2.
1612
1613         * loader/ResourceLoadScheduler.h:
1614         * loader/ResourceLoader.cpp:
1615         (WebCore::ResourceLoader::start):
1616         (WebCore::ResourceLoader::loadDataURL):
1617
1618             Load using DataURLDecoder.
1619
1620         * loader/ResourceLoader.h:
1621
1622             Make start() public and export it so it can be called directly from WebKit2.
1623
1624         * platform/network/DataURLDecoder.cpp: Added.
1625         (WebCore::DataURLDecoder::decodeQueue):
1626         (WebCore::DataURLDecoder::DecodeTask::DecodeTask):
1627         (WebCore::DataURLDecoder::createDecodeTask):
1628
1629             Parse data URL metadata and initialize the decode task.
1630
1631         (WebCore::DataURLDecoder::decodeBase64):
1632         (WebCore::DataURLDecoder::decodeEscaped):
1633         (WebCore::DataURLDecoder::decode):
1634
1635             Asynchronously decode in a concurrent distpatch queue.
1636
1637         * platform/network/DataURLDecoder.h: Added.
1638         * platform/network/ios/QuickLook.h:
1639         * platform/text/DecodeEscapeSequences.h:
1640         (WebCore::URLEscapeSequence::findEndOfRun):
1641         (WebCore::URLEscapeSequence::decodeRun):
1642
1643             Factor buffer generation to a function.
1644
1645         (WebCore::decodeEscapeSequences):
1646         (WebCore::decodeURLEscapeSequencesAsData):
1647
1648             Add decode function that produces bytes instead of a String.
1649
1650 2015-08-21  Commit Queue  <commit-queue@webkit.org>
1651
1652         Unreviewed, rolling out r188792 and r188803.
1653         https://bugs.webkit.org/show_bug.cgi?id=148347
1654
1655         broke lots of tests, ggaren is going to investigate and reland
1656         (Requested by thorton on #webkit).
1657
1658         Reverted changesets:
1659
1660         "Unify code paths for manually deleting all code"
1661         https://bugs.webkit.org/show_bug.cgi?id=148280
1662         http://trac.webkit.org/changeset/188792
1663
1664         "Debugger's VM should never be null"
1665         https://bugs.webkit.org/show_bug.cgi?id=148341
1666         http://trac.webkit.org/changeset/188803
1667
1668 2015-08-21  Chris Dumez  <cdumez@apple.com>
1669
1670         document.getElementsByTagName should return an HTMLCollection
1671         https://bugs.webkit.org/show_bug.cgi?id=110611
1672
1673         Reviewed by Darin Adler.
1674
1675         Update getElementsByTagName*() to return an HTMLCollection as per
1676         the specification:
1677         - https://dom.spec.whatwg.org/#interface-document
1678         - https://dom.spec.whatwg.org/#interface-element
1679
1680         Firefox, Chrome and IE all match the specification but WebKit was
1681         returning a NodeList.
1682
1683         Performance:
1684         DOM/get-elements-by-tag-name-traversal-uncached.html is ~4.5% faster.
1685
1686         Test: fast/dom/getElementsByTagName-return-type.html
1687
1688         * CMakeLists.txt:
1689         * WebCore.vcxproj/WebCore.vcxproj:
1690         * WebCore.vcxproj/WebCore.vcxproj.filters:
1691         * WebCore.xcodeproj/project.pbxproj:
1692         Rename TagNodeList.* to TagCollection.*
1693
1694         * accessibility/AccessibilityRenderObject.cpp:
1695         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
1696         Update the function to use descendantsOfType<>() instead of
1697         getElementsByTagName(). The code is both shorter and more efficient.
1698
1699         * dom/ContainerNode.cpp:
1700         (WebCore::ContainerNode::getElementsByTagName):
1701         (WebCore::ContainerNode::getElementsByTagNameForObjC):
1702         (WebCore::ContainerNode::getElementsByTagNameNS):
1703         (WebCore::ContainerNode::getElementsByTagNameNSForObjC):
1704         * dom/ContainerNode.h:
1705         - Have getElementsByTagName*() return an HTMLCollection.
1706         - Introduce versions used by the ObjC bindings that return a NodeList
1707           for API compatibility reasons.
1708         - Move the localName null check to the *ForObjC versions and use a
1709           simple assertion for the non ObjC versions. This gets rid of a
1710           branch for our JS bindings as this function is hot. It is currently
1711           impossible to get a null AtomicString from our JS bindings code because
1712           getElementsByTagName() and getElementsByTagName(undefined) in JS end up
1713           calling ContainerNode::getElementsByTagName("undefined").
1714           Also getElementsByTagName(null) in JS ends up calling
1715           ContainerNode::getElementsByTagName("null"). I have also gotten rid of
1716           most of the getElementsByTagName() calls from our native code. The
1717           remaining ones either call with a non-null AtomicString and they now
1718           have a null-check.
1719
1720         * dom/Document.idl:
1721         * dom/Element.idl:
1722         Have getElementsByTagName*() return an HTMLCollection except for ObjC
1723         bindings in order to maintain legacy API compatibility.
1724
1725         * dom/Node.cpp:
1726         (WebCore::Document::invalidateNodeListAndCollectionCaches):
1727         (WebCore::NodeListsNodeData::invalidateCaches):
1728         HTMLCollection::invalidateCache(attr) is now renamed to
1729         invalidateCacheForAttribute(attr) to avoid ambiguity with
1730         HTMLCollection::invalidateCache(doc) and for consistency
1731         with LiveNodeList.
1732
1733         * dom/NodeRareData.h:
1734         Make necessary updates now that TagNodeList is renamed to TagCollection
1735         and is an HTMLCollection.
1736
1737         * dom/TagCollection.cpp: Renamed from Source/WebCore/dom/TagNodeList.cpp.
1738         * dom/TagCollection.h: Renamed from Source/WebCore/dom/TagNodeList.h.
1739         Rename TagNodeList / HTMLTagNodeList to TagCollection / HTMLTagCollection
1740         and inherit CachedHTMLCollection instead of CachedLiveNodeList.
1741
1742         * editing/Editor.cpp:
1743         (WebCore::Editor::applyEditingStyleToBodyElement):
1744         Update code using getElementsByTagName() to reflect the fact that it
1745         now returns an HTMLCollection and item() returns an Element*. This
1746         function is matching any Element with "body" tag, not just HTMLBodyElement
1747         so I did not refactor it to use an descendantsOfType<HTMLBodyElement>().
1748         It is not clear to me what the intention of this code is.
1749
1750         * editing/markup.cpp:
1751         (WebCore::createFragmentFromMarkup):
1752         * editing/markup.h:
1753         - Return a Ref<> instead of a PassRefPtr<> as it can never return null.
1754         - Use descendantsOfType<HTMLAttachmentElement>(fragment) instead of
1755           getElementsByTagName() as it results in both shorter and more efficient
1756           code.
1757
1758         * html/CollectionType.h:
1759         Add new ByTag / ByHTMLTag collection types for TagCollection /
1760         HTMLTabCollection.
1761
1762         * html/GenericCachedHTMLCollection.cpp:
1763         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
1764         Handle new ByTag / ByHTMLTag collection types in the switch statement.
1765
1766         * html/HTMLCollection.cpp:
1767         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
1768         (WebCore::HTMLCollection::~HTMLCollection):
1769         Handle new ByTag / ByHTMLTag collection types in switch statements.
1770
1771         (WebCore::HTMLCollection::tags):
1772         Add a null-check on localName() before calling getElementsByTagName().
1773         This function is currently for ObjC bindings only.
1774
1775         * html/HTMLPlugInImageElement.cpp:
1776         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
1777         Simplify / optimize the code by using descendantsOfType<HTMLPlugInImageElement>()
1778         instead of getElementsByTagName().
1779
1780         * html/MediaDocument.cpp:
1781         (WebCore::descendantVideoElement):
1782         Use descendantsOfType<HTMLVideoElement> instead of getElementsByTagNameNS().
1783
1784 2015-08-21  Geoffrey Garen  <ggaren@apple.com>
1785
1786         Debugger's VM should never be null
1787         https://bugs.webkit.org/show_bug.cgi?id=148341
1788
1789         Reviewed by Joseph Pecoraro.
1790
1791         It doesn't make sense for a Debugger's VM to be null, and code related
1792         to maintaining that illusion just caused the Web Inspector to crash on
1793         launch (https://bugs.webkit.org/show_bug.cgi?id=148312). So, let's stop
1794         doing that.
1795
1796         Now, Debugger requires its subclass to provide a never-null VM&.
1797
1798         * bindings/js/WorkerScriptDebugServer.cpp:
1799         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1800         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1801         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1802         * inspector/PageScriptDebugServer.cpp:
1803         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1804         (WebCore::PageScriptDebugServer::didPause):
1805
1806 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
1807
1808         [OS X] Remove dead code from FontCache::systemFallbackForCharacters()
1809         https://bugs.webkit.org/show_bug.cgi?id=148218
1810
1811         Reviewed by Daniel Bates.
1812
1813         lookupCTFont() in FontCacheMac.mm will always return the best font (because
1814         CTFontCreateForCharactersWithLanguage() does so). Also, all fonts that will
1815         be created on WebKit's behalf are already printer fonts.
1816
1817         No new tests because there is no behavior change.
1818
1819         * platform/graphics/mac/FontCacheMac.mm:
1820         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
1821
1822 2015-08-21  Anders Carlsson  <andersca@apple.com>
1823
1824         Fix build.
1825
1826         * platform/network/win/NetworkStateNotifierWin.cpp:
1827         (WebCore::NetworkStateNotifier::addrChangeCallback):
1828         (WebCore::NetworkStateNotifier::callAddressChanged): Deleted.
1829
1830 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
1831
1832         [Cocoa] Clean up Font class
1833         https://bugs.webkit.org/show_bug.cgi?id=148216
1834
1835         Reviewed by Dean Jackson.
1836
1837         No new tests because there is no behavior change.
1838
1839         * platform/graphics/Font.cpp:
1840         (WebCore::Font::platformGlyphInit): Deleted.
1841         * platform/graphics/Font.h:
1842         * platform/graphics/cocoa/FontCocoa.mm:
1843         (WebCore::Font::platformInit):
1844
1845 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
1846
1847         [Cocoa] Unify two more FontCache functions
1848         https://bugs.webkit.org/show_bug.cgi?id=148217
1849
1850         Reviewed by Dean Jackson.
1851
1852         Move duplicated code from FontCacheMac and FontCacheIOS into
1853         FontCacheCoreText.
1854
1855         No new tests because there is no behavior change.
1856
1857         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1858         (WebCore::toTraitsMask):
1859         (WebCore::isFontWeightBold):
1860         (WebCore::FontCache::similarFont):
1861         (WebCore::FontCache::getTraitsInFamily):
1862         * platform/graphics/ios/FontCacheIOS.mm:
1863         (WebCore::FontCache::similarFont): Deleted.
1864         (WebCore::toTraitsMask): Deleted.
1865         (WebCore::FontCache::getTraitsInFamily): Deleted.
1866         * platform/graphics/mac/FontCacheMac.mm:
1867         (WebCore::toTraitsMask): Deleted.
1868         (WebCore::FontCache::similarFont): Deleted.
1869         (WebCore::FontCache::getTraitsInFamily): Deleted.
1870
1871 2015-08-21  Anders Carlsson  <andersca@apple.com>
1872
1873         Stop using the old callOnMainThread variant on Windows
1874         https://bugs.webkit.org/show_bug.cgi?id=148332
1875
1876         Reviewed by Tim Horton.
1877
1878         * platform/network/cf/CookieStorageCFNet.cpp:
1879         (WebCore::notifyCookiesChanged):
1880         (WebCore::notifyCookiesChangedOnMainThread): Deleted.
1881         * platform/network/win/NetworkStateNotifierWin.cpp:
1882         (WebCore::NetworkStateNotifier::addrChangeCallback):
1883
1884 2015-08-20  Matt Rajca  <mrajca@apple.com>
1885
1886         Media Session: let UI clients change the volume of the focused media element
1887         https://bugs.webkit.org/show_bug.cgi?id=148289
1888
1889         Reviewed by Tim Horton.
1890
1891         * page/Page.cpp:
1892         (WebCore::Page::setVolumeOfMediaElement):
1893         * page/Page.h:
1894
1895 2015-08-21  Anders Carlsson  <andersca@apple.com>
1896
1897         Get rid of uses of the old callOnMainThread function that takes a function ptr + context
1898         https://bugs.webkit.org/show_bug.cgi?id=148324
1899
1900         Reviewed by Tim Horton.
1901
1902         * Modules/webaudio/AsyncAudioDecoder.cpp:
1903         (WebCore::AsyncAudioDecoder::DecodingTask::decode):
1904         (WebCore::AsyncAudioDecoder::DecodingTask::notifyCompleteDispatch): Deleted.
1905         * Modules/webaudio/AsyncAudioDecoder.h:
1906         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1907         (WebCore::OfflineAudioDestinationNode::offlineRender):
1908         (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch): Deleted.
1909         * Modules/webaudio/OfflineAudioDestinationNode.h:
1910         * Modules/webaudio/ScriptProcessorNode.cpp:
1911         (WebCore::ScriptProcessorNode::process):
1912         (WebCore::ScriptProcessorNode::fireProcessEventDispatch): Deleted.
1913         * Modules/webaudio/ScriptProcessorNode.h:
1914         * Modules/webdatabase/DatabaseTracker.cpp:
1915         (WebCore::DatabaseTracker::scheduleForNotification):
1916         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1917         * Modules/webdatabase/DatabaseTracker.h:
1918         * platform/graphics/cg/ImageCG.cpp:
1919         (WebCore::patternReleaseCallback):
1920         (WebCore::patternReleaseOnMainThreadCallback): Deleted.
1921         * platform/graphics/cg/PatternCG.cpp:
1922         (WebCore::patternReleaseCallback):
1923         (WebCore::patternReleaseOnMainThreadCallback): Deleted.
1924         * platform/graphics/mac/FontCacheMac.mm:
1925         (WebCore::invalidateFontCache):
1926         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
1927         * platform/network/BlobResourceHandle.cpp:
1928         (WebCore::doNotifyFinish):
1929         (WebCore::BlobResourceHandle::notifyFinish):
1930         * platform/network/cf/FormDataStreamCFNet.cpp:
1931         (WebCore::formFinalize):
1932         (WebCore::formFinishFinalizationOnMainThread): Deleted.
1933
1934 2015-08-21  Doug Russell  <d_russell@apple.com>
1935
1936         AX: Table with CSS that makes a row anonymous can return NULL from cellForColumnAndRow
1937         https://bugs.webkit.org/show_bug.cgi?id=148293
1938
1939         Reviewed by Chris Fleizach.
1940
1941         When RenderTableRows are anonymous, they may not be added to the accessible data 
1942         table's internal row list. However, when calculating the row range for a cell, 
1943         we were still accounting for those anonymous sections.
1944         Change how the row range is calculated to directly ask the accessible parent row 
1945         for its index. This will ensure it’s more inline with what’s being represented to 
1946         the accessibility API.
1947
1948         Test: accessibility/aria-table-content.html
1949
1950         * accessibility/AccessibilityTableCell.cpp:
1951         (WebCore::AccessibilityTableCell::parentRow):
1952         (WebCore::AccessibilityTableCell::rowIndexRange):
1953         * accessibility/AccessibilityTableCell.h:
1954
1955 2015-08-21  Joseph Pecoraro  <pecoraro@apple.com>
1956
1957         Web Inspector: REGRESSION(173684): Edit as HTML not working
1958         https://bugs.webkit.org/show_bug.cgi?id=148268
1959
1960         Reviewed by Chris Dumez.
1961
1962         Tests: inspector/dom/getOuterHTML.html
1963                inspector/dom/setOuterHTML.html
1964
1965         * inspector/DOMPatchSupport.cpp:
1966         (WebCore::DOMPatchSupport::innerPatchChildren):
1967         Revert the optimization change made in r173684. The optimization changes
1968         had a few issues. It changed the logic to potentially drop out of the
1969         loop before all new items were processed and using a node reference
1970         to track an index did not account for the modifications insertBefore
1971         may have made to that node's index in the list.
1972
1973 2015-08-21  Beth Dakin  <bdakin@apple.com>
1974
1975         HistoryItems will null CachedPages should never be left in the list of items; 
1976         causes crash
1977         https://bugs.webkit.org/show_bug.cgi?id=148237
1978         -and corresponding-
1979         rdar://problem/22356782
1980
1981         Reviewed by Brady Eidson.
1982
1983         Setting the CachedPage to nullptr will destroy the CachedPage, destroy the 
1984         FrameView, re-enter layout, and potentially try to modify items in the PageCache 
1985         based on that layout. So, we should not modify CachedPage in this way while the 
1986         item is still in the list of HistoryItems.
1987         * history/PageCache.cpp:
1988         (WebCore::PageCache::take):
1989         (WebCore::PageCache::remove):
1990         (WebCore::PageCache::prune):
1991
1992 2015-08-21  David Kilzer  <ddkilzer@apple.com>
1993
1994         dispatch_group_t objects may not be retained properly when not backed by Objective-C objects under garbage collection
1995         <http://webkit.org/b/148229>
1996
1997         Reviewed by Eric Carlson.
1998
1999         When compiled with garbage collection enabled, libdispatch
2000         objects are not backed by Objective-C objects, so they don't get
2001         the benefit of automatic reference counting when captured by a
2002         block or a lambda.  To address this, we use OSObjectPtr<> which
2003         always increments the reference count of the contained object.
2004
2005         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2006         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):
2007         Switch to use OSObjectPtr<>.
2008
2009 2015-08-21  Nan Wang  <n_wang@apple.com>
2010
2011         [Mac] accessibility/selection-states.html fails
2012         https://bugs.webkit.org/show_bug.cgi?id=116637
2013
2014         Reviewed by Chris Fleizach.
2015
2016         Added accessibilityAttributeValue callback for isMultiSelectable attribute.
2017
2018         Updated expectation for accessibility/selection-states.html on mac.
2019
2020         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2021         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2022
2023 2015-08-21  Jonathan Davis  <jond@apple.com>
2024
2025         Fixed status features JSON formatting.
2026
2027         * features.json:
2028
2029 2015-08-21  Chris Dumez  <cdumez@apple.com>
2030
2031         Have more getElementsBy*() methods return a Ref<>
2032         https://bugs.webkit.org/show_bug.cgi?id=148287
2033
2034         Reviewed by Sam Weinig.
2035
2036         Have more getElementsBy*() methods return a Ref<> instaed of a RefPtr<>
2037         as they cannot return null.
2038
2039         * dom/ContainerNode.cpp:
2040         (WebCore::ContainerNode::getElementsByTagName):
2041         (WebCore::ContainerNode::getElementsByTagNameNS):
2042         (WebCore::ContainerNode::getElementsByName):
2043         (WebCore::ContainerNode::getElementsByClassName):
2044         (WebCore::ContainerNode::getElementsByClassNameForObjC):
2045         (WebCore::ContainerNode::radioNodeList):
2046         * dom/ContainerNode.h:
2047
2048 2015-08-21  Chris Dumez  <cdumez@apple.com>
2049
2050         Drop NodeListBase class
2051         https://bugs.webkit.org/show_bug.cgi?id=148290
2052
2053         Reviewed by Ryosuke Niwa.
2054
2055         Drop NodeListBase class and have HTMLCollection subclass NodeList
2056         directly. There is no reason we need another base class.
2057
2058         * WebCore.xcodeproj/project.pbxproj:
2059         * bindings/scripts/CodeGeneratorObjC.pm:
2060         (GetImplClassName): Deleted.
2061         * dom/ContainerNode.cpp:
2062         (WebCore::ContainerNode::getElementsByClassNameForObjC):
2063         * dom/ContainerNode.h:
2064         * dom/NodeList.h:
2065         * dom/NodeListBase.h: Removed.
2066         * html/HTMLCollection.h:
2067
2068 2015-08-20  Yusuke Suzuki  <utatane.tea@gmail.com>
2069
2070         [ES6] prototyping module loader in JSC shell
2071         https://bugs.webkit.org/show_bug.cgi?id=147876
2072
2073         Reviewed by Saam Barati.
2074
2075         Just fill Loader hooks with nullptr.
2076
2077         * bindings/js/JSDOMWindowBase.cpp:
2078         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2079
2080 2015-08-20  Chris Dumez  <cdumez@apple.com>
2081
2082         Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker()
2083         https://bugs.webkit.org/show_bug.cgi?id=148257
2084
2085         Reviewed by Darin Adler.
2086
2087         Fix passing null / undefined as NodeFilter parameter for createNodeIterator() / createTreeWalker().
2088         It is supposed to be translated into a *null* NodeFilter. However, WebKit was constructing a
2089         NodeFilter in this case.
2090
2091         Chrome and Firefox do not create a NodeFilter in this case.
2092
2093         No new tests, already covered by:
2094         fast/dom/createNodeIterator-parameters.html
2095         fast/dom/createTreeWalker-parameters.html
2096
2097         * bindings/js/JSNodeFilterCustom.cpp:
2098         (WebCore::JSNodeFilter::toWrapped):
2099
2100 2015-08-20  Zalan Bujtas  <zalan@apple.com>
2101
2102         Make outline: auto repaint rect inflate more explicit.
2103         https://bugs.webkit.org/show_bug.cgi?id=148263
2104
2105         Reviewed by Simon Fraser.
2106
2107         Use RenderObject::adjustRectWithMaximumOutline() when inflating is conditional and call
2108         RenderView::maximalOutlineSize() when it is not.
2109         After this changeset, we can clearly tell calls when inflating is unconditional (adjusting the size of the compositing layer) apart from
2110         calls when we just simply inflate the repaint rect during outline painting phase.
2111
2112         No change in behaviour.
2113
2114         * rendering/InlineFlowBox.cpp:
2115         (WebCore::InlineFlowBox::paint):
2116         * rendering/RenderBlock.cpp:
2117         (WebCore::RenderBlock::paint):
2118         * rendering/RenderBlockFlow.cpp:
2119         (WebCore::RenderBlockFlow::layoutBlock):
2120         * rendering/RenderDetailsMarker.cpp:
2121         (WebCore::RenderDetailsMarker::paint):
2122         * rendering/RenderElement.cpp:
2123         (WebCore::RenderElement::computeMaxOutlineSize):
2124         * rendering/RenderLayer.cpp:
2125         (WebCore::RenderLayer::calculateClipRects):
2126         * rendering/RenderLineBoxList.cpp:
2127         (WebCore::isOutlinePhase):
2128         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
2129         (WebCore::RenderLineBoxList::paint):
2130         * rendering/RenderListMarker.cpp:
2131         (WebCore::RenderListMarker::paint):
2132         * rendering/RenderObject.cpp:
2133         (WebCore::RenderObject::adjustRectWithMaximumOutline):
2134         (WebCore::RenderObject::maximalOutlineSize): Deleted.
2135         * rendering/RenderObject.h:
2136         * rendering/RenderRegion.cpp:
2137         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
2138         * rendering/RenderReplaced.cpp:
2139         (WebCore::RenderReplaced::shouldPaint):
2140         * rendering/RenderTable.cpp:
2141         (WebCore::RenderTable::paint):
2142         * rendering/RenderTableCell.cpp:
2143         (WebCore::RenderTableCell::paintCollapsedBorders):
2144         * rendering/RenderTableSection.cpp:
2145         (WebCore::RenderTableSection::paintObject):
2146         * rendering/RenderView.cpp:
2147         (WebCore::RenderView::setMaximalOutlineSize):
2148         (WebCore::RenderView::RenderView): Deleted.
2149         * rendering/RenderView.h:
2150
2151 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
2152
2153         [OS X] Cleaup after r188591
2154         https://bugs.webkit.org/show_bug.cgi?id=148219
2155
2156         Unreviewed.
2157
2158         Forgot to update a call site of FontPlatformData().
2159
2160         * platform/graphics/mac/FontCacheMac.mm:
2161         (WebCore::FontCache::systemFallbackForCharacters):
2162
2163 2015-08-20  Alex Christensen  <achristensen@webkit.org>
2164
2165         Build fix after r188716.
2166
2167         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2168         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
2169         Add some scope so we can declare a variable (weakPtr) inside a switch statement.
2170
2171 2015-08-20  Alex Christensen  <achristensen@webkit.org>
2172
2173         Build fix after r188716.
2174
2175         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2176         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
2177         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
2178         Replace m_weakFactory with m_weakPtrFactory which actually exists.
2179
2180 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
2181
2182         [iOS] Adopt OS X's emoji behavior.
2183         https://bugs.webkit.org/show_bug.cgi?id=148265
2184
2185         Reviewed by Simon Fraser.
2186
2187         Remove our hardcoded hacks which limit the sizes of emoji. This is how
2188         OS X behaves with emoji.
2189
2190         Test: fast/text/emoji.html
2191
2192         * platform/graphics/FontPlatformData.h:
2193         (WebCore::FontPlatformData::hash):
2194         (WebCore::FontPlatformData::isEmoji): Deleted.
2195         (WebCore::FontPlatformData::setIsEmoji): Deleted.
2196         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2197         (WebCore::FontCascade::drawGlyphs):
2198         (WebCore::isOnOrAfterIOS6): Deleted.
2199         (WebCore::pointAdjustedForEmoji): Deleted.
2200         * platform/graphics/cocoa/FontCocoa.mm:
2201         (WebCore::canUseFastGlyphAdvanceGetter):
2202         (WebCore::Font::platformInit): Deleted.
2203         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2204         (WebCore::FontPlatformData::ctFont):
2205         (WebCore::FontPlatformData::platformDataInit): Deleted.
2206         (WebCore::FontPlatformData::platformDataAssign): Deleted.
2207         (WebCore::FontPlatformData::platformIsEqual): Deleted.
2208         (WebCore::FontPlatformData::ctFontSize): Deleted.
2209         * platform/graphics/ios/FontCacheIOS.mm:
2210         (WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
2211         (WebCore::FontCache::createFontPlatformData): Deleted.
2212         * platform/graphics/mac/ComplexTextController.cpp:
2213         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Deleted.
2214
2215 2015-08-20  Chris Dumez  <cdumez@apple.com>
2216
2217         getElementsByClassName() should return an HTMLCollection
2218         https://bugs.webkit.org/show_bug.cgi?id=147980
2219
2220         Reviewed by Darin Adler.
2221
2222         Update Document.getElementsByClassName() and Element.getElementsByClassName()
2223         to return an HTMLCollection instead of a NodeList, as per the specification:
2224         - https://dom.spec.whatwg.org/#interface-document
2225         - https://dom.spec.whatwg.org/#interface-element
2226
2227         This behavior is also consistent with other major browsers. Due to this and
2228         the fact that NodeList / HTMLCollection pretty much the same API, the
2229         compatibility risk should be fairly low.
2230
2231         I also verified that the performance is the same according to the following
2232         performance test:
2233         PerformanceTests/DOM/get-elements-by-class-name-traversal-uncached.html
2234
2235         Tests: fast/dom/getElementsByClassName/dumpHTMLCollection.html
2236                fast/dom/getElementsByClassName/return-type.html
2237
2238         * CMakeLists.txt:
2239         * WebCore.vcxproj/WebCore.vcxproj:
2240         * WebCore.xcodeproj/project.pbxproj:
2241         Rename ClassNodeList.cpp file.
2242
2243         * bindings/scripts/CodeGeneratorObjC.pm:
2244         (GetImplClassName):
2245         Indicate that NodeList is implemented as NodeListBase. This is
2246         needed so that DOMNodeList can have either an HTMLCollection or
2247         a NodeList as internal representation. NodeListBase is a new
2248         common base class for HTMLCollection and NodeList.
2249
2250         * dom/ClassCollection.cpp: Renamed from Source/WebCore/dom/ClassNodeList.cpp.
2251         (WebCore::ClassCollection::create):
2252         (WebCore::ClassCollection::~ClassCollection):
2253         * dom/ClassCollection.h: Renamed from Source/WebCore/dom/ClassNodeList.h.
2254         (WebCore::ClassCollection::ClassCollection):
2255         (WebCore::ClassCollection::elementMatches):
2256         Rename ClassNodeList to ClassCollection and have it subclass
2257         CachedHTMLCollection instead of ClassNodeList.
2258
2259         * dom/ContainerNode.cpp:
2260         (WebCore::ContainerNode::getElementsByClassName):
2261         Have getElementsByClassName return an HTMLCollection instead of a
2262         NodeList.
2263
2264         (WebCore::ContainerNode::getElementsByClassNameForObjC):
2265         New method returns a NodeListBase for ObjC bindings, so they can
2266         convert the return value into a DOMNodeList. We need this to not
2267         break ObjC API compatibility.
2268
2269         * dom/Document.idl:
2270         * dom/Element.idl:
2271         Have getElementsByClassName return an HTMLCollection instead of a
2272         NodeList, except for ObjC bindings.
2273
2274         * dom/NodeList.h:
2275         Have NodeList subclass NodeListBase.
2276
2277         * dom/NodeListBase.h: Added.
2278         New common base interface for HTMLCollection and NodeList. This is
2279         so that the internal representation for ObjC's DOMNodeList can be
2280         a NodeListBase instead of a NodeList. This way, the ObjC API can
2281         keep returning a DOMNodeList, even though our implementation now
2282         returns an HTMLCollection instead of a NodeList.
2283
2284         * dom/NodeRareData.h:
2285         (WebCore::NodeListTypeIdentifier<NameNodeList>::value):
2286         (WebCore::NodeListTypeIdentifier<TagNodeList>::value):
2287         (WebCore::NodeListTypeIdentifier<HTMLTagNodeList>::value):
2288         (WebCore::NodeListTypeIdentifier<RadioNodeList>::value):
2289         (WebCore::NodeListTypeIdentifier<LabelsNodeList>::value):
2290         Drop ClassNodeList from the NodeListTypeIndentifiers.
2291
2292         * html/CollectionType.h:
2293         Add new ByClass CollectionType for ClassCollection.
2294
2295         * html/GenericCachedHTMLCollection.cpp:
2296         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
2297         Handle new ByClass CollectionType in the switch statement.
2298
2299         * html/HTMLCollection.cpp:
2300         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
2301         (WebCore::HTMLCollection::~HTMLCollection):
2302         Add support for new ByClass Collection type.
2303
2304         * html/HTMLCollection.h:
2305         Have HTMLCollection subclass the NodeListBase interface.
2306
2307 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
2308
2309         Fix the iOS build after r188726
2310         https://bugs.webkit.org/show_bug.cgi?id=148278
2311
2312         Unreviewed.
2313
2314         * platform/graphics/ios/FontCacheIOS.mm:
2315         (WebCore::FontCache::systemFallbackForCharacters):
2316
2317 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
2318
2319         Cleanup after r188726
2320         https://bugs.webkit.org/show_bug.cgi?id=148278
2321
2322         Unreviewed.
2323
2324         No new tests because there is no behavior change.
2325
2326         * platform/graphics/ios/FontCacheIOS.mm:
2327         (WebCore::FontCache::systemFallbackForCharacters):
2328
2329 2015-08-20  Myles C. Maxfield  <mmaxfield@apple.com>
2330
2331         [iOS] Delete dead code
2332         https://bugs.webkit.org/show_bug.cgi?id=148278
2333
2334         Reviewed by Dean Jackson.
2335
2336         No new tests because there is no behavior change.
2337
2338         * platform/graphics/cocoa/FontCocoa.mm:
2339         (WebCore::Font::platformInit):
2340         * platform/graphics/ios/FontCacheIOS.mm:
2341         (WebCore::copyFontCharacterSet): Deleted.
2342         (WebCore::appleColorEmojiCharacterSet): Deleted.
2343         (WebCore::phoneFallbackCharacterSet): Deleted.
2344         (WebCore::languageSpecificFallbackFont): Deleted.
2345         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
2346
2347 2015-08-20  Tim Horton  <timothy_horton@apple.com>
2348
2349         Unreviewed, rolling out r188712.
2350         https://bugs.webkit.org/show_bug.cgi?id=148274
2351
2352         broke allllll the tests (Requested by thorton on #webkit).
2353
2354         Reverted changeset:
2355
2356         "WK1 can re-enter layout during FrameView destruction and
2357         crash"
2358         https://bugs.webkit.org/show_bug.cgi?id=148237
2359         http://trac.webkit.org/changeset/188712
2360
2361 2015-08-20  Commit Queue  <commit-queue@webkit.org>
2362
2363         Unreviewed, rolling out r188717 and r188719.
2364         https://bugs.webkit.org/show_bug.cgi?id=148272
2365
2366         Broke the Mavericks build (Requested by andersca on #webkit).
2367
2368         Reverted changesets:
2369
2370         "Merge Lock and LockBase"
2371         https://bugs.webkit.org/show_bug.cgi?id=148266
2372         http://trac.webkit.org/changeset/188717
2373
2374         "Merge ConditionBase and Condition"
2375         https://bugs.webkit.org/show_bug.cgi?id=148270
2376         http://trac.webkit.org/changeset/188719
2377
2378 2015-08-20  Anders Carlsson  <andersca@apple.com>
2379
2380         Merge ConditionBase and Condition
2381         https://bugs.webkit.org/show_bug.cgi?id=148270
2382
2383         Reviewed by Filip Pizlo.
2384
2385         Change StaticCondition to Condition.
2386
2387         * platform/network/cf/LoaderRunLoopCF.cpp:
2388
2389 2015-08-20  Anders Carlsson  <andersca@apple.com>
2390
2391         Stop using cancelCallOnMainThread in MediaPlayerPrivateMediaFoundation
2392         https://bugs.webkit.org/show_bug.cgi?id=148252
2393
2394         Reviewed by Tim Horton.
2395
2396         Replace cancelCallOnMainThread with WeakPtrs.
2397
2398         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2399         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
2400         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
2401         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
2402         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
2403         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
2404         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
2405         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2406
2407 2015-08-20  Beth Dakin  <bdakin@apple.com>
2408
2409         WK1 can re-enter layout during FrameView destruction and crash
2410         https://bugs.webkit.org/show_bug.cgi?id=148237
2411         -and corresponding-
2412         rdar://problem/22356782
2413
2414         Reviewed by Zalan Bujtas.
2415
2416         This is a safe fix for the time being. We won't resetScrollbars() for a FrameView 
2417         that is in the PageCache because resetting scrollbars can re-enter layout for the 
2418         Frame's new FrameView, which leads to updating pages in the page cache, which 
2419         leads to a crash because we're in the process of destroying something
2420         in the page cache. We should not be able to get into this mess at all.
2421         * page/FrameView.cpp:
2422         (WebCore::FrameView::~FrameView):
2423
2424 2015-08-20  Chris Dumez  <cdumez@apple.com>
2425
2426         Default value for createNodeIterator() / createTreeWalker()'s whatToShow parameter should be 0xFFFFFFFF
2427         https://bugs.webkit.org/show_bug.cgi?id=148238
2428
2429         Reviewed by Ryosuke Niwa.
2430
2431         Default value for createNodeIterator() / createTreeWalker()'s whatToShow
2432         parameter should be 0xFFFFFFFF as per the specification:
2433         - http://w3c-test.org/dom/traversal/NodeIterator.html
2434         - http://w3c-test.org/dom/traversal/TreeWalker.html
2435
2436         Firefox and Chrome conform to the specification. However, WebKit was
2437         using 0 as default value.
2438
2439         We still don't behave as expected in some cases, as visible from
2440         the checks that are still failing in the new layout tests. Those
2441         will be addressed separately.
2442
2443         Tests: fast/dom/createNodeIterator-parameters.html
2444                fast/dom/createTreeWalker-parameters.html
2445
2446         * dom/Document.cpp:
2447         (WebCore::Document::createNodeIterator):
2448         (WebCore::Document::createTreeWalker):
2449         (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
2450         (WebCore::Document::scheduleStyleRecalc): Deleted.
2451         * dom/Document.h:
2452         * dom/Document.idl:
2453         * dom/NodeIterator.cpp:
2454         (WebCore::NodeIterator::NodeIterator):
2455         * dom/NodeIterator.h:
2456         (WebCore::NodeIterator::create):
2457         * dom/Traversal.cpp:
2458         (WebCore::NodeIteratorBase::NodeIteratorBase):
2459         * dom/Traversal.h:
2460         (WebCore::NodeIteratorBase::whatToShow):
2461         * dom/TreeWalker.cpp:
2462         (WebCore::TreeWalker::TreeWalker):
2463         * dom/TreeWalker.h:
2464         (WebCore::TreeWalker::create):
2465
2466 2015-08-20  Anders Carlsson  <andersca@apple.com>
2467
2468         Stop using cancelCallOnMainThread in MediaPlayerPrivateAVFoundation
2469         https://bugs.webkit.org/show_bug.cgi?id=148248
2470
2471         Reviewed by Tim Horton.
2472
2473         Replace cancelCallOnMainThread with WeakPtrs, just like in MediaPlayerPrivateAVFoundationObjC.
2474
2475         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2476         (WebCore::MediaPlayerPrivateAVFoundation::mainThreadCallback):
2477         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
2478         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2479         (WebCore::MediaPlayerPrivateAVFoundation::~MediaPlayerPrivateAVFoundation): Deleted.
2480         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2481
2482 2015-08-20  Anders Carlsson  <andersca@apple.com>
2483
2484         Stop using cancelCallOnMainThread in DisplayRefreshMonitorMac
2485         https://bugs.webkit.org/show_bug.cgi?id=148241
2486
2487         Reviewed by Tim Horton.
2488
2489         Create a WeakPtrFactory in DisplayRefreshMonitorMac and bind a WeakPtr in the function passed
2490         to callOnMainThread so we can check if the DisplayRefreshMonitorMac has gone away.
2491
2492         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2493         (WebCore::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac):
2494         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
2495         (WebCore::DisplayRefreshMonitorMac::~DisplayRefreshMonitorMac):
2496         * platform/graphics/mac/DisplayRefreshMonitorMac.h:
2497
2498 2015-08-20  Alex Christensen  <achristensen@webkit.org>
2499
2500         AppleWin CMake build fix after r188696.
2501
2502         * PlatformWin.cmake:
2503         No ${} fixes the problem and keeps the desired behavior.
2504
2505 2015-08-20  Per Arne Vollan  <peavo@outlook.com>
2506
2507         [WinCairo] Link errors when building with VS2015.
2508         https://bugs.webkit.org/show_bug.cgi?id=148233
2509
2510         Reviewed by Alex Christensen.
2511
2512         Include some inline function definitions.
2513
2514         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2515         * html/canvas/WebGLRenderingContext.cpp:
2516
2517 2015-08-20  Alex Christensen  <achristensen@webkit.org>
2518
2519         Clean up CMake build after r188673
2520         https://bugs.webkit.org/show_bug.cgi?id=148234
2521
2522         Reviewed by Tim Horton.
2523
2524         * CMakeLists.txt:
2525         * PlatformEfl.cmake:
2526         * PlatformGTK.cmake:
2527         * PlatformWin.cmake:
2528         Make including ANGLE headers platform specific because EFL and GTK don't want to copy headers,
2529         but we need to in order to get the Windows build working with each Source subdirectory isolated.
2530
2531 2015-08-20  Beth Dakin  <bdakin@apple.com>
2532
2533         Standalone image documents should send their size to the UIClient just like 
2534         standalone media documents
2535         https://bugs.webkit.org/show_bug.cgi?id=148195
2536         -and corresponding-
2537         rdar://problem/21951253
2538
2539         Reviewed by Tim Horton.
2540
2541         This patch re-names mediaDocumentNaturalSizeChanged() to 
2542         imageOrMediaDocumentSizeChanged(), and, as the new name implies, uses the 
2543         function for both media documents and images.
2544
2545         * html/ImageDocument.cpp:
2546         (WebCore::ImageDocument::imageUpdated):
2547         * html/MediaDocument.cpp:
2548         (WebCore::MediaDocument::mediaElementNaturalSizeChanged):
2549         * page/ChromeClient.h:
2550
2551 2015-08-20  Simon Fraser  <simon.fraser@apple.com>
2552
2553         Add myself as the will-change contact.
2554
2555         * features.json:
2556
2557 2015-08-20  Chris Dumez  <cdumez@apple.com>
2558
2559         [Cocoa] Treat Epoch as invalid value for "Last-Modified" header
2560         https://bugs.webkit.org/show_bug.cgi?id=148162
2561         rdar://problem/22330837
2562
2563         Reviewed by Antti Koivisto.
2564
2565         Ignore "Last-Modified" header when computing heuristic freshness if it
2566         is Epoch. CFNetwork currently converts a malformed date for Last-Modified
2567         into Epoch so there is no way for us to distinguish Epoch from invalid
2568         input. Without this, we would end up with cached resources that have a
2569         giant lifetime (> 4 years) due to a malformed HTTP header.
2570
2571         Some Websites (e.g. www.popehat.com) also wrongly return Epoch as
2572         Last-Modified value and we would end up caching it overly aggressively.
2573         Now that we consider Epoch as an invalid value for Last-Modified, it will
2574         also work around this content bug.
2575
2576         Test: http/tests/cache/disk-cache/disk-cache-last-modified.html
2577
2578         * platform/network/ResourceResponseBase.cpp:
2579         (WebCore::ResourceResponseBase::lastModified):
2580
2581 2015-08-19  Brian Burg  <bburg@apple.com>
2582
2583         Web Inspector: add TestHarness option to tee all commands to system console
2584         https://bugs.webkit.org/show_bug.cgi?id=148181
2585
2586         Reviewed by Joseph Pecoraro.
2587
2588         * inspector/InspectorFrontendHost.cpp:
2589         (WebCore::InspectorFrontendHost::unbufferedLog): Remove log prefix so output
2590         to stderr can be diffed against expected results without processing.
2591
2592 2015-08-19  Brent Fulgham  <bfulgham@apple.com>
2593
2594         [Win] Unreviewed build fix after r188663.
2595
2596         The new bindings file was added to the Visual Studio project, but was marked to not
2597         be built. It should have also been added to the "JSBindingsAllInOne.cpp" file so
2598         that the new code gets compiled.
2599
2600         * bindings/js/JSBindingsAllInOne.cpp:
2601
2602 2015-08-19  Alex Christensen  <achristensen@webkit.org>
2603
2604         CMake Windows build should not include files directly from other Source directories
2605         https://bugs.webkit.org/show_bug.cgi?id=148198
2606
2607         Reviewed by Brent Fulgham.
2608
2609         * CMakeLists.txt:
2610         * PlatformEfl.cmake:
2611         * PlatformGTK.cmake:
2612         * PlatformWin.cmake:
2613
2614 2015-08-19  Wenson Hsieh  <wenson_hsieh@apple.com>
2615
2616         Select validation does not correctly work when handling change event
2617         https://bugs.webkit.org/show_bug.cgi?id=145869
2618
2619         Reviewed by Dean Jackson.
2620
2621         When selecting an option in a <select> with validation that also has an onchange listener, calling
2622         checkValidity() for the select within the onchange handler would produce incorrect results and (on
2623         a debug build) crash at an assertion. This is because the change events were being dispatched before
2624         form validity was updated. Making the validation step come before the change event dispatch fixes
2625         this issue.
2626
2627         Test: fast/forms/onchange-select-check-validity.html
2628
2629         * html/HTMLSelectElement.cpp:
2630         (WebCore::HTMLSelectElement::selectOption): Update validity before dispatching change events.
2631
2632 2015-08-19  Jinyoung Hur  <hur.ims@navercorp.com>
2633
2634         GraphicsContext3D::activeTexture should not be called with zero-based index
2635         https://bugs.webkit.org/show_bug.cgi?id=148020
2636
2637         Reviewed by Alex Christensen.
2638
2639         GraphicsContext3D::activeTexture should be called with an argument that is greater than or equal to 
2640         GraphicsContext3D::TEXTURE0.
2641
2642         Test: fast/canvas/webgl/texture-complete.html
2643
2644         * html/canvas/WebGLRenderingContextBase.cpp:
2645         (WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
2646
2647 2015-08-19  Chris Dumez  <cdumez@apple.com>
2648
2649         Avoid double hash lookup in our JS bindings named property getter code
2650         https://bugs.webkit.org/show_bug.cgi?id=148193
2651
2652         Reviewed by Geoffrey Garen.
2653
2654         Avoid double hash lookup in our JS bindings named property getter code
2655         for performance reasons.
2656
2657         * CMakeLists.txt:
2658         * WebCore.xcodeproj/project.pbxproj:
2659         Add new file.
2660
2661         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp: Added.
2662         (WebCore::JSDOMNamedFlowCollection::nameGetter):
2663         Moved custom named getter code for DOMNamedFlowCollection from the
2664         bindings generator to an actual custom bindings file.
2665
2666         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2667         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2668         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2669         * bindings/scripts/test/JS/JSTestEventTarget.h:
2670         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2671         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2672         Rebaseline bindings tests.
2673
2674 2015-08-19  Simon Fraser  <simon.fraser@apple.com>
2675
2676         Add CSS will-change to the feature list
2677         https://bugs.webkit.org/show_bug.cgi?id=148199
2678
2679         Reviewed by Dean Jackson.
2680
2681         * features.json:
2682
2683 2015-08-19  Eric Carlson  <eric.carlson@apple.com>
2684
2685         Remove ENABLE_WEBVTT_REGIONS
2686         https://bugs.webkit.org/show_bug.cgi?id=148184
2687
2688         Reviewed by Jer Noble.
2689
2690         * Configurations/FeatureDefines.xcconfig: Remove ENABLE_WEBVTT_REGIONS.
2691         * html/HTMLMediaElement.cpp:
2692         (WebCore::HTMLMediaElement::textTrackRemoveCue):
2693         * html/shadow/MediaControlElements.cpp:
2694         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2695         * html/track/InbandGenericTextTrack.cpp:
2696         (WebCore::InbandGenericTextTrack::newCuesParsed):
2697         (WebCore::InbandGenericTextTrack::newRegionsParsed):
2698         (WebCore::InbandGenericTextTrack::fileFailedToParse):
2699         * html/track/InbandGenericTextTrack.h:
2700         * html/track/InbandWebVTTTextTrack.cpp:
2701         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
2702         (WebCore::InbandWebVTTTextTrack::newRegionsParsed):
2703         (WebCore::InbandWebVTTTextTrack::fileFailedToParse):
2704         * html/track/InbandWebVTTTextTrack.h:
2705         * html/track/LoadableTextTrack.cpp:
2706         (WebCore::LoadableTextTrack::cueLoadingCompleted):
2707         (WebCore::LoadableTextTrack::newRegionsAvailable):
2708         (WebCore::LoadableTextTrack::id):
2709         * html/track/LoadableTextTrack.h:
2710         * html/track/TextTrack.cpp:
2711         (WebCore::TextTrack::TextTrack):
2712         (WebCore::TextTrack::~TextTrack):
2713         (WebCore::TextTrack::removeCue):
2714         (WebCore::TextTrack::ensureVTTRegionList):
2715         (WebCore::TextTrack::removeRegion):
2716         (WebCore::TextTrack::cueWillChange):
2717         * html/track/TextTrack.h:
2718         * html/track/TextTrack.idl:
2719         * html/track/TextTrackCue.cpp:
2720         * html/track/VTTCue.cpp:
2721         (WebCore::VTTCueBox::applyCSSProperties):
2722         (WebCore::VTTCue::createCueRenderingTree):
2723         (WebCore::VTTCue::setRegionId):
2724         (WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
2725         (WebCore::VTTCue::setIsActive):
2726         (WebCore::VTTCue::removeDisplayTree):
2727         (WebCore::VTTCue::settingName):
2728         (WebCore::VTTCue::setCueSettings):
2729         (WebCore::VTTCue::getCSSAlignment):
2730         * html/track/VTTCue.h:
2731         (WebCore::VTTCue::regionId):
2732         * html/track/VTTCue.idl:
2733         * html/track/VTTRegion.cpp:
2734         * html/track/VTTRegion.h:
2735         * html/track/VTTRegion.idl:
2736         * html/track/VTTRegionList.cpp:
2737         * html/track/VTTRegionList.h:
2738         * html/track/VTTRegionList.idl:
2739         * html/track/WebVTTParser.cpp:
2740         (WebCore::WebVTTParser::parseFloatPercentageValue):
2741         (WebCore::WebVTTParser::parseFloatPercentageValuePair):
2742         (WebCore::WebVTTParser::WebVTTParser):
2743         (WebCore::WebVTTParser::getNewCues):
2744         (WebCore::WebVTTParser::getNewRegions):
2745         (WebCore::WebVTTParser::parseFileHeader):
2746         (WebCore::WebVTTParser::parse):
2747         (WebCore::WebVTTParser::collectMetadataHeader):
2748         (WebCore::WebVTTParser::collectCueId):
2749         (WebCore::WebVTTParser::resetCueValues):
2750         (WebCore::WebVTTParser::createNewRegion):
2751         (WebCore::WebVTTParser::collectTimeStamp):
2752         * html/track/WebVTTParser.h:
2753         (WebCore::WebVTTParserClient::~WebVTTParserClient):
2754         * loader/TextTrackLoader.cpp:
2755         (WebCore::TextTrackLoader::newCuesParsed):
2756         (WebCore::TextTrackLoader::newRegionsParsed):
2757         (WebCore::TextTrackLoader::fileFailedToParse):
2758         (WebCore::TextTrackLoader::getNewCues):
2759         (WebCore::TextTrackLoader::getNewRegions):
2760         * loader/TextTrackLoader.h:
2761         * rendering/RenderVTTCue.cpp:
2762         (WebCore::RenderVTTCue::layout):
2763
2764 2015-08-19  Brent Fulgham  <bfulgham@apple.com>
2765
2766         Scrollable area container is not properly cleared when page is going into the PageCache
2767         https://bugs.webkit.org/show_bug.cgi?id=148182
2768         <rdar://problem/21969170>
2769
2770         Reviewed by Dean Jackson.
2771
2772         Must be tested manually going back and forth in history several times.
2773
2774         * history/CachedFrame.cpp:
2775         (WebCore::CachedFrame::CachedFrame): Clear the cached ScrollableAreas from the FrameView.
2776         * page/FrameView.cpp:
2777         (WebCore::FrameView::clearScrollableAreas): Added.
2778         * page/FrameView.h:
2779
2780 2015-08-19  Zalan Bujtas  <zalan@apple.com>
2781
2782         outline-style: auto leaves bits behind on strava's flyby view.
2783         https://bugs.webkit.org/show_bug.cgi?id=148178
2784
2785         Reviewed by Simon Fraser.
2786
2787         RenderView::m_maximalOutlineSize should include outline-offset.
2788
2789         Test: fast/repaint/outline-auto-with-width-less-than-focus-ring-width-and-offset-repaint.html
2790
2791         * rendering/RenderElement.cpp:
2792         (WebCore::RenderElement::computeMaxOutlineSize):
2793         * rendering/RenderObject.cpp:
2794         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
2795
2796 2015-08-19  Anders Carlsson  <andersca@apple.com>
2797
2798         Fix errors on bots.
2799
2800         Ask the backend to cleanup and terminate
2801
2802         * Modules/webdatabase/SQLTransaction.cpp:
2803         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
2804
2805 2015-08-19  Dean Jackson  <dino@apple.com>
2806
2807         Clean up our CSS files (e.g. remove prefixes)
2808         https://bugs.webkit.org/show_bug.cgi?id=148194
2809         <rdar://problem/22351034>
2810
2811         Reviewed by Brent Fulgham.
2812
2813         A lot of our internal CSS was still using prefixed forms of properties.
2814         As I started cleaning those up, I noticed lots of small things
2815         like missing semicolons and whitespace.
2816
2817         No change in behaviour for testing.
2818
2819         * css/fullscreen.css:
2820         * css/html.css:
2821         * css/mathml.css:
2822         * css/mediaControls.css:
2823         * css/mediaControlsGtk.css:
2824         * css/plugIns.css:
2825
2826 2015-08-19  Zalan Bujtas  <zalan@apple.com>
2827
2828         Cleanup outline-style: auto painting.
2829         https://bugs.webkit.org/show_bug.cgi?id=148159
2830
2831         Reviewed by Simon Fraser.
2832
2833         Old platform style required the focus ring to be painted with an offset. (https://trac.webkit.org/r5358)
2834         (and it has the side effect of growing outline-width adds further, unwanted offset)
2835         Default css for :focus is adjusted to remove this offset by setting the outline-width to 5px
2836         and the outline-offset to -2px. (https://trac.webkit.org/r13639)
2837         This patch removes both the old logic and the workaround for getting rid of the unwanted offset.
2838
2839         Test: fast/repaint/outline-auto-with-default-width-and-offset-repaint.html
2840
2841         * css/html.css:
2842         (:focus):
2843         (input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus): Deleted.
2844         * platform/graphics/mac/GraphicsContextMac.mm:
2845         (WebCore::GraphicsContext::drawFocusRing):
2846         * rendering/RenderElement.cpp:
2847         (WebCore::RenderElement::computeMaxOutlineSize):
2848         (WebCore::RenderElement::paintFocusRing):
2849         (WebCore::RenderElement::paintOutline): Short circuit painting outline when painting is disabled. It
2850         only change behaviour for non-auto outlines -which are anyway not supposed to be painted when painting is disabled.
2851         * rendering/RenderObject.cpp:
2852         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
2853         * rendering/RenderTheme.h:
2854         (WebCore::RenderTheme::platformFocusRingWidth):
2855         (WebCore::RenderTheme::platformFocusRingMaxWidth): Deleted.
2856
2857 2015-08-18  Dean Jackson  <dino@apple.com>
2858
2859         Support CSS filters without webkit prefix
2860         https://bugs.webkit.org/show_bug.cgi?id=148138
2861         <rdar://problem/22331434>
2862
2863         Reviewed by Sam Weinig.
2864
2865         Add support for the un-prefixed form of the CSS filter property.
2866         This was straightforward for the general case on HTML content.
2867         It was a bit more tricky on SVG content, where there already
2868         was an existing "filter" property/attribute. The parsing
2869         code is now shared between SVG and HTML, as is the
2870         computed style output.
2871
2872         Covered by updating the existing tests, and
2873         adding one new test: css3/filters/unprefixed.html
2874
2875         * css/CSSComputedStyleDeclaration.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter.
2876         (WebCore::isLayoutDependent):
2877         (WebCore::ComputedStyleExtractor::propertyValue):
2878
2879         * css/CSSFilterImageValue.cpp:
2880         (WebCore::CSSFilterImageValue::customCSSText): Use "filter(" as the prefix.
2881
2882         * css/CSSParser.cpp:
2883         (WebCore::CSSParser::parseValue): Rename CSSPropertyWebkitFilter to CSSPropertyFilter.
2884         (WebCore::CSSParser::isGeneratedImageValue): Add support for "filter()".
2885         (WebCore::CSSParser::parseGeneratedImage): Ditto.
2886         (WebCore::CSSParser::parseBuiltinFilterArguments):
2887
2888         * css/CSSPropertyNames.in: Add filter. Make -webkit-filter an alias.
2889
2890         * css/SVGCSSComputedStyleDeclaration.cpp:
2891         (WebCore::ComputedStyleExtractor::svgPropertyValue): Deleted.
2892
2893         * page/animation/CSSPropertyAnimation.cpp: Rename CSSPropertyWebkitFilter to CSSPropertyFilter.
2894         (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter):
2895         * page/animation/KeyframeAnimation.cpp: Ditto.
2896         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists):
2897
2898         * platform/graphics/GraphicsLayer.cpp: Rename AnimatedPropertyWebkitFilter to AnimatedPropertyFilter.
2899         (WebCore::GraphicsLayer::validateFilterOperations):
2900         * platform/graphics/GraphicsLayerClient.h: Ditto.
2901         * platform/graphics/ca/GraphicsLayerCA.cpp: Ditto.
2902         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2903         (WebCore::GraphicsLayerCA::addAnimation):
2904         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2905         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
2906
2907         * rendering/RenderLayer.cpp:
2908         (WebCore::RenderLayer::updateOrRemoveFilterClients): SVG manages its own filter resources,
2909         so we shouldn't add a layer that has an SVG root to the filter clients.
2910
2911         * rendering/RenderLayerBacking.cpp: Renaming.
2912         (WebCore::RenderLayerBacking::startAnimation):
2913         (WebCore::RenderLayerBacking::startTransition):
2914         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2915         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2916         * rendering/RenderLayerCompositor.cpp: Ditto.
2917         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2918
2919         * rendering/style/SVGRenderStyle.h: Remove the SVG filter style.
2920         (WebCore::SVGRenderStyle::isolatesBlending): No need to check for hasFilter().
2921         (WebCore::SVGRenderStyle::initialFilterResource): Deleted.
2922         (WebCore::SVGRenderStyle::setFilterResource): Deleted.
2923         (WebCore::SVGRenderStyle::filterResource): Deleted.
2924         (WebCore::SVGRenderStyle::hasFilter): Deleted.
2925
2926         * rendering/style/SVGRenderStyleDefs.cpp: Remove the filter resource.
2927         (WebCore::StyleResourceData::StyleResourceData): Deleted.
2928         (WebCore::StyleResourceData::operator==): Deleted.
2929         * rendering/style/SVGRenderStyleDefs.h:
2930
2931         * rendering/style/WillChangeData.cpp: Renaming.
2932         (WebCore::propertyCreatesStackingContext):
2933         (WebCore::propertyTriggersCompositing):
2934
2935         * rendering/svg/SVGRenderSupport.cpp:
2936         (WebCore::SVGRenderSupport::isolatesBlending): Since SVGRenderStyle no longer checks
2937         hasFilter() in its isolatesBlending(), we need to do it here.
2938
2939         * rendering/svg/SVGRenderingContext.cpp:
2940         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2941
2942         * rendering/svg/SVGRenderTreeAsText.cpp:
2943         (WebCore::writeResources): Dump from the CSS style value.
2944         * rendering/svg/SVGResources.cpp: Ditto.
2945         (WebCore::SVGResources::buildCachedResources):
2946         * rendering/svg/SVGResources.h:
2947         * rendering/svg/SVGResourcesCache.cpp:
2948         (WebCore::SVGResourcesCache::addResourcesFromRenderer):
2949
2950         * platform/graphics/texmap/TextureMapperLayer.cpp: Renaming.
2951         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2952         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2953
2954 2015-08-18  Anders Carlsson  <andersca@apple.com>
2955
2956         More work on simplifying the WebSQL code
2957         https://bugs.webkit.org/show_bug.cgi?id=148145
2958
2959         Reviewed by Tim Horton.
2960
2961         Eliminate SQLTransaction::sendToBackendState.
2962
2963         * Modules/webdatabase/SQLTransaction.cpp:
2964         (WebCore::SQLTransaction::stateFunctionFor):
2965         Change sendToBackendState to unreachableState,
2966
2967         (WebCore::SQLTransaction::deliverTransactionCallback):
2968         Call deliverTransactionErrorCallback directly and schedule RunStatements on the backend.
2969
2970         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
2971         Schedule CleanupAfterTransactionErrorCallback on the backend.
2972
2973         (WebCore::SQLTransaction::deliverStatementCallback):
2974         Fold nextStateForTransactionError into here. Schedule backend states explicitly.
2975
2976         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
2977         Schedule RunStatements on the backend.
2978
2979         (WebCore::SQLTransaction::deliverSuccessCallback):
2980         Schedule CleanupAndTerminate on the backend.
2981
2982         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
2983         The return value of this function isn't used to make it return void.
2984
2985         (WebCore::SQLTransaction::nextStateForTransactionError): Deleted.
2986         Remove this, it's been folded into deliverStatementCallback.
2987
2988         (WebCore::SQLTransaction::sendToBackendState): Deleted.
2989         Get rid of this.
2990
2991         * Modules/webdatabase/SQLTransaction.h:
2992         Update member functions.
2993
2994         * Modules/webdatabase/SQLTransactionBackend.cpp:
2995         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
2996         Just call runStatements() directly.
2997
2998         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
2999         Just call cleanupAndTerminate() directly.
3000
3001         (WebCore::SQLTransactionBackend::shouldPerformWhilePaused): Deleted.
3002         Get rid of an iOS member function that's no longer used.
3003
3004         * Modules/webdatabase/SQLTransactionBackend.h:
3005         Remove member function.
3006
3007 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
3008
3009         Replace all uses of std::mutex/std::condition_variable with WTF::Lock/WTF::Condition
3010         https://bugs.webkit.org/show_bug.cgi?id=148140
3011
3012         Reviewed by Geoffrey Garen.
3013
3014         No new tests because no new behavior.
3015
3016         * Modules/webaudio/AudioBufferSourceNode.cpp:
3017         (WebCore::AudioBufferSourceNode::process):
3018         (WebCore::AudioBufferSourceNode::setBuffer):
3019         * Modules/webaudio/AudioBufferSourceNode.h:
3020         * Modules/webaudio/AudioParamTimeline.cpp:
3021         (WebCore::AudioParamTimeline::insertEvent):
3022         (WebCore::AudioParamTimeline::cancelScheduledValues):
3023         (WebCore::AudioParamTimeline::valueForContextTime):
3024         (WebCore::AudioParamTimeline::valuesForTimeRange):
3025         * Modules/webaudio/AudioParamTimeline.h:
3026         * Modules/webaudio/ConvolverNode.cpp:
3027         (WebCore::ConvolverNode::process):
3028         (WebCore::ConvolverNode::reset):
3029         (WebCore::ConvolverNode::setBuffer):
3030         * Modules/webaudio/ConvolverNode.h:
3031         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3032         (WebCore::MediaElementAudioSourceNode::process):
3033         * Modules/webaudio/MediaElementAudioSourceNode.h:
3034         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
3035         (WebCore::MediaStreamAudioSourceNode::setFormat):
3036         (WebCore::MediaStreamAudioSourceNode::process):
3037         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3038         * Modules/webaudio/OscillatorNode.cpp:
3039         (WebCore::OscillatorNode::process):
3040         (WebCore::OscillatorNode::setPeriodicWave):
3041         * Modules/webaudio/OscillatorNode.h:
3042         * Modules/webaudio/PannerNode.cpp:
3043         (WebCore::PannerNode::process):
3044         (WebCore::PannerNode::setPanningModel):
3045         * Modules/webaudio/PannerNode.h:
3046         * Modules/webaudio/WaveShaperProcessor.cpp:
3047         (WebCore::WaveShaperProcessor::setCurve):
3048         (WebCore::WaveShaperProcessor::setOversample):
3049         (WebCore::WaveShaperProcessor::process):
3050         * Modules/webaudio/WaveShaperProcessor.h:
3051         * Modules/webdatabase/Database.cpp:
3052         (WebCore::retrieveTextResultFromDatabase):
3053         (WebCore::guidToVersionMap):
3054         (WebCore::Database::Database):
3055         (WebCore::Database::performOpenAndVerify):
3056         (WebCore::Database::closeDatabase):
3057         (WebCore::Database::getCachedVersion):
3058         (WebCore::Database::setCachedVersion):
3059         (WebCore::guidMutex): Deleted.
3060         * Modules/webdatabase/DatabaseManager.cpp:
3061         (WebCore::DatabaseManager::existingDatabaseContextFor):
3062         (WebCore::DatabaseManager::registerDatabaseContext):
3063         (WebCore::DatabaseManager::unregisterDatabaseContext):
3064         (WebCore::DatabaseManager::didConstructDatabaseContext):
3065         (WebCore::DatabaseManager::didDestructDatabaseContext):
3066         (WebCore::DatabaseManager::addProposedDatabase):
3067         (WebCore::DatabaseManager::removeProposedDatabase):
3068         (WebCore::DatabaseManager::fullPathForDatabase):
3069         (WebCore::DatabaseManager::detailsForNameAndOrigin):
3070         * Modules/webdatabase/DatabaseManager.h:
3071         * bindings/objc/DOMInternal.mm:
3072         (getDOMWrapper):
3073         (addDOMWrapper):
3074         (removeDOMWrapper):
3075         (wrapperCacheLock): Deleted.
3076         * crypto/CryptoAlgorithmRegistry.cpp:
3077         (WebCore::CryptoAlgorithmRegistry::singleton):
3078         (WebCore::CryptoAlgorithmRegistry::CryptoAlgorithmRegistry):
3079         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
3080         (WebCore::CryptoAlgorithmRegistry::nameForIdentifier):
3081         (WebCore::CryptoAlgorithmRegistry::create):
3082         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
3083         (WebCore::registryMutex): Deleted.
3084         * inspector/WorkerDebuggerAgent.cpp:
3085         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
3086         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
3087         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
3088         * page/WheelEventTestTrigger.cpp:
3089         (WebCore::WheelEventTestTrigger::clearAllTestDeferrals):
3090         (WebCore::WheelEventTestTrigger::setTestCallbackAndStartNotificationTimer):
3091         (WebCore::WheelEventTestTrigger::deferTestsForReason):
3092         (WebCore::WheelEventTestTrigger::removeTestDeferralForReason):
3093         (WebCore::WheelEventTestTrigger::triggerTestTimerFired):
3094         * page/WheelEventTestTrigger.h:
3095         * page/scrolling/ScrollingThread.cpp:
3096         (WebCore::ScrollingThread::dispatch):
3097         (WebCore::ScrollingThread::createThreadIfNeeded):
3098         (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
3099         * page/scrolling/ScrollingThread.h:
3100         * page/scrolling/mac/ScrollingThreadMac.mm:
3101         (WebCore::ScrollingThread::initializeRunLoop):
3102         * platform/audio/ReverbConvolver.cpp:
3103         (WebCore::ReverbConvolver::~ReverbConvolver):
3104         (WebCore::ReverbConvolver::backgroundThreadEntry):
3105         (WebCore::ReverbConvolver::process):
3106         (WebCore::ReverbConvolver::reset):
3107         * platform/audio/ReverbConvolver.h:
3108         * platform/ios/wak/WebCoreThreadRun.cpp:
3109         * platform/mac/Language.mm:
3110         (WebCore::preferredLanguages):
3111         (+[WebLanguageChangeObserver languagePreferencesDidChange:]):
3112         (WebCore::platformUserPreferredLanguages):
3113         (WebCore::preferredLanguagesMutex): Deleted.
3114         * platform/network/cf/LoaderRunLoopCF.cpp:
3115         (WebCore::emptyPerform):
3116         (WebCore::runLoaderThread):
3117         (WebCore::loaderRunLoop):
3118         (WebCore::loaderRunLoopMutex): Deleted.
3119         (WebCore::loaderRunLoopConditionVariable): Deleted.
3120         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3121         (WebCore::callOnMainThreadAndWait):
3122         * platform/network/curl/SocketStreamHandle.h:
3123         * platform/network/curl/SocketStreamHandleCurl.cpp:
3124         (WebCore::SocketStreamHandle::platformSend):
3125         (WebCore::SocketStreamHandle::sendData):
3126         * platform/sql/SQLiteDatabaseTracker.cpp:
3127         (WebCore::SQLiteDatabaseTracker::setClient):
3128         (WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
3129         (WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
3130         (WebCore::SQLiteDatabaseTracker::transactionInProgressMutex): Deleted.
3131         * platform/text/TextBreakIterator.cpp:
3132         (WebCore::compareAndSwapNonSharedCharacterBreakIterator):
3133         * platform/text/TextEncodingRegistry.cpp:
3134         (WebCore::newTextCodec):
3135         (WebCore::atomicCanonicalTextEncodingName):
3136         (WebCore::dumpTextEncodingNameMap):
3137         (WebCore::encodingRegistryMutex): Deleted.
3138         * workers/WorkerThread.cpp:
3139         (WebCore::workerThreads):
3140         (WebCore::WorkerThread::workerThreadCount):
3141         (WebCore::WorkerThread::WorkerThread):
3142         (WebCore::WorkerThread::~WorkerThread):
3143         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
3144         (WebCore::threadSetMutex): Deleted.
3145
3146 2015-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3147
3148         Scroll snapping should trigger when receiving a momentum end wheel event
3149         https://bugs.webkit.org/show_bug.cgi?id=148155
3150
3151         Reviewed by Alexey Proskuryakov.
3152
3153         No new tests, since the purpose of this patch is to get existing tests to pass when
3154         allowing similar wheel events to coalesce. To accomplish this, we relax our assumption
3155         that the user must have generated at least 3 momentum wheel events in order for the
3156         gliding animation to trigger. Upon receiving a wheel event indicating the end of the
3157         momentum phase, we now kick off the gliding animation as long as any momentum event
3158         was tracked earlier in the gesture with a nonzero wheel delta.
3159
3160         * platform/cocoa/ScrollController.mm:
3161         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added logic to
3162             begin a glide animation if we have received a momentum end event but have not
3163             yet triggered a gliding animation.
3164         * platform/cocoa/ScrollSnapAnimatorState.h:
3165         * platform/cocoa/ScrollSnapAnimatorState.mm:
3166         (WebCore::ScrollSnapAnimatorState::wheelDeltaTrackingIsInProgress): Minor refactoring
3167             to make the wheel event processing code more readable.
3168         (WebCore::ScrollSnapAnimatorState::hasFinishedTrackingWheelDeltas): Ditto.
3169
3170 2015-08-18  Myles C. Maxfield  <mmaxfield@apple.com>
3171
3172         [Cocoa] Punctuation near Hindi text is garbled when styled with the system font
3173         https://bugs.webkit.org/show_bug.cgi?id=148164
3174
3175         Reviewed by Brian Burg.
3176
3177         Fonts cache whether or not they are the system font. This caching took place at the end of Font::platformInit().
3178         However, in the middle of Font::platformInit(), we look up a glyph, which calls GlyphPage::fill() which consults
3179         with this cache. However, at this point, the cache has not been constructed yet. The solution is just to
3180         construct the cache earlier (at the beginning of the function).
3181
3182         Consulting with the cache before it is populated causes it to erroneously say that no fonts are system fonts.
3183         Then, we use Core Graphics to ask for glyphs instead of Core Text. Core Graphics, however, is incapable of
3184         handling the system font, and returns us garbled results. In particular, when the system language is set to
3185         Japanese, the system font does not support punctuation, and Core Text tells us so. However, Core Graphics
3186         erroneously tells us that the system font does support punctuation.
3187
3188         Then, if text is near the punctuation which causes us to take the complex text codepath (such as Hindi text),
3189         we tell Core Text to explicitly lay out the punctuation using the system font (which does not support
3190         punctuation). Core Text then replies that the provided font doesn't support the punctuation, and that we should
3191         use LastResort with some other glyphs instead. WebKit then disregards the font CoreText told us to use (because
3192         we are oh-so-sure that the font in question supports punctuation) and uses the LastResort glyph IDs with our
3193         font, which causes arbitrary glyphs to be shown.
3194
3195         Test: fast/text/hindi-system-font-punctuation.html
3196
3197         * platform/graphics/cocoa/FontCocoa.mm:
3198         (WebCore::Font::platformInit):
3199
3200 2015-08-18  Joseph Pecoraro  <pecoraro@apple.com>
3201
3202         Web Inspector: Links for rules in <style> are incorrect, do not account for <style> offset in the document
3203         https://bugs.webkit.org/show_bug.cgi?id=148141
3204
3205         Reviewed by Brian Burg.
3206
3207         Test: inspector/css/getAllStyleSheets.html
3208
3209         * css/CSSStyleSheet.h:
3210         * css/CSSStyleSheet.cpp:
3211         (WebCore::CSSStyleSheet::create):
3212         (WebCore::CSSStyleSheet::createInline):
3213         (WebCore::CSSStyleSheet::CSSStyleSheet):
3214         Include the starting position when created by the Parser.
3215         Default to the minimum position, which should never be
3216         possible for an inline <style> because the "<style>" characters
3217         themselves require at least some offset.
3218
3219         * dom/InlineStyleSheetOwner.cpp:
3220         (WebCore::InlineStyleSheetOwner::createSheet):
3221         Provide the start position offset for this stylesheet if it was inline.
3222
3223         * inspector/InspectorStyleSheet.cpp:
3224         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
3225         Include new protocol values for the style sheet.
3226
3227 2015-08-18  Dean Jackson  <dino@apple.com>
3228
3229         Add null check in ImageBufferData::getData
3230         https://bugs.webkit.org/show_bug.cgi?id=148156
3231         <rdar://problem/22337157>
3232
3233         Reviewed by Simon Fraser.
3234
3235         We're getting a number of crash reports that suggest the allocation
3236         of the result buffer has failed, but have been unable to reproduce.
3237         This patch adds a null check to the allocation, and logs a message
3238         to the system console. This might avoid the crashes, and hopefully
3239         we'll see the message.
3240
3241         No new tests, since we're unable to reproduce this crash.
3242
3243         * platform/graphics/cg/ImageBufferDataCG.cpp:
3244         (WebCore::ImageBufferData::getData): Add a null-check and early
3245         return.
3246
3247 2015-08-18  Chris Dumez  <cdumez@apple.com>
3248
3249         Use CSSValuePool::singleton() instead of cssValuePool()
3250         https://bugs.webkit.org/show_bug.cgi?id=148132
3251
3252         Reviewed by Simon Fraser.
3253
3254         Use CSSValuePool::singleton() instead of cssValuePool() to access the
3255         global CSSValuePool instance, as per coding style.
3256
3257 2015-08-17  Matt Rajca  <mrajca@apple.com>
3258
3259         Media Session: don't begin listening for interruptions when an interruption provider is created
3260         https://bugs.webkit.org/show_bug.cgi?id=148109
3261
3262         Reviewed by Eric Carlson.
3263
3264         If we call `beginListeningForInterruption` in MediaSessionInterruptionProvider's constructor, the current
3265         class's implementation will get called, not implementations provided by subclasses (this makes sense since base
3266         classes are initialized before derived classes). To fix this, we let clients of
3267         MediaSessionInterruptionProvider start listening for interruptions instead. As a corollary of this, we can
3268         make MediaSessionInterruptionProvider's methods pure virtual.
3269
3270         * Modules/mediasession/MediaSessionManager.cpp:
3271         (WebCore::MediaSessionManager::MediaSessionManager):
3272         * platform/mediasession/MediaSessionInterruptionProvider.h:
3273         * platform/mediasession/MediaSessionInterruptionProvider.cpp:
3274         (WebCore::MediaSessionInterruptionProvider::MediaSessionInterruptionProvider):
3275
3276 2015-08-18  Eric Carlson  <eric.carlson@apple.com>
3277
3278         Remove "platform text track menu"
3279         https://bugs.webkit.org/show_bug.cgi?id=148139
3280
3281         Reviewed by Jer Noble.
3282
3283         No new tests, this patch removes unused code.
3284
3285         * WebCore.xcodeproj/project.pbxproj: Remove PlatformTextTrackMenu.h.
3286         * html/HTMLMediaElement.cpp:
3287         (WebCore::HTMLMediaElement::scheduleDelayedAction): Remove PLATFORM_TEXT_TRACK_MENU.
3288         (WebCore::HTMLMediaElement::pendingActionTimerFired):
3289         (WebCore::HTMLMediaElement::textTrackModeChanged):
3290         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack):
3291         (WebCore::HTMLMediaElement::closeCaptionTracksChanged):
3292         (WebCore::HTMLMediaElement::addAudioTrack):
3293         (WebCore::HTMLMediaElement::clearMediaPlayer):
3294         (WebCore::HTMLMediaElement::setSelectedTextTrack): Deleted.
3295         (WebCore::HTMLMediaElement::platformTextTracks): Deleted.
3296         (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Deleted.
3297         (WebCore::HTMLMediaElement::platformTextTrackMenu): Deleted.
3298         * html/HTMLMediaElement.h:
3299         (WebCore::HTMLMediaElement::player):
3300         * html/track/InbandTextTrack.h:
3301         * html/track/TextTrack.cpp:
3302         (WebCore::TextTrack::hasCue):
3303         (WebCore::TextTrack::isMainProgramContent):
3304         (WebCore::TextTrack::platformTextTrack): Deleted.
3305         * html/track/TextTrack.h:
3306         (WebCore::TextTrack::create):
3307         * platform/graphics/MediaPlayer.cpp:
3308         (WebCore::MediaPlayer::resetMediaEngines):
3309         (WebCore::MediaPlayer::implementsTextTrackControls): Deleted.
3310         (WebCore::MediaPlayer::textTrackMenu): Deleted.
3311         * platform/graphics/MediaPlayer.h:
3312         * platform/graphics/MediaPlayerPrivate.h:
3313         (WebCore::MediaPlayerPrivateInterface::tracksChanged):
3314         (WebCore::MediaPlayerPrivateInterface::simulateAudioInterruption):
3315         (WebCore::MediaPlayerPrivateInterface::implementsTextTrackControls): Deleted.
3316         (WebCore::MediaPlayerPrivateInterface::textTrackMenu): Deleted.
3317         * platform/graphics/PlatformTextTrack.h:
3318         * platform/graphics/PlatformTextTrackMenu.h: Removed.
3319
3320 2015-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3321
3322         Search input results and clear icons are misaligned when padding is added
3323         https://bugs.webkit.org/show_bug.cgi?id=148146
3324         <rdar://problem/22310951>
3325
3326         Reviewed by Zalan Bujtas.
3327
3328         Use content box rect to determine where to draw the results and cancel buttons
3329         of a search field that has -webkit-appearance: textfield. Previously, we used
3330         the bounding box, which caused the buttons to render in the input's padding
3331         region.
3332
3333         Test: platform/mac/fast/forms/search/search-padding-cancel-results-buttons.html
3334
3335         * rendering/RenderThemeMac.mm:
3336         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Use content box to
3337             compute where to render cancel button.
3338         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Use content box to
3339             compute where to render results button.
3340
3341 2015-08-18  Dean Jackson  <dino@apple.com>
3342
3343         CAOpenGLLayer doesn't need an SPI declaration
3344         https://bugs.webkit.org/show_bug.cgi?id=148151
3345
3346         Reviewed by Tim Horton.
3347
3348         Follow-up to https://trac.webkit.org/r188608.
3349         The property is in the public SDK, so we don't need
3350         to declare it.
3351
3352         * platform/spi/cocoa/QuartzCoreSPI.h:
3353
3354 2015-08-18  Myles C. Maxfield  <mmaxfield@apple.com>
3355
3356         [El Capitan] Fix the open source build
3357         https://bugs.webkit.org/show_bug.cgi?id=148134
3358
3359         Reviewed by Anders Carlsson.
3360
3361         No new tests because there is no behavior change.
3362
3363         Need to declare CGFontRenderingStyle.
3364
3365         * platform/spi/cocoa/CoreTextSPI.h:
3366
3367 2015-08-18  Dean Jackson  <dino@apple.com>
3368
3369         CAOpenGLLayer needs a named class extension for non-internal installs
3370         https://bugs.webkit.org/show_bug.cgi?id=148151
3371         <rdar://problem/22335111>
3372
3373         Reviewed by Tim Horton.
3374
3375         In order to build using the public SDK on El Capitan, we can't
3376         use a class extension to declare this SPI.
3377
3378         No change in behaviour, so no new tests.
3379
3380         * platform/spi/cocoa/QuartzCoreSPI.h:
3381
3382 2015-08-18  Simon Fraser  <simon.fraser@apple.com>
3383
3384         will-change: backface-visibility should not cause stacking context
3385         https://bugs.webkit.org/show_bug.cgi?id=148091
3386
3387         Reviewed by Zalan Bujtas.
3388         
3389         Take CSSPropertyWebkitBackfaceVisibility out of the list of properties that causes
3390         will-change to create stacking context, since no value of the property creates
3391         stacking.
3392
3393         Move willChangeCreatesStackingContext() and shouldWillChangeCreateStackingContext()
3394         into RenderInline since it's only called from there.
3395
3396         * rendering/RenderElement.cpp:
3397         (WebCore::RenderElement::shouldWillChangeCreateStackingContext): Deleted.
3398         * rendering/RenderElement.h:
3399         (WebCore::RenderElement::willChangeCreatesStackingContext): Deleted.
3400         * rendering/RenderInline.h:
3401         (WebCore::RenderInline::willChangeCreatesStackingContext):
3402         * rendering/style/WillChangeData.cpp:
3403         (WebCore::propertyCreatesStackingContext): Deleted.
3404
3405 2015-08-18  Alex Christensen  <achristensen@webkit.org>
3406
3407         Unreviewed, fix the cairo build after r188594.
3408
3409         * platform/network/curl/CurlDownload.h:
3410         * platform/network/curl/ResourceHandleManager.cpp:
3411         Include Lock.h
3412
3413 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
3414
3415         Unreviewed, fix the cairo build.
3416
3417         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3418
3419 2015-08-17  Filip Pizlo  <fpizlo@apple.com>
3420
3421         Replace all remaining uses of WTF::Mutex with WTF::Lock
3422         https://bugs.webkit.org/show_bug.cgi?id=148089
3423
3424         Reviewed by Geoffrey Garen.
3425
3426         No new tests because no new behavior.
3427
3428         * Modules/webaudio/AsyncAudioDecoder.cpp:
3429         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
3430         (WebCore::AsyncAudioDecoder::runLoop):
3431         * Modules/webaudio/AsyncAudioDecoder.h:
3432         * Modules/webaudio/AudioContext.h:
3433         * Modules/webaudio/MediaStreamAudioSource.cpp:
3434         (WebCore::MediaStreamAudioSource::addAudioConsumer):
3435         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
3436         (WebCore::MediaStreamAudioSource::setAudioFormat):
3437         (WebCore::MediaStreamAudioSource::consumeAudio):
3438         * Modules/webaudio/MediaStreamAudioSource.h:
3439         * Modules/webdatabase/Database.cpp:
3440         (WebCore::Database::close):
3441         (WebCore::Database::runTransaction):
3442         (WebCore::Database::inProgressTransactionCompleted):
3443         (WebCore::Database::hasPendingTransaction):
3444         * Modules/webdatabase/Database.h:
3445         * Modules/webdatabase/DatabaseTask.cpp:
3446         (WebCore::DatabaseTaskSynchronizer::taskCompleted):
3447         * Modules/webdatabase/DatabaseTask.h:
3448         * Modules/webdatabase/DatabaseThread.cpp:
3449         (WebCore::DatabaseThread::start):
3450         (WebCore::DatabaseThread::databaseThread):
3451         * Modules/webdatabase/DatabaseThread.h:
3452         * Modules/webdatabase/DatabaseTracker.cpp:
3453         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
3454         (WebCore::DatabaseTracker::canEstablishDatabase):
3455         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
3456         (WebCore::DatabaseTracker::hasEntryForOrigin):
3457         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
3458         (WebCore::DatabaseTracker::closeAllDatabases):
3459         (WebCore::DatabaseTracker::fullPathForDatabase):
3460         (WebCore::DatabaseTracker::origins):
3461         (WebCore::DatabaseTracker::databaseNamesForOrigin):
3462         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
3463         (WebCore::DatabaseTracker::setDatabaseDetails):
3464         (WebCore::DatabaseTracker::doneCreatingDatabase):
3465         (WebCore::DatabaseTracker::addOpenDatabase):
3466         (WebCore::DatabaseTracker::removeOpenDatabase):
3467         (WebCore::DatabaseTracker::getOpenDatabases):
3468         (WebCore::DatabaseTracker::originLockFor):
3469         (WebCore::DatabaseTracker::quotaForOrigin):
3470         (WebCore::DatabaseTracker::setQuota):
3471         (WebCore::DatabaseTracker::deleteOrigin):
3472         (WebCore::DatabaseTracker::deleteDatabase):
3473         (WebCore::DatabaseTracker::deleteDatabaseFile):
3474         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
3475         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
3476         (WebCore::DatabaseTracker::openDatabaseMutex):
3477         (WebCore::DatabaseTracker::setClient):
3478         (WebCore::notificationMutex):
3479         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
3480         (WebCore::DatabaseTracker::notifyDatabasesChanged):
3481         * Modules/webdatabase/DatabaseTracker.h:
3482         * Modules/webdatabase/OriginLock.h:
3483         * Modules/webdatabase/SQLCallbackWrapper.h:
3484         (WebCore::SQLCallbackWrapper::clear):
3485         (WebCore::SQLCallbackWrapper::unwrap):
3486         (WebCore::SQLCallbackWrapper::hasCallback):
3487         * Modules/webdatabase/SQLTransactionBackend.cpp:
3488         (WebCore::SQLTransactionBackend::doCleanup):
3489         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
3490         (WebCore::SQLTransactionBackend::getNextStatement):
3491         * Modules/webdatabase/SQLTransactionBackend.h:
3492         * bindings/js/WorkerScriptController.cpp:
3493         (WebCore::WorkerScriptController::scheduleExecutionTermination):
3494         (WebCore::WorkerScriptController::isExecutionTerminating):
3495         * bindings/js/WorkerScriptController.h:
3496         * dom/default/PlatformMessagePortChannel.cpp:
3497         (WebCore::MessagePortChannel::postMessageToRemote):
3498         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
3499         (WebCore::MessagePortChannel::isConnectedTo):
3500         (WebCore::MessagePortChannel::hasPendingActivity):
3501         (WebCore::MessagePortChannel::locallyEntangledPort):
3502         (WebCore::PlatformMessagePortChannel::setRemotePort):
3503         (WebCore::PlatformMessagePortChannel::entangledChannel):
3504         (WebCore::PlatformMessagePortChannel::closeInternal):
3505         * dom/default/PlatformMessagePortChannel.h:
3506         * loader/icon/IconDatabase.cpp:
3507         (WebCore::IconDatabase::removeAllIcons):
3508         (WebCore::IconDatabase::synchronousIconForPageURL):
3509         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
3510         (WebCore::IconDatabase::synchronousIconURLForPageURL):
3511         (WebCore::IconDatabase::retainIconForPageURL):
3512         (WebCore::IconDatabase::performRetainIconForPageURL):
3513         (WebCore::IconDatabase::releaseIconForPageURL):
3514         (WebCore::IconDatabase::performReleaseIconForPageURL):
3515         (WebCore::IconDatabase::setIconDataForIconURL):
3516         (WebCore::IconDatabase::setIconURLForPageURL):
3517         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
3518         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
3519         (WebCore::IconDatabase::pageURLMappingCount):
3520         (WebCore::IconDatabase::retainedPageURLCount):
3521         (WebCore::IconDatabase::iconRecordCount):
3522         (WebCore::IconDatabase::iconRecordCountWithData):
3523         (WebCore::IconDatabase::wakeSyncThread):
3524         (WebCore::IconDatabase::scheduleOrDeferSyncTimer):
3525         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
3526         (WebCore::IconDatabase::databasePath):
3527         (WebCore::IconDatabase::getOrCreatePageURLRecord):
3528         (WebCore::IconDatabase::iconDatabaseSyncThread):
3529         (WebCore::IconDatabase::performOpenInitialization):
3530         (WebCore::IconDatabase::performURLImport):
3531         (WebCore::IconDatabase::syncThreadMainLoop):
3532         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
3533         (WebCore::IconDatabase::readFromDatabase):
3534         (WebCore::IconDatabase::writeToDatabase):
3535         (WebCore::IconDatabase::pruneUnretainedIcons):
3536         (WebCore::IconDatabase::cleanupSyncThread):
3537         * loader/icon/IconDatabase.h:
3538         * page/scrolling/ScrollingTree.cpp:
3539         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
3540         (WebCore::ScrollingTree::commitNewTreeState):
3541         (WebCore::ScrollingTree::setMainFramePinState):
3542         (WebCore::ScrollingTree::mainFrameScrollPosition):
3543         (WebCore::ScrollingTree::setMainFrameScrollPosition):
3544         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
3545         (WebCore::ScrollingTree::isRubberBandInProgress):
3546         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
3547         (WebCore::ScrollingTree::isScrollSnapInProgress):
3548         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
3549         (WebCore::ScrollingTree::setCanRubberBandState):
3550         (WebCore::ScrollingTree::rubberBandsAtLeft):
3551         (WebCore::ScrollingTree::rubberBandsAtRight):
3552         (WebCore::ScrollingTree::rubberBandsAtBottom):
3553         (WebCore::ScrollingTree::rubberBandsAtTop):
3554         (WebCore::ScrollingTree::setScrollPinningBehavior):
3555         (WebCore::ScrollingTree::scrollPinningBehavior):
3556         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
3557         (WebCore::ScrollingTree::latchedNode):
3558         (WebCore::ScrollingTree::setLatchedNode):
3559         (WebCore::ScrollingTree::clearLatchedNode):
3560         * page/scrolling/ScrollingTree.h:
3561         * platform/MemoryPressureHandler.h:
3562         * platform/audio/HRTFDatabaseLoader.cpp:
3563         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
3564         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
3565         * platform/audio/HRTFDatabaseLoader.h:
3566         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3567         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
3568         (WebCore::MemoryPressureHandler::clearMemoryPressure):
3569         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
3570         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
3571         * platform/graphics/DisplayRefreshMonitor.cpp:
3572         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
3573         * platform/graphics/DisplayRefreshMonitor.h:
3574         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
3575         (WebCore::DisplayRefreshMonitor::mutex):
3576         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3577         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
3578         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
3579         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
3580         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3581         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3582         (WebCore::AVFWrapper::callbackContext):
3583         (WebCore::AVFWrapper::~AVFWrapper):
3584         (WebCore::AVFWrapper::mapLock):
3585         (WebCore::AVFWrapper::addToMap):
3586         (WebCore::AVFWrapper::removeFromMap):
3587         (WebCore::AVFWrapper::periodicTimeObserverCallback):
3588         (WebCore::AVFWrapper::processNotification):
3589         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
3590         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
3591         (WebCore::AVFWrapper::seekCompletedCallback):
3592         (WebCore::AVFWrapper::processCue):
3593         (WebCore::AVFWrapper::legibleOutputCallback):
3594         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
3595         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
3596         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
3597         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
3598         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
3599         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
3600         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3601         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
3602         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
3603         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
3604         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
3605         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
3606         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
3607         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3608         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
3609         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
3610         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
3611         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
3612         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
3613         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3614         * platform/ios/LegacyTileCache.h:
3615         * platform/ios/LegacyTileCache.mm:
3616         (WebCore::LegacyTileCache::setTilesOpaque):
3617         (WebCore::LegacyTileCache::doLayoutTiles):
3618         (WebCore::LegacyTileCache::setCurrentScale):
3619         (WebCore::LegacyTileCache::commitScaleChange):
3620         (WebCore::LegacyTileCache::layoutTilesNow):
3621         (WebCore::LegacyTileCache::layoutTilesNowForRect):
3622         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
3623         (WebCore::LegacyTileCache::removeAllTiles):
3624         (WebCore::LegacyTileCache::removeForegroundTiles):
3625         (WebCore::LegacyTileCache::setContentReplacementImage):
3626         (WebCore::LegacyTileCache::contentReplacementImage):
3627         (WebCore::LegacyTileCache::tileCreationTimerFired):
3628         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
3629         (WebCore::LegacyTileCache::updateTilingMode):
3630         (WebCore::LegacyTileCache::setTilingMode):
3631         (WebCore::LegacyTileCache::doPendingRepaints):
3632         (WebCore::LegacyTileCache::flushSavedDisplayRects):
3633         (WebCore::LegacyTileCache::prepareToDraw):
3634         * platform/ios/LegacyTileLayerPool.h:
3635         * platform/ios/LegacyTileLayerPool.mm:
3636         (WebCore::LegacyTileLayerPool::addLayer):
3637         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
3638         (WebCore::LegacyTileLayerPool::setCapacity):
3639         (WebCore::LegacyTileLayerPool::prune):
3640         (WebCore::LegacyTileLayerPool::drain):
3641         * platform/network/curl/CurlDownload.cpp:
3642         (WebCore::CurlDownloadManager::add):
3643         (WebCore::CurlDownloadManager::remove):
3644         (WebCore::CurlDownloadManager::getActiveDownloadCount):
3645         (WebCore::CurlDownloadManager::getPendingDownloadCount):
3646         (WebCore::CurlDownloadManager::stopThreadIfIdle):
3647         (WebCore::CurlDownloadManager::updateHandleList):
3648         (WebCore::CurlDownload::~CurlDownload):
3649         (WebCore::CurlDownload::init):
3650         (WebCore::CurlDownload::getTempPath):
3651         (WebCore::CurlDownload::getUrl):
3652         (WebCore::CurlDownload::getResponse):
3653         (WebCore::CurlDownload::closeFile):
3654         (WebCore::CurlDownload::didReceiveHeader):
3655         (WebCore::CurlDownload::didReceiveData):
3656         (WebCore::CurlDownload::didFail):
3657         * platform/network/curl/CurlDownload.h:
3658         * platform/network/curl/ResourceHandleManager.cpp:
3659         (WebCore::cookieJarPath):
3660         (WebCore::sharedResourceMutex):
3661         (WebCore::curl_lock_callback):
3662         (WebCore::curl_unlock_callback):
3663         * platform/network/ios/QuickLook.mm:
3664         (WebCore::QLDirectoryAttributes):
3665         (qlPreviewConverterDictionaryMutex):
3666         (WebCore::addQLPreviewConverterWithFileForURL):
3667         (WebCore::qlPreviewConverterUTIForURL):
3668         (WebCore::removeQLPreviewConverterForURL):
3669         (WebCore::safeQLURLForDocumentURLAndResourceURL):
3670         * platform/sql/SQLiteDatabase.cpp:
3671         (WebCore::SQLiteDatabase::close):
3672         (WebCore::SQLiteDatabase::maximumSize):
3673         (WebCore::SQLiteDatabase::setMaximumSize):
3674         (WebCore::SQLiteDatabase::pageSize):
3675         (WebCore::SQLiteDatabase::freeSpaceSize):
3676         (WebCore::SQLiteDatabase::totalSize):
3677         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
3678         (WebCore::SQLiteDatabase::setAuthorizer):
3679         * platform/sql/SQLiteDatabase.h:
3680         (WebCore::SQLiteDatabase::databaseMutex):
3681         * platform/sql/SQLiteStatement.cpp:
3682         (WebCore::SQLiteStatement::prepare):
3683         (WebCore::SQLiteStatement::step):
3684         * workers/WorkerThread.cpp:
3685         (WebCore::WorkerThread::start):
3686         (WebCore::WorkerThread::workerThread):
3687         (WebCore::WorkerThread::stop):
3688         * workers/WorkerThread.h:
3689
3690 2015-08-18  Myles C. Maxfield  <mmaxfield@apple.com>
3691
3692         [Cocoa] Honor the 'trak' table by opting in via text-rendering: optimizeLegibility
3693         https://bugs.webkit.org/show_bug.cgi?id=148119
3694         <rdar://problem/22291561>
3695
3696         Reviewed by Tim Horton.
3697
3698         When the author has opted in by specifying "text-rendering: optimizeLegibility;", we should
3699         honor the font's 'trak' table. We do this by specifying kCTFontOpticalSizeAttribute at font
3700         creation time, and by using CTFontGetAdvancesForGlyphs() instead of
3701         CGFontGetGlyphAdvancesForStyle().
3702
3703         Test: fast/text/trak-optimizeLegibility.html
3704
3705         * platform/graphics/FontCache.h:
3706         (WebCore::FontDescriptionKey::makeFlagKey): Make our caches sensitive to TextRenderingMode.
3707         * platform/graphics/FontPlatformData.cpp:
3708         (WebCore::FontPlatformData::FontPlatformData): Add a TextRenderingMode member variable.
3709         (WebCore::FontPlatformData::operator=): Update to consult with the new member.
3710         * platform/graphics/FontPlatformData.h:
3711         (WebCore::FontPlatformData::textRenderingMode): Getter.
3712         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3713         (WebCore::preparePlatformFont): Specify kCTFontOpticalSizeAttribute.
3714         (WebCore::applyFontFeatureSettings): Deleted.
3715         * platform/graphics/cocoa/FontCocoa.mm:
3716         (WebCore::canUseFastGlyphAdvanceGetter): Use CTFontGetAdvancesForGlyphs() if we are
3717         optimizeLegibility.
3718         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3719         (WebCore::FontPlatformData::FontPlatformData): Pass the TextRenderingMode around.
3720         * platform/graphics/ios/FontCacheIOS.mm:
3721         (WebCore::FontCache::getSystemFontFallbackForCharacters): Update to call renamed function.
3722         (WebCore::FontCache::createFontPlatformData): Ditto.
3723         * platform/graphics/mac/FontCacheMac.mm:
3724         (WebCore::fontWithFamily): Ditto.
3725         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
3726         (WebCore::FontCache::createFontPlatformData): Ditto.
3727         * platform/graphics/mac/FontCustomPlatformData.cpp:
3728         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
3729         * platform/spi/cocoa/CoreTextSPI.h:
3730         * rendering/RenderThemeIOS.mm:
3731         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): Ditto.
3732
3733 2015-08-18  Chris Dumez  <cdumez@apple.com>
3734
3735         Make our bindings' GetOwnPropertySlot() behave according to specification
3736         https://bugs.webkit.org/show_bug.cgi?id=148092
3737
3738         Reviewed by Geoffrey Garen.
3739
3740         Make our bindings' GetOwnPropertySlot() behave according to
3741         specification. In particular, our bindings use to do:
3742         1. Indexed getter
3743         2. Check static properties
3744         3. Prototype check
3745         4. Named getter
3746         5. Check own properties
3747
3748         According to the specification [1][2], we should do:
3749         - If the interface has [OverrideBuiltins]:
3750             1. Indexed getter
3751             2. Named getter
3752             3. Static / own properties
3753         - Otherwise:
3754             1. Indexed getter
3755             2. Static / own properties
3756             3. Prototype check
3757             4. Named getter
3758
3759         This patch adds support for the [OverrideBuiltins] IDL extended
3760         attribute [3] and aligns our bindings implementation with the Web IDL
3761         specification weither that IDL extended attribute is present or
3762         not.
3763         
3764         [1] https://heycam.github.io/webidl/#getownproperty-guts
3765         [2] https://heycam.github.io/webidl/#dfn-named-property-visibility
3766         [3] https://heycam.github.io/webidl/#OverrideBuiltins
3767
3768         Performance:
3769         - PerformanceTests/Bindings/childNodes-traversal.html: ~Same
3770         - PerformanceTests/Bindings/children-traversal.html: +104% :)
3771
3772         No new tests, covered by:
3773         fast/dom/htmlcollection-getownproperty.html
3774         fast/dom/collection-length-should-not-be-overridden.html
3775         fast/forms/input-named-action-overrides-action-attribute.html
3776
3777         * bindings/js/JSHTMLCollectionCustom.cpp:
3778         (WebCore::JSHTMLCollection::nameGetter):
3779         Add assertions to make sure we don't use HTMLCollection's namedGetter()
3780         for HTMLFormControlsCollection / HTMLOptionsCollection subclasses.
3781         We should use the subclasses' namedGetter() instead.
3782
3783         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
3784         (WebCore::JSHTMLOptionsCollection::canGetItemsForName):
3785         (WebCore::JSHTMLOptionsCollection::nameGetter):
3786         Add code for handling named getter requests on
3787         HTMLOptionsCollection.
3788
3789         * bindings/js/JSNodeListCustom.cpp:
3790         (WebCore::JSNodeList::canGetItemsForName):
3791         (WebCore::JSNodeList::nameGetter):
3792         Refactor custom code for the NodeList named getter, now that the
3793         IDL interface is using [CustomNamedGetter] instead of
3794         [JSCustomGetOwnPropertySlotAndDescriptor].
3795
3796         * bindings/scripts/CodeGeneratorJS.pm:
3797         (GenerateGetOwnPropertySlotBody):
3798         (GenerateHeaderContentHeader): Deleted.
3799         - Add support for the [OverrideBuiltins] IDL extended attribute and
3800         update the generated getOwnPropertySlot() methods to match the
3801         Web IDL specification.
3802         - Also drop the JSC::HasImpureGetOwnPropertySlot flag for interfaces
3803         that have a named getter but NOT the [OverrideBuiltins] IDL extended
3804         attribute. Without [OverrideBuiltins], named properties can no longer
3805         shadow own properties so we no longer need to mark GetOwnPropertySlot
3806         as impure. This allows caching of properties.
3807
3808         * bindings/scripts/IDLAttributes.txt:
3809         Add [OverrideBuiltins] IDL extended attribute [3].
3810
3811         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3812         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
3813         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3814         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
3815         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3816         (WebCore::JSTestEventTarget::getOwnPropertySlot):
3817         * bindings/scripts/test/JS/JSTestException.cpp:
3818         (WebCore::JSTestException::getOwnPropertySlot):
3819         * bindings/scripts/test/JS/JSTestInterface.cpp:
3820         (WebCore::JSTestInterface::getOwnPropertySlot):
3821         * bindings/scripts/test/JS/JSTestObj.cpp:
3822         (WebCore::JSTestObj::getOwnPropertySlot):
3823         Rebaseline the bindings tests as their getOwnPropertySlot() method
3824         is now different.
3825
3826         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltins.cpp: Added.
3827         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltins.h: Added.
3828         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltinsPrivate.h: Added.
3829         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: Added.
3830         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: Added.
3831         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3832         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.h: Added.
3833         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm: Added.
3834         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltinsInternal.h: Added.
3835         * bindings/scripts/test/TestOverrideBuiltins.idl: Added.
3836         Add bindings test coverage for the new [OverrideBuiltins] IDL extended
3837         attribute [3].
3838
3839         * dom/DOMStringMap.idl:
3840         Add [OverrideBuiltins] IDL extended attribute to match the specification:
3841         https://html.spec.whatwg.org/multipage/infrastructure.html#domstringmap
3842
3843         * dom/NodeList.idl:
3844         Use CustomNamedGetter IDL extended attribute instead of
3845         JSCustomGetOwnPropertySlotAndDescriptor as NodeList merely implements
3846         a custom named getter. This makes sure that the order in which the
3847         named getter is called is correct as per the Web IDL specification.
3848
3849         * html/HTMLDocument.idl:
3850         Add [OverrideBuiltins] IDL extended attribute to match the specification:
3851         https://html.spec.whatwg.org/multipage/dom.html#the-document-object
3852
3853         * html/HTMLFormElement.idl:
3854         Add [OverrideBuiltins] IDL extended attribute to match the specification:
3855         https://html.spec.whatwg.org/multipage/forms.html#the-form-element
3856
3857         * html/HTMLOptionsCollection.idl:
3858         Add missing 'getter' in front of the named getter, as the per the HTML
3859         specification. Without this, HTMLOptionsCollection would not be
3860         recognized as a named properties object, which means that we would not
3861         check the HTMLOptionsCollection prototype before querying the named
3862         getter on HTMLCollection. This used to work because the bindings
3863         generator was hard-coding the prototype check for every HTML*Collection
3864         IDL interface. In this patch, we generalized the check to every
3865         interface that has a named getter.
3866
3867 2015-08-18  Per Arne Vollan  <peavo@outlook.com>
3868
3869         [Win] Popup menu displayed at incorrect position when page is scrolled and device scale factor != 1.
3870         https://bugs.webkit.org/show_bug.cgi?id=148130
3871
3872         Reviewed by Alex Christensen.
3873
3874         Scale WebView coordinates with device scale factor.
3875
3876         * platform/win/PopupMenuWin.cpp:
3877         (WebCore::PopupMenuWin::calculatePositionAndSize):
3878
3879 2015-08-18  Javier Fernandez  <jfernandez@igalia.com>
3880
3881         [CSS Grid Layout] Do not stretch always grid items with auto width
3882         https://bugs.webkit.org/show_bug.cgi?id=148069
3883
3884         Reviewed by Darin Adler.
3885
3886         We assumed that any grid item with 'auto' width will be stretched
3887         to fill all the available space in its grid area. We assumed this
3888         because grid area acts as item's container.
3889
3890         However, Grid Layout specification states on its Alignment section
3891         that items will be stretched by default, unless either
3892         justify-self or align-self compute to a value other than stretch
3893         or margins are auto. In those cases, grid items will auto-size to
3894         fit their contents.
3895
3896         Tests:
3897         fast/css-grid-layout/grid-align-justify-stretch.html
3898         fast/css-grid-layout/grid-item-auto-margins-and-stretch.html
3899         fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html
3900
3901         * rendering/RenderBox.cpp:
3902         (WebCore::RenderBox::computeLogicalWidthInRegion):
3903         * rendering/RenderGrid.cpp:
3904         (WebCore::RenderGrid::layoutGridItems):
3905         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
3906         (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
3907         * rendering/RenderGrid.h:
3908
3909 2015-08-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3910
3911         [Streams API] Update implementation with the latest spec
3912         https://bugs.webkit.org/show_bug.cgi?id=147978
3913
3914         Reviewed by Darin Adler.
3915
3916         Changed the way the read and closed promises are resolved and the stream is released when an even closes or
3917         errors the stream.
3918
3919         Current tests suffice after changing the order of the promise resolution according to the new spec.
3920
3921         * Modules/streams/ReadableStream.cpp:
3922         (WebCore::ReadableStream::releaseReader): Changed how the promises are resolved.
3923         (WebCore::ReadableStream::changeStateToErrored): Changed how the promises are resolved and manually releasing
3924         the stream instead of calling releaseReader according to the spec.
3925
3926 2015-08-17  Zalan Bujtas  <zalan@apple.com>
3927
3928         Outline with auto style leaves bits behind when the the box is moved.
3929         https://bugs.webkit.org/show_bug.cgi?id=148100
3930
3931         Reviewed by Simon Fraser.
3932
3933         We paint the focus ring when 'outline-style: auto' is present, however
3934         we don't take the focus ring width into account when the repaint rect
3935         is computed.
3936
3937         Tests: fast/repaint/outline-with1px-auto-repaint-rect.html
3938                fast/repaint/outline-with2px-auto-repaint-rect.html
3939                fast/repaint/outline-with3px-auto-repaint-rect.html
3940
3941         * rendering/RenderObject.cpp:
3942         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
3943         * rendering/RenderThemeMac.h:
3944         * rendering/RenderThemeMac.mm:
3945         (WebCore::RenderThemeMac::platformFocusRingMaxWidth): Deleted. : 0 as focus ring width is incorrect.
3946         The reason why r169699 fixed the failing cases was because they all had outline width < 3 (but no auto outline style).
3947         The correct fix is to check if the style requires focus ring painting and use the RenderTheme::platformFocusRingMaxWidth
3948         accordingly.
3949
3950 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
3951
3952         [Cocoa] Address post-commit review
3953         https://bugs.webkit.org/show_bug.cgi?id=147864
3954
3955         Reviewed by Darin Adler.
3956
3957         Create helper functions to cast between NSFont*s and CTFontRefs.
3958
3959         No new tests because there is no behavior change.
3960
3961         * platform/graphics/FontPlatformData.h:
3962         (WebCore::toCTFont):
3963         (WebCore::toNSFont):
3964         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3965         * platform/graphics/cocoa/FontCocoa.mm:
3966         (WebCore::Font::platformCreateScaledFont):
3967         (WebCore::Font::compositeFontReferenceFont):
3968         * platform/graphics/mac/FontCacheMac.mm:
3969         (WebCore::FontCache::platformPurgeInactiveFontData):
3970         (WebCore::lookupCTFont):
3971         (WebCore::FontCache::systemFallbackForCharacters):
3972         (WebCore::FontCache::createFontPlatformData):
3973         * platform/mac/DragImageMac.mm:
3974         (WebCore::fontFromNSFont):
3975         (WebCore::widthWithFont):
3976         (WebCore::drawAtPoint):
3977         * platform/spi/mac/NSFontSPI.h:
3978
3979 2015-08-17  Alex Christensen  <achristensen@webkit.org>
3980
3981         WinCairo build fix after r188566
3982
3983         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
3984         (WebCore::FontPlatformData::FontPlatformData):
3985         Remove reference to removed m_isCompositeFontReference.
3986
3987 2015-08-17  Alex Christensen  <achristensen@webkit.org>
3988
3989         Add const to content extension parser
3990         https://bugs.webkit.org/show_bug.cgi?id=148044
3991
3992         Reviewed by Benjamin Poulain.
3993
3994         * contentextensions/ContentExtensionParser.cpp:
3995         (WebCore::ContentExtensions::containsOnlyASCIIWithNoUppercase):
3996         (WebCore::ContentExtensions::getDomainList):
3997         (WebCore::ContentExtensions::getTypeFlags):
3998         (WebCore::ContentExtensions::loadTrigger):
3999         (WebCore::ContentExtensions::loadAction):
4000         (WebCore::ContentExtensions::loadRule):
4001         (WebCore::ContentExtensions::loadEncodedRules):
4002         Add const.  No change in behavior.
4003
4004 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
4005
4006         [OS X] Remove support for composite fonts
4007         https://bugs.webkit.org/show_bug.cgi?id=147920
4008
4009         Reviewed by Dan Bernstein.
4010
4011         Composite fonts were first introduced in [1]. These composite fonts are extremely rare
4012         because:
4013         1. None of the preinstalled fonts on either OS X nor iOS are composite fonts,
4014         2. WebKit does not support loading web fonts from composite font files, and
4015         3. WebKit's support only ever existed on OS X (none of the other ports).
4016
4017         In fact, no one I've consulted with has ever seen any of these fonts used in the wild.
4018         The fonts also require a fundamentally broken code path, and add complexity to WebKit.
4019
4020         [1] https://bugs.webkit.org/attachment.cgi?id=134923&action=review
4021
4022         No new tests.
4023
4024         * platform/graphics/Font.h:
4025         * platform/graphics/FontPlatformData.cpp:
4026         (WebCore::FontPlatformData::FontPlatformData): Deleted.
4027         (WebCore::FontPlatformData::operator=): Deleted.
4028         * platform/graphics/FontPlatformData.h:
4029         (WebCore::FontPlatformData::isCompositeFontReference): Deleted.
4030         (WebCore::FontPlatformData::operator==): Deleted.
4031         * platform/graphics/cocoa/FontCocoa.mm:
4032         (WebCore::Font::compositeFontReferenceFont): Deleted.
4033         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
4034         (WebCore::FontPlatformData::FontPlatformData): Deleted.
4035         (WebCore::FontPlatformData::setFont): Deleted.
4036         * platform/graphics/mac/GlyphPageMac.cpp:
4037         (WebCore::shouldUseCoreText):
4038         (WebCore::GlyphPage::fill):
4039
4040 2015-08-17  Tim Horton  <timothy_horton@apple.com>
4041
4042         Some functions on DictionaryLookup.h should just be generic functions elsewhere
4043         https://bugs.webkit.org/show_bug.cgi?id=138567
4044
4045         Reviewed by Dean Jackson.
4046
4047         No new tests, just refactoring.
4048
4049         * dom/Range.cpp:
4050         (WebCore::Range::contains):
4051         * dom/Range.h:
4052         Add a Range::contains(VisiblePosition).
4053         It's simpler than the old thing from DictionaryLookup.mm, but does the same thing.
4054         It's so simple that it doesn't necessarily need to exist, but it seems useful.