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