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