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