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