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