Change ScrollView::scrollTo() to take a ScrollPosition
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-12-30  Simon Fraser  <simon.fraser@apple.com>
2
3         Change ScrollView::scrollTo() to take a ScrollPosition
4         https://bugs.webkit.org/show_bug.cgi?id=152607
5
6         Reviewed by Zalan Bujtas.
7
8         Make it more explicit that ScrollView::scrollTo() takes a ScrollPosition, and
9         change the name and type of the m_scrollOffset member variable.
10
11         * page/FrameView.cpp:
12         (WebCore::FrameView::scrollTo):
13         (WebCore::FrameView::wheelEvent):
14         * page/FrameView.h:
15         * platform/ScrollView.cpp:
16         (WebCore::ScrollView::unobscuredContentRectInternal):
17         (WebCore::ScrollView::setScrollOffset):
18         (WebCore::ScrollView::scrollTo):
19         * platform/ScrollView.h:
20
21 2015-12-30  Brady Eidson  <beidson@apple.com>
22
23         Modern IDB: Only fire blocked events after all open connections have handled their versionchange events.
24         https://bugs.webkit.org/show_bug.cgi?id=152593
25
26         Reviewed by Andy Estes.
27
28         No new tests (At least two previously timing-out tests now pass, others are now closer to passing).
29
30         Before this patch, whenever we sent all open connections the versionchange event, we would immediately 
31         fire the blocked event on the request.
32
33         That's not right, as those event handlers can close the connections, rendering the request unblocked.
34
35         So this patch implements the behavior of waiting for each open connection to either close or positively
36         message back "I finished firing my versionchange event handler"
37         
38         This behavior is explicitly denoted in the spec and is covered by existing tests.
39
40         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
41         (WebCore::IDBClient::IDBConnectionToServer::fireVersionChangeEvent):
42         (WebCore::IDBClient::IDBConnectionToServer::didFireVersionChangeEvent):
43         * Modules/indexeddb/client/IDBConnectionToServer.h:
44         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
45         
46         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
47         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
48         (WebCore::IDBClient::IDBDatabase::dispatchEvent):
49         * Modules/indexeddb/client/IDBDatabaseImpl.h:
50         
51         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
52         (WebCore::IDBClient::IDBVersionChangeEvent::IDBVersionChangeEvent):
53         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
54         
55         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
56         (WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
57         * Modules/indexeddb/server/IDBConnectionToClient.h:
58         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
59         
60         * Modules/indexeddb/server/IDBServer.cpp:
61         (WebCore::IDBServer::IDBServer::didFireVersionChangeEvent):
62         * Modules/indexeddb/server/IDBServer.h:
63         
64         * Modules/indexeddb/server/ServerOpenDBRequest.cpp:
65         (WebCore::IDBServer::ServerOpenDBRequest::notifyRequestBlocked):
66         (WebCore::IDBServer::ServerOpenDBRequest::notifiedConnectionsOfVersionChange):
67         (WebCore::IDBServer::ServerOpenDBRequest::connectionClosedOrFiredVersionChangeEvent):
68         (WebCore::IDBServer::ServerOpenDBRequest::notifyDeleteRequestBlocked): Deleted.
69         * Modules/indexeddb/server/ServerOpenDBRequest.h:
70         (WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedBlocked):
71         (WebCore::IDBServer::ServerOpenDBRequest::hasConnectionsPendingVersionChangeEvent):
72         (WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedConnectionsOfVersionChange):
73         (WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedDeleteRequestBlocked): Deleted.
74
75         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
76         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
77         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
78         (WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
79         (WebCore::IDBServer::UniqueIDBDatabase::notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent):
80         (WebCore::IDBServer::UniqueIDBDatabase::didFireVersionChangeEvent):
81         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
82         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade): Deleted.
83         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange): Deleted.
84         * Modules/indexeddb/server/UniqueIDBDatabase.h:
85         
86         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
87         (WebCore::IDBServer::UniqueIDBDatabaseConnection::connectionClosedFromClient):
88         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didFireVersionChangeEvent):
89         (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
90         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
91         
92         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
93         (WebCore::InProcessIDBServer::fireVersionChangeEvent):
94         (WebCore::InProcessIDBServer::didFireVersionChangeEvent):
95         * Modules/indexeddb/shared/InProcessIDBServer.h:
96         
97         * dom/Event.h:
98         (WebCore::Event::isVersionChangeEvent):
99
100 2015-12-30  Simon Fraser  <simon.fraser@apple.com>
101
102         Add explicit conversions between scrollOffset and scrollPostion, and use them in a few places
103         https://bugs.webkit.org/show_bug.cgi?id=152594
104
105         Reviewed by Sam Weinig.
106
107         Add functions to ScrollableArea to convert between scrollPosition and scrollOffset,
108         and use them in places where code did the math with scrollOrigin.
109
110         * page/FrameView.cpp:
111         (WebCore::FrameView::minimumScrollPosition):
112         (WebCore::FrameView::maximumScrollPosition): totalContentsSize().width() == contentsWidth(),
113         so we can use the base class maximumScrollPosition(), which also clamps.
114         * platform/ScrollView.cpp:
115         (WebCore::ScrollView::maximumScrollPosition):
116         (WebCore::ScrollView::setScrollOffset):
117         (WebCore::ScrollView::overhangAmount):
118         (WebCore::ScrollView::updateScrollbars):
119         (WebCore::ScrollView::calculateOverhangAreasForPainting):
120         (WebCore::ScrollView::minimumScrollPosition): Deleted. Can use base class implementation.
121         * platform/ScrollView.h:
122         * platform/ScrollableArea.cpp:
123         (WebCore::ScrollableArea::minimumScrollPosition):
124         (WebCore::ScrollableArea::maximumScrollPosition):
125         (WebCore::ScrollableArea::maximumScrollOffset):
126         (WebCore::ScrollableArea::scrollPositionFromOffset):
127         (WebCore::ScrollableArea::scrollOffsetFromPosition):
128         * platform/ScrollableArea.h:
129         (WebCore::ScrollableArea::scrollOrigin):
130         (WebCore::ScrollableArea::scrollOriginChanged):
131         * platform/ios/ScrollViewIOS.mm:
132         (WebCore::ScrollView::unobscuredContentRect):
133         * platform/mac/ScrollAnimatorMac.mm:
134         (WebCore::ScrollAnimatorMac::pinnedInDirection):
135         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
136         * rendering/RenderLayer.cpp:
137         (WebCore::RenderLayer::scrollPosition):
138         (WebCore::RenderLayer::maximumScrollPosition):
139         (WebCore::RenderLayer::overhangAmount):
140         (WebCore::RenderLayer::minimumScrollPosition): Deleted.
141         * rendering/RenderLayer.h:
142
143 2015-12-30  Zalan Bujtas  <zalan@apple.com>
144
145         Move InlineTextBox's text decoration painting to its own class.
146         https://bugs.webkit.org/show_bug.cgi?id=152587
147
148         Reviewed by Myles C. Maxfield.
149
150         This is in preparation for adding text decoration support for simple line layout.
151
152         No change in functionality.
153
154         * CMakeLists.txt:
155         * WebCore.vcxproj/WebCore.vcxproj:
156         * WebCore.vcxproj/WebCore.vcxproj.filters:
157         * WebCore.xcodeproj/project.pbxproj:
158         * rendering/InlineTextBox.cpp:
159         (WebCore::InlineTextBox::paintDecoration):
160         (WebCore::compareTuples): Deleted.
161         (WebCore::translateIntersectionPointsToSkipInkBoundaries): Deleted.
162         (WebCore::drawSkipInkUnderline): Deleted.
163         (WebCore::textDecorationStyleToStrokeStyle): Deleted.
164         (WebCore::adjustStepToDecorationLength): Deleted.
165         (WebCore::strokeWavyTextDecoration): Deleted.
166         * rendering/RenderObject.cpp:
167         (WebCore::RenderObject::getTextDecorationColorsAndStyles):
168         * rendering/RenderObject.h:
169         * rendering/RenderingAllInOne.cpp:
170         * rendering/TextDecorationPainter.cpp: Added.
171         (WebCore::adjustStepToDecorationLength):
172         (WebCore::strokeWavyTextDecoration):
173         (WebCore::compareTuples):
174         (WebCore::translateIntersectionPointsToSkipInkBoundaries):
175         (WebCore::drawSkipInkUnderline):
176         (WebCore::textDecorationStyleToStrokeStyle):
177         (WebCore::TextDecorationPainter::TextDecorationPainter):
178         (WebCore::TextDecorationPainter::paintTextDecoration):
179         * rendering/TextDecorationPainter.h: Added.
180         (WebCore::TextDecorationPainter::setInlineTextBox):
181         (WebCore::TextDecorationPainter::setFont):
182         (WebCore::TextDecorationPainter::setIsHorizontal):
183         (WebCore::TextDecorationPainter::setWidth):
184         (WebCore::TextDecorationPainter::setBaseline):
185         (WebCore::TextDecorationPainter::addTextShadow):
186         * style/InlineTextBoxStyle.cpp:
187         (WebCore::computeUnderlineOffset):
188         (WebCore::visualOverflowForDecorations):
189         * style/InlineTextBoxStyle.h:
190
191 2015-12-30  Zan Dobersek  <zdobersek@igalia.com>
192
193         [CoordinatedGraphics] VideoRenderRequestScheduler shouldn't dispatch to main thread in threaded compositor
194         https://bugs.webkit.org/show_bug.cgi?id=152584
195
196         Reviewed by Carlos Garcia Campos.
197
198         The VideoRenderRequestScheduler class should only send the repaint-requested
199         signal dispatch to the main thread when not using the threaded compositor.
200         In case that is used (guarded via WTF_USE_COORDINATED_GRAPHICS_THREADED), the
201         signal dispatch can be done on the current thread (normally a GStreamer thread)
202         since the actual GL texture update will be then dispatched to the compositor
203         thread (unlike when gstreamer-gl is used, when the update can be done on the
204         very same thread).
205
206         When that is the case we don't need the RunLoop::Timer, Condition and the
207         video sink GRefPtr protector that are otherwise used by this class, so these
208         can just be guarded with the USE(...) flag.
209
210         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
211         (VideoRenderRequestScheduler::VideoRenderRequestScheduler):
212         (VideoRenderRequestScheduler::stop):
213         (VideoRenderRequestScheduler::requestRender):
214
215 2015-12-30  Zan Dobersek  <zdobersek@igalia.com>
216
217         [TexMap] Clean up TextureMapperAnimation, TextureMapperAnimations
218         https://bugs.webkit.org/show_bug.cgi?id=152112
219
220         Reviewed by Darin Adler.
221
222         Clean up the TextureMapperAnimation class. Turn AnimationState into an enum
223         class. Use references for non-null pointer parameters to one version of the
224         constructor and the apply() and applyInternal() methods. Remove unnecessary
225         public methods and reorder the remaining ones into something more sensible.
226         In terms of the implementation of this class, the methods are moved around to
227         follow the order of declarations, along with some small cleanups and improvements
228         applied.
229
230         TextureMapperAnimations class is also refreshed. The constructor is defaulted,
231         and the method implementations are reordered a bit and also adjusted to use the
232         range-based for-loops and some STL utilities.
233
234         Static functions in the implementation file are also updated to use range-based
235         for-loops, references and nullptrs where possible.
236
237         There's no change in behavior as this is just a refactoring.
238
239         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
240         (WebCore::GraphicsLayerTextureMapper::addAnimation):
241         * platform/graphics/texmap/TextureMapperAnimation.cpp:
242         (WebCore::blendFunc):
243         (WebCore::applyFilterAnimation):
244         (WebCore::shouldReverseAnimationValue):
245         (WebCore::applyTransformAnimation):
246         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
247         (WebCore::TextureMapperAnimation::apply):
248         (WebCore::TextureMapperAnimation::pause):
249         (WebCore::TextureMapperAnimation::resume):
250         (WebCore::TextureMapperAnimation::computeTotalRunningTime):
251         (WebCore::TextureMapperAnimation::isActive):
252         (WebCore::TextureMapperAnimation::applyInternal):
253         (WebCore::TextureMapperAnimations::add):
254         (WebCore::TextureMapperAnimations::remove):
255         (WebCore::TextureMapperAnimations::pause):
256         (WebCore::TextureMapperAnimations::suspend):
257         (WebCore::TextureMapperAnimations::resume):
258         (WebCore::TextureMapperAnimations::apply):
259         (WebCore::TextureMapperAnimations::hasActiveAnimationsOfType):
260         (WebCore::TextureMapperAnimations::hasRunningAnimations):
261         (WebCore::TextureMapperAnimations::getActiveAnimations):
262         * platform/graphics/texmap/TextureMapperAnimation.h:
263         (WebCore::TextureMapperAnimation::name):
264         (WebCore::TextureMapperAnimation::boxSize):
265         (WebCore::TextureMapperAnimation::animation):
266         (WebCore::TextureMapperAnimation::startTime):
267         (WebCore::TextureMapperAnimation::pauseTime):
268         (WebCore::TextureMapperAnimation::state):
269         (WebCore::TextureMapperAnimation::setState): Deleted.
270         (WebCore::TextureMapperAnimation::property): Deleted.
271         (WebCore::TextureMapperAnimations::TextureMapperAnimations): Deleted.
272         * platform/graphics/texmap/TextureMapperLayer.cpp:
273         (WebCore::TextureMapperLayer::syncAnimations):
274         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
275         (WebCore::CoordinatedGraphicsLayer::addAnimation):
276
277 2015-12-29  Simon Fraser  <simon.fraser@apple.com>
278
279         Rename "scrollOffsetForFixedPosition" and related functions to refer to scrollPosition
280         https://bugs.webkit.org/show_bug.cgi?id=152590
281
282         Reviewed by Zalan Bujtas.
283
284         FrameView::scrollOffsetForFixedPosition() actually returned a scroll position
285         (possibly negative for RTL content), not a scroll offset, so rename it and related
286         functions.
287
288         * page/FrameView.cpp:
289         (WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling):
290         (WebCore::FrameView::scrollPositionRespectingCustomFixedPosition):
291         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
292         (WebCore::FrameView::scrollPositionForFixedPosition):
293         (WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition): Deleted.
294         (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
295         * page/FrameView.h:
296         * page/animation/AnimationBase.cpp:
297         (WebCore::AnimationBase::timeToNextService):
298         * page/animation/AnimationController.cpp:
299         (WebCore::AnimationControllerPrivate::scrollWasUpdated):
300         * page/scrolling/AsyncScrollingCoordinator.cpp:
301         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
302         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
303         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
304         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
305         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
306         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
307         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
308         * rendering/RenderBoxModelObject.cpp:
309         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
310         * rendering/RenderLayer.cpp:
311         (WebCore::RenderLayer::calculateClipRects):
312         * rendering/RenderLayerBacking.cpp:
313         (WebCore::RenderLayerBacking::updateGeometry):
314         * rendering/RenderLayerCompositor.cpp:
315         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
316         * rendering/RenderView.cpp:
317         (WebCore::RenderView::mapLocalToContainer):
318         (WebCore::RenderView::pushMappingToContainer):
319         (WebCore::RenderView::mapAbsoluteToLocalPoint):
320         (WebCore::RenderView::computeRectForRepaint):
321
322 2015-12-29  Simon Fraser  <simon.fraser@apple.com>
323
324         Fix the Windows build.
325
326         * page/win/FrameCGWin.cpp:
327         (WebCore::drawRectIntoContext):
328
329 2015-12-29  Simon Fraser  <simon.fraser@apple.com>
330
331         Remove ScrollView::scrollOffset() in preparation for scrollOffset vs. scrollPosition clarification
332         https://bugs.webkit.org/show_bug.cgi?id=152589
333
334         Reviewed by Sam Weinig.
335
336         Current code uses scrollOffset vs. scrollPosition interchangeably, and confusingly.
337         Longer term, I plan to make "scrollPosition" be the value that is relative to the 
338         contents, i.e. affected by scrollOrigin, and "scrollOffset" be the zero-based value
339         that's used to set scrollbar values.
340         
341         To prepare for this, remove ScrollView::scrollOffset(), which is just the
342         scrollPosition as an IntSize.
343         
344         Add some typedefs in ScrollableArea, which will slowly propagate through the
345         code as position vs. offset is clarified.
346
347         * inspector/InspectorOverlay.cpp:
348         (WebCore::contentsQuadToCoordinateSystem):
349         (WebCore::InspectorOverlay::highlightQuad):
350         (WebCore::localPointToRoot):
351         * page/FrameView.cpp:
352         (WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition):
353         (WebCore::FrameView::topContentInsetDidChange):
354         (WebCore::FrameView::addTrackedRepaintRect):
355         (WebCore::FrameView::scrollTo):
356         (WebCore::FrameView::wheelEvent):
357         (WebCore::FrameView::setScrollPinningBehavior):
358         * page/FrameView.h:
359         * page/SpatialNavigation.cpp:
360         (WebCore::canScrollInDirection):
361         (WebCore::rectToAbsoluteCoordinates):
362         * platform/ScrollView.cpp:
363         (WebCore::ScrollView::setScrollbarModes):
364         (WebCore::ScrollView::availableContentSizeChanged):
365         (WebCore::ScrollView::setContentsSize):
366         (WebCore::ScrollView::maximumScrollPosition):
367         (WebCore::ScrollView::minimumScrollPosition):
368         (WebCore::ScrollView::adjustScrollPositionWithinRange):
369         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
370         (WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
371         (WebCore::ScrollView::setScrollPosition):
372         (WebCore::ScrollView::updateScrollbars):
373         (WebCore::ScrollView::rootViewToTotalContents):
374         (WebCore::ScrollView::setFrameRect):
375         (WebCore::ScrollView::scrollbarStyleChanged):
376         (WebCore::ScrollView::setScrollOrigin):
377         * platform/ScrollView.h:
378         (WebCore::ScrollView::convertChildToSelf):
379         (WebCore::ScrollView::convertSelfToChild):
380         (WebCore::ScrollView::scrollOffset): Deleted.
381         * platform/ScrollableArea.cpp:
382         (WebCore::ScrollableArea::scrollbarIntrusion):
383         (WebCore::ScrollableArea::scrollPosition):
384         (WebCore::ScrollableArea::minimumScrollPosition):
385         (WebCore::ScrollableArea::maximumScrollPosition):
386         * platform/ScrollableArea.h:
387         * rendering/RenderBox.cpp:
388         (WebCore::RenderBox::calculateAutoscrollDirection):
389         * rendering/RenderLayer.cpp:
390         (WebCore::RenderLayer::scrollPosition):
391         (WebCore::RenderLayer::minimumScrollPosition):
392         (WebCore::RenderLayer::maximumScrollPosition):
393         * rendering/RenderLayer.h:
394         * rendering/RenderWidget.cpp:
395         (WebCore::RenderWidget::nodeAtPoint):
396         * svg/SVGSVGElement.cpp:
397         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
398
399 2015-12-28  Alex Christensen  <achristensen@webkit.org>
400
401         Fix Windows build, ostensibly after r194424.
402
403         * CMakeLists.txt:
404         * PlatformWin.cmake:
405         ml.exe was given too many unneeded parameters (/Idir1 /Idir2 etc.), and it was failing sometimes with long directories.
406         Instead of compiling makesafeseh.asm as a normal source file, we now put only the parameters that are needed to assemble
407         the object file, then link with the object file.
408
409 2015-12-28  Brady Eidson  <beidson@apple.com>
410
411         Modern IDB: Rename IDBServerOperation to ServerOpenDBRequest.
412         https://bugs.webkit.org/show_bug.cgi?id=152577
413
414         Reviewed by Andy Estes.
415
416         No new tests (Refactor, no behavior change)
417
418         * CMakeLists.txt:
419         * WebCore.xcodeproj/project.pbxproj:
420
421         * Modules/indexeddb/server/ServerOpenDBRequest.cpp: Renamed from Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp.
422         (WebCore::IDBServer::ServerOpenDBRequest::create):
423         (WebCore::IDBServer::ServerOpenDBRequest::ServerOpenDBRequest):
424         (WebCore::IDBServer::ServerOpenDBRequest::isOpenRequest):
425         (WebCore::IDBServer::ServerOpenDBRequest::isDeleteRequest):
426         (WebCore::IDBServer::ServerOpenDBRequest::notifyDeleteRequestBlocked):
427         (WebCore::IDBServer::ServerOpenDBRequest::notifyDidDeleteDatabase):
428         
429         * Modules/indexeddb/server/ServerOpenDBRequest.h: Renamed from Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h.
430         (WebCore::IDBServer::ServerOpenDBRequest::connection):
431         (WebCore::IDBServer::ServerOpenDBRequest::requestData):
432         (WebCore::IDBServer::ServerOpenDBRequest::hasNotifiedDeleteRequestBlocked):
433         
434         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
435         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
436         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
437         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
438         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
439         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
440         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
441         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
442         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
443         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
444         * Modules/indexeddb/server/UniqueIDBDatabase.h:
445         
446 2015-12-28  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
447
448         [CMake][EFL] Fix build breaks when enabling GAMEPAD
449         https://bugs.webkit.org/show_bug.cgi?id=152573
450
451         Reviewed by Alex Christensen.
452
453         When enabling GAMEPAD feature on EFL and GTK, there are build breaks.
454         Fixed all.
455
456         * CMakeLists.txt:
457
458 2015-12-25  Andy Estes  <aestes@apple.com>
459
460         Stop moving local objects in return statements
461         https://bugs.webkit.org/show_bug.cgi?id=152557
462
463         Reviewed by Brady Eidson.
464
465         Calling std::move() on a local object in a return statement prevents the compiler from applying the return value optimization.
466
467         Clang can warn about these mistakes with -Wpessimizing-move, although only when std::move() is called directly.
468         I found these issues by temporarily replacing WTF::move with std::move and recompiling.
469
470         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
471         (WebCore::IDBDatabaseIdentifier::isolatedCopy):
472         * Modules/indexeddb/IDBKeyData.cpp:
473         (WebCore::IDBKeyData::deletedValue):
474         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
475         (WebCore::IDBClient::IDBDatabase::objectStoreNames):
476         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
477         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
478         (WebCore::IDBClient::IDBTransaction::createObjectStore):
479         (WebCore::IDBClient::IDBTransaction::createIndex):
480         (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
481         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
482         (WebCore::IDBClient::IDBTransaction::requestIndexRecord):
483         (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
484         (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
485         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
486         (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
487         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
488         (WebCore::IDBDatabaseInfo::isolatedCopy):
489         (WebCore::IDBDatabaseInfo::objectStoreNames):
490         * Modules/indexeddb/shared/IDBResultData.cpp:
491         (WebCore::IDBResultData::error):
492         (WebCore::IDBResultData::openDatabaseSuccess):
493         (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
494         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
495         (WebCore::IDBTransactionInfo::versionChange):
496         (WebCore::IDBTransactionInfo::isolatedCopy):
497         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
498         (WebCore::InProcessIDBServer::create):
499         * Modules/webaudio/OfflineAudioContext.cpp:
500         (WebCore::OfflineAudioContext::create):
501         * Modules/webdatabase/DatabaseTracker.cpp:
502         (WebCore::DatabaseTracker::originLockFor):
503         * Modules/websockets/WebSocket.cpp:
504         (WebCore::WebSocket::create):
505         * css/CSSPrimitiveValue.cpp:
506         (WebCore::CSSPrimitiveValue::formatNumberValue):
507         * dom/NodeOrString.cpp:
508         (WebCore::convertNodesOrStringsIntoNode):
509         * inspector/InspectorApplicationCacheAgent.cpp:
510         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
511         * inspector/InspectorDOMAgent.cpp:
512         (WebCore::InspectorDOMAgent::buildObjectForNode):
513         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
514         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
515         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
516         * inspector/InspectorIndexedDBAgent.cpp:
517         * inspector/InspectorLayerTreeAgent.cpp:
518         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
519         * inspector/InspectorNetworkAgent.cpp:
520         (WebCore::buildObjectForHeaders):
521         (WebCore::buildObjectForResourceRequest):
522         (WebCore::buildObjectForCachedResource):
523         * inspector/InspectorOverlay.cpp:
524         (WebCore::buildArrayForQuad):
525         (WebCore::buildObjectForFlowRegions):
526         (WebCore::InspectorOverlay::buildObjectForHighlightedNodes):
527         * inspector/InspectorPageAgent.cpp:
528         (WebCore::createXHRTextDecoder):
529         (WebCore::buildArrayForCookies):
530         (WebCore::InspectorPageAgent::buildObjectForFrame):
531         * inspector/InspectorStyleSheet.cpp:
532         (WebCore::buildMediaObject):
533         (WebCore::InspectorStyle::buildArrayForComputedStyle):
534         (WebCore::buildObjectForSelectorHelper):
535         (WebCore::selectorsFromSource):
536         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
537         (WebCore::InspectorStyleSheet::buildObjectForStyle):
538         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
539         * inspector/InspectorTimelineAgent.cpp:
540         (WebCore::InspectorTimelineAgent::stopFromConsole):
541         * inspector/TimelineRecordFactory.cpp:
542         (WebCore::TimelineRecordFactory::createGenericRecord):
543         (WebCore::TimelineRecordFactory::createFunctionCallData):
544         (WebCore::TimelineRecordFactory::createConsoleProfileData):
545         (WebCore::TimelineRecordFactory::createProbeSampleData):
546         (WebCore::TimelineRecordFactory::createEventDispatchData):
547         (WebCore::TimelineRecordFactory::createGenericTimerData):
548         (WebCore::TimelineRecordFactory::createTimerInstallData):
549         (WebCore::TimelineRecordFactory::createEvaluateScriptData):
550         (WebCore::TimelineRecordFactory::createTimeStampData):
551         (WebCore::TimelineRecordFactory::createAnimationFrameData):
552         (WebCore::createQuad):
553         (WebCore::TimelineRecordFactory::createPaintData):
554         (WebCore::buildInspectorObject):
555         * loader/FrameLoader.cpp:
556         (WebCore::createWindow):
557         * loader/NavigationAction.cpp:
558         (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
559         * page/DOMWindow.cpp:
560         (WebCore::DOMWindow::createWindow):
561         * platform/network/ios/QuickLook.mm:
562         (WebCore::QuickLookHandle::create):
563         * testing/Internals.cpp:
564         (WebCore::Internals::openDummyInspectorFrontend):
565         * workers/WorkerScriptLoader.cpp:
566         (WebCore::WorkerScriptLoader::createResourceRequest):
567         * xml/XPathExpression.cpp:
568         (WebCore::XPathExpression::evaluate):
569
570 2015-12-27  Zalan Bujtas  <zalan@apple.com>
571
572         Should never be reached failure in WebCore::RenderElement::clearLayoutRootIfNeeded
573         https://bugs.webkit.org/show_bug.cgi?id=151590
574
575         Reviewed by Simon Fraser.
576
577         We should always set the layoutroot when a new subtree layout is requested (and convert it
578         to a full layout when needed). It ensures that renderers are detached cleanly even when
579         they are set as layoutroot.
580
581         Test: fast/block/assert-when-layout-root-is-not-cleared.html
582
583         * page/FrameView.cpp:
584         (WebCore::FrameView::scheduleRelayoutOfSubtree):
585
586 2015-12-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
587
588         [CMake] Rearrange new gamepad files with deprecated files
589         https://bugs.webkit.org/show_bug.cgi?id=152564
590
591         Reviewed by Alex Christensen.
592
593         New gamepad files have been commented out in CMakeLists.txt so far. This patch
594         rearrange the files with deprecated files using ENABLE_GAMEPAD.
595
596         * CMakeLists.txt:
597
598 2015-12-26  Per Arne Vollan  <peavo@outlook.com>
599
600         [Curl] Compile errors.
601         https://bugs.webkit.org/show_bug.cgi?id=152563
602
603         Reviewed by Alex Christensen.
604
605         The ResourceError constructor has changed signature.
606
607         * platform/network/curl/ResourceHandleManager.cpp:
608         (WebCore::ResourceHandleManager::downloadTimerCallback):
609         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
610
611 2015-12-25  Zalan Bujtas  <zalan@apple.com>
612
613         Subpixel rendering: Add subpixel support for outline.
614         https://bugs.webkit.org/show_bug.cgi?id=152560
615
616         Reviewed by Simon Fraser.
617
618         This patch adds support for subpixel outline-width/outline-offset.
619
620         Test: fast/borders/hidpi-outline-hairline-painting.html
621
622         * css/CSSPropertyNames.in:
623         * page/animation/CSSPropertyAnimation.cpp:
624         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
625         * platform/graphics/GraphicsContext.h:
626         * platform/graphics/mac/GraphicsContextMac.mm:
627         (WebCore::GraphicsContext::drawFocusRing):
628         * rendering/RenderElement.cpp:
629         (WebCore::RenderElement::computeMaxOutlineSize):
630         (WebCore::RenderElement::paintOutline):
631         * rendering/RenderImage.cpp:
632         (WebCore::RenderImage::paintAreaElementFocusRing):
633         * rendering/RenderInline.cpp:
634         (WebCore::RenderInline::paintOutlineForLine):
635         * rendering/RenderObject.cpp:
636         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
637         * rendering/RenderView.cpp:
638         (WebCore::RenderView::setMaximalOutlineSize):
639         * rendering/RenderView.h:
640         * rendering/style/OutlineValue.h:
641         (WebCore::OutlineValue::offset):
642         (WebCore::OutlineValue::OutlineValue): Deleted.
643         * rendering/style/RenderStyle.h:
644
645 2015-12-25  Alexey Proskuryakov  <ap@apple.com>
646
647         ASSERT(m_nsResponse) in ResourceResponse::platformCertificateInfo() when running tests in iOS simulator
648         https://bugs.webkit.org/show_bug.cgi?id=152559
649
650         Reviewed by Andy Estes.
651
652         Fix a regression from r194378.
653
654         * platform/network/cocoa/ResourceResponseCocoa.mm:
655         (WebCore::ResourceResponse::platformCertificateInfo):
656
657 2015-12-25  David Kilzer  <ddkilzer@apple.com>
658
659         ResourceError should store failingURL as URL instead of String to avoid reparsing and to address FIXME comments in ResourceErrorCF.cpp and ResourceErrorMac.mm
660         <http://webkit.org/b/146391>
661
662         Reviewed by Antti Koivisto.
663
664         * loader/DocumentThreadableLoader.cpp:
665         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
666         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
667         (WebCore::DocumentThreadableLoader::didReceiveResponse):
668         (WebCore::DocumentThreadableLoader::preflightFailure):
669         * loader/DocumentThreadableLoader.h:
670         (WebCore::DocumentThreadableLoader::preflightFailure):
671         - Switch type of 'url' argument of preflightFailure() from
672           String to URL.
673         - Update for type change of 'failingURL' argument to
674           ResourceError().
675
676         * loader/EmptyClients.h:
677         * loader/FrameLoader.cpp:
678         (WebCore::FrameLoader::loadResourceSynchronously):
679         * loader/MediaResourceLoader.cpp:
680         (WebCore::MediaResourceLoader::responseReceived):
681         * loader/ResourceLoader.cpp:
682         (WebCore::ResourceLoader::loadDataURL):
683         * loader/WorkerThreadableLoader.cpp:
684         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
685         * loader/cache/CachedResourceLoader.cpp:
686         (WebCore::CachedResourceLoader::requestResource):
687         - Update for type change of 'failingURL' argument to
688           ResourceError().
689
690         * page/EventSource.cpp:
691         (WebCore::EventSource::didFailAccessControlCheck):
692         - Convert failingURL() to String explicitly.
693
694         * platform/efl/ErrorsEfl.cpp:
695         (WebCore::cancelledError):
696         (WebCore::blockedError):
697         (WebCore::blockedByContentBlockerError):
698         (WebCore::cannotShowURLError):
699         (WebCore::interruptedForPolicyChangeError):
700         (WebCore::cannotShowMIMETypeError):
701         (WebCore::fileDoesNotExistError):
702         (WebCore::pluginWillHandleLoadError):
703         (WebCore::downloadCancelledByUserError):
704         (WebCore::downloadDestinationError):
705         * platform/gtk/ErrorsGtk.cpp:
706         (WebCore::cancelledError):
707         (WebCore::blockedError):
708         (WebCore::blockedByContentBlockerError):
709         (WebCore::cannotShowURLError):
710         (WebCore::interruptedForPolicyChangeError):
711         (WebCore::cannotShowMIMETypeError):
712         (WebCore::fileDoesNotExistError):
713         (WebCore::pluginWillHandleLoadError):
714         (WebCore::downloadCancelledByUserError):
715         (WebCore::downloadDestinationError):
716         - Update for type change of 'failingURL' argument to
717           ResourceError().
718
719         * platform/network/ResourceErrorBase.h:
720         (WebCore::ResourceErrorBase::failingURL):
721         - Change return type from String to URL.
722         (WebCore::ResourceErrorBase::ResourceErrorBase):
723         * platform/network/cf/ResourceError.h:
724         (WebCore::ResourceError::ResourceError):
725         - Change type of 'failingURL' from String to URL.
726
727         * platform/network/cf/ResourceErrorCF.cpp:
728         (WebCore::ResourceError::ResourceError):
729         - Change type of 'failingURL' from String to URL.
730         (WebCore::ResourceError::platformLazyInit):
731         - Clean up code and address FIXME by parsing CFURLRef using
732           URL() constructor.
733         (WebCore::ResourceError::cfError):
734         - Clean up code and address FIXME after switching type of
735           m_failingURL.
736
737         * platform/network/curl/ResourceError.h:
738         (WebCore::ResourceError::ResourceError):
739         - Change type of 'failingURL' from String to URL.
740
741         * platform/network/mac/ResourceErrorMac.mm:
742         (WebCore::createNSErrorFromResourceErrorBase):
743         (WebCore::ResourceError::platformLazyInit):
744         - Clean up code and address FIXME after switching type of
745           m_failingURL.
746
747         * platform/network/soup/ResourceError.h:
748         (WebCore::ResourceError::ResourceError):
749         (WebCore::ResourceError::timeoutError):
750         * platform/network/soup/ResourceErrorSoup.cpp:
751         (WebCore::failingURI):
752         (WebCore::ResourceError::timeoutError):
753         * platform/network/soup/ResourceHandleSoup.cpp:
754         (WebCore::ResourceHandle::timeoutFired):
755         - Change type of 'failingURL' from String to URL.
756
757         * xml/XMLHttpRequest.cpp:
758         (WebCore::XMLHttpRequest::didFail):
759         - Convert failingURL() to String explicitly.
760         - Also switch to using makeString().
761
762 2015-12-24  Zalan Bujtas  <zalan@apple.com>
763
764         ASSERTION FAILED: x2 >= x1 in WebCore::RenderElement::drawLineForBoxSide
765         https://bugs.webkit.org/show_bug.cgi?id=151210
766
767         Reviewed by Simon Fraser.
768
769         "IntRect outer = snappedIntRect(inner)" explicitly converts inner to LayoutRect first and
770         returns a snapped IntRect. When inner (after the inflate) overflows LayoutUnit,
771         the snapped rect might become smaller than the inner rect.
772
773         This patch also enables outline painting on subpixel positions.
774
775         Tests: fast/borders/hidpi-outline-on-subpixel-position.html
776                fast/borders/outline-offset-overflow.html
777
778         * rendering/RenderElement.cpp:
779         (WebCore::RenderElement::paintOutline):
780
781 2015-12-24  Simon Fraser  <simon.fraser@apple.com>
782
783         Use an enum for RenderElement's baseTypeFlags
784         https://bugs.webkit.org/show_bug.cgi?id=152553
785
786         Reviewed by Zalan Bujtas.
787
788         Use an enum, rather than unsigned, for the BaseTypeFlags bit mask.
789
790         * rendering/RenderBlock.cpp:
791         (WebCore::RenderBlock::RenderBlock):
792         * rendering/RenderBlock.h:
793         * rendering/RenderBox.cpp:
794         (WebCore::RenderBox::RenderBox):
795         * rendering/RenderBox.h:
796         * rendering/RenderBoxModelObject.cpp:
797         (WebCore::RenderBoxModelObject::RenderBoxModelObject):
798         * rendering/RenderBoxModelObject.h:
799         * rendering/RenderElement.cpp:
800         (WebCore::RenderElement::RenderElement):
801         * rendering/RenderElement.h:
802         * rendering/RenderLayerModelObject.cpp:
803         (WebCore::RenderLayerModelObject::RenderLayerModelObject):
804         * rendering/RenderLayerModelObject.h:
805
806 2015-12-24  Simon Fraser  <simon.fraser@apple.com>
807
808         Remove the unused #define _USE_MATH_DEFINES
809         https://bugs.webkit.org/show_bug.cgi?id=152034
810
811         Reviewed by Tim Horton.
812         
813         _USE_MATH_DEFINES was added in r123968 but no longer does anything.
814
815         * platform/graphics/cg/GraphicsContextCG.cpp:
816         * platform/graphics/cg/PDFDocumentImage.cpp:
817         * rendering/mathml/RenderMathMLMenclose.cpp:
818         * rendering/mathml/RenderMathMLOperator.cpp:
819
820 2015-12-23  Brady Eidson  <beidson@apple.com>
821
822         Modern IDB: Don't open any new connections until after version change transactions are completely handled.
823         https://bugs.webkit.org/show_bug.cgi?id=152441
824
825         Reviewed by Alex Christensen.
826
827         No new tests (At least 4 failing tests now pass).
828         
829         When a version change transaction is in progress for a database, the server should not open any new connections
830         to that database until the version change transaction has been 100% completed.
831         
832         This means *all* events related to finishing the transaction must fire.
833         
834         To support this, a new message from client -> server is added.
835
836         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
837         (WebCore::IDBClient::IDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
838         * Modules/indexeddb/client/IDBConnectionToServer.h:
839         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
840         
841         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
842         (WebCore::IDBClient::IDBOpenDBRequest::dispatchEvent):
843         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
844         * Modules/indexeddb/client/IDBRequestImpl.h:
845         
846         * Modules/indexeddb/server/IDBServer.cpp:
847         (WebCore::IDBServer::IDBServer::didFinishHandlingVersionChangeTransaction):
848         * Modules/indexeddb/server/IDBServer.h:
849         
850         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
851         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
852         (WebCore::IDBServer::UniqueIDBDatabase::didFinishHandlingVersionChange):
853         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction): Deleted.
854         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction): Deleted.
855         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted): Deleted.
856         * Modules/indexeddb/server/UniqueIDBDatabase.h:
857         
858         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
859         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::didFinishHandlingVersionChange):
860         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
861         
862         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
863         (WebCore::IDBTransactionInfo::loggingString):
864         * Modules/indexeddb/shared/IDBTransactionInfo.h:
865         
866         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
867         (WebCore::InProcessIDBServer::didFinishHandlingVersionChangeTransaction):
868         * Modules/indexeddb/shared/InProcessIDBServer.h:
869
870 2015-12-23  Brady Eidson  <beidson@apple.com>
871
872         Modern IDB: storage/indexeddb/transaction-basics.html fails.
873         https://bugs.webkit.org/show_bug.cgi?id=152481
874
875         Reviewed by Alex Christensen.
876
877         No new tests (Failing test now passes).
878
879         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
880         (WebCore::IDBClient::IDBDatabase::transaction): Include the invalid string argument
881           in the error message.
882
883 2015-12-23  Simon Fraser  <simon.fraser@apple.com>
884
885         Use "constrainedBetween" in more places
886         https://bugs.webkit.org/show_bug.cgi?id=152543
887
888         Reviewed by Zalan Bujtas.
889
890         Replace code that contrains points via shrunkTo/expandedTo() with calls
891         to constrainedBetween(), and implement constrainedBetween() on IntPoint,
892         FloatPoint and LayoutPoint.
893
894         Convert some functions that return points to more modern syntax.
895
896         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
897         (WebCore::ScrollingTreeFrameScrollingNode::setScrollPosition):
898         * page/scrolling/ScrollingTreeScrollingNode.cpp:
899         (WebCore::ScrollingTreeScrollingNode::setScrollPosition):
900         * platform/ScrollView.cpp:
901         (WebCore::ScrollView::adjustScrollPositionWithinRange):
902         * platform/graphics/FloatPoint.cpp:
903         (WebCore::FloatPoint::constrainedBetween):
904         * platform/graphics/FloatPoint.h:
905         (WebCore::FloatPoint::shrunkTo):
906         (WebCore::FloatPoint::expandedTo):
907         (WebCore::FloatPoint::transposedPoint):
908         * platform/graphics/IntPoint.cpp:
909         * platform/graphics/LayoutPoint.cpp:
910         (WebCore::LayoutPoint::constrainedBetween):
911         * platform/graphics/LayoutPoint.h:
912         (WebCore::LayoutPoint::expandedTo):
913         (WebCore::LayoutPoint::shrunkTo):
914         (WebCore::LayoutPoint::transposedPoint):
915         (WebCore::LayoutPoint::fraction):
916         (WebCore::LayoutPoint::operator FloatPoint):
917
918 2015-12-23  Simon Fraser  <simon.fraser@apple.com>
919
920         REGRESSION (r187593): Scroll position jumps when selecting text in an iframe
921         https://bugs.webkit.org/show_bug.cgi?id=152541
922         rdar://problem/23886181
923
924         Reviewed by Tim Horton.
925         
926         r154382 added code that modifies parentLayer traversal, looking for ancestor
927         scrollable layers. However, it confusingly added another code path in which
928         the ancestor layer traversal cross a frame boundary, when RenderLayer::scrollRectToVisible()
929         already has one. I fixed this new location to adjust the rect coordinates in r187593,
930         but then code that hit both crossing points double-mapped the coordinates, causing
931         autoscroll jumping.
932         
933         Fix by reverting r154382 and r187593, going back to doing the ancestor walk in
934         one place. Re-fix r154382 by implementing RenderLayer::allowsCurrentScroll(),
935         which contains the logic for line clamp, autoscroll and ensuring that overflow:hidden
936         can be programmatically scrolled.
937         
938         Form controls are special; they can have overflow:hidden but still be user-scrollable
939         during autoscroll; this is handled via the confusingly-named canBeProgramaticallyScrolled().
940         RenderTextControlSingleLine implements this to ensure that readonly text inputs
941         autoscroll (which is exercised by a test).
942         
943         The frame-to-parent-frame rect mapping in RenderLayer::scrollRectToVisible() is
944         fixed to use the coordinate mapping functions from Widget/ScrollView, with the
945         addition of a new utility function contentsToContainingViewContents().
946         
947         A "Scrolling" logging channel is added with a few log points.
948
949         Test: fast/events/autoscroll-in-iframe-body.html
950
951         * page/scrolling/ScrollingCoordinator.cpp:
952         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
953         use contentsToContainingViewContents().
954         * platform/Logging.h:
955         * platform/ScrollView.cpp:
956         (WebCore::ScrollView::contentsToContainingViewContents):
957         * platform/ScrollView.h:
958         * platform/graphics/IntPoint.cpp:
959         (WebCore::IntPoint::constrainedBetween): New helper to constrain a point between
960         two other points.
961         * platform/graphics/IntPoint.h:
962         (WebCore::IntPoint::expandedTo):
963         (WebCore::IntPoint::shrunkTo):
964         * rendering/RenderBox.cpp:
965         * rendering/RenderLayer.cpp:
966         (WebCore::parentLayerCrossFrame):
967         (WebCore::RenderLayer::enclosingScrollableLayer):
968         (WebCore::frameElementAndViewPermitScroll):
969         (WebCore::RenderLayer::allowsCurrentScroll):
970         (WebCore::RenderLayer::scrollRectToVisible):
971         * rendering/RenderLayer.h:
972         * rendering/RenderTextControlSingleLine.h:
973
974 2015-12-22  Simon Fraser  <simon.fraser@apple.com>
975
976         Minor cleanup in RenderBox::canBeProgramaticallyScrolled()
977         https://bugs.webkit.org/show_bug.cgi?id=152515
978
979         Reviewed by Tim Horton.
980
981         Remove the scrollsOverflow() check in RenderBox::canBeProgramaticallyScrolled(),
982         since if hasScrollableOverflow is true, scrollsOverflow() must also be true.
983         
984         Factor clientWidth/Height vs. scrollWidth/Height checks into separate functions,
985         and call them from two places.
986         
987         Added a test which is not affected by this particular change, but will verify
988         that a later change doesn't break anything.
989
990         Test: fast/overflow/overflow-hidden-scroll-into-view.html
991
992         * rendering/RenderBox.cpp:
993         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
994         (WebCore::RenderBox::canBeProgramaticallyScrolled):
995         * rendering/RenderBox.h:
996         (WebCore::RenderBox::hasHorizontalOverflow):
997         (WebCore::RenderBox::hasVerticalOverflow):
998         (WebCore::RenderBox::hasScrollableOverflowX):
999         (WebCore::RenderBox::hasScrollableOverflowY):
1000
1001 2015-12-23  Pranjal Jumde  <pjumde@apple.com>
1002
1003         Avoids stack recursion when indexed propertyNames defined using Object.defineProperty are deleted.
1004         https://bugs.webkit.org/show_bug.cgi?id=149179
1005         <rdar://problem/22708019>.
1006
1007         Reviewed by Filip Pizlo.
1008
1009         * runtime/JSObject.cpp:
1010         (JSStorage::deletePropertyByIndex was invoking Base::deleteProperty for indexed propertyNames instead of Base::deletePropertyByIndex leading to a stack recursion)
1011
1012 2015-12-23  Eric Carlson  <eric.carlson@apple.com>
1013
1014         [MediaStream] MediaDeviceInfo.label must be empty in some situations
1015         https://bugs.webkit.org/show_bug.cgi?id=152000
1016
1017         Reviewed by Brent Fulgham.
1018
1019         No new tests, updated fast/mediastream/MediaDevices-enumerateDevices.html.
1020
1021         * Modules/mediastream/CaptureDeviceManager.cpp:
1022         (CaptureDeviceManager::getSourcesInfo): TrackSourceInfo constructor takes persistent ID.
1023
1024         * Modules/mediastream/MediaDevicesRequest.cpp:
1025         (WebCore::MediaDevicesRequest::start): If Document had an active stream track, don't bother
1026           checking for a persistent permission to access devices.
1027         (WebCore::MediaDevicesRequest::didCompleteCheck): m_hasUserMediaPermission -> m_canShowLabels.
1028         (WebCore::MediaDevicesRequest::getTrackSources): New, factored out of didCompleteCheck so it
1029           can be called when we don't need to check permissions.
1030         (WebCore::MediaDevicesRequest::didCompleteRequest): m_hasUserMediaPermission -> m_canShowLabels.
1031         * Modules/mediastream/MediaDevicesRequest.h:
1032
1033         * Modules/mediastream/MediaStream.cpp:
1034         (WebCore::MediaStream::MediaStream): Call setIsActive. Register new stream with MediaStreamRegistry.
1035         (WebCore::MediaStream::~MediaStream): Unregister stream with MediaStreamRegistry.
1036         (WebCore::MediaStream::setIsActive): New. Set m_isActive and call Document if stream is active.
1037         (WebCore::MediaStream::scheduleActiveStateChange): Call setIsActive.
1038         (WebCore::MediaStream::registry): MediaStreamRegistry::registry -> MediaStreamRegistry::shared.
1039         (WebCore::mediaStreams): Deleted. Drive-by cleanup: moved list of all streams to MediaStreamRegistry.
1040         (WebCore::registerMediaStream): Ditto.
1041         (WebCore::unRegisterMediaStream): Ditto.
1042         (WebCore::MediaStream::lookUp): Ditto.
1043         (WebCore::MediaStream::setRegistry): Ditto.
1044         * Modules/mediastream/MediaStream.h:
1045
1046         * Modules/mediastream/MediaStreamRegistry.cpp:
1047         (WebCore::MediaStreamRegistry::shared): Renamed from "registry".
1048         (WebCore::MediaStreamRegistry::MediaStreamRegistry):
1049         (WebCore::MediaStreamRegistry::lookUp): Moved here from MediaStream.
1050         (WebCore::mediaStreams): Ditto.
1051         (WebCore::MediaStreamRegistry::registerStream): Ditto.
1052         (WebCore::MediaStreamRegistry::unregisterStream): Ditto.
1053         (WebCore::MediaStreamRegistry::registry): Deleted.
1054         * Modules/mediastream/MediaStreamRegistry.h:
1055
1056         * dom/Document.h:
1057         (WebCore::Document::setHasActiveMediaStreamTrack): New, set m_hasHadActiveMediaStreamTrack.
1058         (WebCore::Document::hasHadActiveMediaStreamTrack): New, return m_hasHadActiveMediaStreamTrack.
1059
1060         * html/HTMLMediaElement.cpp:
1061         (WebCore::HTMLMediaElement::loadResource): MediaStream::lookUp -> MediaStreamRegistry::shared().lookUp.
1062
1063         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h:
1064         (WebCore::TrackSourceInfo::create): Take track persistent ID.
1065         (WebCore::TrackSourceInfo::persistentId): New.
1066         (WebCore::TrackSourceInfo::TrackSourceInfo): Take track persistent ID.
1067
1068         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1069         (WebCore::RealtimeMediaSourceCenterMac::sourceWithUID): TrackSourceInfo::create takes persistent ID.
1070
1071         * platform/mock/MockRealtimeMediaSource.cpp:
1072         (WebCore::MockRealtimeMediaSource::trackSourceWithUID): Ditto.
1073
1074         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp:
1075         (WebCore::RealtimeMediaSourceCenterMac::sourceWithUID): TrackSourceInfo::create takes persistent ID.
1076
1077 2015-12-23  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1078
1079         [Streams API] In RS during enqueuing error should be reported only if readable
1080         https://bugs.webkit.org/show_bug.cgi?id=152505
1081
1082         Reviewed by Youenn Fablet.
1083
1084         This commit fixes last spec change done in
1085         https://github.com/whatwg/streams/commit/4ba861e6f60c248060811830e11271c84b439cc3.
1086
1087         Test: imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.html
1088
1089         * Modules/streams/ReadableStreamInternals.js:
1090         (enqueueInReadableStream): Call @errorReadableStream only if state is readable.
1091
1092 2015-12-23  Chris Aljoudi <chris@chrismatic.io> and Alex Christensen <achristensen@webkit.org>
1093
1094         Content blockers should be able to promote http to https
1095         https://bugs.webkit.org/show_bug.cgi?id=148966
1096
1097         Reviewed by Benjamin Poulain.
1098
1099         Test: http/tests/contentextensions/make-https.html
1100
1101         * contentextensions/ContentExtensionActions.h:
1102         * contentextensions/ContentExtensionCompiler.cpp:
1103         (WebCore::ContentExtensions::serializeActions):
1104         * contentextensions/ContentExtensionParser.cpp:
1105         (WebCore::ContentExtensions::loadAction):
1106         * contentextensions/ContentExtensionRule.cpp:
1107         (WebCore::ContentExtensions::Action::deserialize):
1108         (WebCore::ContentExtensions::Action::deserializeType):
1109         (WebCore::ContentExtensions::Action::serializedLength):
1110         * contentextensions/ContentExtensionsBackend.cpp:
1111         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1112         * loader/cache/CachedResourceLoader.cpp:
1113         (WebCore::CachedResourceLoader::requestResource):
1114         * platform/URL.cpp:
1115         (WebCore::URL::isBlankURL):
1116         (WebCore::defaultPortsMap):
1117         (WebCore::defaultPortForProtocol):
1118         (WebCore::isDefaultPortForProtocol):
1119         (WebCore::portAllowed):
1120         * platform/URL.h:
1121
1122 2015-12-22  Andy Estes  <aestes@apple.com>
1123
1124         Try to fix the iOS build after r194378
1125
1126         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1127
1128 2015-12-22  Andy Estes  <aestes@apple.com>
1129
1130         [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI
1131         https://bugs.webkit.org/show_bug.cgi?id=152463
1132
1133         Reviewed by Alexey Proskuryakov.
1134
1135         Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward
1136         declared in CFNetworkSPI.h.
1137
1138         Also removed some unused declarations and renamed ResourceResponseMac.mm to ResourceResponseCocoa.mm.
1139
1140         * PlatformMac.cmake:
1141         * WebCore.xcodeproj/project.pbxproj:
1142         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1143         * platform/mac/WebCoreSystemInterface.h:
1144         * platform/mac/WebCoreSystemInterface.mm:
1145         * platform/network/NetworkStorageSession.h:
1146         * platform/network/cf/CredentialStorageCFNet.cpp:
1147         (WebCore::copyCredentialFromProtectionSpace):
1148         (WebCore::CredentialStorage::getFromPersistentStorage):
1149         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1150         (WebCore::NetworkStorageSession::cookieStorage):
1151         * platform/network/cf/ResourceHandleCFNet.cpp:
1152         (WebCore::ResourceHandle::createCFURLConnection):
1153         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1154         (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
1155         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1156         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1157         * platform/network/cf/ResourceRequestCFNet.cpp:
1158         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1159         (WebCore::ResourceRequest::doUpdateResourceRequest):
1160         (WebCore::ResourceRequest::setStorageSession):
1161         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
1162         (WebCore::initializeHTTPConnectionSettingsOnStartup):
1163         * platform/network/cf/ResourceRequestCFNet.h:
1164         (WebCore::toResourceLoadPriority):
1165         (WebCore::toPlatformRequestPriority):
1166         * platform/network/cf/ResourceResponse.h:
1167         * platform/network/cf/ResourceResponseCFNet.cpp:
1168         (WebCore::ResourceResponse::platformCertificateInfo):
1169         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1170         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
1171         * platform/network/cocoa/ResourceRequestCocoa.mm:
1172         (WebCore::ResourceRequest::doUpdateResourceRequest):
1173         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1174         * platform/network/cocoa/ResourceResponseCocoa.mm: Renamed from Source/WebCore/platform/network/mac/ResourceResponseMac.mm.
1175         (WebCore::ResourceResponse::platformCertificateInfo):
1176         (WebCore::copyNSURLResponseStatusLine):
1177         (WebCore::ResourceResponse::platformLazyInit):
1178         * platform/network/ios/QuickLook.h:
1179         * platform/network/ios/QuickLook.mm:
1180         * platform/network/ios/WebCoreURLResponseIOS.mm:
1181         (WebCore::adjustMIMETypeIfNecessary):
1182         * platform/network/mac/ResourceHandleMac.mm:
1183         (WebCore::ResourceHandle::createNSURLConnection):
1184         * platform/network/mac/WebCoreURLResponse.h:
1185         * platform/network/mac/WebCoreURLResponse.mm:
1186         (WebCore::adjustMIMETypeIfNecessary):
1187         * platform/spi/cf/CFNetworkConnectionCacheSPI.h:
1188         * platform/spi/cf/CFNetworkSPI.h:
1189
1190 2015-12-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1191
1192         [GTK] Everything broken in GTK+ 3.19
1193         https://bugs.webkit.org/show_bug.cgi?id=150550
1194
1195         Reviewed by Carlos Garcia Campos.
1196
1197         Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
1198         stuff with modern GTK+.
1199
1200         No new tests. We already have tons of tests for this functionality, but we're running them
1201         with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
1202         GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
1203         consider upgrading the GTK+ used for our layout tests.
1204
1205         * platform/gtk/GRefPtrGtk.cpp:
1206         (WTF::refGPtr):
1207         (WTF::derefGPtr):
1208         * platform/gtk/GRefPtrGtk.h:
1209         * platform/gtk/ScrollbarThemeGtk.cpp:
1210         (WebCore::ScrollbarThemeGtk::themeChanged):
1211         (WebCore::ScrollbarThemeGtk::updateThemeProperties):
1212         (WebCore::orientationStyleClass):
1213         (WebCore::applyScrollbarStyleContextClasses):
1214         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1215         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
1216         (WebCore::ScrollbarThemeGtk::paintThumb):
1217         (WebCore::ScrollbarThemeGtk::paintButton):
1218         * rendering/RenderThemeGtk.cpp:
1219         (WebCore::createStyleContext):
1220         (WebCore::setToggleSize):
1221         (WebCore::paintToggle):
1222         (WebCore::RenderThemeGtk::paintButton):
1223         (WebCore::getComboBoxMetrics):
1224         (WebCore::RenderThemeGtk::paintMenuList):
1225         (WebCore::RenderThemeGtk::paintTextField):
1226         (WebCore::applySliderStyleContextClasses):
1227         (WebCore::RenderThemeGtk::paintSliderTrack):
1228         (WebCore::RenderThemeGtk::paintSliderThumb):
1229         (WebCore::RenderThemeGtk::paintProgressBar):
1230         (WebCore::paintSpinArrowButton):
1231         (WebCore::styleColor):
1232
1233 2015-12-22  Eric Carlson  <eric.carlson@apple.com>
1234
1235         [MediaStream] MediaStreamTrackPrivate.source should be a reference
1236         https://bugs.webkit.org/show_bug.cgi?id=152509
1237
1238         Reviewed by Tim Horton.
1239
1240         No new tests, no functional change.
1241
1242         * Modules/mediastream/MediaStream.cpp:
1243         (WebCore::MediaStream::trackVectorForType):
1244         * Modules/mediastream/MediaStreamTrack.h:
1245         * Modules/mediastream/RTCDTMFSender.cpp:
1246         (WebCore::RTCDTMFSender::create):
1247         * Modules/mediastream/UserMediaRequest.cpp:
1248         (WebCore::UserMediaRequest::didCreateStream):
1249         * platform/mediastream/MediaStreamPrivate.cpp:
1250         (WebCore::MediaStreamPrivate::platformLayer):
1251         (WebCore::MediaStreamPrivate::currentFrameImage):
1252         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1253         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
1254         * platform/mediastream/MediaStreamTrackPrivate.h:
1255         (WebCore::MediaStreamTrackPrivate::source):
1256
1257 2015-12-22  Commit Queue  <commit-queue@webkit.org>
1258
1259         Unreviewed, rolling out r194362.
1260         https://bugs.webkit.org/show_bug.cgi?id=152508
1261
1262         crashes release bot (Requested by mcatanzaro on #webkit).
1263
1264         Reverted changeset:
1265
1266         "[GTK] Everything broken in GTK+ 3.19"
1267         https://bugs.webkit.org/show_bug.cgi?id=150550
1268         http://trac.webkit.org/changeset/194362
1269
1270 2015-12-22  Keith Miller  <keith_miller@apple.com>
1271
1272         Remove OverridesHasInstance from TypeInfoFlags
1273         https://bugs.webkit.org/show_bug.cgi?id=152005
1274
1275         Reviewed by Saam Barati.
1276
1277         Currently, we have three TypeInfo flags associated with instanceof behavior,
1278         ImplementsHasInstance, ImplementDefaultHasInstance, and OverridesHasInstance. This patch
1279         removes the third and moves the first to the out of line flags. In theory, we should only
1280         need one flag but removing ImplementsHasInstance is more involved and should be done in a
1281         separate patch.
1282
1283         * bindings/js/JSDOMBinding.h:
1284         * bindings/scripts/CodeGeneratorJS.pm:
1285         (GenerateHeader):
1286
1287 2015-12-22  Brent Fulgham  <bfulgham@apple.com>
1288
1289         Allow JavaScript to iterate over plugins for local SecurityOrigins
1290         https://bugs.webkit.org/show_bug.cgi?id=152489
1291
1292         Reviewed by Alexey Proskuryakov.
1293
1294         Instead of calling 'isLocalFile' on the URL, we check the Document's SecurityOrigin. If
1295         no origin exists, we construct a SecurityOrigin from the URL, and check whether it
1296         satisfies 'isLocal'.
1297
1298         * page/Page.cpp:
1299         (WebCore::Page::showAllPlugins): Revised to use SecurityOrigin.
1300
1301 2015-12-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1302
1303         [GTK] Everything broken in GTK+ 3.19
1304         https://bugs.webkit.org/show_bug.cgi?id=150550
1305
1306         Reviewed by Carlos Garcia Campos.
1307
1308         Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
1309         stuff with modern GTK+.
1310
1311         No new tests. We already have tons of tests for this functionality, but we're running them
1312         with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
1313         GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
1314         consider upgrading the GTK+ used for our layout tests.
1315
1316         * platform/gtk/GRefPtrGtk.cpp:
1317         (WTF::refGPtr):
1318         (WTF::derefGPtr):
1319         * platform/gtk/GRefPtrGtk.h:
1320         * platform/gtk/ScrollbarThemeGtk.cpp:
1321         (WebCore::ScrollbarThemeGtk::themeChanged):
1322         (WebCore::ScrollbarThemeGtk::updateThemeProperties):
1323         (WebCore::orientationStyleClass):
1324         (WebCore::applyScrollbarStyleContextClasses):
1325         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1326         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
1327         (WebCore::ScrollbarThemeGtk::paintThumb):
1328         (WebCore::ScrollbarThemeGtk::paintButton):
1329         * rendering/RenderThemeGtk.cpp:
1330         (WebCore::createStyleContext):
1331         (WebCore::setToggleSize):
1332         (WebCore::paintToggle):
1333         (WebCore::RenderThemeGtk::paintButton):
1334         (WebCore::getComboBoxMetrics):
1335         (WebCore::RenderThemeGtk::paintMenuList):
1336         (WebCore::RenderThemeGtk::paintTextField):
1337         (WebCore::applySliderStyleContextClasses):
1338         (WebCore::RenderThemeGtk::paintSliderTrack):
1339         (WebCore::RenderThemeGtk::paintSliderThumb):
1340         (WebCore::RenderThemeGtk::paintProgressBar):
1341         (WebCore::paintSpinArrowButton):
1342         (WebCore::styleColor):
1343
1344 2015-12-20  Jeremy Zerfas  <WebKit@JeremyZerfas.com>
1345
1346         Don't allocate a NSImage and skip unneeded call to TIFFRepresentation when copying image to clipboard.
1347         https://bugs.webkit.org/show_bug.cgi?id=152374
1348
1349         Reviewed by Darin Adler.
1350
1351         When copying an image to the clipboard, don't bother allocating a
1352         NSImage and skip the unneeded call to TIFFRepresentation since the data
1353         from the previous getTIFFRepresentation call can be used instead. This
1354         considerably reduces the amount of memory and CPU time used for large
1355         images/animations.
1356
1357         Test: fast/images/image-copy-memory-usage.html
1358
1359         * platform/mac/PasteboardMac.mm:
1360         (WebCore::Pasteboard::write):
1361
1362 2015-12-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1363
1364         Reduce PassRefPtr uses in dom - 2
1365         https://bugs.webkit.org/show_bug.cgi?id=151936
1366
1367         Reviewed by Darin Adler.
1368
1369         Change PassRefPtr with RefPtr<Foo>&&, WTF::move(), Foo*, and Foo&.
1370
1371         * dom/ScopedEventQueue.h:
1372         * dom/ScriptedAnimationController.cpp:
1373         (WebCore::ScriptedAnimationController::registerCallback):
1374         * dom/ScriptedAnimationController.h:
1375         * dom/StaticNodeList.h:
1376         * dom/Traversal.cpp:
1377         (WebCore::NodeIteratorBase::NodeIteratorBase):
1378         * dom/Traversal.h:
1379         * dom/TreeWalker.cpp:
1380         (WebCore::TreeWalker::TreeWalker):
1381         (WebCore::TreeWalker::setCurrentNode):
1382         * dom/TreeWalker.h:
1383         (WebCore::TreeWalker::create):
1384         * dom/UserActionElementSet.h:
1385         * dom/WebKitNamedFlow.cpp:
1386         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1387         (WebCore::WebKitNamedFlow::create):
1388         (WebCore::WebKitNamedFlow::getRegionsByContent):
1389         (WebCore::WebKitNamedFlow::getRegions):
1390         (WebCore::WebKitNamedFlow::getContent):
1391         * dom/WebKitNamedFlow.h:
1392         * dom/WheelEvent.cpp:
1393         (WebCore::WheelEvent::WheelEvent):
1394         (WebCore::WheelEvent::initWheelEvent):
1395         (WebCore::WheelEvent::initWebKitWheelEvent):
1396         * dom/WheelEvent.h:
1397
1398 2015-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1399
1400         [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
1401         https://bugs.webkit.org/show_bug.cgi?id=145542
1402
1403         Reviewed by Darin Adler.
1404
1405         Perform DNS prefetch only when no proxy is configured.
1406
1407         No new tests. Test this manually with Wireshark. Run the simple-proxy example program found
1408         in libsoup's examples directory, set that as your system HTTP proxy, and see if DNS queries
1409         show up in Wireshark when refreshing a page sent over HTTP. They should appear only when the
1410         proxy is not configured.
1411
1412         * platform/network/DNSResolveQueue.cpp:
1413         (WebCore::DNSResolveQueue::DNSResolveQueue):
1414         (WebCore::DNSResolveQueue::isUsingProxy):
1415         * platform/network/DNSResolveQueue.h:
1416         * platform/network/cf/DNSCFNet.cpp:
1417         (WebCore::DNSResolveQueue::updateIsUsingProxy):
1418         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
1419         * platform/network/soup/DNSSoup.cpp:
1420         (WebCore::didResolveProxy):
1421         (WebCore::proxyResolvedForHttpUriCallback):
1422         (WebCore::proxyResolvedForHttpsUriCallback):
1423         (WebCore::DNSResolveQueue::updateIsUsingProxy):
1424         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
1425
1426 2015-12-20  Dan Bernstein  <mitz@apple.com>
1427
1428         Remove unused setToolbarHeight
1429         https://bugs.webkit.org/show_bug.cgi?id=152466
1430
1431         Reviewed by Darin Adler.
1432
1433         * inspector/InspectorFrontendClient.h:
1434         * inspector/InspectorFrontendHost.cpp:
1435         (WebCore::InspectorFrontendHost::setToolbarHeight): Deleted.
1436         * inspector/InspectorFrontendHost.h:
1437         * inspector/InspectorFrontendHost.idl:
1438         * testing/Internals.cpp:
1439
1440 2015-12-20  Commit Queue  <commit-queue@webkit.org>
1441
1442         Unreviewed, rolling out r194033 and r194267.
1443         https://bugs.webkit.org/show_bug.cgi?id=152465
1444
1445         Caused crashes on Mac WK1 bots (Requested by youenn on
1446         #webkit).
1447
1448         Reverted changesets:
1449
1450         "[Streams API] Expose ReadableStream and relatives to Worker"
1451         https://bugs.webkit.org/show_bug.cgi?id=152066
1452         http://trac.webkit.org/changeset/194033
1453
1454         "[Streams API] imported/w3c/web-platform-tests/streams-api
1455         /readable-streams/cancel.html has a flaky test"
1456         https://bugs.webkit.org/show_bug.cgi?id=152065
1457         http://trac.webkit.org/changeset/194267
1458
1459 2015-12-19  Dan Bernstein  <mitz@apple.com>
1460
1461         [Mac] WebKit contains dead source code for OS X Mavericks and earlier
1462         https://bugs.webkit.org/show_bug.cgi?id=152462
1463
1464         Reviewed by Alexey Proskuryakov.
1465
1466         - Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
1467           that became uniform across all OS X versions as a result:
1468
1469         * Configurations/DebugRelease.xcconfig:
1470         * Configurations/FeatureDefines.xcconfig:
1471         * Configurations/Version.xcconfig:
1472
1473         - Removed support for animating default buttons:
1474
1475         * rendering/RenderButton.cpp:
1476         (WebCore::RenderButton::RenderButton): Removed m_default initialization.
1477         (WebCore::RenderButton::styleDidChange): Removed checking for animating default button and
1478           starting the animation timer.
1479         (WebCore::RenderButton::timerFired): Deleted.
1480         * rendering/RenderButton.h: Removed m_timer and m_default member variables
1481         * rendering/RenderTheme.h:
1482         (WebCore::RenderTheme::defaultButtonHasAnimation): Deleted.
1483         * rendering/RenderThemeMac.h: Deleted override.
1484         * rendering/RenderThemeMac.mm:
1485         (WebCore::RenderThemeMac::defaultButtonHasAnimation): Deleted.
1486
1487         - Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
1488           never getting compiled:
1489
1490         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1491         * editing/mac/DictionaryLookup.h:
1492         * editing/mac/DictionaryLookup.mm:
1493         * html/canvas/WebGLDrawBuffers.cpp:
1494         * loader/DocumentLoader.cpp:
1495         * loader/cache/CachedFont.cpp:
1496         * loader/cocoa/DiskCacheMonitorCocoa.h:
1497         * page/cocoa/SettingsCocoa.mm:
1498         * platform/Scrollbar.cpp:
1499         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1500         * platform/cocoa/NetworkExtensionContentFilter.h:
1501         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1502         * platform/graphics/cg/ImageSourceCG.cpp:
1503         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1504         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1505         * platform/graphics/mac/GraphicsContext3DMac.mm:
1506         * platform/mac/NSScrollerImpDetails.h:
1507         * platform/mac/ScrollAnimatorMac.mm:
1508         * platform/mac/ScrollViewMac.mm:
1509         * platform/mac/ScrollbarThemeMac.mm:
1510         * platform/mac/ThemeMac.mm:
1511         * platform/mac/WebCoreFullScreenPlaceholderView.h:
1512         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
1513         * platform/network/cf/CookieJarCFNet.cpp:
1514         * platform/network/cf/ResourceRequest.h:
1515         * platform/spi/cf/CFNetworkSPI.h:
1516         * platform/spi/cocoa/CoreTextSPI.h:
1517         * platform/spi/cocoa/NSButtonCellSPI.h:
1518         * platform/spi/cocoa/NSColorSPI.h:
1519         * platform/spi/cocoa/QuartzCoreSPI.h:
1520         * platform/spi/mac/LookupSPI.h:
1521         * platform/spi/mac/NSFontSPI.h:
1522         * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
1523         * platform/spi/mac/NSPopoverSPI.h:
1524         * platform/spi/mac/NSSharingServicePickerSPI.h:
1525         * platform/spi/mac/NSSharingServiceSPI.h:
1526         * platform/spi/mac/TUCallSPI.h:
1527         * platform/sql/SQLiteDatabase.cpp:
1528
1529 2015-12-18  Antti Koivisto  <antti@apple.com>
1530
1531         Cache redirects as separate entries
1532         https://bugs.webkit.org/show_bug.cgi?id=152424
1533
1534         Reviewed by Alex Christensen.
1535
1536         Test: http/tests/cache/disk-cache/disk-cache-redirect.html
1537
1538         * platform/network/ResourceRequestBase.h:
1539
1540 2015-12-18  Per Arne Vollan  <peavo@outlook.com>
1541
1542         [WinCairo] Empty context menu item.
1543         https://bugs.webkit.org/show_bug.cgi?id=152423
1544
1545         Reviewed by Alex Christensen.
1546
1547         The context menu contains a submenu item with no text.
1548
1549         * page/ContextMenuController.cpp:
1550         (WebCore::ContextMenuController::populate):
1551
1552 2015-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>
1553
1554         Avoid triggering clang's -Wundefined-bool-conversion
1555         https://bugs.webkit.org/show_bug.cgi?id=152408
1556
1557         Reviewed by Mark Lam.
1558
1559         Remove use of ASSERT(this).
1560
1561         * dom/TreeScope.cpp:
1562         (WebCore::TreeScope::adoptIfNeeded):
1563         * page/Frame.cpp:
1564         (WebCore::Frame::createView):
1565
1566 2015-12-18  Simon Fraser  <simon.fraser@apple.com>
1567
1568         Remove the 'ignoreViewportScalingConstraints' Setting, which was unused
1569         https://bugs.webkit.org/show_bug.cgi?id=152435
1570
1571         Reviewed by Tim Horton.
1572
1573         r177110 added a WebCore setting called ignoreViewportScalingConstraints,
1574         but it was never used, so remove it.
1575
1576         * page/Settings.in:
1577
1578 2015-12-18  Brent Fulgham  <bfulgham@apple.com>
1579
1580         Place an upper bound on canvas pixel count
1581         https://bugs.webkit.org/show_bug.cgi?id=151825
1582         <rdar://problem/23324916>
1583
1584         Reviewed by Simon Fraser (Relanded by Brent Fulgham)
1585
1586         Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
1587         we will use for this purpose to some percentage of system RAM.
1588
1589         * html/HTMLCanvasElement.cpp:
1590         (WebCore::removeFromActivePixelMemory): Added helper function
1591         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
1592         to ensure ImageBuffer and graphics context state are properly cleaned up.
1593         (WebCore::maxActivePixels): Use one quarter of the system RAM, or 2 GB (whichever is more) as
1594         an upper bound on active pixel memory.
1595         (WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
1596         us to exceed the allowed active pixel count, fail.
1597         (WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
1598         (WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
1599         to handle active pixel memory counts.
1600         (WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
1601         exceed our available pixel memory.
1602
1603 2015-12-18  Olivier Blin  <olivier.blin@softathome.com>
1604
1605         Fix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
1606         https://bugs.webkit.org/show_bug.cgi?id=152431
1607
1608         Since r192953, HTMLSourceElement is built even if video is disabled,
1609         since it is used by the picture element.
1610
1611         But build was broken with -no-video, since HTMLMediaElement usage
1612         should be guarded by VIDEO guards, and its JS bindings were still
1613         under a video conditional.
1614
1615         Reviewed by Alex Christensen.
1616
1617         No new tests, build fix only.
1618
1619         * html/HTMLSourceElement.cpp:
1620         (WebCore::HTMLSourceElement::insertedInto):
1621         (WebCore::HTMLSourceElement::removedFrom):
1622         * html/HTMLSourceElement.idl:
1623
1624 2015-12-18  Brady Eidson  <beidson@apple.com>
1625
1626         Modern IDB: Refactor when opening the backing store takes place.
1627         https://bugs.webkit.org/show_bug.cgi?id=152405
1628
1629         Reviewed by Alex Christensen.
1630
1631         No new tests (At least one failing test now passes).
1632
1633         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1634         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
1635           from here to performCurrentOpenOperation.
1636         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
1637           not open yet, kick off opening it here.
1638         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
1639
1640 2015-12-17  Brady Eidson  <beidson@apple.com>
1641
1642         Modern IDB: Refactor open/delete requests to exist in the same queue.
1643         https://bugs.webkit.org/show_bug.cgi?id=152397
1644
1645         Reviewed by Alex Christensen.
1646
1647         No new tests (Refactor, all existing tests continue to pass).
1648
1649         The order between incoming open and delete requests matters, and each request
1650         needs to be handled individually.
1651         
1652         This patch does the above without changing behavior on existing passing tests,
1653         while moving many currently skipped tests closer to passing.
1654     
1655         * Modules/indexeddb/server/IDBServerOperation.cpp:
1656         (WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
1657         (WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
1658         * Modules/indexeddb/server/IDBServerOperation.h:
1659         (WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):
1660
1661         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1662         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
1663         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
1664         (WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
1665         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
1666         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
1667         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
1668         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
1669         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
1670         (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
1671         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
1672         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
1673         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1674
1675 2015-12-17  Csaba Osztrogonác  <ossy@webkit.org>
1676
1677         [EFL] edje shouldn't have verbose output
1678         https://bugs.webkit.org/show_bug.cgi?id=152381
1679
1680         Reviewed by Gyuyoung Kim.
1681
1682         * platform/efl/DefaultTheme/CMakeLists.txt:
1683
1684 2015-12-17  Commit Queue  <commit-queue@webkit.org>
1685
1686         Unreviewed, rolling out r194241 and r194252.
1687         https://bugs.webkit.org/show_bug.cgi?id=152415
1688
1689         Caused crashes on GuardMalloc (Requested by ap on #webkit).
1690
1691         Reverted changesets:
1692
1693         "Modern IDB: Refactor open/delete requests to exist in the
1694         same queue."
1695         https://bugs.webkit.org/show_bug.cgi?id=152397
1696         http://trac.webkit.org/changeset/194241
1697
1698         "Modern IDB: Refactor when opening the backing store takes
1699         place."
1700         https://bugs.webkit.org/show_bug.cgi?id=152405
1701         http://trac.webkit.org/changeset/194252
1702
1703 2015-12-17  Brady Eidson  <beidson@apple.com>
1704
1705         Modern IDB: Refactor when opening the backing store takes place.
1706         https://bugs.webkit.org/show_bug.cgi?id=152405
1707
1708         Reviewed by Alex Christensen.
1709
1710         No new tests (At least one failing test now passes).
1711
1712         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1713         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
1714           from here to performCurrentOpenOperation.
1715         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
1716           not open yet, kick off opening it here.
1717         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
1718
1719 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
1720
1721         ViewportConfiguration functions should return a bool to say if anything changed
1722         https://bugs.webkit.org/show_bug.cgi?id=152353
1723
1724         Reviewed by Tim Horton.
1725
1726         Rather than callers all checking whether setting ViewportConfiguration values
1727         changes state, have its functions return a bool if the values change.
1728
1729         * page/ViewportConfiguration.cpp:
1730         (WebCore::ViewportConfiguration::setContentsSize):
1731         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
1732         (WebCore::ViewportConfiguration::setViewportArguments):
1733         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
1734         * page/ViewportConfiguration.h:
1735         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): Deleted.
1736
1737 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
1738
1739         Web Inspector: Add JSContext Script Profiling
1740         https://bugs.webkit.org/show_bug.cgi?id=151899
1741
1742         Reviewed by Brian Burg.
1743
1744         Tests: inspector/script-profiler/event-type-API.html
1745                inspector/script-profiler/event-type-Microtask.html
1746                inspector/script-profiler/tracking.html
1747
1748         * ForwardingHeaders/inspector/agents/InspectorScriptProfilerAgent.h: Added.
1749
1750         * inspector/InspectorController.h:
1751         * inspector/InspectorController.cpp:
1752         (WebCore::InspectorController::InspectorController):
1753         Create the new agent, even if we don't use it yet for Page inspection.
1754
1755         (WebCore::InspectorController::willCallInjectedScriptFunction): Deleted.
1756         (WebCore::InspectorController::didCallInjectedScriptFunction): Deleted.
1757         No longer needed, implementation was pushed up into InjectedScriptBase.
1758
1759         * inspector/InspectorCSSAgent.cpp:
1760         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1761         * inspector/InspectorReplayAgent.cpp:
1762         (WebCore::buildInspectorObjectForSession):
1763         Disambiguate types.
1764
1765 2015-12-17  Brady Eidson  <beidson@apple.com>
1766
1767         Modern IDB: Refactor open/delete requests to exist in the same queue.
1768         https://bugs.webkit.org/show_bug.cgi?id=152397
1769
1770         Reviewed by Alex Christensen.
1771
1772         No new tests (Refactor, all existing tests continue to pass).
1773
1774         The order between incoming open and delete requests matters, and each request
1775         needs to be handled individually.
1776         
1777         This patch does the above without changing behavior on existing passing tests,
1778         while moving many currently skipped tests closer to passing.
1779     
1780         * Modules/indexeddb/server/IDBServerOperation.cpp:
1781         (WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
1782         (WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
1783         * Modules/indexeddb/server/IDBServerOperation.h:
1784         (WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):
1785
1786         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1787         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
1788         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
1789         (WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
1790         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
1791         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
1792         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
1793         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
1794         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
1795         (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
1796         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
1797         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
1798         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1799
1800 2015-12-17  Brent Fulgham  <bfulgham@apple.com>
1801
1802         [Win] Prevent flashing/strobing repaints on certain hardware
1803         https://bugs.webkit.org/show_bug.cgi?id=152394
1804         <rdar://problem/23875302>
1805
1806         Reviewed by Simon Fraser.
1807
1808         This patch reverts a change I made in r192166, where I always set the
1809         m_viewNeedsUpdate flag to true when a 'flushContext' call was made. Instead,
1810         we should go back to letting the view decide when it needs to paint.
1811
1812         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
1813         (WebCore::WKCACFViewLayerTreeHost::flushContext): Don't just claim that
1814         the view needs to be updated any time we are asked to flush. 
1815
1816 2015-12-17  Per Arne Vollan  <peavo@outlook.com>
1817
1818         [WinCairo][MediaFoundation] Release Direct3D swap chain object earlier.
1819         https://bugs.webkit.org/show_bug.cgi?id=152392
1820
1821         Reviewed by Alex Christensen.
1822
1823         Since we don't use the swap chain object to render the video to a window,
1824         but render frames to Cairo bitmaps, we can let go of the swap chain object
1825         earlier than we currently do. 
1826
1827         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1828         (WebCore::clearDesiredSampleTime):
1829         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):
1830
1831 2015-12-17  Commit Queue  <commit-queue@webkit.org>
1832
1833         Unreviewed, rolling out r194201.
1834         https://bugs.webkit.org/show_bug.cgi?id=152391
1835
1836         Caused crashes with GuardMalloc (Requested by ap|away on
1837         #webkit).
1838
1839         Reverted changeset:
1840
1841         "Reduce PassRefPtr uses in dom - 2"
1842         https://bugs.webkit.org/show_bug.cgi?id=151936
1843         http://trac.webkit.org/changeset/194201
1844
1845 2015-12-17  Csaba Osztrogonác  <ossy@webkit.org>
1846
1847         Fix unused parameter handling in WebGLRenderingContextBase.cp
1848         https://bugs.webkit.org/show_bug.cgi?id=152387
1849
1850         Reviewed by Alex Christensen.
1851
1852         * html/canvas/WebGLRenderingContextBase.cpp:
1853         (WebCore::WebGLRenderingContextBase::activeTexture):
1854         (WebCore::WebGLRenderingContextBase::attachShader):
1855         (WebCore::WebGLRenderingContextBase::bindAttribLocation):
1856         (WebCore::WebGLRenderingContextBase::bindBuffer):
1857         (WebCore::WebGLRenderingContextBase::bindFramebuffer):
1858         (WebCore::WebGLRenderingContextBase::bindRenderbuffer):
1859         (WebCore::WebGLRenderingContextBase::bindTexture):
1860         (WebCore::WebGLRenderingContextBase::bufferData):
1861         (WebCore::WebGLRenderingContextBase::bufferSubData):
1862         (WebCore::WebGLRenderingContextBase::compileShader):
1863         (WebCore::WebGLRenderingContextBase::createShader):
1864         (WebCore::WebGLRenderingContextBase::detachShader):
1865         (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
1866         (WebCore::WebGLRenderingContextBase::drawArrays):
1867         (WebCore::WebGLRenderingContextBase::drawElements):
1868         (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
1869         (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
1870         (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
1871         (WebCore::WebGLRenderingContextBase::getActiveAttrib):
1872         (WebCore::WebGLRenderingContextBase::getActiveUniform):
1873         (WebCore::WebGLRenderingContextBase::getAttachedShaders):
1874         (WebCore::WebGLRenderingContextBase::getBufferParameter):
1875         (WebCore::WebGLRenderingContextBase::getProgramParameter):
1876         (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
1877         (WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
1878         (WebCore::WebGLRenderingContextBase::getShaderParameter):
1879         (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
1880         (WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
1881         (WebCore::WebGLRenderingContextBase::getShaderSource):
1882         (WebCore::WebGLRenderingContextBase::getTexParameter):
1883         (WebCore::WebGLRenderingContextBase::getUniform):
1884         (WebCore::WebGLRenderingContextBase::getUniformLocation):
1885         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
1886         (WebCore::WebGLRenderingContextBase::linkProgram):
1887         (WebCore::WebGLRenderingContextBase::shaderSource):
1888         (WebCore::WebGLRenderingContextBase::uniform1f):
1889         (WebCore::WebGLRenderingContextBase::uniform1fv):
1890         (WebCore::WebGLRenderingContextBase::uniform1i):
1891         (WebCore::WebGLRenderingContextBase::uniform1iv):
1892         (WebCore::WebGLRenderingContextBase::uniform2f):
1893         (WebCore::WebGLRenderingContextBase::uniform2fv):
1894         (WebCore::WebGLRenderingContextBase::uniform2i):
1895         (WebCore::WebGLRenderingContextBase::uniform2iv):
1896         (WebCore::WebGLRenderingContextBase::uniform3f):
1897         (WebCore::WebGLRenderingContextBase::uniform3fv):
1898         (WebCore::WebGLRenderingContextBase::uniform3i):
1899         (WebCore::WebGLRenderingContextBase::uniform3iv):
1900         (WebCore::WebGLRenderingContextBase::uniform4f):
1901         (WebCore::WebGLRenderingContextBase::uniform4fv):
1902         (WebCore::WebGLRenderingContextBase::uniform4i):
1903         (WebCore::WebGLRenderingContextBase::uniform4iv):
1904         (WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
1905         (WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
1906         (WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
1907         (WebCore::WebGLRenderingContextBase::useProgram):
1908         (WebCore::WebGLRenderingContextBase::validateProgram):
1909         (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
1910
1911 2015-12-16  Alex Christensen  <achristensen@webkit.org>
1912
1913         Make SessionID use intHash
1914         https://bugs.webkit.org/show_bug.cgi?id=152356
1915
1916         Reviewed by Darin Adler.
1917
1918         * page/SessionID.h:
1919         (WTF::SessionIDHash::hash):
1920         (WTF::SessionIDHash::equal):
1921         (WTF::HashTraits<WebCore::SessionID>::emptyValue):
1922         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
1923         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
1924         Use intHash instead of just casting a uint64_t to an unsigned.
1925         This reduces hash collisions in HashTables that are usually quite small so it isn't much of a problem.
1926         Also, needsDestruction hasn't been in HashTraits since r156507.
1927
1928 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
1929
1930         Fix the debug region overlays for RTL documents
1931         https://bugs.webkit.org/show_bug.cgi?id=152372
1932
1933         Reviewed by Darin Adler.
1934         
1935         Fix document overlays to use document coordinates when painting, which requires
1936         translating the CTM, and counter-translating the dirtyRect by the scroll origin.
1937         This is only non-zero for RTL documents.
1938         
1939         While doing this, I noticed that the scroll origin was misplaced by the scrollbar
1940         width when using overlay scrollbars. Fix by using occupiedWidth/Height() in
1941         ScrollView::updateScrollbars(). I was not able to make a test for this change.
1942
1943         * page/FrameView.cpp:
1944         (WebCore::FrameView::adjustViewSize):
1945         * page/PageOverlay.cpp:
1946         (WebCore::PageOverlay::drawRect):
1947         * platform/ScrollView.cpp:
1948         (WebCore::ScrollView::updateScrollbars):
1949
1950 2015-12-16  Andy Estes  <aestes@apple.com>
1951
1952         [iOS] Block loading external stylesheets in the Content-Disposition: attachment sandbox
1953         https://bugs.webkit.org/show_bug.cgi?id=152375
1954         <rdar://problem/22020902>
1955
1956         Reviewed by Darin Adler.
1957
1958         Tests: http/tests/contentdispositionattachmentsandbox/at-import-stylesheets-disabled.html
1959                http/tests/contentdispositionattachmentsandbox/external-stylesheets-disabled.html
1960                http/tests/contentdispositionattachmentsandbox/xml-stylesheet-processing-instructions-disabled.html
1961
1962         * loader/cache/CachedResourceLoader.cpp:
1963         (WebCore::CachedResourceLoader::canRequest): Moved handling of CachedResource::MainResource to canRequestInContentDispositionAttachmentSandbox().
1964         (WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox): In addition to handling CachedResource::MainResource,
1965         added handling for CachedResource::CSSStyleSheet. Added a FIXME asking whether we should handle other types of resources, too.
1966         * loader/cache/CachedResourceLoader.h:
1967
1968 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
1969
1970         ViewportConfiguration functions should return a bool to say if anything changed
1971         https://bugs.webkit.org/show_bug.cgi?id=152353
1972
1973         Reviewed by Tim Horton.
1974
1975         Rather than callers all checking whether setting ViewportConfiguration values
1976         changes state, have its functions return a bool if the values change.
1977
1978         * page/ViewportConfiguration.cpp:
1979         (WebCore::ViewportConfiguration::setContentsSize):
1980         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
1981         (WebCore::ViewportConfiguration::setViewportArguments):
1982         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
1983         * page/ViewportConfiguration.h:
1984         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): Deleted.
1985
1986 2015-12-16  Andreas Kling  <akling@apple.com>
1987
1988         Give kernel VM some hints about non-live memory-cached resources.
1989         <https://webkit.org/b/152362>
1990
1991         Reviewed by Geoffrey Garen.
1992
1993         When a file-backed CachedResource has no live clients left, and is only being kept alive
1994         because it's cached in the MemoryCache, give the OS a hint that we probably won't need
1995         that memory very soon.
1996
1997         Normally this doesn't do anything, but in case the system comes under memory pressure,
1998         the kernel can prioritize eviction of such clean-but-unneeded pages, which prevents us
1999         from throwing other processes under the bus too soon.
2000
2001         * loader/cache/CachedResource.cpp:
2002         (WebCore::CachedResource::deleteIfPossible):
2003         * platform/SharedBuffer.cpp:
2004         (WebCore::SharedBuffer::hintMemoryNotNeededSoon):
2005         * platform/SharedBuffer.h:
2006         * platform/cf/SharedBufferCF.cpp:
2007         (WebCore::SharedBuffer::hintMemoryNotNeededSoon):
2008
2009 2015-12-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2010
2011         Reduce PassRefPtr uses in dom - 2
2012         https://bugs.webkit.org/show_bug.cgi?id=151936
2013
2014         Reviewed by Darin Adler.
2015
2016         Change PassRefPtr with RefPtr<Foo>&&, WTF::move(), Foo*, and Foo&.
2017
2018         * dom/ScopedEventQueue.h:
2019         * dom/ScriptedAnimationController.cpp:
2020         (WebCore::ScriptedAnimationController::registerCallback):
2021         * dom/ScriptedAnimationController.h:
2022         * dom/StaticNodeList.h:
2023         * dom/Traversal.cpp:
2024         (WebCore::NodeIteratorBase::NodeIteratorBase):
2025         * dom/Traversal.h:
2026         * dom/TreeWalker.cpp:
2027         (WebCore::TreeWalker::TreeWalker):
2028         (WebCore::TreeWalker::setCurrentNode):
2029         * dom/TreeWalker.h:
2030         (WebCore::TreeWalker::create):
2031         * dom/UserActionElementSet.h:
2032         * dom/WebKitNamedFlow.cpp:
2033         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
2034         (WebCore::WebKitNamedFlow::create):
2035         (WebCore::WebKitNamedFlow::getRegionsByContent):
2036         (WebCore::WebKitNamedFlow::getRegions):
2037         (WebCore::WebKitNamedFlow::getContent):
2038         * dom/WebKitNamedFlow.h:
2039         * dom/WheelEvent.cpp:
2040         (WebCore::WheelEvent::WheelEvent):
2041         (WebCore::WheelEvent::initWheelEvent):
2042         (WebCore::WheelEvent::initWebKitWheelEvent):
2043         * dom/WheelEvent.h:
2044
2045 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
2046
2047         Simplify isOverlayScrollbar() logic
2048         https://bugs.webkit.org/show_bug.cgi?id=152357
2049
2050         Reviewed by Beth Dakin.
2051
2052         Replace code that checks for isOverlayScrollbar() explicitly with calls to new
2053         occupiedWidth()/occupiedHeight() functions on Scrollbar, which do the overlay
2054         scrollbar check internally.
2055         
2056         Add ScrollableArea::scrollbarIntrusion() which returns an IntSize with the occupiedWidth
2057         and occupiedHeight of any scrollbars, and use it in a few places.
2058
2059         * page/FrameView.cpp:
2060         (WebCore::FrameView::autoSizeIfEnabled):
2061         * platform/ScrollView.cpp:
2062         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
2063         (WebCore::ScrollView::calculateOverhangAreasForPainting):
2064         * platform/ScrollableArea.cpp:
2065         (WebCore::ScrollableArea::scrollbarIntrusion):
2066         (WebCore::ScrollableArea::visibleContentRectInternal):
2067         * platform/ScrollableArea.h:
2068         * platform/Scrollbar.cpp:
2069         (WebCore::Scrollbar::occupiedWidth):
2070         (WebCore::Scrollbar::occupiedHeight):
2071         * platform/Scrollbar.h:
2072         * rendering/RenderLayer.cpp:
2073         (WebCore::RenderLayer::visibleContentRectInternal):
2074         * rendering/RenderListBox.cpp:
2075         (WebCore::RenderListBox::verticalScrollbarWidth):
2076
2077 2015-12-16  Alex Christensen  <achristensen@webkit.org>
2078
2079         Fix internal Windows build
2080         https://bugs.webkit.org/show_bug.cgi?id=152364
2081         rdar://problem/23928759
2082
2083         Reviewed by Tim Horton.
2084
2085         * WebCore.vcxproj/WebCore.proj:
2086
2087 2015-12-16  Brady Eidson  <beidson@apple.com>
2088
2089         Modern IDB: Refactor UniqueIDBDatabase in preparation for consolidation open and delete requests.
2090         https://bugs.webkit.org/show_bug.cgi?id=152355
2091
2092         Reviewed by Alex Christensen.
2093
2094         No new tests (Refactor, existing tests pass).
2095
2096         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2097         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
2098         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
2099         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
2100         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
2101         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
2102         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
2103         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
2104         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2105
2106 2015-12-16  Brady Eidson  <beidson@apple.com>
2107
2108         Modern IDB: Have IDBServerOperations know whether they represent an open or delete request.
2109         https://bugs.webkit.org/show_bug.cgi?id=152351
2110
2111         Reviewed by Alex Christensen.
2112
2113         No new tests (Refactor, existing tests pass).
2114
2115         * Modules/indexeddb/IndexedDB.h:
2116         
2117         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2118         (WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
2119         (WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
2120         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
2121         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
2122         
2123         * Modules/indexeddb/client/IDBRequestImpl.h:
2124         (WebCore::IDBClient::IDBRequest::requestType):
2125         
2126         * Modules/indexeddb/server/IDBServerOperation.cpp:
2127         (WebCore::IDBServer::IDBServerOperation::isOpenRequest):
2128         (WebCore::IDBServer::IDBServerOperation::isDeleteRequest):
2129         * Modules/indexeddb/server/IDBServerOperation.h:
2130         
2131         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2132         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
2133         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
2134         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
2135         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
2136         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
2137         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2138         
2139         * Modules/indexeddb/shared/IDBRequestData.cpp:
2140         (WebCore::IDBRequestData::IDBRequestData):
2141         * Modules/indexeddb/shared/IDBRequestData.h:
2142         (WebCore::IDBRequestData::isOpenRequest):
2143         (WebCore::IDBRequestData::isDeleteRequest):
2144
2145 2015-12-16  Alex Christensen  <achristensen@webkit.org>
2146
2147         Build fix after r194156.
2148
2149         * platform/network/cf/ResourceHandleCFNet.cpp:
2150         (WebCore::ResourceHandle::createCFURLConnection):
2151
2152 2015-12-16  Brady Eidson  <beidson@apple.com>
2153
2154         Modern IDB: Combine handling open requests, delete requests, and transactions into one timer.
2155         https://bugs.webkit.org/show_bug.cgi?id=152344
2156
2157         Reviewed by Alex Christensen.
2158
2159         No new tests (Refactor, existing tests pass).
2160
2161         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2162         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
2163         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2164         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
2165         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
2166         (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
2167         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
2168         (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
2169         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
2170         (WebCore::IDBServer::UniqueIDBDatabase::invokeDeleteOrRunTransactionTimer): Deleted.
2171         (WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired): Deleted.
2172         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2173
2174 2015-12-16  Alex Christensen  <achristensen@webkit.org>
2175
2176         Build fix after r194156.
2177
2178         * platform/network/cf/ResourceHandleCFNet.cpp:
2179         * platform/network/mac/ResourceHandleMac.mm:
2180         Include definition of _TimingDataOptionsEnableW3CNavigationTiming
2181
2182 2015-12-16  Alex Christensen  <achristensen@webkit.org>
2183
2184         Implement Web Timing when using NETWORK_SESSION
2185         https://bugs.webkit.org/show_bug.cgi?id=152285
2186
2187         Reviewed by Darin Adler.
2188
2189         Covered by existing tests.
2190
2191         * WebCore.xcodeproj/project.pbxproj:
2192         * platform/network/ResourceHandle.h:
2193         * platform/network/ResourceLoadTiming.h:
2194         (WebCore::ResourceLoadTiming::encode):
2195         Moved setCollectsTimingData from ResourceHandle to ResourceLoadTiming.h to be shared 
2196         with WebKit2 when using NETWORK_SESSION, which does not use ResourceHandle.
2197         Also moved getConnectionTimingData to copyTimingData in ResourceLoadTiming for the same reason.
2198         * platform/network/cf/ResourceHandleCFNet.cpp:
2199         (WebCore::ResourceHandle::createCFURLConnection):
2200         (WebCore::ResourceHandle::start):
2201         Use the proper definition of _TimingDataOptionsEnableW3CNavigationTiming.
2202         * platform/network/cocoa/ResourceLoadTiming.mm: Added.
2203         (WebCore::timingValue):
2204         (WebCore::copyTimingData):
2205         Moved from getConnectionTimingData, and use objectForKey instead of valueForKey,
2206         and check to see if there is no object in the dictionary with the given key.
2207         This should never happen with the current CFNetwork implementation, but it's good to check dictionaries.
2208         (WebCore::setCollectsTimingData):
2209         Use _collectTimingDataWithOptions, which should be a slight performance improvement on Mavericks
2210         because we are not collecting unused timing data. Hooray!
2211         * platform/network/mac/ResourceHandleMac.mm:
2212         (WebCore::ResourceHandle::createNSURLConnection):
2213         (WebCore::ResourceHandle::getConnectionTimingData):
2214         (WebCore::ResourceHandle::setCollectsTimingData): Deleted.
2215         * platform/spi/cf/CFNetworkSPI.h:
2216         * platform/spi/cocoa/NSURLConnectionSPI.h:
2217         Moved definitions of SPI to proper SPI headers.
2218
2219 2015-12-16  Beth Dakin  <bdakin@apple.com>
2220
2221         Legacy style scrollbars do not change color when you mouse over them if you 
2222         are scrolled
2223         https://bugs.webkit.org/show_bug.cgi?id=152319
2224         -and corresponding-
2225         rdar://problem/23317668
2226
2227         Reviewed by Darin Adler.
2228
2229         The scrollbar’s frameRect is in window coordinates, so we need to compare a 
2230         point in window coordinates when we test this.
2231
2232         The call to convertFromContainingWindow does not return a point in view 
2233         coordinates, so we should not call the variable viewPoint. We do still need 
2234         to call it for subframes. convertFromContainingWindow doesn’t do anything for 
2235         the root ScrollView (for Mac WK2 at least).
2236         * platform/ScrollView.cpp:
2237         (WebCore::ScrollView::scrollbarAtPoint):
2238
2239         HitTestLocation is in contents coordinates. It needs to be converted to 
2240         window coordinates
2241         * rendering/RenderView.cpp:
2242         (WebCore::RenderView::hitTest):
2243
2244 2015-12-08  Sergio Villar Senin  <svillar@igalia.com>
2245
2246         Fix computation of min|max-content contribution of non-replaced blocks
2247         https://bugs.webkit.org/show_bug.cgi?id=152004
2248
2249         Reviewed by Darin Adler.
2250
2251         WebKit currently always returns the min preferred logical
2252         width for the min-content contribution (and the max preferred
2253         logical width for the max-content contribution) for
2254         non-replaced blocks. That is not correct according to specs
2255         https://drafts.csswg.org/css-sizing/#block-intrinsic.
2256
2257         The min-content and max-content contributions actually depend
2258         on the computed inline size of the block:
2259         * for min-content,max-content or definite sizes: min-content
2260         and max-content contributions are the inline size plus border,
2261         margin and padding.
2262         * otherwise: min-content contribution is the min-content size
2263         and max-content contribution is the max-content size (in both
2264         cases plus border, padding and margin).
2265
2266         Tests: fast/css-intrinsic-dimensions/auto-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
2267                fast/css-intrinsic-dimensions/auto-mincontent-inlinesize-contribution-nonreplaced-blocks.html
2268                fast/css-intrinsic-dimensions/fillavailable-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
2269                fast/css-intrinsic-dimensions/fillavailable-mincontent-inlinesize-contribution-nonreplaced-blocks.html
2270                fast/css-intrinsic-dimensions/fitcontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
2271                fast/css-intrinsic-dimensions/fitcontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
2272                fast/css-intrinsic-dimensions/fixed-inlinesize-contribution-nonreplaced-blocks-1.html
2273                fast/css-intrinsic-dimensions/fixed-inlinesize-contribution-nonreplaced-blocks-2.html
2274                fast/css-intrinsic-dimensions/indefinite-percent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
2275                fast/css-intrinsic-dimensions/indefinite-percent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
2276                fast/css-intrinsic-dimensions/maxcontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
2277                fast/css-intrinsic-dimensions/maxcontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
2278                fast/css-intrinsic-dimensions/mincontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
2279                fast/css-intrinsic-dimensions/mincontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
2280
2281         * rendering/RenderBlock.cpp:
2282         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2283
2284 2015-12-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2285
2286         [Fetch API] Add fetch API compile time flag
2287         https://bugs.webkit.org/show_bug.cgi?id=152254
2288
2289         Reviewed by Darin Adler.
2290
2291         * Configurations/FeatureDefines.xcconfig:
2292
2293 2015-12-15  Zalan Bujtas  <zalan@apple.com>
2294
2295         FontCascade cleanup: Remove ::drawSimpleText and ::drawComplexText.
2296         https://bugs.webkit.org/show_bug.cgi?id=152323
2297
2298         Reviewed by Myles C. Maxfield.
2299
2300         Platform code for ::drawComplexText() is redundant and has 
2301         no platform dependent logic. Move it all to ::drawText()
2302
2303         No change in functionality.
2304
2305         * platform/graphics/FontCascade.cpp:
2306         (WebCore::FontCascade::glyphBufferForTextRun):
2307         (WebCore::FontCascade::drawText):
2308         (WebCore::FontCascade::drawSimpleText): Deleted.
2309         * platform/graphics/FontCascade.h:
2310         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2311         (WebCore::FontCascade::drawComplexText): Deleted.
2312         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2313         (WebCore::FontCascade::drawComplexText): Deleted.
2314         * platform/graphics/win/FontWin.cpp:
2315         (WebCore::FontCascade::drawComplexText): Deleted.
2316
2317 2015-12-15  Tim Horton  <timothy_horton@apple.com>
2318
2319         [Mac] Gesture Events should not have negative scale
2320         https://bugs.webkit.org/show_bug.cgi?id=151065
2321         <rdar://problem/23474123>
2322
2323         Reviewed by Anders Carlsson.
2324
2325         * page/EventHandler.cpp:
2326         (WebCore::EventHandler::clear):
2327         * page/EventHandler.h:
2328         Make it possible to use m_gestureInitialDiameter for Mac gesture events too.
2329
2330 2015-12-15  Timothy Horton  <timothy_horton@apple.com>
2331
2332         Try to fix the CMake build
2333
2334         * CMakeLists.txt:
2335
2336 2015-12-15  Timothy Horton  <timothy_horton@apple.com>
2337
2338         Try to fix the CMake build
2339
2340         * CMakeLists.txt:
2341
2342 2015-12-15  Tim Horton  <timothy_horton@apple.com>
2343
2344         REGRESSION (r191849): There's no yellow bouncy highlight when using Find on Page on iOS
2345         https://bugs.webkit.org/show_bug.cgi?id=152241
2346         <rdar://problem/23642574>
2347
2348         Reviewed by Simon Fraser.
2349
2350         Tests: pageoverlay/overlay-small-frame-mouse-events.html
2351                pageoverlay/overlay-small-frame-paints.html
2352
2353         * page/PageOverlay.cpp:
2354         (WebCore::PageOverlay::bounds):
2355         Revert r191849's change that made bounds() actually return the frame()
2356         if we frame is manually overriden.
2357
2358         (WebCore::PageOverlay::mouseEvent):
2359         Convert the mouse event the rest of the way into overlay coordinates (by
2360         applying the overlay's frame origin) before deciding whether to handle
2361         the event.
2362
2363         * page/PageOverlay.h:
2364
2365         * DerivedSources.make:
2366         * WebCore.xcodeproj/project.pbxproj:
2367         * testing/Internals.cpp:
2368         (WebCore::Internals::installMockPageOverlay):
2369         * testing/Internals.h:
2370         * testing/Internals.idl:
2371         * testing/MockPageOverlay.cpp: Added.
2372         (WebCore::MockPageOverlay::create):
2373         (WebCore::MockPageOverlay::MockPageOverlay):
2374         (WebCore::MockPageOverlay::setFrame):
2375         * testing/MockPageOverlay.h: Added.
2376         (WebCore::MockPageOverlay::overlay):
2377         * testing/MockPageOverlay.idl: Added.
2378         * testing/MockPageOverlayClient.cpp:
2379         (WebCore::MockPageOverlayClient::installOverlay):
2380         (WebCore::MockPageOverlayClient::uninstallAllOverlays):
2381         (WebCore::MockPageOverlayClient::pageOverlayDestroyed):
2382         (WebCore::MockPageOverlayClient::drawRect):
2383         (WebCore::MockPageOverlayClient::mouseEvent):
2384         * testing/MockPageOverlayClient.h:
2385         Make internals.installMockPageOverlay return a MockPageOverlay object so
2386         tests can manipulate their overlay. For now, expose setFrame.
2387         Also, log when MockPageOverlayClient gets asked to paint or receives a mouse event,
2388         which will show up in test output. Slightly unconventional, but very convenient.
2389
2390 2015-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
2391
2392         [Font Features] TrueType fonts trigger real features even when synthesis is applied
2393         https://bugs.webkit.org/show_bug.cgi?id=152287
2394
2395         Reviewed by Darin Adler.
2396
2397         When using a font feature that is synthesizable, and synthesis is triggered,
2398         we should make sure to turn off the original font feature. Otherwise, the
2399         feature will be applied twice on top of itself.
2400
2401         This worked for OpenType fonts, but not for TrueType fonts.
2402
2403         Tests: css3/font-variant-petite-caps-synthesis.html
2404                css3/font-variant-small-caps-synthesis.html
2405                css3/font-variant-petite-caps-synthesis-coverage.html
2406                css3/font-variant-small-caps-synthesis-coverage.html
2407
2408         * platform/graphics/cocoa/FontCocoa.mm:
2409         (WebCore::defaultSelectorForTrueTypeFeature):
2410         (WebCore::removedFeature):
2411         (WebCore::createCTFontWithoutSynthesizableFeatures):
2412
2413 2015-12-15  Per Arne Vollan  <peavo@outlook.com>
2414
2415         [WinCairo][MediaFoundation] Full screen mode is not supported.
2416         https://bugs.webkit.org/show_bug.cgi?id=152300
2417
2418         Reviewed by Darin Adler.
2419
2420         We need to let WebCore know MediaFoundation supports full screen mode.
2421
2422         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2423         (WebCore::MediaPlayerPrivateMediaFoundation::pause):
2424         (WebCore::MediaPlayerPrivateMediaFoundation::supportsFullscreen):
2425         (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
2426         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2427
2428 2015-12-15  Javier Fernandez  <jfernandez@igalia.com>
2429
2430         [css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe'
2431         https://bugs.webkit.org/show_bug.cgi?id=152251
2432
2433         Reviewed by Darin Adler.
2434
2435         The 'True' Overflow Alignment keyword is now defined in the Box Alignment
2436         specification as 'Unsafe'.
2437
2438         This patch applies the required changes in the CSS parsing logic, as well
2439         Grid Layout specific codebase, so it complies with the last version of the
2440         spec.
2441
2442         No new tests, no change in functionality.
2443
2444         * css/CSSParser.cpp:
2445         (WebCore::isAlignmentOverflowKeyword):
2446         (WebCore::CSSParser::parseItemPositionOverflowPosition):
2447         * css/CSSPrimitiveValueMappings.h:
2448         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2449         (WebCore::CSSPrimitiveValue::operator OverflowAlignment):
2450         * css/CSSValueKeywords.in:
2451         * rendering/RenderGrid.cpp:
2452         (WebCore::computeOverflowAlignmentOffset):
2453         * rendering/style/RenderStyleConstants.h:
2454
2455 2015-12-15  Zan Dobersek  <zdobersek@igalia.com>
2456
2457         [TexMap] Operate with a reference to the TextureMapper wherever possible
2458         https://bugs.webkit.org/show_bug.cgi?id=152118
2459
2460         Reviewed by Martin Robinson.
2461
2462         In most cases where used, the pointer to the TextureMapper is non-null, so it
2463         should really be a reference. The pointer is still used for the
2464         TextureMapperLayer member variable which is null until the TextureMapper object
2465         is created and set on the root layer.
2466
2467         * platform/graphics/GraphicsContext3DPrivate.cpp:
2468         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2469         * platform/graphics/GraphicsContext3DPrivate.h:
2470         * platform/graphics/cairo/ImageBufferCairo.cpp:
2471         (WebCore::ImageBufferData::paintToTextureMapper):
2472         * platform/graphics/cairo/ImageBufferDataCairo.h:
2473         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2474         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2475         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2476         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2477         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
2478         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2479         * platform/graphics/surfaces/GraphicsSurface.cpp:
2480         (WebCore::GraphicsSurface::paintToTextureMapper):
2481         * platform/graphics/surfaces/GraphicsSurface.h:
2482         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
2483         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
2484         * platform/graphics/texmap/BitmapTexture.cpp:
2485         (WebCore::BitmapTexture::updateContents):
2486         * platform/graphics/texmap/BitmapTexture.h:
2487         (WebCore::BitmapTexture::applyFilters):
2488         * platform/graphics/texmap/BitmapTextureGL.cpp:
2489         (WebCore::BitmapTextureGL::applyFilters):
2490         * platform/graphics/texmap/BitmapTextureGL.h:
2491         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2492         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
2493         * platform/graphics/texmap/TextureMapperBackingStore.h:
2494         (WebCore::TextureMapperBackingStore::drawRepaintCounter):
2495         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
2496         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
2497         * platform/graphics/texmap/TextureMapperFPSCounter.h:
2498         * platform/graphics/texmap/TextureMapperLayer.cpp:
2499         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
2500         (WebCore::TextureMapperLayer::paint):
2501         (WebCore::TextureMapperLayer::paintSelf):
2502         (WebCore::TextureMapperLayer::paintSelfAndChildren):
2503         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
2504         (WebCore::TextureMapperLayer::applyMask):
2505         (WebCore::TextureMapperLayer::paintIntoSurface):
2506         (WebCore::commitSurface):
2507         (WebCore::TextureMapperLayer::paintWithIntermediateSurface):
2508         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
2509         (WebCore::TextureMapperPlatformLayer::drawBorder):
2510         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
2511         (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
2512         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
2513         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp:
2514         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
2515         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h:
2516         * platform/graphics/texmap/TextureMapperTile.cpp:
2517         (WebCore::TextureMapperTile::updateContents):
2518         (WebCore::TextureMapperTile::paint):
2519         * platform/graphics/texmap/TextureMapperTile.h:
2520         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
2521         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
2522         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
2523         (WebCore::TextureMapperTiledBackingStore::drawBorder):
2524         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
2525         (WebCore::TextureMapperTiledBackingStore::updateContents):
2526         * platform/graphics/texmap/TextureMapperTiledBackingStore.h:
2527
2528 2015-12-15  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2529
2530         WebIDL generator should support the possibility for C++ classes to have a JS Builtin constructor
2531         https://bugs.webkit.org/show_bug.cgi?id=152171
2532
2533         Reviewed by Darin Adler.
2534
2535         Reintroducing JSBuiltinConstructor keyword as a way to run automatically a JS builtin initialization function
2536         to process the arguments passed to the DOM C++ constructor.
2537
2538         Specialized createJSObject for those classes.
2539
2540         Fixing typo in TestCustomConstructor.idl.
2541
2542         Covered by binding tests.
2543
2544         * bindings/scripts/CodeGeneratorJS.pm:
2545         (GenerateConstructorDefinition):
2546         (IsConstructable):
2547         (IsJSBuiltinConstructor):
2548         (AddJSBuiltinIncludesIfNeeded):
2549         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.cpp: Added.
2550         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.h: Added.
2551         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructorPrivate.h: Added.
2552         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: Added.
2553         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: Added.
2554         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.h: Added.
2555         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.mm: Added.
2556         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructorInternal.h: Added.
2557         * bindings/scripts/test/TestClassWithJSBuiltinConstructor.idl: Copied from Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl.
2558         * bindings/scripts/test/TestCustomConstructor.idl:
2559
2560 2015-12-14  Andreas Kling  <akling@apple.com>
2561
2562         ResourceUsageOverlay should show GC timers.
2563         <https://webkit.org/b/152151>
2564
2565         Reviewed by Darin Adler.
2566
2567         Add countdowns until next Eden and Full GC to the overlay. It also shows if there
2568         is no garbage collection scheduled. This will be helpful in understanding why GC
2569         sometimes takes a very long time to happen.
2570
2571         * page/ResourceUsageOverlay.h:
2572         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2573         (WebCore::formatByteNumber): Drive-by silly math fix. :|
2574         (WebCore::gcTimerString):
2575         (WebCore::ResourceUsageOverlay::platformDraw):
2576         (WebCore::nextFireTimeForGCTimer):
2577         (WebCore::runSamplerThread):
2578
2579 2015-12-14  Chris Fleizach  <cfleizach@apple.com>
2580
2581         AX: iOS: Text field variations do not have the correct traits
2582         https://bugs.webkit.org/show_bug.cgi?id=152237
2583
2584         Reviewed by Mario Sanchez Prada.
2585
2586         Make search fields and text areas use the appropriate iOS traits to 
2587         distinguish them.
2588
2589         Test: accessibility/ios-simulator/textentry-traits.html
2590
2591         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2592         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
2593         (-[WebAccessibilityObjectWrapper _accessibilityTextEntryTraits]):
2594         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2595
2596 2015-12-14  Tim Horton  <timothy_horton@apple.com>
2597
2598         Remove some Mavericks guards in ServicesOverlayController
2599         https://bugs.webkit.org/show_bug.cgi?id=152238
2600
2601         Reviewed by Darin Adler.
2602
2603         * page/mac/ServicesOverlayController.mm:
2604         (WebCore::ServicesOverlayController::selectionRectsDidChange): Deleted.
2605         (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged): Deleted.
2606         The whole file is already PLATFORM(MAC) guarded, and the 10.9 guards
2607         are no longer necessary.
2608
2609 2015-12-14  Daniel Bates  <dabates@apple.com>
2610
2611         [iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
2612         https://bugs.webkit.org/show_bug.cgi?id=144451
2613         <rdar://problem/23099482>
2614
2615         Reviewed by Simon Fraser.
2616
2617         Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
2618         that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.
2619
2620         On iOS we only dispatch a DOM click event if the content of the page does not change as part of
2621         dispatching a DOM mousemove event at the tapped element as a means of providing a good user
2622         experience on web pages that reveal or hide content based on mouse hover. Currently we consider
2623         the content of the page to have changed if the visibility of any element on the page changes.
2624         In particular we consider the content of the page to have changed if the visibility of a user
2625         agent shadow DOM element changes (e.g. the search field cancel button). Instead we should only
2626         consider visibility changes to the actual web page content and ignore visibility changes to
2627         user agent shadow DOM elements.
2628
2629         Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
2630                fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
2631                fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
2632                fast/forms/search/search-cancel-in-formerly-invisible-element.html
2633                fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
2634                fast/forms/search/search-cancel-toggle-visibility-initially-visible.html
2635
2636         * style/StyleResolveTree.cpp:
2637         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle):
2638         Ignore visibility changes to user agent shadow DOM elements.
2639
2640 2015-12-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2641
2642         [Streams API] Directly use @then as much as possible
2643         https://bugs.webkit.org/show_bug.cgi?id=151631
2644
2645         Reviewed by Darin Adler.
2646
2647         Moved from @Promise.prototype.@then.@call(promise,...) to promise.@then.(...)
2648         for promise objects that are not exposed to user scripts.
2649
2650         Updated promiseInvokeXX stream utility functions to ensure that returned promise always has a @then.
2651         This allows improving the readability of code calling promiseInvokeXX functions.
2652         Changed invokeOrNoop to promiseInvokeOrNoopNoCatch as invokeOrNoop
2653         result is always wrapped as a promise using Promise.resolve.
2654
2655         No change in behavior.
2656
2657         * Modules/streams/ReadableStream.js:
2658         (initializeReadableStream):
2659         * Modules/streams/ReadableStreamInternals.js:
2660         (teeReadableStream):
2661         (teeReadableStreamBranch2CancelFunction):
2662         (cancelReadableStream):
2663         * Modules/streams/StreamInternals.js:
2664         (shieldingPromiseResolve): introduced this routine to ensure the returned promise has a @then property.
2665         (promiseInvokeOrNoopNoCatch):
2666         (promiseInvokeOrNoop):
2667         (promiseInvokeOrFallbackOrNoop):
2668         * Modules/streams/WritableStream.js:
2669         (initializeWritableStream):
2670         (abort):
2671         * Modules/streams/WritableStreamInternals.js:
2672         (callOrScheduleWritableStreamAdvanceQueue):
2673
2674 2015-12-14  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2675
2676         [Streams API] Expose ReadableStream and relatives to Worker
2677         https://bugs.webkit.org/show_bug.cgi?id=152066
2678
2679         Reviewed by Darin Adler.
2680
2681         Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
2682         This file should be generated by the builtin generator once refactoring is done.
2683         This code is located in JSBuiltinFunctions::initialize.
2684
2685         Moving ReadableStream private constructors and constants code from JSDOMWindowBase to JSDOMGlobalObject.
2686         Calling JSBuiltinInternalFunctions::initialize in JSDOMGlobalObject so that internals are also available in Worker.
2687
2688         Made ReadableStream and relatives exposed in Worker.
2689
2690         Patch by Youenn Fablet.
2691         Rebased and fixed style by Xabier Rodriguez Calvar.
2692
2693         Covered by rebased tests.
2694
2695         * CMakeLists.txt:
2696         * Modules/streams/ByteLengthQueuingStrategy.idl:
2697         * Modules/streams/CountQueuingStrategy.idl:
2698         * Modules/streams/ReadableStream.idl:
2699         * Modules/streams/ReadableStreamController.idl:
2700         * Modules/streams/ReadableStreamReader.idl:
2701         * WebCore.xcodeproj/project.pbxproj:
2702         * bindings/js/JSDOMGlobalObject.cpp:
2703         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2704         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2705         (WebCore::JSDOMGlobalObject::finishCreation):
2706         (WebCore::JSDOMGlobalObject::visitChildren):
2707         * bindings/js/JSDOMGlobalObject.h:
2708         * bindings/js/JSDOMWindowBase.cpp:
2709         (WebCore::JSDOMWindowBase::finishCreation): Deleted.
2710         (WebCore::JSDOMWindowBase::visitChildren): Deleted.
2711         * bindings/js/JSDOMWindowBase.h:
2712         * bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
2713         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
2714         (WebCore::JSBuiltinInternalFunctions::visit):
2715         (WebCore::JSBuiltinInternalFunctions::initialize):
2716         * bindings/js/WebCoreJSBuiltinInternals.h:
2717         * bindings/js/WebCoreJSBuiltins.h:
2718
2719 2015-12-14  Frederic Wang  <fred.wang@free.fr>
2720
2721         Move MathMLOperatorDictionary features into a separate module.
2722         https://bugs.webkit.org/show_bug.cgi?id=152242
2723
2724         Reviewed by Martin Robinson.
2725
2726         The definitions, properties and search of the MathML operator dictionary are really independent of the renderer object for math operators.
2727         This patch moves them in a separate module/file to make them more manageable and readable.
2728         No new tests. We already have sufficient test coverage.
2729
2730         * CMakeLists.txt:
2731         * WebCore.vcxproj/WebCore.vcxproj:
2732         * WebCore.vcxproj/WebCore.vcxproj.filters:
2733         * WebCore.xcodeproj/project.pbxproj:
2734         * rendering/mathml/MathMLOperatorDictionary.cpp:
2735         (WebCore::ExtractKey):
2736         (WebCore::ExtractChar):
2737         (WebCore::ExtractKeyHorizontal):
2738         (WebCore::MathMLOperatorDictionary::getEntry):
2739         (WebCore::MathMLOperatorDictionary::isVertical):
2740         * rendering/mathml/MathMLOperatorDictionary.h: Added.
2741         * rendering/mathml/RenderMathMLOperator.cpp:
2742         (WebCore::RenderMathMLOperator::setOperatorProperties):
2743         (WebCore::MathMLOperatorDictionary::ExtractKey): Deleted.
2744         (WebCore::MathMLOperatorDictionary::ExtractChar): Deleted.
2745         (WebCore::MathMLOperatorDictionary::ExtractKeyHorizontal): Deleted.
2746         * rendering/mathml/RenderMathMLOperator.h:
2747
2748 2015-12-14  Sergio Villar Senin  <svillar@igalia.com>
2749
2750         [css-grid] Fix height computation of grid items with borders
2751         https://bugs.webkit.org/show_bug.cgi?id=151800
2752
2753         Reviewed by Darin Adler.
2754
2755         When computing the logical height of grid items for the
2756         default "min-height: auto;" case we were constraning the
2757         min-content size using constrainLogicalHeightByMinMax()
2758         instead of constrainContentLogicalHeightByMinMax(). The
2759         problem of using the former is that we were adding the borders
2760         twice.
2761
2762         Test: fast/css-grid-layout/grid-item-with-border-in-intrinsic.html
2763
2764         * rendering/RenderBox.cpp:
2765         (WebCore::RenderBox::computeLogicalHeight):
2766
2767 2015-12-13  Tim Horton  <timothy_horton@apple.com>
2768
2769         Adopt CGIOSurfaceContextCreateImageReference to avoid unnecessary readback
2770         https://bugs.webkit.org/show_bug.cgi?id=150988
2771         <rdar://problem/18993594>
2772
2773         Reviewed by Darin Adler.
2774
2775         * platform/graphics/GraphicsContext.cpp:
2776         (WebCore::GraphicsContext::drawConsumingImageBuffer):
2777         * platform/graphics/GraphicsContext.h:
2778         * platform/graphics/ImageBuffer.h:
2779         * platform/graphics/cg/ImageBufferCG.cpp:
2780         (WebCore::createBitmapImageAfterScalingIfNeeded):
2781         (WebCore::ImageBuffer::copyImage):
2782         (WebCore::ImageBuffer::sinkIntoImage):
2783         (WebCore::ImageBuffer::sinkIntoNativeImage):
2784         (WebCore::ImageBuffer::drawConsuming):
2785         * platform/graphics/cocoa/IOSurface.h:
2786         * platform/graphics/cocoa/IOSurface.mm:
2787         (IOSurface::createFromImageBuffer):
2788         (IOSurface::sinkIntoImage):
2789         Add sinkIntoImage, sinkIntoNativeImage, and drawConsuming to ImageBuffer,
2790         which all consume the ImageBuffer and allow us to tell the system to
2791         make a CGImage that references the IOSurface, which is in many cases
2792         more efficient than making an image with a "copy" of the IOSurface.
2793         (The copy is done lazily, but we often hit a corner case that causes
2794         it to happen unnecessarily.)
2795
2796         * html/shadow/MediaControlElements.cpp:
2797         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2798         * page/TextIndicator.cpp:
2799         (WebCore::takeSnapshot):
2800         * platform/DragImage.cpp:
2801         (WebCore::createDragImageFromSnapshot):
2802         * platform/graphics/filters/FETile.cpp:
2803         (WebCore::FETile::platformApplySoftware):
2804         * platform/mac/ThemeMac.mm:
2805         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
2806         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2807         (WebCore::AVVideoCaptureSource::currentFrameImage):
2808         * rendering/RenderBoxModelObject.cpp:
2809         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2810         * rendering/RenderThemeMac.mm:
2811         (WebCore::RenderThemeMac::paintProgressBar):
2812         * rendering/svg/RenderSVGResourcePattern.cpp:
2813         (WebCore::RenderSVGResourcePattern::buildPattern):
2814         * svg/graphics/SVGImage.cpp:
2815         (WebCore::SVGImage::drawPatternForContainer):
2816         Adopt sinkIntoImage and drawConsumingImageBuffer in a few places.
2817
2818 2015-12-13  Andreas Kling  <akling@apple.com>
2819
2820         CachedScript could have a copy-free path for all-ASCII scripts.
2821         <https://webkit.org/b/152203>
2822
2823         Reviewed by ANtti Koivisto.
2824
2825         Many (if not most) of script resources on the web contain nothing but ASCII characters.
2826         Such resources, when streamed through a text decoder, will yield the exact same byte
2827         sequence, except in anonymous heap memory instead of delicious file-backed pages.
2828
2829         Care is taken to ensure that the wrapper StringImpl is updated to target newly cached
2830         resource data if an asynchronous caching notification comes in.
2831
2832         * loader/cache/CachedResource.cpp:
2833         (WebCore::CachedResource::tryReplaceEncodedData):
2834         * loader/cache/CachedResource.h:
2835         (WebCore::CachedResource::didReplaceSharedBufferContents):
2836         * loader/cache/CachedScript.cpp:
2837         (WebCore::encodingMayBeAllASCII):
2838         (WebCore::CachedScript::script):
2839         (WebCore::CachedScript::didReplaceSharedBufferContents):
2840         * loader/cache/CachedScript.h:
2841         * platform/SharedBuffer.h:
2842         * platform/cf/SharedBufferCF.cpp:
2843         (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer):
2844
2845 2015-12-13  Zalan Bujtas  <zalan@apple.com>
2846
2847         Clean up absolute positioned map properly.
2848         https://bugs.webkit.org/show_bug.cgi?id=152219
2849         rdar://problem/23861165
2850
2851         Reviewed by Simon Fraser.
2852
2853         We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
2854         Since this static map is at block level, (positioned)inline renderers use their containing block to store
2855         their positioned descendants.
2856         This patch ensures that when an inline element can no longer hold positioned children, we remove them from
2857         the inline's containing block's map. -unless the container itself can hold positioned renderers(see RenderElement::canContainAbsolutelyPositionedObjects).
2858
2859         Test: fast/block/positioning/crash-when-positioned-inline-has-positioned-child.html
2860
2861         * rendering/RenderInline.cpp:
2862         (WebCore::RenderInline::styleWillChange):
2863         * rendering/RenderInline.h:
2864
2865 2015-12-13  Joanmarie Diggs  <jdiggs@igalia.com>
2866
2867         AX: [EFL] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
2868         https://bugs.webkit.org/show_bug.cgi?id=152079
2869
2870         Reviewed by Chris Fleizach.
2871
2872         Map the element to WebCore AccessibilityRole DivRole for EFL. As with GTK, this
2873         is being done in the shared layer rather than in the platform layer because we
2874         want all subsequent logic to treat anonymous render block flow elements as divs.
2875
2876         No new tests. We already have sufficient test coverage. The expectations
2877         been updated accordingly.
2878
2879         * accessibility/AccessibilityRenderObject.cpp:
2880         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2881
2882 2015-12-12  Brady Eidson  <beidson@apple.com>
2883
2884         Modern IDB: storage/indexeddb/index-duplicate-keypaths.html fails.
2885         https://bugs.webkit.org/show_bug.cgi?id=152201
2886
2887         Reviewed by Alex Christensen.
2888
2889         No new tests (At least one failing test now passes).
2890         
2891         The spec states that if an object store uses a key generator, and then a record is stored whose
2892         key was an explicitly set number, then the key generator value should be bumped to the next
2893         integer higher than the explicit number.
2894         
2895         We didn't do that.
2896         
2897         Now we do.
2898
2899         * Modules/indexeddb/IndexedDB.h: Add an "OverwriteForCursor" option for overwrite mode.
2900         
2901         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2902         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate): Use the "OverwriteForCursor" mode.
2903                 
2904         * Modules/indexeddb/server/IDBBackingStore.h: Add maybeUpdateKeyGeneratorNumber
2905
2906         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2907         (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): If the number value
2908           from the provided key should bump the key generator value, do so now.
2909         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2910
2911         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2912         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): After successfully adding the new record,
2913           possibly bump the key generator value.
2914
2915 2015-12-12  Katlyn Graff  <kgraff@apple.com>
2916
2917         Safari background tabs should be fully suspended where possible.
2918         https://bugs.webkit.org/show_bug.cgi?id=150515
2919
2920         Reviewed by Ryosuke Niwa.
2921
2922         Support for tab suspension for Mac, enabled by defaults writing to WebKitTabSuspension.
2923         Page-down suspension consolidated with PageCache suspension code in Document::
2924         suspend and Document::resume. Pages canTabSuspend if cacheable, nonvisible, nonprerender,
2925         and nonactive.
2926
2927         * dom/Document.cpp: moved scrollbar handling from setInPageCache to suspend/resume
2928         (WebCore::Document::suspend): moved scrollbar, dom, animation, timer, and visual update suspending into here
2929         (WebCore::Document::resume): moved scrollbar, dom, animation, timer, and visual update resuming into here
2930         * dom/Document.h: added m_isSuspended to prevent repeat calls from PageCache/Tab Suspension contention
2931         * history/CachedFrame.cpp: moved dom, animation, and timer suspension into Document::suspend
2932         (WebCore::CachedFrame::CachedFrame):
2933        * history/PageCache.cpp: Added a few nullchecks to prevent crashes if canCacheFrame is called but document is null
2934         (WebCore::PageCache::canCacheFrame):
2935         * page/Page.cpp:
2936         (WebCore::Page::Page): Added timer to fire delayed suspension
2937         (WebCore::Page::setPageActivityState): Added a call to schedule tab suspension
2938         (WebCore::Page::setIsVisibleInternal): Added a call to schedule tab suspension
2939         (WebCore::Page::canTabSuspend): Added support for suspending if cacheable, nonvisible, nonprerender, and nonactive
2940         (WebCore::Page::setIsTabSuspended): Added a function to suspend or resume tabs
2941         (WebCore::Page::setTabSuspensionEnabled): Added support for a defaults write enable
2942         (WebCore::Page::scheduleTabSuspension): Added ability to schedule the suspension timer to fire or resume
2943         (WebCore::Page::timerFired): Added a suspension timer
2944         * page/Page.h:
2945         * page/PageThrottler.h:
2946         (WebCore::PageThrottler::activityState): Added access to m_activityState for canTabSuspend
2947
2948 2015-12-11  Simon Fraser  <simon.fraser@apple.com>
2949
2950         Mousewheel events don't work in iframes in RTL documents
2951         https://bugs.webkit.org/show_bug.cgi?id=152200
2952
2953         Reviewed by Beth Dakin.
2954         
2955         When dispatching wheel events, the testing of the event point against the
2956         non-fast scrollable region was broken in an RTL document. Fix by taking
2957         the scrollOrigin into account in ScrollingTreeFrameScrollingNode::viewToContentsOffset().
2958
2959         Test: fast/scrolling/rtl-point-in-iframe.html
2960
2961         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2962         (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset):
2963
2964 2015-12-11  Zalan Bujtas  <zalan@apple.com>
2965
2966         ASSERTION FAILED: !rect.isEmpty() in WebCore::GraphicsContext::drawRect
2967         https://bugs.webkit.org/show_bug.cgi?id=151201
2968
2969         Reviewed by Simon Fraser.
2970
2971         Drawing empty rect is a waste.
2972
2973         Test: fast/borders/empty-drawrect-assert-after-pixelsnap.html
2974
2975         * rendering/RenderElement.cpp:
2976         (WebCore::RenderElement::drawLineForBoxSide):
2977
2978 2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
2979
2980         Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
2981         https://bugs.webkit.org/show_bug.cgi?id=152102
2982         <rdar://problem/22124230>
2983
2984         Reviewed by Andy Estes.
2985
2986         Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
2987         "Content-Disposition: attachment".
2988
2989         Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
2990
2991         * dom/Document.cpp:
2992         (WebCore::Document::processReferrerPolicy):
2993         (WebCore::Document::applyContentDispositionAttachmentSandbox):
2994
2995 2015-12-11  Eric Carlson  <eric.carlson@apple.com>
2996
2997         [MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled
2998         https://bugs.webkit.org/show_bug.cgi?id=152197
2999
3000         Reviewed by Dean Jackson.
3001
3002         Test: fast/mediastream/mock-media-source.html
3003
3004         * page/Settings.cpp:
3005         (WebCore::Settings::mockCaptureDevicesEnabled):
3006         (WebCore::Settings::setMockCaptureDevicesEnabled):
3007         * page/Settings.h:
3008
3009         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
3010         (WebCore::RealtimeMediaSourceCenter::setSharedStreamCenterOverride): Renamed.
3011         (WebCore::RealtimeMediaSourceCenter::setSharedStreamCenter): Deleted.
3012         * platform/mediastream/RealtimeMediaSourceCenter.h:
3013
3014         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3015         (WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled): Renamed. Allow
3016           it to be enabled and disabled.
3017         (WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter): Deleted.
3018         * platform/mock/MockRealtimeMediaSourceCenter.h:
3019
3020         * testing/Internals.cpp:
3021         (WebCore::Internals::Internals):
3022         (WebCore::Internals::setMockMediaCaptureDevicesEnabled):
3023         * testing/Internals.h:
3024         * testing/Internals.idl:
3025
3026 2015-12-11  Jer Noble  <jer.noble@apple.com>
3027
3028         [EME] Do not pass in the initialization data to AVContentKeyRequest as the contentIdentifier.
3029         https://bugs.webkit.org/show_bug.cgi?id=152204
3030         rdar://problem/23867877
3031
3032         Reviewed by Eric Carlson.
3033
3034         The AVContentKeyRequest API has been updated to no longer require a contentId parameter if the
3035         ID can be derived from the initialization data.
3036
3037         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3038         (WebCore::CDMSessionAVContentKeySession::update):
3039
3040 2015-12-11  Alexey Proskuryakov  <ap@apple.com>
3041
3042         Roll out http://trac.webkit.org/r193984, because the new test is timing out.
3043
3044         Was: Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
3045         https://bugs.webkit.org/show_bug.cgi?id=152102
3046         <rdar://problem/22124230>
3047
3048         * dom/Document.cpp:
3049         (WebCore::Document::processReferrerPolicy):
3050         (WebCore::Document::applyContentDispositionAttachmentSandbox):
3051
3052 2015-12-11  Brady Eidson  <beidson@apple.com>
3053
3054         Modern IDB: storage/indexeddb/optional-arguments.html fails.
3055         https://bugs.webkit.org/show_bug.cgi?id=152194
3056
3057         Reviewed by Alex Christensen.
3058
3059         No new tests (At least one failing test now passes).
3060
3061         * Modules/indexeddb/client/IDBCursorImpl.cpp:
3062         (WebCore::IDBClient::IDBCursor::continueFunction): Allow 'undefined' for the key.
3063         
3064         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3065         (WebCore::IDBClient::IDBObjectStore::add): Ditto.
3066         (WebCore::IDBClient::IDBObjectStore::put): Ditto.
3067
3068 2015-12-11  Brady Eidson  <beidson@apple.com>
3069
3070         Followup to:
3071         Modern IDB: storage/indexeddb/index-count.html fails.
3072         https://bugs.webkit.org/show_bug.cgi?id=152175
3073
3074         Noticed by Darin Adler.
3075
3076         * Modules/indexeddb/client/IDBIndexImpl.cpp:
3077         (WebCore::IDBClient::IDBIndex::count): Replace a curly brace to its proper place.
3078
3079 2015-12-11  Brady Eidson  <beidson@apple.com>
3080
3081         Modern IDB: storage/indexeddb/cursor-continue.html fails.
3082         https://bugs.webkit.org/show_bug.cgi?id=152192
3083
3084         Reviewed by Alex Christensen.
3085
3086         No new tests (At least one failing test now passes).
3087
3088         * Modules/indexeddb/client/IDBCursorImpl.cpp:
3089         (WebCore::IDBClient::IDBCursor::continueFunction): Check against the current key, not the current primary key.
3090         (WebCore::IDBClient::IDBCursor::setGetResult): Also save off the current IDBKeyData.
3091         * Modules/indexeddb/client/IDBCursorImpl.h:
3092
3093 2015-12-11  Brady Eidson  <beidson@apple.com>
3094
3095         Modern IDB: storage/indexeddb/index-basics.html fails.
3096         https://bugs.webkit.org/show_bug.cgi?id=152190
3097
3098         Reviewed by Alex Christensen.
3099
3100         No new tests (At least one failing test now passes).
3101
3102         * bindings/js/JSIDBObjectStoreCustom.cpp:
3103         (WebCore::JSIDBObjectStore::createIndex): Custom error message for the TypeError
3104
3105 2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
3106
3107         Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
3108         https://bugs.webkit.org/show_bug.cgi?id=152102
3109         <rdar://problem/22124230>
3110
3111         Reviewed by Andy Estes.
3112
3113         Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
3114         "Content-Disposition: attachment".
3115
3116         Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
3117
3118         * dom/Document.cpp:
3119         (WebCore::Document::processReferrerPolicy):
3120         (WebCore::Document::applyContentDispositionAttachmentSandbox):
3121
3122 2015-12-11  Brady Eidson  <beidson@apple.com>
3123
3124         Modern IDB: storage/indexeddb/key-type-array.html fails.
3125         https://bugs.webkit.org/show_bug.cgi?id=152187
3126
3127         Reviewed by Alex Christensen.
3128
3129         No new tests (At least one failing test now passes).
3130
3131         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3132         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Perform the correct validity check on array keys.
3133
3134 2015-12-11  Joseph Pecoraro  <pecoraro@apple.com>
3135
3136         check-for-inappropriate-objc-class-names should check all class names, not just externally visible ones
3137         https://bugs.webkit.org/show_bug.cgi?id=152156
3138
3139         Reviewed by Dan Bernstein.
3140
3141         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
3142         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3143         (WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession):
3144         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
3145         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
3146         (WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession):
3147         Rename classes with a "Web" prefix.
3148
3149 2015-12-11  Brady Eidson  <beidson@apple.com>
3150
3151         Modern IDB: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html fails.
3152         https://bugs.webkit.org/show_bug.cgi?id=152177
3153
3154         Reviewed by Alex Christensen.
3155
3156         No new tests (At least one failing test now passes).
3157
3158         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3159         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionDidFinish): Renamed from below.
3160         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Deleted.
3161         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
3162         
3163         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3164         (WebCore::IDBClient::IDBRequest::setVersionChangeTransaction): OpenDBRequests usually don't have transactions, 
3165           unless they end up being upgrade requests.
3166         * Modules/indexeddb/client/IDBRequestImpl.h:
3167         
3168         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3169         (WebCore::IDBClient::IDBTransaction::IDBTransaction): Call setVersionChangeTransaction on the request if appropriate.
3170         (WebCore::IDBClient::IDBTransaction::dispatchEvent): Call versionChangeTransactionDidFinish after the 
3171           abort/complete events fire.
3172         (WebCore::IDBClient::IDBTransaction::abort): Deleted.
3173         (WebCore::IDBClient::IDBTransaction::commit): Deleted.
3174
3175 2015-12-11  Brady Eidson  <beidson@apple.com>
3176
3177         Modern IDB: storage/indexeddb/index-count.html fails.
3178         https://bugs.webkit.org/show_bug.cgi?id=152175
3179
3180         Reviewed by Alex Christensen.
3181
3182         No new tests (At least one failing test now passes).
3183
3184         * Modules/indexeddb/client/IDBIndexImpl.cpp:
3185         (WebCore::IDBClient::IDBIndex::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
3186         (WebCore::IDBClient::IDBIndex::doCount): Change an isNull check to a more correct !isValid() check.
3187
3188 2015-12-11  Per Arne Vollan  <peavo@outlook.com>
3189
3190         [WinCairo][MediaFoundation] Setting playback rate does not work.
3191         https://bugs.webkit.org/show_bug.cgi?id=152172
3192
3193         Reviewed by Brent Fulgham.
3194
3195         Implement method to set playback rate.
3196
3197         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3198         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
3199         (WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble):
3200         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
3201         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3202
3203 2015-12-11  Darin Adler  <darin@apple.com>
3204
3205         Reduce the number of events that can be created by Document.createEvent
3206         https://bugs.webkit.org/show_bug.cgi?id=151931
3207
3208         Reviewed by Alex Christensen.
3209
3210         Document.createEvent is intended for use only with a certain set of legacy events.
3211         Ideally it should only be the ones mentioned in the DOM specification.
3212
3213         For now, at least remove all the events that can't usefully be created and initialized
3214         this way. Later, we should cut it down even smaller. And stop automatically generating
3215         this, which was causing everyone who made an event IDL file to get supported here!
3216
3217         The modern alternative is to use event class constructors instead.
3218
3219         * CMakeLists.txt: Don't compile EventFactory.cpp. For now, we still generate
3220         EventFactory.cpp but we do not use it.
3221         * DerivedSources.make: Ditto.
3222         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3223         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3224         * WebCore.xcodeproj/project.pbxproj: Ditto. Also don't include EventFactory.h in the
3225         project file.
3226
3227         * dom/DOMImplementation.cpp:
3228         (WebCore::DOMImplementation::hasFeature): Added a comment about the SVGZoomEvents feature.
3229
3230         * dom/Document.cpp: Re-sorted includes and added the new ones needed for createEvent.
3231         (WebCore::Document::createEvent): Moved all the logic here from EventFactory, and
3232         took a crack at comments that explain what this should and should not be used for.
3233
3234         * dom/EventFactory.h: Removed.
3235
3236 2015-12-10  Brady Eidson  <beidson@apple.com>
3237
3238         Modern IDB: storage/indexeddb/objectstore-count.html fails.
3239         https://bugs.webkit.org/show_bug.cgi?id=152167
3240
3241         Reviewed by Alex Christensen.
3242
3243         No new tests (At least one failing test now passes).
3244
3245         * Modules/indexeddb/IDBKeyRangeData.h:
3246         (WebCore::IDBKeyRangeData::allKeys):
3247         
3248         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3249         (WebCore::IDBClient::IDBObjectStore::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
3250         (WebCore::IDBClient::IDBObjectStore::doCount): Change an isNull check to a more correct !isValid() check.
3251
3252 2015-12-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3253
3254         Binding and builtin generators should lowercase RTCXX as rtcXX and not rTCXX
3255         https://bugs.webkit.org/show_bug.cgi?id=152121
3256
3257         Reviewed by Darin Adler.
3258
3259         No change in behavior.
3260
3261         * bindings/js/JSDOMWindowBase.cpp:
3262         (WebCore::JSDOMWindowBase::finishCreation): Using rtcXX in lieu of rTCXX.
3263         * bindings/js/WebCoreJSBuiltinInternals.h:
3264         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions): Ditto.
3265         (WebCore::JSBuiltinInternalFunctions::rtcPeerConnectionInternals): Added.
3266         (WebCore::JSBuiltinInternalFunctions::visit): Ditto.
3267         (WebCore::JSBuiltinInternalFunctions::init): Ditto.
3268         (WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals): Deleted.
3269         * bindings/js/WebCoreJSBuiltins.h:
3270         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions): Using rtcXX in lieu of rTCXX.
3271         (WebCore::JSBuiltinFunctions::rtcPeerConnectionBuiltins): Added.
3272         (WebCore::JSBuiltinFunctions::rtcPeerConnectionInternalsBuiltins): Added.
3273         (WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins): Deleted.
3274         (WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins): Deleted.
3275         * bindings/scripts/CodeGenerator.pm:
3276         (WK_lcfirst): Added RTC special rule.
3277
3278 2015-12-10  Zalan Bujtas  <zalan@apple.com>
3279
3280         ASSERTION FAILED: !simpleLineLayout() in WebCore::RenderText::collectSelectionRectsForLineBoxes
3281         https://bugs.webkit.org/show_bug.cgi?id=152115
3282
3283         Reviewed by Simon Fraser.
3284
3285         document.execCommand("indent") generates a blockquote wrapper and moves the indented content inside.
3286         If the indented content is already inside a selection, we need to make sure that newly created flow uses
3287         normal line layout.
3288         This patch fixes the generic case as re-parenting an already selected renderer is not specific to document.execCommand("indent").
3289
3290         Test: fast/block/selection-inside-simple-line-layout.html
3291
3292         * rendering/SimpleLineLayout.cpp:
3293         (WebCore::SimpleLineLayout::canUseForWithReason):
3294         (WebCore::SimpleLineLayout::printReason):
3295
3296 2015-12-10  Eric Carlson  <eric.carlson@apple.com>
3297
3298         [MediaStream] Expose media capture devices persistent permissions to WebCore
3299         https://bugs.webkit.org/show_bug.cgi?id=152087
3300
3301         Reviewed by Chris Dumez.
3302
3303         No new tests, an existing test was updated to test the change.
3304
3305         * CMakeLists.txt: Add UserMediaPermissionCheck.cpp.
3306
3307         * Modules/mediastream/MediaDevicesRequest.cpp:
3308         (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the permission checker client.
3309         (WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
3310         (WebCore::MediaDevicesRequest::start): Create a permission checker and start it running.
3311         (WebCore::MediaDevicesRequest::didCompleteCheck): Start the media source checker.
3312         (WebCore::MediaDevicesRequest::didCompleteRequest): Only include a track's label if the
3313           page has permission to use a capture device.
3314         * Modules/mediastream/MediaDevicesRequest.h:
3315
3316         * Modules/mediastream/UserMediaClient.h: Include prototypes for permission checker.
3317         (WebCore::UserMediaClient::~UserMediaClient):
3318         
3319         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Removed, not longer used.
3320         * Modules/mediastream/MediaStreamTrackSourcesRequest.h:
3321
3322         * Modules/mediastream/UserMediaController.h:
3323         (WebCore::UserMediaController::checkUserMediaPermission): New.
3324         (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Ditto.
3325
3326         * Modules/mediastream/UserMediaPermissionCheck.cpp: Added.
3327         (WebCore::UserMediaPermissionCheck::create):
3328         (WebCore::UserMediaPermissionCheck::UserMediaPermissionCheck):
3329         (WebCore::UserMediaPermissionCheck::~UserMediaPermissionCheck):
3330         (WebCore::UserMediaPermissionCheck::securityOrigin):
3331         (WebCore::UserMediaPermissionCheck::contextDestroyed):
3332         (WebCore::UserMediaPermissionCheck::start):
3333         (WebCore::UserMediaPermissionCheck::setDeviceAccessMode):
3334         * Modules/mediastream/UserMediaPermissionCheck.h: Added.
3335         (WebCore::UserMediaPermissionCheckClient::~UserMediaPermissionCheckClient):
3336         (WebCore::UserMediaPermissionCheck::setClient):
3337
3338         * WebCore.xcodeproj/project.pbxproj: Add UserMediaPermissionCheck.cpp|.h
3339
3340         * platform/mock/UserMediaClientMock.h: Removed, it is no longer used.
3341
3342         * testing/Internals.cpp: Remove UserMediaClientMock.h include, it is gone.
3343
3344 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
3345
3346         Build fix
3347
3348         Unreviewed.
3349
3350         * platform/graphics/cocoa/FontCocoa.mm:
3351         (WebCore::smallCapsTrueTypeDictionary):
3352
3353 2015-12-10  Simon Fraser  <simon.fraser@apple.com>
3354
3355         Mordernize viewport dumping
3356         https://bugs.webkit.org/show_bug.cgi?id=152159
3357
3358         Reviewed by Zalan Bujtas.
3359
3360         Use groupings to simplify the viewport configuration dumping code.
3361
3362         * page/ViewportConfiguration.cpp:
3363         (WebCore::operator<<):
3364         (WebCore::ViewportConfiguration::description):
3365
3366 2015-12-10  Joseph Pecoraro  <pecoraro@apple.com>
3367
3368         Remote Inspector: Verify the identity of the other side of XPC connections
3369         https://bugs.webkit.org/show_bug.cgi?id=152153
3370
3371         Reviewed by Brian Burg.
3372
3373         * WebCore.xcodeproj/project.pbxproj:
3374         * platform/network/mac/CertificateInfoMac.mm:
3375         Use the new header.
3376
3377 2015-12-10  Brady Eidson  <beidson@apple.com>
3378
3379         Modern IDB: storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html fails
3380         https://bugs.webkit.org/show_bug.cgi?id=152144
3381
3382         Reviewed by Alex Christensen.
3383
3384         No new tests (At least two failing tests now pass, and other incorrect tests updated to be more correct).
3385
3386         - An IDBOpenDBRequest resulting in a versionchange transaction should not have the onsuccess event fire if 
3387           the database connection was closed during the versionchange transaction. onerror should fire instead.
3388         - When firing an event at an IDBRequest, it should not have the transaction as an additional target if the
3389           transaction has finished.
3390         - When firing an event at an IDBRequest, it should not have the database as an additional target if the
3391           database is closed or is closing.
3392
3393         * Modules/indexeddb/client/IDBDatabaseImpl.h:
3394         (WebCore::IDBClient::IDBDatabase::isClosingOrClosed):
3395         
3396         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3397         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
3398         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort): Deleted.
3399         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
3400         
3401         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3402         (WebCore::IDBClient::IDBRequest::dispatchEvent): Don't add finished transactions or closed databases as event targets.
3403         
3404         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3405         (WebCore::IDBClient::IDBTransaction::notifyDidAbort):
3406         (WebCore::IDBClient::IDBTransaction::dispatchEvent): If this was a versionchange transaction completing, possibly fire
3407           the error event on the OpenDBRequest instead of the success event.
3408         * Modules/indexeddb/client/IDBTransactionImpl.h:
3409         (WebCore::IDBClient::IDBTransaction::isFinished):
3410
3411 2015-12-10  Zalan Bujtas  <zalan@apple.com>
3412
3413         Simple line layout: Use TextPainter to draw simple line text.
3414         https://bugs.webkit.org/show_bug.cgi?id=152150
3415
3416         Reviewed by Simon Fraser.
3417
3418         No change in functionality.
3419
3420         * rendering/SimpleLineLayoutFunctions.cpp:
3421         (WebCore::SimpleLineLayout::paintFlow):
3422         * rendering/TextPainter.h:
3423
3424 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
3425
3426         [Font Features] r193894 introduces leaks
3427         https://bugs.webkit.org/show_bug.cgi?id=152154
3428
3429         Reviewed by Joe Pecoraro.
3430
3431         * platform/graphics/cocoa/FontCocoa.mm:
3432         (WebCore::smallCapsTrueTypeDictionary):
3433         (WebCore::createCTFontWithoutSynthesizableFeatures):
3434
3435 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
3436
3437         Build fix
3438
3439         Unreviewed.
3440
3441         * platform/graphics/cocoa/FontCocoa.mm:
3442         (WebCore::Font::variantCapsSupportsCharacterForSynthesis):
3443
3444 2015-12-10  Zalan Bujtas  <zalan@apple.com>
3445
3446         TextPainter: Add support for painting multiple text runs.
3447         https://bugs.webkit.org/show_bug.cgi?id=152148