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