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