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