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