6dc161ed563cc62ed9444fc86571f620de922163
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-01  Eric Carlson  <eric.carlson@apple.com>
2
3         Fix text track language selection logic
4         https://bugs.webkit.org/show_bug.cgi?id=144467
5
6         Reviewed by Brent Fulgham.
7
8         No new tests, media/track/track-language-preference.html was updated.
9
10         * html/HTMLMediaElement.cpp:
11         (WebCore::HTMLMediaElement::configureTextTrackGroup): Correct a minor style typo.
12         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Update logging.
13
14         * page/CaptionUserPreferences.cpp:
15         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Minor cleanup.
16         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Give exact matches a
17         higher score.
18
19         * page/CaptionUserPreferencesMediaAF.cpp:
20         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Update for 
21         indexOfBestMatchingLanguageInList change.
22
23         * platform/Language.cpp:
24         (WebCore::indexOfBestMatchingLanguageInList): Add parameter for exact match. Convert the
25         passed language to lower case as we do with the preferred languages.
26         * platform/Language.h:
27
28 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
29
30         [Freetype] Add support for the font-synthesis property
31         https://bugs.webkit.org/show_bug.cgi?id=144472
32
33         Reviewed by Sergio Villar Senin.
34
35         No new tests. This causes fast/css3-text/font-synthesis.html to pass
36         for WebKitGTK+.
37
38         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
39         (WebCore::FontPlatformData::FontPlatformData): Only use synthetic bold when the font description allows it.
40         (WebCore::FontPlatformData::initializeWithFontFace): Ditto for synthetic oblique.
41
42 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
43
44         [GTK] New CORS tests from r183280 fail on WebKitGTK+
45         https://bugs.webkit.org/show_bug.cgi?id=144469
46
47         Reviewed by Sergio Villar Senin.
48
49         No new tests. This causes failing tests to pass.
50
51         * platform/network/soup/ResourceHandleSoup.cpp:
52         (WebCore::doRedirect): Clear the origin header on cross-origin redirects.
53
54 2015-04-30  Alex Christensen  <achristensen@webkit.org>
55
56         Compile fix when using content extensions debugging code.
57
58         * contentextensions/ContentExtensionCompiler.cpp:
59         (WebCore::ContentExtensions::compileRuleList):
60         * contentextensions/ContentExtensionsDebugging.h:
61         * contentextensions/DFA.cpp:
62         (WebCore::ContentExtensions::printTransitions):
63         (WebCore::ContentExtensions::DFA::debugPrintDot):
64         * contentextensions/DFANode.h:
65         * contentextensions/NFA.cpp:
66         (WebCore::ContentExtensions::NFA::memoryUsed):
67         (WebCore::ContentExtensions::NFA::debugPrintDot):
68
69 2015-04-30  Dan Bernstein  <mitz@apple.com>
70
71         Fixed the build for <rdar://problem/20758514>
72
73         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
74         (WebCore::AudioSourceProviderAVFObjC::destroyMix): Don’t pass nil to
75         -[AVMutableAudioMix setInputParameters:].
76
77 2015-04-30  Daniel Bates  <dabates@apple.com>
78
79         Clean up: Remove unnecessary runtime computation of string length
80         https://bugs.webkit.org/show_bug.cgi?id=144483
81
82         Reviewed by Joseph Pecoraro.
83
84         Following <http://trac.webkit.org/changeset/183649>, WebCore::fullyQualifiedInfoTableName()
85         computes strlen() of the first string literal as part of concatenating two string literals.
86         It is sufficient to use sizeof() - 1 instead of strlen() to compute the length of the first
87         string literal because the size of the string literal is known at compile time.
88
89         * Modules/webdatabase/DatabaseBackendBase.cpp:
90         (WebCore::fullyQualifiedInfoTableName):
91
92 2015-04-30  Dean Jackson  <dino@apple.com>
93
94         Expose -apple-system as a font family
95         https://bugs.webkit.org/show_bug.cgi?id=144484
96         <rdar://problem/20767330>
97
98         Reviewed by Tim Horton.
99
100         Accept "-apple-system" for the font-family property, and
101         rename "-apple-system-font-monospaced-numbers" to
102         "-apple-system-monospaced-numbers".
103
104         Also change the media controls to use the new name.
105
106         Covered by existing tests and this new one:
107             fast/text/system-font-legacy-name.html
108
109         * Modules/mediacontrols/mediaControlsApple.css:
110         (audio::-webkit-media-controls-time-remaining-display):
111         * Modules/mediacontrols/mediaControlsiOS.css:
112         (::-webkit-media-controls):
113         (audio::-webkit-media-controls-time-remaining-display):
114         (audio::-webkit-media-controls-status-display):
115         * platform/graphics/ios/FontCacheIOS.mm: Add support for the new name.
116         (WebCore::createCTFontWithFamilyNameAndWeight):
117         * platform/graphics/mac/FontCacheMac.mm: Ditto.
118         (WebCore::fontWithFamily):
119
120 2015-04-30  Javier Fernandez  <jfernandez@igalia.com>
121
122         [CSS Grid Layout] overflow-position keyword for align and justify properties.
123         https://bugs.webkit.org/show_bug.cgi?id=144235
124
125         Reviewed by Sergio Villar Senin.
126
127         When the alignment subject is larger than the alignment container,
128         it will overflow. Some alignment modes, if honored in this
129         situation, may cause data loss; an overflow alignment mode can be
130         explicitly specified to avoid this.
131
132         This patch implements overflow-keyword handling for Grid Layout on
133         align-self and justify-self properties.
134
135         Test: fast/css-grid-layout/grid-align-justify-overflow.html
136
137         * rendering/RenderGrid.cpp:
138         (WebCore::computeOverflowAlignmentOffset):
139         (WebCore::RenderGrid::rowPositionForChild):
140         (WebCore::RenderGrid::columnPositionForChild):
141         (WebCore::RenderGrid::rowAxisPositionForChild): Deleted.
142         * rendering/style/RenderStyle.cpp:
143         (WebCore::resolveAlignmentData):
144         (WebCore::resolveJustificationData):
145         (WebCore::RenderStyle::resolveAlignment):
146         (WebCore::RenderStyle::resolveAlignmentOverflow):
147         (WebCore::RenderStyle::resolveJustification):
148         (WebCore::RenderStyle::resolveJustificationOverflow):
149         * rendering/style/RenderStyle.h:
150
151 2015-04-30  Jon Honeycutt  <jhoneycutt@apple.com>
152
153         Rebaseline bindings tests results after r183648.
154
155         Unreviewed.
156
157         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
158         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
159         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
160         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
161         * bindings/scripts/test/JS/JSTestInterface.cpp:
162         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
163         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
164         (WebCore::setJSTestInterfaceImplementsStr2):
165         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
166         (WebCore::setJSTestInterfaceSupplementalStr2):
167         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
168         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
169         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
170         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
171         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
172         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
173         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
174         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
175         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
176         * bindings/scripts/test/JS/JSTestObj.cpp:
177         (WebCore::setJSTestObjConstructorStaticStringAttr):
178         (WebCore::setJSTestObjStringAttr):
179         (WebCore::setJSTestObjReflectedStringAttr):
180         (WebCore::setJSTestObjReflectedURLAttr):
181         (WebCore::setJSTestObjReflectedCustomURLAttr):
182         (WebCore::setJSTestObjStringAttrWithGetterException):
183         (WebCore::setJSTestObjStringAttrWithSetterException):
184         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
185         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
186         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
187         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
188         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
189         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
190         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
191         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
192         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
193         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
194         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
195         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
196         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
197         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
198         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
199         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
200         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
201         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
202         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
203         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
204         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
205         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
206
207 2015-04-30  Simon Fraser  <simon.fraser@apple.com>
208
209         Fixed elements end up in the middle of the view with pageScale < 1
210         https://bugs.webkit.org/show_bug.cgi?id=144428
211         rdar://problem/20404982
212
213         Reviewed by Tim Horton.
214
215         When pageScale is < 1, we used fixed layout mode, and FrameView::fixedElementsLayoutRelativeToFrame()
216         returns true. However, the scrolling thread was calling the static scrollOffsetForFixedPosition()
217         hardcoding 'false' for this parameter.
218         
219         Fix by sending the value of fixedElementsLayoutRelativeToFrame over to the scrolling thread,
220         so we can use it when doing scrolling-thread fixed position stuff.
221
222         Not testable.
223
224         * page/scrolling/AsyncScrollingCoordinator.cpp:
225         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
226         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
227         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
228         (WebCore::ScrollingStateFrameScrollingNode::setFixedElementsLayoutRelativeToFrame):
229         * page/scrolling/ScrollingStateFrameScrollingNode.h:
230         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
231         (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
232         (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
233         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
234         (WebCore::ScrollingTreeFrameScrollingNode::fixedElementsLayoutRelativeToFrame):
235         (WebCore::ScrollingTreeFrameScrollingNode::shouldUpdateScrollLayerPositionSynchronously): Deleted.
236         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
237         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
238
239 2015-04-30  Beth Dakin  <bdakin@apple.com>
240
241         Remove invalid assertion from MouseEvent::create()
242         https://bugs.webkit.org/show_bug.cgi?id=144477
243
244         Reviewed by Tim Horton.
245
246         mouseforcechanged events and mouseforcewillbegin trigger this assertion. The 
247         assertion does not seem valuable, so rather than changing it, just remove it.
248         * dom/MouseEvent.cpp:
249         (WebCore::MouseEvent::create):
250
251 2015-04-30  Dean Jackson  <dino@apple.com>
252
253         -apple-system-font-monospaced-numbers doesn't work on iOS
254         https://bugs.webkit.org/show_bug.cgi?id=144478
255         <rdar://problem/20544940>
256
257         Reviewed by Brent Fulgham.
258
259         Make sure to start from the system font descriptor when
260         asking for a monospaced numeric alternate.
261
262         Test: platform/ios-simulator/fast/text/system-monospaced-numbers.html
263
264         * platform/graphics/ios/FontCacheIOS.mm:
265         (WebCore::createCTFontWithFamilyNameAndWeight):
266
267 2015-04-30  Oliver Hunt  <oliver@apple.com>
268
269         DOM bindings should not be using a reference type to point to a temporary object
270         https://bugs.webkit.org/show_bug.cgi?id=144474
271
272         Reviewed by Beth Dakin.
273
274         The DOM bindings will currently try and use a local reference to point
275         to a temporary object. This currently works as a by product of the compiler's
276         stack layout. This patch removes the dependency on undefined behaviour
277         by ensuring that we use a value rather than reference type.
278
279         * bindings/scripts/CodeGeneratorJS.pm:
280         (GenerateParametersCheck):
281         (GetNativeTypeForCallbacks):
282
283 2015-04-30  Brady Eidson  <beidson@apple.com>
284
285         Build fix after r183646 for less enlightened platforms.
286
287         Unreviewed.
288
289         * Modules/webdatabase/DatabaseBackendBase.cpp:
290         (WebCore::fullyQualifiedInfoTableName): Windows doesn’t have stpcpy :(
291
292 2015-04-30  Brady Eidson  <beidson@apple.com>
293
294         Javascript using WebSQL can create their own WebKit info table.
295         <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466
296
297         Reviewed by Alex Christensen.
298
299         Test: storage/websql/alter-to-info-table.html
300
301         * Modules/webdatabase/DatabaseBackendBase.cpp:
302         (WebCore::DatabaseBackendBase::databaseInfoTableName): Return the info table name.
303         (WebCore::fullyQualifiedInfoTableName): Append "main." to the info table name.
304         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Use the fully qualified name.
305         (WebCore::DatabaseBackendBase::performOpenAndVerify): Ditto.
306         (WebCore::DatabaseBackendBase::getVersionFromDatabase): Ditto.
307         (WebCore::DatabaseBackendBase::setVersionInDatabase): Ditto.
308
309 2015-04-30  Beth Dakin  <bdakin@apple.com>
310
311         Should choose UIScrollView indicatorStyle based on the document background color
312         https://bugs.webkit.org/show_bug.cgi?id=144473
313         -and corresponding-
314         rdar://problem/19897699
315
316         Reviewed by Simon Fraser.
317
318         Export this function.
319         * platform/graphics/Color.h:
320
321 2015-04-30  Brent Fulgham  <bfulgham@apple.com>
322
323         [Win] Allow WebKit to build without ANGLE support
324         https://bugs.webkit.org/show_bug.cgi?id=144459
325         <rdar://problem/20707307>
326
327         Reviewed by Dean Jackson.
328
329         * platform/graphics/GLContext.cpp: Use the ENABLE(GRAPHICS_CONTEXT_3D)
330         macro to avoid compiling this code if not using WEBGL/3D contexts.
331
332 2015-04-29  David Hyatt  <hyatt@apple.com>
333
334         Avoid containingBlock() calls when no writing mode flipping is needed.
335         https://bugs.webkit.org/show_bug.cgi?id=144407
336
337         Reviewed by Simon Fraser.
338
339         Add a bool to RenderView that indicates whether or not any flipped blocks have been
340         added to the view. Once tainted, the view just stays dirty forever. If no flipped
341         blocks are ever seen, we can then optimize away calls to containingBlock().
342
343         The motivation for this patch is to improve layer position updating, which makes many
344         calls to topLeftLocationOffset(), one of the functions that can be optimized by this
345         change.
346
347         * rendering/RenderBox.cpp:
348         (WebCore::RenderBox::layoutOverflowRectForPropagation):
349         * rendering/RenderBoxModelObject.cpp:
350         (WebCore::RenderBoxModelObject::updateFromStyle):
351         * rendering/RenderLayer.cpp:
352         (WebCore::RenderLayer::calculateClipRects):
353         * rendering/RenderLineBoxList.cpp:
354         (WebCore::RenderLineBoxList::rangeIntersectsRect):
355         * rendering/RenderView.cpp:
356         (WebCore::RenderView::RenderView):
357         * rendering/RenderView.h:
358
359 2015-04-29  Jer Noble  <jer.noble@apple.com>
360
361         Make GenericTaskQueue even more generic (and usable inside platform/)
362         https://bugs.webkit.org/show_bug.cgi?id=144414
363
364         Reviewed by Eric Carlson.
365
366         Templatize GenericTaskQueue so that it can be used from within platform/.
367
368         * CMakeLists.txt:
369         * WebCore.vcxproj/WebCore.vcxproj:
370         * WebCore.vcxproj/WebCore.vcxproj.filters:
371         * WebCore.xcodeproj/project.pbxproj:
372         * dom/GenericTaskQueue.cpp: Removed.
373         * html/HTMLMediaElement.h:
374         * platform/GenericTaskQueue.h: Renamed from Source/WebCore/dom/GenericTaskQueue.h.
375         (WebCore::TaskDispatcher::TaskDispatcher): Added default templatized class which just calls the parameter's postTask().
376         (WebCore::TaskDispatcher::postTask): Call context's postTask().
377         (WebCore::TaskDispatcher<Timer>::TaskDispatcher): Add a timer version which does not require a context.
378         (WebCore::TaskDispatcher<Timer>::postTask): Set the timer.
379         (WebCore::TaskDispatcher<Timer>::timerFired): Call the task.
380         (WebCore::GenericTaskQueue::GenericTaskQueue): Moved from .cpp.
381         (WebCore::GenericTaskQueue::enqueueTask): Ditto.
382         (WebCore::GenericTaskQueue::close): Ditto.
383         (WebCore::GenericTaskQueue::cancelAllTasks): Ditto.
384         (WebCore::GenericTaskQueue::hasPendingTasks): Ditto.
385
386 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
387
388         Unreviewed build fix. WebCore has a weak symbol.
389
390         WebCore has a weak external symbol in it. A common cause of weak external
391         symbols is when an inline function is listed in the linker export file.
392         ERROR: symbol __ZNK7WebCore4Page25expectsWheelEventTriggersEv
393
394         * page/Page.cpp:
395         (WebCore::Page::expectsWheelEventTriggers):
396         * page/Page.h:
397         (WebCore::Page::expectsWheelEventTriggers): Deleted.
398
399 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
400
401         Crash at WebCore::Document::absoluteRegionForEventTargets 
402         https://bugs.webkit.org/show_bug.cgi?id=144426
403         rdar://problem/20502166
404
405         Reviewed by Tim Horton.
406
407         When a frame had wheel event handlers, we would register the document itself
408         as a handler in its parent document. This is problematic, because there's not
409         code path that removes it when the frame is destroyed.
410         
411         It turns out we don't need to do this at all; the non-fast scrollable region
412         already takes handlers in subframes into account.
413
414         Tests: fast/events/wheelevent-in-frame.html
415                fast/events/wheelevent-in-reattached-frame.html
416
417         * dom/Document.cpp:
418         (WebCore::Document::didAddWheelEventHandler):
419         (WebCore::Document::didRemoveWheelEventHandler):
420
421 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
422
423         Not all videos should automatically play to playback target
424         https://bugs.webkit.org/show_bug.cgi?id=144430
425         <rdar://problem/20718523>
426
427         Reviewed by Darin Adler.
428
429         * Modules/mediasession/WebMediaSessionManager.cpp:
430         (WebCore::WebMediaSessionManager::clientStateDidChange): Consider ExternalDeviceAutoPlayCandidate.
431         Minor cleanup.
432
433         * html/HTMLMediaElement.cpp:
434         (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate when a <video>
435         has a file with an audio track that does not loop.
436
437         * page/MediaProducer.h: Add ExternalDeviceAutoPlayCandidate.
438
439 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
440
441         LiveNodeList may unexpectedly return an element for empty string
442         https://bugs.webkit.org/show_bug.cgi?id=144429
443
444         Reviewed by Darin Adler.
445
446         * dom/LiveNodeList.cpp:
447         (WebCore::LiveNodeList::namedItem):
448         Never return a result for an empty string.
449
450 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
451
452         Remove PassRefPtr in SVGFEFooElement classes
453         https://bugs.webkit.org/show_bug.cgi?id=144425
454
455         Reviewed by Darin Adler.
456
457         As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
458         in SVGFEFooElement.
459
460         No new tests, no behavior changes.
461
462         * css/RGBColor.cpp:
463         (WebCore::RGBColor::create):
464         * css/RGBColor.h:
465         * platform/graphics/filters/PointLightSource.h:
466         (WebCore::PointLightSource::create):
467         * platform/graphics/filters/SpotLightSource.h:
468         (WebCore::SpotLightSource::create):
469         * svg/SVGColor.cpp:
470         (WebCore::SVGColor::rgbColor):
471         * svg/SVGColor.h:
472         * svg/SVGFEDistantLightElement.cpp:
473         (WebCore::SVGFEDistantLightElement::lightSource):
474         * svg/SVGFEDistantLightElement.h:
475         * svg/SVGFELightElement.cpp:
476         (WebCore::SVGFELightElement::findLightSource):
477         * svg/SVGFELightElement.h:
478         * svg/SVGFEPointLightElement.cpp:
479         (WebCore::SVGFEPointLightElement::lightSource):
480         * svg/SVGFEPointLightElement.h:
481         * svg/SVGFESpotLightElement.cpp:
482         (WebCore::SVGFESpotLightElement::lightSource):
483         * svg/SVGFESpotLightElement.h:
484
485 2015-04-29  Dean Jackson  <dino@apple.com>
486
487         Create a named CSS property for system colors
488         https://bugs.webkit.org/show_bug.cgi?id=144423
489         <rdar://problem/20491011>
490
491         Reviewed by Tim Horton.
492
493         Test: fast/css/apple-system-colors.html
494
495         Expose the following values to CSS color properties:
496             -apple-system-blue
497             -apple-system-brown
498             -apple-system-gray
499             -apple-system-green
500             -apple-system-orange
501             -apple-system-pink
502             -apple-system-purple
503             -apple-system-red
504             -apple-system-yellow
505
506         On platforms other than OS X Yosemite and iOS, the
507         actual color values are undefined and become transparent
508         black. (In fact, not all are defined on iOS either.)
509
510         * WebCore.xcodeproj/project.pbxproj: Two new SPI header files.
511
512         * css/CSSParser.cpp:
513         (WebCore::CSSParser::validSystemColorValue): New helper function that
514         checks if a CSSValueID is between the two system color values. This
515         was being tested everywhere, which meant adding a new system color was
516         at risk of being ignored. It's a static method so it can be used
517         from the SVG CSS parser too.
518         (WebCore::validPrimitiveValueColor): Use the new helper.
519         (WebCore::CSSParser::parseValue): Ditto.
520         (WebCore::CSSParser::parseBackgroundColor): Ditto.
521         (WebCore::CSSParser::parseShadow): Ditto.
522         (WebCore::parseDeprecatedGradientColorStop): Ditto.
523         (WebCore::parseGradientColorOrKeyword): Ditto.
524         * css/CSSParser.h: New static helper function.
525
526         * css/CSSValueKeywords.in: Add the new CSS value keywords.
527
528         * css/SVGCSSParser.cpp:
529         (WebCore::validSystemControlColorValue): SVG has a restricted
530         set of system colors, so use the helper from CSSParser but with
531         an extra condition.
532         (WebCore::CSSParser::parseSVGValue): Use the helper.
533
534         * platform/spi/ios/UIColorSPI.h: Added.
535         * platform/spi/cocoa/NSColorSPI.h: Added.
536
537         * rendering/RenderThemeIOS.h: New systemColor override. Also add a cache for system colors.
538         * rendering/RenderThemeIOS.mm:
539         (WebCore::RenderThemeIOS::systemColor): Ask UIColor to provide the color values for the new CSS values.
540         * rendering/RenderThemeMac.mm:
541         (WebCore::RenderThemeMac::systemColor): Ditto.
542
543 2015-04-29  Commit Queue  <commit-queue@webkit.org>
544
545         Unreviewed, rolling out r183600.
546         https://bugs.webkit.org/show_bug.cgi?id=144432
547
548         New tests time out everywhere (Requested by ap on #webkit).
549
550         Reverted changeset:
551
552         "Crash at WebCore::Document::absoluteRegionForEventTargets"
553         https://bugs.webkit.org/show_bug.cgi?id=144426
554         http://trac.webkit.org/changeset/183600
555
556 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
557
558         Unreviewed iOS build fix. Unused parameter no longer exists.
559
560         * page/scrolling/ScrollingCoordinator.cpp:
561         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
562
563 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
564
565         Crash at WebCore::Document::absoluteRegionForEventTargets 
566         https://bugs.webkit.org/show_bug.cgi?id=144426
567         rdar://problem/20502166
568
569         Reviewed by Tim Horton.
570
571         When a frame had wheel event handlers, we would register the document itself
572         as a handler in its parent document. This is problematic, because there's not
573         code path that removes it when the frame is destroyed.
574         
575         It turns out we don't need to do this at all; the non-fast scrollable region
576         already takes handlers in subframes into account.
577
578         Tests: fast/events/wheelevent-in-frame.html
579                fast/events/wheelevent-in-reattached-frame.html
580
581         * dom/Document.cpp:
582         (WebCore::Document::didAddWheelEventHandler):
583         (WebCore::Document::didRemoveWheelEventHandler):
584
585 2015-04-29  David Kilzer  <ddkilzer@apple.com>
586
587         Attempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
588         <http://webkit.org/b/144362>
589
590         Reviewed by Andy Estes.
591
592         This patch switches soft-linking of QuickLook.framework to
593         QuickLookSoftLink.{h,mm} so that we stop exporting unintended
594         symbols.
595
596         No new tests since no change in behavior.
597
598         * WebCore.xcodeproj/project.pbxproj:
599         - Add QuickLookSoftLinking.{h,mm} to the project.
600
601         * platform/ios/QuickLookSoftLink.h: Added.
602         * platform/ios/QuickLookSoftLink.mm: Added.
603         * platform/mac/SoftLinking.h:
604         (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
605         (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
606         (SOFT_LINK_POINTER_FOR_HEADER): Add macro.
607         (SOFT_LINK_POINTER_FOR_SOURCE): Add macro.
608
609         * platform/network/ios/QuickLook.h:
610         - Remove unused declarations.
611
612         * platform/network/ios/QuickLook.mm:
613         (WebCore::QLPreviewConverterClass): Deleted.
614         (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
615         (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
616         (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
617         - Remove SOFT_LINK macros and unused methods after switching to
618           new QuickLookSoftLink.{h,mm}.
619         (WebCore::QLPreviewGetSupportedMIMETypesSet):
620         - Switch to use NeverDestroyed<>.
621         (WebCore::registerQLPreviewConverterIfNeeded):
622         (createQLPreviewProtocol):
623         (WebCore::QLPreviewProtocol):
624         (WebCore::QuickLookHandle::QuickLookHandle):
625         (WebCore::QuickLookHandle::create):
626         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
627         - Simplify code when using QuickLookSoftLink.h.
628
629         * platform/network/ios/WebCoreURLResponseIOS.mm:
630         - Include QuickLookSoftLink.h header.
631
632 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
633
634         Compute the non-fast-scrollable region in main-document coordinates
635         https://bugs.webkit.org/show_bug.cgi?id=144420
636
637         Reviewed by Tim Horton.
638
639         Compute the non-fast-scrollable region in document coordinates, to make it easier
640         to reason about. Previously, it was document coordinates offset by top content inset.
641
642         * page/DebugPageOverlays.cpp:
643         (WebCore::MouseWheelRegionOverlay::updateRegion): Traverse all frames to compute the wheel
644         event handler region, mapping each to root view coords, and then mapping back into document
645         coords at the end.
646         (WebCore::NonFastScrollableRegionOverlay::updateRegion): No offset needed here; the
647         overlay and region are both document coordinates.
648         * page/FrameView.h: Make some mapping function overrides public, and expose widgetsInRenderTree().
649         * page/Page.cpp:
650         (WebCore::Page::nonFastScrollableRects): Remove frame argument.
651         * page/Page.h:
652         * page/PageOverlay.cpp:
653         (WebCore::PageOverlay::bounds):
654         (WebCore::PageOverlay::viewToOverlayOffset): Convenience function to map between
655         view and overlay coordinates.
656         * page/PageOverlay.h:
657         * page/scrolling/AsyncScrollingCoordinator.cpp: New computeNonFastScrollableRegion() signature.
658         (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
659         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
660         (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
661         * page/scrolling/ScrollingCoordinator.cpp:
662         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): This function
663         recurses on frames, computing an absolute (document-relative) region per frame. This
664         removes the confusing offsetting through top content inset.
665         Change how we get to plugins that want wheel events; we can't get from PluginViewBase
666         to renderers, so use FrameView's list of Widgets, and their RenderWidgets. This fixes
667         regions for transformed plugin-ins.
668         For subframes, we get a region in the subframe's document coords. Map to that sub-frame,
669         then to our frame, then to our document.
670         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Wrapper that hides
671         the recursive function.
672         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Deleted.
673         * page/scrolling/ScrollingCoordinator.h:
674         * page/scrolling/ScrollingTree.cpp:
675         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Map the event point
676         from view coordinates to document coordinates for testing against the non-fast region.
677         We previously assert that the root note is a FrameScrolling node.
678         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
679         (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset): Similar to ScrollView::viewToContents()
680         for the scrolling tree.
681         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
682         * testing/Internals.cpp:
683         (WebCore::Internals::nonFastScrollableRects): No need for frame arg.
684
685 2015-04-29  Brent Fulgham  <bfulgham@apple.com>
686
687         Expand test infrastructure to support scrolling tests
688         https://bugs.webkit.org/show_bug.cgi?id=143684
689         <rdar://problem/20375516>
690
691         Reviewed by Simon Fraser.
692
693         Tested by various fast/scrolling and platform/mac-wk2/tiled-drawing/scrolling tests.
694
695         This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
696         function object to be fired when scroll events are finished. The object also keeps track of reasons
697         why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
698         check rendering state in the middle of an animation.
699
700         Switch from the original WeakPtr design to ThreadSafeRefPtr, because WeakPtr cannot be shared
701         across multiple threads.
702
703         * page/FrameView.cpp:
704         (WebCore::FrameView::layout): Make sure ScrollAnimator knows about any active test trigger.
705         (WebCore::FrameView::setScrollPosition): Ditto.
706         (WebCore::FrameView::didAddScrollbar): Ditto.
707         * page/MainFrame.cpp:
708         (WebCore::MainFrame::testTrigger): Moved to Page.
709         (WebCore::MainFrame::ensureTestTrigger): Ditto.
710         * page/MainFrame.h:
711         * page/Page.cpp:
712         (WebCore::Page::testTrigger): Moved from MainFrame, and converted to use RefPtr.
713         (WebCore::Page::ensureTestTrigger): Ditto.
714         * page/Page.h:
715         * page/WheelEventTestTrigger.cpp:
716         (WebCore::WheelEventTestTrigger::WheelEventTestTrigger): Remove WeakPtr code.
717         (WebCore::WheelEventTestTrigger::createWeakPtr): Deleted.
718         * page/WheelEventTestTrigger.h:
719         * page/mac/EventHandlerMac.mm:
720         (WebCore::EventHandler::platformPrepareForWheelEvents): Make sure the scroll animator knows about
721         any active test trigger object.
722         * page/scrolling/AsyncScrollingCoordinator.cpp:
723         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Notify WheelEventTestTrigger
724         that the scrolling thread is synced with the main thread.
725         * platform/ScrollAnimator.h: Hold a RefPtr to the WheelEventTestTrigger. 
726         (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger):
727         * platform/cocoa/ScrollController.h:
728         * platform/cocoa/ScrollController.mm:
729         (WebCore::ScrollController::startSnapRubberbandTimer): Notify test trigger to hold tests until rubber band
730         snapping is complete.
731         (WebCore::ScrollController::stopSnapRubberbandTimer): Notify test trigger that rubber band snapping is done.
732         (WebCore::ScrollController::startScrollSnapTimer): Notify test trigger to hold tests until scroll snapping
733         is complete.
734         (WebCore::ScrollController::stopScrollSnapTimer): Notify test trigger that scroll snapping is done.
735         * platform/mac/ScrollAnimatorMac.mm:
736         (WebCore::ScrollAnimatorMac::didBeginScrollGesture): Notify test trigger that a content scroll is in progress.
737         (WebCore::ScrollAnimatorMac::didEndScrollGesture): Notify test trigger that a content scroll is finished.
738         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): Notify test trigger to hold tests until the content
739         scrolling is complete.
740         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): Notify test trigger that content scrolling is done.
741         * rendering/RenderBox.cpp:
742         (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
743         (WebCore::RenderBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
744         to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
745         (WebCore::RenderBox::setScrollTop): Ditto.
746         * rendering/RenderLayer.cpp:
747         (WebCore::RenderLayer::createScrollbar): Make sure the ScrollAnimator knows about any active test triggers.
748         * rendering/RenderListBox.cpp:
749         (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
750         (WebCore::RenderListBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
751         to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
752         (WebCore::RenderListBox::setScrollTop): Ditto.
753         (WebCore::RenderListBox::createScrollbar): Ditto.
754         * testing/js/WebCoreTestSupport.cpp:
755         (WebCoreTestSupport::monitorWheelEvents): Look for WheelEventTestTrigger in Page, rather than MainFrame.
756         (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
757
758 2015-04-29  Javier Fernandez  <jfernandez@igalia.com>
759
760         [CSS Box Alignment] Unifying alignment data in a single class
761         https://bugs.webkit.org/show_bug.cgi?id=144384
762
763         Reviewed by David Hyatt.
764
765         The new CSS Box Alignment specification introduces more complex
766         values and syntax for defining alignment properties. Most of the
767         alignment values were just keyword identifiers, but the new syntax
768         allows different combinations of identifiers to determine the
769         alignment behavior (eg. overflow-alignment keyword).
770
771         This patch wll help to implement later overflow handling and
772         specially Content Dstribution alignment, the most complex case by
773         far. It will be more consistent against style changes and repaint,
774         snce we will have just one field to monitoring for value
775         modfications.
776
777         No new tests, because no new functionality was added; it's just a
778         code refactoring which is just expected to pass current tests.
779
780         * css/CSSComputedStyleDeclaration.cpp:
781         (WebCore::resolveSelfAlignmentAuto):
782         (WebCore::ComputedStyleExtractor::propertyValue):
783         * css/CSSPropertyNames.in:
784         * css/StyleBuilderConverter.h:
785         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
786         (WebCore::StyleBuilderConverter::convertSVGColor): Deleted.
787         * css/StyleBuilderCustom.h:
788         (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage): Deleted.
789         (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage): Deleted.
790         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
791         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
792         (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
793         (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
794         (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
795         (WebCore::StyleBuilderCustom::applyInheritLineHeight): Deleted.
796         * css/StyleResolver.cpp:
797         (WebCore::StyleResolver::adjustRenderStyle):
798         * mathml/MathMLTextElement.cpp:
799         (WebCore::MathMLTextElement::createElementRenderer):
800         * rendering/RenderFlexibleBox.cpp:
801         (WebCore::RenderFlexibleBox::styleDidChange):
802         * rendering/RenderFullScreen.cpp:
803         (WebCore::createFullScreenStyle):
804         * rendering/RenderMenuList.cpp:
805         (WebCore::RenderMenuList::adjustInnerStyle):
806         * rendering/mathml/RenderMathMLRoot.cpp:
807         (WebCore::RenderMathMLRoot::updateStyle):
808         * rendering/mathml/RenderMathMLScripts.cpp:
809         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
810         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
811         * rendering/style/RenderStyle.cpp:
812         (WebCore::RenderStyle::resolveAlignment):
813         (WebCore::RenderStyle::resolveJustification):
814         * rendering/style/RenderStyle.h:
815         * rendering/style/StyleRareNonInheritedData.cpp:
816         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
817         (WebCore::StyleRareNonInheritedData::operator==):
818         (WebCore::StyleRareNonInheritedData::contentDataEquivalent): Deleted.
819         * rendering/style/StyleRareNonInheritedData.h:
820         * rendering/style/StyleSelfAlignmentData.h: Added.
821         (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
822         (WebCore::StyleSelfAlignmentData::setPosition):
823         (WebCore::StyleSelfAlignmentData::setPositionType):
824         (WebCore::StyleSelfAlignmentData::setOverflow):
825         (WebCore::StyleSelfAlignmentData::position):
826         (WebCore::StyleSelfAlignmentData::positionType):
827         (WebCore::StyleSelfAlignmentData::overflow):
828         (WebCore::StyleSelfAlignmentData::operator==):
829         (WebCore::StyleSelfAlignmentData::operator!=):
830
831 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
832
833         NodeList has issues with Symbol and empty string
834         https://bugs.webkit.org/show_bug.cgi?id=144310
835
836         Reviewed by Darin Adler.
837
838         Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
839                fast/dom/dataset-name-getter-symbols.html
840                fast/dom/named-items-with-empty-name.html
841                fast/dom/named-items-with-symbol-name.html
842                storage/domstorage/localstorage/named-items.html
843
844         Test different bindings objects with custom named setter
845         and getter handlers. Ensure that they handle Symbol properties
846         gracefully. Often times avoiding the string path.
847
848         * dom/StaticNodeList.cpp:
849         (WebCore::StaticNodeList::namedItem):
850         (WebCore::StaticElementList::namedItem):
851         Better handle the empty string. It should not match an item.
852
853         * bindings/js/JSDOMBinding.h:
854         (WebCore::propertyNameToString):
855         In cases where we would use this, we should have handled
856         Symbol properties.
857
858         (WebCore::propertyNameToAtomicString):
859         For Symbols, use the unique string. This should result
860         in no matches for a Symbol property.
861
862         * bindings/js/JSDOMStringMapCustom.cpp:
863         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
864         (WebCore::JSDOMStringMap::deleteProperty):
865         (WebCore::JSDOMStringMap::putDelegate):
866         * bindings/js/JSStorageCustom.cpp:
867         (WebCore::JSStorage::canGetItemsForName):
868         (WebCore::JSStorage::nameGetter):
869         (WebCore::JSStorage::deleteProperty):
870         (WebCore::JSStorage::putDelegate):
871         * bindings/js/JSStyleSheetListCustom.cpp:
872         (WebCore::JSStyleSheetList::canGetItemsForName):
873         Treat Symbol properties as private properties. They just
874         go directly through to the Object, and avoid the string
875         getter/setter property path.
876
877 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
878
879         [Mac] Register with device picker whenever a page has <video>
880         https://bugs.webkit.org/show_bug.cgi?id=144408
881
882         Reviewed by Jer Noble.
883
884         * Modules/mediasession/WebMediaSessionManager.cpp:
885         (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
886         to the target when it has not routes.
887
888         * html/HTMLMediaElement.cpp:
889         (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the 
890         element is <video> with a video track that does not block wireless playback.
891
892 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
893
894         [GTK] Add support for automatic hyphenation
895         https://bugs.webkit.org/show_bug.cgi?id=44478
896
897         Reviewed by Carlos Garcia Campos.
898
899         No new tests. This patch unskips and updates results for existing hyphenation tests.
900
901         * PlatformGTK.cmake: Add the libhypen implementation to the source list.
902         * platform/gtk/GtkUtilities.cpp:
903         (WebCore::topLevelPath): Add this helper function taken from the test harness.
904         (WebCore::getWebKitBuildDirectory): Ditto.
905         * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
906         * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
907           so that it can still be shared.
908         * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
909         (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
910         determine the locale that it covers.
911         (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
912         as ones in the JHBuild root for testing.
913         (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
914         in the JHBuild root.
915         (WebCore::availableLocales): Getter for global hash of installed dictionaries.
916         (WebCore::canHyphenate): Added libhyphen implementation.
917         (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
918         an open libhyphen dictionary. This is useful so that they can be stored in an MRU
919         cache. This is a similar approach to the CoreFoundation implementation.
920         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
921         helper.
922         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
923         (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
924         (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
925         (WebCore::lastHyphenLocation): Added libhyphen implementation.
926
927 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
928
929         Unreviewed build fix.
930
931         * platform/graphics/mac/FontCacheMac.mm:
932         (WebCore::fontWithFamily):
933
934 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
935
936         Some media tests assert after r183096
937         https://bugs.webkit.org/show_bug.cgi?id=144098
938
939         Reviewed by Brent Fulgham.
940
941         Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
942         after it has been unregistered. A media element unregisters itself when it is removed from the 
943         document, but scripts can still run and modify state that results in a call to
944         playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
945         the various call sites.
946
947         * dom/Document.cpp:
948         (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
949         been unregistered.
950         (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
951
952 2015-04-29  Zalan Bujtas  <zalan@apple.com>
953
954         Simple line layout: Web process spins endlessly below layoutSimpleLines.
955         https://bugs.webkit.org/show_bug.cgi?id=144403
956         rdar://problem/20742783
957
958         Reviewed by Antti Koivisto.
959
960         When a text fragment overlaps multiple renderes and it does not fit the current line,
961         we revert the text fragment iterator position so that the overlapping content
962         gets processed again for the next line.
963         However, TextFragmentIterator::revertToFragment() was reverting too much and
964         we started processing old content all over again -> infinite loop.
965
966         This patch ensures that text fragment iterator is reverted to the right position.
967
968         Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
969
970         * rendering/SimpleLineLayout.cpp:
971         (WebCore::SimpleLineLayout::createLineRuns):
972         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
973         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
974         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
975         * rendering/SimpleLineLayoutTextFragmentIterator.h:
976
977 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
978
979         JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
980         https://bugs.webkit.org/show_bug.cgi?id=144397
981
982         Reviewed by Andreas Kling.
983
984         If you override getCallData() and you want to be called a "function", then you need to use the
985         new TypeOfShouldCallGetCallData flag.
986
987         * bindings/scripts/CodeGeneratorJS.pm:
988         (GenerateHeader):
989         * bridge/objc/objc_runtime.h:
990         * bridge/runtime_method.h:
991         * bridge/runtime_object.h:
992
993 2015-04-29  Commit Queue  <commit-queue@webkit.org>
994
995         Unreviewed, rolling out r183553 and r183561.
996         https://bugs.webkit.org/show_bug.cgi?id=144406
997
998         broke the iOS build (Requested by thorton__ on #webkit).
999
1000         Reverted changesets:
1001
1002         "Switch QuickLook soft-linking to use
1003         QuickLookSoftLink.{h,mm}"
1004         https://bugs.webkit.org/show_bug.cgi?id=144362
1005         http://trac.webkit.org/changeset/183553
1006
1007         "Unreviewed iOS build fix after r183553: fix declaration of
1008         QLPreviewScheme"
1009         http://trac.webkit.org/changeset/183561
1010
1011 2015-04-29  Antti Koivisto  <antti@apple.com>
1012
1013         ResourceLoadPriority should be enum class
1014         https://bugs.webkit.org/show_bug.cgi?id=144326
1015
1016         Reviewed by Darin Adler.
1017
1018         * html/HTMLLinkElement.cpp:
1019         (WebCore::HTMLLinkElement::process):
1020         * loader/LinkLoader.cpp:
1021         (WebCore::LinkLoader::loadLink):
1022         * loader/ResourceLoadScheduler.cpp:
1023         (WebCore::ResourceLoadScheduler::scheduleLoad):
1024         (WebCore::ResourceLoadScheduler::servePendingRequests):
1025         (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
1026         (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
1027         (WebCore::ResourceLoadScheduler::HostInformation::schedule):
1028         (WebCore::ResourceLoadScheduler::HostInformation::remove):
1029         (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
1030         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
1031         * loader/ResourceLoadScheduler.h:
1032         (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
1033
1034             Modernize ResourceLoadScheduler code a bit while switching to enum class.
1035
1036         * loader/cache/CachedResource.cpp:
1037         (WebCore::defaultPriorityForResourceType):
1038         * loader/cache/CachedResourceLoader.cpp:
1039         (WebCore::CachedResourceLoader::requestResource):
1040         * loader/icon/IconLoader.cpp:
1041         (WebCore::IconLoader::startLoading):
1042         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1043         (WebCore::WebCoreAVFResourceLoader::startLoading):
1044         * platform/network/ResourceLoadPriority.h:
1045         (WebCore::operator++):
1046         (WebCore::operator--):
1047         * platform/network/ResourceRequestBase.cpp:
1048         (WebCore::ResourceRequestBase::adopt):
1049         (WebCore::ResourceRequestBase::copyData):
1050         (WebCore::ResourceRequestBase::cachePolicy):
1051         (WebCore::ResourceRequestBase::priority):
1052         (WebCore::ResourceRequestBase::setPriority):
1053         * platform/network/ResourceRequestBase.h:
1054
1055             Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
1056             Use modern initialization syntax.
1057
1058         (WebCore::ResourceRequestBase::ResourceRequestBase):
1059         (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
1060         * platform/network/cf/ResourceRequestCFNet.cpp:
1061         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
1062         (WebCore::initializeHTTPConnectionSettingsOnStartup):
1063         * platform/network/cf/ResourceRequestCFNet.h:
1064         (WebCore::toResourceLoadPriority):
1065         (WebCore::toPlatformRequestPriority):
1066         * platform/network/soup/ResourceRequest.h:
1067         (WebCore::toSoupMessagePriority):
1068         * testing/Internals.cpp:
1069         (WebCore::stringToResourceLoadPriority):
1070
1071 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
1072
1073         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
1074         https://bugs.webkit.org/show_bug.cgi?id=132159
1075
1076         Reviewed by Darin Adler.
1077
1078         On platforms that support it, delegate font selection logic to the platform. Currently, this is
1079         only supported on Mac, using CTFontCreateForCSS().
1080
1081         This also changes the mechanism that enforces our font whitelist in our tests. We used to
1082         swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
1083         font family names instead.
1084
1085         Note that this patch is a work in progress, because it makes the following tests fail:
1086         fast/css/font-weight-1.html
1087         fast/forms/validation-message-appearance.html
1088         fast/forms/select/optgroup-rendering.html
1089
1090         No new tests, because there is no behavior change.
1091
1092         * platform/graphics/FontCache.h: Add a function to set the whitlist.
1093         * platform/graphics/mac/FontCacheMac.mm:
1094         (WebCore::fontWhitelist):
1095         (WebCore::FontCache::setFontWhitelist):
1096         (WebCore::toAppKitFontWeight):
1097         (WebCore::toCoreTextFontWeight):
1098         (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
1099         (WebCore::FontCache::createFontPlatformData):
1100         * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
1101
1102 2015-04-29  Jer Noble  <jer.noble@apple.com>
1103
1104         Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
1105
1106         * platform/ios/QuickLookSoftLink.mm:
1107
1108 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
1109
1110         [Mac] Use new device picker menu API
1111         https://bugs.webkit.org/show_bug.cgi?id=144392
1112
1113         Reviewed by Jer Noble.
1114
1115         * Modules/mediasession/WebMediaSessionManager.cpp:
1116         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
1117         * platform/graphics/MediaPlaybackTargetPicker.h:
1118
1119         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
1120         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1121         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):  m_deviceChangeTimer -> m_pendingActionTimer.
1122         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
1123         (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from 
1124         outputeDeviceAvailabilityChangedTimerFired.
1125         (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
1126         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
1127         available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
1128         (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
1129         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it 
1130         can now be called from showPlaybackTargetPicker.
1131         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
1132         pendingActionTimerFired.
1133
1134         * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
1135
1136 2015-04-29  Antti Koivisto  <antti@apple.com>
1137
1138         Main resource loaded via 304 response becomes empty if reloaded by user
1139         https://bugs.webkit.org/show_bug.cgi?id=144386
1140
1141         Reviewed by Darin Adler.
1142
1143         Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
1144         DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
1145         conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
1146         Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
1147         However DocumentLoader has no code to handle 304 so we would end up with an empty document.
1148
1149         Test: http/tests/cache/main-resource-304-reload.html
1150
1151         * loader/DocumentLoader.cpp:
1152         (WebCore::DocumentLoader::startLoadingMainResource):
1153
1154             Ensure DocumentLoader doesn't issue conditional requests.
1155
1156 2015-04-28  Jer Noble  <jer.noble@apple.com>
1157
1158         Replace HTMLMediaElement's seek timer with a task queue.
1159         https://bugs.webkit.org/show_bug.cgi?id=144353
1160
1161         Reviewed by Eric Carlson.
1162
1163         No change in functionality, so no new tests added.
1164
1165         Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
1166         make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
1167         GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
1168
1169         * CMakeLists.txt:
1170         * WebCore.vcxproj/WebCore.vcxproj:
1171         * WebCore.vcxproj/WebCore.vcxproj.filters:
1172         * WebCore.xcodeproj/project.pbxproj:
1173         * dom/GenericTaskQueue.cpp: Added.
1174         (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
1175         (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
1176         (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
1177         (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
1178         * dom/GenericTaskQueue.h: Added.
1179         (WebCore::GenericTaskQueue::hasPendingTasks):
1180         * html/HTMLMediaElement.cpp:
1181         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
1182         (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
1183         (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
1184         (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
1185         (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
1186         * html/HTMLMediaElement.h:
1187
1188 2015-04-28  David Kilzer  <ddkilzer@apple.com>
1189
1190         Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
1191         <http://webkit.org/b/144362>
1192
1193         Reviewed by Andy Estes.
1194
1195         This patch switches soft-linking of QuickLook.framework to
1196         QuickLookSoftLink.{h,mm} so that we stop exporting unintended
1197         symbols.
1198
1199         No new tests since no change in behavior.
1200
1201         * WebCore.xcodeproj/project.pbxproj:
1202         - Add QuickLookSoftLinking.{h,mm} to the project.
1203
1204         * platform/ios/QuickLookSoftLink.h: Added.
1205         * platform/ios/QuickLookSoftLink.mm: Added.
1206         * platform/mac/SoftLinking.h:
1207         (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
1208         (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
1209
1210         * platform/network/ios/QuickLook.h:
1211         - Remove unused declarations.
1212
1213         * platform/network/ios/QuickLook.mm:
1214         (WebCore::QLPreviewConverterClass): Deleted.
1215         (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
1216         (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
1217         (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
1218         - Remove SOFT_LINK macros and unused methods after switching to
1219           new QuickLookSoftLink.{h,mm}.
1220         (WebCore::QLPreviewGetSupportedMIMETypesSet):
1221         - Switch to use NeverDestroyed<>.
1222         (WebCore::registerQLPreviewConverterIfNeeded):
1223         (createQLPreviewProtocol):
1224         (WebCore::QLPreviewProtocol):
1225         (WebCore::QuickLookHandle::QuickLookHandle):
1226         (WebCore::QuickLookHandle::create):
1227         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
1228         - Simplify code when using QuickLookSoftLink.h.
1229
1230         * platform/network/ios/WebCoreURLResponseIOS.mm:
1231         - Include QuickLookSoftLink.h header.
1232
1233 2015-04-29  Darin Adler  <darin@apple.com>
1234
1235         [ES6] Implement Unicode code point escapes
1236         https://bugs.webkit.org/show_bug.cgi?id=144377
1237
1238         Reviewed by Antti Koivisto.
1239
1240         Test: js/unicode-escape-sequences.html
1241
1242         * css/CSSParser.cpp:
1243         (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
1244         out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
1245         writing out 0xFFFD.
1246
1247         * html/parser/HTMLEntityParser.cpp:
1248         (WebCore::isAlphaNumeric): Deleted.
1249         (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
1250         U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
1251         because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
1252         but maye it's something we want to do in the future.
1253         (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
1254         of a the function in this file that does the same thing less efficiently.
1255
1256         * html/parser/InputStreamPreprocessor.h:
1257         (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
1258         replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
1259
1260         * xml/parser/CharacterReferenceParserInlines.h:
1261         (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
1262         defining our own local highestValidCharacter constant.
1263
1264 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
1265
1266         [CMake] [GTK] Organize and clean up unused CMake variables
1267         https://bugs.webkit.org/show_bug.cgi?id=144364
1268
1269         Reviewed by Gyuyoung Kim.
1270
1271         * PlatformGTK.cmake: Add variables specific to this project.
1272
1273 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1274
1275         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
1276         https://bugs.webkit.org/show_bug.cgi?id=144388
1277
1278         Reviewed by Brady Eidson.
1279
1280         There used to be a method in ContextMenuItem to check if share
1281         menu item was supported or not, but since r182573, there's a
1282         method to get the share menu item. If the returned menu item is
1283         null, it's not added to the menu, but we are not returning a null
1284         ContextMenu item even though we don't support share menu item.
1285
1286         * platform/gtk/ContextMenuItemGtk.cpp:
1287         (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
1288
1289 2015-04-29  Zan Dobersek  <zdobersek@igalia.com>
1290
1291         Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
1292         https://bugs.webkit.org/show_bug.cgi?id=144232
1293
1294         Reviewed by Darin Adler.
1295
1296         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1297         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): 
1298         Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
1299
1300 2015-04-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1301
1302         Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
1303         https://bugs.webkit.org/show_bug.cgi?id=140261
1304
1305         Reviewed by Darin Adler.
1306
1307         We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
1308         because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
1309
1310         * rendering/RenderView.cpp:
1311         (WebCore::isValidObjectForNewSelection):
1312         (WebCore::RenderView::clearSubtreeSelection):
1313         (WebCore::RenderView::applySubtreeSelection):
1314
1315 2015-04-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1316
1317         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
1318         https://bugs.webkit.org/show_bug.cgi?id=143711
1319
1320         Reviewed by Darin Adler.
1321
1322         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
1323         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
1324         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
1325
1326         Test: http/tests/appcache/simple-video-sync.html
1327
1328         * html/HTMLMediaElement.cpp:
1329         (WebCore::HTMLMediaElement::parseAttribute):
1330         * loader/DocumentThreadableLoader.cpp:
1331         (WebCore::DocumentThreadableLoader::loadRequest):
1332         * loader/FrameLoader.cpp:
1333         (WebCore::FrameLoader::loadResourceSynchronously):
1334         * loader/FrameLoader.h:
1335         * loader/appcache/ApplicationCacheHost.cpp:
1336         (WebCore::ApplicationCacheHost::maybeLoadResource):
1337         (WebCore::ApplicationCacheHost::createFileURL):
1338         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1339         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1340         * loader/appcache/ApplicationCacheHost.h:
1341         * xml/XSLTProcessorLibxslt.cpp:
1342         (WebCore::docLoaderFunc):
1343         * xml/parser/XMLDocumentParserLibxml2.cpp:
1344         (WebCore::openFunc):
1345
1346 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1347
1348         Purge PassRefPtr from createSVGPathSegFoo factory functions
1349         https://bugs.webkit.org/show_bug.cgi?id=144374
1350
1351         Reviewed by Darin Adler.
1352
1353         Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
1354         those factory functions can't return null. Additionally let's remove unnecessary
1355         #include<PassRefPtr.h> there.
1356
1357         No new tests, no behavior changes.
1358
1359         * svg/SVGColor.cpp:
1360         (WebCore::SVGColor::cloneForCSSOM):
1361         * svg/SVGColor.h:
1362         * svg/SVGGlyphMap.h:
1363         (WebCore::GlyphMapNode::create):
1364         * svg/SVGPaint.cpp:
1365         (WebCore::SVGPaint::cloneForCSSOM):
1366         * svg/SVGPaint.h:
1367         * svg/SVGPathElement.cpp:
1368         (WebCore::SVGPathElement::createSVGPathSegClosePath):
1369         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
1370         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
1371         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
1372         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
1373         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
1374         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
1375         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
1376         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
1377         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
1378         (WebCore::SVGPathElement::createSVGPathSegArcRel):
1379         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
1380         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
1381         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
1382         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
1383         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
1384         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
1385         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
1386         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
1387         * svg/SVGPathElement.h:
1388         * svg/SVGPathSegArcAbs.h:
1389         (WebCore::SVGPathSegArcAbs::create):
1390         * svg/SVGPathSegArcRel.h:
1391         (WebCore::SVGPathSegArcRel::create):
1392         * svg/SVGPathSegClosePath.h:
1393         (WebCore::SVGPathSegClosePath::create):
1394         * svg/SVGPathSegCurvetoCubicAbs.h:
1395         (WebCore::SVGPathSegCurvetoCubicAbs::create):
1396         * svg/SVGPathSegCurvetoCubicRel.h:
1397         (WebCore::SVGPathSegCurvetoCubicRel::create):
1398         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
1399         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
1400         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
1401         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
1402         * svg/SVGPathSegCurvetoQuadraticAbs.h:
1403         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
1404         * svg/SVGPathSegCurvetoQuadraticRel.h:
1405         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
1406         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
1407         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
1408         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
1409         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
1410         * svg/SVGPathSegLinetoAbs.h:
1411         (WebCore::SVGPathSegLinetoAbs::create):
1412         * svg/SVGPathSegLinetoHorizontalAbs.h:
1413         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
1414         * svg/SVGPathSegLinetoHorizontalRel.h:
1415         (WebCore::SVGPathSegLinetoHorizontalRel::create):
1416         * svg/SVGPathSegLinetoRel.h:
1417         (WebCore::SVGPathSegLinetoRel::create):
1418         * svg/SVGPathSegLinetoVerticalAbs.h:
1419         (WebCore::SVGPathSegLinetoVerticalAbs::create):
1420         * svg/SVGPathSegLinetoVerticalRel.h:
1421         (WebCore::SVGPathSegLinetoVerticalRel::create):
1422         * svg/SVGPathSegMovetoAbs.h:
1423         (WebCore::SVGPathSegMovetoAbs::create):
1424         * svg/SVGPathSegMovetoRel.h:
1425         (WebCore::SVGPathSegMovetoRel::create):
1426         * svg/SVGViewSpec.h:
1427         (WebCore::SVGViewSpec::create):
1428         * svg/animation/SMILTimeContainer.h:
1429         (WebCore::SMILTimeContainer::create):
1430         * svg/animation/SVGSMILElement.cpp:
1431         (WebCore::ConditionEventListener::create):
1432         * svg/graphics/SVGImage.h:
1433         * svg/graphics/SVGImageForContainer.h:
1434         * svg/graphics/filters/SVGFilter.cpp:
1435         (WebCore::SVGFilter::create):
1436         * svg/graphics/filters/SVGFilter.h:
1437
1438 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
1439
1440         Make a non-static version of FrameView::yPositionForRootContentLayer()
1441         https://bugs.webkit.org/show_bug.cgi?id=144375
1442
1443         Reviewed by Andy Estes.
1444
1445         There were two calls to the static FrameView::yPositionForRootContentLayer()
1446         which passed in all the arguments for the same FrameView. Make a member
1447         function for convenience.
1448
1449         * page/FrameView.cpp:
1450         (WebCore::FrameView::yPositionForRootContentLayer):
1451         * page/FrameView.h:
1452         * rendering/RenderLayerCompositor.cpp:
1453         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1454
1455 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
1456
1457         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
1458         https://bugs.webkit.org/show_bug.cgi?id=143001
1459
1460         Reviewed by Gyuyoung Kim.
1461
1462         TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
1463         So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
1464
1465         In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
1466         where other coordinated graphics files are located.
1467
1468         * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
1469         * PlatformEfl.cmake:
1470         * PlatformGTK.cmake:
1471         * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
1472         * WebCore.vcxproj/WebCore.vcxproj.filters:
1473         * loader/EmptyClients.h:
1474         * page/Chrome.cpp:
1475         * page/Chrome.h:
1476         * page/ChromeClient.h:
1477         * page/Frame.cpp:
1478         (WebCore::Frame::createView):
1479         * page/FrameView.cpp:
1480         (WebCore::FrameView::requestScrollPositionUpdate):
1481         * page/FrameView.h:
1482         * page/Page.cpp:
1483         (WebCore::Page::setPageScaleFactor):
1484         * platform/HostWindow.h:
1485         * platform/ScrollView.cpp:
1486         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
1487         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
1488         (WebCore::ScrollView::visibleContentRectInternal):
1489         (WebCore::ScrollView::scrollTo):
1490         * platform/ScrollView.h:
1491         * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
1492         * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
1493         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
1494         * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
1495         * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
1496         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
1497
1498 2015-04-28  Brent Fulgham  <bfulgham@apple.com>
1499
1500         REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
1501         https://bugs.webkit.org/show_bug.cgi?id=144366
1502         <rdar://problem/20533513>
1503
1504         Reviewed by Dean Jackson.
1505
1506         * rendering/RenderBlockFlow.cpp:
1507         (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
1508         before attempting to dereference it. 
1509
1510 2015-04-28  Andreas Kling  <akling@apple.com>
1511
1512         Simplify DOM wrapper destruction, don't deref() in finalizers.
1513         <https://webkit.org/b/144183>
1514
1515         Reviewed by Darin Adler.
1516
1517         DOM JS bindings had two mechanisms to call deref() on the WebCore object,
1518         once through a weak finalizer, and once through the JSCell's regular destructor.
1519
1520         That was once believed to be an optimization, but these days the finalizer will
1521         run just moments before the destructor anyway, all in the same call stack.
1522         And more importantly, the finalizer is not guaranteed to run, for instance in the
1523         case where a Weak is assigned to after going dead, but before the WeakBlock
1524         has been swept by the incremental sweeper.
1525
1526         Simplify this by just removing the deref() from the generated finalizers.
1527         This makes it easier to reason about DOM wrapper destruction, and eliminates
1528         the awkward time window  where a DOM wrapper could have a null impl().
1529
1530         We could spend more time on figuring out a way to have finalizers manage the
1531         destruction of these wrappers, but that would require fundamental changes to
1532         our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
1533         destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
1534         However the risk:reward ratio does not seem justified at this point in time.
1535
1536         * bindings/scripts/CodeGeneratorJS.pm:
1537         (GenerateHeader):
1538         (GenerateImplementation):
1539         * bindings/js/JSCSSValueCustom.cpp:
1540         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1541         (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
1542         (WebCore::JSTestActiveDOMObjectOwner::finalize):
1543         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1544         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1545         (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
1546         (WebCore::JSTestCustomNamedGetterOwner::finalize):
1547         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1548         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1549         (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
1550         (WebCore::JSTestEventConstructorOwner::finalize):
1551         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1552         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1553         (WebCore::JSTestEventTarget::~JSTestEventTarget):
1554         (WebCore::JSTestEventTargetOwner::finalize):
1555         * bindings/scripts/test/JS/JSTestEventTarget.h:
1556         * bindings/scripts/test/JS/JSTestException.cpp:
1557         (WebCore::JSTestException::~JSTestException):
1558         (WebCore::JSTestExceptionOwner::finalize):
1559         * bindings/scripts/test/JS/JSTestException.h:
1560         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1561         (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
1562         (WebCore::JSTestGenerateIsReachableOwner::finalize):
1563         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1564         * bindings/scripts/test/JS/JSTestInterface.cpp:
1565         (WebCore::JSTestInterface::~JSTestInterface):
1566         (WebCore::JSTestInterfaceOwner::finalize):
1567         * bindings/scripts/test/JS/JSTestInterface.h:
1568         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1569         (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
1570         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
1571         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1572         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1573         (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
1574         (WebCore::JSTestNamedConstructorOwner::finalize):
1575         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1576         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1577         (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
1578         (WebCore::JSTestNondeterministicOwner::finalize):
1579         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1580         * bindings/scripts/test/JS/JSTestObj.cpp:
1581         (WebCore::JSTestObj::~JSTestObj):
1582         (WebCore::JSTestObjOwner::finalize):
1583         * bindings/scripts/test/JS/JSTestObj.h:
1584         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1585         (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
1586         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
1587         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1588         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1589         (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
1590         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
1591         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1592         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1593         (WebCore::JSTestTypedefs::~JSTestTypedefs):
1594         (WebCore::JSTestTypedefsOwner::finalize):
1595         * bindings/scripts/test/JS/JSTestTypedefs.h:
1596         * bindings/scripts/test/JS/JSattribute.cpp:
1597         (WebCore::JSattribute::~JSattribute):
1598         (WebCore::JSattributeOwner::finalize):
1599         * bindings/scripts/test/JS/JSattribute.h:
1600         * bindings/scripts/test/JS/JSreadonly.cpp:
1601         (WebCore::JSreadonly::~JSreadonly):
1602         (WebCore::JSreadonlyOwner::finalize):
1603         * bindings/scripts/test/JS/JSreadonly.h:
1604
1605 2015-04-28  Alex Christensen  <achristensen@webkit.org>
1606
1607         Build WinCairo without cygwin.
1608         https://bugs.webkit.org/show_bug.cgi?id=144365
1609
1610         Reviewed by Myles Maxfield.
1611
1612         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
1613         Pass the CC executable to build-generated-files.pl like r182164.
1614         * WebCore.vcxproj/build-generated-files.pl:
1615         Default to 8 CPUs unless otherwise specified.
1616
1617 2015-04-28  Sam Weinig  <sam@webkit.org>
1618
1619         [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
1620         https://bugs.webkit.org/show_bug.cgi?id=144363
1621
1622         Reviewed by Alex Christensen.
1623
1624         This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
1625
1626         * contentextensions/CombinedURLFilters.cpp:
1627         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1628         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
1629         * contentextensions/CombinedURLFilters.h:
1630         Replace function that creates a Vector of all the NFAs with one that allows incremental processing
1631         as they are created.
1632
1633         * contentextensions/ContentExtensionCompiler.cpp:
1634         (WebCore::ContentExtensions::addUniversalActionsToDFA):
1635         Extract code to add universal actions into a helper, since we need to call it in two places now.
1636
1637         (WebCore::ContentExtensions::compileRuleList):
1638         Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
1639         of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
1640         ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
1641         placed on the first DFA.
1642
1643 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
1644
1645         [TextIndicator] Yellow highlight takes too long to fade out on scroll
1646         https://bugs.webkit.org/show_bug.cgi?id=144358
1647         <rdar://problem/19451011>
1648
1649         Reviewed by Beth Dakin.
1650
1651         * page/TextIndicator.h:
1652         Add Lifetime and DismissalAnimation enums.
1653
1654         (WebCore::TextIndicator::contentImageWithHighlight):
1655         (WebCore::TextIndicator::contentImage):
1656         Fix style.
1657
1658         * page/mac/TextIndicatorWindow.h:
1659         * page/mac/TextIndicatorWindow.mm:
1660         (WebCore::TextIndicatorWindow::TextIndicatorWindow):
1661         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
1662         (WebCore::TextIndicatorWindow::clearTextIndicator):
1663         (WebCore::TextIndicatorWindow::setTextIndicator):
1664         (WebCore::TextIndicatorWindow::closeWindow):
1665         (WebCore::TextIndicatorWindow::startFadeOut):
1666         Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
1667         This is just about temporary-lifetime TextIndicators, like the ones
1668         you get when the find-in-page UI is hidden but you hit Cmd-G.
1669
1670         Add clearTextIndicator, which takes a DismissalAnimation, providing
1671         clients an opportunity to avoid the normal fade-out animation, if it
1672         was going to happen.
1673
1674 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1675
1676         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1677         https://bugs.webkit.org/show_bug.cgi?id=144304
1678
1679         Reviewed by Geoffrey Garen.
1680
1681         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1682
1683         * Configurations/FeatureDefines.xcconfig:
1684
1685 2015-04-28  Commit Queue  <commit-queue@webkit.org>
1686
1687         Unreviewed, rolling out r183514.
1688         https://bugs.webkit.org/show_bug.cgi?id=144359
1689
1690         It broke cloop test bots (Requested by mcatanzaro on #webkit).
1691
1692         Reverted changeset:
1693
1694         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
1695         https://bugs.webkit.org/show_bug.cgi?id=144304
1696         http://trac.webkit.org/changeset/183514
1697
1698 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1699
1700         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1701         https://bugs.webkit.org/show_bug.cgi?id=144304
1702
1703         Reviewed by Geoffrey Garen.
1704
1705         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1706
1707         * Configurations/FeatureDefines.xcconfig:
1708
1709 2015-04-28  Zalan Bujtas  <zalan@apple.com>
1710
1711         Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
1712         https://bugs.webkit.org/show_bug.cgi?id=144351
1713
1714         Reviewed by Simon Fraser.
1715
1716         This patch ensures that CG context is properly restored after painting dashed/dotted lines.
1717
1718         Test: fast/forms/checkbox-painting-with-hr.html
1719
1720         * platform/graphics/cg/GraphicsContextCG.cpp:
1721         (WebCore::GraphicsContext::drawLine):
1722
1723 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
1724
1725         Provide contentsToView() and viewToContents() functions on ScrollView, and use them
1726         https://bugs.webkit.org/show_bug.cgi?id=144357
1727
1728         Reviewed by Tim Horton.
1729
1730         Too much code was consulting topContentInset() and headerHeight() directly. Replace
1731         with calls to new contentsToView() and viewToContents() functions, which wrap the
1732         exisiting documentScrollOffsetRelativeToViewOrigin().
1733         
1734         Use the new functions in FrameView and ScrollView coordinate mapping functions.
1735         
1736         No behavior change.
1737
1738         * page/FrameView.cpp:
1739         (WebCore::FrameView::convertFromRendererToContainingView):
1740         (WebCore::FrameView::convertFromContainingViewToRenderer):
1741         * platform/ScrollView.cpp:
1742         (WebCore::ScrollView::viewToContents):
1743         (WebCore::ScrollView::contentsToView):
1744         (WebCore::ScrollView::rootViewToContents):
1745         (WebCore::ScrollView::contentsToRootView):
1746         (WebCore::ScrollView::rootViewToTotalContents):
1747         (WebCore::ScrollView::windowToContents):
1748         (WebCore::ScrollView::contentsToWindow):
1749         * platform/ScrollView.h:
1750
1751 2015-04-28  Eric Carlson  <eric.carlson@apple.com>
1752
1753         [Mac] Simplify code to support media engines which do not support target playback
1754         https://bugs.webkit.org/show_bug.cgi?id=144332
1755
1756         Reviewed by Jer Noble.
1757
1758         * Modules/mediasession/WebMediaSessionManager.cpp:
1759         (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
1760         callback, let them decide if it is significant or not.
1761
1762         * html/HTMLMediaElement.cpp:
1763         (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
1764         (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
1765         (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
1766         (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
1767         (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
1768         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
1769         (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
1770         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
1771         (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
1772         event is dispatched when the current target is wireless but the media engine does not support
1773         wireless playback, tell the media engine not to play to the target.
1774         * html/HTMLMediaElement.h:
1775         * html/HTMLMediaElement.idl:
1776
1777         * html/HTMLMediaSession.cpp:
1778         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
1779         (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
1780         * html/HTMLMediaSession.h:
1781
1782         * platform/graphics/MediaPlayer.cpp:
1783         (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
1784         * platform/graphics/MediaPlayer.h:
1785         * platform/graphics/MediaPlayerPrivate.h:
1786
1787         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1788         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
1789         to explicitly manage the lifetime of the temporary object.
1790         (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
1791         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1792
1793         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1794         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
1795         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
1796         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
1797
1798         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1799         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1800         (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
1801         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
1802         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Deleted.
1803
1804 2015-04-28  Alex Christensen  <achristensen@webkit.org>
1805
1806         [Content Extensions] Use less memory for CombinedURLFilters.
1807         https://bugs.webkit.org/show_bug.cgi?id=144290
1808
1809         Reviewed by Andreas Kling.
1810
1811         * contentextensions/CombinedURLFilters.cpp:
1812         (WebCore::ContentExtensions::recursiveMemoryUsed):
1813         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1814         (WebCore::ContentExtensions::generateNFAForSubtree):
1815         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
1816         * contentextensions/NFA.cpp:
1817         (WebCore::ContentExtensions::NFA::memoryUsed):
1818         (WebCore::ContentExtensions::NFA::setActions):
1819         * contentextensions/NFA.h:
1820         * contentextensions/NFANode.h:
1821         * contentextensions/Term.h:
1822         (WebCore::ContentExtensions::Term::Term::generateGraph):
1823         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1824         Use Vectors instead of HashTables in PrefixTreeVertex because the sets stay small and need to be more memory efficient.
1825
1826 2015-04-28  Brady Eidson  <beidson@apple.com>
1827
1828         Consolidate most "frame load" arguments into FrameLoadRequest.
1829         https://bugs.webkit.org/show_bug.cgi?id=144276
1830
1831         Reviewed by Alexey Proskuryakov.
1832
1833         No new tests (No change in behavior).
1834         
1835         This patch starts the long overdue process of wrangling the insane load methods in FrameLoader.
1836         
1837         Humble beginnings of this long process:
1838         - Put most of the various "frame load" arguments that are passed around within FrameLoader on FrameLoadRequest.
1839         - Get rid of the "easy" constructors of FrameLoadRequest, forcing users to actually think about what they're doing.
1840         - Change a private FrameLoader load method (urlSelected) to take a FrameLoadRequest instead of argument gobbledygook.
1841         - Change a public FrameLoader load methods (changeLocation) to take a FrameLoadRequest instead of gobbledygook.
1842         
1843         These cover the straightforward changes where it was easy to figure out what the values of the FrameLoadRequest
1844         arguments were from these various call sites.
1845         
1846         Further refactoring can be done in much smaller patches, handling fewer cases at a time. Little by little we will be
1847         able to reduce the number of "load" methods on FrameLoader and make sure that they mainly only take a FrameLoadRequest
1848         as an argument.
1849
1850         * inspector/InspectorFrontendClientLocal.cpp:
1851         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1852         
1853         * inspector/InspectorPageAgent.cpp:
1854         (WebCore::InspectorPageAgent::navigate):
1855         
1856         * loader/FrameLoadRequest.cpp:
1857         (WebCore::FrameLoadRequest::FrameLoadRequest):
1858         * loader/FrameLoadRequest.h:
1859         (WebCore::FrameLoadRequest::FrameLoadRequest):
1860         (WebCore::FrameLoadRequest::lockHistory):
1861         (WebCore::FrameLoadRequest::lockBackForwardList):
1862         (WebCore::FrameLoadRequest::shouldSendReferrer):
1863         (WebCore::FrameLoadRequest::allowNavigationToInvalidURL):
1864         (WebCore::FrameLoadRequest::newFrameOpenerPolicy):
1865         (WebCore::FrameLoadRequest::shouldReplaceDocumentIfJavaScriptURL):
1866         
1867         * loader/FrameLoader.cpp:
1868         (WebCore::FrameLoader::changeLocation):
1869         (WebCore::FrameLoader::urlSelected):
1870         (WebCore::FrameLoader::loadFrameRequest):
1871         * loader/FrameLoader.h:
1872         
1873         * loader/NavigationScheduler.cpp:
1874         (WebCore::NavigationScheduler::scheduleLocationChange):
1875         
1876         * page/ContextMenuController.cpp:
1877         (WebCore::openNewWindow):
1878         (WebCore::ContextMenuController::contextMenuItemSelected):
1879         
1880         * page/DOMWindow.cpp:
1881         (WebCore::DOMWindow::createWindow):
1882
1883 2015-04-27  Myles C. Maxfield  <mmaxfield@apple.com>
1884
1885         [Mac] [iOS] Implement font-synthesis CSS property
1886         https://bugs.webkit.org/show_bug.cgi?id=144305
1887
1888         Reviewed by Andreas Kling.
1889
1890         This patch is fairly straightforward, though there are some particular pieces to the patch listed below.
1891
1892         The implementation of this font-synthesis CSS property lives inside FontCacheIOS and FontCacheMac. We already
1893         determine if we should synthesize bold and italics, this CSS property simply guards that decision.
1894
1895         Because FontCache interacts with FontDescriptions and not RenderStyles, this patch moves the source of truth
1896         regarding font-synthesis into FontDescription (from RenderStyle).
1897
1898         Test: fast/css3-text/font-synthesis.html
1899
1900         * css/CSSPropertyNames.in: Mark font-synthesis as a FontProperty, which means that the relevant state is kept
1901         inside FontDescription. This also means that the property must be marked as a "high priority" property, which
1902         is enforced by it existing at the top of CSSPropertyNames.in. The move to FontDescription must be done so that
1903         FontCacheIOS and FontCacheMac have access to the saved state.
1904         * css/CSSComputedStyleDeclaration.cpp:
1905         (WebCore::fontSynthesisFromStyle): Update to look for state in FontDescription instead of RenderStyle.
1906         * css/CSSSegmentedFontFace.cpp:
1907         (WebCore::CSSSegmentedFontFace::fontRanges): Guard the synthetic bold and synthic italic decision on the new
1908         FontSynthesis state inside FontDescription.
1909         * css/StyleBuilderConverter.h:
1910         (WebCore::StyleBuilderConverter::convertFontSynthesis): Moved from
1911         StyleBuilderCustom::applyValueFontSynthesis(). This is because of the updated options inside of
1912         CSSPropertyNames.in
1913         * css/StyleBuilderCustom.h:
1914         (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Deleted.
1915         * platform/graphics/FontDescription.h:
1916         (WebCore::FontDescription::FontDescription): Moved from RenderStyle.
1917         (WebCore::FontDescription::fontSynthesis): Ditto.
1918         (WebCore::FontDescription::setFontSynthesis): Ditto.
1919         (WebCore::FontDescription::initialFontSynthesis): Ditto.
1920         (WebCore::FontDescription::operator==): Update to include new state.
1921         * platform/graphics/FontCache.h:
1922         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey): Make FontDescription hashes sensitive to the new
1923         state inside FontDescription.
1924         * platform/graphics/ios/FontCacheIOS.mm:
1925         (WebCore::FontCache::createFontPlatformData): Guard the synthetic bold and synthetic italic decision on the
1926         new FontSynthesis state inside FontDescription.
1927         * platform/graphics/mac/FontCacheMac.mm:
1928         (WebCore::FontCache::createFontPlatformData): Ditto.
1929         * platform/text/TextFlags.h: Move FontSynthesis type from RenderStyleConstants.
1930         * rendering/style/RenderStyle.h:
1931         (WebCore::RenderStyle::fontSynthesis): Moved to FontDescription.
1932         (WebCore::RenderStyle::setFontSynthesis): Ditto.
1933         (WebCore::RenderStyle::initialFontSynthesis): Ditto.
1934         * rendering/style/RenderStyleConstants.h: Moved FontSynthesis type to TextFlags.
1935         * rendering/style/StyleRareInheritedData.h: Remove state regarding font synthesis (moved to FontDescription)
1936
1937 2015-04-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1938
1939         SharedBuffer::copy is not computing the buffer size correctly when having m_dataArray
1940         https://bugs.webkit.org/show_bug.cgi?id=144321
1941
1942         Reviewed by Darin Adler.
1943
1944         Patch correctness covered by existing tests.
1945
1946         * platform/SharedBuffer.cpp:
1947         (WebCore::SharedBuffer::copy): Direct appending to m_dataArray and not using append method as this method updates the SharedBuffer size.
1948
1949 2015-04-28  Per Arne Vollan  <peavo@outlook.com>
1950
1951         [Curl] Memory leak.
1952         https://bugs.webkit.org/show_bug.cgi?id=144327
1953
1954         Reviewed by Brent Fulgham.
1955
1956         When a data url is loaded, the ResourceHandle is not released.
1957
1958         * platform/network/curl/ResourceHandleManager.cpp:
1959         (WebCore::ResourceHandleManager::startJob):
1960
1961 2015-04-28  Andy Estes  <aestes@apple.com>
1962
1963         Fix the Mavericks Debug build after r183467.
1964
1965         * platform/network/ResourceRequestBase.h:
1966         (WebCore::ResourceRequestBase::requester): Removed WEBCORE_EXPORT.
1967         (WebCore::ResourceRequestBase::setRequester): Ditto.
1968
1969 2015-04-28  Csaba Osztrogonác  <ossy@webkit.org>
1970
1971         Remove make-file-arrays.py
1972         https://bugs.webkit.org/show_bug.cgi?id=144324
1973
1974         Reviewed by Gyuyoung Kim.
1975
1976         * make-file-arrays.py: Removed.
1977
1978 2015-04-28  Antti Koivisto  <antti@apple.com>
1979
1980         Build fix.
1981
1982         * platform/network/ios/ResourceRequestIOS.mm:
1983         (WebCore::ResourceRequest::ResourceRequest):
1984
1985 2015-04-28  Antti Koivisto  <antti@apple.com>
1986
1987         Network Cache: Disk cache getting filled by YouTube video data
1988         https://bugs.webkit.org/show_bug.cgi?id=144259
1989
1990         Reviewed by Darin Adler.
1991
1992         MSE media is loaded via XHR and tends to eventually fill the cache.
1993
1994         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1995         We can reduce disk writes and keep more useful resources around by not caching them
1996
1997         Test: http/tests/cache/disk-cache/disk-cache-media.html
1998
1999         * loader/DocumentLoader.cpp:
2000         (WebCore::DocumentLoader::startLoadingMainResource):
2001
2002             Set the requester.
2003
2004         * loader/cache/CachedRawResource.cpp:
2005         (WebCore::CachedRawResource::CachedRawResource):
2006         * page/DiagnosticLoggingKeys.cpp:
2007         (WebCore::DiagnosticLoggingKeys::streamingMedia):
2008         * page/DiagnosticLoggingKeys.h:
2009         * platform/network/ResourceRequestBase.cpp:
2010         (WebCore::ResourceRequestBase::adopt):
2011         (WebCore::ResourceRequestBase::copyData):
2012         (WebCore::equalIgnoringHeaderFields):
2013         * platform/network/ResourceRequestBase.h:
2014         (WebCore::ResourceRequestBase::requester):
2015         (WebCore::ResourceRequestBase::setRequester):
2016
2017             Add requester type to the request object. Currently this is main resource, xhr or unspecified.
2018
2019         (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
2020         (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
2021         * platform/network/cf/ResourceRequest.h:
2022         (WebCore::ResourceRequest::deprecatedSetMainResourceRequest): Deleted.
2023         (WebCore::ResourceRequest::deprecatedIsMainResourceRequest): Deleted.
2024
2025             Replace this iOS only field with shared mechanism.
2026
2027         * platform/network/ios/QuickLook.mm:
2028         (WebCore::QuickLookHandle::create):
2029         * xml/XMLHttpRequest.cpp:
2030         (WebCore::XMLHttpRequest::createRequest):
2031
2032             Set the requester.
2033
2034 2015-04-28  Namhoon Kim  <nakim@ea.com>
2035
2036         Fix windows build error in WebCore related to bulk build.
2037         https://bugs.webkit.org/show_bug.cgi?id=144313
2038
2039         Reviewed by Csaba Osztrogonác.
2040
2041         No new tests because there is no behavior change.
2042
2043         * css/CSSAllInOne.cpp:
2044         * dom/DOMAllInOne.cpp:
2045
2046 2015-04-27  Simon Fraser  <simon.fraser@apple.com>
2047
2048         Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
2049         https://bugs.webkit.org/show_bug.cgi?id=144198
2050
2051         Followup: fix assertions seen in fullscreen and pseudo-element tests. These code
2052         paths set the style to the existing pointer, but with a SyntheticStyleChange.
2053         We have to avoid an early return in this case.
2054
2055         * rendering/RenderElement.cpp:
2056         (WebCore::RenderElement::setStyle):
2057
2058 2015-04-25  Simon Fraser  <simon.fraser@apple.com>
2059
2060         Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
2061         https://bugs.webkit.org/show_bug.cgi?id=144198
2062
2063         Reviewed by Darin Adler, Antti Koivisto.
2064         
2065         SyntheticStyleChange style recalcs are triggered for cases where behavior depends
2066         on state which is outside of RenderStyle; this includes triggering compositing for
2067         animations, for video and canvas, and for iframes with composited content.
2068         
2069         In these cases, we'd run through RenderElement::setStyle() and its fan-out, but
2070         with diff == StyleDifferenceEqual, and so be unable to determine if there
2071         is actual work to be done.
2072         
2073         This patch enforces the contract that the diff is never StyleDifferenceEqual if
2074         compositing or other work has to happen from setStyle(). This is achieved by
2075         passing in a 'hasSideEffects' flag, which causes the diff to become at least
2076         StyleDifferenceRecompositeLayer.
2077         
2078         RenderLayerCompositor::layerStyleChanged() can now safely early return
2079         if the diff is equal. Future patches will reduce redundant work even more.
2080
2081         Test: compositing/animation/no-style-recalc-during-accelerated-animation.html
2082
2083         * page/animation/AnimationBase.h:
2084         (WebCore::AnimationBase::animate): Returns a bool now if the state changed.
2085         (WebCore::AnimationBase::state):
2086         * page/animation/AnimationController.cpp:
2087         (WebCore::AnimationController::updateAnimations): bool out param which indicates
2088         whether any animations changed state.
2089         * page/animation/AnimationController.h:
2090         * page/animation/CompositeAnimation.cpp:
2091         (WebCore::CompositeAnimation::animate): If any transitions or animations changed
2092         state, set the animationStateChanged out param to true.
2093         * page/animation/CompositeAnimation.h:
2094         * page/animation/ImplicitAnimation.cpp:
2095         (WebCore::ImplicitAnimation::animate): Return true if the state changed.
2096         * page/animation/ImplicitAnimation.h:
2097         * page/animation/KeyframeAnimation.cpp:
2098         (WebCore::KeyframeAnimation::animate): Return true if the state changed.
2099         * page/animation/KeyframeAnimation.h:
2100         * rendering/RenderElement.cpp:
2101         (WebCore::RenderElement::adjustStyleDifference): We may enter here now with diff
2102         != StyleDifferenceEqual, but still need to do the check to see if layers changed.
2103         (WebCore::RenderElement::initializeStyle): When setting style for the first time,
2104         don't use StyleDifferenceEqual.
2105         (WebCore::RenderElement::setStyle): Additional flag to indicate whether this style
2106         change involves side effects. If the diff is equal but the flag is set, change
2107         the diff to StyleDifferenceRecompositeLayer (the "lowest" non-zero diff).
2108         * rendering/RenderElement.h:
2109         (WebCore::RenderElement::setAnimatableStyle): Pass true to setStyle() if hasSideEffects
2110         is true, or if animation state changed.
2111         * rendering/RenderLayer.cpp:
2112         (WebCore::RenderLayer::styleChanged): Pass the diff down.
2113         * rendering/RenderLayerCompositor.cpp:
2114         (WebCore::RenderLayerCompositor::layerStyleChanged): Return if the diff is equal.
2115         * rendering/RenderLayerCompositor.h:
2116         * rendering/style/RenderStyleConstants.h: StyleDifferenceNewStyle is used when
2117         setting style for the first time.
2118         * style/StyleResolveTree.cpp:
2119         (WebCore::Style::createRendererIfNeeded): Provide animationsChanged bool (which is unused).
2120         (WebCore::Style::resolveLocal): If the style change is synthetic, set the flag that
2121         says there are side-effects.
2122
2123 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2124
2125         [GTK] Add one single option to control all OpenGL-related options
2126         https://bugs.webkit.org/show_bug.cgi?id=144105
2127
2128         Reviewed by Martin Robinson.
2129
2130         Test WTF_USE_TEXTURE_MAPPER since USE_TEXTURE_MAPPER has been removed.
2131
2132         * PlatformGTK.cmake:
2133
2134 2015-04-27  Myles C. Maxfield  <mmaxfield@apple.com>
2135
2136         Consolidate one-line flag-related header files into TextFlags.h
2137         https://bugs.webkit.org/show_bug.cgi?id=144295
2138
2139         Reviewed by Tim Horton.
2140
2141         There were a collection of single-line header files throughout platform/ which contain
2142         single-line type declaractions of flags related to text layout & rendering. This patch
2143         consolidates all these single-line headers into TextFlags.h
2144
2145         No new tests because there is no behavior change.
2146
2147         * WebCore.vcxproj/WebCore.vcxproj:
2148         * WebCore.vcxproj/WebCore.vcxproj.filters:
2149         * WebCore.xcodeproj/project.pbxproj:
2150         * css/CSSFontFace.h:
2151         * css/CSSPrimitiveValueMappings.h:
2152         * loader/cache/CachedFont.h:
2153         * loader/cache/CachedTextTrack.h:
2154         * page/Settings.h:
2155         * platform/DragImage.h:
2156         * platform/graphics/FontDescription.h:
2157         * platform/graphics/FontOrientation.h: Removed.
2158         * platform/graphics/FontPlatformData.h:
2159         * platform/graphics/FontRenderingMode.h: Removed.
2160         * platform/graphics/FontSmoothingMode.h: Removed.
2161         * platform/graphics/FontTraitsMask.h: Removed.
2162         * platform/graphics/FontWidthVariant.h: Removed.
2163         * platform/graphics/TextRenderingMode.h: Removed.
2164         * platform/graphics/cairo/FontCustomPlatformData.h:
2165         * platform/graphics/freetype/FontPlatformData.h:
2166         * platform/graphics/mac/FontCustomPlatformData.h:
2167         * platform/graphics/win/FontCustomPlatformData.h:
2168         * platform/text/NonCJKGlyphOrientation.h: Removed.
2169         * platform/text/TextFlags.h:
2170         * rendering/TextPainter.h:
2171         * style/StyleFontSizeFunctions.h:
2172
2173 2015-04-27  Daniel Bates  <dabates@apple.com>
2174
2175         Form control may be associated with the wrong HTML Form element after form id change
2176         https://bugs.webkit.org/show_bug.cgi?id=133456
2177         <rdar://problem/17095055>
2178
2179         Reviewed by Andy Estes.
2180
2181         Fixes an issue where a form control may be associated with the wrong HTML Form element
2182         after the id of the HTML Form element associated with the form control is changed when
2183         there is more than one HTML Form element with the same id in the document. Specifically,
2184         a form control that has an HTML form attribute value X will always be associated with
2185         some HTML Form element f where f.id = X regardless of whether f.id is subsequently
2186         changed.
2187
2188         Tests: fast/forms/change-form-id-to-be-unique-then-submit-form.html
2189                fast/forms/change-form-id-to-be-unique.html
2190
2191         * dom/Element.cpp:
2192         (WebCore::Element::attributeChanged): Notify observers when the id of an element changed.
2193         (WebCore::Element::updateId): Added parameter NotifyObservers (defaults to NotifyObservers::Yes),
2194         as to whether we should notify observers of the id change.
2195         (WebCore::Element::updateIdForTreeScope): Ditto.
2196         (WebCore::Element::willModifyAttribute): Do not notify observers of the id change immediately. As
2197         indicated by the name of this method, we plan to modify the DOM attribute id of the element, but
2198         we have not actually modified it when this method is called. Instead we will notify observers
2199         in Element::attributeChanged(), which is called after the DOM attribute id is modified.
2200         (WebCore::Element::cloneAttributesFromElement): Ditto.
2201         * dom/Element.h: Defined enum class NotifyObservers.
2202         * dom/TreeScope.cpp:
2203         (WebCore::TreeScope::addElementById): Added boolean parameter notifyObservers (defaults to true)
2204         as to whether we should dispatch a notification to all observers.
2205         (WebCore::TreeScope::removeElementById): Ditto.
2206         * dom/TreeScope.h:
2207
2208 2015-04-27  Alex Christensen  <achristensen@webkit.org>
2209
2210         Reduce allocations and memory usage when compiling content extensions.
2211         https://bugs.webkit.org/show_bug.cgi?id=144277
2212
2213         Reviewed by Benjamin Poulain.
2214
2215         Covered by existing tests.
2216
2217         * contentextensions/Term.h:
2218         (WebCore::ContentExtensions::Term::CharacterSet::set):
2219         (WebCore::ContentExtensions::Term::CharacterSet::get):
2220         (WebCore::ContentExtensions::Term::CharacterSet::invert):
2221         (WebCore::ContentExtensions::Term::CharacterSet::inverted):
2222         (WebCore::ContentExtensions::Term::CharacterSet::bitCount):
2223         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
2224         (WebCore::ContentExtensions::Term::CharacterSet::hash):
2225         (WebCore::ContentExtensions::Term::Term):
2226         (WebCore::ContentExtensions::Term::addCharacter):
2227         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
2228         (WebCore::ContentExtensions::Term::isUniversalTransition):
2229         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
2230         Use two uint64_t's instead of a BitVector with a capacity of 128 bits.
2231
2232 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
2233
2234         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
2235         https://bugs.webkit.org/show_bug.cgi?id=144193
2236
2237         Reviewed by Darin Adler.
2238
2239         * CMakeLists.txt:
2240         * platform/graphics/ANGLEWebKitBridge.cpp:
2241         * platform/graphics/FormatConverter.cpp:
2242         * platform/graphics/FormatConverter.h:
2243         * platform/graphics/GLContext.h:
2244         * platform/graphics/GraphicsContext3D.cpp:
2245         * platform/graphics/GraphicsContext3DPrivate.cpp:
2246         * platform/graphics/OpenGLShims.cpp:
2247         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2248         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2249         * platform/graphics/egl/GLContextEGL.cpp:
2250         * platform/graphics/egl/GLContextEGL.h:
2251         * platform/graphics/glx/GLContextGLX.cpp:
2252         * platform/graphics/glx/GLContextGLX.h:
2253         * platform/graphics/mac/GraphicsContext3DMac.mm:
2254         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2255         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2256         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2257         * platform/graphics/opengl/GLPlatformContext.cpp:
2258         * platform/graphics/opengl/GLPlatformSurface.cpp:
2259         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2260         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2261         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2262         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
2263         * platform/graphics/win/GraphicsContext3DWin.cpp:
2264
2265 2015-04-27  Jer Noble  <jer.noble@apple.com>
2266
2267         [iOS] Video not centered in element on retina devices
2268         https://bugs.webkit.org/show_bug.cgi?id=144274
2269
2270         Reviewed by Simon Fraser.
2271
2272         In r173702, a transform was added to the video layer (and a matching, inverse transform
2273         in the UIProcess), but this transform affects the position property of the video layer
2274         used to position the video content within the element bounds when their aspect ratios
2275         do not match.
2276
2277         To work around this problem, pre-apply the transform during -setPosition:.
2278
2279         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2280         (-[WebVideoContainerLayer setPosition:]):
2281
2282 2015-04-27  Jer Noble  <jer.noble@apple.com>
2283
2284         Add a setting & restriction which prevents non-interactivte playback of audible media elements.
2285         https://bugs.webkit.org/show_bug.cgi?id=143486
2286
2287         Reviewed by Eric Carlson.
2288
2289         Tests: media/audio-playback-restriction-autoplay.html
2290                media/audio-playback-restriction-play.html
2291
2292         To allow clients who want to allow non-user-interactive video-only playback, but still
2293         restrict playback of audible media elements, add a new setting and matching restriction
2294         which disallows playback of media elements containing audible characteristics.
2295
2296         * html/HTMLMediaElement.cpp:
2297         (WebCore::HTMLMediaElement::HTMLMediaElement): Set the RequireUserGestureForAudioRateChange
2298             restriction if the audioPlaybackRequiresUserGesture() setting is set.
2299         (WebCore::HTMLMediaElement::parseAttribute): Drive-by fix. Move the opening brace
2300             out of the #if, as this confuses the heck out of diff and makes all subsequent
2301             changes appear to be within HTMLMediaElement::parseAttribute.
2302         (WebCore::HTMLMediaElement::autoplay): Remove the restriction check from within autoplay().
2303             It is checked again immediately after every autoplay() call site.
2304         (WebCore::HTMLMediaElement::pauseInternal): Remove the iOS-only #if.
2305         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Check whether playback
2306             is permitted, and if not, pause.
2307         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
2308         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
2309         * html/HTMLMediaSession.cpp:
2310         (WebCore::restrictionName): Since BehaviorRestrictions is a bitfield, check each bit
2311             individually.
2312         (WebCore::HTMLMediaSession::removeBehaviorRestriction): Handle RequireUserGestureForAudioRateChange.
2313         (WebCore::HTMLMediaSession::playbackPermitted): Check whether the element has audio and 
2314             audio playback is restricted, and return false if so.
2315         * html/HTMLMediaSession.h:
2316         * page/Settings.cpp:
2317         * page/Settings.in:
2318         * testing/Internals.cpp:
2319         (WebCore::Internals::setMediaSessionRestrictions): Added. 
2320         (WebCore::Internals::setMediaElementRestrictions): Added.
2321         * testing/Internals.h:
2322         * testing/Internals.idl:
2323
2324 2015-04-27  Jer Noble  <jer.noble@apple.com>
2325
2326         [WebAudio] AudioContext does not remove user-gesture restriction during resume()
2327         https://bugs.webkit.org/show_bug.cgi?id=144211
2328
2329         Reviewed by Eric Carlson.
2330
2331         Tests: webaudio/audiocontext-restriction-audiobuffersourcenode-start.html
2332                webaudio/audiocontext-restriction.html
2333
2334         Before the introduction of resume(), suspend(), and stop(), AudioContexts which required
2335         a user-gesture would start normally, but would effectively mute their outputs. Now that
2336         the AudioContext's state property is exposed to JavaScript, the AudioContext should stay
2337         in the "suspended" state until the user-gesture restriction is lifted.
2338
2339         Add a new method, willBeginPlayback() which checks and potentially clears the context's
2340         behavior restrictions before checking with the MediaSession. Call this new willBeginPlayback()
2341         method when the state would transition to "running".
2342
2343         Because they may be called before any nodes are created, make sure to call lazyInitialize()
2344         from within the JS-exposed resumePlayback(), suspendPlayback(), and stopPlayback() methods.
2345
2346         Instead of clearing the behavior restrictions directly, scheduled AudioNodes should instead
2347         call a new method nodeWillBeginPlayback(). Because existing sites will call AudioNode.start()
2348         inside a user-gesture handler to clear the user-gesture restriction, call startRendering()
2349         from nodeWillBeginPlayback(). But because we don't want AudioNode.start() to resume playback
2350         unconditionally, only do so when the user-gesture restriction is set.
2351
2352         Now that an AudioContext will not transition to "running" state without a user-gesture (if
2353         that restriction is set), there's no reason to check for that restriction from inside
2354         AudioDestinationNode.
2355
2356         Add some internal methods to set and clear AudioContext BehaviorRestrictions for testing purposes.
2357
2358         * Modules/webaudio/AudioBufferSourceNode.cpp:
2359         (WebCore::AudioBufferSourceNode::startPlaying):
2360         * Modules/webaudio/AudioContext.cpp:
2361         (WebCore::AudioContext::nodeWillBeginPlayback):
2362         (WebCore::AudioContext::willBeginPlayback):
2363         (WebCore::AudioContext::willPausePlayback):
2364         (WebCore::AudioContext::startRendering):
2365         (WebCore::AudioContext::suspendContext):
2366         (WebCore::AudioContext::resumeContext):
2367         (WebCore::AudioContext::closeContext):
2368         (WebCore::AudioContext::suspendPlayback):
2369         (WebCore::AudioContext::mayResumePlayback):
2370         * Modules/webaudio/AudioContext.h:
2371         (WebCore::AudioContext::behaviorRestrictions):
2372         (WebCore::AudioContext::userGestureRequiredForAudioStart):
2373         (WebCore::AudioContext::pageConsentRequiredForAudioStart):
2374         * Modules/webaudio/AudioDestinationNode.cpp:
2375         (WebCore::AudioDestinationNode::render):
2376         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2377         (WebCore::AudioScheduledSourceNode::start):
2378         * testing/Internals.cpp:
2379         (WebCore::Internals::setAudioContextRestrictions):
2380         * testing/Internals.h:
2381         * testing/Internals.idl:
2382
2383 2015-04-27  Alexey Proskuryakov  <ap@apple.com>
2384
2385         Build fix.
2386
2387         * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2388         Use -setObject:forKey:, not array subscript.
2389
2390 2015-04-27  Eric Carlson  <eric.carlson@apple.com>
2391
2392         WirelessTargetPicker should not be visible unless a file is playable
2393         https://bugs.webkit.org/show_bug.cgi?id=144271
2394         <rdar://problem/20712003>
2395
2396         Reviewed by Jer Noble.
2397
2398         * Modules/mediacontrols/mediaControlsApple.js:
2399         (Controller.prototype.isPlayable): New.
2400         (Controller.prototype.setStatusHidden): Call updateWirelessTargetAvailable.
2401         (Controller.prototype.updateWirelessTargetAvailable): Don't show the button until the
2402             status message has been hidden.
2403
2404 2015-04-22  Martin Robinson  <mrobinson@igalia.com>
2405
2406         [CMake] Autogenerate cmakeconfig.h.cmake
2407         https://bugs.webkit.org/show_bug.cgi?id=143997
2408
2409         Reviewed by Csaba Osztrogonác.
2410
2411         * PlatformGTK.cmake: Use the WTF_USE style variables, because those are the same
2412         as the ones exposed to the build.
2413
2414 2015-04-27  Zalan Bujtas  <zalan@apple.com>
2415
2416         Simple line layout: Wrong text offsetting when range does not start from the first renderer.
2417         https://bugs.webkit.org/show_bug.cgi?id=144167
2418         rdar://problem/20639857
2419
2420         Reviewed by Simon Fraser.
2421
2422         This patch ensures that TextIterator returns the right text when the input range starts
2423         from a sibling node.
2424
2425         TextIterator::m_previousTextLengthInFlow keeps track of the current node offset from the parent.
2426         It is required to map simple line layout runs to RenderText positions.
2427         This patch sets the offset value when the iteration start with a sibling node.
2428
2429         Test: fast/text/range-text-with-simple-line-layout.html
2430
2431         * editing/TextIterator.cpp:
2432         (WebCore::TextIterator::TextIterator):
2433         (WebCore::TextIterator::handleTextNode):
2434
2435 2015-04-27  Commit Queue  <commit-queue@webkit.org>
2436
2437         Unreviewed, rolling out r183393.
2438         https://bugs.webkit.org/show_bug.cgi?id=144272
2439
2440         Caused memory corruption detected by GuardMalloc (Requested by
2441         ap on #webkit).
2442
2443         Reverted changeset:
2444
2445         "Synchronous XMLHttpRequest should get access to AppCache
2446         resources stored as flat files"
2447         https://bugs.webkit.org/show_bug.cgi?id=143711
2448         http://trac.webkit.org/changeset/183393
2449
2450 2015-04-27  Per Arne Vollan  <peavo@outlook.com>
2451
2452         [Curl] Favicons loaded from disc cache are ignored.
2453         https://bugs.webkit.org/show_bug.cgi?id=143953
2454
2455         Reviewed by Alex Christensen.
2456
2457         When a favicon is loaded from the Curl disc cache, the icon data is thrown away.
2458         This happens because we give a 304 response, which makes the icon loader ignore
2459         the response. We can solve this by responding with 200 OK.
2460
2461         * platform/network/ResourceHandleInternal.h:
2462         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2463         * platform/network/curl/CurlCacheManager.cpp:
2464         (WebCore::CurlCacheManager::didReceiveResponse):
2465         * platform/network/curl/ResourceHandleManager.cpp:
2466         (WebCore::headerCallback):
2467         (WebCore::ResourceHandleManager::initializeHandle):
2468
2469 2015-04-27  Brady Eidson  <beidson@apple.com>
2470
2471         Make 'enum NavigationType' be an enum class
2472         https://bugs.webkit.org/show_bug.cgi?id=144270
2473
2474         Reviewed by Alex Christensen.
2475
2476         No new tests (No change in behavior).
2477
2478         I’ll be adding a new NavigationType for bug 144269 so it makes sense to make this
2479         an enum class first.
2480
2481         * loader/FrameLoader.cpp:
2482         (WebCore::FrameLoader::load):
2483         (WebCore::FrameLoader::reload):
2484         (WebCore::FrameLoader::loadDifferentDocumentItem):
2485         * loader/FrameLoaderTypes.h:
2486
2487         * loader/NavigationAction.cpp:
2488         (WebCore::navigationType):
2489         (WebCore::NavigationAction::NavigationAction):
2490
2491         * loader/PolicyChecker.cpp:
2492         (WebCore::PolicyChecker::checkNavigationPolicy):
2493
2494         * page/PerformanceNavigation.cpp:
2495         (WebCore::PerformanceNavigation::type):
2496
2497 2015-04-27  Yoav Weiss  <yoav@yoav.ws>
2498
2499         Fix viewport units in Media Queries
2500         https://bugs.webkit.org/show_bug.cgi?id=144260
2501
2502         Reviewed by Darin Adler.
2503
2504         This patch makes sure that viewport units are considered "length units"
2505         in the context of Media Queries, by having MediaQueryExp use the unit logic
2506         that is in CSSPrimitiveValue.
2507         It does that by turning the relevant methods in CSSPrimitiveValue into static.
2508
2509         It also makes sure that the logic for "resolution units" is not maintained separately 
2510         in MediaQueryExp, to avoid similiar issues in the future with resolution units.
2511
2512         Test: fast/media/mq-viewport-units.html
2513
2514         * css/CSSPrimitiveValue.h:
2515         (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Added a static variant.
2516         (WebCore::CSSPrimitiveValue::isLength): Added a static variant.
2517         (WebCore::CSSPrimitiveValue::isResolution): Added a static variant.
2518         * css/MediaQueryExp.cpp:
2519         (WebCore::featureWithValidPositiveLenghtOrNumber): Call CSSPrimitiveValue's length unit logic.
2520         (WebCore::featureWithValidDensity): Call CSSPrimitiveValue's resolution unit logic.
2521
2522 2015-04-27  Javier Fernandez  <jfernandez@igalia.com>
2523
2524         [CSS Grid Layout] Support for the justify-self and justify-items in grid layout
2525         https://bugs.webkit.org/show_bug.cgi?id=133280
2526
2527         Reviewed by David Hyatt.
2528
2529         Implementation of justify-self and justify-items properties for grid. It supports
2530         different writing-modes and direction. Margins, borders and paddings are also
2531         considered when computing the final position and stretched size.
2532
2533         This patch applies also a quite important refactoring of the alignment logic in
2534         order to share code between the two alignment dimensions, row-axis and column-axis.
2535
2536         Overflow handling is still missing and will be added later in a follow-up bug.
2537
2538         Tests: fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html
2539                fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html
2540                fast/css-grid-layout/grid-align-justify-margin-border-padding.html
2541                fast/css-grid-layout/justify-self-cell.html
2542
2543         * rendering/RenderGrid.cpp:
2544         (WebCore::RenderGrid::layoutGridItems):
2545         (WebCore::RenderGrid::columnAxisPositionForChild):
2546         (WebCore::RenderGrid::rowAxisPositionForChild):
2547         (WebCore::RenderGrid::rowPositionForChild):
2548         (WebCore::RenderGrid::columnPositionForChild):
2549         (WebCore::RenderGrid::findChildLogicalPosition):
2550         (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild): Deleted.
2551         (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
2552         (WebCore::RenderGrid::marginLogicalHeightForChild): Deleted.
2553         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
2554         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): Deleted.
2555         * rendering/RenderGrid.h:
2556         * rendering/style/RenderStyle.cpp:
2557         (WebCore::RenderStyle::resolveJustification):
2558         * rendering/style/RenderStyle.h:
2559
2560 2015-04-27  Darin Adler  <darin@apple.com>
2561
2562         Crashes under IDBDatabase::closeConnection
2563         https://bugs.webkit.org/show_bug.cgi?id=141745
2564
2565         Reviewed by Alexey Proskuryakov.
2566
2567         * Modules/indexeddb/IDBDatabase.cpp:
2568         (WebCore::IDBDatabase::~IDBDatabase): Do the work of close/closeConnection without
2569         actually calling those functions.
2570         (WebCore::IDBDatabase::closeConnection): Protect the database so it's not destroyed
2571         in the middle of this function's execution.
2572
2573 2015-04-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2574
2575         [Streams API] ReadableStream constructor start function should be able to close the stream
2576         https://bugs.webkit.org/show_bug.cgi?id=143363
2577
2578         Reviewed by Benjamin Poulain.
2579
2580         Implements https://streams.spec.whatwg.org/#close-readable-stream.
2581         When the "close" JS function is called, the stream is getting closed.
2582         The stream state is changed to close and if it has a reader, the reader gets closed as well:
2583         The reader resolves the closed promise and releases the stream.
2584
2585         Enabled the possibility to resolve a promise with any JS value.
2586         This is used to resolve closed promise with jsUndefined and will be used for read promises in
2587         the future as well, though of course it is not restricted to Streams.
2588
2589         Covered by reference tests that are now passing.
2590
2591         * Modules/streams/ReadableStream.h:
2592         * Modules/streams/ReadableStream.cpp:
2593         (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
2594         * Modules/streams/ReadableStreamReader.cpp:
2595         (WebCore::ReadableStreamReader::ReadableStreamReader): Initialized stream.
2596         (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time
2597         in particular closed/errored state.
2598         (WebCore::ReadableStreamReader::releaseStream): Releases the stream.
2599         (WebCore::ReadableStreamReader::closed): Stores the promise callbacks and invokes success
2600         immediately if the stream is already closed.
2601         (WebCore::ReadableStreamReader::changeStateToClosed): Changes the internal state to closed,
2602         resolves the promise and releases the stream.
2603         * Modules/streams/ReadableStreamReader.h:
2604         (WebCore::ReadableStreamReader::State): Added.
2605         * bindings/js/JSDOMPromise.h:
2606         (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Adds the ability to resolve a promise with
2607         a custom JS value.
2608         * bindings/js/JSReadableStreamControllerCustom.cpp:
2609         (WebCore::JSReadableStreamController::close): Not "notImplemented" anymore. Now it closes the
2610         stream.
2611         * bindings/js/JSReadableStreamReaderCustom.cpp:
2612         (WebCore::JSReadableStreamReader::closed): Resolves the promise with undefined.
2613
2614 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
2615
2616         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r183370
2617         https://bugs.webkit.org/show_bug.cgi?id=144255
2618
2619         Reviewed by Carlos Garcia Campos.
2620
2621         * rendering/RenderBox.cpp:
2622         (WebCore::RenderBox::computeLogicalHeight):
2623
2624 2015-04-27  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2625
2626         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
2627         https://bugs.webkit.org/show_bug.cgi?id=143711
2628
2629         Reviewed by Darin Adler.
2630
2631         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
2632         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
2633         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
2634
2635         Test: http/tests/appcache/simple-video-sync.html
2636
2637         * html/HTMLMediaElement.cpp:
2638         (WebCore::HTMLMediaElement::parseAttribute):
2639         * loader/DocumentThreadableLoader.cpp:
2640         (WebCore::DocumentThreadableLoader::loadRequest):
2641         * loader/FrameLoader.cpp:
2642         (WebCore::FrameLoader::loadResourceSynchronously):
2643         * loader/FrameLoader.h:
2644         * loader/appcache/ApplicationCacheHost.cpp:
2645         (WebCore::ApplicationCacheHost::maybeLoadResource):
2646         (WebCore::ApplicationCacheHost::createFileURL):
2647         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
2648         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
2649         * loader/appcache/ApplicationCacheHost.h:
2650         * xml/XSLTProcessorLibxslt.cpp:
2651         (WebCore::docLoaderFunc):
2652         * xml/parser/XMLDocumentParserLibxml2.cpp:
2653         (WebCore::openFunc):
2654
2655 2015-04-24  Philippe Normand  <pnormand@igalia.com>
2656
2657         [JHBuild] Move to upstream OpenWebRTC
2658         https://bugs.webkit.org/show_bug.cgi?id=144145
2659
2660         Reviewed by Carlos Garcia Campos.
2661
2662         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
2663         (WebCore::initializeOpenWebRTC): Update with new owr_init API.
2664
2665 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2666
2667         [SOUP] Add initial implementation of NetworkProcess disk cache
2668         https://bugs.webkit.org/show_bug.cgi?id=143872
2669
2670         Reviewed by Martin Robinson.
2671
2672         Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
2673         is not a GObject and has copy/free functions instead of ref/unref,
2674         it's internally refcounted, so we could use copy/free as
2675         ref/unref.
2676
2677         * PlatformGTK.cmake:
2678         * platform/network/soup/GRefPtrSoup.cpp: Added.
2679         (WTF::refGPtr):
2680         (WTF::derefGPtr):
2681         * platform/network/soup/GRefPtrSoup.h: Added.
2682
2683 2015-04-26  Manuel Rego Casasnovas  <rego@igalia.com>
2684
2685         [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
2686         https://bugs.webkit.org/show_bug.cgi?id=144144
2687
2688         Reviewed by Darin Adler.
2689
2690         Change order in hasDefiniteLogicalHeight() ifs to consider definite
2691         absolutely positioned elements.
2692
2693         Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
2694
2695         * rendering/RenderBox.cpp:
2696         (WebCore::RenderBox::hasDefiniteLogicalHeight):
2697
2698 2015-04-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
2699
2700         SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
2701         https://bugs.webkit.org/show_bug.cgi?id=144137
2702
2703         Reviewed by Darin Adler.
2704
2705         The SourceAlpha should be driven from the last applied FilterEffect. This
2706         will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
2707         than just getting the SourceGraphic reference from FilterEffectRenderer.
2708
2709         This is based on the Blink patch:
2710         https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
2711
2712         Test: svg/filters/sourceAlpha-input-filter-effect.html
2713         
2714         * platform/graphics/filters/SourceAlpha.cpp:
2715         (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
2716         rather than a Filter.
2717         
2718         (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
2719         rect from the wrapped FilterEffect.
2720         
2721         (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
2722         from the wrapped FilterEffect.
2723         
2724         (WebCore::SourceAlpha::SourceAlpha): 
2725         * platform/graphics/filters/SourceAlpha.h:
2726         (WebCore::SourceAlpha::SourceAlpha): Deleted.
2727         Reimplement the constructor of the SourceAlpha such that it wraps the
2728         sourceEffect in its inputEffects.
2729     
2730         * rendering/FilterEffectRenderer.cpp:
2731         (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
2732         comment and do exactly what it said. This matches the implementation of
2733         Gecko and Blink.
2734         
2735         * rendering/svg/RenderSVGResourceFilter.cpp:
2736         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2737         Delete the extra argument.
2738
2739         * svg/graphics/filters/SVGFilterBuilder.cpp:
2740         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2741         * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
2742         passed source FilterEffect.
2743
2744         * platform/graphics/filters/FEBlend.cpp:
2745         * platform/graphics/filters/FEBlend.h:
2746         * platform/graphics/filters/FEColorMatrix.cpp:
2747         * platform/graphics/filters/FEColorMatrix.h:
2748         * platform/graphics/filters/FEComponentTransfer.cpp:
2749         * platform/graphics/filters/FEComponentTransfer.h:
2750         * platform/graphics/filters/FEComposite.cpp:
2751         * platform/graphics/filters/FEComposite.h:
2752         * platform/graphics/filters/FEConvolveMatrix.cpp:
2753         * platform/graphics/filters/FEConvolveMatrix.h:
2754         * platform/graphics/filters/FEDiffuseLighting.cpp:
2755         * platform/graphics/filters/FEDiffuseLighting.h:
2756         * platform/graphics/filters/FEDisplacementMap.cpp:
2757         * platform/graphics/filters/FEDisplacementMap.h:
2758         * platform/graphics/filters/FEDropShadow.cpp:
2759         * platform/graphics/filters/FEDropShadow.h:
2760         * platform/graphics/filters/FEFlood.cpp:
2761         * platform/graphics/filters/FEFlood.h:
2762         * platform/graphics/filters/FEGaussianBlur.cpp:
2763         * platform/graphics/filters/FEGaussianBlur.h:
2764         * platform/graphics/filters/FELighting.cpp:
2765         * platform/graphics/filters/FELighting.h:
2766         * platform/graphics/filters/FEMerge.cpp:
2767         * platform/graphics/filters/FEMerge.h:
2768         * platform/graphics/filters/FEMorphology.cpp:
2769         * platform/graphics/filters/FEMorphology.h:
2770         * platform/graphics/filters/FEOffset.cpp:
2771         * platform/graphics/filters/FEOffset.h:
2772         * platform/graphics/filters/FESpecularLighting.cpp:
2773         * platform/graphics/filters/FESpecularLighting.h:
2774         * platform/graphics/filters/FETile.cpp:
2775         * platform/graphics/filters/FETile.h:
2776         * platform/graphics/filters/FETurbulence.cpp:
2777         * platform/graphics/filters/FETurbulence.h:
2778         * platform/graphics/filters/Filter.h:
2779         * platform/graphics/filters/FilterEffect.cpp:
2780         * platform/graphics/filters/FilterEffect.h:
2781         * platform/graphics/filters/SourceGraphic.cpp:
2782         * platform/graphics/filters/SourceGraphic.h:
2783         * rendering/svg/RenderSVGResourceFilter.h:
2784         * rendering/svg/SVGRenderTreeAsText.cpp:
2785         Code clean up: Pointer to reference conversion. It starts by converting
2786         FilterEffect::m_filter from pointer to reference and it kept expanding.
2787         All the creations of FilterEffect were happening by passing "this" so
2788         passing "*this" did not require to check whether the pointer is nil.
2789
2790         * svg/SVGFEBlendElement.cpp:
2791         * svg/SVGFEBlendElement.h:
2792         * svg/SVGFEColorMatrixElement.cpp:
2793         * svg/SVGFEColorMatrixElement.h:
2794         * svg/SVGFEComponentTransferElement.cpp:
2795         * svg/SVGFEComponentTransferElement.h:
2796         * svg/SVGFECompositeElement.cpp:
2797         * svg/SVGFECompositeElement.h:
2798         * svg/SVGFEConvolveMatrixElement.cpp:
2799         * svg/SVGFEConvolveMatrixElement.h:
2800         * svg/SVGFEDiffuseLightingElement.cpp:
2801         * svg/SVGFEDiffuseLightingElement.h:
2802         * svg/SVGFEDisplacementMapElement.cpp:
2803         * svg/SVGFEDisplacementMapElement.h:
2804         * svg/SVGFEDropShadowElement.cpp:
2805         * svg/SVGFEDropShadowElement.h:
2806         * svg/SVGFEFloodElement.cpp:
2807         * svg/SVGFEFloodElement.h:
2808         * svg/SVGFEGaussianBlurElement.cpp:
2809         * svg/SVGFEGaussianBlurElement.h:
2810         * svg/SVGFEImageElement.cpp:
2811         * svg/SVGFEImageElement.h:
2812         * svg/SVGFEMergeElement.cpp:
2813         * svg/SVGFEMergeElement.h:
2814         * svg/SVGFEMorphologyElement.cpp:
2815         * svg/SVGFEMorphologyElement.h:
2816         * svg/SVGFEOffsetElement.cpp:
2817         * svg/SVGFEOffsetElement.h:
2818         * svg/SVGFESpecularLightingElement.cpp:
2819         * svg/SVGFESpecularLightingElement.h:
2820         * svg/SVGFETileElement.cpp:
2821         * svg/SVGFETileElement.h:
2822         * svg/SVGFETurbulenceElement.cpp:
2823         * svg/SVGFETurbulenceElement.h:
2824         * svg/SVGFilterPrimitiveStandardAttributes.h:
2825         * svg/graphics/filters/SVGFEImage.cpp:
2826         * svg/graphics/filters/SVGFEImage.h:
2827         Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
2828         conversion.
2829
2830 2015-04-26  Darin Adler  <darin@apple.com>
2831
2832         REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
2833         https://bugs.webkit.org/show_bug.cgi?id=144237
2834
2835         Reviewed by Simon Fraser.
2836
2837         No test because DumpRenderTree and WebKitTestRunner don't have a good method
2838         for testing behaviors that are specific to active windows. That's the same reason
2839         that the change that caused this bug didn't come with a regression test.
2840
2841         * rendering/RenderTheme.cpp:
2842         (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
2843         clarify the meaning of the setInsideDefaultButton function, and added an
2844         isDisabledFormControl check so it won't trigger on a disabled button.
2845         (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
2846         alphabetical order to match the rest of the switch statement ordering.
2847
2848         * rendering/RenderThemeMac.mm:
2849         (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
2850         alphabetical order to match the rest of the switch statement ordering. Also
2851         fixed its behavior on older versions of OS X; it should just return the same
2852         thing that CSSValueButtontext would return in that context.
2853
2854 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2855
2856         [ES6] Implement ES6 template literals
2857         https://bugs.webkit.org/show_bug.cgi?id=142691
2858
2859         Reviewed by Darin Adler.
2860
2861         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
2862
2863         * Configurations/FeatureDefines.xcconfig:
2864
2865 2015-04-26  Javier Fernandez  <jfernandez@igalia.com>
2866
2867         [CSS Grid Layout] Support for align-self and align-items in grid layout
2868         https://bugs.webkit.org/show_bug.cgi?id=133225
2869
2870         Reviewed by Darin Adler.
2871
2872         Implementation of align-self and align-items properties for grid. It supports
2873         different writing-modes and direction. Margins, borders and paddings are also
2874         considered when computing the final position and stretched size.
2875
2876         Overflow handling is still missing and will be added when implemented row-axis
2877         alignment support.
2878
2879         Test: fast/css-grid-layout/grid-align.html
2880
2881         * rendering/RenderBox.cpp:
2882         (WebCore::RenderBox::computeLogicalHeight):
2883         * rendering/RenderGrid.cpp:
2884         (WebCore::RenderGrid::logicalContentHeightForChild):
2885         (WebCore::RenderGrid::layoutGridItems):
2886         (WebCore::computeOverflowAlignmentOffset):
2887         (WebCore::RenderGrid::endOfRowForChild):
2888         (WebCore::RenderGrid::startOfRowForChild):
2889         (WebCore::RenderGrid::centeredRowPositionForChild):
2890         (WebCore::marginWidthForChild):
2891         (WebCore::marginHeightForChild):
2892         (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
2893         (WebCore::RenderGrid::needToStretchChildLogicalHeight):
2894         (WebCore::RenderGrid::marginLogicalHeightForChild):
2895         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
2896         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2897         (WebCore::RenderGrid::rowPositionForChild):
2898         (WebCore::RenderGrid::findChildLogicalPosition):
2899         (WebCore::RenderGrid::populateGridPositions): Deleted.
2900         * rendering/RenderGrid.h:
2901
2902 2015-04-26  Doug Russell  <d_russell@apple.com>
2903
2904         AX: richer text change notifications (142719)
2905         https://bugs.webkit.org/show_bug.cgi?id=142719
2906
2907         Reviewed by Darin Adler.
2908
2909         Richer accessibility value change notifications. Introduce AXTextEditType,
2910         postTextStateChangeNotification and postTextReplacementNotification to give assistive
2911         tech apps more reliable context for responding to changes in web content. Also implement
2912         a mechanism to post value changes in password form fields in coalesced ticks to thwart
2913         analyzing the cadence of changes.
2914
2915         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
2916         and an overload of postTextReplacementNotification to give assistive tech apps more
2917         reliable context for responding to changes in web content selection. Also block posting
2918         selection changes on password fields.
2919
2920         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
2921                platform/mac/accessibility/selection-change-userinfo.html
2922                platform/mac/accessibility/value-change-userinfo.html
2923
2924         * CMakeLists.txt:
2925         * WebCore.vcxproj/WebCore.vcxproj:
2926         * WebCore.vcxproj/WebCore.vcxproj.filters:
2927         * WebCore.xcodeproj/project.pbxproj:
2928         * accessibility/AXObjectCache.cpp:
2929         (WebCore::AXObjectCache::AXObjectCache):
2930         (WebCore::AXObjectCache::notificationPostTimerFired):
2931         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
2932         (WebCore::AXObjectCache::showIntent):
2933         (WebCore::AXObjectCache::setTextSelectionIntent):
2934         (WebCore::isPasswordFieldOrContainedByPasswordField):
2935         (WebCore::AXObjectCache::postTextStateChangeNotification):
2936         (WebCore::AXObjectCache::postTextReplacementNotification):
2937         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
2938         (WebCore::AXObjectCache::rootWebArea):
2939         (WebCore::AXObjectCache::textChangeForEditType):
2940         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
2941         (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
2942         * accessibility/AXObjectCache.h:
2943         (WebCore::AXObjectCache::postTextStateChangeNotification):
2944         (WebCore::AXObjectCache::postTextReplacementNotification):
2945         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2946         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2947         (WebCore::AXObjectCache::textChangeForEditType):
2948         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2949         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
2950         (WebCore::AXObjectCache::getOrCreate): Deleted.
2951         (WebCore::AXObjectCache::attachWrapper): Deleted.
2952         * accessibility/AXTextStateChangeIntent.h: Added.
2953         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2954         * accessibility/AccessibilityNodeObject.cpp:
2955         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
2956         * accessibility/AccessibilityNodeObject.h:
2957         * accessibility/AccessibilityObject.cpp:
2958         (WebCore::AccessibilityObject::isContainedByPasswordField):
2959         * accessibility/AccessibilityObject.h:
2960         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
2961         (WebCore::AccessibilityObject::isPasswordField): Deleted.
2962         * accessibility/AccessibilityRenderObject.cpp:
2963         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2964         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2965         * accessibility/AccessibilityScrollView.h:
2966         * accessibility/atk/AXObjectCacheAtk.cpp:
2967         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2968         * accessibility/ios/AXObjectCacheIOS.mm:
2969         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2970         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2971         * accessibility/mac/AXObjectCacheMac.mm:
2972         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
2973         (WebCore::AXPostNotificationWithUserInfo):
2974         (WebCore::AXObjectCache::postPlatformNotification):
2975         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2976         (WebCore::textReplacementChangeDictionary):
2977         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2978         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2979         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2980         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
2981         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
2982         (arrayRemovingNonJSONTypes):
2983         (dictionaryRemovingNonJSONTypes):
2984         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
2985         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
2986         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2987         (textMarkerRangeFromVisiblePositions):
2988         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
2989         * editing/AppendNodeCommand.cpp:
2990         (WebCore::AppendNodeCommand::AppendNodeCommand):
2991         (WebCore::sendAXTextChangedIgnoringLineBreaks):
2992         (WebCore::AppendNodeCommand::doApply):
2993         (WebCore::AppendNodeCommand::doUnapply):
2994         * editing/AppendNodeCommand.h:
2995         (WebCore::AppendNodeCommand::create):
2996         * editing/ApplyStyleCommand.cpp:
2997         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
2998         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
2999         * editing/ApplyStyleCommand.h:
3000         * editing/CompositeEditCommand.cpp:
3001         (WebCore::EditCommandComposition::unapplyEditType):
3002         (WebCore::CompositeEditCommand::CompositeEditCommand):
3003         (WebCore::CompositeEditCommand::apply):
3004         (WebCore::CompositeEditCommand::insertParagraphSeparator):
3005         (WebCore::CompositeEditCommand::insertNodeBefore):
3006         (WebCore::CompositeEditCommand::appendNode):
3007         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3008         (WebCore::CompositeEditCommand::insertTextIntoNode):
3009         (WebCore::CompositeEditCommand::deleteTextFromNode):
3010         (WebCore::CompositeEditCommand::replaceTextInNode):
3011         (WebCore::CompositeEditCommand::moveParagraphs):
3012         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3013         (WebCore::CompositeEditCommand::applyStyle): Deleted.
3014         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3015         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3016         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3017         (WebCore::CompositeEditCommand::inputText): Deleted.
3018         * editing/CompositeEditCommand.h:
3019         * editing/DeleteFromTextNodeCommand.cpp:
3020         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3021         (WebCore::DeleteFromTextNodeCommand::doApply):
3022         (WebCore::DeleteFromTextNodeCommand::doUnapply):
3023         * editing/DeleteFromTextNodeCommand.h:
3024         (WebCore::DeleteFromTextNodeCommand::create):
3025         (WebCore::DeleteFromTextNodeCommand::deletedText):
3026         * editing/DeleteSelectionCommand.cpp:
3027         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3028         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
3029         * editing/DeleteSelectionCommand.h:
3030         (WebCore::DeleteSelectionCommand::create):
3031         * editing/DictationCommand.cpp:
3032         (WebCore::DictationCommand::insertTextRunWithoutNewlines):
3033         (WebCore::DictationCommand::insertParagraphSeparator):
3034         * editing/EditAction.h:
3035         * editing/EditCommand.cpp:
3036         (WebCore::EditCommand::EditCommand):
3037         (WebCore::EditCommand::editingAction):
3038         (WebCore::EditCommand::applyEditType):
3039         (WebCore::EditCommand::unapplyEditType):
3040         (WebCore::SimpleEditCommand::SimpleEditCommand):
3041         (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
3042         (WebCore::EditCommand::setParent): Deleted.
3043         * editing/EditCommand.h:
3044         * editing/EditingAllInOne.cpp:
3045         * editing/Editor.cpp:
3046         (WebCore::Editor::handleTextEvent):
3047         (WebCore::Editor::deleteSelectionWithSmartDelete):
3048         (WebCore::Editor::replaceSelectionWithFragment):
3049         (WebCore::Editor::replaceSelectionWithText):
3050         (WebCore::Editor::appliedEditing):
3051         (WebCore::Editor::unappliedEditing):
3052         (WebCore::Editor::performCutOrCopy):
3053         (WebCore::Editor::markMisspellingsAfterTypingToWord):
3054         (WebCore::Editor::changeBackToReplacedString):
3055         (WebCore::Editor::transpose):
3056         (WebCore::Editor::changeSelectionAfterCommand):
3057         * editing/Editor.h:
3058         * editing/EditorCommand.cpp:
3059         (WebCore::executeInsertFragment):
3060         * editing/FrameSelection.cpp:
3061         (WebCore::FrameSelection::moveTo):
3062         (WebCore::FrameSelection::moveWithoutValidationTo):
3063         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
3064         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3065         (WebCore::FrameSelection::setSelection):
3066         (WebCore::FrameSelection::updateAndRevealSelection):
3067         (WebCore::isBoundary):
3068         (WebCore::FrameSelection::textSelectionIntent):
3069         (WebCore::FrameSelection::modify):
3070         (WebCore::FrameSelection::selectAll):
3071         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
3072         (WebCore::FrameSelection::modifyMovingBackward): Deleted.
3073         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
3074         (WebCore::FrameSelection::selectionAtWordStart): Deleted.
3075         * editing/FrameSelection.h:
3076         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3077         (WebCore::FrameSelection::selection): Deleted.
3078         * editing/InsertIntoTextNodeCommand.cpp:
3079         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3080         (WebCore::InsertIntoTextNodeCommand::doApply):
3081         (WebCore::InsertIntoTextNodeCommand::doUnapply):
3082         * editing/InsertIntoTextNodeCommand.h:
3083         (WebCore::InsertIntoTextNodeCommand::create):
3084         (WebCore::InsertIntoTextNodeCommand::insertedText):
3085         * editing/InsertNodeBeforeCommand.cpp:
3086         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
3087         (WebCore::InsertNodeBeforeCommand::doApply):
3088         (WebCore::InsertNodeBeforeCommand::doUnapply):
3089         * editing/InsertNodeBeforeCommand.h:
3090         (WebCore::InsertNodeBeforeCommand::create):
3091         * editing/InsertParagraphSeparatorCommand.cpp:
3092         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
3093         * editing/InsertParagraphSeparatorCommand.h:
3094         (WebCore::InsertParagraphSeparatorCommand::create):
3095         * editing/InsertTextCommand.cpp:
3096         (WebCore::InsertTextCommand::InsertTextCommand):
3097         * editing/InsertTextCommand.h:
3098         (WebCore::InsertTextCommand::create):
3099         (WebCore::InsertTextCommand::createWithMarkerSupplier):
3100         * editing/MoveSelectionCommand.cpp:
3101         (WebCore::MoveSelectionCommand::doApply):
3102         * editing/RemoveNodePreservingChildrenCommand.cpp:
3103         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
3104         * editing/RemoveNodePreservingChildrenCommand.h:
3105         (WebCore::RemoveNodePreservingChildrenCommand::create):
3106         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3107         (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
3108         (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
3109         * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3110         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
3111         (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
3112         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
3113         * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
3114         * editing/ReplaceSelectionCommand.cpp:
3115         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
3116         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
3117         (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
3118         * editing/ReplaceSelectionCommand.h:
3119         (WebCore::ReplaceSelectionCommand::create):
3120         * editing/TypingCommand.cpp:
3121         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
3122         (WebCore::TypingCommand::insertParagraphSeparator):
3123         * editing/atk/FrameSelectionAtk.cpp:
3124         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3125         * editing/ios/DictationCommandIOS.cpp:
3126         (WebCore::DictationCommandIOS::DictationCommandIOS):
3127         * editing/ios/DictationCommandIOS.h:
3128         * editing/mac/FrameSelectionMac.mm:
3129         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3130         * html/HTMLTextFormControlElement.cpp:
3131         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3132         * page/DragController.cpp:
3133         (WebCore::DragController::concludeEditDrag):
3134         * page/EventHandler.cpp:
3135         (WebCore::setInitialKeyboardSelection):
3136         * page/FocusController.cpp:
3137         (WebCore::FocusController::advanceFocusInDocumentOrder):
3138
3139 2015-04-26  Darin Adler  <darin@apple.com>
3140
3141         REGRESSION (r176751): line-height ignored in <button> elements
3142         https://bugs.webkit.org/show_bug.cgi?id=144234
3143
3144         Reviewed by Antti Koivisto.
3145
3146         Test: fast/forms/button-line-height.html
3147
3148         The theme code was overriding line heights on all themed form controls.
3149         Instead it should have only overridden line height when the theme overrides the font.
3150         For <input type=button> on Mac, the theme always overrides the font, but for
3151         other elements like <button> it does not.
3152
3153         * platform/Theme.h: Changed controlFont to return an Optional so we can tell
3154         when the theme is overriding the font. Otherwise if the font from the user-agent
3155         style sheet and the font from the theme are the same, we will think we are not
3156         overriding the font when we actually are.
3157
3158         * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
3159         * platform/mac/ThemeMac.mm:
3160         (WebCore::ThemeMac::controlFont): Ditto.
3161
3162         * rendering/RenderTheme.cpp:
3163         (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
3164         overriden by the theme, all the time for PushButtonPart on Mac, and not at all
3165         for other parts. Also tightened up the logic a little since RenderStyle's
3166         setFontDescription already does an "==" comparison; we don't have to do
3167         that twice.
3168
3169 2015-04-26  Darin Adler  <darin@apple.com>
3170
3171         REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
3172         https://bugs.webkit.org/show_bug.cgi?id=137163
3173
3174         Reviewed by Andy Estes.
3175
3176         Test: fast/notifications/request-notification-permission-while-reloading.html
3177
3178         The test doesn't crash under WebKit2, but that's still OK for our purposes.
3179
3180         * Modules/notifications/NotificationCenter.cpp:
3181         (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
3182         (WebCore::NotificationCenter::createNotification): Moved here from the header.
3183         (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
3184         center when we need to defer a callback. Also use a lambda for the callback and changed
3185         the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
3186         bindings were not transferring ownership of the VoidCallback. The new type is a little
3187         strange but it's consistent with how the bindings work right now.
3188         (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
3189         to match the ref we did above.
3190         (WebCore::NotificationCenter::requestTimedOut): Deleted.
3191         (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
3192         (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
3193         (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
3194         (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
3195
3196         * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
3197         Changed the argument type for requestPermission to match the reality of what's passed by the
3198         bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
3199         vector of std::function.
3200
3201 2015-04-26  Simon Fraser  <simon.fraser@apple.com>
3202
3203         Modernize animations code
3204         https://bugs.webkit.org/show_bug.cgi?id=144196
3205
3206         Reviewed by Darin Adler.
3207         
3208         General cleanup in animation-related code.
3209         
3210         Use C++ references where possible. Use modern loops. Make classes fast-allocated.
3211         Use C++11 member initialization. Order member variables to optimize packing.
3212         
3213         This removes some null checks in CompositeAnimation, but the values in m_transitions
3214         and m_keyframeAnimations can never be null.
3215         
3216         No behavior change.
3217
3218         * page/animation/AnimationBase.cpp:
3219         (WebCore::AnimationBase::AnimationBase):
3220         (WebCore::AnimationBase::animationsMatch):
3221         (WebCore::AnimationBase::updateStateMachine):
3222         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3223         (WebCore::AnimationBase::beginAnimationUpdateTime):
3224         (WebCore::AnimationBase::getElapsedTime):
3225         * page/animation/AnimationBase.h:
3226         (WebCore::AnimationBase::animation):
3227         (WebCore::AnimationBase::setAnimation):
3228         * page/animation/AnimationController.cpp:
3229         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
3230         (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
3231         * page/animation/CompositeAnimation.cpp:
3232         (WebCore::CompositeAnimation::CompositeAnimation):
3233         (WebCore::CompositeAnimation::clearRenderer):
3234         (WebCore::CompositeAnimation::updateTransitions):
3235         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3236         (WebCore::CompositeAnimation::animate):
3237         (WebCore::CompositeAnimation::getAnimatedStyle):
3238         (WebCore::CompositeAnimation::timeToNextService):
3239         (WebCore::CompositeAnimation::getAnimationForProperty):
3240         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
3241         (WebCore::CompositeAnimation::suspendAnimations):
3242         (WebCore::CompositeAnimation::resumeAnimations):
3243         (WebCore::CompositeAnimation::overrideImplicitAnimations):
3244         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
3245         (WebCore::CompositeAnimation::isAnimatingProperty):
3246         (WebCore::CompositeAnimation::pauseTransitionAtTime):
3247         (WebCore::CompositeAnimation::numberOfActiveAnimations):
3248         * page/animation/CompositeAnimation.h:
3249         (WebCore::CompositeAnimation::create):
3250         (WebCore::CompositeAnimation::animationController):
3251         * page/animation/ImplicitAnimation.cpp:
3252         (WebCore::ImplicitAnimation::ImplicitAnimation):
3253         (WebCore::ImplicitAnimation::sendTransitionEvent):
3254         * page/animation/ImplicitAnimation.h:
3255         (WebCore::ImplicitAnimation::create):
3256         * page/animation/KeyframeAnimation.cpp:
3257         (WebCore::KeyframeAnimation::KeyframeAnimation):
3258         (WebCore::KeyframeAnimation::animate):
3259         (WebCore::KeyframeAnimation::getAnimatedStyle):
3260         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
3261         (WebCore::KeyframeAnimation::startAnimation):
3262         (WebCore::KeyframeAnimation::sendAnimationEvent):
3263         (WebCore::KeyframeAnimation::overrideAnimations):
3264         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
3265         (WebCore::KeyframeAnimation::timeToNextService):
3266         * page/animation/KeyframeAnimation.h:
3267         * platform/animation/Animation.cpp:
3268         (WebCore::Animation::animationsMatch):
3269         * platform/animation/Animation.h:
3270         * rendering/RenderLayer.cpp:
3271         (WebCore::RenderLayer::paint):
3272         (WebCore::performOverlapTests):
3273         * rendering/style/KeyframeList.h:
3274         (WebCore::KeyframeList::properties):
3275         (WebCore::KeyframeList::keyframes):
3276         (WebCore::KeyframeList::beginProperties): Deleted.
3277         (WebCore::KeyframeList::endProperties): Deleted.
3278         (WebCore::KeyframeList::operator[]): Deleted.
3279         * rendering/style/RenderStyle.h:
3280
3281 2015-04-25  Simon Fraser  <simon.fraser@apple.com>
3282
3283         Expand compositing coverage rect when scrolling and animating
3284         https://bugs.webkit.org/show_bug.cgi?id=144214
3285         rdar://problem/20695926
3286
3287         Reviewed by Darin Adler.
3288         
3289         r183300 added a secondary rect that gets mapped through graphics layers during
3290         layer flushing, which represents a rect, in layer coordinates, that represents
3291         the portion of this layer that's visible in the viewport.
3292         
3293         This patch extends that rect based on scrolling and animating, with the extended
3294         coverage rect being mapped into descendants (where it's used to determine whether
3295         they should detach their backing store). This required moving the responsibility for
3296         extending the coverage rect from TileController (where it was used to compute
3297         tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
3298         of coverage rect, and pushes it onto TileControllers.
3299
3300         Test: compositing/tiling/transform-origin-tiled.html
3301
3302         * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
3303         TiledBacking from outside; new functions reflect that.
3304         * platform/graphics/ca/GraphicsLayerCA.cpp:
3305         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
3306         old visible rect to commitLayerChangesBeforeSublayers.
3307         (WebCore::accumulatesTransform):
3308         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
3309         then adjustCoverageRect() which adjusts for scrolling and animations.
3310         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
3311         TransformState, but we can only use this if mapping it through various transforms didn't clamp
3312         it (which can happen with severe rotations in perspective).
3313         (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
3314         ask the TileController to do coverage adjustment (code which should move into here eventually).
3315         For other tiled layers, do motion-based adjustment. This should really be done for all layers
3316         (an animating non-tiled layer may contain a tiled layer).
3317         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
3318         any more; layers only react to changed in coverage rect now.
3319         (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
3320         coverage rect, here we push the new rect back into the TransformState so it will affect
3321         descendants.
3322         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3323         (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
3324         hand-in-hand now.
3325         (WebCore::GraphicsLayerCA::changeLayerTypeTo):
3326         (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
3327         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
3328         (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
3329         * platform/graphics/ca/GraphicsLayerCA.h:
3330         * platform/graphics/ca/TileController.cpp:
3331         (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
3332         logging now.
3333         (WebCore::TileController::setCoverageRect):
3334         (WebCore::TileController::tilesWouldChangeForCoverageRect):
3335         (WebCore::TileController::revalidateTiles):
3336         (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
3337         is called at the top of committing the owning layer, we haven't yet pushed a new size to the
3338         underlying platform layer (which TileController::bounds() consults).
3339         (WebCore::TileController::bounds):
3340         (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
3341         underlying layer hasn't been updated yet.
3342         (WebCore::TileController::didRevalidateTiles):
3343         (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
3344         * platform/graphics/ca/TileController.h:
3345         * platform/graphics/ca/TileCoverageMap.cpp:
3346         (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows 
3347         a dark blue outline for the coverage rect.
3348         (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
3349         content inset is non-zero.
3350         * platform/graphics/ca/TileCoverageMap.h:
3351         * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
3352         (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
3353         (WebCore::TileGrid::revalidateTiles):
3354         (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
3355         * platform/graphics/ca/TileGrid.h:
3356         * platform/graphics/transforms/TransformState.cpp:
3357         (WebCore::TransformState::operator=):
3358         (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
3359         (WebCore::TransformState::mappedSecondaryQuad): Ditto.
3360         (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
3361         to pass in a secondary quad, and get it mapped into the coordinate space of the last
3362         "flattening" state (since the TransformState may have in-flight XY offset, or transform).
3363         This mapping is achieved by re-using mapQuad(), but in the inverse direction.
3364         (WebCore::TransformState::mapQuad): Make direction a parameter.
3365         (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
3366         quad. Failure was detected by tests.
3367         * platform/graphics/transforms/TransformState.h:
3368         (WebCore::TransformState::isMappingSecondaryQuad):
3369         (WebCore::TransformState::direction):
3370         (WebCore::TransformState::inverseDirection):
3371         (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
3372
3373 2015-04-25  Dan Bernstein  <mitz@apple.com>
3374
3375         Updated expected bindings generation test results after r183343.
3376
3377         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
3378         * bindings/scripts/test/ObjC/DOMTestCallback.h:
3379         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
3380         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
3381         * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
3382         * bindings/scripts/test/ObjC/DOMTestException.h:
3383         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
3384         * bindings/scripts/test/ObjC/DOMTestInterface.h:
3385         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
3386         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
3387         * bindings/scripts/test/ObjC/DOMTestNode.h:
3388         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
3389         * bindings/scripts/test/ObjC/DOMTestObj.h:
3390         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
3391         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
3392         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
3393         * bindings/scripts/test/ObjC/DOMattribute.h:
3394         * bindings/scripts/test/ObjC/DOMreadonly.h:
3395
3396 2015-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
3397
3398         font-synthesis's initial value is "style weight"
3399         https://bugs.webkit.org/show_bug.cgi?id=144195
3400
3401         Reviewed by Darin Adler.
3402
3403         Updated fast/css3-text/font-synthesis-parse.html.
3404
3405         * rendering/style/RenderStyle.h:
3406
3407 2015-04-25  Commit Queue  <commit-queue@webkit.org>
3408
3409         Unreviewed, rolling out r183305.
3410         https://bugs.webkit.org/show_bug.cgi?id=144213
3411
3412         Crashes on wikipedia (Requested by litherum on #webkit).
3413
3414         Reverted changeset:
3415
3416         "[Cocoa] FontPlatformData's equality check should always use
3417         reference URLs"
3418         https://bugs.webkit.org/show_bug.cgi?id=144168
3419         http://trac.webkit.org/changeset/183305
3420
3421 2015-04-25  Dan Bernstein  <mitz@apple.com>
3422
3423         WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
3424         https://bugs.webkit.org/show_bug.cgi?id=144201
3425
3426         Reviewed by Darin Adler.
3427
3428         Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
3429         9876.5.
3430
3431         * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
3432         use 9876_5 in availability macros. Removed the definition of
3433         __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
3434
3435         * bindings/scripts/CodeGeneratorObjC.pm:
3436         (ReadPublicInterfaces): Use 9876_5 instead of TBD.
3437
3438 2015-04-25  Timothy Hatcher  <timothy@apple.com>
3439
3440         Update localized strings.
3441
3442         * English.lproj/Localizable.strings: Updated.
3443
3444 2015-04-25  Darin Adler  <darin@apple.com>
3445
3446         Crash if IDBTransaction is aborted right after it's created
3447         https://bugs.webkit.org/show_bug.cgi?id=144199
3448
3449         Reviewed by Simon Fraser.
3450
3451         Test: storage/indexeddb/transaction-abort.html
3452
3453         * Modules/indexeddb/IDBTransactionBackend.cpp:
3454         (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
3455         transaction if it is already complete (has been aborted).
3456
3457 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
3458
3459         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
3460         https://bugs.webkit.org/show_bug.cgi?id=144182
3461
3462         Reviewed by Simon Fraser.
3463
3464         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3465         * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3466         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3467         * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3468         * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3469         * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3470         * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3471         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3472         * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3473         * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3474         * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
3475
3476 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
3477
3478         [Cocoa] FontPlatformData's equality check should always use reference URLs
3479         https://bugs.webkit.org/show_bug.cgi?id=144168
3480
3481         Reviewed by Tim Horton.
3482
3483         <rdar://problem/18985642> is not fixed, so we need to continue using the older
3484         objectForEqualityCheck().
3485
3486         No new tests because there is no behavior change.
3487
3488         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3489         (WebCore::FontPlatformData::objectForEqualityCheck):
3490
3491 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
3492
3493         Implement parsing support for font-synthesis CSS property
3494         https://bugs.webkit.org/show_bug.cgi?id=144180
3495         <rdar://problem/20692791>
3496         <rdar://problem/20625024>
3497
3498         Reviewed by Tim Horton.
3499
3500         See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
3501
3502         This property allows web authors to opt out of font synthesis. This patch only
3503         implements parsing support for the property.
3504
3505         Test: fast/css3-text/font-synthesis-parse.html
3506
3507         * css/CSSComputedStyleDeclaration.cpp:
3508         (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
3509         (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
3510         * css/CSSParser.cpp:
3511         (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
3512         (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
3513         "none | [ weight || style ]"
3514         * css/CSSParser.h: Function signature.
3515         * css/CSSPropertyNames.in: New CSS property name.
3516         * css/CSSValueKeywords.in: New CSS value names.
3517         * css/StyleBuilderCustom.h:
3518         (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
3519         representation of font-synthesis for a given CSSValue.
3520         * rendering/style/RenderStyle.h: Function signature.
3521         * rendering/style/RenderStyleConstants.h: Internal representation of
3522         font-synthesis.
3523         * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
3524         related to this internal representation.
3525
3526 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
3527
3528         Have the web inspector report accurate memory use for layers with detached backing store
3529         https://bugs.webkit.org/show_bug.cgi?id=144179
3530
3531         Reviewed by Dean Jackson.
3532
3533         Only report memory use for layers whose backing store is attached.
3534
3535         * platform/graphics/ca/GraphicsLayerCA.cpp:
3536         * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
3537         which platforms can override if they allow backing store detaching.
3538
3539 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
3540
3541         Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
3542         https://bugs.webkit.org/show_bug.cgi?id=144165
3543
3544         Reviewed by Dean Jackson.
3545         
3546         Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
3547         which maps this rect through all the layers. Each layer tests intersection with
3548         this rect to determine if its backing store should be attached.
3549         
3550         This will cause us to drop backing store for layers that don't intersect the
3551         visible part of the view, which is too aggressive. A future patch will add
3552         some padding.
3553
3554         Tests: compositing/visible-rect/coverage-clipped.html
3555                compositing/visible-rect/coverage-scrolling.html
3556
3557         * platform/graphics/ca/GraphicsLayerCA.cpp:
3558         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
3559         C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
3560         (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
3561         secondary coverage rect. A future patch will inflate this on the way down the tree.
3562         (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
3563         we have a secondary coverage rect, that rect can be clipped to us too.
3564         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
3565         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3566         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3567         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
3568         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
3569         * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
3570         Use more C++11 initializers.
3571         (WebCore::GraphicsLayerCA::coverageRect):
3572
3573 2015-04-24  Dean Jackson  <dino@apple.com>
3574
3575         AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
3576         https://bugs.webkit.org/show_bug.cgi?id=144173
3577         <rdar://problem/20526168>
3578
3579         Reviewed by Simon Fraser.
3580
3581         Keep a list of Animations that care about scroll updates, and only
3582         run the animation update if the list is not empty.
3583
3584         Covered by existing tests.
3585
3586         * page/animation/AnimationBase.cpp:
3587         (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
3588         if this is an animation that depends on scrolling.
3589         * page/animation/AnimationController.cpp:
3590         (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
3591         new removeFromAnimationsDependentOnScroll as this animation is deleted.
3592         (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
3593         (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
3594         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
3595         there are animations that care.
3596         (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
3597         value to FrameView.
3598         * page/animation/AnimationController.h:
3599         * page/animation/AnimationControllerPrivate.h:
3600         (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
3601
3602 2015-04-24  Tim Horton  <timothy_horton@apple.com>
3603
3604         WKPDFView does not support password-protected PDFs
3605         https://bugs.webkit.org/show_bug.cgi?id=144162
3606         <rdar://problem/18411512>
3607
3608         Reviewed by Andy Estes.
3609
3610         * English.lproj/Localizable.strings:
3611         Add some localizable strings.
3612
3613 2015-04-24  David Kilzer  <ddkilzer@apple.com>
3614
3615         Fix iOS EWS builds after updating to iOS 8.3 SDK
3616
3617         * platform/spi/cocoa/CoreTextSPI.h:
3618         * rendering/RenderThemeIOS.mm:
3619         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
3620         - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
3621
3622 2015-04-24  Jer Noble  <jer.noble@apple.com>
3623
3624         Unreviewed iOS build fix; add declarations to AVKitSPI.h
3625
3626         * platform/spi/cocoa/AVKitSPI.h:
3627
3628 2015-04-24  Enrica Casucci  <enrica@apple.com>
3629
3630         Make rangeExpandedAroundPositionByCharacters to all platforms.
3631         https://bugs.webkit.org/show_bug.cgi?id=144161
3632
3633         Reviewed by Tim Horton.
3634
3635         No change in functionality, simply making this available
3636         to all platforms.
3637
3638         * editing/VisibleUnits.cpp:
3639         (WebCore::rangeExpandedAroundPositionByCharacters):
3640         * editing/VisibleUnits.h:
3641         * editing/mac/DataDetection.mm:
3642         * editing/mac/DictionaryLookup.h:
3643         * editing/mac/DictionaryLookup.mm:
3644         (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
3645
3646 2015-04-24  Andreas Kling  <akling@apple.com>
3647
3648         Purge PassRefPtr from NamedNodeMap.
3649         <https://webkit.org/b/144091>
3650
3651         Reviewed by Antti Koivisto.
3652
3653         Use RefPtr instead of PassRefPtr in NamedNodeMap.
3654
3655         * dom/NamedNodeMap.cpp:
3656         (WebCore::NamedNodeMap::getNamedItem):
3657         (WebCore::NamedNodeMap::getNamedItemNS):
3658         (WebCore::NamedNodeMap::removeNamedItem):
3659         (WebCore::NamedNodeMap::removeNamedItemNS):
3660         (WebCore::NamedNodeMap::setNamedItem):
3661         (WebCore::NamedNodeMap::setNamedItemNS):
3662         (WebCore::NamedNodeMap::item):
3663         * dom/NamedNodeMap.h:
3664
3665 2015-04-24  Commit Queue  <commit-queue@webkit.org>
3666
3667         Unreviewed, rolling out r183266.
3668         https://bugs.webkit.org/show_bug.cgi?id=144164
3669
3670         Broke 32-bit build and a test. (Requested by ap on #webkit).
3671
3672         Reverted changeset:
3673
3674         "AX: richer text change notifications (142719)"
3675         https://bugs.webkit.org/show_bug.cgi?id=142719
3676         http://trac.webkit.org/changeset/183266
3677
3678 2015-04-24  Brady Eidson  <beidson@apple.com>
3679
3680         Origin header is preserved on cross-origin redirects.
3681         https://bugs.webkit.org/show_bug.cgi?id=144157.
3682
3683         Reviewed by Sam Weinig.
3684
3685         Tests: http/tests/security/cors-post-redirect-301.html
3686                http/tests/security/cors-post-redirect-302.html
3687                http/tests/security/cors-post-redirect-307.html
3688                http/tests/security/cors-post-redirect-308.html
3689
3690         * platform/network/cf/ResourceHandleCFNet.cpp:
3691         (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
3692         * platform/network/mac/ResourceHandleMac.mm:
3693         (WebCore::ResourceHandle::willSendRequest): Ditto.
3694
3695 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
3696
3697         Immediate action not functional for embedded PDFs
3698         https://bugs.webkit.org/show_bug.cgi?id=143952
3699         <rdar://problem/19842365>        
3700
3701         Reviewed by Tim Horton.
3702
3703         Add a dictionary lookup method to allow us to retrieve
3704         relevant information for PDFs.
3705
3706         * editing/mac/DictionaryLookup.mm:
3707         (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
3708         where the Lookup engine selects a smaller range than the initial automatic
3709         selection performed on clicking.
3710
3711 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
3712
3713         Make it possible to map a secondary quad through TransformState
3714         https://bugs.webkit.org/show_bug.cgi?id=144156
3715
3716         Reviewed by Dean Jackson.
3717
3718         A future patch will need to map two quads simultaneously through TransformState,
3719         so add the ability to provide an optional secondary quad.
3720         
3721         This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
3722         requiring the state to be flattened when setting the quad (and now, the secondary quad).
3723         Previously, setQuad implicitly flattened but failed to update m_mapPoint when
3724         doing so.
3725
3726         * platform/graphics/ca/GraphicsLayerCA.cpp:
3727         (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
3728         before setting the quad.
3729         * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
3730         * platform/graphics/transforms/TransformState.cpp:
3731         (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
3732         (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
3733         if we have one.
3734         (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
3735         (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
3736         into the state's current coordinate space.
3737         (WebCore::TransformState::mapQuad): Factored code.
3738         * platform/graphics/transforms/TransformState.h:
3739         (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
3740         (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
3741         (WebCore::TransformState::lastPlanarSecondaryQuad):
3742         (WebCore::TransformState::lastPlanarQuad): Deleted.
3743
3744 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
3745
3746         [iOS] Reimplement r182512 and r183153 in a cleaner way
3747         https://bugs.webkit.org/show_bug.cgi?id=144151
3748
3749         Reviewed by Enrica Casucci.
3750
3751         On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
3752         This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
3753         react to this fact by making users of a FontPlatformData use the original font passed in
3754         to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
3755         detect that the FontPlatformData represents a system font (the underlying APIs have
3756         different behavior for system fonts and non-system-fonts).
3757
3758         However, on OS X, we create a FontPlatformData's ctFont() directly from the original
3759         font passed in to the constructor. This preserves system-font-ness (because it no
3760         longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
3761         correct behavior regarding system fonts.
3762
3763         The difference between the two ctFont() creation codepaths seems to be historical
3764         rather than intentional. Rather than change all the call sites of ctFont() to use a
3765         different platform font object if a system font is detected, a cleaner solution is to
3766         simply unify the two ctFont() creation codepaths to the version which preserves system-
3767         font-ness. Doing this will make all users of FontPlatformData automatically have the
3768         correct behavior with no updates.
3769
3770         This patch reverts the relevant parts of r182512 and r183153 in favor of this new
3771         solution.
3772
3773         No new tests because there is no behavior change.
3774
3775         * platform/graphics/FontPlatformData.h:
3776         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
3777         * platform/graphics/cocoa/FontCocoa.mm:
3778         (WebCore::Font::platformWidthForGlyph):
3779         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3780         (WebCore::FontPlatformData::ctFontSize):
3781         (WebCore::FontPlatformData::ctFont):
3782         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
3783         (WebCore::Font::getCFStringAttributes):
3784
3785 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
3786
3787         Unreviewed build fix.
3788
3789         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3790         (WebCore::FontPlatformData::FontPlatformData):
3791
3792 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
3793
3794         [Cocoa] Start cleaning up FontPlatformData
3795         https://bugs.webkit.org/show_bug.cgi?id=144133
3796
3797         Reviewed by Enrica Casucci.
3798
3799         This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
3800         FontPlatformData. This patch starts this effort out by removing the FontPlatformData
3801         constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
3802         and forwards to another constructor. This patch moves this cast to callers of this constructor,
3803         thereby enumerating the places we have left that use NSFont with FontPlatformData.
3804
3805         This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
3806         a common constructor.
3807
3808         This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
3809         not 0 and not -1, and puts this common code inside a new function,
3810         FontPlatformData::isValidCTFontRef().
3811
3812         No new tests because there is no behavior change.
3813
3814         * platform/graphics/FontPlatformData.cpp:
3815         (WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
3816         * platform/graphics/FontPlatformData.h:
3817         (WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
3818         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
3819         * platform/graphics/cocoa/FontCocoa.mm:
3820         (WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
3821         FontPlatformData constructor.
3822         (WebCore::Font::compositeFontReferenceFont): Ditto.
3823         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3824         (WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
3825         (WebCore::FontPlatformData::platformDataInit): Ditto.
3826         (WebCore::FontPlatformData::platformDataAssign): Ditto.
3827         (WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
3828         (WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
3829         (WebCore::FontPlatformData::FontPlatformData): Deleted.
3830         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3831         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
3832         NSFont use.
3833         * platform/graphics/mac/FontCacheMac.mm:
3834         (WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
3835         deleted FontPlatformData constructor.
3836         (WebCore::FontCache::createFontPlatformData): Ditto.
3837         * platform/mac/DragImageMac.mm:
3838         (WebCore::fontFromNSFont): Ditto.
3839         (WebCore::widthWithFont): Ditto.
3840         (WebCore::drawAtPoint): Ditto.
3841
3842 2015-04-24  Doug Russell  <d_russell@apple.com>
3843
3844         AX: richer text change notifications (142719)
3845         https://bugs.webkit.org/show_bug.cgi?id=142719
3846
3847         Reviewed by Darin Adler.
3848
3849         Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
3850
3851         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
3852
3853         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
3854                platform/mac/accessibility/selection-change-userinfo.html
3855                platform/mac/accessibility/value-change-userinfo.html
3856
3857         * CMakeLists.txt:
3858         * WebCore.vcxproj/WebCore.vcxproj:
3859         * WebCore.vcxproj/WebCore.vcxproj.filters:
3860         * WebCore.xcodeproj/project.pbxproj:
3861         * accessibility/AXObjectCache.cpp:
3862         (WebCore::AXObjectCache::AXObjectCache):
3863         (WebCore::AXObjectCache::notificationPostTimerFired):
3864         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
3865         (WebCore::AXObjectCache::showIntent):
3866         (WebCore::AXObjectCache::setTextSelectionIntent):
3867         (WebCore::isPasswordFieldOrContainedByPasswordField):
3868         (WebCore::AXObjectCache::postTextStateChangeNotification):
3869         (WebCore::AXObjectCache::postTextReplacementNotification):
3870         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
3871         (WebCore::AXObjectCache::rootWebArea):
3872         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
3873         * accessibility/AXObjectCache.h:
3874         (WebCore::AXObjectCache::postTextStateChangeNotification):
3875         (WebCore::AXObjectCache::postTextReplacementNotification):
3876         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3877         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3878         (WebCore::AXObjectCache::textChangeForEditType):
3879         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3880         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
3881         (WebCore::AXObjectCache::getOrCreate): Deleted.
3882         (WebCore::AXObjectCache::attachWrapper): Deleted.
3883         * accessibility/AXTextStateChangeIntent.h: Added.
3884         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
3885         * accessibility/AccessibilityNodeObject.cpp:
3886         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
3887         * accessibility/AccessibilityNodeObject.h:
3888         * accessibility/AccessibilityObject.cpp:
3889         (WebCore::AccessibilityObject::isContainedByPasswordField):
3890         * accessibility/AccessibilityObject.h:
3891         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
3892         (WebCore::AccessibilityObject::isPasswordField): Deleted.
3893         * accessibility/AccessibilityRenderObject.cpp:
3894         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3895         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3896         * accessibility/AccessibilityScrollView.h:
3897         * accessibility/atk/AXObjectCacheAtk.cpp:
3898         (WebCore::AXObjectCache::textChangeForEditType):
3899         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3900         (WebCore::AXObjectCache::postPlatformNotification): Deleted.
3901         * accessibility/ios/AXObjectCacheIOS.mm:
3902         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3903         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3904         * accessibility/mac/AXObjectCacheMac.mm:
3905         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
3906         (WebCore::AXPostNotificationWithUserInfo):
3907         (WebCore::AXObjectCache::postPlatformNotification):
3908         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3909         (WebCore::textReplacementChangeDictionary):
3910         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3911         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
3912         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3913         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
3914         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
3915         (arrayRemovingNonJSONTypes):
3916         (dictionaryRemovingNonJSONTypes):
3917         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
3918         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
3919         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3920         (textMarkerRangeFromVisiblePositions):
3921         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3922         * editing/AppendNodeCommand.cpp:
3923         (WebCore::AppendNodeCommand::AppendNodeCommand):
3924         (WebCore::sendAXTextChangedIgnoringLineBreaks):
3925         (WebCore::AppendNodeCommand::doApply):
3926         (WebCore::AppendNodeCommand::doUnapply):
3927         * editing/AppendNodeCommand.h:
3928         (WebCore::AppendNodeCommand::create):
3929         * editing/ApplyStyleCommand.cpp:
3930         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
3931         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
3932         * editing/ApplyStyleCommand.h:
3933         * editing/CompositeEditCommand.cpp:
3934         (WebCore::EditCommandComposition::unapplyEditType):
3935         (WebCore::CompositeEditCommand::CompositeEditCommand):
3936         (WebCore::CompositeEditCommand::apply):
3937         (WebCore::CompositeEditCommand::insertParagraphSeparator):
3938         (WebCore::CompositeEditCommand::insertNodeBefore):
3939         (WebCore::CompositeEditCommand::appendNode):
3940         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3941         (WebCore::CompositeEditCommand::insertTextIntoNode):
3942         (WebCore::CompositeEditCommand::deleteTextFromNode):
3943         (WebCore::CompositeEditCommand::replaceTextInNode):
3944         (WebCore::CompositeEditCommand::moveParagraphs):
3945         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3946         (WebCore::CompositeEditCommand::applyStyle): Deleted.
3947         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3948         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3949         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3950         (WebCore::CompositeEditCommand::inputText): Deleted.
3951         * editing/CompositeEditCommand.h:
3952         * editing/DeleteFromTextNodeCommand.cpp:
3953         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3954         (WebCore::DeleteFromTextNodeCommand::doApply):
3955         (WebCore::DeleteFromTextNodeCommand::doUnapply):
3956         * editing/DeleteFromTextNodeCommand.h:</