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