[Mac] Remove unused playerToPrivateMap()
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-01-18  Olivier Blin  <olivier.blin@softathome.com>
2
3         [Mac] Remove unused playerToPrivateMap()
4         https://bugs.webkit.org/show_bug.cgi?id=153203
5
6         Reviewed by Darin Adler.
7
8         This was used in previous EME implementations, but is unnecessary
9         since r163907.
10
11         No new tests since this removes dead code only.
12
13         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
14         (WebCore::globalLoaderDelegateQueue): Deleted.
15         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Deleted.
16
17 2016-01-18  Simon Fraser  <simon.fraser@apple.com>
18
19         Add TextStream-based logging for Position and VisiblePosition
20         https://bugs.webkit.org/show_bug.cgi?id=153195
21
22         Reviewed by Ryosuke Niwa.
23
24         Make it easy to dump Positions and VisiblePositions with a TextStream.
25
26         * dom/Position.cpp:
27         (WebCore::operator<<):
28         * dom/Position.h:
29         * editing/VisiblePosition.cpp:
30         (WebCore::operator<<):
31         * editing/VisiblePosition.h:
32
33 2016-01-18  Zan Dobersek  <zdobersek@igalia.com>
34
35         Sink the Vector<uint8_t> buffer into the SerializedScriptValue constructor
36         https://bugs.webkit.org/show_bug.cgi?id=142634
37
38         Reviewed by Darin Adler.
39
40         Have the SerializedScriptValue constructor take in the Vector<uint8_t> buffer
41         through an rvalue reference, avoiding the copying into the m_data member. The
42         three-parameter constructor now takes in the Vector<String> blob URL object
43         via const reference, and the std::unique_ptr<> object via a rvalue reference.
44
45         Adjust all the call sites and affected code to now either move or copy a
46         non-movable object into the SerializedScriptValue constructor or the helper
47         methods.
48
49         No new tests -- no change in behavior.
50
51         * bindings/js/IDBBindingUtilities.cpp:
52         (WebCore::deserializeIDBValueDataToJSValue):
53         (WebCore::deserializeIDBValueBuffer):
54         (WebCore::idbValueDataToJSValue):
55         * bindings/js/IDBBindingUtilities.h:
56         * bindings/js/SerializedScriptValue.cpp:
57         (WebCore::SerializedScriptValue::SerializedScriptValue):
58         (WebCore::SerializedScriptValue::create):
59         (WebCore::SerializedScriptValue::numberValue):
60         (WebCore::SerializedScriptValue::undefinedValue):
61         (WebCore::SerializedScriptValue::nullValue):
62         * bindings/js/SerializedScriptValue.h:
63         * testing/Internals.cpp:
64         (WebCore::Internals::deserializeBuffer):
65
66 2016-01-18  Olivier Blin  <olivier.blin@softathome.com>
67
68         [GStreamer] Remove unused m_endTime
69         https://bugs.webkit.org/show_bug.cgi?id=153209
70
71         Reviewed by Michael Catanzaro.
72
73         m_endTime has been unused since r47710 in MediaPlayerPrivateGStreamer.
74
75         No new tests since this is just a member cleanup.
76
77         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
78         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Deleted.
79         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
80
81 2016-01-18  Csaba Osztrogonác  <ossy@webkit.org>
82
83         Fix the --minimal build due to missing VM.h include
84         https://bugs.webkit.org/show_bug.cgi?id=153128
85
86         Reviewed by Michael Catanzaro.
87
88         * bindings/js/WebCoreJSBuiltinInternals.h:
89
90 2016-01-18  Csaba Osztrogonác  <ossy@webkit.org>
91
92         Remove the SKIP_UNUSED_PARAM define
93         https://bugs.webkit.org/show_bug.cgi?id=153129
94
95         Reviewed by Michael Catanzaro.
96
97         * bindings/js/WebCoreJSBuiltinInternals.cpp:
98         (WebCore::JSBuiltinInternalFunctions::visit):
99         (WebCore::JSBuiltinInternalFunctions::initialize):
100         * bindings/js/WebCoreJSBuiltinInternals.h:
101
102 2016-01-17  Simon Fraser  <simon.fraser@apple.com>
103
104         More displaylist tests, and minor cleanup
105         https://bugs.webkit.org/show_bug.cgi?id=153198
106
107         Reviewed by Zalan Bujtas.
108
109         Have the DisplayListRecorder's constructor push the recorder onto the GraphicsContext,
110         and remove that code from GraphicsLayerCA.
111
112         Tests: displaylists/extent-includes-shadow.html
113                displaylists/extent-includes-transforms.html
114
115         * platform/graphics/ca/GraphicsLayerCA.cpp:
116         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
117         * platform/graphics/displaylists/DisplayListRecorder.cpp:
118         (WebCore::DisplayList::Recorder::Recorder):
119
120 2016-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
121
122         Remove TextRun::allowsRoundingHacks()
123         https://bugs.webkit.org/show_bug.cgi?id=153185
124
125         Reviewed by Simon Fraser.
126
127         Rounding hacks are disallowed by default, and are only re-enabled on iOS 4 and
128         earlier, which are not supported OSes. Because they are disallowed on all
129         supported configurations, remove support for them wholesale.
130
131         No new tests.
132
133         * html/canvas/CanvasRenderingContext2D.cpp:
134         (WebCore::CanvasRenderingContext2D::drawTextInternal):
135         * platform/graphics/FontCascade.cpp:
136         * platform/graphics/FontCascade.h:
137         (WebCore::FontCascade::isRoundingHackCharacter): Deleted.
138         * platform/graphics/StringTruncator.cpp:
139         (WebCore::stringWidth):
140         (WebCore::truncateString):
141         (WebCore::StringTruncator::centerTruncate):
142         (WebCore::StringTruncator::rightTruncate):
143         (WebCore::StringTruncator::width):
144         (WebCore::StringTruncator::leftTruncate):
145         (WebCore::StringTruncator::rightClipToCharacter):
146         (WebCore::StringTruncator::rightClipToWord):
147         * platform/graphics/StringTruncator.h:
148         * platform/graphics/TextRun.cpp:
149         (WebCore::TextRun::setAllowsRoundingHacks): Deleted.
150         (WebCore::TextRun::allowsRoundingHacks): Deleted.
151         * platform/graphics/TextRun.h:
152         (WebCore::TextRun::TextRun):
153         (WebCore::TextRun::applyRunRounding): Deleted.
154         (WebCore::TextRun::applyWordRounding): Deleted.
155         (WebCore::TextRun::disableRoundingHacks): Deleted.
156         * platform/graphics/WidthIterator.cpp:
157         (WebCore::WidthIterator::advanceInternal):
158         * platform/graphics/mac/ComplexTextController.cpp:
159         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
160         * platform/mac/DragImageMac.mm:
161         (WebCore::widthWithFont): Deleted.
162         (WebCore::drawAtPoint): Deleted.
163         * rendering/RenderFileUploadControl.cpp:
164         (WebCore::RenderFileUploadControl::fileTextValue):
165         (WebCore::RenderFileUploadControl::paintObject): Deleted.
166         * rendering/RenderListBox.cpp:
167         (WebCore::RenderListBox::paintItemForeground):
168         (WebCore::RenderListBox::updateFromElement): Deleted.
169         * rendering/RenderTextControl.cpp:
170         (WebCore::RenderTextControl::getAverageCharWidth): Deleted.
171         * rendering/RenderTheme.cpp:
172         (WebCore::RenderTheme::fileListNameForWidth):
173         * rendering/RenderThemeMac.mm:
174         (WebCore::RenderThemeMac::fileListNameForWidth):
175         * rendering/svg/SVGInlineTextBox.cpp:
176         (WebCore::SVGInlineTextBox::constructTextRun): Deleted.
177         * rendering/svg/SVGTextMetrics.cpp:
178         (WebCore::SVGTextMetrics::constructTextRun): Deleted.
179         * testing/Internals.cpp:
180         (WebCore::Internals::resetToConsistentState): Deleted.
181         (WebCore::Internals::allowRoundingHacks): Deleted.
182         * testing/Internals.h:
183         * testing/Internals.idl:
184
185 2016-01-16  Andreas Kling  <akling@apple.com>
186
187         Allocate style sheet media queries in BumpArena.
188         <https://webkit.org/b/153188>
189
190         Reviewed by Antti Koivisto.
191
192         Teach the CSS parser to allocate MediaQuery and MediaQueryExp from BumpArena as well.
193
194         * css/CSSGrammar.y.in:
195         * css/MediaQuery.h:
196         * css/MediaQueryExp.h:
197
198 2016-01-16  Michael Catanzaro  <mcatanzaro@igalia.com>
199
200         [GTK] Add a couple comments to ScrollbarThemeGtk
201         https://bugs.webkit.org/show_bug.cgi?id=153184
202
203         Reviewed by Carlos Garcia Campos.
204
205         * platform/gtk/ScrollbarThemeGtk.cpp:
206         (WebCore::ScrollbarThemeGtk::paint):
207
208 2016-01-16  Andreas Kling  <akling@apple.com>
209
210         Give RuleSet a BumpArena and start using it for RuleDataVectors.
211         <https://webkit.org/b/153169>
212
213         Reviewed by Antti Koivisto.
214
215         Since RuleSet only supports appending rules and doesn't need to worry about removing them,
216         it's a great candidate for BumpArena optimizations.
217
218         Give each RuleSet its own BumpArena and teach them how to allocate RuleDataVector objects
219         out of them.
220
221         There are more things that can be done here, ideally all the sub-allocations inside RuleSet
222         that happen via e.g Vector and HashMap would also come out of the BumpArena.
223
224         * css/RuleSet.cpp:
225         (WebCore::RuleSet::RuleSet):
226         (WebCore::RuleSet::addToRuleSet):
227         (WebCore::RuleSet::copyShadowPseudoElementRulesFrom):
228         * css/RuleSet.h:
229         (WebCore::RuleSet::RuleDataVector::create):
230         (WebCore::RuleSet::RuleSet): Deleted.
231
232 2016-01-16  Simon Fraser  <simon.fraser@apple.com>
233
234         Fix flakiness of displaylists/layer-dispay-list.html
235         
236         When toggling "uses display list drawing" on a GraphicsLayerCA, do
237         a repaint.
238
239         * platform/graphics/ca/GraphicsLayerCA.cpp:
240         (WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):
241
242 2016-01-15  Simon Fraser  <simon.fraser@apple.com>
243
244         Remove GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon()
245         https://bugs.webkit.org/show_bug.cgi?id=153174
246
247         Reviewed by Zalan Bujtas.
248
249         GraphicsContext::drawConvexPolygon() and GraphicsContext::clipConvexPolygon() were
250         poorly named (non-convex polygons are allowed), and just syntactic sugar over
251         clipPath() and drawPath().
252         
253         Remove them, but add a convenience function to create a Path from a Vector of 
254         points. For CG, we can use the more efficient CGPathAddLines().
255         
256         Add TextStream dumping for Path.
257
258         * platform/graphics/GraphicsContext.h:
259         * platform/graphics/Path.cpp:
260         (WebCore::Path::polygonPathFromPoints):
261         (WebCore::Path::dump):
262         (WebCore::operator<<):
263         * platform/graphics/Path.h:
264         * platform/graphics/cairo/GraphicsContextCairo.cpp:
265         (WebCore::GraphicsContext::setPlatformShouldAntialias):
266         (WebCore::addConvexPolygonToContext): Deleted.
267         (WebCore::GraphicsContext::drawConvexPolygon): Deleted.
268         (WebCore::GraphicsContext::clipConvexPolygon): Deleted.
269         * platform/graphics/cg/GraphicsContextCG.cpp:
270         (WebCore::addConvexPolygonToPath): Deleted.
271         (WebCore::GraphicsContext::drawConvexPolygon): Deleted.
272         (WebCore::GraphicsContext::clipConvexPolygon): Deleted.
273         * platform/graphics/cg/PathCG.cpp:
274         (WebCore::Path::polygonPathFromPoints):
275         (WebCore::Path::moveTo):
276         (WebCore::Path::addLineTo):
277         (WebCore::Path::addQuadCurveTo):
278         (WebCore::Path::addBezierCurveTo):
279         (WebCore::Path::addArcTo):
280         * platform/graphics/displaylists/DisplayListItems.cpp:
281         (WebCore::DisplayList::Item::sizeInBytes): Deleted.
282         (WebCore::DisplayList::ClipConvexPolygon::ClipConvexPolygon): Deleted.
283         (WebCore::DisplayList::ClipConvexPolygon::apply): Deleted.
284         (WebCore::DisplayList::operator<<): Deleted.
285         (WebCore::DisplayList::addConvexPolygonToPath): Deleted.
286         (WebCore::DisplayList::DrawConvexPolygon::DrawConvexPolygon): Deleted.
287         (WebCore::DisplayList::DrawConvexPolygon::localBounds): Deleted.
288         (WebCore::DisplayList::DrawConvexPolygon::apply): Deleted.
289         * platform/graphics/displaylists/DisplayListItems.h:
290         (WebCore::DisplayList::ClipConvexPolygon::create): Deleted.
291         (WebCore::DisplayList::ClipConvexPolygon::points): Deleted.
292         (WebCore::DisplayList::ClipConvexPolygon::antialias): Deleted.
293         (WebCore::DisplayList::DrawConvexPolygon::create): Deleted.
294         (WebCore::DisplayList::DrawConvexPolygon::points): Deleted.
295         (WebCore::DisplayList::DrawConvexPolygon::antialiased): Deleted.
296         * platform/graphics/displaylists/DisplayListRecorder.cpp:
297         (WebCore::DisplayList::Recorder::drawConvexPolygon): Deleted.
298         (WebCore::DisplayList::Recorder::clipConvexPolygon): Deleted.
299         * platform/graphics/displaylists/DisplayListRecorder.h:
300         * rendering/RenderBoxModelObject.cpp:
301         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
302         * rendering/RenderElement.cpp:
303         (WebCore::RenderElement::drawLineForBoxSide):
304         * rendering/RenderThemeIOS.mm:
305         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
306         * rendering/RenderThemeMac.mm:
307         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
308
309 2016-01-16  Jeremy Huddleston Sequoia  <jeremyhu@apple.com>
310
311         Add Platform.cpp to ANGLESupport
312
313         https://bugs.webkit.org/show_bug.cgi?id=153120
314
315         Reviewed by Darin Adler.
316
317         No new tests, only addresses a build failure.
318
319         * CMakeLists.txt:
320
321 2016-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
322
323         [GTK] List box selections stopped working again with GTK+ from current git master
324         https://bugs.webkit.org/show_bug.cgi?id=153122
325
326         Reviewed by Michael Catanzaro.
327
328         The problem is that the ListBox selection implementation is
329         wrong. We are using a similar implementation to GtkEntry, but
330         GtkTreeView doesn't have a child CSS node for selections.
331
332         * rendering/RenderThemeGtk.cpp:
333         (WebCore::styleColor): Don't use a child style context for ListBox selections.
334         (WebCore::createStyleContext): Remove ListBoxSelection.
335
336 2016-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
337
338         [SOUP] Initialize HTTP version of ResourceResponse
339         https://bugs.webkit.org/show_bug.cgi?id=153088
340
341         Reviewed by Michael Catanzaro.
342
343         * platform/network/soup/ResourceResponseSoup.cpp:
344         (WebCore::ResourceResponse::updateFromSoupMessage):
345
346 2016-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
347
348         Tiny cleanup in FontFaceComparator
349         https://bugs.webkit.org/show_bug.cgi?id=153044
350
351         Reviewed by Zalan Bujtas.
352
353         This is a follow-up patch to r194923.
354
355         No new tests because there is no behavior change.
356
357         * css/CSSFontSelector.cpp:
358         (WebCore::FontFaceComparator::FontFaceComparator):
359         (WebCore::FontFaceComparator::operator()):
360
361 2016-01-15  Jiewen Tan  <jiewen_tan@apple.com>
362
363         FrameLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame() is never called when loading a main resource from the memory cache
364         https://bugs.webkit.org/show_bug.cgi?id=152520
365         <rdar://problem/23305737>
366
367         Reviewed by Andy Estes.
368
369         Test: http/tests/loading/server-redirect-for-provisional-load-caching.html
370
371         * loader/DocumentLoader.cpp:
372         (WebCore::DocumentLoader::responseReceived):
373         Dispatch message to notify client that a cached resource was redirected. So,
374         client can make proper actions to treat server side redirection.
375         * loader/cache/CachedRawResource.h:
376         Add a method to tell whether the cached resource was redirected.
377
378 2016-01-15  Chris Dumez  <cdumez@apple.com>
379
380         Drop obsolete HTMLDocument.width / height attributes
381         https://bugs.webkit.org/show_bug.cgi?id=153144
382
383         Reviewed by Ryosuke Niwa.
384
385         Drop obsolete HTMLDocument.width / height attributes as these are
386         obsolete and already not supported by other major browsers (tested
387         Firefox and Chrome).
388
389         No new tests, already covered by existing tests.
390
391         * html/HTMLDocument.idl:
392
393 2016-01-15  Chris Dumez  <cdumez@apple.com>
394
395         Drop obsolete DocumentType.entities / notations
396         https://bugs.webkit.org/show_bug.cgi?id=153147
397
398         Reviewed by Ryosuke Niwa.
399
400         Drop obsolete DocumentType.entities / notations attributes.
401
402         Firefox and Chrome already dropped those. We already dropped support for
403         entities and notations so these always returned null.
404
405         No new tests, already covered by existing tests.
406
407         * dom/DocumentType.h:
408         * dom/DocumentType.idl:
409
410 2016-01-10  Simon Fraser  <simon.fraser@apple.com>
411
412         Make a way to test display-list drawing
413         https://bugs.webkit.org/show_bug.cgi?id=152956
414
415         Reviewed by Ryosuke Niwa.
416
417         Make it possible to toggle display-list drawing for a given compositing
418         layer via internals, as well as getting a textual representation of the display
419         list, optionally including items with platform-specific behavior.
420         
421         Add one test that uses this.
422
423         Test: displaylists/layer-dispay-list.html
424
425         * platform/graphics/GraphicsLayer.h:
426         (WebCore::GraphicsLayer::displayListAsText):
427         * platform/graphics/ca/GraphicsLayerCA.cpp:
428         (WebCore::GraphicsLayerCA::displayListAsText):
429         * platform/graphics/ca/GraphicsLayerCA.h:
430         * platform/graphics/displaylists/DisplayList.cpp:
431         (WebCore::DisplayList::DisplayList::shouldDumpForFlags):
432         (WebCore::DisplayList::DisplayList::asText):
433         * platform/graphics/displaylists/DisplayList.h:
434         * rendering/RenderLayerBacking.cpp:
435         (WebCore::RenderLayerBacking::setUsesDisplayListDrawing):
436         (WebCore::RenderLayerBacking::displayListAsText):
437         * rendering/RenderLayerBacking.h:
438         * testing/Internals.cpp:
439         (WebCore::Internals::setElementUsesDisplayListDrawing):
440         (WebCore::Internals::displayListForElement):
441         * testing/Internals.h:
442         * testing/Internals.idl:
443
444 2016-01-15  Olivier Blin  <olivier.blin@softathome.com>
445
446         Fix audio build with video disabled
447         https://bugs.webkit.org/show_bug.cgi?id=153134
448
449         Reviewed by Michael Catanzaro.
450
451         Build fails when WebAudio is enabled but VIDEO disabled.
452
453         No new tests since this is a build fix only.
454
455         * platform/audio/PlatformMediaSession.cpp:
456         * platform/audio/PlatformMediaSession.h:
457         * platform/audio/PlatformMediaSessionManager.cpp:
458         * testing/Internals.cpp:
459         (WebCore::Internals::setAudioContextRestrictions):
460
461 2016-01-15  Olivier Blin  <olivier.blin@softathome.com>
462
463         [GTK] Fix build of RenderThemeGtk without VIDEO by including HTMLInputElement
464         https://bugs.webkit.org/show_bug.cgi?id=153133
465
466         Reviewed by Michael Catanzaro.
467
468         Build was fine with VIDEO enabled, since HTMLInputElement.h was
469         included by transitivity through MediaControlElements.h and
470         MediaControlElementTypes.h.
471
472         This seems to be broken since r194847.
473
474         No new tests since this is just a build fix.
475
476         * rendering/RenderThemeGtk.cpp:
477
478 2016-01-15  Ryosuke Niwa  <rniwa@webkit.org>
479
480         createElementNS and createAttributeNS should treat undefined namespaceURI as null string
481         https://bugs.webkit.org/show_bug.cgi?id=153119
482
483         Reviewed by Chris Dumez.
484
485         Treat undefined as null in document.createElementNS and document.createAttributeNS as defined in:
486         https://dom.spec.whatwg.org/#document
487
488         Test: fast/dom/Document/createAttributeNS-undefined-namespace.html
489
490         * dom/Document.idl:
491
492 2016-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
493
494         [Cocoa] Font features are not applied to the system font
495         https://bugs.webkit.org/show_bug.cgi?id=153053
496
497         Reviewed by Dean Jackson.
498
499         We simply need to call preparePlatformFont() on it.
500
501         Test: fast/text/system-font-features.html
502
503         * platform/graphics/cocoa/FontCacheCoreText.cpp:
504         (WebCore::fontWithFamily):
505
506 2016-01-15  Tim Horton  <timothy_horton@apple.com>
507
508         Data detector yellow highlight location is vertically mirrored in WebKit1
509         https://bugs.webkit.org/show_bug.cgi?id=152216
510         <rdar://problem/23848003>
511
512         Reviewed by Beth Dakin.
513
514         No new tests, because we currently have no decent mechanism for testing
515         where TextIndicator/Lookup/DataDetectors actually make it to the screen,
516         nor for synthetic force-click in WebKit1.
517
518         * editing/mac/DictionaryLookup.h:
519         * editing/mac/DictionaryLookup.mm:
520         (WebCore::showPopupOrCreateAnimationController):
521         (WebCore::DictionaryLookup::showPopup):
522         (WebCore::DictionaryLookup::animationControllerForPopup):
523         Add an optional function for converting between root-FrameView and
524         handed-in-NSView coordinates, and use it to convert textBoundingRectInRootViewCoordinates
525         into the coordinates of the WebView.
526
527 2016-01-15  Joseph Pecoraro  <pecoraro@apple.com>
528
529         Media Query (-webkit-video-playable-inline) is failing as an invalid media query expression
530         https://bugs.webkit.org/show_bug.cgi?id=153111
531
532         Reviewed by Dean Jackson.
533
534         Test: fast/media/video-playable-inline-media-query.html
535
536         * css/MediaQueryEvaluator.cpp:
537         (WebCore::video_playable_inlineMediaFeatureEval):
538         (WebCore::isRunningOnIPhoneOrIPod): Deleted.
539         Make the media query work regardless of the platform.
540         It should just check the web view's settings.
541
542         * css/MediaQueryExp.cpp:
543         (WebCore::featureWithoutValue):
544         This media query expects no value, include it in the list
545         so it is not treated as invalid.
546
547 2016-01-15  Zalan Bujtas  <zalan@apple.com>
548
549         ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal
550         https://bugs.webkit.org/show_bug.cgi?id=123331
551
552         Reviewed by Darin Adler.
553
554         Do not set named flow fragment bit on the flow until after the renderer is attached. Setting/resetting it too early
555         could affect the attach/detach process itself (This is similar to attaching a multi column flow thread).
556
557         Test: fast/regions/input-box-with-region-assert.html
558
559         * rendering/RenderBlockFlow.cpp:
560         (WebCore::RenderBlockFlow::willBeDestroyed):
561         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
562         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
563
564 2016-01-15  Simon Fraser  <simon.fraser@apple.com>
565
566         Add kdebug_trace signposts for a few WebCore operations
567         https://bugs.webkit.org/show_bug.cgi?id=153136
568         rdar://problem/24208487
569
570         Reviewed by Sam Weinig.
571
572         Add trace points for style recalc, layout, view painting and layer painting.
573
574         * dom/Document.cpp:
575         (WebCore::Document::recalcStyle):
576         * page/FrameView.cpp:
577         (WebCore::FrameView::layout):
578         (WebCore::FrameView::paintContents):
579         * platform/graphics/ca/GraphicsLayerCA.cpp:
580         (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
581
582 2016-01-15  Andreas Kling  <akling@apple.com>
583
584         Use BumpArena for style sheet object tree.
585         <https://webkit.org/b/152696>
586
587         Reviewed by Antti Koivisto.
588
589         Give each StyleSheetContents its own BumpArena, and plumb it down through CSSParser
590         to allocate StyleRule, StyleProperties and CSSSelectorList's selector arrays there.
591
592         This basically means that most objects that make up a given style sheet will end up
593         in one (or a few) contiguous region(s) of memory, instead of being scattered all
594         over the malloc heap.
595
596         In the common case (no CSSOM manipulation), the lifetimes of these objects are very
597         predictable: everything tends to die when the StyleSheetContents dies.
598         This dramatically improves space-efficiency in those cases, and allows us to return
599         contiguous chunks of memory to the system once a style sheet is no longer needed.
600
601         One-off CSS parses that don't work within a StyleSheetContents context will have
602         their StyleRules & co allocated through FastMalloc just like before.
603
604         Bonus: give SelectorQueryCache a dedicated BumpArena as well, since it has very
605         predictable lifetime.
606
607         * css/CSSGrammar.y.in:
608         * css/CSSKeyframesRule.h:
609         (WebCore::StyleRuleKeyframes::create):
610         * css/CSSParser.cpp:
611         (WebCore::CSSParser::createStyleProperties):
612         (WebCore::CSSParser::createMediaRule):
613         (WebCore::CSSParser::createSupportsRule):
614         (WebCore::CSSParser::createKeyframesRule):
615         (WebCore::CSSParser::setArena):
616         (WebCore::CSSParser::arena):
617         (WebCore::CSSParser::createStyleRule):
618         (WebCore::CSSParser::createFontFaceRule):
619         (WebCore::CSSParser::createPageRule):
620         (WebCore::CSSParser::createRegionRule):
621         (WebCore::CSSParser::createViewportRule):
622         * css/CSSParser.h:
623         * css/CSSParserValues.cpp:
624         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
625         (WebCore::CSSParserSelector::adoptSelectorVector):
626         * css/CSSParserValues.h:
627         * css/CSSSelectorList.cpp:
628         (WebCore::CSSSelectorList::CSSSelectorList):
629         (WebCore::CSSSelectorList::adoptSelectorVector):
630         (WebCore::CSSSelectorList::deleteSelectors):
631         * css/CSSSelectorList.h:
632         * css/StyleProperties.cpp:
633         (WebCore::ImmutableStyleProperties::create):
634         (WebCore::StyleProperties::immutableCopyIfNeeded):
635         * css/StyleProperties.h:
636         * css/StyleRule.cpp:
637         (WebCore::StyleRule::create):
638         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
639         (WebCore::StyleRuleRegion::StyleRuleRegion):
640         * css/StyleRule.h:
641         (WebCore::StyleRule::create):
642         (WebCore::StyleRule::parserAdoptSelectorVector):
643         (WebCore::StyleRuleFontFace::create):
644         (WebCore::StyleRulePage::create):
645         (WebCore::StyleRulePage::parserAdoptSelectorVector):
646         (WebCore::StyleRuleMedia::create):
647         (WebCore::StyleRuleSupports::create):
648         (WebCore::StyleRuleRegion::create):
649         (WebCore::StyleRuleViewport::create):
650         * css/StyleSheetContents.cpp:
651         (WebCore::StyleSheetContents::StyleSheetContents):
652         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
653         (WebCore::StyleSheetContents::parseStringAtPosition):
654         * css/StyleSheetContents.h:
655         * dom/SelectorQuery.cpp:
656         (WebCore::SelectorQueryCache::SelectorQueryCache):
657         (WebCore::SelectorQueryCache::add):
658         * dom/SelectorQuery.h:
659         * svg/SVGFontFaceElement.cpp:
660         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
661
662 2016-01-15  Dave Hyatt  <hyatt@apple.com>
663
664         Avoid downloading the wrong image for <picture> elements.
665         https://bugs.webkit.org/show_bug.cgi?id=153027
666
667         Reviewed by Dean Jackson.
668
669         No tests, since they are always flaky.
670
671         * html/HTMLImageElement.cpp:
672         (WebCore::HTMLImageElement::HTMLImageElement):
673         (WebCore::HTMLImageElement::~HTMLImageElement):
674         (WebCore::HTMLImageElement::createForJSConstructor):
675         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
676         (WebCore::HTMLImageElement::insertedInto):
677         (WebCore::HTMLImageElement::removedFrom):
678         (WebCore::HTMLImageElement::pictureElement):
679         (WebCore::HTMLImageElement::setPictureElement):
680         (WebCore::HTMLImageElement::width):
681         * html/HTMLImageElement.h:
682         (WebCore::HTMLImageElement::hasShadowControls):
683         * html/HTMLPictureElement.h:
684         * html/parser/HTMLConstructionSite.cpp:
685         (WebCore::HTMLConstructionSite::createHTMLElement):
686         * html/parser/HTMLPreloadScanner.cpp:
687         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
688
689         Images that are built underneath a <picture> element are now connected
690         to that picture element via a setPictureNode call from the parser. This
691         ensures that the correct <source> elements are examined before checking the image.
692
693         This connection between images and their picture owners is handled using a static
694         HashMap in HTMLImageElement. This connection is made both from the parser and from
695         DOM insertions, and the map is queried now instead of looking directly at the
696         image's parentNode().
697
698 2016-01-15  Youenn Fablet  <youenn.fablet@crf.canon.fr>
699
700         [Streams API] Expose ReadableStream and relatives to Worker
701         https://bugs.webkit.org/show_bug.cgi?id=152066
702
703         Reviewed by Darin Adler.
704
705         Covered by rebased tests.
706
707         * Modules/streams/ByteLengthQueuingStrategy.idl:
708         * Modules/streams/CountQueuingStrategy.idl:
709         * Modules/streams/ReadableStream.idl:
710         * Modules/streams/ReadableStreamController.idl:
711         * Modules/streams/ReadableStreamReader.idl:
712
713 2016-01-15  Youenn Fablet  <youenn.fablet@crf.canon.fr>
714
715         CORS: Fix the handling of redirected request containing Origin null.
716         https://bugs.webkit.org/show_bug.cgi?id=128816
717
718         Reviewed by Brent Fulgham.
719
720         Merging Blink patch from George Ancil (https://chromiumcodereview.appspot.com/20735002).
721
722         This patch removes the check for securityOrigin->isUnique() in passesAccessControlCheck().
723         This check prevented a redirected request with "Origin: null" from being
724         successful even when the response contains "Access-Control-Allow-Origin: null"
725
726         Tests: http/tests/xmlhttprequest/access-control-sandboxed-iframe-allow-origin-null.html
727                http/tests/xmlhttprequest/redirect-cors-origin-null.html
728
729         * loader/CrossOriginAccessControl.cpp:
730         (WebCore::passesAccessControlCheck):
731
732 2016-01-14  Commit Queue  <commit-queue@webkit.org>
733
734         Unreviewed, rolling out r195064.
735         https://bugs.webkit.org/show_bug.cgi?id=153118
736
737         test fails most of the time (Requested by alexchristensen on
738         #webkit).
739
740         Reverted changeset:
741
742         "Avoid downloading the wrong image for <picture> elements."
743         https://bugs.webkit.org/show_bug.cgi?id=153027
744         http://trac.webkit.org/changeset/195064
745
746 2016-01-14  Ryosuke Niwa  <rniwa@webkit.org>
747
748         createElement should not lowercase non-ASCII characters
749         https://bugs.webkit.org/show_bug.cgi?id=153114
750
751         Reviewed by Alex Christensen.
752
753         According to step 2 in https://dom.spec.whatwg.org/#dom-document-createelement, document.createElement should not
754         lowercase non-ASCII letters, and this is also what Firefox does. Match that behavior by lowercasing the tag name
755         by convertToASCIILowercase() instead of lower() in createElement.
756
757         Also merged HTMLDocument::createElement into Document::createElement for simplicity and avoid duplicating
758         the call to isValidName and setting a DOM exception.
759
760         No new tests since the behavior change is covered by the existing W3C tests.
761
762         * dom/Document.cpp:
763         (WebCore::Document::createElement): Create a HTML element with ASCII-lowercased tag name inside a HTML document.
764         * dom/Document.h:
765         * html/HTMLDocument.cpp:
766         (WebCore::addLocalNameToSet):
767         (WebCore::HTMLDocument::createElement): Merged into Document::createElement.
768         * html/HTMLDocument.h:
769
770 2016-01-14  Brady Eidson  <beidson@apple.com>
771
772         Modern IDB: Support opening and deleting SQLite databases on disk.
773         https://bugs.webkit.org/show_bug.cgi?id=153084
774
775         Reviewed by Alex Christensen, Sam Weinig and Andy Estes (oh my!).
776
777         No new tests (Infrastructure, no testable change in behavior).
778
779         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
780         (WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot):
781         * Modules/indexeddb/IDBDatabaseIdentifier.h:
782
783         * Modules/indexeddb/server/IDBServer.cpp:
784         (WebCore::IDBServer::IDBServer::create):
785         (WebCore::IDBServer::IDBServer::IDBServer):
786         (WebCore::IDBServer::IDBServer::createBackingStore):
787         * Modules/indexeddb/server/IDBServer.h:
788
789         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
790         (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
791         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
792         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
793         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
794
795         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
796         (WebCore::InProcessIDBServer::create):
797         (WebCore::InProcessIDBServer::InProcessIDBServer):
798         * Modules/indexeddb/shared/InProcessIDBServer.h:
799
800 2016-01-14  Myles C. Maxfield  <mmaxfield@apple.com>
801
802         Mixing Content Blocking of fonts and display:none rules causes battery drain
803         https://bugs.webkit.org/show_bug.cgi?id=153051
804         <rdar://problem/23187709>
805
806         Reviewed by Alex Christensen.
807
808         If we have applied a rule before and we are not applying it again, don't
809         resolve the style again.
810
811         Test: http/tests/contentextensions/font-display-none-repeated-layout.html
812
813         * contentextensions/ContentExtensionStyleSheet.cpp:
814         (WebCore::ContentExtensions::ContentExtensionStyleSheet::addDisplayNoneSelector):
815         * contentextensions/ContentExtensionStyleSheet.h:
816         * dom/ExtensionStyleSheets.cpp:
817         (WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
818
819 2016-01-14  Ryosuke Niwa  <rniwa@webkit.org>
820
821         Add document.defineCustomElement
822         https://bugs.webkit.org/show_bug.cgi?id=153092
823
824         Reviewed by Chris Dumez.
825
826         Added document.defineCustomElement and added a constructor to HTMLElement which can be called
827         as "super" in a subclass of HTMLElement. This is a prototype of new custom elements API and
828         willfully violates the current specification at http://w3c.github.io/webcomponents/spec/custom/
829
830         Each author defined class can define multiple elements using distinct tag names. In such cases,
831         the super call must specify the tag name. e.g.
832
833         class SomeCustomElement extends HTMLElement { constructor(name) { super(name); } }
834         document.defineCustomElement('some-custom-element', SomeCustomElement);
835         document.defineCustomElement('other-custom-element', SomeCustomElement);
836         new SomeCustomElement('some-custom-element');
837
838         When a class is associated with exactly one tag name, the argument can be omitted. e.g.
839
840         class AnotherCustomElement extends HTMLElement {}
841         document.defineCustomElement('another-custom-element', AnotherCustomElement);
842         new AnotherCustomElement();
843
844         We allow only subclassing of HTMLElement and only in (X)HTML namespace.
845
846         Tests: fast/custom-elements/Document-defineCustomElement.html
847                fast/custom-elements/HTMLElement-constructor.html
848
849         * CMakeLists.txt:
850         * WebCore.xcodeproj/project.pbxproj:
851
852         * bindings/js/JSCustomElementInterface.cpp: Added. Abstracts an author-defined class associated
853         with a custom element. It's a Active DOM object and lives until the associated document dies.
854         (WebCore::JSCustomElementInterface::JSCustomElementInterface):
855         (WebCore::JSCustomElementInterface::~JSCustomElementInterface):
856         * bindings/js/JSCustomElementInterface.h: Added.
857         (WebCore::JSCustomElementInterface::create):
858         (WebCore::JSCustomElementInterface::scriptExecutionContext):
859         (WebCore::JSCustomElementInterface::constructor):
860
861         * bindings/js/JSDocumentCustom.cpp:
862         (WebCore::JSDocument::defineCustomElement): Added. Define a custom element by associating a tag
863         name with an author defined JS class after validating arguments.
864
865         * bindings/js/JSHTMLElementCustom.cpp:
866         (WebCore::constructJSHTMLElement): Added. Look up the tag name based on new.target if one is not
867         specified. If a tag name is specified, check that new.target is associated with the tag name.
868
869         * dom/CustomElementDefinitions.cpp: Added.
870         (WebCore::CustomElementDefinitions::checkName): Added. Restricts tag names similarly to
871         http://w3c.github.io/webcomponents/spec/custom/#dfn-custom-element-type
872         (WebCore::CustomElementDefinitions::defineElement): Added. Associates a JS class with a tag name.
873         (WebCore::CustomElementDefinitions::findInterface): Added. Finds a JS class by a tag name.
874         (WebCore::CustomElementDefinitions::findName): Added. Finds a tag name by a JS class.
875         * dom/CustomElementDefinitions.h: Added.
876         (WebCore::CustomElementDefinitions::CustomElementInfo): Added.
877
878         * dom/Document.cpp:
879         (WebCore::Document::ensureCustomElementDefinitions): Added.
880         * dom/Document.h:
881         (WebCore::Document::customElementDefinitions): Added.
882
883         * dom/Document.idl:
884         * html/HTMLElement.idl:
885
886 2016-01-14  Simon Fraser  <simon.fraser@apple.com>
887
888         Remove workaround for rdar://problem/23623670
889         https://bugs.webkit.org/show_bug.cgi?id=153107
890         rdar://problem/23633319
891
892         Reviewed by Tim Horton.
893
894         Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
895         back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.
896
897         * platform/graphics/cocoa/IOSurface.h:
898         * platform/graphics/cocoa/IOSurface.mm:
899         (IOSurface::ensurePlatformContext):
900         (IOSurface::copyToSurface): Deleted.
901
902 2016-01-14  Beth Dakin  <bdakin@apple.com>
903
904         WK1 and WK2 should share more candidate request code
905         https://bugs.webkit.org/show_bug.cgi?id=153108
906
907         Reviewed by Simon Fraser.
908
909         requestCandidatesForSelection() does not need to be exposed as an 
910         EditorClient function. WK1 can just call invoke this code from the existing 
911         respondToChangedSelection EditorClient function, which is what WK2 does.
912         * editing/Editor.cpp:
913         (WebCore::Editor::respondToChangedSelection):
914         * loader/EmptyClients.h:
915         * page/EditorClient.h:
916         (WebCore::EditorClient::supportsGlobalSelection):
917
918 2016-01-14  Beth Dakin  <bdakin@apple.com>
919
920         WK2: Request completion candidates when needed
921         https://bugs.webkit.org/show_bug.cgi?id=153040
922         -and corresponding-
923         rdar://problem/24155631
924
925         Reviewed by Enrica Casucci and Tim Horton.
926
927         Helper functions for stringForCandidateRequest() and 
928         handleAcceptedCandidate()
929         * editing/Editor.cpp:
930         (WebCore::candidateRangeForSelection):
931         (WebCore::candidateWouldReplaceText):
932
933         Request candidates for the word that is currently being typed so long as the 
934         candidate would replace that word. Otherwise, use String().
935         (WebCore::Editor::stringForCandidateRequest):
936
937         When a candidate has been accepted, insert the text.
938         (WebCore::Editor::handleAcceptedCandidate):
939         * editing/Editor.h:
940
941 2016-01-14  Daniel Bates  <dabates@apple.com>
942
943         Disallow use of Geolocation service from unique origins
944         https://bugs.webkit.org/show_bug.cgi?id=153102
945         <rdar://problem/23055645>
946
947         Reviewed by Alexey Proskuryakov.
948
949         Tests: fast/dom/Geolocation/dataURL-getCurrentPosition.html
950                fast/dom/Geolocation/dataURL-watchPosition.html
951                fast/dom/Geolocation/srcdoc-getCurrentPosition.html
952                fast/dom/Geolocation/srcdoc-watchPosition.html
953                http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition.html
954                http/tests/security/sandboxed-iframe-geolocation-watchPosition.html
955
956         * Modules/geolocation/Geolocation.cpp:
957         (WebCore::Geolocation::securityOrigin): Convenience function to get the SecurityOrigin object
958         associated with this script execution context.
959         (WebCore::Geolocation::startRequest): Notify requester POSITION_UNAVAILABLE when requested
960         from a document with a unique origin.
961         * Modules/geolocation/Geolocation.h:
962         * page/SecurityOrigin.h:
963         (WebCore::SecurityOrigin::canRequestGeolocation): Added.
964
965 2016-01-14  Daniel Bates  <dabates@apple.com>
966
967         [XSS Auditor] Extract attribute truncation logic and formalize string canonicalization
968         https://bugs.webkit.org/show_bug.cgi?id=152874
969
970         Reviewed by Brent Fulgham.
971
972         Derived from Blink patch (by Tom Sepez <tsepez@chromium.org>):
973         <https://src.chromium.org/viewvc/blink?revision=176339&view=revision>
974
975         Extract the src-like and script-like attribute truncation logic into independent functions
976         towards making it more straightforward to re-purpose this logic. Additionally, formalize the
977         concept of string canonicalization as a member function that consolidates the process of
978         decoding URL escape sequences, truncating the decoded string (if applicable), and removing
979         characters that are considered noise.
980
981         * html/parser/XSSAuditor.cpp:
982         (WebCore::truncateForSrcLikeAttribute): Extracted from XSSAuditor::decodedSnippetForAttribute().
983         (WebCore::truncateForScriptLikeAttribute): Ditto.
984         (WebCore::XSSAuditor::init): Write in terms of XSSAuditor::canonicalize().
985         (WebCore::XSSAuditor::filterCharacterToken): Updated to make use of formalized canonicalization methods.
986         (WebCore::XSSAuditor::filterScriptToken): Ditto.
987         (WebCore::XSSAuditor::filterObjectToken): Ditto.
988         (WebCore::XSSAuditor::filterParamToken): Ditto.
989         (WebCore::XSSAuditor::filterEmbedToken): Ditto.
990         (WebCore::XSSAuditor::filterAppletToken): Ditto.
991         (WebCore::XSSAuditor::filterFrameToken): Ditto.
992         (WebCore::XSSAuditor::filterInputToken): Ditto.
993         (WebCore::XSSAuditor::filterButtonToken): Ditto.
994         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected): Ditto.
995         (WebCore::XSSAuditor::eraseAttributeIfInjected): Updated code to use early return style and avoid an unnecessary string
996         comparison when we know that a src attribute was injected.
997         (WebCore::XSSAuditor::canonicalizedSnippetForTagName): Renamed; formerly known as XSSAuditor::decodedSnippetForName(). Updated
998         to make use of XSSAuditor::canonicalize().
999         (WebCore::XSSAuditor::snippetFromAttribute): Renamed; formerly known as XSSAuditor::decodedSnippetForAttribute(). Moved
1000         truncation logic from here to WebCore::truncateFor{Script, Src}LikeAttribute.
1001         (WebCore::XSSAuditor::canonicalize): Added.
1002         (WebCore::XSSAuditor::canonicalizedSnippetForJavaScript): Added.
1003         (WebCore::canonicalize): Deleted.
1004         (WebCore::XSSAuditor::decodedSnippetForName): Deleted.
1005         (WebCore::XSSAuditor::decodedSnippetForAttribute): Deleted.
1006         (WebCore::XSSAuditor::decodedSnippetForJavaScript): Deleted.
1007         * html/parser/XSSAuditor.h: Define enum class for the various attribute truncation styles.
1008
1009 2016-01-14  Daniel Bates  <dabates@apple.com>
1010
1011         [XSS Auditor] Partial bypass when web server collapses path components
1012         https://bugs.webkit.org/show_bug.cgi?id=152872
1013
1014         Reviewed by Brent Fulgham.
1015
1016         Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
1017         <https://src.chromium.org/viewvc/blink?revision=167610&view=revision>
1018
1019         Test: http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html
1020
1021         * html/parser/XSSAuditor.cpp:
1022         (WebCore::isNonCanonicalCharacter):
1023         (WebCore::XSSAuditor::init):
1024         (WebCore::XSSAuditor::decodedSnippetForName):
1025         (WebCore::XSSAuditor::decodedSnippetForAttribute):
1026         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
1027         (WebCore::fullyDecodeString): Deleted.
1028
1029 2016-01-14  Beth Dakin  <bdakin@apple.com>
1030
1031         imported/blink/editing/text-iterator/read-past-cloned-first-letter.html 
1032         crashes
1033         https://bugs.webkit.org/show_bug.cgi?id=153104
1034         -and corresponding-
1035         rdar://problem/24155631
1036
1037         Reviewed by Simon Fraser.
1038
1039         Though we merged the Blink test, we never merged Blink patch that fixed this 
1040         bug. So this is a merge of https://github.com/ChromiumWebApps/blink/commit/5a0d23d4368c661f621364339fde66b41ef019e5
1041         * editing/TextIterator.cpp:
1042         (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter):
1043
1044 2016-01-14  Zalan Bujtas  <zalan@apple.com>
1045
1046         ASSERTION FAILED: !newRelayoutRoot.container() || !newRelayoutRoot.container()->needsLayout() in WebCore::FrameView::scheduleRelayoutOfSubtree
1047         https://bugs.webkit.org/show_bug.cgi?id=151605#c1
1048
1049         Reviewed by David Hyatt.
1050
1051         Do not let RenderMultiColumnSet/RenderFlowThread mark ancestors dirty while updating scrollbars
1052         for overflow content. While updating scrollbars, we only layout descendants so marking parents dirty
1053         is unnecessary and could lead to an invalid dirty state.
1054
1055         Test: fast/multicol/body-stuck-with-dirty-bit-with-columns.html
1056
1057         * rendering/RenderBlockFlow.cpp:
1058         (WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
1059         * rendering/RenderFlowThread.cpp:
1060         (WebCore::RenderFlowThread::invalidateRegions):
1061         * rendering/RenderFlowThread.h:
1062         * rendering/RenderMultiColumnSet.cpp:
1063         (WebCore::RenderMultiColumnSet::prepareForLayout):
1064
1065 2016-01-14  Dave Hyatt  <hyatt@apple.com>
1066
1067         Avoid downloading the wrong image for <picture> elements.
1068         https://bugs.webkit.org/show_bug.cgi?id=153027
1069
1070         Reviewed by Dean Jackson.
1071
1072         Added test in fast/picture.
1073
1074         * html/HTMLImageElement.cpp:
1075         (WebCore::HTMLImageElement::HTMLImageElement):
1076         (WebCore::HTMLImageElement::~HTMLImageElement):
1077         (WebCore::HTMLImageElement::createForJSConstructor):
1078         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
1079         (WebCore::HTMLImageElement::insertedInto):
1080         (WebCore::HTMLImageElement::removedFrom):
1081         (WebCore::HTMLImageElement::pictureElement):
1082         (WebCore::HTMLImageElement::setPictureElement):
1083         (WebCore::HTMLImageElement::width):
1084         * html/HTMLImageElement.h:
1085         (WebCore::HTMLImageElement::hasShadowControls):
1086         * html/HTMLPictureElement.h:
1087         * html/parser/HTMLConstructionSite.cpp:
1088         (WebCore::HTMLConstructionSite::createHTMLElement):
1089         * html/parser/HTMLPreloadScanner.cpp:
1090         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1091
1092         Images that are built underneath a <picture> element are now connected
1093         to that picture element via a setPictureNode call from the parser. This
1094         ensures that the correct <source> elements are examined before checking the image.
1095
1096         This connection between images and their picture owners is handled using a static
1097         HashMap in HTMLImageElement. This connection is made both from the parser and from
1098         DOM insertions, and the map is queried now instead of looking directly at the
1099         image's parentNode().
1100
1101 2016-01-14  Commit Queue  <commit-queue@webkit.org>
1102
1103         Unreviewed, rolling out r195002.
1104         https://bugs.webkit.org/show_bug.cgi?id=153098
1105
1106         Crashes many/most editing tests (Requested by ap on #webkit).
1107
1108         Reverted changeset:
1109
1110         "WK2: Request completion candidates when needed"
1111         https://bugs.webkit.org/show_bug.cgi?id=153040
1112         http://trac.webkit.org/changeset/195002
1113
1114 2016-01-14  Martin Robinson  <mrobinson@igalia.com>
1115
1116         [GTK] [EFL] Hyphenation can never work in practice due to requirements on lang tags
1117         https://bugs.webkit.org/show_bug.cgi?id=147310
1118
1119         Reviewed by Michael Catanzaro.
1120
1121         Test: platform/gtk/fast/text/hyphenate-flexible-locales.html
1122
1123         * platform/text/hyphen/HyphenationLibHyphen.cpp: Make locale matching for dictionary
1124         selection a lot looser by matching case insensitively, matching multiple dictionaries
1125         when only the language is specified, and ignoring the difference between '_' and '-' in
1126         the locale name.
1127         (WebCore::scanDirectoryForDicionaries): Now produce HashMap of Vectors instead of a single
1128         path for each locale. Also add alternate entries to handle different ways of specifying
1129         the locale.
1130         (WebCore::scanTestDictionariesDirectoryIfNecessary): Update to handle the difference
1131         in HashMap type.
1132         (WebCore::availableLocales): Ditto.
1133         (WebCore::canHyphenate): Also look for the lowercased version of the locale.
1134         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey):
1135         Key on the dictionary path now so that we can load more than one dictionary per locale.
1136         (WebCore::lastHyphenLocation): Iterate through each matched dictionary in turn.
1137
1138 2016-01-14  Per Arne Vollan  <peavo@outlook.com>
1139
1140         [Win] Remove workarounds for fixed bugs in fmod and pow.
1141         https://bugs.webkit.org/show_bug.cgi?id=153071
1142
1143         Reviewed by Brent Fulgham.
1144
1145         Compile fix, help MSVC pick correct pow overload.
1146
1147         * rendering/shapes/BoxShape.cpp:
1148         (WebCore::adjustRadiusForMarginBoxShape):
1149
1150 2016-01-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1151
1152         Fix problems with cross-origin redirects
1153         https://bugs.webkit.org/show_bug.cgi?id=116075
1154
1155         Reviewed by Daniel Bates.
1156
1157         Merging https://chromium.googlesource.com/chromium/blink/+/7ea774e478f84f355748108d2aaabca15355d512 by Ken Russell
1158         Same origin redirect responses leading to cross-origin requests were checked as cross-origin redirect responses.
1159         Introduced ClientRequestedCredentials to manage whether credentials are needed or not in the cross-origin request.
1160
1161         In addition to Blink patch, it was needed to update some loaders with the newly introduced ClientRequestedCredentials parameter.
1162         Added the clearing of "Accept-Encoding" header from cross-origin requests as Mac HTTP network layer is adding it for same-origin requests.
1163
1164         Test: http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin.html
1165
1166         * loader/DocumentLoader.cpp:
1167         (WebCore::DocumentLoader::startLoadingMainResource): Added new security parameter (from Blink patch).
1168         * loader/DocumentThreadableLoader.cpp:
1169         (WebCore::DocumentThreadableLoader::redirectReceived): Updated checks so that same origin redirections are not treated as cross origin redirections (from Blink patch).
1170         * loader/MediaResourceLoader.cpp:
1171         (WebCore::MediaResourceLoader::start):
1172         * loader/NetscapePlugInStreamLoader.cpp:
1173         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added new security parameter.
1174         * loader/ResourceLoaderOptions.h:
1175         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added new security parameter (from Blink patch).
1176         (WebCore::ResourceLoaderOptions::credentialRequest):
1177         (WebCore::ResourceLoaderOptions::setCredentialRequest):
1178         * loader/cache/CachedResourceLoader.cpp:
1179         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Ditto.
1180         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.
1181         * loader/icon/IconLoader.cpp:
1182         (WebCore::IconLoader::startLoading): Added new security parameter.
1183         * page/EventSource.cpp:
1184         (WebCore::EventSource::connect): Added new security parameter (from Blink patch).
1185         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1186         (WebCore::WebCoreAVCFResourceLoader::startLoading): Added new security parameter.
1187         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1188         (WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
1189         * platform/network/ResourceHandleTypes.h: Added new security parameter constants (from Blink patch).
1190         * platform/network/ResourceRequestBase.cpp:
1191         (WebCore::ResourceRequestBase::clearHTTPAcceptEncoding): Function to remove "Accept-Encoding" header.
1192         * platform/network/ResourceRequestBase.h: Ditto.
1193         * xml/XMLHttpRequest.cpp:
1194         (WebCore::XMLHttpRequest::createRequest): Added new security parameter.
1195
1196 2016-01-13  Myles C. Maxfield  <mmaxfield@apple.com>
1197
1198         Addressing more post-review comments after r194566
1199
1200         Unreviewed.
1201
1202         No new tests because there is no behavior change.
1203
1204         * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
1205         (WebCore::topLanguagePreference):
1206
1207 2016-01-13  Alex Christensen  <achristensen@webkit.org>
1208
1209         Implement custom protocols when using NetworkSession
1210         https://bugs.webkit.org/show_bug.cgi?id=153078
1211
1212         Reviewed by Andy Estes.
1213
1214         No new tests, but this makes the WebKit2CustomProtocolsTest api tests pass when using NetworkSession.
1215
1216         * WebCore.xcodeproj/project.pbxproj:
1217         Make NSURLConnectionSPI.h private so we can include it from within WebKit2.
1218
1219 2016-01-13  Brent Fulgham  <bfulgham@apple.com>
1220
1221         Cross-protocol, cross-site scripting (XPSS) using HTML forms
1222         https://bugs.webkit.org/show_bug.cgi?id=153017
1223         <rdar://problem/5873254>
1224
1225         Reviewed by David Kilzer.
1226
1227         * loader/DocumentLoader.cpp:
1228         (WebCore::DocumentLoader::responseReceived): If response HTTP version is 0.9,
1229         sandbox against script execution and plugins.
1230         * loader/ResourceLoader.cpp:
1231         (WebCore::ResourceLoader::didReceiveResponse): Ditto.
1232         * loader/SubresourceLoader.cpp:
1233         (WebCore::SubresourceLoader::didReceiveResponse): Ditto.
1234         * platform/network/ResourceResponseBase.cpp:
1235         (WebCore::ResourceResponseBase::adopt): Update for HTTP version.
1236         (WebCore::ResourceResponseBase::copyData): Ditto.
1237         (WebCore::ResourceResponseBase::httpVersion): Added.
1238         (WebCore::ResourceResponseBase::setHTTPVersion): Ditto.
1239         * platform/network/ResourceResponseBase.h:
1240         (WebCore::ResourceResponseBase::encode): Update for HTTP version.
1241         (WebCore::ResourceResponseBase::decode): Ditto.
1242         * platform/network/cf/ResourceResponseCFNet.cpp:
1243         (WebCore::ResourceResponse::platformLazyInit): Capture HTTP version.
1244         * platform/network/cocoa/ResourceResponseCocoa.mm:
1245         (WebCore::ResourceResponse::platformLazyInit): Ditto.
1246
1247 2016-01-13  Beth Dakin  <bdakin@apple.com>
1248
1249         WK2: Request completion candidates when needed
1250         https://bugs.webkit.org/show_bug.cgi?id=153040
1251         -and corresponding-
1252         rdar://problem/24155631
1253
1254         Reviewed by Enrica Casucci.
1255
1256         Helper functions for stringForCandidateRequest() and 
1257         handleAcceptedCandidate()
1258         * editing/Editor.cpp:
1259         (WebCore::candidateRangeForSelection):
1260         (WebCore::candidateWouldReplaceText):
1261
1262         Request candidates for the word that is currently being typed so long as the 
1263         candidate would replace that word. Otherwise, use String().
1264         (WebCore::Editor::stringForCandidateRequest):
1265
1266         When a candidate has been accepted, insert the text.
1267         (WebCore::Editor::handleAcceptedCandidate):
1268         * editing/Editor.h:
1269
1270 2016-01-13  Myles C. Maxfield  <mmaxfield@apple.com>
1271
1272         Addressing post-review comments after r194566
1273
1274         Unreviewed.
1275
1276         No new tests because there is no behavior difference.
1277
1278         * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
1279         (WebCore::textBreakLocalePreference):
1280         (WebCore::topLanguagePreference):
1281         (WebCore::getSearchLocale):
1282         (WebCore::getTextBreakLocale):
1283         (WebCore::canonicalLanguageIdentifier): Deleted.
1284
1285 2016-01-12  Ryosuke Niwa  <rniwa@webkit.org>
1286
1287         formaction must return document's address when formaction is missing
1288         https://bugs.webkit.org/show_bug.cgi?id=148874
1289
1290         Reviewed by Chris Dumez.
1291
1292         Fixed the bug by falling back to document.url() when the attribute is not set or is empty in formAction getter.
1293
1294         Test: fast/forms/formaction-attribute-with-empty-value.html
1295
1296         * html/HTMLButtonElement.idl:
1297         * html/HTMLFormControlElement.cpp:
1298         (WebCore::HTMLFormControlElement::formAction): Added.
1299         (WebCore::HTMLFormControlElement::setFormAction): Added.
1300         * html/HTMLFormControlElement.h:
1301         * html/HTMLInputElement.idl:
1302
1303 2016-01-13  Chris Dumez  <cdumez@apple.com>
1304
1305         Unreviewed, rolling out r194900.
1306
1307         Roll back in as this did not actually regress PLT
1308
1309         Reverted changeset:
1310
1311         "Unreviewed, rolling out r194826."
1312         https://bugs.webkit.org/show_bug.cgi?id=153020
1313         http://trac.webkit.org/changeset/194900
1314
1315 2016-01-13  Konstantin Tokarev  <annulen@yandex.ru>
1316
1317         Removed empty #if block from Font.h
1318         https://bugs.webkit.org/show_bug.cgi?id=153067
1319
1320         Reviewed by Alex Christensen.
1321
1322         No new tests needed.
1323
1324         * platform/graphics/Font.h:
1325         (WebCore::Font::scriptCache): Deleted.
1326
1327 2016-01-13  Michael Catanzaro  <mcatanzaro@igalia.com>
1328
1329         [GTK] Consistently use virtual and override specifiers in ScrollbarThemeGtk
1330         https://bugs.webkit.org/show_bug.cgi?id=153076
1331
1332         Reviewed by Alex Christensen.
1333
1334         No behavior change.
1335
1336         * platform/gtk/ScrollbarThemeGtk.h:
1337
1338 2016-01-13  Daniel Bates  <dabates@apple.com>
1339
1340         Cleanup: XSS Auditor should avoid re-evaluating the parsed script tag
1341         https://bugs.webkit.org/show_bug.cgi?id=152870
1342
1343         Reviewed by Brent Fulgham.
1344
1345         Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
1346         <https://src.chromium.org/viewvc/blink?revision=154354&view=revision>
1347
1348         Although the XSS Auditor caches the decoded start tag of a script as an optimization to
1349         avoid decoding it again when filtering the character data of the script, it is sufficient
1350         to cache whether the HTTP response contains the decoded start tag of a script. This
1351         avoids both decoding the start tag of a script and determining whether the HTTP response
1352         contains it again when filtering the character data of the script. Moreover, this removes
1353         the need to cache a string object.
1354
1355         * html/parser/XSSAuditor.cpp:
1356         (WebCore::XSSAuditor::filterCharacterToken):
1357         (WebCore::XSSAuditor::filterScriptToken):
1358         * html/parser/XSSAuditor.h:
1359
1360 2016-01-13  Commit Queue  <commit-queue@webkit.org>
1361
1362         Unreviewed, rolling out r194963.
1363         https://bugs.webkit.org/show_bug.cgi?id=153079
1364
1365         This change causes ASan tests to crash and exit early
1366         (Requested by ryanhaddad on #webkit).
1367
1368         Reverted changeset:
1369
1370         "Fragmentation-free allocator for timeless and/or coupled
1371         allocations."
1372         https://bugs.webkit.org/show_bug.cgi?id=152696
1373         http://trac.webkit.org/changeset/194963
1374
1375 2016-01-13  Daniel Bates  <dabates@apple.com>
1376
1377         [XSS Auditor] Do not include trailing comment characters in JavaScript snippets
1378         https://bugs.webkit.org/show_bug.cgi?id=152873
1379
1380         Reviewed by Brent Fulgham.
1381
1382         Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
1383         <https://src.chromium.org/viewvc/blink?view=rev&revision=169967>
1384
1385         Test: http/tests/security/xssAuditor/script-tag-with-injected-comment.html
1386
1387         * html/parser/XSSAuditor.cpp:
1388         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
1389
1390 2016-01-13  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1391
1392         WebRTC: Add support for RTCRtpSender.replaceTrack()
1393         https://bugs.webkit.org/show_bug.cgi?id=153063
1394
1395         Reviewed by Eric Carlson.
1396
1397         Add the API and infrastructure to support RTCRtpSender.replaceTrack(). The platform is
1398         reached through the RTCPeerConnection object that created the RTCRtpSender via a client
1399         interface.
1400
1401         Test: fast/mediastream/RTCRtpSender-replaceTrack.html
1402
1403         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1404         (WebCore::MediaEndpointPeerConnection::replaceTrack):
1405         * Modules/mediastream/MediaEndpointPeerConnection.h:
1406         * Modules/mediastream/PeerConnectionBackend.h:
1407         * Modules/mediastream/RTCPeerConnection.cpp:
1408         (WebCore::RTCPeerConnection::addTrack):
1409         (WebCore::RTCPeerConnection::removeTrack):
1410         (WebCore::RTCPeerConnection::replaceTrack):
1411         * Modules/mediastream/RTCPeerConnection.h:
1412         * Modules/mediastream/RTCRtpSender.cpp:
1413         (WebCore::RTCRtpSender::RTCRtpSender):
1414         (WebCore::RTCRtpSender::replaceTrack):
1415         * Modules/mediastream/RTCRtpSender.h:
1416         (WebCore::RTCRtpSenderClient::~RTCRtpSenderClient):
1417         (WebCore::RTCRtpSender::create):
1418         (WebCore::RTCRtpSender::trackId):
1419         (WebCore::RTCRtpSender::stop):
1420         * Modules/mediastream/RTCRtpSender.idl:
1421
1422 2016-01-13  Brady Eidson  <beidson@apple.com>
1423
1424         Modern IDB: A few cursor tests are flaky because JS wrappers are GC'ed.
1425         https://bugs.webkit.org/show_bug.cgi?id=153038
1426
1427         Reviewed by Alex Christensen.
1428
1429         No new tests (Couldn't write a test that was any more reliable than "flaky", so fixing the existing flaky tests will do).
1430
1431         And IDBCursor has an associated IDBRequest that is re-used each time the IDBCursor iterates.
1432         
1433         The normal ActiveDOMObject approach to prevent the IDBRequest's wrapper from being garbage collected was not good enough
1434         because, while the IDBRequest may not currently be waiting on any activity, as long as its associated IDBCursor is still
1435         reachable then the request might be reused in the future.
1436         
1437         Fortunately there's an IDL allowance for "one object keeping another alive during GC" and that's JSCustomMarkFunction
1438         combined with GenerateIsReachable.
1439         
1440         Applying those to IDBCursor and IDBRequest fix this handily.
1441         
1442         * CMakeLists.txt:
1443         * WebCore.xcodeproj/project.pbxproj:
1444
1445         * Modules/indexeddb/IDBCursor.h:
1446         (WebCore::IDBCursor::isModernCursor):
1447         * Modules/indexeddb/IDBCursor.idl:
1448         
1449         * Modules/indexeddb/IDBRequest.idl:
1450         
1451         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1452         (WebCore::IDBClient::IDBCursor::advance):
1453         (WebCore::IDBClient::IDBCursor::continueFunction):
1454         (WebCore::IDBClient::IDBCursor::uncheckedIterateCursor):
1455         (WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor): Deleted. Fixed the typo of this name.
1456         * Modules/indexeddb/client/IDBCursorImpl.h:
1457         
1458         * bindings/js/JSIDBCursorCustom.cpp: Added.
1459         (WebCore::JSIDBCursor::visitAdditionalChildren):
1460
1461 2016-01-13  Zalan Bujtas  <zalan@apple.com>
1462
1463         Get text drawing working with display lists.
1464         https://bugs.webkit.org/show_bug.cgi?id=152957
1465
1466         Reviewed by Simon Fraser.
1467
1468         This patch enables text drawing for display lists.
1469
1470         * platform/graphics/FontCascade.cpp:
1471         (WebCore::FontCascade::drawGlyphBuffer):
1472         * platform/graphics/FontCascade.h:
1473         * platform/graphics/GraphicsContext.cpp:
1474         (WebCore::GraphicsContext::drawGlyphs):
1475         (WebCore::GraphicsContext::drawText): Deleted.
1476         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1477         (WebCore::FontCascade::drawGlyphs):
1478         * platform/graphics/displaylists/DisplayListItems.cpp:
1479         (WebCore::DisplayList::DrawGlyphs::apply):
1480
1481 2016-01-13  Zalan Bujtas  <zalan@apple.com>
1482
1483         Simple line layout: Add support for word-break property.
1484         https://bugs.webkit.org/show_bug.cgi?id=153054
1485
1486         Reviewed by Antti Koivisto.
1487
1488         This patch enables word-break property for simple line layout.
1489         (https://drafts.csswg.org/css-text-3/#propdef-word-break)
1490
1491         word-break: normal and keep-all -> existing, non-(force)breaking behaviour.
1492                     break-all -> breaks words when needed.
1493
1494         Covered by existing tests like fast/text/word-break.html
1495
1496         * rendering/SimpleLineLayout.cpp:
1497         (WebCore::SimpleLineLayout::createLineRuns):
1498         (WebCore::SimpleLineLayout::canUseForStyle): Deleted.
1499         (WebCore::SimpleLineLayout::printReason): Deleted.
1500         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1501         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
1502         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
1503         * rendering/SimpleLineLayoutTextFragmentIterator.h:
1504         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
1505         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
1506         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isBreakable): Deleted.
1507         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
1508
1509 2016-01-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
1510
1511         Reference cycle between SVGPathElement and SVGPathSegWithContext leaks Document
1512         https://bugs.webkit.org/show_bug.cgi?id=151810
1513
1514         Reviewed by Darin Adler.
1515
1516         Break the reference cycle between SVGPathElement and SVGPathSegWithContext
1517         by changing the back-pointer to be a WeakPtr pointer instead of having it
1518         RefPtr. Make sure the SVGPathSegWithContext derived classes handle correctly
1519         the case when the SVGPathElement back-pointer is deleted.
1520
1521         Also change the SVGPathElement argument to the SVGPathSeg creation functions
1522         and constructors to be a const reference instead of having it as a pointer
1523         since SVGPathElement is the class factory for all these classes.
1524
1525         * svg/SVGPathElement.cpp:
1526         (WebCore::SVGPathElement::SVGPathElement):
1527         (WebCore::SVGPathElement::createSVGPathSegClosePath):
1528         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
1529         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
1530         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
1531         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
1532         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
1533         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
1534         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
1535         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
1536         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
1537         (WebCore::SVGPathElement::createSVGPathSegArcRel):
1538         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
1539         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
1540         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
1541         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
1542         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
1543         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
1544         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
1545         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
1546         (WebCore::SVGPathElement::isSupportedAttribute):
1547         * svg/SVGPathElement.h:
1548         * svg/SVGPathSegArc.h:
1549         (WebCore::SVGPathSegArc::SVGPathSegArc):
1550         * svg/SVGPathSegArcAbs.h:
1551         (WebCore::SVGPathSegArcAbs::create):
1552         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
1553         * svg/SVGPathSegArcRel.h:
1554         (WebCore::SVGPathSegArcRel::create):
1555         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
1556         * svg/SVGPathSegClosePath.h:
1557         (WebCore::SVGPathSegClosePath::create):
1558         (WebCore::SVGPathSegClosePath::SVGPathSegClosePath):
1559         * svg/SVGPathSegCurvetoCubic.h:
1560         (WebCore::SVGPathSegCurvetoCubic::SVGPathSegCurvetoCubic):
1561         * svg/SVGPathSegCurvetoCubicAbs.h:
1562         (WebCore::SVGPathSegCurvetoCubicAbs::create):
1563         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
1564         * svg/SVGPathSegCurvetoCubicRel.h:
1565         (WebCore::SVGPathSegCurvetoCubicRel::create):
1566         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
1567         * svg/SVGPathSegCurvetoCubicSmooth.h:
1568         (WebCore::SVGPathSegCurvetoCubicSmooth::SVGPathSegCurvetoCubicSmooth):
1569         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
1570         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
1571         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
1572         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
1573         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
1574         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
1575         * svg/SVGPathSegCurvetoQuadratic.h:
1576         (WebCore::SVGPathSegCurvetoQuadratic::SVGPathSegCurvetoQuadratic):
1577         * svg/SVGPathSegCurvetoQuadraticAbs.h:
1578         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
1579         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
1580         * svg/SVGPathSegCurvetoQuadraticRel.h:
1581         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
1582         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
1583         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
1584         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
1585         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
1586         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
1587         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
1588         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
1589         * svg/SVGPathSegLinetoAbs.h:
1590         (WebCore::SVGPathSegLinetoAbs::create):
1591         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
1592         * svg/SVGPathSegLinetoHorizontal.h:
1593         (WebCore::SVGPathSegLinetoHorizontal::SVGPathSegLinetoHorizontal):
1594         * svg/SVGPathSegLinetoHorizontalAbs.h:
1595         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
1596         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
1597         * svg/SVGPathSegLinetoHorizontalRel.h:
1598         (WebCore::SVGPathSegLinetoHorizontalRel::create):
1599         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
1600         * svg/SVGPathSegLinetoRel.h:
1601         (WebCore::SVGPathSegLinetoRel::create):
1602         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
1603         * svg/SVGPathSegLinetoVertical.h:
1604         (WebCore::SVGPathSegLinetoVertical::SVGPathSegLinetoVertical):
1605         * svg/SVGPathSegLinetoVerticalAbs.h:
1606         (WebCore::SVGPathSegLinetoVerticalAbs::create):
1607         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
1608         * svg/SVGPathSegLinetoVerticalRel.h:
1609         (WebCore::SVGPathSegLinetoVerticalRel::create):
1610         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
1611         * svg/SVGPathSegMovetoAbs.h:
1612         (WebCore::SVGPathSegMovetoAbs::create):
1613         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
1614         * svg/SVGPathSegMovetoRel.h:
1615         (WebCore::SVGPathSegMovetoRel::create):
1616         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
1617         * svg/SVGPathSegWithContext.h:
1618         (WebCore::SVGPathSegWithContext::SVGPathSegWithContext):
1619         (WebCore::SVGPathSegWithContext::animatedProperty):
1620         (WebCore::SVGPathSegWithContext::contextElement):
1621         (WebCore::SVGPathSegWithContext::setContextAndRole):
1622         (WebCore::SVGPathSegWithContext::commitChange):
1623         (WebCore::SVGPathSegSingleCoordinate::setY):
1624         (WebCore::SVGPathSegSingleCoordinate::SVGPathSegSingleCoordinate):
1625         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
1626         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
1627         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
1628         (WebCore::SVGPathSegListPropertyTearOff::removeItem):
1629
1630 2016-01-13  Andreas Kling  <akling@apple.com>
1631
1632         Use BumpArena for style sheet object tree.
1633         <https://webkit.org/b/152696>
1634
1635         Reviewed by Antti Koivisto.
1636
1637         Give each StyleSheetContents its own BumpArena, and plumb it down through CSSParser
1638         to allocate StyleRule, StyleProperties and CSSSelectorList's selector arrays there.
1639
1640         This basically means that most objects that make up a given style sheet will end up
1641         in one (or a few) contiguous region(s) of memory, instead of being scattered all
1642         over the malloc heap.
1643
1644         In the common case (no CSSOM manipulation), the lifetimes of these objects are very
1645         predictable: everything tends to die when the StyleSheetContents dies.
1646         This dramatically improves space-efficiency in those cases, and allows us to return
1647         contiguous chunks of memory to the system once a style sheet is no longer needed.
1648
1649         One-off CSS parses that don't work within a StyleSheetContents context will have
1650         their StyleRules & co allocated out of the global BumpArena.
1651
1652         Bonus: give SelectorQueryCache a dedicated BumpArena as well, since it has very
1653         predictable lifetime.
1654
1655         * css/CSSGrammar.y.in:
1656         * css/CSSKeyframesRule.h:
1657         (WebCore::StyleRuleKeyframes::create):
1658         * css/CSSParser.cpp:
1659         (WebCore::CSSParser::createStyleProperties):
1660         (WebCore::CSSParser::createMediaRule):
1661         (WebCore::CSSParser::createSupportsRule):
1662         (WebCore::CSSParser::createKeyframesRule):
1663         (WebCore::CSSParser::setArena):
1664         (WebCore::CSSParser::arena):
1665         (WebCore::CSSParser::createStyleRule):
1666         (WebCore::CSSParser::createFontFaceRule):
1667         (WebCore::CSSParser::createPageRule):
1668         (WebCore::CSSParser::createRegionRule):
1669         (WebCore::CSSParser::createViewportRule):
1670         * css/CSSParser.h:
1671         * css/CSSParserValues.cpp:
1672         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
1673         (WebCore::CSSParserSelector::adoptSelectorVector):
1674         * css/CSSParserValues.h:
1675         * css/CSSSelectorList.cpp:
1676         (WebCore::CSSSelectorList::CSSSelectorList):
1677         (WebCore::CSSSelectorList::adoptSelectorVector):
1678         (WebCore::CSSSelectorList::deleteSelectors):
1679         * css/CSSSelectorList.h:
1680         * css/StyleProperties.cpp:
1681         (WebCore::ImmutableStyleProperties::create):
1682         (WebCore::StyleProperties::immutableCopyIfNeeded):
1683         * css/StyleProperties.h:
1684         * css/StyleRule.cpp:
1685         (WebCore::StyleRule::create):
1686         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
1687         (WebCore::StyleRuleRegion::StyleRuleRegion):
1688         * css/StyleRule.h:
1689         (WebCore::StyleRule::create):
1690         (WebCore::StyleRule::parserAdoptSelectorVector):
1691         (WebCore::StyleRuleFontFace::create):
1692         (WebCore::StyleRulePage::create):
1693         (WebCore::StyleRulePage::parserAdoptSelectorVector):
1694         (WebCore::StyleRuleMedia::create):
1695         (WebCore::StyleRuleSupports::create):
1696         (WebCore::StyleRuleRegion::create):
1697         (WebCore::StyleRuleViewport::create):
1698         * css/StyleSheetContents.cpp:
1699         (WebCore::StyleSheetContents::StyleSheetContents):
1700         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1701         (WebCore::StyleSheetContents::parseStringAtPosition):
1702         * css/StyleSheetContents.h:
1703         * dom/SelectorQuery.cpp:
1704         (WebCore::SelectorQueryCache::SelectorQueryCache):
1705         (WebCore::SelectorQueryCache::add):
1706         * dom/SelectorQuery.h:
1707         * svg/SVGFontFaceElement.cpp:
1708         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
1709
1710 2016-01-13  YongGeol Jung  <yg48.jung@samsung.com>
1711
1712         [TexMap] BitmapTextureGL is not released while scene is updated continuously.
1713         https://bugs.webkit.org/show_bug.cgi?id=152524
1714
1715         Reviewed by Žan Doberšek.
1716
1717         This patch fixes two issues.
1718         First, m_releaseUnusedTexturesTimer is not fired if scene is updated within 0.5s continuously.
1719         In this case, BitmapTexturePool will not remove texture even if texture is not used for long time.
1720         Second, m_releaseUnusedTexturesTimer is triggered by acquireTexture function only.
1721         So, if next scene does not need to use BitmapTexture, remained textures in pool will not removed.
1722
1723         No new tests needed.
1724
1725         * platform/graphics/texmap/BitmapTexturePool.cpp:
1726         (WebCore::BitmapTexturePool::scheduleReleaseUnusedTextures):
1727         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
1728
1729 2016-01-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1730
1731         [Streams API] Refactor builtin internals to prepare support for streams API in worker
1732         https://bugs.webkit.org/show_bug.cgi?id=152535
1733
1734         Reviewed by Darin Adler.
1735
1736         Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
1737         This file should be generated by the builtin generator once refactoring is done.
1738         This code is located in JSBuiltinInternalFunctions::initialize.
1739
1740         Adding private controller and reader constructors to the JS DOM constructor map so that they do not get garbage collected.
1741
1742         No change in behavior, except that private builtins are usable in workers (but not actually used).
1743
1744         * CMakeLists.txt:
1745         * WebCore.vcxproj/WebCore.vcxproj:
1746         * WebCore.xcodeproj/project.pbxproj:
1747         * bindings/js/JSDOMGlobalObject.cpp:
1748         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1749         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
1750         (WebCore::JSDOMGlobalObject::finishCreation):
1751         (WebCore::JSDOMGlobalObject::visitChildren):
1752         * bindings/js/JSDOMGlobalObject.h:
1753         * bindings/js/JSDOMWindowBase.cpp:
1754         (WebCore::JSDOMWindowBase::finishCreation):
1755         (WebCore::JSDOMWindowBase::visitChildren):
1756         * bindings/js/JSDOMWindowBase.h:
1757         * bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
1758         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
1759         (WebCore::JSBuiltinInternalFunctions::visit):
1760         (WebCore::JSBuiltinInternalFunctions::initialize):
1761         * bindings/js/WebCoreJSBuiltinInternals.h:
1762
1763 2016-01-13  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1764
1765         [EFL] Fix wrong return value of paintThemePart in RenderThemeEfl
1766         https://bugs.webkit.org/show_bug.cgi?id=153058
1767
1768         Reviewed by Carlos Garcia Campos.
1769
1770         To return false in paint functions in RenderThemeEfl means that it is supported though,
1771         paintThemePart has returned false even when failing to get image cache of theme.
1772
1773         * rendering/RenderThemeEfl.cpp:
1774         (WebCore::RenderThemeEfl::paintThemePart):
1775
1776 2016-01-12  Andy Estes  <aestes@apple.com>
1777
1778         [Content Filtering] forEachContentFilterUntilBlocked should accept a lambda by rvalue reference
1779         https://bugs.webkit.org/show_bug.cgi?id=153057
1780
1781         Reviewed by Dan Bernstein.
1782
1783         No new tests. No change in behavior.
1784
1785         Instead of having ContentFilter::forEachContentFilterUntilBlocked() take a std::function, just have it take an
1786         rvalue reference to the lambda its passed.
1787
1788         * loader/ContentFilter.cpp:
1789         (WebCore::ContentFilter::forEachContentFilterUntilBlocked):
1790         * loader/ContentFilter.h:
1791
1792 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1793
1794         [GTK] Fix return value of some paint methods in RenderThemeGtk
1795         https://bugs.webkit.org/show_bug.cgi?id=153015
1796
1797         Reviewed by Michael Catanzaro.
1798
1799         The bool value returned by paint methods in RenderTheme means
1800         whether the appearance is supported or not, so we should return
1801         true when not supported (so we didn't paint anything) and false
1802         when supported (so we actually painted the theme part).
1803
1804         * rendering/RenderThemeGtk.cpp:
1805         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
1806         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
1807         (WebCore::RenderThemeGtk::paintMediaButton):
1808         (WebCore::RenderThemeGtk::paintMediaMuteButton):
1809         (WebCore::RenderThemeGtk::paintMediaPlayButton):
1810         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
1811         (WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer): Deleted.
1812         * rendering/RenderThemeGtk.h:
1813
1814 2016-01-12  Andy Estes  <aestes@apple.com>
1815
1816         [Content Filtering] De-virtualize PlatformContentFilter::{needsMoreData, didBlockData}()
1817         https://bugs.webkit.org/show_bug.cgi?id=153052
1818
1819         Reviewed by Andreas Kling.
1820
1821         No new tests. No change in behavior.
1822
1823         Instead of having virtual functions that each platform content filter implement in terms of their own state,
1824         store the state in the base class so that these functions can be non-virtual. Teach each subclass to update the
1825         base class state appropriately.
1826
1827         * loader/ContentFilter.h:
1828         * platform/PlatformContentFilter.h:
1829         (WebCore::PlatformContentFilter::needsMoreData):
1830         (WebCore::PlatformContentFilter::didBlockData):
1831         * platform/cocoa/NetworkExtensionContentFilter.h:
1832         * platform/cocoa/NetworkExtensionContentFilter.mm:
1833         (WebCore::NetworkExtensionContentFilter::willSendRequest):
1834         (WebCore::NetworkExtensionContentFilter::responseReceived):
1835         (WebCore::NetworkExtensionContentFilter::handleDecision):
1836         (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Deleted.
1837         (WebCore::NetworkExtensionContentFilter::needsMoreData): Deleted.
1838         (WebCore::NetworkExtensionContentFilter::didBlockData): Deleted.
1839         * platform/cocoa/ParentalControlsContentFilter.h:
1840         * platform/cocoa/ParentalControlsContentFilter.mm:
1841         (WebCore::ParentalControlsContentFilter::responseReceived):
1842         (WebCore::ParentalControlsContentFilter::updateFilterState):
1843         (WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Deleted.
1844         (WebCore::ParentalControlsContentFilter::needsMoreData): Deleted.
1845         (WebCore::ParentalControlsContentFilter::didBlockData): Deleted.
1846         * platform/spi/cocoa/NEFilterSourceSPI.h:
1847         * testing/MockContentFilter.cpp:
1848         (WebCore::MockContentFilter::willSendRequest):
1849         (WebCore::MockContentFilter::maybeDetermineStatus):
1850         (WebCore::MockContentFilter::needsMoreData): Deleted.
1851         (WebCore::MockContentFilter::didBlockData): Deleted.
1852         * testing/MockContentFilter.h:
1853
1854 2016-01-12  Andy Estes  <aestes@apple.com>
1855
1856         Address missed review feedback after r194950.
1857
1858         * platform/cocoa/NetworkExtensionContentFilter.mm:
1859         (WebCore::NetworkExtensionContentFilter::initialize): Renamed the NetworkExtension dispatch queue.
1860
1861 2016-01-08  Andy Estes  <aestes@apple.com>
1862
1863         [Content Filtering] Lazily load platform frameworks
1864         https://bugs.webkit.org/show_bug.cgi?id=152881
1865         rdar://problem/23270886
1866
1867         Reviewed by Brady Eidson.
1868
1869         On Cocoa platforms, ContentFilter soft-links two frameworks that perform the underlying filtering operations.
1870         There is a one-time cost associated with the soft-linking, and the current design requires all clients to pay
1871         this cost whether or not they ever load a resource that is subject to filtering.
1872
1873         Addressed this by deferring the loading of frameworks until it is known that a resource will require filtering.
1874         It is rather simple to defer the soft-linking at the PlatformContentFilter level, but doing this alone would
1875         mean that every CachedRawResourceClient callback would be routed through ContentFilter, even in the very common
1876         case where both platform content filters are disabled. This is because checking if a platform content filter is
1877         enabled involves loading its framework, so creating a ContentFilter (which DocumentLoader will add as the
1878         CachedRawResource client in place of itself) cannot be avoided by checking that all its platform content filters
1879         are disabled.
1880
1881         Resolved this by inverting the relationship between ContentFilter and DocumentLoader. Instead of ContentFilter
1882         being the CachedRawResource's client and forwarding callbacks to DocumentLoader when one or more platform
1883         filters are enabled, DocumentLoader is now always the client and it forwards callbacks to ContentFilter.
1884         ContentFilter then returns a boolean value indicating whether or not DocumentLoader should proceed with each
1885         callback.
1886
1887         New API test: ContentFiltering.LazilyLoadPlatformFrameworks
1888
1889         * loader/ContentFilter.cpp:
1890         (WebCore::ContentFilter::create): Renamed from createIfEnabled(). Since the enabled check causes frameworks to
1891         be loaded, the check is skipped here and all types are always created.
1892         (WebCore::ContentFilter::continueAfterWillSendRequest): Renamed from willSendRequest(). Renamed requestCopy to
1893         originalRequest, and only created it for logging purposes. Since the copy was only used for logging purposes,
1894         request is now modified directly. Returned false if request is null.
1895         (WebCore::ContentFilter::continueAfterResponseReceived): Renamed from responseReceived(). Stopped asserting that
1896         resource is non-null, since it will be null in the case of substitute data loads. Stopped asserting that m_state
1897         is not Initialized, since that state was removed and the function can now be called in all states. Only logged
1898         if m_state is Filtering. Returned false if m_state is Blocked.
1899         (WebCore::ContentFilter::continueAfterDataReceived): Renamed from dataReceived(). Stopped asserting that
1900         resource is non-null and that m_state is Initialized, and moved the logging, for the same reasons as above.
1901         Returned false if m_state is Filtering or Blocked.
1902         (WebCore::ContentFilter::continueAfterNotifyFinished): Renamed from notifyFinished(). Stopped asserting that
1903         resource is non-null and that m_state is not Initialized, and moved the logging, for the same reasons as above.
1904         If m_state is not Blocked at this point, set m_state to Allowed in order for deliverResourceData() to not get
1905         caught in continueAfterDataReceived(). Returned false if m_state is Blocked or Stopped after delivering data.
1906         (WebCore::ContentFilter::createIfEnabled): Renamed to create().
1907         (WebCore::ContentFilter::~ContentFilter): Stopped removing ourself as m_mainResource's client.
1908         (WebCore::ContentFilter::willSendRequest): Renamed to continueAfterWillSendRequest().
1909         (WebCore::ContentFilter::startFilteringMainResource): Stopped adding ourself as m_mainResource's client. Stopped
1910         asserting that m_state is not Initialized and instead returned early if m_state is not Stopped.
1911         (WebCore::ContentFilter::stopFilteringMainResource): Stopped removing ourself as m_mainResource's client.
1912         (WebCore::ContentFilter::responseReceived): Renamed to continueAfterResponseReceived().
1913         (WebCore::ContentFilter::dataReceived): Renamed to continueAfterDataReceived().
1914         (WebCore::ContentFilter::redirectReceived): Removed. DocumentLoader now calls continueAfterWillSendRequest()
1915         directly on redirects.
1916         (WebCore::ContentFilter::notifyFinished): Renamed to continueAfterNotifyFinished().
1917         (WebCore::ContentFilter::didDecide): Instead of calling DocumentLoader::contentFilterDidDecide(), called
1918         DocumentLoader::contentFilterDidBlock() when m_state is Blocked.
1919         (WebCore::ContentFilter::deliverResourceData): Asserted that m_state is Allowed.
1920         * loader/ContentFilter.h: Stopped inheriting from CachedRawResourceClient. Redeclared the
1921         CachedRawResourceClient virtual functions as the continue* functions mentioned above. Made State enum private
1922         and removed Initialized. Initialized m_state to Stopped and removed its getter.
1923         (WebCore::ContentFilter::type): Returned a ContentFilter::Type that does not include an enabled function.
1924         * loader/DocumentLoader.cpp:
1925         (WebCore::DocumentLoader::notifyFinished): Returned early if ContentFilter::continueAfterNotifyFinished()
1926         returned false.
1927         (WebCore::DocumentLoader::willSendRequest): Called ContentFilter::continueAfterWillSendRequest() even for
1928         redirects, since ContentFilter is no longer a CachedRawResourceClient and so will no longer receive
1929         redirectReceived(). Returned early if continueAfterWillSendRequest() returns false.
1930         (WebCore::DocumentLoader::responseReceived): Returned early if ContentFilter::continueAfterResponseReceived()
1931         returned false.
1932         (WebCore::DocumentLoader::dataReceived): Ditto for ContentFilter::continueAfterDataReceived().
1933         (WebCore::DocumentLoader::startLoadingMainResource): Called ContentFilter::create(), not createIfEnabled().
1934         (WebCore::DocumentLoader::becomeMainResourceClient): Called ContentFilter::startFilteringMainResource() even if
1935         m_state is not Initialized. Added ourself as a client of m_mainResource unconditionally.
1936         (WebCore::DocumentLoader::contentFilterDidBlock): Renamed from contentFilterDidDecide. Removed assertions and
1937         the early return when m_state is Allowed, since the state is guaranteed to be Blocked.
1938         (WebCore::DocumentLoader::contentFilterDidDecide): Renamed to contentFilterDidBlock.
1939         * platform/cocoa/NetworkExtensionContentFilter.h: Moved definition of HAVE_NETWORK_EXTENSION to Platform.h so
1940         that this file doesn't need to become a Private header. Made enabled() private, and declared initialize().
1941         * platform/cocoa/NetworkExtensionContentFilter.mm:
1942         (WebCore::NetworkExtensionContentFilter::initialize): Added a function to lazily initialize the object.
1943         (WebCore::NetworkExtensionContentFilter::willSendRequest): For the modern NEFilterSource, checked if it is
1944         enabled only after checking if the request is HTTP(S). If both checks pass, then called initialize().
1945         (WebCore::NetworkExtensionContentFilter::responseReceived): Ditto for the legacy NEFilterSource.
1946         * platform/cocoa/ParentalControlsContentFilter.h: Made enabled() private.
1947         * platform/cocoa/ParentalControlsContentFilter.mm:
1948         (WebCore::ParentalControlsContentFilter::responseReceived): Checked if WebFilterEvaluator is enabled only after
1949         checking if the response is from a protocol that can be handled.
1950         * testing/MockContentFilter.cpp:
1951         (WebCore::MockContentFilter::willSendRequest): Immediately set m_status to Status::Allowed if !enabled().
1952         * testing/MockContentFilter.h: Made enabled() private.
1953
1954 2016-01-12  Commit Queue  <commit-queue@webkit.org>
1955
1956         Unreviewed, rolling out r194926 and r194928.
1957         https://bugs.webkit.org/show_bug.cgi?id=153048
1958
1959         This change is causing LayoutTest crashes (Requested by
1960         ryanhaddad on #webkit).
1961
1962         Reverted changesets:
1963
1964         "Avoid downloading the wrong image for <picture> elements."
1965         https://bugs.webkit.org/show_bug.cgi?id=153027
1966         http://trac.webkit.org/changeset/194926
1967
1968         "Avoid downloading the wrong image for <picture> elements."
1969         https://bugs.webkit.org/show_bug.cgi?id=153027
1970         http://trac.webkit.org/changeset/194928
1971
1972 2016-01-11  Dean Jackson  <dino@apple.com>
1973
1974         [iOS] Antialiasing doesn't work in WebGL
1975         https://bugs.webkit.org/show_bug.cgi?id=153000
1976         <rdar://problem/9165531>
1977
1978         Reviewed by Alex Christensen.
1979
1980         WebGL has supported platform antialiasing since
1981         the beginning, but we never hooked it up for iOS
1982         because it used a slightly different extension.
1983
1984         Test: fast/canvas/webgl/antialiasing-enabled.html
1985
1986         * platform/graphics/mac/GraphicsContext3DMac.mm:
1987         (WebCore::GraphicsContext3D::endPaint): Resolve the multisampling
1988         buffer once we're done painting.
1989         (WebCore::GraphicsContext3D::~GraphicsContext3D): We never created
1990         the m_compositorTexture RenderBuffer on iOS, so no point deleting
1991         it.
1992
1993         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1994         (WebCore::Extensions3DOpenGL::supportsExtension): The iOS extension
1995         has a slightly different name.
1996         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1997         (WebCore::GraphicsContext3D::reshapeFBOs): Make sure to create the
1998         multisample buffer with the correct format.
1999         (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): We
2000         need to remember what our bound frame buffer is when we
2001         enter this call, and restore it afterwards. In the middle we can
2002         discard our multisample read buffer once we have resolved it
2003         into the normal framebuffer.
2004
2005 2016-01-12  Daniel Bates  <dabates@apple.com>
2006
2007         XSS Auditor should navigate to empty substitute data on full page block
2008         https://bugs.webkit.org/show_bug.cgi?id=152868
2009         <rdar://problem/18658448>
2010
2011         Reviewed by David Kilzer and Andy Estes.
2012
2013         Derived from Blink patch (by Tom Sepez <tsepez@chromium.org>):
2014         <https://src.chromium.org/viewvc/blink?view=rev&revision=179240>
2015
2016         Test: http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url.html
2017
2018         * html/parser/XSSAuditorDelegate.cpp:
2019         (WebCore::XSSAuditorDelegate::didBlockScript): Modified to call NavigationScheduler::schedulePageBlock().
2020         * loader/NavigationScheduler.cpp:
2021         (WebCore::ScheduledPageBlock::ScheduledPageBlock): Added.
2022         (WebCore::NavigationScheduler::schedulePageBlock): Navigate to empty substitute data with
2023         the same URL as the originating document.
2024         * loader/NavigationScheduler.h:
2025
2026 2016-01-12  Dave Hyatt  <hyatt@apple.com>
2027
2028         Avoid downloading the wrong image for <picture> elements.
2029         https://bugs.webkit.org/show_bug.cgi?id=153027
2030
2031         Reviewed by Dean Jackson.
2032
2033         I was unable to write a reliable test for this feature (I welcome suggestions regarding
2034         how this could be tested).
2035
2036         * html/HTMLImageElement.cpp:
2037         (WebCore::HTMLImageElement::HTMLImageElement):
2038         (WebCore::HTMLImageElement::~HTMLImageElement):
2039         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
2040         (WebCore::HTMLImageElement::insertedInto):
2041         (WebCore::HTMLImageElement::removedFrom):
2042         (WebCore::HTMLImageElement::pictureNode):
2043         (WebCore::HTMLImageElement::setPictureNode):
2044         * html/HTMLImageElement.h:
2045         * html/parser/HTMLConstructionSite.cpp:
2046         (WebCore::HTMLConstructionSite::createHTMLElement):
2047
2048         Images that are built underneath a <picture> element are now connected
2049         to that picture element via a setPictureNode call from the parser. This
2050         ensures that the correct <source> elements are examined before checking the image.
2051
2052         This connection between images and their picture owners is handled using a static
2053         HashMap in HTMLImageElement. This connection is made both from the parser and from
2054         DOM insertions, and the map is queried now instead of looking directly at the
2055         image's parentNode().
2056
2057         Also note the change to pass the document element's computed style in for media
2058         query evaluation. Just as with the preload scanner, the image's style can't be
2059         used as it has not been determined yet.
2060
2061 2016-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
2062
2063         Cleanup in font loading code
2064         https://bugs.webkit.org/show_bug.cgi?id=153023
2065
2066         Reviewed by Zalan Bujtas.
2067
2068         See detailed notes below.
2069
2070         No new tests because there is no behavior change.
2071
2072         * css/CSSFontFace.cpp:
2073         (WebCore::CSSFontFace::isLoaded): Deleted. Never called.
2074         * css/CSSFontFace.h: Ditto.
2075         * css/CSSFontFaceSource.cpp:
2076         (WebCore::CSSFontFaceSource::font): No need to use a helper
2077         isLoaded() function.
2078         (WebCore::CSSFontFaceSource::isLoaded): Deleted. Unnecessary.
2079         * css/CSSFontFaceSource.h:
2080         * css/CSSFontFaceSrcValue.cpp:
2081         (WebCore::CSSFontFaceSrcValue::cachedFont): Un-indent code.
2082         * css/CSSFontSelector.cpp:
2083         (WebCore::registerLocalFontFacesForFamily): constructFamilyFontFaces()
2084         always returns an empty Vector. Therefore, the function of this function
2085         is to perform the ancillary processing related to the case where the Faces
2086         don't already exist. Renames the function and removes the empty vector
2087         return.
2088         (WebCore::CSSFontSelector::addFontFaceRule): Update for
2089         registerLocalFontFacesForFamily().
2090         (WebCore::FontFaceComparator::FontFaceComparator): Instead of using a static,
2091         construct a wrapper class around the comparator.
2092         (WebCore::FontFaceComparator::operator()): Ditto.
2093         (WebCore::CSSFontSelector::getFontFace): Un-indent code and update to use
2094         FontFaceComparator.
2095         (WebCore::CSSFontSelector::fallbackFontAt): Migrate off PassRefPtr.
2096         (WebCore::constructFamilyFontFaces): Deleted.
2097         (WebCore::compareFontFaces): Deleted.
2098         (WebCore::CSSFontSelector::resolvesFamilyFor): Deleted. Never called.
2099         * css/CSSFontSelector.h:
2100         * css/CSSSegmentedFontFace.cpp:
2101         (WebCore::CSSSegmentedFontFace::isValid): Deleted.
2102         (WebCore::CSSSegmentedFontFace::fontRanges): Cache negative validity results.
2103         * css/CSSSegmentedFontFace.h:
2104         * platform/graphics/FontCascade.h:
2105         (WebCore::FontCascade::fontSelector): Use nullptr.
2106         * platform/graphics/FontSelector.h:
2107
2108 2016-01-12  Ryosuke Niwa  <rniwa@webkit.org>
2109
2110         Add a build flag for custom element
2111         https://bugs.webkit.org/show_bug.cgi?id=153005
2112
2113         Reviewed by Alex Christensen.
2114
2115         Added a build flag for enabling custom elements.
2116
2117         * Configurations/FeatureDefines.xcconfig:
2118
2119 2016-01-12  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2120
2121         WebRTC: Update RTCPeerConnection.add/removeTrack() and add test
2122         https://bugs.webkit.org/show_bug.cgi?id=153010
2123
2124         Reviewed by Eric Carlson.
2125
2126         RTCPeerConnection.add/removeTrack() are not fully spec compliant yet, since that would
2127         require support for RTCRtpTransceiver which is a new work-in-progress feature. Use
2128         Vector, instead of map, for senders and receivers since nothing is removed from these
2129         sets anymore.
2130
2131         Test: fast/mediastream/RTCPeerConnection-add-removeTrack.html
2132
2133         * Modules/mediastream/RTCPeerConnection.cpp:
2134         (WebCore::RTCPeerConnection::addTrack):
2135         (WebCore::RTCPeerConnection::removeTrack):
2136         (WebCore::RTCPeerConnection::queuedCreateOffer): Deleted.
2137         * Modules/mediastream/RTCPeerConnection.h:
2138         * Modules/mediastream/RTCRtpSender.cpp:
2139         (WebCore::RTCRtpSender::RTCRtpSender):
2140         * Modules/mediastream/RTCRtpSender.h:
2141         (WebCore::RTCRtpSender::create):
2142         (WebCore::RTCRtpSender::mediaStreamIds):
2143
2144 2016-01-12  Brady Eidson  <beidson@apple.com>
2145
2146         Modern IDB: Check in empty SQLite backing store implementation.
2147         https://bugs.webkit.org/show_bug.cgi?id=153022
2148
2149         Reviewed by Alex Christensen.
2150
2151         No new tests (No change in behavior).
2152
2153         Just to get the implementation files in the tree, this backing store currently does nothing
2154         other than return errors for every operation.
2155
2156         * CMakeLists.txt:
2157         * WebCore.xcodeproj/project.pbxproj:
2158
2159         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Added.
2160         (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
2161         (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
2162         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
2163         (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
2164         (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
2165         (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
2166         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
2167         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
2168         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
2169         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
2170         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
2171         (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
2172         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
2173         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
2174         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
2175         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
2176         (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
2177         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
2178         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
2179         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
2180         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
2181         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
2182         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
2183         * Modules/indexeddb/server/SQLiteIDBBackingStore.h: Added.
2184
2185 2016-01-12  Brady Eidson  <beidson@apple.com>
2186
2187         Modern IDB: storage/indexeddb/dont-wedge.html is flaky.
2188         https://bugs.webkit.org/show_bug.cgi?id=152892
2189
2190         Reviewed by Alex Christensen.
2191
2192         No new tests (Reenabled existing test).
2193
2194         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2195         (WebCore::IDBClient::IDBConnectionToServer::abortOpenAndUpgradeNeeded):
2196         * Modules/indexeddb/client/IDBConnectionToServer.h:
2197         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2198
2199         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2200         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted): If the database was opened
2201           or an upgrade transaction was started, but the script execution context is already
2202           stopped, immediately message back to the server so it doesn't wedge.
2203
2204         * Modules/indexeddb/server/IDBServer.cpp:
2205         (WebCore::IDBServer::IDBServer::abortOpenAndUpgradeNeeded):
2206         * Modules/indexeddb/server/IDBServer.h:
2207
2208         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2209         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):
2210         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2211
2212         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2213         (WebCore::InProcessIDBServer::abortOpenAndUpgradeNeeded):
2214         * Modules/indexeddb/shared/InProcessIDBServer.h:
2215
2216 2016-01-12  Commit Queue  <commit-queue@webkit.org>
2217
2218         Unreviewed, rolling out r194826.
2219         https://bugs.webkit.org/show_bug.cgi?id=153020
2220
2221         Appears to have regressed PLT (Requested by kling on #webkit).
2222
2223         Reverted changeset:
2224
2225         "Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
2226         cont'd"
2227         https://bugs.webkit.org/show_bug.cgi?id=152902
2228         http://trac.webkit.org/changeset/194826
2229
2230 2016-01-12  Antti Koivisto  <antti@apple.com>
2231
2232         Don't reuse memory cache entries with different charset
2233         https://bugs.webkit.org/show_bug.cgi?id=110031
2234         rdar://problem/13666418
2235
2236         Reviewed by Andreas Kling.
2237
2238         Test: fast/loader/cache-encoding.html
2239
2240         * loader/cache/CachedResourceLoader.cpp:
2241         (WebCore::CachedResourceLoader::requestResource):
2242         (WebCore::logResourceRevalidationDecision):
2243         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2244
2245             Pass full CachedResourceRequest to the function.
2246             If charset differs don't reuse the cache entry.
2247
2248         * loader/cache/CachedResourceLoader.h:
2249
2250 2016-01-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2251
2252         Use a pointer instead of PassRefPtr in AbstractView argument of UIEvent class
2253         https://bugs.webkit.org/show_bug.cgi?id=152829
2254
2255         Reviewed by Darin Adler.
2256
2257         As a step to reduce uses of PassRefPtr, UIEvent class doesn't need to use PassRefPtr for AbstractView argument.
2258         Nobody hands us ownership when making one of these objects.
2259
2260         * dom/FocusEvent.cpp:
2261         (WebCore::FocusEvent::FocusEvent):
2262         * dom/FocusEvent.h:
2263         * dom/KeyboardEvent.cpp:
2264         (WebCore::KeyboardEvent::KeyboardEvent):
2265         * dom/MouseEvent.cpp:
2266         (WebCore::MouseEvent::create):
2267         (WebCore::MouseEvent::MouseEvent):
2268         (WebCore::MouseEvent::initMouseEvent):
2269         (WebCore::SimulatedMouseEvent::create):
2270         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
2271         * dom/MouseEvent.h:
2272         * dom/MouseRelatedEvent.cpp:
2273         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
2274         * dom/MouseRelatedEvent.h:
2275         * dom/TextEvent.cpp:
2276         (WebCore::TextEvent::create):
2277         (WebCore::TextEvent::createForPlainTextPaste):
2278         (WebCore::TextEvent::createForFragmentPaste):
2279         (WebCore::TextEvent::createForDrop):
2280         (WebCore::TextEvent::createForDictation):
2281         (WebCore::TextEvent::TextEvent):
2282         (WebCore::TextEvent::initTextEvent):
2283         * dom/TextEvent.h:
2284         * dom/TouchEvent.cpp:
2285         (WebCore::TouchEvent::TouchEvent):
2286         (WebCore::TouchEvent::initTouchEvent):
2287         * dom/TouchEvent.h:
2288         * dom/UIEvent.cpp:
2289         (WebCore::UIEvent::UIEvent):
2290         (WebCore::UIEvent::initUIEvent):
2291         * dom/UIEvent.h:
2292         (WebCore::UIEvent::create):
2293         (WebCore::UIEvent::view):
2294         * dom/UIEventWithKeyState.h:
2295         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
2296
2297 2016-01-12  Csaba Osztrogonác  <ossy@webkit.org>
2298
2299         Fix unused-private-field warnings in DisplayListItems.h
2300         https://bugs.webkit.org/show_bug.cgi?id=153012
2301
2302         Reviewed by Michael Catanzaro.
2303
2304         * platform/graphics/displaylists/DisplayListItems.cpp:
2305         (WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
2306         * platform/graphics/displaylists/DisplayListItems.h:
2307
2308 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2309
2310         Unreviewed. Fix isRecording condition logic in GraphicsContext::roundToDevicePixels after r194816.
2311
2312         This looks like a typo introduced in r194816, we want to return early logging
2313         a message when isRecording() returns true.
2314
2315         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2316         (WebCore::GraphicsContext::roundToDevicePixels):
2317         * platform/graphics/cg/GraphicsContextCG.cpp:
2318         (WebCore::GraphicsContext::roundToDevicePixels):
2319
2320 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2321
2322         Inconsistencies in main resource load delegates when loading from history
2323         https://bugs.webkit.org/show_bug.cgi?id=150927
2324
2325         Reviewed by Michael Catanzaro.
2326
2327         When restoring a page from the page cache, even though there
2328         isn't an actual load of resources, we are still emitting the load
2329         delegates to let the API layer know there are contents being
2330         loaded in the web view. This makes the page cache restoring
2331         transparent for the API layer. However, when restoring a page from
2332         the cache, all the delegates are emitted after the load is
2333         committed. This is not consistent with real loads, where we first
2334         load the main resource and once we get a response we commit the
2335         load. This inconsistency is problematic if the API layer expects
2336         to always have a main resource with a response when the load is
2337         committed. This is the case of the GTK+ port, for example. So,
2338         this patch ensures that when a page is restored from the page
2339         cache, the main resource load delegates that are emitted until a
2340         response is received in normal loads, are emitted before the load
2341         is committed.
2342
2343         Test: http/tests/loading/main-resource-delegates-on-back-navigation.html
2344
2345         * loader/FrameLoader.cpp:
2346         (WebCore::FrameLoader::commitProvisionalLoad): When loading from
2347         the page cache, send delegate messages up to didReceiveResponse
2348         for the main resource before the load is committed, and the
2349         remaining messages afterwards.
2350
2351 2016-01-09  Andy Estes  <aestes@apple.com>
2352
2353         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
2354         https://bugs.webkit.org/show_bug.cgi?id=152950
2355         rdar://problem/24066652
2356
2357         Reviewed by Tim Horton.
2358
2359         Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
2360         return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
2361
2362         New API test: WebKit2.AlwaysRevalidatedURLSchemes
2363
2364         * loader/cache/CachedResource.cpp:
2365         (WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
2366         (WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
2367         that scheme should always be revalidated according to SchemeRegistry.
2368         * platform/SchemeRegistry.cpp:
2369         (WebCore::alwaysRevalidatedSchemes):
2370         (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
2371         (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
2372         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
2373         There was no reason for this to be in SchemeRegistry.
2374         * platform/SchemeRegistry.h:
2375
2376 2016-01-11  Brady Eidson  <beidson@apple.com>
2377
2378         Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
2379         https://bugs.webkit.org/show_bug.cgi?id=152990
2380
2381         Reviewed by Alex Christensen.
2382
2383         No new tests (Covered by re-enabling existing test).
2384
2385         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2386         (WebCore::IDBClient::IDBRequest::dispatchEvent): Use String::utf8() instead of AtomicString::characters8() for
2387           the format string, as the latter fails under ASAN.
2388           
2389         * Modules/indexeddb/server/IndexValueStore.cpp:
2390         (WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey): We can't save off pointers to IDBKeyDatas
2391           used as keys in the map, because the moment we start mutating the map the keys can be rehashed, invalidating
2392           our pointers. Save off the IDBKeyDatas by value instead.
2393
2394 2016-01-11  Joseph Pecoraro  <pecoraro@apple.com>
2395
2396         Web Inspector: Migrate Page Timeline recording to ScriptProfiler
2397         https://bugs.webkit.org/show_bug.cgi?id=152727
2398
2399         Reviewed by Brian Burg.
2400
2401         Test: inspector/script-profiler/event-type-Other.html
2402
2403         This now shares the JavaScript profiling code between JSContext and Page
2404         inspection. It also moves forward splitting the Page's Timeline domain
2405         into smaller components that can be turned on/off individually.
2406
2407         * bindings/js/JSCallbackData.cpp:
2408         (WebCore::JSCallbackData::invokeCallback):
2409         * bindings/js/JSErrorHandler.cpp:
2410         (WebCore::JSErrorHandler::handleEvent):
2411         * bindings/js/JSEventListener.cpp:
2412         (WebCore::JSEventListener::handleEvent):
2413         * bindings/js/JSMainThreadExecState.h:
2414         (WebCore::JSMainThreadExecState::profiledCall):
2415         (WebCore::JSMainThreadExecState::profiledEvaluate):
2416         * bindings/js/JSMutationCallback.cpp:
2417         (WebCore::JSMutationCallback::call):
2418         * bindings/js/ScheduledAction.cpp:
2419         (WebCore::ScheduledAction::executeFunctionInContext):
2420         * bindings/js/ScriptController.cpp:
2421         (WebCore::ScriptController::evaluateInWorld):
2422         * bindings/objc/WebScriptObject.mm:
2423         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2424         (-[WebScriptObject evaluateWebScript:]):
2425         Identify entry points into JSC that we want to profile for the frontend.
2426         These were nearly all already classified for the Timeline. We added missing
2427         support for ErrorHandlers (window.onerror handler functions).
2428
2429         * inspector/InspectorTimelineAgent.cpp:
2430         (WebCore::InspectorTimelineAgent::didCallFunction):
2431         (WebCore::InspectorTimelineAgent::didEvaluateScript):
2432         (WebCore::startProfiling): Deleted.
2433         (WebCore::stopProfiling): Deleted.
2434         (WebCore::InspectorTimelineAgent::willCallFunction): Deleted.
2435         (WebCore::InspectorTimelineAgent::willEvaluateScript): Deleted.
2436         * inspector/InspectorTimelineAgent.h:
2437         TimelineAgent no longer needs to start/stop the Legacy Profiler
2438         since ScriptProfiler will automatically do that for us. Delete
2439         all code associated with that. There is still an open question
2440         regarding `console.profile` and `console.profileEnd` that
2441         starts/stops the profiler.
2442
2443 2016-01-11  Anders Carlsson  <andersca@apple.com>
2444
2445         Get rid of CFMakeCollectable, it is a no-op
2446         https://bugs.webkit.org/show_bug.cgi?id=152988
2447
2448         Reviewed by Sam Weinig.
2449
2450         * platform/mac/WebCoreNSURLExtras.mm:
2451         (WebCore::URLByTruncatingOneCharacterBeforeComponent):
2452         (WebCore::URLByRemovingComponentAndSubsequentCharacter):
2453
2454 2016-01-11  Commit Queue  <commit-queue@webkit.org>
2455
2456         Unreviewed, rolling out r194866.
2457         https://bugs.webkit.org/show_bug.cgi?id=152986
2458
2459         This change broke the mac build (Requested by ryanhaddad on
2460         #webkit).
2461
2462         Reverted changeset:
2463
2464         "[Cocoa] Add SPI to opt out a URL scheme from the memory
2465         cache"
2466         https://bugs.webkit.org/show_bug.cgi?id=152950
2467         http://trac.webkit.org/changeset/194866
2468
2469 2016-01-11  Zalan Bujtas  <zalan@apple.com>
2470
2471         Padding added to table-cell element after font-size change.
2472         https://bugs.webkit.org/show_bug.cgi?id=152796
2473
2474         Reviewed by David Hyatt.
2475
2476         Do not include intrinsicPaddingBefore value while figuring out the height of a row.
2477         In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
2478         without the additional padding (normal padding is included).
2479
2480         Test: fast/table/table-baseline-grows.html
2481
2482         * rendering/RenderTableSection.cpp:
2483         (WebCore::RenderTableSection::calcRowLogicalHeight):
2484
2485 2016-01-11  Andy Estes  <aestes@apple.com>
2486
2487         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
2488         https://bugs.webkit.org/show_bug.cgi?id=152950
2489         rdar://problem/24066652
2490
2491         Reviewed by Tim Horton.
2492
2493         Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
2494         return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
2495
2496         New API test: WebKit2.AlwaysRevalidatedURLSchemes
2497
2498         * loader/cache/CachedResource.cpp:
2499         (WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
2500         (WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
2501         that scheme should always be revalidated according to SchemeRegistry.
2502         * platform/SchemeRegistry.cpp:
2503         (WebCore::alwaysRevalidatedSchemes):
2504         (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
2505         (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
2506         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
2507         There was no reason for this to be in SchemeRegistry.
2508         * platform/SchemeRegistry.h:
2509
2510 2016-01-11  Dave Hyatt  <hyatt@apple.com>
2511
2512         Picture element needs to work with the preload scanner and select the correct
2513         source element instead of loading the image.
2514         https://bugs.webkit.org/show_bug.cgi?id=152983
2515
2516         Reviewed by Dean Jackson.
2517
2518         Added new tests in http/tests/loading.
2519
2520         * html/parser/HTMLPreloadScanner.cpp:
2521         (WebCore::TokenPreloadScanner::tagIdFor):
2522         (WebCore::TokenPreloadScanner::initiatorFor):
2523         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
2524         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2525         (WebCore::TokenPreloadScanner::StartTagScanner::processImageAndScriptAttribute):
2526         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2527         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
2528         (WebCore::TokenPreloadScanner::scan):
2529         * html/parser/HTMLPreloadScanner.h:
2530         (WebCore::TokenPreloadScanner::setPredictedBaseElementURL):
2531         (WebCore::TokenPreloadScanner::inPicture):
2532
2533 2016-01-11  Brady Eidson  <beidson@apple.com>
2534
2535         Modern IDB: storage/indexeddb/key-generator.html fails.
2536         https://bugs.webkit.org/show_bug.cgi?id=152981
2537
2538         Reviewed by Alex Christensen.
2539
2540         No new tests (One failing test now passes, and one test's results get a progression).
2541
2542         * Modules/indexeddb/server/IDBBackingStore.h:
2543         
2544         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2545         (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber): Throw an error if the current
2546           value is already over 2^53.
2547         (WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
2548         (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): Handle double -> uint64_t
2549           conversions properly when calculating the next key.
2550         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2551         
2552         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2553         (WebCore::IDBServer::ScopeGuard::ScopeGuard): Add this utility class to call a function 
2554           any time it goes out of scope.
2555         (WebCore::IDBServer::ScopeGuard::~ScopeGuard):
2556         (WebCore::IDBServer::ScopeGuard::enable):
2557         (WebCore::IDBServer::ScopeGuard::disable):
2558         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Revert the key generator value if
2559           the put/add operation ends in error.
2560
2561 2016-01-11  Brady Eidson  <beidson@apple.com>
2562
2563         Modern IDB: storage/indexeddb/lazy-index-population.html fails.
2564         https://bugs.webkit.org/show_bug.cgi?id=152976
2565
2566         Reviewed by Alex Christensen.
2567
2568         No new tests (At least one failing test now passes).
2569
2570         We were restoring objectstores/indexes incorrectly on transaction abort.
2571
2572         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2573         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2574         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2575         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
2576
2577 2016-01-11  Brady Eidson  <beidson@apple.com>
2578
2579         Modern IDB: Make MemoryIndex and MemoryObjectStore RefCounted.
2580         https://bugs.webkit.org/show_bug.cgi?id=152966
2581
2582         Reviewed by Alex Christensen.
2583
2584         No new tests (Refactor, no change in behavior)
2585
2586         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2587         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
2588         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
2589         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
2590         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
2591         
2592         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2593         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
2594         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
2595         (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
2596         (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
2597         (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
2598         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2599         
2600         * Modules/indexeddb/server/MemoryIndex.cpp:
2601         (WebCore::IDBServer::MemoryIndex::create):
2602         * Modules/indexeddb/server/MemoryIndex.h:
2603         
2604         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2605         (WebCore::IDBServer::MemoryObjectStore::create):
2606         (WebCore::IDBServer::MemoryObjectStore::createIndex):
2607         (WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
2608         (WebCore::IDBServer::MemoryObjectStore::takeIndexByName):
2609         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
2610         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForDeleteRecord):
2611         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
2612         (WebCore::IDBServer::MemoryObjectStore::registerIndex):
2613         * Modules/indexeddb/server/MemoryObjectStore.h:
2614
2615 2016-01-11  Andreas Kling  <akling@apple.com>
2616
2617         Fix other builds after my MSVC build fix. :-|
2618
2619         * css/StyleResolver.cpp:
2620
2621 2016-01-11  Andreas Kling  <akling@apple.com>
2622
2623         Fix MSVC build after r194848.
2624
2625         Since MSVC refuses to recognize the friendship between LazyNeverDestroyed
2626         and some CSS*Value classes, make their constructors public in MSVC builds.
2627
2628         Added FIXME's to make it look extra gross.
2629
2630         * css/CSSInheritedValue.h:
2631         (WebCore::CSSInheritedValue::create): Deleted.
2632         * css/CSSInitialValue.h:
2633         * css/CSSPrimitiveValue.h:
2634         * css/CSSRevertValue.h:
2635         (WebCore::CSSRevertValue::create): Deleted.
2636         * css/CSSUnsetValue.h:
2637         (WebCore::CSSUnsetValue::create): Deleted.
2638         * css/StyleResolver.cpp:
2639         (WebCore::StyleResolver::applyProperty):
2640
2641 2016-01-11  Andreas Kling  <akling@apple.com>
2642
2643         CSSValuePool should use nonfragmented storage for eternal caches.
2644         <https://webkit.org/b/152960>
2645
2646         Reviewed by Antti Koivisto.
2647
2648         Store all of the common cached CSS value objects in contiguous arrays
2649         instead of lazily allocating them on the heap.
2650
2651         This reduces heap fragmentation (win) and removes indirection (win)
2652
2653         * css/CSSInheritedValue.h:
2654         * css/CSSInitialValue.h:
2655         * css/CSSPrimitiveValue.h:
2656         * css/CSSRevertValue.h:
2657         * css/CSSUnsetValue.h:
2658         * css/CSSValuePool.cpp:
2659         (WebCore::CSSValuePool::CSSValuePool):
2660         (WebCore::CSSValuePool::createIdentifierValue):
2661         (WebCore::CSSValuePool::createColorValue):
2662         (WebCore::CSSValuePool::createValue):
2663         (WebCore::CSSValuePool::drain): Deleted.
2664         * css/CSSValuePool.h:
2665         (WebCore::CSSValuePool::createInheritedValue):
2666         (WebCore::CSSValuePool::createImplicitInitialValue):
2667         (WebCore::CSSValuePool::createExplicitInitialValue):
2668         (WebCore::CSSValuePool::createUnsetValue):
2669         (WebCore::CSSValuePool::createRevertValue):
2670
2671 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2672
2673         [GTK] Cleanup RenderThemeGtk
2674         https://bugs.webkit.org/show_bug.cgi?id=152888
2675
2676         Reviewed by Michael Catanzaro.
2677
2678         Use a common path for GTK+ 3.19 and previous versions, simplifying
2679         the code and removing a lot of ifdefs.
2680
2681          - createStyleContext() now receives a theme part enum value, and
2682            an optional parent GtkStyleContext. It encapsulates all the
2683            differences between GTK+ 3.19 and previous version leaving the
2684            rendering code common and free of ifdefs.
2685          - Stock icons support have been removed, simplifying the code
2686            that now always renders symbolic icons, updating the colors
2687            depending on the current state.
2688          - Media button and colors have been removed, because they are
2689            unused now that we render the media controls with CSS.
2690          - ComboBox separators support has also been removed. In GTK+ 3.19
2691            combo boxes no longer have separators and most of the GTK+
2692            themes don't use the either, so it's better to simple not render
2693            them anymore in WebKit either.
2694          - Code to paint caps lock indicator has been removed too, since
2695            caps lock indicator is now shadow dom and automatically
2696            rendered by WebCore.
2697
2698         * rendering/RenderThemeGtk.cpp:
2699         (WebCore::createStyleContext):
2700         (WebCore::loadThemedIcon):
2701         (WebCore::gtkIconStateFlags):
2702         (WebCore::RenderThemeGtk::adjustRepaintRect):
2703         (WebCore::setToggleSize):
2704         (WebCore::paintToggle):
2705         (WebCore::RenderThemeGtk::setCheckboxSize):
2706         (WebCore::RenderThemeGtk::paintCheckbox):
2707         (WebCore::RenderThemeGtk::setRadioSize):
2708         (WebCore::RenderThemeGtk::paintRadio):
2709         (WebCore::RenderThemeGtk::paintButton):
2710         (WebCore::getComboBoxMetrics):
2711         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
2712         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
2713         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
2714         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
2715         (WebCore::RenderThemeGtk::paintMenuList):
2716         (WebCore::RenderThemeGtk::paintTextField):
2717         (WebCore::adjustSearchFieldIconStyle):
2718         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
2719         (WebCore::paintIcon):
2720         (WebCore::paintEntryIcon):
2721         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
2722         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
2723         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
2724         (WebCore::RenderThemeGtk::shouldHaveCapsLockIndicator):
2725         (WebCore::RenderThemeGtk::paintSliderTrack):
2726         (WebCore::RenderThemeGtk::paintSliderThumb):
2727         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2728         (WebCore::RenderThemeGtk::paintProgressBar):
2729         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
2730         (WebCore::paintSpinArrowButton):
2731         (WebCore::RenderThemeGtk::paintInnerSpinButton):
2732         (WebCore::styleColor):
2733         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
2734         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
2735         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
2736         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
2737         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
2738         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
2739         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
2740         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
2741         (WebCore::RenderThemeGtk::systemColor):
2742         (WebCore::RenderThemeGtk::paintMediaButton):
2743         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
2744         (WebCore::RenderThemeGtk::paintMediaMuteButton):
2745         (WebCore::RenderThemeGtk::paintMediaPlayButton):
2746         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
2747         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
2748         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
2749         * rendering/RenderThemeGtk.h:
2750
2751 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2752
2753         [GTK] Cleanup ScrollbarThemeGtk
2754         https://bugs.webkit.org/show_bug.cgi?id=152830
2755
2756         Reviewed by Michael Catanzaro.
2757
2758         Use a common path for GTK+ 3.19 and previous versions, simplifying
2759         the code and removing a lot of ifdefs. Use always a new
2760         GtkStyleContext, but when painting cache the newly created one so
2761         all paint methods use that one. We were also caching some theme
2762         properties assuming they don't change unless the theme changes,
2763         but some of them can have different values depending on the state,
2764         for example, when hovered or pressed. Those properties are now
2765         only cached when we create a new GtkStyleContext.
2766         The method updateScrollbarsFrameThickness() has also been removed,
2767         since the Scrollbar constructor already initializes the frame rect
2768         using the scrollbarThickness(). This method was not doing anything
2769         anyway, since that was called on the constructor of the theme,
2770         when there were no scrollbars registered. This also means we no
2771         longer need to track registered/unregistered scrollbars.
2772
2773         * platform/gtk/ScrollbarThemeGtk.cpp:
2774         (WebCore::ScrollbarThemeGtk::backButtonRect): Use the cached
2775         GtkStyleContext and properties or create a new.
2776         (WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
2777         (WebCore::ScrollbarThemeGtk::trackRect): Ditto.
2778         (WebCore::orientationStyleClass):
2779         (WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Create a
2780         new GtkStyleContext for the scrollbar if there isn't a cached
2781         one. Also initialize the properties that depend on the state.
2782         (WebCore::createChildStyleContext): Create a new GtkStyleContext
2783         from a parent one.
2784         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Get the
2785         properties that can only change when the theme changes.
2786         (WebCore::ScrollbarThemeGtk::thumbRect): Use the cached
2787         GtkStyleContext and properties or create a new.
2788         (WebCore::adjustRectAccordingToMargin): Use always the
2789         GtkStyleContext state instead of receiving it and setting it again.
2790         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Get or create
2791         a GtkStyleContext for the scrollbar and create a child one for the trough.
2792         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Use the
2793         cached GtkStyleContext or create a new one.
2794         (WebCore::ScrollbarThemeGtk::paintThumb): Get or create a
2795         GtkStyleContext for the scrollbar and create a child ones for
2796         trough and slider.
2797         (WebCore::ScrollbarThemeGtk::paintButton): Get or create a
2798         GtkStyleContext for the scrollbar and create a child one for the button.
2799         (WebCore::ScrollbarThemeGtk::paint): Create a GtkStyleContext and
2800         cache it temporarily using TemporaryChange until the method finishes.
2801         (WebCore::ScrollbarThemeGtk::scrollbarThickness): Use the cached
2802         GtkStyleContext and properties or create a new.
2803         (WebCore::ScrollbarThemeGtk::buttonSize): Ditto.
2804         * platform/gtk/ScrollbarThemeGtk.h:
2805
2806 2016-01-10  Myles C. Maxfield  <mmaxfield@apple.com>
2807
2808         [SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
2809         https://bugs.webkit.org/show_bug.cgi?id=152772
2810         <rdar://problem/24043104>
2811
2812         Reviewed by Simon Fraser.
2813
2814         Originally, if we fail to parse a glyph, we would simply skip the glyph. However, this means that
2815         we will create an incomplete font without all the necessary glyphs. This causes very distressing
2816         text where all the occurances of a particular letter are missing. Instead, we should treat the
2817         entire font as invalid.
2818
2819         Test: fast/text/svg-font-invalid-glyph-path-failure.html
2820
2821         * css/CSSFontFaceSource.cpp:
2822         (WebCore::CSSFontFaceSource::font):
2823         * loader/cache/CachedSVGFont.cpp:
2824         (WebCore::CachedSVGFont::ensureCustomFontData):
2825         * svg/SVGToOTFFontConversion.cpp:
2826         (WebCore::SVGToOTFFontConverter::error):
2827         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
2828         (WebCore::SVGToOTFFontConverter::processGlyphElement):
2829         (WebCore::convertSVGToOTFFont):
2830         * svg/SVGToOTFFontConversion.h:
2831
2832 2016-01-10  Andreas Kling  <akling@apple.com>
2833
2834         Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL cont'd
2835         <https://webkit.org/b/152902>
2836
2837         Reviewed by Andy Estes.
2838
2839         Convert some more of the remaining clients to use NeverDestroyed.
2840
2841         * html/track/VTTRegion.cpp:
2842         (WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
2843         (WebCore::VTTRegion::textTrackRegionShadowPseudoId):
2844         * svg/properties/SVGAnimatedPropertyMacros.h:
2845
2846 2016-01-09  Simon Fraser  <simon.fraser@apple.com>
2847
2848         Hook up display-list drawing in GraphicsLayerCA
2849         https://bugs.webkit.org/show_bug.cgi?id=152946
2850
2851         Reviewed by Zalan Bujtas.
2852
2853         Have GraphicsLayerCA hold a DisplayList. If enabled, do a display-list record
2854         in GraphicsLayerCA::recursiveCommitChanges(), and a playback in GraphicsLayerCA::platformCALayerPaintContents().
2855         
2856         GraphicsLayerCA needs to maintain a m_hasEverPainted flag to know to do a full record
2857         at first paint (when there are no dirty rects).
2858         
2859         Plumb 'isUsingDisplayListDrawing' through to TileGrid via PlatformCALayer{Client}
2860         so that we can decorate the tile paint counters with an outline.
2861         
2862         Have RenderLayerCompositor push the displayListDrawingEnabled state down through
2863         RenderLayerBackings to GraphicsLayers.
2864         
2865         Convert RenderLayerCompositor to use initializers.
2866
2867         * platform/graphics/GraphicsLayer.cpp:
2868         (WebCore::GraphicsLayer::GraphicsLayer):
2869         * platform/graphics/GraphicsLayer.h:
2870         (WebCore::GraphicsLayer::usesDisplayListDrawing):
2871         (WebCore::GraphicsLayer::setUsesDisplayListDrawing):
2872         * platform/graphics/ca/GraphicsLayerCA.cpp:
2873         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2874         (WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):
2875         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2876         (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
2877         (WebCore::GraphicsLayerCA::updateDrawsContent):
2878         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
2879         * platform/graphics/ca/GraphicsLayerCA.h:
2880         * platform/graphics/ca/PlatformCALayer.cpp:
2881         (WebCore::PlatformCALayer::drawRepaintIndicator):
2882         * platform/graphics/ca/PlatformCALayerClient.h:
2883         (WebCore::PlatformCALayerClient::isUsingDisplayListDrawing):
2884         * platform/graphics/ca/TileGrid.cpp:
2885         (WebCore::TileGrid::platformCALayerShowRepaintCounter):
2886         (WebCore::TileGrid::isUsingDisplayListDrawing):
2887         * platform/graphics/ca/TileGrid.h:
2888         * platform/graphics/displaylists/DisplayList.h: Sadly need to include DisplayListItems.h
2889         to get things to compile. I wasn't able to avoid this even when making functions non-inline.
2890         * rendering/RenderLayerBacking.cpp:
2891         (WebCore::RenderLayerBacking::createGraphicsLayer):
2892         * rendering/RenderLayerCompositor.cpp:
2893         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2894         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2895         * rendering/RenderLayerCompositor.h:
2896
2897 2016-01-09  Zalan Bujtas  <zalan@apple.com>
2898
2899         REGRESSION (r194426): First email field is not autofilled on amazon.com
2900         https://bugs.webkit.org/show_bug.cgi?id=152945
2901         <rdar://problem/24082914>
2902
2903         Reviewed by Simon Fraser.
2904
2905         r194426 missed marking the m_layoutRoot for layout while converting to full layout (it only marked the new layout root).
2906
2907         Test: fast/forms/multiple-subtree-layout-failure.html
2908
2909         * page/FrameView.cpp:
2910         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2911
2912 2016-01-09  Dan Bernstein  <mitz@apple.com>
2913
2914         [Cocoa] Allow overriding the frameworks directory independently of using a staging install path
2915         https://bugs.webkit.org/show_bug.cgi?id=152926
2916
2917         Reviewed by Tim Horton.
2918
2919         Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
2920         where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
2921         WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.
2922
2923         Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.
2924
2925         * Configurations/WebCore.xcconfig:
2926         - Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with
2927           WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces.
2928         - Define WEBCORE_FRAMEWORKS_DIR and PRODUCTION_FRAMEWORKS_DIR based on
2929           WK_OVERRIDE_FRAMEWORKS_DIR.
2930
2931         * WebCore.xcodeproj/project.pbxproj: Work around make’s inability to handle spaces in paths
2932           by creating a symlink to JAVASCRIPTCORE_PRIVATE_HEADERS_DIR under BUILT_PRODUCTS_DIR and
2933           using the symlink as the value of JavaScriptCore_SCRIPTS_DIR.
2934
2935 2016-01-09  Andreas Kling  <akling@apple.com>
2936
2937         Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
2938         <https://webkit.org/b/152902>
2939
2940         Reviewed by Anders Carlsson.
2941
2942         Mostly mechanical conversion to NeverDestroyed throughout WebCore.
2943
2944         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
2945         (WebCore::stringForPlaybackTargetAvailability):
2946         * Modules/indexeddb/IDBCursor.cpp:
2947         (WebCore::IDBCursor::directionNext):
2948         (WebCore::IDBCursor::directionNextUnique):
2949         (WebCore::IDBCursor::directionPrev):
2950         (WebCore::IDBCursor::directionPrevUnique):
2951         * Modules/indexeddb/IDBTransaction.cpp:
2952         (WebCore::IDBTransaction::modeReadOnly):
2953         (WebCore::IDBTransaction::modeReadWrite):
2954         (WebCore::IDBTransaction::modeVersionChange):
2955         (WebCore::IDBTransaction::modeReadOnlyLegacy):
2956         (WebCore::IDBTransaction::modeReadWriteLegacy):
2957         * Modules/indexeddb/legacy/LegacyRequest.cpp:
2958         (WebCore::LegacyRequest::readyState):
2959         * Modules/mediacontrols/MediaControlsHost.cpp:
2960         (WebCore::MediaControlsHost::automaticKeyword):
2961         (WebCore::MediaControlsHost::forcedOnlyKeyword):
2962         (WebCore::MediaControlsHost::alwaysOnKeyword):
2963         (WebCore::MediaControlsHost::externalDeviceType):
2964         * Modules/mediasource/MediaSource.cpp:
2965         (WebCore::MediaSource::openKeyword):
2966         (WebCore::MediaSource::closedKeyword):
2967         (WebCore::MediaSource::endedKeyword):
2968         (WebCore::MediaSource::streamEndedWithError):
2969         * Modules/plugins/QuickTimePluginReplacement.mm:
2970         (WebCore::quickTimePluginReplacementScript):
2971         (WebCore::QuickTimePluginReplacement::supportsMimeType):
2972         (WebCore::QuickTimePluginReplacement::supportsFileExtension):
2973         * Modules/speech/SpeechSynthesis.cpp:
2974         (WebCore::SpeechSynthesis::boundaryEventOccurred):
2975         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2976         (WebCore::cssPropertyIDForJSCSSPropertyName):
2977         * bridge/c/c_instance.cpp:
2978         (JSC::Bindings::globalExceptionString):
2979         * css/MediaList.cpp:
2980         (WebCore::addResolutionWarningMessageToConsole):
2981         * css/StyleSheetContents.cpp:
2982         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2983         * dom/ChildListMutationScope.cpp:
2984         (WebCore::accumulatorMap):
2985         * dom/DOMImplementation.cpp:
2986         (WebCore::isSupportedSVG10Feature):
2987         (WebCore::isSupportedSVG11Feature):
2988         * dom/Document.cpp:
2989         (WebCore::Document::readyState):
2990         * dom/Element.cpp:
2991         (WebCore::Element::webkitRegionOverset):
2992         * dom/EventDispatcher.cpp:
2993         (WebCore::EventDispatcher::dispatchSimulatedClick):
2994         * dom/InlineStyleSheetOwner.cpp:
2995         (WebCore::isValidCSSContentType):
2996         * dom/MutationObserver.cpp:
2997         (WebCore::activeMutationObservers):
2998         (WebCore::suspendedMutationObservers):
2999         * dom/MutationRecord.cpp:
3000         * dom/PseudoElement.cpp:
3001         (WebCore::pseudoElementTagName):
3002         (WebCore::PseudoElement::pseudoElementNameForEvents):
3003         * dom/QualifiedName.cpp:
3004         (WebCore::qualifiedNameCache):
3005         (WebCore::nullQName):
3006         * dom/ScriptElement.cpp:
3007         (WebCore::isLegacySupportedJavaScriptLanguage):
3008         (WebCore::ScriptElement::notifyFinished):
3009         * editing/ApplyStyleCommand.cpp:
3010         (WebCore::styleSpanClassString):
3011         * editing/MarkupAccumulator.cpp:
3012         (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
3013         * editing/ReplaceSelectionCommand.cpp:
3014         (WebCore::isInterchangeNewlineNode):
3015         (WebCore::isInterchangeConvertedSpaceSpan):
3016         * editing/htmlediting.cpp:
3017         (WebCore::nonBreakingSpaceString):
3018         * editing/markup.cpp:
3019         (WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
3020         (WebCore::createMarkupInternal):
3021         * fileapi/Blob.cpp:
3022         (WebCore::BlobURLRegistry::registry):
3023         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
3024         (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
3025         * html/DateInputType.cpp:
3026         (WebCore::DateInputType::createStepRange):
3027         * html/DateTimeInputType.cpp:
3028         (WebCore::DateTimeInputType::createStepRange):
3029         * html/DateTimeLocalInputType.cpp:
3030         (WebCore::DateTimeLocalInputType::createStepRange):
3031         * html/EmailInputType.cpp:
3032         (WebCore::isValidEmailAddress):
3033         * html/FormController.cpp:
3034         (WebCore::FormKeyGenerator::formKey):
3035         (WebCore::formStateSignature):
3036         * html/HTMLAnchorElement.cpp:
3037         (WebCore::rootEditableElementMap):
3038         * html/HTMLButtonElement.cpp:
3039         (WebCore::HTMLButtonElement::formControlType):
3040         * html/HTMLFieldSetElement.cpp:
3041         (WebCore::HTMLFieldSetElement::formControlType):
3042         * html/HTMLFrameOwnerElement.h:
3043         (WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
3044         * html/HTMLKeygenElement.cpp:
3045         (WebCore::HTMLKeygenElement::formControlType):
3046         * html/HTMLLinkElement.cpp:
3047         (WebCore::linkLoadEventSender):
3048         * html/HTMLMediaElement.cpp:
3049         (WebCore::documentToElementSetMap):
3050         * html/HTMLObjectElement.cpp:
3051         (WebCore::isRecognizedTagName):
3052         * html/HTMLOptGroupElement.cpp:
3053         (WebCore::HTMLOptGroupElement::formControlType):
3054         * html/HTMLOutputElement.cpp:
3055         (WebCore::HTMLOutputElement::formControlType):
3056         * html/HTMLPlugInElement.cpp:
3057         (WebCore::registeredPluginReplacements):
3058         * html/HTMLPlugInImageElement.cpp:
3059         (WebCore::titleText):
3060         (WebCore::subtitleText):
3061         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
3062         * html/HTMLSelectElement.cpp:
3063         (WebCore::HTMLSelectElement::formControlType):
3064         * html/HTMLStyleElement.cpp:
3065         (WebCore::styleLoadEventSender):
3066         * html/HTMLTextAreaElement.cpp:
3067         (WebCore::HTMLTextAreaElement::formControlType):
3068         * html/HTMLTextFormControlElement.cpp:
3069         (WebCore::directionString):
3070         * html/ImageInputType.cpp:
3071         (WebCore::ImageInputType::appendFormData):
3072         * html/InputTypeNames.cpp:
3073         (WebCore::InputTypeNames::button):
3074         (WebCore::InputTypeNames::checkbox):
3075         (WebCore::InputTypeNames::color):
3076         (WebCore::InputTypeNames::date):
3077         (WebCore::InputTypeNames::datetime):
3078         (WebCore::InputTypeNames::datetimelocal):
3079         (WebCore::InputTypeNames::email):
3080         (WebCore::InputTypeNames::file):
3081         (WebCore::InputTypeNames::hidden):
3082         (WebCore::InputTypeNames::image):
3083         (WebCore::InputTypeNames::month):
3084         (WebCore::InputTypeNames::number):
3085         (WebCore::InputTypeNames::password):
3086         (WebCore::InputTypeNames::radio):
3087         (WebCore::InputTypeNames::range):
3088         (WebCore::InputTypeNames::reset):
3089         (WebCore::InputTypeNames::search):
3090         (WebCore::InputTypeNames::submit):
3091         (WebCore::InputTypeNames::telephone):
3092         (WebCore::InputTypeNames::text):
3093         (WebCore::InputTypeNames::time):
3094         (WebCore::InputTypeNames::url):
3095         (WebCore::InputTypeNames::week):
3096         * html/MediaController.cpp:
3097         (playbackStateWaiting):
3098         (playbackStatePlaying):
3099         (playbackStateEnded):
3100         * html/MonthInputType.cpp:
3101         (WebCore::MonthInputType::createStepRange):
3102         * html/NumberInputType.cpp:
3103         (WebCore::NumberInputType::createStepRange):
3104         * html/RangeInputType.cpp:
3105         (WebCore::RangeInputType::createStepRange):
3106         * html/StepRange.cpp:
3107         (WebCore::StepRange::acceptableError):
3108         (WebCore::StepRange::alignValueForStep):
3109         (WebCore::StepRange::stepMismatch):
3110         * html/TimeInputType.cpp:
3111         (WebCore::TimeInputType::createStepRange):
3112         * html/WeekInputType.cpp:
3113         (WebCore::WeekInputType::createStepRange):
3114         * html/canvas/CanvasRenderingContext2D.cpp:
3115         (WebCore::CanvasRenderingContext2D::getImageData):
3116         * html/parser/XSSAuditor.cpp:
3117         (WebCore::XSSAuditor::init):
3118         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3119         * html/shadow/MediaControlElements.cpp:
3120         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
3121         (WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId):
3122         (WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId):
3123         * html/shadow/MeterShadowElement.cpp:
3124         (WebCore::MeterInnerElement::MeterInnerElement):
3125         (WebCore::MeterValueElement::valuePseudoId):
3126         * html/shadow/MeterShadowElement.h:
3127         * html/shadow/SliderThumbElement.cpp:
3128         (WebCore::sliderThumbShadowPseudoId):
3129         (WebCore::mediaSliderThumbShadowPseudoId):
3130         (WebCore::SliderContainerElement::shadowPseudoId):
3131         * html/track/AudioTrack.cpp:
3132         (WebCore::AudioTrack::alternativeKeyword):
3133         (WebCore::AudioTrack::descriptionKeyword):
3134         (WebCore::AudioTrack::mainKeyword):
3135         (WebCore::AudioTrack::mainDescKeyword):
3136         (WebCore::AudioTrack::translationKeyword):
3137         (WebCore::AudioTrack::commentaryKeyword):
3138         * html/track/TextTrack.cpp:
3139         (WebCore::TextTrack::subtitlesKeyword):
3140         (WebCore::TextTrack::captionsKeyword):
3141         (WebCore::TextTrack::descriptionsKeyword):
3142         (WebCore::TextTrack::chaptersKeyword):
3143         (WebCore::TextTrack::metadataKeyword):
3144         (WebCore::TextTrack::forcedKeyword):
3145         (WebCore::TextTrack::disabledKeyword):
3146         (WebCore::TextTrack::hiddenKeyword):
3147         (WebCore::TextTrack::showingKeyword):
3148         * html/track/TextTrackCue.h:
3149         (WebCore::TextTrackCue::cueShadowPseudoId):
3150         * html/track/VTTCue.cpp:
3151         (WebCore::startKeyword):
3152         (WebCore::middleKeyword):
3153         (WebCore::endKeyword):
3154         (WebCore::leftKeyword):
3155         (WebCore::rightKeyword):
3156         (WebCore::verticalGrowingLeftKeyword):
3157         (WebCore::verticalGrowingRightKeyword):
3158         (WebCore::VTTCueBox::vttCueBoxShadowPseudoId):
3159         (WebCore::VTTCue::cueBackdropShadowPseudoId):
3160         (WebCore::VTTCue::determineTextDirection):
3161         (WebCore::VTTCue::markFutureAndPastNodes):
3162         * html/track/VTTRegion.cpp:
3163         (WebCore::VTTRegion::scroll):
3164         (WebCore::VTTRegion::setScroll):
3165         (WebCore::VTTRegion::parseSettingValue):
3166         (WebCore::VTTRegion::textTrackCueContainerScrollingClass):
3167         * html/track/VideoTrack.cpp:
3168         (WebCore::VideoTrack::alternativeKeyword):
3169         (WebCore::VideoTrack::captionsKeyword):
3170         (WebCore::VideoTrack::mainKeyword):
3171         (WebCore::VideoTrack::signKeyword):
3172         (WebCore::VideoTrack::subtitlesKeyword):
3173         (WebCore::VideoTrack::commentaryKeyword):
3174         * html/track/WebVTTElement.cpp:
3175         (WebCore::nodeTypeToTagName):
3176         * html/track/WebVTTElement.h:
3177         * html/track/WebVTTParser.cpp:
3178         (WebCore::WebVTTParser::collectMetadataHeader):
3179         * inspector/InspectorCSSAgent.cpp:
3180         (WebCore::computePseudoClassMask):
3181         * inspector/InspectorPageAgent.cpp:
3182         (WebCore::InspectorPageAgent::sourceMapURLForResource):
3183         * inspector/InspectorStyleSheet.cpp:
3184         (WebCore::selectorsFromSource):
3185         * inspector/PageDebuggerAgent.cpp:
3186         (WebCore::PageDebuggerAgent::sourceMapURLForScript):
3187         * loader/ImageLoader.cpp:
3188         (WebCore::ImageLoader::notifyFinished):
3189         * loader/TextTrackLoader.cpp:
3190         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
3191         * loader/cache/CachedResourceRequest.cpp:
3192         (WebCore::CachedResourceRequest::initiatorName):
3193         * loader/icon/IconDatabase.cpp:
3194         (WebCore::IconDatabase::defaultDatabaseFilename):
3195         * page/CaptionUserPreferences.cpp:
3196         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
3197         * page/CaptionUserPreferencesMediaAF.cpp:
3198         (WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
3199         (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
3200         * page/ContentSecurityPolicy.cpp:
3201         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
3202         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
3203         (WebCore::CSPDirectiveList::allowInlineScript):
3204         (WebCore::CSPDirectiveList::allowInlineStyle):
3205         (WebCore::CSPDirectiveList::allowEval):
3206         (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
3207         * page/DOMWindow.cpp:
3208         (WebCore::windowsWithUnloadEventListeners):
3209         (WebCore::windowsWithBeforeUnloadEventListeners):
3210         * page/EventHandler.cpp:
3211         (WebCore::EventHandler::dragState):
3212         (WebCore::focusDirectionForKey):
3213         * page/Frame.cpp:
3214         (WebCore::createRegExpForLabels):
3215         * page/NavigatorBase.cpp:
3216         (WebCore::NavigatorBase::platform):
3217         * page/PageVisibilityState.cpp:
3218         (WebCore::pageVisibilityStateString):
3219         * page/SecurityPolicy.cpp:
3220         (WebCore::originAccessMap):
3221         * page/UserContentURLPattern.cpp:
3222         (WebCore::UserContentURLPattern::parse):
3223         * page/animation/CSSPropertyAnimation.cpp:
3224         (WebCore::shadowForBlending):
3225         * page/animation/CompositeAnimation.cpp:
3226         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3227         * platform/Cursor.cpp:
3228         (WebCore::pointerCursor):
3229         (WebCore::crossCursor):
3230         (WebCore::handCursor):
3231         (WebCore::moveCursor):
3232         (WebCore::verticalTextCursor):
3233         (WebCore::cellCursor):
3234         (WebCore::contextMenuCursor):
3235         (WebCore::aliasCursor):
3236         (WebCore::zoomInCursor):
3237         (WebCore::zoomOutCursor):
3238         (WebCore::copyCursor):
3239         (WebCore::noneCursor):
3240         (WebCore::progressCursor):
3241         (WebCore::noDropCursor):
3242         (WebCore::notAllowedCursor):
3243         (WebCore::iBeamCursor):
3244         (WebCore::waitCursor):
3245         (WebCore::helpCursor):
3246         (WebCore::eastResizeCursor):
3247         (WebCore::northResizeCursor):
3248         (WebCore::northEastResizeCursor):
3249         (WebCore::northWestResizeCursor):
3250         (WebCore::southResizeCursor):
3251         (WebCore::southEastResizeCursor):
3252         (WebCore::southWestResizeCursor):
3253         (WebCore::westResizeCursor):
3254         (WebCore::northSouthResizeCursor):
3255         (WebCore::eastWestResizeCursor):
3256         (WebCore::northEastSouthWestResizeCursor):
3257         (WebCore::northWestSouthEastResizeCursor):
3258         (WebCore::columnResizeCursor):
3259         (WebCore::rowResizeCursor):
3260         (WebCore::middlePanningCursor):
3261         (WebCore::eastPanningCursor):
3262         (WebCore::northPanningCursor):
3263         (WebCore::northEastPanningCursor):
3264         (WebCore::northWestPanningCursor):
3265         (WebCore::southPanningCursor):
3266         (WebCore::southEastPanningCursor):
3267         (WebCore::southWestPanningCursor):
3268         (WebCore::westPanningCursor):
3269         (WebCore::grabCursor):
3270         (WebCore::grabbingCursor):
3271         * platform/Language.cpp:
3272         (WebCore::preferredLanguagesOverride):
3273         * platform/LocalizedStrings.cpp:
3274         (WebCore::truncatedStringForLookupMenuItem):
3275         * platform/MIMETypeRegistry.cpp:
3276         (WebCore::mediaMIMETypeMap):
3277         (WebCore::defaultMIMEType):
3278         * platform/SchemeRegistry.cpp:
3279         (WebCore::localURLSchemes):
3280         (WebCore::displayIsolatedURLSchemes):
3281         (WebCore::secureSchemes):
3282         (WebCore::schemesWithUniqueOrigins):
3283         (WebCore::emptyDocumentSchemes):
3284         (WebCore::schemesForbiddenFromDomainRelaxation):
3285         (WebCore::canDisplayOnlyIfCanRequestSchemes):
3286         (WebCore::notAllowingJavascriptURLsSchemes):
3287         (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
3288         (WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
3289         (WebCore::CORSEnabledSchemes):
3290         (WebCore::ContentSecurityPolicyBypassingSchemes):
3291         * platform/ScrollbarTheme.cpp:
3292         (WebCore::ScrollbarTheme::theme):
3293         * platform/URL.cpp:
3294         (WebCore::blankURL):
3295         * platform/animation/Animation.cpp:
3296         (WebCore::Animation::initialName):
3297         * platform/audio/AudioSession.cpp:
3298         (WebCore::AudioSession::sharedSession):
3299         * platform/audio/AudioSession.h:
3300         * platform/audio/HRTFElevation.cpp:
3301         (WebCore::getConcatenatedImpulseResponsesForSubject):
3302         * platform/audio/ios/AudioDestinationIOS.cpp:
3303         (WebCore::audioDestinations):
3304         * platform/graphics/GraphicsLayer.cpp:
3305         (WebCore::repaintRectMap):
3306         * platform/graphics/ImageBuffer.cpp:
3307         (WebCore::ImageBuffer::transformColorSpace):
3308         * platform/graphics/MediaPlayer.cpp:
3309         (WebCore::applicationOctetStream):
3310         (WebCore::textPlain):
3311         (WebCore::codecs):
3312         * platform/graphics/ShadowBlur.cpp:
3313         (WebCore::ScratchBuffer::singleton):
3314         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3315         (WebCore::playerToPrivateMap):
3316         * platform/graphics/filters/SourceAlpha.cpp:
3317         (WebCore::SourceAlpha::effectName):
3318         * platform/graphics/filters/SourceGraphic.cpp:
3319         (WebCore::SourceGraphic::effectName):
3320         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3321         (WebCore::mimeCommonTypesCache):
3322         (WebCore::mimeModernTypesCache):
3323         * platform/ios/CursorIOS.cpp:
3324         (WebCore::cursor):
3325         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
3326         (WebCore::tileControllerMemoryHandler):
3327         * platform/ios/WebCoreMotionManager.mm:
3328         (+[WebCoreMotionManager sharedManager]):
3329         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
3330         (WebVideoFullscreenModelVideoElement::updateForEventName):
3331         * platform/ios/wak/WKContentObservation.cpp:
3332         (WebThreadGetObservedContentModifiers):
3333         * platform/mac/DragImageMac.mm:
3334         (WebCore::fontFromNSFont):
3335         * platform/mac/ThemeMac.mm:
3336         (WebCore::platformTheme):
3337         * platform/mac/ThreadCheck.mm:
3338         (WebCoreReportThreadViolation):
3339         * platform/mediastream/mac/AVCaptureDeviceManager.h:
3340         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3341         (WebCore::AVCaptureDeviceManager::singleton):
3342         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
3343         (WebCore::RealtimeMediaSourceCenter::platformCenter):
3344         * platform/mock/mediasource/MockBox.cpp:
3345         (WebCore::MockTrackBox::type):
3346         (WebCore::MockInitializationBox::type):
3347         (WebCore::MockSampleBox::type):
3348         * platform/network/HTTPParsers.cpp:
3349         (WebCore::parseXSSProtectionHeader):
3350         * platform/network/ResourceHandle.cpp:
3351         (WebCore::builtinResourceHandleConstructorMap):
3352         (WebCore::builtinResourceHandleSynchronousLoaderMap):
3353         * platform/network/cf/ResourceHandleCFNet.cpp:
3354         (WebCore::allowsAnyHTTPSCertificateHosts):
3355         (WebCore::clientCerts):
3356         * platform/text/AtomicStringKeyedMRUCache.h:
3357         (WebCore::AtomicStringKeyedMRUCache::get):
3358         * platform/text/cf/HyphenationCF.cpp:
3359         (WebCore::cfLocaleCache):
3360         * rendering/RenderBlock.cpp:
3361         (WebCore::continuationOutlineTable):
3362         * rendering/RenderCounter.cpp:
3363         (WebCore::counterMaps):
3364         * rendering/RenderDeprecatedFlexibleBox.cpp:
3365         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3366         * rendering/RenderLayer.cpp:
3367         (WebCore::RenderLayer::drawPlatformResizerImage):
3368         * rendering/RenderScrollbarTheme.cpp:
3369         (WebCore::RenderScrollbarTheme::renderScrollbarTheme):
3370         * rendering/RenderTheme.cpp:
3371         (WebCore::customFocusRingColor):
3372         * rendering/RenderWidget.cpp:
3373         (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
3374         * rendering/shapes/ShapeOutsideInfo.h:
3375         * rendering/style/RenderStyle.cpp:
3376         (WebCore::RenderStyle::hyphenString):
3377         (WebCore::RenderStyle::textEmphasisMarkString):
3378         (WebCore::RenderStyle::initialDashboardRegions):
3379         (WebCore::RenderStyle::noneDashboardRegions):
3380         * rendering/style/RenderStyle.h:
3381         * rendering/svg/RenderSVGPath.cpp:
3382         (WebCore::RenderSVGPath::zeroLengthLinecapPath):
3383         * rendering/svg/RenderSVGShape.cpp:
3384         (WebCore::RenderSVGShape::nonScalingStrokePath):
3385         * rendering/svg/SVGRenderingContext.cpp:
3386         (WebCore::currentContentTransformation):
3387         * rendering/svg/SVGResources.cpp:
3388         (WebCore::clipperFilterMaskerTags):
3389         (WebCore::markerTags):
3390         (WebCore::fillAndStrokeTags):
3391         (WebCore::chainableResourceTags):
3392         * svg/SVGAngle.cpp:
3393         (WebCore::SVGAngle::valueAsString):
3394         * svg/SVGAnimateColorElement.cpp:
3395         (WebCore::attributeValueIsCurrentColor):
3396         * svg/SVGAnimateMotionElement.cpp:
3397         (WebCore::SVGAnimateMotionElement::rotateMode):
3398         * svg/SVGAnimationElement.cpp:
3399         (WebCore::SVGAnimationElement::setCalcMode):
3400         (WebCore::SVGAnimationElement::setAttributeType):
3401         (WebCore::SVGAnimationElement::isAdditive):
3402         (WebCore::SVGAnimationElement::isAccumulated):
3403         (WebCore::inheritsFromProperty):
3404         * svg/SVGFEConvolveMatrixElement.cpp:
3405         (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
3406         (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
3407         (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
3408         (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
3409         * svg/SVGFEDiffuseLightingElement.cpp:
3410         (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
3411         (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
3412         * svg/SVGFEDropShadowElement.cpp:
3413         (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
3414         (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
3415         * svg/SVGFEGaussianBlurElement.cpp:
3416         (WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
3417         (WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
3418         * svg/SVGFEMorphologyElement.cpp:
3419         (WebCore::SVGFEMorphologyElement::radiusXIdentifier):
3420         (WebCore::SVGFEMorphologyElement::radiusYIdentifier):
3421         * svg/SVGFESpecularLightingElement.cpp:
3422         (WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
3423         (WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
3424         * svg/SVGFETurbulenceElement.cpp:
3425         (WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
3426         (WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
3427         * svg/SVGFilterElement.cpp:
3428         (WebCore::SVGFilterElement::filterResXIdentifier):
3429         (WebCore::SVGFilterElement::filterResYIdentifier):
3430         * svg/SVGGlyphMap.h:
3431         (WebCore::SVGGlyphMap::svgGlyphForGlyph):
3432         * svg/SVGLangSpace.cpp:
3433         (WebCore::SVGLangSpace::xmlspace):