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