Unreviewed, rolling out r194362.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-12-22  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r194362.
4         https://bugs.webkit.org/show_bug.cgi?id=152508
5
6         crashes release bot (Requested by mcatanzaro on #webkit).
7
8         Reverted changeset:
9
10         "[GTK] Everything broken in GTK+ 3.19"
11         https://bugs.webkit.org/show_bug.cgi?id=150550
12         http://trac.webkit.org/changeset/194362
13
14 2015-12-22  Keith Miller  <keith_miller@apple.com>
15
16         Remove OverridesHasInstance from TypeInfoFlags
17         https://bugs.webkit.org/show_bug.cgi?id=152005
18
19         Reviewed by Saam Barati.
20
21         Currently, we have three TypeInfo flags associated with instanceof behavior,
22         ImplementsHasInstance, ImplementDefaultHasInstance, and OverridesHasInstance. This patch
23         removes the third and moves the first to the out of line flags. In theory, we should only
24         need one flag but removing ImplementsHasInstance is more involved and should be done in a
25         separate patch.
26
27         * bindings/js/JSDOMBinding.h:
28         * bindings/scripts/CodeGeneratorJS.pm:
29         (GenerateHeader):
30
31 2015-12-22  Brent Fulgham  <bfulgham@apple.com>
32
33         Allow JavaScript to iterate over plugins for local SecurityOrigins
34         https://bugs.webkit.org/show_bug.cgi?id=152489
35
36         Reviewed by Alexey Proskuryakov.
37
38         Instead of calling 'isLocalFile' on the URL, we check the Document's SecurityOrigin. If
39         no origin exists, we construct a SecurityOrigin from the URL, and check whether it
40         satisfies 'isLocal'.
41
42         * page/Page.cpp:
43         (WebCore::Page::showAllPlugins): Revised to use SecurityOrigin.
44
45 2015-12-22  Michael Catanzaro  <mcatanzaro@igalia.com>
46
47         [GTK] Everything broken in GTK+ 3.19
48         https://bugs.webkit.org/show_bug.cgi?id=150550
49
50         Reviewed by Carlos Garcia Campos.
51
52         Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
53         stuff with modern GTK+.
54
55         No new tests. We already have tons of tests for this functionality, but we're running them
56         with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
57         GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
58         consider upgrading the GTK+ used for our layout tests.
59
60         * platform/gtk/GRefPtrGtk.cpp:
61         (WTF::refGPtr):
62         (WTF::derefGPtr):
63         * platform/gtk/GRefPtrGtk.h:
64         * platform/gtk/ScrollbarThemeGtk.cpp:
65         (WebCore::ScrollbarThemeGtk::themeChanged):
66         (WebCore::ScrollbarThemeGtk::updateThemeProperties):
67         (WebCore::orientationStyleClass):
68         (WebCore::applyScrollbarStyleContextClasses):
69         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
70         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
71         (WebCore::ScrollbarThemeGtk::paintThumb):
72         (WebCore::ScrollbarThemeGtk::paintButton):
73         * rendering/RenderThemeGtk.cpp:
74         (WebCore::createStyleContext):
75         (WebCore::setToggleSize):
76         (WebCore::paintToggle):
77         (WebCore::RenderThemeGtk::paintButton):
78         (WebCore::getComboBoxMetrics):
79         (WebCore::RenderThemeGtk::paintMenuList):
80         (WebCore::RenderThemeGtk::paintTextField):
81         (WebCore::applySliderStyleContextClasses):
82         (WebCore::RenderThemeGtk::paintSliderTrack):
83         (WebCore::RenderThemeGtk::paintSliderThumb):
84         (WebCore::RenderThemeGtk::paintProgressBar):
85         (WebCore::paintSpinArrowButton):
86         (WebCore::styleColor):
87
88 2015-12-20  Jeremy Zerfas  <WebKit@JeremyZerfas.com>
89
90         Don't allocate a NSImage and skip unneeded call to TIFFRepresentation when copying image to clipboard.
91         https://bugs.webkit.org/show_bug.cgi?id=152374
92
93         Reviewed by Darin Adler.
94
95         When copying an image to the clipboard, don't bother allocating a
96         NSImage and skip the unneeded call to TIFFRepresentation since the data
97         from the previous getTIFFRepresentation call can be used instead. This
98         considerably reduces the amount of memory and CPU time used for large
99         images/animations.
100
101         Test: fast/images/image-copy-memory-usage.html
102
103         * platform/mac/PasteboardMac.mm:
104         (WebCore::Pasteboard::write):
105
106 2015-12-20  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
107
108         Reduce PassRefPtr uses in dom - 2
109         https://bugs.webkit.org/show_bug.cgi?id=151936
110
111         Reviewed by Darin Adler.
112
113         Change PassRefPtr with RefPtr<Foo>&&, WTF::move(), Foo*, and Foo&.
114
115         * dom/ScopedEventQueue.h:
116         * dom/ScriptedAnimationController.cpp:
117         (WebCore::ScriptedAnimationController::registerCallback):
118         * dom/ScriptedAnimationController.h:
119         * dom/StaticNodeList.h:
120         * dom/Traversal.cpp:
121         (WebCore::NodeIteratorBase::NodeIteratorBase):
122         * dom/Traversal.h:
123         * dom/TreeWalker.cpp:
124         (WebCore::TreeWalker::TreeWalker):
125         (WebCore::TreeWalker::setCurrentNode):
126         * dom/TreeWalker.h:
127         (WebCore::TreeWalker::create):
128         * dom/UserActionElementSet.h:
129         * dom/WebKitNamedFlow.cpp:
130         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
131         (WebCore::WebKitNamedFlow::create):
132         (WebCore::WebKitNamedFlow::getRegionsByContent):
133         (WebCore::WebKitNamedFlow::getRegions):
134         (WebCore::WebKitNamedFlow::getContent):
135         * dom/WebKitNamedFlow.h:
136         * dom/WheelEvent.cpp:
137         (WebCore::WheelEvent::WheelEvent):
138         (WebCore::WheelEvent::initWheelEvent):
139         (WebCore::WheelEvent::initWebKitWheelEvent):
140         * dom/WheelEvent.h:
141
142 2015-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
143
144         [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
145         https://bugs.webkit.org/show_bug.cgi?id=145542
146
147         Reviewed by Darin Adler.
148
149         Perform DNS prefetch only when no proxy is configured.
150
151         No new tests. Test this manually with Wireshark. Run the simple-proxy example program found
152         in libsoup's examples directory, set that as your system HTTP proxy, and see if DNS queries
153         show up in Wireshark when refreshing a page sent over HTTP. They should appear only when the
154         proxy is not configured.
155
156         * platform/network/DNSResolveQueue.cpp:
157         (WebCore::DNSResolveQueue::DNSResolveQueue):
158         (WebCore::DNSResolveQueue::isUsingProxy):
159         * platform/network/DNSResolveQueue.h:
160         * platform/network/cf/DNSCFNet.cpp:
161         (WebCore::DNSResolveQueue::updateIsUsingProxy):
162         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
163         * platform/network/soup/DNSSoup.cpp:
164         (WebCore::didResolveProxy):
165         (WebCore::proxyResolvedForHttpUriCallback):
166         (WebCore::proxyResolvedForHttpsUriCallback):
167         (WebCore::DNSResolveQueue::updateIsUsingProxy):
168         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
169
170 2015-12-20  Dan Bernstein  <mitz@apple.com>
171
172         Remove unused setToolbarHeight
173         https://bugs.webkit.org/show_bug.cgi?id=152466
174
175         Reviewed by Darin Adler.
176
177         * inspector/InspectorFrontendClient.h:
178         * inspector/InspectorFrontendHost.cpp:
179         (WebCore::InspectorFrontendHost::setToolbarHeight): Deleted.
180         * inspector/InspectorFrontendHost.h:
181         * inspector/InspectorFrontendHost.idl:
182         * testing/Internals.cpp:
183
184 2015-12-20  Commit Queue  <commit-queue@webkit.org>
185
186         Unreviewed, rolling out r194033 and r194267.
187         https://bugs.webkit.org/show_bug.cgi?id=152465
188
189         Caused crashes on Mac WK1 bots (Requested by youenn on
190         #webkit).
191
192         Reverted changesets:
193
194         "[Streams API] Expose ReadableStream and relatives to Worker"
195         https://bugs.webkit.org/show_bug.cgi?id=152066
196         http://trac.webkit.org/changeset/194033
197
198         "[Streams API] imported/w3c/web-platform-tests/streams-api
199         /readable-streams/cancel.html has a flaky test"
200         https://bugs.webkit.org/show_bug.cgi?id=152065
201         http://trac.webkit.org/changeset/194267
202
203 2015-12-19  Dan Bernstein  <mitz@apple.com>
204
205         [Mac] WebKit contains dead source code for OS X Mavericks and earlier
206         https://bugs.webkit.org/show_bug.cgi?id=152462
207
208         Reviewed by Alexey Proskuryakov.
209
210         - Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
211           that became uniform across all OS X versions as a result:
212
213         * Configurations/DebugRelease.xcconfig:
214         * Configurations/FeatureDefines.xcconfig:
215         * Configurations/Version.xcconfig:
216
217         - Removed support for animating default buttons:
218
219         * rendering/RenderButton.cpp:
220         (WebCore::RenderButton::RenderButton): Removed m_default initialization.
221         (WebCore::RenderButton::styleDidChange): Removed checking for animating default button and
222           starting the animation timer.
223         (WebCore::RenderButton::timerFired): Deleted.
224         * rendering/RenderButton.h: Removed m_timer and m_default member variables
225         * rendering/RenderTheme.h:
226         (WebCore::RenderTheme::defaultButtonHasAnimation): Deleted.
227         * rendering/RenderThemeMac.h: Deleted override.
228         * rendering/RenderThemeMac.mm:
229         (WebCore::RenderThemeMac::defaultButtonHasAnimation): Deleted.
230
231         - Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
232           never getting compiled:
233
234         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
235         * editing/mac/DictionaryLookup.h:
236         * editing/mac/DictionaryLookup.mm:
237         * html/canvas/WebGLDrawBuffers.cpp:
238         * loader/DocumentLoader.cpp:
239         * loader/cache/CachedFont.cpp:
240         * loader/cocoa/DiskCacheMonitorCocoa.h:
241         * page/cocoa/SettingsCocoa.mm:
242         * platform/Scrollbar.cpp:
243         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
244         * platform/cocoa/NetworkExtensionContentFilter.h:
245         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
246         * platform/graphics/cg/ImageSourceCG.cpp:
247         * platform/graphics/cocoa/FontCacheCoreText.cpp:
248         * platform/graphics/cocoa/FontCascadeCocoa.mm:
249         * platform/graphics/mac/GraphicsContext3DMac.mm:
250         * platform/mac/NSScrollerImpDetails.h:
251         * platform/mac/ScrollAnimatorMac.mm:
252         * platform/mac/ScrollViewMac.mm:
253         * platform/mac/ScrollbarThemeMac.mm:
254         * platform/mac/ThemeMac.mm:
255         * platform/mac/WebCoreFullScreenPlaceholderView.h:
256         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
257         * platform/network/cf/CookieJarCFNet.cpp:
258         * platform/network/cf/ResourceRequest.h:
259         * platform/spi/cf/CFNetworkSPI.h:
260         * platform/spi/cocoa/CoreTextSPI.h:
261         * platform/spi/cocoa/NSButtonCellSPI.h:
262         * platform/spi/cocoa/NSColorSPI.h:
263         * platform/spi/cocoa/QuartzCoreSPI.h:
264         * platform/spi/mac/LookupSPI.h:
265         * platform/spi/mac/NSFontSPI.h:
266         * platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
267         * platform/spi/mac/NSPopoverSPI.h:
268         * platform/spi/mac/NSSharingServicePickerSPI.h:
269         * platform/spi/mac/NSSharingServiceSPI.h:
270         * platform/spi/mac/TUCallSPI.h:
271         * platform/sql/SQLiteDatabase.cpp:
272
273 2015-12-18  Antti Koivisto  <antti@apple.com>
274
275         Cache redirects as separate entries
276         https://bugs.webkit.org/show_bug.cgi?id=152424
277
278         Reviewed by Alex Christensen.
279
280         Test: http/tests/cache/disk-cache/disk-cache-redirect.html
281
282         * platform/network/ResourceRequestBase.h:
283
284 2015-12-18  Per Arne Vollan  <peavo@outlook.com>
285
286         [WinCairo] Empty context menu item.
287         https://bugs.webkit.org/show_bug.cgi?id=152423
288
289         Reviewed by Alex Christensen.
290
291         The context menu contains a submenu item with no text.
292
293         * page/ContextMenuController.cpp:
294         (WebCore::ContextMenuController::populate):
295
296 2015-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>
297
298         Avoid triggering clang's -Wundefined-bool-conversion
299         https://bugs.webkit.org/show_bug.cgi?id=152408
300
301         Reviewed by Mark Lam.
302
303         Remove use of ASSERT(this).
304
305         * dom/TreeScope.cpp:
306         (WebCore::TreeScope::adoptIfNeeded):
307         * page/Frame.cpp:
308         (WebCore::Frame::createView):
309
310 2015-12-18  Simon Fraser  <simon.fraser@apple.com>
311
312         Remove the 'ignoreViewportScalingConstraints' Setting, which was unused
313         https://bugs.webkit.org/show_bug.cgi?id=152435
314
315         Reviewed by Tim Horton.
316
317         r177110 added a WebCore setting called ignoreViewportScalingConstraints,
318         but it was never used, so remove it.
319
320         * page/Settings.in:
321
322 2015-12-18  Brent Fulgham  <bfulgham@apple.com>
323
324         Place an upper bound on canvas pixel count
325         https://bugs.webkit.org/show_bug.cgi?id=151825
326         <rdar://problem/23324916>
327
328         Reviewed by Simon Fraser (Relanded by Brent Fulgham)
329
330         Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
331         we will use for this purpose to some percentage of system RAM.
332
333         * html/HTMLCanvasElement.cpp:
334         (WebCore::removeFromActivePixelMemory): Added helper function
335         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
336         to ensure ImageBuffer and graphics context state are properly cleaned up.
337         (WebCore::maxActivePixels): Use one quarter of the system RAM, or 2 GB (whichever is more) as
338         an upper bound on active pixel memory.
339         (WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
340         us to exceed the allowed active pixel count, fail.
341         (WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
342         (WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
343         to handle active pixel memory counts.
344         (WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
345         exceed our available pixel memory.
346
347 2015-12-18  Olivier Blin  <olivier.blin@softathome.com>
348
349         Fix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
350         https://bugs.webkit.org/show_bug.cgi?id=152431
351
352         Since r192953, HTMLSourceElement is built even if video is disabled,
353         since it is used by the picture element.
354
355         But build was broken with -no-video, since HTMLMediaElement usage
356         should be guarded by VIDEO guards, and its JS bindings were still
357         under a video conditional.
358
359         Reviewed by Alex Christensen.
360
361         No new tests, build fix only.
362
363         * html/HTMLSourceElement.cpp:
364         (WebCore::HTMLSourceElement::insertedInto):
365         (WebCore::HTMLSourceElement::removedFrom):
366         * html/HTMLSourceElement.idl:
367
368 2015-12-18  Brady Eidson  <beidson@apple.com>
369
370         Modern IDB: Refactor when opening the backing store takes place.
371         https://bugs.webkit.org/show_bug.cgi?id=152405
372
373         Reviewed by Alex Christensen.
374
375         No new tests (At least one failing test now passes).
376
377         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
378         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
379           from here to performCurrentOpenOperation.
380         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
381           not open yet, kick off opening it here.
382         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
383
384 2015-12-17  Brady Eidson  <beidson@apple.com>
385
386         Modern IDB: Refactor open/delete requests to exist in the same queue.
387         https://bugs.webkit.org/show_bug.cgi?id=152397
388
389         Reviewed by Alex Christensen.
390
391         No new tests (Refactor, all existing tests continue to pass).
392
393         The order between incoming open and delete requests matters, and each request
394         needs to be handled individually.
395         
396         This patch does the above without changing behavior on existing passing tests,
397         while moving many currently skipped tests closer to passing.
398     
399         * Modules/indexeddb/server/IDBServerOperation.cpp:
400         (WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
401         (WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
402         * Modules/indexeddb/server/IDBServerOperation.h:
403         (WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):
404
405         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
406         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
407         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
408         (WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
409         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
410         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
411         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
412         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
413         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
414         (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
415         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
416         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
417         * Modules/indexeddb/server/UniqueIDBDatabase.h:
418
419 2015-12-17  Csaba Osztrogonác  <ossy@webkit.org>
420
421         [EFL] edje shouldn't have verbose output
422         https://bugs.webkit.org/show_bug.cgi?id=152381
423
424         Reviewed by Gyuyoung Kim.
425
426         * platform/efl/DefaultTheme/CMakeLists.txt:
427
428 2015-12-17  Commit Queue  <commit-queue@webkit.org>
429
430         Unreviewed, rolling out r194241 and r194252.
431         https://bugs.webkit.org/show_bug.cgi?id=152415
432
433         Caused crashes on GuardMalloc (Requested by ap on #webkit).
434
435         Reverted changesets:
436
437         "Modern IDB: Refactor open/delete requests to exist in the
438         same queue."
439         https://bugs.webkit.org/show_bug.cgi?id=152397
440         http://trac.webkit.org/changeset/194241
441
442         "Modern IDB: Refactor when opening the backing store takes
443         place."
444         https://bugs.webkit.org/show_bug.cgi?id=152405
445         http://trac.webkit.org/changeset/194252
446
447 2015-12-17  Brady Eidson  <beidson@apple.com>
448
449         Modern IDB: Refactor when opening the backing store takes place.
450         https://bugs.webkit.org/show_bug.cgi?id=152405
451
452         Reviewed by Alex Christensen.
453
454         No new tests (At least one failing test now passes).
455
456         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
457         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
458           from here to performCurrentOpenOperation.
459         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
460           not open yet, kick off opening it here.
461         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
462
463 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
464
465         ViewportConfiguration functions should return a bool to say if anything changed
466         https://bugs.webkit.org/show_bug.cgi?id=152353
467
468         Reviewed by Tim Horton.
469
470         Rather than callers all checking whether setting ViewportConfiguration values
471         changes state, have its functions return a bool if the values change.
472
473         * page/ViewportConfiguration.cpp:
474         (WebCore::ViewportConfiguration::setContentsSize):
475         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
476         (WebCore::ViewportConfiguration::setViewportArguments):
477         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
478         * page/ViewportConfiguration.h:
479         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): Deleted.
480
481 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
482
483         Web Inspector: Add JSContext Script Profiling
484         https://bugs.webkit.org/show_bug.cgi?id=151899
485
486         Reviewed by Brian Burg.
487
488         Tests: inspector/script-profiler/event-type-API.html
489                inspector/script-profiler/event-type-Microtask.html
490                inspector/script-profiler/tracking.html
491
492         * ForwardingHeaders/inspector/agents/InspectorScriptProfilerAgent.h: Added.
493
494         * inspector/InspectorController.h:
495         * inspector/InspectorController.cpp:
496         (WebCore::InspectorController::InspectorController):
497         Create the new agent, even if we don't use it yet for Page inspection.
498
499         (WebCore::InspectorController::willCallInjectedScriptFunction): Deleted.
500         (WebCore::InspectorController::didCallInjectedScriptFunction): Deleted.
501         No longer needed, implementation was pushed up into InjectedScriptBase.
502
503         * inspector/InspectorCSSAgent.cpp:
504         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
505         * inspector/InspectorReplayAgent.cpp:
506         (WebCore::buildInspectorObjectForSession):
507         Disambiguate types.
508
509 2015-12-17  Brady Eidson  <beidson@apple.com>
510
511         Modern IDB: Refactor open/delete requests to exist in the same queue.
512         https://bugs.webkit.org/show_bug.cgi?id=152397
513
514         Reviewed by Alex Christensen.
515
516         No new tests (Refactor, all existing tests continue to pass).
517
518         The order between incoming open and delete requests matters, and each request
519         needs to be handled individually.
520         
521         This patch does the above without changing behavior on existing passing tests,
522         while moving many currently skipped tests closer to passing.
523     
524         * Modules/indexeddb/server/IDBServerOperation.cpp:
525         (WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
526         (WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
527         * Modules/indexeddb/server/IDBServerOperation.h:
528         (WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):
529
530         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
531         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
532         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
533         (WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
534         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
535         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
536         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
537         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
538         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
539         (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
540         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
541         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
542         * Modules/indexeddb/server/UniqueIDBDatabase.h:
543
544 2015-12-17  Brent Fulgham  <bfulgham@apple.com>
545
546         [Win] Prevent flashing/strobing repaints on certain hardware
547         https://bugs.webkit.org/show_bug.cgi?id=152394
548         <rdar://problem/23875302>
549
550         Reviewed by Simon Fraser.
551
552         This patch reverts a change I made in r192166, where I always set the
553         m_viewNeedsUpdate flag to true when a 'flushContext' call was made. Instead,
554         we should go back to letting the view decide when it needs to paint.
555
556         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
557         (WebCore::WKCACFViewLayerTreeHost::flushContext): Don't just claim that
558         the view needs to be updated any time we are asked to flush. 
559
560 2015-12-17  Per Arne Vollan  <peavo@outlook.com>
561
562         [WinCairo][MediaFoundation] Release Direct3D swap chain object earlier.
563         https://bugs.webkit.org/show_bug.cgi?id=152392
564
565         Reviewed by Alex Christensen.
566
567         Since we don't use the swap chain object to render the video to a window,
568         but render frames to Cairo bitmaps, we can let go of the swap chain object
569         earlier than we currently do. 
570
571         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
572         (WebCore::clearDesiredSampleTime):
573         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):
574
575 2015-12-17  Commit Queue  <commit-queue@webkit.org>
576
577         Unreviewed, rolling out r194201.
578         https://bugs.webkit.org/show_bug.cgi?id=152391
579
580         Caused crashes with GuardMalloc (Requested by ap|away on
581         #webkit).
582
583         Reverted changeset:
584
585         "Reduce PassRefPtr uses in dom - 2"
586         https://bugs.webkit.org/show_bug.cgi?id=151936
587         http://trac.webkit.org/changeset/194201
588
589 2015-12-17  Csaba Osztrogonác  <ossy@webkit.org>
590
591         Fix unused parameter handling in WebGLRenderingContextBase.cp
592         https://bugs.webkit.org/show_bug.cgi?id=152387
593
594         Reviewed by Alex Christensen.
595
596         * html/canvas/WebGLRenderingContextBase.cpp:
597         (WebCore::WebGLRenderingContextBase::activeTexture):
598         (WebCore::WebGLRenderingContextBase::attachShader):
599         (WebCore::WebGLRenderingContextBase::bindAttribLocation):
600         (WebCore::WebGLRenderingContextBase::bindBuffer):
601         (WebCore::WebGLRenderingContextBase::bindFramebuffer):
602         (WebCore::WebGLRenderingContextBase::bindRenderbuffer):
603         (WebCore::WebGLRenderingContextBase::bindTexture):
604         (WebCore::WebGLRenderingContextBase::bufferData):
605         (WebCore::WebGLRenderingContextBase::bufferSubData):
606         (WebCore::WebGLRenderingContextBase::compileShader):
607         (WebCore::WebGLRenderingContextBase::createShader):
608         (WebCore::WebGLRenderingContextBase::detachShader):
609         (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
610         (WebCore::WebGLRenderingContextBase::drawArrays):
611         (WebCore::WebGLRenderingContextBase::drawElements):
612         (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
613         (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
614         (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
615         (WebCore::WebGLRenderingContextBase::getActiveAttrib):
616         (WebCore::WebGLRenderingContextBase::getActiveUniform):
617         (WebCore::WebGLRenderingContextBase::getAttachedShaders):
618         (WebCore::WebGLRenderingContextBase::getBufferParameter):
619         (WebCore::WebGLRenderingContextBase::getProgramParameter):
620         (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
621         (WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
622         (WebCore::WebGLRenderingContextBase::getShaderParameter):
623         (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
624         (WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
625         (WebCore::WebGLRenderingContextBase::getShaderSource):
626         (WebCore::WebGLRenderingContextBase::getTexParameter):
627         (WebCore::WebGLRenderingContextBase::getUniform):
628         (WebCore::WebGLRenderingContextBase::getUniformLocation):
629         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
630         (WebCore::WebGLRenderingContextBase::linkProgram):
631         (WebCore::WebGLRenderingContextBase::shaderSource):
632         (WebCore::WebGLRenderingContextBase::uniform1f):
633         (WebCore::WebGLRenderingContextBase::uniform1fv):
634         (WebCore::WebGLRenderingContextBase::uniform1i):
635         (WebCore::WebGLRenderingContextBase::uniform1iv):
636         (WebCore::WebGLRenderingContextBase::uniform2f):
637         (WebCore::WebGLRenderingContextBase::uniform2fv):
638         (WebCore::WebGLRenderingContextBase::uniform2i):
639         (WebCore::WebGLRenderingContextBase::uniform2iv):
640         (WebCore::WebGLRenderingContextBase::uniform3f):
641         (WebCore::WebGLRenderingContextBase::uniform3fv):
642         (WebCore::WebGLRenderingContextBase::uniform3i):
643         (WebCore::WebGLRenderingContextBase::uniform3iv):
644         (WebCore::WebGLRenderingContextBase::uniform4f):
645         (WebCore::WebGLRenderingContextBase::uniform4fv):
646         (WebCore::WebGLRenderingContextBase::uniform4i):
647         (WebCore::WebGLRenderingContextBase::uniform4iv):
648         (WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
649         (WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
650         (WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
651         (WebCore::WebGLRenderingContextBase::useProgram):
652         (WebCore::WebGLRenderingContextBase::validateProgram):
653         (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
654
655 2015-12-16  Alex Christensen  <achristensen@webkit.org>
656
657         Make SessionID use intHash
658         https://bugs.webkit.org/show_bug.cgi?id=152356
659
660         Reviewed by Darin Adler.
661
662         * page/SessionID.h:
663         (WTF::SessionIDHash::hash):
664         (WTF::SessionIDHash::equal):
665         (WTF::HashTraits<WebCore::SessionID>::emptyValue):
666         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
667         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
668         Use intHash instead of just casting a uint64_t to an unsigned.
669         This reduces hash collisions in HashTables that are usually quite small so it isn't much of a problem.
670         Also, needsDestruction hasn't been in HashTraits since r156507.
671
672 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
673
674         Fix the debug region overlays for RTL documents
675         https://bugs.webkit.org/show_bug.cgi?id=152372
676
677         Reviewed by Darin Adler.
678         
679         Fix document overlays to use document coordinates when painting, which requires
680         translating the CTM, and counter-translating the dirtyRect by the scroll origin.
681         This is only non-zero for RTL documents.
682         
683         While doing this, I noticed that the scroll origin was misplaced by the scrollbar
684         width when using overlay scrollbars. Fix by using occupiedWidth/Height() in
685         ScrollView::updateScrollbars(). I was not able to make a test for this change.
686
687         * page/FrameView.cpp:
688         (WebCore::FrameView::adjustViewSize):
689         * page/PageOverlay.cpp:
690         (WebCore::PageOverlay::drawRect):
691         * platform/ScrollView.cpp:
692         (WebCore::ScrollView::updateScrollbars):
693
694 2015-12-16  Andy Estes  <aestes@apple.com>
695
696         [iOS] Block loading external stylesheets in the Content-Disposition: attachment sandbox
697         https://bugs.webkit.org/show_bug.cgi?id=152375
698         <rdar://problem/22020902>
699
700         Reviewed by Darin Adler.
701
702         Tests: http/tests/contentdispositionattachmentsandbox/at-import-stylesheets-disabled.html
703                http/tests/contentdispositionattachmentsandbox/external-stylesheets-disabled.html
704                http/tests/contentdispositionattachmentsandbox/xml-stylesheet-processing-instructions-disabled.html
705
706         * loader/cache/CachedResourceLoader.cpp:
707         (WebCore::CachedResourceLoader::canRequest): Moved handling of CachedResource::MainResource to canRequestInContentDispositionAttachmentSandbox().
708         (WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox): In addition to handling CachedResource::MainResource,
709         added handling for CachedResource::CSSStyleSheet. Added a FIXME asking whether we should handle other types of resources, too.
710         * loader/cache/CachedResourceLoader.h:
711
712 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
713
714         ViewportConfiguration functions should return a bool to say if anything changed
715         https://bugs.webkit.org/show_bug.cgi?id=152353
716
717         Reviewed by Tim Horton.
718
719         Rather than callers all checking whether setting ViewportConfiguration values
720         changes state, have its functions return a bool if the values change.
721
722         * page/ViewportConfiguration.cpp:
723         (WebCore::ViewportConfiguration::setContentsSize):
724         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
725         (WebCore::ViewportConfiguration::setViewportArguments):
726         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
727         * page/ViewportConfiguration.h:
728         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): Deleted.
729
730 2015-12-16  Andreas Kling  <akling@apple.com>
731
732         Give kernel VM some hints about non-live memory-cached resources.
733         <https://webkit.org/b/152362>
734
735         Reviewed by Geoffrey Garen.
736
737         When a file-backed CachedResource has no live clients left, and is only being kept alive
738         because it's cached in the MemoryCache, give the OS a hint that we probably won't need
739         that memory very soon.
740
741         Normally this doesn't do anything, but in case the system comes under memory pressure,
742         the kernel can prioritize eviction of such clean-but-unneeded pages, which prevents us
743         from throwing other processes under the bus too soon.
744
745         * loader/cache/CachedResource.cpp:
746         (WebCore::CachedResource::deleteIfPossible):
747         * platform/SharedBuffer.cpp:
748         (WebCore::SharedBuffer::hintMemoryNotNeededSoon):
749         * platform/SharedBuffer.h:
750         * platform/cf/SharedBufferCF.cpp:
751         (WebCore::SharedBuffer::hintMemoryNotNeededSoon):
752
753 2015-12-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
754
755         Reduce PassRefPtr uses in dom - 2
756         https://bugs.webkit.org/show_bug.cgi?id=151936
757
758         Reviewed by Darin Adler.
759
760         Change PassRefPtr with RefPtr<Foo>&&, WTF::move(), Foo*, and Foo&.
761
762         * dom/ScopedEventQueue.h:
763         * dom/ScriptedAnimationController.cpp:
764         (WebCore::ScriptedAnimationController::registerCallback):
765         * dom/ScriptedAnimationController.h:
766         * dom/StaticNodeList.h:
767         * dom/Traversal.cpp:
768         (WebCore::NodeIteratorBase::NodeIteratorBase):
769         * dom/Traversal.h:
770         * dom/TreeWalker.cpp:
771         (WebCore::TreeWalker::TreeWalker):
772         (WebCore::TreeWalker::setCurrentNode):
773         * dom/TreeWalker.h:
774         (WebCore::TreeWalker::create):
775         * dom/UserActionElementSet.h:
776         * dom/WebKitNamedFlow.cpp:
777         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
778         (WebCore::WebKitNamedFlow::create):
779         (WebCore::WebKitNamedFlow::getRegionsByContent):
780         (WebCore::WebKitNamedFlow::getRegions):
781         (WebCore::WebKitNamedFlow::getContent):
782         * dom/WebKitNamedFlow.h:
783         * dom/WheelEvent.cpp:
784         (WebCore::WheelEvent::WheelEvent):
785         (WebCore::WheelEvent::initWheelEvent):
786         (WebCore::WheelEvent::initWebKitWheelEvent):
787         * dom/WheelEvent.h:
788
789 2015-12-16  Simon Fraser  <simon.fraser@apple.com>
790
791         Simplify isOverlayScrollbar() logic
792         https://bugs.webkit.org/show_bug.cgi?id=152357
793
794         Reviewed by Beth Dakin.
795
796         Replace code that checks for isOverlayScrollbar() explicitly with calls to new
797         occupiedWidth()/occupiedHeight() functions on Scrollbar, which do the overlay
798         scrollbar check internally.
799         
800         Add ScrollableArea::scrollbarIntrusion() which returns an IntSize with the occupiedWidth
801         and occupiedHeight of any scrollbars, and use it in a few places.
802
803         * page/FrameView.cpp:
804         (WebCore::FrameView::autoSizeIfEnabled):
805         * platform/ScrollView.cpp:
806         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
807         (WebCore::ScrollView::calculateOverhangAreasForPainting):
808         * platform/ScrollableArea.cpp:
809         (WebCore::ScrollableArea::scrollbarIntrusion):
810         (WebCore::ScrollableArea::visibleContentRectInternal):
811         * platform/ScrollableArea.h:
812         * platform/Scrollbar.cpp:
813         (WebCore::Scrollbar::occupiedWidth):
814         (WebCore::Scrollbar::occupiedHeight):
815         * platform/Scrollbar.h:
816         * rendering/RenderLayer.cpp:
817         (WebCore::RenderLayer::visibleContentRectInternal):
818         * rendering/RenderListBox.cpp:
819         (WebCore::RenderListBox::verticalScrollbarWidth):
820
821 2015-12-16  Alex Christensen  <achristensen@webkit.org>
822
823         Fix internal Windows build
824         https://bugs.webkit.org/show_bug.cgi?id=152364
825         rdar://problem/23928759
826
827         Reviewed by Tim Horton.
828
829         * WebCore.vcxproj/WebCore.proj:
830
831 2015-12-16  Brady Eidson  <beidson@apple.com>
832
833         Modern IDB: Refactor UniqueIDBDatabase in preparation for consolidation open and delete requests.
834         https://bugs.webkit.org/show_bug.cgi?id=152355
835
836         Reviewed by Alex Christensen.
837
838         No new tests (Refactor, existing tests pass).
839
840         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
841         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
842         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
843         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
844         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
845         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
846         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
847         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
848         * Modules/indexeddb/server/UniqueIDBDatabase.h:
849
850 2015-12-16  Brady Eidson  <beidson@apple.com>
851
852         Modern IDB: Have IDBServerOperations know whether they represent an open or delete request.
853         https://bugs.webkit.org/show_bug.cgi?id=152351
854
855         Reviewed by Alex Christensen.
856
857         No new tests (Refactor, existing tests pass).
858
859         * Modules/indexeddb/IndexedDB.h:
860         
861         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
862         (WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
863         (WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
864         (WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
865         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
866         
867         * Modules/indexeddb/client/IDBRequestImpl.h:
868         (WebCore::IDBClient::IDBRequest::requestType):
869         
870         * Modules/indexeddb/server/IDBServerOperation.cpp:
871         (WebCore::IDBServer::IDBServerOperation::isOpenRequest):
872         (WebCore::IDBServer::IDBServerOperation::isDeleteRequest):
873         * Modules/indexeddb/server/IDBServerOperation.h:
874         
875         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
876         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
877         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
878         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
879         (WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
880         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
881         * Modules/indexeddb/server/UniqueIDBDatabase.h:
882         
883         * Modules/indexeddb/shared/IDBRequestData.cpp:
884         (WebCore::IDBRequestData::IDBRequestData):
885         * Modules/indexeddb/shared/IDBRequestData.h:
886         (WebCore::IDBRequestData::isOpenRequest):
887         (WebCore::IDBRequestData::isDeleteRequest):
888
889 2015-12-16  Alex Christensen  <achristensen@webkit.org>
890
891         Build fix after r194156.
892
893         * platform/network/cf/ResourceHandleCFNet.cpp:
894         (WebCore::ResourceHandle::createCFURLConnection):
895
896 2015-12-16  Brady Eidson  <beidson@apple.com>
897
898         Modern IDB: Combine handling open requests, delete requests, and transactions into one timer.
899         https://bugs.webkit.org/show_bug.cgi?id=152344
900
901         Reviewed by Alex Christensen.
902
903         No new tests (Refactor, existing tests pass).
904
905         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
906         (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
907         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
908         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
909         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
910         (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
911         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
912         (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
913         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
914         (WebCore::IDBServer::UniqueIDBDatabase::invokeDeleteOrRunTransactionTimer): Deleted.
915         (WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired): Deleted.
916         * Modules/indexeddb/server/UniqueIDBDatabase.h:
917
918 2015-12-16  Alex Christensen  <achristensen@webkit.org>
919
920         Build fix after r194156.
921
922         * platform/network/cf/ResourceHandleCFNet.cpp:
923         * platform/network/mac/ResourceHandleMac.mm:
924         Include definition of _TimingDataOptionsEnableW3CNavigationTiming
925
926 2015-12-16  Alex Christensen  <achristensen@webkit.org>
927
928         Implement Web Timing when using NETWORK_SESSION
929         https://bugs.webkit.org/show_bug.cgi?id=152285
930
931         Reviewed by Darin Adler.
932
933         Covered by existing tests.
934
935         * WebCore.xcodeproj/project.pbxproj:
936         * platform/network/ResourceHandle.h:
937         * platform/network/ResourceLoadTiming.h:
938         (WebCore::ResourceLoadTiming::encode):
939         Moved setCollectsTimingData from ResourceHandle to ResourceLoadTiming.h to be shared 
940         with WebKit2 when using NETWORK_SESSION, which does not use ResourceHandle.
941         Also moved getConnectionTimingData to copyTimingData in ResourceLoadTiming for the same reason.
942         * platform/network/cf/ResourceHandleCFNet.cpp:
943         (WebCore::ResourceHandle::createCFURLConnection):
944         (WebCore::ResourceHandle::start):
945         Use the proper definition of _TimingDataOptionsEnableW3CNavigationTiming.
946         * platform/network/cocoa/ResourceLoadTiming.mm: Added.
947         (WebCore::timingValue):
948         (WebCore::copyTimingData):
949         Moved from getConnectionTimingData, and use objectForKey instead of valueForKey,
950         and check to see if there is no object in the dictionary with the given key.
951         This should never happen with the current CFNetwork implementation, but it's good to check dictionaries.
952         (WebCore::setCollectsTimingData):
953         Use _collectTimingDataWithOptions, which should be a slight performance improvement on Mavericks
954         because we are not collecting unused timing data. Hooray!
955         * platform/network/mac/ResourceHandleMac.mm:
956         (WebCore::ResourceHandle::createNSURLConnection):
957         (WebCore::ResourceHandle::getConnectionTimingData):
958         (WebCore::ResourceHandle::setCollectsTimingData): Deleted.
959         * platform/spi/cf/CFNetworkSPI.h:
960         * platform/spi/cocoa/NSURLConnectionSPI.h:
961         Moved definitions of SPI to proper SPI headers.
962
963 2015-12-16  Beth Dakin  <bdakin@apple.com>
964
965         Legacy style scrollbars do not change color when you mouse over them if you 
966         are scrolled
967         https://bugs.webkit.org/show_bug.cgi?id=152319
968         -and corresponding-
969         rdar://problem/23317668
970
971         Reviewed by Darin Adler.
972
973         The scrollbar’s frameRect is in window coordinates, so we need to compare a 
974         point in window coordinates when we test this.
975
976         The call to convertFromContainingWindow does not return a point in view 
977         coordinates, so we should not call the variable viewPoint. We do still need 
978         to call it for subframes. convertFromContainingWindow doesn’t do anything for 
979         the root ScrollView (for Mac WK2 at least).
980         * platform/ScrollView.cpp:
981         (WebCore::ScrollView::scrollbarAtPoint):
982
983         HitTestLocation is in contents coordinates. It needs to be converted to 
984         window coordinates
985         * rendering/RenderView.cpp:
986         (WebCore::RenderView::hitTest):
987
988 2015-12-08  Sergio Villar Senin  <svillar@igalia.com>
989
990         Fix computation of min|max-content contribution of non-replaced blocks
991         https://bugs.webkit.org/show_bug.cgi?id=152004
992
993         Reviewed by Darin Adler.
994
995         WebKit currently always returns the min preferred logical
996         width for the min-content contribution (and the max preferred
997         logical width for the max-content contribution) for
998         non-replaced blocks. That is not correct according to specs
999         https://drafts.csswg.org/css-sizing/#block-intrinsic.
1000
1001         The min-content and max-content contributions actually depend
1002         on the computed inline size of the block:
1003         * for min-content,max-content or definite sizes: min-content
1004         and max-content contributions are the inline size plus border,
1005         margin and padding.
1006         * otherwise: min-content contribution is the min-content size
1007         and max-content contribution is the max-content size (in both
1008         cases plus border, padding and margin).
1009
1010         Tests: fast/css-intrinsic-dimensions/auto-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
1011                fast/css-intrinsic-dimensions/auto-mincontent-inlinesize-contribution-nonreplaced-blocks.html
1012                fast/css-intrinsic-dimensions/fillavailable-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
1013                fast/css-intrinsic-dimensions/fillavailable-mincontent-inlinesize-contribution-nonreplaced-blocks.html
1014                fast/css-intrinsic-dimensions/fitcontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
1015                fast/css-intrinsic-dimensions/fitcontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
1016                fast/css-intrinsic-dimensions/fixed-inlinesize-contribution-nonreplaced-blocks-1.html
1017                fast/css-intrinsic-dimensions/fixed-inlinesize-contribution-nonreplaced-blocks-2.html
1018                fast/css-intrinsic-dimensions/indefinite-percent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
1019                fast/css-intrinsic-dimensions/indefinite-percent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
1020                fast/css-intrinsic-dimensions/maxcontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
1021                fast/css-intrinsic-dimensions/maxcontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
1022                fast/css-intrinsic-dimensions/mincontent-maxcontent-inlinesize-contribution-nonreplaced-blocks.html
1023                fast/css-intrinsic-dimensions/mincontent-mincontent-inlinesize-contribution-nonreplaced-blocks.html
1024
1025         * rendering/RenderBlock.cpp:
1026         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1027
1028 2015-12-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1029
1030         [Fetch API] Add fetch API compile time flag
1031         https://bugs.webkit.org/show_bug.cgi?id=152254
1032
1033         Reviewed by Darin Adler.
1034
1035         * Configurations/FeatureDefines.xcconfig:
1036
1037 2015-12-15  Zalan Bujtas  <zalan@apple.com>
1038
1039         FontCascade cleanup: Remove ::drawSimpleText and ::drawComplexText.
1040         https://bugs.webkit.org/show_bug.cgi?id=152323
1041
1042         Reviewed by Myles C. Maxfield.
1043
1044         Platform code for ::drawComplexText() is redundant and has 
1045         no platform dependent logic. Move it all to ::drawText()
1046
1047         No change in functionality.
1048
1049         * platform/graphics/FontCascade.cpp:
1050         (WebCore::FontCascade::glyphBufferForTextRun):
1051         (WebCore::FontCascade::drawText):
1052         (WebCore::FontCascade::drawSimpleText): Deleted.
1053         * platform/graphics/FontCascade.h:
1054         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
1055         (WebCore::FontCascade::drawComplexText): Deleted.
1056         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1057         (WebCore::FontCascade::drawComplexText): Deleted.
1058         * platform/graphics/win/FontWin.cpp:
1059         (WebCore::FontCascade::drawComplexText): Deleted.
1060
1061 2015-12-15  Tim Horton  <timothy_horton@apple.com>
1062
1063         [Mac] Gesture Events should not have negative scale
1064         https://bugs.webkit.org/show_bug.cgi?id=151065
1065         <rdar://problem/23474123>
1066
1067         Reviewed by Anders Carlsson.
1068
1069         * page/EventHandler.cpp:
1070         (WebCore::EventHandler::clear):
1071         * page/EventHandler.h:
1072         Make it possible to use m_gestureInitialDiameter for Mac gesture events too.
1073
1074 2015-12-15  Timothy Horton  <timothy_horton@apple.com>
1075
1076         Try to fix the CMake build
1077
1078         * CMakeLists.txt:
1079
1080 2015-12-15  Timothy Horton  <timothy_horton@apple.com>
1081
1082         Try to fix the CMake build
1083
1084         * CMakeLists.txt:
1085
1086 2015-12-15  Tim Horton  <timothy_horton@apple.com>
1087
1088         REGRESSION (r191849): There's no yellow bouncy highlight when using Find on Page on iOS
1089         https://bugs.webkit.org/show_bug.cgi?id=152241
1090         <rdar://problem/23642574>
1091
1092         Reviewed by Simon Fraser.
1093
1094         Tests: pageoverlay/overlay-small-frame-mouse-events.html
1095                pageoverlay/overlay-small-frame-paints.html
1096
1097         * page/PageOverlay.cpp:
1098         (WebCore::PageOverlay::bounds):
1099         Revert r191849's change that made bounds() actually return the frame()
1100         if we frame is manually overriden.
1101
1102         (WebCore::PageOverlay::mouseEvent):
1103         Convert the mouse event the rest of the way into overlay coordinates (by
1104         applying the overlay's frame origin) before deciding whether to handle
1105         the event.
1106
1107         * page/PageOverlay.h:
1108
1109         * DerivedSources.make:
1110         * WebCore.xcodeproj/project.pbxproj:
1111         * testing/Internals.cpp:
1112         (WebCore::Internals::installMockPageOverlay):
1113         * testing/Internals.h:
1114         * testing/Internals.idl:
1115         * testing/MockPageOverlay.cpp: Added.
1116         (WebCore::MockPageOverlay::create):
1117         (WebCore::MockPageOverlay::MockPageOverlay):
1118         (WebCore::MockPageOverlay::setFrame):
1119         * testing/MockPageOverlay.h: Added.
1120         (WebCore::MockPageOverlay::overlay):
1121         * testing/MockPageOverlay.idl: Added.
1122         * testing/MockPageOverlayClient.cpp:
1123         (WebCore::MockPageOverlayClient::installOverlay):
1124         (WebCore::MockPageOverlayClient::uninstallAllOverlays):
1125         (WebCore::MockPageOverlayClient::pageOverlayDestroyed):
1126         (WebCore::MockPageOverlayClient::drawRect):
1127         (WebCore::MockPageOverlayClient::mouseEvent):
1128         * testing/MockPageOverlayClient.h:
1129         Make internals.installMockPageOverlay return a MockPageOverlay object so
1130         tests can manipulate their overlay. For now, expose setFrame.
1131         Also, log when MockPageOverlayClient gets asked to paint or receives a mouse event,
1132         which will show up in test output. Slightly unconventional, but very convenient.
1133
1134 2015-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
1135
1136         [Font Features] TrueType fonts trigger real features even when synthesis is applied
1137         https://bugs.webkit.org/show_bug.cgi?id=152287
1138
1139         Reviewed by Darin Adler.
1140
1141         When using a font feature that is synthesizable, and synthesis is triggered,
1142         we should make sure to turn off the original font feature. Otherwise, the
1143         feature will be applied twice on top of itself.
1144
1145         This worked for OpenType fonts, but not for TrueType fonts.
1146
1147         Tests: css3/font-variant-petite-caps-synthesis.html
1148                css3/font-variant-small-caps-synthesis.html
1149                css3/font-variant-petite-caps-synthesis-coverage.html
1150                css3/font-variant-small-caps-synthesis-coverage.html
1151
1152         * platform/graphics/cocoa/FontCocoa.mm:
1153         (WebCore::defaultSelectorForTrueTypeFeature):
1154         (WebCore::removedFeature):
1155         (WebCore::createCTFontWithoutSynthesizableFeatures):
1156
1157 2015-12-15  Per Arne Vollan  <peavo@outlook.com>
1158
1159         [WinCairo][MediaFoundation] Full screen mode is not supported.
1160         https://bugs.webkit.org/show_bug.cgi?id=152300
1161
1162         Reviewed by Darin Adler.
1163
1164         We need to let WebCore know MediaFoundation supports full screen mode.
1165
1166         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1167         (WebCore::MediaPlayerPrivateMediaFoundation::pause):
1168         (WebCore::MediaPlayerPrivateMediaFoundation::supportsFullscreen):
1169         (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
1170         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1171
1172 2015-12-15  Javier Fernandez  <jfernandez@igalia.com>
1173
1174         [css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe'
1175         https://bugs.webkit.org/show_bug.cgi?id=152251
1176
1177         Reviewed by Darin Adler.
1178
1179         The 'True' Overflow Alignment keyword is now defined in the Box Alignment
1180         specification as 'Unsafe'.
1181
1182         This patch applies the required changes in the CSS parsing logic, as well
1183         Grid Layout specific codebase, so it complies with the last version of the
1184         spec.
1185
1186         No new tests, no change in functionality.
1187
1188         * css/CSSParser.cpp:
1189         (WebCore::isAlignmentOverflowKeyword):
1190         (WebCore::CSSParser::parseItemPositionOverflowPosition):
1191         * css/CSSPrimitiveValueMappings.h:
1192         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1193         (WebCore::CSSPrimitiveValue::operator OverflowAlignment):
1194         * css/CSSValueKeywords.in:
1195         * rendering/RenderGrid.cpp:
1196         (WebCore::computeOverflowAlignmentOffset):
1197         * rendering/style/RenderStyleConstants.h:
1198
1199 2015-12-15  Zan Dobersek  <zdobersek@igalia.com>
1200
1201         [TexMap] Operate with a reference to the TextureMapper wherever possible
1202         https://bugs.webkit.org/show_bug.cgi?id=152118
1203
1204         Reviewed by Martin Robinson.
1205
1206         In most cases where used, the pointer to the TextureMapper is non-null, so it
1207         should really be a reference. The pointer is still used for the
1208         TextureMapperLayer member variable which is null until the TextureMapper object
1209         is created and set on the root layer.
1210
1211         * platform/graphics/GraphicsContext3DPrivate.cpp:
1212         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1213         * platform/graphics/GraphicsContext3DPrivate.h:
1214         * platform/graphics/cairo/ImageBufferCairo.cpp:
1215         (WebCore::ImageBufferData::paintToTextureMapper):
1216         * platform/graphics/cairo/ImageBufferDataCairo.h:
1217         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1218         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1219         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1220         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1221         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
1222         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1223         * platform/graphics/surfaces/GraphicsSurface.cpp:
1224         (WebCore::GraphicsSurface::paintToTextureMapper):
1225         * platform/graphics/surfaces/GraphicsSurface.h:
1226         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
1227         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1228         * platform/graphics/texmap/BitmapTexture.cpp:
1229         (WebCore::BitmapTexture::updateContents):
1230         * platform/graphics/texmap/BitmapTexture.h:
1231         (WebCore::BitmapTexture::applyFilters):
1232         * platform/graphics/texmap/BitmapTextureGL.cpp:
1233         (WebCore::BitmapTextureGL::applyFilters):
1234         * platform/graphics/texmap/BitmapTextureGL.h:
1235         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1236         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
1237         * platform/graphics/texmap/TextureMapperBackingStore.h:
1238         (WebCore::TextureMapperBackingStore::drawRepaintCounter):
1239         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
1240         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
1241         * platform/graphics/texmap/TextureMapperFPSCounter.h:
1242         * platform/graphics/texmap/TextureMapperLayer.cpp:
1243         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
1244         (WebCore::TextureMapperLayer::paint):
1245         (WebCore::TextureMapperLayer::paintSelf):
1246         (WebCore::TextureMapperLayer::paintSelfAndChildren):
1247         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
1248         (WebCore::TextureMapperLayer::applyMask):
1249         (WebCore::TextureMapperLayer::paintIntoSurface):
1250         (WebCore::commitSurface):
1251         (WebCore::TextureMapperLayer::paintWithIntermediateSurface):
1252         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
1253         (WebCore::TextureMapperPlatformLayer::drawBorder):
1254         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
1255         (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
1256         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
1257         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp:
1258         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
1259         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h:
1260         * platform/graphics/texmap/TextureMapperTile.cpp:
1261         (WebCore::TextureMapperTile::updateContents):
1262         (WebCore::TextureMapperTile::paint):
1263         * platform/graphics/texmap/TextureMapperTile.h:
1264         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1265         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
1266         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
1267         (WebCore::TextureMapperTiledBackingStore::drawBorder):
1268         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
1269         (WebCore::TextureMapperTiledBackingStore::updateContents):
1270         * platform/graphics/texmap/TextureMapperTiledBackingStore.h:
1271
1272 2015-12-15  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1273
1274         WebIDL generator should support the possibility for C++ classes to have a JS Builtin constructor
1275         https://bugs.webkit.org/show_bug.cgi?id=152171
1276
1277         Reviewed by Darin Adler.
1278
1279         Reintroducing JSBuiltinConstructor keyword as a way to run automatically a JS builtin initialization function
1280         to process the arguments passed to the DOM C++ constructor.
1281
1282         Specialized createJSObject for those classes.
1283
1284         Fixing typo in TestCustomConstructor.idl.
1285
1286         Covered by binding tests.
1287
1288         * bindings/scripts/CodeGeneratorJS.pm:
1289         (GenerateConstructorDefinition):
1290         (IsConstructable):
1291         (IsJSBuiltinConstructor):
1292         (AddJSBuiltinIncludesIfNeeded):
1293         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.cpp: Added.
1294         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.h: Added.
1295         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructorPrivate.h: Added.
1296         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: Added.
1297         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: Added.
1298         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.h: Added.
1299         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.mm: Added.
1300         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructorInternal.h: Added.
1301         * bindings/scripts/test/TestClassWithJSBuiltinConstructor.idl: Copied from Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl.
1302         * bindings/scripts/test/TestCustomConstructor.idl:
1303
1304 2015-12-14  Andreas Kling  <akling@apple.com>
1305
1306         ResourceUsageOverlay should show GC timers.
1307         <https://webkit.org/b/152151>
1308
1309         Reviewed by Darin Adler.
1310
1311         Add countdowns until next Eden and Full GC to the overlay. It also shows if there
1312         is no garbage collection scheduled. This will be helpful in understanding why GC
1313         sometimes takes a very long time to happen.
1314
1315         * page/ResourceUsageOverlay.h:
1316         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1317         (WebCore::formatByteNumber): Drive-by silly math fix. :|
1318         (WebCore::gcTimerString):
1319         (WebCore::ResourceUsageOverlay::platformDraw):
1320         (WebCore::nextFireTimeForGCTimer):
1321         (WebCore::runSamplerThread):
1322
1323 2015-12-14  Chris Fleizach  <cfleizach@apple.com>
1324
1325         AX: iOS: Text field variations do not have the correct traits
1326         https://bugs.webkit.org/show_bug.cgi?id=152237
1327
1328         Reviewed by Mario Sanchez Prada.
1329
1330         Make search fields and text areas use the appropriate iOS traits to 
1331         distinguish them.
1332
1333         Test: accessibility/ios-simulator/textentry-traits.html
1334
1335         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1336         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
1337         (-[WebAccessibilityObjectWrapper _accessibilityTextEntryTraits]):
1338         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
1339
1340 2015-12-14  Tim Horton  <timothy_horton@apple.com>
1341
1342         Remove some Mavericks guards in ServicesOverlayController
1343         https://bugs.webkit.org/show_bug.cgi?id=152238
1344
1345         Reviewed by Darin Adler.
1346
1347         * page/mac/ServicesOverlayController.mm:
1348         (WebCore::ServicesOverlayController::selectionRectsDidChange): Deleted.
1349         (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged): Deleted.
1350         The whole file is already PLATFORM(MAC) guarded, and the 10.9 guards
1351         are no longer necessary.
1352
1353 2015-12-14  Daniel Bates  <dabates@apple.com>
1354
1355         [iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
1356         https://bugs.webkit.org/show_bug.cgi?id=144451
1357         <rdar://problem/23099482>
1358
1359         Reviewed by Simon Fraser.
1360
1361         Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
1362         that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.
1363
1364         On iOS we only dispatch a DOM click event if the content of the page does not change as part of
1365         dispatching a DOM mousemove event at the tapped element as a means of providing a good user
1366         experience on web pages that reveal or hide content based on mouse hover. Currently we consider
1367         the content of the page to have changed if the visibility of any element on the page changes.
1368         In particular we consider the content of the page to have changed if the visibility of a user
1369         agent shadow DOM element changes (e.g. the search field cancel button). Instead we should only
1370         consider visibility changes to the actual web page content and ignore visibility changes to
1371         user agent shadow DOM elements.
1372
1373         Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
1374                fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
1375                fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
1376                fast/forms/search/search-cancel-in-formerly-invisible-element.html
1377                fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
1378                fast/forms/search/search-cancel-toggle-visibility-initially-visible.html
1379
1380         * style/StyleResolveTree.cpp:
1381         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle):
1382         Ignore visibility changes to user agent shadow DOM elements.
1383
1384 2015-12-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1385
1386         [Streams API] Directly use @then as much as possible
1387         https://bugs.webkit.org/show_bug.cgi?id=151631
1388
1389         Reviewed by Darin Adler.
1390
1391         Moved from @Promise.prototype.@then.@call(promise,...) to promise.@then.(...)
1392         for promise objects that are not exposed to user scripts.
1393
1394         Updated promiseInvokeXX stream utility functions to ensure that returned promise always has a @then.
1395         This allows improving the readability of code calling promiseInvokeXX functions.
1396         Changed invokeOrNoop to promiseInvokeOrNoopNoCatch as invokeOrNoop
1397         result is always wrapped as a promise using Promise.resolve.
1398
1399         No change in behavior.
1400
1401         * Modules/streams/ReadableStream.js:
1402         (initializeReadableStream):
1403         * Modules/streams/ReadableStreamInternals.js:
1404         (teeReadableStream):
1405         (teeReadableStreamBranch2CancelFunction):
1406         (cancelReadableStream):
1407         * Modules/streams/StreamInternals.js:
1408         (shieldingPromiseResolve): introduced this routine to ensure the returned promise has a @then property.
1409         (promiseInvokeOrNoopNoCatch):
1410         (promiseInvokeOrNoop):
1411         (promiseInvokeOrFallbackOrNoop):
1412         * Modules/streams/WritableStream.js:
1413         (initializeWritableStream):
1414         (abort):
1415         * Modules/streams/WritableStreamInternals.js:
1416         (callOrScheduleWritableStreamAdvanceQueue):
1417
1418 2015-12-14  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1419
1420         [Streams API] Expose ReadableStream and relatives to Worker
1421         https://bugs.webkit.org/show_bug.cgi?id=152066
1422
1423         Reviewed by Darin Adler.
1424
1425         Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
1426         This file should be generated by the builtin generator once refactoring is done.
1427         This code is located in JSBuiltinFunctions::initialize.
1428
1429         Moving ReadableStream private constructors and constants code from JSDOMWindowBase to JSDOMGlobalObject.
1430         Calling JSBuiltinInternalFunctions::initialize in JSDOMGlobalObject so that internals are also available in Worker.
1431
1432         Made ReadableStream and relatives exposed in Worker.
1433
1434         Patch by Youenn Fablet.
1435         Rebased and fixed style by Xabier Rodriguez Calvar.
1436
1437         Covered by rebased tests.
1438
1439         * CMakeLists.txt:
1440         * Modules/streams/ByteLengthQueuingStrategy.idl:
1441         * Modules/streams/CountQueuingStrategy.idl:
1442         * Modules/streams/ReadableStream.idl:
1443         * Modules/streams/ReadableStreamController.idl:
1444         * Modules/streams/ReadableStreamReader.idl:
1445         * WebCore.xcodeproj/project.pbxproj:
1446         * bindings/js/JSDOMGlobalObject.cpp:
1447         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1448         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
1449         (WebCore::JSDOMGlobalObject::finishCreation):
1450         (WebCore::JSDOMGlobalObject::visitChildren):
1451         * bindings/js/JSDOMGlobalObject.h:
1452         * bindings/js/JSDOMWindowBase.cpp:
1453         (WebCore::JSDOMWindowBase::finishCreation): Deleted.
1454         (WebCore::JSDOMWindowBase::visitChildren): Deleted.
1455         * bindings/js/JSDOMWindowBase.h:
1456         * bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
1457         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
1458         (WebCore::JSBuiltinInternalFunctions::visit):
1459         (WebCore::JSBuiltinInternalFunctions::initialize):
1460         * bindings/js/WebCoreJSBuiltinInternals.h:
1461         * bindings/js/WebCoreJSBuiltins.h:
1462
1463 2015-12-14  Frederic Wang  <fred.wang@free.fr>
1464
1465         Move MathMLOperatorDictionary features into a separate module.
1466         https://bugs.webkit.org/show_bug.cgi?id=152242
1467
1468         Reviewed by Martin Robinson.
1469
1470         The definitions, properties and search of the MathML operator dictionary are really independent of the renderer object for math operators.
1471         This patch moves them in a separate module/file to make them more manageable and readable.
1472         No new tests. We already have sufficient test coverage.
1473
1474         * CMakeLists.txt:
1475         * WebCore.vcxproj/WebCore.vcxproj:
1476         * WebCore.vcxproj/WebCore.vcxproj.filters:
1477         * WebCore.xcodeproj/project.pbxproj:
1478         * rendering/mathml/MathMLOperatorDictionary.cpp:
1479         (WebCore::ExtractKey):
1480         (WebCore::ExtractChar):
1481         (WebCore::ExtractKeyHorizontal):
1482         (WebCore::MathMLOperatorDictionary::getEntry):
1483         (WebCore::MathMLOperatorDictionary::isVertical):
1484         * rendering/mathml/MathMLOperatorDictionary.h: Added.
1485         * rendering/mathml/RenderMathMLOperator.cpp:
1486         (WebCore::RenderMathMLOperator::setOperatorProperties):
1487         (WebCore::MathMLOperatorDictionary::ExtractKey): Deleted.
1488         (WebCore::MathMLOperatorDictionary::ExtractChar): Deleted.
1489         (WebCore::MathMLOperatorDictionary::ExtractKeyHorizontal): Deleted.
1490         * rendering/mathml/RenderMathMLOperator.h:
1491
1492 2015-12-14  Sergio Villar Senin  <svillar@igalia.com>
1493
1494         [css-grid] Fix height computation of grid items with borders
1495         https://bugs.webkit.org/show_bug.cgi?id=151800
1496
1497         Reviewed by Darin Adler.
1498
1499         When computing the logical height of grid items for the
1500         default "min-height: auto;" case we were constraning the
1501         min-content size using constrainLogicalHeightByMinMax()
1502         instead of constrainContentLogicalHeightByMinMax(). The
1503         problem of using the former is that we were adding the borders
1504         twice.
1505
1506         Test: fast/css-grid-layout/grid-item-with-border-in-intrinsic.html
1507
1508         * rendering/RenderBox.cpp:
1509         (WebCore::RenderBox::computeLogicalHeight):
1510
1511 2015-12-13  Tim Horton  <timothy_horton@apple.com>
1512
1513         Adopt CGIOSurfaceContextCreateImageReference to avoid unnecessary readback
1514         https://bugs.webkit.org/show_bug.cgi?id=150988
1515         <rdar://problem/18993594>
1516
1517         Reviewed by Darin Adler.
1518
1519         * platform/graphics/GraphicsContext.cpp:
1520         (WebCore::GraphicsContext::drawConsumingImageBuffer):
1521         * platform/graphics/GraphicsContext.h:
1522         * platform/graphics/ImageBuffer.h:
1523         * platform/graphics/cg/ImageBufferCG.cpp:
1524         (WebCore::createBitmapImageAfterScalingIfNeeded):
1525         (WebCore::ImageBuffer::copyImage):
1526         (WebCore::ImageBuffer::sinkIntoImage):
1527         (WebCore::ImageBuffer::sinkIntoNativeImage):
1528         (WebCore::ImageBuffer::drawConsuming):
1529         * platform/graphics/cocoa/IOSurface.h:
1530         * platform/graphics/cocoa/IOSurface.mm:
1531         (IOSurface::createFromImageBuffer):
1532         (IOSurface::sinkIntoImage):
1533         Add sinkIntoImage, sinkIntoNativeImage, and drawConsuming to ImageBuffer,
1534         which all consume the ImageBuffer and allow us to tell the system to
1535         make a CGImage that references the IOSurface, which is in many cases
1536         more efficient than making an image with a "copy" of the IOSurface.
1537         (The copy is done lazily, but we often hit a corner case that causes
1538         it to happen unnecessarily.)
1539
1540         * html/shadow/MediaControlElements.cpp:
1541         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
1542         * page/TextIndicator.cpp:
1543         (WebCore::takeSnapshot):
1544         * platform/DragImage.cpp:
1545         (WebCore::createDragImageFromSnapshot):
1546         * platform/graphics/filters/FETile.cpp:
1547         (WebCore::FETile::platformApplySoftware):
1548         * platform/mac/ThemeMac.mm:
1549         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
1550         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1551         (WebCore::AVVideoCaptureSource::currentFrameImage):
1552         * rendering/RenderBoxModelObject.cpp:
1553         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1554         * rendering/RenderThemeMac.mm:
1555         (WebCore::RenderThemeMac::paintProgressBar):
1556         * rendering/svg/RenderSVGResourcePattern.cpp:
1557         (WebCore::RenderSVGResourcePattern::buildPattern):
1558         * svg/graphics/SVGImage.cpp:
1559         (WebCore::SVGImage::drawPatternForContainer):
1560         Adopt sinkIntoImage and drawConsumingImageBuffer in a few places.
1561
1562 2015-12-13  Andreas Kling  <akling@apple.com>
1563
1564         CachedScript could have a copy-free path for all-ASCII scripts.
1565         <https://webkit.org/b/152203>
1566
1567         Reviewed by ANtti Koivisto.
1568
1569         Many (if not most) of script resources on the web contain nothing but ASCII characters.
1570         Such resources, when streamed through a text decoder, will yield the exact same byte
1571         sequence, except in anonymous heap memory instead of delicious file-backed pages.
1572
1573         Care is taken to ensure that the wrapper StringImpl is updated to target newly cached
1574         resource data if an asynchronous caching notification comes in.
1575
1576         * loader/cache/CachedResource.cpp:
1577         (WebCore::CachedResource::tryReplaceEncodedData):
1578         * loader/cache/CachedResource.h:
1579         (WebCore::CachedResource::didReplaceSharedBufferContents):
1580         * loader/cache/CachedScript.cpp:
1581         (WebCore::encodingMayBeAllASCII):
1582         (WebCore::CachedScript::script):
1583         (WebCore::CachedScript::didReplaceSharedBufferContents):
1584         * loader/cache/CachedScript.h:
1585         * platform/SharedBuffer.h:
1586         * platform/cf/SharedBufferCF.cpp:
1587         (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer):
1588
1589 2015-12-13  Zalan Bujtas  <zalan@apple.com>
1590
1591         Clean up absolute positioned map properly.
1592         https://bugs.webkit.org/show_bug.cgi?id=152219
1593         rdar://problem/23861165
1594
1595         Reviewed by Simon Fraser.
1596
1597         We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
1598         Since this static map is at block level, (positioned)inline renderers use their containing block to store
1599         their positioned descendants.
1600         This patch ensures that when an inline element can no longer hold positioned children, we remove them from
1601         the inline's containing block's map. -unless the container itself can hold positioned renderers(see RenderElement::canContainAbsolutelyPositionedObjects).
1602
1603         Test: fast/block/positioning/crash-when-positioned-inline-has-positioned-child.html
1604
1605         * rendering/RenderInline.cpp:
1606         (WebCore::RenderInline::styleWillChange):
1607         * rendering/RenderInline.h:
1608
1609 2015-12-13  Joanmarie Diggs  <jdiggs@igalia.com>
1610
1611         AX: [EFL] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
1612         https://bugs.webkit.org/show_bug.cgi?id=152079
1613
1614         Reviewed by Chris Fleizach.
1615
1616         Map the element to WebCore AccessibilityRole DivRole for EFL. As with GTK, this
1617         is being done in the shared layer rather than in the platform layer because we
1618         want all subsequent logic to treat anonymous render block flow elements as divs.
1619
1620         No new tests. We already have sufficient test coverage. The expectations
1621         been updated accordingly.
1622
1623         * accessibility/AccessibilityRenderObject.cpp:
1624         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1625
1626 2015-12-12  Brady Eidson  <beidson@apple.com>
1627
1628         Modern IDB: storage/indexeddb/index-duplicate-keypaths.html fails.
1629         https://bugs.webkit.org/show_bug.cgi?id=152201
1630
1631         Reviewed by Alex Christensen.
1632
1633         No new tests (At least one failing test now passes).
1634         
1635         The spec states that if an object store uses a key generator, and then a record is stored whose
1636         key was an explicitly set number, then the key generator value should be bumped to the next
1637         integer higher than the explicit number.
1638         
1639         We didn't do that.
1640         
1641         Now we do.
1642
1643         * Modules/indexeddb/IndexedDB.h: Add an "OverwriteForCursor" option for overwrite mode.
1644         
1645         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1646         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate): Use the "OverwriteForCursor" mode.
1647                 
1648         * Modules/indexeddb/server/IDBBackingStore.h: Add maybeUpdateKeyGeneratorNumber
1649
1650         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1651         (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): If the number value
1652           from the provided key should bump the key generator value, do so now.
1653         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1654
1655         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1656         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): After successfully adding the new record,
1657           possibly bump the key generator value.
1658
1659 2015-12-12  Katlyn Graff  <kgraff@apple.com>
1660
1661         Safari background tabs should be fully suspended where possible.
1662         https://bugs.webkit.org/show_bug.cgi?id=150515
1663
1664         Reviewed by Ryosuke Niwa.
1665
1666         Support for tab suspension for Mac, enabled by defaults writing to WebKitTabSuspension.
1667         Page-down suspension consolidated with PageCache suspension code in Document::
1668         suspend and Document::resume. Pages canTabSuspend if cacheable, nonvisible, nonprerender,
1669         and nonactive.
1670
1671         * dom/Document.cpp: moved scrollbar handling from setInPageCache to suspend/resume
1672         (WebCore::Document::suspend): moved scrollbar, dom, animation, timer, and visual update suspending into here
1673         (WebCore::Document::resume): moved scrollbar, dom, animation, timer, and visual update resuming into here
1674         * dom/Document.h: added m_isSuspended to prevent repeat calls from PageCache/Tab Suspension contention
1675         * history/CachedFrame.cpp: moved dom, animation, and timer suspension into Document::suspend
1676         (WebCore::CachedFrame::CachedFrame):
1677        * history/PageCache.cpp: Added a few nullchecks to prevent crashes if canCacheFrame is called but document is null
1678         (WebCore::PageCache::canCacheFrame):
1679         * page/Page.cpp:
1680         (WebCore::Page::Page): Added timer to fire delayed suspension
1681         (WebCore::Page::setPageActivityState): Added a call to schedule tab suspension
1682         (WebCore::Page::setIsVisibleInternal): Added a call to schedule tab suspension
1683         (WebCore::Page::canTabSuspend): Added support for suspending if cacheable, nonvisible, nonprerender, and nonactive
1684         (WebCore::Page::setIsTabSuspended): Added a function to suspend or resume tabs
1685         (WebCore::Page::setTabSuspensionEnabled): Added support for a defaults write enable
1686         (WebCore::Page::scheduleTabSuspension): Added ability to schedule the suspension timer to fire or resume
1687         (WebCore::Page::timerFired): Added a suspension timer
1688         * page/Page.h:
1689         * page/PageThrottler.h:
1690         (WebCore::PageThrottler::activityState): Added access to m_activityState for canTabSuspend
1691
1692 2015-12-11  Simon Fraser  <simon.fraser@apple.com>
1693
1694         Mousewheel events don't work in iframes in RTL documents
1695         https://bugs.webkit.org/show_bug.cgi?id=152200
1696
1697         Reviewed by Beth Dakin.
1698         
1699         When dispatching wheel events, the testing of the event point against the
1700         non-fast scrollable region was broken in an RTL document. Fix by taking
1701         the scrollOrigin into account in ScrollingTreeFrameScrollingNode::viewToContentsOffset().
1702
1703         Test: fast/scrolling/rtl-point-in-iframe.html
1704
1705         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
1706         (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset):
1707
1708 2015-12-11  Zalan Bujtas  <zalan@apple.com>
1709
1710         ASSERTION FAILED: !rect.isEmpty() in WebCore::GraphicsContext::drawRect
1711         https://bugs.webkit.org/show_bug.cgi?id=151201
1712
1713         Reviewed by Simon Fraser.
1714
1715         Drawing empty rect is a waste.
1716
1717         Test: fast/borders/empty-drawrect-assert-after-pixelsnap.html
1718
1719         * rendering/RenderElement.cpp:
1720         (WebCore::RenderElement::drawLineForBoxSide):
1721
1722 2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
1723
1724         Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
1725         https://bugs.webkit.org/show_bug.cgi?id=152102
1726         <rdar://problem/22124230>
1727
1728         Reviewed by Andy Estes.
1729
1730         Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
1731         "Content-Disposition: attachment".
1732
1733         Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
1734
1735         * dom/Document.cpp:
1736         (WebCore::Document::processReferrerPolicy):
1737         (WebCore::Document::applyContentDispositionAttachmentSandbox):
1738
1739 2015-12-11  Eric Carlson  <eric.carlson@apple.com>
1740
1741         [MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled
1742         https://bugs.webkit.org/show_bug.cgi?id=152197
1743
1744         Reviewed by Dean Jackson.
1745
1746         Test: fast/mediastream/mock-media-source.html
1747
1748         * page/Settings.cpp:
1749         (WebCore::Settings::mockCaptureDevicesEnabled):
1750         (WebCore::Settings::setMockCaptureDevicesEnabled):
1751         * page/Settings.h:
1752
1753         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
1754         (WebCore::RealtimeMediaSourceCenter::setSharedStreamCenterOverride): Renamed.
1755         (WebCore::RealtimeMediaSourceCenter::setSharedStreamCenter): Deleted.
1756         * platform/mediastream/RealtimeMediaSourceCenter.h:
1757
1758         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1759         (WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled): Renamed. Allow
1760           it to be enabled and disabled.
1761         (WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter): Deleted.
1762         * platform/mock/MockRealtimeMediaSourceCenter.h:
1763
1764         * testing/Internals.cpp:
1765         (WebCore::Internals::Internals):
1766         (WebCore::Internals::setMockMediaCaptureDevicesEnabled):
1767         * testing/Internals.h:
1768         * testing/Internals.idl:
1769
1770 2015-12-11  Jer Noble  <jer.noble@apple.com>
1771
1772         [EME] Do not pass in the initialization data to AVContentKeyRequest as the contentIdentifier.
1773         https://bugs.webkit.org/show_bug.cgi?id=152204
1774         rdar://problem/23867877
1775
1776         Reviewed by Eric Carlson.
1777
1778         The AVContentKeyRequest API has been updated to no longer require a contentId parameter if the
1779         ID can be derived from the initialization data.
1780
1781         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
1782         (WebCore::CDMSessionAVContentKeySession::update):
1783
1784 2015-12-11  Alexey Proskuryakov  <ap@apple.com>
1785
1786         Roll out http://trac.webkit.org/r193984, because the new test is timing out.
1787
1788         Was: Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
1789         https://bugs.webkit.org/show_bug.cgi?id=152102
1790         <rdar://problem/22124230>
1791
1792         * dom/Document.cpp:
1793         (WebCore::Document::processReferrerPolicy):
1794         (WebCore::Document::applyContentDispositionAttachmentSandbox):
1795
1796 2015-12-11  Brady Eidson  <beidson@apple.com>
1797
1798         Modern IDB: storage/indexeddb/optional-arguments.html fails.
1799         https://bugs.webkit.org/show_bug.cgi?id=152194
1800
1801         Reviewed by Alex Christensen.
1802
1803         No new tests (At least one failing test now passes).
1804
1805         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1806         (WebCore::IDBClient::IDBCursor::continueFunction): Allow 'undefined' for the key.
1807         
1808         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1809         (WebCore::IDBClient::IDBObjectStore::add): Ditto.
1810         (WebCore::IDBClient::IDBObjectStore::put): Ditto.
1811
1812 2015-12-11  Brady Eidson  <beidson@apple.com>
1813
1814         Followup to:
1815         Modern IDB: storage/indexeddb/index-count.html fails.
1816         https://bugs.webkit.org/show_bug.cgi?id=152175
1817
1818         Noticed by Darin Adler.
1819
1820         * Modules/indexeddb/client/IDBIndexImpl.cpp:
1821         (WebCore::IDBClient::IDBIndex::count): Replace a curly brace to its proper place.
1822
1823 2015-12-11  Brady Eidson  <beidson@apple.com>
1824
1825         Modern IDB: storage/indexeddb/cursor-continue.html fails.
1826         https://bugs.webkit.org/show_bug.cgi?id=152192
1827
1828         Reviewed by Alex Christensen.
1829
1830         No new tests (At least one failing test now passes).
1831
1832         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1833         (WebCore::IDBClient::IDBCursor::continueFunction): Check against the current key, not the current primary key.
1834         (WebCore::IDBClient::IDBCursor::setGetResult): Also save off the current IDBKeyData.
1835         * Modules/indexeddb/client/IDBCursorImpl.h:
1836
1837 2015-12-11  Brady Eidson  <beidson@apple.com>
1838
1839         Modern IDB: storage/indexeddb/index-basics.html fails.
1840         https://bugs.webkit.org/show_bug.cgi?id=152190
1841
1842         Reviewed by Alex Christensen.
1843
1844         No new tests (At least one failing test now passes).
1845
1846         * bindings/js/JSIDBObjectStoreCustom.cpp:
1847         (WebCore::JSIDBObjectStore::createIndex): Custom error message for the TypeError
1848
1849 2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
1850
1851         Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
1852         https://bugs.webkit.org/show_bug.cgi?id=152102
1853         <rdar://problem/22124230>
1854
1855         Reviewed by Andy Estes.
1856
1857         Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
1858         "Content-Disposition: attachment".
1859
1860         Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
1861
1862         * dom/Document.cpp:
1863         (WebCore::Document::processReferrerPolicy):
1864         (WebCore::Document::applyContentDispositionAttachmentSandbox):
1865
1866 2015-12-11  Brady Eidson  <beidson@apple.com>
1867
1868         Modern IDB: storage/indexeddb/key-type-array.html fails.
1869         https://bugs.webkit.org/show_bug.cgi?id=152187
1870
1871         Reviewed by Alex Christensen.
1872
1873         No new tests (At least one failing test now passes).
1874
1875         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1876         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Perform the correct validity check on array keys.
1877
1878 2015-12-11  Joseph Pecoraro  <pecoraro@apple.com>
1879
1880         check-for-inappropriate-objc-class-names should check all class names, not just externally visible ones
1881         https://bugs.webkit.org/show_bug.cgi?id=152156
1882
1883         Reviewed by Dan Bernstein.
1884
1885         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
1886         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
1887         (WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession):
1888         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
1889         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1890         (WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession):
1891         Rename classes with a "Web" prefix.
1892
1893 2015-12-11  Brady Eidson  <beidson@apple.com>
1894
1895         Modern IDB: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html fails.
1896         https://bugs.webkit.org/show_bug.cgi?id=152177
1897
1898         Reviewed by Alex Christensen.
1899
1900         No new tests (At least one failing test now passes).
1901
1902         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1903         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionDidFinish): Renamed from below.
1904         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Deleted.
1905         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
1906         
1907         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1908         (WebCore::IDBClient::IDBRequest::setVersionChangeTransaction): OpenDBRequests usually don't have transactions, 
1909           unless they end up being upgrade requests.
1910         * Modules/indexeddb/client/IDBRequestImpl.h:
1911         
1912         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1913         (WebCore::IDBClient::IDBTransaction::IDBTransaction): Call setVersionChangeTransaction on the request if appropriate.
1914         (WebCore::IDBClient::IDBTransaction::dispatchEvent): Call versionChangeTransactionDidFinish after the 
1915           abort/complete events fire.
1916         (WebCore::IDBClient::IDBTransaction::abort): Deleted.
1917         (WebCore::IDBClient::IDBTransaction::commit): Deleted.
1918
1919 2015-12-11  Brady Eidson  <beidson@apple.com>
1920
1921         Modern IDB: storage/indexeddb/index-count.html fails.
1922         https://bugs.webkit.org/show_bug.cgi?id=152175
1923
1924         Reviewed by Alex Christensen.
1925
1926         No new tests (At least one failing test now passes).
1927
1928         * Modules/indexeddb/client/IDBIndexImpl.cpp:
1929         (WebCore::IDBClient::IDBIndex::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
1930         (WebCore::IDBClient::IDBIndex::doCount): Change an isNull check to a more correct !isValid() check.
1931
1932 2015-12-11  Per Arne Vollan  <peavo@outlook.com>
1933
1934         [WinCairo][MediaFoundation] Setting playback rate does not work.
1935         https://bugs.webkit.org/show_bug.cgi?id=152172
1936
1937         Reviewed by Brent Fulgham.
1938
1939         Implement method to set playback rate.
1940
1941         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1942         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
1943         (WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble):
1944         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
1945         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1946
1947 2015-12-11  Darin Adler  <darin@apple.com>
1948
1949         Reduce the number of events that can be created by Document.createEvent
1950         https://bugs.webkit.org/show_bug.cgi?id=151931
1951
1952         Reviewed by Alex Christensen.
1953
1954         Document.createEvent is intended for use only with a certain set of legacy events.
1955         Ideally it should only be the ones mentioned in the DOM specification.
1956
1957         For now, at least remove all the events that can't usefully be created and initialized
1958         this way. Later, we should cut it down even smaller. And stop automatically generating
1959         this, which was causing everyone who made an event IDL file to get supported here!
1960
1961         The modern alternative is to use event class constructors instead.
1962
1963         * CMakeLists.txt: Don't compile EventFactory.cpp. For now, we still generate
1964         EventFactory.cpp but we do not use it.
1965         * DerivedSources.make: Ditto.
1966         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1967         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1968         * WebCore.xcodeproj/project.pbxproj: Ditto. Also don't include EventFactory.h in the
1969         project file.
1970
1971         * dom/DOMImplementation.cpp:
1972         (WebCore::DOMImplementation::hasFeature): Added a comment about the SVGZoomEvents feature.
1973
1974         * dom/Document.cpp: Re-sorted includes and added the new ones needed for createEvent.
1975         (WebCore::Document::createEvent): Moved all the logic here from EventFactory, and
1976         took a crack at comments that explain what this should and should not be used for.
1977
1978         * dom/EventFactory.h: Removed.
1979
1980 2015-12-10  Brady Eidson  <beidson@apple.com>
1981
1982         Modern IDB: storage/indexeddb/objectstore-count.html fails.
1983         https://bugs.webkit.org/show_bug.cgi?id=152167
1984
1985         Reviewed by Alex Christensen.
1986
1987         No new tests (At least one failing test now passes).
1988
1989         * Modules/indexeddb/IDBKeyRangeData.h:
1990         (WebCore::IDBKeyRangeData::allKeys):
1991         
1992         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1993         (WebCore::IDBClient::IDBObjectStore::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
1994         (WebCore::IDBClient::IDBObjectStore::doCount): Change an isNull check to a more correct !isValid() check.
1995
1996 2015-12-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1997
1998         Binding and builtin generators should lowercase RTCXX as rtcXX and not rTCXX
1999         https://bugs.webkit.org/show_bug.cgi?id=152121
2000
2001         Reviewed by Darin Adler.
2002
2003         No change in behavior.
2004
2005         * bindings/js/JSDOMWindowBase.cpp:
2006         (WebCore::JSDOMWindowBase::finishCreation): Using rtcXX in lieu of rTCXX.
2007         * bindings/js/WebCoreJSBuiltinInternals.h:
2008         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions): Ditto.
2009         (WebCore::JSBuiltinInternalFunctions::rtcPeerConnectionInternals): Added.
2010         (WebCore::JSBuiltinInternalFunctions::visit): Ditto.
2011         (WebCore::JSBuiltinInternalFunctions::init): Ditto.
2012         (WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals): Deleted.
2013         * bindings/js/WebCoreJSBuiltins.h:
2014         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions): Using rtcXX in lieu of rTCXX.
2015         (WebCore::JSBuiltinFunctions::rtcPeerConnectionBuiltins): Added.
2016         (WebCore::JSBuiltinFunctions::rtcPeerConnectionInternalsBuiltins): Added.
2017         (WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins): Deleted.
2018         (WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins): Deleted.
2019         * bindings/scripts/CodeGenerator.pm:
2020         (WK_lcfirst): Added RTC special rule.
2021
2022 2015-12-10  Zalan Bujtas  <zalan@apple.com>
2023
2024         ASSERTION FAILED: !simpleLineLayout() in WebCore::RenderText::collectSelectionRectsForLineBoxes
2025         https://bugs.webkit.org/show_bug.cgi?id=152115
2026
2027         Reviewed by Simon Fraser.
2028
2029         document.execCommand("indent") generates a blockquote wrapper and moves the indented content inside.
2030         If the indented content is already inside a selection, we need to make sure that newly created flow uses
2031         normal line layout.
2032         This patch fixes the generic case as re-parenting an already selected renderer is not specific to document.execCommand("indent").
2033
2034         Test: fast/block/selection-inside-simple-line-layout.html
2035
2036         * rendering/SimpleLineLayout.cpp:
2037         (WebCore::SimpleLineLayout::canUseForWithReason):
2038         (WebCore::SimpleLineLayout::printReason):
2039
2040 2015-12-10  Eric Carlson  <eric.carlson@apple.com>
2041
2042         [MediaStream] Expose media capture devices persistent permissions to WebCore
2043         https://bugs.webkit.org/show_bug.cgi?id=152087
2044
2045         Reviewed by Chris Dumez.
2046
2047         No new tests, an existing test was updated to test the change.
2048
2049         * CMakeLists.txt: Add UserMediaPermissionCheck.cpp.
2050
2051         * Modules/mediastream/MediaDevicesRequest.cpp:
2052         (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the permission checker client.
2053         (WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
2054         (WebCore::MediaDevicesRequest::start): Create a permission checker and start it running.
2055         (WebCore::MediaDevicesRequest::didCompleteCheck): Start the media source checker.
2056         (WebCore::MediaDevicesRequest::didCompleteRequest): Only include a track's label if the
2057           page has permission to use a capture device.
2058         * Modules/mediastream/MediaDevicesRequest.h:
2059
2060         * Modules/mediastream/UserMediaClient.h: Include prototypes for permission checker.
2061         (WebCore::UserMediaClient::~UserMediaClient):
2062         
2063         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Removed, not longer used.
2064         * Modules/mediastream/MediaStreamTrackSourcesRequest.h:
2065
2066         * Modules/mediastream/UserMediaController.h:
2067         (WebCore::UserMediaController::checkUserMediaPermission): New.
2068         (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Ditto.
2069
2070         * Modules/mediastream/UserMediaPermissionCheck.cpp: Added.
2071         (WebCore::UserMediaPermissionCheck::create):
2072         (WebCore::UserMediaPermissionCheck::UserMediaPermissionCheck):
2073         (WebCore::UserMediaPermissionCheck::~UserMediaPermissionCheck):
2074         (WebCore::UserMediaPermissionCheck::securityOrigin):
2075         (WebCore::UserMediaPermissionCheck::contextDestroyed):
2076         (WebCore::UserMediaPermissionCheck::start):
2077         (WebCore::UserMediaPermissionCheck::setDeviceAccessMode):
2078         * Modules/mediastream/UserMediaPermissionCheck.h: Added.
2079         (WebCore::UserMediaPermissionCheckClient::~UserMediaPermissionCheckClient):
2080         (WebCore::UserMediaPermissionCheck::setClient):
2081
2082         * WebCore.xcodeproj/project.pbxproj: Add UserMediaPermissionCheck.cpp|.h
2083
2084         * platform/mock/UserMediaClientMock.h: Removed, it is no longer used.
2085
2086         * testing/Internals.cpp: Remove UserMediaClientMock.h include, it is gone.
2087
2088 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
2089
2090         Build fix
2091
2092         Unreviewed.
2093
2094         * platform/graphics/cocoa/FontCocoa.mm:
2095         (WebCore::smallCapsTrueTypeDictionary):
2096
2097 2015-12-10  Simon Fraser  <simon.fraser@apple.com>
2098
2099         Mordernize viewport dumping
2100         https://bugs.webkit.org/show_bug.cgi?id=152159
2101
2102         Reviewed by Zalan Bujtas.
2103
2104         Use groupings to simplify the viewport configuration dumping code.
2105
2106         * page/ViewportConfiguration.cpp:
2107         (WebCore::operator<<):
2108         (WebCore::ViewportConfiguration::description):
2109
2110 2015-12-10  Joseph Pecoraro  <pecoraro@apple.com>
2111
2112         Remote Inspector: Verify the identity of the other side of XPC connections
2113         https://bugs.webkit.org/show_bug.cgi?id=152153
2114
2115         Reviewed by Brian Burg.
2116
2117         * WebCore.xcodeproj/project.pbxproj:
2118         * platform/network/mac/CertificateInfoMac.mm:
2119         Use the new header.
2120
2121 2015-12-10  Brady Eidson  <beidson@apple.com>
2122
2123         Modern IDB: storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html fails
2124         https://bugs.webkit.org/show_bug.cgi?id=152144
2125
2126         Reviewed by Alex Christensen.
2127
2128         No new tests (At least two failing tests now pass, and other incorrect tests updated to be more correct).
2129
2130         - An IDBOpenDBRequest resulting in a versionchange transaction should not have the onsuccess event fire if 
2131           the database connection was closed during the versionchange transaction. onerror should fire instead.
2132         - When firing an event at an IDBRequest, it should not have the transaction as an additional target if the
2133           transaction has finished.
2134         - When firing an event at an IDBRequest, it should not have the database as an additional target if the
2135           database is closed or is closing.
2136
2137         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2138         (WebCore::IDBClient::IDBDatabase::isClosingOrClosed):
2139         
2140         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2141         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
2142         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort): Deleted.
2143         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
2144         
2145         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2146         (WebCore::IDBClient::IDBRequest::dispatchEvent): Don't add finished transactions or closed databases as event targets.
2147         
2148         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2149         (WebCore::IDBClient::IDBTransaction::notifyDidAbort):
2150         (WebCore::IDBClient::IDBTransaction::dispatchEvent): If this was a versionchange transaction completing, possibly fire
2151           the error event on the OpenDBRequest instead of the success event.
2152         * Modules/indexeddb/client/IDBTransactionImpl.h:
2153         (WebCore::IDBClient::IDBTransaction::isFinished):
2154
2155 2015-12-10  Zalan Bujtas  <zalan@apple.com>
2156
2157         Simple line layout: Use TextPainter to draw simple line text.
2158         https://bugs.webkit.org/show_bug.cgi?id=152150
2159
2160         Reviewed by Simon Fraser.
2161
2162         No change in functionality.
2163
2164         * rendering/SimpleLineLayoutFunctions.cpp:
2165         (WebCore::SimpleLineLayout::paintFlow):
2166         * rendering/TextPainter.h:
2167
2168 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
2169
2170         [Font Features] r193894 introduces leaks
2171         https://bugs.webkit.org/show_bug.cgi?id=152154
2172
2173         Reviewed by Joe Pecoraro.
2174
2175         * platform/graphics/cocoa/FontCocoa.mm:
2176         (WebCore::smallCapsTrueTypeDictionary):
2177         (WebCore::createCTFontWithoutSynthesizableFeatures):
2178
2179 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
2180
2181         Build fix
2182
2183         Unreviewed.
2184
2185         * platform/graphics/cocoa/FontCocoa.mm:
2186         (WebCore::Font::variantCapsSupportsCharacterForSynthesis):
2187
2188 2015-12-10  Zalan Bujtas  <zalan@apple.com>
2189
2190         TextPainter: Add support for painting multiple text runs.
2191         https://bugs.webkit.org/show_bug.cgi?id=152148
2192
2193         Reviewed by Simon Fraser.
2194
2195         This is in preparation for adding simple line layout as a client.
2196
2197         No change in functionality.
2198
2199         * rendering/InlineTextBox.cpp:
2200         (WebCore::drawSkipInkUnderline): Decouple underline skipping intersection calculation and text painter.
2201         (WebCore::InlineTextBox::paint):
2202         (WebCore::InlineTextBox::paintDecoration):
2203         * rendering/InlineTextBox.h:
2204         * rendering/TextPainter.cpp:
2205         (WebCore::TextPainter::TextPainter):
2206         (WebCore::TextPainter::paintTextWithShadows):
2207         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
2208         (WebCore::TextPainter::paintText):
2209         (WebCore::TextPainter::dashesForIntersectionsWithRect): Deleted.
2210         * rendering/TextPainter.h:
2211         (WebCore::TextPainter::setTextPaintStyle):
2212         (WebCore::TextPainter::setSelectionPaintStyle):
2213         (WebCore::TextPainter::setIsHorizontal):
2214         (WebCore::TextPainter::setFont):
2215         (WebCore::TextPainter::addEmphasis):
2216         (WebCore::TextPainter::addTextShadow):
2217
2218 2015-12-10  Enrica Casucci  <enrica@apple.com>
2219
2220         Change skin tone support for two emoji.
2221         https://bugs.webkit.org/show_bug.cgi?id=152147
2222         rdar://problem/23716993
2223         rdar://problem/23716344
2224
2225         Reviewed by Darin Adler.
2226
2227         Horse race emoji (1F3C7) should no longer have skin tone variation.
2228         Sleuth/Spy emoji (!F575) should instead have skin tone variation.
2229
2230         * platform/text/TextBreakIterator.cpp:
2231         (WebCore::cursorMovementIterator):
2232
2233 2015-12-10  Commit Queue  <commit-queue@webkit.org>
2234
2235         Unreviewed, rolling out r193500.
2236         https://bugs.webkit.org/show_bug.cgi?id=152143
2237
2238         do not want to have to disable canvas-to-large-to-draw test
2239         (Requested by bfulgham on #webkit).
2240
2241         Reverted changeset:
2242
2243         "Place an upper bound on canvas pixel count"
2244         https://bugs.webkit.org/show_bug.cgi?id=151825
2245         http://trac.webkit.org/changeset/193500
2246
2247 2015-12-10  Brady Eidson  <beidson@apple.com>
2248
2249         Followup for:
2250         Modern IDB: storage/indexeddb/intversion-close-between-events.html fails.
2251         https://bugs.webkit.org/show_bug.cgi?id=152096
2252
2253         Implementing Darin Adler's review feedback that came after the patch landed.
2254
2255         * bindings/js/JSIDBDatabaseCustom.cpp:
2256         (WebCore::JSIDBDatabase::transaction): No need to explicitly cast to Vector<String>.
2257
2258 2015-12-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2259
2260         JSC Builtins should use safe array methods
2261         https://bugs.webkit.org/show_bug.cgi?id=151501
2262
2263         Reviewed by Darin Adler.
2264
2265         Using @push and @shift in internal arrays in lieu of push and shift.
2266         This cannot be disrupted by user scripts except if arrays are also made accessible to user scripts.
2267
2268         Covered by added tests for ReadableStream constructs.
2269
2270         * Modules/mediastream/RTCPeerConnectionInternals.js:
2271         (runNext):
2272         (enqueueOperation):
2273         * Modules/streams/ReadableStreamInternals.js:
2274         (enqueueInReadableStream):
2275         (readFromReadableStreamReader):
2276         * Modules/streams/StreamInternals.js:
2277         (dequeueValue):
2278         (enqueueValueWithSize):
2279
2280 2015-12-10  Zan Dobersek  <zdobersek@igalia.com>
2281
2282         [TexMap] pixel coverage multiplication in TiledBackingStore can overflow
2283         https://bugs.webkit.org/show_bug.cgi?id=152055
2284
2285         Reviewed by Carlos Garcia Campos.
2286
2287         The computation of the pixel coverage in TiledBackingStore can easily overflow
2288         when the candidate size is relatively large (for instance when the backed
2289         layer is transformed in a way that increases its perceived size). This can result
2290         in missing tiles for this specific backing store, at least until the layer in
2291         question is transformed again into a shape that produces a smaller candidate size.
2292
2293         To avoid the integer overflow, the multiplication is done in a safe manner,
2294         defaulting to the max positive value an integer can hold in case the overflow
2295         is detected.
2296
2297         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2298         (WebCore::TiledBackingStore::adjustForContentsRect):
2299
2300 2015-12-10  Zan Dobersek  <zdobersek@igalia.com>
2301
2302         [TexMap] Clean up BitmapTexturePool
2303         https://bugs.webkit.org/show_bug.cgi?id=152073
2304
2305         Reviewed by Daniel Bates.
2306
2307         Move BitmapTexturePoolEntry class under the BitmapTexturePool class, renaming
2308         it to simply Entry and keeping it private. Have the constructor take in an
2309         rvalue reference to the RefPtr<BitmapTexture> object. Remove the static
2310         compareTimeLastUsed() function and use a lambda directly in its place.
2311
2312         Remove the default BitmapTexturePool constructor, which isn't used anywhere.
2313         Have the constructor and some methods accept or return RefPtr objects, possibly
2314         via rvalue references. Clean up the header file by removing a few unnecessary
2315         header includes and using forward declarations where possible.
2316
2317         In the BitmapTexturePool implementation file, mark the two const variables as
2318         static. The ::acquireTexture() method now uses the std::find_if() algorithm
2319         to find a fitting Entry object in the Vector. The same method is also moved
2320         upwards so we follow the order of declaration in the header. ::createTexture()
2321         inlines the return of the new expression into the adoptRef() call in the return
2322         statement.
2323
2324         TextureMapperGL constructor is updated to pass a copied RefPtr object into the
2325         BitmapTexturePool constructor.
2326
2327         * platform/graphics/texmap/BitmapTexturePool.cpp:
2328         (WebCore::BitmapTexturePool::BitmapTexturePool):
2329         (WebCore::BitmapTexturePool::acquireTexture):
2330         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
2331         (WebCore::BitmapTexturePool::createTexture):
2332         * platform/graphics/texmap/BitmapTexturePool.h:
2333         (WebCore::BitmapTexturePool::Entry::Entry):
2334         (WebCore::BitmapTexturePool::Entry::markUsed):
2335         (WebCore::BitmapTexturePoolEntry::BitmapTexturePoolEntry): Deleted.
2336         (WebCore::BitmapTexturePoolEntry::markUsed): Deleted.
2337         (WebCore::BitmapTexturePoolEntry::compareTimeLastUsed): Deleted.
2338         * platform/graphics/texmap/TextureMapperGL.cpp:
2339         (WebCore::TextureMapperGL::TextureMapperGL):
2340
2341 2015-12-10  Michael Catanzaro  <mcatanzaro@igalia.com>
2342
2343         [GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
2344         https://bugs.webkit.org/show_bug.cgi?id=151533
2345
2346         Reviewed by Carlos Garcia Campos.
2347
2348         Remove the style context cache to simplify the code, drastically reduce the number of
2349         expensive save/restore operations performed on style contexts, and avoid unwanted
2350         side-effects in RenderThemeGtk::styleColor. This is also a speculative fix for improper
2351         button rendering with certain custom themes, and a simplification that will make it easier
2352         to fix bug #150550.
2353
2354         This change does have performance implications, which I intend to check on the perf bot
2355         after landing to ensure that removing the cache does not have a significant negative impact
2356         on performance; I have no clue whether this will be a net performance win or loss. However,
2357         this is a bit tricky, because the bot is running GTK+ 3.16, whereas I expect save/restore
2358         might be much more expensive in GTK+ 3.20, and I do not want to make performance decisions
2359         except based on the latest GTK+ due to large changes in the implementation of
2360         GtkStyleContext.
2361
2362         * rendering/RenderThemeGtk.cpp:
2363         (WebCore::createStyleContext):
2364         (WebCore::getStockIconForWidgetType):
2365         (WebCore::getStockSymbolicIconForWidgetType):
2366         (WebCore::RenderThemeGtk::initMediaColors):
2367         (WebCore::RenderThemeGtk::adjustRepaintRect):
2368         (WebCore::setToggleSize):
2369         (WebCore::paintToggle):
2370         (WebCore::RenderThemeGtk::setCheckboxSize):
2371         (WebCore::RenderThemeGtk::setRadioSize):
2372         (WebCore::RenderThemeGtk::paintButton):
2373         (WebCore::getComboBoxMetrics):
2374         (WebCore::RenderThemeGtk::paintMenuList):
2375         (WebCore::RenderThemeGtk::paintTextField):
2376         (WebCore::RenderThemeGtk::paintSliderTrack):
2377         (WebCore::RenderThemeGtk::paintSliderThumb):
2378         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2379         (WebCore::RenderThemeGtk::paintProgressBar):
2380         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
2381         (WebCore::RenderThemeGtk::paintInnerSpinButton):
2382         (WebCore::styleColor):
2383         (WebCore::gtkStyleChangedCallback): Deleted.
2384         (WebCore::styleContextMap): Deleted.
2385         (WebCore::getStyleContext): Deleted.
2386
2387 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
2388
2389         font-variant-caps does not work if the font does not support font features
2390         https://bugs.webkit.org/show_bug.cgi?id=149774
2391
2392         Reviewed by Antti Koivisto.
2393
2394         This test implements synthesis for small-caps and all-small-caps. It does so by
2395         moving font variant selection into a higher level (ComplexTextController).
2396         In general, the approach is to use the pure font feature until we encounter
2397         a character which needs to be uppercased, and which the font feature does not
2398         support uppercasing. In this situation, we try again with synthesis. In this
2399         case, synthesis means artificially uppercasing letters and rendering them with
2400         a smaller font.
2401
2402         We require system support to know which glyphs a particular font feature supports.
2403         Therefore, on operating systems which do not include this support, we will simply
2404         say that the font feature does not support any glyphs.
2405
2406         Test: css3/font-variant-small-caps-synthesis.html
2407               css3/font-variant-petite-caps-synthesis.html
2408
2409         * platform/graphics/Font.cpp:
2410         (WebCore::Font::noSmallCapsFont): Return the same font, but without smcp or c2sc.
2411         This function utilizes a cache.
2412         * platform/graphics/Font.h:
2413         (WebCore::Font::variantFont): Small caps should never go through this function
2414         anymore.
2415         * platform/graphics/FontCascade.h: Because we're moving variant selection into
2416         a higher level, we remove the FontVariant argument from the lower-level call.
2417         * platform/graphics/FontCascadeFonts.cpp:
2418         (WebCore::FontCascadeFonts::glyphDataForVariant): Use early-return style.
2419         (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Ditto.
2420         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2421         (WebCore::FontCascade::fontForCombiningCharacterSequence): Because we're moving
2422         variant selection into a higher level, we remove the FontVariant argument from
2423         the lower-level call.
2424         * platform/graphics/cocoa/FontCocoa.mm:
2425         (WebCore::Font::smallCapsSupportsCharacter):
2426         (WebCore::Font::allSmallCapsSupportsCharacter):
2427         (WebCore::smallCapsOpenTypeDictionary): Helper function for
2428         smallCapsSupportsCharacter().
2429         (WebCore::smallCapsTrueTypeDictionary): Ditto.
2430         (WebCore::unionBitVectors):
2431         (WebCore::Font::glyphsSupportedBySmallCaps): Compute a bit vector of supported
2432         glyphs.
2433         (WebCore::Font::glyphsSupportedByAllSmallCaps): Ditto.
2434         (WebCore::createDerivativeFont): Moving common code into its own helper function.
2435         (WebCore::Font::createFontWithoutSmallCaps):
2436         (WebCore::Font::platformCreateScaledFont): Use the common code.
2437         * platform/graphics/mac/ComplexTextController.cpp:
2438         (WebCore::capitalized): What is the capitalized form of a character?
2439         (WebCore::ComplexTextController::collectComplexTextRuns): Implement the core
2440         logic of this patch. This includes the retry when we encounter a character which
2441         is not supported by the font feature.
2442         * platform/spi/cocoa/CoreTextSPI.h:
2443
2444 2015-12-10  Zan Dobersek  <zdobersek@igalia.com>
2445
2446         [TexMap] Remove the TEXMAP_OPENGL_ES_2 define
2447         https://bugs.webkit.org/show_bug.cgi?id=152069
2448
2449         Reviewed by Alex Christensen.
2450
2451         Remove the TEXMAP_OPENGL_ES_2 macro define and clean up the code
2452         that it was (not) guarding.
2453
2454         * platform/graphics/texmap/BitmapTexture.h:
2455         * platform/graphics/texmap/BitmapTextureGL.cpp: Remove the TEXMAP_OPENGL_ES_2
2456         guard. Keep the GL_UNSIGNED_INT_8_8_8_8_REV define for OS(DARWIN), but use
2457         the GraphicsContext3D constants for other values.
2458         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
2459         (WebCore::BitmapTextureGL::initializeStencil): Remove the TEXMAP_OPENGL_ES_2
2460         guard and default to calling the renderbufferStorage() function with the
2461         GraphicsContext3D::STENCIL_INDEX8 argument.
2462         * platform/graphics/texmap/BitmapTexturePool.h:
2463         * platform/graphics/texmap/TextureMapper.h:
2464         * platform/graphics/texmap/TextureMapperGL.cpp: Remove both the TEXMAP_OPENGL_ES_2
2465         guard and the code it guarded. Because we were defining TEXMAP_OPENGL_ES_2 and not
2466         USE_TEXMAP_OPENGL_ES_2, the guarded defines were always enforced, but they're never
2467         actually used in this file anyway.
2468
2469 2015-12-09  Brady Eidson  <beidson@apple.com>
2470
2471         Modern IDB: storage/indexeddb/objectstore-basics.html fails.
2472         https://bugs.webkit.org/show_bug.cgi?id=152101
2473
2474         Reviewed by Alex Christensen.
2475
2476         No new tests (Multiple tests updated to the new error messaging cover it).
2477
2478         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2479         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Add plenty of detailed error messaging.
2480
2481 2015-12-09  Zalan Bujtas  <zalan@apple.com>
2482
2483         TextPainter: Make before and after selection painting more explicit.
2484         https://bugs.webkit.org/show_bug.cgi?id=152104
2485
2486         Reviewed by Myles C. Maxfield.
2487
2488         Instead of swapping start end end positions and expecting TextPainter::drawTextOrEmphasisMarks()
2489         to recognize it, we call painting with 0 - startPosition and endPosition - length.
2490
2491         No change in functionality.
2492
2493         * rendering/TextPainter.cpp:
2494         (WebCore::TextPainter::drawTextOrEmphasisMarks):
2495         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
2496         (WebCore::TextPainter::paintText):
2497         (WebCore::TextPainter::paintEmphasisMarksIfNeeded): Deleted.
2498         (WebCore::TextPainter::paintTextWithStyle): Deleted.
2499         * rendering/TextPainter.h:
2500
2501 2015-12-09  Daniel Bates  <dabates@apple.com>
2502
2503         [iOS] Suspend and resume device motion and device orientation updates when page is hidden and visible, respectively
2504         https://bugs.webkit.org/show_bug.cgi?id=151840
2505         <rdar://problem/23753931>
2506
2507         Reviewed by Simon Fraser.
2508
2509         * dom/Document.cpp:
2510         (WebCore::Document::suspendDeviceMotionAndOrientationUpdates): Added.
2511         (WebCore::Document::resumeDeviceMotionAndOrientationUpdates): Added.
2512         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Moved logic to suspend device motion and
2513         orientation updates from here to Document::suspendDeviceMotionAndOrientationUpdates().
2514         (WebCore::Document::suspendActiveDOMObjects): Modified to call Document::suspendDeviceMotionAndOrientationUpdates().
2515         (WebCore::Document::resumeActiveDOMObjects): Modified to call Document::resumeDeviceMotionAndOrientationUpdates().
2516         * dom/Document.h:
2517         * page/Page.cpp:
2518         (WebCore::Page::setIsVisibleInternal): Suspend device motion and orientation updates when the page is hidden and
2519         resume updates when the page is visible.
2520         (WebCore::Page::suspendDeviceMotionAndOrientationUpdates): Added.
2521         (WebCore::Page::resumeDeviceMotionAndOrientationUpdates): Added.
2522         * page/Page.h:
2523
2524 2015-12-09  Daniel Bates  <dabates@apple.com>
2525
2526         Unify iOS Frame::setTimersPaused() logic and Frame::{suspend, resume}ActiveDOMObjectsAndAnimations()
2527         https://bugs.webkit.org/show_bug.cgi?id=152006
2528
2529         Reviewed by Simon Fraser.
2530
2531         Currently we have almost identical logic to suspend and resume a web page for iOS and non-iOS ports.
2532         We should unify this logic instead of duplicating it.
2533
2534         * dom/ActiveDOMObject.h: Remove iOS-specific enumeration DocumentWillBePaused and standardize on
2535         enumerator PageWillBeSuspended.
2536         * dom/Document.cpp:
2537         (WebCore::Document::didBecomeCurrentDocumentInFrame): Unify iOS and non-iOS-specific code.
2538         (WebCore::Document::suspendScheduledTasks): Ignore subsequent calls to this function so long as the reason for
2539         the first invocation was ActiveDOMObject::PageWillBeSuspended. Such a subsequent call may occur as part of
2540         handling a scroll or zoom gesture.
2541         * dom/ScriptExecutionContext.cpp:
2542         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ignore subsequent calls to this function
2543         so long as the reason for the first invocation was ActiveDOMObject::PageWillBeSuspended. Such a subsequent
2544         call may occur as part of the process of a page being added to the page cache.
2545         * html/HTMLMediaElement.cpp:
2546         (WebCore::HTMLMediaElement::suspend): Remove case for ActiveDOMObject::DocumentWillBePaused as this
2547         enumerator is being removed.
2548         * page/DOMTimer.cpp:
2549         (WebCore::DOMTimer::install): Write logic that used Frame::timersPaused() terms of
2550         ScriptExecutionContext::activeDOMObjectsAreSuspended() as we are removing Frame::timersPaused().
2551         (WebCore::DOMTimer::fired): Remove iOS-specific assertion with respect to Frame::timersPaused().
2552         This function already asserts the equivalent condition that ScriptExecutionContext::activeDOMObjectsAreSuspended()
2553         evaluates to false. Clean up iOS-specific code that depends on the ScriptExecutionContext being a
2554         Document object by taking advantage of the fact that this assumption is true when shouldBeginObservingChanges
2555         evaluates to true.
2556         * page/Frame.cpp:
2557         (WebCore::Frame::Frame): Remove instance variable m_timersPausedCount and unify the iOS and non-iOS logic.
2558         (WebCore::Frame::suspendActiveDOMObjectsAndAnimations): Standardize on the iOS logic for suspending
2559         DOM objects and animations because it is more comprehensive on what it suspends and works with the deferred
2560         loading machinery (Page::setDefersLoading() - see remarks in Frame::resumeActiveDOMObjectsAndAnimations() for
2561         more details). Specifically, make use of Frame::clearTimers() to suspend non-scripted animations (i.e. non-requestAnimationFrame()
2562         animations), auto-scroll timer, and pending relayouts. And use Document::suspendScheduledTasks() to suspend
2563         all other tasks, including WebSQL database callbacks, active DOM objects, scripted animations and execution of
2564         <script async>/<script defer> JavaScript scripts.
2565         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Standardize on the iOS logic for resuming
2566         DOM objects and animations for symmetry and because it works with the deferred loading machinery. We call
2567         Document::resumeScheduledTasks() (which calls Document::resumeActiveDOMObjects()) instead of calling
2568         Document::resumeActiveDOMObjects() directly because the former will ultimately process the queue of pending
2569         tasks (Document::m_pendingTasks).
2570         * page/Frame.h: Remove instance variable m_timersPausedCount.
2571         (WebCore::Frame::timersPaused): Deleted.
2572         * page/ios/FrameIOS.mm:
2573         (WebCore::Frame::setTimersPaused): Write this function in terms of Page::{suspend, resume}ActiveDOMObjectsAndAnimations().
2574         We need to keep this function for Legacy WebKit on iOS.
2575         (WebCore::Frame::setTimersPausedInternal): Deleted.
2576         * rendering/RenderElement.cpp:
2577         (WebCore::shouldRepaintForImageAnimation): Remove iOS-specific code to early return when Frame::timersPaused()
2578         evaluates to true. This function already has the equivalent code to early return when Document::activeDOMObjectsAreSuspended()
2579         evaluates to true.
2580
2581 2015-12-09  Brady Eidson  <beidson@apple.com>
2582
2583         Modern IDB: storage/indexeddb/metadata.html fails
2584         https://bugs.webkit.org/show_bug.cgi?id=152099
2585
2586         Reviewed by Alex Christensen.
2587
2588         Test: storage/indexeddb/modern/abort-objectstore-info.html
2589               And at least one existing failure now passes.
2590
2591         We did not properly reset object store info when version change transactions aborted.
2592
2593         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2594         (WebCore::IDBClient::IDBObjectStore::IDBObjectStore):
2595         (WebCore::IDBClient::IDBObjectStore::rollbackInfoForVersionChangeAbort):
2596         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
2597         
2598         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2599         (WebCore::IDBClient::IDBTransaction::abort):
2600
2601 2015-12-09  Simon Fraser  <simon.fraser@apple.com>
2602
2603         Adjust layer backing store format
2604         https://bugs.webkit.org/show_bug.cgi?id=152097
2605         rdar://problem/23305376
2606
2607         Reviewed by Tim Horton.
2608         
2609         Call setBackingStoreFormat() on UIWebView tile grid layers, and on compositing
2610         layers which can allocate backing store.
2611
2612         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2613         (WebCore::setBackingStoreFormat):
2614         (PlatformCALayerCocoa::commonInit):
2615         * platform/ios/LegacyTileGridTile.mm:
2616         (WebCore::setBackingStoreFormat):
2617         (WebCore::LegacyTileGridTile::LegacyTileGridTile):
2618
2619 2015-12-09  Brady Eidson  <beidson@apple.com>
2620
2621         Modern IDB: storage/indexeddb/intversion-close-between-events.html fails.
2622         https://bugs.webkit.org/show_bug.cgi?id=152096
2623
2624         Reviewed by Alex Christensen.
2625
2626         No new tests (At least one failing test now passes).
2627
2628         * bindings/js/JSIDBDatabaseCustom.cpp:
2629         (WebCore::JSIDBDatabase::transaction): In addition to JSArrays, treat DOMStringLists as a valid string sequence.
2630     
2631 2015-12-09  Andreas Kling  <akling@apple.com>
2632
2633         [iOS] ResourceUsageOverlay should work on iOS.
2634         <https://webkit.org/b/152021>
2635
2636         Reviewed by Antti Koivisto.
2637
2638         Make ResourceUsageOverlay work on iOS and on Mac desktops with UI-side compositing.
2639
2640         * page/ResourceUsageOverlay.cpp:
2641         (WebCore::ResourceUsageOverlay::initialize): Move the overlay to the top of the view on iOS for now.
2642         * page/ResourceUsageOverlay.h:
2643         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2644         (WebCore::createColor): Make a custom CGColor factory since we can't use CGColorCreateGenericRGB on iOS.
2645         (WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
2646         (WebCore::ResourceUsageOverlay::platformInitialize): Put the overlay CALayer into a container layer and
2647         hook it up with GraphicsLayer::setContentsToPlatformLayer so it works with all compositing modes.
2648         (WebCore::showText): Move CGContextSaveGState call to the top of the function to preserve everything.
2649         (WebCore::drawGraphLabel):
2650         (WebCore::drawCpuHistory):
2651         (WebCore::drawGCHistory):
2652         (WebCore::ResourceUsageOverlay::platformDraw): Flip the CGContext if needed.
2653         (WebCore::runSamplerThread): Update the layer rects on each thread iteration. This shouldn't be
2654         necessary but it papers over an issue where the containing layer would shrink down to 0x0 and
2655         disappear. Added a FIXME for this.
2656         * platform/spi/cocoa/MachVMSPI.h: Add purgeable VM SPI.
2657
2658 2015-12-09  Brady Eidson  <beidson@apple.com>
2659
2660         Modern IDB: storage/indexeddb/database-closepending-flag.html fails.
2661         https://bugs.webkit.org/show_bug.cgi?id=152095
2662
2663         Reviewed by Alex Christensen.
2664
2665         No new tests (At least one failing test now passes).
2666         
2667         The server-side checks the closepending flag before dispatching the event to the client, 
2668         but due to the inherent asynchronous race between server and client, the client needs to 
2669         check its closePending flag as well.
2670
2671         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2672         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent): Don't fire if m_closePending is set.
2673
2674 2015-12-09  David Hyatt  <hyatt@apple.com>
2675
2676         Picture element needs to respond to dynamic viewport changes.
2677         https://bugs.webkit.org/show_bug.cgi?id=152013
2678         <rdar://problem/23766375>
2679
2680         Reviewed by Dean Jackson.
2681
2682         Added new tests in fast/picture.
2683
2684         * css/MediaQueryEvaluator.cpp:
2685         (WebCore::MediaQueryEvaluator::evalCheckingViewportDependentResults):
2686         Add new evaluation method that adds viewport dependent results to a vector. A follow-up patch
2687         will refactor the style resolver code to use this function instead of the special style resolver one, in order to
2688         get rid of the code duplication. Tracked by https://bugs.webkit.org/show_bug.cgi?id=152089.
2689
2690         * css/MediaQueryEvaluator.h:
2691         (WebCore::MediaQueryResult::MediaQueryResult):
2692         * css/StyleResolver.h:
2693         (WebCore::MediaQueryResult::MediaQueryResult): Deleted.
2694         Move MediaQueryResult into a header since it is used in multiple places now and not just by the style
2695         resolver.
2696
2697         * dom/Document.cpp:
2698         (WebCore::Document::evaluateMediaQueryList):
2699         (WebCore::Document::checkViewportDependentPictures):
2700         (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
2701         (WebCore::Document::applyContentDispositionAttachmentSandbox):
2702         (WebCore::Document::addViewportDependentPicture):
2703         (WebCore::Document::removeViewportDependentPicture):
2704         * dom/Document.h:
2705         The document now maintains a HashSet of viewport-dependent pictures, and it checks them whenever the
2706         viewport changes. If their media queries stay the same, then nothing happens. If they change, then
2707         the <picture> will go back and re-check all its <source> elements to see what the new best candidate is.
2708
2709         * html/HTMLImageElement.cpp:
2710         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
2711         Revised to check for viewport dependencies and to cache viewport-dependent results on the <picture> elements.
2712         When a <picture> is found to be viewport-dependent (or not) it is also added to or removed from the document's
2713         set of tracked pictures.
2714
2715         * html/HTMLPictureElement.cpp:
2716         (WebCore::HTMLPictureElement::HTMLPictureElement):
2717         (WebCore::HTMLPictureElement::~HTMLPictureElement):
2718         (WebCore::HTMLPictureElement::didMoveToNewDocument):
2719         (WebCore::HTMLPictureElement::create):
2720         (WebCore::HTMLPictureElement::sourcesChanged):
2721         (WebCore::HTMLPictureElement::viewportChangeAffectedPicture):
2722         * html/HTMLPictureElement.h:
2723         New caching of results and updating of the document HashSet when the picture gets destroyed or moves to
2724         a different document.
2725
2726         * html/HTMLSourceElement.cpp:
2727         (WebCore::HTMLSourceElement::parseAttribute):
2728         * html/HTMLSourceElement.h:
2729         Cache the media attribute in a parsed form. A follow-up patch will improve the <video>/<audio>
2730         code to make use of this parsed result. Tracked by https://bugs.webkit.org/show_bug.cgi?id=152090.
2731
2732 2015-12-09  Zalan Bujtas  <zalan@apple.com>
2733
2734         TextPainter: Rename start and end position to selectionStart and selectionEnd.
2735         https://bugs.webkit.org/show_bug.cgi?id=152088
2736
2737         Reviewed by Myles C. Maxfield.
2738
2739         They actually mean selection start/end.
2740
2741         No change in functionality.
2742
2743         * rendering/InlineTextBox.cpp:
2744         (WebCore::InlineTextBox::paint):
2745         * rendering/TextPainter.cpp:
2746         (WebCore::TextPainter::TextPainter):
2747         (WebCore::TextPainter::paintText):
2748         * rendering/TextPainter.h:
2749
2750 2015-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
2751
2752         AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
2753         https://bugs.webkit.org/show_bug.cgi?id=152070
2754
2755         Reviewed by Mario Sanchez Prada.
2756
2757         Map the element to WebCore AccessibilityRole DivRole for GTK. This is being
2758         done in the shared layer rather than in the platform layer because we want all
2759         subsequent logic to treat anonymous render block flow elements as divs.
2760
2761         No new tests. We already have sufficient test coverage. The expectations
2762         been updated accordingly.
2763
2764         * accessibility/AccessibilityRenderObject.cpp:
2765         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2766
2767 2015-12-09  Keith Rollin  <krollin@apple.com>
2768
2769         form.elements should reflect the element ordering after the HTML tree builder algorithm
2770         https://bugs.webkit.org/show_bug.cgi?id=148870
2771         rdar://problem/22589879
2772
2773         Reviewed by Ryosuke Niwa.
2774
2775         form.elements should return form-associated elements in tree order.
2776         However, when presented with an HTML fragment like the following,
2777         forms.elements is not built in tree order. Instead, the elements
2778         appear in forms.element in the same order they appear in the HTML --
2779         that is in the same order as they are parsed.
2780
2781         <form id=form>
2782             <table>
2783                 <tr>
2784                     <td><input type="radio" name="radio1" id="r1" value=1></td>
2785                     <td><input type="radio" name="radio2" id="r2" value=2></td>
2786                     <input type="radio" name="radio0" id="r0" value=0>
2787                 </tr>
2788             </table>
2789         </form>
2790
2791         The reason why elements appear in forms.elements in parse order is
2792         because they register themselves with the designated form when they
2793         are created. At this time, they are not in the DOM tree, so the form
2794         can only assume that the element will be appended to the DOM tree,
2795         with the result that it records the elements in the HTML fragment
2796         above as [r1, r2, r0].
2797
2798         However, it's not always the case that the newly-created element will
2799         be appended to the current tree. In the HTML fragment above, the r0
2800         input element is hoised out of the table element. It ends up being the
2801         preceding sibling of the table element, with the result that the
2802         actual tree-order of the input elements is [r0, r1, r2].
2803
2804         Because the problem is due to registering form-associated elements
2805         with the form *before* the elements are added to the DOM tree, the
2806         solution is to defer that registration until afterwards. With the new
2807         element in the tree, the form can now use its current location in the
2808         tree to correctly place the element in form.elements.
2809
2810         Existing tests now pass:
2811         - imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-elements-nameditem-02-html
2812
2813         * html/FormAssociatedElement.cpp:
2814         (WebCore::FormAssociatedElement::FormAssociatedElement):
2815         (WebCore::FormAssociatedElement::insertedInto):
2816         (WebCore::FormAssociatedElement::removedFrom):
2817         (WebCore::FormAssociatedElement::formRemovedFromTree):
2818         (WebCore::FormAssociatedElement::formWillBeDestroyed):
2819         * html/FormAssociatedElement.h:
2820         * html/HTMLFormControlElement.cpp:
2821         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2822         * html/HTMLImageElement.cpp:
2823         (WebCore::HTMLImageElement::HTMLImageElement):
2824         (WebCore::HTMLImageElement::insertedInto):
2825         (WebCore::HTMLImageElement::removedFrom):
2826         * html/HTMLImageElement.h:
2827         * html/HTMLObjectElement.cpp:
2828         (WebCore::HTMLObjectElement::HTMLObjectElement):
2829
2830 2015-12-09  Gwang Yoon Hwang  <yoon@igalia.com>
2831
2832         [ThreadedCompositor] Support HTML5 Video
2833         https://bugs.webkit.org/show_bug.cgi?id=143301
2834
2835         Reviewed by Žan Doberšek.
2836
2837         This patch implements HTML5 Video supports in Threaded Compositor.
2838
2839         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2840         (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
2841         Added to support GStreamer GL by ensuring unmapping of the swapped
2842         GstVideoFrame performed at GStreamer GL's gl thread.
2843         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
2844         Modified to upload decoded frame to the given texture instead of
2845         creating a texture itself because we should use a texture from the
2846         proxy when we are using the threaded compositor.
2847         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
2848         Implements two ways to send a texture from GStreamer to the compositor.
2849         1. If we are not using GStreamer GL, we are going to acquire a free texture
2850         from a TextureMapperPlatformLayerProxy and upload the decoded frame to the
2851         texture. This should be done at the compositing thread because we
2852         don't have a Gst's GL thread.
2853         2. If we are using GStreamer GL, we map a texture for the given frame
2854         and passes it to the compositing thread. The mapped frame will be
2855         freed if it is swapped out or the layer is removed.
2856
2857         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
2858         Modified to aquire a new texture itself.
2859
2860         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
2861         Adds a way to pass a function to the compositing thread to allocate /
2862         upload textures at the compositing thread.
2863
2864
2865 2015-12-09  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2866
2867         [Streams API] pipeThrough test failing
2868         https://bugs.webkit.org/show_bug.cgi?id=152061
2869
2870         Reviewed by Youenn Fablet.
2871
2872         Test: imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through.html
2873
2874         * Modules/streams/ReadableStream.js:
2875         (pipeThrough): Mimic destructuring for the streams parameter.
2876
2877 2015-12-09  Frederic Wang  <fred.wang@free.fr>
2878
2879         Bad position of large operators inside an munderover element
2880         https://bugs.webkit.org/show_bug.cgi?id=151916
2881
2882         Reviewed by Alejandro G. Castro.
2883
2884         Test: mathml/opentype/large-operators-munderover.html
2885
2886         * rendering/mathml/RenderMathMLOperator.h:
2887         (WebCore::RenderMathMLOperator::isVertical): Expose the direction of the operator.
2888         * rendering/mathml/RenderMathMLUnderOver.cpp:
2889         (WebCore::RenderMathMLUnderOver::layout): Remove call to horizontal stretching for vertical operators.
2890
2891 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
2892
2893         [TexMap] TextureMapperTiledBackingStore should notify the ImageObserver of the data access
2894         https://bugs.webkit.org/show_bug.cgi?id=152053
2895
2896         Reviewed by Martin Robinson.
2897
2898         TextureMapperTiledBackingStore should call ImageObserver::didDraw() on the Image's
2899         observer after updating the tile with the Image's data. This way the CachedImage
2900         (i.e. the observer) can mark the data access with the current timestamp, avoiding
2901         removing the decoded data in the very near future during a cache purge.
2902
2903         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
2904         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
2905
2906 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
2907
2908         Make MainThreadSharedTimerGtk implementation GLib-specific
2909         https://bugs.webkit.org/show_bug.cgi?id=152044
2910
2911         Reviewed by Carlos Garcia Campos.
2912
2913         MainThreadSharedTimerGtk has implementation that only directly depends
2914         on GLib, and not GTK+. Because of that it can be moved under
2915         Source/WebCore/platform/glib and slightly renamed.
2916
2917         * PlatformGTK.cmake:
2918         * platform/glib/MainThreadSharedTimerGLib.cpp: Renamed from Source/WebCore/platform/gtk/MainThreadSharedTimerGtk.cpp.
2919         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
2920         (WebCore::MainThreadSharedTimer::setFireInterval):
2921         (WebCore::MainThreadSharedTimer::stop):
2922         (WebCore::MainThreadSharedTimer::invalidate):
2923         * platform/gtk/MainThreadSharedTimerGtk.cpp:
2924         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer): Deleted.
2925         (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
2926         (WebCore::MainThreadSharedTimer::stop): Deleted.
2927         (WebCore::MainThreadSharedTimer::invalidate): Deleted.
2928
2929 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
2930
2931         [TextureMapper] TextureMapperShaderProgram::setMatrix() should use TransformationMatrix::FloatMatrix4
2932         https://bugs.webkit.org/show_bug.cgi?id=152042
2933
2934         Reviewed by Martin Robinson.
2935
2936         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
2937         (WebCore::TextureMapperShaderProgram::setMatrix): Instead of manually writing out
2938         the complete matrix in a C array, simply use TransformationMatrix::FloatMatrix4
2939         and fill that via the TransformationMatrix::toColumnMajorFloatArray() method
2940         called on the passed-in TransformationMatrix.
2941
2942 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
2943
2944         [Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default context
2945         https://bugs.webkit.org/show_bug.cgi?id=152041
2946
2947         Reviewed by Carlos Garcia Campos.
2948
2949         * platform/network/soup/SocketStreamHandleSoup.cpp:
2950         (WebCore::SocketStreamHandle::beginWaitingForSocketWritability): Attach the
2951         write-ready source to the thread-default context, instead of implicitly
2952         relying on the default context for dispatching.
2953
2954 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
2955
2956         [Soup] SocketStreamHandle should call g_source_destroy() on the write-ready source
2957         https://bugs.webkit.org/show_bug.cgi?id=152040
2958
2959         Reviewed by Carlos Garcia Campos.
2960
2961         * platform/network/soup/SocketStreamHandleSoup.cpp:
2962         (WebCore::SocketStreamHandle::stopWaitingForSocketWritability): Instead of
2963         calling the g_source_get_id()-g_source_remove() pair, destroy the source via
2964         the g_source_destroy() call. Also use nullptr to clear out the pointer
2965         variable.
2966
2967 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
2968
2969         Make AudioBusGtk implementation GLib-specific
2970         https://bugs.webkit.org/show_bug.cgi?id=152049
2971
2972         Reviewed by Philippe Normand.
2973
2974         AudioBusGtk only depends on GLib, so it should be moved to
2975         Source/WebCore/platform/audio/glib and the implementation file
2976         renamed to AudioBusGLib.cpp.
2977
2978         The hard-coded webkitgtk path component can be addressed later.
2979
2980         * PlatformGTK.cmake: Update the build target.
2981         * platform/audio/glib/AudioBusGLib.cpp: Renamed from Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp.
2982         (WebCore::AudioBus::loadPlatformResource):
2983         * platform/audio/gtk/AudioBusGtk.cpp:
2984         (WebCore::AudioBus::loadPlatformResource): Deleted.
2985
2986 2015-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
2987
2988         AX: [EFL] Consider deferring to WebCore Accessibility for table exposure
2989         https://bugs.webkit.org/show_bug.cgi?id=144898
2990
2991         Reviewed by Darin Adler.
2992
2993         Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
2994         for WebKitEfl.
2995
2996         No new tests. Several existing tests already cover table exposure. They have
2997         been updated accordingly.
2998
2999         * accessibility/AccessibilityTable.cpp:
3000         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
3001
3002 2015-12-08  Simon Fraser  <simon.fraser@apple.com>
3003
3004         Convert resetAnimValToBaseVal take a reference to a SVGAnimatedType
3005         https://bugs.webkit.org/show_bug.cgi?id=152036
3006
3007         Reviewed by Zalan Bujtas.
3008         
3009         Change resetAnimValToBaseVal() to take a reference at the last argument.
3010
3011         * svg/SVGAnimateElementBase.cpp:
3012         (WebCore::SVGAnimateElementBase::resetAnimatedType):
3013         * svg/SVGAnimatedAngle.cpp:
3014         (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
3015         * svg/SVGAnimatedAngle.h:
3016         * svg/SVGAnimatedBoolean.cpp:
3017         (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
3018         * svg/SVGAnimatedBoolean.h:
3019         * svg/SVGAnimatedColor.h:
3020         * svg/SVGAnimatedEnumeration.cpp:
3021         (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
3022         * svg/SVGAnimatedEnumeration.h:
3023         * svg/SVGAnimatedInteger.cpp:
3024         (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
3025         * svg/SVGAnimatedInteger.h:
3026         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
3027         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
3028         * svg/SVGAnimatedIntegerOptionalInteger.h:
3029         * svg/SVGAnimatedLength.cpp:
3030         (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
3031         * svg/SVGAnimatedLength.h:
3032         * svg/SVGAnimatedLengthList.cpp:
3033         (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
3034         * svg/SVGAnimatedLengthList.h:
3035         * svg/SVGAnimatedNumber.cpp:
3036         (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
3037         * svg/SVGAnimatedNumber.h:
3038         * svg/SVGAnimatedNumberList.cpp:
3039         (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
3040         * svg/SVGAnimatedNumberList.h:
3041         * svg/SVGAnimatedNumberOptionalNumber.cpp:
3042         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
3043         * svg/SVGAnimatedNumberOptionalNumber.h:
3044         * svg/SVGAnimatedPath.cpp:
3045         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
3046         * svg/SVGAnimatedPath.h:
3047         * svg/SVGAnimatedPointList.cpp:
3048         (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
3049         * svg/SVGAnimatedPointList.h:
3050         * svg/SVGAnimatedPreserveAspectRatio.cpp:
3051         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
3052         * svg/SVGAnimatedPreserveAspectRatio.h:
3053         * svg/SVGAnimatedRect.cpp:
3054         (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
3055         * svg/SVGAnimatedRect.h:
3056         * svg/SVGAnimatedString.cpp:
3057         (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
3058         * svg/SVGAnimatedString.h:
3059         * svg/SVGAnimatedTransformList.cpp:
3060         (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
3061         * svg/SVGAnimatedTransformList.h:
3062         * svg/SVGAnimatedTypeAnimator.h:
3063         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
3064         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
3065
3066 2015-12-08  Myles C. Maxfield  <mmaxfield@apple.com>
3067
3068         Remove Mavericks-specific code from FontCacheMac
3069         https://bugs.webkit.org/show_bug.cgi?id=152030
3070
3071         Reviewed by Simon Fraser.
3072
3073         Mavericks is no longer a supported platform.
3074
3075         No new tests because there is no behavior change.
3076
3077         * platform/graphics/mac/FontCacheMac.mm:
3078         (WebCore::platformLookupFallbackFont):
3079         (WebCore::platformFontWithFamilySpecialCase): Deleted.
3080
3081 2015-12-08  Brady Eidson  <beidson@apple.com>
3082
3083         Modern IDB: storage/indexeddb/objectstore-cursor.html fails.
3084         https://bugs.webkit.org/show_bug.cgi?id=152023
3085
3086         Reviewed by Alex Christensen.
3087
3088         No new tests (At least one failing test now passes).
3089
3090         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
3091         (WebCore::IDBServer::MemoryObjectStoreCursor::MemoryObjectStoreCursor):
3092         (WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange): Make sure the
3093           found iterator is actually in the target range.
3094
3095 2015-12-08  Jer Noble  <jer.noble@apple.com>
3096
3097         Changing <video> src during 'ended' event can leave screen sleep disabled
3098         https://bugs.webkit.org/show_bug.cgi?id=152018
3099
3100         Reviewed by Eric Carlson.
3101
3102         Resetting a HTMLMediaElement's src during 'ended' introduces a race condition: whether
3103         the 'mediaPlayerRateChanged()' notification will fire before createMediaPlayer() destroys
3104         the old MediaPlayer firing said notification.
3105
3106         To break the race condition, always update the sleep disabling assertion after destroying
3107         the media player (by creating a new one).
3108
3109         * html/HTMLMediaElement.cpp:
3110         (WebCore::HTMLMediaElement::createMediaPlayer):
3111
3112 2015-12-08  Brady Eidson  <beidson@apple.com>
3113
3114         Modern IDB: Fire blocked events for delete requests that are blocked.
3115         https://bugs.webkit.org/show_bug.cgi?id=152015
3116
3117         Reviewed by Alex Christensen.
3118
3119         No new tests (Previous failing tests now pass, and previously timing-out tests now complete).
3120
3121         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3122         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
3123         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
3124         (WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
3125         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3126
3127 2015-12-08  Brady Eidson  <beidson@apple.com>
3128
3129         Modern IDB: Fire blocked events for upgrade requests that are blocked.
3130         https://bugs.webkit.org/show_bug.cgi?id=152007
3131
3132         Reviewed by Alex Christensen.
3133
3134         Test: storage/indexeddb/modern/blocked-open-db-requests.html
3135               And some that used to fail now pass.
3136               And some that used to timeout now complete.
3137
3138         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
3139         (WebCore::IDBClient::IDBConnectionToServer::notifyOpenDBRequestBlocked):
3140         * Modules/indexeddb/client/IDBConnectionToServer.h:
3141
3142         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3143         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
3144
3145         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3146         (WebCore::IDBClient::IDBOpenDBRequest::requestBlocked):
3147         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
3148
3149         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3150         (WebCore::IDBClient::IDBRequest::dispatchEvent):
3151
3152         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
3153         (WebCore::IDBServer::IDBConnectionToClient::notifyOpenDBRequestBlocked):
3154         * Modules/indexeddb/server/IDBConnectionToClient.h:
3155         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
3156
3157         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3158         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): When a request that would
3159           result in a version change transaction is blocked by open connections, notify it.
3160
3161         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3162         (WebCore::InProcessIDBServer::notifyOpenDBRequestBlocked):
3163         * Modules/indexeddb/shared/InProcessIDBServer.h:
3164
3165 2015-12-08  Per Arne Vollan  <peavo@outlook.com>
3166
3167         [WinCairo] Compile error.
3168         https://bugs.webkit.org/show_bug.cgi?id=152008
3169
3170         Reviewed by Brent Fulgham.
3171
3172         GLuint is undefined.
3173
3174         * platform/graphics/GraphicsContext3D.h:
3175
3176 2015-12-08  Zalan Bujtas  <zalan@apple.com>
3177
3178         Light cleanup in TextPainter.
3179         https://bugs.webkit.org/show_bug.cgi?id=151994
3180
3181         Reviewed by Darin Adler.
3182
3183         No change in functionality.
3184
3185         * rendering/TextPainter.cpp:
3186         (WebCore::TextPainter::TextPainter):
3187         * rendering/TextPainter.h: Address post review comment.
3188         (WebCore::ShadowApplier::isLastShadowIteration):
3189         (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
3190
3191 2015-12-08  Zalan Bujtas  <zalan@apple.com>
3192
3193         Do not insert positioned renderers to multiple gPositionedDescendantsMap.
3194         https://bugs.webkit.org/show_bug.cgi?id=151878
3195         rdar://problem/22229889
3196
3197         Reviewed by Simon Fraser.
3198
3199         We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
3200         This static map is at block level. A particular absolute positioned object is added to its closest ancestor that
3201         returns true for RenderElement::canContainAbsolutelyPositionedObjects().
3202         canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform.
3203         If this container's style changes so that it's no longer positioned and it has no transform anymore,
3204         we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout).
3205
3206         This patch addresses the case when the renderer does not have transforms anymore.
3207
3208         Test: fast/block/positioning/crash-when-transform-is-removed.html
3209
3210         * rendering/RenderBlock.cpp:
3211         (WebCore::RenderBlock::styleWillChange):
3212
3213 2015-12-08  Eric Carlson  <eric.carlson@apple.com>
3214
3215         [MediaStream] Rename UserMediaClient and UserMediaController methods
3216         https://bugs.webkit.org/show_bug.cgi?id=152001
3217
3218         Reviewed by Brady Eidson.
3219
3220         No new tests, no behavior change.
3221
3222         * Modules/mediastream/UserMediaClient.h:
3223         (WebCore::UserMediaClient::~UserMediaClient):
3224         * Modules/mediastream/UserMediaController.h:
3225         (WebCore::UserMediaController::client):
3226         (WebCore::UserMediaController::from):
3227         (WebCore::UserMediaController::requestUserMediaAccess):
3228         (WebCore::UserMediaController::cancelUserMediaAccessRequest):
3229         (WebCore::UserMediaController::requestPermission): Deleted.
3230         (WebCore::UserMediaController::cancelRequest): Deleted.
3231         * Modules/mediastream/UserMediaRequest.cpp:
3232         (WebCore::UserMediaRequest::constraintsValidated):
3233         (WebCore::UserMediaRequest::contextDestroyed):
3234         * platform/mock/UserMediaClientMock.h:
3235
3236 2015-12-08  Jer Noble  <jer.noble@apple.com>
3237
3238         [iOS] Do not exit fullscreen mode during auto-PiP.
3239         https://bugs.webkit.org/show_bug.cgi?id=151889
3240
3241         Reviewed by Darin Adler.
3242
3243         When auto-PiPing, do not exit fullscreen mode, as that causes a two-step animation upon returing from auto-PiP.
3244
3245         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3246         (WebVideoFullscreenInterfaceAVKit::applicationDidBecomeActive): Handle the case where we open Safari after an
3247             auto-PiP by clicking on a link; if so, hide the fullscreen window.
3248         (WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture): Do not exit fullscreen during auto-PiP.
3249         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Ditto.
3250
3251 2015-12-08  Per Arne Vollan  <peavo@outlook.com>
3252
3253         [WinCairo] Remove unneeded function.
3254         https://bugs.webkit.org/show_bug.cgi?id=151989
3255
3256         Reviewed by Brent Fulgham.
3257
3258         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3259         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
3260         (MFCreateMediaType): Deleted.
3261
3262 2015-12-08  Jer Noble  <jer.noble@apple.com>
3263
3264         [iOS] Adopt WebFullScreenVideoRootViewController.
3265         https://bugs.webkit.org/show_bug.cgi?id=151996
3266
3267         Reviewed by Dan Bernstein.
3268
3269         Adopt WebFullScreenVideoRootViewController from WebKitAdditions. If it is not available, create and use
3270         a generic UIViewController subclass.
3271
3272         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3273         (createFullScreenVideoRootViewControllerClass):
3274         (allocWebFullScreenVideoRootViewControllerInstance):
3275         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
3276
3277 2015-12-08  Andy Estes  <aestes@apple.com>
3278
3279         ImmutableNFANodeBuilder's move constructor moves an uninitialized member variable into itself
3280         https://bugs.webkit.org/show_bug.cgi?id=151982
3281
3282         Reviewed by Darin Adler.
3283
3284         * contentextensions/ImmutableNFANodeBuilder.h:
3285         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):
3286
3287 2015-12-08  Andreas Kling  <akling@apple.com>
3288
3289         [Cocoa] ResourceUsageOverlay should query kernel for VM page size.
3290         <https://webkit.org/b/151920>
3291
3292         Reviewed by Andy Estes.
3293
3294         Read the vm.pagesize sysctl to find the correct page size for memory usage calculations.
3295         This fixes broken math on systems that have different hw.pagesize and vm.pagesize.
3296
3297         * page/cocoa/ResourceUsageOverlayCocoa.mm:
3298         (WebCore::vmPageSize):
3299         (WebCore::pagesPerVMTag):
3300         (WebCore::runSamplerThread):
3301
3302 2015-12-08  Chris Dumez  <cdumez@apple.com>
3303
3304         Add diagnostic logging to measure speculative revalidation accuracy
3305         https://bugs.webkit.org/show_bug.cgi?id=151953
3306         <rdar://problem/23092196>
3307
3308         Reviewed by Darin Adler.
3309
3310         Add diagnostic logging to measure speculative revalidation accuracy.
3311
3312         * page/DiagnosticLoggingKeys.cpp:
3313         (WebCore::DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey):
3314         (WebCore::DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey):
3315         (WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey):
3316         (WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey):
3317         (WebCore::DiagnosticLoggingKeys::unknownEntryRequestKey):
3318         (WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey):
3319         (WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey):
3320         * page/DiagnosticLoggingKeys.h:
3321
3322 2015-12-08  Brady Eidson  <beidson@apple.com>
3323
3324         Modern IDB: storage/indexeddb/index-cursor.html fails.
3325         https://bugs.webkit.org/show_bug.cgi?id=151973
3326
3327         Reviewed by Darin Adler.
3328
3329         No new tests (At least one failing test now passes).
3330
3331         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
3332         (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor): When the initial cursor creation
3333           generates an iterator outside of the cursor's IDBKeyRange, invalidate the iterator.
3334           
3335 2015-12-08  Joanmarie Diggs  <jdiggs@igalia.com>
3336
3337         [EFL] some ax tests have been failed since r186692
3338         https://bugs.webkit.org/show_bug.cgi?id=146887
3339
3340         Reviewed by Mario Sanchez Prada.
3341
3342         The tests were failing because there are now two WebCore accessibility
3343         roles which need to implement the AtkTable interface: TableRole and
3344         GridRole. Because the latter was not added in r186692, any tests with
3345         ARIA role grid that accessed cells via coordinates stopped working.
3346
3347         No new tests; instead unskipped all the broken table tests which now pass.
3348
3349         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3350         (getInterfaceMaskFromObject):
3351
3352 2015-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
3353
3354         [ThreadedCompositor] Add support for Cairo GL-backed ImageBuffer.
3355         https://bugs.webkit.org/show_bug.cgi?id=151986
3356
3357         Reviewed by Žan Doberšek.
3358
3359         This patch adds a support for accelerated 2d canvas which uses cairo-gl as its
3360         backend to the threaded compositor. Basically, it applies same way to support
3361         WebGL for the threaded compositor.
3362
3363         Unfortunately, we cannot swap the buffer for the accelerated 2d canvas because
3364         it should preserve the buffer of the previous frame when drawing new contents.
3365         Because of that, the surface of the accelerated 2d canvas will be copied for
3366         each frame.
3367
3368         * platform/graphics/cairo/ImageBufferCairo.cpp:
3369         (WebCore::ImageBufferData::ImageBufferData):
3370         (WebCore::ImageBufferData::createCompositorBuffer): Prepare a texture
3371         surface to push the rendered result to the compositing thread.
3372         (WebCore::ImageBufferData::swapBuffersIfNeeded): Copies the contents
3373         of the canvas's surface to the compositing texture.
3374         (WebCore::ImageBufferData::createCairoGLSurface): Moved to the inside
3375         of ImageBufferData.
3376
3377 2015-12-08  Joanmarie Diggs  <jdiggs@igalia.com>
3378
3379         [GTK] 15 accessibility tests fail since r186692.
3380         https://bugs.webkit.org/show_bug.cgi?id=148938
3381
3382         Reviewed by Mario Sanchez Prada.
3383
3384         Failing tests rebaselined.
3385
3386         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3387         (atkRole): Treat GridCellRole and CellRole the same.
3388         (roleIsTextType): Treat GridCellRole and CellRole the same.
3389
3390 2015-12-08  Frederic Wang  <fred.wang@free.fr>
3391
3392         [cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
3393         https://bugs.webkit.org/show_bug.cgi?id=151947
3394
3395         Reviewed by Martin Robinson.
3396
3397         Test: mathml/presentation/radical-bar-visibility.html
3398
3399         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3400         (WebCore::GraphicsContext::drawLine): Force a minimal thickness of 1px
3401
3402 2015-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
3403
3404         [ThreadedCompositor] Support WebGL for OpenGL.
3405         https://bugs.webkit.org/show_bug.cgi?id=143300
3406
3407         Reviewed by Žan Doberšek.
3408
3409         To remove pixel transfer operation, this patch adds m_compositorFBO which uses same depth and stencil
3410         buffer with m_fbo but uses m_compositorTexture as a color attachment in GraphicsContext3D.
3411         Because switching target framebuffer is cheaper than pixel transfer operation and switching color
3412         attachment of m_fbo. In Threaded Compositor, when WebGL renders a scene, prepareTexture swaps
3413         m_fbo with m_compositorFBO and send the color attachment to the compositor thread.
3414         This patch only supports WebGL for OpenGL. OpenGLES will be covered in following-up patches.
3415
3416         No new tests needed.
3417
3418         * platform/graphics/GraphicsContext3D.h:
3419         * platform/graphics/GraphicsContext3DPrivate.cpp:
3420         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3421         (WebCore::GraphicsContext3DPrivate::proxy):
3422         (WebCore::GraphicsContext3DPrivate::swapBuffersIfNeeded):
3423         Implement interfaces to pass a rendered texture to the compositing
3424         thread.
3425         * platform/graphics/GraphicsContext3DPrivate.h:
3426         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3427         (WebCore::GraphicsContext3D::GraphicsContext3D):
3428         (WebCore::GraphicsContext3D::~GraphicsContext3D):
3429         Create additional compositing texture and FBO to swaping buffers for
3430         threaded compositor.
3431         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3432         (WebCore::GraphicsContext3D::reshapeFBOs):
3433         (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
3434         Split attaching depth and stencil buffer codes from reshapeFBOs
3435         to make complete framebuffer with not only m_fbo but m_compositorFBO also.
3436         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: