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