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