Converting time, angle and frequency units in CSS calc() function
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-17  Chris Dumez  <cdumez@apple.com>
2
3         Converting time, angle and frequency units in CSS calc() function
4         https://bugs.webkit.org/show_bug.cgi?id=138356
5
6         Reviewed by Darin Adler.
7
8         Update CSSPrimitiveValue::primitiveType() to actually query the
9         primitiveType of the CSSCalcValue instead of assuming a given
10         type based on its category (e.g. If category is CalcTime, then
11         assume type is CSS_MS, even though it would be CSS_S as well).
12
13         This would like to calculation errors such as:
14         calc(4s + 1s) -> 5ms
15
16         Because we would assume the unit is CSS_MS without actually
17         checking.
18
19         This patch is inspired by the following Blink revision
20         by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
21         patch from <tmeszaros.u-szeged@partner.samsung.com>:
22         https://src.chromium.org/viewvc/blink?view=rev&revision=179101
23
24         Test: fast/css/calc-with-angle-time-frequency.html
25
26         * css/CSSCalculationValue.h:
27         (WebCore::CSSCalcValue::primitiveType):
28         * css/CSSPrimitiveValue.cpp:
29         (WebCore::CSSPrimitiveValue::primitiveType):
30
31 2015-01-17  Chris Dumez  <cdumez@apple.com>
32
33         Generate shorthandForProperty() implementation from CSSPropertyNames.in
34         https://bugs.webkit.org/show_bug.cgi?id=140556
35
36         Reviewed by Darin Adler.
37
38         Generate shorthandForProperty() implementation from CSSPropertyNames.in.
39         This is just a big switch() statement calling the right
40         StylePropertyShorthand factory function for a given CSSPropertyID.
41
42         * css/StylePropertyShorthand.cpp:
43         (WebCore::shorthandForProperty): Deleted.
44         * css/StylePropertyShorthand.h:
45         * css/makeprop.pl:
46
47 2015-01-16  Brent Fulgham  <bfulgham@apple.com>
48
49         [Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
50         https://bugs.webkit.org/show_bug.cgi?id=140564
51         <rdar://problem/19386426.
52
53         Reviewed by Dean Jackson.
54
55         * page/mac/EventHandlerMac.mm:
56         (WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
57         back into the loop!
58
59 2015-01-16  Zalan Bujtas  <zalan@apple.com>
60
61         When border-radius is present, inset/outset/groove/ridge border color changes.
62         https://bugs.webkit.org/show_bug.cgi?id=140551
63
64         Reviewed by Simon Fraser.
65
66         This patch applies the same color lighten/darken adjustment on the radius borders
67         that we use for non-radius border.
68
69         Test: fast/borders/wrong-border-color-when-radius-is-present.html
70
71         * rendering/RenderBoxModelObject.cpp:
72         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
73         * rendering/RenderObject.cpp:
74         (WebCore::RenderObject::calculateBorderStyleColor):
75         * rendering/RenderObject.h:
76
77 2015-01-16  Pratik Solanki  <psolanki@apple.com>
78
79         Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
80         -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
81         https://bugs.webkit.org/show_bug.cgi?id=140470
82
83         Reviewed by Alexey Proskuryakov.
84
85         Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
86         because NSURLConnection callbacks were always being scheduled on the main thread.
87
88         Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
89         thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
90         always being scheduled on the main thread regardless of whether we were using the NetworkProcess
91         (since the WebThread is only started when using WebKit1). This led to an assertion failure.
92         Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
93         NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
94         using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.
95
96         * platform/network/mac/ResourceHandleMac.mm:
97         (WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
98         of this code for iOS WebKit2 with the NetworkProcess.
99         (WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
100         schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
101         is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
102         which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
103         the NetworkProcess, respectively.
104
105 2015-01-16  Brian J. Burg  <burg@cs.washington.edu>
106
107         Web Replay: purge remaining PassRefPtr uses and minor cleanup
108         https://bugs.webkit.org/show_bug.cgi?id=140456
109
110         Reviewed by Andreas Kling.
111
112         Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
113         uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
114
115         Remove mistaken uses of AtomicString that were not removed as part of r174113.
116
117         No new tests, no behavior changed.
118
119         * inspector/InspectorReplayAgent.cpp:
120         (WebCore::SerializeInputToJSONFunctor::operator()):
121         (WebCore::SerializeInputToJSONFunctor::returnValue):
122         (WebCore::InspectorReplayAgent::sessionCreated):
123         (WebCore::InspectorReplayAgent::sessionModified):
124         (WebCore::InspectorReplayAgent::sessionLoaded):
125         (WebCore::InspectorReplayAgent::segmentCreated):
126         (WebCore::InspectorReplayAgent::segmentCompleted):
127         (WebCore::InspectorReplayAgent::segmentLoaded):
128         (WebCore::InspectorReplayAgent::switchSession):
129         (WebCore::InspectorReplayAgent::insertSessionSegment):
130         (WebCore::InspectorReplayAgent::removeSessionSegment):
131         (WebCore::InspectorReplayAgent::findSession):
132         (WebCore::InspectorReplayAgent::findSegment):
133         * inspector/InspectorReplayAgent.h:
134         * replay/CapturingInputCursor.cpp:
135         (WebCore::CapturingInputCursor::CapturingInputCursor):
136         (WebCore::CapturingInputCursor::create):
137         (WebCore::CapturingInputCursor::loadInput):
138         * replay/CapturingInputCursor.h:
139         * replay/EventLoopInputDispatcher.cpp:
140         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
141         * replay/EventLoopInputDispatcher.h:
142         * replay/FunctorInputCursor.h:
143         (WebCore::FunctorInputCursor::FunctorInputCursor):
144         (WebCore::FunctorInputCursor::loadInput):
145         * replay/ReplayController.cpp:
146         (WebCore::ReplayController::ReplayController):
147         (WebCore::ReplayController::setForceDeterministicSettings):
148         (WebCore::ReplayController::setSessionState):
149         (WebCore::ReplayController::setSegmentState):
150         (WebCore::ReplayController::switchSession):
151         (WebCore::ReplayController::createSegment):
152         (WebCore::ReplayController::completeSegment):
153         (WebCore::ReplayController::loadSegmentAtIndex):
154         (WebCore::ReplayController::unloadSegment):
155         (WebCore::ReplayController::frameNavigated):
156         (WebCore::ReplayController::loadedSession):
157         (WebCore::ReplayController::loadedSegment):
158         (WebCore::ReplayController::activeInputCursor):
159         (WebCore::ReplayController::dispatcher):
160         * replay/ReplayController.h:
161         * replay/ReplaySession.cpp:
162         (WebCore::ReplaySession::create):
163         (WebCore::ReplaySession::at):
164         (WebCore::ReplaySession::appendSegment):
165         (WebCore::ReplaySession::insertSegment):
166         (WebCore::ReplaySession::removeSegment):
167         * replay/ReplaySession.h:
168         * replay/ReplaySessionSegment.cpp:
169         (WebCore::ReplaySessionSegment::create):
170         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
171         * replay/ReplaySessionSegment.h:
172         * replay/ReplayingInputCursor.cpp:
173         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
174         (WebCore::ReplayingInputCursor::create):
175         (WebCore::ReplayingInputCursor::loadInput):
176         * replay/ReplayingInputCursor.h:
177         * replay/SegmentedInputStorage.cpp:
178         (WebCore::SegmentedInputStorage::store):
179         (WebCore::SegmentedInputStorage::queue):
180         (WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
181         * replay/SegmentedInputStorage.h:
182
183 2015-01-16  Andreas Kling  <akling@apple.com>
184
185         Remove assertion that Page::m_editorClient is non-null.
186
187         Unreviewed debug build fix. (It's a reference, it won't be null.)
188
189         * page/Page.cpp:
190         (WebCore::Page::Page):
191
192 2015-01-16  Andreas Kling  <akling@apple.com>
193
194         Page::editorClient() should return a reference.
195         <https://webkit.org/b/140552>
196
197         Reviewed by Chris Dumez.
198
199         Page always has an EditorClient, so make editorClient() return a reference.
200
201         * editing/AlternativeTextController.cpp:
202         (WebCore::AlternativeTextController::editorClient):
203         (WebCore::AlternativeTextController::textChecker):
204         * editing/Editor.cpp:
205         (WebCore::Editor::client):
206         * editing/SpellChecker.cpp:
207         (WebCore::SpellChecker::client):
208         * page/FocusController.cpp:
209         (WebCore::FocusController::setFocusedElement):
210         * page/Page.cpp:
211         (WebCore::Page::Page):
212         (WebCore::Page::~Page):
213         (WebCore::Page::clearUndoRedoOperations):
214         * page/Page.h:
215         (WebCore::Page::editorClient):
216         * page/scrolling/AsyncScrollingCoordinator.cpp:
217         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
218
219 2015-01-16  Benjamin Poulain  <benjamin@webkit.org>
220
221         Make URL filters case-insensitive by default
222         https://bugs.webkit.org/show_bug.cgi?id=140531
223
224         Reviewed by Andreas Kling.
225
226         Safari's filters were case-insensitive. Adopt that convention in the engine,
227         and add a flag in case someone ever need a case-sensitive filter.
228
229         * contentextensions/ContentExtensionRule.h:
230         * contentextensions/ContentExtensionsBackend.cpp:
231         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
232         * contentextensions/ContentExtensionsManager.cpp:
233         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
234         * contentextensions/URLFilterParser.cpp:
235         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
236         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
237         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
238         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
239         (WebCore::ContentExtensions::URLFilterParser::addPattern):
240         * contentextensions/URLFilterParser.h:
241
242 2015-01-16  Benjamin Poulain  <bpoulain@apple.com>
243
244         Add the alternative syntax for CSS Selector's descendant combinator (">>")
245         https://bugs.webkit.org/show_bug.cgi?id=140525
246
247         Reviewed by Antti Koivisto.
248
249         The latest Selector spec introduces the combinator ">>" as an alias for the descendant
250         relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators
251
252         This patch implements that combinator as an alias of the existing one. For CSSOM's selector
253         serialization, I use one bit of CSSSelector to store if that alternative syntax was used.
254
255         Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
256                fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
257                fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
258                fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
259                fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html
260
261         * css/CSSGrammar.y.in:
262         * css/CSSParserValues.cpp:
263         (WebCore::CSSParserSelector::appendTagHistory):
264         * css/CSSParserValues.h:
265         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
266         * css/CSSSelector.cpp:
267         (WebCore::CSSSelector::selectorText):
268         * css/CSSSelector.h:
269         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
270         (WebCore::CSSSelector::CSSSelector):
271
272 2015-01-16  Chris Dumez  <cdumez@apple.com>
273
274         Generate StylePropertyShorthand.* from CSSPropertyNames.in
275         https://bugs.webkit.org/show_bug.cgi?id=140501
276
277         Reviewed by Darin Adler.
278
279         Add initial support for having makeprop.pl generate most of
280         StylePropertyShorthand.* from CSSPropertyNames.in.
281
282         This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
283         more descriptive [Longhands=property1|property2|...] parameter. With
284         this information, makeprop.pl is now able to generate the
285         StylePropertyShorthand factories for all CSS shorthand properties
286         in a new StylePropertyShorthandFunctions.h header.
287
288         The switches in StylePropertyShorthand.cpp could also be generated
289         but this will be taken care of in follow-up patches to reduce patch
290         size.
291
292         * CMakeLists.txt:
293         * DerivedSources.make:
294         * WebCore.vcxproj/WebCore.vcxproj:
295         * WebCore.vcxproj/WebCore.vcxproj.filters:
296         * WebCore.xcodeproj/project.pbxproj:
297         * css/CSSComputedStyleDeclaration.cpp:
298         (WebCore::ComputedStyleExtractor::propertyValue):
299         * css/CSSParser.cpp:
300         (WebCore::CSSParser::parseValue):
301         * css/CSSPropertyNames.in:
302         * css/StyleProperties.cpp:
303         (WebCore::StyleProperties::getPropertyValue):
304         * css/StylePropertyShorthand.cpp:
305         (WebCore::shorthandForProperty):
306         (WebCore::matchingShorthandsForLonghand):
307         (WebCore::backgroundShorthand): Deleted.
308         (WebCore::backgroundPositionShorthand): Deleted.
309         (WebCore::backgroundRepeatShorthand): Deleted.
310         (WebCore::borderShorthand): Deleted.
311         (WebCore::borderBottomShorthand): Deleted.
312         (WebCore::borderColorShorthand): Deleted.
313         (WebCore::borderImageShorthand): Deleted.
314         (WebCore::borderLeftShorthand): Deleted.
315         (WebCore::borderRadiusShorthand): Deleted.
316         (WebCore::webkitBorderRadiusShorthand): Deleted.
317         (WebCore::borderRightShorthand): Deleted.
318         (WebCore::borderSpacingShorthand): Deleted.
319         (WebCore::borderStyleShorthand): Deleted.
320         (WebCore::borderTopShorthand): Deleted.
321         (WebCore::borderWidthShorthand): Deleted.
322         (WebCore::listStyleShorthand): Deleted.
323         (WebCore::marginShorthand): Deleted.
324         (WebCore::markerShorthand): Deleted.
325         (WebCore::outlineShorthand): Deleted.
326         (WebCore::overflowShorthand): Deleted.
327         (WebCore::paddingShorthand): Deleted.
328         (WebCore::transitionShorthand): Deleted.
329         (WebCore::animationShorthand): Deleted.
330         (WebCore::webkitAnimationShorthand): Deleted.
331         (WebCore::webkitBorderAfterShorthand): Deleted.
332         (WebCore::webkitBorderBeforeShorthand): Deleted.
333         (WebCore::webkitBorderEndShorthand): Deleted.
334         (WebCore::webkitBorderStartShorthand): Deleted.
335         (WebCore::webkitColumnsShorthand): Deleted.
336         (WebCore::webkitColumnRuleShorthand): Deleted.
337         (WebCore::flexFlowShorthand): Deleted.
338         (WebCore::flexShorthand): Deleted.
339         (WebCore::webkitMarginCollapseShorthand): Deleted.
340         (WebCore::webkitGridShorthand): Deleted.
341         (WebCore::webkitGridTemplateShorthand): Deleted.
342         (WebCore::webkitGridAreaShorthand): Deleted.
343         (WebCore::webkitGridColumnShorthand): Deleted.
344         (WebCore::webkitGridRowShorthand): Deleted.
345         (WebCore::webkitMarqueeShorthand): Deleted.
346         (WebCore::webkitMaskShorthand): Deleted.
347         (WebCore::webkitMaskPositionShorthand): Deleted.
348         (WebCore::webkitMaskRepeatShorthand): Deleted.
349         (WebCore::webkitTextDecorationShorthand): Deleted.
350         (WebCore::webkitTextEmphasisShorthand): Deleted.
351         (WebCore::webkitTextStrokeShorthand): Deleted.
352         (WebCore::webkitTransitionShorthand): Deleted.
353         (WebCore::webkitPerspectiveOriginShorthand): Deleted.
354         (WebCore::webkitTransformOriginShorthand): Deleted.
355         * css/StylePropertyShorthand.h:
356         * css/makeprop.pl:
357
358 2015-01-16  Commit Queue  <commit-queue@webkit.org>
359
360         Unreviewed, rolling out r178532.
361         https://bugs.webkit.org/show_bug.cgi?id=140548
362
363         Broke fast/css/parsing-css-lang.html on some bots (Requested
364         by ap on #webkit).
365
366         Reverted changeset:
367
368         "Canonicalization of :lang() should preserve the :lang()'s
369         arguments representations"
370         https://bugs.webkit.org/show_bug.cgi?id=139928
371         http://trac.webkit.org/changeset/178532
372
373 2015-01-16  Commit Queue  <commit-queue@webkit.org>
374
375         Unreviewed, rolling out r178577.
376         https://bugs.webkit.org/show_bug.cgi?id=140546
377
378         Broke fast/css-grid-layout/grid-content-sized-columns-
379         resolution.html (Requested by ap on #webkit).
380
381         Reverted changeset:
382
383         "[CSS Grid Layout] Tracks shrink sometimes with indefinite
384         remaining space"
385         https://bugs.webkit.org/show_bug.cgi?id=139059
386         http://trac.webkit.org/changeset/178577
387
388 2015-01-16  Andreas Kling  <akling@apple.com>
389
390         Some improvements to RuleSet shrinking.
391         <https://webkit.org/b/140534>
392
393         Reviewed by Antti Koivisto.
394
395         Give an inline capacity (1) to the RuleData Vectors in RuleSet.
396         The vast majority of Vectors have only a single entry, and this
397         avoids having to allocate a separate Vector backing store for them.
398
399         Also make sure to shrink some Vectors that we weren't already,
400         like those in RuleFeatureSet.
401
402         * css/ElementRuleCollector.cpp:
403         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
404         * css/ElementRuleCollector.h:
405         * css/RuleFeature.cpp:
406         (WebCore::RuleFeatureSet::shrinkToFit):
407         * css/RuleFeature.h:
408         * css/RuleSet.cpp:
409         (WebCore::RuleSet::addToRuleSet):
410         (WebCore::rulesCountForName):
411         (WebCore::shrinkMapVectorsToFit):
412         (WebCore::RuleSet::shrinkToFit):
413         * css/RuleSet.h:
414         (WebCore::RuleSet::idRules):
415         (WebCore::RuleSet::classRules):
416         (WebCore::RuleSet::tagRules):
417         (WebCore::RuleSet::shadowPseudoElementRules):
418         (WebCore::RuleSet::linkPseudoClassRules):
419         (WebCore::RuleSet::cuePseudoRules):
420         (WebCore::RuleSet::focusPseudoClassRules):
421         (WebCore::RuleSet::universalRules):
422
423 2015-01-16  Antti Koivisto  <antti@apple.com>
424
425         Correct naming for FontCascade implementation files
426         https://bugs.webkit.org/show_bug.cgi?id=140544
427
428         Reviewed by Zalan Bujtas.
429
430         Also reduce their number.
431
432         Merge FontFastPath.cpp into FontCascade.cpp
433         Merge FontMac.mm and FontComplexTextMac.cpp into FontCascadeCocoa.mm
434
435         * CMakeLists.txt:
436         * WebCore.vcxproj/WebCore.vcxproj:
437         * WebCore.xcodeproj/project.pbxproj:
438         * platform/graphics/FontCascade.cpp:
439         (WebCore::FontCascade::getEmphasisMarkGlyphData):
440         (WebCore::FontCascade::emphasisMarkAscent):
441         (WebCore::FontCascade::emphasisMarkDescent):
442         (WebCore::FontCascade::emphasisMarkHeight):
443         (WebCore::FontCascade::getGlyphsAndAdvancesForSimpleText):
444         (WebCore::FontCascade::drawSimpleText):
445         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
446         (WebCore::FontCascade::drawGlyphBuffer):
447         (WebCore::offsetToMiddleOfGlyph):
448         (WebCore::offsetToMiddleOfGlyphAtIndex):
449         (WebCore::FontCascade::drawEmphasisMarks):
450         (WebCore::FontCascade::floatWidthForSimpleText):
451         (WebCore::FontCascade::adjustSelectionRectForSimpleText):
452         (WebCore::FontCascade::offsetForPositionForSimpleText):
453         * platform/graphics/FontFastPath.cpp: Removed.
454         * platform/graphics/cocoa/FontCascadeCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
455         (WebCore::FontCascade::drawGlyphs):
456         (WebCore::FontCascade::adjustSelectionRectForComplexText):
457         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
458         (WebCore::FontCascade::drawComplexText):
459         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
460         (WebCore::FontCascade::floatWidthForComplexText):
461         (WebCore::FontCascade::offsetForPositionForComplexText):
462         (WebCore::FontCascade::fontDataForCombiningCharacterSequence):
463         * platform/graphics/mac/FontComplexTextMac.cpp: Removed.
464         * platform/graphics/mac/FontMac.mm: Removed.
465
466 2014-11-26  Sergio Villar Senin  <svillar@igalia.com>
467
468         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
469         https://bugs.webkit.org/show_bug.cgi?id=139059
470
471         Reviewed by David Hyatt.
472
473         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
474
475         * rendering/RenderGrid.cpp:
476         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
477
478 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
479
480         Remove ENABLE(SQL_DATABASE) guards
481         https://bugs.webkit.org/show_bug.cgi?id=140434
482
483         Reviewed by Darin Adler.
484
485         * Configurations/FeatureDefines.xcconfig:
486         * Modules/webdatabase/AbstractDatabaseServer.h:
487         * Modules/webdatabase/ChangeVersionData.h:
488         * Modules/webdatabase/ChangeVersionWrapper.cpp:
489         * Modules/webdatabase/ChangeVersionWrapper.h:
490         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
491         * Modules/webdatabase/DOMWindowWebDatabase.h:
492         * Modules/webdatabase/DOMWindowWebDatabase.idl:
493         * Modules/webdatabase/Database.cpp:
494         * Modules/webdatabase/Database.h:
495         * Modules/webdatabase/Database.idl:
496         * Modules/webdatabase/DatabaseBackend.cpp:
497         * Modules/webdatabase/DatabaseBackend.h:
498         * Modules/webdatabase/DatabaseBackendBase.cpp:
499         * Modules/webdatabase/DatabaseBackendBase.h:
500         * Modules/webdatabase/DatabaseBasicTypes.h:
501         * Modules/webdatabase/DatabaseCallback.h:
502         * Modules/webdatabase/DatabaseCallback.idl:
503         * Modules/webdatabase/DatabaseContext.cpp:
504         * Modules/webdatabase/DatabaseContext.h:
505         * Modules/webdatabase/DatabaseDetails.h:
506         * Modules/webdatabase/DatabaseError.h:
507         * Modules/webdatabase/DatabaseManager.cpp:
508         * Modules/webdatabase/DatabaseManager.h:
509         * Modules/webdatabase/DatabaseManagerClient.h:
510         * Modules/webdatabase/DatabaseServer.cpp:
511         * Modules/webdatabase/DatabaseServer.h:
512         * Modules/webdatabase/DatabaseTask.cpp:
513         * Modules/webdatabase/DatabaseTask.h:
514         * Modules/webdatabase/DatabaseThread.cpp:
515         * Modules/webdatabase/DatabaseThread.h:
516         * Modules/webdatabase/DatabaseTracker.cpp:
517         * Modules/webdatabase/DatabaseTracker.h:
518         * Modules/webdatabase/OriginLock.cpp:
519         * Modules/webdatabase/OriginLock.h:
520         * Modules/webdatabase/SQLCallbackWrapper.h:
521         * Modules/webdatabase/SQLError.h:
522         * Modules/webdatabase/SQLError.idl:
523         * Modules/webdatabase/SQLException.cpp:
524         * Modules/webdatabase/SQLException.h:
525         * Modules/webdatabase/SQLException.idl:
526         * Modules/webdatabase/SQLResultSet.cpp:
527         * Modules/webdatabase/SQLResultSet.h:
528         * Modules/webdatabase/SQLResultSet.idl:
529         * Modules/webdatabase/SQLResultSetRowList.cpp:
530         * Modules/webdatabase/SQLResultSetRowList.h:
531         * Modules/webdatabase/SQLResultSetRowList.idl:
532         * Modules/webdatabase/SQLStatement.cpp:
533         * Modules/webdatabase/SQLStatement.h:
534         * Modules/webdatabase/SQLStatementBackend.cpp:
535         * Modules/webdatabase/SQLStatementBackend.h:
536         * Modules/webdatabase/SQLStatementCallback.h:
537         * Modules/webdatabase/SQLStatementCallback.idl:
538         * Modules/webdatabase/SQLStatementErrorCallback.h:
539         * Modules/webdatabase/SQLStatementErrorCallback.idl:
540         * Modules/webdatabase/SQLTransaction.cpp:
541         * Modules/webdatabase/SQLTransaction.h:
542         * Modules/webdatabase/SQLTransaction.idl:
543         * Modules/webdatabase/SQLTransactionBackend.cpp:
544         * Modules/webdatabase/SQLTransactionBackend.h:
545         * Modules/webdatabase/SQLTransactionCallback.h:
546         * Modules/webdatabase/SQLTransactionCallback.idl:
547         * Modules/webdatabase/SQLTransactionClient.cpp:
548         * Modules/webdatabase/SQLTransactionClient.h:
549         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
550         * Modules/webdatabase/SQLTransactionCoordinator.h:
551         * Modules/webdatabase/SQLTransactionErrorCallback.h:
552         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
553         * Modules/webdatabase/SQLTransactionState.h:
554         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
555         * Modules/webdatabase/SQLTransactionStateMachine.h:
556         * bindings/js/JSCommandLineAPIHostCustom.cpp:
557         (WebCore::JSCommandLineAPIHost::databaseId):
558         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
559         * bindings/js/JSExceptionBase.cpp:
560         (WebCore::toExceptionBase):
561         * bindings/js/JSSQLResultSetRowListCustom.cpp:
562         * bindings/js/JSSQLTransactionCustom.cpp:
563         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
564         (webkit_dom_test_callback_finalize):
565         (webkit_dom_test_callback_constructor):
566         (webkit_dom_test_callback_callback_with_no_param):
567         (webkit_dom_test_callback_callback_with_array_param):
568         (webkit_dom_test_callback_callback_with_serialized_script_value_param):
569         (webkit_dom_test_callback_callback_with_non_bool_return_type):
570         (webkit_dom_test_callback_callback_with_string_list):
571         (webkit_dom_test_callback_callback_with_boolean):
572         (webkit_dom_test_callback_callback_requires_this_to_pass):
573         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
574         * bindings/scripts/test/JS/JSTestCallback.cpp:
575         * bindings/scripts/test/JS/JSTestCallback.h:
576         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
577         * bindings/scripts/test/TestCallback.idl:
578         * dom/DOMExceptions.in:
579         * dom/ScriptExecutionContext.cpp:
580         (WebCore::ScriptExecutionContext::setDatabaseContext):
581         * dom/ScriptExecutionContext.h:
582         * history/PageCache.cpp:
583         (WebCore::logCanCacheFrameDecision):
584         (WebCore::PageCache::canCachePageContainingThisFrame):
585         * inspector/CommandLineAPIHost.cpp:
586         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
587         (WebCore::CommandLineAPIHost::disconnect):
588         (WebCore::CommandLineAPIHost::databaseIdImpl):
589         * inspector/CommandLineAPIHost.h:
590         (WebCore::CommandLineAPIHost::init):
591         * inspector/InspectorController.cpp:
592         (WebCore::InspectorController::InspectorController):
593         * inspector/InspectorDatabaseAgent.cpp:
594         * inspector/InspectorDatabaseAgent.h:
595         * inspector/InspectorDatabaseInstrumentation.h:
596         (WebCore::InspectorInstrumentation::didOpenDatabase):
597         * inspector/InspectorDatabaseResource.cpp:
598         * inspector/InspectorDatabaseResource.h:
599         * inspector/InspectorInstrumentation.cpp:
600         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
601         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
602         * inspector/InspectorInstrumentation.h:
603         * inspector/InstrumentingAgents.cpp:
604         (WebCore::InstrumentingAgents::InstrumentingAgents):
605         (WebCore::InstrumentingAgents::reset):
606         * inspector/InstrumentingAgents.h:
607         * inspector/WorkerInspectorController.cpp:
608         (WebCore::WorkerInspectorController::WorkerInspectorController):
609         * loader/EmptyClients.h:
610         * loader/FrameLoader.cpp:
611         (WebCore::FrameLoader::stopLoading):
612         * page/ChromeClient.h:
613         * platform/FeatureCounterKeys.h:
614
615 2015-01-15  Zalan Bujtas  <zalan@apple.com>
616
617         Element appears correctly but does not receive event with a large translation.
618         https://bugs.webkit.org/show_bug.cgi?id=139815
619
620         Reviewed by Simon Fraser.
621
622         When the hit point gets translated beyond the min/max value of LayoutRect (infiniteRect()),
623         we fail to find the corresponding layer.
624         When there's no clipping on a layer, we use min/max values to represent infiniteness.
625         However it does not work well across types. With IntPoint(hittest) we can address a point that's outside
626         of LayoutRect's boundary(clipping).
627         This patch addresses the immediate issue of not being able to hittest transformed layers properly. 
628         Fixing the representation of infiniteness is tracked here: webkit.org/b/140533
629
630         Test: transforms/hittest-translated-content-off-to-infinity-and-back.html
631
632         * rendering/ClipRect.cpp:
633         (WebCore::ClipRect::intersects):
634
635 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
636
637         tables/mozilla/bugs/bug10633.html is flakey on Yosemite
638         https://bugs.webkit.org/show_bug.cgi?id=140487
639
640         Reviewed by Simon Fraser.
641
642         The workaround in https://bugs.webkit.org/show_bug.cgi?id=140253 works
643         on both OSes.
644
645         * platform/graphics/mac/SimpleFontDataMac.mm:
646         (WebCore::SimpleFontData::platformInit):
647
648 2015-01-15  Ryosuke Niwa  <rniwa@webkit.org>
649
650         Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
651         https://bugs.webkit.org/show_bug.cgi?id=140523
652         <rdar://problem/19464329>
653
654         Reviewed by Chris Dumez.
655
656         The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
657         unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.
658
659         Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
660         we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".
661
662         See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.
663
664         * html/HTMLElement.cpp:
665         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
666
667 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
668
669         RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
670         https://bugs.webkit.org/show_bug.cgi?id=140477.
671
672         Reviewed by Simon Fraser.
673
674         * rendering/RenderLayerCompositor.cpp:
675         (WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
676         code clearer.
677
678 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
679
680         Unreviewed, rolling out r178531.
681
682         Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.
683
684         Reverted changeset:
685
686         "Layers need to be already updated before we call adjustViewSize."
687         https://bugs.webkit.org/show_bug.cgi?id=135514
688         http://trac.webkit.org/changeset/178531
689
690         * page/FrameView.cpp:
691         (WebCore::FrameView::layout):
692         (WebCore::FrameView::updateCompositingLayersAfterScrolling):
693         (WebCore::FrameView::paintContents):
694         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
695         * page/FrameView.h:
696         * platform/ScrollView.cpp:
697         (WebCore::ScrollView::scrollTo):
698         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
699         * platform/ScrollView.h:
700         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
701
702 2015-01-15  Chris Dumez  <cdumez@apple.com>
703
704         [WK2] Wire diagnostic logging messages through the UIProcess
705         https://bugs.webkit.org/show_bug.cgi?id=140486
706
707         Reviewed by Sam Weinig.
708
709         Wire diagnostic logging messages through the UIProcess.
710         Eventually, the corresponding bundle API should go away.
711
712         * WebCore.vcxproj/WebCore.vcxproj:
713         * WebCore.vcxproj/WebCore.vcxproj.filters:
714         Add page/DiagnosticLoggingResultType.h to Windows project.
715
716         * WebCore.xcodeproj/project.pbxproj:
717         Add page/DiagnosticLoggingResultType.h to XCode project.
718
719         * html/HTMLMediaElement.cpp:
720         * loader/EmptyClients.h:
721         * loader/FrameLoader.cpp:
722         * page/DiagnosticLoggingClient.h:
723         * page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
724         Use new DiagnosticLoggingResultType enum instead of old
725         DiagnosticLoggingClient::LogType one.
726
727 2015-01-15  Zalan Bujtas  <zalan@apple.com>
728
729         Reduce LayoutRect::infiniteRect() usage.
730         https://bugs.webkit.org/show_bug.cgi?id=140511
731
732         Reviewed by Simon Fraser.
733
734         This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().
735
736         No change in functionality.
737
738         * platform/graphics/LayoutRect.h:
739         (WebCore::LayoutRect::isInfinite):
740         * rendering/ClipRect.h:
741         (WebCore::ClipRect::reset):
742         (WebCore::ClipRect::isEmpty):
743         (WebCore::ClipRect::isInfinite):
744         (WebCore::ClipRect::setRect): Deleted.
745         * rendering/PaintInfo.h:
746         (WebCore::PaintInfo::applyTransform):
747         * rendering/RenderLayer.cpp:
748         (WebCore::RenderLayer::calculateClipRects):
749         * rendering/RenderLayer.h:
750         (WebCore::ClipRects::reset):
751         * rendering/RenderLayerBacking.cpp:
752         (WebCore::RenderLayerBacking::updateGeometry):
753         * rendering/RenderLayerCompositor.cpp:
754         (WebCore::RenderLayerCompositor::clippedByAncestor):
755
756 2015-01-15  Chris Dumez  <cdumez@apple.com>
757
758         Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
759         https://bugs.webkit.org/show_bug.cgi?id=140521
760
761         Reviewed by Alexey Proskuryakov.
762
763         Close the CSSPropertyNames.gperf file before calling gperf on it
764         to make sure the content we wrote was flushed. This was causing
765         intermittent build failures.
766
767         * css/makeprop.pl:
768
769 2015-01-15  Zalan Bujtas  <zalan@apple.com>
770
771         LayerFragment should be able to intersect with ClipRect.
772         https://bugs.webkit.org/show_bug.cgi?id=140498
773
774         Reviewed by Simon Fraser.
775
776         No change in functionality.
777
778         * rendering/LayerFragment.h:
779         (WebCore::LayerFragment::intersect):
780         * rendering/RenderLayer.cpp:
781         (WebCore::RenderLayer::collectFragments):
782
783 2015-01-15  Zalan Bujtas  <zalan@apple.com>
784
785         Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
786         https://bugs.webkit.org/show_bug.cgi?id=140461
787
788         Reviewed by Simon Fraser.
789
790         Move classes only used by RenderLayer to RenderLayer.cpp.
791
792         No change in functionality.
793
794         * rendering/RenderLayer.cpp:
795         (WebCore::ClipRects::create):
796         (WebCore::ClipRects::reset):
797         (WebCore::ClipRects::overflowClipRect):
798         (WebCore::ClipRects::setOverflowClipRect):
799         (WebCore::ClipRects::fixedClipRect):
800         (WebCore::ClipRects::setFixedClipRect):
801         (WebCore::ClipRects::posClipRect):
802         (WebCore::ClipRects::setPosClipRect):
803         (WebCore::ClipRects::fixed):
804         (WebCore::ClipRects::setFixed):
805         (WebCore::ClipRects::ref):
806         (WebCore::ClipRects::deref):
807         (WebCore::ClipRects::operator==):
808         (WebCore::ClipRects::operator=):
809         (WebCore::ClipRects::ClipRects):
810         (WebCore::ClipRectsCache::ClipRectsCache):
811         (WebCore::ClipRectsCache::getClipRects):
812         (WebCore::ClipRectsCache::setClipRects):
813         (WebCore::ClipRectsCache::getIndex):
814         (WebCore::RenderLayer::clipRects):
815         (WebCore::RenderLayer::calculateClipRects):
816         * rendering/RenderLayer.h:
817         (WebCore::ClipRects::create): Deleted.
818         (WebCore::ClipRects::ClipRects): Deleted.
819         (WebCore::ClipRects::reset): Deleted.
820         (WebCore::ClipRects::overflowClipRect): Deleted.
821         (WebCore::ClipRects::setOverflowClipRect): Deleted.
822         (WebCore::ClipRects::fixedClipRect): Deleted.
823         (WebCore::ClipRects::setFixedClipRect): Deleted.
824         (WebCore::ClipRects::posClipRect): Deleted.
825         (WebCore::ClipRects::setPosClipRect): Deleted.
826         (WebCore::ClipRects::fixed): Deleted.
827         (WebCore::ClipRects::setFixed): Deleted.
828         (WebCore::ClipRects::ref): Deleted.
829         (WebCore::ClipRects::deref): Deleted.
830         (WebCore::ClipRects::operator==): Deleted.
831         (WebCore::ClipRects::operator=): Deleted.
832         (WebCore::ClipRectsCache::ClipRectsCache): Deleted.
833         (WebCore::ClipRectsCache::getClipRects): Deleted.
834         (WebCore::ClipRectsCache::setClipRects): Deleted.
835         (WebCore::ClipRectsCache::getIndex): Deleted.
836
837 2015-01-15  Dhi Aurrahman  <diorahman@rockybars.com>
838
839         Canonicalization of :lang() should preserve the :lang()'s arguments representations
840         https://bugs.webkit.org/show_bug.cgi?id=139928
841
842         Reviewed by Benjamin Poulain.
843
844         Preserve the representation of IDENT and STRING when serializing the 
845         :lang(). For example, :lang(foo,"bar"   ,baz) should be serialized as 
846         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
847
848         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
849         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
850         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList 
851         respectively, since those methods are being exclusively used in respect
852         with :lang().
853
854         Update the test of serializing :lang() with IDENT and STRING arguments.
855
856         * css/CSSGrammar.y.in:
857         * css/CSSParserValues.cpp:
858         (WebCore::CSSParserSelector::setLangArgumentList):
859         (WebCore::CSSParserSelector::setArgumentList): Deleted.
860         * css/CSSParserValues.h:
861         (WebCore::CSSParserString::init):
862         (WebCore::CSSParserString::clear):
863         (WebCore::CSSParserString::isParsedFromString):
864         (WebCore::CSSParserString::setParsedFromString):
865         * css/CSSSelector.cpp:
866         (WebCore::appendLangArgumentList):
867         (WebCore::CSSSelector::selectorText):
868         (WebCore::CSSSelector::setLangArgumentList):
869         (WebCore::appendArgumentList): Deleted.
870         (WebCore::CSSSelector::setArgumentList): Deleted.
871         * css/CSSSelector.h:
872         (WebCore::CSSSelector::langArgumentList):
873         (WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
874         (WebCore::CSSSelector::argumentList): Deleted.
875         * css/SelectorChecker.cpp:
876         (WebCore::SelectorChecker::checkOne):
877
878 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
879
880         Layers need to be already updated before we call adjustViewSize
881         https://bugs.webkit.org/show_bug.cgi?id=135514
882
883         Reviewed by Simon Fraser.
884
885         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
886
887         Defer updating scrollbars until we have finished layout. This
888         has a couple of benefits:
889         (1) We do not attempt to modify render layers during layout.
890         (2) In WK1 we do not attempt to paint during layout.
891
892         Add a new virtual predicate to ScrollView indicating when we are in
893         layout so that calls to setContentsSize do not attempt
894         to adjust scrollbars.
895
896         Modify FrameView to set its ScrollView state to block drawing
897         scrollbar updates during layout. Also add a post-layout
898         handler to complete the scrollbar updates after layout is
899         finished.
900
901         * page/FrameView.cpp:
902         (WebCore::FrameView::layout):
903         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
904         * page/FrameView.h:
905         * platform/ScrollView.cpp:
906         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
907         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
908         the scroll delta and apply it after the layout is complete.
909         * platform/ScrollView.h:
910         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
911
912 2015-01-15  Benjamin Poulain  <benjamin@webkit.org>
913
914         When building the NFA of the global disjunction, share the prefix subgraph of existing subpatterns
915         https://bugs.webkit.org/show_bug.cgi?id=140465
916
917         Reviewed by Andreas Kling.
918
919         This patch updates the parser to produce smaller graphs when multiple patterns
920         of the rule list share a common prefix.
921
922         Previously, GraphBuilder would generate subgraph in place of each parsed
923         atom. We now only create subgraph if an atom does not appear in the prefix tree.
924
925         We accumulate the parsing information into small uint16_t named TrivialAtom.
926         When generating the subgraph for an new atom, we first check if the prefix tree already
927         has a corresponding subgraph for that atom. If it does, we do not generate anything and we extend the existing
928         graph. If there is no existing prefix, we create the subgraph and extend the prefix tree.
929
930         Sharing prefix subtrees slows down the subtree generation a bit but the resulting graph is much
931         simpler for many kind of inputs.
932
933         * WebCore.xcodeproj/project.pbxproj:
934         * contentextensions/ContentExtensionsBackend.cpp:
935         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
936         The URLFilterParser now maintains states (the prefix tree) between patterns.
937
938         * contentextensions/DFA.cpp:
939         (WebCore::ContentExtensions::DFA::debugPrintDot):
940         * contentextensions/DFANode.h:
941         Fix a typo :)
942
943         * contentextensions/NFA.cpp:
944         (WebCore::ContentExtensions::NFA::createNode):
945         (WebCore::ContentExtensions::NFA::setFinal):
946         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
947         (WebCore::ContentExtensions::NFA::addRuleId):
948         (WebCore::ContentExtensions::NFA::debugPrintDot):
949         * contentextensions/NFA.h:
950         (WebCore::ContentExtensions::NFA::addRuleId):
951         * contentextensions/NFANode.cpp: Removed.
952         * contentextensions/NFANode.h:
953         NFA nodes from two patterns are now "merged" by construction, thus we need
954         to keep track of multiple rules per node.
955
956         * contentextensions/NFAToDFA.cpp:
957         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
958         * contentextensions/URLFilterParser.cpp:
959         (WebCore::ContentExtensions::trivialAtomFromAsciiCharacter):
960         (WebCore::ContentExtensions::quantifyTrivialAtom):
961         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin):
962         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
963         (WebCore::ContentExtensions::GraphBuilder::m_LastPrefixTreeEntry):
964         (WebCore::ContentExtensions::GraphBuilder::finalize):
965         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
966         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
967         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
968         (WebCore::ContentExtensions::GraphBuilder::fail):
969         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
970         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
971         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
972         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
973         (WebCore::ContentExtensions::URLFilterParser::addPattern):
974         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom): Deleted.
975         (WebCore::ContentExtensions::URLFilterParser::parse): Deleted.
976         * contentextensions/URLFilterParser.h:
977         (WebCore::ContentExtensions::URLFilterParser::hasError): Deleted.
978         (WebCore::ContentExtensions::URLFilterParser::errorMessage): Deleted.
979
980 2015-01-14  Alexey Proskuryakov  <ap@apple.com>
981
982         Web Inspector and regular console use different source code locations for messages
983         https://bugs.webkit.org/show_bug.cgi?id=140478
984
985         Reviewed by Brian Burg.
986
987         We now create a ConsoleMessage object in a place where we can look at it and use
988         the source location it computed in a client call.
989
990         * inspector/InspectorConsoleInstrumentation.h:
991         (WebCore::InspectorInstrumentation::addMessageToConsole):
992         * inspector/InspectorInstrumentation.cpp:
993         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
994         * inspector/InspectorInstrumentation.h:
995         * inspector/WebConsoleAgent.cpp:
996         (WebCore::WebConsoleAgent::didFinishXHRLoading):
997         (WebCore::WebConsoleAgent::didReceiveResponse):
998         (WebCore::WebConsoleAgent::didFailLoading):
999         * page/PageConsoleClient.cpp:
1000         (WebCore::PageConsoleClient::addMessage):
1001         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
1002         * workers/WorkerGlobalScope.cpp:
1003         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
1004
1005 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1006
1007         [Win] Unreviewed Windows build fix.
1008
1009         More missing Font->FontCascade changes.
1010
1011         * platform/win/WebCoreTextRenderer.cpp:
1012         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1013         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1014
1015 2015-01-15  Antti Koivisto  <antti@apple.com>
1016
1017         REGRESSION(r178133): Membuster regressed ~4%
1018         https://bugs.webkit.org/show_bug.cgi?id=140495
1019
1020         Reviewed by Andreas Kling.
1021
1022         * platform/graphics/FontCache.cpp:
1023         (WebCore::FontCache::purgeInactiveFontData):
1024
1025             Fonts may ref other fonts. Keep clearing until there are no changes.
1026
1027 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1028
1029         [Win] Unreviewed build fix.
1030
1031         * platform/graphics/win/FontCacheWin.cpp:
1032         * platform/win/DragImageWin.cpp:
1033         * platform/win/WebCoreTextRenderer.h:
1034
1035 2015-01-15  Antti Koivisto  <antti@apple.com>
1036
1037         Try to fix windows build.
1038
1039         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1040         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1041         (PlatformCALayerWinInternal::displayCallback):
1042         * platform/win/DragImageWin.cpp:
1043         (WebCore::dragLabelFont):
1044         (WebCore::createDragImageForLink):
1045         * platform/win/PopupMenuWin.cpp:
1046         (WebCore::PopupMenuWin::calculatePositionAndSize):
1047         (WebCore::PopupMenuWin::paint):
1048         * platform/win/WebCoreTextRenderer.cpp:
1049         (WebCore::doDrawTextAtPoint):
1050         (WebCore::WebCoreDrawDoubledTextAtPoint):
1051         (WebCore::WebCoreTextFloatWidth):
1052         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1053         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1054         * rendering/RenderThemeSafari.cpp:
1055         (WebCore::RenderThemeSafari::setFontFromControlSize):
1056
1057 2015-01-15  Antti Koivisto  <antti@apple.com>
1058
1059         Unreviewed, rolling out r178518.
1060
1061         Didn't mean to commit some of this
1062
1063         Reverted changeset:
1064
1065         "Try to fix windows build."
1066         http://trac.webkit.org/changeset/178518
1067
1068 2015-01-15  Antti Koivisto  <antti@apple.com>
1069
1070         Try to fix windows build.
1071
1072         * platform/graphics/Font.cpp: Copied from Source/WebCore/platform/graphics/SimpleFontData.cpp.
1073         * platform/graphics/Font.h: Copied from Source/WebCore/platform/graphics/SimpleFontData.h.
1074         * platform/graphics/FontCascadeFastPath.cpp: Copied from Source/WebCore/platform/graphics/FontFastPath.cpp.
1075         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1076         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1077         (PlatformCALayerWinInternal::displayCallback):
1078         * platform/graphics/ios/FontIOS.mm: Copied from Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm.
1079         * platform/graphics/mac/FontCascadeComplexTextMac.cpp: Copied from Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp.
1080         * platform/graphics/mac/FontCascadeMac.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
1081         * platform/graphics/mac/FontCoreText.cpp: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp.
1082         * platform/graphics/mac/FontMac.mm: Replaced with Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
1083         * platform/win/DragImageWin.cpp:
1084         (WebCore::dragLabelFont):
1085         (WebCore::createDragImageForLink):
1086         * platform/win/PopupMenuWin.cpp:
1087         (WebCore::PopupMenuWin::calculatePositionAndSize):
1088         (WebCore::PopupMenuWin::paint):
1089         * platform/win/WebCoreTextRenderer.cpp:
1090         (WebCore::doDrawTextAtPoint):
1091         (WebCore::WebCoreDrawDoubledTextAtPoint):
1092         (WebCore::WebCoreTextFloatWidth):
1093         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1094         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1095         * rendering/RenderThemeSafari.cpp:
1096         (WebCore::RenderThemeSafari::setFontFromControlSize):
1097
1098 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
1099
1100         http/tests/misc/acid3.html is flakey on Mavericks
1101         https://bugs.webkit.org/show_bug.cgi?id=140253
1102
1103         Reviewed by Alexey Proskuryakov.
1104
1105         CoreText has a bug <rdar://problem/19433490> in which kerning is not applied for a font
1106         if a CTTypesetter is created using that font before a call to CTFontTransformGlyphs. We
1107         often create typesetters in the complex code path, so it's not obvious when this bug
1108         might present itself. This patch simply makes a dummy invocation of
1109         CTFontTransformGlyphs() when creating a SimpleFontData.
1110
1111         No new tests because this is covered by http/tests/misc/acid3.html.
1112
1113         * platform/graphics/mac/SimpleFontDataMac.mm:
1114         (WebCore::SimpleFontData::platformInit):
1115
1116 2015-01-15  Chris Dumez  <cdumez@apple.com>
1117
1118         Get rid of custom StyleBuilder code for 'line-height' CSS property
1119         https://bugs.webkit.org/show_bug.cgi?id=140462
1120
1121         Reviewed by Antti Koivisto.
1122
1123         Get rid of custom StyleBuilder code for 'line-height' CSS property by
1124         using a conditional converter.
1125
1126         * css/CSSPropertyNames.in:
1127         * css/StyleBuilderConverter.h:
1128         (WebCore::StyleBuilderConverter::convertLineHeight):
1129         * css/StyleBuilderCustom.h:
1130         (WebCore::StyleBuilderCustom::applyValueLineHeight):
1131         (WebCore::StyleBuilderCustom::convertLineHeight): Deleted.
1132
1133 2015-01-15  Antti Koivisto  <antti@apple.com>
1134
1135         Rename Font to FontCascade
1136         https://bugs.webkit.org/show_bug.cgi?id=140442
1137
1138         Reviewed by Darin Adler.
1139
1140         We can then rename SimpleFontData to Font. This will match the usual definition of a "font".
1141
1142 2015-01-15  Mihnea Ovidenie  <mihnea@adobe.com>
1143
1144         [CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
1145         https://bugs.webkit.org/show_bug.cgi?id=140441
1146
1147         Reviewed by Andrei Bucur.
1148
1149         When showing the render tree debug information for an element inside a flow thread,
1150         we will display the region range information for all the render boxes. To avoid
1151         computation of flow thread containing block in these situations, we will use
1152         only the cached flow thread containing block information.
1153
1154         No new tests as this code path is only touched when using showRenderTree* methods.
1155
1156         * rendering/RenderObject.cpp:
1157         (WebCore::flowThreadContainingBlockFromRenderer):
1158         (WebCore::RenderObject::showRegionsInformation):
1159
1160 2015-01-14  Simon Fraser  <simon.fraser@apple.com>
1161
1162         Graphics corruption after Find on some pages
1163         https://bugs.webkit.org/show_bug.cgi?id=140489
1164
1165         Reviewed by Zalan Bujtas.
1166         
1167         After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
1168         garbage could appear on some parts of the page. This is caused by creating
1169         a compositing layer which is marked as opaque, yet failing to paint the entire
1170         layer contents.
1171         
1172         This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
1173         logic. On the page in question, doing a Find could cause overflow:hidden sections
1174         to get scrolled (since Find can reveal the selection by scrolling overflow).
1175         However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
1176         fails to take overflow scrolling into account, so gives the wrong answer
1177         in some content configurations. As a result, we'd think that the background
1178         is obscured, and never paint it.
1179         
1180         Conservative fix is to have isCandidateForOpaquenessTest() return false
1181         when the content has any non-zero scroll offset.
1182
1183         Tests: compositing/contents-opaque/opaque-with-scrolled.html
1184                fast/backgrounds/opaque-scrolled-paint-background.html
1185
1186         * rendering/RenderBox.cpp:
1187         (WebCore::isCandidateForOpaquenessTest):
1188
1189 2015-01-14  Jer Noble  <jer.noble@apple.com>
1190
1191         [Mac][MSE] Stalled YouTube playback does not allow display to sleep.
1192         https://bugs.webkit.org/show_bug.cgi?id=140468
1193         rdar://problem/19171162
1194
1195         Reviewed by Eric Carlson.
1196
1197         Test: media/media-source/media-source-stalled-holds-sleep-assertion.html
1198
1199         The unstated convention of MediaPlayerPrivate::paused() is that implementations should 
1200         return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC
1201         was returning 'false' if it was supposed to be playing, regardless of the actual rate.
1202         This caused a check in HTMLMediaElement of whether to release the sleep assertion token
1203         to fail, thinking the media engine was still playing.
1204
1205         Add some testing infrastructure to allow us to test whether the media element is disabling
1206         display sleep from within layout tests.
1207
1208         * html/HTMLMediaElement.h:
1209         (WebCore::HTMLMediaElement::isDisablingSleep):
1210         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1211         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
1212         * testing/Internals.cpp:
1213         (WebCore::Internals::elementIsBlockingDisplaySleep):
1214         * testing/Internals.h:
1215         * testing/Internals.idl:
1216
1217 2015-01-14  Zalan Bujtas  <zalan@apple.com>
1218
1219         Move LayoutFragment and ClipRect to their own files.
1220         https://bugs.webkit.org/show_bug.cgi?id=140457
1221
1222         Reviewed by Simon Fraser.
1223
1224         Move these classes to their own files to to make RenderLayer.h less heavy.
1225
1226         No change in functionality.
1227
1228         * WebCore.xcodeproj/project.pbxproj:
1229         * rendering/ClipRect.cpp: Added.
1230         (WebCore::ClipRect::intersects):
1231         * rendering/ClipRect.h: Added.
1232         (WebCore::ClipRect::ClipRect):
1233         (WebCore::ClipRect::rect):
1234         (WebCore::ClipRect::setRect):
1235         (WebCore::ClipRect::affectedByRadius):
1236         (WebCore::ClipRect::setAffectedByRadius):
1237         (WebCore::ClipRect::operator==):
1238         (WebCore::ClipRect::operator!=):
1239         (WebCore::ClipRect::intersect):
1240         (WebCore::ClipRect::move):
1241         (WebCore::ClipRect::moveBy):
1242         (WebCore::ClipRect::isEmpty):
1243         (WebCore::ClipRect::intersects):
1244         (WebCore::ClipRect::inflateX):
1245         (WebCore::ClipRect::inflateY):
1246         (WebCore::ClipRect::inflate):
1247         (WebCore::intersection):
1248         * rendering/LayerFragment.h: Added.
1249         (WebCore::LayerFragment::setRects):
1250         (WebCore::LayerFragment::moveBy):
1251         (WebCore::LayerFragment::intersect):
1252         * rendering/RenderFlowThread.h:
1253         * rendering/RenderLayer.cpp:
1254         (WebCore::ClipRect::intersects): Deleted.
1255         * rendering/RenderLayer.h:
1256         (WebCore::ClipRect::ClipRect): Deleted.
1257         (WebCore::ClipRect::rect): Deleted.
1258         (WebCore::ClipRect::setRect): Deleted.
1259         (WebCore::ClipRect::affectedByRadius): Deleted.
1260         (WebCore::ClipRect::setAffectedByRadius): Deleted.
1261         (WebCore::ClipRect::operator==): Deleted.
1262         (WebCore::ClipRect::operator!=): Deleted.
1263         (WebCore::ClipRect::intersect): Deleted.
1264         (WebCore::ClipRect::move): Deleted.
1265         (WebCore::ClipRect::moveBy): Deleted.
1266         (WebCore::ClipRect::isEmpty): Deleted.
1267         (WebCore::ClipRect::intersects): Deleted.
1268         (WebCore::ClipRect::inflateX): Deleted.
1269         (WebCore::ClipRect::inflateY): Deleted.
1270         (WebCore::ClipRect::inflate): Deleted.
1271         (WebCore::intersection): Deleted.
1272         (WebCore::LayerFragment::LayerFragment): Deleted.
1273         (WebCore::LayerFragment::setRects): Deleted.
1274         (WebCore::LayerFragment::moveBy): Deleted.
1275         (WebCore::LayerFragment::intersect): Deleted.
1276         * rendering/RenderMultiColumnSet.h:
1277         * rendering/RenderRegion.h:
1278         * rendering/RenderTreeAsText.cpp:
1279
1280 2015-01-14  Commit Queue  <commit-queue@webkit.org>
1281
1282         Unreviewed, rolling out r178438.
1283         https://bugs.webkit.org/show_bug.cgi?id=140484
1284
1285         Broke a few MediaSource tests (Requested by JoePeck on
1286         #webkit).
1287
1288         Reverted changeset:
1289
1290         "[MSE] Implement per TrackBuffer buffered."
1291         https://bugs.webkit.org/show_bug.cgi?id=139813
1292         http://trac.webkit.org/changeset/178438
1293
1294 2015-01-14  Enrica Casucci  <enrica@apple.com>
1295
1296         REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
1297         https://bugs.webkit.org/show_bug.cgi?id=137902
1298         rdar://problem/18568864
1299
1300         Reviewed by Darin Adler.
1301
1302         Test: editing/text-iterator/invalid-subrange.html
1303
1304         characterSubrange should check the iterator position after each advance.
1305         This changed adds a new method to the Internals object to be able to test this.
1306
1307         * editing/TextIterator.cpp:
1308         (WebCore::characterSubrange):
1309         (WebCore::TextIterator::subrange):
1310         (WebCore::findPlainText):
1311         * testing/Internals.cpp:
1312         (WebCore::Internals::subrange):
1313         * testing/Internals.h:
1314         * testing/Internals.idl:
1315
1316 2015-01-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
1317
1318         REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
1319         https://bugs.webkit.org/show_bug.cgi?id=139690.
1320
1321         Reviewed by Daniel Bates.
1322
1323         Before r154769, we were calling Traversal<SVGTitleElement>::firstWithin(), which returns
1324         the first immediate SVGTitleElement child. In r154769, Traversal<SVGTitleElement>::firstWithin()
1325         was replaced by descendantsOfType<SVGTitleElement> which returns all descendants SVGTitleElements.
1326         Then we were returning the first element of these descendants, which may not be an immediate
1327         child of the element, as the title of the SVGElement. This was the reason of this bug. The
1328         fix is to use childrenOfType<SVGTitleElement>() instead, which returns the immediate SVGTitleElement
1329         children of an SVGElement.
1330
1331         Also we were not following exactly the specs for the rootmost SVG element's title value.
1332         According to the W3C specs, for stand-alone SVG documents only, the rootmost SVG element
1333         should not return a title. But we were not returning a title for the rootmost SVG element
1334         always. The fix is to return a empty title for the rootmost SVG element only if topDocument()
1335         of the element isSVGDocument().
1336         
1337         NOTE: The main SVG specs http://www.w3.org/TR/SVG/interact.html#hit-testing (W3C Recommendation
1338         16 August 2011) and http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements (W3C
1339         Recommendation 16 August 2011) do not say how the tooltip of an SVG element is calculated. But
1340         the SVG tiny specs http://www.w3.org/TR/SVGTiny12/struct.html#uiTitleDescBehavior (W3C
1341         Recommendation 22 December 2008) however explains well the tooltip calculation for the embedded
1342         and the stand-alone SVG cases. And it seems this what we should rely on.
1343
1344         Test: svg/hittest/svg-standalone-tooltip.svg
1345               svg/hittest/svg-embedded-tooltip.html
1346
1347         * WebCore.exp.in:
1348         * rendering/HitTestResult.h:
1349         Make HitTestResult::setInnerNode be WEBCORE_EXPORT
1350         
1351         * svg/SVGElement.cpp:
1352         (WebCore::SVGElement::title):
1353         Replace descendantsOfType<SVGTitleElement>() by childrenOfType<SVGTitleElement>().
1354         Fix the title value of the rootmost SVG element.
1355         
1356         * testing/Internals.cpp:
1357         (WebCore::Internals::toolTipFromElement):
1358         * testing/Internals.h:
1359         * testing/Internals.idl:
1360         Add a new internal function toolTipFromElement() which returns the tooltip text for a
1361         given element.
1362
1363 2015-01-14  Csaba Osztrogonác  <ossy@webkit.org>
1364
1365         Buildfix after r178434
1366         https://bugs.webkit.org/show_bug.cgi?id=140467
1367
1368         Reviewed by Chris Dumez.
1369
1370         * css/StyleBuilderConverter.h:
1371         (WebCore::StyleBuilderConverter::convertPerspective):
1372
1373 2015-01-14  Benjamin Poulain  <bpoulain@apple.com>
1374
1375         Build fix for NFAToDFA on ARM
1376
1377         * contentextensions/NFAToDFA.cpp:
1378         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
1379         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
1380
1381 2015-01-14  Bartlomiej Gajda  <b.gajda@samsung.com>
1382
1383         [MSE] Implement per TrackBuffer buffered.
1384         https://bugs.webkit.org/show_bug.cgi?id=139813.
1385
1386         Reviewed by Jer Noble.
1387
1388         Added implementation of SourceBuffer buffered() algorithm as per specification,
1389         and caching mechanism called when samples are added, removed, or MediaSource
1390         readyState is changed.
1391
1392         Tests: media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html
1393                media/media-source/media-source-multiple-trackBuffers-buffered.html
1394
1395         * Modules/mediasource/MediaSource.cpp:
1396         (WebCore::MediaSource::setReadyState):
1397         * Modules/mediasource/SourceBuffer.cpp:
1398         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
1399         (WebCore::SourceBuffer::SourceBuffer):
1400         (WebCore::SourceBuffer::buffered):
1401         (WebCore::SourceBuffer::invalidateBuffered):
1402         (WebCore::SourceBuffer::recalculateBuffered):
1403         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
1404         (WebCore::SourceBuffer::removeCodedFrames):
1405         (WebCore::SourceBuffer::evictCodedFrames):
1406         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1407         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
1408         (WebCore::SourceBuffer::hasCurrentTime):
1409         * Modules/mediasource/SourceBuffer.h:
1410
1411 2015-01-14  Benjamin Poulain  <benjamin@webkit.org>
1412
1413         Do not create new set for every sub-operation when converting a NFA to DFA
1414         https://bugs.webkit.org/show_bug.cgi?id=140380
1415
1416         Reviewed by Andreas Kling.
1417
1418         This is the first step toward making the NFA-to-DFA conversion more scalable: instead
1419         of creating new sets for each step of the algorithm, we use two kinds of sets
1420         and never do any copy.
1421
1422         The first new tool to do that is UniqueNodeIdSetImpl. It represents a set of NFA state corresponding to a DFA
1423         state. It is unique per DFA state.
1424
1425         HashableNodeIdSet is a helper tool storing a UniqueNodeIdSetImpl.
1426
1427         The creation of new sets now goes like this:
1428         1) Get a NodeIdSet for each possible transition.
1429         2) For each transition:
1430            2a) Extend the NodeIdSet in place with its epsilon closure.
1431            2b) Get the UniqueNodeIdSetImpl corresponding to the new set we discovered.
1432            2c) If the UniqueNodeIdSetImpl is new, queue it for processing.
1433
1434         * WebCore.xcodeproj/project.pbxproj:
1435         * contentextensions/ContentExtensionsDebugging.h: Copied from Source/WebCore/contentextensions/DFANode.h.
1436         * contentextensions/ContentExtensionsBackend.cpp:
1437         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1438         * contentextensions/ContentExtensionsManager.cpp:
1439         (WebCore::ContentExtensions::ExtensionsManager::loadExtension):
1440         Added some logging to inspect more easily what the clients are sending.
1441
1442         * contentextensions/DFA.cpp:
1443         * contentextensions/DFA.h:
1444         * contentextensions/DFANode.h:
1445         * contentextensions/NFA.cpp:
1446         * contentextensions/NFA.h:
1447         * contentextensions/NFAToDFA.cpp:
1448
1449         (WebCore::ContentExtensions::epsilonClosure):
1450         Instead of returning a new HashSet, extend the input HashSet.
1451
1452         (WebCore::ContentExtensions::UniqueNodeIdSetImpl::buffer):
1453         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
1454         (WebCore::ContentExtensions::UniqueNodeIdSet::operator=):
1455         (WebCore::ContentExtensions::UniqueNodeIdSet::~UniqueNodeIdSet):
1456         (WebCore::ContentExtensions::UniqueNodeIdSet::operator==):
1457         (WebCore::ContentExtensions::UniqueNodeIdSet::impl):
1458         (WebCore::ContentExtensions::UniqueNodeIdSet::hash):
1459         (WebCore::ContentExtensions::UniqueNodeIdSet::isEmptyValue):
1460         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
1461         (WebCore::ContentExtensions::UniqueNodeIdSetHash::hash):
1462         (WebCore::ContentExtensions::UniqueNodeIdSetHash::equal):
1463         UniqueNodeIdSetImpl is a compact representation of a NodeIdSet corresponding to a DFA node.
1464
1465         It is never built directly, it is only built on demand through NodeIdSetToUniqueNodeIdSetTranslator
1466         from a NodeIdSet.
1467
1468         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
1469         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::hash):
1470         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::equal):
1471         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
1472         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::operator[]):
1473         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::size):
1474         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::begin):
1475         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::end):
1476         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon):
1477         (WebCore::ContentExtensions::NFAToDFA::convert):
1478         (WebCore::ContentExtensions::setTransitionsExcludingEpsilon): Deleted.
1479         (WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet): Deleted.
1480         (WebCore::ContentExtensions::HashableNodeIdSet::operator=): Deleted.
1481         (WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue): Deleted.
1482         (WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue): Deleted.
1483         (WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet): Deleted.
1484         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash): Deleted.
1485         (WebCore::ContentExtensions::HashableNodeIdSetHash::equal): Deleted.
1486         (WebCore::ContentExtensions::addDFAState): Deleted.
1487
1488 2015-01-14  Chris Dumez  <cdumez@apple.com>
1489
1490         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
1491         https://bugs.webkit.org/show_bug.cgi?id=140347
1492
1493         Reviewed by Darin Adler.
1494
1495         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
1496         - Removing the static_cast to the destination type in the generated
1497           StyleBuilder code and let compiler implicitly convert the
1498           CSSPrimitiveValue to the setter's argument type.
1499         - Updating conditional converters to return a WTF::Optional<>
1500           instead of returning a boolean and having an output argument
1501           passed by reference. This way, we can use "auto" in the generated
1502           StyleBuilder code to deduce the return type.
1503
1504         * css/CSSPropertyNames.in:
1505         Drop TypeName parameter from all properties as it is no longer needed.
1506
1507         * css/StyleBuilderConverter.h:
1508         (WebCore::StyleBuilderConverter::convertGridTrackSize):
1509         (WebCore::StyleBuilderConverter::convertGridPosition):
1510         (WebCore::StyleBuilderConverter::convertWordSpacing):
1511         (WebCore::StyleBuilderConverter::convertPerspective):
1512         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
1513         (WebCore::StyleBuilderConverter::convertFilterOperations):
1514         (WebCore::StyleBuilderConverter::convertMaskImageOperations):
1515         Update conditional converters to return an Optional<>.
1516
1517         * css/makeprop.pl:
1518         (generateValueSetter):
1519         Drop support for TypeName, stop using static_cast to destination
1520         type and update the generated code now that the conditional
1521         converters return an Optional.
1522
1523         * platform/efl/RenderThemeEfl.cpp:
1524         (WebCore::RenderThemeEfl::systemFont):
1525         * platform/graphics/Font.cpp:
1526         (WebCore::Font::Font):
1527         * platform/graphics/FontDescription.h:
1528         (WebCore::FontDescription::setIsItalic):
1529         (WebCore::FontDescription::setIsSmallCaps):
1530         (WebCore::FontDescription::setItalic): Deleted.
1531         (WebCore::FontDescription::setSmallCaps): Deleted.
1532         * rendering/RenderThemeGtk.cpp:
1533         (WebCore::RenderThemeGtk::systemFont):
1534         * rendering/RenderThemeIOS.mm:
1535         (WebCore::RenderThemeIOS::systemFont):
1536         * rendering/RenderThemeMac.mm:
1537         (WebCore::RenderThemeMac::systemFont):
1538         * rendering/RenderThemeSafari.cpp:
1539         (WebCore::RenderThemeSafari::systemFont):
1540         * rendering/RenderThemeWin.cpp:
1541         (WebCore::fillFontDescription):
1542         * rendering/mathml/RenderMathMLToken.cpp:
1543         (WebCore::RenderMathMLToken::updateStyle):
1544         Now that we call the RenderStyle setters with a CSSPrimitiveValue
1545         and let it be implicitly converted to the right type, instead of
1546         doing an explicit static_cast, two setters on FontDescription
1547         were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
1548         taking a boolean in argument to setIsItalic() / setIsSmallCaps()
1549         to resolve the ambiguity.
1550
1551 2015-01-14  Jer Noble  <jer.noble@apple.com>
1552
1553         Null-deref crash when seeking immediately before looping.
1554         https://bugs.webkit.org/show_bug.cgi?id=140394
1555
1556         Reviewed by Eric Carlson.
1557
1558         It is possible for finishSeek() to be called when a seek() has caused a pending seek task
1559         to be scheduled, but before that pending seek task is run. In this case, if a seek request
1560         is issued, the existing pending seek task will not be cancelled, which will cause a crash
1561         when the pending seek task is run.
1562
1563         When checking whether an existing seek task needs to be cancelled, check the actual timer,
1564         rather than the m_seeking boolean, so that this case is covered.
1565
1566         Test: media/video-ended-seek-crash.html
1567
1568         * html/HTMLMediaElement.cpp:
1569         (WebCore::HTMLMediaElement::seekWithTolerance):
1570
1571 2015-01-14  Brent Fulgham  <bfulgham@apple.com>
1572
1573         [Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
1574         https://bugs.webkit.org/show_bug.cgi?id=140425
1575
1576         Reviewed by Anders Carlsson.
1577
1578         * platform/win/CursorWin.cpp:
1579         (WebCore::createSharedCursor): Return nullptr when operating system
1580         cannot support the requested icon specification.
1581         (WebCore::Cursor::ensurePlatformCursor): Check for 'createSharedCursor'
1582         returning nullptr, and fall back to the default icon construction.
1583
1584 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1585
1586         REGRESSION(r178367): [GStreamer] Several media tests time out after r178367
1587         https://bugs.webkit.org/show_bug.cgi?id=140437
1588
1589         Reviewed by Philippe Normand.
1590
1591         Add implementation for MediaPlayerPrivate::rate() to GStreamer
1592         media backend.
1593
1594         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1595         (WebCore::MediaPlayerPrivateGStreamer::rate):
1596         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1597
1598 2015-01-13  Commit Queue  <commit-queue@webkit.org>
1599
1600         Unreviewed, rolling out r178390, r178392, r178398, r178400,
1601         r178402, and r178410.
1602         https://bugs.webkit.org/show_bug.cgi?id=140431
1603
1604         Way too many failures to skip (Requested by ap_ on #webkit).
1605
1606         Reverted changesets:
1607
1608         "WebGL2: Support webgl2 context creation."
1609         https://bugs.webkit.org/show_bug.cgi?id=126408
1610         http://trac.webkit.org/changeset/178390
1611
1612         "Unreviewed iOS build fix after r178390."
1613         http://trac.webkit.org/changeset/178392
1614
1615         "[Unreviewed] Windows build fix after r178390."
1616         http://trac.webkit.org/changeset/178398
1617
1618         "[Unreviewed] Speculative test fix after r178390."
1619         http://trac.webkit.org/changeset/178400
1620
1621         "[Unreviewed] Skip webgl tests for temporarily."
1622         https://bugs.webkit.org/show_bug.cgi?id=140423
1623         http://trac.webkit.org/changeset/178402
1624
1625         "[EFL] Fix build after r178390"
1626         https://bugs.webkit.org/show_bug.cgi?id=140424
1627         http://trac.webkit.org/changeset/178410
1628
1629 2015-01-13  Hunseop Jeong  <hs85.jeong@samsung.com>
1630
1631         [EFL] Fix build after r178390 
1632         https://bugs.webkit.org/show_bug.cgi?id=140424
1633
1634         Reviewed by Csaba Osztrogonác.
1635
1636         * CMakeLists.txt: 
1637
1638 2015-01-13  Zalan Bujtas  <zalan@apple.com>
1639
1640         Simple line layout: Refactor TextFragment class.
1641         https://bugs.webkit.org/show_bug.cgi?id=140417
1642
1643         Reviewed by Andreas Kling.
1644
1645         Introduce text fragment type and use class member initializers.
1646
1647         No change in functionality.
1648
1649         * rendering/SimpleLineLayout.cpp:
1650         (WebCore::SimpleLineLayout::TextFragment::TextFragment):
1651         (WebCore::SimpleLineLayout::LineState::addUncommitted):
1652         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
1653         (WebCore::SimpleLineLayout::nextFragment):
1654         (WebCore::SimpleLineLayout::createLineRuns):
1655
1656 2015-01-13  Commit Queue  <commit-queue@webkit.org>
1657
1658         Unreviewed, rolling out r178400.
1659         https://bugs.webkit.org/show_bug.cgi?id=140422
1660
1661         Test fix breaks build (Requested by rfong on #webkit).
1662
1663         Reverted changeset:
1664
1665         "[Unreviewed] Speculative test fix after r178390."
1666         http://trac.webkit.org/changeset/178400
1667
1668 2015-01-13  Roger Fong  <roger_fong@apple.com>
1669
1670         [Unreviewed] Speculative test fix after r178390.
1671
1672         * html/canvas/WebGL1RenderingContext.idl:
1673
1674 2015-01-13  Roger Fong  <roger_fong@apple.com>
1675
1676         [Unreviewed] Windows build fix after r178390.
1677
1678         * DerivedSources.cpp:
1679         * WebCore.vcxproj/WebCore.vcxproj:
1680         * WebCore.vcxproj/WebCore.vcxproj.filters:
1681         * bindings/js/JSBindingsAllInOne.cpp:
1682         * html/canvas/WebGLRenderingContextBase.cpp:
1683         (WebCore::WebGLRenderingContextBase::create):
1684
1685 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
1686
1687         NSButtonCell leak allocated under WebCore::paintToggleButton
1688         https://bugs.webkit.org/show_bug.cgi?id=137014
1689
1690         Reviewed by Alexey Proskuryakov.
1691
1692         * platform/mac/ThemeMac.mm:
1693         (WebCore::createToggleButtonCell):
1694         Immediately adopt the NSButtonCell allocation.
1695
1696         (WebCore::sharedRadioCell):
1697         (WebCore::sharedCheckboxCell):
1698         Move from the RetainPtr into the static variable.
1699
1700         (WebCore::paintToggleButton):
1701         Use RetainPtr logic to better manage lifetimes.
1702
1703 2015-01-13  Zalan Bujtas  <zalan@apple.com>
1704
1705         Simple line layout: Refactor SimpleLineLayout::nextFragment().
1706         https://bugs.webkit.org/show_bug.cgi?id=140407
1707
1708         Reviewed by Andreas Kling.
1709
1710         Simplify the code by using content specific branches with early returns.
1711
1712         No change in functionality.
1713
1714         * rendering/SimpleLineLayout.cpp:
1715         (WebCore::SimpleLineLayout::nextFragment):
1716
1717 2015-01-13  Chris Dumez  <cdumez@apple.com>
1718
1719         Unreviewed iOS build fix after r178390.
1720
1721         * html/canvas/CanvasRenderingContext2D.cpp:
1722         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1723         m_type is undeclared.
1724
1725         * html/canvas/WebGLContextGroup.h:
1726         Fix bad include.
1727
1728 2015-01-13  Roger Fong  <roger_fong@apple.com>
1729
1730         WebGL2: Support webgl2 context creation.
1731         https://bugs.webkit.org/show_bug.cgi?id=126408
1732         <rdar://problem/15002170>
1733
1734         Reviewed by Dean Jackson.
1735
1736         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
1737
1738         Create a WebGLRenderingContextBase class that extends to a WebGL1RenderingContext and WebGL2RenderingContext.
1739         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
1740         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
1741
1742         * CMakeLists.txt:
1743         * DerivedSources.make:
1744         * WebCore.xcodeproj/project.pbxproj:
1745         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1746         (WebCore::toJS):
1747         * bindings/js/JSDocumentCustom.cpp:
1748         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1749         * bindings/js/JSWebGL1RenderingContextCustom.cpp: Copied from Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp.
1750         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
1751         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
1752         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
1753         * bindings/js/JSWebGLRenderingContextCustom.cpp: Removed.
1754         * bindings/scripts/CodeGeneratorJS.pm:
1755         (GenerateImplementation):
1756         * html/HTMLCanvasElement.cpp:
1757         (WebCore::HTMLCanvasElement::getContext):
1758         (WebCore::HTMLCanvasElement::is3dType):
1759         (WebCore::HTMLCanvasElement::reset):
1760         (WebCore::HTMLCanvasElement::paint):
1761         (WebCore::HTMLCanvasElement::getImageData):
1762         * html/canvas/ANGLEInstancedArrays.cpp:
1763         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
1764         (WebCore::ANGLEInstancedArrays::supported):
1765         * html/canvas/ANGLEInstancedArrays.h:
1766         * html/canvas/CanvasRenderingContext.h:
1767         (WebCore::CanvasRenderingContext::type):
1768         * html/canvas/CanvasRenderingContext2D.cpp:
1769         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1770         * html/canvas/EXTBlendMinMax.cpp:
1771         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
1772         * html/canvas/EXTBlendMinMax.h:
1773         * html/canvas/EXTFragDepth.cpp:
1774         (WebCore::EXTFragDepth::EXTFragDepth):
1775         * html/canvas/EXTFragDepth.h:
1776         * html/canvas/EXTShaderTextureLOD.cpp:
1777         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
1778         * html/canvas/EXTShaderTextureLOD.h:
1779         * html/canvas/EXTTextureFilterAnisotropic.cpp:
1780         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
1781         * html/canvas/EXTTextureFilterAnisotropic.h:
1782         * html/canvas/EXTsRGB.cpp:
1783         (WebCore::EXTsRGB::EXTsRGB):
1784         * html/canvas/EXTsRGB.h:
1785         * html/canvas/OESElementIndexUint.cpp:
1786         (WebCore::OESElementIndexUint::OESElementIndexUint):
1787         * html/canvas/OESElementIndexUint.h:
1788         * html/canvas/OESStandardDerivatives.cpp:
1789         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
1790         * html/canvas/OESStandardDerivatives.h:
1791         * html/canvas/OESTextureFloat.cpp:
1792         (WebCore::OESTextureFloat::OESTextureFloat):
1793         * html/canvas/OESTextureFloat.h:
1794         * html/canvas/OESTextureFloatLinear.cpp:
1795         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
1796         * html/canvas/OESTextureFloatLinear.h:
1797         * html/canvas/OESTextureHalfFloat.cpp:
1798         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
1799         * html/canvas/OESTextureHalfFloat.h:
1800         * html/canvas/OESTextureHalfFloatLinear.cpp:
1801         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
1802         * html/canvas/OESTextureHalfFloatLinear.h:
1803         * html/canvas/OESVertexArrayObject.cpp:
1804         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
1805         * html/canvas/OESVertexArrayObject.h:
1806         * html/canvas/WebGL1RenderingContext.cpp: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.cpp.
1807         * html/canvas/WebGL1RenderingContext.h: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.h.
1808         * html/canvas/WebGL1RenderingContext.idl: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.idl.
1809         * html/canvas/WebGL2RenderingContext.cpp: Added.
1810         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
1811         * html/canvas/WebGL2RenderingContext.h: Added.
1812         * html/canvas/WebGL2RenderingContext.idl: Added.
1813         * html/canvas/WebGLBuffer.cpp:
1814         (WebCore::WebGLBuffer::create):
1815         (WebCore::WebGLBuffer::WebGLBuffer):
1816         * html/canvas/WebGLBuffer.h:
1817         * html/canvas/WebGLCompressedTextureATC.cpp:
1818         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
1819         (WebCore::WebGLCompressedTextureATC::supported):
1820         * html/canvas/WebGLCompressedTextureATC.h:
1821         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
1822         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
1823         (WebCore::WebGLCompressedTexturePVRTC::supported):
1824         * html/canvas/WebGLCompressedTexturePVRTC.h:
1825         * html/canvas/WebGLCompressedTextureS3TC.cpp:
1826         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
1827         (WebCore::WebGLCompressedTextureS3TC::supported):
1828         * html/canvas/WebGLCompressedTextureS3TC.h:
1829         * html/canvas/WebGLContextGroup.cpp:
1830         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
1831         (WebCore::WebGLContextGroup::addContext):
1832         (WebCore::WebGLContextGroup::removeContext):
1833         (WebCore::WebGLContextGroup::loseContextGroup):
1834         * html/canvas/WebGLContextGroup.h:
1835         * html/canvas/WebGLContextObject.cpp:
1836         (WebCore::WebGLContextObject::WebGLContextObject):
1837         * html/canvas/WebGLContextObject.h:
1838         (WebCore::WebGLContextObject::context):
1839         * html/canvas/WebGLDebugRendererInfo.cpp:
1840         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
1841         * html/canvas/WebGLDebugRendererInfo.h:
1842         * html/canvas/WebGLDebugShaders.cpp:
1843         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
1844         * html/canvas/WebGLDebugShaders.h:
1845         * html/canvas/WebGLDepthTexture.cpp:
1846         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
1847         * html/canvas/WebGLDepthTexture.h:
1848         * html/canvas/WebGLDrawBuffers.cpp:
1849         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
1850         (WebCore::WebGLDrawBuffers::supported):
1851         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
1852         * html/canvas/WebGLDrawBuffers.h:
1853         * html/canvas/WebGLExtension.cpp:
1854         (WebCore::WebGLExtension::WebGLExtension):
1855         * html/canvas/WebGLExtension.h:
1856         (WebCore::WebGLExtension::context):
1857         * html/canvas/WebGLFramebuffer.cpp:
1858         (WebCore::WebGLFramebuffer::create):
1859         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
1860         * html/canvas/WebGLFramebuffer.h:
1861         * html/canvas/WebGLLoseContext.cpp:
1862         (WebCore::WebGLLoseContext::WebGLLoseContext):
1863         (WebCore::WebGLLoseContext::loseContext):
1864         * html/canvas/WebGLLoseContext.h:
1865         * html/canvas/WebGLObject.cpp:
1866         (WebCore::WebGLObject::WebGLObject):
1867         * html/canvas/WebGLObject.h:
1868         * html/canvas/WebGLProgram.cpp:
1869         (WebCore::WebGLProgram::create):
1870         (WebCore::WebGLProgram::WebGLProgram):
1871         * html/canvas/WebGLProgram.h:
1872         * html/canvas/WebGLRenderbuffer.cpp:
1873         (WebCore::WebGLRenderbuffer::create):
1874         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
1875         * html/canvas/WebGLRenderbuffer.h:
1876         * html/canvas/WebGLRenderingContext.cpp: Removed.
1877         * html/canvas/WebGLRenderingContext.h: Removed.
1878         * html/canvas/WebGLRenderingContext.idl: Removed.
1879         * html/canvas/WebGLRenderingContextBase.cpp: Added.
1880         * html/canvas/WebGLRenderingContextBase.h: Added.
1881         * html/canvas/WebGLRenderingContextBase.idl: Added.
1882         * html/canvas/WebGLShader.cpp:
1883         (WebCore::WebGLShader::create):
1884         (WebCore::WebGLShader::WebGLShader):
1885         * html/canvas/WebGLShader.h:
1886         * html/canvas/WebGLSharedObject.cpp:
1887         (WebCore::WebGLSharedObject::WebGLSharedObject):
1888         * html/canvas/WebGLSharedObject.h:
1889         * html/canvas/WebGLTexture.cpp:
1890         (WebCore::WebGLTexture::create):
1891         (WebCore::WebGLTexture::WebGLTexture):
1892         * html/canvas/WebGLTexture.h:
1893         * html/canvas/WebGLVertexArrayObjectOES.cpp:
1894         (WebCore::WebGLVertexArrayObjectOES::create):
1895         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
1896         * html/canvas/WebGLVertexArrayObjectOES.h:
1897
1898 2015-01-13  Chris Dumez  <cdumez@apple.com>
1899
1900         Unreviewed, fix Mac build after r178388
1901
1902         FontRanges::isEmpty() -> FontRanges::isNull().
1903
1904         * platform/graphics/mac/FontComplexTextMac.cpp:
1905         (WebCore::Font::fontDataForCombiningCharacterSequence):
1906
1907 2015-01-13  Antti Koivisto  <antti@apple.com>
1908
1909         Devirtualize FontData
1910         https://bugs.webkit.org/show_bug.cgi?id=140390
1911
1912         Reviewed by Andreas Kling.
1913
1914         This patch removes the FontData base class and turns SegmentedFontData into a non-virtual FontRanges type.
1915
1916         SimpleFontData remains as is (without the base) and it can be renamed later to something more sensible.
1917
1918         * WebCore.exp.in:
1919         * WebCore.xcodeproj/project.pbxproj:
1920         * css/CSSFontSelector.cpp:
1921         (WebCore::CSSFontSelector::fontRangesForFamily):
1922         (WebCore::CSSFontSelector::fallbackFontDataAt):
1923         (WebCore::CSSFontSelector::getFontData): Deleted.
1924         (WebCore::CSSFontSelector::getFallbackFontData): Deleted.
1925         * css/CSSFontSelector.h:
1926         * css/CSSSegmentedFontFace.cpp:
1927         (WebCore::CSSSegmentedFontFace::pruneTable):
1928         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
1929         (WebCore::CSSSegmentedFontFace::fontRanges):
1930         (WebCore::CSSSegmentedFontFace::loadFont):
1931         (WebCore::CSSSegmentedFontFace::getFontData): Deleted.
1932         * css/CSSSegmentedFontFace.h:
1933         * platform/graphics/Font.h:
1934         (WebCore::Font::fallbackRangesAt):
1935         (WebCore::Font::fontDataAt): Deleted.
1936         * platform/graphics/FontData.cpp: Removed.
1937         * platform/graphics/FontData.h: Removed.
1938         * platform/graphics/FontGlyphs.cpp:
1939         (WebCore::FontGlyphs::FontGlyphs):
1940         (WebCore::FontGlyphs::determinePitch):
1941         (WebCore::FontGlyphs::isLoadingCustomFonts):
1942         (WebCore::realizeNextFallback):
1943         (WebCore::FontGlyphs::realizeFallbackRangesAt):
1944         (WebCore::FontGlyphs::glyphDataForSystemFallback):
1945         (WebCore::FontGlyphs::glyphDataForVariant):
1946         (WebCore::FontGlyphs::glyphDataForNormalVariant):
1947         (WebCore::glyphPageFromFontRanges):
1948         (WebCore::FontGlyphs::glyphDataForCharacter):
1949         (WebCore::realizeNextFamily): Deleted.
1950         (WebCore::FontGlyphs::realizeFontDataAt): Deleted.
1951         (WebCore::glyphPageFromFontData): Deleted.
1952         * platform/graphics/FontGlyphs.h:
1953         (WebCore::FontGlyphs::primarySimpleFontData):
1954         * platform/graphics/FontRanges.cpp: Copied from Source/WebCore/platform/graphics/SegmentedFontData.cpp.
1955         (WebCore::FontRanges::FontRanges):
1956         (WebCore::FontRanges::~FontRanges):
1957         (WebCore::FontRanges::fontDataForCharacter):
1958         (WebCore::FontRanges::fontDataForFirstRange):
1959         (WebCore::FontRanges::isLoading):
1960         (WebCore::SegmentedFontData::SegmentedFontData): Deleted.
1961         (WebCore::SegmentedFontData::~SegmentedFontData): Deleted.
1962         (WebCore::SegmentedFontData::simpleFontDataForCharacter): Deleted.
1963         (WebCore::SegmentedFontData::simpleFontDataForFirstRange): Deleted.
1964         (WebCore::SegmentedFontData::isCustomFont): Deleted.
1965         (WebCore::SegmentedFontData::isLoading): Deleted.
1966         (WebCore::SegmentedFontData::isSegmented): Deleted.
1967         (WebCore::SegmentedFontData::description): Deleted.
1968         * platform/graphics/FontRanges.h: Copied from Source/WebCore/platform/graphics/SegmentedFontData.h.
1969         (WebCore::FontRanges::Range::Range):
1970         (WebCore::FontRanges::Range::from):
1971         (WebCore::FontRanges::Range::to):
1972         (WebCore::FontRanges::Range::fontData):
1973         (WebCore::FontRanges::isEmpty):
1974         (WebCore::FontRanges::appendRange):
1975         (WebCore::FontRanges::size):
1976         (WebCore::FontRanges::rangeAt):
1977         (WebCore::FontDataRange::FontDataRange): Deleted.
1978         (WebCore::FontDataRange::from): Deleted.
1979         (WebCore::FontDataRange::to): Deleted.
1980         (WebCore::FontDataRange::fontData): Deleted.
1981         (WebCore::SegmentedFontData::create): Deleted.
1982         (WebCore::SegmentedFontData::appendRange): Deleted.
1983         (WebCore::SegmentedFontData::numRanges): Deleted.
1984         (WebCore::SegmentedFontData::rangeAt): Deleted.
1985         (isType): Deleted.
1986         * platform/graphics/FontSelector.h:
1987         * platform/graphics/SegmentedFontData.cpp: Removed.
1988         * platform/graphics/SegmentedFontData.h: Removed.
1989         * platform/graphics/SimpleFontData.cpp:
1990         (WebCore::SimpleFontData::simpleFontDataForCharacter): Deleted.
1991         (WebCore::SimpleFontData::simpleFontDataForFirstRange): Deleted.
1992         (WebCore::SimpleFontData::isSegmented): Deleted.
1993         * platform/graphics/SimpleFontData.h:
1994         (WebCore::SimpleFontData::isCustomFont):
1995         (WebCore::SimpleFontData::isLoading):
1996         (isType): Deleted.
1997         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1998         (-[WebCascadeList initWithFont:character:]):
1999         (-[WebCascadeList objectAtIndex:]):
2000         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2001         * platform/graphics/mac/FontComplexTextMac.cpp:
2002         (WebCore::Font::fontDataForCombiningCharacterSequence):
2003
2004 2015-01-13  Dean Jackson  <dino@apple.com>
2005
2006         Filters aren't applied to elements in columns after the first
2007         https://bugs.webkit.org/show_bug.cgi?id=140331
2008
2009         Reviewed by Simon Fraser.
2010
2011         The important bits of this change came from Simon.
2012
2013         Filters and clipping were not taking columns into
2014         account when using their offset rectangles. The fix
2015         is to recalculate the rects if you're in such a
2016         situation.
2017
2018         Tests: fast/multicol/clip-in-columns.html
2019                fast/multicol/filter-in-columns.html
2020
2021         * rendering/RenderLayer.cpp:
2022         (WebCore::RenderLayer::hasFilterThatIsPainting): New method used
2023         to check if we're about to paint a filter.
2024         (WebCore::RenderLayer::setupFilters): Use the new helper if possible.
2025         (WebCore::RenderLayer::paintLayerContents): If we're in columns,
2026         and we either have a clip or a filter, recalculate the offset rectangles.
2027         * rendering/RenderLayer.h:
2028
2029 2015-01-13  Beth Dakin  <bdakin@apple.com>
2030
2031         Should disable immediate actions for iTunes
2032         https://bugs.webkit.org/show_bug.cgi?id=140405
2033         -and corresponding-
2034         rdar://problem/19461358
2035
2036         Reviewed by Tim Horton.
2037
2038         * WebCore.exp.in:
2039
2040 2015-01-13  Anders Carlsson  <andersca@apple.com>
2041
2042         Remove pure virtual functions from DatabaseBackendBase
2043         https://bugs.webkit.org/show_bug.cgi?id=140402
2044
2045         Reviewed by Sam Weinig.
2046
2047         Also change DatabaseBackendBase to Database in a couple of places.
2048
2049         * Modules/webdatabase/DatabaseBackendBase.cpp:
2050         (WebCore::DatabaseBackendBase::closeDatabase):
2051         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
2052         (WebCore::DatabaseBackendBase::performOpenAndVerify):
2053         (WebCore::DatabaseBackendBase::maximumSize):
2054         * Modules/webdatabase/DatabaseBackendBase.h:
2055         * Modules/webdatabase/DatabaseServer.cpp:
2056         (WebCore::DatabaseServer::createDatabase):
2057         * Modules/webdatabase/DatabaseTracker.cpp:
2058         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2059         (WebCore::DatabaseTracker::doneCreatingDatabase):
2060         (WebCore::DatabaseTracker::addOpenDatabase):
2061         (WebCore::DatabaseTracker::removeOpenDatabase):
2062         (WebCore::DatabaseTracker::getOpenDatabases):
2063         (WebCore::DatabaseTracker::deleteDatabaseFile):
2064         * Modules/webdatabase/DatabaseTracker.h:
2065
2066 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
2067
2068         Web Inspector: Remove unused ResizeImage and DecodeImageData timeline events
2069         https://bugs.webkit.org/show_bug.cgi?id=140404
2070
2071         Reviewed by Timothy Hatcher.
2072
2073         * inspector/InspectorTimelineAgent.cpp:
2074         (WebCore::toProtocol):
2075         * inspector/InspectorTimelineAgent.h:
2076         * inspector/TimelineRecordFactory.cpp:
2077         (WebCore::TimelineRecordFactory::createDecodeImageData): Deleted.
2078         (WebCore::TimelineRecordFactory::createResizeImageData): Deleted.
2079         * inspector/TimelineRecordFactory.h:
2080
2081 2015-01-13  Jer Noble  <jer.noble@apple.com>
2082
2083         defaultPlaybackRate not respected when set before source is loaded
2084         https://bugs.webkit.org/show_bug.cgi?id=140282
2085
2086         Reviewed by Eric Carlson.
2087
2088         Test: media/video-defaultplaybackrate-before-load.html
2089
2090         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
2091         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
2092         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
2093         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
2094         value. So the end result is that the value from defaultPlaybackRate is overwritten by
2095         the default value of 1 in MediaPlayer.
2096
2097         Rather than caching the requested rate in MediaPlayer, cache the value reported by
2098         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
2099         rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
2100         value is still used for estimating the current time during playback.
2101
2102         Add MediaPlayerPrivate interface method to return the current playback rate.
2103
2104         * html/HTMLMediaElement.cpp:
2105         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
2106         (WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
2107         (WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
2108         (WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
2109             of effectivePlaybackRate();
2110         (WebCore::HTMLMediaElement::ended): Ditto.
2111         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
2112         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
2113         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
2114         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
2115         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
2116         (WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
2117             requestedPlaybackRate() if playing and 0 if not.
2118         * html/HTMLMediaElement.h:
2119         * platform/graphics/MediaPlayer.cpp:
2120         (WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
2121         (WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
2122         (WebCore::MediaPlayer::setRate): Do not cache the rate.
2123         (WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
2124         * platform/graphics/MediaPlayer.h:
2125         (WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
2126         * platform/graphics/MediaPlayerPrivate.h:
2127         (WebCore::MediaPlayerPrivateInterface::rate): Added.
2128         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2129         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2130             Do not cache the requested rate.
2131         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
2132         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
2133         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2134         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
2135         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2136         (WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
2137         (WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
2138         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2139         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2140         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2141         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
2142         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
2143         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2144         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2145         (WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
2146
2147 2015-01-13  Andreas Kling  <akling@apple.com>
2148
2149         Element::normalizeAttributes() needs to handle arbitrary JS executing between loop iterations.
2150         <https://webkit.org/b/140379>
2151         <rdar://problem/19446901>
2152
2153         Reviewed by Benjamin Poulain.
2154
2155         Since DOM mutation events may arise below the call to Node::normalize(),
2156         have the loop in Element::normalizeAttributes() make a copy of the Attr nodes
2157         beforehand, to guard against mutations.
2158
2159         Based on a patch by Chris "Chris Dumez" Dumez.
2160
2161         Test: fast/dom/Element/normalize-crash2.html
2162
2163         * dom/Element.cpp:
2164         (WebCore::Element::normalizeAttributes):
2165
2166 2015-01-13  Shivakumar JM  <shiva.jm@samsung.com>
2167
2168         Fix Debug Build Error in Webcore module.
2169         https://bugs.webkit.org/show_bug.cgi?id=140383
2170
2171         Reviewed by Csaba Osztrogonác.
2172
2173         No new tests because there is no visible behavior change.
2174
2175         * platform/linux/MemoryPressureHandlerLinux.cpp:
2176         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
2177
2178 2015-01-12  Benjamin Poulain  <benjamin@webkit.org>
2179
2180         Fix a typo in r178313
2181
2182         * contentextensions/URLFilterParser.cpp:
2183         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2184
2185 2015-01-12  Benjamin Poulain  <benjamin@webkit.org>
2186
2187         Add basic pattern matching support to the url filters
2188         https://bugs.webkit.org/show_bug.cgi?id=140283
2189
2190         Reviewed by Andreas Kling.
2191
2192         This patch adds some basic generic pattern support for the url filters
2193         of ContentExtensions.
2194
2195         Instead of writting a new parser, I re-used Gavin's parser for JavaScript
2196         RegExp.
2197
2198         This patch only implements the very basic stuffs: transition on any character
2199         and repetition.
2200
2201         * WebCore.xcodeproj/project.pbxproj:
2202         * contentextensions/ContentExtensionsBackend.cpp:
2203         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2204         Use the new parser.
2205
2206         * contentextensions/DFA.cpp:
2207         (WebCore::ContentExtensions::DFA::DFA):
2208         (WebCore::ContentExtensions::printRange):
2209         (WebCore::ContentExtensions::printTransition):
2210         (WebCore::ContentExtensions::DFA::debugPrintDot):
2211         * contentextensions/NFA.cpp:
2212         (WebCore::ContentExtensions::printRange):
2213         (WebCore::ContentExtensions::printTransition):
2214         (WebCore::ContentExtensions::NFA::debugPrintDot):
2215         The graphs generated with the extended patterns are vastly more complicated
2216         than the old prefix matcher.
2217         I changed the debug output to have a single link between any two nodes
2218         instead of one per transition. This makes the graph a little more manageable.
2219
2220         * contentextensions/NFA.cpp:
2221         (WebCore::ContentExtensions::NFA::addTransition):
2222         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
2223         (WebCore::ContentExtensions::NFA::graphSize):
2224         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
2225         * contentextensions/NFA.h:
2226         * contentextensions/NFANode.h:
2227         (WebCore::ContentExtensions::epsilonClosure):
2228         The new parser can generate transitions back to the root node of index zero.
2229         All the hash structures had to be updated to support this kind of key.
2230
2231         * contentextensions/NFAToDFA.cpp:
2232         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash):
2233         Two tiny improvements:
2234         -Don't hash zero to zero, it causes more conflicts that needed.
2235         -The hash operation must use a commutative operation, otherwise the order
2236          of elements can affect the hash, which is undesired for a set.
2237         I'll improve this further later.
2238
2239         (WebCore::ContentExtensions::NFAToDFA::convert):
2240
2241         * contentextensions/URLFilterParser.cpp: Added.
2242         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2243         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom):
2244         (WebCore::ContentExtensions::GraphBuilder::finalize):
2245         (WebCore::ContentExtensions::GraphBuilder::errorMessage):
2246         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2247         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2248         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2249         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
2250         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
2251         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2252         (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
2253         (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
2254         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
2255         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
2256         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
2257         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
2258         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
2259         (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
2260         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
2261         (WebCore::ContentExtensions::GraphBuilder::disjunction):
2262         (WebCore::ContentExtensions::GraphBuilder::hasError):
2263         (WebCore::ContentExtensions::GraphBuilder::fail):
2264         (WebCore::ContentExtensions::URLFilterParser::parse):
2265         * contentextensions/URLFilterParser.h:
2266         (WebCore::ContentExtensions::URLFilterParser::hasError):
2267         (WebCore::ContentExtensions::URLFilterParser::errorMessage):
2268
2269 2015-01-11  Sam Weinig  <sam@webkit.org>
2270
2271         Remove support for SharedWorkers
2272         https://bugs.webkit.org/show_bug.cgi?id=140344
2273
2274         Reviewed by Anders Carlsson.
2275
2276         * CMakeLists.txt:
2277         * Configurations/FeatureDefines.xcconfig:
2278         * DerivedSources.cpp:
2279         * DerivedSources.make:
2280         * PlatformGTK.cmake:
2281         * PlatformMac.cmake:
2282         * WebCore.vcxproj/WebCore.vcxproj:
2283         * WebCore.vcxproj/WebCore.vcxproj.filters:
2284         * WebCore.xcodeproj/project.pbxproj:
2285         * bindings/generic/RuntimeEnabledFeatures.cpp:
2286         (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled): Deleted.
2287         * bindings/generic/RuntimeEnabledFeatures.h:
2288         * bindings/js/JSBindingsAllInOne.cpp:
2289         * bindings/js/JSDOMWindowCustom.cpp:
2290         * bindings/js/JSSharedWorkerCustom.cpp: Removed.
2291         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2292         (WebCore::toJSWorkerGlobalScope):
2293         (WebCore::toJSSharedWorkerGlobalScope): Deleted.
2294         * bindings/js/JSWorkerGlobalScopeBase.h:
2295         * bindings/js/WorkerScriptController.cpp:
2296         (WebCore::WorkerScriptController::initScript):
2297         * bindings/scripts/IDLAttributes.txt:
2298         * bindings/scripts/preprocess-idls.pl:
2299         * dom/Document.cpp:
2300         (WebCore::Document::prepareForDestruction):
2301         * dom/EventTarget.h:
2302         * dom/EventTargetFactory.in:
2303         * history/PageCache.cpp:
2304         (WebCore::logCanCacheFrameDecision):
2305         (WebCore::PageCache::canCachePageContainingThisFrame):
2306         * loader/FrameLoader.cpp:
2307         * page/SecurityOrigin.h:
2308         (WebCore::SecurityOrigin::canAccessLocalStorage):
2309         (WebCore::SecurityOrigin::canAccessSharedWorkers): Deleted.
2310         * platform/FeatureCounterKeys.h:
2311         * platform/PlatformStrategies.h:
2312         (WebCore::PlatformStrategies::PlatformStrategies):
2313         (WebCore::PlatformStrategies::sharedWorkerStrategy): Deleted.
2314         * workers/DefaultSharedWorkerRepository.cpp: Removed.
2315         * workers/DefaultSharedWorkerRepository.h: Removed.
2316         * workers/SharedWorker.cpp: Removed.
2317         * workers/SharedWorker.h: Removed.
2318         * workers/SharedWorker.idl: Removed.
2319         * workers/SharedWorkerGlobalScope.cpp: Removed.
2320         * workers/SharedWorkerGlobalScope.h: Removed.
2321         * workers/SharedWorkerGlobalScope.idl: Removed.
2322         * workers/SharedWorkerRepository.cpp: Removed.
2323         * workers/SharedWorkerRepository.h: Removed.
2324         * workers/SharedWorkerStrategy.h: Removed.
2325         * workers/SharedWorkerThread.cpp: Removed.
2326         * workers/SharedWorkerThread.h: Removed.
2327         * workers/WorkerGlobalScope.h:
2328         (WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope): Deleted.
2329
2330 2015-01-12  Byungseon Shin  <sun.shin@lge.com>
2331
2332         REGRESSION(r178029): [GTK][EFL] Caused no-backing-for-clip-overlap test failures
2333         https://bugs.webkit.org/show_bug.cgi?id=140336
2334
2335         Reviewed by Simon Fraser.
2336
2337         Avoid creating childClippingMaskLayer when renderer has not border radius nor clip path.
2338
2339         * rendering/RenderLayerBacking.cpp:
2340         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
2341
2342 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
2343
2344         [Apple] Squelch stderr log regarding negative stroke thickness
2345         https://bugs.webkit.org/show_bug.cgi?id=140372
2346         <rdar://problem/19426485>
2347
2348         Reviewed by Eric Carlson.
2349
2350         No new tests because there is no visible behavior change.
2351
2352         * platform/graphics/cg/GraphicsContextCG.cpp:
2353         (WebCore::GraphicsContext::setPlatformStrokeThickness):
2354
2355 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
2356
2357         Get rid of unnecessary reimplementations of CGFloor/Ceiling
2358         https://bugs.webkit.org/show_bug.cgi?id=140375
2359
2360         Reviewed by Simon Fraser.
2361
2362         * platform/mac/DragImageMac.mm:
2363         (WebCore::widthWithFont):
2364         (WebCore::drawAtPoint):
2365         (WebCore::webkit_CGCeiling): Deleted.
2366         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2367         (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
2368         (webkit_CGFloor): Deleted.
2369         Delete unnecessary code, use the real CGFloor/Ceiling instead.
2370
2371 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
2372
2373         REGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
2374         https://bugs.webkit.org/show_bug.cgi?id=140373
2375         <rdar://problem/19447156>
2376
2377         Reviewed by Simon Fraser.
2378
2379         * page/mac/TextIndicatorWindow.mm:
2380         (WebCore::TextIndicatorWindow::setTextIndicator):
2381         Expand the window margin to the nearest integer.
2382         The window was already being pixel-snapped, but then we'd translate by
2383         the non-integral margin when building up the layer tree.
2384         It's OK to do this on 2x because it's fine to have the margin be bigger
2385         than needed.
2386
2387         * platform/spi/cg/CoreGraphicsSPI.h:
2388         Add a CGCeiling to match CGFloor.
2389
2390 2015-01-12  Andreas Kling  <akling@apple.com>
2391
2392         Guard web thread stuff with USE(WEB_THREAD) instead of PLATFORM(IOS).
2393
2394         Dan pointed out that we should guard WebThreadIsLockedOrDisabled() with
2395         USE(WEB_THREAD) to communicate our ambitions to someday have an iOS
2396         build of WebKit that doesn't need any of that.
2397
2398         * Modules/geolocation/Geolocation.cpp:
2399         (WebCore::Geolocation::resume):
2400
2401 2015-01-12  Andreas Kling  <akling@apple.com>
2402
2403         Fix build for non-iOS platforms. :|
2404
2405         * Modules/geolocation/Geolocation.cpp:
2406         (WebCore::Geolocation::resume):
2407
2408 2015-01-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2409
2410         [Freetype] Don't use non-scalable fonts.
2411         https://bugs.webkit.org/show_bug.cgi?id=31931
2412
2413         Reviewed by Martin Robinson.
2414
2415         No new tests needed.
2416
2417         * platform/graphics/freetype/FontCacheFreeType.cpp:
2418         (WebCore::FontCache::createFontPlatformData): Prefer scalable fonts.
2419
2420 2015-01-12  Andreas Kling  <akling@apple.com>
2421
2422         Geolocation objects shouldn't prevent page caching.
2423         <https://webkit.org/b/140369>
2424
2425         Reviewed by Joseph Pecoraro.
2426
2427         Enable the code for suspend/resume of Geolocation objects on all platforms
2428         instead of just iOS. This allows pages using geolocation to use page cache
2429         instead of reloading on back/forward navigation.
2430
2431         Test: fast/history/page-cache-geolocation.html
2432
2433         * Modules/geolocation/Geolocation.cpp:
2434         (WebCore::Geolocation::Geolocation):
2435         (WebCore::Geolocation::resetAllGeolocationPermission):
2436         (WebCore::Geolocation::stop):
2437         (WebCore::Geolocation::setIsAllowed):
2438         (WebCore::Geolocation::positionChanged):
2439         (WebCore::Geolocation::setError):
2440         * Modules/geolocation/Geolocation.h:
2441
2442 2015-01-12  Chris Dumez  <cdumez@apple.com>
2443
2444         Log navigation types using DiagnosticLoggingClient
2445         https://bugs.webkit.org/show_bug.cgi?id=140323
2446
2447         Reviewed by Darin Adler.
2448
2449         Log navigation types using DiagnosticLoggingClient to help us understand
2450         what types of navigations are common and give us an estimate on the
2451         total number of navigations.
2452
2453         * loader/FrameLoader.cpp:
2454         (WebCore::logNavigation):
2455         (WebCore::FrameLoader::loadWithDocumentLoader):
2456         (WebCore::logNavigationWithFeatureCounter): Deleted.
2457         * page/DiagnosticLoggingKeys.cpp:
2458         (WebCore::DiagnosticLoggingKeys::navigationKey):
2459         * page/DiagnosticLoggingKeys.h:
2460
2461 2015-01-12  Brian J. Burg  <burg@cs.washington.edu>
2462
2463         Web Inspector: ASSERT under WebCore::InspectorResourceAgent::loadResource
2464         https://bugs.webkit.org/show_bug.cgi?id=140367
2465
2466         Reviewed by Andreas Kling.
2467
2468         * inspector/InspectorResourceAgent.cpp:
2469         (WebCore::InspectorResourceAgent::loadResource): use copyRef() instead of move(),
2470         since we check the callback after giving it to the loader client.
2471
2472 2015-01-12  Anders Carlsson  <andersca@apple.com>
2473
2474         Move DatabaseBackend functions back to Database
2475         https://bugs.webkit.org/show_bug.cgi?id=140368
2476
2477         Reviewed by Sam Weinig.
2478
2479         * Modules/webdatabase/Database.cpp:
2480         (WebCore::Database::openAndVerifyVersion):
2481         (WebCore::Database::close):
2482         (WebCore::Database::performOpenAndVerify):
2483         (WebCore::Database::scheduleTransaction):
2484         (WebCore::Database::runTransaction):
2485         (WebCore::Database::scheduleTransactionStep):
2486         (WebCore::Database::inProgressTransactionCompleted):
2487         (WebCore::Database::transactionClient):
2488         (WebCore::Database::transactionCoordinator):
2489         * Modules/webdatabase/Database.h:
2490         * Modules/webdatabase/DatabaseBackend.cpp:
2491         (WebCore::DatabaseBackend::openAndVerifyVersion): Deleted.
2492         (WebCore::DatabaseBackend::performOpenAndVerify): Deleted.
2493         (WebCore::DatabaseBackend::close): Deleted.
2494         (WebCore::DatabaseBackend::runTransaction): Deleted.
2495         (WebCore::DatabaseBackend::inProgressTransactionCompleted): Deleted.
2496         (WebCore::DatabaseBackend::scheduleTransaction): Deleted.
2497         (WebCore::DatabaseBackend::scheduleTransactionStep): Deleted.
2498         (WebCore::DatabaseBackend::transactionClient): Deleted.
2499         (WebCore::DatabaseBackend::transactionCoordinator): Deleted.
2500         * Modules/webdatabase/DatabaseBackend.h:
2501         * Modules/webdatabase/DatabaseThread.cpp:
2502         (WebCore::DatabaseThread::recordDatabaseOpen):
2503         (WebCore::DatabaseThread::recordDatabaseClosed):
2504         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
2505         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
2506         * Modules/webdatabase/DatabaseThread.h:
2507         * Modules/webdatabase/SQLTransactionBackend.cpp:
2508         (WebCore::SQLTransactionBackend::create):
2509         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
2510         * Modules/webdatabase/SQLTransactionBackend.h:
2511         (WebCore::SQLTransactionBackend::database):
2512
2513 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
2514
2515         Addressing post-review comment after r178292
2516         https://bugs.webkit.org/show_bug.cgi?id=136769
2517
2518         Unreviewed.
2519
2520         * loader/cache/CachedFont.cpp:
2521         (WebCore::CachedFont::ensureCustomFontData):
2522
2523 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
2524
2525         Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
2526         https://bugs.webkit.org/show_bug.cgi?id=136769
2527
2528         Reviewed by Antti Koivisto.
2529
2530         If ENABLE(SVG_OTF_CONVERTER) is defined, use the converter. It can be defined at the same
2531         time as ENABLE(SVG_FONTS) but, if so, the SVG font code will be dead code.
2532
2533         No new tests because the define is off by default. Tests will come soon, I promise.
2534
2535         * Configurations/FeatureDefines.xcconfig:
2536         * css/CSSFontFaceSource.cpp:
2537         (WebCore::CSSFontFaceSource::getFontData): When creating a font, if the ENABLE is on,
2538         do the transcode and take the non-SVG path.
2539         (WebCore::CSSFontFaceSource::ensureFontData): Pass extra arguments to
2540         CachedFont::ensureCustomFontData()
2541         * css/CSSFontFaceSource.h: For the case of in-document SVG fonts, keep the transcoded
2542         bytes around.
2543         * loader/cache/CachedFont.cpp:
2544         (WebCore::CachedFont::ensureCustomFontData): For out-of-document SVG fonts, do the
2545         transcode if the ENABLE is on, then treat as if the font is any old webfont.
2546         (WebCore::CachedFont::getSVGFontById): This function looks up the relevant <font>
2547         element. Modify it to take a pointer to a (possibly external) document within which
2548         to search.
2549         * loader/cache/CachedFont.h: Extra arguments to CachedFont::ensureCustomFontData()
2550         and CachedFont::getSVGFontById()
2551
2552 2015-01-12  Zan Dobersek  <zdobersek@igalia.com>
2553
2554         Clean up FrameTree::traverseNext() traversals of main frames
2555         https://bugs.webkit.org/show_bug.cgi?id=140338
2556
2557         Reviewed by Andreas Kling.
2558
2559         There's no reason to pass the main frame as the stayWithin parameter
2560         to FrameTree::traverseNext() when traversing over that same main frame.
2561
2562         * inspector/InspectorApplicationCacheAgent.cpp:
2563         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2564         * inspector/InspectorPageAgent.cpp:
2565         (WebCore::InspectorPageAgent::getCookies):
2566         (WebCore::InspectorPageAgent::deleteCookie):
2567         (WebCore::InspectorPageAgent::searchInResources):
2568         * replay/SerializationMethods.cpp:
2569         (WebCore::frameIndexFromFrame):
2570         (WebCore::frameFromFrameIndex):
2571
2572 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
2573
2574         Multi-rect TextIndicators are vertically flipped in WebKit1
2575         https://bugs.webkit.org/show_bug.cgi?id=140350
2576         <rdar://problem/19441243>
2577
2578         Reviewed by Beth Dakin.
2579
2580         * page/TextIndicator.cpp:
2581         (WebCore::TextIndicator::createWithSelectionInFrame):
2582         (WebCore::TextIndicator::TextIndicator):
2583         * page/TextIndicator.h:
2584         (WebCore::TextIndicator::selectionRectInRootViewCoordinates):
2585         (WebCore::TextIndicator::textBoundingRectInRootViewCoordinates):
2586         (WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
2587         (WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
2588         * page/mac/TextIndicatorWindow.mm:
2589         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
2590         (WebCore::TextIndicatorWindow::setTextIndicator):
2591         Compute, store, and use TextIndicator's selectionRect and textBoundingRect
2592         in root view coordinates instead of window coordinates; this way, each
2593         WebKit can do the conversion itself, and the rootView vs. window flipping
2594         isn't wrongly factored into textRectsInBoundingRectCoordinates.
2595
2596 2015-01-12  Commit Queue  <commit-queue@webkit.org>
2597
2598         Unreviewed, rolling out r178281.
2599         https://bugs.webkit.org/show_bug.cgi?id=140366
2600
2601         Broke many media tests (Requested by ap on #webkit).
2602
2603         Reverted changeset:
2604
2605         "defaultPlaybackRate not respected when set before source is
2606         loaded"
2607         https://bugs.webkit.org/show_bug.cgi?id=140282
2608         http://trac.webkit.org/changeset/178281
2609
2610 2015-01-12  Anders Carlsson  <andersca@apple.com>
2611
2612         Merge DatabaseBackendContext into DatabaseContext
2613         https://bugs.webkit.org/show_bug.cgi?id=140365
2614
2615         Reviewed by Antti Koivisto.
2616
2617         * CMakeLists.txt:
2618         * Modules/webdatabase/AbstractDatabaseServer.h:
2619         * Modules/webdatabase/Database.cpp:
2620         (WebCore::Database::Database):
2621         * Modules/webdatabase/Database.h:
2622         * Modules/webdatabase/DatabaseBackend.cpp:
2623         (WebCore::DatabaseBackend::DatabaseBackend):
2624         * Modules/webdatabase/DatabaseBackend.h:
2625         * Modules/webdatabase/DatabaseBackendBase.cpp:
2626         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
2627         * Modules/webdatabase/DatabaseBackendBase.h:
2628         (WebCore::DatabaseBackendBase::databaseContext):
2629         * Modules/webdatabase/DatabaseBackendContext.cpp: Removed.
2630         * Modules/webdatabase/DatabaseBackendContext.h: Removed.
2631         * Modules/webdatabase/DatabaseContext.cpp:
2632         (WebCore::DatabaseContext::securityOrigin):
2633         (WebCore::DatabaseContext::isContextThread):
2634         (WebCore::DatabaseContext::backend): Deleted.
2635         * Modules/webdatabase/DatabaseContext.h:
2636         * Modules/webdatabase/DatabaseManager.cpp:
2637         (WebCore::DatabaseManager::openDatabaseBackend):
2638         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
2639         * Modules/webdatabase/DatabaseServer.cpp:
2640         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
2641         (WebCore::DatabaseServer::openDatabase):
2642         (WebCore::DatabaseServer::createDatabase):
2643         * Modules/webdatabase/DatabaseServer.h:
2644         * Modules/webdatabase/DatabaseTracker.cpp:
2645         (WebCore::DatabaseTracker::canEstablishDatabase):
2646         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
2647         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
2648         * Modules/webdatabase/DatabaseTracker.h:
2649         * Modules/webdatabase/SQLTransactionBackend.cpp:
2650         * Modules/webdatabase/SQLTransactionClient.cpp:
2651         * WebCore.vcxproj/WebCore.vcxproj:
2652         * WebCore.vcxproj/WebCore.vcxproj.filters:
2653         * WebCore.xcodeproj/project.pbxproj:
2654
2655 2015-01-12  Jer Noble  <jer.noble@apple.com>
2656
2657         defaultPlaybackRate not respected when set before source is loaded
2658         https://bugs.webkit.org/show_bug.cgi?id=140282
2659
2660         Reviewed by Eric Carlson.
2661
2662         Test: media/video-defaultplaybackrate-before-load.html
2663
2664         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
2665         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
2666         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
2667         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
2668         value. So the end result is that the value from defaultPlaybackRate is overwritten by
2669         the default value of 1 in MediaPlayer.
2670
2671         Rather than caching the requested rate in MediaPlayer, cache the value reported by
2672         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
2673         rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
2674         value is still used for estimating the current time during playback.
2675
2676         Add MediaPlayerPrivate interface method to return the current playback rate.
2677
2678         * html/HTMLMediaElement.cpp:
2679         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
2680         (WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
2681         (WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
2682         (WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
2683             of effectivePlaybackRate();
2684         (WebCore::HTMLMediaElement::ended): Ditto.
2685         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
2686         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
2687         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
2688         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
2689         (WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
2690             requestedPlaybackRate() if playing and 0 if not.
2691         * html/HTMLMediaElement.h:
2692         * platform/graphics/MediaPlayer.cpp:
2693         (WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
2694         (WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
2695         (WebCore::MediaPlayer::setRate): Do not cache the rate.
2696         (WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
2697         * platform/graphics/MediaPlayer.h:
2698         (WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
2699         * platform/graphics/MediaPlayerPrivate.h:
2700         (WebCore::MediaPlayerPrivateInterface::rate): Added.
2701         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2702         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2703             Do not cache the requested rate.
2704         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
2705         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
2706         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2707         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
2708         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2709         (WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
2710         (WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
2711         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2712         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2713         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2714         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
2715         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
2716         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2717         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2718         (WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
2719
2720 2015-01-11  Anders Carlsson  <andersca@apple.com>
2721
2722         Merge DatabaseBase into Database
2723         https://bugs.webkit.org/show_bug.cgi?id=140345
2724
2725         Reviewed by Antti Koivisto.
2726
2727         * CMakeLists.txt:
2728         * Modules/webdatabase/Database.cpp:
2729         (WebCore::Database::Database):
2730         (WebCore::Database::runTransaction):
2731         (WebCore::Database::logErrorMessage):
2732         * Modules/webdatabase/Database.h:
2733         (WebCore::Database::scriptExecutionContext):
2734         * Modules/webdatabase/DatabaseBackendBase.cpp:
2735         * Modules/webdatabase/DatabaseBackendBase.h:
2736         (WebCore::DatabaseBackendBase::setFrontend):
2737         * Modules/webdatabase/DatabaseBase.cpp: Removed.
2738         * Modules/webdatabase/DatabaseBase.h: Removed.
2739         * WebCore.vcxproj/WebCore.vcxproj:
2740         * WebCore.vcxproj/WebCore.vcxproj.filters:
2741         * WebCore.xcodeproj/project.pbxproj:
2742
2743 2015-01-12  Darin Adler  <darin@apple.com>
2744
2745         Modernize and streamline HTMLTokenizer
2746         https://bugs.webkit.org/show_bug.cgi?id=140166
2747
2748         Reviewed by Sam Weinig.
2749
2750         * html/parser/AtomicHTMLToken.h:
2751         (WebCore::AtomicHTMLToken::initializeAttributes): Removed unneeded assertions
2752         based on fields I removed.
2753
2754         * html/parser/HTMLDocumentParser.cpp:
2755         (WebCore::HTMLDocumentParser::HTMLDocumentParser): Change to use updateStateFor
2756         to set the initial state when parsing a fragment, since it implements the same
2757         rule taht the tokenizerStateForContextElement function did.
2758         (WebCore::HTMLDocumentParser::pumpTokenizer): Updated to use the revised
2759         interfaces for HTMLSourceTracker and HTMLTokenizer.
2760         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Changed to take a
2761         TokenPtr instead of an HTMLToken, so we can clear out the TokenPtr earlier
2762         for non-character tokens, and let them get cleared later for character tokens.
2763         (WebCore::HTMLDocumentParser::insert): Pass references.
2764         (WebCore::HTMLDocumentParser::append): Ditto.
2765         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): Ditto.
2766
2767         * html/parser/HTMLDocumentParser.h: Updated argument type for constructTreeFromHTMLToken
2768         and removed now-unneeded m_token data members.
2769
2770         * html/parser/HTMLEntityParser.cpp: Removed unneeded uses of the inline keyword.
2771         (WebCore::HTMLEntityParser::consumeNamedEntity): Replaced two uses of
2772         advanceAndASSERT with just plain advance; there's really no need to assert the
2773         character is the one we just got out of the string.
2774
2775         * html/parser/HTMLInputStream.h: Moved the include of TextPosition.h here from
2776         its old location since this class has two data members that are OrdinalNumber.
2777
2778         * html/parser/HTMLMetaCharsetParser.cpp:
2779         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser): Removed most of the
2780         initialization, since it's now done by defaults.
2781         (WebCore::extractCharset): Rewrote this to be a non-member function, and to
2782         use a for loop, and to handle quote marks in a simpler way. Also changed it
2783         to return a StringView so we don't have to allocate a new string.
2784         (WebCore::HTMLMetaCharsetParser::processMeta): Use a modern for loop, and
2785         also take a token argument since it's no longer a data member.
2786         (WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Use a modern for
2787         loop, StringView instead of string, and don't bother naming the local enum.
2788         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Updated for the new
2789         way of getting tokens from the tokenizer.
2790
2791         * html/parser/HTMLMetaCharsetParser.h: Got rid of some data members and
2792         tightened up the formatting a little. Don't bother allocating the tokenizer
2793         on the heap.
2794
2795         * html/parser/HTMLPreloadScanner.cpp:
2796         (WebCore::TokenPreloadScanner::TokenPreloadScanner): Removed unneeded
2797         initialization.
2798         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner): Ditto.
2799         (WebCore::HTMLPreloadScanner::scan): Changed to take a reference.
2800
2801         * html/parser/HTMLPreloadScanner.h: Removed unneeded includes, typedefs,
2802         and forward declarations. Removed explicit declaration of the destructor,
2803         since the default one works. Removed unused createCheckpoint and rewindTo
2804         functions. Gave initial values for various data members. Marked the device
2805         scale factor const beacuse it's set in the constructor and never changed.
2806         Also removed the unneeded isSafeToSendToAnotherThread.
2807
2808         * html/parser/HTMLResourcePreloader.cpp:
2809         (WebCore::PreloadRequest::isSafeToSendToAnotherThread): Deleted.
2810
2811         * html/parser/HTMLResourcePreloader.h:
2812         (WebCore::PreloadRequest::PreloadRequest): Removed unneeded calls to
2813         isolatedCopy. Also removed isSafeToSendToAnotherThread.
2814
2815         * html/parser/HTMLSourceTracker.cpp:
2816         (WebCore::HTMLSourceTracker::startToken): Renamed. Changed to keep state
2817          in the source tracker itself, not the token.
2818         (WebCore::HTMLSourceTracker::endToken): Ditto.
2819         (WebCore::HTMLSourceTracker::source): Renamed. Changed to use the state
2820         from the source tracker.
2821
2822         * html/parser/HTMLSourceTracker.h: Removed unneeded include of HTMLToken.h.
2823         Renamed functions, removed now-unneeded comment.
2824
2825         * html/parser/HTMLToken.h: Cut down on the fields used by the source tracker.
2826         It only needs to know the start and end of each attribute, not each part of
2827         each attribute. Removed setBaseOffset, setEndOffset, length, addNewAttribute,
2828         beginAttributeName, endAttributeName, beginAttributeValue, endAttributeValue,
2829         m_baseOffset and m_length. Added beginAttribute and endAttribute.
2830         (WebCore::HTMLToken::clear): No need to zero m_length or m_baseOffset any more.
2831         (WebCore::HTMLToken::length): Deleted.
2832         (WebCore::HTMLToken::setBaseOffset): Deleted.
2833         (WebCore::HTMLToken::setEndOffset): Deleted.
2834         (WebCore::HTMLToken::beginStartTag): Only null out m_currentAttribute if we
2835         are compiling in assertions.
2836         (WebCore::HTMLToken::beginEndTag): Ditto.
2837         (WebCore::HTMLToken::addNewAttribute): Deleted.
2838         (WebCore::HTMLToken::beginAttribute): Moved the code from addNewAttribute in
2839         here and set the start offset.
2840         (WebCore::HTMLToken::beginAttributeName): Deleted.
2841         (WebCore::HTMLToken::endAttributeName): Deleted.
2842         (WebCore::HTMLToken::beginAttributeValue): Deleted.
2843         (WebCore::HTMLToken::endAttributeValue): Deleted.
2844
2845         * html/parser/HTMLTokenizer.cpp:
2846         (WebCore::HTMLToken::endAttribute): Added. Sets the end offset.
2847         (WebCore::HTMLToken::appendToAttributeName): Updated assertion.
2848         (WebCore::HTMLToken::appendToAttributeValue): Ditto.
2849         (WebCore::convertASCIIAlphaToLower): Renamed from toLowerCase and changed
2850         so it's legal to call on lower case letters too.
2851         (WebCore::vectorEqualsString): Changed to take a string literal rather than
2852         a WTF::String.
2853         (WebCore::HTMLTokenizer::inEndTagBufferingState): Made this a member function.
2854         (WebCore::HTMLTokenizer::HTMLTokenizer): Updated for data member changes.
2855         (WebCore::HTMLTokenizer::bufferASCIICharacter): Added. Optimized version of
2856         bufferCharacter for the common case where we know the character is ASCII.
2857         (WebCore::HTMLTokenizer::bufferCharacter): Moved this function here from the
2858         header since it's only used inside the class.
2859         (WebCore::HTMLTokenizer::emitAndResumeInDataState): Moved this here, renamed
2860         it and removed the state argument.
2861         (WebCore::HTMLTokenizer::emitAndReconsumeInDataState): Ditto.
2862         (WebCore::HTMLTokenizer::emitEndOfFile): More of the same.
2863         (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): Ditto.
2864         (WebCore::HTMLTokenizer::haveBufferedCharacterToken): Ditto.
2865         (WebCore::HTMLTokenizer::flushBufferedEndTag): Updated since m_token is now
2866         the actual token, not just a pointer.
2867         (WebCore::HTMLTokenizer::flushEmitAndResumeInDataState): Renamed this and
2868         removed the state argument.
2869         (WebCore::HTMLTokenizer::processToken): This function, formerly nextToken,
2870         is now the internal function used by nextToken. Updated its contents to use
2871         simpler macros, changed code to set m_state when returning, rather than
2872         constantly setting it when cycling through states, switched style to use
2873         early return/goto rather than lots of else statements, took out unneeded
2874         braces now that BEGIN/END_STATE handles the braces, collapsed upper and
2875         lower case letter handling in many states, changed lookAhead call sites to
2876         use the new advancePast function instead.
2877         (WebCore::HTMLTokenizer::updateStateFor): Set m_state directly instead of
2878         calling a setstate function.
2879         (WebCore::HTMLTokenizer::appendToTemporaryBuffer): Moved here from header.
2880         (WebCore::HTMLTokenizer::temporaryBufferIs): Changed argument type to
2881         a literal instead of a WTF::String.
2882         (WebCore::HTMLTokenizer::appendToPossibleEndTag): Renamed and changed type
2883         to be a UChar instead of LChar, although all characters will be ASCII.
2884         (WebCore::HTMLTokenizer::isAppropriateEndTag): Marked const, and changed
2885         type from size_t to unsigned.
2886
2887         * html/parser/HTMLTokenizer.h: Changed interface of nextToken so it returns
2888         a TokenPtr so code doesn't have to understand special rules about when to
2889         work with an HTMLToken and when to clear it. Made most functions private,
2890         and made the State enum private as well. Replaced the state and setState
2891         functions with more specific functions for the few states we need to deal
2892         with outside the class. Moved function bodies outside the class definition
2893         so it's easier to read the class definition.
2894
2895         * html/parser/HTMLTreeBuilder.cpp:
2896         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to use the
2897         new set state functions instead of setState.
2898         (WebCore::HTMLTreeBuilder::processEndTag): Ditto.
2899         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
2900         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
2901         (WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
2902
2903         * html/parser/InputStreamPreprocessor.h: Marked the constructor explicit,
2904         and mde it take a reference rather than a pointer.
2905
2906         * html/parser/TextDocumentParser.cpp:
2907         (WebCore::TextDocumentParser::insertFakePreElement): Updated to use the
2908         new set state functions instead of setState.
2909
2910         * html/parser/XSSAuditor.cpp:
2911         (WebCore::XSSAuditor::decodedSnippetForName): Updated for name change.
2912         (WebCore::XSSAuditor::decodedSnippetForAttribute): Updated for changes to
2913         attribute range tracking.
2914         (WebCore::XSSAuditor::decodedSnippetForJavaScript): Updated for name change.
2915         (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Deleted.
2916
2917         * html/parser/XSSAuditor.h: Deleted isSafeToSendToAnotherThread.
2918
2919         * html/track/WebVTTTokenizer.cpp: Removed the local state variable from
2920         WEBVTT_ADVANCE_TO; there is no need for it.
2921         (WebCore::WebVTTTokenizer::WebVTTTokenizer): Use a reference instead of a
2922         pointer for the preprocessor.
2923         (WebCore::WebVTTTokenizer::nextToken): Ditto. Also removed the state local
2924         variable and the switch statement, replacing with labels instead since we
2925         go between states with goto.
2926
2927         * platform/text/SegmentedString.cpp:
2928         (WebCore::SegmentedString::operator=): Changed the return type to be non-const
2929         to match normal C++ design rules.
2930         (WebCore::SegmentedString::pushBack): Renamed from prepend since this is not a
2931         general purpose prepend function. Also fixed assertions to not use the strangely
2932         named "escaped" function, since we are deleting it.
2933         (WebCore::SegmentedString::append): Ditto.
2934         (WebCore::SegmentedString::advancePastNonNewlines): Renamed from advance, since
2935         the function only works for non-newlines.
2936         (WebCore::SegmentedString::currentColumn): Got rid of unneeded local variable.
2937         (WebCore::SegmentedString::advancePastSlowCase): Moved here from header and
2938         renamed. This function now consumes the characters if they match.
2939
2940         * platform/text/SegmentedString.h: Made the changes mentioned above.
2941         (WebCore::SegmentedString::excludeLineNumbers): Deleted.
2942         (WebCore::SegmentedString::advancePast): Renamed from lookAhead. Also changed
2943         behavior so the characters are consumed.
2944         (WebCore::SegmentedString::advancePastIgnoringCase): Ditto.
2945         (WebCore::SegmentedString::advanceAndASSERT): Deleted.
2946         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Deleted.
2947         (WebCore::SegmentedString::escaped): Deleted.
2948
2949         * xml/parser/CharacterReferenceParserInlines.h:
2950         (WebCore::isHexDigit): Deleted.
2951         (WebCore::unconsumeCharacters): Updated for name change.
2952         (WebCore::consumeCharacterReference): Removed unneeded name for local enum,
2953         renamed local variable "cc" to character. Changed code to use helpers like
2954         isASCIIAlpha and toASCIIHexValue. Removed unneeded use of advanceAndASSERT,
2955         since we don't really need to assert the character we just extracted.
2956
2957         * xml/parser/MarkupTokenizerInlines.h:
2958         (WebCore::isTokenizerWhitespace): Renamed argument to character.
2959         (WebCore::advanceStringAndASSERTIgnoringCase): Deleted.
2960         (WebCore::advanceStringAndASSERT): Deleted.
2961         Changed all the macro implementations so they set m_state only when
2962         returning from the function and just use goto inside the state machine.
2963
2964 2015-01-11  Andreas Kling  <akling@apple.com>
2965
2966         Enable Vector bounds checking for ElementDescendantIterator.
2967         <https://webkit.org/b/140346>
2968
2969         Reviewed by Sam Weinig.
2970
2971         I had originally disabled Vector bounds checking for
2972         ElementDescendantIterator's internal ancestor stack, but upon
2973         re-running performance benchmarks, it appears to have little-to-no
2974         measurable benefit.
2975
2976         This change adds back the bounds checking.
2977
2978         * dom/ElementDescendantIterator.h:
2979
2980 2015-01-11  Chris Dumez  <cdumez@apple.com>
2981
2982         Drop legacy SVGCSSStyleSelector.cpp
2983         https://bugs.webkit.org/show_bug.cgi?id=140342
2984
2985         Reviewed by Antti Koivisto.
2986
2987         Drop legacy SVGCSSStyleSelector.cpp by porting the remaining SVG CSS
2988         properties to the generated StyleBuilder. This patch also removes
2989         support for the "LegacyStyleBuilder" option in CSSPropertyNames.in
2990         as all properties have now been ported over.
2991
2992         * CMakeLists.txt:
2993         * WebCore.vcxproj/WebCore.vcxproj:
2994         * WebCore.vcxproj/WebCore.vcxproj.filters:
2995         * WebCore.xcodeproj/project.pbxproj:
2996         Drop SVGCSSStyleSelector.cpp file as it was removed.
2997
2998         * css/CSSPropertyNames.in:
2999         * css/SVGCSSStyleSelector.cpp: Removed.
3000         * css/StyleBuilder.h:
3001         StyleBuilder::applyProperty() no longer need to return a boolean as
3002         it now handles ALL CSS properties.
3003
3004         * css/StyleBuilderCustom.h:
3005         (WebCore::StyleBuilderCustom::applyValueBaselineShift):
3006         (WebCore::StyleBuilderCustom::applyInitialFill):
3007         (WebCore::StyleBuilderCustom::applyInheritFill):
3008         (WebCore::StyleBuilderCustom::applyValueFill):
3009         (WebCore::StyleBuilderCustom::applyInitialStroke):
3010         (WebCore::StyleBuilderCustom::applyInheritStroke):
3011         (WebCore::StyleBuilderCustom::applyValueStroke):
3012         (WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow):
3013         (WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow):
3014         (WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow):
3015         Move 'fill', 'stroke' and '-webkit-svg-shadow' to the new
3016         StyleBuilder.
3017
3018         * css/StyleResolver.cpp:
3019         (WebCore::StyleResolver::applyProperty):
3020         * css/makeprop.pl:
3021
3022 2015-01-11  Antti Koivisto  <antti@apple.com>
3023
3024         Remove FontCachePurgePreventer
3025         https://bugs.webkit.org/show_bug.cgi?id=139628
3026
3027         Reviewed by Anders Carlsson.
3028
3029         This stack type is bug prone and invasive. A missing FontCachePurgePreventer in a code that touches fonts is always
3030         a hard-to-detect bug and there are many places that need it. Instead purge the font cache on top of the runloop.
3031
3032         The purge timer could in principle fire in a nested runloop. However we should never have unreferenced
3033         SimpleFontData objects in the stack in such case (GlyphData objects don't currently ref the font) because those
3034         only occur during layout and painting. Layout and painting can't trigger a nested runloops as there would be
3035         bigger problems.
3036
3037         Purging may also be triggered synchronously by a memory notification. That case won't have any GlyphDatas in the stack either.
3038
3039         * html/canvas/CanvasRenderingContext2D.cpp:
3040         (WebCore::CanvasRenderingContext2D::measureText):
3041         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3042         * page/FrameView.cpp:
3043         (WebCore::FrameView::layout):
3044         (WebCore::FrameView::paintContents):
3045         * platform/graphics/FontCache.cpp:
3046         (WebCore::FontCache::FontCache):
3047         (WebCore::FontCache::fontForFamily):
3048         (WebCore::FontCache::purgeTimerFired):
3049         (WebCore::FontCache::purgeInactiveFontData):
3050         * platform/graphics/FontCache.h:
3051         (WebCore::FontCache::disablePurging): Deleted.
3052         (WebCore::FontCache::enablePurging): Deleted.
3053         (WebCore::FontCachePurgePreventer::FontCachePurgePreventer): Deleted.
3054         (WebCore::FontCachePurgePreventer::~FontCachePurgePreventer): Deleted.
3055         * platform/graphics/FontFastPath.cpp:
3056         (WebCore::Font::emphasisMarkAscent):
3057         (WebCore::Font::emphasisMarkDescent):
3058         (WebCore::Font::emphasisMarkHeight):
3059         (WebCore::Font::drawEmphasisMarks):
3060         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3061         (PlatformCALayerWinInternal::displayCallback):
3062         * platform/mac/DragImageMac.mm:
3063         (WebCore::widthWithFont):
3064         (WebCore::drawAtPoint):
3065         (WebCore::createDragImageForLink):
3066         * platform/win/DragImageWin.cpp:
3067         (WebCore::createDragImageForLink):
3068         * platform/win/WebCoreTextRenderer.cpp:
3069         (WebCore::doDrawTextAtPoint):
3070         (WebCore::WebCoreTextFloatWidth):
3071         * rendering/InlineTextBox.cpp:
3072         (WebCore::InlineTextBox::localSelectionRect):
3073         (WebCore::InlineTextBox::offsetForPosition):
3074         (WebCore::InlineTextBox::positionForOffset):
3075         * rendering/RenderImage.cpp:
3076         (WebCore::RenderImage::setImageSizeForAltText):
3077         * rendering/RenderLayerBacking.cpp:
3078         (WebCore::RenderLayerBacking::paintIntoLayer):
3079         * rendering/RenderListBox.cpp:
3080         (WebCore::RenderListBox::updateFromElement):
3081         (WebCore::RenderListBox::paintItemForeground):
3082         * rendering/RenderMenuList.cpp:
3083         (RenderMenuList::updateOptionsWidth):
3084         * rendering/RenderThemeIOS.mm:
3085         (WebCore::adjustInputElementButtonStyle):
3086         * rendering/mathml/RenderMathMLOperator.cpp:
3087         (WebCore::RenderMathMLOperator::updateStyle):
3088         * rendering/svg/RenderSVGText.cpp:
3089         (WebCore::RenderSVGText::subtreeChildWasAdded):
3090         (WebCore::RenderSVGText::subtreeStyleDidChange):
3091         (WebCore::RenderSVGText::subtreeTextDidChange):
3092         (WebCore::RenderSVGText::removeChild):
3093         * rendering/svg/SVGInlineTextBox.cpp:
3094         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
3095
3096 2015-01-11  Myles C. Maxfield  <mmaxfield@apple.com>
3097
3098         [SVG -> OTF Converter] Implement ligatures
3099         https://bugs.webkit.org/show_bug.cgi?id=137094
3100
3101         Reviewed by Dan Bernstein.
3102
3103         Use the "liga" OpenType feature to implement ligatures inside the GSUB table.
3104
3105         Tests: svg/W3C-SVG-1.1/fonts-glyph-04-t.svg
3106                svg/W3C-SVG-1.1/text-text-06-t.svg
3107                svg/text/kerning.svg
3108                svg/text/multichar-glyph.svg
3109
3110         * svg/SVGToOTFFontConversion.cpp:
3111         (WebCore::SVGToOTFFontConverter::grow):
3112         (WebCore::SVGToOTFFontConverter::appendCMAPTable): Use StringView::codePoints().
3113         (WebCore::SVGToOTFFontConverter::firstGlyph): Returns the first element of the input
3114         vector, along with some ASSERTs.
3115         (WebCore::SVGToOTFFontConverter::appendLigatureSubtable):
3116         (WebCore::SVGToOTFFontConverter::appendScriptSubtable): Used inside appendGSUBTable.
3117         (WebCore::SVGToOTFFontConverter::appendGSUBTable): Updating for ligatures.
3118         (WebCore::codepointToString): Wrapper around U16_APPEND().
3119         (WebCore::SVGToOTFFontConverter::glyphsForCodepoint): Call codepointToString and look
3120         in internal map.
3121         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Use glyphsForCodepoint().
3122         (WebCore::SVGToOTFFontConverter::appendLigatureGlyphs): Ligatures are implemented as
3123         mapping a sequence of glyphs to another glyph inside OpenType. However, SVG models
3124         ligatures as mapping a sequence of codepoints to a glyph. This function makes dummy
3125         glyphs for all the codepoints that we don't have glyphs for and appends them to
3126         m_glyphs.
3127         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
3128         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Use appendEmptyGlyph() and
3129         call appendLigatureGlyphs().
3130
3131 2015-01-11  Chris Dumez  <cdumez@apple.com>
3132
3133         Move more SVG CSS properties to the new StyleBuilder
3134         https://bugs.webkit.org/show_bug.cgi?id=140340
3135
3136         Reviewed by Antti Koivisto.
3137
3138         Move more SVG CSS properties to the new StyleBuilder by introducing
3139         the necessary converters in StyleBuilderConverter.
3140
3141         * css/CSSPropertyNames.in:
3142         * css/SVGCSSStyleSelector.cpp:
3143         (WebCore::StyleResolver::applySVGProperty):
3144         (WebCore::roundToNearestGlyphOrientationAngle): Deleted.
3145         (WebCore::angleToGlyphOrientation): Deleted.
3146         (WebCore::colorFromSVGColorCSSValue): Deleted.
3147         * css/StyleBuilderConverter.h:
3148         (WebCore::StyleBuilderConverter::convertNumber):
3149         (WebCore::StyleBuilderConverter::convertNumberOrAuto):
3150         (WebCore::StyleBuilderConverter::convertOpacity):
3151         (WebCore::StyleBuilderConverter::convertSVGURIReference):
3152         (WebCore::StyleBuilderConverter::convertSVGColor):
3153         (WebCore::StyleBuilderConverter::convertGlyphOrientation):
3154         (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
3155         * rendering/style/RenderStyle.h:
3156
3157 2015-01-10  Csaba Osztrogonác  <ossy@webkit.org>
3158
3159         Unreviewed buildfix for !ENABLE(INSPECTOR) builds after r178201.
3160
3161         * inspector/InspectorInstrumentation.h:
3162         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
3163
3164 2015-01-10  Chris Dumez  <cdumez@apple.com>
3165
3166         Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties to the new StyleBuilder
3167         https://bugs.webkit.org/show_bug.cgi?id=140327
3168
3169         Reviewed by Sam Weinig.
3170
3171         Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties
3172         to the new StyleBuilder by introducing the necessary converters in
3173         StyleBuilderConverter.
3174
3175         * css/CSSPropertyNames.in:
3176         * css/SVGCSSStyleSelector.cpp:
3177         (WebCore::StyleResolver::applySVGProperty):
3178         * css/StyleBuilderConverter.h:
3179         (WebCore::StyleBuilderConverter::convertSVGLength):
3180         (WebCore::StyleBuilderConverter::convertSVGLengthVector):
3181         (WebCore::StyleBuilderConverter::convertStrokeDashArray):
3182         (WebCore::StyleBuilderConverter::convertPaintOrder):
3183         * svg/SVGLength.cpp:
3184         (WebCore::SVGLength::fromCSSPrimitiveValue):
3185         * svg/SVGLength.h:
3186
3187 2015-01-09  Andreas Kling  <akling@apple.com>
3188
3189         CTTE: GeolocationController always has a client.
3190         <https://webkit.org/b/140330>
3191
3192         Reviewed by Anders Carlsson.
3193
3194         Change GeolocationController::m_client to be a reference and remove
3195         a whole bunch of unnecessary null checks.
3196
3197         * Modules/geolocation/GeolocationController.cpp:
3198         (WebCore::GeolocationController::GeolocationController):
3199         (WebCore::GeolocationController::~GeolocationController):
3200         (WebCore::GeolocationController::addObserver):
3201         (WebCore::GeolocationController::removeObserver):
3202         (WebCore::GeolocationController::requestPermission):
3203         (WebCore::GeolocationController::cancelPermissionRequest):
3204         (WebCore::GeolocationController::lastPosition):
3205         (WebCore::GeolocationController::viewStateDidChange):
3206         (WebCore::provideGeolocationTo):
3207         * Modules/geolocation/GeolocationController.h:
3208         (WebCore::GeolocationController::client):
3209
3210 2015-01-09  Zalan Bujtas  <zalan@apple.com>
3211
3212         Calling clearSelection on a detached RenderObject leads to segfault.
3213         https://bugs.webkit.org/show_bug.cgi?id=140275
3214
3215         Reviewed by Simon Fraser.
3216
3217         We collect selection rects and compute selection gaps in order to
3218         paint/clear selection. With certain content, we need to be able
3219         to walk the tree up to a particular container to compute the selection rect.
3220         However this container might not be available when the selection is part of a detached tree.
3221         This is a null-check fix to ensure we don't crash in such cases, but in the long run
3222         selection gaps and rect should be cached between two layouts so that we don't need to
3223         keep collecting/recomputing them. Tracked here: webkit.org/b/140321
3224
3225         Test: editing/selection/clearselection-on-detached-subtree-crash.html
3226
3227         * rendering/RenderBox.cpp:
3228         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
3229         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
3230         * rendering/RenderView.cpp:
3231         (WebCore::RenderView::clearSelection):
3232
3233 2015-01-09  Anders Carlsson  <andersca@apple.com>
3234
3235         Remove more sync database code
3236         https://bugs.webkit.org/show_bug.cgi?id=140328
3237
3238         Reviewed by Sam Weinig.
3239
3240         * Modules/webdatabase/AbstractDatabaseServer.h:
3241         * Modules/webdatabase/DatabaseBackend.cpp:
3242         (WebCore::DatabaseBackend::DatabaseBackend):
3243         * Modules/webdatabase/DatabaseBackendBase.cpp:
3244         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
3245         * Modules/webdatabase/DatabaseBackendBase.h:
3246         (WebCore::DatabaseBackendBase::isSyncDatabase): Deleted.
3247         * Modules/webdatabase/DatabaseBasicTypes.h:
3248         * Modules/webdatabase/DatabaseManager.cpp:
3249         (WebCore::DatabaseManager::openDatabaseBackend):
3250         (WebCore::DatabaseManager::openDatabase):
3251         * Modules/webdatabase/DatabaseManager.h:
3252         * Modules/webdatabase/DatabaseServer.cpp:
3253         (WebCore::DatabaseServer::openDatabase):
3254         (WebCore::DatabaseServer::createDatabase):
3255         * Modules/webdatabase/DatabaseServer.h:
3256
3257 2015-01-09  Daniel Bates  <dabates@apple.com>
3258
3259         Fix the iOS build after <http://trac.webkit.org/changeset/178213>
3260         (https://bugs.webkit.org/show_bug.cgi?id=140310)
3261
3262         * platform/spi/cocoa/CoreTextSPI.h:
3263         * rendering/RenderThemeIOS.mm:
3264         (WebCore::RenderThemeIOS::systemFont):
3265
3266 2015-01-09  Chris Dumez  <cdumez@apple.com>
3267
3268         Get rid of legacy StyleBuilder switch in StyleResolver.cpp
3269         https://bugs.webkit.org/show_bug.cgi?id=140315
3270
3271         Reviewed by Sam Weinig.
3272
3273         Get rid of legacy StyleBuilder switch in StyleResolver.cpp now that most
3274         properties have been ported to the new generated StyleBuilder in previous
3275         patches. The properties that remained in this switch were shorthand
3276         properties or other properties that do not require any handling in the
3277         StyleBuilder.
3278
3279         To achieve this, this patch introduces 2 parameters in
3280         CSSPropertyNames.in:
3281         - SkipBuilder: Indicates that no StyleBuilder code should be generated
3282           for this property.
3283         - Shorthand: Indicates that this is a shorthand property, which therefore
3284           does not use the StyleBuilder. makeprop.pl will merely generate
3285           assertions for such properties, to validate that this is a shorthand
3286           property and that the StyleBuilder code is never reached.
3287
3288         * css/CSSPropertyNames.in:
3289         * css/SVGCSSStyleSelector.cpp:
3290         (WebCore::StyleResolver::applySVGProperty):
3291         * css/StyleResolver.cpp:
3292         (WebCore::StyleResolver::applyProperty):
3293         * css/makeprop.pl:
3294
3295 2015-01-09  Brent Fulgham  <bfulgham@apple.com>
3296
3297         [Win] Build fix after r178219.
3298
3299         * WebCore.vcxproj/WebCore.vcxproj: Remove PaintHooks.asm references in project file.
3300         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3301
3302 2015-01-09  Andreas Kling  <akling@apple.com>
3303
3304         Log which ActiveDOMObject(s) can't be suspended for PageCache.
3305         <https://webkit.org/b/139697>
3306
3307         Reviewed by Chris Dumez.
3308
3309         Give ActiveDOMObject a pure virtual activeDOMObjectName() so we can
3310         find their names.
3311
3312         Dump the names of all the ActiveDOMObjects that fail to suspend when
3313         we're trying to put a page into PageCache.
3314
3315         * Modules/encryptedmedia/MediaKeySession.h:
3316         * Modules/geolocation/Geolocation.h:
3317         * Modules/indexeddb/IDBDatabase.h:
3318         * Modules/indexeddb/IDBRequest.h:
3319         * Modules/indexeddb/IDBTransaction.h:
3320         * Modules/mediasource/MediaSource.h:
3321         * Modules/mediasource/SourceBuffer.h:
3322         * Modules/mediastream/MediaStreamTrack.h:
3323         * Modules/mediastream/RTCDTMFSender.h:
3324         * Modules/mediastream/RTCPeerConnection.h:
3325         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
3326         * Modules/mediastream/RTCStatsRequestImpl.h:
3327         * Modules/mediastream/RTCVoidRequestImpl.h:
3328         * Modules/notifications/Notification.h:
3329         * Modules/notifications/NotificationCenter.h:
3330         * Modules/webaudio/AudioContext.h:
3331         * Modules/webdatabase/DatabaseContext.h:
3332         * Modules/websockets/WebSocket.h:
3333         * WebCore.exp.in:
3334         * css/FontLoader.h:
3335         * dom/ActiveDOMObject.h:
3336         * dom/ScriptExecutionContext.cpp:
3337         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
3338         * dom/ScriptExecutionContext.h:
3339         * fileapi/FileReader.h:
3340         * history/PageCache.cpp:
3341         (WebCore::logCanCacheFrameDecision):
3342         * html/HTMLMarqueeElement.h:
3343         * html/HTMLMediaElement.h:
3344         * html/PublicURLManager.h:
3345         * html/canvas/WebGLRenderingContext.h:
3346         * page/EventSource.h:
3347         * page/SuspendableTimer.h:
3348         * workers/AbstractWorker.h:
3349         * xml/XMLHttpRequest.h:
3350
3351 2015-01-09  Anders Carlsson  <andersca@apple.com>
3352
3353         Get rid of the database strategy
3354         https://bugs.webkit.org/show_bug.cgi?id=140322
3355
3356         Reviewed by Sam Weinig.
3357
3358         * CMakeLists.txt:
3359         * Modules/webdatabase/DatabaseManager.cpp:
3360         (WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
3361         (WebCore::DatabaseManager::DatabaseManager):
3362         * WebCore.exp.in:
3363         * WebCore.vcxproj/WebCore.vcxproj:
3364         * WebCore.vcxproj/WebCore.vcxproj.filters:
3365         * WebCore.xcodeproj/project.pbxproj:
3366         * platform/DatabaseStrategy.cpp: Removed.
3367         * platform/DatabaseStrategy.h: Removed.
3368         * platform/PlatformStrategies.h:
3369         (WebCore::PlatformStrategies::PlatformStrategies):
3370         (WebCore::PlatformStrategies::databaseStrategy): Deleted.
3371
3372 2015-01-06  Anders Carlsson  <andersca@apple.com>
3373
3374         Move the Windows only plug-in code to WebKit/win
3375         https://bugs.webkit.org/show_bug.cgi?id=140133
3376
3377         Reviewed by Darin Adler.
3378
3379         * WebCore.vcxproj/WebCore.vcxproj:
3380         * WebCore.vcxproj/WebCore.vcxproj.filters:
3381
3382 2015-01-09  Anders Carlsson  <andersca@apple.com>
3383
3384         Another Windows build fix.
3385
3386         * DerivedSources.cpp:
3387
3388 2015-01-09  Enrica Casucci  <enrica@apple.com>
3389
3390         [iOS] Support additional text styles.
3391         https://bugs.webkit.org/show_bug.cgi?id=140310
3392         rdar://problem/18568864
3393
3394         Reviewed by Joseph Pecoraro.
3395
3396         Add support for three new text styles.
3397
3398         * css/CSSValueKeywords.in:
3399         * rendering/RenderThemeIOS.mm:
3400         (WebCore::RenderThemeIOS::systemFont):
3401
3402 2015-01-09  Anders Carlsson  <andersca@apple.com>
3403
3404         Fix Windows build.
3405
3406         * bindings/js/JSBindingsAllInOne.cpp:
3407
3408 2015-01-09  Anders Carlsson  <andersca@apple.com>
3409
3410         Remove more worker database code
3411         https://bugs.webkit.org/show_bug.cgi?id=140320
3412
3413         Reviewed by Tim Horton.
3414
3415         * workers/WorkerThread.cpp:
3416         (WebCore::WorkerThread::stop):
3417
3418 2015-01-09  Anders Carlsson  <andersca@apple.com>
3419
3420         Remove more sync database code
3421         https://bugs.webkit.org/show_bug.cgi?id=140318
3422
3423         Reviewed by Sam Weinig.
3424
3425         * CMakeLists.txt:
3426         * DerivedSources.make:
3427         * Modules/webdatabase/DatabaseBackendSync.cpp: Removed.
3428         * Modules/webdatabase/DatabaseBackendSync.h: Removed.
3429         * Modules/webdatabase/DatabaseCallback.h:
3430         * Modules/webdatabase/DatabaseCallback.idl:
3431         * Modules/webdatabase/DatabaseManager.cpp:
3432         (WebCore::DatabaseManager::openDatabaseSync): Deleted.
3433         * Modules/webdatabase/DatabaseManager.h:
3434         * Modules/webdatabase/DatabaseServer.cpp:
3435         (WebCore::DatabaseServer::createDatabase):
3436         * Modules/webdatabase/DatabaseSync.cpp: Removed.
3437         * Modules/webdatabase/DatabaseSync.h: Removed.
3438         * Modules/webdatabase/DatabaseSync.idl: Removed.
3439         * Modules/webdatabase/SQLStatementSync.cpp: Removed.
3440         * Modules/webdatabase/SQLStatementSync.h: Removed.