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