EventHandler::m_eventHandlerWillResetCapturingMouseEventsElement is incorrectly initi...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
2
3         EventHandler::m_eventHandlerWillResetCapturingMouseEventsElement is incorrectly initialized
4         https://bugs.webkit.org/show_bug.cgi?id=144583
5
6         Reviewed by Daniel Bates.
7
8         * page/EventHandler.cpp:
9         (WebCore::EventHandler::EventHandler): The
10         m_eventHandlerWillResetCapturingMouseEventsElement is a boolean,
11         so initialize it to false, instead of to nullptr.
12
13 2015-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
14
15         [CSS Grid Layout] grid-template-areas should accept none value
16         https://bugs.webkit.org/show_bug.cgi?id=144624
17
18         Reviewed by Darin Adler.
19
20         Default value for grid-template-areas property is "none":
21         http://dev.w3.org/csswg/css-grid/#propdef-grid-template-areas
22
23         Currently if you set the property to "none" from JavaScript, the value
24         doesn't get reseted and it keeps the old value.
25
26         Update fast/css-grid-layout/grid-template-areas-get-set.html adding a
27         new test case.
28
29         * css/CSSParser.cpp:
30         (WebCore::CSSParser::parseGridTemplateAreas): Add support to parse
31         "none" successfully.
32
33 2015-05-05  Zalan Bujtas  <zalan@apple.com>
34
35         Remove unused RenderLayerBacking::hasContentsLayer().
36         https://bugs.webkit.org/show_bug.cgi?id=144658
37
38         Reviewed by Simon Fraser.
39
40         No change in functionality.
41
42         * rendering/RenderLayerBacking.h:
43
44 2015-05-05  Alex Christensen  <achristensen@webkit.org>
45
46         [Content Extensions] Limit NFA size.
47         https://bugs.webkit.org/show_bug.cgi?id=144649
48
49         Reviewed by Benjamin Poulain.
50
51         * contentextensions/CombinedURLFilters.cpp:
52         (WebCore::ContentExtensions::generateNFAForSubtree):
53         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
54         Add a maximum NFA size to ensure that we do not use too much memory when compiling.
55         * contentextensions/ContentExtensionCompiler.cpp:
56         (WebCore::ContentExtensions::compileRuleList):
57         Remove debugging code that doesn't compile any more.
58
59 2015-05-05  Roger Fong  <roger_fong@apple.com>
60
61         Unreviewed. Some assertion failures in compositing code after r183820.
62         https://bugs.webkit.org/show_bug.cgi?id=144630.
63
64         * rendering/RenderLayerCompositor.cpp:
65         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
66
67 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
68
69         Add a layout mode for computing fixed layout size from a minimum size
70         https://bugs.webkit.org/show_bug.cgi?id=144610
71         <rdar://problem/19790341>
72
73         Reviewed by Simon Fraser.
74
75         * platform/spi/cocoa/QuartzCoreSPI.h:
76         Add some SPI.
77
78 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
79
80         iOS] Scroll snap points trigger reentrant layout
81         https://bugs.webkit.org/show_bug.cgi?id=144644
82         <rdar://problem/20366547>
83
84         Reviewed by Simon Fraser.
85
86         Covered by scroll-snap-mandatory.html test.
87
88         We had an iOS code path in 'appendChildSnapOffsets' that used offsetLeft and offsetTop. This code
89         was sometimes called during layout, which triggered a reentrant layout call, resulting in a debug
90         assertion.
91
92         * page/scrolling/AxisScrollSnapOffsets.cpp:
93         (WebCore::appendChildSnapOffsets): Remove iOS codepath.
94
95 2015-05-05  Roger Fong  <roger_fong@apple.com>
96
97         Blurry media control icons on non retina displays.
98         https://bugs.webkit.org/show_bug.cgi?id=144638.
99         <rdar://problem/20526166>
100
101         Reviewed by Dean Jackson.
102
103         * Modules/mediacontrols/mediaControlsApple.css:
104         Adjust fullscreen buttons so that they look good on both 1x and 2x displays.
105         (audio::-webkit-media-controls-fullscreen-button):
106         (audio::-webkit-media-controls-fullscreen-button.exit):
107         (audio::-webkit-media-controls-fullscreen-button:active):
108         (audio::-webkit-media-controls-panel button.exit:active):
109         Handle wireless playback picker button background in mediaControlsApple.js
110         (audio::-webkit-media-controls-wireless-playback-picker-button):
111         (audio::-webkit-media-controls-wireless-playback-picker-button.playing): Deleted.
112
113         * Modules/mediacontrols/mediaControlsApple.js:
114         Update wireless playback picker button based on display type.
115         (Controller.prototype.UIString):
116         (Controller.prototype.handleReadyStateChange):
117         (Controller.prototype.updateWirelessTargetPickerButton):
118         (Controller.prototype.updateWirelessPlaybackStatus):
119
120 2015-05-05  Joseph Pecoraro  <pecoraro@apple.com>
121
122         Web Inspector: Crash under WebCore::domWindowFromExecState reloading page with inspector open
123         https://bugs.webkit.org/show_bug.cgi?id=144636
124
125         Reviewed by Mark Lam.
126
127         This ensures we create an InjectedScript for the execution context
128         (frame) preventing the global object / exec state from getting garbage
129         collected before we remove it from our map.
130
131         * inspector/PageRuntimeAgent.cpp:
132         (WebCore::PageRuntimeAgent::notifyContextCreated):
133
134 2015-05-05  Dean Jackson  <dino@apple.com>
135
136         [iOS] AirPlay placeholder in inline videos uses Helvetica or Times, should be system font
137         https://bugs.webkit.org/show_bug.cgi?id=144643
138
139         Reviewed by Brent Fulgham.
140
141         The Airplay placard should use "-apple-system" as a font-family.
142
143         * Modules/mediacontrols/mediaControlsiOS.css:
144         (audio::-webkit-media-controls-wireless-playback-status):
145
146 2015-05-05  Zalan Bujtas  <zalan@apple.com>
147
148         Navigating to www.apple.com hits assertion in WebCore::TextIteratorCopyableText::set()
149         https://bugs.webkit.org/show_bug.cgi?id=144629
150         rdar://problem/20689877
151
152         Reviewed by Andreas Kling.
153
154         This patch ensures that we don't emit empty text for the text iterator.
155         In TextIterator::handleTextNode before emitting a string, certain characters (\n \t) need to
156         be replaced with space. When such character is found, we emit the string we've processed so far and
157         handle the replacement during the next callback.
158         When the first character in the string needs replacing, there's nothing to emit. However if we don't
159         handle at least one character, TextIterator::advance believes that processing is done and never calls  
160         TextIterator::handleTextNode back with the rest of the string. 
161
162         Test: fast/text/simple-line-layout-innerText-with-newline.html
163
164         * editing/TextIterator.cpp:
165         (WebCore::isNewLineOrTabCharacter):
166         (WebCore::TextIterator::handleTextNode):
167
168 2015-05-05  Alex Christensen  <achristensen@webkit.org>
169
170         [Content Extensions] Use less memory to store the json input.
171         https://bugs.webkit.org/show_bug.cgi?id=144604
172
173         Reviewed by Benjamin Poulain.
174
175         * contentextensions/ContentExtensionCompiler.cpp:
176         (WebCore::ContentExtensions::compileRuleList):
177         * contentextensions/ContentExtensionCompiler.h:
178         (WebCore::ContentExtensions::loadEncodedRules):
179         Don't copy strings as much or keep them alive after done using them.
180
181 2015-05-05  Eric Carlson  <eric.carlson@apple.com>
182
183         Prevent recursive calls to show target picker menu.
184         https://bugs.webkit.org/show_bug.cgi?id=144637
185         <rdar://problem/20824726>
186
187         Reviewed by Jer Noble.
188
189         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Add m_showingMenu.
190         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
191         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Do nothing if the menu
192         is already showing.
193
194 2015-05-05  Dean Jackson  <dino@apple.com>
195
196         Use system blue for Airplay Glyph
197         https://bugs.webkit.org/show_bug.cgi?id=144614
198
199         There was a typo in the last commit.
200
201         * Modules/mediacontrols/mediaControlsiOS.css:
202         (audio::-webkit-media-controls-optimized-fullscreen-button): Transition duration should be 250ms.
203
204 2015-05-04  Dean Jackson  <dino@apple.com>
205
206         [iOS] Use system blue for Airplay Glyph
207         https://bugs.webkit.org/show_bug.cgi?id=144614
208
209         Reviewed by Eric Carlson.
210
211         Revert to using masks for the glyphs in the media controls,
212         which allows us to:
213         - use the system blue color when Airplay is active <rdar://problem/20245297>
214         - fade out from the active state <rdar://problem/20245487>
215         - allow the play button to give touch feedback <rdar://problem/17849930>
216
217         While those are three separate bugs, they all get addressed by
218         this single change.
219
220         * Modules/mediacontrols/mediaControlsiOS.css:
221         (audio::-webkit-media-controls-optimized-fullscreen-button):
222         (audio::-webkit-media-controls-optimized-fullscreen-button:active):
223         (video::-webkit-media-controls-play-button):
224         (video::-webkit-media-controls-play-button.paused):
225         (video::-webkit-media-controls-fullscreen-button):
226         (video::-webkit-media-controls-wireless-playback-picker-button):
227         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
228         (video::-webkit-media-controls-optimized-fullscreen-button):
229         (video::-webkit-media-controls-play-button:active): Deleted.
230         (video::-webkit-media-controls-play-button.paused:active): Deleted.
231         (video::-webkit-media-controls-fullscreen-button:active): Deleted.
232         (video::-webkit-media-controls-wireless-playback-picker-button:active): Deleted.
233
234 2015-05-05  Eric Carlson  <eric.carlson@apple.com>
235
236         Only autoplay videos should not automatically play to playback target
237         https://bugs.webkit.org/show_bug.cgi?id=144633
238
239         Reviewed by Jer Noble.
240
241         * html/HTMLMediaElement.cpp:
242         (WebCore::HTMLMediaElement::HTMLMediaElement): Set RequireUserGestureToAutoplayToExternalDevice.
243         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Remove
244         RequireUserGestureToAutoplayToExternalDevice.
245         (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate if playback
246         was started from a user gesture, even if the video loops and/or doesn't have audio.
247
248         * html/HTMLMediaSession.h: Define RequireUserGestureToAutoplayToExternalDevice.
249         (WebCore::HTMLMediaSession::hasBehaviorRestriction): New.
250
251 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
252
253         Unreviewed logging fix.
254
255         * page/WheelEventTestTrigger.cpp:
256         (WebCore::WheelEventTestTrigger::triggerTestTimerFired): Fix typo in logging channel.
257
258 2015-05-04  Roger Fong  <roger_fong@apple.com>
259
260         Media control volume slider is opaque.
261         https://bugs.webkit.org/show_bug.cgi?id=144470.
262         <rdar://problem/20770350>
263
264         Rubberstamped by Simon Fraser.
265
266         * Modules/mediacontrols/mediaControlsApple.css:
267         (audio::-webkit-media-controls-panel): 
268         Don't create a stacking context just for the controls.
269         Doing so causes the mix-blend-mode on the volume box to fail.
270
271 2015-05-05  Alex Christensen  <achristensen@webkit.org>
272
273         [Content Extensions] Combine NFAs properly and free memory as we compile.
274         https://bugs.webkit.org/show_bug.cgi?id=144485
275
276         Reviewed by Benjamin Poulain.
277
278         This patch correctly combines all regular expressions with a common prefix up to
279         the last quantified term into the same NFA.  It also deletes the prefix tree as it 
280         creates NFAs, thus reducing the maximum memory used when compiling.
281
282         * contentextensions/CombinedURLFilters.cpp:
283         (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
284         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
285         (WebCore::ContentExtensions::generateNFAForSubtree):
286         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
287         (WebCore::ContentExtensions::CombinedURLFilters::clear): Deleted.
288         * contentextensions/CombinedURLFilters.h:
289         * contentextensions/ContentExtensionCompiler.cpp:
290         (WebCore::ContentExtensions::compileRuleList):
291         * contentextensions/ContentExtensionsDebugging.h:
292
293 2015-05-04  Alex Christensen  <achristensen@webkit.org>
294
295         [Content Extensions] Use less memory when writing byte code to file
296         https://bugs.webkit.org/show_bug.cgi?id=144602
297
298         Reviewed by Darin Adler.
299
300         * contentextensions/ContentExtensionCompiler.cpp:
301         (WebCore::ContentExtensions::compileRuleList):
302         * contentextensions/ContentExtensionCompiler.h:
303         Compile one DFA at a time so we don't need to keep all the bytecode in memory at the same time.
304         * contentextensions/DFABytecodeInterpreter.cpp:
305         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
306         Jumps are now relative to the current DFA because we don't know about other DFAs that
307         have been compiling when linking the DFA bytecode.  This will also make the DFA bytecode
308         easier to minimize because more of the values are small in the DFAs after the first DFA.
309         * platform/FileSystem.h:
310
311 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
312
313         Unreviewed, speculative WinCairo buildfix after r183807.
314
315         * WebCore.vcxproj/WebCore.vcxproj:
316         * WebCore.vcxproj/WebCore.vcxproj.filters:
317
318 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
319
320         Remove TextureMapperImageBuffer
321         https://bugs.webkit.org/show_bug.cgi?id=143561
322
323         Reviewed by Žan Doberšek.
324
325         * CMakeLists.txt:
326         * PlatformEfl.cmake:
327         * PlatformGTK.cmake:
328         * PlatformWinCairo.cmake:
329         * platform/graphics/GraphicsContext3DPrivate.cpp:
330         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
331         * platform/graphics/cairo/ImageBufferCairo.cpp:
332         (WebCore::ImageBufferData::paintToTextureMapper):
333         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
334         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
335         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Removed.
336         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Removed.
337         * platform/graphics/texmap/BitmapTexturePool.cpp:
338         (WebCore::BitmapTexturePool::createTexture):
339         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
340         (WebCore::GraphicsLayerTextureMapper::setFilters):
341         * platform/graphics/texmap/TextureMapper.cpp:
342         (WebCore::TextureMapper::create):
343         (WebCore::TextureMapper::TextureMapper):
344         * platform/graphics/texmap/TextureMapper.h:
345         (WebCore::TextureMapper::accelerationMode): Deleted.
346         * platform/graphics/texmap/TextureMapperGL.cpp:
347         (WebCore::TextureMapperGL::TextureMapperGL):
348         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Removed.
349         * platform/graphics/texmap/TextureMapperImageBuffer.h: Removed.
350         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
351         (WebCore::CompositingCoordinator::CompositingCoordinator):
352         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
353         (WebCore::GraphicsLayer::supportsContentsTiling):
354         (WebCore::CoordinatedGraphicsLayer::setShouldSupportContentsTiling): Deleted.
355         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
356
357 2015-05-05  Javier Fernandez  <jfernandez@igalia.com>
358
359         [CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
360         https://bugs.webkit.org/show_bug.cgi?id=144443
361
362         Reviewed by Darin Adler.
363
364         Upgrade the align-content property to the last CSS3 Box
365         Alignment specification. As it uses a different enumeration for
366         Positional and Distribution alignment, it implies some changes in
367         the FlexibleBox implementation.
368
369         Test: css3/parse-align-content.html
370
371         * css/CSSComputedStyleDeclaration.cpp:
372         (WebCore::resolveContentAlignmentAuto):
373         (WebCore::ComputedStyleExtractor::propertyValue):
374         * css/CSSParser.cpp:
375         (WebCore::isValidKeywordPropertyAndValue):
376         (WebCore::isKeywordPropertyID):
377         (WebCore::CSSParser::parseValue):
378         * css/CSSPropertyNames.in:
379         * rendering/RenderFlexibleBox.cpp:
380         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
381         (WebCore::RenderFlexibleBox::layoutColumnReverse):
382         (WebCore::initialAlignContentOffset):
383         (WebCore::alignContentSpaceBetweenChildren):
384         (WebCore::RenderFlexibleBox::alignFlexLines):
385         * rendering/style/RenderStyle.cpp:
386         (WebCore::RenderStyle::resolveContentAlignment):
387         (WebCore::RenderStyle::resolveContentJustification):
388         * rendering/style/RenderStyle.h:
389         * rendering/style/StyleRareNonInheritedData.cpp:
390         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
391         (WebCore::StyleRareNonInheritedData::operator==):
392         * rendering/style/StyleRareNonInheritedData.h:
393
394 2015-05-05  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
395
396         streams/readable-stream.html is very flaky
397         https://bugs.webkit.org/show_bug.cgi?id=144455
398
399         Reviewed by Darin Adler.
400
401         Changed the link between readadable stream and controller.
402         Controller ref()/deref() now increments/decrements its stream ref counter.
403         This ensures that even if JS scripts do not keep track of the readable stream,
404         the readable stream will not be disposed as long as the JS script has access to its controller.
405
406         Test: streams/readable-stream-gc.html
407
408         * Modules/streams/ReadableStreamController.h:
409         (WebCore::ReadableStreamController::ReadableStreamController):
410         (WebCore::ReadableStreamController::ref):
411         (WebCore::ReadableStreamController::deref):
412         (WebCore::ReadableStreamController::create): Deleted.
413         (WebCore::ReadableStreamController::stream): Deleted.
414         * bindings/js/JSReadableStreamControllerCustom.cpp:
415         (WebCore::JSReadableStreamController::close):
416         (WebCore::JSReadableStreamController::enqueue):
417         (WebCore::JSReadableStreamController::error):
418         * bindings/js/ReadableStreamJSSource.cpp:
419         (WebCore::ReadableStreamJSSource::~ReadableStreamJSSource):
420         (WebCore::ReadableStreamJSSource::start):
421         (WebCore::ReadableJSStream::jsController):
422         * bindings/js/ReadableStreamJSSource.h:
423
424 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
425
426         Small cleanup in RenderText::computePreferredLogicalWidths()
427         https://bugs.webkit.org/show_bug.cgi?id=144615
428
429         Reviewed by Simon Fraser.
430
431         A little bit of cleanup before I tackle dependent widths in this function.
432
433         No new tests because there is no behavior change.
434
435         * rendering/RenderText.cpp:
436         (WebCore::RenderText::computePreferredLogicalWidths):
437
438 2015-05-05  Joanmarie Diggs  <jdiggs@igalia.com>
439
440         [ATK] AX: figure out platform difference for ATK to make accessibility/table-cell-display-block.html work
441         https://bugs.webkit.org/show_bug.cgi?id=143083
442
443         Reviewed by Chris Fleizach.
444
445         The main platform difference was that ATK was mapping the td element to
446         the accessible table cell, and the render block resulting from the style
447         wound up being the cell parent. In contrast, AX API was mapping the cell
448         element to an AXGroup which was a child of the AXCell. Rather than try to
449         bend yet another case to the will of our individual platforms' table needs,
450         it made more sense to clean up the code that is competing and move toward
451         more platform-unified handling. This is the first step in that direction,
452         with ATK moving closer toward the WebCore/AX API mapping.
453
454         No new tests. Instead, modified and fixed the test which was being skipped
455         for GTK, and also updated the expectations of some Mac tests whose FIXMEs
456         should now be fixed.
457
458         * accessibility/AccessibilityNodeObject.cpp:
459         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
460         * accessibility/AccessibilityRenderObject.cpp:
461         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
462         * accessibility/AccessibilityTable.cpp:
463         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
464         * accessibility/AccessibilityTableCell.cpp:
465         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
466         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
467         (createAccessibilityRoleMap):
468
469 2015-05-04  Jer Noble  <jer.noble@apple.com>
470
471         [iOS] Videos on apple.com flash when touching to show or hide the controls
472         https://bugs.webkit.org/show_bug.cgi?id=144598
473
474         Reviewed by Eric Carlson.
475
476         The apple.com site will add a "selection" rectangle atop a playing video when it recieves a touchstart
477         event. The default media controls use touchstart to signal the controls to become visible. Stop the touch
478         from propagating down to the page in this case.
479
480         * Modules/mediacontrols/mediaControlsiOS.js:
481         (ControllerIOS.prototype.handleWrapperTouchStart):
482
483 2015-05-04  Andreas Kling  <akling@apple.com>
484
485         Record the reference time when Performance is constructed.
486         <https://webkit.org/b/144616>
487
488         Reviewed by Geoffrey Garen.
489
490         This is a merge of Blink's r156613 by simonjam@chromium.org.
491
492         Cache a copy of the DocumentLoader's reference timestamp when constructing
493         the Performance object. That way we don't have to jump through a bunch of scary
494         hoops to access it when now() is called later on.
495
496         * page/Performance.cpp:
497         (WebCore::Performance::Performance):
498         (WebCore::Performance::now): Deleted.
499         * page/Performance.h:
500
501 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
502
503         Fix assertions in WK1 tests after r183777.
504         
505         Two issues with the original change:
506         
507         If not in compositing mode, we shouldn't schedule layer flushes, since
508         Document::documentWillSuspendForPageCache() only only calls cancelCompositingLayerUpdate()
509         if in compositing mode.
510         
511         Second, RenderLayerCompositor::rootBackgroundTransparencyChanged() never stored the
512         new color, resulting in too many triggered compositing updates.
513
514         * rendering/RenderLayerCompositor.cpp:
515         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
516
517 2015-05-04  Zalan Bujtas  <zalan@apple.com>
518
519         RenderWidget::setWidgetGeometry() can end up destroying *this*.
520         https://bugs.webkit.org/show_bug.cgi?id=144601
521
522         Reviewed by Andreas Kling.
523
524         This is a speculative fix to ensure we don't crash on an invalid *this* renderer
525         while flattening the current iframe.
526         Calling RenderWidget::setWidgetGeometry() can result in destroying the current renderer.
527         While it is not a issue in case of normal layout flow as widget positions are updated at post layout,
528         frame flattening initiates this action in the middle of layout.
529         This patch re-introduces refcount model for RenderWidgets so that the renderer is protected during layout
530         when frame flattening is in use.
531
532         * rendering/RenderFrameBase.cpp:
533         (WebCore::RenderFrameBase::layoutWithFlattening): Let's be paranoid about child view.
534         * rendering/RenderObject.cpp:
535         (WebCore::RenderObject::destroy):
536         * rendering/FrameView.cpp:
537         (WebCore::FrameView::layout):
538         * rendering/RenderView.h:
539         * rendering/RenderWidget.cpp:
540         (WebCore::RenderWidget::~RenderWidget):
541         * rendering/RenderWidget.h:
542         (WebCore::RenderWidget::ref):
543         (WebCore::RenderWidget::deref):
544
545 2015-05-04  Doug Russell  <d_russell@apple.com>
546
547         AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
548         https://bugs.webkit.org/show_bug.cgi?id=144489
549
550         Reviewed by Chris Fleizach.
551
552         Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
553         on the returned control.
554         Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
555         Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
556         Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
557         Add support for setSelectedVisibleTextRange() in accessibility tests.
558
559         Test: platform/mac/accessibility/selection-sync.html
560
561         * accessibility/AXObjectCache.cpp:
562         (WebCore::AXObjectCache::showIntent):
563         (WebCore::AXObjectCache::setTextSelectionIntent):
564         (WebCore::AXObjectCache::setIsSynchronizingSelection):
565         (WebCore::AXObjectCache::postTextStateChangeNotification):
566         * accessibility/AXObjectCache.h:
567         * accessibility/AXTextStateChangeIntent.h:
568         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
569         * accessibility/AccessibilityRenderObject.cpp:
570         (WebCore::setTextSelectionIntent):
571         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
572         (WebCore::AccessibilityRenderObject::setFocused):
573         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
574         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): Deleted.
575         * accessibility/mac/AXObjectCacheMac.mm:
576         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
577
578 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
579
580         [Mac] Audio-only files should not have a device picker
581         https://bugs.webkit.org/show_bug.cgi?id=144606
582         <rdar://problem/20806387>
583
584         Reviewed by Dean Jackson.
585
586         * Modules/mediacontrols/mediaControlsApple.js:
587         (Controller.prototype.hasVideo): New.
588         (Controller.prototype.updateFullscreenButtons): Use hasVideo.
589         (Controller.prototype.updateHasVideo): Ditto.
590         (Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
591         unless a file has video.
592
593 2015-05-04  Chris Dumez  <cdumez@apple.com>
594
595         Crash at com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::createWindow + 185
596         https://bugs.webkit.org/show_bug.cgi?id=144597
597         <rdar://problem/20361579>
598
599         Reviewed by Andreas Kling.
600
601         Test: fast/dom/Window/window-open-activeWindow-null-frame.html
602
603         In our implementation of window.open(), we make sure that the window
604         which window.open() is called has a frame. However, we did not have the
605         same check for the activeDOMWindow (i.e. the lexicalGlobalObject) causing
606         us to crash in WebCore::createWindow() when dereferencing it.
607
608         This patch updates WebCore::createWindow() takes a reference to the
609         openerFrame instead of a pointer to make it clear the implementation
610         expects it to be non-null. A null check is then added for the frame
611         at the call site: DOMWindow::createWindow().
612
613         * inspector/InspectorFrontendClientLocal.cpp:
614         (WebCore::InspectorFrontendClientLocal::openInNewTab):
615         * loader/FrameLoader.cpp:
616         (WebCore::isDocumentSandboxed):
617         (WebCore::FrameLoader::submitForm):
618         (WebCore::createWindow):
619         Take a reference to openerFrame instead of a pointer as the
620         implementation expects it to be non-null.
621
622         * loader/FrameLoader.h:
623         * page/DOMWindow.cpp:
624         (WebCore::DOMWindow::createWindow):
625         Add null check for activeFrame before passing it to
626         WebCore::createWindow().
627
628 2015-05-04  Dean Jackson  <dino@apple.com>
629
630         Create a named CSS property for system colors
631         https://bugs.webkit.org/show_bug.cgi?id=144423
632
633         Follow-up comments from Darin Adler.
634
635         * rendering/RenderThemeIOS.h: Cache a Color rather than an RGBA32.
636         * rendering/RenderThemeIOS.mm:
637         (WebCore::RenderThemeIOS::systemColor): Use "add" to avoid multiple hits on the HashMap, and
638         cache invalid responses so that we don't have to keep looking for non-existent colors.
639         * rendering/RenderThemeMac.h: Same as iOS.
640         * rendering/RenderThemeMac.mm:
641         (WebCore::RenderThemeMac::systemColor):
642
643 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
644
645         display:none iframes cause repeated compositing flushing
646         https://bugs.webkit.org/show_bug.cgi?id=144529
647
648         Reviewed by Darin Adler.
649         
650         FrameView::updateLayoutAndStyleIfNeededRecursive() only forces layout on rendered
651         frames, by virtue of using its Widget children which are FrameViews.
652         
653         However, FrameView::flushCompositingStateIncludingSubframes() iterated over
654         all frames, and return false if any subframe needed layout. Thus, if it saw
655         non-rendered frames (which are never laid out), it would return false,
656         which causes the CFRunLoopObserver that drives flushing to run again.
657         
658         Fix by having FrameView::flushCompositingStateIncludingSubframes() only check
659         rendered frames, using FrameTree::traverseNextRendered() (which needs to be public).
660         
661         Also change FrameView::needsStyleRecalcOrLayout() and FrameView::updateLayoutAndStyleIfNeededRecursive()
662         to fetch the list of FrameViews using FrameTree's nextRenderedSibling(), rather than using
663         the Widget tree, since we'd like to eventually remove Widgets, and using the Frame
664         tree matches flushCompositingStateIncludingSubframes() and other code.
665
666         Test: compositing/iframes/display-none-subframe.html
667
668         * page/FrameTree.h:
669         * page/FrameView.cpp:
670         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
671         (WebCore::FrameView::needsStyleRecalcOrLayout):
672         (WebCore::FrameView::renderedChildFrameViews): Helper that returns a vector
673         of Ref<FrameView>s for rendered frames only.
674         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
675         * page/FrameView.h:
676
677 2015-05-04  Chris Dumez  <cdumez@apple.com>
678
679         Unreviewed. Fix build with SECURITY_ASSERTIONS enabled.
680         <rdar://problem/20653104>
681
682         * dom/ScriptExecutionContext.cpp:
683         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
684         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache):
685         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
686         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
687         * dom/ScriptExecutionContext.h:
688
689 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
690
691         Fix updating of tiled backing opaquenss when the page background color changes
692         https://bugs.webkit.org/show_bug.cgi?id=144600
693         rdar://problem/20723035
694
695         Reviewed by Tim Horton.
696
697         RenderLayerCompositor makes the page tiles opaque or not based on the result of
698         viewHasTransparentBackground(), which consults the view transparency, and
699         FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based
700         on the root and/or body background colors.
701
702         We thus need to re-evaluate whether page tiles are opaque when any of these inputs
703         change, but were failing to do so for the FrameView's baseBackgroundColor, and
704         the page root background color.
705         
706         Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange()
707         (for the root) trigger a compositing update when necessary.
708
709         Added setViewBaseBackgroundColor() on Internals for testing.
710
711         Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html
712
713         * page/FrameView.cpp:
714         (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper.
715         (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the 
716         frame's document, and trigger a compositing update check if the alpha changed.
717         (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if
718         this FrameView is associated with the Document being displayed in the FrameView's
719         Frame. This returns false when we're setting up a new FrameView (its Frame still
720         points to the old document, so renderView() returns the RenderView for the Frame's
721         existing Document).
722         * page/FrameView.h:
723         * rendering/RenderBox.cpp:
724         (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs
725         to do an update.
726         * rendering/RenderLayerCompositor.cpp:
727         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result
728         of documentBackgroundColor() changed in alpha since the last time, trigger a compositing
729         update.
730         * rendering/RenderLayerCompositor.h:
731         * testing/Internals.cpp:
732         (WebCore::Internals::setViewBaseBackgroundColor):
733         * testing/Internals.h:
734         * testing/Internals.idl:
735
736 2015-05-04  Jer Noble  <jer.noble@apple.com>
737
738         [iOS] Crash in -[WebCALayerHostWrapper resolveBounds]
739         https://bugs.webkit.org/show_bug.cgi?id=144595
740
741         Reviewed by Eric Carlson.
742
743         It is possible for a WebCALayorHostWrapper to outlive the WebVideoFullscreenModel to which it refers,
744         since the model pointer is bare, rather than a RefPtr. The reference to the model must be invalidated
745         before the model is destroyed.
746
747         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
748         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
749
750 2015-05-04  Ryosuke Niwa  <rniwa@webkit.org>
751
752         Toggling underline or strike through affects each other
753         https://bugs.webkit.org/show_bug.cgi?id=27818
754
755         Reviewed by Darin Adler.
756
757         This patch introduces a new mechanism to apply and remove text decorations. This is necessary because text
758         decorations are always additive and we can't differentiate whether we're adding or removing a text decoration.
759         Conceptually, we need four values for text decorations: adding underline, removing underline, adding
760         line-through, and removing line-through but we have only three: underline, line-through, none.
761
762         After this patch, there are three mechanism by which text decorations states are kept tracked. While applying
763         or removing text decorations, we use newly added m_underlineChange and m_strikeThroughChange in EditingStyle.
764         For the typing style, we use -webkit-text-decorations-in-effect to store the state since we need to preserve
765         every type of text decorations such as overline in addition to underline and line-through. Once applied, all
766         text decorations should be expressed in terms of the standard text-decoration property.
767
768         Test: editing/execCommand/toggle-mixed-text-decorations.html
769
770         * editing/ApplyStyleCommand.cpp:
771         (WebCore::ApplyStyleCommand::applyBlockStyle):
772         (WebCore::ApplyStyleCommand::removeCSSStyle): conflictsWithInlineStyleOfElement now creates a new inline style
773         instead of a list of properties to remove.
774         (WebCore::ApplyStyleCommand::addBlockStyle):
775         (WebCore::ApplyStyleCommand::applyInlineStyleChange): Merge inline styles instead of adding as string.
776         Otherwise it would generate style content attribute with multiple text-decoration properties.
777
778         * editing/EditingStyle.cpp:
779         (WebCore::HTMLElementEquivalent::matches):
780         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Takes an EditingStyle instead of StyleProperties.
781         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
782         (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent): 
783         (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Respect newly added m_strikeThroughChange and
784         m_underlineChange in EditingStyle.
785         (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Ditto.
786         (WebCore::HTMLTextDecorationEquivalent::changeInStyle): Added. Retrieves the change enum for the associated
787         type of text-decoration (underline or strike through).
788         (WebCore::HTMLAttributeEquivalent::matches):
789         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
790         (WebCore::EditingStyle::EditingStyle): Initialize m_underlineChange and m_strikeThroughChange. Also use the
791         delegating constructor elsewhere. Also added the missing call to extractFontSizeDelta() in the variant that
792         takes CSSPropertyID and String, and added a variant that takes CSSPropertyID and CSSValueID.
793         (WebCore::EditingStyle::isEmpty): Return false when m_underlineChange and m_strikeThroughChange are not "none".
794         (WebCore::applyTextDecorationChangeToValueList): Added.
795         (WebCore::EditingStyle::overrideTypingStyleAt): Added. Used by Editor::computeAndSetTypingStyle to set a new
796         typing style. Resolve m_underlineChange and m_strikeThroughChange into -webkit-text-decorations-in-effect.
797         (WebCore::EditingStyle::clear): Clear m_underlineChange and m_strikeThroughChange.
798         (WebCore::EditingStyle::copy): Copy m_underlineChange and m_strikeThroughChange.
799         (WebCore::textDecorationValueList): Added.
800         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Now takes a pointer to MutableStyleProperties
801         instead of a vector. This was necessary we can't simply remove text-decoration property in ApplyStyleCommand's
802         removeCSSStyle as that would result in unrelated text decorations also getting removed. Also added the code
803         for m_underlineChange and m_strikeThroughChange. Only removing text decoration changes can cause a conflict
804         since text decorations are always additive.
805         (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Check isEmpty() instead of the nullity of
806         m_mutableStyle to respect m_underlineChange and m_strikeThroughChange.
807         (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
808         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
809         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): Respect the values of m_underlineChange and
810         m_strikeThroughChange. Here, the style is considered present if it has text decorations that are being added.
811         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
812         (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Takes EditingStyle instead of StyleProperties to
813         respect m_underlineChange and m_strikeThroughChange.
814         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
815         (WebCore::mergeTextDecorationValues):
816         (WebCore::EditingStyle::mergeStyle): Make a copy of CSSValueList before modifying it since CSSValueList's are
817         shared with other immutable StyleProperties.
818         (WebCore::StyleChange::StyleChange): Set m_applyUnderline, m_applyLineThrough, and m_cssStyle if either
819         m_underlineChange or m_strikeThroughChange are TextDecorationChange::Add in EditingStyle if the current position
820         doesn't already have the matching style.
821         (WebCore::StyleChange::operator==): Moved from the header file. Also added the logic to compare m_cssStyle now
822         that it's a StyleProperties instead of String.
823
824         * editing/EditingStyle.h: Added TextDecorationChange.
825         (WebCore::EditingStyle::create): Added a variant that takes CSSPropertyID and CSSValueID.
826         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
827         (WebCore::EditingStyle::setUnderlineChange): Added.
828         (WebCore::EditingStyle::underlineChange): Added.
829         (WebCore::EditingStyle::setStrikeThroughChange): Added.
830         (WebCore::EditingStyle::strikeThroughChange): Added.
831         (WebCore::StyleChange::cssStyle): Now returns StyleProperties* instead of String so that ApplyStyleCommand's
832         applyInlineStyleChange could merge inline styles instead of just appending it to the end.
833         (WebCore::StyleChange::operator==): Moved into the cpp file.
834
835         * editing/Editor.cpp:
836         (WebCore::Editor::applyStyle): Added. This variant takes EditingStyle instead of StyleProperties.
837         (WebCore::Editor::applyStyleToSelection): Ditto.
838         (WebCore::Editor::computeAndSetTypingStyle): Added a variant for EditingStyle. Also use overrideTypingStyleAt
839         to set -webkit-text-decorations-in-effect based on m_underlineChange and m_strikeThroughChange 
840
841         * editing/Editor.h:
842         * editing/EditorCommand.cpp:
843         (WebCore::applyCommandToFrame):
844         (WebCore::isStylePresent): Extracted from executeToggleStyle.
845         (WebCore::executeApplyStyle):
846         (WebCore::executeToggleStyle):
847         (WebCore::executeToggleStyleInList): Deleted.
848         (WebCore::textDecorationChangeForToggling): Added. Used in executeStrikethrough and executeUnderline.
849         (WebCore::executeStrikethrough):
850         (WebCore::executeUnderline):
851
852 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
853
854         [Mac] Fix build breakage caused by API deprecation
855         https://bugs.webkit.org/show_bug.cgi?id=144593
856
857         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
858         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Suppress warnings.
859
860 2015-05-04  Chris Dumez  <cdumez@apple.com>
861
862         REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-right property
863         https://bugs.webkit.org/show_bug.cgi?id=144584
864         <rdar://problem/20796829>
865
866         Reviewed by Darin Adler.
867
868         The CSS parser was rejecting calculated values at parsing time if it
869         considered the value was negative and the CSS property did not allow
870         negative values. However, doing so at this point will not always work
871         because we don't necessarily know the font-size yet (for e.g. for
872         calc(0.5em - 2px). Also, rejecting negative calculated values is not
873         the right behavior as the the specification. The specification says
874         we should clamp:
875         http://dev.w3.org/csswg/css-values-3/#calc-range
876
877         This patch updates validateCalculationUnit() to stop marking the value
878         as invalid if it is negative. Instead, let the CSSCalcValue's permitted
879         range clamp the value as needed.
880
881         This bug was causing the bottom graphic on aldentrio.com to not be
882         rendered properly.
883
884         Test: fast/css/negative-calc-values.html
885               fast/css/padding-calc-value.html
886
887         * css/CSSParser.cpp:
888         (WebCore::CSSParser::validateCalculationUnit):
889
890 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
891
892         [Mac] Show wireless playback placard even when an element has custom controls
893         https://bugs.webkit.org/show_bug.cgi?id=144548
894
895         Reviewed by Brent Fulgham.
896
897         * Modules/mediacontrols/mediaControlsApple.js:
898         (Controller.prototype.shouldHaveAnyUI): Return true when playing to wireless target.
899         (Controller.prototype.reconnectControls): Add controls when playing to wireless target.
900         (Controller.prototype.setPlaying): Return early when there is no 'controls' attribute.
901         (Controller.prototype.showControls): Ditto.
902         (Controller.prototype.updateWirelessPlaybackStatus): Call updateBase when playing to wireless
903         target to ensure that controls have been set up.
904         (Controller.prototype.handleWirelessPlaybackChange): Call reconnectControls when playing
905         to wireless target when there is no 'controls' attribute.
906         (Controller.prototype.showInlinePlaybackPlaceholderOnly): New.
907
908         * html/HTMLMediaElement.cpp:
909         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Call configureMediaControls.
910         (WebCore::HTMLMediaElement::configureMediaControls): Require controls when playing
911         to wireless target.
912         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Remove some unhelpful, noisy, logging.
913
914 2015-05-04  Dan Bernstein  <mitz@apple.com>
915
916         Fixed the build.
917
918         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
919         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Moved off of a deprecated
920         method to a non-deprecated equivalent.
921
922 2015-05-04  Javier Fernandez  <jfernandez@igalia.com>
923
924         [CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
925         https://bugs.webkit.org/show_bug.cgi?id=144442
926
927         Reviewed by David Hyatt.
928
929         Upgrade the justify-content property to the last CSS3 Box
930         Alignment specification. It defines a different enumeration for
931         Positional and Distribution alignment, which requires changes in
932         the FlexibleBox implementation.
933
934         A new parsing function has been implemented to replace the basic
935         keyword IDs validation. Because of the complexity of the new
936         values, a new CSSPrimitiveValue derived class has been defined
937         which simplifies considerably the parsing logic.
938
939         We will follow the same approach than for Self Alignment, defining
940         a single class to hold all the related alignment data. This makes
941         possible to use a StyleBuilderConverter function instead of custom
942         builder functions for these properties.
943
944         Test: css3/parse-justify-content.html
945
946         * CMakeLists.txt:
947         * WebCore.xcodeproj/project.pbxproj:
948         * css/CSSComputedStyleDeclaration.cpp:
949         (WebCore::resolveContentAlignmentAuto):
950         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
951         (WebCore::ComputedStyleExtractor::propertyValue):
952         (WebCore::valueForItemPositionWithOverflowAlignment): Deleted.
953         * css/CSSContentDistributionValue.cpp: Added.
954         (WebCore::CSSContentDistributionValue::CSSContentDistributionValue):
955         (WebCore::CSSContentDistributionValue::~CSSContentDistributionValue):
956         (WebCore::CSSContentDistributionValue::customCSSText):
957         (WebCore::CSSContentDistributionValue::equals):
958         * css/CSSContentDistributionValue.h: Added.
959         (WebCore::CSSContentDistributionValue::create):
960         (WebCore::CSSContentDistributionValue::distribution):
961         (WebCore::CSSContentDistributionValue::position):
962         (WebCore::CSSContentDistributionValue::overflow):
963         * css/CSSParser.cpp:
964         (WebCore::isValidKeywordPropertyAndValue):
965         (WebCore::isKeywordPropertyID):
966         (WebCore::CSSParser::parseValue):
967         (WebCore::isContentDistributionKeyword):
968         (WebCore::isContentPositionKeyword):
969         (WebCore::isAlignmentOverflowKeyword):
970         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
971         (WebCore::CSSParser::parseItemPositionOverflowPosition):
972         (WebCore::CSSParser::parseLegacyPosition): Deleted.
973         * css/CSSParser.h:
974         * css/CSSPrimitiveValueMappings.h:
975         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
976         (WebCore::CSSPrimitiveValue::operator ContentPosition):
977         (WebCore::CSSPrimitiveValue::operator ContentDistributionType):
978         (WebCore::CSSPrimitiveValue::operator EFlexDirection): Deleted.
979         * css/CSSPropertyNames.in:
980         * css/CSSValue.cpp:
981         (WebCore::CSSValue::equals):
982         (WebCore::CSSValue::cssText):
983         (WebCore::CSSValue::destroy):
984         * css/CSSValue.h:
985         (WebCore::CSSValue::isContentDistributionValue):
986         (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted.
987         * css/CSSValueKeywords.in:
988         * css/StyleBuilderConverter.h:
989         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
990         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): Deleted.
991         * rendering/RenderFlexibleBox.cpp:
992         (WebCore::initialJustifyContentOffset):
993         (WebCore::justifyContentSpaceBetweenChildren):
994         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
995         (WebCore::RenderFlexibleBox::layoutColumnReverse):
996         * rendering/RenderFullScreen.cpp:
997         (WebCore::createFullScreenStyle):
998         * rendering/mathml/RenderMathMLScripts.cpp:
999         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
1000         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
1001         * rendering/style/RenderStyle.h:
1002         * rendering/style/RenderStyleConstants.h:
1003         * rendering/style/StyleContentAlignmentData.h: Added.
1004         (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
1005         (WebCore::StyleContentAlignmentData::setPosition):
1006         (WebCore::StyleContentAlignmentData::setDistribution):
1007         (WebCore::StyleContentAlignmentData::setOverflow):
1008         (WebCore::StyleContentAlignmentData::position):
1009         (WebCore::StyleContentAlignmentData::distribution):
1010         (WebCore::StyleContentAlignmentData::overflow):
1011         (WebCore::StyleContentAlignmentData::operator==):
1012         (WebCore::StyleContentAlignmentData::operator!=):
1013         * rendering/style/StyleRareNonInheritedData.cpp:
1014         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1015         (WebCore::StyleRareNonInheritedData::operator==):
1016         * rendering/style/StyleRareNonInheritedData.h:
1017
1018 2015-05-04  Per Arne Vollan  <peavo@outlook.com>
1019
1020         [WinCairo] Compile error in sharedEGLDisplay() method.
1021         https://bugs.webkit.org/show_bug.cgi?id=144563
1022
1023         Reviewed by Alex Christensen.
1024
1025         The PlatformDisplay type is undefined.
1026
1027         * platform/graphics/egl/GLContextEGL.cpp:
1028         (WebCore::sharedEGLDisplay):
1029
1030 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
1031
1032         [WTF] Remove Functional.h inclusions
1033         https://bugs.webkit.org/show_bug.cgi?id=144400
1034
1035         Reviewed by Darin Adler.
1036
1037         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebCore.
1038
1039         * Modules/mediastream/MediaStreamTrack.cpp:
1040         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
1041         * Modules/mediastream/UserMediaRequest.cpp:
1042         * page/scrolling/ScrollingTree.h:
1043         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1044         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1045         * platform/MemoryPressureHandler.cpp:
1046         * platform/UserActivity.h: Include the <objc/objc.h> header that was previously
1047         indirectly included through Functional.h.
1048         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1049         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1050         * platform/mac/SoftLinking.h: Unconditionally include the <objc/runtime.h> header
1051         that was previously included for the Mac port through Functional.h.
1052
1053 2015-05-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1054
1055         [Streams API] Refactor ReadableJSStream and ReadableStreamJSSource
1056         https://bugs.webkit.org/show_bug.cgi?id=144387
1057
1058         Reviewed by Darin Adler.
1059
1060         Made ReadableStreamReader a private class of ReadableJSStream.
1061         Simplified ReadableJSStream construction so that binding constructor does not need to know about ReadableStreamJSSource. 
1062
1063         No functional change, existing tests cover the changes.
1064
1065         * Modules/streams/ReadableStream.h:
1066         (WebCore::ReadableStream::source): Added to implement jsSource(), needed by ReadableJSStream.
1067         * bindings/js/JSReadableStreamCustom.cpp:
1068         (WebCore::constructJSReadableStream): Simplified to not have to handle source creation.
1069         * bindings/js/ReadableStreamJSSource.cpp:
1070         (WebCore::ReadableStreamJSSource::globalObject): Helper function to be used in other future methods.
1071         (WebCore::ReadableStreamJSSource::start):
1072         (WebCore::ReadableJSStream::create):
1073         (WebCore::ReadableJSStream::createReader):
1074         (WebCore::ReadableJSStream::jsSource):
1075         (WebCore::ReadableJSStream::Reader::create):
1076         (WebCore::ReadableJSStream::Reader::Reader):
1077         * bindings/js/ReadableStreamJSSource.h:
1078
1079 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
1080
1081         Remove move-js-headers.sh
1082         https://bugs.webkit.org/show_bug.cgi?id=144323
1083
1084         Reviewed by Daniel Bates.
1085
1086         move-js-headers.sh was only used by the Wx port, which has been removed from trunk long ago.
1087
1088         * move-js-headers.sh: Removed.
1089
1090 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
1091
1092         [ARM] Don't compare unsigned chars to EOF (-1)
1093         https://bugs.webkit.org/show_bug.cgi?id=144439
1094
1095         Reviewed by Geoffrey Garen.
1096
1097         * platform/linux/MemoryPressureHandlerLinux.cpp:
1098         (WebKit::nextToken): Don't cast return value of fgetc() to char.
1099
1100 2015-05-04  Manuel Rego Casasnovas  <rego@igalia.com>
1101
1102         [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
1103         https://bugs.webkit.org/show_bug.cgi?id=144449
1104
1105         Reviewed by Sergio Villar Senin.
1106
1107         If there're implicit tracks then trackPositions is bigger than
1108         trackSizes, so we need to use the proper index to append the trailing
1109         <ident>s in valueForGridTrackList().
1110
1111         Test: fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
1112
1113         * css/CSSComputedStyleDeclaration.cpp:
1114         (WebCore::valueForGridTrackList):
1115
1116 2015-05-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1117
1118         Purge PassRefPtr in WebCore/html
1119         https://bugs.webkit.org/show_bug.cgi?id=144543
1120
1121         Reviewed by Andreas Kling.
1122
1123         Change PassRefPtr in create() factory functions with Ref. In some functions,
1124         it returns RefPtr when it might have a chance to return nullptr.
1125
1126         No new tests, no behavior changes.
1127
1128         * Modules/encryptedmedia/MediaKeySession.cpp:
1129         (WebCore::MediaKeySession::sendError):
1130         * html/DOMFormData.h:
1131         (WebCore::DOMFormData::create):
1132         * html/HTMLMediaElement.cpp:
1133         (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
1134         * html/HTMLMediaElement.h:
1135         * html/MediaError.h:
1136         (WebCore::MediaError::create):
1137         * html/MediaKeyError.h:
1138         (WebCore::MediaKeyError::create):
1139         * html/canvas/CanvasGradient.h:
1140         * html/canvas/CanvasProxy.cpp:
1141         (WebCore::CanvasProxy::create):
1142         * html/canvas/CanvasProxy.h:
1143         * html/canvas/WebGLActiveInfo.h:
1144         (WebCore::WebGLActiveInfo::create):
1145         * html/canvas/WebGLContextAttributes.h:
1146         * html/canvas/WebGLContextGroup.h:
1147         * html/canvas/WebGLProgram.h:
1148         * html/canvas/WebGLQuery.h:
1149         * html/canvas/WebGLRenderbuffer.h:
1150         * html/canvas/WebGLSampler.h:
1151         * html/canvas/WebGLShader.h:
1152         * html/canvas/WebGLShaderPrecisionFormat.h:
1153         * html/canvas/WebGLSync.h:
1154         * html/canvas/WebGLTexture.h:
1155         * html/canvas/WebGLTransformFeedback.h:
1156         * html/canvas/WebGLUniformLocation.h:
1157         * html/canvas/WebGLVertexArrayObjectOES.h:
1158         * html/shadow/ImageControlsRootElement.cpp:
1159         (WebCore::ImageControlsRootElement::maybeCreate):
1160         * html/shadow/ImageControlsRootElement.h:
1161         * html/shadow/MediaControlElements.cpp:
1162         (WebCore::MediaControlPanelElement::create):
1163         (WebCore::MediaControlPanelEnclosureElement::create):
1164         (WebCore::MediaControlOverlayEnclosureElement::create):
1165         (WebCore::MediaControlTimelineContainerElement::create):
1166         (WebCore::MediaControlVolumeSliderContainerElement::create):
1167         (WebCore::MediaControlStatusDisplayElement::create):
1168         (WebCore::MediaControlPanelMuteButtonElement::create):
1169         (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
1170         (WebCore::MediaControlPlayButtonElement::create):
1171         (WebCore::MediaControlOverlayPlayButtonElement::create):
1172         (WebCore::MediaControlSeekForwardButtonElement::create):
1173         (WebCore::MediaControlSeekBackButtonElement::create):
1174         (WebCore::MediaControlRewindButtonElement::create):
1175         (WebCore::MediaControlReturnToRealtimeButtonElement::create):
1176         (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
1177         (WebCore::MediaControlClosedCaptionsContainerElement::create):
1178         (WebCore::MediaControlClosedCaptionsTrackListElement::create):
1179         (WebCore::MediaControlTimelineElement::create):
1180         (WebCore::MediaControlPanelVolumeSliderElement::create):
1181         (WebCore::MediaControlFullscreenVolumeSliderElement::create):
1182         (WebCore::MediaControlFullscreenButtonElement::create):
1183         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
1184         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
1185         (WebCore::MediaControlTimeRemainingDisplayElement::create):
1186         (WebCore::MediaControlCurrentTimeDisplayElement::create):
1187         * html/shadow/MediaControlElements.h:
1188         * html/shadow/MediaControlsApple.h:
1189         (WebCore::MediaControlsAppleEventListener::create):
1190         * html/shadow/MeterShadowElement.h:
1191         (WebCore::MeterInnerElement::create):
1192         (WebCore::MeterBarElement::create):
1193         (WebCore::MeterValueElement::create):
1194         * html/shadow/ProgressShadowElement.h:
1195         (WebCore::ProgressInnerElement::create):
1196         (WebCore::ProgressBarElement::create):
1197         (WebCore::ProgressValueElement::create):
1198         * html/shadow/mac/ImageControlsRootElementMac.cpp:
1199         (WebCore::ImageControlsRootElement::maybeCreate):
1200         * html/track/TextTrackCueList.h:
1201         (WebCore::TextTrackCueList::create):
1202         * html/track/VTTCue.cpp:
1203         (WebCore::VTTCue::create):
1204         * html/track/VTTCue.h:
1205         (WebCore::VTTCue::create):
1206         * html/track/VTTRegion.h:
1207         * html/track/VideoTrack.h:
1208         * html/track/VideoTrackList.h:
1209         * html/track/WebVTTElement.cpp:
1210         (WebCore::WebVTTElement::create):
1211         * html/track/WebVTTElement.h:
1212         * html/track/WebVTTParser.h:
1213         * platform/graphics/MediaPlayer.h:
1214         (WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
1215
1216 2015-05-03  Simon Fraser  <simon.fraser@apple.com>
1217
1218         Make some static data const
1219         https://bugs.webkit.org/show_bug.cgi?id=144552
1220
1221         Reviewed by Andreas Kling.
1222
1223         Turn baseTable and shiftTable into const data.
1224
1225         * platform/graphics/FormatConverter.cpp:
1226
1227 2015-05-02  Simon Fraser  <simon.fraser@apple.com>
1228
1229         Assertion failure (!needsLayout()) loading inkedmag.com
1230         https://bugs.webkit.org/show_bug.cgi?id=144528
1231         rdar://problem/20788681
1232
1233         Reviewed by Darin Adler.
1234         
1235         When animated GIFs get into catch-up mode, which is common on inkedmag.com,
1236         BitmapImage::advanceAnimation() can synchronously call it's observer's
1237         animationAdvanced(). This could cause RenderImage::repaintOrMarkForLayout()
1238         to repaint or mark itself as needing layout in the middle of painting.
1239         If painting multiple tiles, this could occur when painting the first tile,
1240         and then painting the second tile would assert in RenderView::paint().
1241         
1242         It's always wrong to synchronously call the observer when advancing
1243         the animation, since this happens when painting, and you can't repaint
1244         when painting. The long comment and call to startAnimation(DoNotCatchUp)
1245         was required to explain and work around this, but it's simpler to just
1246         advance the animation on a zero-delay timer.
1247         
1248         Special handling is required for the case where internalAdvanceAnimation()
1249         is catching up, and reaches the end of a non-repeating image; there, we
1250         have to set a flag and do the notify on a zero-delay timer.
1251         
1252         Lots of comment cleanup.
1253
1254         Test: fast/images/set-needs-layout-in-painting.html
1255
1256         * platform/graphics/BitmapImage.cpp:
1257         (WebCore::BitmapImage::BitmapImage):
1258         (WebCore::BitmapImage::startTimer): Utility to create and start the timer.
1259         (WebCore::BitmapImage::repetitionCount):
1260         (WebCore::BitmapImage::startAnimation): Early return in the DoNotCatchUp clause.
1261         If skipping, and internalAdvanceAnimation() returns false (meaning it must have
1262         reached the end), then queue up a notify. Change the normal behavior to just
1263         start the timer.
1264         (WebCore::BitmapImage::stopAnimation):
1265         (WebCore::BitmapImage::internalAdvanceAnimation): Notify if the flag is set.
1266         * platform/graphics/BitmapImage.h:
1267         * rendering/RenderReplaced.cpp:
1268         (WebCore::RenderReplaced::paint): Add a SetLayoutNeededForbiddenScope to
1269         detect setNeedsLayouts when painting replaced elements, including images.
1270
1271 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1272
1273         [GTK][EFL] Unify platform display handling
1274         https://bugs.webkit.org/show_bug.cgi?id=144517
1275
1276         Reviewed by Martin Robinson.
1277
1278         There are several places were we are handling the X display
1279         connection:
1280
1281         - GLContext::sharedX11Display() creates a new connection.
1282         - X11Helper::nativeDisplay() creates a new connection.
1283         - BackingStoreBackendCairoX11 uses the GTK+ shared connection.
1284         - NetscapePlugin::x11HostDisplay() uses the GTK+/ecore shared connection
1285         - The rest of the GTK+ code uses the shared GTK+ connection
1286
1287         And then we also have WaylandDisplay and the code to check if the
1288         current display is wayland or X11.
1289         We could unify all these to share the same connection to reduce
1290         the amount of ifdefs and ensure a single connection. That will
1291         also allow us to use "smart pointers" for the X resources that
1292         need a Display* to be freed.
1293
1294         * PlatformEfl.cmake: Add new files to compilation.
1295         * PlatformGTK.cmake: Move some files to WebCore_SOURCES sinc ethey
1296         don't use GTK+ anymore, and add new files to compilation.
1297         * platform/graphics/GLContext.cpp:
1298         (WebCore::GLContext::cleanupActiveContextsAtExit): Remove the
1299         custom X11 connection.
1300         (WebCore::GLContext::createContextForWindow): Check if the shared
1301         display is Wayland to create a EGL context in such case.
1302         * platform/graphics/PlatformDisplay.cpp: Added.
1303         (WebCore::PlatformDisplay::createPlatformDisplay): Creates the
1304         shared display, using the GTK+/ecore shared connection.
1305         (WebCore::PlatformDisplay::sharedDisplay): Return the shared display.
1306         * platform/graphics/PlatformDisplay.h: Added.
1307         * platform/graphics/egl/GLContextEGL.cpp:
1308         (WebCore::sharedEGLDisplay): Use PlatformDisplay::sharedDisplay()
1309         to get the native display.
1310         (WebCore::GLContextEGL::createPixmapContext): Ditto.
1311         * platform/graphics/glx/GLContextGLX.cpp:
1312         (WebCore::GLContextGLX::createWindowContext): Ditto.
1313         (WebCore::GLContextGLX::createPbufferContext): Ditto.
1314         (WebCore::GLContextGLX::createPixmapContext): Ditto.
1315         (WebCore::GLContextGLX::createContext): Ditto.
1316         (WebCore::GLContextGLX::~GLContextGLX): Ditto.
1317         (WebCore::GLContextGLX::defaultFrameBufferSize): Ditto.
1318         (WebCore::GLContextGLX::makeContextCurrent): Ditto.
1319         (WebCore::GLContextGLX::swapBuffers): Ditto.
1320         (WebCore::GLContextGLX::cairoDevice): Ditto.
1321         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1322         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Ditto.
1323         * platform/graphics/surfaces/glx/X11Helper.cpp:
1324         (WebCore::X11Helper::nativeDisplay): Ditto.
1325         * platform/graphics/wayland/PlatformDisplayWayland.cpp: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.cpp.
1326         (WebCore::PlatformDisplayWayland::globalCallback):
1327         (WebCore::PlatformDisplayWayland::globalRemoveCallback):
1328         (WebCore::PlatformDisplayWayland::create): Renamed instance() as
1329         create() since the single instance is now handled by PlatformDisplay.
1330         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
1331         (WebCore::PlatformDisplayWayland::createSurface):
1332         (WebCore::PlatformDisplayWayland::createSharingGLContext):
1333         * platform/graphics/wayland/PlatformDisplayWayland.h: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.h.
1334         * platform/graphics/x11/PlatformDisplayX11.cpp: Added.
1335         (WebCore::PlatformDisplayX11::PlatformDisplayX11):
1336         (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
1337         * platform/graphics/x11/PlatformDisplayX11.h: Added.
1338         * platform/gtk/GtkUtilities.cpp:
1339         (WebCore::getDisplaySystemType): Deleted.
1340         * platform/gtk/GtkUtilities.h:
1341
1342 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1343
1344         [GTK] API tests crashing on debug builds due to extra unref
1345         https://bugs.webkit.org/show_bug.cgi?id=144508
1346
1347         Reviewed by Mario Sanchez Prada.
1348
1349         The problem is that we were assuming that when a new DOMWindow is
1350         created, the DOM object cache was notified about the previous
1351         DOMWindow being destroyed before objects for the new DOMWindow are
1352         added to the cache. However, that's not always the case and we
1353         only create a DOMWindowObserver for the first DOMWindow. We need
1354         to keep a pointer to the DOMWindow being observed to clear() the
1355         cache and create a new DOMWindowObserver when it changes in the
1356         Frame.
1357
1358         Fixes crashes in several unit tests in debug builds.
1359
1360         * bindings/gobject/DOMObjectCache.cpp:
1361
1362 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
1363
1364         Remove timer alignment logging that I added earler today.
1365
1366         * page/Settings.cpp: (WebCore::Settings::setDOMTimerAlignmentInterval):
1367
1368 2015-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1369
1370         Purge PassRefPtr create() factory functions in html 
1371         https://bugs.webkit.org/show_bug.cgi?id=144522
1372
1373         Reviewed by Darin Adler.
1374
1375         Return Ref instead of PassRefPtr in create() factory functions in html, because the factory
1376         can't return null. This patch is a first step to purge in html. Following patch is going to
1377         be uploaded.
1378
1379         No new tests, no behavior changes.
1380
1381         * html/FileInputType.cpp:
1382         (WebCore::UploadButtonElement::create):
1383         (WebCore::UploadButtonElement::createForMultiple):
1384         * html/MediaController.cpp:
1385         (MediaController::create):
1386         * html/MediaController.h:
1387         * html/canvas/WebGLBuffer.cpp:
1388         (WebCore::WebGLBuffer::create):
1389         * html/canvas/WebGLBuffer.h:
1390         * html/canvas/WebGLContextAttributes.cpp:
1391         (WebCore::WebGLContextAttributes::create):
1392         * html/canvas/WebGLContextAttributes.h:
1393         * html/canvas/WebGLContextGroup.cpp:
1394         (WebCore::WebGLContextGroup::create):
1395         * html/canvas/WebGLContextGroup.h:
1396         * html/canvas/WebGLFramebuffer.cpp:
1397         (WebCore::WebGLFramebuffer::create):
1398         * html/canvas/WebGLFramebuffer.h:
1399         * html/canvas/WebGLProgram.cpp:
1400         (WebCore::WebGLProgram::create):
1401         * html/canvas/WebGLProgram.h:
1402         * html/canvas/WebGLQuery.cpp:
1403         (WebCore::WebGLQuery::create):
1404         * html/canvas/WebGLQuery.h:
1405         * html/canvas/WebGLRenderbuffer.cpp:
1406         (WebCore::WebGLRenderbuffer::create):
1407         * html/canvas/WebGLRenderbuffer.h:
1408         * html/canvas/WebGLSampler.cpp:
1409         (WebCore::WebGLSampler::create):
1410         * html/canvas/WebGLSampler.h:
1411         * html/canvas/WebGLShader.cpp:
1412         (WebCore::WebGLShader::create):
1413         * html/canvas/WebGLShader.h:
1414         * html/canvas/WebGLShaderPrecisionFormat.cpp:
1415         (WebCore::WebGLShaderPrecisionFormat::create):
1416         * html/canvas/WebGLShaderPrecisionFormat.h:
1417         * html/canvas/WebGLSync.cpp:
1418         (WebCore::WebGLSync::create):
1419         * html/canvas/WebGLSync.h:
1420         * html/canvas/WebGLTexture.cpp:
1421         (WebCore::WebGLTexture::create):
1422         * html/canvas/WebGLTexture.h:
1423         * html/canvas/WebGLTransformFeedback.cpp:
1424         (WebCore::WebGLTransformFeedback::create):
1425         * html/canvas/WebGLTransformFeedback.h:
1426         * html/canvas/WebGLUniformLocation.cpp:
1427         (WebCore::WebGLUniformLocation::create):
1428         * html/canvas/WebGLUniformLocation.h:
1429         * html/canvas/WebGLVertexArrayObject.cpp:
1430         (WebCore::WebGLVertexArrayObject::create):
1431         * html/canvas/WebGLVertexArrayObject.h:
1432         * html/canvas/WebGLVertexArrayObjectOES.cpp:
1433         (WebCore::WebGLVertexArrayObjectOES::create):
1434         * html/canvas/WebGLVertexArrayObjectOES.h:
1435
1436 2015-05-02  Andreas Kling  <akling@apple.com>
1437
1438         Style recalc always causes detach from shared StyleRareNonInheritedData.
1439         <https://webkit.org/b/144530>
1440
1441         Reviewed by Darin Adler.
1442
1443         StyleResolver::adjustStyleForMaskImages() was always calling RenderStyle::ensureMaskLayers()
1444         when we were in style recalc. This caused the RenderStyle to COW off from the previously
1445         shared StyleRareNonInheritedData even if nothing actually changes.
1446
1447         This patch adds an early return to adjustStyleForMaskImages() when the previous style had
1448         no mask images. Further refinements could be made, but this covers the most common case where
1449         we don't have any mask images at all.
1450
1451         * css/StyleResolver.cpp:
1452         (WebCore::StyleResolver::adjustStyleForMaskImages):
1453
1454 2015-05-02  Alexey Proskuryakov  <ap@apple.com>
1455
1456         fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
1457         https://bugs.webkit.org/show_bug.cgi?id=144155
1458
1459         Unreviewed, will roll out soon.
1460
1461         Added some temporary logging to better see if alignment is indeed the culprit.
1462
1463         * page/Settings.cpp: (WebCore::Settings::setDOMTimerAlignmentInterval):
1464
1465 2015-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1466
1467         Use Ref instead of PassRefPtr in WebCore/svg 
1468         https://bugs.webkit.org/show_bug.cgi?id=144479
1469
1470         Reviewed by Darin Adler.
1471
1472         Remove remained PassRefPtr in svg.
1473
1474         No new tests, no behavior changes.
1475
1476         * svg/SVGFontFaceSrcElement.cpp:
1477         (WebCore::SVGFontFaceSrcElement::srcValue):
1478         * svg/SVGFontFaceSrcElement.h:
1479         * svg/properties/SVGPropertyInfo.h:
1480
1481 2015-05-02  Simon Fraser  <simon.fraser@apple.com>
1482
1483         Small cleanup in BitmapImage
1484         https://bugs.webkit.org/show_bug.cgi?id=144515
1485
1486         Reviewed by Darin Adler.
1487
1488         Use an enum for the internalAdvanceAnimation() argument, with a default.
1489         
1490         Wrap the clearing of the timer in a clearTimer() function, called from
1491         stopAnimation(). This fixes the jarring reading of BitmapImage::internalAdvanceAnimation(),
1492         which used to start by calling stopAnimation().
1493
1494         * platform/graphics/BitmapImage.cpp:
1495         (WebCore::BitmapImage::clearTimer):
1496         (WebCore::BitmapImage::startAnimation):
1497         (WebCore::BitmapImage::stopAnimation):
1498         (WebCore::BitmapImage::advanceAnimation):
1499         (WebCore::BitmapImage::internalAdvanceAnimation):
1500         * platform/graphics/BitmapImage.h:
1501         * platform/graphics/Image.h:
1502
1503 2015-05-01  Simon Fraser  <simon.fraser@apple.com>
1504
1505         Avoid compositing updates after style recalcs which have no compositing implications
1506         https://bugs.webkit.org/show_bug.cgi?id=144502
1507
1508         Reviewed by Darin Adler.
1509         
1510         After r183461, we have reliable information about whether a style change with zero
1511         diff can be reliably ignored. Use that information to track whether a given
1512         recalcStyle() does anything which should force a compositing update.
1513         
1514         This eliminates up to 40% of the post-recalcStyle compositing updates on some pages.
1515         
1516         Add Internals API to test.
1517
1518         Test: compositing/updates/no-style-change-updates.html
1519
1520         * dom/Document.cpp:
1521         (WebCore::Document::recalcStyle): Tell the FrameView we're going to recalc style.
1522         * page/FrameView.cpp:
1523         (WebCore::FrameView::willRecalcStyle): Pass it on to the compositor.
1524         (WebCore::FrameView::updateCompositingLayersAfterStyleChange): Move the code
1525         that was here into RenderLayerCompositor::didRecalcStyleWithNoPendingLayout().
1526         * page/FrameView.h:
1527         * rendering/RenderLayerCompositor.cpp:
1528         (WebCore::RenderLayerCompositor::willRecalcStyle): Reset the m_layerNeedsCompositingUpdate flag.
1529         (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout): Bail on the update if
1530         no layers changed.
1531         (WebCore::RenderLayerCompositor::updateCompositingLayers): Logging. Increment m_compositingUpdateCount,
1532         which is used for testing.
1533         (WebCore::RenderLayerCompositor::layerStyleChanged): Set the m_layerNeedsCompositingUpdate flag.
1534         (WebCore::RenderLayerCompositor::startTrackingCompositingUpdates): Reset the counter.
1535         (WebCore::RenderLayerCompositor::compositingUpdateCount):
1536         * rendering/RenderLayerCompositor.h:
1537         * testing/Internals.cpp:
1538         (WebCore::Internals::startTrackingCompositingUpdates):
1539         (WebCore::Internals::compositingUpdateCount):
1540         * testing/Internals.h:
1541         * testing/Internals.idl:
1542
1543 2015-05-01  Andreas Kling  <akling@apple.com>
1544
1545         Reproducible crash removing name attribute from <img> node
1546         <https://webkit.org/b/144371>
1547         <rdar://problem/17198583>
1548
1549         Reviewed by Darin Adler.
1550
1551         The problem here was with HTMLImageElement::getNameAttribute(), which relies
1552         on Element::hasName() to avoid slow attribute lookups when the attribute
1553         is already known not to be present. Unfortunately hasName() uses an ElementData
1554         flag that wasn't getting updated until after the call to parseAttribute().
1555
1556         This patch fixes the issue by moving the code that updates the hasName() flag
1557         before the parseAttribute() virtual dispatch.
1558
1559         Test: fast/dom/HTMLImageElement/remove-name-id-attribute-from-image.html
1560
1561         * dom/Element.cpp:
1562         (WebCore::Element::attributeChanged):
1563
1564 2015-05-01  Eric Carlson  <eric.carlson@apple.com>
1565
1566         Postpone caption style sheet creation
1567         https://bugs.webkit.org/show_bug.cgi?id=144499
1568
1569         Reviewed by Simon Fraser.
1570         
1571         Generating and inserting the caption user style sheet is expensive so don't do it until
1572         we see a text track, and only do it for the first video element in a PageGroup.
1573
1574         Test: media/track/track-user-stylesheet.html
1575
1576         * html/HTMLMediaElement.cpp:
1577         (WebCore::HTMLMediaElement::registerWithDocument): Only register for caption preferences
1578         changes if we have done so before.
1579         (WebCore::HTMLMediaElement::unregisterWithDocument): Only unregister for caption preferences
1580         changes if we registered for them.
1581         (WebCore::HTMLMediaElement::addTextTrack): Register for caption preference changes.
1582         * html/HTMLMediaElement.h:
1583
1584         * page/CaptionUserPreferencesMediaAF.cpp:
1585         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Only
1586         generate the style sheet when called for the first time.
1587
1588 2015-05-01  Dean Jackson  <dino@apple.com>
1589
1590         [iOS] Scrubber display is broken if the buffered range is empty
1591         https://bugs.webkit.org/show_bug.cgi?id=144511
1592
1593         Reviewed by Eric Carlson.
1594
1595         Make sure that if video.buffered returns an empty list, we
1596         still draw the scrubber background correctly.
1597
1598         * Modules/mediacontrols/mediaControlsiOS.js:
1599         (ControllerIOS.prototype.drawTimelineBackground): Ensure that buffered
1600         is always at least as big as the current time.
1601
1602 2015-05-01  Roger Fong  <roger_fong@apple.com>
1603
1604         Media control volume slider should be vertical to avoid flickering issues.
1605         https://bugs.webkit.org/show_bug.cgi?id=144496.
1606         <rdar://problem/20451328>
1607
1608         Reviewed by Darin Adler.
1609
1610         * Modules/mediacontrols/mediaControlsApple.css:
1611         Resize and reposition the volume box so that it does not have to rotated via a transform.
1612         (audio::-webkit-media-controls-panel):
1613         (audio::-webkit-media-controls-panel .volume-box): Also set overflow: hidden so we can't interact
1614              with the volume slider while the volume box is hidden.
1615         (audio::-webkit-media-controls-panel .volume-box:active):
1616         Rotate and position the volume slider via transforms. Make sure it's not transformed in the fullscreen controls.
1617         (video::-webkit-media-controls-volume-slider):
1618         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
1619
1620 2015-05-01  Brent Fulgham  <bfulgham@apple.com>
1621
1622         Expand test infrastructure to support scrolling tests (Part 4): Scroll Snap Support
1623         https://bugs.webkit.org/show_bug.cgi?id=144482
1624
1625         Reviewed by Simon Fraser.
1626
1627         New tests will be landed in a second patch.
1628
1629         The new WheelEventTestTriggers do not work properly with scroll snap points, because some test deferral notifications
1630         need to be triggered for state changes on the scrolling thread. This required the following changes:
1631         1. A flag indicating that we want to know about WheelEvent state changes needed to be propagated to the scrolling thread,
1632            so that tests could be deferred until Scrolling thread rubberband or scroll-snap animations had completed.
1633         2. The ScrollingNodeID needed to be used for registering and clearing deferrals.
1634         3. The scrolling thread needed a way to dispatch messages to the main thread indicating that we should (or should not)
1635            defer tests due to scrolling actions.
1636
1637         Note that a future patch will extend this support to include the RemoteScrollingTree.
1638
1639         * page/WheelEventTestTrigger.cpp:
1640         (WebCore::WheelEventTestTrigger::deferTestsForReason): Added some logging features.
1641         (WebCore::WheelEventTestTrigger::removeTestDeferralForReason): Ditto.
1642         (WebCore::dumpState): Helper function for logging test deferral state.
1643         (WebCore::WheelEventTestTrigger::triggerTestTimerFired): Added some logging features.
1644         * page/scrolling/AsyncScrollingCoordinator.cpp:
1645         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Make sure that the scrolling thread is
1646         told that it needs to send scrolling state back to the main thread. Only do this if we are in testing mode.
1647         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): The scrollingNodeID should be
1648         used as the identifier for this operation, not the page address.
1649         (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added. receives messages from the scrolling thread
1650         and notifies the testing infrastructure.
1651         (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
1652         * page/scrolling/AsyncScrollingCoordinator.h:
1653         * page/scrolling/ScrollingStateScrollingNode.cpp:
1654         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): When cloning the ScrollingStateScrollingNode,
1655         include the testing mode state.
1656         (WebCore::ScrollingStateScrollingNode::setExpectsWheelEventTestTrigger): Added.
1657         * page/scrolling/ScrollingStateScrollingNode.h:
1658         (WebCore::ScrollingStateScrollingNode::expectsWheelEventTestTrigger): Added.
1659         * page/scrolling/ScrollingTree.h:
1660         (WebCore::ScrollingTree::deferTestsForReason): Added stub.
1661         (WebCore::ScrollingTree::removeTestDeferralForReason): Ditto.
1662         * page/scrolling/ThreadedScrollingTree.cpp:
1663         (WebCore::ThreadedScrollingTree::deferTestsForReason): Added. Dispatches messages from the scrolling thread to the
1664         main thread.
1665         (WebCore::ThreadedScrollingTree::removeTestDeferralForReason): Ditto.
1666         * page/scrolling/ThreadedScrollingTree.h:
1667         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1668         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1669         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac): Initialize testing state flag.
1670         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): If the 'ExpectsWheelEventTestTrigger' flag is
1671         set, update local state.
1672         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): If we are testing, and the wheel event should be handled
1673         asynchronously, tell the testing infrastructure we need to wait for the thread state to sync.
1674         (WebCore::ScrollingTreeFrameScrollingNodeMac::deferTestsForReason): Added. Notifies test system we need to defer tests
1675         until we notify them. Also used by the ScrollController during animations.
1676         (WebCore::ScrollingTreeFrameScrollingNodeMac::removeTestDeferralForReason): Ditto.
1677         * platform/Logging.h:
1678         * platform/ScrollAnimator.cpp:
1679         (WebCore::ScrollAnimator::deferTestsForReason): Added. Used by ScrollController during animation. This updates the
1680         testing infrastructure directly, since it is running in the same process and main thread.
1681         (WebCore::ScrollAnimator::removeTestDeferralForReason): Ditto.
1682         * platform/ScrollAnimator.h:
1683         * platform/cocoa/ScrollController.h:
1684         (WebCore::ScrollControllerClient::deferTestsForReason): Change client API.
1685         (WebCore::ScrollControllerClient::removeTestDeferralForReason): Ditto.
1686         (WebCore::ScrollControllerClient::testTrigger): Deleted.
1687         * platform/cocoa/ScrollController.mm:
1688         (WebCore::ScrollController::startSnapRubberbandTimer): Use new client API.
1689         (WebCore::ScrollController::stopSnapRubberbandTimer): Ditto.
1690         (WebCore::ScrollController::startScrollSnapTimer): Ditto.
1691         (WebCore::ScrollController::stopScrollSnapTimer): Ditto.
1692
1693 2015-05-01  Joseph Pecoraro  <pecoraro@apple.com>
1694
1695         Inline some small methods instead of them being EXPORT'd and out of line
1696         https://bugs.webkit.org/show_bug.cgi?id=144498
1697
1698         Reviewed by Darin Adler.
1699
1700         * page/Page.cpp:
1701         (WebCore::Page::testTrigger): Deleted.
1702         (WebCore::Page::clearTrigger): Deleted.
1703         (WebCore::Page::expectsWheelEventTriggers): Deleted.
1704         * page/Page.h:
1705         (WebCore::Page::testTrigger):
1706         (WebCore::Page::clearTrigger):
1707         (WebCore::Page::expectsWheelEventTriggers):
1708
1709 2015-05-01  Dan Bernstein  <mitz@apple.com>
1710
1711         WebCore part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
1712         https://bugs.webkit.org/show_bug.cgi?id=144501
1713
1714         Reviewed by Darin Adler.
1715
1716         Test: TestWebKitAPI/Tests/WebKit2Cocoa/LoadAlternateHTMLString.mm
1717
1718         Normally, loading substitute data (such as an error page) creates a new back-forward list
1719         item. FrameLoader has a mechanism that detects when a substitute data load occurs during
1720         handling of a provisional load error and prevents the creation of a new back-forwards list
1721         item in that case if the unreachable URL is the same as the failing provisional URL. This
1722         mechanism was broken in WebKit2, where handling the provisional load error is asynchronous.
1723
1724         The fix is to capture some state (namely, the failing provisional URL) when dispatching the
1725         load error and allow it to be restored when loading the substitute data.
1726
1727         * loader/FrameLoader.cpp:
1728         (WebCore::FrameLoader::FrameLoader): Removed initialization of
1729         m_delegateIsHandlingProvisionalLoadError.
1730         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL): Instead of checking
1731         m_delegateIsHandlingProvisionalLoadError and if true using the provisional document loader’s
1732         URL, check m_provisionalLoadErrorBeingHandledURL.
1733         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Instead of checking and setting
1734         m_delegateIsHandlingProvisionalLoadError, use m_provisionalLoadErrorBeingHandledURL.
1735         * loader/FrameLoader.h:
1736         (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL): Added this getter. The client
1737         can call this from its override of dispatchDidFailProvisionalLoad and store the result.
1738         (WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Added this setter. The
1739         client can call this prior to loading substitute data if it’s done as part of handling a
1740         previously-dispatched didFailProvisionalLoad.
1741
1742 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1743
1744         USE(...) macro should expect unprefixed variables
1745         https://bugs.webkit.org/show_bug.cgi?id=144454
1746
1747         Reviewed by Daniel Bates.
1748
1749         * DerivedSources.make: Replace all occurrences WTF_USE with USE.
1750         * PlatformEfl.cmake: Ditto.
1751         * PlatformGTK.cmake: Ditto.
1752         * bindings/objc/PublicDOMInterfaces.h: Ditto.
1753         * config.h: Ditto.
1754         * crypto/mac/SerializedCryptoKeyWrapMac.mm: Ditto.
1755         * page/AlternativeTextClient.h: Ditto.
1756         * platform/efl/FileSystemEfl.cpp: Ditto.
1757         (WebCore::fileSystemRepresentation): Ditto.
1758         * platform/graphics/cg/ImageBufferDataCG.h: Ditto.
1759         * platform/graphics/cg/PDFDocumentImage.h: Ditto.
1760         * platform/ios/wak/WAKAppKitStubs.h: Ditto.
1761         * rendering/RenderLayerCompositor.cpp: Ditto.
1762
1763 2015-05-01  Myles C. Maxfield  <mmaxfield@apple.com>
1764
1765         [OS X] Text dilation parameters are not restored after being set
1766         https://bugs.webkit.org/show_bug.cgi?id=144507
1767         <rdar://problem/19446938>
1768
1769         Reviewed by Simon Fraser and Ned Holbrook.
1770
1771         Create a RAII class who is in charge of saving, applying, and restoring dilation parameters. Use this class
1772         around our text drawing routines.
1773
1774         Note that this migrates our use of CTFontSetRenderingParameters() to CTFontSetRenderingStyle().
1775
1776         Test: fast/text/dilation-save-restore.html
1777
1778         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1779         (WebCore::RenderingStyleSaver::RenderingStyleSaver):
1780         (WebCore::RenderingStyleSaver::~RenderingStyleSaver):
1781         (WebCore::showGlyphsWithAdvances):
1782         * platform/spi/cg/CoreGraphicsSPI.h:
1783         * platform/spi/cocoa/CoreTextSPI.h:
1784
1785 2015-05-01  Commit Queue  <commit-queue@webkit.org>
1786
1787         Unreviewed, rolling out r183687.
1788         https://bugs.webkit.org/show_bug.cgi?id=144505
1789
1790         Appears to have caused assertions (Requested by ap on
1791         #webkit).
1792
1793         Reverted changeset:
1794
1795         "Media control volume slider is opaque."
1796         https://bugs.webkit.org/show_bug.cgi?id=144470
1797         http://trac.webkit.org/changeset/183687
1798
1799 2015-05-01  Jeremy Jones  <jeremyj@apple.com>
1800
1801         Stop using deprecated AVKit SPI for enter and exit fullscreen.
1802         https://bugs.webkit.org/show_bug.cgi?id=144493
1803
1804         Reviewed by Jer Noble.
1805
1806         Replace 
1807             -enterFullScreenWithCompletionHandler:
1808             -exitFullScreenWithCompletionHandler:
1809         with
1810             -enterFullScreenAnimated:completionHandler:
1811             -exitFullScreenAnimated:completionHandler:
1812         
1813         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1814         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard):
1815         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
1816         * platform/spi/cocoa/AVKitSPI.h:
1817
1818 2015-05-01  Roger Fong  <roger_fong@apple.com>
1819
1820         Media control volume slider is opaque.
1821         https://bugs.webkit.org/show_bug.cgi?id=144470.
1822         <rdar://problem/20770350>
1823
1824         Rubberstamped by Simon Fraser.
1825
1826         * Modules/mediacontrols/mediaControlsApple.css:
1827         (audio::-webkit-media-controls-panel): 
1828         Don't create a stacking context just for the controls.
1829         Doing so causes the mix-blend-mode on the volume box to fail.
1830
1831 2015-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
1832
1833         [GTK] REGRESSION(183368): It made editing tests assert
1834         https://bugs.webkit.org/show_bug.cgi?id=144447
1835
1836         Reviewed by Chris Fleizach.
1837
1838         Don't notify platforms of editing actions of type EditActionUnspecified.
1839         If we don't know what the action is, platform accessibility APIs certainly
1840         won't.
1841
1842         Add AXTextEditTypeAttributesChange and AXTextAttributesChanged as catch-alls
1843         for formatting changes. ATK lacks finely-grained signals through which to
1844         specify which text attributes have changed. If other platforms have such
1845         signals, new types can always be added.
1846
1847         Don't post an accessible replacement notification for AXTextEditTypeCut.
1848         The notification is handled by DeleteSelectionCommand. It is possible for
1849         white space to be inserted in preparation for a cut which was triggering
1850         a not-reached assert, but insertion of whitespace in preparation for a
1851         cut does not seem notification-worthy.
1852
1853         Treat AXTextEditTypeDictation the same as other insertion types (insert,
1854         paste, typing) with respect to replacement notifications.
1855
1856         No new tests. The hundreds of editing tests that had been crashing seem sufficient.
1857
1858         * accessibility/AXObjectCache.cpp:
1859         (WebCore::AXObjectCache::showIntent):
1860         (WebCore::AXObjectCache::textChangeForEditType):
1861         * accessibility/AXObjectCache.h:
1862         * accessibility/AXTextStateChangeIntent.h:
1863         * accessibility/atk/AXObjectCacheAtk.cpp:
1864         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1865         * editing/AppendNodeCommand.cpp:
1866         (WebCore::AppendNodeCommand::doApply):
1867         (WebCore::AppendNodeCommand::doUnapply):
1868         * editing/DeleteFromTextNodeCommand.cpp:
1869         (WebCore::DeleteFromTextNodeCommand::doApply):
1870         (WebCore::DeleteFromTextNodeCommand::doUnapply):
1871         * editing/EditCommand.cpp:
1872         (WebCore::EditCommand::applyEditType):
1873         (WebCore::EditCommand::unapplyEditType):
1874         * editing/InsertIntoTextNodeCommand.cpp:
1875         (WebCore::InsertIntoTextNodeCommand::doApply):
1876         (WebCore::InsertIntoTextNodeCommand::doUnapply):
1877         * editing/InsertNodeBeforeCommand.cpp:
1878         (WebCore::InsertNodeBeforeCommand::doApply):
1879         (WebCore::InsertNodeBeforeCommand::doUnapply):
1880         * editing/ReplaceInsertIntoTextNodeCommand.cpp:
1881         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
1882
1883 2015-05-01  Brady Eidson  <beidson@apple.com>
1884
1885         Add API to disable meta refreshes.
1886         <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
1887
1888         Reviewed by Alexey Proskuryakov.
1889
1890         Test: loader/meta-refresh-disabled.html
1891
1892         * dom/Document.cpp:
1893         (WebCore::Document::processHttpEquiv): Bail early if Settings have meta refreshes disabled.
1894         * page/Settings.in:
1895
1896 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1897
1898         [Freetype] Properly support synthetic oblique in vertical text
1899         https://bugs.webkit.org/show_bug.cgi?id=144492
1900
1901         Reviewed by Sergio Villar Senin.
1902
1903         No new tests. Covered by existing tests.
1904
1905         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1906         (WebCore::FontPlatformData::initializeWithFontFace): Skew vertical when using synthetic
1907         oblique for vertical text.
1908
1909 2015-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
1910
1911         AX: [ATK] REGRESSION: accessibility/canvas-fallback-content.html now crashes
1912         https://bugs.webkit.org/show_bug.cgi?id=144481
1913
1914         Reviewed by Chris Fleizach.
1915
1916         Canvas fallback content is allowed to be focusable if the canvas is displayed
1917         and visible. Update the style when creating an accessible object for a node in
1918         a canvas subtree and before Element::isFocusable() gets called.
1919
1920         No new tests. The existing, crashing test no longer crashes.
1921
1922         * accessibility/AXObjectCache.cpp:
1923         (WebCore::AXObjectCache::getOrCreate):
1924
1925 2015-05-01  Alex Christensen  <achristensen@webkit.org>
1926
1927         [Content Extensions] Add CombinedURLFilters debugging code.
1928         https://bugs.webkit.org/show_bug.cgi?id=144491
1929
1930         Reviewed by Daniel Bates.
1931
1932         No change in behavior.
1933
1934         * contentextensions/CombinedURLFilters.cpp:
1935         (WebCore::ContentExtensions::recursiveMemoryUsed):
1936         (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
1937         (WebCore::ContentExtensions::prefixTreeVertexToString):
1938         (WebCore::ContentExtensions::recursivePrint):
1939         (WebCore::ContentExtensions::CombinedURLFilters::print):
1940         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1941         (WebCore::ContentExtensions::generateNFAForSubtree):
1942         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1943         * contentextensions/CombinedURLFilters.h:
1944         * contentextensions/NFA.cpp:
1945         (WebCore::ContentExtensions::NFA::memoryUsed):
1946         * contentextensions/NFA.h:
1947         * contentextensions/Term.h:
1948         (WebCore::ContentExtensions::quantifierToString):
1949         (WebCore::ContentExtensions::Term::toString):
1950
1951 2015-05-01  Eric Carlson  <eric.carlson@apple.com>
1952
1953         Fix text track language selection logic
1954         https://bugs.webkit.org/show_bug.cgi?id=144467
1955
1956         Reviewed by Brent Fulgham.
1957
1958         No new tests, media/track/track-language-preference.html was updated.
1959
1960         * html/HTMLMediaElement.cpp:
1961         (WebCore::HTMLMediaElement::configureTextTrackGroup): Correct a minor style typo.
1962         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Update logging.
1963
1964         * page/CaptionUserPreferences.cpp:
1965         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Minor cleanup.
1966         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Give exact matches a
1967         higher score.
1968
1969         * page/CaptionUserPreferencesMediaAF.cpp:
1970         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Update for 
1971         indexOfBestMatchingLanguageInList change.
1972
1973         * platform/Language.cpp:
1974         (WebCore::indexOfBestMatchingLanguageInList): Add parameter for exact match. Convert the
1975         passed language to lower case as we do with the preferred languages.
1976         * platform/Language.h:
1977
1978 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1979
1980         [Freetype] Add support for the font-synthesis property
1981         https://bugs.webkit.org/show_bug.cgi?id=144472
1982
1983         Reviewed by Sergio Villar Senin.
1984
1985         No new tests. This causes fast/css3-text/font-synthesis.html to pass
1986         for WebKitGTK+.
1987
1988         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1989         (WebCore::FontPlatformData::FontPlatformData): Only use synthetic bold when the font description allows it.
1990         (WebCore::FontPlatformData::initializeWithFontFace): Ditto for synthetic oblique.
1991
1992 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1993
1994         [GTK] New CORS tests from r183280 fail on WebKitGTK+
1995         https://bugs.webkit.org/show_bug.cgi?id=144469
1996
1997         Reviewed by Sergio Villar Senin.
1998
1999         No new tests. This causes failing tests to pass.
2000
2001         * platform/network/soup/ResourceHandleSoup.cpp:
2002         (WebCore::doRedirect): Clear the origin header on cross-origin redirects.
2003
2004 2015-04-30  Alex Christensen  <achristensen@webkit.org>
2005
2006         Compile fix when using content extensions debugging code.
2007
2008         * contentextensions/ContentExtensionCompiler.cpp:
2009         (WebCore::ContentExtensions::compileRuleList):
2010         * contentextensions/ContentExtensionsDebugging.h:
2011         * contentextensions/DFA.cpp:
2012         (WebCore::ContentExtensions::printTransitions):
2013         (WebCore::ContentExtensions::DFA::debugPrintDot):
2014         * contentextensions/DFANode.h:
2015         * contentextensions/NFA.cpp:
2016         (WebCore::ContentExtensions::NFA::memoryUsed):
2017         (WebCore::ContentExtensions::NFA::debugPrintDot):
2018
2019 2015-04-30  Dan Bernstein  <mitz@apple.com>
2020
2021         Fixed the build for <rdar://problem/20758514>
2022
2023         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2024         (WebCore::AudioSourceProviderAVFObjC::destroyMix): Don’t pass nil to
2025         -[AVMutableAudioMix setInputParameters:].
2026
2027 2015-04-30  Daniel Bates  <dabates@apple.com>
2028
2029         Clean up: Remove unnecessary runtime computation of string length
2030         https://bugs.webkit.org/show_bug.cgi?id=144483
2031
2032         Reviewed by Joseph Pecoraro.
2033
2034         Following <http://trac.webkit.org/changeset/183649>, WebCore::fullyQualifiedInfoTableName()
2035         computes strlen() of the first string literal as part of concatenating two string literals.
2036         It is sufficient to use sizeof() - 1 instead of strlen() to compute the length of the first
2037         string literal because the size of the string literal is known at compile time.
2038
2039         * Modules/webdatabase/DatabaseBackendBase.cpp:
2040         (WebCore::fullyQualifiedInfoTableName):
2041
2042 2015-04-30  Dean Jackson  <dino@apple.com>
2043
2044         Expose -apple-system as a font family
2045         https://bugs.webkit.org/show_bug.cgi?id=144484
2046         <rdar://problem/20767330>
2047
2048         Reviewed by Tim Horton.
2049
2050         Accept "-apple-system" for the font-family property, and
2051         rename "-apple-system-font-monospaced-numbers" to
2052         "-apple-system-monospaced-numbers".
2053
2054         Also change the media controls to use the new name.
2055
2056         Covered by existing tests and this new one:
2057             fast/text/system-font-legacy-name.html
2058
2059         * Modules/mediacontrols/mediaControlsApple.css:
2060         (audio::-webkit-media-controls-time-remaining-display):
2061         * Modules/mediacontrols/mediaControlsiOS.css:
2062         (::-webkit-media-controls):
2063         (audio::-webkit-media-controls-time-remaining-display):
2064         (audio::-webkit-media-controls-status-display):
2065         * platform/graphics/ios/FontCacheIOS.mm: Add support for the new name.
2066         (WebCore::createCTFontWithFamilyNameAndWeight):
2067         * platform/graphics/mac/FontCacheMac.mm: Ditto.
2068         (WebCore::fontWithFamily):
2069
2070 2015-04-30  Javier Fernandez  <jfernandez@igalia.com>
2071
2072         [CSS Grid Layout] overflow-position keyword for align and justify properties.
2073         https://bugs.webkit.org/show_bug.cgi?id=144235
2074
2075         Reviewed by Sergio Villar Senin.
2076
2077         When the alignment subject is larger than the alignment container,
2078         it will overflow. Some alignment modes, if honored in this
2079         situation, may cause data loss; an overflow alignment mode can be
2080         explicitly specified to avoid this.
2081
2082         This patch implements overflow-keyword handling for Grid Layout on
2083         align-self and justify-self properties.
2084
2085         Test: fast/css-grid-layout/grid-align-justify-overflow.html
2086
2087         * rendering/RenderGrid.cpp:
2088         (WebCore::computeOverflowAlignmentOffset):
2089         (WebCore::RenderGrid::rowPositionForChild):
2090         (WebCore::RenderGrid::columnPositionForChild):
2091         (WebCore::RenderGrid::rowAxisPositionForChild): Deleted.
2092         * rendering/style/RenderStyle.cpp:
2093         (WebCore::resolveAlignmentData):
2094         (WebCore::resolveJustificationData):
2095         (WebCore::RenderStyle::resolveAlignment):
2096         (WebCore::RenderStyle::resolveAlignmentOverflow):
2097         (WebCore::RenderStyle::resolveJustification):
2098         (WebCore::RenderStyle::resolveJustificationOverflow):
2099         * rendering/style/RenderStyle.h:
2100
2101 2015-04-30  Jon Honeycutt  <jhoneycutt@apple.com>
2102
2103         Rebaseline bindings tests results after r183648.
2104
2105         Unreviewed.
2106
2107         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2108         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
2109         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2110         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
2111         * bindings/scripts/test/JS/JSTestInterface.cpp:
2112         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
2113         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
2114         (WebCore::setJSTestInterfaceImplementsStr2):
2115         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2116         (WebCore::setJSTestInterfaceSupplementalStr2):
2117         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2118         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2119         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2120         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
2121         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2122         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
2123         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
2124         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
2125         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
2126         * bindings/scripts/test/JS/JSTestObj.cpp:
2127         (WebCore::setJSTestObjConstructorStaticStringAttr):
2128         (WebCore::setJSTestObjStringAttr):
2129         (WebCore::setJSTestObjReflectedStringAttr):
2130         (WebCore::setJSTestObjReflectedURLAttr):
2131         (WebCore::setJSTestObjReflectedCustomURLAttr):
2132         (WebCore::setJSTestObjStringAttrWithGetterException):
2133         (WebCore::setJSTestObjStringAttrWithSetterException):
2134         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2135         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
2136         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
2137         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
2138         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2139         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
2140         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
2141         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
2142         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
2143         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
2144         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
2145         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
2146         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
2147         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2148         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
2149         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2150         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
2151         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2152         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
2153         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
2154         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
2155         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
2156
2157 2015-04-30  Simon Fraser  <simon.fraser@apple.com>
2158
2159         Fixed elements end up in the middle of the view with pageScale < 1
2160         https://bugs.webkit.org/show_bug.cgi?id=144428
2161         rdar://problem/20404982
2162
2163         Reviewed by Tim Horton.
2164
2165         When pageScale is < 1, we used fixed layout mode, and FrameView::fixedElementsLayoutRelativeToFrame()
2166         returns true. However, the scrolling thread was calling the static scrollOffsetForFixedPosition()
2167         hardcoding 'false' for this parameter.
2168         
2169         Fix by sending the value of fixedElementsLayoutRelativeToFrame over to the scrolling thread,
2170         so we can use it when doing scrolling-thread fixed position stuff.
2171
2172         Not testable.
2173
2174         * page/scrolling/AsyncScrollingCoordinator.cpp:
2175         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2176         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2177         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
2178         (WebCore::ScrollingStateFrameScrollingNode::setFixedElementsLayoutRelativeToFrame):
2179         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2180         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2181         (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
2182         (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
2183         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2184         (WebCore::ScrollingTreeFrameScrollingNode::fixedElementsLayoutRelativeToFrame):
2185         (WebCore::ScrollingTreeFrameScrollingNode::shouldUpdateScrollLayerPositionSynchronously): Deleted.
2186         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2187         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
2188
2189 2015-04-30  Beth Dakin  <bdakin@apple.com>
2190
2191         Remove invalid assertion from MouseEvent::create()
2192         https://bugs.webkit.org/show_bug.cgi?id=144477
2193
2194         Reviewed by Tim Horton.
2195
2196         mouseforcechanged events and mouseforcewillbegin trigger this assertion. The 
2197         assertion does not seem valuable, so rather than changing it, just remove it.
2198         * dom/MouseEvent.cpp:
2199         (WebCore::MouseEvent::create):
2200
2201 2015-04-30  Dean Jackson  <dino@apple.com>
2202
2203         -apple-system-font-monospaced-numbers doesn't work on iOS
2204         https://bugs.webkit.org/show_bug.cgi?id=144478
2205         <rdar://problem/20544940>
2206
2207         Reviewed by Brent Fulgham.
2208
2209         Make sure to start from the system font descriptor when
2210         asking for a monospaced numeric alternate.
2211
2212         Test: platform/ios-simulator/fast/text/system-monospaced-numbers.html
2213
2214         * platform/graphics/ios/FontCacheIOS.mm:
2215         (WebCore::createCTFontWithFamilyNameAndWeight):
2216
2217 2015-04-30  Oliver Hunt  <oliver@apple.com>
2218
2219         DOM bindings should not be using a reference type to point to a temporary object
2220         https://bugs.webkit.org/show_bug.cgi?id=144474
2221
2222         Reviewed by Beth Dakin.
2223
2224         The DOM bindings will currently try and use a local reference to point
2225         to a temporary object. This currently works as a by product of the compiler's
2226         stack layout. This patch removes the dependency on undefined behaviour
2227         by ensuring that we use a value rather than reference type.
2228
2229         * bindings/scripts/CodeGeneratorJS.pm:
2230         (GenerateParametersCheck):
2231         (GetNativeTypeForCallbacks):
2232
2233 2015-04-30  Brady Eidson  <beidson@apple.com>
2234
2235         Build fix after r183646 for less enlightened platforms.
2236
2237         Unreviewed.
2238
2239         * Modules/webdatabase/DatabaseBackendBase.cpp:
2240         (WebCore::fullyQualifiedInfoTableName): Windows doesn’t have stpcpy :(
2241
2242 2015-04-30  Brady Eidson  <beidson@apple.com>
2243
2244         Javascript using WebSQL can create their own WebKit info table.
2245         <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466
2246
2247         Reviewed by Alex Christensen.
2248
2249         Test: storage/websql/alter-to-info-table.html
2250
2251         * Modules/webdatabase/DatabaseBackendBase.cpp:
2252         (WebCore::DatabaseBackendBase::databaseInfoTableName): Return the info table name.
2253         (WebCore::fullyQualifiedInfoTableName): Append "main." to the info table name.
2254         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Use the fully qualified name.
2255         (WebCore::DatabaseBackendBase::performOpenAndVerify): Ditto.
2256         (WebCore::DatabaseBackendBase::getVersionFromDatabase): Ditto.
2257         (WebCore::DatabaseBackendBase::setVersionInDatabase): Ditto.
2258
2259 2015-04-30  Beth Dakin  <bdakin@apple.com>
2260
2261         Should choose UIScrollView indicatorStyle based on the document background color
2262         https://bugs.webkit.org/show_bug.cgi?id=144473
2263         -and corresponding-
2264         rdar://problem/19897699
2265
2266         Reviewed by Simon Fraser.
2267
2268         Export this function.
2269         * platform/graphics/Color.h:
2270
2271 2015-04-30  Brent Fulgham  <bfulgham@apple.com>
2272
2273         [Win] Allow WebKit to build without ANGLE support
2274         https://bugs.webkit.org/show_bug.cgi?id=144459
2275         <rdar://problem/20707307>
2276
2277         Reviewed by Dean Jackson.
2278
2279         * platform/graphics/GLContext.cpp: Use the ENABLE(GRAPHICS_CONTEXT_3D)
2280         macro to avoid compiling this code if not using WEBGL/3D contexts.
2281
2282 2015-04-29  David Hyatt  <hyatt@apple.com>
2283
2284         Avoid containingBlock() calls when no writing mode flipping is needed.
2285         https://bugs.webkit.org/show_bug.cgi?id=144407
2286
2287         Reviewed by Simon Fraser.
2288
2289         Add a bool to RenderView that indicates whether or not any flipped blocks have been
2290         added to the view. Once tainted, the view just stays dirty forever. If no flipped
2291         blocks are ever seen, we can then optimize away calls to containingBlock().
2292
2293         The motivation for this patch is to improve layer position updating, which makes many
2294         calls to topLeftLocationOffset(), one of the functions that can be optimized by this
2295         change.
2296
2297         * rendering/RenderBox.cpp:
2298         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2299         * rendering/RenderBoxModelObject.cpp:
2300         (WebCore::RenderBoxModelObject::updateFromStyle):
2301         * rendering/RenderLayer.cpp:
2302         (WebCore::RenderLayer::calculateClipRects):
2303         * rendering/RenderLineBoxList.cpp:
2304         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2305         * rendering/RenderView.cpp:
2306         (WebCore::RenderView::RenderView):
2307         * rendering/RenderView.h:
2308
2309 2015-04-29  Jer Noble  <jer.noble@apple.com>
2310
2311         Make GenericTaskQueue even more generic (and usable inside platform/)
2312         https://bugs.webkit.org/show_bug.cgi?id=144414
2313
2314         Reviewed by Eric Carlson.
2315
2316         Templatize GenericTaskQueue so that it can be used from within platform/.
2317
2318         * CMakeLists.txt:
2319         * WebCore.vcxproj/WebCore.vcxproj:
2320         * WebCore.vcxproj/WebCore.vcxproj.filters:
2321         * WebCore.xcodeproj/project.pbxproj:
2322         * dom/GenericTaskQueue.cpp: Removed.
2323         * html/HTMLMediaElement.h:
2324         * platform/GenericTaskQueue.h: Renamed from Source/WebCore/dom/GenericTaskQueue.h.
2325         (WebCore::TaskDispatcher::TaskDispatcher): Added default templatized class which just calls the parameter's postTask().
2326         (WebCore::TaskDispatcher::postTask): Call context's postTask().
2327         (WebCore::TaskDispatcher<Timer>::TaskDispatcher): Add a timer version which does not require a context.
2328         (WebCore::TaskDispatcher<Timer>::postTask): Set the timer.
2329         (WebCore::TaskDispatcher<Timer>::timerFired): Call the task.
2330         (WebCore::GenericTaskQueue::GenericTaskQueue): Moved from .cpp.
2331         (WebCore::GenericTaskQueue::enqueueTask): Ditto.
2332         (WebCore::GenericTaskQueue::close): Ditto.
2333         (WebCore::GenericTaskQueue::cancelAllTasks): Ditto.
2334         (WebCore::GenericTaskQueue::hasPendingTasks): Ditto.
2335
2336 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2337
2338         Unreviewed build fix. WebCore has a weak symbol.
2339
2340         WebCore has a weak external symbol in it. A common cause of weak external
2341         symbols is when an inline function is listed in the linker export file.
2342         ERROR: symbol __ZNK7WebCore4Page25expectsWheelEventTriggersEv
2343
2344         * page/Page.cpp:
2345         (WebCore::Page::expectsWheelEventTriggers):
2346         * page/Page.h:
2347         (WebCore::Page::expectsWheelEventTriggers): Deleted.
2348
2349 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
2350
2351         Crash at WebCore::Document::absoluteRegionForEventTargets 
2352         https://bugs.webkit.org/show_bug.cgi?id=144426
2353         rdar://problem/20502166
2354
2355         Reviewed by Tim Horton.
2356
2357         When a frame had wheel event handlers, we would register the document itself
2358         as a handler in its parent document. This is problematic, because there's not
2359         code path that removes it when the frame is destroyed.
2360         
2361         It turns out we don't need to do this at all; the non-fast scrollable region
2362         already takes handlers in subframes into account.
2363
2364         Tests: fast/events/wheelevent-in-frame.html
2365                fast/events/wheelevent-in-reattached-frame.html
2366
2367         * dom/Document.cpp:
2368         (WebCore::Document::didAddWheelEventHandler):
2369         (WebCore::Document::didRemoveWheelEventHandler):
2370
2371 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
2372
2373         Not all videos should automatically play to playback target
2374         https://bugs.webkit.org/show_bug.cgi?id=144430
2375         <rdar://problem/20718523>
2376
2377         Reviewed by Darin Adler.
2378
2379         * Modules/mediasession/WebMediaSessionManager.cpp:
2380         (WebCore::WebMediaSessionManager::clientStateDidChange): Consider ExternalDeviceAutoPlayCandidate.
2381         Minor cleanup.
2382
2383         * html/HTMLMediaElement.cpp:
2384         (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate when a <video>
2385         has a file with an audio track that does not loop.
2386
2387         * page/MediaProducer.h: Add ExternalDeviceAutoPlayCandidate.
2388
2389 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2390
2391         LiveNodeList may unexpectedly return an element for empty string
2392         https://bugs.webkit.org/show_bug.cgi?id=144429
2393
2394         Reviewed by Darin Adler.
2395
2396         * dom/LiveNodeList.cpp:
2397         (WebCore::LiveNodeList::namedItem):
2398         Never return a result for an empty string.
2399
2400 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2401
2402         Remove PassRefPtr in SVGFEFooElement classes
2403         https://bugs.webkit.org/show_bug.cgi?id=144425
2404
2405         Reviewed by Darin Adler.
2406
2407         As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
2408         in SVGFEFooElement.
2409
2410         No new tests, no behavior changes.
2411
2412         * css/RGBColor.cpp:
2413         (WebCore::RGBColor::create):
2414         * css/RGBColor.h:
2415         * platform/graphics/filters/PointLightSource.h:
2416         (WebCore::PointLightSource::create):
2417         * platform/graphics/filters/SpotLightSource.h:
2418         (WebCore::SpotLightSource::create):
2419         * svg/SVGColor.cpp:
2420         (WebCore::SVGColor::rgbColor):
2421         * svg/SVGColor.h:
2422         * svg/SVGFEDistantLightElement.cpp:
2423         (WebCore::SVGFEDistantLightElement::lightSource):
2424         * svg/SVGFEDistantLightElement.h:
2425         * svg/SVGFELightElement.cpp:
2426         (WebCore::SVGFELightElement::findLightSource):
2427         * svg/SVGFELightElement.h:
2428         * svg/SVGFEPointLightElement.cpp:
2429         (WebCore::SVGFEPointLightElement::lightSource):
2430         * svg/SVGFEPointLightElement.h:
2431         * svg/SVGFESpotLightElement.cpp:
2432         (WebCore::SVGFESpotLightElement::lightSource):
2433         * svg/SVGFESpotLightElement.h:
2434
2435 2015-04-29  Dean Jackson  <dino@apple.com>
2436
2437         Create a named CSS property for system colors
2438         https://bugs.webkit.org/show_bug.cgi?id=144423
2439         <rdar://problem/20491011>
2440
2441         Reviewed by Tim Horton.
2442
2443         Test: fast/css/apple-system-colors.html
2444
2445         Expose the following values to CSS color properties:
2446             -apple-system-blue
2447             -apple-system-brown
2448             -apple-system-gray
2449             -apple-system-green
2450             -apple-system-orange
2451             -apple-system-pink
2452             -apple-system-purple
2453             -apple-system-red
2454             -apple-system-yellow
2455
2456         On platforms other than OS X Yosemite and iOS, the
2457         actual color values are undefined and become transparent
2458         black. (In fact, not all are defined on iOS either.)
2459
2460         * WebCore.xcodeproj/project.pbxproj: Two new SPI header files.
2461
2462         * css/CSSParser.cpp:
2463         (WebCore::CSSParser::validSystemColorValue): New helper function that
2464         checks if a CSSValueID is between the two system color values. This
2465         was being tested everywhere, which meant adding a new system color was
2466         at risk of being ignored. It's a static method so it can be used
2467         from the SVG CSS parser too.
2468         (WebCore::validPrimitiveValueColor): Use the new helper.
2469         (WebCore::CSSParser::parseValue): Ditto.
2470         (WebCore::CSSParser::parseBackgroundColor): Ditto.
2471         (WebCore::CSSParser::parseShadow): Ditto.
2472         (WebCore::parseDeprecatedGradientColorStop): Ditto.
2473         (WebCore::parseGradientColorOrKeyword): Ditto.
2474         * css/CSSParser.h: New static helper function.
2475
2476         * css/CSSValueKeywords.in: Add the new CSS value keywords.
2477
2478         * css/SVGCSSParser.cpp:
2479         (WebCore::validSystemControlColorValue): SVG has a restricted
2480         set of system colors, so use the helper from CSSParser but with
2481         an extra condition.
2482         (WebCore::CSSParser::parseSVGValue): Use the helper.
2483
2484         * platform/spi/ios/UIColorSPI.h: Added.
2485         * platform/spi/cocoa/NSColorSPI.h: Added.
2486
2487         * rendering/RenderThemeIOS.h: New systemColor override. Also add a cache for system colors.
2488         * rendering/RenderThemeIOS.mm:
2489         (WebCore::RenderThemeIOS::systemColor): Ask UIColor to provide the color values for the new CSS values.
2490         * rendering/RenderThemeMac.mm:
2491         (WebCore::RenderThemeMac::systemColor): Ditto.
2492
2493 2015-04-29  Commit Queue  <commit-queue@webkit.org>
2494
2495         Unreviewed, rolling out r183600.
2496         https://bugs.webkit.org/show_bug.cgi?id=144432
2497
2498         New tests time out everywhere (Requested by ap on #webkit).
2499
2500         Reverted changeset:
2501
2502         "Crash at WebCore::Document::absoluteRegionForEventTargets"
2503         https://bugs.webkit.org/show_bug.cgi?id=144426
2504         http://trac.webkit.org/changeset/183600
2505
2506 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2507
2508         Unreviewed iOS build fix. Unused parameter no longer exists.
2509
2510         * page/scrolling/ScrollingCoordinator.cpp:
2511         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
2512
2513 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
2514
2515         Crash at WebCore::Document::absoluteRegionForEventTargets 
2516         https://bugs.webkit.org/show_bug.cgi?id=144426
2517         rdar://problem/20502166
2518
2519         Reviewed by Tim Horton.
2520
2521         When a frame had wheel event handlers, we would register the document itself
2522         as a handler in its parent document. This is problematic, because there's not
2523         code path that removes it when the frame is destroyed.
2524         
2525         It turns out we don't need to do this at all; the non-fast scrollable region
2526         already takes handlers in subframes into account.
2527
2528         Tests: fast/events/wheelevent-in-frame.html
2529                fast/events/wheelevent-in-reattached-frame.html
2530
2531         * dom/Document.cpp:
2532         (WebCore::Document::didAddWheelEventHandler):
2533         (WebCore::Document::didRemoveWheelEventHandler):
2534
2535 2015-04-29  David Kilzer  <ddkilzer@apple.com>
2536
2537         Attempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
2538         <http://webkit.org/b/144362>
2539
2540         Reviewed by Andy Estes.
2541
2542         This patch switches soft-linking of QuickLook.framework to
2543         QuickLookSoftLink.{h,mm} so that we stop exporting unintended
2544         symbols.
2545
2546         No new tests since no change in behavior.
2547
2548         * WebCore.xcodeproj/project.pbxproj:
2549         - Add QuickLookSoftLinking.{h,mm} to the project.
2550
2551         * platform/ios/QuickLookSoftLink.h: Added.
2552         * platform/ios/QuickLookSoftLink.mm: Added.
2553         * platform/mac/SoftLinking.h:
2554         (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
2555         (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
2556         (SOFT_LINK_POINTER_FOR_HEADER): Add macro.
2557         (SOFT_LINK_POINTER_FOR_SOURCE): Add macro.
2558
2559         * platform/network/ios/QuickLook.h:
2560         - Remove unused declarations.
2561
2562         * platform/network/ios/QuickLook.mm:
2563         (WebCore::QLPreviewConverterClass): Deleted.
2564         (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
2565         (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
2566         (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
2567         - Remove SOFT_LINK macros and unused methods after switching to
2568           new QuickLookSoftLink.{h,mm}.
2569         (WebCore::QLPreviewGetSupportedMIMETypesSet):
2570         - Switch to use NeverDestroyed<>.
2571         (WebCore::registerQLPreviewConverterIfNeeded):
2572         (createQLPreviewProtocol):
2573         (WebCore::QLPreviewProtocol):
2574         (WebCore::QuickLookHandle::QuickLookHandle):
2575         (WebCore::QuickLookHandle::create):
2576         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
2577         - Simplify code when using QuickLookSoftLink.h.
2578
2579         * platform/network/ios/WebCoreURLResponseIOS.mm:
2580         - Include QuickLookSoftLink.h header.
2581
2582 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
2583
2584         Compute the non-fast-scrollable region in main-document coordinates
2585         https://bugs.webkit.org/show_bug.cgi?id=144420
2586
2587         Reviewed by Tim Horton.
2588
2589         Compute the non-fast-scrollable region in document coordinates, to make it easier
2590         to reason about. Previously, it was document coordinates offset by top content inset.
2591
2592         * page/DebugPageOverlays.cpp:
2593         (WebCore::MouseWheelRegionOverlay::updateRegion): Traverse all frames to compute the wheel
2594         event handler region, mapping each to root view coords, and then mapping back into document
2595         coords at the end.
2596         (WebCore::NonFastScrollableRegionOverlay::updateRegion): No offset needed here; the
2597         overlay and region are both document coordinates.
2598         * page/FrameView.h: Make some mapping function overrides public, and expose widgetsInRenderTree().
2599         * page/Page.cpp:
2600         (WebCore::Page::nonFastScrollableRects): Remove frame argument.
2601         * page/Page.h:
2602         * page/PageOverlay.cpp:
2603         (WebCore::PageOverlay::bounds):
2604         (WebCore::PageOverlay::viewToOverlayOffset): Convenience function to map between
2605         view and overlay coordinates.
2606         * page/PageOverlay.h:
2607         * page/scrolling/AsyncScrollingCoordinator.cpp: New computeNonFastScrollableRegion() signature.
2608         (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
2609         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2610         (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
2611         * page/scrolling/ScrollingCoordinator.cpp:
2612         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): This function
2613         recurses on frames, computing an absolute (document-relative) region per frame. This
2614         removes the confusing offsetting through top content inset.
2615         Change how we get to plugins that want wheel events; we can't get from PluginViewBase
2616         to renderers, so use FrameView's list of Widgets, and their RenderWidgets. This fixes
2617         regions for transformed plugin-ins.
2618         For subframes, we get a region in the subframe's document coords. Map to that sub-frame,
2619         then to our frame, then to our document.
2620         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Wrapper that hides
2621         the recursive function.
2622         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Deleted.
2623         * page/scrolling/ScrollingCoordinator.h:
2624         * page/scrolling/ScrollingTree.cpp:
2625         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Map the event point
2626         from view coordinates to document coordinates for testing against the non-fast region.
2627         We previously assert that the root note is a FrameScrolling node.
2628         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2629         (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset): Similar to ScrollView::viewToContents()
2630         for the scrolling tree.
2631         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2632         * testing/Internals.cpp:
2633         (WebCore::Internals::nonFastScrollableRects): No need for frame arg.
2634
2635 2015-04-29  Brent Fulgham  <bfulgham@apple.com>
2636
2637         Expand test infrastructure to support scrolling tests
2638         https://bugs.webkit.org/show_bug.cgi?id=143684
2639         <rdar://problem/20375516>
2640
2641         Reviewed by Simon Fraser.
2642
2643         Tested by various fast/scrolling and platform/mac-wk2/tiled-drawing/scrolling tests.
2644
2645         This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
2646         function object to be fired when scroll events are finished. The object also keeps track of reasons
2647         why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
2648         check rendering state in the middle of an animation.
2649
2650         Switch from the original WeakPtr design to ThreadSafeRefPtr, because WeakPtr cannot be shared
2651         across multiple threads.
2652
2653         * page/FrameView.cpp:
2654         (WebCore::FrameView::layout): Make sure ScrollAnimator knows about any active test trigger.
2655         (WebCore::FrameView::setScrollPosition): Ditto.
2656         (WebCore::FrameView::didAddScrollbar): Ditto.
2657         * page/MainFrame.cpp:
2658         (WebCore::MainFrame::testTrigger): Moved to Page.
2659         (WebCore::MainFrame::ensureTestTrigger): Ditto.
2660         * page/MainFrame.h:
2661         * page/Page.cpp:
2662         (WebCore::Page::testTrigger): Moved from MainFrame, and converted to use RefPtr.
2663         (WebCore::Page::ensureTestTrigger): Ditto.
2664         * page/Page.h:
2665         * page/WheelEventTestTrigger.cpp:
2666         (WebCore::WheelEventTestTrigger::WheelEventTestTrigger): Remove WeakPtr code.
2667         (WebCore::WheelEventTestTrigger::createWeakPtr): Deleted.
2668         * page/WheelEventTestTrigger.h:
2669         * page/mac/EventHandlerMac.mm:
2670         (WebCore::EventHandler::platformPrepareForWheelEvents): Make sure the scroll animator knows about
2671         any active test trigger object.
2672         * page/scrolling/AsyncScrollingCoordinator.cpp:
2673         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Notify WheelEventTestTrigger
2674         that the scrolling thread is synced with the main thread.
2675         * platform/ScrollAnimator.h: Hold a RefPtr to the WheelEventTestTrigger. 
2676         (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger):
2677         * platform/cocoa/ScrollController.h:
2678         * platform/cocoa/ScrollController.mm:
2679         (WebCore::ScrollController::startSnapRubberbandTimer): Notify test trigger to hold tests until rubber band
2680         snapping is complete.
2681         (WebCore::ScrollController::stopSnapRubberbandTimer): Notify test trigger that rubber band snapping is done.
2682         (WebCore::ScrollController::startScrollSnapTimer): Notify test trigger to hold tests until scroll snapping
2683         is complete.
2684         (WebCore::ScrollController::stopScrollSnapTimer): Notify test trigger that scroll snapping is done.
2685         * platform/mac/ScrollAnimatorMac.mm:
2686         (WebCore::ScrollAnimatorMac::didBeginScrollGesture): Notify test trigger that a content scroll is in progress.
2687         (WebCore::ScrollAnimatorMac::didEndScrollGesture): Notify test trigger that a content scroll is finished.
2688         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): Notify test trigger to hold tests until the content
2689         scrolling is complete.
2690         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): Notify test trigger that content scrolling is done.
2691         * rendering/RenderBox.cpp:
2692         (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
2693         (WebCore::RenderBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
2694         to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
2695         (WebCore::RenderBox::setScrollTop): Ditto.
2696         * rendering/RenderLayer.cpp:
2697         (WebCore::RenderLayer::createScrollbar): Make sure the ScrollAnimator knows about any active test triggers.
2698         * rendering/RenderListBox.cpp:
2699         (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
2700         (WebCore::RenderListBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
2701         to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
2702         (WebCore::RenderListBox::setScrollTop): Ditto.
2703         (WebCore::RenderListBox::createScrollbar): Ditto.
2704         * testing/js/WebCoreTestSupport.cpp:
2705         (WebCoreTestSupport::monitorWheelEvents): Look for WheelEventTestTrigger in Page, rather than MainFrame.
2706         (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
2707
2708 2015-04-29  Javier Fernandez  <jfernandez@igalia.com>
2709
2710         [CSS Box Alignment] Unifying alignment data in a single class
2711         https://bugs.webkit.org/show_bug.cgi?id=144384
2712
2713         Reviewed by David Hyatt.
2714
2715         The new CSS Box Alignment specification introduces more complex
2716         values and syntax for defining alignment properties. Most of the
2717         alignment values were just keyword identifiers, but the new syntax
2718         allows different combinations of identifiers to determine the
2719         alignment behavior (eg. overflow-alignment keyword).
2720
2721         This patch wll help to implement later overflow handling and
2722         specially Content Dstribution alignment, the most complex case by
2723         far. It will be more consistent against style changes and repaint,
2724         snce we will have just one field to monitoring for value
2725         modfications.
2726
2727         No new tests, because no new functionality was added; it's just a
2728         code refactoring which is just expected to pass current tests.
2729
2730         * css/CSSComputedStyleDeclaration.cpp:
2731         (WebCore::resolveSelfAlignmentAuto):
2732         (WebCore::ComputedStyleExtractor::propertyValue):
2733         * css/CSSPropertyNames.in:
2734         * css/StyleBuilderConverter.h:
2735         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
2736         (WebCore::StyleBuilderConverter::convertSVGColor): Deleted.
2737         * css/StyleBuilderCustom.h:
2738         (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage): Deleted.
2739         (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage): Deleted.
2740         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
2741         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
2742         (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
2743         (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
2744         (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
2745         (WebCore::StyleBuilderCustom::applyInheritLineHeight): Deleted.
2746         * css/StyleResolver.cpp:
2747         (WebCore::StyleResolver::adjustRenderStyle):
2748         * mathml/MathMLTextElement.cpp:
2749         (WebCore::MathMLTextElement::createElementRenderer):
2750         * rendering/RenderFlexibleBox.cpp:
2751         (WebCore::RenderFlexibleBox::styleDidChange):
2752         * rendering/RenderFullScreen.cpp:
2753         (WebCore::createFullScreenStyle):
2754         * rendering/RenderMenuList.cpp:
2755         (WebCore::RenderMenuList::adjustInnerStyle):
2756         * rendering/mathml/RenderMathMLRoot.cpp:
2757         (WebCore::RenderMathMLRoot::updateStyle):
2758         * rendering/mathml/RenderMathMLScripts.cpp:
2759         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
2760         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
2761         * rendering/style/RenderStyle.cpp:
2762         (WebCore::RenderStyle::resolveAlignment):
2763         (WebCore::RenderStyle::resolveJustification):
2764         * rendering/style/RenderStyle.h:
2765         * rendering/style/StyleRareNonInheritedData.cpp:
2766         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2767         (WebCore::StyleRareNonInheritedData::operator==):
2768         (WebCore::StyleRareNonInheritedData::contentDataEquivalent): Deleted.
2769         * rendering/style/StyleRareNonInheritedData.h:
2770         * rendering/style/StyleSelfAlignmentData.h: Added.
2771         (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
2772         (WebCore::StyleSelfAlignmentData::setPosition):
2773         (WebCore::StyleSelfAlignmentData::setPositionType):
2774         (WebCore::StyleSelfAlignmentData::setOverflow):
2775         (WebCore::StyleSelfAlignmentData::position):
2776         (WebCore::StyleSelfAlignmentData::positionType):
2777         (WebCore::StyleSelfAlignmentData::overflow):
2778         (WebCore::StyleSelfAlignmentData::operator==):
2779         (WebCore::StyleSelfAlignmentData::operator!=):
2780
2781 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2782
2783         NodeList has issues with Symbol and empty string
2784         https://bugs.webkit.org/show_bug.cgi?id=144310
2785
2786         Reviewed by Darin Adler.
2787
2788         Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
2789                fast/dom/dataset-name-getter-symbols.html
2790                fast/dom/named-items-with-empty-name.html
2791                fast/dom/named-items-with-symbol-name.html
2792                storage/domstorage/localstorage/named-items.html
2793
2794         Test different bindings objects with custom named setter
2795         and getter handlers. Ensure that they handle Symbol properties
2796         gracefully. Often times avoiding the string path.
2797
2798         * dom/StaticNodeList.cpp:
2799         (WebCore::StaticNodeList::namedItem):
2800         (WebCore::StaticElementList::namedItem):
2801         Better handle the empty string. It should not match an item.
2802
2803         * bindings/js/JSDOMBinding.h:
2804         (WebCore::propertyNameToString):
2805         In cases where we would use this, we should have handled
2806         Symbol properties.
2807
2808         (WebCore::propertyNameToAtomicString):
2809         For Symbols, use the unique string. This should result
2810         in no matches for a Symbol property.
2811
2812         * bindings/js/JSDOMStringMapCustom.cpp:
2813         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
2814         (WebCore::JSDOMStringMap::deleteProperty):
2815         (WebCore::JSDOMStringMap::putDelegate):
2816         * bindings/js/JSStorageCustom.cpp:
2817         (WebCore::JSStorage::canGetItemsForName):
2818         (WebCore::JSStorage::nameGetter):
2819         (WebCore::JSStorage::deleteProperty):
2820         (WebCore::JSStorage::putDelegate):
2821         * bindings/js/JSStyleSheetListCustom.cpp:
2822         (WebCore::JSStyleSheetList::canGetItemsForName):
2823         Treat Symbol properties as private properties. They just
2824         go directly through to the Object, and avoid the string
2825         getter/setter property path.
2826
2827 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
2828
2829         [Mac] Register with device picker whenever a page has <video>
2830         https://bugs.webkit.org/show_bug.cgi?id=144408
2831
2832         Reviewed by Jer Noble.
2833
2834         * Modules/mediasession/WebMediaSessionManager.cpp:
2835         (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
2836         to the target when it has not routes.
2837
2838         * html/HTMLMediaElement.cpp:
2839         (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the 
2840         element is <video> with a video track that does not block wireless playback.
2841
2842 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
2843
2844         [GTK] Add support for automatic hyphenation
2845         https://bugs.webkit.org/show_bug.cgi?id=44478
2846
2847         Reviewed by Carlos Garcia Campos.
2848
2849         No new tests. This patch unskips and updates results for existing hyphenation tests.
2850
2851         * PlatformGTK.cmake: Add the libhypen implementation to the source list.
2852         * platform/gtk/GtkUtilities.cpp:
2853         (WebCore::topLevelPath): Add this helper function taken from the test harness.
2854         (WebCore::getWebKitBuildDirectory): Ditto.
2855         * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
2856         * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
2857           so that it can still be shared.
2858         * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
2859         (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
2860         determine the locale that it covers.
2861         (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
2862         as ones in the JHBuild root for testing.
2863         (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
2864         in the JHBuild root.
2865         (WebCore::availableLocales): Getter for global hash of installed dictionaries.
2866         (WebCore::canHyphenate): Added libhyphen implementation.
2867         (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
2868         an open libhyphen dictionary. This is useful so that they can be stored in an MRU
2869         cache. This is a similar approach to the CoreFoundation implementation.
2870         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
2871         helper.
2872         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
2873         (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
2874         (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
2875         (WebCore::lastHyphenLocation): Added libhyphen implementation.
2876
2877 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
2878
2879         Unreviewed build fix.
2880
2881         * platform/graphics/mac/FontCacheMac.mm:
2882         (WebCore::fontWithFamily):
2883
2884 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
2885
2886         Some media tests assert after r183096
2887         https://bugs.webkit.org/show_bug.cgi?id=144098
2888
2889         Reviewed by Brent Fulgham.
2890
2891         Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
2892         after it has been unregistered. A media element unregisters itself when it is removed from the 
2893         document, but scripts can still run and modify state that results in a call to
2894         playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
2895         the various call sites.
2896
2897         * dom/Document.cpp:
2898         (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
2899         been unregistered.
2900         (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
2901
2902 2015-04-29  Zalan Bujtas  <zalan@apple.com>
2903
2904         Simple line layout: Web process spins endlessly below layoutSimpleLines.
2905         https://bugs.webkit.org/show_bug.cgi?id=144403
2906         rdar://problem/20742783
2907
2908         Reviewed by Antti Koivisto.
2909
2910         When a text fragment overlaps multiple renderes and it does not fit the current line,
2911         we revert the text fragment iterator position so that the overlapping content
2912         gets processed again for the next line.
2913         However, TextFragmentIterator::revertToFragment() was reverting too much and
2914         we started processing old content all over again -> infinite loop.
2915
2916         This patch ensures that text fragment iterator is reverted to the right position.
2917
2918         Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
2919
2920         * rendering/SimpleLineLayout.cpp:
2921         (WebCore::SimpleLineLayout::createLineRuns):
2922         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2923         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
2924         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
2925         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2926
2927 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
2928
2929         JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
2930         https://bugs.webkit.org/show_bug.cgi?id=144397
2931
2932         Reviewed by Andreas Kling.
2933
2934         If you override getCallData() and you want to be called a "function", then you need to use the
2935         new TypeOfShouldCallGetCallData flag.
2936
2937         * bindings/scripts/CodeGeneratorJS.pm:
2938         (GenerateHeader):
2939         * bridge/objc/objc_runtime.h:
2940         * bridge/runtime_method.h:
2941         * bridge/runtime_object.h:
2942
2943 2015-04-29  Commit Queue  <commit-queue@webkit.org>
2944
2945         Unreviewed, rolling out r183553 and r183561.
2946         https://bugs.webkit.org/show_bug.cgi?id=144406
2947
2948         broke the iOS build (Requested by thorton__ on #webkit).
2949
2950         Reverted changesets:
2951
2952         "Switch QuickLook soft-linking to use
2953         QuickLookSoftLink.{h,mm}"
2954         https://bugs.webkit.org/show_bug.cgi?id=144362
2955         http://trac.webkit.org/changeset/183553
2956
2957         "Unreviewed iOS build fix after r183553: fix declaration of
2958         QLPreviewScheme"
2959         http://trac.webkit.org/changeset/183561
2960
2961 2015-04-29  Antti Koivisto  <antti@apple.com>
2962
2963         ResourceLoadPriority should be enum class
2964         https://bugs.webkit.org/show_bug.cgi?id=144326
2965
2966         Reviewed by Darin Adler.
2967
2968         * html/HTMLLinkElement.cpp:
2969         (WebCore::HTMLLinkElement::process):
2970         * loader/LinkLoader.cpp:
2971         (WebCore::LinkLoader::loadLink):
2972         * loader/ResourceLoadScheduler.cpp:
2973         (WebCore::ResourceLoadScheduler::scheduleLoad):
2974         (WebCore::ResourceLoadScheduler::servePendingRequests):
2975         (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
2976         (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
2977         (WebCore::ResourceLoadScheduler::HostInformation::schedule):
2978         (WebCore::ResourceLoadScheduler::HostInformation::remove):
2979         (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
2980         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
2981         * loader/ResourceLoadScheduler.h:
2982         (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
2983
2984             Modernize ResourceLoadScheduler code a bit while switching to enum class.
2985
2986         * loader/cache/CachedResource.cpp:
2987         (WebCore::defaultPriorityForResourceType):
2988         * loader/cache/CachedResourceLoader.cpp:
2989         (WebCore::CachedResourceLoader::requestResource):
2990         * loader/icon/IconLoader.cpp:
2991         (WebCore::IconLoader::startLoading):
2992         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2993         (WebCore::WebCoreAVFResourceLoader::startLoading):
2994         * platform/network/ResourceLoadPriority.h:
2995         (WebCore::operator++):
2996         (WebCore::operator--):
2997         * platform/network/ResourceRequestBase.cpp:
2998         (WebCore::ResourceRequestBase::adopt):
2999         (WebCore::ResourceRequestBase::copyData):
3000         (WebCore::ResourceRequestBase::cachePolicy):
3001         (WebCore::ResourceRequestBase::priority):
3002         (WebCore::ResourceRequestBase::setPriority):
3003         * platform/network/ResourceRequestBase.h:
3004
3005             Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
3006             Use modern initialization syntax.
3007
3008         (WebCore::ResourceRequestBase::ResourceRequestBase):
3009         (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
3010         * platform/network/cf/ResourceRequestCFNet.cpp:
3011         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
3012         (WebCore::initializeHTTPConnectionSettingsOnStartup):
3013         * platform/network/cf/ResourceRequestCFNet.h:
3014         (WebCore::toResourceLoadPriority):
3015         (WebCore::toPlatformRequestPriority):
3016         * platform/network/soup/ResourceRequest.h:
3017         (WebCore::toSoupMessagePriority):
3018         * testing/Internals.cpp:
3019         (WebCore::stringToResourceLoadPriority):
3020
3021 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
3022
3023         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
3024         https://bugs.webkit.org/show_bug.cgi?id=132159
3025
3026         Reviewed by Darin Adler.
3027
3028         On platforms that support it, delegate font selection logic to the platform. Currently, this is
3029         only supported on Mac, using CTFontCreateForCSS().
3030
3031         This also changes the mechanism that enforces our font whitelist in our tests. We used to
3032         swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
3033         font family names instead.
3034
3035         Note that this patch is a work in progress, because it makes the following tests fail:
3036         fast/css/font-weight-1.html
3037         fast/forms/validation-message-appearance.html
3038         fast/forms/select/optgroup-rendering.html
3039
3040         No new tests, because there is no behavior change.
3041
3042         * platform/graphics/FontCache.h: Add a function to set the whitlist.
3043         * platform/graphics/mac/FontCacheMac.mm:
3044         (WebCore::fontWhitelist):
3045         (WebCore::FontCache::setFontWhitelist):
3046         (WebCore::toAppKitFontWeight):
3047         (WebCore::toCoreTextFontWeight):
3048         (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
3049         (WebCore::FontCache::createFontPlatformData):
3050         * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
3051
3052 2015-04-29  Jer Noble  <jer.noble@apple.com>
3053
3054         Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
3055
3056         * platform/ios/QuickLookSoftLink.mm:
3057
3058 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
3059
3060         [Mac] Use new device picker menu API
3061         https://bugs.webkit.org/show_bug.cgi?id=144392
3062
3063         Reviewed by Jer Noble.
3064
3065         * Modules/mediasession/WebMediaSessionManager.cpp:
3066         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
3067         * platform/graphics/MediaPlaybackTargetPicker.h:
3068
3069         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
3070         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3071         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):  m_deviceChangeTimer -> m_pendingActionTimer.
3072         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
3073         (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from 
3074         outputeDeviceAvailabilityChangedTimerFired.
3075         (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
3076         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
3077         available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
3078         (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
3079         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it 
3080         can now be called from showPlaybackTargetPicker.
3081         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
3082         pendingActionTimerFired.
3083
3084         * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
3085
3086 2015-04-29  Antti Koivisto  <antti@apple.com>
3087
3088         Main resource loaded via 304 response becomes empty if reloaded by user
3089         https://bugs.webkit.org/show_bug.cgi?id=144386
3090
3091         Reviewed by Darin Adler.
3092
3093         Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
3094         DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
3095         conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
3096         Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
3097         However DocumentLoader has no code to handle 304 so we would end up with an empty document.
3098
3099         Test: http/tests/cache/main-resource-304-reload.html
3100
3101         * loader/DocumentLoader.cpp:
3102         (WebCore::DocumentLoader::startLoadingMainResource):
3103
3104             Ensure DocumentLoader doesn't issue conditional requests.
3105
3106 2015-04-28  Jer Noble  <jer.noble@apple.com>
3107
3108         Replace HTMLMediaElement's seek timer with a task queue.
3109         https://bugs.webkit.org/show_bug.cgi?id=144353
3110
3111         Reviewed by Eric Carlson.
3112
3113         No change in functionality, so no new tests added.
3114
3115         Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
3116         make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
3117         GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
3118
3119         * CMakeLists.txt:
3120         * WebCore.vcxproj/WebCore.vcxproj:
3121         * WebCore.vcxproj/WebCore.vcxproj.filters:
3122         * WebCore.xcodeproj/project.pbxproj:
3123         * dom/GenericTaskQueue.cpp: Added.
3124         (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
3125         (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
3126         (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
3127         (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
3128         * dom/GenericTaskQueue.h: Added.
3129         (WebCore::GenericTaskQueue::hasPendingTasks):
3130         * html/HTMLMediaElement.cpp:
3131         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
3132         (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
3133         (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
3134         (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
3135         (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
3136         * html/HTMLMediaElement.h:
3137
3138 2015-04-28  David Kilzer  <ddkilzer@apple.com>
3139
3140         Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
3141         <http://webkit.org/b/144362>
3142
3143         Reviewed by Andy Estes.
3144
3145         This patch switches soft-linking of QuickLook.framework to
3146         QuickLookSoftLink.{h,mm} so that we stop exporting unintended
3147         symbols.
3148
3149         No new tests since no change in behavior.
3150
3151         * WebCore.xcodeproj/project.pbxproj:
3152         - Add QuickLookSoftLinking.{h,mm} to the project.
3153
3154         * platform/ios/QuickLookSoftLink.h: Added.
3155         * platform/ios/QuickLookSoftLink.mm: Added.
3156         * platform/mac/SoftLinking.h:
3157         (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
3158         (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
3159
3160         * platform/network/ios/QuickLook.h:
3161         - Remove unused declarations.
3162
3163         * platform/network/ios/QuickLook.mm:
3164         (WebCore::QLPreviewConverterClass): Deleted.
3165         (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
3166         (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
3167         (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
3168         - Remove SOFT_LINK macros and unused methods after switching to
3169           new QuickLookSoftLink.{h,mm}.
3170         (WebCore::QLPreviewGetSupportedMIMETypesSet):
3171         - Switch to use NeverDestroyed<>.
3172         (WebCore::registerQLPreviewConverterIfNeeded):
3173         (createQLPreviewProtocol):
3174         (WebCore::QLPreviewProtocol):
3175         (WebCore::QuickLookHandle::QuickLookHandle):
3176         (WebCore::QuickLookHandle::create):
3177         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
3178         - Simplify code when using QuickLookSoftLink.h.
3179
3180         * platform/network/ios/WebCoreURLResponseIOS.mm:
3181         - Include QuickLookSoftLink.h header.
3182
3183 2015-04-29  Darin Adler  <darin@apple.com>
3184
3185         [ES6] Implement Unicode code point escapes
3186         https://bugs.webkit.org/show_bug.cgi?id=144377
3187
3188         Reviewed by Antti Koivisto.
3189
3190         Test: js/unicode-escape-sequences.html
3191
3192         * css/CSSParser.cpp:
3193         (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
3194         out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
3195         writing out 0xFFFD.
3196
3197         * html/parser/HTMLEntityParser.cpp:
3198         (WebCore::isAlphaNumeric): Deleted.
3199         (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
3200         U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
3201         because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
3202         but maye it's something we want to do in the future.
3203         (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
3204         of a the function in this file that does the same thing less efficiently.
3205
3206         * html/parser/InputStreamPreprocessor.h:
3207         (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
3208         replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
3209
3210         * xml/parser/CharacterReferenceParserInlines.h:
3211         (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
3212         defining our own local highestValidCharacter constant.
3213
3214 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
3215
3216         [CMake] [GTK] Organize and clean up unused CMake variables
3217         https://bugs.webkit.org/show_bug.cgi?id=144364
3218
3219         Reviewed by Gyuyoung Kim.
3220
3221         * PlatformGTK.cmake: Add variables specific to this project.
3222
3223 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3224
3225         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
3226         https://bugs.webkit.org/show_bug.cgi?id=144388
3227
3228         Reviewed by Brady Eidson.
3229
3230         There used to be a method in ContextMenuItem to check if share
3231         menu item was supported or not, but since r182573, there's a
3232         method to get the share menu item. If the returned menu item is
3233         null, it's not added to the menu, but we are not returning a null
3234         ContextMenu item even though we don't support share menu item.
3235
3236         * platform/gtk/ContextMenuItemGtk.cpp:
3237         (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
3238
3239 2015-04-29  Zan Dobersek  <zdobersek@igalia.com>
3240
3241         Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
3242         https://bugs.webkit.org/show_bug.cgi?id=144232
3243
3244         Reviewed by Darin Adler.
3245
3246         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3247         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): 
3248         Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
3249
3250 2015-04-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>
3251
3252         Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
3253         https://bugs.webkit.org/show_bug.cgi?id=140261
3254
3255         Reviewed by Darin Adler.
3256
3257         We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
3258         because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
3259
3260         * rendering/RenderView.cpp:
3261         (WebCore::isValidObjectForNewSelection):
3262         (WebCore::RenderView::clearSubtreeSelection):
3263         (WebCore::RenderView::applySubtreeSelection):
3264
3265 2015-04-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3266
3267         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
3268         https://bugs.webkit.org/show_bug.cgi?id=143711
3269
3270         Reviewed by Darin Adler.
3271
3272         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
3273         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
3274         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
3275
3276         Test: http/tests/appcache/simple-video-sync.html
3277
3278         * html/HTMLMediaElement.cpp:
3279         (WebCore::HTMLMediaElement::parseAttribute):
3280         * loader/DocumentThreadableLoader.cpp:
3281         (WebCore::DocumentThreadableLoader::loadRequest):
3282         * loader/FrameLoader.cpp:
3283         (WebCore::FrameLoader::loadResourceSynchronously):
3284         * loader/FrameLoader.h:
3285         * loader/appcache/ApplicationCacheHost.cpp:
3286         (WebCore::ApplicationCacheHost::maybeLoadResource):
3287         (WebCore::ApplicationCacheHost::createFileURL):
3288         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
3289         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
3290         * loader/appcache/ApplicationCacheHost.h:
3291         * xml/XSLTProcessorLibxslt.cpp:
3292         (WebCore::docLoaderFunc):
3293         * xml/parser/XMLDocumentParserLibxml2.cpp:
3294         (WebCore::openFunc):
3295
3296 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3297
3298         Purge PassRefPtr from createSVGPathSegFoo factory functions
3299         https://bugs.webkit.org/show_bug.cgi?id=144374
3300
3301         Reviewed by Darin Adler.
3302
3303         Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
3304         those factory functions can't return null. Additionally let's remove unnecessary
3305         #include<PassRefPtr.h> there.
3306
3307         No new tests, no behavior changes.
3308
3309         * svg/SVGColor.cpp:
3310         (WebCore::SVGColor::cloneForCSSOM):
3311         * svg/SVGColor.h:
3312         * svg/SVGGlyphMap.h:
3313         (WebCore::GlyphMapNode::create):
3314         * svg/SVGPaint.cpp:
3315         (WebCore::SVGPaint::cloneForCSSOM):
3316         * svg/SVGPaint.h:
3317         * svg/SVGPathElement.cpp:
3318         (WebCore::SVGPathElement::createSVGPathSegClosePath):
3319         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
3320         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
3321         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
3322         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
3323         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
3324         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
3325         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
3326         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
3327         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
3328         (WebCore::SVGPathElement::createSVGPathSegArcRel):
3329         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
3330         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
3331         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
3332         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
3333         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
3334         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
3335         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
3336         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
3337         * svg/SVGPathElement.h:
3338         * svg/SVGPathSegArcAbs.h:
3339         (WebCore::SVGPathSegArcAbs::create):
3340         * svg/SVGPathSegArcRel.h:
3341         (WebCore::SVGPathSegArcRel::create):
3342         * svg/SVGPathSegClosePath.h:
3343         (WebCore::SVGPathSegClosePath::create):
3344         * svg/SVGPathSegCurvetoCubicAbs.h:
3345         (WebCore::SVGPathSegCurvetoCubicAbs::create):
3346         * svg/SVGPathSegCurvetoCubicRel.h:
3347         (WebCore::SVGPathSegCurvetoCubicRel::create):
3348         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
3349         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
3350         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
3351         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
3352         * svg/SVGPathSegCurvetoQuadraticAbs.h:
3353         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
3354         * svg/SVGPathSegCurvetoQuadraticRel.h:
3355         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
3356         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
3357         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
3358         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
3359         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
3360         * svg/SVGPathSegLinetoAbs.h:
3361         (WebCore::SVGPathSegLinetoAbs::create):
3362         * svg/SVGPathSegLinetoHorizontalAbs.h:
3363         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
3364         * svg/SVGPathSegLinetoHorizontalRel.h:
3365         (WebCore::SVGPathSegLinetoHorizontalRel::create):
3366         * svg/SVGPathSegLinetoRel.h:
3367         (WebCore::SVGPathSegLinetoRel::create):
3368         * svg/SVGPathSegLinetoVerticalAbs.h:
3369         (WebCore::SVGPathSegLinetoVerticalAbs::create):
3370         * svg/SVGPathSegLinetoVerticalRel.h:
3371         (WebCore::SVGPathSegLinetoVerticalRel::create):
3372         * svg/SVGPathSegMovetoAbs.h:
3373         (WebCore::SVGPathSegMovetoAbs::create):
3374         * svg/SVGPathSegMovetoRel.h:
3375         (WebCore::SVGPathSegMovetoRel::create):
3376         * svg/SVGViewSpec.h:
3377         (WebCore::SVGViewSpec::create):
3378         * svg/animation/SMILTimeContainer.h:
3379         (WebCore::SMILTimeContainer::create):
3380         * svg/animation/SVGSMILElement.cpp:
3381         (WebCore::ConditionEventListener::create):
3382         * svg/graphics/SVGImage.h:
3383         * svg/graphics/SVGImageForContainer.h:
3384         * svg/graphics/filters/SVGFilter.cpp:
3385         (WebCore::SVGFilter::create):
3386         * svg/graphics/filters/SVGFilter.h:
3387
3388 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
3389
3390         Make a non-static version of FrameView::yPositionForRootContentLayer()
3391         https://bugs.webkit.org/show_bug.cgi?id=144375
3392
3393         Reviewed by Andy Estes.
3394
3395         There were two calls to the static FrameView::yPositionForRootContentLayer()
3396         which passed in all the arguments for the same FrameView. Make a member
3397         function for convenience.
3398
3399         * page/FrameView.cpp:
3400         (WebCore::FrameView::yPositionForRootContentLayer):
3401         * page/FrameView.h:
3402         * rendering/RenderLayerCompositor.cpp:
3403         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3404
3405 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
3406
3407         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
3408         https://bugs.webkit.org/show_bug.cgi?id=143001