713d4b01e09c918d36fdfe39f9c3b79e7549facd
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-31  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r189198.
4         https://bugs.webkit.org/show_bug.cgi?id=148670
5
6         "Caused http/tests/navigation/anchor-frames-same-origin.html
7         to fail on WebKit1" (Requested by cdumez on #webkit).
8
9         Reverted changeset:
10
11         "http/tests/w3c/dom/nodes/Element-matches.html is flaky"
12         https://bugs.webkit.org/show_bug.cgi?id=148615
13         http://trac.webkit.org/changeset/189198
14
15 2015-08-31  Joseph Pecoraro  <pecoraro@apple.com>
16
17         Remove unused #define
18         https://bugs.webkit.org/show_bug.cgi?id=148667
19
20         Reviewed by Benjamin Poulain.
21
22         * platform/network/cf/ResourceResponseCFNet.cpp:
23
24 2015-08-31  Chris Dumez  <cdumez@apple.com>
25
26         Range API is throwing wrong exception type
27         https://bugs.webkit.org/show_bug.cgi?id=148648
28
29         Reviewed by Ryosuke Niwa.
30
31         The RangeException type does not exist in the latest DOM specification.
32         Instead, the Range API is throwing regular DOMExceptions [1]:
33         https://dom.spec.whatwg.org/#range
34
35         The error codes also differ. RangeException.INVALID_NODE_TYPE_ERR (2)
36         is replaced with DOMException.INVALID_NODE_TYPE_ERR (24).
37         RangeException.BAD_BOUNDARYPOINTS_ERR (1) is replaced by
38         DOMException.INVALID_STATE_ERR (11), as per:
39         https://dom.spec.whatwg.org/#dom-range-surroundcontents (step 1).
40
41         This patch aligns WebKit's behavior with the specification and with
42         other browsers (tested Firefox and Chrome).
43
44         [1] https://heycam.github.io/webidl/#dfn-DOMException
45
46         No new tests, covered by existing tests (rebaselined):
47         http/tests/w3c/dom/ranges/Range-comparePoint.html
48         http/tests/w3c/dom/ranges/Range-isPointInRange.html
49         http/tests/w3c/dom/ranges/Range-selectNode.html
50         http/tests/w3c/dom/ranges/Range-set.html
51         http/tests/w3c/dom/ranges/Range-surroundContents.html
52
53         * CMakeLists.txt:
54         * DerivedSources.cpp:
55         * DerivedSources.make:
56         * WebCore.vcxproj/WebCore.vcxproj:
57         * WebCore.vcxproj/WebCore.vcxproj.filters:
58         * WebCore.xcodeproj/project.pbxproj:
59         * bindings/js/JSExceptionBase.cpp:
60         (WebCore::toExceptionBase): Deleted.
61         * dom/DOMAllInOne.cpp:
62         * dom/DOMExceptions.in:
63         * dom/Range.cpp:
64         (WebCore::Range::insertNode):
65         (WebCore::Range::checkNodeWOffset):
66         (WebCore::Range::checkNodeBA):
67         (WebCore::Range::selectNode):
68         (WebCore::Range::selectNodeContents):
69         (WebCore::Range::surroundContents):
70         * dom/RangeException.cpp: Removed.
71         * dom/RangeException.h: Removed.
72         * dom/RangeException.idl: Removed.
73
74 2015-08-31  Yusuke Suzuki  <utatane.tea@gmail.com>
75
76         [ES6] Introduce ModuleProgramExecutable families and compile Module code to bytecode
77         https://bugs.webkit.org/show_bug.cgi?id=148581
78
79         Reviewed by Saam Barati.
80
81         Add the ModuleProgramExecutable case.
82
83         * testing/Internals.cpp:
84         (WebCore::Internals::parserMetaData):
85
86 2015-08-31  Brent Fulgham  <bfulgham@apple.com>
87
88         [Win] WebKit cannot load pages based on "file://" URLs
89         https://bugs.webkit.org/show_bug.cgi?id=148596
90         <rdar://problem/22432585>
91
92         Reviewed by Dean Jackson.
93
94         * platform/URL.cpp:
95         (WebCore::URL::URL): Work around bug that causes this assertion to fire on
96         the Apple Windows build.
97         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
98         (WebCore::adjustMIMETypeIfNecessary): Added. If the URL is for a local file,
99         determine the MIME type based on extension. Otherwise use the default MIME type.
100         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): If
101         the CFURLResponse has no MIME type, call 'adjustMIMETypeIfNecessary'.
102
103 2015-08-31  Chris Dumez  <cdumez@apple.com>
104
105         http/tests/w3c/dom/nodes/Element-matches.html is flaky
106         https://bugs.webkit.org/show_bug.cgi?id=148615
107
108         Reviewed by Ryosuke Niwa.
109
110         Several newly-imported w3c tests were flaky due to the :target
111         pseudo-class selectors sometimes giving different results. The
112         issue seems to be that this type of selector relies on the
113         Document::cssTarget() element to do the matching. We update
114         this cssTarget Element in FrameView's scrollToFragment() /
115         scrollToAnchor(). This is called from
116         scrollToFragmentWithParentBoundary() which is called by
117         FrameLoader's finishedParsing() and loadInSameDocument().
118
119         In the first one, it is called *after* calling checkComplete()
120         which fires the onload event. However, in the second method,
121         it is called *before*. This patch updates finishedParsing()
122         so that scrollToFragmentWithParentBoundary() is called *before*
123         firing the onload event, consistently with loadInSameDocument().
124         This makes sure that JavaScript executed in an onload event
125         handler will get accurate results for :target pseudo-class
126         selectors.
127
128         No new tests, covered by:
129         http/tests/w3c/dom/nodes/Element-matches.html
130         http/tests/w3c/dom/nodes/ParentNode-querySelector-All-xhtml.xhtml
131
132         * loader/FrameLoader.cpp:
133         (WebCore::FrameLoader::finishedParsing):
134
135 2015-08-31  Yusuke Suzuki  <utatane.tea@gmail.com>
136
137         The error handler of ReadableJSStream should own stream object
138         https://bugs.webkit.org/show_bug.cgi?id=148653
139
140         Reviewed by Sam Weinig.
141
142         ReadableJSStream's m_errorFunction does not own the readable stream.
143         So when this error callback is executed asynchronously through Promises,
144         the stream could be already destroyed.
145         The fulfill callback which is jointly configured with this error callback
146         owns the stream. However, when the promise is rejected, the following things
147         occur.
148
149         1. Promise clears the fulfill handlers immediately.
150         2. queue the reject handlers to the microtask queue.
151         3. When draining the microtasks, the rejected handler will be executed.
152
153         At the time of 2 or 3, the references to the fulfill handlers are already discarded.
154         So when GC occurs at the time of 2 or 3, it will collect the fulfill handlers and the
155         stream object owned by the fulfill handlers even if the error callback will touch the
156         stream object later.
157
158         Before r189124, this fault does not occur. This is because the std::function in the
159         fulfill handler is not destroyed before that patch. Since the std::function owns the
160         stream object, the std::function and the stream object were leaked and never destroyed.
161         After that patch, the std::function in the fulfill handler becomes destroyed. And it
162         makes this fault happen.
163
164         In this patch, we separate the error callback from the stream object. Previously, the
165         error callback resides in the stream object as the member. To avoid the cyclic references,
166         this error callback did not own the stream object. But this causes this fault.
167         Instead of caching the error callback in the stream object, we always create the error
168         callback, when it is needed. The created error callback owns the stream object as well as
169         the fulfill callbacks owns the stream object.
170
171         No behavior change.
172
173         * bindings/js/ReadableJSStream.cpp:
174         (WebCore::createGenericErrorRejectedFunction):
175         (WebCore::ReadableJSStream::doStart):
176         (WebCore::ReadableJSStream::doPull):
177         (WebCore::ReadableJSStream::ReadableJSStream): Deleted.
178         * bindings/js/ReadableJSStream.h:
179
180 2015-08-26  Andy Estes  <aestes@apple.com>
181
182         [Content Filtering] Determine navigation and content policy before continuing to filter a load
183         https://bugs.webkit.org/show_bug.cgi?id=148506
184
185         Reviewed by Brady Eidson.
186
187         Prior to this change, ContentFilter would hide from DocumentLoader all CachedRawResourceClient callbacks until
188         a decision was made, then replay the missed callbacks. This approach interacted poorly with some features of
189         the loader, notably appcache and downloads. In the case of appcache, DocumentLoader might not have a chance to
190         check for substitute data until the original load has finished, wasting bandwidth, and might receive duplicate
191         or out-of-order callbacks. In the case of downloads, it would often be too late to convert the existing
192         connection to a download, leading to restarted downloads or outright failures.
193
194         Bandaids were put in place for these issues in r188150, r188486, and r188851 to fix crashes or serious
195         regressions in behavior, but these weren't complete fixes. They did not solve any of the duplicate data loading
196         problems, and they did not make downloads work reliably in all cases.
197
198         This patch rolls out the bandaids (but keeps their tests) and replaces them with a more robust fix. Instead of
199         hiding callbacks from DocumentLoader, ContentFilter now delivers willSendRequest(), redirectReceived(), and
200         responseReceived() to DocumentLoader immediately, and cancels filtering if DocumentLoader decides to ignore the
201         load, download it, or load substitute data. ContentFilter continues to buffer incoming data to prevent partial
202         rendering of blocked content.
203
204         The existing tests for r188150 and r188851 were kept, the test for r188486 was rewritten to be specific to
205         content filtering, and new tests were added to cover the case where ContentFilter is still undecided after a
206         load finishes.
207
208         Tests: contentfiltering/allow-never.html
209                contentfiltering/block-never.html
210                ContentFiltering.AllowDownloadAfterAddData
211                ContentFiltering.AllowDownloadAfterFinishedAddingData
212                ContentFiltering.AllowDownloadAfterRedirect
213                ContentFiltering.AllowDownloadAfterResponse
214                ContentFiltering.AllowDownloadAfterWillSendRequest
215                ContentFiltering.AllowDownloadNever
216                ContentFiltering.BlockDownloadAfterAddData
217                ContentFiltering.BlockDownloadAfterFinishedAddingData
218                ContentFiltering.BlockDownloadAfterRedirect
219                ContentFiltering.BlockDownloadAfterResponse
220                ContentFiltering.BlockDownloadAfterWillSendRequest
221                ContentFiltering.BlockDownloadNever
222
223         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
224         (WebCore::JSMockContentFilterSettings::decisionPoint): Taught to handle DecisionPoint::Never, and rewrote to
225         not need a set of const uint8_ts that mirror the DecisionPoint enum.
226         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
227         (WebCore::toJSValue): Rewrote to not need a set of const uint8_ts that mirror the Decision enum.
228         (WebCore::toDecision): Ditto.
229         * loader/ContentFilter.cpp:
230         (WebCore::ContentFilter::createIfEnabled): Renamed from createIfNeeded, and changed to take a DocumentLoader&
231         instead of a DecisionFunction.
232         (WebCore::ContentFilter::ContentFilter):
233         (WebCore::ContentFilter::responseReceived): If m_state != Blocked after filtering, call DocumentLoader::responseReceived().
234         (WebCore::ContentFilter::dataReceived): If m_state == Allowed after filtering, deliver buffered data to DocumentLoader.
235         If no filtering was necessary, call DocumentLoader::dataReceived() directly.
236         (WebCore::ContentFilter::redirectReceived): If m_state != Blocked after filtering, call DocumentLoader::redirectReceived().
237         (WebCore::ContentFilter::notifyFinished): If an error occured, call DocumentLoader::notifyFinished() immediately and return.
238         If m_state != Blocked after filtering, deliver buffered data to DocumentLoader and call DocumentLoader::notifyFinished().
239         If no filtering was necessary and m_state != Blocked, call DocumentLoader::notifyFinished() directly.
240         (WebCore::ContentFilter::didDecide): Called DocumentLoader::contentFilterDidDecide() instead of m_decisionFunction().
241         (WebCore::ContentFilter::deliverResourceData): Added a helper function to deliver buffered data to DocumentLoader.
242         (WebCore::ContentFilter::createIfNeeded): Renamed to createIfEnabled().
243         * loader/ContentFilter.h:
244         * loader/DocumentLoader.cpp:
245         (WebCore::DocumentLoader::DocumentLoader):
246         (WebCore::DocumentLoader::willSendRequest): Stopped asserting that redirectResponse is null and made it part of
247         the if condition instead, since willSendRequest() will now be called on redirects when there is an active ContentFilter.
248         (WebCore::DocumentLoader::startLoadingMainResource): Called becomeMainResourceClient() instead of becomeMainResourceClientIfFilterAllows().
249         (WebCore::DocumentLoader::becomeMainResourceClient): Renamed from becomeMainResourceClientIfFilterAllows().
250         Only called ContentFilter::startFilteringMainResource() if the filter state is Initialized, since ContentFilter
251         might have already made a decision in willSendRequest().
252         (WebCore::DocumentLoader::contentFilterDidDecide): Stopped deleting m_contentFilter, since it will continue to deliver callbacks
253         even after making a decision. Fixed a bug where we were creating two copies of ContentFilter's replacement data.
254         (WebCore::DocumentLoader::syntheticRedirectReceived): Deleted.
255         (WebCore::DocumentLoader::becomeMainResourceClientIfFilterAllows): Renamed to becomeMainResourceClient().
256         * loader/DocumentLoader.h:
257         * loader/EmptyClients.h:
258         * loader/FrameLoaderClient.h:
259         * loader/ResourceLoader.cpp:
260         (WebCore::ResourceLoader::willSendRequestInternal): Removed part of r188851.
261         * loader/SubresourceLoader.cpp:
262         (WebCore::SubresourceLoader::didReceiveResponse): Removed part of r188486.
263         * loader/SubresourceLoader.h:
264         * loader/cache/CachedRawResource.cpp:
265         (WebCore::CachedRawResource::didAddClient): Removed part of r188150.
266         * loader/cache/CachedRawResourceClient.h:
267         (WebCore::CachedRawResourceClient::syntheticRedirectReceived): Removed part of r188150.
268         * testing/MockContentFilterSettings.h: Defined DecisionPoint::Never.
269         * testing/MockContentFilterSettings.idl: Defined DECISION_POINT_NEVER.
270
271 2015-08-31  Chris Dumez  <cdumez@apple.com>
272
273         Unreviewed, rebaseline bindings tests after r189184.
274
275 2015-08-31  Chris Dumez  <cdumez@apple.com>
276
277         NodeFilter.SHOW_ALL has wrong value on 32-bit
278         https://bugs.webkit.org/show_bug.cgi?id=148602
279
280         Reviewed by Geoffrey Garen.
281
282         NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
283         NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
284         our bindings code is casting it to an intptr_t type which is not wide
285         enough on 32-bit.
286
287         No new tests, already covered by fast/dom/node-filter-interface.html
288         which is now unskipped on Windows / 32bit.
289
290         * bindings/scripts/CodeGeneratorJS.pm:
291         (GenerateHashTableValueArray):
292         Generate extra curly brackets to initialize the new union member.
293         Also cast to long long the constant instead of intptr_t.
294
295         * dom/NodeFilter.h:
296         Explicitly mark the enum underlying type to be an unsigned long
297         to make sure it can hold the value for SHOW_ALL on all platforms.
298         On Windows, it seems the default underlying type is an int for
299         e.g.
300
301 2015-08-31  Chris Dumez  <cdumez@apple.com>
302
303         Range.detach() / NodeIterator.detach() should be no-ops as per the latest DOM specification
304         https://bugs.webkit.org/show_bug.cgi?id=148454
305
306         Reviewed by Ryosuke Niwa.
307
308         Range.detach() / NodeIterator.detach() should be no-ops as per the
309         latest DOM specification:
310         - https://dom.spec.whatwg.org/#dom-range-detach
311         - https://dom.spec.whatwg.org/#dom-nodeiterator-detach
312
313         These are already no-ops in Firefox:
314         - https://bugzilla.mozilla.org/show_bug.cgi?id=702948
315         - https://bugzilla.mozilla.org/show_bug.cgi?id=823549
316
317         and Chrome:
318         - https://src.chromium.org/viewvc/blink?revision=173010&view=revision
319         - https://src.chromium.org/viewvc/blink?revision=172768&view=revision
320
321         Tests: fast/dom/Range/range-detach-noop.html
322                fast/dom/node-iterator-detach-noop.html
323
324         * accessibility/AccessibilityObject.cpp:
325         (WebCore::AccessibilityObject::selectText):
326         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
327         (WebCore::AccessibilityObject::lengthForVisiblePositionRange):
328         * accessibility/atk/WebKitAccessibleUtil.cpp:
329         (selectionBelongsToObject):
330         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
331         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
332         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
333         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
334         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
335         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
336         * bindings/scripts/CodeGeneratorGObject.pm:
337         (FunctionUsedToRaiseException):
338         * dom/DocumentMarkerController.cpp:
339         (WebCore::DocumentMarkerController::addMarker):
340         (WebCore::DocumentMarkerController::addTextMatchMarker):
341         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
342         (WebCore::DocumentMarkerController::addDictationResultMarker):
343         (WebCore::DocumentMarkerController::removeMarkers):
344         (WebCore::DocumentMarkerController::markersInRange):
345         (DocumentMarkerController::setMarkersActive):
346         (DocumentMarkerController::hasMarkers):
347         (DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
348         * dom/NodeIterator.cpp:
349         (WebCore::NodeIterator::nextNode):
350         (WebCore::NodeIterator::previousNode):
351         (WebCore::NodeIterator::detach):
352         (WebCore::NodeIterator::NodeIterator): Deleted.
353         (WebCore::NodeIterator::nodeWillBeRemoved): Deleted.
354         (WebCore::NodeIterator::updateForNodeRemoval): Deleted.
355         * dom/NodeIterator.h:
356         (WebCore::NodeIterator::nextNode):
357         (WebCore::NodeIterator::previousNode):
358         * dom/NodeIterator.idl:
359         * dom/Range.cpp:
360         (WebCore::Range::commonAncestorContainer):
361         (WebCore::Range::setStart):
362         (WebCore::Range::setEnd):
363         (WebCore::Range::collapse):
364         (WebCore::Range::isPointInRange):
365         (WebCore::Range::comparePoint):
366         (WebCore::Range::compareNode):
367         (WebCore::Range::compareBoundaryPoints):
368         (WebCore::Range::boundaryPointsValid):
369         (WebCore::Range::deleteContents):
370         (WebCore::Range::processContents):
371         (WebCore::Range::processContentsBetweenOffsets):
372         (WebCore::Range::processAncestorsAndTheirSiblings):
373         (WebCore::Range::extractContents):
374         (WebCore::Range::cloneContents):
375         (WebCore::Range::insertNode):
376         (WebCore::Range::toString):
377         (WebCore::Range::text):
378         (WebCore::Range::createContextualFragment):
379         (WebCore::Range::detach):
380         (WebCore::Range::cloneRange):
381         (WebCore::Range::surroundContents):
382         (WebCore::Range::checkDeleteExtract):
383         (WebCore::Range::containedByReadOnly):
384         (WebCore::Range::firstNode):
385         (WebCore::Range::shadowRoot):
386         (WebCore::Range::pastLastNode):
387         (WebCore::Range::absoluteTextRects):
388         (WebCore::Range::absoluteTextQuads):
389         (WebCore::Range::collectSelectionRects):
390         (WebCore::Range::formatForDebugger):
391         (WebCore::Range::contains):
392         (WebCore::rangesOverlap):
393         (WebCore::Range::getBorderAndTextQuads):
394         (WebCore::Range::boundingRectInternal):
395         (showTree):
396         (WebCore::checkForDifferentRootContainer): Deleted.
397         (WebCore::lengthOfContentsInNode): Deleted.
398         (WebCore::Range::processNodes): Deleted.
399         (WebCore::Range::checkNodeWOffset): Deleted.
400         (WebCore::Range::checkNodeBA): Deleted.
401         (WebCore::Range::setStartAfter): Deleted.
402         (WebCore::Range::setEndBefore): Deleted.
403         (WebCore::Range::setEndAfter): Deleted.
404         (WebCore::Range::selectNode): Deleted.
405         (WebCore::intervalsSufficientlyOverlap): Deleted.
406         (WebCore::coalesceSelectionRects): Deleted.
407         (WebCore::areRangesEqual): Deleted.
408         (WebCore::boundaryTextNodesSplit): Deleted.
409         (WebCore::Range::textNodeSplit): Deleted.
410         (WebCore::Range::expand): Deleted.
411         * dom/Range.h:
412         (WebCore::Range::startContainer):
413         (WebCore::Range::endContainer):
414         (WebCore::Range::collapsed):
415         (WebCore::Range::commonAncestorContainer):
416         * dom/Range.idl:
417         * editing/AlternativeTextController.cpp:
418         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
419         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
420         (WebCore::AlternativeTextController::markReversed):
421         (WebCore::AlternativeTextController::markCorrection):
422         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
423         (WebCore::AlternativeTextController::applyDictationAlternative):
424         * editing/EditingStyle.cpp:
425         (WebCore::EditingStyle::styleAtSelectionStart):
426         * editing/Editor.cpp:
427         (WebCore::Editor::canDeleteRange):
428         (WebCore::Editor::shouldDeleteRange):
429         (WebCore::Editor::advanceToNextMisspelling):
430         (WebCore::Editor::markMisspellingsOrBadGrammar):
431         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
432         (WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
433         (WebCore::Editor::markAndReplaceFor):
434         (WebCore::Editor::changeBackToReplacedString):
435         (WebCore::Editor::firstRectForRange):
436         (WebCore::Editor::rangeOfString):
437         (WebCore::Editor::countMatchesForText):
438         (WebCore::Editor::scanRangeForTelephoneNumbers):
439         (WebCore::isFrameInRange): Deleted.
440         * editing/EditorCommand.cpp:
441         (WebCore::expandSelectionToGranularity):
442         (WebCore::unionDOMRanges):
443         * editing/FormatBlockCommand.cpp:
444         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
445         * editing/FrameSelection.cpp:
446         (WebCore::FrameSelection::setSelectedRange):
447         (WebCore::FrameSelection::wordOffsetInRange):
448         (WebCore::FrameSelection::spaceFollowsWordInRange):
449         (WebCore::FrameSelection::selectionAtDocumentStart): Deleted.
450         * editing/MarkupAccumulator.cpp:
451         (WebCore::MarkupAccumulator::appendText):
452         * editing/SpellChecker.cpp:
453         (WebCore::SpellCheckRequest::SpellCheckRequest):
454         (WebCore::SpellChecker::isCheckable):
455         * editing/SpellingCorrectionCommand.cpp:
456         (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
457         * editing/TextCheckingHelper.cpp:
458         (WebCore::expandToParagraphBoundary):
459         (WebCore::TextCheckingParagraph::offsetTo):
460         (WebCore::TextCheckingParagraph::offsetAsRange):
461         (WebCore::TextCheckingHelper::findFirstMisspelling):
462         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
463         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
464         (WebCore::TextCheckingHelper::isUngrammatical):
465         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
466         * editing/TextIterator.cpp:
467         (WebCore::TextIterator::TextIterator):
468         (WebCore::TextIterator::node):
469         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
470         (WebCore::CharacterIterator::range):
471         (WebCore::characterSubrange):
472         (WebCore::BackwardsCharacterIterator::range):
473         (WebCore::TextIterator::rangeFromLocationAndLength):
474         (WebCore::TextIterator::getLocationAndLengthFromRange):
475         (WebCore::collapsedToBoundary):
476         (WebCore::findPlainText):
477         (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator): Deleted.
478         (WebCore::BackwardsCharacterIterator::advance): Deleted.
479         (WebCore::plainText): Deleted.
480         * editing/VisibleUnits.cpp:
481         (WebCore::previousBoundary):
482         * editing/cocoa/HTMLConverter.mm:
483         (HTMLConverter::_processText):
484         (HTMLConverter::_traverseNode):
485         (HTMLConverter::_traverseFooterNode):
486         (HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):
487         (WebCore::editingAttributedStringFromRange):
488         * editing/mac/EditorMac.mm:
489         (WebCore::Editor::adjustedSelectionRange):
490         * editing/markup.cpp:
491         (WebCore::StyledMarkupAccumulator::renderedText):
492         (WebCore::StyledMarkupAccumulator::stringValueForRange):
493         (WebCore::highestAncestorToWrapMarkup):
494         (WebCore::createMarkupInternal):
495         (WebCore::createFullMarkup):
496         (WebCore::urlToMarkup): Deleted.
497         * loader/archive/cf/LegacyWebArchive.cpp:
498         (WebCore::LegacyWebArchive::create):
499         * page/ContextMenuController.cpp:
500         (WebCore::ContextMenuController::contextMenuItemSelected):
501         * page/DOMSelection.cpp:
502         (WebCore::DOMSelection::deleteFromDocument):
503         (WebCore::DOMSelection::containsNode):
504         * page/TextIndicator.cpp:
505         (WebCore::TextIndicator::createWithRange):
506         * page/ios/FrameIOS.mm:
507         (WebCore::Frame::indexCountOfWordPrecedingSelection):
508         (WebCore::Frame::wordsInCurrentParagraph):
509         * platform/win/PasteboardWin.cpp:
510         (WebCore::Pasteboard::writeRangeToDataObject):
511         (WebCore::Pasteboard::writeSelection):
512         * rendering/RenderNamedFlowThread.cpp:
513         (WebCore::RenderNamedFlowThread::getRanges):
514         * rendering/RenderObject.cpp:
515         (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
516
517 2015-08-31  Myles C. Maxfield  <mmaxfield@apple.com>
518
519         [Cocoa] Unify showGlyphsWithAdvances
520         https://bugs.webkit.org/show_bug.cgi?id=148565
521
522         Reviewed by Dean Jackson.
523
524         None of the fonts created for WebKit have the renderingMode of
525         NSFontAntialiasedIntegerAdvancementsRenderingMode and are already printer fonts.
526
527         No new tests because there is no behavior change.
528
529         * platform/graphics/cocoa/FontCascadeCocoa.mm:
530         (WebCore::setCGFontRenderingMode):
531         (WebCore::FontCascade::drawGlyphs):
532
533 2015-08-31  Tim Horton  <timothy_horton@apple.com>
534
535         iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
536         https://bugs.webkit.org/show_bug.cgi?id=148599
537         <rdar://problem/17914031>
538
539         Reviewed by Beth Dakin.
540
541         * editing/FrameSelection.cpp:
542         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
543         (WebCore::FrameSelection::getTextRectangles):
544         * editing/FrameSelection.h:
545         * page/TextIndicator.cpp:
546         (WebCore::initializeIndicator):
547         * page/TextIndicator.h:
548         Make it possible to create a TextIndicator that isn't clipped to the visible rect,
549         because iOS find-in-page TextIndicators persist while scrolling the page,
550         and are already constrained to the document rect anyway.
551
552 2015-08-31  Michael Catanzaro  <mcatanzaro@igalia.com>
553
554         [Freetype] FontCache::strengthOfFirstAlias leaks an FcPattern
555         https://bugs.webkit.org/show_bug.cgi?id=148624
556
557         Reviewed by Martin Robinson.
558
559         Using the normal RefPtr constructor causes the FcPattern to be reffed one extra time. Even
560         though the FcPattern is intentionally leaked to FcFontSetAdd down below, the FcPattern has
561         its own refcount and now it's screwed up. Just completely stop using RefPtr for these
562         FcPatterns, since the potential for confusion regarding leakRef combined with Fontconfig
563         refcounting far outweighs the benefit of using a smart pointer.
564
565         * platform/graphics/freetype/FontCacheFreeType.cpp:
566         (WebCore::strengthOfFirstAlias):
567
568 2015-08-31  Javier Fernandez  <jfernandez@igalia.com>
569
570         [CSS Grid Layout] auto-margins alignment does not work for heights
571         https://bugs.webkit.org/show_bug.cgi?id=148071
572
573         Reviewed by Sergio Villar Senin.
574
575         We still had pending to align grid items horizontally via auto-margins
576         alignment. We already landed a patch in r188582 to implement the
577         column-axis alignment and this patch implements the expected behavior in
578         the row-axis.
579
580         This patch also removes the logic in RenderBox, so we reduce grid related
581         code dependencies in the general layout logic. We can do that because this
582         patch manages that in the layoutGridItems function by resetting grid item's
583         margin and logicalTop (if it does not need to perform a layout, which it
584         would do the job anyway).
585
586         No new tests, we just need to adapt some cases of the ones we already have.
587
588         * rendering/RenderBox.cpp:
589         (WebCore::RenderBox::styleDidChange): Deleted.
590         (WebCore::RenderBox::willBeRemovedFromTree): Deleted.
591         (WebCore::RenderBox::updateFromStyle): Deleted.
592         * rendering/RenderGrid.cpp:
593         (WebCore::RenderGrid::layoutGridItems):
594         (WebCore::RenderGrid::resetAutoMarginsAndLogicalTopInColumnAxis):
595         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
596         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
597         (WebCore::RenderGrid::hasAutoMarginsInRowAxis): Deleted.
598         * rendering/RenderGrid.h:
599
600 2015-08-31  Alexey Proskuryakov  <ap@apple.com>
601
602         Build fix.
603
604         * page/EventHandler.h:
605         (WebCore::EventHandler::immediateActionStage): Don't export an inline function,
606         to avoid "weak external symbol" errors.
607
608 2015-08-31  Enrica Casucci  <enrica@apple.com>
609
610         Incorrect cursor movement for U+26F9, U+1F3CB with variations.
611         https://bugs.webkit.org/show_bug.cgi?id=148629
612         rdar://problem/22492366
613
614         Reviewed by Ryosuke Niwa.
615
616         Updating text break iterator rules to correctly handle those two emoji with variations.
617
618         * platform/text/TextBreakIterator.cpp:
619         (WebCore::cursorMovementIterator):
620
621 2015-07-31  Sergio Villar Senin  <svillar@igalia.com>
622
623         [css-grid] Grid containers reporting wrong preferred widths
624         https://bugs.webkit.org/show_bug.cgi?id=147486
625
626         Reviewed by Darin Adler.
627
628         RenderGrid used to have its own overwritten version of
629         computePreferredLogicalWidths() because we didn't have an
630         implementation of computeIntrinsicLogicalWidths(). That
631         implementation was not as complete as RenderBlock's because it
632         was not taking into account min/max-width restrictions.
633
634         Provided that computeIntrinsicLogicalWidths() has been there
635         for some time we can safelly kill our overwrite and use
636         RenderBlock's version which addresses all the FIXMEs we had in
637         our code.
638
639         * rendering/RenderGrid.cpp:
640         * rendering/RenderGrid.h:
641
642 2015-08-31  Sungmann Cho  <sungmann.cho@navercorp.com>
643
644         Fix the WinCairo build after landing of webkit.org/b/148561.
645         https://bugs.webkit.org/show_bug.cgi?id=148627
646
647         Reviewed by Myles C. Maxfield.
648
649         No new tests, no behavior change.
650
651         * platform/graphics/win/ImageCairoWin.cpp:
652         (WebCore::BitmapImage::getHBITMAPOfSize):
653         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
654         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
655         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
656
657 2015-08-31  Antti Koivisto  <antti@apple.com>
658
659         REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky
660         https://bugs.webkit.org/show_bug.cgi?id=148533
661
662         Reviewed by Chris Dumez.
663
664         <object> element may cause document load event fire too early. By making data URL
665         loading faster r188820 made this condition more likely to trigger in this test.
666
667         * loader/SubframeLoader.cpp:
668         (WebCore::SubframeLoader::loadSubframe):
669
670             Post-parsing style recalc may trigger loads for <object> elements. If all other loads have already
671             completed this may cause load event to fire synchronously from the initial empty document construction.
672
673             Fix by preventing load events during subframe initialization. They will be fired if needed by the
674             subsequent explicit call to FrameLoader::checkCompleted.
675
676 2015-08-30  Ryuan Choi  <ryuan.choi@navercorp.com>
677
678         [CoordinatedGraphics] Remove unnecessary two virtual methods from TiledBackingStoreClient
679         https://bugs.webkit.org/show_bug.cgi?id=147137
680
681         Reviewed by Gyuyoung Kim.
682
683         tiledBackingStoreContentsRect() and tiledBackingStoreVisibleRect() are not
684         necessary because CoordinatedGraphicsLayer can pass them directly if needed.
685         This patch removes them in order to simplify code flow between TiledBackingStore
686         and CoordinatedGraphicsLayer.
687
688         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
689         (WebCore::CoordinatedGraphicsLayer::imageBackingVisible):
690         (WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
691         (WebCore::clampToContentsRectIfRectIsInfinite):
692         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
693         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
694         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreContentsRect): Deleted.
695         (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect): Deleted.
696         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
697         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
698         (WebCore::TiledBackingStore::createTilesIfNeeded):
699         (WebCore::TiledBackingStore::coverageRatio):
700         (WebCore::TiledBackingStore::visibleAreaIsCovered):
701         Used TiledBackingStore's m_visibleRect and m_rect, cached and scaled values for
702         visibleRect, contentsRect.
703         (WebCore::TiledBackingStore::createTiles):
704         (WebCore::TiledBackingStore::removeAllNonVisibleTiles):
705         (WebCore::TiledBackingStore::coverWithTilesIfNeeded): Renamed to createTilesIfNeeded.
706         (WebCore::TiledBackingStore::visibleRect): Deleted. nobody used.
707         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
708         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
709         (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
710         Removed default implementation.
711
712 2015-08-29  Jessie Berlin  <berlin@apple.com>
713
714         El Capitan build fix.
715
716         * platform/graphics/cocoa/FontCascadeCocoa.mm:
717         (WebCore::FontCascade::drawGlyphs):
718
719 2015-08-29  Chris Fleizach  <cfleizach@apple.com>
720
721         AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change
722         https://bugs.webkit.org/show_bug.cgi?id=125720
723
724         Reviewed by Daniel Bates.
725
726         The scrollToVisible code did not account for scrollable elements that are larger than their viewports.
727         First, we need to pass the sub-focus up the scroll chain (otherwise we'll scroll some parent to y=0).
728         Second, we should try to center the focus within the viewport, rather than positioning at the bottom for a 
729         better experience.
730
731         This change was adapted from Blink r183926:
732         https://src.chromium.org/viewvc/blink?view=rev&revision=183926
733
734         Tests: accessibility/scroll-to-global-point-iframe-nested.html
735                accessibility/scroll-to-global-point-iframe.html
736                accessibility/scroll-to-global-point-main-window.html
737                accessibility/scroll-to-global-point-nested.html
738                accessibility/scroll-to-make-visible-div-overflow.html
739                accessibility/scroll-to-make-visible-iframe.html
740                accessibility/scroll-to-make-visible-nested-2.html
741                accessibility/scroll-to-make-visible-nested.html
742                accessibility/scroll-to-make-visible-with-subfocus.html
743
744         * accessibility/AccessibilityObject.cpp:
745         (WebCore::computeBestScrollOffset):
746         (WebCore::AccessibilityObject::isOnscreen):
747         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
748         (WebCore::AccessibilityObject::scrollToGlobalPoint):
749         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
750         (-[WebAccessibilityObjectWrapper accessibilityScrollToVisible]):
751         (-[WebAccessibilityObjectWrapper _accessibilityScrollToMakeVisibleWithSubFocus:]):
752         (-[WebAccessibilityObjectWrapper _accessibilityScrollToGlobalPoint:]):
753         (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
754
755 2015-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
756
757         Migrate GraphicsContexts from pointers to references
758         https://bugs.webkit.org/show_bug.cgi?id=148561
759
760         Reviewed by Tim Horton.
761
762         We were using GraphicsContext*s throughout our rendering code. However,
763         these contexts can't be nullptr. This patch migrates users to
764         GraphicsContext&s.
765
766         This is a purely mechanical change.
767
768         No new tests because there is no behavior change.
769
770         * css/CSSFilterImageValue.cpp:
771         (WebCore::CSSFilterImageValue::image):
772         * editing/Editor.cpp:
773         (WebCore::Editor::countMatchesForText):
774         * editing/FrameSelection.cpp:
775         (WebCore::FrameSelection::paintCaret):
776         (WebCore::CaretBase::paintCaret):
777         (WebCore::DragCaretController::paintDragCaret):
778         * editing/FrameSelection.h:
779         * html/HTMLCanvasElement.cpp:
780         (WebCore::HTMLCanvasElement::paint):
781         (WebCore::HTMLCanvasElement::createImageBuffer):
782         (WebCore::HTMLCanvasElement::drawingContext):
783         * html/HTMLCanvasElement.h:
784         * html/HTMLVideoElement.cpp:
785         (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
786         * html/HTMLVideoElement.h:
787         * html/canvas/CanvasRenderingContext2D.cpp:
788         (WebCore::CanvasRenderingContext2D::drawImage):
789         (WebCore::drawImageToContext):
790         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
791         (WebCore::CanvasRenderingContext2D::drawTextInternal):
792         * html/canvas/WebGLRenderingContextBase.cpp:
793         (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
794         * inspector/InspectorOverlay.cpp:
795         (WebCore::InspectorOverlay::paint):
796         * page/FrameSnapshotting.cpp:
797         (WebCore::snapshotFrameRect):
798         * page/FrameView.cpp:
799         (WebCore::FrameView::paintScrollCorner):
800         (WebCore::FrameView::paintScrollbar):
801         (WebCore::FrameView::paintControlTints):
802         (WebCore::FrameView::willPaintContents):
803         (WebCore::FrameView::didPaintContents):
804         (WebCore::FrameView::paintContents):
805         (WebCore::FrameView::paintContentsForSnapshot):
806         (WebCore::FrameView::paintOverhangAreas):
807         (WebCore::FrameView::adjustPageHeightDeprecated):
808         * page/FrameView.h:
809         * page/PrintContext.cpp:
810         (WebCore::PrintContext::spoolPage):
811         (WebCore::PrintContext::spoolRect):
812         * page/win/FrameCGWin.cpp:
813         (WebCore::drawRectIntoContext):
814         (WebCore::imageFromRect):
815         * platform/ScrollView.cpp:
816         (WebCore::ScrollView::paintScrollCorner):
817         (WebCore::ScrollView::paintScrollbar):
818         (WebCore::ScrollView::paintScrollbars):
819         (WebCore::ScrollView::paintPanScrollIcon):
820         (WebCore::ScrollView::paint):
821         (WebCore::ScrollView::paintOverhangAreas):
822         (WebCore::ScrollView::calculateAndPaintOverhangAreas):
823         * platform/ScrollView.h:
824         * platform/Scrollbar.cpp:
825         (WebCore::Scrollbar::paint):
826         * platform/Scrollbar.h:
827         * platform/ScrollbarTheme.h:
828         (WebCore::ScrollbarTheme::paintScrollCorner):
829         (WebCore::ScrollbarTheme::defaultPaintScrollCorner):
830         (WebCore::ScrollbarTheme::paintOverhangAreas):
831         * platform/ScrollbarThemeComposite.cpp:
832         (WebCore::ScrollbarThemeComposite::paintScrollCorner):
833         (WebCore::ScrollbarThemeComposite::paintOverhangAreas):
834         * platform/ScrollbarThemeComposite.h:
835         * platform/Theme.cpp:
836         (WebCore::Theme::drawNamedImage):
837         * platform/Theme.h:
838         (WebCore::Theme::paint):
839         * platform/Widget.h:
840         * platform/cocoa/ThemeCocoa.cpp:
841         (WebCore::fitContextToBox):
842         (WebCore::ThemeCocoa::drawNamedImage):
843         * platform/cocoa/ThemeCocoa.h:
844         * platform/efl/WidgetEfl.cpp:
845         (WebCore::Widget::paint):
846         * platform/graphics/BitmapImage.cpp:
847         (WebCore::BitmapImage::drawPattern):
848         * platform/graphics/BitmapImage.h:
849         * platform/graphics/CrossfadeGeneratedImage.cpp:
850         (WebCore::drawCrossfadeSubimage):
851         (WebCore::CrossfadeGeneratedImage::drawCrossfade):
852         (WebCore::CrossfadeGeneratedImage::draw):
853         (WebCore::CrossfadeGeneratedImage::drawPattern):
854         * platform/graphics/CrossfadeGeneratedImage.h:
855         * platform/graphics/FontCascade.cpp:
856         (WebCore::FontCascade::drawText):
857         (WebCore::FontCascade::drawEmphasisMarks):
858         (WebCore::FontCascade::drawSimpleText):
859         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
860         (WebCore::FontCascade::drawGlyphBuffer):
861         * platform/graphics/FontCascade.h:
862         * platform/graphics/GeneratedImage.h:
863         * platform/graphics/GradientImage.cpp:
864         (WebCore::GradientImage::draw):
865         (WebCore::GradientImage::drawPattern):
866         * platform/graphics/GradientImage.h:
867         * platform/graphics/GraphicsContext.cpp:
868         (WebCore::GraphicsContext::drawText):
869         (WebCore::GraphicsContext::drawGlyphs):
870         (WebCore::GraphicsContext::drawEmphasisMarks):
871         (WebCore::GraphicsContext::drawBidiText):
872         (WebCore::GraphicsContext::drawImage):
873         (WebCore::GraphicsContext::drawTiledImage):
874         (WebCore::GraphicsContext::drawImageBuffer):
875         (WebCore::GraphicsContext::clipToImageBuffer):
876         (WebCore::GraphicsContext::createCompatibleBuffer):
877         (WebCore::GraphicsContext::isCompatibleWithBuffer):
878         * platform/graphics/GraphicsContext.h:
879         * platform/graphics/GraphicsContext3D.h:
880         * platform/graphics/Image.cpp:
881         (WebCore::Image::fillWithSolidColor):
882         (WebCore::Image::draw):
883         (WebCore::Image::drawTiled):
884         * platform/graphics/Image.h:
885         (WebCore::Image::drawFrameMatchingSourceSize):
886         * platform/graphics/ImageBuffer.cpp:
887         (WebCore::ImageBuffer::createCompatibleBuffer):
888         * platform/graphics/ImageBuffer.h:
889         * platform/graphics/MediaPlayer.cpp:
890         (WebCore::MediaPlayer::paint):
891         (WebCore::MediaPlayer::paintCurrentFrameInContext):
892         * platform/graphics/MediaPlayer.h:
893         * platform/graphics/MediaPlayerPrivate.h:
894         (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
895         * platform/graphics/NamedImageGeneratedImage.cpp:
896         (WebCore::NamedImageGeneratedImage::draw):
897         (WebCore::NamedImageGeneratedImage::drawPattern):
898         * platform/graphics/NamedImageGeneratedImage.h:
899         * platform/graphics/ShadowBlur.cpp:
900         (WebCore::ShadowBlur::adjustBlurRadius):
901         (WebCore::ShadowBlur::calculateLayerBoundingRect):
902         (WebCore::ShadowBlur::drawShadowBuffer):
903         (WebCore::ShadowBlur::drawRectShadow):
904         (WebCore::ShadowBlur::drawInsetShadow):
905         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
906         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
907         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
908         (WebCore::ShadowBlur::drawRectShadowWithTiling):
909         (WebCore::ShadowBlur::drawLayerPieces):
910         (WebCore::ShadowBlur::blurAndColorShadowBuffer):
911         (WebCore::ShadowBlur::beginShadowLayer):
912         (WebCore::ShadowBlur::endShadowLayer):
913         * platform/graphics/ShadowBlur.h:
914         * platform/graphics/TextRun.h:
915         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
916         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
917         (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext):
918         (WebCore::MediaPlayerPrivateAVFoundationCF::paint):
919         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
920         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
921         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
922         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
923         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
924         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
925         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
926         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
927         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
928         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
929         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
930         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
931         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
932         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paint):
933         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
934         * platform/graphics/cairo/BitmapImageCairo.cpp:
935         (WebCore::BitmapImage::draw):
936         * platform/graphics/cairo/FontCairo.cpp:
937         (WebCore::drawGlyphsToContext):
938         (WebCore::drawGlyphsShadow):
939         (WebCore::FontCascade::drawGlyphs):
940         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
941         (WebCore::FontCascade::drawComplexText):
942         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
943         * platform/graphics/cairo/GraphicsContextCairo.cpp:
944         (WebCore::drawPathShadow):
945         (WebCore::fillCurrentCairoPath):
946         (WebCore::shadowAndFillCurrentCairoPath):
947         (WebCore::shadowAndStrokeCurrentCairoPath):
948         (WebCore::GraphicsContext::fillPath):
949         (WebCore::GraphicsContext::strokePath):
950         (WebCore::GraphicsContext::fillRect):
951         (WebCore::GraphicsContext::strokeRect):
952         (WebCore::GraphicsContext::platformFillRoundedRect):
953         (WebCore::GraphicsContext::fillRectWithRoundedHole):
954         * platform/graphics/cairo/ImageBufferCairo.cpp:
955         (WebCore::ImageBuffer::context):
956         (WebCore::ImageBuffer::clip):
957         (WebCore::ImageBuffer::draw):
958         (WebCore::ImageBuffer::drawPattern):
959         (WebCore::ImageBuffer::toDataURL):
960         * platform/graphics/cairo/ImageCairo.cpp:
961         (WebCore::Image::drawPattern):
962         * platform/graphics/cairo/PlatformContextCairo.cpp:
963         (WebCore::PlatformContextCairo::drawSurfaceToContext):
964         * platform/graphics/cairo/PlatformContextCairo.h:
965         * platform/graphics/cg/BitmapImageCG.cpp:
966         (WebCore::BitmapImage::draw):
967         * platform/graphics/cg/GraphicsContext3DCG.cpp:
968         (WebCore::GraphicsContext3D::paintToCanvas):
969         * platform/graphics/cg/GraphicsContextCG.cpp:
970         (WebCore::GraphicsContext::fillRect):
971         (WebCore::GraphicsContext::platformFillRoundedRect):
972         (WebCore::GraphicsContext::fillRectWithRoundedHole):
973         * platform/graphics/cg/ImageBufferCG.cpp:
974         (WebCore::ImageBuffer::ImageBuffer):
975         (WebCore::ImageBuffer::context):
976         (WebCore::ImageBuffer::flushContext):
977         (WebCore::ImageBuffer::copyNativeImage):
978         (WebCore::ImageBuffer::draw):
979         (WebCore::ImageBuffer::drawPattern):
980         (WebCore::ImageBuffer::clip):
981         (WebCore::ImageBuffer::getUnmultipliedImageData):
982         (WebCore::ImageBuffer::getPremultipliedImageData):
983         (WebCore::ImageBuffer::putByteArray):
984         (WebCore::ImageBuffer::toDataURL):
985         * platform/graphics/cg/ImageCG.cpp:
986         (WebCore::Image::drawPattern):
987         * platform/graphics/cg/PDFDocumentImage.cpp:
988         (WebCore::PDFDocumentImage::cacheParametersMatch):
989         (WebCore::transformContextForPainting):
990         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
991         (WebCore::PDFDocumentImage::draw):
992         (WebCore::applyRotationForPainting):
993         (WebCore::PDFDocumentImage::drawPDFPage):
994         * platform/graphics/cg/PDFDocumentImage.h:
995         * platform/graphics/cocoa/FontCascadeCocoa.mm:
996         (WebCore::showLetterpressedGlyphsWithAdvances):
997         (WebCore::showGlyphsWithAdvances):
998         (WebCore::FontCascade::drawGlyphs):
999         (WebCore::FontCascade::drawComplexText):
1000         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
1001         * platform/graphics/efl/ImageBufferEfl.cpp:
1002         (WebCore::ImageBuffer::toDataURL):
1003         * platform/graphics/filters/FEBlend.cpp:
1004         (WebCore::FEBlend::platformApplySoftware):
1005         * platform/graphics/filters/FEColorMatrix.cpp:
1006         (WebCore::FEColorMatrix::platformApplySoftware):
1007         * platform/graphics/filters/FEComposite.cpp:
1008         (WebCore::FEComposite::platformApplySoftware):
1009         * platform/graphics/filters/FEDropShadow.cpp:
1010         (WebCore::FEDropShadow::platformApplySoftware):
1011         * platform/graphics/filters/FEFlood.cpp:
1012         (WebCore::FEFlood::platformApplySoftware):
1013         * platform/graphics/filters/FEMerge.cpp:
1014         (WebCore::FEMerge::platformApplySoftware):
1015         * platform/graphics/filters/FEOffset.cpp:
1016         (WebCore::FEOffset::platformApplySoftware):
1017         * platform/graphics/filters/FETile.cpp:
1018         (WebCore::FETile::platformApplySoftware):
1019         * platform/graphics/filters/FilterEffect.cpp:
1020         (WebCore::FilterEffect::createImageBufferResult): Deleted.
1021         * platform/graphics/filters/SourceAlpha.cpp:
1022         (WebCore::SourceAlpha::platformApplySoftware):
1023         * platform/graphics/filters/SourceGraphic.cpp:
1024         (WebCore::SourceGraphic::platformApplySoftware):
1025         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1026         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1027         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1028         * platform/graphics/mac/GraphicsContextMac.mm:
1029         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1030         * platform/graphics/mac/IconMac.mm:
1031         (WebCore::Icon::paint):
1032         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1033         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1034         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
1035         (WebCore::MediaPlayerPrivateQTKit::paint):
1036         * platform/graphics/mac/PDFDocumentImageMac.mm:
1037         (WebCore::PDFDocumentImage::drawPDFPage):
1038         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1039         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1040         * platform/graphics/texmap/BitmapTexture.cpp:
1041         (WebCore::BitmapTexture::updateContents):
1042         * platform/graphics/win/FontCGWin.cpp:
1043         (WebCore::FontCascade::drawGlyphs):
1044         * platform/graphics/win/FontWin.cpp:
1045         (WebCore::FontCascade::drawComplexText):
1046         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
1047         * platform/graphics/win/IconWin.cpp:
1048         (WebCore::Icon::paint):
1049         * platform/graphics/win/ImageCGWin.cpp:
1050         (WebCore::BitmapImage::getHBITMAPOfSize):
1051         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1052         * platform/graphics/win/ImageCairoWin.cpp:
1053         (WebCore::BitmapImage::getHBITMAPOfSize):
1054         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1055         * platform/graphics/win/LocalWindowsContext.h:
1056         (WebCore::LocalWindowsContext::LocalWindowsContext):
1057         (WebCore::LocalWindowsContext::~LocalWindowsContext):
1058         * platform/gtk/WidgetGtk.cpp:
1059         (WebCore::Widget::paint):
1060         * platform/ios/WidgetIOS.mm:
1061         (WebCore::Widget::paint):
1062         * platform/mac/DragImageMac.mm:
1063         (WebCore::drawAtPoint):
1064         * platform/mac/LocalCurrentGraphicsContext.h:
1065         (WebCore::ContextContainer::ContextContainer):
1066         * platform/mac/LocalCurrentGraphicsContext.mm:
1067         (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
1068         (WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):
1069         (WebCore::LocalCurrentGraphicsContext::cgContext):
1070         * platform/mac/ScrollbarThemeMac.mm:
1071         (WebCore::ScrollbarThemeMac::paint):
1072         * platform/mac/ThemeMac.h:
1073         * platform/mac/ThemeMac.mm:
1074         (WebCore::paintToggleButton):
1075         (WebCore::paintButton):
1076         (WebCore::paintStepper):
1077         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
1078         (WebCore::ThemeMac::paint):
1079         * platform/mac/WidgetMac.mm:
1080         (WebCore::Widget::paint):
1081         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1082         (WebCore::MockMediaPlayerMediaSource::paint):
1083         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1084         * platform/win/PopupMenuWin.cpp:
1085         (WebCore::PopupMenuWin::paint):
1086         * platform/win/ScrollbarThemeWin.cpp:
1087         (WebCore::ScrollbarThemeWin::paintTrackPiece):
1088         (WebCore::ScrollbarThemeWin::paintButton):
1089         (WebCore::ScrollbarThemeWin::paintThumb):
1090         * platform/win/WebCoreTextRenderer.cpp:
1091         (WebCore::doDrawTextAtPoint):
1092         * platform/win/WidgetWin.cpp:
1093         (WebCore::Widget::paint):
1094         * rendering/EllipsisBox.cpp:
1095         (WebCore::EllipsisBox::paint):
1096         (WebCore::EllipsisBox::paintSelection):
1097         * rendering/EllipsisBox.h:
1098         * rendering/FilterEffectRenderer.cpp:
1099         (WebCore::FilterEffectRenderer::inputContext):
1100         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
1101         * rendering/FilterEffectRenderer.h:
1102         * rendering/ImageQualityController.cpp:
1103         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1104         * rendering/ImageQualityController.h:
1105         * rendering/InlineFlowBox.cpp:
1106         (WebCore::InlineFlowBox::paintFillLayer):
1107         (WebCore::InlineFlowBox::paintBoxDecorations):
1108         (WebCore::InlineFlowBox::paintMask):
1109         * rendering/InlineTextBox.cpp:
1110         (WebCore::InlineTextBox::paint):
1111         * rendering/PaintInfo.h:
1112         (WebCore::PaintInfo::PaintInfo):
1113         (WebCore::PaintInfo::context):
1114         (WebCore::PaintInfo::setContext):
1115         (WebCore::PaintInfo::applyTransform):
1116         * rendering/RenderBlock.cpp:
1117         (WebCore::RenderBlock::paint):
1118         (WebCore::RenderBlock::paintCaret):
1119         (WebCore::RenderBlock::paintObject):
1120         (WebCore::RenderBlock::paintSelection):
1121         (WebCore::clipOutPositionedObjects):
1122         (WebCore::RenderBlock::blockSelectionGap):
1123         (WebCore::RenderBlock::logicalLeftSelectionGap):
1124         (WebCore::RenderBlock::logicalRightSelectionGap):
1125         * rendering/RenderBlockFlow.cpp:
1126         (WebCore::RenderBlockFlow::paintColumnRules):
1127         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
1128         * rendering/RenderBox.cpp:
1129         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
1130         (WebCore::RenderBox::paintBoxDecorations):
1131         (WebCore::RenderBox::paintMask):
1132         (WebCore::RenderBox::paintClippingMask):
1133         (WebCore::RenderBox::paintMaskImages):
1134         (WebCore::RenderBox::paintFillLayers):
1135         (WebCore::RenderBox::pushContentsClip):
1136         (WebCore::RenderBox::popContentsClip):
1137         * rendering/RenderBox.h:
1138         * rendering/RenderBoxModelObject.cpp:
1139         (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality):
1140         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
1141         (WebCore::applyBoxShadowForBackground):
1142         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1143         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1144         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1145         (WebCore::RenderBoxModelObject::paintOneBorderSide):
1146         (WebCore::RenderBoxModelObject::paintBorderSides):
1147         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
1148         (WebCore::RenderBoxModelObject::paintBorder):
1149         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1150         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
1151         (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
1152         (WebCore::RenderBoxModelObject::paintBoxShadow):
1153         (WebCore::RenderBoxModelObject::shouldAntialiasLines):
1154         * rendering/RenderBoxModelObject.h:
1155         * rendering/RenderDetailsMarker.cpp:
1156         (WebCore::RenderDetailsMarker::paint):
1157         * rendering/RenderElement.cpp:
1158         (WebCore::RenderElement::paintFocusRing):
1159         (WebCore::RenderElement::paintOutline):
1160         * rendering/RenderEmbeddedObject.cpp:
1161         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1162         (WebCore::drawReplacementArrow):
1163         (WebCore::RenderEmbeddedObject::paintReplaced):
1164         * rendering/RenderFieldset.cpp:
1165         (WebCore::RenderFieldset::paintBoxDecorations):
1166         * rendering/RenderFileUploadControl.cpp:
1167         (WebCore::RenderFileUploadControl::paintObject):
1168         * rendering/RenderFrameSet.cpp:
1169         (WebCore::RenderFrameSet::paintColumnBorder):
1170         (WebCore::RenderFrameSet::paintRowBorder):
1171         * rendering/RenderHTMLCanvas.cpp:
1172         (WebCore::RenderHTMLCanvas::paintReplaced):
1173         * rendering/RenderImage.cpp:
1174         (WebCore::RenderImage::paintReplaced):
1175         (WebCore::RenderImage::paintAreaElementFocusRing):
1176         (WebCore::RenderImage::paintIntoRect):
1177         * rendering/RenderImage.h:
1178         * rendering/RenderInline.cpp:
1179         (WebCore::RenderInline::paintOutline):
1180         (WebCore::RenderInline::paintOutlineForLine):
1181         * rendering/RenderInline.h:
1182         * rendering/RenderLayer.cpp:
1183         (WebCore::RenderLayer::beginTransparencyLayers):
1184         (WebCore::RenderLayer::paintOverflowControls):
1185         (WebCore::RenderLayer::paintScrollCorner):
1186         (WebCore::RenderLayer::drawPlatformResizerImage):
1187         (WebCore::RenderLayer::paintResizer):
1188         (WebCore::RenderLayer::paint):
1189         (WebCore::RenderLayer::paintOverlayScrollbars):
1190         (WebCore::RenderLayer::clipToRect):
1191         (WebCore::RenderLayer::restoreClip):
1192         (WebCore::RenderLayer::paintLayer):
1193         (WebCore::RenderLayer::paintLayerContentsAndReflection):
1194         (WebCore::RenderLayer::setupFontSubpixelQuantization):
1195         (WebCore::RenderLayer::setupClipPath):
1196         (WebCore::RenderLayer::hasFilterThatIsPainting):
1197         (WebCore::RenderLayer::setupFilters):
1198         (WebCore::RenderLayer::applyFilters):
1199         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
1200         (WebCore::RenderLayer::paintLayerContents):
1201         (WebCore::RenderLayer::paintLayerByApplyingTransform):
1202         (WebCore::RenderLayer::paintList):
1203         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1204         (WebCore::RenderLayer::paintBackgroundForFragments):
1205         (WebCore::RenderLayer::paintForegroundForFragments):
1206         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
1207         (WebCore::RenderLayer::paintOutlineForFragments):
1208         (WebCore::RenderLayer::paintMaskForFragments):
1209         (WebCore::RenderLayer::paintChildClippingMaskForFragments):
1210         (WebCore::RenderLayer::paintOverflowControlsForFragments):
1211         (WebCore::RenderLayer::calculateClipRects):
1212         * rendering/RenderLayer.h:
1213         * rendering/RenderLayerBacking.cpp:
1214         (WebCore::RenderLayerBacking::paintIntoLayer):
1215         (WebCore::RenderLayerBacking::paintContents):
1216         * rendering/RenderLayerBacking.h:
1217         * rendering/RenderLayerCompositor.cpp:
1218         (WebCore::paintScrollbar):
1219         (WebCore::RenderLayerCompositor::paintContents):
1220         * rendering/RenderListBox.cpp:
1221         (WebCore::RenderListBox::paintScrollbar):
1222         (WebCore::RenderListBox::paintItemForeground):
1223         (WebCore::RenderListBox::paintItemBackground):
1224         * rendering/RenderListMarker.cpp:
1225         (WebCore::RenderListMarker::paint):
1226         * rendering/RenderMediaControls.cpp:
1227         (WebCore::getUnzoomedRectAndAdjustCurrentContext):
1228         (WebCore::RenderMediaControls::paintMediaControlsPart):
1229         * rendering/RenderMultiColumnSet.cpp:
1230         (WebCore::RenderMultiColumnSet::paintColumnRules):
1231         * rendering/RenderObject.cpp:
1232         (WebCore::RenderObject::addPDFURLRect):
1233         * rendering/RenderReplaced.cpp:
1234         (WebCore::RenderReplaced::paint):
1235         * rendering/RenderReplica.cpp:
1236         (WebCore::RenderReplica::paint):
1237         * rendering/RenderScrollbar.cpp:
1238         (WebCore::RenderScrollbar::paint):
1239         (WebCore::RenderScrollbar::paintPart):
1240         * rendering/RenderScrollbar.h:
1241         * rendering/RenderScrollbarPart.cpp:
1242         (WebCore::RenderScrollbarPart::paintIntoRect):
1243         * rendering/RenderScrollbarPart.h:
1244         * rendering/RenderScrollbarTheme.cpp:
1245         (WebCore::RenderScrollbarTheme::paintScrollCorner):
1246         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
1247         (WebCore::RenderScrollbarTheme::paintTrackBackground):
1248         (WebCore::RenderScrollbarTheme::paintTrackPiece):
1249         (WebCore::RenderScrollbarTheme::paintButton):
1250         (WebCore::RenderScrollbarTheme::paintThumb):
1251         * rendering/RenderScrollbarTheme.h:
1252         * rendering/RenderSnapshottedPlugIn.cpp:
1253         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1254         * rendering/RenderTable.cpp:
1255         (WebCore::RenderTable::paintBoxDecorations):
1256         * rendering/RenderTableCell.cpp:
1257         (WebCore::RenderTableCell::paintCollapsedBorders):
1258         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1259         * rendering/RenderTableSection.cpp:
1260         (WebCore::RenderTableSection::paintRowGroupBorder):
1261         (WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
1262         * rendering/RenderTheme.cpp:
1263         (WebCore::RenderTheme::paint):
1264         (WebCore::RenderTheme::paintBorderOnly):
1265         (WebCore::RenderTheme::paintDecorations):
1266         (WebCore::RenderTheme::paintSliderTicks):
1267         * rendering/RenderThemeEfl.cpp:
1268         (WebCore::RenderThemeEfl::paintThemePart):
1269         * rendering/RenderThemeGtk.cpp:
1270         (WebCore::paintToggle):
1271         (WebCore::renderButton):
1272         (WebCore::RenderThemeGtk::paintMenuList):
1273         (WebCore::RenderThemeGtk::paintTextField):
1274         (WebCore::paintGdkPixbuf):
1275         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
1276         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
1277         (WebCore::RenderThemeGtk::paintCapsLockIndicator):
1278         (WebCore::RenderThemeGtk::paintSliderTrack):
1279         (WebCore::RenderThemeGtk::paintSliderThumb):
1280         (WebCore::RenderThemeGtk::paintProgressBar):
1281         (WebCore::paintSpinArrowButton):
1282         (WebCore::RenderThemeGtk::paintMediaButton):
1283         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
1284         (WebCore::RenderThemeGtk::paintMediaMuteButton):
1285         (WebCore::RenderThemeGtk::paintMediaPlayButton):
1286         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
1287         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
1288         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
1289         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
1290         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
1291         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
1292         * rendering/RenderThemeGtk.h:
1293         * rendering/RenderThemeIOS.h:
1294         * rendering/RenderThemeIOS.mm:
1295         (WebCore::RenderThemeIOS::addRoundedBorderClip):
1296         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
1297         (WebCore::RenderThemeIOS::paintRadioDecorations):
1298         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
1299         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
1300         (WebCore::RenderThemeIOS::paintSliderTrack):
1301         (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
1302         (WebCore::RenderThemeIOS::paintProgressBar):
1303         (WebCore::RenderThemeIOS::paintPushButtonDecorations):
1304         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
1305         * rendering/RenderThemeMac.mm:
1306         (WebCore::RenderThemeMac::paintTextField):
1307         (WebCore::RenderThemeMac::paintTextArea):
1308         (WebCore::RenderThemeMac::paintMenuList):
1309         (WebCore::RenderThemeMac::paintMeter):
1310         (WebCore::RenderThemeMac::paintProgressBar):
1311         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
1312         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
1313         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
1314         (WebCore::RenderThemeMac::paintSliderTrack):
1315         (WebCore::RenderThemeMac::paintSliderThumb):
1316         (WebCore::RenderThemeMac::paintSearchField):
1317         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1318         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
1319         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
1320         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1321         (WebCore::RenderThemeMac::paintImageControlsButton):
1322         (WebCore::RenderThemeMac::paintAttachment):
1323         * rendering/RenderThemeSafari.cpp:
1324         (WebCore::RenderThemeSafari::paintCheckbox):
1325         (WebCore::RenderThemeSafari::paintRadio):
1326         (WebCore::RenderThemeSafari::paintButton):
1327         (WebCore::RenderThemeSafari::paintTextField):
1328         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
1329         (WebCore::RenderThemeSafari::paintTextArea):
1330         (WebCore::RenderThemeSafari::paintMenuList):
1331         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
1332         (WebCore::RenderThemeSafari::paintMenuListButtonDecorations):
1333         (WebCore::RenderThemeSafari::paintSliderTrack):
1334         (WebCore::RenderThemeSafari::paintSliderThumb):
1335         (WebCore::RenderThemeSafari::paintSearchField):
1336         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
1337         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecorationPart):
1338         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
1339         * rendering/RenderThemeWin.cpp:
1340         (WebCore::drawControl):
1341         (WebCore::RenderThemeWin::paintButton):
1342         (WebCore::RenderThemeWin::paintInnerSpinButton):
1343         (WebCore::RenderThemeWin::paintTextField):
1344         (WebCore::RenderThemeWin::paintMenuList):
1345         (WebCore::RenderThemeWin::paintMenuListButtonDecorations):
1346         (WebCore::RenderThemeWin::paintSliderTrack):
1347         (WebCore::RenderThemeWin::paintSliderThumb):
1348         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1349         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1350         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1351         (WebCore::RenderThemeWin::paintMeter):
1352         * rendering/RenderVideo.cpp:
1353         (WebCore::RenderVideo::paintReplaced):
1354         * rendering/RenderView.cpp:
1355         (WebCore::RenderView::paint):
1356         (WebCore::RenderView::paintBoxDecorations):
1357         * rendering/RenderWidget.cpp:
1358         (WebCore::RenderWidget::paintContents):
1359         (WebCore::RenderWidget::paint):
1360         * rendering/RootInlineBox.cpp:
1361         (WebCore::RootInlineBox::lineSelectionGap):
1362         * rendering/SimpleLineLayoutFunctions.cpp:
1363         (WebCore::SimpleLineLayout::paintFlow):
1364         * rendering/mathml/RenderMathMLBlock.cpp:
1365         (WebCore::RenderMathMLBlock::paint):
1366         * rendering/mathml/RenderMathMLFraction.cpp:
1367         (WebCore::RenderMathMLFraction::paint):
1368         * rendering/mathml/RenderMathMLMenclose.cpp:
1369         (WebCore::RenderMathMLMenclose::paint):
1370         * rendering/mathml/RenderMathMLOperator.cpp:
1371         (WebCore::RenderMathMLOperator::paintGlyph):
1372         (WebCore::RenderMathMLOperator::fillWithVerticalExtensionGlyph):
1373         (WebCore::RenderMathMLOperator::fillWithHorizontalExtensionGlyph):
1374         (WebCore::RenderMathMLOperator::paint):
1375         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
1376         (WebCore::RenderMathMLRadicalOperator::paint):
1377         * rendering/mathml/RenderMathMLRoot.cpp:
1378         (WebCore::RenderMathMLRoot::paint):
1379         * rendering/shapes/Shape.cpp:
1380         (WebCore::Shape::createRasterShape):
1381         * rendering/style/NinePieceImage.cpp:
1382         (WebCore::NinePieceImage::paint):
1383         * rendering/style/NinePieceImage.h:
1384         * rendering/svg/RenderSVGContainer.cpp:
1385         (WebCore::RenderSVGContainer::paint):
1386         * rendering/svg/RenderSVGEllipse.cpp:
1387         (WebCore::RenderSVGEllipse::fillShape):
1388         (WebCore::RenderSVGEllipse::strokeShape):
1389         * rendering/svg/RenderSVGEllipse.h:
1390         * rendering/svg/RenderSVGForeignObject.cpp:
1391         (WebCore::RenderSVGForeignObject::paint):
1392         * rendering/svg/RenderSVGImage.cpp:
1393         (WebCore::RenderSVGImage::paint):
1394         (WebCore::RenderSVGImage::paintForeground):
1395         * rendering/svg/RenderSVGPath.cpp:
1396         (WebCore::useStrokeStyleToFill):
1397         (WebCore::RenderSVGPath::strokeShape):
1398         * rendering/svg/RenderSVGPath.h:
1399         * rendering/svg/RenderSVGRect.cpp:
1400         (WebCore::RenderSVGRect::fillShape):
1401         (WebCore::RenderSVGRect::strokeShape):
1402         * rendering/svg/RenderSVGRect.h:
1403         * rendering/svg/RenderSVGResourceClipper.cpp:
1404         (WebCore::RenderSVGResourceClipper::applyResource):
1405         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1406         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1407         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1408         * rendering/svg/RenderSVGResourceClipper.h:
1409         * rendering/svg/RenderSVGResourceFilter.cpp:
1410         (WebCore::RenderSVGResourceFilter::applyResource):
1411         * rendering/svg/RenderSVGResourceGradient.cpp:
1412         (WebCore::createMaskAndSwapContextForTextGradient):
1413         (WebCore::clipToTextMask):
1414         (WebCore::RenderSVGResourceGradient::applyResource):
1415         * rendering/svg/RenderSVGResourceMarker.cpp:
1416         (WebCore::RenderSVGResourceMarker::applyViewportClip):
1417         (WebCore::RenderSVGResourceMarker::draw):
1418         * rendering/svg/RenderSVGResourceMasker.cpp:
1419         (WebCore::RenderSVGResourceMasker::applyResource):
1420         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
1421         * rendering/svg/RenderSVGResourcePattern.cpp:
1422         (WebCore::RenderSVGResourcePattern::postApplyResource):
1423         (WebCore::RenderSVGResourcePattern::createTileImage):
1424         * rendering/svg/RenderSVGResourceSolidColor.cpp:
1425         (WebCore::RenderSVGResourceSolidColor::postApplyResource):
1426         * rendering/svg/RenderSVGRoot.cpp:
1427         (WebCore::RenderSVGRoot::paintReplaced):
1428         * rendering/svg/RenderSVGShape.cpp:
1429         (WebCore::RenderSVGShape::fillShape):
1430         (WebCore::RenderSVGShape::strokeShape):
1431         (WebCore::RenderSVGShape::fillStrokeMarkers):
1432         (WebCore::RenderSVGShape::paint):
1433         * rendering/svg/RenderSVGShape.h:
1434         * rendering/svg/RenderSVGText.cpp:
1435         (WebCore::RenderSVGText::paint):
1436         * rendering/svg/RenderSVGViewportContainer.cpp:
1437         (WebCore::RenderSVGViewportContainer::applyViewportClip):
1438         * rendering/svg/SVGInlineFlowBox.cpp:
1439         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
1440         (WebCore::SVGInlineFlowBox::paint):
1441         * rendering/svg/SVGInlineTextBox.cpp:
1442         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1443         (WebCore::SVGInlineTextBox::paint):
1444         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
1445         (WebCore::SVGInlineTextBox::paintDecoration):
1446         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
1447         (WebCore::SVGInlineTextBox::paintTextWithShadows):
1448         (WebCore::SVGInlineTextBox::paintText):
1449         * rendering/svg/SVGInlineTextBox.h:
1450         * rendering/svg/SVGRenderingContext.cpp:
1451         (WebCore::SVGRenderingContext::~SVGRenderingContext):
1452         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1453         (WebCore::SVGRenderingContext::createImageBuffer):
1454         (WebCore::SVGRenderingContext::clipToImageBuffer):
1455         (WebCore::SVGRenderingContext::bufferForeground):
1456         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): Deleted.
1457         * rendering/svg/SVGRenderingContext.h:
1458         * rendering/svg/SVGRootInlineBox.cpp:
1459         (WebCore::SVGRootInlineBox::paint):
1460         * rendering/svg/SVGTextRunRenderingContext.cpp:
1461         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
1462         * rendering/svg/SVGTextRunRenderingContext.h:
1463         * svg/graphics/SVGImage.cpp:
1464         (WebCore::SVGImage::drawForContainer):
1465         (WebCore::SVGImage::drawPatternForContainer):
1466         (WebCore::SVGImage::draw):
1467         * svg/graphics/SVGImage.h:
1468         * svg/graphics/SVGImageForContainer.cpp:
1469         (WebCore::SVGImageForContainer::draw):
1470         (WebCore::SVGImageForContainer::drawPattern):
1471         * svg/graphics/SVGImageForContainer.h:
1472         * svg/graphics/filters/SVGFEImage.cpp:
1473         (WebCore::FEImage::platformApplySoftware):
1474
1475 2015-08-28  Alexey Proskuryakov  <ap@apple.com>
1476
1477         Update bindings test results after
1478         https://bugs.webkit.org/show_bug.cgi?id=148591
1479
1480         JSCallbackData::invokeCallback() should return the Exception to the caller
1481
1482         * bindings/scripts/test/JS/JSTestCallback.cpp:
1483         (WebCore::JSTestCallback::callbackWithNoParam):
1484         (WebCore::JSTestCallback::callbackWithArrayParam):
1485         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
1486         (WebCore::JSTestCallback::callbackWithStringList):
1487         (WebCore::JSTestCallback::callbackWithBoolean):
1488         (WebCore::JSTestCallback::callbackRequiresThisToPass):
1489         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
1490         (WebCore::JSTestCallbackFunction::callbackWithNoParam):
1491         (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
1492         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
1493         (WebCore::JSTestCallbackFunction::callbackWithStringList):
1494         (WebCore::JSTestCallbackFunction::callbackWithBoolean):
1495         (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
1496
1497 2015-08-28  Chris Dumez  <cdumez@apple.com>
1498
1499         JSCallbackData::invokeCallback() should return the Exception to the caller
1500         https://bugs.webkit.org/show_bug.cgi?id=148591
1501
1502         Reviewed by Mark Lam.
1503
1504         JSCallbackData::invokeCallback() calls a callback function. If this
1505         function throws an exception, it will report it and clear it on the VM.
1506         However, in the case of NodeFilter, the DOM specification clearly states
1507         that we are supposed to rethrow the exception [1].
1508
1509         Once way to support this is to have JSCallbackData::invokeCallback()
1510         return the Exception to the caller and let the caller decide what to do
1511         with it (i.e. report it or rethrow it).
1512
1513         There is no actual behavior change in this patch. This slight
1514         refactoring is in preparation for Bug 148415.
1515
1516         [1] https://dom.spec.whatwg.org/#traversal
1517
1518         Some more context at:
1519         https://www.w3.org/Bugs/Public/show_bug.cgi?id=17713#c16
1520
1521         * bindings/js/JSCallbackData.cpp:
1522         (WebCore::JSCallbackData::invokeCallback):
1523         * bindings/js/JSCallbackData.h:
1524         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1525         (WebCore::JSSQLStatementErrorCallback::handleEvent):
1526         * bindings/scripts/CodeGeneratorJS.pm:
1527         (GenerateCallbackImplementation):
1528
1529 2015-08-28  Bem Jones-Bey  <bjonesbe@adobe.com>
1530
1531         [CSS Shapes] Remove unused CSSBasicShape::m_referenceBox
1532         https://bugs.webkit.org/show_bug.cgi?id=148588
1533
1534         Reviewed by Zoltan Horvath.
1535
1536         At some point, the code was refactored to no longer store the
1537         referenceBox in CSSBasicShape; however, it looks like this code
1538         wasn't cleaned up. This patch rectifies this.
1539
1540         This is based on a Blink patch by Timothy Loh.
1541
1542         No new tests, removing unused code.
1543
1544         * css/CSSBasicShapes.cpp:
1545         (WebCore::buildCircleString):
1546         (WebCore::CSSBasicShapeCircle::cssText):
1547         (WebCore::CSSBasicShapeCircle::equals):
1548         (WebCore::buildEllipseString):
1549         (WebCore::CSSBasicShapeEllipse::cssText):
1550         (WebCore::CSSBasicShapeEllipse::equals):
1551         (WebCore::buildPolygonString):
1552         (WebCore::CSSBasicShapePolygon::cssText):
1553         (WebCore::CSSBasicShapePolygon::equals):
1554         (WebCore::buildInsetString):
1555         (WebCore::CSSBasicShapeInset::cssText):
1556         * css/CSSBasicShapes.h:
1557         (WebCore::CSSBasicShape::referenceBox): Deleted.
1558         (WebCore::CSSBasicShape::setReferenceBox): Deleted.
1559
1560 2015-08-28  Eric Carlson  <eric.carlson@apple.com>
1561
1562         [Mac] Restructure WebMediaSessionManager for testing
1563         https://bugs.webkit.org/show_bug.cgi?id=148593
1564
1565         Reviewed by Jer Noble.
1566
1567         No new tests, no functional change.
1568
1569         * Modules/mediasession/WebMediaSessionManager.cpp:
1570         (WebCore::mediaProducerStateString): Add some missing states.
1571         (WebCore::webMediaSessionManagerOverride): New.
1572         (WebCore::WebMediaSessionManager::singleton): New.
1573         (WebCore::WebMediaSessionManager::setWebMediaSessionManagerOverride): New, will allow runtime
1574           registration of a mock manager.
1575         * Modules/mediasession/WebMediaSessionManager.h:
1576
1577         * platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
1578         (WebCore::WebMediaSessionManager::platformManager): Renamed from singleton.
1579         (WebCore::WebMediaSessionManagerMac::singleton): Deleted.
1580         * platform/graphics/avfoundation/WebMediaSessionManagerMac.h:
1581
1582 2015-08-28  Jer Noble  <jer.noble@apple.com>
1583
1584         [iOS] Add WebKit/WebKit2 settings to control automatic data loading
1585         https://bugs.webkit.org/show_bug.cgi?id=148579
1586
1587         Reviewed by Anders Carlsson.
1588
1589         Move the automatic and metadata restrictions from PlatformMediaSessionManager (where access
1590         to Settings is unavailable) to MediaElementSession (where it is available). Add properties
1591         to Settings so that clients can control this behavior at runtime. Move these restrictions
1592         between the two Internals functions which can set them for testing purposes.
1593
1594         * html/HTMLMediaElement.cpp:
1595         (WebCore::HTMLMediaElement::HTMLMediaElement):
1596         * html/MediaElementSession.cpp:
1597         (WebCore::MediaElementSession::effectivePreloadForElement):
1598         * html/MediaElementSession.h:
1599         * platform/audio/PlatformMediaSessionManager.h:
1600         * platform/audio/ios/MediaSessionManagerIOS.mm:
1601         (WebCore::MediaSessionManageriOS::resetRestrictions): Deleted.
1602         * testing/Internals.cpp:
1603         (WebCore::Internals::setMediaElementRestrictions):
1604         (WebCore::Internals::setMediaSessionRestrictions): Deleted.
1605
1606 2015-08-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1607
1608         Move std::function from JSFunction into NativeStdFunctionCell to correctly destroy the heap allocated std::function
1609         https://bugs.webkit.org/show_bug.cgi?id=148262
1610
1611         Reviewed by Filip Pizlo.
1612
1613         No behavior change.
1614
1615         Change JSFunction::create to JSNativeStdFunction::create to explicitly create the JSNativeStdFunction with the C++ lambda.
1616
1617         * ForwardingHeaders/runtime/JSNativeStdFunction.h: Added.
1618         * bindings/js/ReadableJSStream.cpp:
1619         (WebCore::createStartResultFulfilledFunction):
1620         (WebCore::createPullResultFulfilledFunction):
1621         (WebCore::createCancelResultFulfilledFunction):
1622         (WebCore::createCancelResultRejectedFunction):
1623         (WebCore::ReadableJSStream::ReadableJSStream):
1624
1625 2015-08-28  Sukolsak Sakshuwong  <sukolsak@gmail.com>
1626
1627         Create WebAssembly functions
1628         https://bugs.webkit.org/show_bug.cgi?id=148373
1629
1630         Reviewed by Filip Pizlo.
1631
1632         No new tests, because it is a function rename.
1633
1634         * testing/Internals.cpp:
1635         (WebCore::Internals::parserMetaData):
1636
1637 2015-08-28  Jer Noble  <jer.noble@apple.com>
1638
1639         [iOS] Make the AllowsInlineMediaPlayback preference work in WebKit / WebKit2.
1640         https://bugs.webkit.org/show_bug.cgi?id=147512
1641
1642         Reviewed by Anders Carlsson.
1643
1644         Updated existing tests to use the Setting rather than the Behavior Restriction.
1645
1646         Get rid of the sessionRestrictsInlineVideoPlayback() method and the InlineVideoPlaybackRestricted
1647         restriction. Instead, just use the allowsInlineMediaPlayback() setting, and require
1648         WebKit and WebKitLegacy clients to initialize the setting appropriately.
1649
1650         * html/MediaElementSession.cpp:
1651         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): Deleted.
1652         * page/Settings.cpp: Add a new inlineMediaPlaybackRequiresPlaysInlineAttribute setting.
1653         * page/Settings.in: Ditto.
1654         * platform/audio/PlatformMediaSessionManager.cpp:
1655         (WebCore::PlatformMediaSessionManager::sessionRestrictsInlineVideoPlayback): Deleted.
1656         * platform/audio/PlatformMediaSessionManager.h:
1657         * platform/audio/ios/MediaSessionManagerIOS.mm:
1658         (WebCore::MediaSessionManageriOS::resetRestrictions): Deleted.
1659         * testing/InternalSettings.cpp:
1660         (WebCore::InternalSettings::Backup::Backup): Backup the allowsInlineMediaPlayback() setting value.
1661         (WebCore::InternalSettings::Backup::restoreTo): Restore same.
1662         (WebCore::InternalSettings::setAllowsInlineMediaPlayback): Set allowsInlineMediaPlayback().
1663         * testing/InternalSettings.h:
1664         * testing/InternalSettings.idl:
1665         * testing/Internals.cpp:
1666         (WebCore::Internals::setMediaSessionRestrictions): Deleted.
1667
1668 2015-08-28  Eric Carlson  <eric.carlson@apple.com>
1669
1670         Media Session: MediaSession.releaseSession() renamed to deactivate()
1671         https://bugs.webkit.org/show_bug.cgi?id=148578
1672
1673         Reviewed by Jer Noble.
1674
1675         No new tests, media/session/releasing-sessions.html was updated for the change.
1676
1677         * Modules/mediasession/MediaSession.cpp:
1678         (WebCore::MediaSession::deactivate): Renamed from releaseSession.
1679         (WebCore::MediaSession::releaseSession): Deleted.
1680         * Modules/mediasession/MediaSession.h:
1681         * Modules/mediasession/MediaSession.idl:
1682
1683         * html/HTMLMediaElement.cpp:
1684         (WebCore::HTMLMediaElement::setSession): releaseSession -> deactivate.
1685
1686 2015-08-28  Joseph Pecoraro  <pecoraro@apple.com>
1687
1688         Web Inspector: Separate creating a style sheet from adding a new rule in the protocol
1689         https://bugs.webkit.org/show_bug.cgi?id=148502
1690
1691         Reviewed by Timothy Hatcher.
1692
1693         Tests: inspector/css/createStyleSheet.html
1694                inspector/css/manager-preferredInspectorStyleSheetForFrame.html
1695
1696         * inspector/InspectorCSSAgent.h:
1697         Allow for multiple inspector style sheets per document.
1698
1699         * inspector/InspectorCSSAgent.cpp:
1700         (WebCore::InspectorCSSAgent::createStyleSheet):
1701         (WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Added.
1702         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): Deleted.
1703         Extract and generalize creating a via-inspector stylesheet here.
1704
1705         (WebCore::InspectorCSSAgent::addRule):
1706         Lookup stylesheet to add a rule to via the provided stylesheet id.
1707
1708         (WebCore::InspectorCSSAgent::bindStyleSheet):
1709         (WebCore::InspectorCSSAgent::detectOrigin):
1710         Update to account for a list of stylesheets per document instead of one.
1711
1712         * inspector/InspectorStyleSheet.cpp:
1713         (WebCore::InspectorStyleSheet::addRule):
1714         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText):
1715
1716 2015-08-28  Timothy Horton  <timothy_horton@apple.com>
1717
1718         [Mac] Right-clicking on GIFs spins the UI process for a while
1719         https://bugs.webkit.org/show_bug.cgi?id=148566
1720         <rdar://problem/22460854>
1721
1722         Reviewed by Brady Eidson.
1723
1724         * platform/ContextMenuItem.h:
1725         Properly mark this as Mac-only. It's only implemented in ContextMenuItemMac.
1726
1727         * platform/mac/ContextMenuItemMac.mm:
1728         (WebCore::ContextMenuItem::shareMenuItem):
1729         Take a NSImage directly, so we don't have to round-trip through BitmapImage,
1730         which can be lossy and expensive.
1731
1732 2015-08-28  Brady Eidson  <beidson@apple.com>
1733
1734         Use new CFNetwork cookie jar SPI only on El Capitan.
1735         https://bugs.webkit.org/show_bug.cgi?id=148574 and rdar://problem/22460752
1736
1737         Reviewed by David Kilzer.
1738
1739         * platform/network/mac/CookieJarMac.mm:
1740         (WebCore::setCookiesFromDOM): Use OS X version to decide which API/SPI to use.
1741         * platform/spi/cf/CFNetworkSPI.h: Forward declare the SPI
1742
1743 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
1744
1745         [Cocoa] Draw fonts at their native sizes instead of scaling a 1pt font
1746         https://bugs.webkit.org/show_bug.cgi?id=146045
1747
1748         Reviewed by Darin Adler.
1749
1750         In his WWDC talk[1], Antonio Cavedoni describes how painting a font at a particular point size
1751         may yield different visual results than painting a font at a 1pt size into a scaled context.
1752         However, this is something that we currently do in WebKit. This patch migrates from this
1753         behavior to instead drawing text at the appropriate point size.
1754
1755         [1] https://developer.apple.com/videos/wwdc/2015/?id=804
1756
1757         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1758         (WebCore::FontCascade::drawGlyphs):
1759
1760 2015-08-27  Zalan Bujtas  <zalan@apple.com>
1761
1762         Tiny cleanup in RenderLayer::enclosingCompositingLayerForRepaint()
1763         https://bugs.webkit.org/show_bug.cgi?id=148541
1764
1765         Reviewed by Tim Horton.
1766
1767         No change in functionality.
1768
1769         * rendering/RenderLayer.cpp:
1770         (WebCore::compositingContainer):
1771         (WebCore::compositedWithOwnBackingStore):
1772         (WebCore::RenderLayer::enclosingCompositingLayer):
1773         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
1774         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
1775         (WebCore::RenderLayer::clippingRootForPainting):
1776         * rendering/RenderLayer.h:
1777         * rendering/RenderLayerBacking.cpp:
1778         (WebCore::descendantLayerPaintsIntoAncestor):
1779
1780 2015-08-27  Commit Queue  <commit-queue@webkit.org>
1781
1782         Unreviewed, rolling out r189079.
1783         https://bugs.webkit.org/show_bug.cgi?id=148555
1784
1785         broke the build (Requested by jessieberlin on #webkit).
1786
1787         Reverted changeset:
1788
1789         "Create WebAssembly functions"
1790         https://bugs.webkit.org/show_bug.cgi?id=148373
1791         http://trac.webkit.org/changeset/189079
1792
1793 2015-08-27  Sukolsak Sakshuwong  <sukolsak@gmail.com>
1794
1795         Create WebAssembly functions
1796         https://bugs.webkit.org/show_bug.cgi?id=148373
1797
1798         Reviewed by Geoffrey Garen.
1799
1800         No new tests because it's a function rename.
1801
1802         * testing/Internals.cpp:
1803         (WebCore::Internals::parserMetaData):
1804
1805 2015-08-27  Chris Dumez  <cdumez@apple.com>
1806
1807         A WebIDL callback interface is allowed to have constants
1808         https://bugs.webkit.org/show_bug.cgi?id=148449
1809
1810         Reviewed by Geoffrey Garen.
1811
1812         Our JS bindings generator is now able to:
1813         1. Handle IDL constants [1] on a callback interfaces [2] and generate
1814            a DOMConstructorObject subclass with static properties for
1815            these constants [3].
1816         2. Generate a property on the global object for callback interfaces
1817            that have constants and do not have the [NoInterfaceObject] IDL
1818            extended attribute [4].
1819
1820         This is a pre-requirement for Bug 148415 as NodeFilter [5] has constants
1821         and should be a callback interface. Once NodeFilter is ported to be
1822         a callback interface, the JS still needs to be able to access
1823         window.NodeFilter.SHOW_ALL for e.g.
1824
1825         [1] https://heycam.github.io/webidl/#dfn-constant
1826         [2] https://heycam.github.io/webidl/#dfn-callback-interface
1827         [3] https://heycam.github.io/webidl/#NoInterfaceObject
1828         [4] https://heycam.github.io/webidl/#es-interfaces
1829         [5] https://dom.spec.whatwg.org/#interface-nodefilter
1830
1831         * bindings/scripts/CodeGeneratorJS.pm:
1832         (GenerateCallbackHeader):
1833         (GenerateCallbackImplementation):
1834         (GenerateConstructorHelperMethods):
1835         (ConstructorHasProperties): Deleted.
1836         * bindings/scripts/preprocess-idls.pl:
1837         (getInterfaceExtendedAttributesFromIDL):
1838         (interfaceHasConstantAttribute):
1839         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1840         * bindings/scripts/test/JS/JSTestCallback.cpp:
1841         (WebCore::JSTestCallbackConstructor::create):
1842         (WebCore::JSTestCallbackConstructor::createStructure):
1843         (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
1844         (WebCore::JSTestCallbackConstructor::finishCreation):
1845         (WebCore::JSTestCallback::getConstructor):
1846         * bindings/scripts/test/JS/JSTestCallback.h:
1847         * bindings/scripts/test/ObjC/DOMTestCallback.h:
1848         * bindings/scripts/test/TestCallback.idl:
1849
1850 2015-08-27  Chris Dumez  <cdumez@apple.com>
1851
1852         Range.compareBoundaryPoints() should throw a NotSupportedError for invalid compareHow values
1853         https://bugs.webkit.org/show_bug.cgi?id=148483
1854
1855         Reviewed by Geoffrey Garen.
1856
1857         Range.compareBoundaryPoints() should throw a NotSupportedError for
1858         invalid compareHow values:
1859         https://dom.spec.whatwg.org/#dom-range-compareboundarypoints (step 1)
1860
1861         Firefox and Chrome conform to the specification already.
1862
1863         Previously, WebKit would not throw and simply cast the value to our
1864         internal CompareHow enum type. This patch aligns WebKit's behavior with
1865         the DOM specificaiton and other browsers.
1866
1867         W3C test suite:
1868         http://w3c-test.org/dom/ranges/Range-compareBoundaryPoints.html
1869
1870         Test: fast/dom/Range/compareBoundaryPoints-compareHow-exception.html
1871
1872         * bindings/scripts/CodeGenerator.pm:
1873         * bindings/scripts/CodeGeneratorGObject.pm:
1874         * bindings/scripts/CodeGeneratorJS.pm:
1875         * bindings/scripts/CodeGeneratorObjC.pm:
1876         Drop CompareHow special casing from bindings generator as we now use
1877         unsigned short instead in the IDL.
1878
1879         * dom/Range.cpp:
1880         (WebCore::Range::compareBoundaryPointsForBindings):
1881         * dom/Range.h:
1882         * dom/Range.idl:
1883         Use "unsigned short" type instead of WebCore's CompareHow for the
1884         parameter, as per the specification. On implementation side, we
1885         now validate the compareHow value before casting it to a CompareHow
1886         enum type. If the value is not value, we throw and abort early.
1887
1888 2015-08-27  Joseph Pecoraro  <pecoraro@apple.com>
1889
1890         Page does not update when <link> media attribute changes to no longer apply to page
1891         https://bugs.webkit.org/show_bug.cgi?id=148392
1892
1893         Reviewed by Antti Koivisto.
1894
1895         Test: fast/css/link-media-attr.html
1896
1897         * html/HTMLLinkElement.cpp:
1898         (WebCore::HTMLLinkElement::parseAttribute):
1899         When the media attribute changes, recalculate styles if the link is not disabled.
1900
1901 2015-08-27  Zalan Bujtas  <zalan@apple.com>
1902
1903         Simple line layout: Text jumps sometimes on naughty strings page
1904         https://bugs.webkit.org/show_bug.cgi?id=148399
1905         rdar://problem/22212568
1906
1907         Reviewed by Antti Koivisto.
1908
1909         The x position we set for tab characters during painting should
1910         be the same as if it was set by the inline box tree painting.
1911
1912         Inline box tree computes the distance from the rootbox for each line
1913         and sets this value as the xPos for the TextRun.
1914         Currently simple line layout does not support cases where a line
1915         would have an offset, so this value is always 0.
1916
1917         Test: fast/text/whitespace/simple-line-layout-tab-position.html
1918
1919         * rendering/SimpleLineLayoutFunctions.cpp:
1920         (WebCore::SimpleLineLayout::paintFlow):
1921
1922 2015-08-27  Alex Christensen  <achristensen@webkit.org>
1923
1924         Isolate Source directories in CMake build
1925         https://bugs.webkit.org/show_bug.cgi?id=148389
1926
1927         Reviewed by Brent Fulgham.
1928
1929         * CMakeLists.txt:
1930         Use the forwarding header copy of the inspector scripts to avoid requiring JavaScriptCore directory to exist.
1931         * PlatformAppleWin.cmake:
1932         Add AVFoundation sources to build.
1933         * PlatformEFL.cmake:
1934         Moved WebKitVersion.h generating from CMakeLists.txt because it is now only used in WebCore by EFL.
1935         * PlatformWin.cmake:
1936         Include ../include/private to find forwarding headers in internal build.
1937
1938 2015-08-27  Alex Christensen  <achristensen@webkit.org>
1939
1940         [Win CMake] Fix incremental build after r188673
1941         https://bugs.webkit.org/show_bug.cgi?id=148539
1942
1943         Reviewed by Brent Fulgham.
1944
1945         * CMakeLists.txt:
1946         * PlatformWin.cmake:
1947         Use xcopy as a build step instead of file(COPY ...) to copy updated headers.
1948
1949 2015-08-27  Timothy Horton  <timothy_horton@apple.com>
1950
1951         Factor out Lookup invocation
1952         https://bugs.webkit.org/show_bug.cgi?id=148509
1953
1954         Reviewed by Anders Carlsson.
1955
1956         There's a ton of duplicated code in legacy and modern WebKit to talk to
1957         Lookup. And, it's pretty messy. As a first step to making it less messy,
1958         make it so we only have it in one place instead of four (or two).
1959
1960         * editing/DictionaryPopupInfo.h:
1961         Move DictionaryPopupInfo into WebCore. This was duplicated
1962         in both legacy and modern WebKit.
1963
1964         * editing/mac/DictionaryLookup.h:
1965         * editing/mac/DictionaryLookup.mm:
1966         (WebCore::DictionaryLookup::rangeForSelection):
1967         (WebCore::DictionaryLookup::rangeAtHitTestResult):
1968         (WebCore::DictionaryLookup::stringForPDFSelection):
1969         (WebCore::showPopupOrCreateAnimationController):
1970         (WebCore::DictionaryLookup::showPopup):
1971         (WebCore::DictionaryLookup::hidePopup):
1972         (WebCore::DictionaryLookup::animationControllerForPopup):
1973         (WebCore::rangeForDictionaryLookupForSelection): Deleted.
1974         (WebCore::rangeForDictionaryLookupAtHitTestResult): Deleted.
1975         (WebCore::dictionaryLookupForPDFSelection): Deleted.
1976         Move DictionaryLookup stuff into a class for better names.
1977
1978         Move showPopup, hidePopup, and animationControllerForPopup here.
1979         showPopup and animationControllerForPopup both bottleneck through
1980         a single function, where previously we duplicated all of the code
1981         for both of them, and in both legacy and modern WebKit.
1982
1983         showPopup and animationControllerForPopup take a block that they *may*
1984         call if we have support for overriding Lookup's indicator with TextIndicator,
1985         because the installation process is different per WebKit.
1986
1987         * page/mac/EventHandlerMac.mm:
1988         (WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
1989         * testing/Internals.cpp:
1990         (WebCore::Internals::rangeForDictionaryLookupAtLocation):
1991         Adjust to the new naming.
1992
1993 2015-08-27  Jon Davis  <jond@apple.com>
1994
1995         Add IndexedDB to the feature status page.
1996         https://bugs.webkit.org/show_bug.cgi?id=148094
1997
1998         Reviewed by Timothy Hatcher.
1999
2000         * features.json:
2001
2002 2015-08-27  Anders Carlsson  <andersca@apple.com>
2003
2004         REGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
2005         https://bugs.webkit.org/show_bug.cgi?id=148497
2006         <rdar://problem/22459541>
2007
2008         Reviewed by Andy Estes.
2009
2010         Don't return early if iterations is 0.
2011
2012         * platform/graphics/filters/FEConvolveMatrix.cpp:
2013         (WebCore::FEConvolveMatrix::platformApplySoftware):
2014
2015 2015-08-27  Antti Koivisto  <antti@apple.com>
2016
2017         Decode redirected data URLs in web process
2018         https://bugs.webkit.org/show_bug.cgi?id=148386
2019
2020         Reviewed by Zalan Bujtas.
2021
2022         Redirected data URLs still end up to networking layer for decoding. Handle them locally as well.
2023
2024         Covered by existing tests.
2025
2026         * loader/ResourceLoader.cpp:
2027         (WebCore::ResourceLoader::~ResourceLoader):
2028         (WebCore::ResourceLoader::finishNetworkLoad):
2029
2030             Factor to a function.
2031
2032         (WebCore::ResourceLoader::releaseResources):
2033         (WebCore::ResourceLoader::willSendRequestInternal):
2034
2035             When receiving redirect to a data URL end the network load and decode it locally.
2036
2037         (WebCore::ResourceLoader::willSendRequest):
2038         * loader/ResourceLoader.h:
2039
2040 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
2041
2042         [Cocoa] Generic font families do not consult with the user's preferred language
2043         https://bugs.webkit.org/show_bug.cgi?id=148499
2044         <rdar://problem/22407296>
2045
2046         Reviewed by Antti Koivisto.
2047
2048         When WebKit encounters markup like lang="zh" style="font-family: sans-serif;"
2049         we currently always use Simplified Chinese fonts. However, the user may
2050         have specifically selected Traditional Chinese in their user preferences.
2051         In this absence of other signals, we should consult with the user
2052         preferences when determining which font to pick.
2053
2054         Tests: fast/text/international/generic-font-family-language-simplified.html
2055                fast/text/international/generic-font-family-language-traditional.html
2056
2057         * platform/Language.cpp:
2058         (WebCore::observerMap):
2059         (WebCore::overrideUserPreferredLanguages):
2060         * platform/graphics/FontGenericFamilies.cpp:
2061         (WebCore::computeUserPrefersSimplified):
2062         (WebCore::cachedUserPrefersSimplified):
2063         (WebCore::languageChanged):
2064         (WebCore::genericFontFamilyForScript):
2065         (WebCore::FontGenericFamilies::FontGenericFamilies):
2066         * platform/text/LocaleToScriptMappingDefault.cpp:
2067         (WebCore::scriptNameToCode):
2068
2069 2015-08-27  Myles C. Maxfield  <mmaxfield@apple.com>
2070
2071         Update Grid Layout to use fewer magic -1s
2072         https://bugs.webkit.org/show_bug.cgi?id=148505
2073
2074         Reviewed by Javier Fernandez.
2075
2076         After r188873, there were still some -1s left in Grid Layout code. This patch cleans them
2077         up after consulting with Javier Fernandez.
2078
2079         No new tests because there is no behavior change.
2080
2081         * rendering/RenderBox.cpp:
2082         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
2083         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
2084         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2085         * rendering/RenderGrid.cpp:
2086         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2087
2088 2015-08-27  Brian Burg  <bburg@apple.com>
2089
2090         Web Inspector: FrontendChannel should know its own connection type
2091         https://bugs.webkit.org/show_bug.cgi?id=148482
2092
2093         Reviewed by Joseph Pecoraro.
2094
2095         To prepare for multiple attached frontends, the frontend connection should
2096         be able to report its type rather than explicitly setting connection type
2097         via a getter.
2098
2099         No behavior change, no new tests.
2100
2101         * inspector/InspectorController.cpp:
2102         (WebCore::InspectorController::hasLocalFrontend): Ask the channel what it is.
2103         (WebCore::InspectorController::hasRemoteFrontend): Ask the channel what it is.
2104         (WebCore::InspectorController::connectFrontend): Use hasRemoteFrotend().
2105         (WebCore::InspectorController::disconnectFrontend): Use hasRemoteFrontend().
2106         (WebCore::InspectorController::InspectorController): Deleted.
2107         * inspector/InspectorController.h: Initialize a few members here.
2108         (WebCore::InspectorController::hasFrontend): Deleted, it was unused.
2109         (WebCore::InspectorController::setHasRemoteFrontend): Deleted.
2110         * inspector/WorkerInspectorController.cpp:
2111         * page/PageDebuggable.cpp:
2112         (WebCore::PageDebuggable::connect):
2113         (WebCore::PageDebuggable::disconnect):
2114         * testing/Internals.cpp: Add connectionType().
2115
2116 2015-08-27  Eric Carlson  <eric.carlson@apple.com>
2117
2118         Media Session: MediaSession constructor 'kind' argument optional
2119         https://bugs.webkit.org/show_bug.cgi?id=148527
2120
2121         Reviewed by Jer Noble.
2122
2123         No new tests, updated media/session/session-creation.html.
2124
2125         * Modules/mediasession/MediaSession.cpp:
2126         (WebCore::MediaSession::parseKind): Treat null kind "content".
2127         (WebCore::MediaSession::MediaSession): Delete Document* version.
2128         * Modules/mediasession/MediaSession.h: Make constructor private.
2129         * Modules/mediasession/MediaSession.idl:
2130
2131         * WebCore.xcodeproj/project.pbxproj: Add JSMediaSessionCustom.cpp.
2132
2133         * bindings/js/JSMediaSessionCustom.cpp: Added.
2134         (WebCore::constructJSMediaSession):
2135
2136         * dom/Document.cpp:
2137         (WebCore::Document::defaultMediaSession): Call MediaSession::create.
2138
2139         * html/HTMLMediaElement.cpp:
2140         (WebCore::HTMLMediaElement::session): Compare session with document.defaultMediaSession, not
2141           its kind.
2142         (WebCore::HTMLMediaElement::setSession): Update comments.
2143
2144 2015-08-27  Zalan Bujtas  <zalan@apple.com>
2145
2146         Simple line layout: Use float types wherever possible to match line tree.
2147         https://bugs.webkit.org/show_bug.cgi?id=148444
2148
2149         Reviewed by Antti Koivisto.
2150
2151         To match inline tree output, we should try to match the data types as far as precision goes.
2152
2153         This patch also fixes the confusing mismatch between Run::baseline().x() and Run::rect().x(). 
2154         They are both supposed to return the left edge of the run. However Run::rect().x() returns a rounded
2155         LayoutUnit of the logical left, while Run::baseline().x() returns the correct logical left.          
2156         With this patch 
2157           1. baseline position does not include logical left anymore.
2158           2. Run::rect().x() does not round the logical left coordinate anymore.
2159
2160         * rendering/RenderTreeAsText.cpp:
2161         (WebCore::writeSimpleLine):
2162         * rendering/SimpleLineLayoutFunctions.cpp:
2163         (WebCore::SimpleLineLayout::paintFlow):
2164         (WebCore::SimpleLineLayout::collectFlowOverflow):
2165         (WebCore::SimpleLineLayout::collectAbsoluteRects):
2166         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
2167         * rendering/SimpleLineLayoutResolver.cpp:
2168         (WebCore::SimpleLineLayout::linePosition):
2169         (WebCore::SimpleLineLayout::lineSize):
2170         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
2171         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
2172         (WebCore::SimpleLineLayout::baselinePosition): Deleted.
2173         (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
2174         * rendering/SimpleLineLayoutResolver.h:
2175         (WebCore::SimpleLineLayout::RunResolver::Run::baselinePosition):
2176         (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):
2177
2178 2015-08-27  Zalan Bujtas  <zalan@apple.com>
2179
2180         Subpixel positioned iframe's repaint area calculation problem.
2181         https://bugs.webkit.org/show_bug.cgi?id=148422
2182
2183         When the repaint rect position is floored for iframes, we need
2184         to expand the size so that it still covers the content.
2185
2186         Reviewed by Simon Fraser.
2187
2188         Test: fast/repaint/content-inside-subpixel-positioned-iframe.html
2189
2190         * rendering/RenderBox.cpp:
2191         (WebCore::RenderBox::computeRectForRepaint):
2192
2193 2015-08-27  Enrica Casucci  <enrica@apple.com>
2194
2195         Add some new emoji with modifiers and new sequence.
2196         https://bugs.webkit.org/show_bug.cgi?id=148202
2197         rdar://problem/21849857
2198
2199         Reviewed by Sam Weinig.
2200
2201         Adding support for some new emoji with modifiers and
2202         one new emoji sequence.
2203
2204         * platform/graphics/FontCascade.cpp:
2205         (WebCore::FontCascade::characterRangeCodePath):
2206         * platform/text/CharacterProperties.h:
2207         (WebCore::isEmojiGroupCandidate):
2208         (WebCore::isEmojiModifier):
2209         * platform/text/TextBreakIterator.cpp:
2210         (WebCore::cursorMovementIterator):
2211
2212 2015-08-27  Dean Jackson  <dino@apple.com>
2213
2214         Initial infrastructure of media controls testing
2215         https://bugs.webkit.org/show_bug.cgi?id=148426
2216         <rdar://problem/22417286>
2217
2218         Reviewed by Eric Carlson.
2219
2220         Expose a JS API from Internals that allows a layout test
2221         to ask the controls instance what it thinks it is
2222         doing.
2223
2224         Test: media/controls/basic.html
2225
2226         * Modules/mediacontrols/mediaControlsApple.js:
2227         (Controller.prototype.getCurrentControlsStatus): New method. Currently
2228         returns a simple JSON string.
2229         * html/HTMLMediaElement.cpp:
2230         (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): Call into
2231         the controls instance.
2232         * html/HTMLMediaElement.h:
2233         * testing/Internals.cpp:
2234         (WebCore::Internals::getCurrentMediaControlsStatusForElement): Link
2235         between the Internals API and the HTMLMediaElement.
2236         * testing/Internals.h:
2237         * testing/Internals.idl:
2238
2239 2015-08-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2240
2241         [EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
2242         https://bugs.webkit.org/show_bug.cgi?id=148511
2243
2244         Reviewed by Csaba Osztrogonác.
2245
2246         To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.
2247
2248         Additionally this patch fixes style errors in RenderThemeEfl.cpp
2249
2250         * PlatformEfl.cmake:
2251         * rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
2252         (WebCore::toEdjeGroup):
2253         (WebCore::setSourceGroupForEdjeObject):
2254         (WebCore::RenderThemeEfl::adjustSizeConstraints):
2255         (WebCore::isFormElementTooLargeToDisplay):
2256         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
2257         (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
2258         (WebCore::RenderThemeEfl::getThemePartFromCache):
2259         (WebCore::RenderThemeEfl::clearThemePartCache):
2260         (WebCore::RenderThemeEfl::applyEdjeStateFromForm):
2261         (WebCore::RenderThemeEfl::applyEdjeRTLState):
2262         (WebCore::RenderThemeEfl::isControlStyled):
2263         (WebCore::RenderThemeEfl::paintThemePart):
2264         (WebCore::RenderThemeEfl::create):
2265         (WebCore::RenderTheme::themeForPage):
2266         (WebCore::applyColorCallback):
2267         (WebCore::fillColorsFromEdjeClass):
2268         (WebCore::RenderThemeEfl::setColorFromThemeClass):
2269         (WebCore::RenderThemeEfl::setThemePath):
2270         (WebCore::RenderThemeEfl::themePath):
2271         (WebCore::RenderThemeEfl::loadTheme):
2272         (WebCore::RenderThemeEfl::applyPartDescriptionFallback):
2273         (WebCore::RenderThemeEfl::applyPartDescription):
2274         (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
2275         (WebCore::RenderThemeEfl::RenderThemeEfl):
2276         (WebCore::RenderThemeEfl::~RenderThemeEfl):
2277         (WebCore::supportsFocus):
2278         (WebCore::RenderThemeEfl::supportsFocusRing):
2279         (WebCore::RenderThemeEfl::controlSupportsTints):
2280         (WebCore::RenderThemeEfl::baselinePosition):
2281         (WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
2282         (WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
2283         (WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
2284         (WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
2285         (WebCore::RenderThemeEfl::platformFocusRingColor):
2286         (WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
2287         (WebCore::RenderThemeEfl::paintSliderTrack):
2288         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
2289         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
2290         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
2291         (WebCore::RenderThemeEfl::sliderTickSize):
2292         (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
2293         (WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
2294         (WebCore::RenderThemeEfl::supportsDataListUI):
2295         (WebCore::RenderThemeEfl::paintSliderThumb):
2296         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
2297         (WebCore::RenderThemeEfl::paintCheckbox):
2298         (WebCore::RenderThemeEfl::adjustRadioStyle):
2299         (WebCore::RenderThemeEfl::paintRadio):
2300         (WebCore::RenderThemeEfl::adjustButtonStyle):
2301         (WebCore::RenderThemeEfl::paintButton):
2302         (WebCore::RenderThemeEfl::adjustMenuListStyle):
2303         (WebCore::RenderThemeEfl::paintMenuList):
2304         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
2305         (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
2306         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
2307         (WebCore::RenderThemeEfl::paintTextField):
2308         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
2309         (WebCore::RenderThemeEfl::paintTextArea):
2310         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
2311         (WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
2312         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
2313         (WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
2314         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
2315         (WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
2316         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
2317         (WebCore::RenderThemeEfl::paintSearchField):
2318         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
2319         (WebCore::RenderThemeEfl::paintInnerSpinButton):
2320         (WebCore::RenderThemeEfl::setDefaultFontSize):
2321         (WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
2322         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
2323         (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
2324         (WebCore::RenderThemeEfl::animationDurationForProgressBar):
2325         (WebCore::RenderThemeEfl::paintProgressBar):
2326         (WebCore::RenderThemeEfl::mediaControlsStyleSheet):
2327         (WebCore::RenderThemeEfl::mediaControlsScript):
2328         * rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.
2329
2330 2015-08-26  Mark Lam  <mark.lam@apple.com>
2331
2332         watchdog m_didFire state erroneously retained.
2333         https://bugs.webkit.org/show_bug.cgi?id=131082
2334
2335         Reviewed by Geoffrey Garen.
2336
2337         No new tests.  The new code is covered by the JSC API tests and an existing test:
2338         fast/workers/worker-terminate-forever.html
2339
2340         * bindings/js/JSEventListener.cpp:
2341         (WebCore::JSEventListener::handleEvent):
2342         * bindings/js/WorkerScriptController.cpp:
2343         (WebCore::WorkerScriptController::WorkerScriptController):
2344         - Always create a watchdog for the Web Worker's VM.  We need this in order to support
2345           Worker.terminate().
2346         (WebCore::WorkerScriptController::evaluate):
2347         (WebCore::WorkerScriptController::scheduleExecutionTermination):
2348         (WebCore::WorkerScriptController::isTerminatingExecution):
2349         (WebCore::WorkerScriptController::forbidExecution):
2350         (WebCore::WorkerScriptController::isExecutionTerminating): Deleted.
2351         * bindings/js/WorkerScriptController.h:
2352
2353 2015-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
2354
2355         [Cocoa] PerformanceTest Layout/RegionsShapes.html is failing
2356         https://bugs.webkit.org/show_bug.cgi?id=148464
2357
2358         Reviewed by Andy Estes.
2359
2360         The test is failing because Core Text emits a warning message when you use CTFontCreateWithName()
2361         and it cannot find the name you provide. However, this is exactly the situation we are creating
2362         (by attempting to auto-activate a font if we could not otherwise find it). The fix is to simply
2363         not use that API function in favor of using CTFontCreateWithFontDescriptor(), which does not emit
2364         a warning message..
2365
2366         No new tests because there is no behavior change.
2367
2368         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2369         (WebCore::autoActivateFont):
2370         (WebCore::FontCache::createFontPlatformData):
2371
2372 2015-08-26  Joseph Pecoraro  <pecoraro@apple.com>
2373
2374         Web Inspector: Implement tracking of active stylesheets in the frontend
2375         https://bugs.webkit.org/show_bug.cgi?id=105828
2376
2377         Reviewed by Timothy Hatcher.
2378
2379         Tests: inspector/css/stylesheet-events-basic.html
2380                inspector/css/stylesheet-events-imports.html
2381                inspector/css/stylesheet-events-inspector-stylesheet.html
2382
2383         * inspector/InspectorInstrumentation.cpp:
2384         (WebCore::InspectorInstrumentation::documentDetachedImpl):
2385         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdatedImpl):
2386         * inspector/InspectorInstrumentation.h:
2387         (WebCore::InspectorInstrumentation::documentDetached):
2388         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdated):
2389         New hooks for when a document is detached or a document's style sheets are updated.
2390
2391         * dom/Document.cpp:
2392         (WebCore::Document::prepareForDestruction):
2393         Inform the inspector so the CSSAgent can remove document related data.
2394
2395         * dom/DocumentStyleSheetCollection.h:
2396         * dom/DocumentStyleSheetCollection.cpp:
2397         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2398         Inform the inspector so the CSSAgent can push stylesheet related events.
2399
2400         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsForInspector): Added.
2401         CSSStyleSheets for the inspector include non-disabled author stylesheets
2402         even if they are empty.
2403
2404         * inspector/InspectorCSSAgent.h:
2405         * inspector/InspectorCSSAgent.cpp:
2406         (WebCore::InspectorCSSAgent::reset):
2407         (WebCore::InspectorCSSAgent::documentDetached):
2408         Handling for the new list of known document to CSSStyleSheets map.
2409
2410         (WebCore::InspectorCSSAgent::enable):
2411         When the CSS domain is enabled, tell the frontend about known stylesheets.
2412
2413         (WebCore::InspectorCSSAgent::activeStyleSheetsUpdated):
2414         (WebCore::InspectorCSSAgent::setActiveStyleSheetsForDocument):
2415         Diff the old list of known stylesheets to the new list of stylesheets
2416         for an individual document. Then send appropriate added/removed events.
2417
2418         (WebCore::InspectorCSSAgent::collectAllStyleSheets):
2419         (WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
2420         (WebCore::InspectorCSSAgent::collectStyleSheets):
2421         Collect stylesheets recursively. A stylesheet may link to other stylesheets
2422         through @import statements.
2423
2424         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2425         Use the new methods, this command should go away as it will no longer be useful.
2426
2427         (WebCore::InspectorCSSAgent::unbindStyleSheet):
2428         (WebCore::InspectorCSSAgent::bindStyleSheet):
2429         Create an InspectorStyleSheet from a CSSStyleSheet and add to the appropriate lists.
2430         Likewise, unbinding will remove from the appropriate lists.
2431
2432         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2433         (WebCore::InspectorCSSAgent::detectOrigin):
2434         When creating the inspector stylesheet, which is a <style> element,
2435         it will push a StyleSheetAdded event. In the process of binding this
2436         new stylesheet use the m_creatingViaInspectorStyleSheet to add it to
2437         out list of Inspector Stylesheets.
2438
2439 2015-08-26  Myles C. Maxfield  <mmaxfield@apple.com>
2440
2441         Add comment to LocaleToScriptMappingDefault.cpp
2442         <rdar://problem/22407296>
2443
2444         Unreviewed.
2445
2446         We currently map lang="zh" to USCRIPT_SIMPLIFIED_HAN, which is incorrect.
2447         Instead, we should consult with an external source, such as the user's
2448         language preferences.
2449
2450         * platform/text/LocaleToScriptMappingDefault.cpp:
2451
2452 2015-08-26  Chris Dumez  <cdumez@apple.com>
2453
2454         Distinguish Web IDL callback interfaces from Web IDL callback functions
2455         https://bugs.webkit.org/show_bug.cgi?id=148434
2456
2457         Reviewed by Geoffrey Garen.
2458
2459         Distinguish Web IDL callback interfaces [1] from Web IDL callback
2460         functions [2].
2461
2462         One Web-exposed difference is that when using a callback interface,
2463         the user can pass either a function / callable object or a non-callable
2464         object that has a method with the same name as the callback interface
2465         operation:
2466         https://heycam.github.io/webidl/#es-user-objects
2467
2468         When using a callback function, the user needs to pass a function /
2469         callable object:
2470         https://heycam.github.io/webidl/#es-callback-function
2471
2472         This patch adds a new [Callback=FunctionOnly] IDL extended attribute to
2473         indicate that a callback interface should be function-only (i.e. a callback
2474         function in the latest Web IDL specification). Without this IDL extended
2475         attribute, the callback interface will be treated as a regular callback
2476         interface. This will be needed for Bug 148415, as NodeFilter should be
2477         an actual callback interface.
2478
2479         Note that longer term, we should really drop the old-style
2480         [Callback=FunctionOnly] extendd attribute and use actual IDL callback
2481         functions as per the latest Web IDL specification. However, I did not
2482         do this in this patch to minimize patch size.
2483
2484         This patch adds Callback=FunctionOnly] IDL extended attribute to all
2485         our pre-existing callback interfaces so that there is no behavior
2486         change.
2487
2488        [1] https://heycam.github.io/webidl/#dfn-callback-interface
2489        [2] https://heycam.github.io/webidl/#idl-callback-functions
2490
2491         * Modules/geolocation/PositionCallback.idl:
2492         * Modules/geolocation/PositionErrorCallback.idl:
2493         * Modules/mediastream/MediaStreamTrackSourcesCallback.idl:
2494         * Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
2495         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
2496         * Modules/mediastream/RTCPeerConnectionErrorCallback.idl:
2497         * Modules/mediastream/RTCSessionDescriptionCallback.idl:
2498         * Modules/mediastream/RTCStatsCallback.idl:
2499         * Modules/notifications/NotificationPermissionCallback.idl:
2500         * Modules/quota/StorageErrorCallback.idl:
2501         * Modules/quota/StorageQuotaCallback.idl:
2502         * Modules/quota/StorageUsageCallback.idl:
2503         * Modules/webaudio/AudioBufferCallback.idl:
2504         * Modules/webdatabase/DatabaseCallback.idl:
2505         * Modules/webdatabase/SQLStatementCallback.idl:
2506         * Modules/webdatabase/SQLStatementErrorCallback.idl:
2507         * Modules/webdatabase/SQLTransactionCallback.idl:
2508         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
2509         * bindings/js/JSCallbackData.cpp:
2510         (WebCore::JSCallbackData::invokeCallback):
2511         * bindings/js/JSCallbackData.h:
2512         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2513         (WebCore::JSSQLStatementErrorCallback::handleEvent):
2514         * bindings/scripts/CodeGenerator.pm:
2515         (trim):
2516         (IsFunctionOnlyCallbackInterface):
2517         * bindings/scripts/CodeGeneratorJS.pm:
2518         (GenerateParametersCheckExpression):
2519         (GenerateParametersCheck):
2520         (GenerateCallbackImplementation):
2521         * bindings/scripts/IDLAttributes.txt:
2522         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp: Added.
2523         (WebKit::kit):
2524         (WebKit::core):
2525         (WebKit::wrapTestCallbackFunction):
2526         (webkit_dom_test_callback_function_finalize):
2527         (webkit_dom_test_callback_function_constructor):
2528         (webkit_dom_test_callback_function_class_init):
2529         (webkit_dom_test_callback_function_init):
2530         (webkit_dom_test_callback_function_callback_with_no_param):
2531         (webkit_dom_test_callback_function_callback_with_array_param):
2532         (webkit_dom_test_callback_function_callback_with_serialized_script_value_param):
2533         (webkit_dom_test_callback_function_callback_with_non_bool_return_type):
2534         (webkit_dom_test_callback_function_callback_with_string_list):
2535         (webkit_dom_test_callback_function_callback_with_boolean):
2536         (webkit_dom_test_callback_function_callback_requires_this_to_pass):
2537         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h: Added.
2538         * bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h: Copied from Source/WebCore/css/MediaQueryListListener.idl.
2539         * bindings/scripts/test/JS/JSTestCallback.cpp:
2540         (WebCore::JSTestCallback::callbackWithNoParam):
2541         (WebCore::JSTestCallback::callbackWithArrayParam):
2542         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2543         (WebCore::JSTestCallback::callbackWithStringList):
2544         (WebCore::JSTestCallback::callbackWithBoolean):
2545         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2546         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
2547         (WebCore::JSTestCallbackFunction::JSTestCallbackFunction):
2548         (WebCore::JSTestCallbackFunction::~JSTestCallbackFunction):
2549         (WebCore::JSTestCallbackFunction::callbackWithNoParam):
2550         (WebCore::JSTestCallbackFunction::callbackWithArrayParam):
2551         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
2552         (WebCore::JSTestCallbackFunction::callbackWithStringList):
2553         (WebCore::JSTestCallbackFunction::callbackWithBoolean):
2554         (WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
2555         * bindings/scripts/test/JS/JSTestCallbackFunction.h: Added.
2556         (WebCore::JSTestCallbackFunction::create):
2557         (WebCore::JSTestCallbackFunction::scriptExecutionContext):
2558         * bindings/scripts/test/JS/JSTestObj.cpp:
2559         (WebCore::JSTestObjConstructor::constructJSTestObj):
2560         (WebCore::JSTestObjConstructor::finishCreation):
2561         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
2562         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
2563         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
2564         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
2565         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
2566         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
2567         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
2568         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
2569         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
2570         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2571         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): Deleted.
2572         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): Deleted.
2573         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2574         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
2575         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Copied from Source/WebCore/html/VoidCallback.idl.
2576         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Added.
2577         (-[DOMTestCallbackFunction dealloc]):
2578         (-[DOMTestCallbackFunction finalize]):
2579         (-[DOMTestCallbackFunction callbackWithNoParam]):
2580         (-[DOMTestCallbackFunction callbackWithArrayParam:]):
2581         (-[DOMTestCallbackFunction callbackWithSerializedScriptValueParam:strArg:]):
2582         (-[DOMTestCallbackFunction callbackWithNonBoolReturnType:]):
2583         (-[DOMTestCallbackFunction customCallback:class6Param:]):
2584         (-[DOMTestCallbackFunction callbackWithStringList:]):
2585         (-[DOMTestCallbackFunction callbackWithBoolean:]):
2586         (-[DOMTestCallbackFunction callbackRequiresThisToPass:testNodeParam:]):
2587         (core):
2588         (kit):
2589         * bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Copied from Source/WebCore/html/VoidCallback.idl.
2590         * bindings/scripts/test/TestCallbackFunction.idl: Copied from Source/WebCore/Modules/webdatabase/DatabaseCallback.idl.
2591         * bindings/scripts/test/TestObj.idl:
2592         * css/MediaQueryListListener.idl:
2593         * dom/RequestAnimationFrameCallback.idl:
2594         * dom/StringCallback.idl:
2595         * html/VoidCallback.idl:
2596
2597 2015-08-26  Beth Dakin  <bdakin@apple.com>
2598
2599         REGRESSION: Safari navigates after a cancelled force click
2600         https://bugs.webkit.org/show_bug.cgi?id=148491
2601         -and corresponding-
2602         rdar://problem/22394323
2603
2604         Reviewed by Tim Horton.
2605
2606         This regression was introduced on El Capitan because AppKit sends ‘cancel’ to 
2607         gesture recognizer BEFORE it sends the mouseUp. So the ImmediateActionStage needs 
2608         to track whether a cancel happened after updates or without any updates since they 
2609         signify different things. 
2610
2611         Don’t perform default behaviors when the stage is ActionCancelledAfterUpdate.
2612         * page/EventHandler.cpp:
2613         (WebCore::EventHandler::handleMouseReleaseEvent):
2614
2615         New possible stages, and new getter for the current stage.
2616         * page/EventHandler.h:
2617         (WebCore::EventHandler::immediateActionStage):
2618
2619 2015-08-26  Anders Carlsson  <andersca@apple.com>
2620
2621         Fix failing tests.
2622
2623         Add fallback code for the case when iterations is 0.
2624
2625         * platform/graphics/filters/FEConvolveMatrix.cpp:
2626         (WebCore::FEConvolveMatrix::platformApplySoftware):
2627
2628 2015-08-26  Anders Carlsson  <andersca@apple.com>
2629
2630         Use WorkQueue::concurrentApply in FEConvolveMatrix
2631         https://bugs.webkit.org/show_bug.cgi?id=148490
2632
2633         Reviewed by Tim Horton.
2634
2635         Using WorkQueue::concurrentApply lets us simplify the code a lot, and measurements show
2636         no difference in performance. The striding has been slightly tweaked to make more sense
2637         (we no longer divide up the remainder across some of the iterations, instead we just process 
2638         it separately last).
2639
2640         * platform/graphics/filters/FEConvolveMatrix.cpp:
2641         (WebCore::FEConvolveMatrix::platformApplySoftware):
2642         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker): Deleted.
2643         * platform/graphics/filters/FEConvolveMatrix.h:
2644
2645 2015-08-26  Eric Carlson  <eric.carlson@apple.com>
2646
2647         Media Session: make MediaSessionMetadata a class
2648         https://bugs.webkit.org/show_bug.cgi?id=148486
2649
2650         Reviewed by Jer Noble.
2651
2652         No new tests, no observable changes.
2653
2654         * Modules/mediasession/MediaSessionMetadata.h: Make it a class.
2655         * page/ChromeClient.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
2656
2657 2015-08-26  Per Arne Vollan  <peavo@outlook.com>
2658
2659         [Curl] Deadlock when downloading.
2660         https://bugs.webkit.org/show_bug.cgi?id=148438
2661
2662         Reviewed by Alex Christensen.
2663
2664         A thread should not try locking when it already has got the lock,
2665         this will create a deadlock.
2666
2667         * platform/network/curl/CurlDownload.cpp:
2668         (WebCore::CurlDownloadManager::startThreadIfNeeded):
2669         (WebCore::CurlDownloadManager::stopThread):
2670         (WebCore::CurlDownloadManager::stopThreadIfIdle):
2671         (WebCore::CurlDownload::~CurlDownload):
2672         (WebCore::CurlDownload::moveFileToDestination):
2673         (WebCore::CurlDownload::didFail):
2674         * platform/network/curl/CurlDownload.h:
2675         (WebCore::CurlDownloadManager::getMultiHandle):
2676         (WebCore::CurlDownloadManager::runThread):
2677         (WebCore::CurlDownloadManager::setRunThread):
2678
2679 2015-08-26  Jinyoung Hur  <hur.ims@navercorp.com>
2680
2681         [Cairo] Accelerated canvas should fall back to non-accelerated canvas on creation failure
2682         https://bugs.webkit.org/show_bug.cgi?id=148476
2683
2684         Reviewed by Brent Fulgham.
2685
2686         Cairo-gl backed surface might fail to be created with large dimensions, e.g., 50x32000, depending on 
2687         the gl implementations. In case of Mac port, ImageBufferCG falls back to a software surface when it fails to create
2688         IOSurface, an accelerated surface. Though the unaccelerated surface could be slower, it would be better
2689         to create a working surface than nothing.
2690
2691         Because the max dimensions of gl texture might vary among the OpenGL implementations, below test can't guarantee
2692         the verification of behavior difference depending on the running platform.
2693
2694         Test: fast/canvas/canvas-large-dimensions.html
2695
2696         * platform/graphics/cairo/ImageBufferCairo.cpp:
2697         (WebCore::ImageBuffer::ImageBuffer):
2698
2699 2015-08-26  Commit Queue  <commit-queue@webkit.org>
2700
2701         Unreviewed, rolling out r188960.
2702         https://bugs.webkit.org/show_bug.cgi?id=148479
2703
2704         Broke all the tests (Requested by ap on #webkit).
2705
2706         Reverted changeset:
2707
2708         "Add some new emoji with modifiers and new sequence."
2709         https://bugs.webkit.org/show_bug.cgi?id=148202
2710         http://trac.webkit.org/changeset/188960
2711
2712 2015-08-25  Philippe Normand  <pnormand@igalia.com>
2713
2714         [GStreamer] "method" property for the webkitwebsrc element
2715         https://bugs.webkit.org/show_bug.cgi?id=148433
2716
2717         Reviewed by Carlos Garcia Campos.
2718
2719         This new property is sometimes used by the GStreamer uridownloader
2720         when time synchronization is required for DASH. The same property
2721         was added to the souphttpsrc element.
2722
2723         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2724         (webKitWebSrcSetProperty):
2725         (webKitWebSrcGetProperty):
2726         (webKitWebSrcStart):
2727
2728 2015-08-26  Enrica Casucci  <enrica@apple.com>
2729
2730         Add some new emoji with modifiers and new sequence.
2731         https://bugs.webkit.org/show_bug.cgi?id=148202
2732         rdar://problem/21849857
2733
2734         Reviewed by Sam Weinig.
2735
2736         Adding support for some new emoji with modifiers and
2737         one new emoji sequence.
2738
2739         * platform/graphics/FontCascade.cpp:
2740         (WebCore::FontCascade::characterRangeCodePath):
2741         * platform/text/CharacterProperties.h:
2742         (WebCore::isEmojiGroupCandidate):
2743         (WebCore::isEmojiModifier):
2744         * platform/text/TextBreakIterator.cpp:
2745         (WebCore::cursorMovementIterator):
2746
2747 2015-08-25  Nan Wang  <n_wang@apple.com>
2748
2749         AX: Enable accessibility/aria-controls.html test for mac
2750         https://bugs.webkit.org/show_bug.cgi?id=148458
2751
2752         Reviewed by Chris Fleizach.
2753
2754         Re-enabled accessibility/aria-controls.html test for mac.
2755
2756         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2757         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2758
2759 2015-08-25  Zalan Bujtas  <zalan@apple.com>
2760
2761         Using the filter functional notation for background images results in wrong background-size rendering
2762         https://bugs.webkit.org/show_bug.cgi?id=148221
2763         rdar://problem/22379518
2764
2765         Reviewed by Daniel Bates.
2766
2767         Do not ignore the size argument, when the filter image is being drawn onto the context.
2768         When the size is ignored, we end up painting the image with its native size while the filter
2769         is applied on the size of the generated image.
2770
2771         Test: fast/filter-image/background-filter-image.html
2772
2773         * css/CSSFilterImageValue.cpp:
2774         (WebCore::CSSFilterImageValue::image):
2775
2776 2015-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2777
2778         IconDatabase: syncThreadMainLoop() is unlocking m_syncLock twice when thread termination is requested
2779         https://bugs.webkit.org/show_bug.cgi?id=148429
2780
2781         Reviewed by Filip Pizlo.
2782
2783         The lock is released an locked on every loop iteration, and then
2784         unlocked again after the loop. There's an early break in the loop
2785         when thread termination is requested that happens after the lock
2786         is released but before is locked again, so that the unlock after
2787         the loop is trying to unlock the lock again. This was not a
2788         problem before, but the new Lock has an assertion to ensure that a
2789         lock is not released twice.
2790
2791         * loader/icon/IconDatabase.cpp:
2792         (WebCore::IconDatabase::syncThreadMainLoop): Clean up the thread
2793         and return instead of breaking the loop when thread termination is
2794         requested.
2795
2796 2015-08-25  Nan Wang  <n_wang@apple.com>
2797
2798         [Mac] accessibility/document-attributes.html fails
2799         https://bugs.webkit.org/show_bug.cgi?id=116636
2800
2801         Reviewed by Chris Fleizach.
2802
2803         Re-enabled accessibility/document-attributes.html test.
2804
2805         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2806         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2807
2808 2015-08-25  Csaba Osztrogonác  <ossy@webkit.org>
2809
2810         Fix the !ENABLE(VIDEO) build after r188693
2811         https://bugs.webkit.org/show_bug.cgi?id=148424
2812
2813         Reviewed by Tim Horton.
2814
2815         * page/ChromeClient.h:
2816
2817 2015-08-25  Eric Carlson  <eric.carlson@apple.com>
2818
2819         [iOS] Don't clear AVPlayerItem when pausing if AirPlay is active
2820         https://bugs.webkit.org/show_bug.cgi?id=148319
2821
2822         Reviewed by Jer Noble.
2823
2824         * html/HTMLMediaElement.cpp:
2825         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible): Do nothing if the session
2826           is allowed to load data when in the background and we are not under memory pressure.
2827
2828         * platform/audio/ios/MediaSessionManagerIOS.mm:
2829         (WebCore::MediaSessionManageriOS::sessionCanLoadMedia): Call base class.
2830
2831 2015-08-25  Csaba Osztrogonác  <ossy@webkit.org>
2832
2833         Fix the !ENABLE(CSS_REGIONS) build after r188663
2834         https://bugs.webkit.org/show_bug.cgi?id=148425
2835
2836         Reviewed by Chris Dumez.
2837
2838         * bindings/js/JSDOMNamedFlowCollectionCustom.cpp:
2839
2840 2015-08-24  Brent Fulgham  <bfulgham@apple.com>
2841
2842         Wheel events stop propagating when target element is removed from DOM
2843         https://bugs.webkit.org/show_bug.cgi?id=148384
2844         <rdar://problem/19732211>
2845
2846         Reviewed by David Hyatt.
2847
2848         Tested by tiled-drawing/scrolling/latched-to-deleted-node.html
2849
2850         We need to reset our latching state if the targeted node is removed from the DOM.
2851         Add a check in 'platformPrepareForWheelEvents' that checks if the expected latching
2852         target node was already removed from the DOM. If it was, we should not send events
2853         to it, and should reset latching state so we can attach to the next relevant node.
2854
2855         * dom/Element.cpp:
2856         (WebCore::Element::removedFrom): Remove any latched wheel event state objects that
2857         match the current element.
2858         * page/MainFrame.cpp:
2859         (WebCore::MainFrame::removeLatchingStateForTarget): Remove any latched wheel event
2860         state structures that match the passed wheel event target.
2861         * page/MainFrame.h:
2862
2863 2015-08-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2864
2865         Fix crash due to search field disappearing when showing results menu
2866         https://bugs.webkit.org/show_bug.cgi?id=148410
2867         <rdar://problem/22399850>
2868
2869         Reviewed by Brent Fulgham.
2870
2871         When clicking on the results button of a search field that hides upon being focused, WebKit will crash because we
2872         attempt to toggle the results menu using the search field's renderer which is null. This is addressed by adding a null
2873         check to make sure the search field has not been hidden before toggling the menu.
2874
2875         Test: fast/forms/search/search-results-hidden-crash.html
2876
2877         * html/shadow/TextControlInnerElements.cpp:
2878         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): Add a null check for the search field's renderer.
2879
2880 2015-08-25  Chris Dumez  <cdumez@apple.com>
2881
2882         compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
2883         https://bugs.webkit.org/show_bug.cgi?id=119316
2884
2885         Reviewed by Darin Adler.
2886
2887         As the latest DOM specification, compareDocumentPosition() should report
2888         PRECEDING or FOLLOWING information even if nodes are disconnected:
2889         - http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
2890
2891         This behavior is consistent with both IE10, Firefox and Chrome.
2892
2893         The implementation relies on the comparison of cryptographic hashes
2894         (SHA1) of the Node pointers so that the results returned by the function
2895         are consistent. We don't compare Node pointers directly as it was done
2896         previously in r153660 to avoid leaking information about our memory
2897         model to the Web.
2898
2899         Test: fast/dom/compare-document-position-disconnected-nodes.html
2900         W3C Test suite: http://w3c-test.org/dom/nodes/Node-compareDocumentPosition.html
2901
2902         * dom/Node.cpp:
2903         (WebCore::hashPointer):
2904         (WebCore::compareDetachedElementsPosition):
2905         (WebCore::Node::compareDocumentPosition):
2906
2907 2015-08-25  Chris Dumez  <cdumez@apple.com>
2908
2909         Add support for callback interfaces using other callback names than "handleEvent"
2910         https://bugs.webkit.org/show_bug.cgi?id=148418
2911
2912         Reviewed by Ryosuke Niwa.
2913
2914         Add support for callback interfaces using other callback names than
2915         "handleEvent" [1].
2916
2917         This is a pre-requirement for Bug 148415, as NodeFilter's callback
2918         function name is "acceptNode":
2919         - https://dom.spec.whatwg.org/#interface-nodefilter
2920
2921         [1] https://heycam.github.io/webidl/#es-user-objects
2922
2923         * bindings/js/JSCallbackData.cpp:
2924         (WebCore::JSCallbackData::invokeCallback):
2925         * bindings/js/JSCallbackData.h:
2926         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2927         (WebCore::JSSQLStatementErrorCallback::handleEvent):
2928         * bindings/scripts/CodeGeneratorJS.pm:
2929         (GenerateCallbackImplementation):
2930         * bindings/scripts/test/JS/JSTestCallback.cpp:
2931         (WebCore::JSTestCallback::callbackWithNoParam):
2932         (WebCore::JSTestCallback::callbackWithArrayParam):
2933         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2934         (WebCore::JSTestCallback::callbackWithStringList):
2935         (WebCore::JSTestCallback::callbackWithBoolean):
2936         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2937
2938 2015-08-25  Chris Dumez  <cdumez@apple.com>
2939
2940         Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
2941         https://bugs.webkit.org/show_bug.cgi?id=148417
2942
2943         Reviewed by Sam Weinig.
2944
2945         Get rid of custom bindings for RequestAnimationFrameCallback.handleEvent()
2946         by improving the bindings generator. In this case, the problem was that the
2947         bindings generator did not know how to convert a double parameter into a
2948         JSValue. The new code leverages the pre-existing NativeToJSValue subroutine
2949         to do the conversion instead of duplicating complex support here.
2950
2951         * WebCore.xcodeproj/project.pbxproj:
2952         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: Removed.
2953         * bindings/scripts/CodeGeneratorJS.pm:
2954         (GenerateCallbackImplementation):
2955         * bindings/scripts/test/JS/JSTestCallback.cpp:
2956         (WebCore::JSTestCallback::callbackWithArrayParam):
2957         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2958         (WebCore::JSTestCallback::callbackWithStringList):
2959         (WebCore::JSTestCallback::callbackWithBoolean):
2960         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2961         * dom/RequestAnimationFrameCallback.idl:
2962
2963 2015-08-24  Jinyoung Hur  <hur.ims@navercorp.com>
2964
2965         Clear cairo-gl surface for initialization
2966         https://bugs.webkit.org/show_bug.cgi?id=148307
2967
2968         Reviewed by Martin Robinson.
2969
2970         A cairo-gl surface that is created from an uninitialized texture, should be cleared before use.
2971         A texture memory created by calling glTexImage2D with null data parameter, is uninitialized.
2972         And cairo_gl_surface_create_for_texture doesn't clear the provided texture for initialization.
2973         So it seems safe to clear the surface explicitly.
2974
2975         It is hard to verify this behavior change because the texture memory status is undefined. Undefined means
2976         it can be either initialized or not, though mostly initialized in my experiences.
2977
2978         * platform/graphics/cairo/ImageBufferCairo.cpp:
2979         (WebCore::clearSurface):
2980         (WebCore::createCairoGLSurface):
2981
2982 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
2983
2984         Fix the build fixes in r188875 and r188874
2985
2986         Unreviewed.
2987
2988         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2989         (WebCore::FontCache::createFontPlatformData):
2990         * platform/graphics/mac/FontCacheMac.mm:
2991         (WebCore::toNSFontTraits):
2992
2993 2015-08-24  Tim Horton  <timothy_horton@apple.com>
2994
2995         Try to fix the build.
2996
2997         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2998         (WebCore::FontCache::createFontPlatformData):
2999
3000 2015-08-24  Tim Horton  <timothy_horton@apple.com>
3001
3002         Fix the build.
3003
3004         * platform/graphics/mac/FontCacheMac.mm:
3005         (WebCore::toNSFontWeight):
3006         (WebCore::toNSFontTraits):
3007         (WebCore::platformFontWithFamilySpecialCase):
3008
3009 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
3010
3011         Use Optionals in RenderBox height computations
3012         https://bugs.webkit.org/show_bug.cgi?id=147253
3013
3014         Reviewed by David Hyatt.
3015
3016         No new tests because there is no behavior change.
3017
3018         * rendering/RenderBox.cpp:
3019         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
3020         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
3021         (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth):
3022         (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight):
3023         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
3024         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
3025         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
3026         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
3027         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
3028         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
3029         (WebCore::RenderBox::computeLogicalHeight):
3030         (WebCore::RenderBox::computeLogicalHeightUsing):
3031         (WebCore::RenderBox::computeContentLogicalHeight):
3032         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
3033         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
3034         (WebCore::RenderBox::computePercentageLogicalHeight):
3035         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3036         (WebCore::RenderBox::availableLogicalHeight):
3037         (WebCore::RenderBox::availableLogicalHeightUsing):
3038         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
3039         (WebCore::logicalWidthIsResolvable):
3040         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
3041         (WebCore::RenderBox::hasDefiniteLogicalHeight):
3042         * rendering/RenderBox.h:
3043         * rendering/RenderFlexibleBox.cpp:
3044         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
3045         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
3046         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
3047         * rendering/RenderFlexibleBox.h:
3048         * rendering/RenderFlowThread.cpp:
3049         (WebCore::RenderFlowThread::addForcedRegionBreak):
3050         * rendering/RenderGrid.cpp:
3051         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
3052         (WebCore::RenderGrid::logicalContentHeightForChild):
3053         (WebCore::RenderGrid::minContentForChild):
3054         (WebCore::RenderGrid::maxContentForChild):
3055         (WebCore::RenderGrid::layoutGridItems):
3056         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
3057         * rendering/RenderMultiColumnSet.cpp:
3058         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
3059         * rendering/RenderTable.cpp:
3060         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3061
3062 2015-08-24  Anders Carlsson  <andersca@apple.com>
3063
3064         Fix failing tests.
3065         
3066         It's OK to call runStateMachine with an idle state. Just bail early when that happens.
3067
3068         * Modules/webdatabase/SQLTransactionStateMachine.h:
3069         (WebCore::SQLTransactionStateMachine<T>::runStateMachine):
3070
3071 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
3072
3073         [Cocoa] Unify FontCache
3074         https://bugs.webkit.org/show_bug.cgi?id=148358
3075
3076         Reviewed by Antti Koivisto.
3077
3078         Move all the duplicate code to FontCacheCoreText.
3079
3080         No new tests because there is no behavior change.
3081
3082         * platform/graphics/FontCache.h:
3083         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3084         (WebCore::fontWeightFromCoreText):
3085         (WebCore::toTraitsMask):
3086         (WebCore::isFontWeightBold):
3087         (WebCore::toCoreTextFontWeight):
3088         (WebCore::invalidateFontCache):
3089         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
3090         (WebCore::FontCache::platformInit):
3091         (WebCore::FontCache::systemFontFamilies):
3092         (WebCore::computeTraits):
3093         (WebCore::computeNecessarySynthesis):
3094         (WebCore::fontWhitelist):
3095         (WebCore::FontCache::setFontWhitelist):
3096         (WebCore::platformFontLookupWithFamily):
3097         (WebCore::fontWithFamily):
3098         (WebCore::shouldAutoActivateFontIfNeeded):
3099         (WebCore::FontCache::createFontPlatformData):
3100         (WebCore::fallbackDedupSet):
3101         (WebCore::FontCache::platformPurgeInactiveFontData):
3102         (WebCore::FontCache::systemFallbackForCharacters):
3103         * platform/graphics/ios/FontCacheIOS.mm:
3104         (WebCore::platformInvalidateFontCache):
3105         (WebCore::getSystemFontFallbackForCharacters):
3106         (WebCore::platformLookupFallbackFont):
3107         (WebCore::FontCache::lastResortFallbackFont):
3108         (WebCore::FontCache::weightOfCTFont):
3109         (WebCore::platformFontWithFamilySpecialCase):
3110         (WebCore::FontCache::platformInit): Deleted.
3111         (WebCore::isFontWeightBold): Deleted.
3112         (WebCore::FontCache::getSystemFontFallbackForCharacters): Deleted.
3113         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
3114         (WebCore::FontCache::systemFontFamilies): Deleted.
3115         (WebCore::createCTFontWithTextStyle): Deleted.
3116         (WebCore::createCTFontWithFamilyNameAndWeight): Deleted.
3117         (WebCore::toCTFontWeight): Deleted.
3118         (WebCore::FontCache::createFontPlatformData): Deleted.
3119         * platform/graphics/mac/FontCacheMac.mm:
3120         (WebCore::appkitWeightToFontWeight):
3121         (WebCore::toNSFontTraits):
3122         (WebCore::platformFontWithFamilySpecialCase):
3123         (WebCore::platformFontWithFamily):
3124         (WebCore::platformInvalidateFontCache):
3125         (WebCore::platformLookupFallbackFont):
3126         (WebCore::FontCache::lastResortFallbackFont):
3127         (WebCore::toCoreTextFontWeight): Deleted.
3128         (WebCore::fontWhitelist): Deleted.
3129         (WebCore::FontCache::setFontWhitelist): Deleted.
3130         (WebCore::fontWithFamilySpecialCase): Deleted.
3131         (WebCore::fontWithFamily): Deleted.
3132         (WebCore::invalidateFontCache): Deleted.
3133         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Deleted.
3134         (WebCore::FontCache::platformInit): Deleted.
3135         (WebCore::isAppKitFontWeightBold): Deleted.
3136         (WebCore::shouldAutoActivateFontIfNeeded): Deleted.
3137         (WebCore::fallbackDedupSet): Deleted.
3138         (WebCore::FontCache::platformPurgeInactiveFontData): Deleted.
3139         (WebCore::lookupCTFont): Deleted.
3140         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
3141         (WebCore::FontCache::systemFontFamilies): Deleted.
3142         (WebCore::FontCache::createFontPlatformData): Deleted.
3143         * rendering/RenderThemeIOS.mm:
3144         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3145         (WebCore::fromCTFontWeight): Deleted.
3146
3147 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
3148
3149         Unreviewed, attempt to fix iOS build after r188860
3150
3151         * page/WheelEventDeltaFilter.cpp:
3152         (WebCore::WheelEventDeltaFilter::isFilteringDeltas): Moved implementation out of header.
3153         (WebCore::WheelEventDeltaFilter::filteredDelta): Moved implementation out of header.
3154         * page/WheelEventDeltaFilter.h:
3155         (WebCore::WheelEventDeltaFilter::isFilteringDeltas): Deleted.
3156         (WebCore::WheelEventDeltaFilter::filteredDelta): Deleted.
3157
3158 2015-08-21  Anders Carlsson  <andersca@apple.com>
3159
3160         Remove unused return values from SQLTransaction state functions
3161         https://bugs.webkit.org/show_bug.cgi?id=148344
3162
3163         Reviewed by Tim Horton.
3164
3165         * Modules/webdatabase/SQLTransaction.cpp:
3166         (WebCore::SQLTransaction::deliverTransactionCallback):
3167         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
3168         (WebCore::SQLTransaction::deliverStatementCallback):
3169         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
3170         (WebCore::SQLTransaction::deliverSuccessCallback):
3171         (WebCore::SQLTransaction::unreachableState):
3172         * Modules/webdatabase/SQLTransaction.h:
3173         * Modules/webdatabase/SQLTransactionBackend.cpp:
3174         (WebCore::SQLTransactionBackend::acquireLock):
3175         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
3176         (WebCore::SQLTransactionBackend::runStatements):
3177         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
3178         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
3179         (WebCore::SQLTransactionBackend::unreachableState):
3180         * Modules/webdatabase/SQLTransactionBackend.h:
3181         * Modules/webdatabase/SQLTransactionStateMachine.h:
3182         (WebCore::SQLTransactionStateMachine<T>::runStateMachine):
3183
3184 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
3185
3186         Unreviewed, fix build after r188860
3187
3188         * page/mac/WheelEventDeltaFilterMac.mm:
3189         (WebCore::WheelEventDeltaFilterMac::updateFromDelta): Convert argument explicitly to an NSPoint.
3190
3191 2015-08-24  Wenson Hsieh  <wenson_hsieh@apple.com>
3192
3193         Use _NSScrollingPredominantAxisFilter for wheel event filtering on Mac
3194         https://bugs.webkit.org/show_bug.cgi?id=147320
3195
3196         Reviewed by Simon Fraser.
3197
3198         Refactored to use a predominant axis filter instead of a predominant axis tracker. This allows us to
3199         employ AppKit's _NSScrollingPredominantAxisFilter when possible, and use the wheel event delta tracker
3200         as a fallback. Here, we refactor EventHandler to use the new filters for overflow scrolling and replace
3201         the MainFrame's WheelEventDeltaTracker with an appropriate type of WheelEventDeltaFilter.
3202
3203         In the case where an _NSScrollingPredominantAxisFilter is unavailable, the platform-invariant wheel
3204         event delta filter simply uses the existing wheel event delta tracker to compute the current predominant
3205         axis. It uses the predominant axis to determine which axis (if any) should have its delta zeroed out.
3206
3207         This patch also introduces NSScrollingInputFilterSPI.h, which either imports the internal input filter
3208         header from AppKit or declares relevant interfaces and functions.
3209
3210         No new tests, since this change does not add new functionality.
3211
3212         * CMakeLists.txt: Add page/WheelEventDeltaFilter.cpp.
3213         * WebCore.vcxproj/WebCore.vcxproj: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
3214         * WebCore.vcxproj/WebCore.vcxproj.filters: Add WheelEventDeltaFilter.cpp and WheelEventDeltaFilter.h.
3215         * WebCore.xcodeproj/project.pbxproj: Add WheelEventDeltaFilter.cpp, WheelEventDeltaFilter.h, and their Mac counterparts.
3216         * page/EventHandler.cpp:
3217         (WebCore::didScrollInScrollableArea): Refactored to no longer handle axes separately.
3218         (WebCore::handleWheelEventInAppropriateEnclosingBox): Ditto.
3219         (WebCore::EventHandler::platformRecordWheelEvent): Refactored to update the wheel delta filter.
3220         (WebCore::EventHandler::clearLatchedState): Ditto.
3221         (WebCore::EventHandler::defaultWheelEventHandler): Refactored to use wheel delta filters. No longer splits wheel events
3222                 and handles them on separate axes.
3223         (WebCore::didScrollInScrollableAreaForSingleAxis): Deleted.
3224         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Deleted.
3225         * page/EventHandler.h:
3226         * page/MainFrame.cpp:
3227         (WebCore::MainFrame::MainFrame): Initializes the appropriate type of WheelEventDeltaFilter.
3228         * page/MainFrame.h:
3229         * page/WheelEventDeltaFilter.cpp: Added.
3230         (WebCore::WheelEventDeltaFilter::WheelEventDeltaFilter):
3231         (WebCore::WheelEventDeltaFilter::~WheelEventDeltaFilter):
3232         (WebCore::WheelEventDeltaFilter::create):
3233         (WebCore::BasicWheelEventDeltaFilter::BasicWheelEventDeltaFilter):
3234         (WebCore::BasicWheelEventDeltaFilter::updateFromDelta):
3235         (WebCore::BasicWheelEventDeltaFilter::beginFilteringDeltas):
3236         (WebCore::BasicWheelEventDeltaFilter::endFilteringDeltas):
3237         (WebCore::deltaIsPredominantlyVertical):
3238         (WebCore::BasicWheelEventDeltaFilter::dominantScrollGestureDirection):
3239         * page/WheelEventDeltaFilter.h: Refactored WheelEventDeltaTracker logic to work as a filter instead.
3240         * page/mac/EventHandlerMac.mm:
3241         (WebCore::EventHandler::platformPrepareForWheelEvents): Refactored to use wheel delta filters.
3242         (WebCore::EventHandler::platformRecordWheelEvent): Ditto.
3243         * page/mac/WheelEventDeltaFilterMac.h: Wraps the new _NSScrollingPredominantAxisFilter.
3244         * page/mac/WheelEventDeltaFilterMac.mm: Added.
3245         (WebCore::WheelEventDeltaFilterMac::WheelEventDeltaFilterMac):
3246         (WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
3247         (WebCore::WheelEventDeltaFilterMac::updateFromDelta):
3248         (WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):
3249         * platform/PlatformWheelEvent.h:
3250         (WebCore::PlatformWheelEvent::copyWithDeltas): Used to create a copy of the platform wheel event with filtered deltas.
3251         (WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta): Deleted. No longer necessary, since we won't be handling wheel
3252                 events on separate axes.
3253         (WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta): Ditto.
3254         * platform/spi/mac/NSScrollingInputFilterSPI.h: Added.
3255
3256 2015-08-24  Michael Catanzaro  <mcatanzaro@igalia.com>
3257
3258         Unreviewed, fix typo in a comment ("unsused" -> "unused")
3259
3260         * bindings/scripts/CodeGeneratorGObject.pm:
3261         (GenerateFunction):
3262
3263 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3264
3265         Unreviewed. Fix cairo performance regression introduced in r188379.
3266
3267         A missing break in a switch was making us to use High image
3268         interpolation quality by default.
3269
3270         * platform/graphics/cairo/PlatformContextCairo.cpp:
3271         (WebCore::PlatformContextCairo::drawSurfaceToContext): Add the
3272         missing break.
3273
3274 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3275
3276         Unreviewed. Fix GObject DOM bindings API break test after r188809.
3277
3278         element.getElementsByTagName and element.getElementsByClassName
3279         were also changed in r188809 to return an HTMLCollection. The
3280         build didn't fail because we don't use those in our tests, but the
3281         API breaks need to be fixed too.
3282
3283         * bindings/gobject/WebKitDOMDeprecated.cpp:
3284         (webkit_dom_element_get_elements_by_tag_name):
3285         (webkit_dom_element_get_elements_by_tag_name_ns):
3286         (webkit_dom_element_get_elements_by_class_name):
3287         * bindings/gobject/WebKitDOMDeprecated.h:
3288         * bindings/gobject/WebKitDOMDeprecated.symbols:
3289         * bindings/gobject/webkitdom.symbols:
3290         * bindings/scripts/CodeGeneratorGObject.pm:
3291         (GetEffectiveFunctionName):
3292
3293 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3294
3295         Unreviewed. Fix GObject DOM bindings API break test after r188735.
3296
3297         document.getElementsByClassName returns an HTMLCollection since
3298         r188735. So, rename it as
3299         webkit_dom_document_get_elements_by_class_name_as_html_collection,
3300         and deprecate the old method returning a NodeList.
3301
3302         * bindings/gobject/WebKitDOMDeprecated.cpp:
3303         (webkit_dom_document_get_elements_by_class_name): Use the
3304         implementation returning a NodeList.
3305         * bindings/gobject/WebKitDOMDeprecated.h:
3306         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
3307         * bindings/gobject/webkitdom.symbols: Ditto.
3308         * bindings/scripts/CodeGeneratorGObject.pm:
3309         (GetEffectiveFunctionName): Also check getElementsByClassName.
3310
3311 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3312
3313         Unreviewed. Fix GTK+ build after r188711.
3314
3315         Since r188711 document.createNodeIterator and
3316         document.createTreeWalker, don't raise exceptions anymore. Keep
3317         the GError parameter even if it's ignored to not break the API
3318         compatibility.
3319
3320         * bindings/scripts/CodeGeneratorGObject.pm:
3321         (FunctionUsedToRaiseException):
3322         (GenerateFunction):
3323
3324 2015-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3325
3326         Unreviewed. Fix GTK+ build after r188809.
3327
3328         document.getElementsByTagName returns an HTMLCollection since
3329         r188809. So, rename it as
3330         webkit_dom_document_get_elements_by_tag_name_as_html_collection,
3331         and deprecate the old methods returning a NodeList.
3332
3333         * bindings/gobject/WebKitDOMDeprecated.cpp:
3334         (webkit_dom_document_get_elements_by_tag_name): Use the
3335         implementation returning a NodeList.
3336         (webkit_dom_document_get_elements_by_tag_name_ns): Ditto.
3337         * bindings/gobject/WebKitDOMDeprecated.h:
3338         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new symbols.
3339         * bindings/gobject/webkitdom.symbols: Ditto.
3340         * bindings/scripts/CodeGeneratorGObject.pm:
3341         (GetEffectiveFunctionName): Bring back this method, now that we
3342         have deprecated API again and add the checks for
3343         getElementsByTagName methods.
3344         (GenerateFunction): Use GetEffectiveFunctionName().
3345
3346 2015-08-24  Myles C. Maxfield  <mmaxfield@apple.com>
3347
3348         @font-face related cleanup
3349         https://bugs.webkit.org/show_bug.cgi?id=148355
3350
3351         Reviewed by Darin Adler.
3352
3353         This patch cleans up much of our code related to web fonts. In general, it
3354         migrates to using C++ for-each style loops, uses Ref instead of RefPtr when
3355         things can't be nullptr, migrates to C++ Rvalue-references instead of
3356         PassRefPtr, and refactors CSSFontSelector::addFontFaceRule() to use helper
3357         functions.
3358
3359         No new tests because there is no behavior change.
3360
3361         * css/CSSFontFace.cpp:
3362         (WebCore::CSSFontFace::fontLoaded): Use a C++ for-each loop.
3363         * css/CSSFontFace.h:
3364         (WebCore::CSSFontFace::create): Use C++ Rvalue-references instead of
3365         PassRefPtr.
3366         (WebCore::CSSFontFace::CSSFontFace): Ditto.
3367         * css/CSSFontSelector.cpp:
3368         (WebCore::computeTraitsMask): Migrated a chunk of
3369         CSSFontSelector::addFontFaceRule() into this helper function.
3370         (WebCore::createFontFace): Ditto.
3371         (WebCore::familyNameFromPrimitive): Ditto.
3372         (WebCore::CSSFontSelector::addFontFaceRule): Call the newly-created helper
3373         functions. In addition, migrate to Refs instead of RefPtrs.
3374         (WebCore::compareFontFaces): Migrate to references instead of pointers.
3375         (WebCore::CSSFontSelector::getFontFace): Migrate to Refs instead of
3376         RefPtrs. Also use C++ for-each loops.
3377         * css/CSSFontSelector.h:
3378         * css/CSSSegmentedFontFace.cpp:
3379         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace): Use C++ for-each
3380         loops.
3381         (WebCore::CSSSegmentedFontFace::isValid): Ditto.
3382         (WebCore::CSSSegmentedFontFace::appendFontFace): Migrate to Rvalue-
3383         references instead of PassRefPtr.
3384         * css/CSSSegmentedFontFace.h:
3385         * platform/graphics/FontCache.h:
3386         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3387         (WebCore::FontCache::getTraitsInFamily): Return the result instead of being
3388         passed an out parameter.
3389         * platform/graphics/freetype/FontCacheFreeType.cpp:
3390         (WebCore::FontCache::getTraitsInFamily): Ditto.
3391         * platform/graphics/win/FontCacheWin.cpp:
3392         (WebCore::traitsInFamilyEnumProc): Ditto.
3393         (WebCore::FontCache::getTraitsInFamily): Ditto.
3394
3395 2015-08-23  Andy Estes  <aestes@apple.com>
3396
3397         [Content Filtering] REGRESSION (r182356): Provisional URL is incorrect in didReceiveServerRedirectForProvisionalLoadForFrame when Content Filtering is enabled
3398         https://bugs.webkit.org/show_bug.cgi?id=147872
3399         rdar://problem/22044000
3400
3401         Reviewed by Dan Bernstein.
3402
3403         Passed the ResourceLoader request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
3404
3405         New API test: ContentFiltering.ServerRedirect
3406
3407         * WebCore.xcodeproj/project.pbxproj:
3408         * loader/EmptyClients.h:
3409         * loader/FrameLoaderClient.h: Added a URL argument to dispatchDidReceiveServerRedirectForProvisionalLoad().
3410         * loader/ResourceLoader.cpp:
3411         (WebCore::ResourceLoader::willSendRequestInternal): Passed the request URL to dispatchDidReceiveServerRedirectForProvisionalLoad().
3412         * testing/Internals.cpp:
3413         (WebCore::Internals::Internals): Stopped calling MockContentFilter::ensureInstalled().
3414         * testing/MockContentFilterSettings.cpp:
3415         (WebCore::MockContentFilterSettings::setEnabled): Called MockContentFilter::ensureInstalled() to ensure the
3416         mock is installed whenever the filter is enabled.
3417         * testing/MockContentFilterSettings.h: Exported member functions used by TestWebKitAPI.
3418
3419 2015-08-23  Geoffrey Garen  <ggaren@apple.com>
3420
3421         Unreviewed, rolling back in r188803.
3422
3423         "Debugger's VM should never be null"
3424         https://bugs.webkit.org/show_bug.cgi?id=148341
3425         http://trac.webkit.org/changeset/188803
3426
3427         * bindings/js/WorkerScriptDebugServer.cpp:
3428         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
3429         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
3430         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
3431         * inspector/PageScriptDebugServer.cpp:
3432         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
3433         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
3434         (WebCore::PageScriptDebugServer::didPause):
3435         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
3436
3437 2015-08-23  Antti Koivisto  <antti@apple.com>
3438
3439         Remove SVGFrameLoaderClient and dataProtocolFrameLoader
3440         https://bugs.webkit.org/show_bug.cgi?id=148370
3441
3442         Reviewed by Darin Adler.
3443
3444         With data protocol handled internally in WebKit these are no longer needed.
3445
3446         This mostly reverts code changes from http://trac.webkit.org/179626 keeping the tests.
3447
3448         * loader/FrameLoaderClient.h:
3449         * loader/ResourceLoader.cpp:
3450         (WebCore::ResourceLoader::loadDataURL):
3451         (WebCore::ResourceLoader::setDataBufferingPolicy):
3452         (WebCore::ResourceLoader::dataProtocolFrameLoader): Deleted.
3453         * loader/ResourceLoader.h:
3454         (WebCore::ResourceLoader::documentLoader):
3455         (WebCore::ResourceLoader::originalRequest):
3456         * loader/cache/CachedImage.cpp:
3457         (WebCore::CachedImage::finishLoading):
3458         * svg/graphics/SVGImage.cpp:
3459         (WebCore::SVGImage::dataChanged):
3460         * svg/graphics/SVGImage.h:
3461         * svg/graphics/SVGImageClients.h:
3462
3463 2015-08-22  Chris Dumez  <cdumez@apple.com>
3464
3465         NodeList should not have a named getter
3466         https://bugs.webkit.org/show_bug.cgi?id=148117
3467
3468         Reviewed by Darin Adler.
3469
3470         Drop the named property getter on NodeList to match the specification:
3471         https://dom.spec.whatwg.org/#interface-nodelist
3472
3473         This change could be a bit risky but:
3474         1. Firefox and IE never had this named property getter on NodeList.
3475         2. Chrome successfuly dropped this named property getter in early 2014:
3476            https://src.chromium.org/viewvc/blink?revision=166356&view=revision
3477         3. Our named property getter on NodeList is only partly functional:
3478            It only matches by 'id' attribute, not by 'name' attribute.
3479         4. Our APIs that were wrongly returning a NodeList instead of an
3480            HTMLCollection (getElementsByTagName() / getElementsByClassName())
3481            have been fixed in r188735 and r188809. HTMLCollection does have
3482            a named property getter.
3483         5. This named getter adds code complexity.
3484
3485         * bindings/js/JSNodeListCustom.cpp:
3486         (WebCore::createWrapper): Deleted.
3487         * dom/ChildNodeList.cpp:
3488         (WebCore::ChildNodeList::invalidateCache): Deleted.
3489         * dom/ChildNodeList.h:
3490         * dom/LiveNodeList.cpp:
3491         * dom/LiveNodeList.h:
3492         * dom/NodeList.h:
3493         * dom/NodeList.idl:
3494         * dom/StaticNodeList.cpp:
3495         (WebCore::StaticElementList::length): Deleted.
3496         (WebCore::StaticElementList::item): Deleted.
3497         * dom/StaticNodeList.h:
3498         * html/HTMLCollection.h:
3499
3500 2015-08-22  Andreas Kling  <akling@apple.com>
3501
3502         [JSC] Static hash tables should be 100% compile-time constant.
3503         <https://webkit.org/b/148359>
3504
3505         Reviewed by Michael Saboff.
3506
3507         Adjust WebCore bindings generator for new JSC::HashTable layout
3508         and rebaseline the bindings tests for that change.
3509
3510         * bindings/scripts/CodeGeneratorJS.pm:
3511         (GenerateHashTable):
3512         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3513         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3514         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3515         * bindings/scripts/test/JS/JSTestException.cpp:
3516         * bindings/scripts/test/JS/JSTestInterface.cpp:
3517         * bindings/scripts/test/JS/JSTestObj.cpp:
3518         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3519         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3520
3521 2015-08-22  Michael Catanzaro  <mcatanzaro@igalia.com>
3522
3523         Unreviewed, fix build without ENABLE_CSS_GRID_LAYOUT after r188582
3524
3525         * rendering/RenderBox.cpp:
3526         (WebCore::RenderBox::computeLogicalWidthInRegion):
3527
3528 2015-08-22  Zalan Bujtas  <zalan@apple.com>
3529
3530         Page::renderTreeSize() does not include anonymous renderers.
3531         https://bugs.webkit.org/show_bug.cgi?id=148352
3532
3533         Reviewed by Andreas Kling.
3534
3535         Anonymous renderes take the document as their node. Instead
3536         of checking whether the node is the document, we could just check
3537         if the RenderView is available.
3538
3539         * rendering/RenderObject.cpp:
3540         (WebCore::RenderObject::RenderObject):
3541         (WebCore::RenderObject::~RenderObject):
3542         * rendering/RenderView.cpp:
3543         (WebCore::RenderView::RenderView): Deleted.
3544         * rendering/RenderView.h: Include the RenderView in render tree size as well.
3545
3546 2015-08-22  Antti Koivisto  <antti@apple.com>
3547
3548         Decode data URLs in web process
3549         https://bugs.webkit.org/show_bug.cgi?id=148128
3550
3551         Reviewed by Darin Adler.
3552
3553         We currenly send data URLs to networking layer for decoding. This involves a long and slow roundtrip through IPC and API layers.
3554
3555         * WebCore.xcodeproj/project.pbxproj:
3556         * loader/ResourceLoadScheduler.cpp:
3557         (WebCore::ResourceLoadScheduler::maybeLoadQuickLookResource): Deleted.
3558
3559             Remove this awkward interface for WebKit2.
3560
3561         * loader/ResourceLoadScheduler.h:
3562         * loader/ResourceLoader.cpp:
3563         (WebCore::ResourceLoader::start):
3564         (WebCore::ResourceLoader::loadDataURL):
3565
3566             Load using DataURLDecoder.
3567
3568         * loader/ResourceLoader.h:
3569
3570             Make start() public and export it so it can be called directly from WebKit2.
3571
3572         * platform/network/DataURLDecoder.cpp: Added.
3573         (WebCore::DataURLDecoder::decodeQueue):
3574         (WebCore::DataURLDecoder::DecodeTask::DecodeTask):
3575         (WebCore::DataURLDecoder::createDecodeTask):
3576
3577             Parse data URL metadata and initialize the decode task.
3578
3579         (WebCore::DataURLDecoder::decodeBase64):
3580         (WebCore::DataURLDecoder::decodeEscaped):
3581         (WebCore::DataURLDecoder::decode):
3582
3583             Asynchronously decode in a concurrent distpatch queue.
3584
3585         * platform/network/DataURLDecoder.h: Added.
3586         * platform/network/ios/QuickLook.h:
3587         * platform/text/DecodeEscapeSequences.h:
3588         (WebCore::URLEscapeSequence::findEndOfRun):
3589         (WebCore::URLEscapeSequence::decodeRun):
3590
3591             Factor buffer generation to a function.
3592
3593         (WebCore::decodeEscapeSequences):
3594         (WebCore::decodeURLEscapeSequencesAsData):
3595
3596             Add decode function that produces bytes instead of a String.
3597
3598 2015-08-21  Commit Queue  <commit-queue@webkit.org>
3599
3600         Unreviewed, rolling out r188792 and r188803.
3601         https://bugs.webkit.org/show_bug.cgi?id=148347
3602
3603         broke lots of tests, ggaren is going to investigate and reland
3604         (Requested by thorton on #webkit).
3605
3606         Reverted changesets:
3607
3608         "Unify code paths for manually deleting all code"
3609         https://bugs.webkit.org/show_bug.cgi?id=148280
3610         http://trac.webkit.org/changeset/188792
3611
3612         "Debugger's VM should never be null"
3613         https://bugs.webkit.org/show_bug.cgi?id=148341
3614         http://trac.webkit.org/changeset/188803
3615
3616 2015-08-21  Chris Dumez  <cdumez@apple.com>
3617
3618         document.getElementsByTagName should return an HTMLCollection
3619         https://bugs.webkit.org/show_bug.cgi?id=110611
3620
3621         Reviewed by Darin Adler.
3622
3623         Update getElementsByTagName*() to return an HTMLCollection as per
3624         the specification:
3625         - https://dom.spec.whatwg.org/#interface-document
3626         - https://dom.spec.whatwg.org/#interface-element
3627
3628         Firefox, Chrome and IE all match the specification but WebKit was
3629         returning a NodeList.
3630
3631         Performance:
3632         DOM/get-elements-by-tag-name-traversal-uncached.html is ~4.5% faster.
3633
3634         Test: fast/dom/getElementsByTagName-return-type.html
3635
3636         * CMakeLists.txt:
3637         * WebCore.vcxproj/WebCore.vcxproj:
3638         * WebCore.vcxproj/WebCore.vcxproj.filters:
3639         * WebCore.xcodeproj/project.pbxproj:
3640         Rename TagNodeList.* to TagCollection.*
3641
3642         * accessibility/AccessibilityRenderObject.cpp:
3643         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
3644         Update the function to use descendantsOfType<>() instead of
3645         getElementsByTagName(). The code is both shorter and more efficient.
3646
3647         * dom/ContainerNode.cpp:
3648         (WebCore::ContainerNode::getElementsByTagName):
3649         (WebCore::ContainerNode::getElementsByTagNameForObjC):
3650         (WebCore::ContainerNode::getElementsByTagNameNS):
3651         (WebCore::ContainerNode::getElementsByTagNameNSForObjC):
3652         * dom/ContainerNode.h:
3653         - Have getElementsByTagName*() return an HTMLCollection.
3654         - Introduce versions used by the ObjC bindings that return a NodeList
3655           for API compatibility reasons.
3656         - Move the localName null check to the *ForObjC versions and use a
3657           simple assertion for the non ObjC versions. This gets rid of a
3658           branch for our JS bindings as this function is hot. It is currently
3659           impossible to get a null AtomicString from our JS bindings code because
3660           getElementsByTagName() and getElementsByTagName(undefined) in JS end up
3661           calling ContainerNode::getElementsByTagName("undefined").
3662           Also getElementsByTagName(null) in JS ends up calling
3663           ContainerNode::getElementsByTagName("null"). I have also gotten rid of
3664           most of the getElementsByTagName() calls from our native code. The
3665           remaining ones either call with a non-null AtomicString and they now
3666           have a null-check.
3667
3668         * dom/Document.idl:
3669         * dom/Element.idl:
3670         Have getElementsByTagName*() return an HTMLCollection except for ObjC
3671         bindings in order to maintain legacy API compatibility.
3672
3673         * dom/Node.cpp:
3674         (WebCore::Document::invalidateNodeListAndCollectionCaches):
3675         (WebCore::NodeListsNodeData::invalidateCaches):
3676         HTMLCollection::invalidateCache(attr) is now renamed to
3677         invalidateCacheForAttribute(attr) to avoid ambiguity with
3678         HTMLCollection::invalidateCache(doc) and for consistency
3679         with LiveNodeList.
3680
3681         * dom/NodeRareData.h:
3682         Make necessary updates now that TagNodeList is renamed to TagCollection
3683         and is an HTMLCollection.
3684
3685         * dom/TagCollection.cpp: Renamed from Source/WebCore/dom/TagNodeList.cpp.
3686         * dom/TagCollection.h: Renamed from Source/WebCore/dom/TagNodeList.h.
3687         Rename TagNodeList / HTMLTagNodeList to TagCollection / HTMLTagCollection
3688         and inherit CachedHTMLCollection instead of CachedLiveNodeList.
3689
3690         * editing/Editor.cpp:
3691         (WebCore::Editor::applyEditingStyleToBodyElement):
3692         Update code using getElementsByTagName() to reflect the fact that it
3693         now returns an HTMLCollection and item() returns an Element*. This
3694         function is matching any Element with "body" tag, not just HTMLBodyElement
3695         so I did not refactor it to use an descendantsOfType<HTMLBodyElement>().
3696         It is not clear to me what the intention of this code is.
3697
3698         * editing/markup.cpp:
3699         (WebCore::createFragmentFromMarkup):
3700         * editing/markup.h:
3701         - Return a Ref<> instead of a PassRefPtr<> as it can never return null.
3702         - Use descendantsOfType<HTMLAttachmentElement>(fragment) instead of
3703           getElementsByTagName() as it results in both shorter and more efficient
3704           code.
3705
3706         * html/CollectionType.h:
3707         Add new ByTag / ByHTMLTag collection types for TagCollection /
3708         HTMLTabCollection.
3709
3710         * html/GenericCachedHTMLCollection.cpp:
3711         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
3712         Handle new ByTag / ByHTMLTag collection types in the switch statement.
3713
3714         * html/HTMLCollection.cpp:
3715         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3716         (WebCore::HTMLCollection::~HTMLCollection):
3717         Handle new ByTag / ByHTMLTag collection types in switch statements.
3718
3719         (WebCore::HTMLCollection::tags):
3720         Add a null-check on localName() before calling getElementsByTagName().
3721         This function is currently for ObjC bindings only.
3722
3723         * html/HTMLPlugInImageElement.cpp:
3724         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
3725         Simplify / optimize the code by using descendantsOfType<HTMLPlugInImageElement>()
3726         instead of getElementsByTagName().
3727
3728         * html/MediaDocument.cpp:
3729         (WebCore::descendantVideoElement):
3730         Use descendantsOfType<HTMLVideoElement> instead of getElementsByTagNameNS().
3731
3732 2015-08-21  Geoffrey Garen  <ggaren@apple.com>
3733
3734         Debugger's VM should never be null
3735         https://bugs.webkit.org/show_bug.cgi?id=148341
3736
3737         Reviewed by Joseph Pecoraro.
3738
3739         It doesn't make sense for a Debugger's VM to be null, and code related
3740         to maintaining that illusion just caused the Web Inspector to crash on
3741         launch (https://bugs.webkit.org/show_bug.cgi?id=148312). So, let's stop
3742         doing that.
3743
3744         Now, Debugger requires its subclass to provide a never-null VM&.
3745
3746         * bindings/js/WorkerScriptDebugServer.cpp:
3747         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
3748         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
3749         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
3750         * inspector/PageScriptDebugServer.cpp:
3751         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
3752         (WebCore::PageScriptDebugServer::didPause):
3753
3754 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
3755
3756         [OS X] Remove dead code from FontCache::systemFallbackForCharacters()
3757         https://bugs.webkit.org/show_bug.cgi?id=148218
3758
3759         Reviewed by Daniel Bates.
3760
3761         lookupCTFont() in FontCacheMac.mm will always return the best font (because
3762         CTFontCreateForCharactersWithLanguage() does so). Also, all fonts that will
3763         be created on WebKit's behalf are already printer fonts.
3764
3765         No new tests because there is no behavior change.
3766
3767         * platform/graphics/mac/FontCacheMac.mm:
3768         (WebCore::FontCache::systemFallbackForCharacters): Deleted.
3769
3770 2015-08-21  Anders Carlsson  <andersca@apple.com>
3771
3772         Fix build.
3773
3774         * platform/network/win/NetworkStateNotifierWin.cpp:
3775         (WebCore::NetworkStateNotifier::addrChangeCallback):
3776         (WebCore::NetworkStateNotifier::callAddressChanged): Deleted.
3777
3778 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
3779
3780         [Cocoa] Clean up Font class
3781         https://bugs.webkit.org/show_bug.cgi?id=148216
3782
3783         Reviewed by Dean Jackson.
3784
3785         No new tests because there is no behavior change.
3786
3787         * platform/graphics/Font.cpp:
3788         (WebCore::Font::platformGlyphInit): Deleted.
3789         * platform/graphics/Font.h:
3790         * platform/graphics/cocoa/FontCocoa.mm:
3791         (WebCore::Font::platformInit):
3792
3793 2015-08-21  Myles C. Maxfield  <mmaxfield@apple.com>
3794
3795         [Cocoa] Unify two more FontCache functions
3796         https://bugs.webkit.org/show_bug.cgi?id=148217
3797
3798         Reviewed by Dean Jackson.
3799
3800         Move duplicated code from FontCacheMac and FontCacheIOS into
3801         FontCacheCoreText.
3802
3803         No new tests because there is no behavior change.
3804
3805         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3806         (WebCore::toTraitsMask):
3807         (WebCore::isFontWeightBold):
3808         (WebCore::FontCache::similarFont):
3809         (WebCore::FontCache::getTraitsInFamily):
3810         * platform/graphics/ios/FontCacheIOS.mm:
3811         (WebCore::FontCache::similarFont): Deleted.
3812         (WebCore::toTraitsMask): Deleted.
3813         (WebCore::FontCache::getTraitsInFamily): Deleted.
3814         * platform/graphics/mac/FontCacheMac.mm:
3815         (WebCore::toTraitsMask): Deleted.
3816         (WebCore::FontCache::similarFont): Deleted.
3817         (WebCore::FontCache::getTraitsInFamily): Deleted.
3818
3819 2015-08-21  Anders Carlsson  <andersca@apple.com>
3820
3821         Stop using the old callOnMainThread variant on Windows
3822         https://bugs.webkit.org/show_bug.cgi?id=148332
3823
3824         Reviewed by Tim Horton.
3825
3826         * platform/network/cf/CookieStorageCFNet.cpp:
3827         (WebCore::notifyCookiesChanged):
3828         (WebCore::notifyCookiesChangedOnMainThread): Deleted.
3829         * platform/network/win/NetworkStateNotifierWin.cpp:
3830         (WebCore::NetworkStateNotifier::addrChangeCallback):
3831
3832 2015-08-20  Matt Rajca  <mrajca@apple.com>
3833
3834         Media Session: let UI clients change the volume of the focused media element
3835         https://bugs.webkit.org/show_bug.cgi?id=148289
3836
3837         Reviewed by Tim Horton.
3838
3839         * page/Page.cpp:
3840         (WebCore::Page::setVolumeOfMediaElement):
3841         * page/Page.h:
3842
3843 2015-08-21  Anders Carlsson  <andersca@apple.com>
3844
3845         Get rid of uses of the old callOnMainThread function that takes a function ptr + context
3846         https://bugs.webkit.org/show_bug.cgi?id=148324
3847
3848         Reviewed by Tim Horton.
3849
3850         * Modules/webaudio/AsyncAudioDecoder.cpp:
3851         (WebCore::AsyncAudioDecoder::DecodingTask::decode):
3852         (WebCore::AsyncAudioDecoder::DecodingTask::notifyCompleteDispatch): Deleted.
3853         * Modules/webaudio/AsyncAudioDecoder.h:
3854         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
3855         (WebCore::OfflineAudioDestinationNode::offlineRender):
3856         (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch): Deleted.
3857         * Modules/webaudio/OfflineAudioDestinationNode.h:
3858         * Modules/webaudio/ScriptProcessorNode.cpp:
3859         (WebCore::ScriptProcessorNode::process):
3860         (WebCore::ScriptProcessorNode::fireProcessEventDispatch): Deleted.
3861         * Modules/webaudio/ScriptProcessorNode.h:
3862         * Modules/webdatabase/DatabaseTracker.cpp:
3863         (WebCore::DatabaseTracker::scheduleForNotification):
3864         (WebCore::DatabaseTracker::notifyDatabasesChanged):
3865         * Modules/webdatabase/DatabaseTracker.h:
3866         * platform/graphics/cg/ImageCG.cpp:
3867         (WebCore::patternReleaseCallback):
3868         (WebCore::patternReleaseOnMainThreadCallback): Deleted.
3869         * platform/graphics/cg/PatternCG.cpp:
3870         (WebCore::patternReleaseCallback):
3871         (WebCore::patternReleaseOnMainThreadCallback): Deleted.
3872         * platform/graphics/mac/FontCacheMac.mm:
3873         (WebCore::invalidateFontCache):
3874         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
3875         * platform/network/BlobResourceHandle.cpp:
3876         (WebCore::doNotifyFinish):
3877         (WebCore::BlobResourceHandle::notifyFinish):
3878         * platform/network/cf/FormDataStreamCFNet.cpp:
3879         (WebCore::formFinalize):
3880         (WebCore::formFinishFinalizationOnMainThread): Deleted.
3881
3882 2015-08-21  Doug Russell  <d_russell@apple.com>
3883
3884         AX: Table with CSS that makes a row anonymous can return NULL from cellForColumnAndRow
3885         https://bugs.webkit.org/show_bug.cgi?id=148293
3886
3887         Reviewed by Chris Fleizach.
3888
3889         When RenderTableRows are anonymous, they may not be added to the accessible data 
3890         table's internal row list. However, when calculating the row range for a cell, 
3891         we were still accounting for those anonymous sections.
3892         Change how the row range is calculated to directly ask the accessible parent row 
3893         for its index. This will ensure it’s more inline with what’s being represented to 
3894         the accessibility API.
3895
3896         Test: accessibility/aria-table-content.html
3897
3898         * accessibility/AccessibilityTableCell.cpp:
3899         (WebCore::AccessibilityTableCell::parentRow):
3900         (WebCore::AccessibilityTableCell::rowIndexRange):
3901         * accessibility/AccessibilityTableCell.h:
3902
3903 2015-08-21  Joseph Pecoraro  <pecoraro@apple.com>
3904
3905         Web Inspector: REGRESSION(173684): Edit as HTML not working
3906         https://bugs.webkit.org/show_bug.cgi?id=148268
3907
3908         Reviewed by Chris Dumez.
3909
3910         Tests: inspector/dom/getOuterHTML.html
3911                inspector/dom/setOuterHTML.html
3912
3913         * inspector/DOMPatchSupport.cpp:
3914         (WebCore::DOMPatchSupport::innerPatchChildren):
3915         Revert the optimization change made in r173684. The optimization changes
3916         had a few issues. It changed the logic to potentially drop out of the
3917         loop before all new items were processed and using a node reference
3918         to track an index did not account for the modifications insertBefore
3919         may have made to that node's index in the list.
3920
3921 2015-08-21  Beth Dakin  <bdakin@apple.com>
3922
3923         HistoryItems will null CachedPages should never be left in the list of items; 
3924         causes crash
3925         https://bugs.webkit.org/show_bug.cgi?id=148237
3926         -and corresponding-
3927         rdar://problem/22356782
3928
3929         Reviewed by Brady Eidson.
3930
3931         Setting the CachedPage to nullptr will destroy the CachedPage, destroy the 
3932         FrameView, re-enter layout, and potentially try to modify items in the PageCache 
3933         based on that layout. So, we should not modify CachedPage in this way while the 
3934         item is still in the list of HistoryItems.
3935         * history/PageCache.cpp:
3936         (WebCore::PageCache::take):
3937         (WebCore::PageCache::remove):
3938         (WebCore::PageCache::prune):
3939
3940 2015-08-21  David Kilzer  <ddkilzer@apple.com>
3941
3942         dispatch_group_t objects may not be retained properly when not backed by Objective-C objects under garbage collection
3943         <http://webkit.org/b/148229>
3944
3945         Reviewed by Eric Carlson.
3946
3947         When compiled with garbage collection enabled, libdispatch
3948         objects are not backed by Objective-C objects, so they don't get
3949         the benefit of automatic reference counting when captured by a
3950         block or a lambda.  To address this, we use OSObjectPtr<> which
3951         always increments the reference count of the contained object.
3952
3953         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3954         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):
3955         Switch to use OSObjectPtr<>.
3956
3957 2015-08-21  Nan Wang  <n_wang@apple.com>
3958
3959         [Mac] accessibility/selection-states.html fails
3960         https://bugs.webkit.org/show_bug.cgi?id=116637
3961
3962         Reviewed by Chris Fleizach.
3963
3964         Added accessibilityAttributeValue callback for isMultiSelectable attribute.
3965
3966         Updated expectation for accessibility/selection-states.html on mac.
3967
3968         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3969         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3970
3971 2015-08-21  Jonathan Davis  <jond@apple.com>
3972
3973         Fixed status features JSON formatting.
3974
3975         * features.json:
3976
3977 2015-08-21  Chris Dumez  <cdumez@apple.com>
3978
3979         Have more getElementsBy*() methods return a Ref<>
3980         https://bugs.webkit.org/show_bug.cgi?id=148287
3981
3982         Reviewed by Sam Weinig.
3983
3984         Have more getElementsBy*() methods return a Ref<> instaed of a RefPtr<>
3985         as they cannot return null.
3986
3987         * dom/ContainerNode.cpp:
3988         (WebCore::ContainerNode::getElementsByTagName):
3989         (WebCore::ContainerNode::getElementsByTagNameNS):
3990         (WebCore::ContainerNode::getElementsByName):
3991         (WebCore::ContainerNode::getElementsByClassName):
3992         (WebCore::ContainerNode::getElementsByClassNameForObjC):
3993         (WebCore::ContainerNode::radioNodeList):
3994         * dom/ContainerNode.h:
3995
3996 2015-08-21  Chris Dumez  <cdumez@apple.com>
3997
3998         Drop NodeListBase class
3999         https://bugs.webkit.org/show_bug.cgi?id=148290
4000
4001         Reviewed by Ryosuke Niwa.
4002
4003         Drop NodeListBase class and have HTMLCollection subclass NodeList
4004         directly. There is no reason we need another base class.
4005
4006         * WebCore.xcodeproj/project.pbxproj:
4007         * bindings/scripts/CodeGeneratorObjC.pm:
4008         (GetImplClassName): Deleted.
4009         * dom/ContainerNode.cpp:
4010         (WebCore::ContainerNode::getElementsByClassNameForObjC):
4011         * dom/ContainerNode.h:
4012         * dom/NodeList.h:
4013         * dom/NodeListBase.h: Removed.
4014         * html/HTMLCollection.h:
4015
4016 2015-08-20  Yusuke Suzuki  <utatane.tea@gmail.com>
4017
4018         [ES6] prototyping module loader in JSC shell
4019         https://bugs.webkit.org/show_bug.cgi?id=147876