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