de3e569d1a21676876f8cfe179c0365b1a6852aa
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-21  Sergio Villar Senin  <svillar@igalia.com>
2
3         [CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
4         https://bugs.webkit.org/show_bug.cgi?id=140720
5
6         Reviewed by David Hyatt.
7
8         Section "11.5. Resolve Intrinsic Track Sizes" of the specs forces
9         us to ignore items spanning tracks with flex sizing functions when
10         resolving the content-based track sizing functions. Items with
11         span < 2 are not affected by this rule (as they will belong to a
12         single track). This way the algorithm ensures that min-content and
13         max-content restrictions are fulfilled before distributing the
14         extra space.
15
16         Test: fast/css-grid-layout/flex-and-content-sized-resolution-columns.html
17
18         * rendering/RenderGrid.cpp:
19         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
20         (WebCore::integerSpanForDirection):
21         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
22         * rendering/RenderGrid.h:
23
24 2015-01-22  Yusuke Suzuki  <utatane.tea@gmail.com>
25
26         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
27         https://bugs.webkit.org/show_bug.cgi?id=140426
28
29         Reviewed by Geoffrey Garen.
30
31         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
32
33         * bindings/js/JSDOMWindowCustom.cpp:
34         (WebCore::JSDOMWindow::getOwnPropertySlot):
35         * bindings/js/JSHTMLAllCollectionCustom.cpp:
36         (WebCore::callHTMLAllCollection):
37         (WebCore::JSHTMLAllCollection::item):
38         * bindings/scripts/CodeGeneratorJS.pm:
39         (GenerateGetOwnPropertySlotBody):
40         (GenerateImplementation):
41         * bindings/scripts/test/JS/JSFloat64Array.cpp:
42         (WebCore::JSFloat64Array::getOwnPropertySlot):
43         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
44         (WebCore::JSFloat64Array::put):
45         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
46         (WebCore::JSTestEventTarget::getOwnPropertySlot):
47         * bridge/runtime_array.cpp:
48         (JSC::RuntimeArray::getOwnPropertySlot):
49         (JSC::RuntimeArray::put):
50
51 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
52
53         [CSS Grid Layout] Size tracks using a list of all items sorted by span
54         https://bugs.webkit.org/show_bug.cgi?id=140615
55
56         Reviewed by Andreas Kling.
57
58         In r173620 we fixed
59         RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
60         now collects all items spanning content-sized tracks and process
61         them one by one after sorting them by ascending span.
62
63         The problem is that it was incorrectly implemented, it has two
64         important bugs. First one is that the hash table that collects
65         items is regenerated after processing each track, so it's actually
66         doing nothing. Secondly we're only sorting the items on each
67         track, instead of all the items in the grid.
68
69         * rendering/RenderGrid.cpp:
70         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
71
72 2015-01-21  Daniel Bates  <dabates@apple.com>
73
74         Fix the iOS release build after <http://trac.webkit.org/changeset/178868>
75         (https://bugs.webkit.org/show_bug.cgi?id=140742)
76
77         Substitute ASSERT_UNUSED() for ASSERT() since the parameter layer is used only in the assertion expression.
78
79         * rendering/RenderLayerBacking.cpp:
80         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):
81
82 2015-01-21  Daniel Bates  <dabates@apple.com>
83
84         [iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
85         https://bugs.webkit.org/show_bug.cgi?id=140742
86
87         Reviewed by Simon Fraser.
88
89         Make RenderLayerBacking::layerTreeAsText() (including internals.layerTreeAsText()) always
90         report that the main frame's RenderView layer is opaque when running iOS DumpRenderTree to
91         avoid test failures and the need to maintain for iOS WebKit1 an almost identical copy of the
92         platform-independent compositing test results.
93
94         The main frame's RenderView layer is always transparent in iOS WebKit1 since it does
95         not make use of a tiled cache layer and defers to UIKit to handle the final compositing
96         of the web view, including applying the page scale factor.
97
98         * platform/RuntimeApplicationChecksIOS.mm:
99         (WebCore::applicationIsDumpRenderTree): The app bundle identifier of DumpRenderTree has
100         the form org.webkit.DumpRenderTreeX where X is some non-negative integer.
101         * platform/graphics/GraphicsLayer.cpp:
102         (WebCore::GraphicsLayer::dumpProperties): Modified to report that a layer is opaque when
103         GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack() returns true.
104         * platform/graphics/GraphicsLayerClient.h:
105         (WebCore::GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added
106         default implementation (returns false).
107         * rendering/RenderLayerBacking.cpp:
108         (WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added;
109         returns true when running in DumpRenderTree and the passed GraphicsLayer corresponds to the main frame's
110         RenderView layer.
111         * rendering/RenderLayerBacking.h:
112
113 2015-01-21  Roger Fong  <roger_fong@apple.com>
114
115         WebGL2 (spec section 3.1): Add new types to WebGL2 API.
116         https://bugs.webkit.org/show_bug.cgi?id=140741.
117         <rdar://problem/19552962>
118
119         Reviewed by Dean Jackson.
120
121         * html/canvas/WebGL2RenderingContext.idl:
122
123 2015-01-21  Zalan Bujtas  <zalan@apple.com>
124
125         Simple line layout: Move nextTextFragment() to FlowContents class.
126         https://bugs.webkit.org/show_bug.cgi?id=140738
127
128         Reviewed by Antti Koivisto.
129
130         This is in preparation to make FlowContents an iterator class.
131         
132         No change in functionality.
133
134         * rendering/SimpleLineLayout.cpp:
135         (WebCore::SimpleLineLayout::LineState::addUncommitted):
136         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
137         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
138         (WebCore::SimpleLineLayout::initializeNewLine):
139         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
140         (WebCore::SimpleLineLayout::createLineRuns):
141         (WebCore::SimpleLineLayout::TextFragment::TextFragment): Deleted.
142         (WebCore::SimpleLineLayout::TextFragment::isEmpty): Deleted.
143         (WebCore::SimpleLineLayout::nextFragment): Deleted.
144         * rendering/SimpleLineLayoutFlowContents.cpp:
145         (WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
146         * rendering/SimpleLineLayoutFlowContents.h:
147         (WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment):
148         (WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty):
149
150 2015-01-21  Andreas Kling  <akling@apple.com>
151
152         DocumentLoader::timing() should return a reference.
153         <https://webkit.org/b/128272>
154
155         Reviewed by Antti Koivisto.
156
157         There is always a DocumentLoadTiming object, so return it by
158         reference since it can never be null.
159
160         * Modules/gamepad/NavigatorGamepad.cpp:
161         (WebCore::NavigatorGamepad::from):
162         * dom/ScriptedAnimationController.cpp:
163         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
164         * html/HTMLMediaElement.cpp:
165         (WebCore::HTMLMediaElement::parseAttribute):
166         * inspector/InspectorResourceAgent.cpp:
167         (WebCore::buildObjectForTiming):
168         * loader/DocumentLoader.cpp:
169         (WebCore::DocumentLoader::finishedLoading):
170         (WebCore::DocumentLoader::willSendRequest):
171         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
172         (WebCore::DocumentLoader::startLoadingMainResource):
173         * loader/DocumentLoader.h:
174         (WebCore::DocumentLoader::timing):
175         * loader/FrameLoader.cpp:
176         (WebCore::FrameLoader::stopLoading):
177         (WebCore::FrameLoader::commitProvisionalLoad):
178         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
179         * page/DOMWindow.cpp:
180         (WebCore::DOMWindow::dispatchLoadEvent):
181         * page/Performance.cpp:
182         (WebCore::Performance::now):
183         * page/PerformanceNavigation.cpp:
184         (WebCore::PerformanceNavigation::redirectCount):
185         * page/PerformanceResourceTiming.cpp:
186         (WebCore::monotonicTimeToDocumentMilliseconds):
187         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
188         * page/PerformanceTiming.cpp:
189         (WebCore::PerformanceTiming::documentLoadTiming):
190
191 2015-01-21  Benjamin Poulain  <benjamin@webkit.org>
192
193         Handle the transition on any character as a separate type of transition
194         https://bugs.webkit.org/show_bug.cgi?id=140711
195
196         Reviewed by Andreas Kling.
197
198         Instead of considering the universal transition as 127 transitions, it is now
199         handled as a separate type of transition.
200
201         The goal is to reduce the number of exit edge to consider for each node. Instead
202         of having 127 for any partition containing one universal transition, we have
203         as few exit edges as necessary + one universal transition.
204
205         In the NFA, the universal transition is stored directly on NFANode in a new
206         HashSet (transitionsOnAnyCharacter).
207         The target nodes are made exclusive between "transitionsOnAnyCharacter" and "transitions"
208         by construction. That is not strictly needed but it simplify debugging at the moment.
209
210         When converting a NFA to a DFA, we first find all the node that transition on any character.
211         Then, when we iterate over "real" transition, we also augment that set with the set on
212         any character.
213
214         When creating the DFA node, we first consider each "real" transition, then we have a single
215         "fallback" transition for any character that has not been handled yet.
216
217         When matching, we first search for any real transition. If there is none but a fallback exists,
218         we take the fallback.
219
220         * contentextensions/DFA.cpp:
221         (WebCore::ContentExtensions::DFA::nextState):
222         (WebCore::ContentExtensions::printTransitions):
223         (WebCore::ContentExtensions::DFA::debugPrintDot):
224         (WebCore::ContentExtensions::printTransition): Deleted.
225         * contentextensions/DFANode.h:
226         * contentextensions/NFA.cpp:
227         (WebCore::ContentExtensions::NFA::addTransition):
228         (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter):
229         (WebCore::ContentExtensions::printTransitions):
230         (WebCore::ContentExtensions::NFA::debugPrintDot):
231         (WebCore::ContentExtensions::printTransition): Deleted.
232         * contentextensions/NFA.h:
233         * contentextensions/NFANode.h:
234         * contentextensions/NFAToDFA.cpp:
235         (WebCore::ContentExtensions::populateTransitions):
236         (WebCore::ContentExtensions::getOrCreateDFANode):
237         (WebCore::ContentExtensions::NFAToDFA::convert):
238         * contentextensions/URLFilterParser.cpp:
239         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
240
241 2015-01-20  Antti Koivisto  <antti@apple.com>
242
243         REGRESSION(r178180): Membuster regressed ~4%
244         https://bugs.webkit.org/show_bug.cgi?id=140495
245
246         Reviewed by Andreas Kling.
247
248         After r178180 we keep system fallback fonts that are used on glyph pages alive.
249         Previously we would traverse the glyph pages and remove entries referencing system fallbacks.
250
251         * platform/graphics/FontCache.cpp:
252         (WebCore::FontCache::purgeInactiveFontData):
253         * platform/graphics/FontCascade.cpp:
254         (WebCore::pruneUnreferencedEntriesFromFontGlyphsCache):
255         (WebCore::pruneSystemFallbackFonts):
256         * platform/graphics/FontCascade.h:
257         * platform/graphics/FontGlyphs.cpp:
258         (WebCore::FontGlyphs::pruneSystemFallbacks):
259
260             When clearing the font cache also remove the cached glyph pages that may contain system fallback fonts
261             and release the fallbacks.
262
263         * platform/graphics/FontGlyphs.h:
264
265 2015-01-21  Manuel Rego Casasnovas  <rego@igalia.com>
266
267         first-letter pseudo-element from ancestors is not being ignored in grids and flexboxes
268         https://bugs.webkit.org/show_bug.cgi?id=138424
269
270         Reviewed by Benjamin Poulain.
271
272         Source/WebCore:
273
274         According to the grid and flexbox specs:
275         "::first-letter pseudo-element do not apply to grid/flex containers".
276         http://dev.w3.org/csswg/css-grid/#grid-containers
277         http://dev.w3.org/csswg/css-flexbox/#flex-containers
278
279         Check also the CSS WG mailing list discussion:
280         http://lists.w3.org/Archives/Public/www-style/2014Dec/0305.html
281
282         This was almost working right, except in the case that an ancestor was
283         setting the ::first-letter pseudo-element.
284
285         Added a few more cases to the current tests in order to check this
286         behavior.
287         Also created some new tests to increase coverage
288
289         Tests: fast/css/first-letter-from-ancestors-not-apply-inline-elements.html
290                fast/css/first-letter-ignores-display-property.html
291
292         * rendering/RenderBlock.cpp:
293         (WebCore::RenderBlock::getFirstLetter): Go to the next sibling when
294         looking for the first text child if you reach a grid or flexbox.
295
296 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
297
298         Fix cast-align warning in Source/WebCore/platform/efl/EflScreenUtilities.cpp
299         https://bugs.webkit.org/show_bug.cgi?id=140670
300
301         Reviewed by Darin Adler.
302
303         * platform/efl/EflScreenUtilities.cpp:
304         (WebCore::createCustomCursor):
305
306 2015-01-21  Csaba Osztrogonác  <ossy@webkit.org>
307
308         Remove ENABLE(INSPECTOR) ifdef guards
309         https://bugs.webkit.org/show_bug.cgi?id=140668
310
311         Reviewed by Darin Adler.
312
313         * Configurations/FeatureDefines.xcconfig:
314         * WebCore.exp.in:
315         * bindings/js/JSCommandLineAPIHostCustom.cpp:
316         * bindings/js/JSDOMWindowBase.cpp:
317         (WebCore::JSDOMWindowBase::supportsProfiling):
318         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
319         * bindings/js/JSInspectorFrontendHostCustom.cpp:
320         * bindings/js/ScriptController.cpp:
321         (WebCore::ScriptController::collectIsolatedContexts):
322         * bindings/js/ScriptController.h:
323         * bindings/js/ScriptGlobalObject.cpp:
324         (WebCore::ScriptGlobalObject::set):
325         * bindings/js/ScriptGlobalObject.h:
326         * bindings/js/WorkerScriptDebugServer.cpp:
327         * bindings/js/WorkerScriptDebugServer.h:
328         * dom/Node.cpp:
329         (WebCore::Node::inspect):
330         * inspector/CommandLineAPIHost.cpp:
331         * inspector/CommandLineAPIHost.idl:
332         * inspector/CommandLineAPIModule.cpp:
333         * inspector/CommandLineAPIModule.h:
334         * inspector/DOMEditor.cpp:
335         * inspector/DOMEditor.h:
336         * inspector/DOMPatchSupport.cpp:
337         * inspector/DOMPatchSupport.h:
338         * inspector/InspectorApplicationCacheAgent.cpp:
339         * inspector/InspectorApplicationCacheAgent.h:
340         * inspector/InspectorCSSAgent.cpp:
341         * inspector/InspectorCSSAgent.h:
342         * inspector/InspectorClient.cpp:
343         * inspector/InspectorConsoleInstrumentation.h:
344         (WebCore::InspectorInstrumentation::addMessageToConsole):
345         (WebCore::InspectorInstrumentation::consoleCount):
346         (WebCore::InspectorInstrumentation::startConsoleTiming):
347         (WebCore::InspectorInstrumentation::stopConsoleTiming):
348         (WebCore::InspectorInstrumentation::consoleTimeStamp):
349         (WebCore::InspectorInstrumentation::startProfiling):
350         (WebCore::InspectorInstrumentation::stopProfiling):
351         * inspector/InspectorController.cpp:
352         * inspector/InspectorController.h:
353         * inspector/InspectorDOMAgent.cpp:
354         * inspector/InspectorDOMAgent.h:
355         * inspector/InspectorDOMDebuggerAgent.cpp:
356         * inspector/InspectorDOMDebuggerAgent.h:
357         * inspector/InspectorDOMStorageAgent.cpp:
358         * inspector/InspectorDatabaseAgent.cpp:
359         * inspector/InspectorDatabaseAgent.h:
360         * inspector/InspectorDatabaseInstrumentation.h:
361         (WebCore::InspectorInstrumentation::didOpenDatabase):
362         * inspector/InspectorDatabaseResource.cpp:
363         * inspector/InspectorDatabaseResource.h:
364         * inspector/InspectorFrontendClientLocal.cpp:
365         * inspector/InspectorFrontendHost.cpp:
366         * inspector/InspectorFrontendHost.idl:
367         * inspector/InspectorHistory.cpp:
368         * inspector/InspectorHistory.h:
369         * inspector/InspectorIndexedDBAgent.cpp:
370         * inspector/InspectorIndexedDBAgent.h:
371         * inspector/InspectorInstrumentation.cpp:
372         * inspector/InspectorInstrumentation.h:
373         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
374         (WebCore::InspectorInstrumentation::isDebuggerPaused):
375         (WebCore::InspectorInstrumentation::willInsertDOMNode):
376         (WebCore::InspectorInstrumentation::didInsertDOMNode):
377         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
378         (WebCore::InspectorInstrumentation::didRemoveDOMNode):
379         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
380         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
381         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
382         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
383         (WebCore::InspectorInstrumentation::frameWindowDiscarded):
384         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
385         (WebCore::InspectorInstrumentation::didPushShadowRoot):
386         (WebCore::InspectorInstrumentation::willPopShadowRoot):
387         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
388         (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
389         (WebCore::InspectorInstrumentation::didChangeRegionOverset):
390         (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement):
391         (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement):
392         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
393         (WebCore::InspectorInstrumentation::handleTouchEvent):
394         (WebCore::InspectorInstrumentation::handleMousePress):
395         (WebCore::InspectorInstrumentation::forcePseudoState):
396         (WebCore::InspectorInstrumentation::characterDataModified):
397         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
398         (WebCore::InspectorInstrumentation::didInstallTimer):
399         (WebCore::InspectorInstrumentation::didRemoveTimer):
400         (WebCore::InspectorInstrumentation::willCallFunction):
401         (WebCore::InspectorInstrumentation::didCallFunction):
402         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
403         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
404         (WebCore::InspectorInstrumentation::willDispatchEvent):
405         (WebCore::InspectorInstrumentation::didDispatchEvent):
406         (WebCore::InspectorInstrumentation::willHandleEvent):
407         (WebCore::InspectorInstrumentation::didHandleEvent):
408         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
409         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
410         (WebCore::InspectorInstrumentation::willEvaluateScript):
411         (WebCore::InspectorInstrumentation::didEvaluateScript):
412         (WebCore::InspectorInstrumentation::scriptsEnabled):
413         (WebCore::InspectorInstrumentation::willFireTimer):
414         (WebCore::InspectorInstrumentation::didFireTimer):
415         (WebCore::InspectorInstrumentation::didInvalidateLayout):
416         (WebCore::InspectorInstrumentation::willLayout):
417         (WebCore::InspectorInstrumentation::didLayout):
418         (WebCore::InspectorInstrumentation::didScroll):
419         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
420         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
421         (WebCore::InspectorInstrumentation::willPaint):
422         (WebCore::InspectorInstrumentation::didPaint):
423         (WebCore::InspectorInstrumentation::willScrollLayer):
424         (WebCore::InspectorInstrumentation::didScrollLayer):
425         (WebCore::InspectorInstrumentation::willRecalculateStyle):
426         (WebCore::InspectorInstrumentation::didRecalculateStyle):
427         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
428         (WebCore::InspectorInstrumentation::applyEmulatedMedia):
429         (WebCore::InspectorInstrumentation::willSendRequest):
430         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
431         (WebCore::InspectorInstrumentation::markResourceAsCached):
432         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
433         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
434         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
435         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
436         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
437         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
438         (WebCore::InspectorInstrumentation::didReceiveData):
439         (WebCore::InspectorInstrumentation::didFinishLoading):
440         (WebCore::InspectorInstrumentation::didFailLoading):
441         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
442         (WebCore::InspectorInstrumentation::willLoadXHR):
443         (WebCore::InspectorInstrumentation::didFailXHRLoading):
444         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
445         (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
446         (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
447         (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
448         (WebCore::InspectorInstrumentation::scriptImported):
449         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
450         (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
451         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
452         (WebCore::InspectorInstrumentation::loadEventFired):
453         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
454         (WebCore::InspectorInstrumentation::didCommitLoad):
455         (WebCore::InspectorInstrumentation::frameDocumentUpdated):
456         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
457         (WebCore::InspectorInstrumentation::frameStartedLoading):
458         (WebCore::InspectorInstrumentation::frameStoppedLoading):
459         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
460         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
461         (WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
462         (WebCore::InspectorInstrumentation::didRunJavaScriptDialog):
463         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
464         (WebCore::InspectorInstrumentation::willWriteHTML):
465         (WebCore::InspectorInstrumentation::didWriteHTML):
466         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
467         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
468         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
469         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
470         (WebCore::InspectorInstrumentation::didCreateWebSocket):
471         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
472         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
473         (WebCore::InspectorInstrumentation::didCloseWebSocket):
474         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
475         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
476         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
477         (WebCore::InspectorInstrumentation::sessionCreated):
478         (WebCore::InspectorInstrumentation::sessionLoaded):
479         (WebCore::InspectorInstrumentation::sessionModified):
480         (WebCore::InspectorInstrumentation::segmentCreated):
481         (WebCore::InspectorInstrumentation::segmentCompleted):
482         (WebCore::InspectorInstrumentation::segmentLoaded):
483         (WebCore::InspectorInstrumentation::segmentUnloaded):
484         (WebCore::InspectorInstrumentation::captureStarted):
485         (WebCore::InspectorInstrumentation::captureStopped):
486         (WebCore::InspectorInstrumentation::playbackStarted):
487         (WebCore::InspectorInstrumentation::playbackPaused):
488         (WebCore::InspectorInstrumentation::playbackFinished):
489         (WebCore::InspectorInstrumentation::playbackHitPosition):
490         (WebCore::InspectorInstrumentation::networkStateChanged):
491         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
492         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
493         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
494         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
495         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
496         (WebCore::InspectorInstrumentation::layerTreeDidChange):
497         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
498         (WebCore::InspectorInstrumentation::pseudoElementDestroyed):
499         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
500         (WebCore::InspectorInstrumentation::hasFrontends): Deleted.
501         (WebCore::InspectorInstrumentation::consoleAgentEnabled): Deleted.
502         (WebCore::InspectorInstrumentation::runtimeAgentEnabled): Deleted.
503         (WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted.
504         (WebCore::InspectorInstrumentation::replayAgentEnabled): Deleted.
505         * inspector/InspectorLayerTreeAgent.cpp:
506         * inspector/InspectorLayerTreeAgent.h:
507         * inspector/InspectorOverlay.cpp:
508         * inspector/InspectorPageAgent.cpp:
509         * inspector/InspectorPageAgent.h:
510         * inspector/InspectorReplayAgent.cpp:
511         * inspector/InspectorReplayAgent.h:
512         * inspector/InspectorResourceAgent.cpp:
513         * inspector/InspectorResourceAgent.h:
514         * inspector/InspectorStyleSheet.cpp:
515         * inspector/InspectorStyleSheet.h:
516         * inspector/InspectorStyleTextEditor.cpp:
517         * inspector/InspectorStyleTextEditor.h:
518         * inspector/InspectorTimelineAgent.cpp:
519         * inspector/InspectorTimelineAgent.h:
520         * inspector/InspectorWorkerAgent.cpp:
521         * inspector/InspectorWorkerResource.h:
522         * inspector/InstrumentingAgents.cpp:
523         * inspector/NetworkResourcesData.cpp:
524         * inspector/NetworkResourcesData.h:
525         * inspector/PageConsoleAgent.cpp:
526         * inspector/PageConsoleAgent.h:
527         * inspector/PageDebuggerAgent.cpp:
528         * inspector/PageDebuggerAgent.h:
529         * inspector/PageRuntimeAgent.cpp:
530         * inspector/PageRuntimeAgent.h:
531         * inspector/PageScriptDebugServer.cpp:
532         * inspector/PageScriptDebugServer.h:
533         * inspector/TimelineRecordFactory.cpp:
534         * inspector/WebConsoleAgent.cpp:
535         * inspector/WebConsoleAgent.h:
536         * inspector/WebDebuggerAgent.cpp:
537         * inspector/WebDebuggerAgent.h:
538         * inspector/WebInjectedScriptHost.cpp:
539         * inspector/WebInjectedScriptHost.h:
540         * inspector/WebInjectedScriptManager.cpp:
541         * inspector/WebInjectedScriptManager.h:
542         * inspector/WorkerConsoleAgent.cpp:
543         * inspector/WorkerConsoleAgent.h:
544         * inspector/WorkerDebuggerAgent.cpp:
545         * inspector/WorkerDebuggerAgent.h:
546         * inspector/WorkerInspectorController.cpp:
547         * inspector/WorkerInspectorController.h:
548         * inspector/WorkerRuntimeAgent.cpp:
549         * inspector/WorkerRuntimeAgent.h:
550         * loader/DocumentThreadableLoader.cpp:
551         (WebCore::DocumentThreadableLoader::didReceiveResponse):
552         (WebCore::DocumentThreadableLoader::loadRequest):
553         * loader/FrameLoader.cpp:
554         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
555         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
556         * loader/appcache/ApplicationCacheGroup.cpp:
557         (WebCore::ApplicationCacheGroup::createResourceHandle):
558         (WebCore::ApplicationCacheGroup::didReceiveResponse):
559         * loader/appcache/ApplicationCacheHost.cpp:
560         (WebCore::ApplicationCacheHost::applicationCacheInfo):
561         * loader/appcache/ApplicationCacheHost.h:
562         * loader/cache/CachedResourceLoader.cpp:
563         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
564         * page/ContextMenuController.cpp:
565         (WebCore::ContextMenuController::showContextMenu):
566         (WebCore::ContextMenuController::contextMenuItemSelected):
567         (WebCore::ContextMenuController::populate):
568         (WebCore::ContextMenuController::addInspectElementItem):
569         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
570         * page/FrameView.cpp:
571         (WebCore::FrameView::sendResizeEventIfNeeded):
572         * page/Page.cpp:
573         (WebCore::Page::Page):
574         (WebCore::Page::~Page):
575         * page/Page.h:
576         * platform/ContextMenuItem.h:
577         * platform/efl/EflInspectorUtilities.cpp:
578         * platform/efl/EflInspectorUtilities.h:
579         * platform/network/ResourceRequestBase.h:
580         (WebCore::ResourceRequestBase::ResourceRequestBase):
581         * platform/network/cf/ResourceRequestCFNet.cpp:
582         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
583         * platform/network/cocoa/ResourceRequestCocoa.mm:
584         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
585         * testing/Internals.cpp:
586         (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
587         (WebCore::Internals::resetToConsistentState):
588         (WebCore::Internals::inspectorHighlightRects):
589         (WebCore::Internals::inspectorHighlightObject):
590         (WebCore::Internals::setInspectorIsUnderTest):
591         * testing/Internals.h:
592         * testing/Internals.idl:
593         * workers/WorkerGlobalScope.cpp:
594         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
595         * workers/WorkerGlobalScope.h:
596         * workers/WorkerGlobalScopeProxy.h:
597         * workers/WorkerMessagingProxy.cpp:
598         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
599         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
600         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
601         * workers/WorkerMessagingProxy.h:
602         * workers/WorkerReportingProxy.h:
603         * workers/WorkerThread.cpp:
604         (WebCore::WorkerThread::workerThread):
605
606 2015-01-20  Chris Dumez  <cdumez@apple.com>
607
608         Simplify DiagnosticLoggingClient call sites
609         https://bugs.webkit.org/show_bug.cgi?id=140701
610
611         Reviewed by Andreas Kling.
612
613         Simplify DiagnosticLoggingClient call sites by:
614         - Moving the Settings::diagnosticLoggingEnabled() check inside the
615           MainFrame::diagnosticLoggingClient() getter.
616         - Having MainFrame::diagnosticLoggingClient() return a reference
617           instead of a pointer (returning a dummy client if necessary).
618
619         Otherwise, each call site needs to both check the setting and do a
620         null-check on the client which is a bit annoying.
621
622         * history/PageCache.cpp:
623         (WebCore::logPageCacheFailureDiagnosticMessage):
624         (WebCore::logCanCacheFrameDecision):
625         (WebCore::logCanCachePageDecision):
626         * html/HTMLMediaElement.cpp:
627         (WebCore::HTMLMediaElement::parseAttribute):
628         * loader/EmptyClients.h:
629         * loader/FrameLoader.cpp:
630         (WebCore::logNavigation):
631         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
632         * loader/SubframeLoader.cpp:
633         (WebCore::logPluginRequest):
634         * loader/SubresourceLoader.cpp:
635         (WebCore::logResourceLoaded):
636         * page/DiagnosticLoggingClient.h:
637         (WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Deleted.
638         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Deleted.
639         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Deleted.
640         * page/MainFrame.cpp:
641         (WebCore::MainFrame::diagnosticLoggingClient):
642         * page/MainFrame.h:
643
644 2015-01-20  Joseph Pecoraro  <pecoraro@apple.com>
645
646         Web Inspector: Should show dynamic specificity values
647         https://bugs.webkit.org/show_bug.cgi?id=140647
648
649         Reviewed by Benjamin Poulain.
650
651         Test: inspector/css/selector-dynamic-specificity.html
652
653         * inspector/InspectorCSSAgent.h:
654         * inspector/InspectorCSSAgent.cpp:
655         (WebCore::InspectorCSSAgent::setRuleSelector):
656         (WebCore::InspectorCSSAgent::addRule):
657         (WebCore::InspectorCSSAgent::buildObjectForRule):
658         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
659         When building a response for a particular element, pass the element along.
660
661         * inspector/InspectorStyleSheet.h:
662         * inspector/InspectorStyleSheet.cpp:
663         (WebCore::hasDynamicSpecificity):
664         (WebCore::buildObjectForSelectorHelper):
665         (WebCore::selectorsFromSource):
666         (WebCore::InspectorStyleSheet::buildObjectForSelector):
667         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
668         (WebCore::InspectorStyleSheet::buildObjectForRule):
669         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
670         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
671         When building a response for a Selector, include the specificity if we know
672         the element in context.
673
674 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
675
676         [Win] Build fix after r178760.
677
678         Windows will not accept a variable as the size declaration for an array.
679
680         * svg/SVGToOTFFontConversion.cpp:
681         (WebCore::SVGToOTFFontConverter::appendGSUBTable): Make size argument a const.
682
683 2015-01-20  Brent Fulgham  <bfulgham@apple.com>
684
685         [Win] Unreviewed Windows project file gardening.
686
687         * WebCore.vcxproj/WebCore.vcxproj: Add missing SVG files and put things in their proper
688         folders.
689         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
690
691 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
692
693         URLFilterParser dismisses the last atom when parsing a builtin character class
694         https://bugs.webkit.org/show_bug.cgi?id=140695
695
696         Reviewed by Andreas Kling.
697
698         The pending atom was not sunk before creating the new atom.
699
700         * contentextensions/URLFilterParser.cpp:
701         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
702
703 2015-01-20  Andreas Kling  <akling@apple.com>
704
705         Fast path for casting JSValue to JSDocument*.
706         <https://webkit.org/b/134655>
707
708         Add a custom JSType bit for JSDocument so we can quickly cast to it
709         from JSValue in the DocumentPrototype functions. This removes a bunch
710         of grunt work and branches from common functions like getElementById.
711
712         Also removed GetCastingHelperForBaseObject and replace it with
713         simple jsCasts since we don't need dynamic type checks for the base.
714
715         Reviewed by Darin Adler.
716
717         * WebCore.xcodeproj/project.pbxproj:
718         * bindings/js/JSDOMWrapper.h:
719         * bindings/js/JSDocumentCustom.h:
720         * bindings/scripts/CodeGeneratorJS.pm:
721         (GenerateHeader):
722         (GetCastingHelperForThisObject):
723         (GenerateImplementation):
724         (GetCastingHelperForBaseObject): Deleted.
725         * dom/Document.idl:
726
727 2015-01-20  Commit Queue  <commit-queue@webkit.org>
728
729         Unreviewed, rolling out r178751.
730         https://bugs.webkit.org/show_bug.cgi?id=140694
731
732         Caused 32-bit JSC test failures (Requested by JoePeck on
733         #webkit).
734
735         Reverted changeset:
736
737         "put_by_val_direct need to check the property is index or not
738         for using putDirect / putDirectIndex"
739         https://bugs.webkit.org/show_bug.cgi?id=140426
740         http://trac.webkit.org/changeset/178751
741
742 2015-01-20  Zalan Bujtas  <zalan@apple.com>
743
744         Simple line layout: Use FlowContents::Segment::text instead of renderer when possible.
745         https://bugs.webkit.org/show_bug.cgi?id=140692
746
747         Reviewed by Myles C. Maxfield.
748
749         No change in functionality.
750
751         * rendering/SimpleLineLayoutResolver.cpp:
752         (WebCore::SimpleLineLayout::RunResolver::Run::text):
753
754 2015-01-20  David Kilzer  <ddkilzer@apple.com>
755
756         Switch to comparing PLATFORM_NAME in terms of macosx
757         <http://webkit.org/b/139516>
758
759         Reviewed by Timothy Hatcher.
760
761         * bindings/scripts/preprocessor.pm:
762         (applyPreprocessor):
763         * generate-export-file:
764         (preprocessorMacros):
765
766 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
767
768         Attempt to fix 32bits builds after r178743
769
770         * contentextensions/ContentExtensionsBackend.cpp:
771         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
772
773 2015-01-20  Yusuke Suzuki  <utatane.tea@gmail.com>
774
775         put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
776         https://bugs.webkit.org/show_bug.cgi?id=140426
777
778         Reviewed by Geoffrey Garen.
779
780         Test: js/dfg-put-by-val-direct-with-edge-numbers.html
781
782         * bindings/js/JSDOMWindowCustom.cpp:
783         (WebCore::JSDOMWindow::getOwnPropertySlot):
784         * bindings/js/JSHTMLAllCollectionCustom.cpp:
785         (WebCore::callHTMLAllCollection):
786         (WebCore::JSHTMLAllCollection::item):
787         * bindings/scripts/CodeGeneratorJS.pm:
788         (GenerateGetOwnPropertySlotBody):
789         (GenerateImplementation):
790         * bindings/scripts/test/JS/JSFloat64Array.cpp:
791         (WebCore::JSFloat64Array::getOwnPropertySlot):
792         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
793         (WebCore::JSFloat64Array::put):
794         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
795         (WebCore::JSTestEventTarget::getOwnPropertySlot):
796         * bridge/runtime_array.cpp:
797         (JSC::RuntimeArray::getOwnPropertySlot):
798         (JSC::RuntimeArray::put):
799
800 2015-01-20  Chris Dumez  <cdumez@apple.com>
801
802         Drop width / height shorthands code from StylePropertyShorthand.*
803         https://bugs.webkit.org/show_bug.cgi?id=140686
804
805         Reviewed by Andreas Kling.
806
807         Drop width / height shorthands code from StylePropertyShorthand.*.
808         width / height are not shorthands for min-width/max-width and
809         min-height/max-height. Also, only matchingCustomShorthandsForLonghand()
810         treats these as shorthands. For e.g, the reverse method
811         (indexOfShorthandForLonghand()) does not.
812
813         * css/StylePropertyShorthand.cpp:
814         (WebCore::widthShorthand): Deleted.
815         (WebCore::heightShorthand): Deleted.
816         * css/StylePropertyShorthand.h:
817         (WebCore::matchingCustomShorthandsForLonghand):
818
819 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
820
821         Add a mechanism to ignore previous content extension rules
822         https://bugs.webkit.org/show_bug.cgi?id=140663
823
824         Reviewed by Andreas Kling.
825
826         * contentextensions/ContentExtensionRule.h:
827         * contentextensions/ContentExtensionsBackend.cpp:
828         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
829         * contentextensions/ContentExtensionsManager.cpp:
830         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
831
832 2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
833
834         Resolve the epsilon transitions for each state upfront instead of dynamically
835         https://bugs.webkit.org/show_bug.cgi?id=140654
836
837         Reviewed by Andreas Kling.
838
839         Instead of recomputing the epsilon-closure for each set, we compute the closure
840         of every element at the beginning of the transformation.
841
842         We then remove the epsilon transitions from the NFA to simplify populateTransitions().
843         The epsilon transitions are still there, but they are now in a separate graph we use
844         in parallel.
845
846         * contentextensions/NFAToDFA.cpp:
847         (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
848         (WebCore::ContentExtensions::resolveEpsilonClosures):
849         (WebCore::ContentExtensions::extendSetWithClosure):
850         (WebCore::ContentExtensions::populateTransitions):
851         (WebCore::ContentExtensions::NFAToDFA::convert):
852         (WebCore::ContentExtensions::epsilonClosure): Deleted.
853         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon): Deleted.
854         * contentextensions/NFAToDFA.h:
855
856 2015-01-20  Chris Dumez  <cdumez@apple.com>
857
858         Log types of resources being loaded using DiagnosticLoggingClient
859         https://bugs.webkit.org/show_bug.cgi?id=140682
860
861         Reviewed by Andreas Kling.
862
863         Log types of resources being loaded using DiagnosticLoggingClient
864         instead of the legacy FeatureCounter.
865
866         * loader/SubresourceLoader.cpp:
867         (WebCore::logResourceLoaded):
868         (WebCore::SubresourceLoader::didFinishLoading):
869         (WebCore::logResourceLoadedUsingFeatureCounter): Deleted.
870         * page/DiagnosticLoggingKeys.cpp:
871         (WebCore::DiagnosticLoggingKeys::otherKey):
872         (WebCore::DiagnosticLoggingKeys::mainResourceKey):
873         (WebCore::DiagnosticLoggingKeys::loadedKey):
874         (WebCore::DiagnosticLoggingKeys::imageKey):
875         (WebCore::DiagnosticLoggingKeys::rawKey):
876         (WebCore::DiagnosticLoggingKeys::resourceKey):
877         (WebCore::DiagnosticLoggingKeys::scriptKey):
878         (WebCore::DiagnosticLoggingKeys::styleSheetKey):
879         (WebCore::DiagnosticLoggingKeys::svgDocumentKey):
880         (WebCore::DiagnosticLoggingKeys::fontKey):
881         * page/DiagnosticLoggingKeys.h:
882         * platform/FeatureCounterKeys.h:
883
884 2015-01-20  Zalan Bujtas  <zalan@apple.com>
885
886         Simple line layout: Remove redundant style.preserveNewline check when collapsing trailing whitespace.
887         https://bugs.webkit.org/show_bug.cgi?id=140684
888
889         Reviewed by Antti Koivisto.
890
891         FlowContents::isLineBreak() checks whether we are at a hard newline.
892
893         No change in functionality.
894
895         * rendering/SimpleLineLayout.cpp:
896         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
897
898 2015-01-19  Simon Fraser  <simon.fraser@apple.com>
899
900         Add a way to collect scrolling performance data (viewport tile coverage) with UI-side compositing
901         https://bugs.webkit.org/show_bug.cgi?id=140474
902
903         Reviewed by Tim Horton.
904
905         Add accessors for standard names for container CALayer for each of the tile grids,
906         and when tile grids are swapped, update those names as appropriate.
907         
908         * WebCore.exp.in:
909         * platform/graphics/ca/TileController.cpp:
910         (WebCore::TileController::tileGridContainerLayerName):
911         (WebCore::TileController::zoomedOutTileGridContainerLayerName):
912         (WebCore::TileController::setContentsScale):
913         * platform/graphics/ca/TileController.h:
914         * platform/graphics/ca/TileGrid.cpp:
915         (WebCore::TileGrid::TileGrid):
916         (WebCore::TileGrid::setIsZoomedOutTileGrid):
917         * platform/graphics/ca/TileGrid.h:
918
919 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
920
921         Fix unused-private-field warning in IconEfl.cpp
922         https://bugs.webkit.org/show_bug.cgi?id=140676
923
924         Reviewed by Darin Adler.
925
926         * platform/graphics/Icon.h:
927         * platform/graphics/efl/IconEfl.cpp:
928         (WebCore::Icon::Icon): Deleted.
929
930 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
931
932         Fix unused-private-field warning in FontCustomPlatformDataFreeType.cpp
933         https://bugs.webkit.org/show_bug.cgi?id=140677
934
935         Reviewed by Martin Robinson.
936
937         * platform/graphics/cairo/FontCustomPlatformData.h:
938         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
939         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
940         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
941
942 2015-01-20  peavo@outlook.com  <peavo@outlook.com>
943
944         Plugin content not loaded.
945         https://bugs.webkit.org/show_bug.cgi?id=140672
946
947         Reviewed by Brent Fulgham.
948
949         It seems this is caused by a std::unique_ptr in CClass::methodNamed being moved,
950         resetting its raw pointer. The raw pointer, which now is null, is then returned
951         from the method.
952
953         * bridge/c/c_class.cpp:
954         (JSC::Bindings::CClass::methodNamed):
955         (JSC::Bindings::CClass::fieldNamed):
956
957 2015-01-20  Darin Adler  <darin@apple.com>
958
959         Remove SVGElementInstanceList, m_instanceUnderMouse, DUMP_INSTANCE_TREE, DUMP_SHADOW_TREE
960         https://bugs.webkit.org/show_bug.cgi?id=140679
961
962         Reviewed by Anders Carlsson.
963
964         First step in removing the SVG instance tree.
965         All based on redoing the same excellent work Rob Buis did to remove this in Blink in crbug.com/313438.
966
967         * CMakeLists.txt: Removed the source files.
968         * DerivedSources.cpp: Ditto.
969         * DerivedSources.make: Ditto.
970         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
971         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
972         * WebCore.xcodeproj/project.pbxproj: Ditto.
973
974         * page/EventHandler.cpp:
975         (WebCore::EventHandler::clear): Removed code to set unused m_instanceUnderMouse.
976         (WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
977         * page/EventHandler.h: Removed m_instanceUnderMouse.
978
979         * svg/SVGAllInOne.cpp: Removed the source files.
980         * svg/SVGElementInstance.cpp:
981         (WebCore::SVGElementInstance::childNodes): Deleted.
982         * svg/SVGElementInstance.h: Removed childNodes.
983         * svg/SVGElementInstance.idl: Ditto.
984         * svg/SVGElementInstanceList.cpp: Removed.
985         * svg/SVGElementInstanceList.h: Removed.
986         * svg/SVGElementInstanceList.idl: Removed.
987         * svg/SVGUseElement.cpp:
988         (WebCore::dumpInstanceTree): Deleted.
989         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Removed DUMP_INSTANCE_TREE and
990         DUMP_SHADOW_TREE code.
991
992 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
993
994         Web Replay: code generator should take supplemental specifications and allow cross-framework references
995         https://bugs.webkit.org/show_bug.cgi?id=136312
996
997         Reviewed by Joseph Pecoraro.
998
999         Changes covered by existing input generator tests.
1000
1001         * DerivedSources.make: Add JSInputs.json as supplemental specification.
1002         * replay/WebInputs.json: Moved common types to JSInputs.json.
1003
1004 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1005
1006         Fix unused-const-variable warning in RenderLayerCompositor.cpp
1007         https://bugs.webkit.org/show_bug.cgi?id=140678
1008
1009         Reviewed by Simon Fraser.
1010
1011         * rendering/RenderLayerCompositor.cpp:
1012
1013 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1014
1015         [gstreamer] Fix expression result unused warning in GRefPtrGStreamer.cpp
1016         https://bugs.webkit.org/show_bug.cgi?id=140671
1017
1018         Reviewed by Philippe Normand.
1019
1020         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1021         (WTF::refGPtr<GstToc>):
1022
1023 2015-01-19  Dean Jackson  <dino@apple.com>
1024
1025         Support "plus-darker" in mix-blend mode
1026         https://bugs.webkit.org/show_bug.cgi?id=140646
1027         <rdar://problem/19523370>
1028
1029         Reviewed by Simon Fraser.
1030
1031         Support the "plus-darker" blending mode to CSS.
1032         See: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
1033
1034         Test: css3/blending/svg-blend-plus-darker.html
1035
1036         * css/CSSParser.cpp:
1037         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept
1038         the new keyword.
1039         * css/CSSPrimitiveValueMappings.h: Add the mappings.
1040         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1041         (WebCore::CSSPrimitiveValue::operator BlendMode):
1042         * platform/graphics/GraphicsTypes.cpp: Add the new GraphicsType.
1043         * platform/graphics/GraphicsTypes.h:
1044         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA compositing filter.
1045         (PlatformCAFilters::setBlendingFiltersOnLayer):
1046         * platform/graphics/cg/GraphicsContextCG.cpp:
1047         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG blending flag.
1048
1049 2015-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1050
1051         Fix 'register' storage class specifier is deprecated warning
1052         https://bugs.webkit.org/show_bug.cgi?id=140669
1053
1054         Reviewed by Carlos Garcia Campos.
1055
1056         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1057         (webKitWebAudioSrcLoop):
1058
1059 2015-01-20  Chris Dumez  <cdumez@apple.com>
1060
1061         Use DiagnosticLoggingClient to log page cache failures
1062         https://bugs.webkit.org/show_bug.cgi?id=140650
1063
1064         Reviewed by Andreas Kling.
1065
1066         Use DiagnosticLoggingClient to log page cache failures instead of the
1067         legacy FeatureCounter.
1068
1069         * history/PageCache.cpp:
1070         (WebCore::logPageCacheFailureDiagnosticMessage):
1071         (WebCore::logCanCacheFrameDecision):
1072         (WebCore::logCanCachePageDecision):
1073         (WebCore::PageCache::canCache):
1074         (WebCore::pruningReasonToDiagnosticLoggingKey):
1075         (WebCore::PageCache::take):
1076         (WebCore::PageCache::get):
1077         (WebCore::pruningReasonToFeatureCounterKey): Deleted.
1078         * page/DiagnosticLoggingKeys.cpp:
1079         (WebCore::DiagnosticLoggingKeys::successKey):
1080         (WebCore::DiagnosticLoggingKeys::failureKey):
1081         (WebCore::DiagnosticLoggingKeys::pageLoadedKey):
1082         (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
1083         (WebCore::DiagnosticLoggingKeys::navigationKey):
1084         (WebCore::DiagnosticLoggingKeys::pageCacheKey):
1085         (WebCore::DiagnosticLoggingKeys::noDocumentLoaderKey):
1086         (WebCore::DiagnosticLoggingKeys::mainDocumentErrorKey):
1087         (WebCore::DiagnosticLoggingKeys::isErrorPageKey):
1088         (WebCore::DiagnosticLoggingKeys::hasPluginsKey):
1089         (WebCore::DiagnosticLoggingKeys::httpsNoStoreKey):
1090         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey):
1091         (WebCore::DiagnosticLoggingKeys::noCurrentHistoryItemKey):
1092         (WebCore::DiagnosticLoggingKeys::quirkRedirectComingKey):
1093         (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey):
1094         (WebCore::DiagnosticLoggingKeys::documentLoaderStoppingKey):
1095         (WebCore::DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey):
1096         (WebCore::DiagnosticLoggingKeys::applicationCacheKey):
1097         (WebCore::DiagnosticLoggingKeys::deniedByClientKey):
1098         (WebCore::DiagnosticLoggingKeys::deviceMotionKey):
1099         (WebCore::DiagnosticLoggingKeys::deviceOrientationKey):
1100         (WebCore::DiagnosticLoggingKeys::deviceProximityKey):
1101         (WebCore::DiagnosticLoggingKeys::reloadKey):
1102         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey):
1103         (WebCore::DiagnosticLoggingKeys::sameLoadKey):
1104         (WebCore::DiagnosticLoggingKeys::expiredKey):
1105         (WebCore::DiagnosticLoggingKeys::prunedDueToMemoryPressureKey):
1106         (WebCore::DiagnosticLoggingKeys::prunedDueToCapacityReached):
1107         (WebCore::DiagnosticLoggingKeys::prunedDueToProcessSuspended):
1108         (WebCore::DiagnosticLoggingKeys::passKey): Deleted.
1109         (WebCore::DiagnosticLoggingKeys::failKey): Deleted.
1110         (WebCore::DiagnosticLoggingKeys::noopKey): Deleted.
1111         * page/DiagnosticLoggingKeys.h:
1112         * platform/FeatureCounterKeys.h:
1113
1114 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
1115
1116         [CSS Grid Layout] Wrong arguments passed to computeNormalizedFractionBreadth
1117         https://bugs.webkit.org/show_bug.cgi?id=139058
1118
1119         Reviewed by Andreas Kling.
1120
1121         The method RenderGrid::computeNormalizedFractionBreadth() is
1122         supposed to get as fourth argument either the grid element's
1123         content box size or the max-size of a particular grid item. For
1124         the former we were incorrectly passing the free space after
1125         distributing the available space to tracks.
1126
1127         Apart from that, that method has a bug in its implementation. As
1128         we were using the free space instead of the grid element's content
1129         box size, we didn't have to subtract the usedBreadth of grid
1130         tracks from the passed in value. That did not work for the case of
1131         the caller passing the max-size of a particular item.
1132
1133         * rendering/RenderGrid.cpp:
1134         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1135         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
1136
1137 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
1138
1139         [SVG -> OTF Converter] Flip the switch on
1140         https://bugs.webkit.org/show_bug.cgi?id=140592
1141
1142         Reviewed by Antti Koivisto.
1143
1144         * Configurations/FeatureDefines.xcconfig:
1145
1146 2015-01-19  Commit Queue  <commit-queue@webkit.org>
1147
1148         Unreviewed, rolling out r178683.
1149         https://bugs.webkit.org/show_bug.cgi?id=140657
1150
1151         Lots of asserts in tests. (Requested by JoePeck on #webkit).
1152
1153         Reverted changeset:
1154
1155         "LayoutState and subtree layout code should use
1156         RenderElement."
1157         https://bugs.webkit.org/show_bug.cgi?id=126878
1158         http://trac.webkit.org/changeset/178683
1159
1160 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
1161
1162         [Win] Unreviewed gardening.
1163
1164         Avoid compiling files twice when they are included in an 'AllInOne.cpp' file.
1165
1166         * WebCore.vcxproj/WebCore.vcxproj: Mark several files as 'not to be built', since
1167         they are also build as part of an 'AllInOne.cpp' file.
1168
1169 2015-01-19  Chris Dumez  <cdumez@apple.com>
1170
1171         Stop using FeatureCounter to log navigation types
1172         https://bugs.webkit.org/show_bug.cgi?id=140642
1173
1174         Reviewed by Andreas Kling.
1175
1176         Stop using FeatureCounter to log navigation types now that
1177         DiagnosticLoggingClient is working on iOS.
1178
1179         * loader/FrameLoader.cpp:
1180         (WebCore::logNavigation):
1181         * platform/FeatureCounterKeys.h:
1182
1183 2015-01-19  Andreas Kling  <akling@apple.com>
1184
1185         LayoutState and subtree layout code should use RenderElement.
1186         <https://webkit.org/b/126878>
1187
1188         Subtree layout will never begin at a RenderText, so tighten up
1189         the code to operate on RenderElements instead of RenderObjects.
1190
1191         Reviewed by Antti Koivisto.
1192
1193         * inspector/InspectorTimelineAgent.cpp:
1194         (WebCore::InspectorTimelineAgent::willLayout):
1195         * page/FrameView.cpp:
1196         (WebCore::FrameView::layoutRoot):
1197         (WebCore::FrameView::layout):
1198         * page/FrameView.h:
1199
1200             Make FrameView::layoutRoot() return RenderElement*.
1201
1202         * rendering/RenderElement.cpp:
1203         (WebCore::RenderElement::willBeDestroyed):
1204         * rendering/RenderObject.cpp:
1205         (WebCore::RenderObject::willBeDestroyed):
1206         * rendering/RenderObject.h:
1207
1208             Move subtree layout root clearing logic in willBeDestroyed()
1209             from RenderObject to RenderElement.
1210
1211         * rendering/LayoutState.cpp:
1212         (WebCore::LayoutState::LayoutState):
1213         * rendering/LayoutState.h:
1214         * rendering/RenderView.h:
1215         * rendering/RenderView.cpp:
1216         (WebCore::RenderView::pushLayoutState):
1217         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
1218
1219             Make all of these functions take RenderElement instead of
1220             RenderObject since layout never starts from a RenderText.
1221
1222         (WebCore::RenderView::shouldDisableLayoutStateForSubtree):
1223
1224             Tweak loop since it's never null on first iteration.
1225
1226 2015-01-19  Beth Dakin  <bdakin@apple.com>
1227
1228         Speculative build fix.
1229
1230         * platform/spi/mac/NSViewSPI.h:
1231
1232 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
1233
1234         Adjust naming of action menu SPI
1235         https://bugs.webkit.org/show_bug.cgi?id=140644
1236         <rdar://problem/19448129>
1237
1238         Reviewed by Brian Weinstein.
1239
1240         * platform/spi/mac/NSViewSPI.h:
1241         Add an underscore.
1242
1243 2015-01-19  Dhi Aurrahman  <diorahman@rockybars.com>
1244
1245         Canonicalization of :lang() should preserve the :lang()'s arguments representations
1246         https://bugs.webkit.org/show_bug.cgi?id=139928
1247
1248         Reviewed by Benjamin Poulain.
1249
1250         Preserve the representation of IDENT and STRING when serializing the
1251         :lang(). For example, :lang(foo,"bar", baz) should be serialize as
1252         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
1253     
1254         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
1255         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
1256         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
1257         respectively, since those methods are being exclusively used in respect
1258         with :lang().
1259
1260         Update the test of serializing :lang() with IDENT and STRING arguments.
1261
1262         * css/CSSGrammar.y.in:
1263         * css/CSSParserValues.cpp:
1264         (WebCore::CSSParserSelector::setLangArgumentList):
1265         (WebCore::CSSParserSelector::setArgumentList): Deleted.
1266         * css/CSSParserValues.h:
1267         (WebCore::CSSParserString::tokenType):
1268         (WebCore::CSSParserString::setTokenType):
1269         * css/CSSSelector.cpp:
1270         (WebCore::appendLangArgumentList):
1271         (WebCore::CSSSelector::selectorText):
1272         (WebCore::CSSSelector::setLangArgumentList):
1273         (WebCore::appendArgumentList): Deleted.
1274         (WebCore::CSSSelector::setArgumentList): Deleted.
1275         * css/CSSSelector.h:
1276         (WebCore::CSSSelector::langArgumentList):
1277         (WebCore::CSSSelector::argumentList): Deleted.
1278         * css/SelectorChecker.cpp:
1279         (WebCore::SelectorChecker::checkOne):
1280         * css/SelectorCheckerTestFunctions.h:
1281         (WebCore::matchesLangPseudoClass):
1282
1283 2015-01-16  Roger Fong  <roger_fong@apple.com>
1284
1285         WebGL2: Support webgl2 context creation.
1286         https://bugs.webkit.org/show_bug.cgi?id=126408
1287         <rdar://problem/15002170>
1288
1289         Reviewed by Dean Jackson.
1290
1291         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
1292
1293         Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
1294         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
1295         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
1296
1297         * CMakeLists.txt:
1298         * DerivedSources.cpp:
1299         * DerivedSources.make:
1300         * WebCore.vcxproj/WebCore.vcxproj:
1301         * WebCore.vcxproj/WebCore.vcxproj.filters:
1302         * WebCore.xcodeproj/project.pbxproj:
1303         * bindings/js/JSBindingsAllInOne.cpp:
1304         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1305         (WebCore::toJS):
1306         * bindings/js/JSDocumentCustom.cpp:
1307         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1308         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
1309         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
1310         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
1311         * bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
1312         * bindings/scripts/CodeGeneratorJS.pm:
1313         (GenerateImplementation):
1314         * html/HTMLCanvasElement.cpp:
1315         (WebCore::HTMLCanvasElement::getContext):
1316         (WebCore::HTMLCanvasElement::reset):
1317         (WebCore::HTMLCanvasElement::paint):
1318         (WebCore::HTMLCanvasElement::getImageData):
1319         * html/canvas/ANGLEInstancedArrays.cpp:
1320         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
1321         (WebCore::ANGLEInstancedArrays::supported):
1322         * html/canvas/ANGLEInstancedArrays.h:
1323         * html/canvas/CanvasRenderingContext.h:
1324         (WebCore::CanvasRenderingContext::isWebGL1):
1325         (WebCore::CanvasRenderingContext::isWebGL2):
1326         (WebCore::CanvasRenderingContext::is3d):
1327         * html/canvas/EXTBlendMinMax.cpp:
1328         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
1329         * html/canvas/EXTBlendMinMax.h:
1330         * html/canvas/EXTFragDepth.cpp:
1331         (WebCore::EXTFragDepth::EXTFragDepth):
1332         * html/canvas/EXTFragDepth.h:
1333         * html/canvas/EXTShaderTextureLOD.cpp:
1334         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
1335         * html/canvas/EXTShaderTextureLOD.h:
1336         * html/canvas/EXTTextureFilterAnisotropic.cpp:
1337         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
1338         * html/canvas/EXTTextureFilterAnisotropic.h:
1339         * html/canvas/EXTsRGB.cpp:
1340         (WebCore::EXTsRGB::EXTsRGB):
1341         * html/canvas/EXTsRGB.h:
1342         * html/canvas/OESElementIndexUint.cpp:
1343         (WebCore::OESElementIndexUint::OESElementIndexUint):
1344         * html/canvas/OESElementIndexUint.h:
1345         * html/canvas/OESStandardDerivatives.cpp:
1346         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
1347         * html/canvas/OESStandardDerivatives.h:
1348         * html/canvas/OESTextureFloat.cpp:
1349         (WebCore::OESTextureFloat::OESTextureFloat):
1350         * html/canvas/OESTextureFloat.h:
1351         * html/canvas/OESTextureFloatLinear.cpp:
1352         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
1353         * html/canvas/OESTextureFloatLinear.h:
1354         * html/canvas/OESTextureHalfFloat.cpp:
1355         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
1356         * html/canvas/OESTextureHalfFloat.h:
1357         * html/canvas/OESTextureHalfFloatLinear.cpp:
1358         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
1359         * html/canvas/OESTextureHalfFloatLinear.h:
1360         * html/canvas/OESVertexArrayObject.cpp:
1361         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
1362         * html/canvas/OESVertexArrayObject.h:
1363         * html/canvas/WebGL2RenderingContext.cpp: Added.
1364         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
1365         * html/canvas/WebGL2RenderingContext.h: Added.
1366         * html/canvas/WebGL2RenderingContext.idl: Added.
1367         * html/canvas/WebGLBuffer.cpp:
1368         (WebCore::WebGLBuffer::create):
1369         (WebCore::WebGLBuffer::WebGLBuffer):
1370         * html/canvas/WebGLBuffer.h:
1371         * html/canvas/WebGLCompressedTextureATC.cpp:
1372         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
1373         (WebCore::WebGLCompressedTextureATC::supported):
1374         * html/canvas/WebGLCompressedTextureATC.h:
1375         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
1376         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
1377         (WebCore::WebGLCompressedTexturePVRTC::supported):
1378         * html/canvas/WebGLCompressedTexturePVRTC.h:
1379         * html/canvas/WebGLCompressedTextureS3TC.cpp:
1380         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
1381         (WebCore::WebGLCompressedTextureS3TC::supported):
1382         * html/canvas/WebGLCompressedTextureS3TC.h:
1383         * html/canvas/WebGLContextGroup.cpp:
1384         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
1385         (WebCore::WebGLContextGroup::addContext):
1386         (WebCore::WebGLContextGroup::removeContext):
1387         (WebCore::WebGLContextGroup::loseContextGroup):
1388         * html/canvas/WebGLContextGroup.h:
1389         * html/canvas/WebGLContextObject.cpp:
1390         (WebCore::WebGLContextObject::WebGLContextObject):
1391         * html/canvas/WebGLContextObject.h:
1392         (WebCore::WebGLContextObject::context):
1393         * html/canvas/WebGLDebugRendererInfo.cpp:
1394         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
1395         * html/canvas/WebGLDebugRendererInfo.h:
1396         * html/canvas/WebGLDebugShaders.cpp:
1397         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
1398         * html/canvas/WebGLDebugShaders.h:
1399         * html/canvas/WebGLDepthTexture.cpp:
1400         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
1401         * html/canvas/WebGLDepthTexture.h:
1402         * html/canvas/WebGLDrawBuffers.cpp:
1403         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
1404         (WebCore::WebGLDrawBuffers::supported):
1405         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
1406         * html/canvas/WebGLDrawBuffers.h:
1407         * html/canvas/WebGLExtension.cpp:
1408         (WebCore::WebGLExtension::WebGLExtension):
1409         * html/canvas/WebGLExtension.h:
1410         (WebCore::WebGLExtension::context):
1411         * html/canvas/WebGLFramebuffer.cpp:
1412         (WebCore::WebGLFramebuffer::create):
1413         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
1414         * html/canvas/WebGLFramebuffer.h:
1415         * html/canvas/WebGLLoseContext.cpp:
1416         (WebCore::WebGLLoseContext::WebGLLoseContext):
1417         (WebCore::WebGLLoseContext::loseContext):
1418         * html/canvas/WebGLLoseContext.h:
1419         * html/canvas/WebGLObject.cpp:
1420         (WebCore::WebGLObject::WebGLObject):
1421         * html/canvas/WebGLObject.h:
1422         * html/canvas/WebGLProgram.cpp:
1423         (WebCore::WebGLProgram::create):
1424         (WebCore::WebGLProgram::WebGLProgram):
1425         * html/canvas/WebGLProgram.h:
1426         * html/canvas/WebGLRenderbuffer.cpp:
1427         (WebCore::WebGLRenderbuffer::create):
1428         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
1429         * html/canvas/WebGLRenderbuffer.h:
1430         * html/canvas/WebGLRenderingContext.cpp: Move implementation to WebGLRenderingContextBase.cpp.
1431         * html/canvas/WebGLRenderingContext.h:  Move implementation to WebGLRenderingContextBase.h.
1432         * html/canvas/WebGLRenderingContext.idl:  Move implementation to WebGLRenderingContextBase.idl.
1433         * html/canvas/WebGLRenderingContextBase.cpp: Added.
1434         * html/canvas/WebGLRenderingContextBase.h: Added.
1435         * html/canvas/WebGLRenderingContextBase.idl: Added.
1436         * html/canvas/WebGLShader.cpp:
1437         (WebCore::WebGLShader::create):
1438         (WebCore::WebGLShader::WebGLShader):
1439         * html/canvas/WebGLShader.h:
1440         * html/canvas/WebGLSharedObject.cpp:
1441         (WebCore::WebGLSharedObject::WebGLSharedObject):
1442         * html/canvas/WebGLSharedObject.h:
1443         * html/canvas/WebGLTexture.cpp:
1444         (WebCore::WebGLTexture::create):
1445         (WebCore::WebGLTexture::WebGLTexture):
1446         * html/canvas/WebGLTexture.h:
1447         * html/canvas/WebGLVertexArrayObjectOES.cpp:
1448         (WebCore::WebGLVertexArrayObjectOES::create):
1449         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
1450         * html/canvas/WebGLVertexArrayObjectOES.h:
1451
1452 2015-01-19  Antti Koivisto  <antti@apple.com>
1453
1454         REGRESSION(r178250): ~2% PLT regression
1455         https://bugs.webkit.org/show_bug.cgi?id=140640
1456
1457         Reviewed by Andreas Kling.
1458
1459         * platform/graphics/FontCache.cpp:
1460
1461         The patch accidentally contained a change to reduce the size of the cache (to verify that purgin works).
1462         Restore it back to the original value.
1463
1464 2015-01-19  peavo@outlook.com  <peavo@outlook.com>
1465
1466         [WinCairo][Video] Windows Media Foundation implementation is not completed.
1467         https://bugs.webkit.org/show_bug.cgi?id=140337
1468
1469         Reviewed by Alex Christensen.
1470
1471         This patch aims to complete some of the methods which are not implemented.
1472         Currently, only MP4 is supported.
1473         Video is rendered in a child window of the main window.
1474         We should eventually render the video directly in the main window,
1475         by reading and painting individual video frames from the stream.
1476
1477         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1478         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
1479         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
1480         (WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
1481         (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
1482         (WebCore::MediaPlayerPrivateMediaFoundation::load):
1483         (WebCore::MediaPlayerPrivateMediaFoundation::play):
1484         (WebCore::MediaPlayerPrivateMediaFoundation::pause):
1485         (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
1486         (WebCore::MediaPlayerPrivateMediaFoundation::hasVideo):
1487         (WebCore::MediaPlayerPrivateMediaFoundation::hasAudio):
1488         (WebCore::MediaPlayerPrivateMediaFoundation::setVisible):
1489         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
1490         (WebCore::MediaPlayerPrivateMediaFoundation::readyState):
1491         (WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
1492         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
1493         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
1494         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
1495         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
1496         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
1497         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
1498         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
1499         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
1500         (WebCore::MediaPlayerPrivateMediaFoundation::addBranchToPartialTopology):
1501         (WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc):
1502         (WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass):
1503         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
1504         (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
1505         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
1506         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
1507         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
1508         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
1509         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
1510         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
1511         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface):
1512         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef):
1513         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release):
1514         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters):
1515         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1516         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1517
1518 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
1519
1520         Web Replay: convert to is<T> and downcast<T> for decoding replay inputs
1521         https://bugs.webkit.org/show_bug.cgi?id=140512
1522
1523         Reviewed by Chris Dumez.
1524
1525         No new tests, no behavior changed.
1526
1527         * replay/EventLoopInput.h: Make overridden methods public.
1528         * replay/MemoizedDOMResult.h: Add type trait specialization here. It is
1529         special-cased because the input type parameter doesn't work with macros.
1530         * replay/SerializationMethods.cpp:
1531         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
1532         Use is() and downcast() when dispatching to encoders based on type.
1533
1534 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
1535
1536         Replace use of WTF::bind() in MemoryPressureHandlerLinux.cpp with a C++ lambda
1537         https://bugs.webkit.org/show_bug.cgi?id=140614
1538
1539         Reviewed by Carlos Garcia Campos.
1540
1541         Use a C++ lambda instead of WTF::bind() in the MemoryPressureHandler
1542         implementation for Linux.
1543
1544         * platform/linux/MemoryPressureHandlerLinux.cpp:
1545         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
1546
1547 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
1548
1549         Replace uses of WTF::bind() in MockMediaPlayerMediaSource with C++ lambdas
1550         https://bugs.webkit.org/show_bug.cgi?id=140612
1551
1552         Reviewed by Philippe Normand.
1553
1554         Use C++ lambdas in place of WTF::bind() in the MockMediaPlayerMediaSource class.
1555
1556         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1557         (WebCore::MockMediaPlayerMediaSource::play):
1558         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
1559         (WebCore::MockMediaPlayerMediaSource::seekCompleted):
1560
1561 2015-01-19  Commit Queue  <commit-queue@webkit.org>
1562
1563         Unreviewed, rolling out r178653.
1564         https://bugs.webkit.org/show_bug.cgi?id=140634
1565
1566         Broke multiple SVG tests on Mountain Lion (Requested by ap on
1567         #webkit).
1568
1569         Reverted changeset:
1570
1571         "[SVG -> OTF Converter] Flip the switch on"
1572         https://bugs.webkit.org/show_bug.cgi?id=140592
1573         http://trac.webkit.org/changeset/178653
1574
1575 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
1576
1577         Layers need to be already updated before we call adjustViewSize
1578         https://bugs.webkit.org/show_bug.cgi?id=135514
1579
1580         Reviewed by Simon Fraser.
1581
1582         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
1583
1584         Defer painting operations until we have finished layout. This
1585         has a couple of benefits:
1586         (1) We do not attempt to modify render layers during layout.
1587         (2) In WK1 we do not attempt to paint during layout.
1588
1589         Add a new virtual predicate to ScrollView indicating when we are in
1590         layout so that calls to setContentsSize do not attempt
1591         to adjust scrollbars.
1592
1593         Modify FrameView to set its ScrollView state to block paint
1594         operations during layout. Also add a post-layout handler to
1595         complete the scrollbar updates after layout is finished.
1596
1597         * WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
1598         * page/FrameView.cpp:
1599         (WebCore::FrameView::layout):
1600         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
1601         (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed).
1602         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed)
1603         (WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
1604         * page/FrameView.h:
1605         * platform/ScrollView.cpp:
1606         (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer
1607         painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not.
1608         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added.
1609         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
1610         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
1611         the scroll delta and apply it after the layout is complete.
1612         (WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method
1613         so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
1614         * platform/ScrollView.h:
1615         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
1616
1617 2015-01-16  Ada Chan  <adachan@apple.com>
1618
1619         HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
1620         https://bugs.webkit.org/show_bug.cgi?id=140524
1621
1622         Reviewed by Andreas Kling.
1623
1624         Test: media/muted-video-is-playing-audio.html
1625
1626         * html/HTMLMediaElement.cpp:
1627         (WebCore::HTMLMediaElement::setMuted):
1628         Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
1629         (WebCore::HTMLMediaElement::isPlayingAudio):
1630         HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.
1631
1632 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
1633
1634         [SVG -> OTF Converter] Flip the switch on
1635         https://bugs.webkit.org/show_bug.cgi?id=140592
1636
1637         Reviewed by Antti Koivisto.
1638
1639         * Configurations/FeatureDefines.xcconfig:
1640
1641 2015-01-16  Alexey Proskuryakov  <ap@apple.com>
1642
1643         Console log sometimes prefixed with line number
1644         https://bugs.webkit.org/show_bug.cgi?id=105280
1645
1646         Reviewed by Darin Adler.
1647
1648         Improve the logic for determining whether a console message should be associated
1649         with a source code location.
1650
1651         * dom/ScriptableDocumentParser.h:
1652         * html/parser/HTMLDocumentParser.cpp:
1653         (WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
1654         * html/parser/HTMLDocumentParser.h:
1655         * page/PageConsoleClient.cpp:
1656         (WebCore::getParserLocationForConsoleMessage):
1657         (WebCore::PageConsoleClient::addMessage):
1658         * xml/parser/XMLDocumentParser.cpp:
1659         (WebCore::XMLDocumentParser::pauseParsing):
1660         * xml/parser/XMLDocumentParser.h:
1661         * xml/parser/XMLDocumentParserLibxml2.cpp:
1662         (WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
1663
1664 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
1665
1666         [SVG -> OTF Converter] Glyphs get clipped weirdly
1667         https://bugs.webkit.org/show_bug.cgi?id=137095
1668
1669         Reviewed by Antti Koivisto.
1670
1671         The Adobe CFF spec doesn't actually tell you how to serialize a
1672         "FontBBox." After trial and error, it seems to be (x, y, width,
1673         height).
1674
1675         Test: svg/text/kerning.svg
1676               svg/W3C-SVG-1.1/fonts-kern-01-t.svg
1677
1678         * svg/SVGToOTFFontConversion.cpp:
1679         (WebCore::SVGToOTFFontConverter::appendHEADTable):
1680         (WebCore::SVGToOTFFontConverter::appendCFFTable):
1681         (WebCore::SVGToOTFFontConverter::appendVHEATable):
1682         (WebCore::CFFBuilder::CFFBuilder):
1683         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
1684         (WebCore::SVGToOTFFontConverter::processGlyphElement):
1685
1686 2015-01-19  Csaba Osztrogonác  <ossy@webkit.org>
1687
1688         REGRESSION(r178486): It broke the !ENABLE(VIDEO) build
1689         https://bugs.webkit.org/show_bug.cgi?id=140611
1690
1691         Reviewed by Eric Carlson.
1692
1693         * testing/Internals.cpp:
1694         (WebCore::Internals::elementIsBlockingDisplaySleep):
1695         * testing/Internals.h:
1696
1697 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
1698
1699         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
1700         https://bugs.webkit.org/show_bug.cgi?id=139059
1701
1702         Reviewed by David Hyatt.
1703
1704         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
1705
1706         * rendering/RenderGrid.cpp:
1707         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1708
1709 2015-01-18  Alexey Proskuryakov  <ap@apple.com>
1710
1711         Update bindings generation test results after <https://trac.webkit.org/changeset/178633>.
1712
1713         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1714         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
1715         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1716         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
1717         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
1718         * bindings/scripts/test/JS/JSTestObj.cpp:
1719         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1720         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1721
1722 2015-01-18  Chris Dumez  <cdumez@apple.com>
1723
1724         Generate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
1725         https://bugs.webkit.org/show_bug.cgi?id=140599
1726
1727         Reviewed by Antti Koivisto.
1728
1729         Generate matchingShorthandsForLonghand() implementation from
1730         CSSPropertyNames.in. We already have all the information we need in
1731         CSSPropertyNames.in to generate the big switch() in
1732         matchingShorthandsForLonghand().
1733
1734         A few shorthands still aren't generated. I will look into getting rid
1735         of the custom code in a follow-up patch.
1736
1737         * css/StylePropertyShorthand.cpp:
1738         (WebCore::makeVector): Deleted.
1739         (WebCore::matchingShorthandsForLonghand): Deleted.
1740         * css/StylePropertyShorthand.h:
1741         (WebCore::matchingCustomShorthandsForLonghand):
1742         * css/makeprop.pl:
1743         (constructShorthandsVector):
1744
1745 2015-01-18  Dean Jackson  <dino@apple.com>
1746
1747         Out of bounds write in canvas.toDataURL
1748         https://bugs.webkit.org/show_bug.cgi?id=140594
1749         <rdar://problem/19449135>
1750
1751         Reviewed by Alexey Proskuryakov.
1752
1753         In the case where we have a canvas object that does
1754         not have premultiplied alpha (an option you can select
1755         when using WebGL) we have to multiply out the alpha when
1756         converting to JPEG via toDataURL.
1757
1758         For this we created a buffer, but were not accurately
1759         resizing it before flattening the alpha.
1760
1761         Test: fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html
1762
1763         * platform/graphics/cg/ImageBufferCG.cpp:
1764         (WebCore::ImageDataToDataURL): Call resize once we've
1765         determined we have enough space.
1766
1767 2015-01-17  Sam Weinig  <sam@webkit.org>
1768
1769         Add initial experimental user content filtering API
1770         https://bugs.webkit.org/show_bug.cgi?id=140584
1771
1772         Reviewed by Benjamin Poulain.
1773
1774         Change content extensions to be managed through the UserContentController.
1775
1776         * WebCore.exp.in:
1777         Update exports.
1778
1779         * WebCore.xcodeproj/project.pbxproj:
1780         Update for removed files.
1781
1782         * contentextensions/ContentExtensionsBackend.cpp:
1783         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists):
1784         (WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance): Deleted.
1785         * contentextensions/ContentExtensionsBackend.h:
1786         Remove concept of a shared instance and add a removeAllRuleLists() function.
1787         
1788         * contentextensions/ContentExtensionsInterface.cpp: Removed.
1789         * contentextensions/ContentExtensionsInterface.h: Removed.
1790         Since there is no shared instance anymore, checking if a URL should be blocked
1791         now has to go directly to the backend.
1792         
1793         * contentextensions/ContentExtensionsManager.cpp:
1794         (WebCore::ContentExtensions::ExtensionsManager::createRuleList):
1795         (WebCore::ContentExtensions::ExtensionsManager::loadExtension): Deleted.
1796         * contentextensions/ContentExtensionsManager.h:
1797         Update interface to accommodate the lack of a shared instance. Now, all this
1798         file does is take a serialized rule list and outputs the Vector of ContentExtensionRules
1799
1800         * loader/cache/CachedResourceLoader.cpp:
1801         (WebCore::CachedResourceLoader::requestResource):
1802         Check with the UserContentController to see if the URL should be blocked.
1803
1804         * page/UserContentController.cpp:
1805         (WebCore::UserContentController::addUserContentFilter):
1806         (WebCore::UserContentController::removeAllUserContentFilters):
1807         (WebCore::UserContentController::contentFilterBlocksURL):
1808         * page/UserContentController.h:
1809         Add single point of interaction for both the WebKit level to add and remove
1810         content filters and WebCore to check to see if URLs should be blocked.
1811
1812 2015-01-18  Darin Adler  <darin@apple.com>
1813
1814         REGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
1815         https://bugs.webkit.org/show_bug.cgi?id=132148
1816
1817         Reviewed by Anders Carlsson.
1818
1819         Test: svg/custom/use-instanceRoot-event-listeners.xhtml
1820
1821         * bindings/js/JSDOMWindowCustom.cpp:
1822         (WebCore::JSDOMWindow::addEventListener): Updated for the new return type
1823         of JSListener::create. For the event type, use JSString::toAtomicString instead of
1824         calling JSString::value and then converting to an AtomicString.
1825         (WebCore::JSDOMWindow::removeEventListener): Same changes as for addEventListener.
1826
1827         * bindings/js/JSEventListener.cpp:
1828         (WebCore::forwardsEventListeners): Added. Helper to detect the special case needed
1829         for SVGElementInstance. In the future, for better encapsulation, we could use virtual
1830         functions, but for now hard coding this single class seems fine.
1831         (WebCore::correspondingElementWrapper): Added. For use if forwardsEventListeners
1832         returns true, to find out where event listeners will be forwarded.
1833         (WebCore::createJSEventListenerForAttribute): Added. Replaces the old function
1834         createJSAttributeEventListener, for SVGElementInstance attributes only.
1835         (WebCore::createJSEventListenerForAdd): Added. Helper function to avoid repeated
1836         generated code in the addElementListener bindings other than the DOMWindow one.
1837
1838         * bindings/js/JSEventListener.h:
1839         (WebCore::JSEventListener::create): Changed to return a Ref instead of a PassRefPtr.
1840         (WebCore::createJSEventListenerForAttribute): Renamed from createJSAttributeEventListener,
1841         changed to return a RefPtr instead of a PassRefPtr and to take references rather than
1842         pointers for non-null things.
1843         (WebCore::createJSEventListenerForRemove): Added. Small wrapper that calls
1844         createJSEventListenerForAdd since they are currently identical.
1845
1846         * bindings/scripts/CodeGeneratorJS.pm:
1847         (GenerateAttributeEventListenerCall): Removed the special case for JSSVGElementInstance
1848         and updated to call the new createJSEventListenerForAttribute. The special case for
1849         SVGElementInstance is now in JSEventListener.h/cpp, which is nicer since we prefer to
1850         keep the generated code simpler if possible.
1851         (GenerateEventListenerCall): Removed the special case for JSSVGElementInstance. This
1852         has been dead code since the explicit definition of add/removeEventListener was removed
1853         from SVGElementInstance.idl, and was also a problem if someone were to use the
1854         addEventListener function from EventTarget on an SVGElementInstance object. The function
1855         needs to be generic at runtime. Use toAtomicString as in JSDOMWindow::addEventListener above.
1856         Call the two new functions, createJSEventListenerForAdd and createJSEventListenerForRemove.
1857         Those new functions properly handle SVGElementInstance.
1858         (GenerateImplementation): Don't pass the class name to GenerateAttributeEventListenerCall
1859         or GenerateEventListenerCall any more.
1860         (GenerateConstructorDefinition): Use JSString::toAtomicString instead of calling
1861         JSString::value and then converting to AtomicString.
1862
1863 2015-01-17  Brian J. Burg  <burg@cs.washington.edu>
1864
1865         Web Inspector: highlight data for overlay should use protocol type builders
1866         https://bugs.webkit.org/show_bug.cgi?id=129441
1867
1868         Reviewed by Timothy Hatcher.
1869
1870         As a first step towards cleaning up the inspector overlay, convert highlight
1871         data construction to use protocol type builders. It's now really obvious what
1872         data is being sent to the inspector overlay page.
1873
1874         This change paves the way towards using inspector protocol commands and events
1875         if we want to support more interactive functionality in the inspector overlay.
1876
1877         This patch makes a few style cleanups, such as standardizing variable names,
1878         using default member initializers, passing by reference, and fixing casts.
1879
1880         No new tests, no behavior changed.
1881
1882         * WebCore.exp.in:
1883         * inspector/InspectorController.cpp:
1884         (WebCore::InspectorController::getHighlight):
1885         (WebCore::InspectorController::buildObjectForHighlightedNode):
1886         (WebCore::InspectorController::inspect): Deleted.
1887         * inspector/InspectorController.h:
1888         * inspector/InspectorOverlay.cpp:
1889         (WebCore::buildRendererHighlight):
1890         (WebCore::buildNodeHighlight):
1891         (WebCore::buildQuadHighlight):
1892         (WebCore::InspectorOverlay::InspectorOverlay):
1893         (WebCore::InspectorOverlay::getHighlight):
1894         (WebCore::buildObjectForPoint):
1895         (WebCore::buildObjectForRect):
1896         (WebCore::buildArrayForQuad):
1897         (WebCore::buildObjectForHighlight):
1898         (WebCore::buildObjectForRegion):
1899         (WebCore::buildObjectForFlowRegions):
1900         (WebCore::buildObjectForSize):
1901         (WebCore::buildQuadObjectForCSSRegionContentClip):
1902         Simplify how the clipping area is encoded. It's now 'regionClippingArea'
1903         stored on a FragmentHighlightData instance.
1904
1905         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
1906         (WebCore::InspectorOverlay::drawPaintRects):
1907         (WebCore::buildArrayForRendererFragments):
1908         (WebCore::appendPathCommandAndPoints):
1909         (WebCore::appendPathSegment):
1910         (WebCore::buildObjectForShapeOutside):
1911         (WebCore::buildObjectForElementData):
1912         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
1913         (WebCore::InspectorOverlay::drawNodeHighlight):
1914         (WebCore::InspectorOverlay::drawQuadHighlight):
1915         (WebCore::InspectorOverlay::reset):
1916         (WebCore::buildObjectForRegionHighlight): Deleted.
1917         (WebCore::buildObjectForCSSRegionsHighlight): Deleted.
1918         (WebCore::buildObjectForCSSRegionContentClip): Deleted.
1919         (WebCore::buildObjectForRendererFragments): Deleted.
1920         (WebCore::buildObjectForElementInfo): Deleted.
1921         * inspector/InspectorOverlay.h:
1922         (WebCore::Highlight::Highlight):
1923         * inspector/InspectorOverlayPage.js:
1924         (_createElementTitle):
1925         (_drawElementTitle):
1926         (_drawFragmentHighlight):
1927         (drawNodeHighlight):
1928         * testing/Internals.cpp:
1929         (WebCore::Internals::inspectorHighlightRects):
1930         (WebCore::Internals::inspectorHighlightObject):
1931
1932 2015-01-17  Myles C. Maxfield  <mmaxfield@apple.com>
1933
1934         [SVG -> OTF Converter] Crashes when SVG font is invalid
1935         https://bugs.webkit.org/show_bug.cgi?id=140378
1936
1937         Reviewed by Antti Koivisto.
1938
1939         Because CachedSVGFonts are cached, they have to be able to be used
1940         in subsequent documents regardless how the first document left it.
1941
1942         Tests: fast/css/font-face-svg-decoding-error.html
1943                svg/custom/svg-fonts-in-html.html
1944                svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
1945
1946         * loader/cache/CachedFont.cpp:
1947         (WebCore::CachedFont::ensureCustomFontData):
1948         * loader/cache/CachedFont.h:
1949         * loader/cache/CachedSVGFont.cpp:
1950         (WebCore::CachedSVGFont::getFontData):
1951         (WebCore::CachedSVGFont::ensureCustomFontData):
1952         (WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
1953         * loader/cache/CachedSVGFont.h:
1954
1955 2015-01-17  Chris Dumez  <cdumez@apple.com>
1956
1957         Converting time, angle and frequency units in CSS calc() function
1958         https://bugs.webkit.org/show_bug.cgi?id=138356
1959
1960         Reviewed by Darin Adler.
1961
1962         Update CSSPrimitiveValue::primitiveType() to actually query the
1963         primitiveType of the CSSCalcValue instead of assuming a given
1964         type based on its category (e.g. If category is CalcTime, then
1965         assume type is CSS_MS, even though it would be CSS_S as well).
1966
1967         This would like to calculation errors such as:
1968         calc(4s + 1s) -> 5ms
1969
1970         Because we would assume the unit is CSS_MS without actually
1971         checking.
1972
1973         This patch is inspired by the following Blink revision
1974         by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
1975         patch from <tmeszaros.u-szeged@partner.samsung.com>:
1976         https://src.chromium.org/viewvc/blink?view=rev&revision=179101
1977
1978         Test: fast/css/calc-with-angle-time-frequency.html
1979
1980         * css/CSSCalculationValue.h:
1981         (WebCore::CSSCalcValue::primitiveType):
1982         * css/CSSPrimitiveValue.cpp:
1983         (WebCore::CSSPrimitiveValue::primitiveType):
1984
1985 2015-01-17  Chris Dumez  <cdumez@apple.com>
1986
1987         Generate shorthandForProperty() implementation from CSSPropertyNames.in
1988         https://bugs.webkit.org/show_bug.cgi?id=140556
1989
1990         Reviewed by Darin Adler.
1991
1992         Generate shorthandForProperty() implementation from CSSPropertyNames.in.
1993         This is just a big switch() statement calling the right
1994         StylePropertyShorthand factory function for a given CSSPropertyID.
1995
1996         * css/StylePropertyShorthand.cpp:
1997         (WebCore::shorthandForProperty): Deleted.
1998         * css/StylePropertyShorthand.h:
1999         * css/makeprop.pl:
2000
2001 2015-01-16  Brent Fulgham  <bfulgham@apple.com>
2002
2003         [Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
2004         https://bugs.webkit.org/show_bug.cgi?id=140564
2005         <rdar://problem/19386426.
2006
2007         Reviewed by Dean Jackson.
2008
2009         * page/mac/EventHandlerMac.mm:
2010         (WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
2011         back into the loop!
2012
2013 2015-01-16  Zalan Bujtas  <zalan@apple.com>
2014
2015         When border-radius is present, inset/outset/groove/ridge border color changes.
2016         https://bugs.webkit.org/show_bug.cgi?id=140551
2017
2018         Reviewed by Simon Fraser.
2019
2020         This patch applies the same color lighten/darken adjustment on the radius borders
2021         that we use for non-radius border.
2022
2023         Test: fast/borders/wrong-border-color-when-radius-is-present.html
2024
2025         * rendering/RenderBoxModelObject.cpp:
2026         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2027         * rendering/RenderObject.cpp:
2028         (WebCore::RenderObject::calculateBorderStyleColor):
2029         * rendering/RenderObject.h:
2030
2031 2015-01-16  Pratik Solanki  <psolanki@apple.com>
2032
2033         Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
2034         -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
2035         https://bugs.webkit.org/show_bug.cgi?id=140470
2036
2037         Reviewed by Alexey Proskuryakov.
2038
2039         Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
2040         because NSURLConnection callbacks were always being scheduled on the main thread.
2041
2042         Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
2043         thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
2044         always being scheduled on the main thread regardless of whether we were using the NetworkProcess
2045         (since the WebThread is only started when using WebKit1). This led to an assertion failure.
2046         Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
2047         NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
2048         using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.
2049
2050         * platform/network/mac/ResourceHandleMac.mm:
2051         (WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
2052         of this code for iOS WebKit2 with the NetworkProcess.
2053         (WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
2054         schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
2055         is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
2056         which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
2057         the NetworkProcess, respectively.
2058
2059 2015-01-16  Brian J. Burg  <burg@cs.washington.edu>
2060
2061         Web Replay: purge remaining PassRefPtr uses and minor cleanup
2062         https://bugs.webkit.org/show_bug.cgi?id=140456
2063
2064         Reviewed by Andreas Kling.
2065
2066         Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
2067         uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
2068
2069         Remove mistaken uses of AtomicString that were not removed as part of r174113.
2070
2071         No new tests, no behavior changed.
2072
2073         * inspector/InspectorReplayAgent.cpp:
2074         (WebCore::SerializeInputToJSONFunctor::operator()):
2075         (WebCore::SerializeInputToJSONFunctor::returnValue):
2076         (WebCore::InspectorReplayAgent::sessionCreated):
2077         (WebCore::InspectorReplayAgent::sessionModified):
2078         (WebCore::InspectorReplayAgent::sessionLoaded):
2079         (WebCore::InspectorReplayAgent::segmentCreated):
2080         (WebCore::InspectorReplayAgent::segmentCompleted):
2081         (WebCore::InspectorReplayAgent::segmentLoaded):
2082         (WebCore::InspectorReplayAgent::switchSession):
2083         (WebCore::InspectorReplayAgent::insertSessionSegment):
2084         (WebCore::InspectorReplayAgent::removeSessionSegment):
2085         (WebCore::InspectorReplayAgent::findSession):
2086         (WebCore::InspectorReplayAgent::findSegment):
2087         * inspector/InspectorReplayAgent.h:
2088         * replay/CapturingInputCursor.cpp:
2089         (WebCore::CapturingInputCursor::CapturingInputCursor):
2090         (WebCore::CapturingInputCursor::create):
2091         (WebCore::CapturingInputCursor::loadInput):
2092         * replay/CapturingInputCursor.h:
2093         * replay/EventLoopInputDispatcher.cpp:
2094         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
2095         * replay/EventLoopInputDispatcher.h:
2096         * replay/FunctorInputCursor.h:
2097         (WebCore::FunctorInputCursor::FunctorInputCursor):
2098         (WebCore::FunctorInputCursor::loadInput):
2099         * replay/ReplayController.cpp:
2100         (WebCore::ReplayController::ReplayController):
2101         (WebCore::ReplayController::setForceDeterministicSettings):
2102         (WebCore::ReplayController::setSessionState):
2103         (WebCore::ReplayController::setSegmentState):
2104         (WebCore::ReplayController::switchSession):
2105         (WebCore::ReplayController::createSegment):
2106         (WebCore::ReplayController::completeSegment):
2107         (WebCore::ReplayController::loadSegmentAtIndex):
2108         (WebCore::ReplayController::unloadSegment):
2109         (WebCore::ReplayController::frameNavigated):
2110         (WebCore::ReplayController::loadedSession):
2111         (WebCore::ReplayController::loadedSegment):
2112         (WebCore::ReplayController::activeInputCursor):
2113         (WebCore::ReplayController::dispatcher):
2114         * replay/ReplayController.h:
2115         * replay/ReplaySession.cpp:
2116         (WebCore::ReplaySession::create):
2117         (WebCore::ReplaySession::at):
2118         (WebCore::ReplaySession::appendSegment):
2119         (WebCore::ReplaySession::insertSegment):
2120         (WebCore::ReplaySession::removeSegment):
2121         * replay/ReplaySession.h:
2122         * replay/ReplaySessionSegment.cpp:
2123         (WebCore::ReplaySessionSegment::create):
2124         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
2125         * replay/ReplaySessionSegment.h:
2126         * replay/ReplayingInputCursor.cpp:
2127         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
2128         (WebCore::ReplayingInputCursor::create):
2129         (WebCore::ReplayingInputCursor::loadInput):
2130         * replay/ReplayingInputCursor.h:
2131         * replay/SegmentedInputStorage.cpp:
2132         (WebCore::SegmentedInputStorage::store):
2133         (WebCore::SegmentedInputStorage::queue):
2134         (WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
2135         * replay/SegmentedInputStorage.h:
2136
2137 2015-01-16  Andreas Kling  <akling@apple.com>
2138
2139         Remove assertion that Page::m_editorClient is non-null.
2140
2141         Unreviewed debug build fix. (It's a reference, it won't be null.)
2142
2143         * page/Page.cpp:
2144         (WebCore::Page::Page):
2145
2146 2015-01-16  Andreas Kling  <akling@apple.com>
2147
2148         Page::editorClient() should return a reference.
2149         <https://webkit.org/b/140552>
2150
2151         Reviewed by Chris Dumez.
2152
2153         Page always has an EditorClient, so make editorClient() return a reference.
2154
2155         * editing/AlternativeTextController.cpp:
2156         (WebCore::AlternativeTextController::editorClient):
2157         (WebCore::AlternativeTextController::textChecker):
2158         * editing/Editor.cpp:
2159         (WebCore::Editor::client):
2160         * editing/SpellChecker.cpp:
2161         (WebCore::SpellChecker::client):
2162         * page/FocusController.cpp:
2163         (WebCore::FocusController::setFocusedElement):
2164         * page/Page.cpp:
2165         (WebCore::Page::Page):
2166         (WebCore::Page::~Page):
2167         (WebCore::Page::clearUndoRedoOperations):
2168         * page/Page.h:
2169         (WebCore::Page::editorClient):
2170         * page/scrolling/AsyncScrollingCoordinator.cpp:
2171         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2172
2173 2015-01-16  Benjamin Poulain  <benjamin@webkit.org>
2174
2175         Make URL filters case-insensitive by default
2176         https://bugs.webkit.org/show_bug.cgi?id=140531
2177
2178         Reviewed by Andreas Kling.
2179
2180         Safari's filters were case-insensitive. Adopt that convention in the engine,
2181         and add a flag in case someone ever need a case-sensitive filter.
2182
2183         * contentextensions/ContentExtensionRule.h:
2184         * contentextensions/ContentExtensionsBackend.cpp:
2185         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2186         * contentextensions/ContentExtensionsManager.cpp:
2187         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
2188         * contentextensions/URLFilterParser.cpp:
2189         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
2190         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2191         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2192         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
2193         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2194         * contentextensions/URLFilterParser.h:
2195
2196 2015-01-16  Benjamin Poulain  <bpoulain@apple.com>
2197
2198         Add the alternative syntax for CSS Selector's descendant combinator (">>")
2199         https://bugs.webkit.org/show_bug.cgi?id=140525
2200
2201         Reviewed by Antti Koivisto.
2202
2203         The latest Selector spec introduces the combinator ">>" as an alias for the descendant
2204         relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators
2205
2206         This patch implements that combinator as an alias of the existing one. For CSSOM's selector
2207         serialization, I use one bit of CSSSelector to store if that alternative syntax was used.
2208
2209         Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
2210                fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
2211                fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
2212                fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
2213                fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html
2214
2215         * css/CSSGrammar.y.in:
2216         * css/CSSParserValues.cpp:
2217         (WebCore::CSSParserSelector::appendTagHistory):
2218         * css/CSSParserValues.h:
2219         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
2220         * css/CSSSelector.cpp:
2221         (WebCore::CSSSelector::selectorText):
2222         * css/CSSSelector.h:
2223         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
2224         (WebCore::CSSSelector::CSSSelector):
2225
2226 2015-01-16  Chris Dumez  <cdumez@apple.com>
2227
2228         Generate StylePropertyShorthand.* from CSSPropertyNames.in
2229         https://bugs.webkit.org/show_bug.cgi?id=140501
2230
2231         Reviewed by Darin Adler.
2232
2233         Add initial support for having makeprop.pl generate most of
2234         StylePropertyShorthand.* from CSSPropertyNames.in.
2235
2236         This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
2237         more descriptive [Longhands=property1|property2|...] parameter. With
2238         this information, makeprop.pl is now able to generate the
2239         StylePropertyShorthand factories for all CSS shorthand properties
2240         in a new StylePropertyShorthandFunctions.h header.
2241
2242         The switches in StylePropertyShorthand.cpp could also be generated
2243         but this will be taken care of in follow-up patches to reduce patch
2244         size.
2245
2246         * CMakeLists.txt:
2247         * DerivedSources.make:
2248         * WebCore.vcxproj/WebCore.vcxproj:
2249         * WebCore.vcxproj/WebCore.vcxproj.filters:
2250         * WebCore.xcodeproj/project.pbxproj:
2251         * css/CSSComputedStyleDeclaration.cpp:
2252         (WebCore::ComputedStyleExtractor::propertyValue):
2253         * css/CSSParser.cpp:
2254         (WebCore::CSSParser::parseValue):
2255         * css/CSSPropertyNames.in:
2256         * css/StyleProperties.cpp:
2257         (WebCore::StyleProperties::getPropertyValue):
2258         * css/StylePropertyShorthand.cpp:
2259         (WebCore::shorthandForProperty):
2260         (WebCore::matchingShorthandsForLonghand):
2261         (WebCore::backgroundShorthand): Deleted.
2262         (WebCore::backgroundPositionShorthand): Deleted.
2263         (WebCore::backgroundRepeatShorthand): Deleted.
2264         (WebCore::borderShorthand): Deleted.
2265         (WebCore::borderBottomShorthand): Deleted.
2266         (WebCore::borderColorShorthand): Deleted.
2267         (WebCore::borderImageShorthand): Deleted.
2268         (WebCore::borderLeftShorthand): Deleted.
2269         (WebCore::borderRadiusShorthand): Deleted.
2270         (WebCore::webkitBorderRadiusShorthand): Deleted.
2271         (WebCore::borderRightShorthand): Deleted.
2272         (WebCore::borderSpacingShorthand): Deleted.
2273         (WebCore::borderStyleShorthand): Deleted.
2274         (WebCore::borderTopShorthand): Deleted.
2275         (WebCore::borderWidthShorthand): Deleted.
2276         (WebCore::listStyleShorthand): Deleted.
2277         (WebCore::marginShorthand): Deleted.
2278         (WebCore::markerShorthand): Deleted.
2279         (WebCore::outlineShorthand): Deleted.
2280         (WebCore::overflowShorthand): Deleted.
2281         (WebCore::paddingShorthand): Deleted.
2282         (WebCore::transitionShorthand): Deleted.
2283         (WebCore::animationShorthand): Deleted.
2284         (WebCore::webkitAnimationShorthand): Deleted.
2285         (WebCore::webkitBorderAfterShorthand): Deleted.
2286         (WebCore::webkitBorderBeforeShorthand): Deleted.
2287         (WebCore::webkitBorderEndShorthand): Deleted.
2288         (WebCore::webkitBorderStartShorthand): Deleted.
2289         (WebCore::webkitColumnsShorthand): Deleted.
2290         (WebCore::webkitColumnRuleShorthand): Deleted.
2291         (WebCore::flexFlowShorthand): Deleted.
2292         (WebCore::flexShorthand): Deleted.
2293         (WebCore::webkitMarginCollapseShorthand): Deleted.
2294         (WebCore::webkitGridShorthand): Deleted.
2295         (WebCore::webkitGridTemplateShorthand): Deleted.
2296         (WebCore::webkitGridAreaShorthand): Deleted.
2297         (WebCore::webkitGridColumnShorthand): Deleted.
2298         (WebCore::webkitGridRowShorthand): Deleted.
2299         (WebCore::webkitMarqueeShorthand): Deleted.
2300         (WebCore::webkitMaskShorthand): Deleted.
2301         (WebCore::webkitMaskPositionShorthand): Deleted.
2302         (WebCore::webkitMaskRepeatShorthand): Deleted.
2303         (WebCore::webkitTextDecorationShorthand): Deleted.
2304         (WebCore::webkitTextEmphasisShorthand): Deleted.
2305         (WebCore::webkitTextStrokeShorthand): Deleted.
2306         (WebCore::webkitTransitionShorthand): Deleted.
2307         (WebCore::webkitPerspectiveOriginShorthand): Deleted.
2308         (WebCore::webkitTransformOriginShorthand): Deleted.
2309         * css/StylePropertyShorthand.h:
2310         * css/makeprop.pl:
2311
2312 2015-01-16  Commit Queue  <commit-queue@webkit.org>
2313
2314         Unreviewed, rolling out r178532.
2315         https://bugs.webkit.org/show_bug.cgi?id=140548
2316
2317         Broke fast/css/parsing-css-lang.html on some bots (Requested
2318         by ap on #webkit).
2319
2320         Reverted changeset:
2321
2322         "Canonicalization of :lang() should preserve the :lang()'s
2323         arguments representations"
2324         https://bugs.webkit.org/show_bug.cgi?id=139928
2325         http://trac.webkit.org/changeset/178532
2326
2327 2015-01-16  Commit Queue  <commit-queue@webkit.org>
2328
2329         Unreviewed, rolling out r178577.
2330         https://bugs.webkit.org/show_bug.cgi?id=140546
2331
2332         Broke fast/css-grid-layout/grid-content-sized-columns-
2333         resolution.html (Requested by ap on #webkit).
2334
2335         Reverted changeset:
2336
2337         "[CSS Grid Layout] Tracks shrink sometimes with indefinite
2338         remaining space"
2339         https://bugs.webkit.org/show_bug.cgi?id=139059
2340         http://trac.webkit.org/changeset/178577
2341
2342 2015-01-16  Andreas Kling  <akling@apple.com>
2343
2344         Some improvements to RuleSet shrinking.
2345         <https://webkit.org/b/140534>
2346
2347         Reviewed by Antti Koivisto.
2348
2349         Give an inline capacity (1) to the RuleData Vectors in RuleSet.
2350         The vast majority of Vectors have only a single entry, and this
2351         avoids having to allocate a separate Vector backing store for them.
2352
2353         Also make sure to shrink some Vectors that we weren't already,
2354         like those in RuleFeatureSet.
2355
2356         * css/ElementRuleCollector.cpp:
2357         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2358         * css/ElementRuleCollector.h:
2359         * css/RuleFeature.cpp:
2360         (WebCore::RuleFeatureSet::shrinkToFit):
2361         * css/RuleFeature.h:
2362         * css/RuleSet.cpp:
2363         (WebCore::RuleSet::addToRuleSet):
2364         (WebCore::rulesCountForName):
2365         (WebCore::shrinkMapVectorsToFit):
2366         (WebCore::RuleSet::shrinkToFit):
2367         * css/RuleSet.h:
2368         (WebCore::RuleSet::idRules):
2369         (WebCore::RuleSet::classRules):
2370         (WebCore::RuleSet::tagRules):
2371         (WebCore::RuleSet::shadowPseudoElementRules):
2372         (WebCore::RuleSet::linkPseudoClassRules):
2373         (WebCore::RuleSet::cuePseudoRules):
2374         (WebCore::RuleSet::focusPseudoClassRules):
2375         (WebCore::RuleSet::universalRules):
2376
2377 2015-01-16  Antti Koivisto  <antti@apple.com>
2378
2379         Correct naming for FontCascade implementation files
2380         https://bugs.webkit.org/show_bug.cgi?id=140544
2381
2382         Reviewed by Zalan Bujtas.
2383
2384         Also reduce their number.
2385
2386         Merge FontFastPath.cpp into FontCascade.cpp
2387         Merge FontMac.mm and FontComplexTextMac.cpp into FontCascadeCocoa.mm
2388
2389         * CMakeLists.txt:
2390         * WebCore.vcxproj/WebCore.vcxproj:
2391         * WebCore.xcodeproj/project.pbxproj:
2392         * platform/graphics/FontCascade.cpp:
2393         (WebCore::FontCascade::getEmphasisMarkGlyphData):
2394         (WebCore::FontCascade::emphasisMarkAscent):
2395         (WebCore::FontCascade::emphasisMarkDescent):
2396         (WebCore::FontCascade::emphasisMarkHeight):
2397         (WebCore::FontCascade::getGlyphsAndAdvancesForSimpleText):
2398         (WebCore::FontCascade::drawSimpleText):
2399         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
2400         (WebCore::FontCascade::drawGlyphBuffer):
2401         (WebCore::offsetToMiddleOfGlyph):
2402         (WebCore::offsetToMiddleOfGlyphAtIndex):
2403         (WebCore::FontCascade::drawEmphasisMarks):
2404         (WebCore::FontCascade::floatWidthForSimpleText):
2405         (WebCore::FontCascade::adjustSelectionRectForSimpleText):
2406         (WebCore::FontCascade::offsetForPositionForSimpleText):
2407         * platform/graphics/FontFastPath.cpp: Removed.
2408         * platform/graphics/cocoa/FontCascadeCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
2409         (WebCore::FontCascade::drawGlyphs):
2410         (WebCore::FontCascade::adjustSelectionRectForComplexText):
2411         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
2412         (WebCore::FontCascade::drawComplexText):
2413         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
2414         (WebCore::FontCascade::floatWidthForComplexText):
2415         (WebCore::FontCascade::offsetForPositionForComplexText):
2416         (WebCore::FontCascade::fontDataForCombiningCharacterSequence):
2417         * platform/graphics/mac/FontComplexTextMac.cpp: Removed.
2418         * platform/graphics/mac/FontMac.mm: Removed.
2419
2420 2014-11-26  Sergio Villar Senin  <svillar@igalia.com>
2421
2422         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
2423         https://bugs.webkit.org/show_bug.cgi?id=139059
2424
2425         Reviewed by David Hyatt.
2426
2427         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
2428
2429         * rendering/RenderGrid.cpp:
2430         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2431
2432 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
2433
2434         Remove ENABLE(SQL_DATABASE) guards
2435         https://bugs.webkit.org/show_bug.cgi?id=140434
2436
2437         Reviewed by Darin Adler.
2438
2439         * Configurations/FeatureDefines.xcconfig:
2440         * Modules/webdatabase/AbstractDatabaseServer.h:
2441         * Modules/webdatabase/ChangeVersionData.h:
2442         * Modules/webdatabase/ChangeVersionWrapper.cpp:
2443         * Modules/webdatabase/ChangeVersionWrapper.h:
2444         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2445         * Modules/webdatabase/DOMWindowWebDatabase.h:
2446         * Modules/webdatabase/DOMWindowWebDatabase.idl:
2447         * Modules/webdatabase/Database.cpp:
2448         * Modules/webdatabase/Database.h:
2449         * Modules/webdatabase/Database.idl:
2450         * Modules/webdatabase/DatabaseBackend.cpp:
2451         * Modules/webdatabase/DatabaseBackend.h:
2452         * Modules/webdatabase/DatabaseBackendBase.cpp:
2453         * Modules/webdatabase/DatabaseBackendBase.h:
2454         * Modules/webdatabase/DatabaseBasicTypes.h:
2455         * Modules/webdatabase/DatabaseCallback.h:
2456         * Modules/webdatabase/DatabaseCallback.idl:
2457         * Modules/webdatabase/DatabaseContext.cpp:
2458         * Modules/webdatabase/DatabaseContext.h:
2459         * Modules/webdatabase/DatabaseDetails.h:
2460         * Modules/webdatabase/DatabaseError.h:
2461         * Modules/webdatabase/DatabaseManager.cpp:
2462         * Modules/webdatabase/DatabaseManager.h:
2463         * Modules/webdatabase/DatabaseManagerClient.h:
2464         * Modules/webdatabase/DatabaseServer.cpp:
2465         * Modules/webdatabase/DatabaseServer.h:
2466         * Modules/webdatabase/DatabaseTask.cpp:
2467         * Modules/webdatabase/DatabaseTask.h:
2468         * Modules/webdatabase/DatabaseThread.cpp:
2469         * Modules/webdatabase/DatabaseThread.h:
2470         * Modules/webdatabase/DatabaseTracker.cpp:
2471         * Modules/webdatabase/DatabaseTracker.h:
2472         * Modules/webdatabase/OriginLock.cpp:
2473         * Modules/webdatabase/OriginLock.h:
2474         * Modules/webdatabase/SQLCallbackWrapper.h:
2475         * Modules/webdatabase/SQLError.h:
2476         * Modules/webdatabase/SQLError.idl:
2477         * Modules/webdatabase/SQLException.cpp:
2478         * Modules/webdatabase/SQLException.h:
2479         * Modules/webdatabase/SQLException.idl:
2480         * Modules/webdatabase/SQLResultSet.cpp:
2481         * Modules/webdatabase/SQLResultSet.h:
2482         * Modules/webdatabase/SQLResultSet.idl:
2483         * Modules/webdatabase/SQLResultSetRowList.cpp:
2484         * Modules/webdatabase/SQLResultSetRowList.h:
2485         * Modules/webdatabase/SQLResultSetRowList.idl:
2486         * Modules/webdatabase/SQLStatement.cpp:
2487         * Modules/webdatabase/SQLStatement.h:
2488         * Modules/webdatabase/SQLStatementBackend.cpp:
2489         * Modules/webdatabase/SQLStatementBackend.h:
2490         * Modules/webdatabase/SQLStatementCallback.h:
2491         * Modules/webdatabase/SQLStatementCallback.idl:
2492         * Modules/webdatabase/SQLStatementErrorCallback.h:
2493         * Modules/webdatabase/SQLStatementErrorCallback.idl:
2494         * Modules/webdatabase/SQLTransaction.cpp:
2495         * Modules/webdatabase/SQLTransaction.h:
2496         * Modules/webdatabase/SQLTransaction.idl:
2497         * Modules/webdatabase/SQLTransactionBackend.cpp:
2498         * Modules/webdatabase/SQLTransactionBackend.h:
2499         * Modules/webdatabase/SQLTransactionCallback.h:
2500         * Modules/webdatabase/SQLTransactionCallback.idl:
2501         * Modules/webdatabase/SQLTransactionClient.cpp:
2502         * Modules/webdatabase/SQLTransactionClient.h:
2503         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
2504         * Modules/webdatabase/SQLTransactionCoordinator.h:
2505         * Modules/webdatabase/SQLTransactionErrorCallback.h:
2506         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
2507         * Modules/webdatabase/SQLTransactionState.h:
2508         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
2509         * Modules/webdatabase/SQLTransactionStateMachine.h:
2510         * bindings/js/JSCommandLineAPIHostCustom.cpp:
2511         (WebCore::JSCommandLineAPIHost::databaseId):
2512         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2513         * bindings/js/JSExceptionBase.cpp:
2514         (WebCore::toExceptionBase):
2515         * bindings/js/JSSQLResultSetRowListCustom.cpp:
2516         * bindings/js/JSSQLTransactionCustom.cpp:
2517         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2518         (webkit_dom_test_callback_finalize):
2519         (webkit_dom_test_callback_constructor):
2520         (webkit_dom_test_callback_callback_with_no_param):
2521         (webkit_dom_test_callback_callback_with_array_param):
2522         (webkit_dom_test_callback_callback_with_serialized_script_value_param):
2523         (webkit_dom_test_callback_callback_with_non_bool_return_type):
2524         (webkit_dom_test_callback_callback_with_string_list):
2525         (webkit_dom_test_callback_callback_with_boolean):
2526         (webkit_dom_test_callback_callback_requires_this_to_pass):
2527         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
2528         * bindings/scripts/test/JS/JSTestCallback.cpp:
2529         * bindings/scripts/test/JS/JSTestCallback.h:
2530         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2531         * bindings/scripts/test/TestCallback.idl:
2532         * dom/DOMExceptions.in:
2533         * dom/ScriptExecutionContext.cpp:
2534         (WebCore::ScriptExecutionContext::setDatabaseContext):
2535         * dom/ScriptExecutionContext.h:
2536         * history/PageCache.cpp:
2537         (WebCore::logCanCacheFrameDecision):
2538         (WebCore::PageCache::canCachePageContainingThisFrame):
2539         * inspector/CommandLineAPIHost.cpp:
2540         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2541         (WebCore::CommandLineAPIHost::disconnect):
2542         (WebCore::CommandLineAPIHost::databaseIdImpl):
2543         * inspector/CommandLineAPIHost.h:
2544         (WebCore::CommandLineAPIHost::init):
2545         * inspector/InspectorController.cpp:
2546         (WebCore::InspectorController::InspectorController):
2547         * inspector/InspectorDatabaseAgent.cpp:
2548         * inspector/InspectorDatabaseAgent.h:
2549         * inspector/InspectorDatabaseInstrumentation.h:
2550         (WebCore::InspectorInstrumentation::didOpenDatabase):
2551         * inspector/InspectorDatabaseResource.cpp:
2552         * inspector/InspectorDatabaseResource.h:
2553         * inspector/InspectorInstrumentation.cpp:
2554         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2555         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
2556         * inspector/InspectorInstrumentation.h:
2557         * inspector/InstrumentingAgents.cpp:
2558         (WebCore::InstrumentingAgents::InstrumentingAgents):
2559         (WebCore::InstrumentingAgents::reset):
2560         * inspector/InstrumentingAgents.h:
2561         * inspector/WorkerInspectorController.cpp:
2562         (WebCore::WorkerInspectorController::WorkerInspectorController):
2563         * loader/EmptyClients.h:
2564         * loader/FrameLoader.cpp:
2565         (WebCore::FrameLoader::stopLoading):
2566         * page/ChromeClient.h:
2567         * platform/FeatureCounterKeys.h:
2568
2569 2015-01-15  Zalan Bujtas  <zalan@apple.com>
2570
2571         Element appears correctly but does not receive event with a large translation.
2572         https://bugs.webkit.org/show_bug.cgi?id=139815
2573
2574         Reviewed by Simon Fraser.
2575
2576         When the hit point gets translated beyond the min/max value of LayoutRect (infiniteRect()),
2577         we fail to find the corresponding layer.
2578         When there's no clipping on a layer, we use min/max values to represent infiniteness.
2579         However it does not work well across types. With IntPoint(hittest) we can address a point that's outside
2580         of LayoutRect's boundary(clipping).
2581         This patch addresses the immediate issue of not being able to hittest transformed layers properly. 
2582         Fixing the representation of infiniteness is tracked here: webkit.org/b/140533
2583
2584         Test: transforms/hittest-translated-content-off-to-infinity-and-back.html
2585
2586         * rendering/ClipRect.cpp:
2587         (WebCore::ClipRect::intersects):
2588
2589 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
2590
2591         tables/mozilla/bugs/bug10633.html is flakey on Yosemite
2592         https://bugs.webkit.org/show_bug.cgi?id=140487
2593
2594         Reviewed by Simon Fraser.
2595
2596         The workaround in https://bugs.webkit.org/show_bug.cgi?id=140253 works
2597         on both OSes.
2598
2599         * platform/graphics/mac/SimpleFontDataMac.mm:
2600         (WebCore::SimpleFontData::platformInit):
2601
2602 2015-01-15  Ryosuke Niwa  <rniwa@webkit.org>
2603
2604         Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
2605         https://bugs.webkit.org/show_bug.cgi?id=140523
2606         <rdar://problem/19464329>
2607
2608         Reviewed by Chris Dumez.
2609
2610         The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
2611         unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.
2612
2613         Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
2614         we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".
2615
2616         See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.
2617
2618         * html/HTMLElement.cpp:
2619         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
2620
2621 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
2622
2623         RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
2624         https://bugs.webkit.org/show_bug.cgi?id=140477.
2625
2626         Reviewed by Simon Fraser.
2627
2628         * rendering/RenderLayerCompositor.cpp:
2629         (WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
2630         code clearer.
2631
2632 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
2633
2634         Unreviewed, rolling out r178531.
2635
2636         Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.
2637
2638         Reverted changeset:
2639
2640         "Layers need to be already updated before we call adjustViewSize."
2641         https://bugs.webkit.org/show_bug.cgi?id=135514
2642         http://trac.webkit.org/changeset/178531
2643
2644         * page/FrameView.cpp:
2645         (WebCore::FrameView::layout):
2646         (WebCore::FrameView::updateCompositingLayersAfterScrolling):
2647         (WebCore::FrameView::paintContents):
2648         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
2649         * page/FrameView.h:
2650         * platform/ScrollView.cpp:
2651         (WebCore::ScrollView::scrollTo):
2652         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
2653         * platform/ScrollView.h:
2654         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
2655
2656 2015-01-15  Chris Dumez  <cdumez@apple.com>
2657
2658         [WK2] Wire diagnostic logging messages through the UIProcess
2659         https://bugs.webkit.org/show_bug.cgi?id=140486
2660
2661         Reviewed by Sam Weinig.
2662
2663         Wire diagnostic logging messages through the UIProcess.
2664         Eventually, the corresponding bundle API should go away.
2665
2666         * WebCore.vcxproj/WebCore.vcxproj:
2667         * WebCore.vcxproj/WebCore.vcxproj.filters:
2668         Add page/DiagnosticLoggingResultType.h to Windows project.
2669
2670         * WebCore.xcodeproj/project.pbxproj:
2671         Add page/DiagnosticLoggingResultType.h to XCode project.
2672
2673         * html/HTMLMediaElement.cpp:
2674         * loader/EmptyClients.h:
2675         * loader/FrameLoader.cpp:
2676         * page/DiagnosticLoggingClient.h:
2677         * page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
2678         Use new DiagnosticLoggingResultType enum instead of old
2679         DiagnosticLoggingClient::LogType one.
2680
2681 2015-01-15  Zalan Bujtas  <zalan@apple.com>
2682
2683         Reduce LayoutRect::infiniteRect() usage.
2684         https://bugs.webkit.org/show_bug.cgi?id=140511
2685
2686         Reviewed by Simon Fraser.
2687
2688         This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().
2689
2690         No change in functionality.
2691
2692         * platform/graphics/LayoutRect.h:
2693         (WebCore::LayoutRect::isInfinite):
2694         * rendering/ClipRect.h:
2695         (WebCore::ClipRect::reset):
2696         (WebCore::ClipRect::isEmpty):
2697         (WebCore::ClipRect::isInfinite):
2698         (WebCore::ClipRect::setRect): Deleted.
2699         * rendering/PaintInfo.h:
2700         (WebCore::PaintInfo::applyTransform):
2701         * rendering/RenderLayer.cpp:
2702         (WebCore::RenderLayer::calculateClipRects):
2703         * rendering/RenderLayer.h:
2704         (WebCore::ClipRects::reset):
2705         * rendering/RenderLayerBacking.cpp:
2706         (WebCore::RenderLayerBacking::updateGeometry):
2707         * rendering/RenderLayerCompositor.cpp:
2708         (WebCore::RenderLayerCompositor::clippedByAncestor):
2709
2710 2015-01-15  Chris Dumez  <cdumez@apple.com>
2711
2712         Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
2713         https://bugs.webkit.org/show_bug.cgi?id=140521
2714
2715         Reviewed by Alexey Proskuryakov.
2716
2717         Close the CSSPropertyNames.gperf file before calling gperf on it
2718         to make sure the content we wrote was flushed. This was causing
2719         intermittent build failures.
2720
2721         * css/makeprop.pl:
2722
2723 2015-01-15  Zalan Bujtas  <zalan@apple.com>
2724
2725         LayerFragment should be able to intersect with ClipRect.
2726         https://bugs.webkit.org/show_bug.cgi?id=140498
2727
2728         Reviewed by Simon Fraser.
2729
2730         No change in functionality.
2731
2732         * rendering/LayerFragment.h:
2733         (WebCore::LayerFragment::intersect):
2734         * rendering/RenderLayer.cpp:
2735         (WebCore::RenderLayer::collectFragments):
2736
2737 2015-01-15  Zalan Bujtas  <zalan@apple.com>
2738
2739         Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
2740         https://bugs.webkit.org/show_bug.cgi?id=140461
2741
2742         Reviewed by Simon Fraser.
2743
2744         Move classes only used by RenderLayer to RenderLayer.cpp.
2745
2746         No change in functionality.
2747
2748         * rendering/RenderLayer.cpp:
2749         (WebCore::ClipRects::create):
2750         (WebCore::ClipRects::reset):
2751         (WebCore::ClipRects::overflowClipRect):
2752         (WebCore::ClipRects::setOverflowClipRect):
2753         (WebCore::ClipRects::fixedClipRect):
2754         (WebCore::ClipRects::setFixedClipRect):
2755         (WebCore::ClipRects::posClipRect):
2756         (WebCore::ClipRects::setPosClipRect):
2757         (WebCore::ClipRects::fixed):
2758         (WebCore::ClipRects::setFixed):
2759         (WebCore::ClipRects::ref):
2760         (WebCore::ClipRects::deref):
2761         (WebCore::ClipRects::operator==):
2762         (WebCore::ClipRects::operator=):
2763         (WebCore::ClipRects::ClipRects):
2764         (WebCore::ClipRectsCache::ClipRectsCache):
2765         (WebCore::ClipRectsCache::getClipRects):
2766         (WebCore::ClipRectsCache::setClipRects):
2767         (WebCore::ClipRectsCache::getIndex):
2768         (WebCore::RenderLayer::clipRects):
2769         (WebCore::RenderLayer::calculateClipRects):
2770         * rendering/RenderLayer.h:
2771         (WebCore::ClipRects::create): Deleted.
2772         (WebCore::ClipRects::ClipRects): Deleted.
2773         (WebCore::ClipRects::reset): Deleted.
2774         (WebCore::ClipRects::overflowClipRect): Deleted.
2775         (WebCore::ClipRects::setOverflowClipRect): Deleted.
2776         (WebCore::ClipRects::fixedClipRect): Deleted.
2777         (WebCore::ClipRects::setFixedClipRect): Deleted.
2778         (WebCore::ClipRects::posClipRect): Deleted.
2779         (WebCore::ClipRects::setPosClipRect): Deleted.
2780         (WebCore::ClipRects::fixed): Deleted.
2781         (WebCore::ClipRects::setFixed): Deleted.
2782         (WebCore::ClipRects::ref): Deleted.
2783         (WebCore::ClipRects::deref): Deleted.
2784         (WebCore::ClipRects::operator==): Deleted.
2785         (WebCore::ClipRects::operator=): Deleted.
2786         (WebCore::ClipRectsCache::ClipRectsCache): Deleted.
2787         (WebCore::ClipRectsCache::getClipRects): Deleted.
2788         (WebCore::ClipRectsCache::setClipRects): Deleted.
2789         (WebCore::ClipRectsCache::getIndex): Deleted.
2790
2791 2015-01-15  Dhi Aurrahman  <diorahman@rockybars.com>
2792
2793         Canonicalization of :lang() should preserve the :lang()'s arguments representations
2794         https://bugs.webkit.org/show_bug.cgi?id=139928
2795
2796         Reviewed by Benjamin Poulain.
2797
2798         Preserve the representation of IDENT and STRING when serializing the 
2799         :lang(). For example, :lang(foo,"bar"   ,baz) should be serialized as 
2800         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
2801
2802         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
2803         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
2804         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList 
2805         respectively, since those methods are being exclusively used in respect
2806         with :lang().
2807
2808         Update the test of serializing :lang() with IDENT and STRING arguments.
2809
2810         * css/CSSGrammar.y.in:
2811         * css/CSSParserValues.cpp:
2812         (WebCore::CSSParserSelector::setLangArgumentList):
2813         (WebCore::CSSParserSelector::setArgumentList): Deleted.
2814         * css/CSSParserValues.h:
2815         (WebCore::CSSParserString::init):
2816         (WebCore::CSSParserString::clear):
2817         (WebCore::CSSParserString::isParsedFromString):
2818         (WebCore::CSSParserString::setParsedFromString):
2819         * css/CSSSelector.cpp:
2820         (WebCore::appendLangArgumentList):
2821         (WebCore::CSSSelector::selectorText):
2822         (WebCore::CSSSelector::setLangArgumentList):
2823         (WebCore::appendArgumentList): Deleted.
2824         (WebCore::CSSSelector::setArgumentList): Deleted.
2825         * css/CSSSelector.h:
2826         (WebCore::CSSSelector::langArgumentList):
2827         (WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
2828         (WebCore::CSSSelector::argumentList): Deleted.
2829         * css/SelectorChecker.cpp:
2830         (WebCore::SelectorChecker::checkOne):
2831
2832 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
2833
2834         Layers need to be already updated before we call adjustViewSize
2835         https://bugs.webkit.org/show_bug.cgi?id=135514
2836
2837         Reviewed by Simon Fraser.
2838
2839         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
2840
2841         Defer updating scrollbars until we have finished layout. This
2842         has a couple of benefits:
2843         (1) We do not attempt to modify render layers during layout.
2844         (2) In WK1 we do not attempt to paint during layout.
2845
2846         Add a new virtual predicate to ScrollView indicating when we are in
2847         layout so that calls to setContentsSize do not attempt
2848         to adjust scrollbars.
2849
2850         Modify FrameView to set its ScrollView state to block drawing
2851         scrollbar updates during layout. Also add a post-layout
2852         handler to complete the scrollbar updates after layout is
2853         finished.
2854
2855         * page/FrameView.cpp:
2856         (WebCore::FrameView::layout):
2857         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
2858         * page/FrameView.h:
2859         * platform/ScrollView.cpp:
2860         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
2861         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
2862         the scroll delta and apply it after the layout is complete.
2863         * platform/ScrollView.h:
2864         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
2865
2866 2015-01-15  Benjamin Poulain  <benjamin@webkit.org>
2867
2868         When building the NFA of the global disjunction, share the prefix subgraph of existing subpatterns
2869         https://bugs.webkit.org/show_bug.cgi?id=140465
2870
2871         Reviewed by Andreas Kling.
2872
2873         This patch updates the parser to produce smaller graphs when multiple patterns
2874         of the rule list share a common prefix.
2875
2876         Previously, GraphBuilder would generate subgraph in place of each parsed
2877         atom. We now only create subgraph if an atom does not appear in the prefix tree.
2878
2879         We accumulate the parsing information into small uint16_t named TrivialAtom.
2880         When generating the subgraph for an new atom, we first check if the prefix tree already
2881         has a corresponding subgraph for that atom. If it does, we do not generate anything and we extend the existing
2882         graph. If there is no existing prefix, we create the subgraph and extend the prefix tree.
2883
2884         Sharing prefix subtrees slows down the subtree generation a bit but the resulting graph is much
2885         simpler for many kind of inputs.
2886
2887         * WebCore.xcodeproj/project.pbxproj:
2888         * contentextensions/ContentExtensionsBackend.cpp:
2889         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2890         The URLFilterParser now maintains states (the prefix tree) between patterns.
2891
2892         * contentextensions/DFA.cpp:
2893         (WebCore::ContentExtensions::DFA::debugPrintDot):
2894         * contentextensions/DFANode.h:
2895         Fix a typo :)
2896
2897         * contentextensions/NFA.cpp:
2898         (WebCore::ContentExtensions::NFA::createNode):
2899         (WebCore::ContentExtensions::NFA::setFinal):
2900         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
2901         (WebCore::ContentExtensions::NFA::addRuleId):
2902         (WebCore::ContentExtensions::NFA::debugPrintDot):
2903         * contentextensions/NFA.h:
2904         (WebCore::ContentExtensions::NFA::addRuleId):
2905         * contentextensions/NFANode.cpp: Removed.
2906         * contentextensions/NFANode.h:
2907         NFA nodes from two patterns are now "merged" by construction, thus we need
2908         to keep track of multiple rules per node.
2909
2910         * contentextensions/NFAToDFA.cpp:
2911         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
2912         * contentextensions/URLFilterParser.cpp:
2913         (WebCore::ContentExtensions::trivialAtomFromAsciiCharacter):
2914         (WebCore::ContentExtensions::quantifyTrivialAtom):
2915         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin):
2916         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2917         (WebCore::ContentExtensions::GraphBuilder::m_LastPrefixTreeEntry):
2918         (WebCore::ContentExtensions::GraphBuilder::finalize):
2919         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2920         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2921         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2922         (WebCore::ContentExtensions::GraphBuilder::fail):
2923         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
2924         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
2925         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
2926         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
2927         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2928         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom): Deleted.
2929         (WebCore::ContentExtensions::URLFilterParser::parse): Deleted.
2930         * contentextensions/URLFilterParser.h:
2931         (WebCore::ContentExtensions::URLFilterParser::hasError): Deleted.
2932         (WebCore::ContentExtensions::URLFilterParser::errorMessage): Deleted.
2933
2934 2015-01-14  Alexey Proskuryakov  <ap@apple.com>
2935
2936         Web Inspector and regular console use different source code locations for messages
2937         https://bugs.webkit.org/show_bug.cgi?id=140478
2938
2939         Reviewed by Brian Burg.
2940
2941         We now create a ConsoleMessage object in a place where we can look at it and use
2942         the source location it computed in a client call.
2943
2944         * inspector/InspectorConsoleInstrumentation.h:
2945         (WebCore::InspectorInstrumentation::addMessageToConsole):
2946         * inspector/InspectorInstrumentation.cpp:
2947         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2948         * inspector/InspectorInstrumentation.h:
2949         * inspector/WebConsoleAgent.cpp:
2950         (WebCore::WebConsoleAgent::didFinishXHRLoading):
2951         (WebCore::WebConsoleAgent::didReceiveResponse):
2952         (WebCore::WebConsoleAgent::didFailLoading):
2953         * page/PageConsoleClient.cpp:
2954         (WebCore::PageConsoleClient::addMessage):
2955         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
2956         * workers/WorkerGlobalScope.cpp:
2957         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
2958
2959 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
2960
2961         [Win] Unreviewed Windows build fix.
2962
2963         More missing Font->FontCascade changes.
2964
2965         * platform/win/WebCoreTextRenderer.cpp:
2966         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
2967         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
2968
2969 2015-01-15  Antti Koivisto  <antti@apple.com>
2970
2971         REGRESSION(r178133): Membuster regressed ~4%
2972         https://bugs.webkit.org/show_bug.cgi?id=140495
2973
2974         Reviewed by Andreas Kling.
2975
2976         * platform/graphics/FontCache.cpp:
2977         (WebCore::FontCache::purgeInactiveFontData):
2978
2979             Fonts may ref other fonts. Keep clearing until there are no changes.
2980
2981 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
2982
2983         [Win] Unreviewed build fix.
2984
2985         * platform/graphics/win/FontCacheWin.cpp:
2986         * platform/win/DragImageWin.cpp:
2987         * platform/win/WebCoreTextRenderer.h:
2988
2989 2015-01-15  Antti Koivisto  <antti@apple.com>
2990
2991         Try to fix windows build.
2992
2993         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2994         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2995         (PlatformCALayerWinInternal::displayCallback):
2996         * platform/win/DragImageWin.cpp:
2997         (WebCore::dragLabelFont):
2998         (WebCore::createDragImageForLink):
2999         * platform/win/PopupMenuWin.cpp:
3000         (WebCore::PopupMenuWin::calculatePositionAndSize):
3001         (WebCore::PopupMenuWin::paint):
3002         * platform/win/WebCoreTextRenderer.cpp:
3003         (WebCore::doDrawTextAtPoint):
3004         (WebCore::WebCoreDrawDoubledTextAtPoint):
3005         (WebCore::WebCoreTextFloatWidth):
3006         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
3007         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
3008         * rendering/RenderThemeSafari.cpp:
3009         (WebCore::RenderThemeSafari::setFontFromControlSize):
3010
3011 2015-01-15  Antti Koivisto  <antti@apple.com>
3012
3013         Unreviewed, rolling out r178518.
3014
3015         Didn't mean to commit some of this
3016
3017         Reverted changeset:
3018
3019         "Try to fix windows build."
3020         http://trac.webkit.org/changeset/178518
3021
3022 2015-01-15  Antti Koivisto  <antti@apple.com>
3023
3024         Try to fix windows build.
3025
3026         * platform/graphics/Font.cpp: Copied from Source/WebCore/platform/graphics/SimpleFontData.cpp.
3027         * platform/graphics/Font.h: Copied from Source/WebCore/platform/graphics/SimpleFontData.h.
3028         * platform/graphics/FontCascadeFastPath.cpp: Copied from Source/WebCore/platform/graphics/FontFastPath.cpp.
3029         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3030         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3031         (PlatformCALayerWinInternal::displayCallback):
3032         * platform/graphics/ios/FontIOS.mm: Copied from Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm.
3033         * platform/graphics/mac/FontCascadeComplexTextMac.cpp: Copied from Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp.
3034         * platform/graphics/mac/FontCascadeMac.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
3035         * platform/graphics/mac/FontCoreText.cpp: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp.
3036         * platform/graphics/mac/FontMac.mm: Replaced with Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
3037         * platform/win/DragImageWin.cpp:
3038         (WebCore::dragLabelFont):
3039         (WebCore::createDragImageForLink):
3040         * platform/win/PopupMenuWin.cpp:
3041         (WebCore::PopupMenuWin::calculatePositionAndSize):
3042         (WebCore::PopupMenuWin::paint):
3043         * platform/win/WebCoreTextRenderer.cpp:
3044         (WebCore::doDrawTextAtPoint):
3045         (WebCore::WebCoreDrawDoubledTextAtPoint):
3046         (WebCore::WebCoreTextFloatWidth):
3047         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
3048         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
3049         * rendering/RenderThemeSafari.cpp:
3050         (WebCore::RenderThemeSafari::setFontFromControlSize):
3051
3052 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
3053
3054         http/tests/misc/acid3.html is flakey on Mavericks
3055         https://bugs.webkit.org/show_bug.cgi?id=140253
3056
3057         Reviewed by Alexey Proskuryakov.
3058
3059         CoreText has a bug <rdar://problem/19433490> in which kerning is not applied for a font
3060         if a CTTypesetter is created using that font before a call to CTFontTransformGlyphs. We
3061         often create typesetters in the complex code path, so it's not obvious when this bug
3062         might present itself. This patch simply makes a dummy invocation of
3063         CTFontTransformGlyphs() when creating a SimpleFontData.
3064
3065         No new tests because this is covered by http/tests/misc/acid3.html.
3066
3067         * platform/graphics/mac/SimpleFontDataMac.mm:
3068         (WebCore::SimpleFontData::platformInit):
3069
3070 2015-01-15  Chris Dumez  <cdumez@apple.com>
3071
3072         Get rid of custom StyleBuilder code for 'line-height' CSS property
3073         https://bugs.webkit.org/show_bug.cgi?id=140462
3074
3075         Reviewed by Antti Koivisto.
3076
3077         Get rid of custom StyleBuilder code for 'line-height' CSS property by
3078         using a conditional converter.
3079
3080         * css/CSSPropertyNames.in:
3081         * css/StyleBuilderConverter.h:
3082         (WebCore::StyleBuilderConverter::convertLineHeight):
3083         * css/StyleBuilderCustom.h:
3084         (WebCore::StyleBuilderCustom::applyValueLineHeight):
3085         (WebCore::StyleBuilderCustom::convertLineHeight): Deleted.
3086
3087 2015-01-15  Antti Koivisto  <antti@apple.com>
3088
3089         Rename Font to FontCascade
3090         https://bugs.webkit.org/show_bug.cgi?id=140442
3091
3092         Reviewed by Darin Adler.
3093
3094         We can then rename SimpleFontData to Font. This will match the usual definition of a "font".
3095
3096 2015-01-15  Mihnea Ovidenie  <mihnea@adobe.com>
3097
3098         [CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
3099         https://bugs.webkit.org/show_bug.cgi?id=140441
3100
3101         Reviewed by Andrei Bucur.
3102
3103         When showing the render tree debug information for an element inside a flow thread,
3104         we will display the region range information for all the render boxes. To avoid
3105         computation of flow thread containing block in these situations, we will use
3106         only the cached flow thread containing block information.
3107
3108         No new tests as this code path is only touched when using showRenderTree* methods.
3109
3110         * rendering/RenderObject.cpp:
3111         (WebCore::flowThreadContainingBlockFromRenderer):
3112         (WebCore::RenderObject::showRegionsInformation):
3113
3114 2015-01-14  Simon Fraser  <simon.fraser@apple.com>
3115
3116         Graphics corruption after Find on some pages
3117         https://bugs.webkit.org/show_bug.cgi?id=140489
3118
3119         Reviewed by Zalan Bujtas.
3120         
3121         After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
3122         garbage could appear on some parts of the page. This is caused by creating
3123         a compositing layer which is marked as opaque, yet failing to paint the entire
3124         layer contents.
3125         
3126         This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
3127         logic. On the page in question, doing a Find could cause overflow:hidden sections
3128         to get scrolled (since Find can reveal the selection by scrolling overflow).
3129         However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
3130         fails to take overflow scrolling into account, so gives the wrong answer
3131         in some content configurations. As a result, we'd think that the background
3132         is obscured, and never paint it.
3133         
3134         Conservative fix is to have isCandidateForOpaquenessTest() return false
3135         when the content has any non-zero scroll offset.
3136
3137         Tests: compositing/contents-opaque/opaque-with-scrolled.html
3138                fast/backgrounds/opaque-scrolled-paint-background.html
3139
3140         * rendering/RenderBox.cpp:
3141         (WebCore::isCandidateForOpaquenessTest):
3142
3143 2015-01-14  Jer Noble  <jer.noble@apple.com>
3144
3145         [Mac][MSE] Stalled YouTube playback does not allow display to sleep.
3146         https://bugs.webkit.org/show_bug.cgi?id=140468
3147         rdar://problem/19171162
3148
3149         Reviewed by Eric Carlson.
3150
3151         Test: media/media-source/media-source-stalled-holds-sleep-assertion.html
3152
3153         The unstated convention of MediaPlayerPrivate::paused() is that implementations should 
3154         return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC
3155         was returning 'false' if it was supposed to be playing, regardless of the actual rate.
3156         This caused a check in HTMLMediaElement of whether to release the sleep assertion token
3157         to fail, thinking the media engine was still playing.
3158
3159         Add some testing infrastructure to allow us to test whether the media element is disabling
3160         display sleep from within layout tests.
3161
3162         * html/HTMLMediaElement.h:
3163         (WebCore::HTMLMediaElement::isDisablingSleep):
3164         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3165         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
3166         * testing/Internals.cpp:
3167         (WebCore::Internals::elementIsBlockingDisplaySleep):
3168         * testing/Internals.h:
3169         * testing/Internals.idl:
3170
3171 2015-01-14  Zalan Bujtas  <zalan@apple.com>
3172
3173         Move LayoutFragment and ClipRect to their own files.
3174         https://bugs.webkit.org/show_bug.cgi?id=140457
3175
3176         Reviewed by Simon Fraser.
3177
3178         Move these classes to their own files to to make RenderLayer.h less heavy.
3179
3180         No change in functionality.
3181
3182         * WebCore.xcodeproj/project.pbxproj:
3183         * rendering/ClipRect.cpp: Added.
3184         (WebCore::ClipRect::intersects):
3185         * rendering/ClipRect.h: Added.
3186         (WebCore::ClipRect::ClipRect):
3187         (WebCore::ClipRect::rect):
3188         (WebCore::ClipRect::setRect):
3189         (WebCore::ClipRect::affectedByRadius):
3190         (WebCore::ClipRect::setAffectedByRadius):
3191         (WebCore::ClipRect::operator==):
3192         (WebCore::ClipRect::operator!=):
3193         (WebCore::ClipRect::intersect):
3194         (WebCore::ClipRect::move):
3195         (WebCore::ClipRect::moveBy):
3196         (WebCore::ClipRect::isEmpty):
3197         (WebCore::ClipRect::intersects):
3198         (WebCore::ClipRect::inflateX):
3199         (WebCore::ClipRect::inflateY):
3200         (WebCore::ClipRect::inflate):
3201         (WebCore::intersection):
3202         * rendering/LayerFragment.h: Added.
3203         (WebCore::LayerFragment::setRects):
3204         (WebCore::LayerFragment::moveBy):
3205         (WebCore::LayerFragment::intersect):
3206         * rendering/RenderFlowThread.h:
3207         * rendering/RenderLayer.cpp:
3208         (WebCore::ClipRect::intersects): Deleted.
3209         * rendering/RenderLayer.h:
3210         (WebCore::ClipRect::ClipRect): Deleted.
3211         (WebCore::ClipRect::rect): Deleted.
3212         (WebCore::ClipRect::setRect): Deleted.
3213         (WebCore::ClipRect::affectedByRadius): Deleted.
3214         (WebCore::ClipRect::setAffectedByRadius): Deleted.
3215         (WebCore::ClipRect::operator==): Deleted.
3216         (WebCore::ClipRect::operator!=): Deleted.
3217         (WebCore::ClipRect::intersect): Deleted.
3218         (WebCore::ClipRect::move): Deleted.
3219         (WebCore::ClipRect::moveBy): Deleted.
3220         (WebCore::ClipRect::isEmpty): Deleted.
3221         (WebCore::ClipRect::intersects): Deleted.
3222         (WebCore::ClipRect::inflateX): Deleted.
3223         (WebCore::ClipRect::inflateY): Deleted.
3224         (WebCore::ClipRect::inflate): Deleted.
3225         (WebCore::intersection): Deleted.
3226         (WebCore::LayerFragment::LayerFragment): Deleted.
3227         (WebCore::LayerFragment::setRects): Deleted.
3228         (WebCore::LayerFragment::moveBy): Deleted.
3229         (WebCore::LayerFragment::intersect): Deleted.
3230         * rendering/RenderMultiColumnSet.h:
3231         * rendering/RenderRegion.h:
3232         * rendering/RenderTreeAsText.cpp:
3233
3234 2015-01-14  Commit Queue  <commit-queue@webkit.org>
3235
3236         Unreviewed, rolling out r178438.
3237         https://bugs.webkit.org/show_bug.cgi?id=140484
3238
3239         Broke a few MediaSource tests (Requested by JoePeck on
3240         #webkit).
3241
3242         Reverted changeset:
3243
3244         "[MSE] Implement per TrackBuffer buffered."
3245         https://bugs.webkit.org/show_bug.cgi?id=139813
3246         http://trac.webkit.org/changeset/178438
3247
3248 2015-01-14  Enrica Casucci  <enrica@apple.com>
3249
3250         REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
3251         https://bugs.webkit.org/show_bug.cgi?id=137902
3252         rdar://problem/18568864
3253
3254         Reviewed by Darin Adler.
3255
3256         Test: editing/text-iterator/invalid-subrange.html
3257
3258         characterSubrange should check the iterator position after each advance.
3259         This changed adds a new method to the Internals object to be able to test this.
3260
3261         * editing/TextIterator.cpp:
3262         (WebCore::characterSubrange):
3263         (WebCore::TextIterator::subrange):
3264         (WebCore::findPlainText):
3265         * testing/Internals.cpp:
3266         (WebCore::Internals::subrange):
3267         * testing/Internals.h:
3268         * testing/Internals.idl:
3269
3270 2015-01-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
3271
3272         REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
3273         https://bugs.webkit.org/show_bug.cgi?id=139690.
3274
3275         Reviewed by Daniel Bates.
3276
3277         Before r154769, we were calling Traversal<SVGTitleElement>::firstWithin(), which returns
3278         the first immediate SVGTitleElement child. In r154769, Traversal<SVGTitleElement>::firstWithin()
3279         was replaced by descendantsOfType<SVGTitleElement> which returns all descendants SVGTitleElements.
3280         Then we were returning the first element of these descendants, which may not be an immediate
3281         child of the element, as the title of the SVGElement. This was the reason of this bug. The
3282         fix is to use childrenOfType<SVGTitleElement>() instead, which returns the immediate SVGTitleElement
3283         children of an SVGElement.
3284
3285         Also we were not following exactly the specs for the rootmost SVG element's title value.
3286         According to the W3C specs, for stand-alone SVG documents only, the rootmost SVG element
3287         should not return a title. But we were not returning a title for the rootmost SVG element
3288         always. The fix is to return a empty title for the rootmost SVG element only if topDocument()
3289         of the element isSVGDocument().
3290         
3291         NOTE: The main SVG specs http://www.w3.org/TR/SVG/interact.html#hit-testing (W3C Recommendation
3292         16 August 2011) and http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements (W3C
3293         Recommendation 16 August 2011) do not say how the tooltip of an SVG element is calculated. But
3294         the SVG tiny specs http://www.w3.org/TR/SVGTiny12/struct.html#uiTitleDescBehavior (W3C
3295         Recommendation 22 December 2008) however explains well the tooltip calculation for the embedded
3296         and the stand-alone SVG cases. And it seems this what we should rely on.
3297
3298         Test: svg/hittest/svg-standalone-tooltip.svg
3299               svg/hittest/svg-embedded-tooltip.html
3300
3301         * WebCore.exp.in:
3302         * rendering/HitTestResult.h:
3303         Make HitTestResult::setInnerNode be WEBCORE_EXPORT
3304         
3305         * svg/SVGElement.cpp:
3306         (WebCore::SVGElement::title):
3307         Replace descendantsOfType<SVGTitleElement>() by childrenOfType<SVGTitleElement>().
3308         Fix the title value of the rootmost SVG element.
3309         
3310         * testing/Internals.cpp:
3311         (WebCore::Internals::toolTipFromElement):
3312         * testing/Internals.h:
3313         * testing/Internals.idl:
3314         Add a new internal function toolTipFromElement() which returns the tooltip text for a
3315         given element.
3316
3317 2015-01-14  Csaba Osztrogonác  <ossy@webkit.org>
3318
3319         Buildfix after r178434
3320         https://bugs.webkit.org/show_bug.cgi?id=140467
3321
3322         Reviewed by Chris Dumez.
3323
3324         * css/StyleBuilderConverter.h:
3325         (WebCore::StyleBuilderConverter::convertPerspective):
3326
3327 2015-01-14  Benjamin Poulain  <bpoulain@apple.com>
3328
3329         Build fix for NFAToDFA on ARM
3330
3331         * contentextensions/NFAToDFA.cpp:
3332         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
3333         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
3334
3335 2015-01-14  Bartlomiej Gajda  <b.gajda@samsung.com>
3336
3337         [MSE] Implement per TrackBuffer buffered.
3338         https://bugs.webkit.org/show_bug.cgi?id=139813.
3339
3340         Reviewed by Jer Noble.
3341
3342         Added implementation of SourceBuffer buffered() algorithm as per specification,
3343         and caching mechanism called when samples are added, removed, or MediaSource
3344         readyState is changed.
3345
3346         Tests: media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html
3347                media/media-source/media-source-multiple-trackBuffers-buffered.html
3348
3349         * Modules/mediasource/MediaSource.cpp:
3350         (WebCore::MediaSource::setReadyState):
3351         * Modules/mediasource/SourceBuffer.cpp:
3352         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
3353         (WebCore::SourceBuffer::SourceBuffer):
3354         (WebCore::SourceBuffer::buffered):
3355         (WebCore::SourceBuffer::invalidateBuffered):
3356         (WebCore::SourceBuffer::recalculateBuffered):
3357         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
3358         (WebCore::SourceBuffer::removeCodedFrames):
3359         (WebCore::SourceBuffer::evictCodedFrames):
3360         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3361         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
3362         (WebCore::SourceBuffer::hasCurrentTime):
3363         * Modules/mediasource/SourceBuffer.h:
3364
3365 2015-01-14  Benjamin Poulain  <benjamin@webkit.org>
3366
3367         Do not create new set for every sub-operation when converting a NFA to DFA
3368         https://bugs.webkit.org/show_bug.cgi?id=140380
3369
3370         Reviewed by Andreas Kling.
3371
3372         This is the first step toward making the NFA-to-DFA conversion more scalable: instead
3373         of creating new sets for each step of the algorithm, we use two kinds of sets
3374         and never do any copy.
3375
3376         The first new tool to do that is UniqueNodeIdSetImpl. It represents a set of NFA state corresponding to a DFA
3377         state. It is unique per DFA state.
3378
3379         HashableNodeIdSet is a helper tool storing a UniqueNodeIdSetImpl.
3380
3381         The creation of new sets now goes like this:
3382         1) Get a NodeIdSet for each possible transition.
3383         2) For each transition:
3384            2a) Extend the NodeIdSet in place with its epsilon closure.
3385            2b) Get the UniqueNodeIdSetImpl corresponding to the new set we discovered.
3386            2c) If the UniqueNodeIdSetImpl is new, queue it for processing.
3387
3388         * WebCore.xcodeproj/project.pbxproj:
3389         * contentextensions/ContentExtensionsDebugging.h: Copied from Source/WebCore/contentextensions/DFANode.h.
3390         * contentextensions/ContentExtensionsBackend.cpp:
3391         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
3392         * contentextensions/ContentExtensionsManager.cpp:
3393         (WebCore::ContentExtensions::ExtensionsManager::loadExtension):
3394         Added some logging to inspect more easily what the clients are sending.
3395
3396         * contentextensions/DFA.cpp:
3397         * contentextensions/DFA.h:
3398         * contentextensions/DFANode.h:
3399         * contentextensions/NFA.cpp:
3400         * contentextensions/NFA.h:
3401         * contentextensions/NFAToDFA.cpp:
3402
3403         (WebCore::ContentExtensions::epsilonClosure):
3404         Instead of returning a new HashSet, extend the input HashSet.
3405
3406         (WebCore::ContentExtensions::UniqueNodeIdSetImpl::buffer):
3407         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
3408         (WebCore::ContentExtensions::UniqueNodeIdSet::operator=):
3409         (WebCore::ContentExtensions::UniqueNodeIdSet::~UniqueNodeIdSet):
3410         (WebCore::ContentExtensions::UniqueNodeIdSet::operator==):
3411         (WebCore::ContentExtensions::UniqueNodeIdSet::impl):
3412         (WebCore::ContentExtensions::UniqueNodeIdSet::hash):
3413         (WebCore::ContentExtensions::UniqueNodeIdSet::isEmptyValue):
3414         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
3415         (WebCore::ContentExtensions::UniqueNodeIdSetHash::hash):
3416         (WebCore::ContentExtensions::UniqueNodeIdSetHash::equal):
3417         UniqueNodeIdSetImpl is a compact representation of a NodeIdSet corresponding to a DFA node.
3418
3419         It is never built directly, it is only built on demand through NodeIdSetToUniqueNodeIdSetTranslator
3420         from a NodeIdSet.
3421
3422         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
3423         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::hash):
3424         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::equal):
3425         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
3426         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::operator[]):
3427         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::size):
3428         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::begin):
3429         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::end):
3430         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon):
3431         (WebCore::ContentExtensions::NFAToDFA::convert):
3432         (WebCore::ContentExtensions::setTransitionsExcludingEpsilon): Deleted.
3433         (WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet): Deleted.
3434         (WebCore::ContentExtensions::HashableNodeIdSet::operator=): Deleted.
3435         (WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue): Deleted.
3436         (WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue): Deleted.
3437         (WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet): Deleted.
3438         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash): Deleted.
3439         (WebCore::ContentExtensions::HashableNodeIdSetHash::equal): Deleted.
3440         (WebCore::ContentExtensions::addDFAState): Deleted.
3441
3442 2015-01-14  Chris Dumez  <cdumez@apple.com>
3443
3444         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
3445         https://bugs.webkit.org/show_bug.cgi?id=140347
3446
3447         Reviewed by Darin Adler.
3448
3449         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
3450         - Removing the static_cast to the destination type in the generated
3451           StyleBuilder code and let compiler implicitly convert the
3452           CSSPrimitiveValue to the setter's argument type.
3453         - Updating conditional converters to return a WTF::Optional<>
3454           instead of returning a boolean and having an output argument
3455           passed by reference. This way, we can use "auto" in the generated
3456           StyleBuilder code to deduce the return type.
3457
3458         * css/CSSPropertyNames.in:
3459         Drop TypeName parameter from all properties as it is no longer needed.
3460
3461         * css/StyleBuilderConverter.h:
3462         (WebCore::StyleBuilderConverter::convertGridTrackSize):
3463         (WebCore::StyleBuilderConverter::convertGridPosition):
3464         (WebCore::StyleBuilderConverter::convertWordSpacing):
3465         (WebCore::StyleBuilderConverter::convertPerspective):
3466         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
3467         (WebCore::StyleBuilderConverter::convertFilterOperations):
3468         (WebCore::StyleBuilderConverter::convertMaskImageOperations):
3469         Update conditional converters to return an Optional<>.
3470
3471         * css/makeprop.pl:
3472         (generateValueSetter):
3473         Drop support for TypeName, stop using static_cast to destination
3474         type and update the generated code now that the conditional
3475         converters return an Optional.
3476
3477         * platform/efl/RenderThemeEfl.cpp:
3478         (WebCore::RenderThemeEfl::systemFont):
3479         * platform/graphics/Font.cpp:
3480         (WebCore::Font::Font):
3481         * platform/graphics/FontDescription.h:
3482         (WebCore::FontDescription::setIsItalic):
3483         (WebCore::FontDescription::setIsSmallCaps):
3484         (WebCore::FontDescription::setItalic): Deleted.
3485         (WebCore::FontDescription::setSmallCaps): Deleted.
3486         * rendering/RenderThemeGtk.cpp:
3487         (WebCore::RenderThemeGtk::systemFont):
3488         * rendering/RenderThemeIOS.mm:
3489         (WebCore::RenderThemeIOS::systemFont):
3490         * rendering/RenderThemeMac.mm:
3491         (WebCore::RenderThemeMac::systemFont):
3492         * rendering/RenderThemeSafari.cpp:
3493         (WebCore::RenderThemeSafari::systemFont):
3494         * rendering/RenderThemeWin.cpp:
3495         (WebCore::fillFontDescription):
3496         * rendering/mathml/RenderMathMLToken.cpp:
3497         (WebCore::RenderMathMLToken::updateStyle):
3498         Now that we call the RenderStyle setters with a CSSPrimitiveValue
3499         and let it be implicitly converted to the right type, instead of
3500         doing an explicit static_cast, two setters on FontDescription
3501         were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
3502         taking a boolean in argument to setIsItalic() / setIsSmallCaps()
3503         to resolve the ambiguity.
3504
3505 2015-01-14  Jer Noble  <jer.noble@apple.com>
3506
3507         Null-deref crash when seeking immediately before looping.
3508         https://bugs.webkit.org/show_bug.cgi?id=140394
3509
3510         Reviewed by Eric Carlson.
3511
3512         It is possible for finishSeek() to be called when a seek() has caused a pending seek task
3513         to be scheduled, but before that pending seek task is run. In this case, if a seek request
3514         is issued, the existing pending seek task will not be cancelled, which will cause a crash
3515         when the pending seek task is run.
3516
3517         When checking whether an existing seek task needs to be cancelled, check the actual timer,
3518         rather than the m_seeking boolean, so that this case is covered.
3519
3520         Test: media/video-ended-seek-crash.html
3521
3522         * html/HTMLMediaElement.cpp:
3523         (WebCore::HTMLMediaElement::seekWithTolerance):
3524
3525 2015-01-14  Brent Fulgham  <bfulgham@apple.com>
3526
3527         [Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
3528         https://bugs.webkit.org/show_bug.cgi?id=140425
3529
3530         Reviewed by Anders Carlsson.
3531
3532         * platform/win/CursorWin.cpp:
3533         (WebCore::createSharedCursor): Return nullptr when operating system
3534         cannot support the requested icon specification.
3535         (WebCore::Cursor::ensurePlatformCursor): Check for 'createSharedCursor'
3536         returning nullptr, and fall back to the default icon construction.
3537
3538 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3539
3540         REGRESSION(r178367): [GStreamer] Several media tests time out after r178367
3541         https://bugs.webkit.org/show_bug.cgi?id=140437
3542
3543         Reviewed by Philippe Normand.
3544
3545         Add implementation for MediaPlayerPrivate::rate() to GStreamer
3546         media backend.
3547
3548         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3549         (WebCore::MediaPlayerPrivateGStreamer::rate):
3550         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3551
3552 2015-01-13  Commit Queue  <commit-queue@webkit.org>
3553
3554         Unreviewed, rolling out r178390, r178392, r178398, r178400,
3555         r178402, and r178410.
3556         https://bugs.webkit.org/show_bug.cgi?id=140431
3557
3558         Way too many failures to skip (Requested by ap_ on #webkit).
3559
3560         Reverted changesets:
3561
3562         "WebGL2: Support webgl2 context creation."
3563         https://bugs.webkit.org/show_bug.cgi?id=126408
3564         http://trac.webkit.org/changeset/178390
3565
3566         "Unreviewed iOS build fix after r178390."
3567         http://trac.webkit.org/changeset/178392
3568
3569         "[Unreviewed] Windows build fix after r178390."
3570         http://trac.webkit.org/changeset/178398
3571
3572         "[Unreviewed] Speculative test fix after r178390."
3573         http://trac.webkit.org/changeset/178400
3574
3575         "[Unreviewed] Skip webgl tests for temporarily."
3576         https://bugs.webkit.org/show_bug.cgi?id=140423
3577         http://trac.webkit.org/changeset/178402
3578
3579         "[EFL] Fix build after r178390"
3580         https://bugs.webkit.org/show_bug.cgi?id=140424
3581         http://trac.webkit.org/changeset/178410
3582
3583 2015-01-13  Hunseop Jeong  <hs85.jeong@samsung.com>
3584
3585         [EFL] Fix build after r178390 
3586         https://bugs.webkit.org/show_bug.cgi?id=140424
3587
3588         Reviewed by Csaba Osztrogonác.
3589
3590         * CMakeLists.txt: 
3591
3592 2015-01-13  Zalan Bujtas  <zalan@apple.com>
3593
3594         Simple line layout: Refactor TextFragment class.
3595         https://bugs.webkit.org/show_bug.cgi?id=140417
3596
3597         Reviewed by Andreas Kling.
3598
3599         Introduce text fragment type and use class member initializers.
3600
3601         No change in functionality.
3602
3603         * rendering/SimpleLineLayout.cpp:
3604         (WebCore::SimpleLineLayout::TextFragment::TextFragment):
3605         (WebCore::SimpleLineLayout::LineState::addUncommitted):
3606         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3607         (WebCore::SimpleLineLayout::nextFragment):
3608         (WebCore::SimpleLineLayout::createLineRuns):
3609
3610 2015-01-13  Commit Queue  <commit-queue@webkit.org>
3611
3612         Unreviewed, rolling out r178400.
3613         https://bugs.webkit.org/show_bug.cgi?id=140422
3614
3615         Test fix breaks build (Requested by rfong on #webkit).
3616
3617         Reverted changeset:
3618
3619         "[Unreviewed] Speculative test fix after r178390."
3620         http://trac.webkit.org/changeset/178400
3621
3622 2015-01-13  Roger Fong  <roger_fong@apple.com>
3623
3624         [Unreviewed] Speculative test fix after r178390.
3625
3626         * html/canvas/WebGL1RenderingContext.idl:
3627
3628 2015-01-13  Roger Fong  <roger_fong@apple.com>
3629
3630         [Unreviewed] Windows build fix after r178390.
3631
3632         * DerivedSources.cpp:
3633         * WebCore.vcxproj/WebCore.vcxproj:
3634         * WebCore.vcxproj/WebCore.vcxproj.filters:
3635         * bindings/js/JSBindingsAllInOne.cpp:
3636         * html/canvas/WebGLRenderingContextBase.cpp:
3637         (WebCore::WebGLRenderingContextBase::create):
3638
3639 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
3640
3641         NSButtonCell leak allocated under WebCore::paintToggleButton
3642         https://bugs.webkit.org/show_bug.cgi?id=137014
3643
3644         Reviewed by Alexey Proskuryakov.
3645
3646         * platform/mac/ThemeMac.mm:
3647         (WebCore::createToggleButtonCell):
3648         Immediately adopt the NSButtonCell allocation.
3649
3650         (WebCore::sharedRadioCell):
3651         (WebCore::sharedCheckboxCell):
3652         Move from the RetainPtr into the static variable.
3653
3654         (WebCore::paintToggleButton):
3655         Use RetainPtr logic to better manage lifetimes.
3656
3657 2015-01-13  Zalan Bujtas  <zalan@apple.com>
3658
3659         Simple line layout: Refactor SimpleLineLayout::nextFragment().
3660         https://bugs.webkit.org/show_bug.cgi?id=140407
3661
3662         Reviewed by Andreas Kling.
3663
3664         Simplify the code by using content specific branches with early returns.
3665
3666         No change in functionality.
3667
3668         * rendering/SimpleLineLayout.cpp:
3669         (WebCore::SimpleLineLayout::nextFragment):
3670
3671 2015-01-13  Chris Dumez  <cdumez@apple.com>
3672
3673         Unreviewed iOS build fix after r178390.
3674
3675         * html/canvas/CanvasRenderingContext2D.cpp:
3676         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
3677         m_type is undeclared.
3678
3679         * html/canvas/WebGLContextGroup.h:
3680         Fix bad include.
3681
3682 2015-01-13  Roger Fong  <roger_fong@apple.com>
3683
3684         WebGL2: Support webgl2 context creation.
3685         https://bugs.webkit.org/show_bug.cgi?id=126408
3686         <rdar://problem/15002170>
3687
3688         Reviewed by Dean Jackson.
3689
3690         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
3691
3692         Create a WebGLRenderingContextBase class that extends to a WebGL1RenderingContext and WebGL2RenderingContext.
3693         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
3694         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
3695
3696         * CMakeLists.txt:
3697         * DerivedSources.make:
3698         * WebCore.xcodeproj/project.pbxproj:
3699         * bindings/js/JSCanvasRenderingContextCustom.cpp:
3700         (WebCore::toJS):
3701         * bindings/js/JSDocumentCustom.cpp:
3702         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3703         * bindings/js/JSWebGL1RenderingContextCustom.cpp: Copied from Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp.
3704         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
3705         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
3706         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
3707         * bindings/js/JSWebGLRenderingContextCustom.cpp: Removed.
3708         * bindings/scripts/CodeGeneratorJS.pm:
3709         (GenerateImplementation):
3710         * html/HTMLCanvasElement.cpp:
3711         (WebCore::HTMLCanvasElement::getContext):
3712         (WebCore::HTMLCanvasElement::is3dType):
3713         (WebCore::HTMLCanvasElement::reset):
3714         (WebCore::HTMLCanvasElement::paint):
3715         (WebCore::HTMLCanvasElement::getImageData):
3716         * html/canvas/ANGLEInstancedArrays.cpp:
3717         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
3718         (WebCore::ANGLEInstancedArrays::supported):
3719         * html/canvas/ANGLEInstancedArrays.h:
3720         * html/canvas/CanvasRenderingContext.h:
3721         (WebCore::CanvasRenderingContext::type):
3722         * html/canvas/CanvasRenderingContext2D.cpp:
3723         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
3724         * html/canvas/EXTBlendMinMax.cpp:
3725         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
3726         * html/canvas/EXTBlendMinMax.h:
3727         * html/canvas/EXTFragDepth.cpp:
3728         (WebCore::EXTFragDepth::EXTFragDepth):
3729         * html/canvas/EXTFragDepth.h:
3730         * html/canvas/EXTShaderTextureLOD.cpp:
3731         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
3732         * html/canvas/EXTShaderTextureLOD.h:
3733         * html/canvas/EXTTextureFilterAnisotropic.cpp:
3734         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
3735         * html/canvas/EXTTextureFilterAnisotropic.h:
3736         * html/canvas/EXTsRGB.cpp:
3737         (WebCore::EXTsRGB::EXTsRGB):
3738         * html/canvas/EXTsRGB.h:
3739         * html/canvas/OESElementIndexUint.cpp:
3740         (WebCore::OESElementIndexUint::OESElementIndexUint):
3741         * html/canvas/OESElementIndexUint.h:
3742         * html/canvas/OESStandardDerivatives.cpp:
3743         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
3744         * html/canvas/OESStandardDerivatives.h:
3745         * html/canvas/OESTextureFloat.cpp:
3746         (WebCore::OESTextureFloat::OESTextureFloat):
3747         * html/canvas/OESTextureFloat.h:
3748         * html/canvas/OESTextureFloatLinear.cpp:
3749         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
3750         * html/canvas/OESTextureFloatLinear.h:
3751         * html/canvas/OESTextureHalfFloat.cpp:
3752         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
3753         * html/canvas/OESTextureHalfFloat.h:
3754         * html/canvas/OESTextureHalfFloatLinear.cpp:
3755         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
3756         * html/canvas/OESTextureHalfFloatLinear.h:
3757         * html/canvas/OESVertexArrayObject.cpp:
3758         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
3759         * html/canvas/OESVertexArrayObject.h:
3760         * html/canvas/WebGL1RenderingContext.cpp: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.cpp.
3761         * html/canvas/WebGL1RenderingContext.h: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.h.
3762         * html/canvas/WebGL1RenderingContext.idl: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.idl.
3763         * html/canvas/WebGL2RenderingContext.cpp: Added.
3764         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
3765         * html/canvas/WebGL2RenderingContext.h: Added.
3766         * html/canvas/WebGL2RenderingContext.idl: Added.
3767         * html/canvas/WebGLBuffer.cpp:
3768         (WebCore::WebGLBuffer::create):
3769         (WebCore::WebGLBuffer::WebGLBuffer):
3770         * html/canvas/WebGLBuffer.h:
3771         * html/canvas/WebGLCompressedTextureATC.cpp:
3772         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
3773         (WebCore::WebGLCompressedTextureATC::supported):
3774         * html/canvas/WebGLCompressedTextureATC.h:
3775         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
3776         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
3777         (WebCore::WebGLCompressedTexturePVRTC::supported):
3778         * html/canvas/WebGLCompressedTexturePVRTC.h:
3779         * html/canvas/WebGLCompressedTextureS3TC.cpp:
3780         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
3781         (WebCore::WebGLCompressedTextureS3TC::supported):
3782         * html/canvas/WebGLCompressedTextureS3TC.h:
3783         * html/canvas/WebGLContextGroup.cpp:
3784         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
3785         (WebCore::WebGLContextGroup::addContext):
3786         (WebCore::WebGLContextGroup::removeContext):
3787         (WebCore::WebGLContextGroup::loseContextGroup):
3788         * html/canvas/WebGLContextGroup.h:
3789         * html/canvas/WebGLContextObject.cpp:
3790         (WebCore::WebGLContextObject::WebGLContextObject):
3791         * html/canvas/WebGLContextObject.h:
3792         (WebCore::WebGLContextObject::context):
3793         * html/canvas/WebGLDebugRendererInfo.cpp:
3794         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
3795         * html/canvas/WebGLDebugRendererInfo.h:
3796         * html/canvas/WebGLDebugShaders.cpp:
3797         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
3798         * html/canvas/WebGLDebugShaders.h:
3799         * html/canvas/WebGLDepthTexture.cpp:
3800         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
3801         * html/canvas/WebGLDepthTexture.h:
3802         * html/canvas/WebGLDrawBuffers.cpp:
3803         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
3804         (WebCore::WebGLDrawBuffers::supported):
3805         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
3806         * html/canvas/WebGLDrawBuffers.h:
3807         * html/canvas/WebGLExtension.cpp:
3808         (WebCore::WebGLExtension::WebGLExtension):
3809         * html/canvas/WebGLExtension.h:
3810         (WebCore::WebGLExtension::context):
3811         * html/canvas/WebGLFramebuffer.cpp:
3812         (WebCore::WebGLFramebuffer::create):
3813         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
3814         * html/canvas/WebGLFramebuffer.h:
3815         * html/canvas/WebGLLoseContext.cpp:
3816         (WebCore::WebGLLoseContext::WebGLLoseContext):
3817         (WebCore::WebGLLoseContext::loseContext):
3818         * html/canvas/WebGLLoseContext.h:
3819         * html/canvas/WebGLObject.cpp:
3820         (WebCore::WebGLObject::WebGLObject):
3821         * html/canvas/WebGLObject.h:
3822         * html/canvas/WebGLProgram.cpp:
3823         (WebCore::WebGLProgram::create):
3824         (WebCore::WebGLProgram::WebGLProgram):
3825         * html/canvas/WebGLProgram.h:
3826         * html/canvas/WebGLRenderbuffer.cpp:
3827         (WebCore::WebGLRenderbuffer::create):
3828         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
3829         * html/canvas/WebGLRenderbuffer.h:
3830         * html/canvas/WebGLRenderingContext.cpp: Removed.
3831         * html/canvas/WebGLRenderingContext.h: Removed.
3832         * html/canvas/WebGLRenderingContext.idl: Removed.
3833         * html/canvas/WebGLRenderingContextBase.cpp: Added.
3834         * html/canvas/WebGLRenderingContextBase.h: Added.
3835         * html/canvas/WebGLRenderingContextBase.idl: Added.
3836         * html/canvas/WebGLShader.cpp:
3837         (WebCore::WebGLShader::create):
3838         (WebCore::WebGLShader::WebGLShader):
3839         * html/canvas/WebGLShader.h:
3840         * html/canvas/WebGLSharedObject.cpp:
3841         (WebCore::WebGLSharedObject::WebGLSharedObject):
3842         * html/canvas/WebGLSharedObject.h:
3843         * html/canvas/WebGLTexture.cpp:
3844         (WebCore::WebGLTexture::create):
3845         (WebCore::WebGLTexture::WebGLTexture):
3846         * html/canvas/WebGLTexture.h:
3847         * html/canvas/WebGLVertexArrayObjectOES.cpp:
3848         (WebCore::WebGLVertexArrayObjectOES::create):
3849         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
3850         * html/canvas/WebGLVertexArrayObjectOES.h:
3851
3852 2015-01-13  Chris Dumez  <cdumez@apple.com>
3853
3854         Unreviewed, fix Mac build after r178388
3855
3856         FontRanges::isEmpty() -> FontRanges::isNull().
3857
3858         * platform/graphics/mac/FontComplexTextMac.cpp:
3859         (WebCore::Font::fontDataForCombiningCharacterSequence):
3860
3861 2015-01-13  Antti Koivisto  <antti@apple.com>
3862
3863         Devirtualize FontData
3864         https://bugs.webkit.org/show_bug.cgi?id=140390
3865
3866         Reviewed by Andreas Kling.
3867
3868         This patch removes the FontData base class and turns SegmentedFontData into a non-virtual FontRanges type.
3869
3870         SimpleFontData remains as is (without the base) and it can be renamed later to something more sensible.
3871
3872         * WebCore.exp.in:
3873         * WebCore.xcodeproj/project.pbxproj:
3874         * css/CSSFontSelector.cpp:
3875         (WebCore::CSSFontSelector::fontRangesForFamily):
3876         (WebCore::CSSFontSelector::fallbackFontDataAt):
3877         (WebCore::CSSFontSelector::getFontData): Deleted.
3878         (WebCore::CSSFontSelector::getFallbackFontData): Deleted.
3879         * css/CSSFontSelector.h:
3880         * css/CSSSegmentedFontFace.cpp:
3881         (WebCore::CSSSegmentedFontFace::pruneTable):
3882         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
3883         (WebCore::CSSSegmentedFontFace::fontRanges):
3884         (WebCore::CSSSegmentedFontFace::loadFont):
3885         (WebCore::CSSSegmentedFontFace::getFontData): Deleted.
3886         * css/CSSSegmentedFontFace.h:
3887         * platform/graphics/Font.h:
3888         (WebCore::Font::fallbackRangesAt):
3889         (WebCore::Font::fontDataAt): Deleted.
3890         * platform/graphics/FontData.cpp: Removed.
3891         * platform/graphics/FontData.h: Removed.
3892         * platform/graphics/FontGlyphs.cpp:
3893         (WebCore::FontGlyphs::FontGlyphs):
3894         (WebCore::FontGlyphs::determinePitch):
3895         (WebCore::FontGlyphs::isLoadingCustomFonts):
3896         (WebCore::realizeNextFallback):
3897         (WebCore::FontGlyphs::realizeFallbackRangesAt):
3898         (WebCore::FontGlyphs::glyphDataForSystemFallback):
3899         (WebCore::FontGlyphs::glyphDataForVariant):
3900         (WebCore::FontGlyphs::glyphDataForNormalVariant):
3901         (WebCore::glyphPageFromFontRanges):
3902         (WebCore::FontGlyphs::glyphDataForCharacter):
3903         (WebCore::realizeNextFamily): Deleted.
3904         (WebCore::FontGlyphs::realizeFontDataAt): Deleted.
3905         (WebCore::glyphPageFromFontData): Deleted.
3906         * platform/graphics/FontGlyphs.h:
3907         (WebCore::FontGlyphs::primarySimpleFontData):
3908         * platform/graphics/FontRanges.cpp: Copied from Source/WebCore/platform/graphics/SegmentedFontData.cpp.
3909         (WebCore::FontRanges::FontRanges):
3910         (WebCore::FontRanges::~FontRanges):
3911         (WebCore::FontRanges::fontDataForCharacter):
3912         (WebCore::FontRanges::fontDataForFirstRange):
3913         (WebCore::FontRanges::isLoading):
3914         (WebCore::SegmentedFontData::SegmentedFontData): Deleted.
3915         (WebCore::SegmentedFontData::~SegmentedFontData): Deleted.
3916         (WebCore::SegmentedFontData::simpleFontDataForCharacter): Deleted.
3917         (WebCore::SegmentedFontData::simpleFontDataForFirstRange): Deleted.
3918         (WebCore::SegmentedFontData::isCustomFont): Deleted.
3919         (WebCore::SegmentedFontData::isLoading): Deleted.
3920         (WebCore::SegmentedFontData::isSegmented): Deleted.
3921         (WebCore::SegmentedFontData::description): Deleted.
3922         * platform/graphics/FontRanges.h: Copied from Source/WebCore/platform/graphics/SegmentedFontData.h.
3923         (WebCore::FontRanges::Range::Range):
3924         (WebCore::FontRanges::Range::from):
3925         (WebCore::FontRanges::Range::to):
3926         (WebCore::FontRanges::Range::fontData):
3927         (WebCore::FontRanges::isEmpty):
3928         (WebCore::FontRanges::appendRange):
3929         (WebCore::FontRanges::size):
3930         (WebCore::FontRanges::rangeAt):
3931         (WebCore::FontDataRange::FontDataRange): Deleted.
3932         (WebCore::FontDataRange::from): Deleted.
3933         (WebCore::FontDataRange::to): Deleted.
3934         (WebCore::FontDataRange::fontData): Deleted.
3935         (WebCore::SegmentedFontData::create): Deleted.
3936         (WebCore::SegmentedFontData::appendRange): Deleted.
3937         (WebCore::SegmentedFontData::numRanges): Deleted.
3938         (WebCore::SegmentedFontData::rangeAt): Deleted.
3939         (isType): Deleted.
3940         * platform/graphics/FontSelector.h:
3941         * platform/graphics/SegmentedFontData.cpp: Removed.
3942         * platform/graphics/SegmentedFontData.h: Removed.
3943         * platform/graphics/SimpleFontData.cpp:
3944         (WebCore::SimpleFontData::simpleFontDataForCharacter): Deleted.
3945         (WebCore::SimpleFontData::simpleFontDataForFirstRange): Deleted.
3946         (WebCore::SimpleFontData::isSegmented): Deleted.
3947         * platform/graphics/SimpleFontData.h:
3948         (WebCore::SimpleFontData::isCustomFont):
3949         (WebCore::SimpleFontData::isLoading):
3950         (isType): Deleted.
3951         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3952         (-[WebCascadeList initWithFont:character:]):
3953         (-[WebCascadeList objectAtIndex:]):
3954         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3955         * platform/graphics/mac/FontComplexTextMac.cpp:
3956         (WebCore::Font::fontDataForCombiningCharacterSequence):
3957
3958 2015-01-13  Dean Jackson  <dino@apple.com>
3959
3960         Filters aren't applied to elements in columns after the first
3961         https://bugs.webkit.org/show_bug.cgi?id=140331
3962
3963         Reviewed by Simon Fraser.
3964
3965         The important bits of this change came from Simon.
3966
3967         Filters and clipping were not taking columns into
3968         account when using their offset rectangles. The fix
3969         is to recalculate the rects if you're in such a
3970         situation.
3971
3972         Tests: fast/multicol/clip-in-columns.html
3973                fast/multicol/filter-in-columns.html
3974
3975         * rendering/RenderLayer.cpp:
3976         (WebCore::RenderLayer::hasFilterThatIsPainting): New method used
3977         to check if we're about to paint a filter.
3978         (WebCore::RenderLayer::setupFilters): Use the new helper if possible.
3979         (WebCore::RenderLayer::paintLayerContents): If we're in columns,
3980         and we either have a clip or a filter, recalculate the offset rectangles.
3981         * rendering/RenderLayer.h:
3982
3983 2015-01-13  Beth Dakin  <bdakin@apple.com>
3984
3985         Should disable immediate actions for iTunes
3986         https://bugs.webkit.org/show_bug.cgi?id=140405
3987         -and corresponding-
3988         rdar://problem/19461358
3989
3990         Reviewed by Tim Horton.
3991
3992         * WebCore.exp.in:
3993
3994 2015-01-13  Anders Carlsson  <andersca@apple.com>
3995
3996         Remove pure virtual functions from DatabaseBackendBase
3997         https://bugs.webkit.org/show_bug.cgi?id=140402
3998
3999         Reviewed by Sam Weinig.
4000
4001         Also change DatabaseBackendBase to Database in a couple of places.
4002
4003         * Modules/webdatabase/DatabaseBackendBase.cpp:
4004         (WebCore::DatabaseBackendBase::closeDatabase):
4005         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
4006         (WebCore::DatabaseBackendBase::performOpenAndVerify):
4007         (WebCore::DatabaseBackendBase::maximumSize):
4008         * Modules/webdatabase/DatabaseBackendBase.h:
4009         * Modules/webdatabase/DatabaseServer.cpp:
4010         (WebCore::DatabaseServer::createDatabase):
4011         * Modules/webdatabase/DatabaseTracker.cpp:
4012         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
4013         (WebCore::DatabaseTracker::doneCreatingDatabase):
4014         (WebCore::DatabaseTracker::addOpenDatabase):
4015         (WebCore::DatabaseTracker::removeOpenDatabase):
4016         (WebCore::DatabaseTracker::getOpenDatabases):
4017         (WebCore::DatabaseTracker::deleteDatabaseFile):
4018         * Modules/webdatabase/DatabaseTracker.h:
4019
4020 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
4021
4022         Web Inspector: Remove unused ResizeImage and DecodeImageData timeline events
4023         https://bugs.webkit.org/show_bug.cgi?id=140404
4024
4025         Reviewed by Timothy Hatcher.
4026
4027         * inspector/InspectorTimelineAgent.cpp:
4028         (WebCore::toProtocol):
4029         * inspector/InspectorTimelineAgent.h:
4030         * inspector/TimelineRecordFactory.cpp:
4031         (WebCore::TimelineRecordFactory::createDecodeImageData): Deleted.
4032         (WebCore::TimelineRecordFactory::createResizeImageData): Deleted.
4033         * inspector/TimelineRecordFactory.h:
4034
4035 2015-01-13  Jer Noble  <jer.noble@apple.com>
4036
4037         defaultPlaybackRate not respected when set before source is loaded
4038         https://bugs.webkit.org/show_bug.cgi?id=140282
4039
4040         Reviewed by Eric Carlson.
4041
4042         Test: media/video-defaultplaybackrate-before-load.html
4043
4044         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
4045         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
4046         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
4047         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
4048         value. So the end result is that the value from defaultPlaybackRate is overwritten by
4049         the default value of 1 in MediaPlayer.
4050
4051         Rather than caching the requested rate in MediaPlayer, cache the value reported by
4052         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback<