Rename pageCache() to PageCache::shared() and return a reference
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-28  Chris Dumez  <cdumez@apple.com>
2
3         Rename pageCache() to PageCache::shared() and return a reference
4         https://bugs.webkit.org/show_bug.cgi?id=140983
5
6         Reviewed by Andreas Kling.
7
8         Rename pageCache() to PageCache::shared() as this is a singleton class
9         and have it return a reference instead of a pointer.
10
11         * history/BackForwardList.cpp:
12         (WebCore::BackForwardList::addItem):
13         (WebCore::BackForwardList::setCapacity):
14         (WebCore::BackForwardList::clearAllPageCaches):
15         (WebCore::BackForwardList::close):
16         * history/CachedFrame.cpp:
17         (WebCore::CachedFrame::CachedFrame):
18         * history/HistoryItem.cpp:
19         (WebCore::HistoryItem::setURL):
20         * history/PageCache.cpp:
21         (WebCore::PageCache::shared):
22         (WebCore::PageCache::get):
23         (WebCore::pageCache): Deleted.
24         * history/PageCache.h:
25         * loader/FrameLoader.cpp:
26         (WebCore::FrameLoader::commitProvisionalLoad):
27         (WebCore::FrameLoader::loadDifferentDocumentItem):
28         * loader/HistoryController.cpp:
29         (WebCore::HistoryController::invalidateCurrentItemCachedPage):
30         (WebCore::HistoryController::updateForReload):
31         * page/Frame.cpp:
32         (WebCore::Frame::setPageAndTextZoomFactors):
33         * page/Page.cpp:
34         (WebCore::Page::setDeviceScaleFactor):
35         (WebCore::Page::setPagination):
36         (WebCore::Page::setVisitedLinkStore):
37         * page/PageGroup.cpp:
38         (WebCore::PageGroup::captionPreferencesChanged):
39         * page/Settings.cpp:
40         (WebCore::Settings::setUsesPageCache):
41         * platform/MemoryPressureHandler.cpp:
42         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
43
44 2015-01-28  Darin Adler  <darin@apple.com>
45
46         Fix MediaPlayerEngine leaks
47         https://bugs.webkit.org/show_bug.cgi?id=140992
48
49         Reviewed by Jer Noble.
50
51         * platform/graphics/MediaPlayer.cpp:
52         (WebCore::mutableInstalledMediaEnginesVector): Added.
53         (WebCore::buildMediaEnginesVector): Added.
54         (WebCore::installedMediaEngines): Changed this to be a vector of factories
55         instead of a vector of heap-allocated factories. The old code would leak
56         all the factories when this was called with the ResetEngines option.
57         (WebCore::addMediaEngine): Updated for above change.
58         (WebCore::bestMediaEngineForSupportParameters): Ditto.
59         (WebCore::nextMediaEngine): Ditto.
60         (WebCore::MediaPlayer::nextBestMediaEngine): Ditto.
61         (WebCore::MediaPlayer::loadWithNextMediaEngine): Ditto.
62         (WebCore::MediaPlayer::supportsType): Ditto.
63         (WebCore::MediaPlayer::getSupportedTypes): Ditto.
64         (WebCore::MediaPlayer::getSitesInMediaCache): Ditto.
65         (WebCore::MediaPlayer::clearMediaCache): Ditto.
66         (WebCore::MediaPlayer::clearMediaCacheForSite): Ditto.
67         (WebCore::MediaPlayer::supportsKeySystem): Ditto.
68         (WebCore::MediaPlayer::resetMediaEngines): Ditto.
69         * platform/graphics/MediaPlayer.h: Ditto.
70
71 2015-01-28  Jeongmin Kim  <jm86.kim@lge.com>
72
73         Rename descendentxxx to descendantxxxx in RenderLayerBacking
74         https://bugs.webkit.org/show_bug.cgi?id=140979
75
76         Reviewed by Martin Robinson.
77
78         Rename descendentxxx to descendantxxxx in RenderLayerBacking
79         for matching other variables and function names.
80
81         * rendering/RenderLayerBacking.cpp:
82         (WebCore::RenderLayerBacking::updateConfiguration):
83         (WebCore::RenderLayerBacking::updateAfterDescendants):
84         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
85         (WebCore::RenderLayerBacking::paintsChildren):
86         (WebCore::descendantLayerPaintsIntoAncestor):
87         (WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers):
88         (WebCore::descendentLayerPaintsIntoAncestor): Deleted.
89         (WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers): Deleted.
90
91 2015-01-27  Chris Dumez  <cdumez@apple.com>
92
93         Use a Ref<CachedResourceLoader> in Document instead of a RefPtr
94         https://bugs.webkit.org/show_bug.cgi?id=140971
95
96         Reviewed by Andreas Kling.
97
98         Use a Ref<CachedResourceLoader> in Document instead of a RefPtr as it
99         can never be null. Also have Document::cachedResourceLoader() return a
100         reference instead of a pointer. This gets rid of a lot of unnecessary
101         null-checks.
102
103 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
104
105         More build fixes for newer clang.
106
107         Rubber-stamped by Anders Carlsson.
108
109         * loader/icon/IconDatabase.h: Added missing override keywords.
110
111 2015-01-27  Roger Fong  <roger_fong@apple.com>
112
113         WebGL2: Disable various extensions on WebGL2 context that have been promoted to core.
114         https://bugs.webkit.org/show_bug.cgi?id=140907.
115         <rdar://problem/19545857>
116
117         Reviewed by Brent Fulgham.
118
119         * html/canvas/WebGL2RenderingContext.cpp:
120         (WebCore::WebGL2RenderingContext::getExtension):
121         (WebCore::WebGL2RenderingContext::getSupportedExtensions):
122         * html/canvas/WebGL2RenderingContext.h:
123         * html/canvas/WebGLRenderingContext.cpp:
124         (WebCore::WebGLRenderingContext::getExtension):
125         (WebCore::WebGLRenderingContext::getSupportedExtensions):
126         * html/canvas/WebGLRenderingContext.h:
127         * html/canvas/WebGLRenderingContextBase.cpp:
128         (WebCore::WebGLRenderingContextBase::getSupportedExtensions): Deleted.
129         * html/canvas/WebGLRenderingContextBase.h:
130         * html/canvas/WebGLRenderingContextBase.idl: 
131         Remove some extra extension enums that shouldn't have been declared on the context idl.
132
133 2015-01-27  Chris Dumez  <cdumez@apple.com>
134
135         Remove unnecessary m_cachedPage null-checks in PageCache
136         https://bugs.webkit.org/show_bug.cgi?id=140965
137
138         Reviewed by Andreas Kling.
139
140         Remove unnecessary m_cachedPage null-checks in PageCache. We initialize
141         m_cachedPage when inserting the HistoryItem in the page cache and clear
142         it when removing it from the page cache. Therefore, it is guaranteed
143         that HistoryItems currently in the page cache have m_cachedPage
144         initialized and there is no need to null-check it.
145
146         * history/PageCache.cpp:
147         (WebCore::PageCache::frameCount):
148         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
149         (WebCore::PageCache::markPagesForFullStyleRecalc):
150         (WebCore::PageCache::markPagesForDeviceScaleChanged):
151         (WebCore::PageCache::markPagesForCaptionPreferencesChanged):
152
153 2015-01-27  Alexey Proskuryakov  <ap@apple.com>
154
155         Some NSAccessibility methods we use are deprecated on 10.10
156         https://bugs.webkit.org/show_bug.cgi?id=140966
157
158         Reviewed by Anders Carlsson.
159
160         * accessibility/mac/AccessibilityObjectMac.mm:
161         (WebCore::AccessibilityObject::overrideAttachmentParent):
162         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
163         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
164         (-[WebAccessibilityObjectWrapper role]):
165         (-[WebAccessibilityObjectWrapper roleDescription]):
166         Silence the warnings for now.
167
168 2015-01-27  Chris Dumez  <cdumez@apple.com>
169
170         Rename isExpandedShorthand() to isShorthandCSSProperty() for clarity
171         https://bugs.webkit.org/show_bug.cgi?id=140954
172
173         Reviewed by Andreas Kling.
174
175         Rename isExpandedShorthand() to isShorthandCSSProperty() for clarity as
176         all CSS shorthand properties are now expanded during parsing (even
177         'font').
178
179         * css/StylePropertyShorthand.cpp:
180         (WebCore::isShorthandCSSProperty):
181         (WebCore::isExpandedShorthand): Deleted.
182         * css/StylePropertyShorthand.h:
183         * css/StyleResolver.cpp:
184         (WebCore::StyleResolver::applyProperty):
185         * css/makeprop.pl:
186
187 2015-01-27  Eric Carlson  <eric.carlson@apple.com>
188
189         Simplify http/tests/media/video-play-stall.html
190         https://bugs.webkit.org/show_bug.cgi?id=140630
191
192         Reviewed by Brent Fulgham.
193
194         Test: http/tests/media/video-play-waiting.html
195
196         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
197         (WebCore::MediaPlayerPrivateAVFoundation::play): Add more logging.
198         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): MediaPlayerAVPlayerItemStatusPlaybackBufferEmpty
199             always maps to HaveCurrentData.
200         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Don't log FunctionType,
201             doing so it needlessly verbose.
202         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Ditto.
203         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
204         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Log KVO property 
205             values and notification state.
206
207 2015-01-27  Commit Queue  <commit-queue@webkit.org>
208
209         Unreviewed, rolling out r179192.
210         https://bugs.webkit.org/show_bug.cgi?id=140953
211
212         Caused numerous layout test failures (Requested by mattbaker_
213         on #webkit).
214
215         Reverted changeset:
216
217         "Use FastMalloc (bmalloc) instead of BlockAllocator for GC
218         pages"
219         https://bugs.webkit.org/show_bug.cgi?id=140900
220         http://trac.webkit.org/changeset/179192
221
222 2015-01-27  Benjamin Poulain  <bpoulain@apple.com>
223
224         Modernize some constructors of the CSS JIT
225         https://bugs.webkit.org/show_bug.cgi?id=140903
226
227         Reviewed by Darin Adler.
228
229         Two constructors were still using the old style.
230
231         * cssjit/SelectorCompiler.cpp:
232         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment): Deleted.
233         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern): Deleted.
234
235 2015-01-27  Brent Fulgham  <bfulgham@apple.com>
236
237         [Win] Unreviewed build fix.
238
239         Lack of include guards in WebVTTElement.h caused a build failure once we started including
240         this header file from more than one implementation file.
241
242         * html/track/WebVTTElement.h:
243
244 2015-01-26  Sylvain Galineau  <galineau@adobe.com>
245
246         CSSKeyframesRule::findRule() and deleteRule() should delete the last matching rule, not the first
247         https://bugs.webkit.org/show_bug.cgi?id=139732
248
249         Reviewed by Dean Jackson and Darin Adler.
250
251         No new tests because existing tests have been updated to verify this behavior.
252
253         * css/CSSKeyframeRule.h:
254         (WebCore::StyleKeyframe::getKeys): Deleted.
255         * css/StyleResolver.cpp:
256         (WebCore::StyleResolver::keyframeStylesForAnimation): use StyleKeyframe::keys().
257         * css/CSSKeyframeRule.cpp:
258         (WebCore::StyleKeyframe::parseKeyString): Deleted. Moved to CSSParser.
259         (WebCore::StyleKeyframe::keyText): Build keyframe selector from Vector<double> representation.
260         * css/CSSKeyframeRule.h:
261         (WebCore::StyleKeyframe::setKeyText): parse keyframe selector into Vector<double>.
262         (WebCore::StyleKeyframe::keys): Added. Returns vector representation of selector keys.
263         (WebCore::StyleKeyframe::getKeys): Deleted. Now keys().
264         * css/CSSKeyframesRule.cpp:
265         (WebCore::StyleRuleKeyframes::findKeyframeIndex): Return last matching rule.
266         * css/CSSParser.cpp:
267         (WebCore::CSSParser::parseKeyframeSelector): Added. Moved from StyleKeyframe.
268         * css/CSSParser.h:
269         (WebCore::CSSParser::parseKeyframeSelector): Added. Moved from StyleKeyframe.
270
271 2015-01-26  Geoffrey Garen  <ggaren@apple.com>
272
273         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
274         https://bugs.webkit.org/show_bug.cgi?id=140900
275
276         Reviewed by Mark Hahnenberg.
277
278         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
279         (WebCore::MemoryPressureHandler::install): Be sure to release other
280         memory after GC and not before, since GC might contribute to free
281         malloc pages now.
282
283 2015-01-27  Zalan Bujtas  <zalan@apple.com>
284
285         Simple line layout: Make FlowContents an iterator class.
286         https://bugs.webkit.org/show_bug.cgi?id=140909
287
288         Reviewed by Antti Koivisto.
289
290         This patch transfers content position handling from createLineRuns()/LineState to
291         FlowContents. FlowContents becomes a real iterator class.
292         It tightens content and position information so that we can start supporting
293         no textual content such as <br>.
294
295         No change in functionality.
296
297         * rendering/SimpleLineLayout.cpp:
298         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): Remove redundant committedLogicalRight.
299         (WebCore::SimpleLineLayout::LineState::addUncommitted): Now that we don't have current
300         positon in LineState, we need to be able to figure out where we start the uncommitted content.
301         This is mainly relevant after collapsed whitespace, when we start a new uncommitted segment.
302         It was previously achieved through LineState::jumpTo().
303         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
304         (WebCore::SimpleLineLayout::firstFragment): Return the first fragment for this line.
305         (WebCore::SimpleLineLayout::createLineRuns): Renaming and removing position handling.
306         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): Renaming.
307         (WebCore::SimpleLineLayout::createTextRuns):
308         (WebCore::SimpleLineLayout::LineState::jumpTo): Deleted.
309         (WebCore::SimpleLineLayout::initializeNewLine): Deleted. : Move overflow fragment functionality
310         to firstFragment().
311         * rendering/SimpleLineLayoutFlowContents.cpp:
312         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
313         * rendering/SimpleLineLayoutFlowContents.h:
314
315 2015-01-27  Chris Dumez  <cdumez@apple.com>
316
317         HTMLElement.dir should only return known values
318         https://bugs.webkit.org/show_bug.cgi?id=140925
319
320         Reviewed by Darin Adler.
321
322         HTMLElement.dir should only return known values according to the HTML
323         specification:
324         https://html.spec.whatwg.org/multipage/dom.html#dom-document-dir
325
326         Chrome and Firefox 28 match the specification. IE11's behavior is
327         slightly different:
328         - When setting an unknown 'dir' value, an exception will be thrown.
329         - Setting a known 'dir' value in a non-canonical case (e.g. "RTL"),
330           the value will be directly converted to its canonical form (e.g.
331           "rtl") before updating the DOM tree. (close to the spec but changing
332           the case upon setting).
333
334         This patch is based on the following Blink revision by me:
335         https://src.chromium.org/viewvc/blink?view=rev&revision=171861
336
337         Test: fast/dom/document-dir-property.html
338
339         * html/HTMLDocument.cpp:
340         (WebCore::HTMLDocument::dir):
341         (WebCore::HTMLDocument::setDir):
342         * html/HTMLDocument.h:
343         * html/HTMLElement.cpp:
344         (WebCore::toValidDirValue):
345         (WebCore::HTMLElement::dir):
346         (WebCore::HTMLElement::setDir):
347         * html/HTMLElement.h:
348         * html/HTMLElement.idl:
349
350 2015-01-26  Chris Dumez  <cdumez@apple.com>
351
352         Introduce Document::body() for call sites interested in the <body> element
353         https://bugs.webkit.org/show_bug.cgi?id=140920
354
355         Reviewed by Darin Adler.
356
357         Introduce Document::body() method for call sites interested only in the
358         document's <body> element (not the <frameset>). Also clean up the call
359         sites of Document::bodyOrFrameset() to cache the return value when
360         suitable as this method does a tree traversal.
361
362         This patch does not change behavior, it merely ports calls sites that
363         were calling Document::bodyOrFrameset() then checking if the tag was
364         <body>, to call Document::body() instead. Doing so is more efficient
365         and clearer.
366
367 2015-01-26  Brent Fulgham  <bfulgham@apple.com>
368
369         [Win] ASSERTION FAILED !m_ptr under AccessibilityController::winAddNotificationListener
370         https://bugs.webkit.org/show_bug.cgi?id=87426
371         <rdar://problem/11527899>
372
373         Reviewed by Darin Adler.
374
375         Revise COMPtr to work better with our HashMap implementation:
376         (1) Add a specialization for IsSmartPtr.
377         (2) Remove PtrHash specialization.
378         (3) Refresh HashTrails specialization for COMPtr to match what we
379         do for RefPtr.
380
381         * platform/win/COMPtr.h:
382
383 2015-01-26  Sylvain Galineau  <galineau@adobe.com>
384
385         The computed value of line-height:normal is incorrect
386         https://bugs.webkit.org/show_bug.cgi?id=133744
387
388         Reviewed by Dean Jackson.
389
390         Use font's line spacing as computed line-height value when specified value is 'normal'.
391         This behavior is compatible with all other engines.
392
393         No new tests; all existing tests are updated to reflect the new computed value.
394
395         * css/CSSComputedStyleDeclaration.cpp:
396         (WebCore::lineHeightFromStyle): If line-height wasn't set, use the font's line spacing (same as Blink).
397
398 2015-01-26  Chris Dumez  <cdumez@apple.com>
399
400         Document.dir should reflect the 'dir' attribute of the root html element
401         https://bugs.webkit.org/show_bug.cgi?id=140922
402
403         Reviewed by Darin Adler.
404
405         Document.dir should reflect the 'dir' content attribute of the root
406         <html> element as per the specification:
407         https://html.spec.whatwg.org/multipage/dom.html#dom-document-dir
408
409         Previously, WebKit was reflecting the 'dir' content attribute of the
410         body element. This patch aligns WebKit with the specification and the
411         behavior of other browsers (tested Firefox 28, IE11 and Chrome).
412
413         This patch is based on the following Blink revision by me:
414         https://src.chromium.org/viewvc/blink?revision=171734&view=revision
415
416         Test: fast/dom/document-dir-property.html
417
418         * html/HTMLDocument.cpp:
419         (WebCore::HTMLDocument::dir):
420         (WebCore::HTMLDocument::setDir):
421         * html/HTMLDocument.h:
422
423 2015-01-26  Darin Adler  <darin@apple.com>
424
425         REGRESSION (r179101): SVGUseElement::expandUseElementsInShadowTree has an object lifetime mistake
426         https://bugs.webkit.org/show_bug.cgi?id=140921
427
428         Reviewed by Alexey Proskuryakov.
429
430         Bug found by running regression tests with Address Sanitizer.
431
432         * svg/SVGUseElement.cpp:
433         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Use a Ref to protect
434         the original use element after it's been replaced in the tree; we use it for
435         one more thing after that.
436
437 2015-01-26  Roger Fong  <roger_fong@apple.com>
438
439         WebGL 2.0: Actually allow for experimental-webgl2 context creation.
440         https://bugs.webkit.org/show_bug.cgi?id=140906
441         <rdar://problem/19606875>.
442
443         Reviewed by Brent Fulgham.
444
445         * html/HTMLCanvasElement.cpp:
446         (WebCore::HTMLCanvasElement::is3dType): Include "experimental-webgl2" in the list of acceptable 3d context types.
447
448 2015-01-26  Chris Dumez  <cdumez@apple.com>
449
450         Rename Document::body() to Document::bodyOrFrameset() for clarity
451         https://bugs.webkit.org/show_bug.cgi?id=140902
452
453         Reviewed by Andreas Kling.
454
455         Rename Document::body() to Document::bodyOrFrameset() for clarity. This
456         method does not necessarily return an HTMLBodyElement, it can also
457         return a frameset as per the specification:
458         http://www.w3.org/TR/html5/dom.html#dom-tree-accessors
459
460         This method is often misused internally (the caller is only interested
461         in the <body> element). I will fix these instances in a follow-up patch,
462         this patch is only renaming mechanically.
463
464 2015-01-26  Byungseon Shin  <sun.shin@lge.com>
465
466         Fix Border-radius clipping issue on a composited descendants
467         https://bugs.webkit.org/show_bug.cgi?id=138551 
468
469         Reviewed by Simon Fraser.
470
471         Fix assertion in RenderLayerBacking::paintIntoLayer
472         by not checking out of sync with the GraphicsLayer heirarchy
473         in GraphicsLayerPaintChildClippingMask phase.
474
475         Test: compositing/clipping/border-radius-overflow-hidden-stacking-context.html
476
477         * rendering/RenderLayerBacking.cpp:
478         (WebCore::RenderLayerBacking::paintIntoLayer):
479
480 2015-01-26  Chris Dumez  <cdumez@apple.com>
481
482         Simplify RenderElement's shouldRepaintForImageAnimation()
483         https://bugs.webkit.org/show_bug.cgi?id=140890
484
485         Reviewed by Darin Adler.
486
487         Simplify RenderElement's shouldRepaintForImageAnimation() by
488         not calling rendererForRootBackground(). The previous code was
489         doing a null-check on Document::documentElement() but failing
490         to do a null-check on the renderer just after, which lead me
491         to refactor this code.
492
493         Instead of calling document().documentElement.renderer(), we
494         now call renderer.parent(). This is equivalent because we already
495         know that renderer.isBody() returns true. The parent of the <body>
496         has to be the <html> element, which has to be the documentElement.
497         There is also no need to do a null-check on renderer.parent(). We
498         already know that the <body> has a renderer (because |renderer| is
499         its renderer), thus its parent <html> element has to have a renderer
500         as well.
501
502         Finally, simply call !rootElement.hasBackground() instead of
503         rootElement.rendererForRootBackground() == &bodyRenderer to determine
504         if the background painted by the root. This is equivalent but more
505         efficient because:
506         - We already know that the root renderer's is an <html> element. We
507           can thus avoid the check in rendererForRootBackground().
508         - We already have the <body>'s renderer so we don't need to do the
509           DOM tree traversal in rendererForRootBackground() to get it.
510
511         No new tests, already covered by:
512         fast/images/animated-gif-body-delegated-background-image.html
513         fast/images/animated-gif-html-background-image.html
514
515         * rendering/RenderElement.cpp:
516         (WebCore::shouldRepaintForImageAnimation):
517
518 2015-01-26  Chris Dumez  <cdumez@apple.com>
519
520         First argument to DOM traversal functions should be a reference
521         https://bugs.webkit.org/show_bug.cgi?id=140895
522
523         Reviewed by Antti Koivisto.
524
525         First argument to DOM traversal functions should be a reference instead
526         of a pointer as it is dereferenced without null-check.
527
528 2015-01-26  Roger Fong  <roger_fong@apple.com>
529
530         [WebGL2] Update IDL for WebGL2.
531         https://bugs.webkit.org/show_bug.cgi?id=126406
532         <rdar://problem/15002268>.
533
534         Reviewed by Brent Fulgham.
535
536         Update WebGL2RenderingContext idl to match spec. Create method stubs as necessary.
537
538         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
539         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter):
540         (WebCore::JSWebGL2RenderingContext::getInternalformatParameter):
541         (WebCore::JSWebGL2RenderingContext::getQueryParameter):
542         (WebCore::JSWebGL2RenderingContext::getSamplerParameter):
543         (WebCore::JSWebGL2RenderingContext::getSyncParameter):
544         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
545         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockParameter):
546         (WebCore::JSWebGL2RenderingContext::getActiveUniformBlockName):
547         * html/canvas/WebGL2RenderingContext.cpp:
548         (WebCore::WebGL2RenderingContext::copyBufferSubData):
549         (WebCore::WebGL2RenderingContext::getBufferSubData):
550         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter):
551         (WebCore::WebGL2RenderingContext::blitFramebuffer):
552         (WebCore::WebGL2RenderingContext::framebufferTextureLayer):
553         (WebCore::WebGL2RenderingContext::getInternalformatParameter):
554         (WebCore::WebGL2RenderingContext::invalidateFramebuffer):
555         (WebCore::WebGL2RenderingContext::invalidateSubFramebuffer):
556         (WebCore::WebGL2RenderingContext::readBuffer):
557         (WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
558         (WebCore::WebGL2RenderingContext::texStorage2D):
559         (WebCore::WebGL2RenderingContext::texStorage3D):
560         (WebCore::WebGL2RenderingContext::texImage3D):
561         (WebCore::WebGL2RenderingContext::texSubImage3D):
562         (WebCore::WebGL2RenderingContext::copyTexSubImage3D):
563         (WebCore::WebGL2RenderingContext::compressedTexImage3D):
564         (WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
565         (WebCore::WebGL2RenderingContext::getFragDataLocation):
566         (WebCore::WebGL2RenderingContext::uniform1ui):
567         (WebCore::WebGL2RenderingContext::uniform2ui):
568         (WebCore::WebGL2RenderingContext::uniform3ui):
569         (WebCore::WebGL2RenderingContext::uniform4ui):
570         (WebCore::WebGL2RenderingContext::uniform1uiv):
571         (WebCore::WebGL2RenderingContext::uniform2uiv):
572         (WebCore::WebGL2RenderingContext::uniform3uiv):
573         (WebCore::WebGL2RenderingContext::uniform4uiv):
574         (WebCore::WebGL2RenderingContext::uniformMatrix2x3fv):
575         (WebCore::WebGL2RenderingContext::uniformMatrix3x2fv):
576         (WebCore::WebGL2RenderingContext::uniformMatrix2x4fv):
577         (WebCore::WebGL2RenderingContext::uniformMatrix4x2fv):
578         (WebCore::WebGL2RenderingContext::uniformMatrix3x4fv):
579         (WebCore::WebGL2RenderingContext::uniformMatrix4x3fv):
580         (WebCore::WebGL2RenderingContext::vertexAttribI4i):
581         (WebCore::WebGL2RenderingContext::vertexAttribI4iv):
582         (WebCore::WebGL2RenderingContext::vertexAttribI4ui):
583         (WebCore::WebGL2RenderingContext::vertexAttribI4uiv):
584         (WebCore::WebGL2RenderingContext::vertexAttribIPointer):
585         (WebCore::WebGL2RenderingContext::vertexAttribDivisor):
586         (WebCore::WebGL2RenderingContext::drawArraysInstanced):
587         (WebCore::WebGL2RenderingContext::drawElementsInstanced):
588         (WebCore::WebGL2RenderingContext::drawRangeElements):
589         (WebCore::WebGL2RenderingContext::drawBuffers):
590         (WebCore::WebGL2RenderingContext::clearBufferiv):
591         (WebCore::WebGL2RenderingContext::clearBufferuiv):
592         (WebCore::WebGL2RenderingContext::clearBufferfv):
593         (WebCore::WebGL2RenderingContext::clearBufferfi):
594         (WebCore::WebGL2RenderingContext::createQuery):
595         (WebCore::WebGL2RenderingContext::deleteQuery):
596         (WebCore::WebGL2RenderingContext::isQuery):
597         (WebCore::WebGL2RenderingContext::beginQuery):
598         (WebCore::WebGL2RenderingContext::endQuery):
599         (WebCore::WebGL2RenderingContext::getQuery):
600         (WebCore::WebGL2RenderingContext::getQueryParameter):
601         (WebCore::WebGL2RenderingContext::createSampler):
602         (WebCore::WebGL2RenderingContext::deleteSampler):
603         (WebCore::WebGL2RenderingContext::isSampler):
604         (WebCore::WebGL2RenderingContext::bindSampler):
605         (WebCore::WebGL2RenderingContext::samplerParameteri):
606         (WebCore::WebGL2RenderingContext::samplerParameterf):
607         (WebCore::WebGL2RenderingContext::getSamplerParameter):
608         (WebCore::WebGL2RenderingContext::fenceSync):
609         (WebCore::WebGL2RenderingContext::isSync):
610         (WebCore::WebGL2RenderingContext::deleteSync):
611         (WebCore::WebGL2RenderingContext::clientWaitSync):
612         (WebCore::WebGL2RenderingContext::waitSync):
613         (WebCore::WebGL2RenderingContext::getSyncParameter):
614         (WebCore::WebGL2RenderingContext::createTransformFeedback):
615         (WebCore::WebGL2RenderingContext::deleteTransformFeedback):
616         (WebCore::WebGL2RenderingContext::isTransformFeedback):
617         (WebCore::WebGL2RenderingContext::bindTransformFeedback):
618         (WebCore::WebGL2RenderingContext::beginTransformFeedback):
619         (WebCore::WebGL2RenderingContext::endTransformFeedback):
620         (WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
621         (WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
622         (WebCore::WebGL2RenderingContext::pauseTransformFeedback):
623         (WebCore::WebGL2RenderingContext::resumeTransformFeedback):
624         (WebCore::WebGL2RenderingContext::bindBufferBase):
625         (WebCore::WebGL2RenderingContext::bindBufferRange):
626         (WebCore::WebGL2RenderingContext::getIndexedParameter):
627         (WebCore::WebGL2RenderingContext::getUniformIndices):
628         (WebCore::WebGL2RenderingContext::getActiveUniforms):
629         (WebCore::WebGL2RenderingContext::getUniformBlockIndex):
630         (WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter):
631         (WebCore::WebGL2RenderingContext::getActiveUniformBlockName):
632         (WebCore::WebGL2RenderingContext::uniformBlockBinding):
633         (WebCore::WebGL2RenderingContext::createVertexArray):
634         (WebCore::WebGL2RenderingContext::deleteVertexArray):
635         (WebCore::WebGL2RenderingContext::isVertexArray):
636         (WebCore::WebGL2RenderingContext::bindVertexArray):
637         * html/canvas/WebGL2RenderingContext.h:
638         * html/canvas/WebGL2RenderingContext.idl:
639         * platform/graphics/GraphicsTypes3D.h:
640
641 2015-01-26  Andreas Kling  <akling@apple.com>
642
643         Don't let the CSSValuePool's font family cache grow unbounded.
644         <https://webkit.org/b/140894>
645
646         Reviewed by Chris Dumez.
647
648         Darin pointed out to Chris who pointed out to me that the font family cache
649         in CSSValuePool can grow unbounded until we get a system memory pressure
650         notification. Put a limit on it like we did with the font face cache.
651
652         * css/CSSValuePool.cpp:
653         (WebCore::CSSValuePool::createFontFamilyValue):
654
655 2015-01-26  Andreas Kling  <akling@apple.com>
656
657         Plug leak in jsValueWithDictionaryInContext().
658         <https://webkit.org/b/140889>
659
660         Reviewed by Alexey Proskuryakov.
661
662         Add a missing JSStringRelease to plug leak that was showing up on leaks bot.
663
664         * platform/mac/SerializedPlatformRepresentationMac.mm:
665         (WebCore::jsValueWithDictionaryInContext):
666
667 2015-01-26  Benjamin Poulain  <benjamin@webkit.org>
668
669         Fix CSS Selector's tag name matching when mixing HTML and XML
670         https://bugs.webkit.org/show_bug.cgi?id=140878
671
672         Reviewed by Darin Adler.
673
674         Previsouly, WebKit was unable to match any XML element that had
675         any uppercase character if the stylesheet was in a HTML document.
676         This problem was most often reported due to the inability to style
677         SVG-in-HTML.
678
679         The reason was that the tag local name was incorrectly transformed
680         to lowercase at parsing time. Instead, we are supposed to only
681         do case-insensitive match for HTML elements in a HTML document.
682
683         This fix is very similar with how we handle attributes:
684         -Keep both the original and the lowercase versions of the name.
685         -When matching, chose which version to use depending on the element being matched.
686
687         There is one major difference in the way the names are stored.
688         Unlike attribute selectors, tag name selectors are common, and the uppercase
689         version is not that uncommon. I wanted to preserve the dense representation
690         so I specialized CSSSelector specifically for tag names.
691
692         To store the data, if the name is already lowercase, just use the m_data pointer
693         as usual.
694         If the name is not lowercase, allocate a new small structure in the union to store
695         both names.
696
697         Tests: fast/css/tagname-and-namespace-case-sensitivity-xml-in-html.html
698                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml-expected.xhtml
699                fast/css/tagname-and-namespace-case-sensitivity-xml-in-xhtml.xhtml
700                fast/css/tagname-case-sensitivity-svg-in-html.html
701                fast/css/tagname-case-sensitivity-svg-in-xhtml-expected.xhtml
702                fast/css/tagname-case-sensitivity-svg-in-xhtml.xhtml
703                fast/css/tagname-case-sensitivity-xml-in-html.html
704                fast/css/tagname-case-sensitivity-xml-in-xhtml-expected.xhtml
705                fast/css/tagname-case-sensitivity-xml-in-xhtml.xhtml
706                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-html.html
707                fast/selectors/element-closest-tagname-case-sensitivity-svg-in-xhtml.xhtml
708                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-html.html
709                fast/selectors/element-matches-tagname-case-sensitivity-svg-in-xhtml.xhtml
710                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-html.html
711                fast/selectors/querySelector-tagname-case-sensitivity-svg-in-xhtml.xhtml
712                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-html.html
713                fast/selectors/querySelector-tagname-case-sensitivity-xml-in-xhtml.xhtml
714                fast/selectors/tagname-adjacent-backtracking-case-sensitivity-html.html
715                fast/selectors/tagname-descendant-backtracking-case-sensitivity-html.html
716
717         * css/CSSGrammar.y.in:
718         The parser is unaware of anything case related. CSSSelector takes care of that.
719
720         * css/CSSSelector.cpp:
721         (WebCore::CSSSelector::CSSSelector):
722         (WebCore::CSSSelector::createRareData):
723         * css/CSSSelector.h:
724         (WebCore::CSSSelector::NameWithCase::NameWithCase):
725         (WebCore::CSSSelector::CSSSelector):
726         (WebCore::CSSSelector::~CSSSelector):
727         (WebCore::CSSSelector::tagQName):
728         (WebCore::CSSSelector::tagLowercaseLocalName):
729         The new representation stores both the original form and the lower case
730         form.
731
732         * css/RuleSet.cpp:
733         (WebCore::RuleSet::addRule):
734         (WebCore::RuleSet::shrinkToFit):
735         * css/RuleSet.h:
736         (WebCore::RuleSet::tagRules):
737         * css/ElementRuleCollector.cpp:
738         (WebCore::ElementRuleCollector::collectMatchingRules):
739         The tag name partition is now split in two: lowercase and original case.
740         If the matched element is HTML, the lowercase partition is used. 
741
742         * css/SelectorFilter.cpp:
743         (WebCore::collectElementIdentifierHashes):
744         (WebCore::collectDescendantSelectorIdentifierHashes):
745         This is the most annoying part of the patch performance wise:
746         the bloom filter knows the case of the real elements but it cannot know
747         how selectors will match them.
748
749         To make it work, all names are now converted to lowercase.
750         That implies that we can filter less on XML and we may have to pay for
751         converting the tag name to lowercase.
752
753         I expect the performance hit to be small because:
754         -Having two XML elements with the same name but different case is uncommon.
755         -Most elements use lowercase names.
756
757         Still sad...that's the price to pay for correctness.
758
759         * css/SelectorChecker.cpp:
760         (WebCore::tagMatches):
761         (WebCore::SelectorChecker::checkOne):
762         * css/SelectorChecker.h:
763         (WebCore::SelectorChecker::tagMatches): Deleted.
764         Update the legacy matcher, nothing special.
765
766         * cssjit/SelectorCompiler.cpp:
767         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
768         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
769         (WebCore::SelectorCompiler::constructFragmentsInternal):
770         (WebCore::SelectorCompiler::equalTagNames):
771         (WebCore::SelectorCompiler::equalTagNamePatterns):
772         (WebCore::SelectorCompiler::computeBacktrackingStartOffsetInChain):
773         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
774         (WebCore::SelectorCompiler::computeBacktrackingWidthFromIndirectAdjacent):
775         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
776         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
777         Tag names are used to optimize backtracking; this is quite common for descendant
778         (e.g. div > ul > li).
779         We have to differenciate one new case there: if two tag names are equal
780         when compared case-insensitively but strictly different, they may still
781         be equal if they don't match the same kind of elements or both matches
782         and HTML element.
783
784         * dom/SelectorQuery.cpp:
785         (WebCore::localNameMatches):
786         (WebCore::elementsForLocalName):
787         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
788         Update the inline versions of SelectorQuery.
789
790 2015-01-26  Chris Dumez  <cdumez@apple.com>
791
792         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
793         https://bugs.webkit.org/show_bug.cgi?id=140891
794
795         Reviewed by Anders Carlsson.
796
797         Use std::forward() instead of WTF::move() in CSSPrimitiveValue::create(T&& value)
798         to make sure the argument is not unexpectedly moved when it shouldn't (like I
799         experienced yesterday in Bug 140577):
800         <http://trac.webkit.org/changeset/179105>
801
802         * css/CSSPrimitiveValue.h:
803         (WebCore::CSSPrimitiveValue::create):
804         * css/CSSValuePool.h:
805         (WebCore::CSSValuePool::createValue):
806
807 2015-01-26  Beth Dakin  <bdakin@apple.com>
808
809         Blacklist iBooks for WebKit's default immediate actions
810         https://bugs.webkit.org/show_bug.cgi?id=140854
811         -and corresponding-
812         rdar://problem/19489518
813
814         Reviewed by Tim Horton.
815
816         Add a runtime check for iBooks.
817         * WebCore.exp.in:
818         * platform/RuntimeApplicationChecks.cpp:
819         (WebCore::applicationIsIBooks):
820         * platform/RuntimeApplicationChecks.h:
821
822 2015-01-26  Myles C. Maxfield  <mmaxfield@apple.com>
823
824         [iOS] [SVG -> OTF Converter] Flip the switch off on iOS
825         https://bugs.webkit.org/show_bug.cgi?id=140860
826
827         Reviewed by Darin Adler.
828
829         No new tests because this simply reverts broken code.
830
831         The fonts it makes are grotesque. (See what I did there? Typographic
832         humor is the best humor.)
833
834         * Configurations/FeatureDefines.xcconfig:
835
836 2015-01-26  Chris Dumez  <cdumez@apple.com>
837
838         Demote 'line-height' to a low priority property.
839         https://bugs.webkit.org/show_bug.cgi?id=140817
840
841         Reviewed by Andreas Kling.
842
843         Our special handling of the 'line-height' property is no longer
844         required, since the 'font' shorthand is now expanded in the parser
845         in all cases (also for system fonts).
846
847         This patch is based on the following Blink revision:
848         https://src.chromium.org/viewvc/blink?revision=184629&view=revision
849
850         No new tests, already covered by:
851         fast/css/font-shorthand-line-height.html
852         fast/css/line-height-font-order.html
853
854         * css/CSSPropertyNames.in:
855         * css/StyleResolver.cpp:
856         (WebCore::StyleResolver::styleForKeyframe):
857         (WebCore::StyleResolver::styleForPage):
858         (WebCore::StyleResolver::applyMatchedProperties):
859         (WebCore::StyleResolver::initializeFontStyle):
860         (WebCore::StyleResolver::CascadedProperties::Property::apply):
861         * css/StyleResolver.h:
862         (WebCore::StyleResolver::State::State):
863         (WebCore::StyleResolver::State::setLineHeightValue): Deleted.
864         (WebCore::StyleResolver::State::lineHeightValue): Deleted.
865
866 2015-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
867
868         [GTK] gtkdoc does not appear in DevHelp
869         https://bugs.webkit.org/show_bug.cgi?id=139369
870
871         Reviewed by Philippe Normand.
872
873         * PlatformGTK.cmake: Include the API version in the gtkdoc filenames.
874
875 2015-01-25  Chris Dumez  <cdumez@apple.com>
876
877         Remove 'font' shorthand property special casing
878         https://bugs.webkit.org/show_bug.cgi?id=140577
879
880         Reviewed by Darin Adler.
881
882         Mark CSSPrimitiveValue::m_value.fontFamily as const as it is not
883         supposed to change. This also makes sure that m_value.fontFamily
884         gets copied instead of moved when constructing a clone in
885         CSSPrimitiveValue::cloneForCSSOM(). This was causing several tests
886         to fail on the bots.
887
888         * css/CSSPrimitiveValue.h:
889
890 2015-01-25  Alexey Proskuryakov  <ap@apple.com>
891
892         Setting HTMLMarqueeElement.trueSpeed doesn't work
893         https://bugs.webkit.org/show_bug.cgi?id=140863
894
895         Reviewed by Darin Adler.
896
897         Test: fast/html/marquee-set-truespeed.html
898
899         * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::minimumDelay):
900         Check the boolean attribute properly - an empty value is true.
901
902 2015-01-25  Darin Adler  <darin@apple.com>
903
904         Streamline SVGUseElement shadow tree handling and make it use SVGElementInstance less
905         https://bugs.webkit.org/show_bug.cgi?id=140875
906
907         Reviewed by Anders Carlsson.
908
909         Refactoring of code that is pretty well covered by existing tests, so
910         not adding new tests.
911
912         Inspired by work Rob Buis did in Blink:
913
914             http://src.chromium.org/viewvc/blink?view=revision&revision=173273
915
916         Althgouh that is less than half of what ended up in this patch.
917
918         * dom/ContainerNode.h: Fixed NoEventDispatchAssertion so it can be
919         copied without causing an underflow of NoEventDispatchAssertion::s_count.
920         Made the copy constructor call the default constructor. Also changed it
921         to be based on ASSERT_DISABLED rather than NDEBUG and tweaked it a bit.
922
923         * dom/ElementIteratorAssertions.h: Removed an unnecessary include and
924         an unnecessary default constructor. Changed to use WTF::Optional instead
925         of WTF::OwnPtr to handle NoEventDispatchAssertion, which makes this class
926         copyable and assignable, which in turn makes the iterators based on this
927         copyable and assignable, which is what I needed in SVGUseElement code.
928         Also simplified code in a couple places.
929
930         * dom/TypedElementDescendantIterator.h:
931         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
932         Fixed an error where the arguments to Traversal::next were passed backwards.
933         This led to incomplete iteration in SVGUseElement code, and an immediate
934         assertion failure. Probably could use some unit test coverage, too.
935         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
936         Ditto.
937
938         * svg/SVGUseElement.cpp:
939         (WebCore::SVGUseElement::animatedInstanceRoot): Deleted.
940         (WebCore::SVGUseElement::transferSizeAttributesToShadowTreeTargetClone):
941         Removed the originalElement argument, since we can use the correspondingElement
942         to get back to it. Removed the useElement argument and changed this into a
943         member function.
944         (WebCore::SVGUseElement::svgAttributeChanged): Updated for above changes.
945         (WebCore::subtreeContainsDisallowedElement): Deleted this function, because
946         it was only used to optimize by not calling removeDisallowedElementsFromSubtree,
947         but that function is already similarly efficient when called to do nothing, so
948         the preflight was not useful.
949         (WebCore::SVGUseElement::clearResourceReferences): Call userAgentShadowRoot
950         instead of shadowRoot for clarity.
951         (WebCore::SVGUseElement::buildPendingResource): Pass a reference instead of
952         a pointer to buildShadowAndInstanceTree, since it's guaranteed to not be null.
953         (WebCore::SVGUseElement::shadowTreeTargetClone): Added. Returns the SVG element
954         inside the shadow tree that corresponds to the use element's target.
955         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Changed argument type
956         to a reference instead of a pointer. Removed comments explaining why we have
957         an instance tree, since soon we will not have one. Removed many comments that
958         simply state the names of the functions they are commenting on and perhaps a tiny
959         bit more. Changed to not use m_targetElementInstance as much, dealing with the
960         shadow tree directly instead of through the instance tree.
961         (WebCore::SVGUseElement::toClipPath): Use shadowTreeTargetClone instead of
962         getting at the element through m_targetElementInstance.
963         (WebCore::SVGUseElement::rendererClipChild): Ditto.
964         (WebCore::removeDisallowedElementsFromSubtree): Removed the inline keyword,
965         since there's no good reason to inline thif function's body. Improved local
966         variable names and used a modern for loop. Also moved the comment about why
967         this function is used here inside the function instead of repeating it at
968         each call site.
969         (WebCore::SVGUseElement::buildShadowTree): Changed to take a reference
970         instead of a pointer. Moved the check to see if the target is disallowed
971         out of this function and into buildShadowAndInstanceTree, which needs to
972         handle that failure explicitly. Tightened up the code a bit, using Ref instead
973         of RefPtr, putting the comment about removeDisallowedElementsFromSubtree into
974         that function itself, and removing the unneeded subtreeContainsDisallowedElement
975         check entirely.
976         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed the argument,
977         getting the shadow tree from the shadowTree function instead. Walk the tree
978         iteratively instead of recursively, using the descendantsOfType function.
979         Rearranged and streamlined the logic.
980         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto.
981         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
982         (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Renamed
983         this to avoid the term "replaced element", which is not a reasonable way to
984         refer to the <g> element in the shadow tree that replaces the <use> element.
985         Changed the argument type to SVGGElement to make it harder to misuse this
986         function by accident, and made the use element be "this" instead of passing
987         it as an argument.
988         (WebCore::SVGUseElement::selfHasRelativeLengths): Call hasRelativeLengths
989         on the target inside the shadow tree rather than the original target, which
990         makes more sense anyway, and is straightforward now that we have the
991         shadowTreeTargetClone function. Removes use of m_targetElementInstance here.
992
993         * svg/SVGUseElement.h: Updated for above changes.
994
995         * svg/SVGUseElement.idl: Removed animatedInstanceRoot and tweaked formatting.
996
997 2015-01-25  Chris Dumez  <cdumez@apple.com>
998
999         Remove 'font' shorthand property special casing
1000         https://bugs.webkit.org/show_bug.cgi?id=140577
1001
1002         Reviewed by Darin Adler.
1003
1004         Expand system font values during 'font' property parsing. The 'font'
1005         CSS property was the only shorthand that wasn't always expanded in
1006         the CSS parser, so it needed a lot of special handling that we can
1007         now get rid of.
1008
1009         This patch is inspired from the following Blink revision:
1010         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
1011
1012         Tests:
1013         - fast/css/css2-system-fonts.html (existing)
1014         - fast/css/CSSPrimitiveValue-font-family-primitiveType.html (new)
1015         - fast/css/font-systemFontID-parsing.html (new)
1016         - fast/css/font-shorthand-line-height.html (rebased)
1017
1018         * WebCore.xcodeproj/project.pbxproj:
1019         * css/CSSCalculationValue.cpp:
1020         (WebCore::hasDoubleValue):
1021         Handle CSS_FONT_FAMILY similarly to CSS_STRING in the switch.
1022
1023         * css/CSSFontFamily.h: Added.
1024         Introduce new CSSFontFamily class to store font families inside
1025         CSSPrimitive, instead of using a simple String as previously. We need
1026         an additional 'fromSystemFontID' flag in addition to the font family
1027         name now that system font ID are expanded during parsing. This
1028         information is needed later on by the StyleBuilder (see comment below).
1029
1030         * css/CSSFontSelector.cpp:
1031         (WebCore::CSSFontSelector::addFontFaceRule):
1032         Update code dealing with font family CSSPrimitiveValues now that they
1033         hold a CSSFontFamily internally instead of a String.
1034
1035         * css/CSSParser.cpp:
1036         (WebCore::CSSParser::parseValue):
1037         (WebCore::CSSParser::parseSystemFont):
1038         Expand system font values for the 'font' property by asking the
1039         RenderTheme for the system font and using it to set the 'font'
1040         longhand properties.
1041
1042         * css/CSSParserValues.cpp:
1043         (WebCore::CSSParserValue::createCSSValue):
1044         Handle CSS_FONT_FAMILY value in the switch.
1045
1046         * css/CSSPrimitiveValue.cpp:
1047         (WebCore::CSSPrimitiveValue::primitiveType):
1048         Make sure we still expose font family CSSPrimitiveValues to the Web as
1049         CSS_STRING, even though we are using a slightly different representation
1050         internally. This is so that we don't change web-exposed behavior and I
1051         added a new layout test to cover this.
1052
1053         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1054         (WebCore::CSSPrimitiveValue::cleanup):
1055         (WebCore::CSSPrimitiveValue::getStringValue):
1056         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
1057         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1058         (WebCore::CSSPrimitiveValue::equals):
1059         Handle CSS_FONT_FAMILY type in switches.
1060
1061         * css/CSSPrimitiveValue.h:
1062         (WebCore::CSSPrimitiveValue::isFontFamily):
1063         Add method to test if a CSSPrimitiveValue holds a CSSFontFamily
1064         internally.
1065
1066         (WebCore::CSSPrimitiveValue::fontFamily):
1067         Add a getter to retrieve the internal CSSFontFamily object if the
1068         primitive type is CSS_FONT_FAMILY.
1069
1070         * css/CSSPropertyNames.in:
1071         Treat 'font' as a regular shorthand property. Specify its longhand
1072         properties so that makeprop.pl can generate the shorthand code for
1073         us. Also demote 'font' to being a low-priority property as it is
1074         now always expanded during parsing.
1075
1076         * css/CSSValuePool.cpp:
1077         (WebCore::CSSValuePool::createFontFamilyValue):
1078         * css/CSSValuePool.h:
1079         * css/StyleBuilderCustom.h:
1080         (WebCore::StyleBuilderCustom::applyValueFontFamily):
1081         - Update the 'font-family' value setter in the StyleBuilder to reflect
1082         the changes in the CSS parser. The CSSPrimitiveValues in the list now
1083         have CSS_FONT_FAMILY type instead of CSS_STRING.
1084         - We also set the 'isGenericFamily' flag if the font-family was expanded
1085           from a system font ID (e.g. caption). The 'isGenericFamily' flag is
1086           used later on to property set the 'isSpecifiedFont' flag on the
1087           FontDescription object. If we don't do this, system font values will
1088           be treated as specified fonts, which means that we will no longer use
1089           the 'use backslash as Yen sign' hack for those. This is covered by the
1090           following layout tests:
1091           - fast/text/backslash-to-yen-sign-euc.html
1092           - editing/selection/find-yensign-and-backslash.html
1093
1094         (WebCore::StyleBuilderCustom::applyInitialFont): Deleted.
1095         (WebCore::StyleBuilderCustom::applyInheritFont): Deleted.
1096         (WebCore::StyleBuilderCustom::applyValueFont): Deleted.
1097         Remove StyleBuilder code dealing with the 'font' property. Now that
1098         the 'font' property is always expanded during parsing, this code can
1099         never be reached.
1100
1101         * css/StylePropertyShorthand.cpp:
1102         (WebCore::isExpandedShorthand):
1103         Stop returning false for 'font' as it is now expanded during parsing
1104         as well. We should probably consider renaming this method to something
1105         else now that all shorthands are expanded, maybe isCSSShorthand() or
1106         isShorthandProperty().
1107
1108         (WebCore::fontShorthand): Deleted.
1109         * css/StylePropertyShorthand.h:
1110         (WebCore::matchingCustomShorthandsForLonghand): Deleted.
1111         Remove custom shorthand code for the 'font' property as it is now
1112         generated by makeprop.pl, like other shorthands.
1113
1114         * css/StyleResolver.cpp:
1115         (WebCore::StyleResolver::applyFont): Deleted.
1116         This is unused now that the StyleBuilder code for 'font' has been
1117         removed.
1118
1119         * css/makeprop.pl:
1120         Remove custom shorthand code for 'font' as it no longer requires any
1121         special handling.
1122
1123 2015-01-25  Timothy Horton  <timothy_horton@apple.com>
1124
1125         Long spins under Frame::rangeForPoint when doing Lookup on feedly.com
1126         https://bugs.webkit.org/show_bug.cgi?id=140862
1127         <rdar://problem/19566089>
1128
1129         Reviewed by Dan Bernstein.
1130
1131         * page/Frame.cpp:
1132         (WebCore::Frame::rangeForPoint):
1133         If there isn't a selectable text node at the given point, rangeForPoint
1134         will eventually return null. However, we can make it fail much faster
1135         by checking the initial position's text-ness and selectability.
1136
1137 2015-01-24  Darin Adler  <darin@apple.com>
1138
1139         Move height/width implementation for use element from RenderSVGViewportContainer to SVGUseElement
1140         https://bugs.webkit.org/show_bug.cgi?id=140826
1141
1142         Reviewed by Anders Carlsson.
1143
1144         Tests: svg/animations/use-animate-width-and-height.html
1145                svg/custom/use-attribute-invalidations.html
1146                svg/custom/use-dynamic-attribute-setting.html
1147
1148         This is an adaptation of work Rob Buis did in Blink:
1149
1150             http://src.chromium.org/viewvc/blink?view=revision&revision=173258
1151
1152         The goal here is to reduce use of SVGElementInstance since we are going to
1153         remove it. The tests Rob added to Blink (which I believe I improved a bit here)
1154         meant we had to fix quite a few bugs in the implementation of the width/height
1155         logic rather than just moving it. Even so, this could use even more test coverage
1156         since there is separate logic for <symbol> and <svg>, three different code paths
1157         (animation/attribute setting, initial creation, and one other), and also
1158         distinct issues for attributes not set at all, attributes set to values that
1159         can't be parsed, and attributes set with different units.
1160
1161         * rendering/svg/RenderSVGViewportContainer.cpp:
1162         (WebCore::RenderSVGViewportContainer::calcViewport): Removed the old logic.
1163
1164         * svg/SVGSVGElement.cpp:
1165         (WebCore::SVGSVGElement::SVGSVGElement): Use ASCIILiteral to more efficiently
1166         create strings from ASCII literals here.
1167         (WebCore::SVGSVGElement::parseAttribute): Default to 100%, not 0, when the
1168         width or height property are either not set or not successfully parsed. Without
1169         this change, one of the SVG tests starts failing.
1170
1171         * svg/SVGUseElement.cpp:
1172         (WebCore::updateWidthAndHeight): Added. The tricky part here is that we have
1173         to copy width and height attributes only if they were successfully parsed, and
1174         also we need to copy the current animating values, not the original attribute
1175         strings. Kind of messy, but I wanted to adapt Rob's solution for the time being,
1176         rather than inventing something new.
1177         (WebCore::SVGUseElement::svgAttributeChanged): Call updateWidthAndHeight.
1178         This is used both when actual attribute changes occur and also when animation
1179         changes the current value.
1180         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateWidthAndHeight.
1181         This is used when the shadow elements are first created.
1182         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Call updateWidthAndHeight.
1183         This was in Rob's patch, but I am not sure we have sufficient test coverage.
1184
1185 2015-01-24  Chris Dumez  <cdumez@apple.com>
1186
1187         Provide implementation for WTF::DefaultHash<bool>
1188         https://bugs.webkit.org/show_bug.cgi?id=140848
1189
1190         Reviewed by Anders Carlsson.
1191
1192         Use HashMap<std::pair<UChar32, bool>> type in Font.cpp for
1193         CharacterFallbackMap instead of HashMap<std::pair<UChar32, unsigned>>.
1194         It builds now that WTF::DefaultHash<bool> is defined in WTF.
1195
1196         * platform/graphics/Font.cpp:
1197         (WebCore::Font::removeFromSystemFallbackCache):
1198
1199 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
1200
1201         [Win] Cursor assignment operator is skipping scale factor
1202         https://bugs.webkit.org/show_bug.cgi?id=140852
1203
1204         Reviewed by Chris Dumez.
1205
1206         Found by fast/events/mouse-cursor-image-set.html
1207
1208         * platform/win/CursorWin.cpp:
1209         (WebCore::Cursor::operator=): Make sure to also assign the
1210         scale factor.
1211
1212 2015-01-23  David Kilzer  <ddkilzer@apple.com>
1213
1214         [iOS] Attempt to fix the build after AVValueTiming.h moved
1215
1216         * platform/spi/ios/AVKitSPI.h: The AVValueTiming.h header moved
1217         to an unexpected location, so work around it by using local SPI
1218         declarations.
1219
1220 2015-01-23  Alexey Proskuryakov  <ap@apple.com>
1221
1222         Try to fix the build after r179056.
1223
1224         * platform/Cursor.h: (WebCore::Cursor::Cursor): Initialize dadat members in correct order.
1225
1226 2015-01-23  Brent Fulgham  <bfulgham@apple.com>
1227
1228         [Win] Cursor copy constructor does not initialize scale factor
1229         https://bugs.webkit.org/show_bug.cgi?id=140849
1230
1231         Reviewed by Antti Koivisto.
1232
1233         Found by fast/events/mouse-cursor-image-set.html
1234
1235         Make sure the scale factor is captured during copy construction. Also make sure
1236         it is properly initialized in the default constructor, since it it used in the
1237         Windows port for some default cursors.
1238
1239         * platform/CursorWin.h:
1240         * platform/win/CursorWin.cpp:
1241         (WebCore::Cursor::Cursor): Make sure copy constructor captures
1242         the scale factor.
1243
1244 2015-01-23  Benjamin Poulain  <bpoulain@apple.com>
1245
1246         Add pointer/hover media queries
1247         https://bugs.webkit.org/show_bug.cgi?id=134822
1248
1249         Reviewed by Antti Koivisto.
1250
1251         Media Queries Level 4 introduces two types of Interaction Media Features:
1252         "pointer" and "hover". Those media features are useful for adapting the design
1253         to the type of input:
1254             http://dev.w3.org/csswg/mediaqueries-4/#mf-interaction
1255
1256         This implementation is trivial: just #ifdef the return value depending on
1257         the support for touch events.
1258         In the future we should move that to a client interface but let's start easy
1259         for now.
1260
1261         Tests: fast/media/mq-any-hover-cssom.html
1262                fast/media/mq-any-hover-invalid.html
1263                fast/media/mq-any-hover-matchMedia.html
1264                fast/media/mq-any-hover-styling.html
1265                fast/media/mq-any-pointer-cssom.html
1266                fast/media/mq-any-pointer-invalid.html
1267                fast/media/mq-any-pointer-matchMedia.html
1268                fast/media/mq-any-pointer-styling.html
1269                fast/media/mq-hover-cssom.html
1270                fast/media/mq-hover-invalid.html
1271                fast/media/mq-hover-matchMedia.html
1272                fast/media/mq-hover-styling.html
1273                fast/media/mq-pointer-cssom.html
1274                fast/media/mq-pointer-invalid.html
1275                fast/media/mq-pointer-matchMedia.html
1276                fast/media/mq-pointer-styling.html
1277
1278         * css/CSSValueKeywords.in:
1279         * css/MediaFeatureNames.h:
1280         * css/MediaQueryEvaluator.cpp:
1281         (WebCore::hoverMediaFeatureEval):
1282         (WebCore::any_hoverMediaFeatureEval):
1283         (WebCore::pointerMediaFeatureEval):
1284         (WebCore::any_pointerMediaFeatureEval):
1285         (WebCore::leastCapablePrimaryPointerDeviceType): Deleted.
1286         * css/MediaQueryExp.cpp:
1287         (WebCore::featureWithCSSValueID):
1288         (WebCore::featureWithZeroOrOne):
1289         (WebCore::featureWithoutValue):
1290         * page/EventHandler.cpp:
1291         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
1292         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
1293         * page/Settings.in:
1294
1295 2015-01-23  Commit Queue  <commit-queue@webkit.org>
1296
1297         Unreviewed, rolling out r179051.
1298         https://bugs.webkit.org/show_bug.cgi?id=140850
1299
1300         broke the 32-bit build (Requested by thorton on #webkit).
1301
1302         Reverted changeset:
1303
1304         "[Mac][EME] Support ClearKey encryption with AES128-encrypted
1305         HLS"
1306         https://bugs.webkit.org/show_bug.cgi?id=140825
1307         http://trac.webkit.org/changeset/179051
1308
1309 2015-01-23  Joseph Pecoraro  <pecoraro@apple.com>
1310
1311         Web Inspector: Rename InjectedScriptHost::type to subtype
1312         https://bugs.webkit.org/show_bug.cgi?id=140841
1313
1314         Reviewed by Timothy Hatcher.
1315
1316         * inspector/WebInjectedScriptHost.cpp:
1317         (WebCore::WebInjectedScriptHost::subtype):
1318         (WebCore::WebInjectedScriptHost::type): Deleted.
1319         * inspector/WebInjectedScriptHost.h:
1320
1321 2015-01-23  Jer Noble  <jer.noble@apple.com>
1322
1323         [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
1324         https://bugs.webkit.org/show_bug.cgi?id=140825
1325
1326         Reviewed by Eric Carlson.
1327
1328         Test: http/tests/media/clearkey/clear-key-hls-aes128.html
1329
1330         Add support for ClearKey encryption when used with an AES-128 encrypted HLS stream.
1331
1332         * Modules/encryptedmedia/CDM.cpp:
1333         (WebCore::installedCDMFactories): Add the CDMPrivateClearKey factory.
1334         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
1335         (WebCore::CDMPrivateClearKey::supportsKeySystem): Support the "org.w3c.clearkey" key system.
1336         (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
1337         (WebCore::CDMPrivateClearKey::supportsMIMEType): Ditto.
1338         (WebCore::CDMPrivateClearKey::createSession): Create a CDMSessionClearKey.
1339         * Modules/encryptedmedia/CDMPrivateClearKey.h:
1340         (WebCore::CDMPrivateClearKey::create): Simple factory.
1341         (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Virtual destructor.
1342         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Simple destructor.
1343         * Modules/encryptedmedia/CDMSessionClearKey.cpp: Added.
1344         (WebCore::clearKeyVM): Static method returning the VM to be used by JSON parsing.
1345         (WebCore::CDMSessionClearKey::CDMSessionClearKey): Simple constructor.
1346         (WebCore::CDMSessionClearKey::~CDMSessionClearKey): Simple destructor.
1347         (WebCore::CDMSessionClearKey::generateKeyRequest): Store the initData, ensure that it consists of a UTF8-encoded key
1348             URI, and return same.
1349         (WebCore::CDMSessionClearKey::releaseKeys): Purged all cached keys.
1350         (WebCore::CDMSessionClearKey::update): Parse raw JSON-encoded JWK keys, rejecting non-AES, non-oct keys.
1351         (WebCore::CDMSessionClearKey::cachedKeyForKeyID): Return cached keys.
1352         * Modules/encryptedmedia/CDMSessionClearKey.h:
1353
1354         Add support for the "org.w3c.clearkey" CDM to MediaPlayerPrivateAVFoundationObjC, and do so in a platform-agnostic
1355         way by simply asking for raw key data from MediaPlayerClient when notified that a key has been added.
1356
1357         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1358         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1359         (WebCore::keySystemIsSupported):
1360         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1361         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
1362         (WebCore::fulfillRequestWithKeyData): Added utility method.
1363         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1364         (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded):
1365
1366         Pipe a keyAdded() notification down to MediaPlayer and a cachedKeyForKeyId() request up to CDMSessionClearKey:
1367
1368         * Modules/encryptedmedia/MediaKeySession.cpp:
1369         (WebCore::MediaKeySession::cachedKeyForKeyId):
1370         (WebCore::MediaKeySession::addKeyTimerFired):
1371         * Modules/encryptedmedia/MediaKeySession.h:
1372         * Modules/encryptedmedia/MediaKeys.cpp:
1373         (WebCore::MediaKeys::keyAdded):
1374         (WebCore::MediaKeys::cachedKeyForKeyId):
1375         * Modules/encryptedmedia/MediaKeys.h:
1376         * html/HTMLMediaElement.cpp:
1377         (WebCore::HTMLMediaElement::keyAdded):
1378         * html/HTMLMediaElement.h:
1379         * platform/graphics/CDMSession.h:
1380         (WebCore::CDMSession::cachedKeyForKeyID):
1381         * platform/graphics/MediaPlayer.cpp:
1382         (WebCore::MediaPlayer::keyAdded):
1383         (WebCore::MediaPlayer::cachedKeyForKeyId):
1384         * platform/graphics/MediaPlayer.h:
1385         (WebCore::MediaPlayerClient::mediaPlayerCachedKeyForKeyId):
1386         * platform/graphics/MediaPlayerPrivate.h:
1387         (WebCore::MediaPlayerPrivateInterface::keyAdded):
1388
1389         Add new files to project:
1390
1391         * WebCore.xcodeproj/project.pbxproj:
1392         * CMakeLists.txt:
1393         * WebCore.vcxproj/WebCore.vcxproj:
1394         * WebCore.vcxproj/WebCore.vcxproj.filters:
1395
1396 2015-01-23  Chris Dumez  <cdumez@apple.com>
1397
1398         Implement system fonts FontDescription caching at RenderTheme level
1399         https://bugs.webkit.org/show_bug.cgi?id=140840
1400
1401         Reviewed by Andreas Kling.
1402
1403         Implement system fonts FontDescription caching at RenderTheme level
1404         instead of duplicating the logic in its subclasses for each platform.
1405         This reduces code / logic duplication and reduces the amount of
1406         platform-specific code. This will also make the refactoring at
1407         Bug 140577 a lot easier.
1408
1409         The caching logic remains in RenderThemeIOS class for iOS because:
1410         - It supports different system font values than all other platforms
1411         - It requires cache invalidation in some cases while other platforms
1412           do not.
1413
1414         This patch is inspired by the following Blink revision:
1415         https://src.chromium.org/viewvc/blink?view=rev&revision=184449
1416
1417         Test: fast/css/css2-system-fonts.html
1418
1419 2015-01-23  Zalan Bujtas  <zalan@apple.com>
1420
1421         Simple line layout: Refactor line wrapping logic.
1422         https://bugs.webkit.org/show_bug.cgi?id=140834
1423
1424         Reviewed by Antti Koivisto.
1425
1426         Use a more readable structure to deal with wrapping logic. 
1427
1428         No change in functionality.
1429
1430         * rendering/SimpleLineLayout.cpp:
1431         (WebCore::SimpleLineLayout::createLineRuns):
1432
1433 2015-01-23  Zalan Bujtas  <zalan@apple.com>
1434
1435         Simple line layout: Use only FlowContents::nextTextFragment() to read fragments from the text flow.
1436         https://bugs.webkit.org/show_bug.cgi?id=140842
1437
1438         Reviewed by Antti Koivisto.
1439
1440         This is in preparation to make FlowContents a content iterator class.
1441
1442         No change in functionality.
1443
1444         * rendering/SimpleLineLayout.cpp:
1445         (WebCore::SimpleLineLayout::initializeNewLine):
1446         * rendering/SimpleLineLayoutFlowContents.h:
1447
1448 2015-01-23  Bartlomiej Gajda  <b.gajda@samsung.com>
1449
1450         [MSE] Implement Range Removal algorithm.
1451         https://bugs.webkit.org/show_bug.cgi?id=140622.
1452
1453         Reviewed by Jer Noble.
1454
1455         This extract Range Removal algorithm (Editor's Draft version, bug:26316) from remove(),
1456         to separate function to deal with old FIXME since bug in spec was resolved.
1457         This should both guarantee good order of events, and prevent from switching to 'open' state
1458         during end of stream.
1459
1460         Test: media/media-source/media-source-end-of-stream-readyState.html
1461
1462         * Modules/mediasource/MediaSource.cpp:
1463         (WebCore::MediaSource::setDurationInternal): update to use rangeRemoval(), not remove()
1464         (WebCore::MediaSource::streamEndedWithError): remove FIXME, brigning back correct order of events.
1465         * Modules/mediasource/SourceBuffer.cpp:
1466         (WebCore::SourceBuffer::remove): comments up to spec, extract rangeRemoval algorithm.
1467         (WebCore::SourceBuffer::rangeRemoval):
1468         (WebCore::SourceBuffer::removeTimerFired): comments up to spec.
1469         * Modules/mediasource/SourceBuffer.h:
1470
1471 2015-01-23  Enrica Casucci  <enrica@apple.com>
1472
1473         Hit test returns incorrect results when performed in paginated content over the page gaps.
1474         https://bugs.webkit.org/show_bug.cgi?id=140837
1475         rdar://problem/17494390
1476
1477         Reviewed by Dave Hyatt.
1478
1479         Tests: fast/multicol/pagination/LeftToRight-tb-hittest.html
1480                fast/multicol/pagination/RightToLeft-rl-hittest.html
1481
1482         When hittesting reaches the RenderView we need to check if we are
1483         in paginated content and use the correct class to compute hittest results.
1484
1485         * rendering/RenderView.cpp:
1486         (WebCore::RenderView::updateHitTestResult):
1487
1488 2015-01-23  Andreas Kling  <akling@apple.com>
1489
1490         Document should be a FontSelectorClient.
1491         <https://webkit.org/b/140833>
1492
1493         Reviewed by Antti Koivisto.
1494
1495         Make Document a FontSelectorClient so it can listen to the invalidation
1496         callbacks from FontSelector instead of having code in FontSelector that
1497         calls out to Document on invalidation.
1498
1499         * css/CSSFontSelector.cpp:
1500         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
1501         * dom/Document.cpp:
1502         (WebCore::Document::fontsNeedUpdate):
1503         (WebCore::Document::fontSelector):
1504         (WebCore::Document::clearStyleResolver):
1505         * dom/Document.h:
1506
1507 2015-01-23  Chris Dumez  <cdumez@apple.com>
1508
1509         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
1510         https://bugs.webkit.org/show_bug.cgi?id=140829
1511
1512         Reviewed by Andreas Kling.
1513
1514         Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
1515         by calling CSSValuePool::createFontFamilyValue() to create the font
1516         family CSSPrimitiveValue instead of cssValuePool().createValue().
1517
1518         * css/CSSComputedStyleDeclaration.cpp:
1519         (WebCore::valueForFamily):
1520
1521 2015-01-23  Timothy Horton  <timothy_horton@apple.com>
1522
1523         QLPreviewMenuItem popovers don't close when the page scrolls
1524         https://bugs.webkit.org/show_bug.cgi?id=140806
1525         <rdar://problem/19555618>
1526
1527         Reviewed by Beth Dakin.
1528
1529         * platform/spi/mac/QuickLookMacSPI.h:
1530         Add some SPI.
1531
1532 2015-01-23  Andreas Kling  <akling@apple.com>
1533
1534         Hang CSSFontSelector off Document instead of StyleResolver.
1535         <https://webkit.org/b/140820>
1536
1537         Reviewed by Antti Koivisto.
1538
1539         Move the CSSFontSelector from StyleResolver to Document. This is the first
1540         step towards making the CSSFontSelector be able to survive full style recalc.
1541
1542         Clearing a Document's StyleResolver will still nuke the CSSFontSelector,
1543         though that is done in Document::clearStyleResolver() now.
1544
1545         * css/CSSFontSelector.cpp:
1546         (WebCore::CSSFontSelector::CSSFontSelector):
1547         * css/CSSFontSelector.h:
1548
1549             Modernize CSSFontSelector construction a bit by having create() return
1550             a Ref and the constructor take a Document& instead of a Document*.
1551             Also made the constructor explicit.
1552
1553         (WebCore::StyleResolver::~StyleResolver):
1554         * dom/Document.cpp:
1555         (WebCore::Document::clearStyleResolver):
1556
1557             Nuke the current CSSFontSelector in clearStyleResolver() instead of
1558             in ~StyleResolver. It's a minor change, but shows the way forward.
1559             Added a FIXME about how CSSFontSelector should eventually survive
1560             this operation.
1561
1562         (WebCore::Document::fontSelector):
1563         * css/FontLoader.cpp:
1564         (WebCore::FontLoader::loadFont):
1565         (WebCore::FontLoader::checkFont):
1566         (WebCore::FontLoader::resolveFontStyle):
1567         * css/RuleSet.cpp:
1568         (WebCore::RuleSet::addChildRules):
1569         * css/StyleResolver.h:
1570         (WebCore::StyleResolver::fontSelector): Deleted.
1571         * css/StyleResolver.cpp:
1572         (WebCore::StyleResolver::StyleResolver):
1573         (WebCore::StyleResolver::appendAuthorStyleSheets):
1574         (WebCore::StyleResolver::styleForElement):
1575         (WebCore::StyleResolver::defaultStyleForElement):
1576         (WebCore::StyleResolver::updateFont):
1577         * dom/Document.h:
1578         * html/canvas/CanvasRenderingContext2D.cpp:
1579         (WebCore::CanvasRenderingContext2D::setFont):
1580         * rendering/RenderListBox.cpp:
1581         (WebCore::RenderListBox::updateFromElement):
1582         (WebCore::RenderListBox::paintItemForeground):
1583         * rendering/RenderMenuList.cpp:
1584         (RenderMenuList::fontSelector):
1585         * rendering/RenderSearchField.cpp:
1586         (WebCore::RenderSearchField::fontSelector):
1587         * rendering/TextAutoSizing.cpp:
1588         (WebCore::TextAutoSizingValue::adjustNodeSizes):
1589         (WebCore::TextAutoSizingValue::reset):
1590         * rendering/svg/RenderSVGInlineText.cpp:
1591         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
1592         * style/StyleResolveForDocument.cpp:
1593         (WebCore::Style::resolveForDocument):
1594         * style/StyleResolveTree.cpp:
1595         (WebCore::Style::resolveTree):
1596
1597             Move CSSFontSelector ownership from StyleResolver to Document.
1598
1599 2015-01-23  Jer Noble  <jer.noble@apple.com>
1600
1601         Layout Test http/tests/media/track-in-band-hls-metadata.html is flaky
1602         https://bugs.webkit.org/show_bug.cgi?id=140827
1603
1604         Reviewed by Eric Carlson.
1605
1606         Create the m_metadataTrack by calling prepareMetadataTrack() before deref-ing it.
1607
1608         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1609         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1610
1611 2015-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1612
1613         [GTK] Add initial database process support
1614         https://bugs.webkit.org/show_bug.cgi?id=139491
1615
1616         Reviewed by Sergio Villar Senin.
1617
1618         * platform/sql/SQLiteFileSystem.cpp:
1619         (WebCore::SQLiteFileSystem::openDatabase): Use
1620         WebCore::fileSystemRepresentation() for the database filename,
1621         otherwise sqlite3_open() fails when the filename contains "%2E".
1622
1623 2015-01-23  Byeongha Cho  <byeongha.cho@samsung.com>
1624
1625         Initialization for some member variable of FontPlatformData
1626         https://bugs.webkit.org/show_bug.cgi?id=136327
1627
1628         Reviewed by Myles C. Maxfield.
1629
1630         No new tests. There's no functional change.
1631
1632         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1633         (WebCore::FontPlatformData::FontPlatformData):
1634         (WebCore::FontPlatformData::operator=):
1635         (WebCore::FontPlatformData::~FontPlatformData):
1636
1637 2015-01-23  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1638
1639         Rename ChildNodeRemovalNotifier::m_insertionPoint to m_removalPoint
1640         https://bugs.webkit.org/show_bug.cgi?id=140766
1641
1642         Reviewed by Andreas Kling.
1643
1644         ChildNodeRemovalNotifier::ChildNodeRemovalNotifier(...) should take
1645         a node as removal point.
1646         It's probably Copy/Paste from ChildNodeInsertionNotifier::m_insertionPoint.
1647
1648         No new tests. No behavior change.
1649
1650         * dom/ContainerNodeAlgorithms.h:
1651         (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier):
1652         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
1653         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
1654
1655 2015-01-23  Hunseop Jeong  <hs85.jeong@samsung.com>
1656
1657         [GTK] Fix debug build after r178940
1658         https://bugs.webkit.org/show_bug.cgi?id=140814
1659
1660         Reviewed by Carlos Garcia Campos.
1661
1662         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1663         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):
1664
1665 2015-01-22  Zalan Bujtas  <zalan@apple.com>
1666
1667         Simple line layout: Move leading whitespace handling from removeTrailingWhitespace() to initializeNewLine().
1668         https://bugs.webkit.org/show_bug.cgi?id=140757
1669
1670         Reviewed by Antti Koivisto.
1671
1672         Checking if overflowed pre-wrap whitespace needs to be ignored should not be part of the trailing whitespace handling.
1673         Move it to initializeNewLine(). 
1674
1675         No change in functionality.
1676
1677         * rendering/SimpleLineLayout.cpp:
1678         (WebCore::SimpleLineLayout::preWrap):
1679         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
1680         (WebCore::SimpleLineLayout::initializeNewLine):
1681         * rendering/SimpleLineLayoutFlowContents.h:
1682         (WebCore::SimpleLineLayout::FlowContents::isLineBreak):
1683
1684 2015-01-22  Jer Noble  <jer.noble@apple.com>
1685
1686         [iOS] Media controls disappear when loading a HLS live stream
1687         https://bugs.webkit.org/show_bug.cgi?id=140792
1688         rdar://problem/19491658
1689
1690         Reviewed by Dean Jackson.
1691
1692         Overload reconnectControls to reconnect the "start playback" button
1693         if the control type has been set to "StartPlaybackButton".
1694
1695         * Modules/mediacontrols/mediaControlsiOS.js:
1696         (ControllerIOS.prototype.reconnectControls):
1697
1698 2015-01-22  peavo@outlook.com  <peavo@outlook.com>
1699
1700         [Win] No plugin content on some sites.
1701         https://bugs.webkit.org/show_bug.cgi?id=140780
1702
1703         Reviewed by Anders Carlsson.
1704
1705         Return script instance from ScriptController::createScriptInstanceForWidget(),
1706         instead of always returning null.
1707
1708         * bindings/js/ScriptController.cpp:
1709         (WebCore::ScriptController::createScriptInstanceForWidget):
1710         * plugins/PluginViewBase.h:
1711         (WebCore::PluginViewBase::bindingInstance):
1712
1713 2015-01-22  Jer Noble  <jer.noble@apple.com>
1714
1715         [Mac][EME] Adopt changes to AVStreamSession class methods
1716         https://bugs.webkit.org/show_bug.cgi?id=140778
1717         rdar://problem/19458200
1718
1719         Reviewed by Eric Carlson.
1720
1721         AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
1722         read and modify records stored at non-default storage locations.
1723
1724         * Modules/encryptedmedia/MediaKeySession.cpp:
1725         (WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
1726         * Modules/encryptedmedia/MediaKeySession.h:
1727         * platform/graphics/CDMSession.h:
1728         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1729         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1730         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
1731         (WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
1732         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
1733         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.
1734
1735 2015-01-22  Michael Saboff  <msaboff@apple.com>
1736
1737         REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
1738         https://bugs.webkit.org/show_bug.cgi?id=140794
1739
1740         Reviewed by Anders Carlsson.
1741
1742         If a document.open has been set, return it instead of always returning a new,
1743         non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.
1744
1745         Test: js/dom/document-overwrite-open.html
1746
1747         * bindings/js/JSHTMLDocumentCustom.cpp:
1748         (WebCore::JSHTMLDocument::getOwnPropertySlot):
1749
1750 2015-01-22  Zalan Bujtas  <zalan@apple.com>
1751
1752         Simple line layout: Reset LineState when starting a new line.
1753         https://bugs.webkit.org/show_bug.cgi?id=140789
1754
1755         Reviewed by Antti Koivisto.
1756
1757         Reset LineState when starting a new line to ensure we always
1758         start with a clean state.
1759
1760         No change in functionality.
1761
1762         * rendering/SimpleLineLayout.cpp:
1763         (WebCore::SimpleLineLayout::updateLineConstrains):
1764         (WebCore::SimpleLineLayout::initializeNewLine):
1765         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
1766         (WebCore::SimpleLineLayout::createTextRuns):
1767
1768 2015-01-22  Roger Fong  <roger_fong@apple.com>
1769
1770         [WebGL2] Create empty interface files for new WebGL2 objects.
1771         https://bugs.webkit.org/show_bug.cgi?id=140779.
1772         <rdar://problem/15002288>
1773
1774         Reviewed by Dean Jackson.
1775
1776         * CMakeLists.txt:
1777         * DerivedSources.cpp:
1778         * DerivedSources.make:
1779         * WebCore.vcxproj/WebCore.vcxproj:
1780         * WebCore.vcxproj/WebCore.vcxproj.filters:
1781         * WebCore.xcodeproj/project.pbxproj:
1782         * html/canvas/WebGLQuery.cpp: Added.
1783         (WebCore::WebGLQuery::create):
1784         (WebCore::WebGLQuery::~WebGLQuery):
1785         (WebCore::WebGLQuery::WebGLQuery):
1786         (WebCore::WebGLQuery::deleteObjectImpl):
1787         * html/canvas/WebGLQuery.h: Added.
1788         * html/canvas/WebGLQuery.idl: Added.
1789         * html/canvas/WebGLSampler.cpp: Added.
1790         (WebCore::WebGLSampler::create):
1791         (WebCore::WebGLSampler::~WebGLSampler):
1792         (WebCore::WebGLSampler::WebGLSampler):
1793         (WebCore::WebGLSampler::deleteObjectImpl):
1794         * html/canvas/WebGLSampler.h: Added.
1795         * html/canvas/WebGLSampler.idl: Added.
1796         * html/canvas/WebGLSharedObject.h:
1797         (WebCore::WebGLSharedObject::isQuery):
1798         (WebCore::WebGLSharedObject::isSampler):
1799         (WebCore::WebGLSharedObject::isSync):
1800         (WebCore::WebGLSharedObject::isTransformFeedback):
1801         (WebCore::WebGLSharedObject::isVertexArrayObject):
1802         * html/canvas/WebGLSync.cpp: Added.
1803         (WebCore::WebGLSync::create):
1804         (WebCore::WebGLSync::~WebGLSync):
1805         (WebCore::WebGLSync::WebGLSync):
1806         (WebCore::WebGLSync::deleteObjectImpl):
1807         * html/canvas/WebGLSync.h: Added.
1808         * html/canvas/WebGLSync.idl: Added.
1809         * html/canvas/WebGLTransformFeedback.cpp: Added.
1810         (WebCore::WebGLTransformFeedback::create):
1811         (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback):
1812         (WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
1813         (WebCore::WebGLTransformFeedback::deleteObjectImpl):
1814         * html/canvas/WebGLTransformFeedback.h: Added.
1815         * html/canvas/WebGLTransformFeedback.idl: Added.
1816         * html/canvas/WebGLVertexArrayObject.cpp: Added.
1817         (WebCore::WebGLVertexArrayObject::create):
1818         (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject):
1819         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
1820         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
1821         * html/canvas/WebGLVertexArrayObject.h: Added.
1822         * html/canvas/WebGLVertexArrayObject.idl: Added.
1823
1824 2015-01-22  Chris Dumez  <cdumez@apple.com>
1825
1826         Fix remaining multiple targets per rule issues in DerivedSources.make
1827         https://bugs.webkit.org/show_bug.cgi?id=140790
1828
1829         Reviewed by David Kilzer.
1830
1831         Fix remaining multiple target per rule issues in DerivedSources.make,
1832         similarly to Bug 140784 and Bug 140756.
1833
1834         This was causing us to run scripts several times to generate the same
1835         files and may lead to malformed files in case of concurrency.
1836
1837         * DerivedSources.make:
1838
1839 2015-01-22  Ryosuke Niwa  <rniwa@webkit.org>
1840
1841         Add a build flag for ES6 class syntax
1842         https://bugs.webkit.org/show_bug.cgi?id=140760
1843
1844         Reviewed by Michael Saboff.
1845
1846         * Configurations/FeatureDefines.xcconfig:
1847
1848 2015-01-22  Chris Dumez  <cdumez@apple.com>
1849
1850         SVGNames.cpp and HTMLNames.cpp are sometimes malformed
1851         https://bugs.webkit.org/show_bug.cgi?id=140784
1852         <rdar://problem/17701233>
1853
1854         Reviewed by David Kilzer.
1855
1856         Due to bad rules in DerivedSources.make, make_names.pl was called
1857         several times with the same arguments during build. This is because
1858         SVG/HTML/MathML each had several targets associated to the same
1859         command. This would cause the command (make_names.pl) to be called
1860         once per target. However, make_names.pl only needs to be executed
1861         once to generate all of the files currently marked as target.
1862
1863         Calling make_names.pl several times for the same files is not only
1864         wasteful, but it can also lead to malformed generated files if the
1865         scripts instances are executed in parallel as they will read / write
1866         from / to the same files.
1867
1868         This patch uses INTERMEDIATE targets instead so that we can still
1869         indicate which files are generated by make_names.pl but only run
1870         the script once.
1871
1872         This is a similar fix as for Bug 140756. There may several other
1873         similar issues in DerivedSources.make but this patch focuses on
1874         make_names.pl. I will take care of other in follow-ups if needed.
1875
1876         * DerivedSources.make:
1877
1878 2015-01-22  Chris Dumez  <cdumez@apple.com>
1879
1880         Have Counter::create() return a Ref<Counter>
1881         https://bugs.webkit.org/show_bug.cgi?id=140777
1882
1883         Reviewed by Andreas Kling.
1884
1885         Have Counter::create() return a Ref<Counter> instead of a PassRefPtr.
1886
1887         The CSSPrimitiveValue class needed some updates as well to support
1888         constructing a CSSPrimitiveValue object from a Ref<>.
1889
1890         * css/CSSPrimitiveValue.cpp:
1891         (WebCore::CSSPrimitiveValue::init):
1892         * css/CSSPrimitiveValue.h:
1893         (WebCore::CSSPrimitiveValue::create):
1894         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1895         * css/Counter.h:
1896         (WebCore::Counter::create):
1897         (WebCore::Counter::cloneForCSSOM):
1898
1899 2015-01-22  Chris Dumez  <cdumez@apple.com>
1900
1901         Drop the legacy FeatureCounter class
1902         https://bugs.webkit.org/show_bug.cgi?id=140749
1903
1904         Reviewed by Andreas Kling.
1905
1906         Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
1907         instead.
1908
1909         * CMakeLists.txt:
1910         * Configurations/WebCore.xcconfig:
1911         * WebCore.exp.in:
1912         * WebCore.vcxproj/WebCore.vcxproj:
1913         * WebCore.vcxproj/WebCore.vcxproj.filters:
1914         * WebCore.xcodeproj/project.pbxproj:
1915         * html/HTMLMediaElement.cpp:
1916         (WebCore::HTMLMediaElement::parseAttribute):
1917         * loader/SubresourceLoader.cpp:
1918         (WebCore::SubresourceLoader::willSendRequest):
1919         (WebCore::SubresourceLoader::didReceiveResponse):
1920         * loader/cache/CachedResource.cpp:
1921         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
1922         * loader/cache/CachedResourceLoader.cpp:
1923         (WebCore::logMemoryCacheResourceRequest):
1924         (WebCore::CachedResourceLoader::requestResource):
1925         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1926         * page/DiagnosticLoggingKeys.cpp:
1927         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey):
1928         (WebCore::DiagnosticLoggingKeys::playedKey):
1929         (WebCore::DiagnosticLoggingKeys::noCacheKey):
1930         (WebCore::DiagnosticLoggingKeys::noStoreKey):
1931         (WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey):
1932         (WebCore::DiagnosticLoggingKeys::mediaKey):
1933         (WebCore::DiagnosticLoggingKeys::isExpiredKey):
1934         (WebCore::DiagnosticLoggingKeys::loadingKey):
1935         (WebCore::DiagnosticLoggingKeys::inMemoryCacheKey):
1936         (WebCore::DiagnosticLoggingKeys::reasonKey):
1937         (WebCore::DiagnosticLoggingKeys::audioKey):
1938         (WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey):
1939         (WebCore::DiagnosticLoggingKeys::resourceRequestKey):
1940         (WebCore::DiagnosticLoggingKeys::revalidatingKey):
1941         (WebCore::DiagnosticLoggingKeys::unusedKey):
1942         (WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey):
1943         (WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey):
1944         (WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey):
1945         (WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey):
1946         (WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey):
1947         (WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey):
1948         (WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey):
1949         (WebCore::DiagnosticLoggingKeys::usedKey):
1950         (WebCore::DiagnosticLoggingKeys::userKey):
1951         (WebCore::DiagnosticLoggingKeys::videoKey):
1952         (WebCore::DiagnosticLoggingKeys::webViewKey):
1953         (WebCore::DiagnosticLoggingKeys::zoomedKey):
1954         * page/DiagnosticLoggingKeys.h:
1955         * page/Settings.in:
1956         * platform/FeatureCounter.cpp: Removed.
1957         * platform/FeatureCounter.h: Removed.
1958         * platform/FeatureCounterKeys.h: Removed.
1959         * platform/ios/FeatureCounter.mm: Removed.
1960
1961 2015-01-22  Benjamin Poulain  <benjamin@webkit.org>
1962
1963         When extending the fallback transitions with their closure, we are modifying the Set while iterating it
1964         https://bugs.webkit.org/show_bug.cgi?id=140785
1965
1966         Reviewed by Andreas Kling.
1967
1968         * contentextensions/NFAToDFA.cpp:
1969         (WebCore::ContentExtensions::populateTransitions):
1970         Make that in two steps: accumulate the fallback transitions then add the closure
1971         of every element.
1972
1973 2015-01-21  Antti Koivisto  <antti@apple.com>
1974
1975         Rename SimpleFontData to Font
1976         https://bugs.webkit.org/show_bug.cgi?id=140496
1977
1978         Reviewed by Zalan Bujtas.
1979
1980         The fallback supporting Font type was renamed FontCascade.
1981         We can now rename SimpleFontData to Font matching the usual definition.
1982
1983 2015-01-22  Zalan Bujtas  <zalan@apple.com>
1984
1985         Simple line layout: Make trailing whitespace handling more explicit.
1986         https://bugs.webkit.org/show_bug.cgi?id=140776
1987
1988         Reviewed by Antti Koivisto.
1989
1990         Differentiate between committed and uncommitted trailing whitespace.
1991         This enables further cleanup in removeTrailingWhitespace().
1992
1993         No change in functionality.
1994
1995         * rendering/SimpleLineLayout.cpp:
1996         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
1997         (WebCore::SimpleLineLayout::LineState::addUncommitted):
1998         (WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
1999         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
2000         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2001         (WebCore::SimpleLineLayout::LineState::LineState): Deleted.
2002         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): Deleted.
2003         (WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): Deleted.
2004
2005 2015-01-22  Alexey Proskuryakov  <ap@apple.com>
2006
2007         Crash in URL::protocol() after appcache load fails
2008         https://bugs.webkit.org/show_bug.cgi?id=140755
2009         rdar://problem/7881290
2010
2011         Reviewed by Dan Bates.
2012
2013         Test: http/tests/appcache/404-resource-with-slow-main-resource.php
2014
2015         Not every cache that isn't being updated is complete. It could also be in a zombie
2016         state after failing to load. We get rid of the cache once the main resource finishes
2017         loading, but while it's being loaded, the zombie still looks like a regular
2018         candidate application cache.
2019
2020         * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::isComplete):
2021         * loader/appcache/ApplicationCache.h:
2022         Removed const from isComplete(), because otherwise we couldn't use ApplicationCacheGroup::m_caches.contains().
2023         Constness doesn't make a lot of sense for these objects anyway.
2024
2025         * loader/appcache/ApplicationCacheGroup.cpp:
2026         (WebCore::ApplicationCacheGroup::failedLoadingMainResource): Toned down an assertion.
2027         We can fail a main resource load when the document has a zombie appcache, too.
2028
2029         * loader/appcache/ApplicationCacheGroup.h:
2030         (WebCore::ApplicationCacheGroup::cacheIsComplete):
2031         (WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): Deleted.
2032         These functions are only used in ApplicationCache::isComplete().
2033
2034 2015-01-22  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2035
2036         Avoid defining always empty Vector<TextCheckingResult>
2037         https://bugs.webkit.org/show_bug.cgi?id=140765
2038
2039         Reviewed by Alexey Proskuryakov.
2040
2041         Pass an empty vector direclty instead.
2042
2043         No new tests. No behavior change.
2044
2045         * editing/SpellChecker.cpp:
2046         (WebCore::SpellChecker::didCheckCancel):
2047
2048 2015-01-22  Chris Dumez  <cdumez@apple.com>
2049
2050         makeprop.pl script is called too many times during build
2051         https://bugs.webkit.org/show_bug.cgi?id=140756
2052         <rdar://problem/19467942>
2053
2054         Reviewed by David Kilzer.
2055
2056         The makeprop.pl script was called 4 times (instead of once) during
2057         build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
2058         had 4 associated targets and thus was called 4 times (with the same
2059         parameter). Calling it once is sufficient to generate all 4 files
2060         that were marked as target. This patch uses an INTERMEDIATE target
2061         instead so that we can indicate that several files are generated
2062         by the same command.
2063
2064         I believe this may be the reason for the sporatic build failures
2065         that look like:
2066         """
2067         CSSPropertyNames.gperf: No keywords in input file!
2068         calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
2069         """
2070         The makeprop.pl script is generating gperf's input file and calling the
2071         gperf executable on this file. If the script is executed several times
2072         in parallel, it would explain the build failures as several instances
2073         of makeprop.pl may be writing / reading from the same
2074         CSSPropertyNames.gperf file.
2075
2076         * DerivedSources.make:
2077
2078 2015-01-22  Commit Queue  <commit-queue@webkit.org>
2079
2080         Unreviewed, rolling out r178894.
2081         https://bugs.webkit.org/show_bug.cgi?id=140775
2082
2083         Broke JSC and bindings tests (Requested by ap_ on #webkit).
2084
2085         Reverted changeset:
2086
2087         "put_by_val_direct need to check the property is index or not
2088         for using putDirect / putDirectIndex"
2089         https://bugs.webkit.org/show_bug.cgi?id=140426
2090         http://trac.webkit.org/changeset/178894
2091
2092 2015-01-22  David Kilzer  <ddkilzer@apple.com>
2093
2094         [iOS] Fix iphoneos SDK builds for ios-ews queue
2095         <http://webkit.org/b/140748>
2096
2097         Reviewed by Daniel Bates.
2098
2099         * WebCore.xcodeproj/project.pbxproj: Add new SPI headers.
2100         * platform/graphics/cg/ImageBufferCG.cpp: Switch to using
2101         "IOSurfaceSPI.h" from <IOSurface/IOSurface.h>.
2102         * platform/graphics/cg/ImageBufferDataCG.cpp: Ditto.
2103         * platform/graphics/cocoa/IOSurface.mm: Ditto.  Move definitions
2104         in <IOSurface/IOSurfacePrivate.h> into "IOSurfaceSPI.h".
2105         * platform/spi/cg/CoreGraphicsSPI.h: Switch to
2106         WTF_EXTERN_C_{BEGIN,END}.  Add
2107         CGContextGetFontAntialiasingStyle() and
2108         CGContextSetFontAntialiasingStyle().
2109         * platform/spi/cocoa/IOPMLibSPI.h: Switch to use IOReturnSPI.h.
2110         * platform/spi/cocoa/IOReturnSPI.h: Add.
2111         * platform/spi/cocoa/IOSurfaceSPI.h: Add.
2112         * platform/spi/cocoa/IOTypesSPI.h: Add.
2113
2114 2015-01-21  Sergio Villar Senin  <svillar@igalia.com>
2115
2116         [CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
2117         https://bugs.webkit.org/show_bug.cgi?id=140720
2118
2119         Reviewed by David Hyatt.
2120
2121         Section "11.5. Resolve Intrinsic Track Sizes" of the specs forces
2122         us to ignore items spanning tracks with flex sizing functions when
2123         resolving the content-based track sizing functions. Items with
2124         span < 2 are not affected by this rule (as they will belong to a
2125         single track). This way the algorithm ensures that min-content and
2126         max-content restrictions are fulfilled before distributing the
2127         extra space.
2128
2129         Test: fast/css-grid-layout/flex-and-content-sized-resolution-columns.html
2130
2131         * rendering/RenderGrid.cpp:
2132         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
2133         (WebCore::integerSpanForDirection):
2134         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2135         * rendering/RenderGrid.h:
2136
2137 2015-01-22  Yusuke Suzuki  <utatane.tea@gmail.com>
2138
2139         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
2140         https://bugs.webkit.org/show_bug.cgi?id=140426
2141
2142         Reviewed by Geoffrey Garen.
2143
2144         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
2145
2146         * bindings/js/JSDOMWindowCustom.cpp:
2147         (WebCore::JSDOMWindow::getOwnPropertySlot):
2148         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2149         (WebCore::callHTMLAllCollection):
2150         (WebCore::JSHTMLAllCollection::item):
2151         * bindings/scripts/CodeGeneratorJS.pm:
2152         (GenerateGetOwnPropertySlotBody):
2153         (GenerateImplementation):
2154         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2155         (WebCore::JSFloat64Array::getOwnPropertySlot):
2156         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
2157         (WebCore::JSFloat64Array::put):
2158         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2159         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2160         * bridge/runtime_array.cpp:
2161         (JSC::RuntimeArray::getOwnPropertySlot):
2162         (JSC::RuntimeArray::put):
2163
2164 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
2165
2166         [CSS Grid Layout] Size tracks using a list of all items sorted by span
2167         https://bugs.webkit.org/show_bug.cgi?id=140615
2168
2169         Reviewed by Andreas Kling.
2170
2171         In r173620 we fixed
2172         RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
2173         now collects all items spanning content-sized tracks and process
2174         them one by one after sorting them by ascending span.
2175
2176         The problem is that it was incorrectly implemented, it has two
2177         important bugs. First one is that the hash table that collects
2178         items is regenerated after processing each track, so it's actually
2179         doing nothing. Secondly we're only sorting the items on each
2180         track, instead of all the items in the grid.
2181
2182         * rendering/RenderGrid.cpp:
2183         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2184
2185 2015-01-21  Daniel Bates  <dabates@apple.com>
2186
2187         Fix the iOS release build after <http://trac.webkit.org/changeset/178868>
2188         (https://bugs.webkit.org/show_bug.cgi?id=140742)
2189
2190         Substitute ASSERT_UNUSED() for ASSERT() since the parameter layer is used only in the assertion expression.
2191
2192         * rendering/RenderLayerBacking.cpp:
2193         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):
2194
2195 2015-01-21  Daniel Bates  <dabates@apple.com>
2196
2197         [iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
2198         https://bugs.webkit.org/show_bug.cgi?id=140742
2199
2200         Reviewed by Simon Fraser.
2201
2202         Make RenderLayerBacking::layerTreeAsText() (including internals.layerTreeAsText()) always
2203         report that the main frame's RenderView layer is opaque when running iOS DumpRenderTree to
2204         avoid test failures and the need to maintain for iOS WebKit1 an almost identical copy of the
2205         platform-independent compositing test results.
2206
2207         The main frame's RenderView layer is always transparent in iOS WebKit1 since it does
2208         not make use of a tiled cache layer and defers to UIKit to handle the final compositing
2209         of the web view, including applying the page scale factor.
2210
2211         * platform/RuntimeApplicationChecksIOS.mm:
2212         (WebCore::applicationIsDumpRenderTree): The app bundle identifier of DumpRenderTree has
2213         the form org.webkit.DumpRenderTreeX where X is some non-negative integer.
2214         * platform/graphics/GraphicsLayer.cpp:
2215         (WebCore::GraphicsLayer::dumpProperties): Modified to report that a layer is opaque when
2216         GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack() returns true.
2217         * platform/graphics/GraphicsLayerClient.h:
2218         (WebCore::GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added
2219         default implementation (returns false).
2220         * rendering/RenderLayerBacking.cpp:
2221         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added;
2222         returns true when running in DumpRenderTree and the passed GraphicsLayer corresponds to the main frame's
2223         RenderView layer.
2224         * rendering/RenderLayerBacking.h:
2225
2226 2015-01-21  Roger Fong  <roger_fong@apple.com>
2227
2228         WebGL2 (spec section 3.1): Add new types to WebGL2 API.
2229         https://bugs.webkit.org/show_bug.cgi?id=140741.
2230         <rdar://problem/19552962>
2231
2232         Reviewed by Dean Jackson.
2233
2234         * html/canvas/WebGL2RenderingContext.idl:
2235
2236 2015-01-21  Zalan Bujtas  <zalan@apple.com>
2237
2238         Simple line layout: Move nextTextFragment() to FlowContents class.
2239         https://bugs.webkit.org/show_bug.cgi?id=140738
2240
2241         Reviewed by Antti Koivisto.
2242
2243         This is in preparation to make FlowContents an iterator class.
2244         
2245         No change in functionality.
2246
2247         * rendering/SimpleLineLayout.cpp:
2248         (WebCore::SimpleLineLayout::LineState::addUncommitted):
2249         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
2250         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2251         (WebCore::SimpleLineLayout::initializeNewLine):
2252         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
2253         (WebCore::SimpleLineLayout::createLineRuns):
2254         (WebCore::SimpleLineLayout::TextFragment::TextFragment): Deleted.
2255         (WebCore::SimpleLineLayout::TextFragment::isEmpty): Deleted.
2256         (WebCore::SimpleLineLayout::nextFragment): Deleted.
2257         * rendering/SimpleLineLayoutFlowContents.cpp:
2258         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
2259         * rendering/SimpleLineLayoutFlowContents.h:
2260         (WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment):
2261         (WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty):
2262
2263 2015-01-21  Andreas Kling  <akling@apple.com>
2264
2265         DocumentLoader::timing() should return a reference.
2266         <https://webkit.org/b/128272>
2267
2268         Reviewed by Antti Koivisto.
2269
2270         There is always a DocumentLoadTiming object, so return it by
2271         reference since it can never be null.
2272
2273         * Modules/gamepad/NavigatorGamepad.cpp:
2274         (WebCore::NavigatorGamepad::from):
2275         * dom/ScriptedAnimationController.cpp:
2276         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2277         * html/HTMLMediaElement.cpp:
2278         (WebCore::HTMLMediaElement::parseAttribute):
2279         * inspector/InspectorResourceAgent.cpp:
2280         (WebCore::buildObjectForTiming):
2281         * loader/DocumentLoader.cpp:
2282         (WebCore::DocumentLoader::finishedLoading):
2283         (WebCore::DocumentLoader::willSendRequest):
2284         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
2285         (WebCore::DocumentLoader::startLoadingMainResource):
2286         * loader/DocumentLoader.h:
2287         (WebCore::DocumentLoader::timing):
2288         * loader/FrameLoader.cpp:
2289         (WebCore::FrameLoader::stopLoading):
2290         (WebCore::FrameLoader::commitProvisionalLoad):
2291         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
2292         * page/DOMWindow.cpp:
2293         (WebCore::DOMWindow::dispatchLoadEvent):
2294         * page/Performance.cpp:
2295         (WebCore::Performance::now):
2296         * page/PerformanceNavigation.cpp:
2297         (WebCore::PerformanceNavigation::redirectCount):
2298         * page/PerformanceResourceTiming.cpp:
2299         (WebCore::monotonicTimeToDocumentMilliseconds):
2300         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
2301         * page/PerformanceTiming.cpp:
2302         (WebCore::PerformanceTiming::documentLoadTiming):
2303
2304 2015-01-21  Benjamin Poulain  <benjamin@webkit.org>
2305
2306         Handle the transition on any character as a separate type of transition
2307         https://bugs.webkit.org/show_bug.cgi?id=140711
2308
2309         Reviewed by Andreas Kling.
2310
2311         Instead of considering the universal transition as 127 transitions, it is now
2312         handled as a separate type of transition.
2313
2314         The goal is to reduce the number of exit edge to consider for each node. Instead
2315         of having 127 for any partition containing one universal transition, we have
2316         as few exit edges as necessary + one universal transition.
2317
2318         In the NFA, the universal transition is stored directly on NFANode in a new
2319         HashSet (transitionsOnAnyCharacter).
2320         The target nodes are made exclusive between "transitionsOnAnyCharacter" and "transitions"
2321         by construction. That is not strictly needed but it simplify debugging at the moment.
2322
2323         When converting a NFA to a DFA, we first find all the node that transition on any character.
2324         Then, when we iterate over "real" transition, we also augment that set with the set on
2325         any character.
2326
2327         When creating the DFA node, we first consider each "real" transition, then we have a single
2328         "fallback" transition for any character that has not been handled yet.
2329
2330         When matching, we first search for any real transition. If there is none but a fallback exists,
2331         we take the fallback.
2332
2333         * contentextensions/DFA.cpp:
2334         (WebCore::ContentExtensions::DFA::nextState):
2335         (WebCore::ContentExtensions::printTransitions):
2336         (WebCore::ContentExtensions::DFA::debugPrintDot):
2337         (WebCore::ContentExtensions::printTransition): Deleted.
2338         * contentextensions/DFANode.h:
2339         * contentextensions/NFA.cpp:
2340         (WebCore::ContentExtensions::NFA::addTransition):
2341         (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter):
2342         (WebCore::ContentExtensions::printTransitions):
2343         (WebCore::ContentExtensions::NFA::debugPrintDot):
2344         (WebCore::ContentExtensions::printTransition): Deleted.
2345         * contentextensions/NFA.h:
2346         * contentextensions/NFANode.h:
2347         * contentextensions/NFAToDFA.cpp:
2348         (WebCore::ContentExtensions::populateTransitions):
2349         (WebCore::ContentExtensions::getOrCreateDFANode):
2350         (WebCore::ContentExtensions::NFAToDFA::convert):
2351         * contentextensions/URLFilterParser.cpp:
2352         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
2353
2354 2015-01-20  Antti Koivisto  <antti@apple.com>
2355
2356         REGRESSION(r178180): Membuster regressed ~4%
2357         https://bugs.webkit.org/show_bug.cgi?id=140495
2358
2359         Reviewed by Andreas Kling.
2360
2361         After r178180 we keep system fallback fonts that are used on glyph pages alive.
2362         Previously we would traverse the glyph pages and remove entries referencing system fallbacks.
2363
2364         * platform/graphics/FontCache.cpp:
2365         (WebCore::FontCache::purgeInactiveFontData):
2366         * platform/graphics/FontCascade.cpp:
2367         (WebCore::pruneUnreferencedEntriesFromFontGlyphsCache):
2368         (WebCore::pruneSystemFallbackFonts):
2369         * platform/graphics/FontCascade.h:
2370         * platform/graphics/FontGlyphs.cpp:
2371         (WebCore::FontGlyphs::pruneSystemFallbacks):
2372
2373             When clearing the font cache also remove the cached glyph pages that may contain system fallback fonts
2374             and release the fallbacks.
2375
2376         * platform/graphics/FontGlyphs.h:
2377
2378 2015-01-21  Manuel Rego Casasnovas  <rego@igalia.com>
2379
2380         first-letter pseudo-element from ancestors is not being ignored in grids and flexboxes
2381         https://bugs.webkit.org/show_bug.cgi?id=138424
2382
2383         Reviewed by Benjamin Poulain.
2384
2385         Source/WebCore:
2386
2387         According to the grid and flexbox specs:
2388         "::first-letter pseudo-element do not apply to grid/flex containers".
2389         http://dev.w3.org/csswg/css-grid/#grid-containers
2390         http://dev.w3.org/csswg/css-flexbox/#flex-containers
2391
2392         Check also the CSS WG mailing list discussion:
2393         http://lists.w3.org/Archives/Public/www-style/2014Dec/0305.html
2394
2395         This was almost working right, except in the case that an ancestor was
2396         setting the ::first-letter pseudo-element.
2397
2398         Added a few more cases to the current tests in order to check this
2399         behavior.
2400         Also created some new tests to increase coverage
2401
2402         Tests: fast/css/first-letter-from-ancestors-not-apply-inline-elements.html
2403                fast/css/first-letter-ignores-display-property.html
2404
2405         * rendering/RenderBlock.cpp:
2406         (WebCore::RenderBlock::getFirstLetter): Go to the next sibling when
2407         looking for the first text child if you reach a grid or flexbox.
2408
2409 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
2410
2411         Fix cast-align warning in Source/WebCore/platform/efl/EflScreenUtilities.cpp
2412         https://bugs.webkit.org/show_bug.cgi?id=140670
2413
2414         Reviewed by Darin Adler.
2415
2416         * platform/efl/EflScreenUtilities.cpp:
2417         (WebCore::createCustomCursor):
2418
2419 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
2420
2421         Remove ENABLE(INSPECTOR) ifdef guards
2422         https://bugs.webkit.org/show_bug.cgi?id=140668
2423
2424         Reviewed by Darin Adler.
2425
2426         * Configurations/FeatureDefines.xcconfig:
2427         * WebCore.exp.in:
2428         * bindings/js/JSCommandLineAPIHostCustom.cpp:
2429         * bindings/js/JSDOMWindowBase.cpp:
2430         (WebCore::JSDOMWindowBase::supportsProfiling):
2431         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
2432         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2433         * bindings/js/ScriptController.cpp:
2434         (WebCore::ScriptController::collectIsolatedContexts):
2435         * bindings/js/ScriptController.h:
2436         * bindings/js/ScriptGlobalObject.cpp:
2437         (WebCore::ScriptGlobalObject::set):
2438         * bindings/js/ScriptGlobalObject.h:
2439         * bindings/js/WorkerScriptDebugServer.cpp:
2440         * bindings/js/WorkerScriptDebugServer.h:
2441         * dom/Node.cpp:
2442         (WebCore::Node::inspect):
2443         * inspector/CommandLineAPIHost.cpp:
2444         * inspector/CommandLineAPIHost.idl:
2445         * inspector/CommandLineAPIModule.cpp:
2446         * inspector/CommandLineAPIModule.h:
2447         * inspector/DOMEditor.cpp:
2448         * inspector/DOMEditor.h:
2449         * inspector/DOMPatchSupport.cpp:
2450         * inspector/DOMPatchSupport.h:
2451         * inspector/InspectorApplicationCacheAgent.cpp:
2452         * inspector/InspectorApplicationCacheAgent.h:
2453         * inspector/InspectorCSSAgent.cpp:
2454         * inspector/InspectorCSSAgent.h:
2455         * inspector/InspectorClient.cpp:
2456         * inspector/InspectorConsoleInstrumentation.h:
2457         (WebCore::InspectorInstrumentation::addMessageToConsole):
2458         (WebCore::InspectorInstrumentation::consoleCount):
2459         (WebCore::InspectorInstrumentation::startConsoleTiming):
2460         (WebCore::InspectorInstrumentation::stopConsoleTiming):
2461         (WebCore::InspectorInstrumentation::consoleTimeStamp):
2462         (WebCore::InspectorInstrumentation::startProfiling):
2463         (WebCore::InspectorInstrumentation::stopProfiling):
2464         * inspector/InspectorController.cpp:
2465         * inspector/InspectorController.h:
2466         * inspector/InspectorDOMAgent.cpp:
2467         * inspector/InspectorDOMAgent.h:
2468         * inspector/InspectorDOMDebuggerAgent.cpp:
2469         * inspector/InspectorDOMDebuggerAgent.h:
2470         * inspector/InspectorDOMStorageAgent.cpp:
2471         * inspector/InspectorDatabaseAgent.cpp:
2472         * inspector/InspectorDatabaseAgent.h:
2473         * inspector/InspectorDatabaseInstrumentation.h:
2474         (WebCore::InspectorInstrumentation::didOpenDatabase):
2475         * inspector/InspectorDatabaseResource.cpp:
2476         * inspector/InspectorDatabaseResource.h:
2477         * inspector/InspectorFrontendClientLocal.cpp:
2478         * inspector/InspectorFrontendHost.cpp:
2479         * inspector/InspectorFrontendHost.idl:
2480         * inspector/InspectorHistory.cpp:
2481         * inspector/InspectorHistory.h:
2482         * inspector/InspectorIndexedDBAgent.cpp:
2483         * inspector/InspectorIndexedDBAgent.h:
2484         * inspector/InspectorInstrumentation.cpp:
2485         * inspector/InspectorInstrumentation.h:
2486         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
2487         (WebCore::InspectorInstrumentation::isDebuggerPaused):
2488         (WebCore::InspectorInstrumentation::willInsertDOMNode):
2489         (WebCore::InspectorInstrumentation::didInsertDOMNode):
2490         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
2491         (WebCore::InspectorInstrumentation::didRemoveDOMNode):
2492         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
2493         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
2494         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
2495         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
2496         (WebCore::InspectorInstrumentation::frameWindowDiscarded):
2497         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
2498         (WebCore::InspectorInstrumentation::didPushShadowRoot):
2499         (WebCore::InspectorInstrumentation::willPopShadowRoot):
2500         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
2501         (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
2502         (WebCore::InspectorInstrumentation::didChangeRegionOverset):
2503         (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
2504         (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
2505         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
2506         (WebCore::InspectorInstrumentation::handleTouchEvent):
2507         (WebCore::InspectorInstrumentation::handleMousePress):
2508         (WebCore::InspectorInstrumentation::forcePseudoState):
2509         (WebCore::InspectorInstrumentation::characterDataModified):
2510         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
2511         (WebCore::InspectorInstrumentation::didInstallTimer):
2512         (WebCore::InspectorInstrumentation::didRemoveTimer):
2513         (WebCore::InspectorInstrumentation::willCallFunction):
2514         (WebCore::InspectorInstrumentation::didCallFunction):
2515         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
2516         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
2517         (WebCore::InspectorInstrumentation::willDispatchEvent):
2518         (WebCore::InspectorInstrumentation::didDispatchEvent):
2519         (WebCore::InspectorInstrumentation::willHandleEvent):
2520         (WebCore::InspectorInstrumentation::didHandleEvent):
2521         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
2522         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
2523         (WebCore::InspectorInstrumentation::willEvaluateScript):
2524         (WebCore::InspectorInstrumentation::didEvaluateScript):
2525         (WebCore::InspectorInstrumentation::scriptsEnabled):
2526         (WebCore::InspectorInstrumentation::willFireTimer):
2527         (WebCore::InspectorInstrumentation::didFireTimer):
2528         (WebCore::InspectorInstrumentation::didInvalidateLayout):
2529         (WebCore::InspectorInstrumentation::willLayout):
2530         (WebCore::InspectorInstrumentation::didLayout):
2531         (WebCore::InspectorInstrumentation::didScroll):
2532         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
2533         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
2534         (WebCore::InspectorInstrumentation::willPaint):
2535         (WebCore::InspectorInstrumentation::didPaint):
2536         (WebCore::InspectorInstrumentation::willScrollLayer):
2537         (WebCore::InspectorInstrumentation::didScrollLayer):
2538         (WebCore::InspectorInstrumentation::willRecalculateStyle):
2539         (WebCore::InspectorInstrumentation::didRecalculateStyle):
2540         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
2541         (WebCore::InspectorInstrumentation::applyEmulatedMedia):
2542         (WebCore::InspectorInstrumentation::willSendRequest):
2543         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
2544         (WebCore::InspectorInstrumentation::markResourceAsCached):
2545         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
2546         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
2547         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
2548         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
2549         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
2550         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
2551         (WebCore::InspectorInstrumentation::didReceiveData):
2552         (WebCore::InspectorInstrumentation::didFinishLoading):
2553         (WebCore::InspectorInstrumentation::didFailLoading):
2554         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
2555         (WebCore::InspectorInstrumentation::willLoadXHR):
2556         (WebCore::InspectorInstrumentation::didFailXHRLoading):
2557         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
2558         (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
2559         (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
2560         (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
2561         (WebCore::InspectorInstrumentation::scriptImported):
2562         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
2563         (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
2564         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
2565         (WebCore::InspectorInstrumentation::loadEventFired):
2566         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
2567         (WebCore::InspectorInstrumentation::didCommitLoad):
2568         (WebCore::InspectorInstrumentation::frameDocumentUpdated):
2569         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
2570         (WebCore::InspectorInstrumentation::frameStartedLoading):
2571         (WebCore::InspectorInstrumentation::frameStoppedLoading):
2572         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
2573         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
2574         (WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
2575         (WebCore::InspectorInstrumentation::didRunJavaScriptDialog):
2576         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
2577         (WebCore::InspectorInstrumentation::willWriteHTML):
2578         (WebCore::InspectorInstrumentation::didWriteHTML):
2579         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
2580         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
2581         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
2582         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
2583         (WebCore::InspectorInstrumentation::didCreateWebSocket):
2584         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
2585         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
2586         (WebCore::InspectorInstrumentation::didCloseWebSocket):
2587         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
2588         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
2589         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
2590         (WebCore::InspectorInstrumentation::sessionCreated):
2591         (WebCore::InspectorInstrumentation::sessionLoaded):
2592         (WebCore::InspectorInstrumentation::sessionModified):
2593         (WebCore::InspectorInstrumentation::segmentCreated):
2594         (WebCore::InspectorInstrumentation::segmentCompleted):
2595         (WebCore::InspectorInstrumentation::segmentLoaded):
2596         (WebCore::InspectorInstrumentation::segmentUnloaded):
2597         (WebCore::InspectorInstrumentation::captureStarted):
2598         (WebCore::InspectorInstrumentation::captureStopped):
2599         (WebCore::InspectorInstrumentation::playbackStarted):
2600         (WebCore::InspectorInstrumentation::playbackPaused):
2601         (WebCore::InspectorInstrumentation::playbackFinished):
2602         (WebCore::InspectorInstrumentation::playbackHitPosition):
2603         (WebCore::InspectorInstrumentation::networkStateChanged):
2604         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
2605         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
2606         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
2607         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
2608         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
2609         (WebCore::InspectorInstrumentation::layerTreeDidChange):
2610         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
2611         (WebCore::InspectorInstrumentation::pseudoElementDestroyed):
2612         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
2613         (WebCore::InspectorInstrumentation::hasFrontends): Deleted.
2614         (WebCore::InspectorInstrumentation::consoleAgentEnabled): Deleted.
2615         (WebCore::InspectorInstrumentation::runtimeAgentEnabled): Deleted.
2616         (WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted.
2617         (WebCore::InspectorInstrumentation::replayAgentEnabled): Deleted.
2618         * inspector/InspectorLayerTreeAgent.cpp:
2619         * inspector/InspectorLayerTreeAgent.h:
2620         * inspector/InspectorOverlay.cpp:
2621         * inspector/InspectorPageAgent.cpp:
2622         * inspector/InspectorPageAgent.h:
2623         * inspector/InspectorReplayAgent.cpp:
2624         * inspector/InspectorReplayAgent.h:
2625         * inspector/InspectorResourceAgent.cpp:
2626         * inspector/InspectorResourceAgent.h:
2627         * inspector/InspectorStyleSheet.cpp:
2628         * inspector/InspectorStyleSheet.h:
2629         * inspector/InspectorStyleTextEditor.cpp:
2630         * inspector/InspectorStyleTextEditor.h:
2631         * inspector/InspectorTimelineAgent.cpp:
2632         * inspector/InspectorTimelineAgent.h:
2633         * inspector/InspectorWorkerAgent.cpp:
2634         * inspector/InspectorWorkerResource.h:
2635         * inspector/InstrumentingAgents.cpp:
2636         * inspector/NetworkResourcesData.cpp:
2637         * inspector/NetworkResourcesData.h:
2638         * inspector/PageConsoleAgent.cpp:
2639         * inspector/PageConsoleAgent.h:
2640         * inspector/PageDebuggerAgent.cpp:
2641         * inspector/PageDebuggerAgent.h:
2642         * inspector/PageRuntimeAgent.cpp:
2643         * inspector/PageRuntimeAgent.h:
2644         * inspector/PageScriptDebugServer.cpp:
2645         * inspector/PageScriptDebugServer.h:
2646         * inspector/TimelineRecordFactory.cpp:
2647         * inspector/WebConsoleAgent.cpp:
2648         * inspector/WebConsoleAgent.h:
2649         * inspector/WebDebuggerAgent.cpp:
2650         * inspector/WebDebuggerAgent.h:
2651         * inspector/WebInjectedScriptHost.cpp:
2652         * inspector/WebInjectedScriptHost.h:
2653         * inspector/WebInjectedScriptManager.cpp:
2654         * inspector/WebInjectedScriptManager.h:
2655         * inspector/WorkerConsoleAgent.cpp:
2656         * inspector/WorkerConsoleAgent.h:
2657         * inspector/WorkerDebuggerAgent.cpp:
2658         * inspector/WorkerDebuggerAgent.h:
2659         * inspector/WorkerInspectorController.cpp:
2660         * inspector/WorkerInspectorController.h:
2661         * inspector/WorkerRuntimeAgent.cpp:
2662         * inspector/WorkerRuntimeAgent.h:
2663         * loader/DocumentThreadableLoader.cpp:
2664         (WebCore::DocumentThreadableLoader::didReceiveResponse):
2665         (WebCore::DocumentThreadableLoader::loadRequest):
2666         * loader/FrameLoader.cpp:
2667         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2668         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
2669         * loader/appcache/ApplicationCacheGroup.cpp:
2670         (WebCore::ApplicationCacheGroup::createResourceHandle):
2671         (WebCore::ApplicationCacheGroup::didReceiveResponse):
2672         * loader/appcache/ApplicationCacheHost.cpp:
2673         (WebCore::ApplicationCacheHost::applicationCacheInfo):
2674         * loader/appcache/ApplicationCacheHost.h:
2675         * loader/cache/CachedResourceLoader.cpp:
2676         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
2677         * page/ContextMenuController.cpp:
2678         (WebCore::ContextMenuController::showContextMenu):
2679         (WebCore::ContextMenuController::contextMenuItemSelected):
2680         (WebCore::ContextMenuController::populate):
2681         (WebCore::ContextMenuController::addInspectElementItem):
2682         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2683         * page/FrameView.cpp:
2684         (WebCore::FrameView::sendResizeEventIfNeeded):
2685         * page/Page.cpp:
2686         (WebCore::Page::Page):
2687         (WebCore::Page::~Page):
2688         * page/Page.h:
2689         * platform/ContextMenuItem.h:
2690         * platform/efl/EflInspectorUtilities.cpp:
2691         * platform/efl/EflInspectorUtilities.h:
2692         * platform/network/ResourceRequestBase.h:
2693         (WebCore::ResourceRequestBase::ResourceRequestBase):
2694         * platform/network/cf/ResourceRequestCFNet.cpp:
2695         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2696         * platform/network/cocoa/ResourceRequestCocoa.mm:
2697         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2698         * testing/Internals.cpp:
2699         (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
2700         (WebCore::Internals::resetToConsistentState):
2701         (WebCore::Internals::inspectorHighlightRects):
2702         (WebCore::Internals::inspectorHighlightObject):
2703         (WebCore::Internals::setInspectorIsUnderTest):
2704         * testing/Internals.h:
2705         * testing/Internals.idl:
2706         * workers/WorkerGlobalScope.cpp:
2707         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2708         * workers/WorkerGlobalScope.h:
2709         * workers/WorkerGlobalScopeProxy.h:
2710         * workers/WorkerMessagingProxy.cpp:
2711         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
2712         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2713         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2714         * workers/WorkerMessagingProxy.h:
2715         * workers/WorkerReportingProxy.h:
2716         * workers/WorkerThread.cpp:
2717         (WebCore::WorkerThread::workerThread):
2718
2719 2015-01-20  Chris Dumez  <cdumez@apple.com>
2720
2721         Simplify DiagnosticLoggingClient call sites
2722         https://bugs.webkit.org/show_bug.cgi?id=140701
2723
2724         Reviewed by Andreas Kling.
2725
2726         Simplify DiagnosticLoggingClient call sites by:
2727         - Moving the Settings::diagnosticLoggingEnabled() check inside the
2728           MainFrame::diagnosticLoggingClient() getter.
2729         - Having MainFrame::diagnosticLoggingClient() return a reference
2730           instead of a pointer (returning a dummy client if necessary).
2731
2732         Otherwise, each call site needs to both check the setting and do a
2733         null-check on the client which is a bit annoying.
2734
2735         * history/PageCache.cpp:
2736         (WebCore::logPageCacheFailureDiagnosticMessage):
2737         (WebCore::logCanCacheFrameDecision):
2738         (WebCore::logCanCachePageDecision):
2739         * html/HTMLMediaElement.cpp:
2740         (WebCore::HTMLMediaElement::parseAttribute):
2741         * loader/EmptyClients.h:
2742         * loader/FrameLoader.cpp:
2743         (WebCore::logNavigation):
2744         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2745         * loader/SubframeLoader.cpp:
2746         (WebCore::logPluginRequest):
2747         * loader/SubresourceLoader.cpp:
2748         (WebCore::logResourceLoaded):
2749         * page/DiagnosticLoggingClient.h:
2750         (WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Deleted.
2751         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Deleted.
2752         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Deleted.
2753         * page/MainFrame.cpp:
2754         (WebCore::MainFrame::diagnosticLoggingClient):
2755         * page/MainFrame.h:
2756
2757 2015-01-20  Joseph Pecoraro  <pecoraro@apple.com>
2758
2759         Web Inspector: Should show dynamic specificity values
2760         https://bugs.webkit.org/show_bug.cgi?id=140647
2761
2762         Reviewed by Benjamin Poulain.
2763
2764         Test: inspector/css/selector-dynamic-specificity.html
2765
2766         * inspector/InspectorCSSAgent.h:
2767         * inspector/InspectorCSSAgent.cpp:
2768         (WebCore::InspectorCSSAgent::setRuleSelector):
2769         (WebCore::InspectorCSSAgent::addRule):
2770         (WebCore::InspectorCSSAgent::buildObjectForRule):
2771         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2772         When building a response for a particular element, pass the element along.
2773
2774         * inspector/InspectorStyleSheet.h:
2775         * inspector/InspectorStyleSheet.cpp:
2776         (WebCore::hasDynamicSpecificity):
2777         (WebCore::buildObjectForSelectorHelper):
2778         (WebCore::selectorsFromSource):
2779         (WebCore::InspectorStyleSheet::buildObjectForSelector):
2780         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
2781         (WebCore::InspectorStyleSheet::buildObjectForRule):
2782         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2783         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2784         When building a response for a Selector, include the specificity if we know
2785         the element in context.
2786
2787 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
2788
2789         [Win] Build fix after r178760.
2790
2791         Windows will not accept a variable as the size declaration for an array.
2792
2793         * svg/SVGToOTFFontConversion.cpp:
2794         (WebCore::SVGToOTFFontConverter::appendGSUBTable): Make size argument a const.
2795
2796 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
2797
2798         [Win] Unreviewed Windows project file gardening.
2799
2800         * WebCore.vcxproj/WebCore.vcxproj: Add missing SVG files and put things in their proper
2801         folders.
2802         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2803
2804 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2805
2806         URLFilterParser dismisses the last atom when parsing a builtin character class
2807         https://bugs.webkit.org/show_bug.cgi?id=140695
2808
2809         Reviewed by Andreas Kling.
2810
2811         The pending atom was not sunk before creating the new atom.
2812
2813         * contentextensions/URLFilterParser.cpp:
2814         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2815
2816 2015-01-20  Andreas Kling  <akling@apple.com>
2817
2818         Fast path for casting JSValue to JSDocument*.
2819         <https://webkit.org/b/134655>
2820
2821         Add a custom JSType bit for JSDocument so we can quickly cast to it
2822         from JSValue in the DocumentPrototype functions. This removes a bunch
2823         of grunt work and branches from common functions like getElementById.
2824
2825         Also removed GetCastingHelperForBaseObject and replace it with
2826         simple jsCasts since we don't need dynamic type checks for the base.
2827
2828         Reviewed by Darin Adler.
2829
2830         * WebCore.xcodeproj/project.pbxproj:
2831         * bindings/js/JSDOMWrapper.h:
2832         * bindings/js/JSDocumentCustom.h:
2833         * bindings/scripts/CodeGeneratorJS.pm:
2834         (GenerateHeader):
2835         (GetCastingHelperForThisObject):
2836         (GenerateImplementation):
2837         (GetCastingHelperForBaseObject): Deleted.
2838         * dom/Document.idl:
2839
2840 2015-01-20  Commit Queue  <commit-queue@webkit.org>
2841
2842         Unreviewed, rolling out r178751.
2843         https://bugs.webkit.org/show_bug.cgi?id=140694
2844
2845         Caused 32-bit JSC test failures (Requested by JoePeck on
2846         #webkit).
2847
2848         Reverted changeset:
2849
2850         "put_by_val_direct need to check the property is index or not
2851         for using putDirect / putDirectIndex"
2852         https://bugs.webkit.org/show_bug.cgi?id=140426
2853         http://trac.webkit.org/changeset/178751
2854
2855 2015-01-20  Zalan Bujtas  <zalan@apple.com>
2856
2857         Simple line layout: Use FlowContents::Segment::text instead of renderer when possible.
2858         https://bugs.webkit.org/show_bug.cgi?id=140692
2859
2860         Reviewed by Myles C. Maxfield.
2861
2862         No change in functionality.
2863
2864         * rendering/SimpleLineLayoutResolver.cpp:
2865         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2866
2867 2015-01-20  David Kilzer  <ddkilzer@apple.com>
2868
2869         Switch to comparing PLATFORM_NAME in terms of macosx
2870         <http://webkit.org/b/139516>
2871
2872         Reviewed by Timothy Hatcher.
2873
2874         * bindings/scripts/preprocessor.pm:
2875         (applyPreprocessor):
2876         * generate-export-file:
2877         (preprocessorMacros):
2878
2879 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2880
2881         Attempt to fix 32bits builds after r178743
2882
2883         * contentextensions/ContentExtensionsBackend.cpp:
2884         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2885
2886 2015-01-20  Yusuke Suzuki  <utatane.tea@gmail.com>
2887
2888         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
2889         https://bugs.webkit.org/show_bug.cgi?id=140426
2890
2891         Reviewed by Geoffrey Garen.
2892
2893         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
2894
2895         * bindings/js/JSDOMWindowCustom.cpp:
2896         (WebCore::JSDOMWindow::getOwnPropertySlot):
2897         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2898         (WebCore::callHTMLAllCollection):
2899         (WebCore::JSHTMLAllCollection::item):
2900         * bindings/scripts/CodeGeneratorJS.pm:
2901         (GenerateGetOwnPropertySlotBody):
2902         (GenerateImplementation):
2903         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2904         (WebCore::JSFloat64Array::getOwnPropertySlot):
2905         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
2906         (WebCore::JSFloat64Array::put):
2907         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2908         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2909         * bridge/runtime_array.cpp:
2910         (JSC::RuntimeArray::getOwnPropertySlot):
2911         (JSC::RuntimeArray::put):
2912
2913 2015-01-20  Chris Dumez  <cdumez@apple.com>
2914
2915         Drop width / height shorthands code from StylePropertyShorthand.*
2916         https://bugs.webkit.org/show_bug.cgi?id=140686
2917
2918         Reviewed by Andreas Kling.
2919
2920         Drop width / height shorthands code from StylePropertyShorthand.*.
2921         width / height are not shorthands for min-width/max-width and
2922         min-height/max-height. Also, only matchingCustomShorthandsForLonghand()
2923         treats these as shorthands. For e.g, the reverse method
2924         (indexOfShorthandForLonghand()) does not.
2925
2926         * css/StylePropertyShorthand.cpp:
2927         (WebCore::widthShorthand): Deleted.
2928         (WebCore::heightShorthand): Deleted.
2929         * css/StylePropertyShorthand.h:
2930         (WebCore::matchingCustomShorthandsForLonghand):
2931
2932 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2933
2934         Add a mechanism to ignore previous content extension rules
2935         https://bugs.webkit.org/show_bug.cgi?id=140663
2936
2937         Reviewed by Andreas Kling.
2938
2939         * contentextensions/ContentExtensionRule.h:
2940         * contentextensions/ContentExtensionsBackend.cpp:
2941         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2942         * contentextensions/ContentExtensionsManager.cpp:
2943         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
2944
2945 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
2946
2947         Resolve the epsilon transitions for each state upfront instead of dynamically
2948         https://bugs.webkit.org/show_bug.cgi?id=140654
2949
2950         Reviewed by Andreas Kling.
2951
2952         Instead of recomputing the epsilon-closure for each set, we compute the closure
2953         of every element at the beginning of the transformation.
2954
2955         We then remove the epsilon transitions from the NFA to simplify populateTransitions().
2956         The epsilon transitions are still there, but they are now in a separate graph we use
2957         in parallel.
2958
2959         * contentextensions/NFAToDFA.cpp:
2960         (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
2961         (WebCore::ContentExtensions::resolveEpsilonClosures):
2962         (WebCore::ContentExtensions::extendSetWithClosure):
2963         (WebCore::ContentExtensions::populateTransitions):
2964         (WebCore::ContentExtensions::NFAToDFA::convert):
2965         (WebCore::ContentExtensions::epsilonClosure): Deleted.
2966         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon): Deleted.
2967         * contentextensions/NFAToDFA.h:
2968
2969 2015-01-20  Chris Dumez  <cdumez@apple.com>
2970
2971         Log types of resources being loaded using DiagnosticLoggingClient
2972         https://bugs.webkit.org/show_bug.cgi?id=140682
2973
2974         Reviewed by Andreas Kling.
2975
2976         Log types of resources being loaded using DiagnosticLoggingClient
2977         instead of the legacy FeatureCounter.
2978
2979         * loader/SubresourceLoader.cpp:
2980         (WebCore::logResourceLoaded):
2981         (WebCore::SubresourceLoader::didFinishLoading):
2982         (WebCore::logResourceLoadedUsingFeatureCounter): Deleted.
2983         * page/DiagnosticLoggingKeys.cpp:
2984         (WebCore::DiagnosticLoggingKeys::otherKey):
2985         (WebCore::DiagnosticLoggingKeys::mainResourceKey):
2986         (WebCore::DiagnosticLoggingKeys::loadedKey):
2987         (WebCore::DiagnosticLoggingKeys::imageKey):
2988         (WebCore::DiagnosticLoggingKeys::rawKey):
2989         (WebCore::DiagnosticLoggingKeys::resourceKey):
2990         (WebCore::DiagnosticLoggingKeys::scriptKey):
2991         (WebCore::DiagnosticLoggingKeys::styleSheetKey):
2992         (WebCore::DiagnosticLoggingKeys::svgDocumentKey):
2993         (WebCore::DiagnosticLoggingKeys::fontKey):
2994         * page/DiagnosticLoggingKeys.h:
2995         * platform/FeatureCounterKeys.h:
2996
2997 2015-01-20  Zalan Bujtas  <zalan@apple.com>
2998
2999         Simple line layout: Remove redundant style.preserveNewline check when collapsing trailing whitespace.
3000         https://bugs.webkit.org/show_bug.cgi?id=140684
3001
3002         Reviewed by Antti Koivisto.
3003
3004         FlowContents::isLineBreak() checks whether we are at a hard newline.
3005
3006         No change in functionality.
3007
3008         * rendering/SimpleLineLayout.cpp:
3009         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3010
3011 2015-01-19  Simon Fraser  <simon.fraser@apple.com>
3012
3013         Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
3014         https://bugs.webkit.org/show_bug.cgi?id=140474
3015
3016         Reviewed by Tim Horton.
3017
3018         Add accessors for standard names for container CALayer for each of the tile grids,
3019         and when tile grids are swapped, update those names as appropriate.
3020         
3021         * WebCore.exp.in:
3022         * platform/graphics/ca/TileController.cpp:
3023         (WebCore::TileController::tileGridContainerLayerName):
3024         (WebCore::TileController::zoomedOutTileGridContainerLayerName):
3025         (WebCore::TileController::setContentsScale):
3026         * platform/graphics/ca/TileController.h:
3027         * platform/graphics/ca/TileGrid.cpp:
3028         (WebCore::TileGrid::TileGrid):
3029         (WebCore::TileGrid::setIsZoomedOutTileGrid):
3030         * platform/graphics/ca/TileGrid.h:
3031
3032 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
3033
3034         Fix unused-private-field warning in IconEfl.cpp
3035         https://bugs.webkit.org/show_bug.cgi?id=140676
3036
3037         Reviewed by Darin Adler.
3038
3039         * platform/graphics/Icon.h:
3040         * platform/graphics/efl/IconEfl.cpp:
3041         (WebCore::Icon::Icon): Deleted.
3042
3043 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
3044
3045         Fix unused-private-field warning in FontCustomPlatformDataFreeType.cpp
3046         https://bugs.webkit.org/show_bug.cgi?id=140677
3047
3048         Reviewed by Martin Robinson.
3049
3050         * platform/graphics/cairo/FontCustomPlatformData.h:
3051         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
3052         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
3053         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3054
3055 2015-01-20  peavo@outlook.com  <peavo@outlook.com>
3056
3057         Plugin content not loaded.
3058         https://bugs.webkit.org/show_bug.cgi?id=140672
3059
3060         Reviewed by Brent Fulgham.
3061
3062         It seems this is caused by a std::unique_ptr in CClass::methodNamed being moved,
3063         resetting its raw pointer. The raw pointer, which now is null, is then returned
3064         from the method.
3065
3066         * bridge/c/c_class.cpp:
3067         (JSC::Bindings::CClass::methodNamed):
3068         (JSC::Bindings::CClass::fieldNamed):
3069
3070 2015-01-20  Darin Adler  <darin@apple.com>
3071
3072         Remove SVGElementInstanceList, m_instanceUnderMouse, DUMP_INSTANCE_TREE, DUMP_SHADOW_TREE
3073         https://bugs.webkit.org/show_bug.cgi?id=140679
3074
3075         Reviewed by Anders Carlsson.
3076
3077         First step in removing the SVG instance tree.
3078         All based on redoing the same excellent work Rob Buis did to remove this in Blink in crbug.com/313438.
3079
3080         * CMakeLists.txt: Removed the source files.
3081         * DerivedSources.cpp: Ditto.
3082         * DerivedSources.make: Ditto.
3083         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3084         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3085         * WebCore.xcodeproj/project.pbxproj: Ditto.
3086
3087         * page/EventHandler.cpp:
3088         (WebCore::EventHandler::clear): Removed code to set unused m_instanceUnderMouse.
3089         (WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
3090         * page/EventHandler.h: Removed m_instanceUnderMouse.
3091
3092         * svg/SVGAllInOne.cpp: Removed the source files.
3093         * svg/SVGElementInstance.cpp:
3094         (WebCore::SVGElementInstance::childNodes): Deleted.
3095         * svg/SVGElementInstance.h: Removed childNodes.
3096         * svg/SVGElementInstance.idl: Ditto.
3097         * svg/SVGElementInstanceList.cpp: Removed.
3098         * svg/SVGElementInstanceList.h: Removed.
3099         * svg/SVGElementInstanceList.idl: Removed.
3100         * svg/SVGUseElement.cpp:
3101         (WebCore::dumpInstanceTree): Deleted.
3102         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Removed DUMP_INSTANCE_TREE and
3103         DUMP_SHADOW_TREE code.
3104
3105 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
3106
3107         Web Replay: code generator should take supplemental specifications and allow cross-framework references
3108         https://bugs.webkit.org/show_bug.cgi?id=136312
3109
3110         Reviewed by Joseph Pecoraro.
3111
3112         Changes covered by existing input generator tests.
3113
3114         * DerivedSources.make: Add JSInputs.json as supplemental specification.
3115         * replay/WebInputs.json: Moved common types to JSInputs.json.
3116
3117 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
3118
3119         Fix unused-const-variable warning in RenderLayerCompositor.cpp
3120         https://bugs.webkit.org/show_bug.cgi?id=140678
3121
3122         Reviewed by Simon Fraser.
3123
3124         * rendering/RenderLayerCompositor.cpp:
3125
3126 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
3127
3128         [gstreamer] Fix expression result unused warning in GRefPtrGStreamer.cpp
3129         https://bugs.webkit.org/show_bug.cgi?id=140671
3130
3131         Reviewed by Philippe Normand.
3132
3133         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
3134         (WTF::refGPtr<GstToc>):
3135
3136 2015-01-19  Dean Jackson  <dino@apple.com>
3137
3138         Support "plus-darker" in mix-blend mode
3139         https://bugs.webkit.org/show_bug.cgi?id=140646
3140         <rdar://problem/19523370>
3141
3142         Reviewed by Simon Fraser.
3143
3144         Support the "plus-darker" blending mode to CSS.
3145         See: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
3146
3147         Test: css3/blending/svg-blend-plus-darker.html
3148
3149         * css/CSSParser.cpp:
3150         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept
3151         the new keyword.
3152         * css/CSSPrimitiveValueMappings.h: Add the mappings.
3153         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3154         (WebCore::CSSPrimitiveValue::operator BlendMode):
3155         * platform/graphics/GraphicsTypes.cpp: Add the new GraphicsType.
3156         * platform/graphics/GraphicsTypes.h:
3157         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA compositing filter.
3158         (PlatformCAFilters::setBlendingFiltersOnLayer):
3159         * platform/graphics/cg/GraphicsContextCG.cpp:
3160         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG blending flag.
3161
3162 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
3163
3164         Fix 'register' storage class specifier is deprecated warning
3165         https://bugs.webkit.org/show_bug.cgi?id=140669
3166
3167         Reviewed by Carlos Garcia Campos.
3168
3169         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
3170         (webKitWebAudioSrcLoop):
3171
3172 2015-01-20  Chris Dumez  <cdumez@apple.com>
3173
3174         Use DiagnosticLoggingClient to log page cache failures
3175         https://bugs.webkit.org/show_bug.cgi?id=140650
3176
3177         Reviewed by Andreas Kling.
3178
3179         Use DiagnosticLoggingClient to log page cache failures instead of the
3180         legacy FeatureCounter.
3181
3182         * history/PageCache.cpp:
3183         (WebCore::logPageCacheFailureDiagnosticMessage):
3184         (WebCore::logCanCacheFrameDecision):
3185         (WebCore::logCanCachePageDecision):
3186         (WebCore::PageCache::canCache):
3187         (WebCore::pruningReasonToDiagnosticLoggingKey):
3188         (WebCore::PageCache::take):
3189         (WebCore::PageCache::get):
3190         (WebCore::pruningReasonToFeatureCounterKey): Deleted.
3191         * page/DiagnosticLoggingKeys.cpp:
3192         (WebCore::DiagnosticLoggingKeys::successKey):
3193         (WebCore::DiagnosticLoggingKeys::failureKey):
3194         (WebCore::DiagnosticLoggingKeys::pageLoadedKey):
3195         (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
3196         (WebCore::DiagnosticLoggingKeys::navigationKey):
3197         (WebCore::DiagnosticLoggingKeys::pageCacheKey):
3198         (WebCore::DiagnosticLoggingKeys::noDocumentLoaderKey):
3199         (WebCore::DiagnosticLoggingKeys::mainDocumentErrorKey):
3200         (WebCore::DiagnosticLoggingKeys::isErrorPageKey):
3201         (WebCore::DiagnosticLoggingKeys::hasPluginsKey):
3202         (WebCore::DiagnosticLoggingKeys::httpsNoStoreKey):
3203         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey):
3204         (WebCore::DiagnosticLoggingKeys::noCurrentHistoryItemKey):
3205         (WebCore::DiagnosticLoggingKeys::quirkRedirectComingKey):
3206         (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey):
3207         (WebCore::DiagnosticLoggingKeys::documentLoaderStoppingKey):
3208         (WebCore::DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey):
3209         (WebCore::DiagnosticLoggingKeys::applicationCacheKey):
3210         (WebCore::DiagnosticLoggingKeys::deniedByClientKey):
3211         (WebCore::DiagnosticLoggingKeys::deviceMotionKey):
3212         (WebCore::DiagnosticLoggingKeys::deviceOrientationKey):
3213         (WebCore::DiagnosticLoggingKeys::deviceProximityKey):
3214         (WebCore::DiagnosticLoggingKeys::reloadKey):
3215         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey):
3216         (WebCore::DiagnosticLoggingKeys::sameLoadKey):
3217         (WebCore::DiagnosticLoggingKeys::expiredKey):
3218         (WebCore::DiagnosticLoggingKeys::prunedDueToMemoryPressureKey):
3219         (WebCore::DiagnosticLoggingKeys::prunedDueToCapacityReached):
3220         (WebCore::DiagnosticLoggingKeys::prunedDueToProcessSuspended):
3221         (WebCore::DiagnosticLoggingKeys::passKey): Deleted.
3222         (WebCore::DiagnosticLoggingKeys::failKey): Deleted.
3223         (WebCore::DiagnosticLoggingKeys::noopKey): Deleted.
3224         * page/DiagnosticLoggingKeys.h:
3225         * platform/FeatureCounterKeys.h:
3226
3227 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
3228
3229         [CSS Grid Layout] Wrong arguments passed to computeNormalizedFractionBreadth
3230         https://bugs.webkit.org/show_bug.cgi?id=139058
3231
3232         Reviewed by Andreas Kling.
3233
3234         The method RenderGrid::computeNormalizedFractionBreadth() is
3235         supposed to get as fourth argument either the grid element's
3236         content box size or the max-size of a particular grid item. For
3237         the former we were incorrectly passing the free space after
3238         distributing the available space to tracks.
3239
3240         Apart from that, that method has a bug in its implementation. As
3241         we were using the free space instead of the grid element's content
3242         box size, we didn't have to subtract the usedBreadth of grid
3243         tracks from the passed in value. That did not work for the case of
3244         the caller passing the max-size of a particular item.
3245
3246         * rendering/RenderGrid.cpp:
3247         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3248         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
3249
3250 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
3251
3252         [SVG -> OTF Converter] Flip the switch on
3253         https://bugs.webkit.org/show_bug.cgi?id=140592
3254
3255         Reviewed by Antti Koivisto.
3256
3257         * Configurations/FeatureDefines.xcconfig:
3258
3259 2015-01-19  Commit Queue  <commit-queue@webkit.org>
3260
3261         Unreviewed, rolling out r178683.
3262         https://bugs.webkit.org/show_bug.cgi?id=140657
3263
3264         Lots of asserts in tests. (Requested by JoePeck on #webkit).
3265
3266         Reverted changeset:
3267
3268         "LayoutState and subtree layout code should use
3269         RenderElement."
3270         https://bugs.webkit.org/show_bug.cgi?id=126878
3271         http://trac.webkit.org/changeset/178683
3272
3273 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
3274
3275         [Win] Unreviewed gardening.
3276
3277         Avoid compiling files twice when they are included in an 'AllInOne.cpp' file.
3278
3279         * WebCore.vcxproj/WebCore.vcxproj: Mark several files as 'not to be built', since
3280         they are also build as part of an 'AllInOne.cpp' file.
3281
3282 2015-01-19  Chris Dumez  <cdumez@apple.com>
3283
3284         Stop using FeatureCounter to log navigation types
3285         https://bugs.webkit.org/show_bug.cgi?id=140642
3286
3287         Reviewed by Andreas Kling.
3288
3289         Stop using FeatureCounter to log navigation types now that
3290         DiagnosticLoggingClient is working on iOS.
3291
3292         * loader/FrameLoader.cpp:
3293         (WebCore::logNavigation):
3294         * platform/FeatureCounterKeys.h:
3295
3296 2015-01-19  Andreas Kling  <akling@apple.com>
3297
3298         LayoutState and subtree layout code should use RenderElement.
3299         <https://webkit.org/b/126878>
3300
3301         Subtree layout will never begin at a RenderText, so tighten up
3302         the code to operate on RenderElements instead of RenderObjects.
3303
3304         Reviewed by Antti Koivisto.
3305
3306         * inspector/InspectorTimelineAgent.cpp:
3307         (WebCore::InspectorTimelineAgent::willLayout):
3308         * page/FrameView.cpp:
3309         (WebCore::FrameView::layoutRoot):
3310         (WebCore::FrameView::layout):
3311         * page/FrameView.h:
3312
3313             Make FrameView::layoutRoot() return RenderElement*.
3314
3315         * rendering/RenderElement.cpp:
3316         (WebCore::RenderElement::willBeDestroyed):
3317         * rendering/RenderObject.cpp:
3318         (WebCore::RenderObject::willBeDestroyed):
3319         * rendering/RenderObject.h:
3320
3321             Move subtree layout root clearing logic in willBeDestroyed()
3322             from RenderObject to RenderElement.
3323
3324         * rendering/LayoutState.cpp:
3325         (WebCore::LayoutState::LayoutState):
3326         * rendering/LayoutState.h:
3327         * rendering/RenderView.h:
3328         * rendering/RenderView.cpp:
3329         (WebCore::RenderView::pushLayoutState):
3330         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
3331
3332             Make all of these functions take RenderElement instead of
3333             RenderObject since layout never starts from a RenderText.
3334
3335         (WebCore::RenderView::shouldDisableLayoutStateForSubtree):
3336
3337             Tweak loop since it's never null on first iteration.
3338
3339 2015-01-19  Beth Dakin  <bdakin@apple.com>
3340
3341         Speculative build fix.
3342
3343         * platform/spi/mac/NSViewSPI.h:
3344
3345 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
3346
3347         Adjust naming of action menu SPI
3348         https://bugs.webkit.org/show_bug.cgi?id=140644
3349         <rdar://problem/19448129>
3350
3351         Reviewed by Brian Weinstein.
3352
3353         * platform/spi/mac/NSViewSPI.h:
3354         Add an underscore.
3355
3356 2015-01-19  Dhi Aurrahman  <diorahman@rockybars.com>
3357
3358         Canonicalization of :lang() should preserve the :lang()'s arguments representations
3359         https://bugs.webkit.org/show_bug.cgi?id=139928
3360
3361         Reviewed by Benjamin Poulain.
3362
3363         Preserve the representation of IDENT and STRING when serializing the
3364         :lang(). For example, :lang(foo,"bar", baz) should be serialize as
3365         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
3366     
3367         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
3368         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
3369         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
3370         respectively, since those methods are being exclusively used in respect
3371         with :lang().
3372
3373         Update the test of serializing :lang() with IDENT and STRING arguments.
3374
3375         * css/CSSGrammar.y.in:
3376         * css/CSSParserValues.cpp:
3377         (WebCore::CSSParserSelector::setLangArgumentList):
3378         (WebCore::CSSParserSelector::setArgumentList): Deleted.
3379         * css/CSSParserValues.h:
3380         (WebCore::CSSParserString::tokenType):
3381         (WebCore::CSSParserString::setTokenType):
3382         * css/CSSSelector.cpp:
3383         (WebCore::appendLangArgumentList):
3384         (WebCore::CSSSelector::selectorText):
3385         (WebCore::CSSSelector::setLangArgumentList):
3386         (WebCore::appendArgumentList): Deleted.
3387         (WebCore::CSSSelector::setArgumentList): Deleted.
3388         * css/CSSSelector.h:
3389         (WebCore::CSSSelector::langArgumentList):
3390         (WebCore::CSSSelector::argumentList): Deleted.
3391         * css/SelectorChecker.cpp:
3392         (WebCore::SelectorChecker::checkOne):
3393         * css/SelectorCheckerTestFunctions.h:
3394         (WebCore::matchesLangPseudoClass):
3395
3396 2015-01-16  Roger Fong  <roger_fong@apple.com>
3397
3398         WebGL2: Support webgl2 context creation.
3399         https://bugs.webkit.org/show_bug.cgi?id=126408
3400         <rdar://problem/15002170>
3401
3402         Reviewed by Dean Jackson.
3403
3404         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
3405
3406         Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
3407         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
3408         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
3409
3410         * CMakeLists.txt:
3411         * DerivedSources.cpp:
3412         * DerivedSources.make:
3413         * WebCore.vcxproj/WebCore.vcxproj:
3414         * WebCore.vcxproj/WebCore.vcxproj.filters:
3415         * WebCore.xcodeproj/project.pbxproj:
3416         * bindings/js/JSBindingsAllInOne.cpp:
3417         * bindings/js/JSCanvasRenderingContextCustom.cpp:
3418         (WebCore::toJS):
3419         * bindings/js/JSDocumentCustom.cpp:
3420         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3421         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
3422         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
3423         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
3424         * bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
3425         * bindings/scripts/CodeGeneratorJS.pm:
3426         (GenerateImplementation):
3427         * html/HTMLCanvasElement.cpp:
3428         (WebCore::HTMLCanvasElement::getContext):
3429         (WebCore::HTMLCanvasElement::reset):
3430         (WebCore::HTMLCanvasElement::paint):
3431         (WebCore::HTMLCanvasElement::getImageData):
3432         * html/canvas/ANGLEInstancedArrays.cpp:
3433         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
3434         (WebCore::ANGLEInstancedArrays::supported):
3435         * html/canvas/ANGLEInstancedArrays.h:
3436         * html/canvas/CanvasRenderingContext.h:
3437         (WebCore::CanvasRenderingContext::isWebGL1):
3438         (WebCore::CanvasRenderingContext::isWebGL2):
3439         (WebCore::CanvasRenderingContext::is3d):
3440         * html/canvas/EXTBlendMinMax.cpp:
3441         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
3442         * html/canvas/EXTBlendMinMax.h:
3443         * html/canvas/EXTFragDepth.cpp:
3444         (WebCore::EXTFragDepth::EXTFragDepth):
3445         * html/canvas/EXTFragDepth.h:
3446         * html/canvas/EXTShaderTextureLOD.cpp:
3447         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
3448         * html/canvas/EXTShaderTextureLOD.h:
3449         * html/canvas/EXTTextureFilterAnisotropic.cpp:
3450         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
3451         * html/canvas/EXTTextureFilterAnisotropic.h:
3452         * html/canvas/EXTsRGB.cpp:
3453         (WebCore::EXTsRGB::EXTsRGB):