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