0f4004744be436779b44f6be4b73d1937b43e8a4
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-11  Eric Carlson  <eric.carlson@apple.com>
2
3         [Mac] Update device picker icon when video tracks change
4         https://bugs.webkit.org/show_bug.cgi?id=144889
5         <rdar://problem/20907253>
6
7         Reviewed by Brent Fulgham.
8
9         * Modules/mediacontrols/mediaControlsApple.js:
10         (Controller.prototype.updateHasVideo):
11
12 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
13
14         Scroll snap logic should be triggered when resizing the WebView
15         https://bugs.webkit.org/show_bug.cgi?id=142590
16         <rdar://problem/20125088>
17
18         Reviewed by Simon Fraser.
19
20         Tests coming in a second patch.
21
22         Resizing of the main frame or overflow regions was properly recalculating the scroll snap points,
23         but there was no code to honor these values when window resizing was occurring. The correction was
24         handled in two ways:
25         1. Scrolling thread operations that moved to new snap points needed to notify the main thread that
26            it had shifted to a new snap point, so that the resize code (which happens on the main thread)
27            could ensure that we stayed clamped to the correct 'tile' in the snap region.
28         2. Main thread (overflow) resizes were likewise missing code to honor the current snap position
29            after resizing calculations were complete.
30
31         This change also required the addition of two indices to the scrollable area to track which scroll
32         snap point was currently being used. We don't bother with a 'none' case because you cannot have a
33         'none' state when you have an active set of scroll snap points, and we do not execute this code
34         if the scroll snap points are null.
35
36         The FrameView code was computing updated snap offsets after it had dispatched frame view layout
37         information to the scrolling thread, which was wrong. This was also corrected.
38
39         I think it might be possible to track all of this state inside the ScrollController, but the current
40         scroll snap architecture destroys and recreates the state each time a new set of interactions starts.
41         This should be fixed in the future, which would allow us to remove some of this local state.
42
43         * page/FrameView.cpp:
44         (WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to
45         calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new
46         call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during
47         resize (if appropriate).
48         * page/scrolling/AsyncScrollingCoordinator.cpp:
49         (WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies
50         the correct scroll region when a new snap position (index) has been selected by user interaction on
51         the scrolling thread.
52         (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'.
53         (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
54         * page/scrolling/AsyncScrollingCoordinator.h:
55         * page/scrolling/AxisScrollSnapOffsets.h:
56         (WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track
57         it to handle resize operations.
58         * page/scrolling/ScrollingTree.h:
59         (WebCore::ScrollingTree::updateScrollSnapOffsetIndices):
60         * page/scrolling/ThreadedScrollingTree.cpp:
61         (WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active
62         horizontal and vertical scroll snap indices back to the main thread.
63         * page/scrolling/ThreadedScrollingTree.h:
64         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
65         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes
66         the current event, notify the main thread of any change in the active scroll snap index.
67         * platform/ScrollAnimator.cpp:
68         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator
69         clients to find out about the current scroll snap state, which is only known by the ScrollController.
70         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto.
71         * platform/ScrollAnimator.h:
72         * platform/ScrollView.cpp:
73         (WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position
74         to one of our active scroll snap offsets.
75         * platform/ScrollView.h:
76         * platform/ScrollableArea.cpp:
77         (WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we
78         keep track of the new values for potential resize operations.
79         (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index.
80         (WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto.
81         (WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting
82         the proper scroll position based on the active scroll snap offset.
83         * platform/ScrollableArea.h:
84         (WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added.
85         (WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added.
86         (WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added.
87         (WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added.
88         (WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added.
89         * platform/cocoa/ScrollController.h:
90         (WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement.
91         (WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added.
92         (WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added.
93         * platform/cocoa/ScrollController.mm:
94         (WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active
95         index (if applicable).
96         (WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set
97         the current active index.
98         (WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap
99         index, as well as whether the current animation actually changed the active snap point offset.
100         * platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index
101         that represents the current scroll snap offset.
102         * platform/cocoa/ScrollSnapAnimatorState.mm:
103         (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax.
104         * rendering/RenderLayer.cpp:
105         (WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our
106         active scroll snap points.
107         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that
108         we stay on the current scroll snap offset during resizing.
109         * rendering/RenderLayer.h:
110
111 2015-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
112
113         Addressing post-review comments after r184037.
114
115         Unreviewed.
116
117         No new tests because there is no behavior change.
118
119         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
120         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
121
122 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
123
124         [Win] Move Windows build target to Windows 7 (or newer)
125         https://bugs.webkit.org/show_bug.cgi?id=144890
126         <rdar://problem/20707307>
127
128         Reviewed by Anders Carlsson.
129
130         Update linked SDK and minimal Windows level to be compatible with
131         Windows 7 or newer.
132
133         * WebCore.vcxproj/WebCore.vcxproj:
134         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
135         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
136         * WebCorePrefix.h:
137         * config.h:
138         * testing/js/WebCoreTestSupportPrefix.h:
139
140 2015-05-11  Joanmarie Diggs  <jdiggs@igalia.com>
141
142         AX: [ATK] Always include rows in the tree of accessible tables
143         https://bugs.webkit.org/show_bug.cgi?id=144885
144
145         Reviewed by Chris Fleizach.
146
147         Remove the code that excluded rows from the tree of accessible tables for
148         Gtk and Efl, the latter of which inherited the exclusion from the former.
149
150         No new tests. We already have several tests which cover table hierarchy.
151         The associated expectations have been updated as part of this fix.
152
153         * accessibility/AccessibilityTable.cpp:
154         (WebCore::AccessibilityTable::addChildrenFromSection):
155         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
156         (webkitAccessibleGetParent):
157
158 2015-05-11  Matt Baker  <mattbaker@apple.com>
159
160         Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector
161         https://bugs.webkit.org/show_bug.cgi?id=144808
162
163         Reviewed by Darin Adler.
164
165         Profiles started from the console should always use the Inspector environment's shared stopwatch.
166
167         * inspector/InspectorTimelineAgent.cpp:
168         (WebCore::InspectorTimelineAgent::startFromConsole):
169
170 2015-05-11  Alex Christensen  <achristensen@webkit.org>
171
172         [Content Extensions] Support domain-specific rules and exceptions.
173         https://bugs.webkit.org/show_bug.cgi?id=144833
174
175         Reviewed by Darin Adler.
176
177         Test: http/tests/contentextensions/domain-rules.html
178         (And lots of API tests)
179
180         This patch adds if-domain and unless-domain to the trigger in the JSON format.
181         if-domain makes the rule apply only to domains in the list.
182         unless-domain makes the rule apply to domains that are not in the list.
183         
184         All rules without if-domain or unless-domain are compiled into a set of DFAs.  This behavior is unchanged.
185         All rules with if-domain or unless-domain are compiled into a separate set of DFAs.
186         The domains are also compiled into another set of DFAs.  This makes 3 arrays of DFA bytecode instead of 1.
187         
188         If there are no domain specific rules, there is no change in behavior.
189         If there are domain specific rules, the URL will be checked for matches in both
190         filtersWithoutDomainsBytecode and filtersWithDomainsBytecode.  If there are matches from 
191         filtersWithDomainsBytecode then the domain of the main document will be checked with 
192         domainFiltersBytecode to see which of the matches applies to this domain.
193
194         * contentextensions/CombinedURLFilters.cpp:
195         (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
196         (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
197         * contentextensions/CombinedURLFilters.h:
198         Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR.
199         * contentextensions/CompiledContentExtension.cpp:
200         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
201         * contentextensions/CompiledContentExtension.h:
202         * contentextensions/ContentExtensionCompiler.cpp:
203         (WebCore::ContentExtensions::serializeActions):
204         (WebCore::ContentExtensions::compileRuleList):
205         Separate the rules into rules with domains and rules without domains and compile to bytecode.
206         * contentextensions/ContentExtensionCompiler.h:
207         Updated compiler interface to reflect the slightly more complicated structure.
208         * contentextensions/ContentExtensionError.cpp:
209         (WebCore::ContentExtensions::contentExtensionErrorCategory):
210         * contentextensions/ContentExtensionError.h:
211         Added new parsing errors.
212         * contentextensions/ContentExtensionParser.cpp:
213         (WebCore::ContentExtensions::getDomainList):
214         (WebCore::ContentExtensions::loadTrigger):
215         (WebCore::ContentExtensions::loadEncodedRules):
216         * contentextensions/ContentExtensionRule.h:
217         (WebCore::ContentExtensions::Trigger::operator==):
218         Parse the new domain structures from JSON into the Trigger structure.
219         * contentextensions/ContentExtensionsBackend.cpp:
220         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
221         Interpret as much bytecode as necessary to determine which rules apply to this URL and domain.
222         * contentextensions/DFABytecode.h:
223         (WebCore::ContentExtensions::instructionSizeWithArguments):
224         * contentextensions/DFABytecodeCompiler.cpp:
225         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
226         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction):
227         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
228         * contentextensions/DFABytecodeCompiler.h:
229         * contentextensions/DFABytecodeInterpreter.cpp:
230         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
231         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
232         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
233         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
234         * contentextensions/DFABytecodeInterpreter.h:
235         * loader/ResourceLoadInfo.h:
236         Keep track of which actions have an if-domain trigger.  If an action is in the 
237         filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger.
238         This requires additional information in the bytecode, so there are two new bytecode types.
239
240 2015-05-11  Yoav Weiss  <yoav@yoav.ws>
241
242         Add srcset, sizes and picture to the features json
243         https://bugs.webkit.org/show_bug.cgi?id=144862
244
245         Reviewed by Benjamin Poulain.
246
247         Add the srcset w descriptor and sizes attribute as a new feature in the JSON file,
248         as well as adding the picture element and srcset's x descriptor as seperate features.
249
250         No new tests, since no new functionality added.
251
252         * features.json:
253
254 2015-05-11  Chris Dumez  <cdumez@apple.com>
255
256         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
257         https://bugs.webkit.org/show_bug.cgi?id=144873
258
259         Reviewed by Simon Fraser.
260
261         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate().
262         checkingLogicalHeight should only be initialized to true when
263         "dimensionsCheck & WidthDimensionsCheck" if isVertical is true.
264
265         * dom/Document.cpp:
266         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
267
268 2015-05-11  Daniel Bates  <dabates@apple.com>
269
270         [iOS] Close all open databases in expiration handler of process assertion
271         https://bugs.webkit.org/show_bug.cgi?id=144661
272         <rdar://problem/20845052>
273
274         Reviewed by Darin Adler.
275
276         Expose functionality in WebCore to close all open databases. Closing a SQLite database
277         will interrupt any in-progress database transactions.
278
279         * Modules/webdatabase/AbstractDatabaseServer.h:
280         * Modules/webdatabase/DatabaseManager.cpp:
281         (WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases().
282         * Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that
283         we can call in from WebKit2.
284         * Modules/webdatabase/DatabaseServer.cpp:
285         (WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases().
286         * Modules/webdatabase/DatabaseServer.h:
287         * Modules/webdatabase/DatabaseTracker.cpp:
288         (WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases.
289         * Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that
290         we can call in from Legacy WebKit.
291
292 2015-05-11  Antti Koivisto  <antti@apple.com>
293
294         WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6
295         https://bugs.webkit.org/show_bug.cgi?id=144870
296         rdar://problem/20727702
297
298         Reviewed by Simon Fraser.
299
300         No repro but we are seeing null pointer crashes like this:
301
302         Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
303         0   com.apple.WebCore   0x00007fff92da5706 WebCore::WebKitCSSResourceValue::isCSSValueNone() const + 6
304         1   com.apple.WebCore   0x00007fff93382b48 WebCore::MaskImageOperation::isCSSValueNone() const + 24
305         2   com.apple.WebCore   0x00007fff92e0475e WebCore::FillLayer::hasNonEmptyMaskImage() const + 30
306
307         * platform/graphics/MaskImageOperation.cpp:
308         (WebCore::MaskImageOperation::MaskImageOperation):
309         (WebCore::MaskImageOperation::isCSSValueNone):
310
311             This would crash like this if both m_styleImage and m_cssMaskImageValue are null.
312             There are no obvious guarantees that this doesn't happen. Two of the constructor variants allow it
313             and there is setImage which may turn m_styleImage null later too.
314
315             Fix by making null m_cssMaskImageValue always signify CSSValueNone.
316
317         (WebCore::MaskImageOperation::cssValue):
318
319 2015-05-11  Chris Fleizach  <cfleizach@apple.com>
320
321         AX: Crash at WebCore::AccessibilityMenuList::addChildren()
322         https://bugs.webkit.org/show_bug.cgi?id=144860
323
324         Reviewed by Mario Sanchez Prada.
325
326         There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up.
327
328         Test: accessibility/menu-list-crash2.html
329
330         * accessibility/AccessibilityMenuList.cpp:
331         (WebCore::AccessibilityMenuList::addChildren):
332
333 2015-05-11  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
334
335         [WebGL] Unnecessary condition check in the while loop
336         https://bugs.webkit.org/show_bug.cgi?id=125001
337
338         Reviewed by Csaba Osztrogonác.
339
340         While loop in this case needs to be optimized a little.
341         For now a conditional statement in while will execute two
342         times at begin. do-while loop avoids to check first statement.
343
344         No new tests. No behaviour changed.
345
346         * html/canvas/WebGLFramebuffer.cpp:
347         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
348
349 2015-05-11  Joonghun Park  <jh718.park@samsung.com>
350
351         [GTK] Reorder Performance class's member initialization sequence
352         https://bugs.webkit.org/show_bug.cgi?id=144858
353
354         Reviewed by Csaba Osztrogonác.
355
356         No new tests, no new behaviors.
357
358         * page/Performance.cpp:
359         (WebCore::Performance::Performance):
360
361 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
362
363         Reduce TransformationMatrix copies in WebKitCSSMatrix operations
364         https://bugs.webkit.org/show_bug.cgi?id=144795
365
366         Reviewed by Darin Adler.
367
368         Instead of copying the TransformationMatrix member, performing
369         the operation on it and then copying it again when creating
370         the new WebKitCSSMatrix object, copy it just once by first
371         creating the new WebKitCSSMatrix object and then performing
372         the operation on that object's TransformationMatrix directly.
373
374         * css/WebKitCSSMatrix.cpp:
375         (WebCore::WebKitCSSMatrix::multiply):
376         (WebCore::WebKitCSSMatrix::translate):
377         (WebCore::WebKitCSSMatrix::scale):
378         (WebCore::WebKitCSSMatrix::rotate):
379         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
380         (WebCore::WebKitCSSMatrix::skewX):
381         (WebCore::WebKitCSSMatrix::skewY):
382
383 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
384
385         Add missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
386         https://bugs.webkit.org/show_bug.cgi?id=144793
387
388         Reviewed by Darin Adler.
389
390         Update virtual method overrides under Source/WebCore/loader
391         and Source/WebCore/dom which are missing the override specifier.
392
393         * loader/DocumentThreadableLoader.h:
394         (WebCore::DocumentThreadableLoader::refThreadableLoader):
395         (WebCore::DocumentThreadableLoader::derefThreadableLoader):
396         * loader/cache/CachedRawResource.h:
397         * xml/parser/XMLDocumentParser.h:
398
399 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
400
401         Add missing vtable override specifiers under Source/WebCore/accessibility, Source/WebCore/dom
402         https://bugs.webkit.org/show_bug.cgi?id=144792
403
404         Reviewed by Darin Adler.
405
406         Update virtual method overrides under Source/WebCore/accessibility
407         and Source/WebCore/dom which are missing the override specifier.
408
409         * accessibility/AccessibilityMockObject.h:
410         (WebCore::AccessibilityMockObject::isDetachedFromParent): Deleted.
411         * accessibility/AccessibilityRenderObject.h:
412         * dom/DecodedDataDocumentParser.h:
413         * dom/TouchEvent.h:
414
415 2015-05-10  Zan Dobersek  <zdobersek@igalia.com>
416
417         Have MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
418         https://bugs.webkit.org/show_bug.cgi?id=144794
419
420         Reviewed by Philippe Normand.
421
422         * Modules/mediastream/MediaStream.h: getAudioTracks() and getVideoTracks()
423         should return a const reference to the member variables, instead of
424         copying the objects on every call.
425
426 2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
427
428         Use Ref instead of PassRefPtr in WebCore/page
429         https://bugs.webkit.org/show_bug.cgi?id=144841
430
431         Reviewed by Darin Adler.
432
433         To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
434         in WebCore/page.
435
436         No new tests, no behavior changes.
437
438         * page/DebugPageOverlays.cpp:
439         * page/EventSource.cpp:
440         (WebCore::EventSource::create):
441         * page/EventSource.h:
442         * page/History.h:
443         (WebCore::History::create):
444         * page/Location.h:
445         (WebCore::Location::create):
446         * page/MainFrame.cpp:
447         (WebCore::MainFrame::create):
448         * page/MainFrame.h:
449         * page/Navigator.h:
450         (WebCore::Navigator::create):
451         * page/PageOverlay.cpp:
452         (WebCore::PageOverlay::create):
453         * page/PageOverlay.h:
454         * page/Performance.h:
455         * page/PerformanceEntryList.h:
456         (WebCore::PerformanceEntryList::create):
457         * page/PerformanceMark.h:
458         (WebCore::PerformanceMark::create):
459         * page/PerformanceMeasure.h:
460         (WebCore::PerformanceMeasure::create):
461         * page/PerformanceNavigation.h:
462         (WebCore::PerformanceNavigation::create):
463         * page/PerformanceResourceTiming.h:
464         (WebCore::PerformanceResourceTiming::create):
465         * page/PerformanceTiming.h:
466         (WebCore::PerformanceTiming::create):
467         * page/PerformanceUserTiming.h:
468         (WebCore::UserTiming::create):
469         * page/Screen.h:
470         * page/Settings.cpp:
471         (WebCore::Settings::create):
472         * page/Settings.h:
473         * page/TextIndicator.cpp:
474         (WebCore::TextIndicator::create):
475         * page/TextIndicator.h:
476         * page/UserContentController.cpp:
477         (WebCore::UserContentController::create):
478         * page/UserContentController.h:
479         * page/UserMessageHandlerDescriptor.h:
480         (WebCore::UserMessageHandlerDescriptor::create):
481         * page/UserMessageHandlersNamespace.h:
482         * page/VisitedLinkStore.h:
483         * page/WebKitNamespace.h:
484         (WebCore::WebKitNamespace::create):
485         * page/WebKitPoint.h:
486         (WebCore::WebKitPoint::create):
487         * page/WorkerNavigator.h:
488         (WebCore::WorkerNavigator::create):
489         * page/animation/ImplicitAnimation.h:
490         (WebCore::ImplicitAnimation::create):
491         * page/animation/KeyframeAnimation.h:
492         * page/mac/ServicesOverlayController.h:
493         * page/mac/ServicesOverlayController.mm:
494         (WebCore::ServicesOverlayController::Highlight::createForSelection):
495         (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
496         * page/scrolling/ScrollingCoordinator.cpp:
497         (WebCore::ScrollingCoordinator::create):
498         * page/scrolling/ScrollingCoordinator.h:
499         * page/scrolling/ScrollingStateFixedNode.cpp:
500         (WebCore::ScrollingStateFixedNode::create):
501         (WebCore::ScrollingStateFixedNode::clone):
502         * page/scrolling/ScrollingStateFixedNode.h:
503         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
504         (WebCore::ScrollingStateFrameScrollingNode::create):
505         (WebCore::ScrollingStateFrameScrollingNode::clone):
506         * page/scrolling/ScrollingStateFrameScrollingNode.h:
507         * page/scrolling/ScrollingStateNode.h:
508         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
509         (WebCore::ScrollingStateOverflowScrollingNode::create):
510         (WebCore::ScrollingStateOverflowScrollingNode::clone):
511         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
512         * page/scrolling/ScrollingStateStickyNode.cpp:
513         (WebCore::ScrollingStateStickyNode::create):
514         (WebCore::ScrollingStateStickyNode::clone):
515         * page/scrolling/ScrollingStateStickyNode.h:
516         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
517         (WebCore::ScrollingCoordinator::create):
518         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
519         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
520         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
521         * page/scrolling/ios/ScrollingTreeIOS.cpp:
522         (WebCore::ScrollingTreeIOS::create):
523         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
524         (WebCore::ScrollingCoordinator::create):
525         * page/scrolling/mac/ScrollingTreeFixedNode.h:
526         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
527         (WebCore::ScrollingTreeFixedNode::create):
528         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
529         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
530         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
531         * page/scrolling/mac/ScrollingTreeMac.cpp:
532         (ScrollingTreeMac::create):
533         * page/scrolling/mac/ScrollingTreeMac.h:
534         * page/scrolling/mac/ScrollingTreeStickyNode.h:
535         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
536         (WebCore::ScrollingTreeStickyNode::create):
537
538 2015-05-10  Simon Fraser  <simon.fraser@apple.com>
539
540         background-position sometimes doesn't work properly with background-attachment: fixed
541         https://bugs.webkit.org/show_bug.cgi?id=103757
542         rdar://problem/18749925
543
544         Reviewed by Darin Adler.
545         
546         Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in
547         effect.
548         
549         The primary issue was that positioningAreaSize was including the top content inset
550         height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates"
551         code path, which kicks in when the root background is fixed.
552
553         Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html
554                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html
555                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html
556                platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html
557
558         * rendering/RenderBoxModelObject.cpp:
559         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
560
561 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
562
563         Get rid of the public item accessors in BackForwardClient
564         https://bugs.webkit.org/show_bug.cgi?id=144827
565
566         Reviewed by Darin Adler.
567
568         Remove backItem(), currentItem(), and forwardItem() from BackForwardClient.
569         We can still use these functionalities through BackForwardController.
570
571         No new tests, no behavior change.
572
573         * history/BackForwardClient.h:
574         (WebCore::BackForwardClient::backItem): Deleted.
575         (WebCore::BackForwardClient::currentItem): Deleted.
576         (WebCore::BackForwardClient::forwardItem): Deleted.
577
578 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
579
580         Rename Length::isPercent() and Length::isPercentNotCalculated().
581         https://bugs.webkit.org/show_bug.cgi?id=144791
582
583         Reviewed by Darin Adler.
584
585         1. Rename these methods as below for consistency and clarity.
586
587         Length::isPercentNotCalculated() => Length::isPercent()
588         Length::isPercent() => Length::isPercentOrCalculated()
589
590         2. Simplify the condition check of length type in SVGLengthContext::valueForLength().
591
592         "length.isPercent() && !length.isCalculated()" => "length.isPercent()"
593
594         No new tests, no behavior change.
595
596         * css/CSSComputedStyleDeclaration.cpp:
597         (WebCore::valueForImageSliceSide):
598         (WebCore::valueForReflection):
599         (WebCore::percentageOrZoomAdjustedValue):
600         (WebCore::lineHeightFromStyle):
601         (WebCore::ComputedStyleExtractor::propertyValue):
602         * html/HTMLPlugInImageElement.cpp:
603         (WebCore::is100Percent):
604         * page/animation/AnimationBase.cpp:
605         (WebCore::AnimationBase::computeTransformedExtentViaTransformList):
606         * platform/Length.h:
607         (WebCore::Length::percent):
608         (WebCore::Length::isPercent):
609         (WebCore::Length::isPercentOrCalculated):
610         (WebCore::Length::isSpecified):
611         (WebCore::Length::isPercentNotCalculated): Deleted.
612         * platform/graphics/transforms/TranslateTransformOperation.h:
613         * rendering/AutoTableLayout.cpp:
614         (WebCore::AutoTableLayout::recalcColumn):
615         (WebCore::AutoTableLayout::fullRecalc):
616         (WebCore::shouldScaleColumns):
617         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
618         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
619         (WebCore::AutoTableLayout::layout):
620         * rendering/FixedTableLayout.cpp:
621         (WebCore::FixedTableLayout::calcWidthArray):
622         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
623         (WebCore::FixedTableLayout::layout):
624         * rendering/RenderBlock.cpp:
625         (WebCore::RenderBlock::isSelfCollapsingBlock):
626         (WebCore::RenderBlock::textIndentOffset):
627         * rendering/RenderBox.cpp:
628         (WebCore::RenderBox::needsPreferredWidthsRecalculation):
629         (WebCore::RenderBox::computeLogicalHeight):
630         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
631         (WebCore::RenderBox::computePercentageLogicalHeight):
632         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
633         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
634         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
635         (WebCore::RenderBox::availableLogicalHeightUsing):
636         (WebCore::logicalWidthIsResolvable):
637         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
638         (WebCore::RenderBox::hasUnsplittableScrollingOverflow):
639         (WebCore::RenderBox::layoutOverflowRectForPropagation):
640         * rendering/RenderBoxModelObject.cpp:
641         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
642         (WebCore::RenderBoxModelObject::relativePositionOffset):
643         (WebCore::RenderBoxModelObject::computedCSSPadding):
644         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
645         (WebCore::RenderBoxModelObject::calculateFillTileSize):
646         * rendering/RenderDeprecatedFlexibleBox.cpp:
647         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
648         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
649         * rendering/RenderElement.cpp:
650         (WebCore::mustRepaintFillLayers):
651         * rendering/RenderFileUploadControl.cpp:
652         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
653         * rendering/RenderFrameSet.cpp:
654         (WebCore::RenderFrameSet::layOutAxis):
655         * rendering/RenderImage.cpp:
656         (WebCore::RenderImage::repaintOrMarkForLayout):
657         * rendering/RenderInline.cpp:
658         (WebCore::computeMargin):
659         * rendering/RenderListBox.cpp:
660         (WebCore::RenderListBox::computeIntrinsicLogicalWidths):
661         * rendering/RenderMenuList.cpp:
662         (RenderMenuList::computeIntrinsicLogicalWidths):
663         * rendering/RenderObject.cpp:
664         (WebCore::objectIsRelayoutBoundary):
665         * rendering/RenderReplaced.cpp:
666         (WebCore::RenderReplaced::computePreferredLogicalWidths):
667         * rendering/RenderSlider.cpp:
668         (WebCore::RenderSlider::computeIntrinsicLogicalWidths):
669         * rendering/RenderTable.cpp:
670         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
671         * rendering/RenderTableSection.cpp:
672         (WebCore::RenderTableSection::layoutRows):
673         * rendering/RenderTextControl.cpp:
674         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
675         * rendering/RenderView.cpp:
676         (WebCore::RenderView::layout):
677         * rendering/RootInlineBox.cpp:
678         (WebCore::RootInlineBox::verticalPositionForBox):
679         * rendering/style/GridLength.h:
680         (WebCore::GridLength::isPercentage):
681         * rendering/style/GridTrackSize.h:
682         (WebCore::GridTrackSize::isPercentage):
683         * rendering/style/RenderStyle.cpp:
684         (WebCore::RenderStyle::computedLineHeight):
685         * rendering/svg/RenderSVGRoot.cpp:
686         (WebCore::RenderSVGRoot::hasRelativeDimensions):
687         * svg/SVGLengthContext.cpp:
688         (WebCore::SVGLengthContext::valueForLength):
689         * svg/graphics/SVGImage.cpp:
690         (WebCore::SVGImage::hasRelativeWidth):
691         (WebCore::SVGImage::hasRelativeHeight):
692
693 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
694
695         Remove unnecessary semicolons.
696         https://bugs.webkit.org/show_bug.cgi?id=144844
697
698         Reviewed by Darin Adler.
699
700         No new tests, no behavior change.
701
702         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
703         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
704         * platform/ios/PasteboardIOS.mm:
705         (WebCore::Pasteboard::readString):
706         * platform/mediastream/RealtimeMediaSourceCapabilities.h:
707         (WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource):
708         * platform/network/mac/ResourceErrorMac.mm:
709         (WebCore::ResourceError::nsError):
710         * rendering/RenderThemeIOS.mm:
711         (WebCore::getSharedFunctionRef):
712
713 2015-05-10  Sungmann Cho  <sungmann.cho@navercorp.com>
714
715         Remove unnecessary forward declarations in StyleProperties.h
716         https://bugs.webkit.org/show_bug.cgi?id=144843
717
718         Reviewed by Darin Adler.
719
720         No new tests, no behavior change.        
721
722         * css/StyleProperties.h:
723
724 2015-05-10  Darin Adler  <darin@apple.com>
725
726         [Cocoa] Fix paths and resort WebCore project file
727         https://bugs.webkit.org/show_bug.cgi?id=144838
728
729         Reviewed by Dan Bernstein.
730
731         * WebCore.xcodeproj/project.pbxproj: Re-sorted this file with the
732         sort-Xcode-project-file script and fixed the paths in the platform/ios directory.
733
734 2015-05-10  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
735
736         [Streams API] Refactor ReadableStreamReader close promise callback cleaning
737         https://bugs.webkit.org/show_bug.cgi?id=144799
738
739         Reviewed by Darin Adler.
740
741         Moved close callback cleaning to releaseStream, which is now releaseStreamAndClean.
742         Moved that method to private as it is no longer needed by subclasses.
743
744         No behavior changes.
745
746         * Modules/streams/ReadableStreamReader.cpp:
747         (WebCore::ReadableStreamReader::releaseStreamAndClean):
748         (WebCore::ReadableStreamReader::changeStateToClosed):
749         (WebCore::ReadableStreamReader::changeStateToErrored):
750         * Modules/streams/ReadableStreamReader.h:
751
752 2015-05-10  Darin Adler  <darin@apple.com>
753
754         [Cocoa] Don't soft link DataDetectorsCore
755         https://bugs.webkit.org/show_bug.cgi?id=144837
756
757         Reviewed by Dan Bernstein.
758
759         Linking this in the normal way should slightly speed up the web process
760         startup time. We don't need to soft link it: It's present in the
761         OS X base system and there is no reference cycle with WebKit.
762
763         * Configurations/WebCore.xcconfig: Added PrivateFrameworks to
764         FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to
765         OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too.
766
767         * WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h.
768
769         * editing/mac/DataDetection.mm:
770         (WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see
771         if DataDetectorsCore is available.
772
773         * page/mac/ServicesOverlayController.h: Simplified a forward declaration to
774         only declare what we actually use.
775         * page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the
776         DataDetectorsSPI.h header.
777
778         * platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level
779         DataDetectorsCore framework, which has no reference cycle with WebKit, and
780         which we can link to normally. Moved the content here from DataDetectorsSPI.h,
781         added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed
782         the incorrect return type on DDScannerScanQuery, which was detected when
783         using the system headers in conjunction with this file.
784
785         * platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that
786         was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK)
787         path that uses the system headers and moved a few stray DataDetectors SPI
788         definitions from elsewhere into this header.
789
790 2015-05-10  Chris Fleizach  <cfleizach@apple.com>
791
792         AX: Don't expose elements as data tables just because they use display: table
793         https://bugs.webkit.org/show_bug.cgi?id=144804
794
795         Reviewed by Mario Sanchez Prada.
796
797         Elements will create RenderTable objects if they have display:table. We shouldn't assume these are accessibility tables.
798
799         Test: accessibility/css-table-ignored.html
800
801         * accessibility/AccessibilityTable.cpp:
802         (WebCore::AccessibilityTable::isDataTable):
803
804 2015-05-09  Chris Dumez  <cdumez@apple.com>
805
806         Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
807         https://bugs.webkit.org/show_bug.cgi?id=144825
808
809         Reviewed by Sam Weinig.
810
811         Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
812         specification and to avoid IDL code duplication:
813         - https://dom.spec.whatwg.org/#interface-parentnode
814         - https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
815
816         No Web-Exposed behavior change.
817
818         * CMakeLists.txt:
819         * DerivedSources.make:
820         * WebCore.xcodeproj/project.pbxproj:
821         * dom/CharacterData.idl:
822         * dom/Document.idl:
823         * dom/DocumentFragment.idl:
824         * dom/Element.idl:
825         * dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
826         * dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
827
828 2015-05-09  Chris Dumez  <cdumez@apple.com>
829
830         Invalidate the FontCache on WebProcess suspension / critical memory pressure
831         https://bugs.webkit.org/show_bug.cgi?id=144821
832
833         Reviewed by Antti Koivisto.
834
835         Invalidate the FontCache on WebProcess suspension / critical memory
836         pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
837         the pages I tested). We already purge inactive font data on
838         non-critical memory warning but invalidating the whole FontCache takes
839         care of clearing the FontCascade cache and the fontPlatformData cache
840         as well.
841
842         * platform/MemoryPressureHandler.cpp:
843         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
844
845 2015-05-09  Yoav Weiss  <yoav@yoav.ws>
846
847         Remove the PICTURE_SIZES build flag
848         https://bugs.webkit.org/show_bug.cgi?id=144679
849
850         Reviewed by Benjamin Poulain.
851
852         Removed the PICTURE_SIZES build time flag.
853
854         No new tests, since there's no functionality change.
855
856         * Configurations/FeatureDefines.xcconfig:
857         * css/CSSGrammar.y.in:
858         * css/CSSParser.cpp:
859         (WebCore::CSSParser::detectAtToken):
860         * css/CSSParser.h:
861         * css/SourceSizeList.cpp:
862         (WebCore::parseSizesAttribute): Deleted.
863         * html/HTMLImageElement.cpp:
864         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
865         * html/HTMLImageElement.h:
866         (WebCore::HTMLImageElement::currentSrc):
867         * html/HTMLImageElement.idl:
868         * html/parser/HTMLPreloadScanner.cpp:
869         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
870         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
871         * html/parser/HTMLSrcsetParser.cpp:
872         (WebCore::parseDescriptors):
873         (WebCore::pickBestImageCandidate):
874
875 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
876
877         Remove convenience constructors for TextRun
878         https://bugs.webkit.org/show_bug.cgi?id=144752
879
880         These convenience constructors are unnecessary. Moving the code that makes the StringView
881         back to the call site will also help us make things more elegant in future refactoring.
882
883         Reviewed by Darin Adler.
884
885         No new tests because there is no behavior change.
886
887         * css/CSSPrimitiveValue.cpp:
888         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
889         * platform/graphics/StringTruncator.cpp:
890         (WebCore::stringWidth):
891         * platform/graphics/TextRun.h:
892         (WebCore::TextRun::TextRun):
893         * platform/mac/DragImageMac.mm:
894         (WebCore::widthWithFont):
895         (WebCore::drawAtPoint):
896         * rendering/SimpleLineLayout.cpp:
897         (WebCore::SimpleLineLayout::canUseFor):
898         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
899         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
900         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
901         * rendering/TextPainter.cpp:
902         (WebCore::TextPainter::paintText):
903
904 2015-05-08  Sam Weinig  <sam@webkit.org>
905
906         Element Traversal is not just Elements anymore
907         https://bugs.webkit.org/show_bug.cgi?id=144822
908
909         Reviewed by Simon Fraser.
910
911         Match other browsers and the new DOM spec at https://dom.spec.whatwg.org by
912         exposing the element traversal methods on non-Elements.
913
914         - Makes firstElementChild, lastElementChild and childElementCount available on
915           Document and DocumentFragment in addition to Element.
916         - Makes nextElementSibling and previousElementSibling available on CharacterData
917           in addition to Element.
918
919         Tests: fast/dom/element-traversal-on-character-data.html
920                fast/dom/element-traversal-on-document-fragment.html
921                fast/dom/element-traversal-on-document.html
922
923         * dom/CharacterData.idl:
924         Expose nextElementSibling and previousElementSibling.
925
926         * dom/ContainerNode.cpp:
927         (WebCore::ContainerNode::firstElementChild):
928         (WebCore::ContainerNode::lastElementChild):
929         (WebCore::ContainerNode::childElementCount):
930         * dom/ContainerNode.h:
931         Move implementations of firstElementChild, lastElementChild and childElementCount here
932         from Element to make them shareable.
933
934         * dom/Document.idl:
935         * dom/DocumentFragment.idl:
936         Expose firstElementChild, lastElementChild and childElementCount.
937
938         * dom/Element.cpp:
939         (WebCore::Element::firstElementChild): Deleted.
940         (WebCore::Element::lastElementChild): Deleted.
941         (WebCore::Element::previousElementSibling): Deleted.
942         (WebCore::Element::nextElementSibling): Deleted.
943         (WebCore::Element::childElementCount): Deleted.
944         * dom/Element.h:
945         Move element traversal functions down to Node and ContainerNode.
946
947         * dom/Element.idl:
948         Update comments to indicate where these functions are defined now.
949
950         * dom/Node.cpp:
951         (WebCore::Node::previousElementSibling):
952         (WebCore::Node::nextElementSibling):
953         * dom/Node.h:
954         Move implementations of nextElementSibling and previousElementSibling here
955         from Element to make them shareable.
956
957 2015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>
958
959         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
960         https://bugs.webkit.org/show_bug.cgi?id=144746
961
962         Reviewed by Carlos Garcia Campos.
963
964         Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.
965
966         * platform/gtk/GtkUtilities.cpp:
967         * platform/gtk/GtkUtilities.h:
968         * platform/text/gtk/HyphenationLibHyphen.cpp:
969         (WebCore::availableLocales):
970
971 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
972
973         Crashes in SocketStreamHandleBase::close
974         https://bugs.webkit.org/show_bug.cgi?id=144767
975         rdar://problem/20486538
976
977         Reviewed by Brady Eidson.
978
979         This is a speculative fix, I could not reproduce the crash.
980
981         * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame):
982         Normally, processOutgoingFrameQueue() closes the handle in the end when called in
983         OutgoingFrameQueueClosing state. But there is no definitive protection against
984         processing two CLOSE frames, in which case we'd try to close the handle twice.
985
986         * platform/network/cf/SocketStreamHandleCFNet.cpp:
987         (WebCore::SocketStreamHandle::readStreamCallback): Passing empty data to the client
988         results in the socket being closed, which makes no sense here.
989
990 2015-05-08  Commit Queue  <commit-queue@webkit.org>
991
992         Unreviewed, rolling out r183996.
993         https://bugs.webkit.org/show_bug.cgi?id=144806
994
995         ASan detected use-after free (Requested by ap on #webkit).
996
997         Reverted changeset:
998
999         "Remove convenience constructors for TextRun"
1000         https://bugs.webkit.org/show_bug.cgi?id=144752
1001         http://trac.webkit.org/changeset/183996
1002
1003 2015-05-08  Eric Carlson  <eric.carlson@apple.com>
1004
1005         [Mac] Playback target clients do not unregister on page reload
1006         https://bugs.webkit.org/show_bug.cgi?id=144761
1007
1008         Reviewed by Brady Eidson.
1009
1010         * dom/Document.cpp:
1011         (WebCore::Document::prepareForDestruction): Unregister all target picker clients.
1012
1013         * html/HTMLMediaElement.cpp:
1014         (WebCore::HTMLMediaElement::registerWithDocument): Register for page cache callback.
1015         (WebCore::HTMLMediaElement::unregisterWithDocument): Unregister for page cache callback.
1016         (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): New.
1017         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): New.
1018
1019 2015-05-08  Chris Dumez  <cdumez@apple.com>
1020
1021         Throttle RequestAnimationFrame in subframes that are outside the viewport
1022         https://bugs.webkit.org/show_bug.cgi?id=144718
1023         <rdar://problem/20688782>
1024
1025         Reviewed by Simon Fraser.
1026
1027         Throttle RequestAnimationFrame in subframes that are outside the
1028         viewport or have "display: none" for performance and power.
1029
1030         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
1031                fast/animation/request-animation-frame-throttle-subframe.html
1032
1033         * dom/Document.h:
1034         (WebCore::Document::scriptedAnimationController):
1035         * dom/ScriptedAnimationController.cpp:
1036         (WebCore::ScriptedAnimationController::setThrottled):
1037         (WebCore::ScriptedAnimationController::isThrottled):
1038         * dom/ScriptedAnimationController.h:
1039         * loader/FrameLoader.cpp:
1040         (WebCore::FrameLoader::open):
1041         Call FrameView::setFrameRect() only *after* the view has been
1042         set on the Frame. Otherwise, setFrameRect() ends up calling
1043         viewportContentsChanged() and we hit the
1044         ASSERT(frame().view() == this) assertion in windowClipRect()
1045         because the Frame still has its old FrameView. This is covered
1046         by loader/go-back-to-different-window-size.html layout test.
1047
1048         * page/FrameView.cpp:
1049         (WebCore::FrameView::viewportContentsChanged):
1050         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
1051         (WebCore::FrameView::resumeVisibleImageAnimations):
1052         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
1053         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
1054         (WebCore::FrameView::updateThrottledDOMTimersState):
1055         (WebCore::FrameView::scrollPositionChanged): Deleted.
1056         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
1057         * page/FrameView.h:
1058         * testing/Internals.cpp:
1059         (WebCore::Internals::isRequestAnimationFrameThrottled):
1060         (WebCore::Internals::isTimerThrottled): Deleted.
1061         * testing/Internals.h:
1062         * testing/Internals.idl:
1063
1064 2015-05-08  Daniel Bates  <dabates@apple.com>
1065
1066         Fix the iOS Simulator external SDK build following <http://trac.webkit.org/changeset/181918>
1067
1068         Remove unused iOS Simulator-variant of CARenderServerRenderLayerWithTransform(). Also guard
1069         IOSurfaceRef-variant of CARenderServerRenderLayerWithTransform() with USE(IOSURFACE)
1070         since it is only applicable on platforms that use IOSurface.
1071
1072         * platform/spi/cocoa/QuartzCoreSPI.h:
1073
1074 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
1075
1076         Remove convenience constructors for TextRun
1077         https://bugs.webkit.org/show_bug.cgi?id=144752
1078
1079         These convenience constructors are unnecessary. Moving the code that makes the StringView
1080         back to the call site will also help us make things more elegant in future refactoring.
1081
1082         Reviewed by Darin Adler.
1083
1084         No new tests because there is no behavior change.
1085
1086         * css/CSSPrimitiveValue.cpp:
1087         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
1088         * platform/graphics/StringTruncator.cpp:
1089         (WebCore::stringWidth):
1090         * platform/graphics/TextRun.h:
1091         (WebCore::TextRun::TextRun):
1092         * platform/mac/DragImageMac.mm:
1093         (WebCore::widthWithFont):
1094         (WebCore::drawAtPoint):
1095         * rendering/SimpleLineLayout.cpp:
1096         (WebCore::SimpleLineLayout::canUseFor):
1097         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1098         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
1099         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
1100         * rendering/TextPainter.cpp:
1101         (WebCore::TextPainter::paintText):
1102
1103 2015-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1104
1105         [Streams API] ReadableStream constructor start function should be able to error the stream
1106         https://bugs.webkit.org/show_bug.cgi?id=141162
1107
1108         Reviewed by Darin Adler.
1109
1110         This patch implements the functionality of the ReadableStreamController error function.
1111         It basically changes the state of the stream to errored, resolves the ready promise and rejects the closed promise.
1112         Adding support to reject promise with any JSValue.
1113
1114         Support for storing the error is added to both reader and stream.
1115
1116         Test: streams/readable-stream-controller-error.html and rebased tests
1117
1118         * Modules/streams/ReadableStream.cpp:
1119         (WebCore::ReadableStream::changeStateToErrored):
1120         * Modules/streams/ReadableStream.h:
1121         * Modules/streams/ReadableStreamReader.cpp:
1122         (WebCore::ReadableStreamReader::initialize):
1123         (WebCore::ReadableStreamReader::closed):
1124         (WebCore::ReadableStreamReader::changeStateToClosed):
1125         (WebCore::ReadableStreamReader::changeStateToErrored):
1126         * Modules/streams/ReadableStreamReader.h:
1127         * bindings/js/JSDOMPromise.h:
1128         (WebCore::DeferredWrapper::reject):
1129         * bindings/js/JSReadableStreamControllerCustom.cpp:
1130         (WebCore::JSReadableStreamController::error):
1131         * bindings/js/JSReadableStreamReaderCustom.cpp:
1132         (WebCore::JSReadableStreamReader::closed):
1133         * bindings/js/ReadableJSStream.cpp:
1134         (WebCore::ReadableJSStream::createReader):
1135         (WebCore::ReadableJSStream::storeError):
1136         (WebCore::ReadableJSStream::Reader::storeError):
1137         (WebCore::ReadableJSStream::jsController): Deleted.
1138         * bindings/js/ReadableJSStream.h:
1139
1140 2015-05-08  Commit Queue  <commit-queue@webkit.org>
1141
1142         Unreviewed, rolling out r183985.
1143         https://bugs.webkit.org/show_bug.cgi?id=144796
1144
1145         broke loader/go-back-to-different-window-size.html (Requested
1146         by kling on #webkit).
1147
1148         Reverted changeset:
1149
1150         "Throttle RequestAnimationFrame in subframes that are outside
1151         the viewport"
1152         https://bugs.webkit.org/show_bug.cgi?id=144718
1153         http://trac.webkit.org/changeset/183985
1154
1155 2015-05-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1156
1157         SharedBuffer::m_size should be initialized to 0 when defining it
1158         https://bugs.webkit.org/show_bug.cgi?id=144740
1159
1160         Reviewed by Darin Adler.
1161
1162         Setting m_size to 0 when declaring it and updating constructor definitions.
1163
1164         No change in behaviour.
1165
1166         * platform/SharedBuffer.cpp:
1167         (WebCore::SharedBuffer::SharedBuffer):
1168         * platform/SharedBuffer.h:
1169         * platform/cf/SharedBufferCF.cpp:
1170         (WebCore::SharedBuffer::SharedBuffer):
1171         * platform/soup/SharedBufferSoup.cpp:
1172         (WebCore::SharedBuffer::SharedBuffer):
1173
1174 2015-05-08  Commit Queue  <commit-queue@webkit.org>
1175
1176         Unreviewed, rolling out r183945.
1177         https://bugs.webkit.org/show_bug.cgi?id=144789
1178
1179         "It broke all the GTK+ tests" (Requested by KaL on #webkit).
1180
1181         Reverted changeset:
1182
1183         "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
1184         https://bugs.webkit.org/show_bug.cgi?id=144746
1185         http://trac.webkit.org/changeset/183945
1186
1187 2015-05-07  Chris Dumez  <cdumez@apple.com>
1188
1189         Throttle RequestAnimationFrame in subframes that are outside the viewport
1190         https://bugs.webkit.org/show_bug.cgi?id=144718
1191         <rdar://problem/20688782>
1192
1193         Reviewed by Simon Fraser.
1194
1195         Throttle RequestAnimationFrame in subframes that are outside the
1196         viewport or have "display: none" for performance and power.
1197
1198         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
1199                fast/animation/request-animation-frame-throttle-subframe.html
1200
1201         * dom/Document.h:
1202         (WebCore::Document::scriptedAnimationController):
1203         * dom/ScriptedAnimationController.cpp:
1204         (WebCore::ScriptedAnimationController::setThrottled):
1205         (WebCore::ScriptedAnimationController::isThrottled):
1206         * dom/ScriptedAnimationController.h:
1207         * page/FrameView.cpp:
1208         (WebCore::FrameView::viewportContentsChanged):
1209         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
1210         (WebCore::FrameView::resumeVisibleImageAnimations):
1211         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
1212         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
1213         (WebCore::FrameView::updateThrottledDOMTimersState):
1214         (WebCore::FrameView::scrollPositionChanged): Deleted.
1215         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
1216         * page/FrameView.h:
1217         * testing/Internals.cpp:
1218         (WebCore::Internals::isRequestAnimationFrameThrottled):
1219         (WebCore::Internals::isTimerThrottled): Deleted.
1220         * testing/Internals.h:
1221         * testing/Internals.idl:
1222
1223 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
1224
1225         Calculate source-size length as a float
1226         https://bugs.webkit.org/show_bug.cgi?id=144766
1227
1228         Reviewed by Dean Jackson.
1229
1230         Make sure that the source-size length is calculated as a float,
1231         to align with the spec.
1232
1233         Test: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
1234               fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
1235
1236         * css/SourceSizeList.cpp:
1237         (WebCore::parseSizesAttribute):
1238         (WebCore::defaultLength):
1239         (WebCore::computeLength):
1240         * css/SourceSizeList.h:
1241         * html/HTMLImageElement.cpp:
1242         (WebCore::HTMLImageElement::parseAttribute):
1243         * html/parser/HTMLPreloadScanner.cpp:
1244         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1245         * html/parser/HTMLSrcsetParser.cpp:
1246         (WebCore::pickBestImageCandidate):
1247         (WebCore::bestFitSourceForImageAttributes):
1248         * html/parser/HTMLSrcsetParser.h:
1249
1250 2015-05-07  Commit Queue  <commit-queue@webkit.org>
1251
1252         Unreviewed, rolling out r183895.
1253         https://bugs.webkit.org/show_bug.cgi?id=144786
1254
1255         Many tests became flaky (Requested by ap on #webkit).
1256
1257         Reverted changeset:
1258
1259         "Expose more font weights for -apple-system"
1260         https://bugs.webkit.org/show_bug.cgi?id=144707
1261         http://trac.webkit.org/changeset/183895
1262
1263 2015-05-07  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1264
1265         Add first-letter assert exception in RenderButton::setupInnerStyle().
1266         https://bugs.webkit.org/show_bug.cgi?id=140517OB
1267
1268         Reviewed by Darin Adler.
1269
1270         StyleResolver references inner block's render style temporary in
1271         RenderBlock::styleDidChange() when we have first-letter css pseudo
1272         element.
1273
1274         * rendering/RenderButton.cpp:
1275         (WebCore::RenderButton::setupInnerStyle):
1276
1277 2015-05-07  Chris Dumez  <cdumez@apple.com>
1278
1279         Unreviewed, fix build after r183970.
1280
1281         WEBCORE_EXPORT should not be used on inlined functions.
1282
1283         * platform/graphics/ca/GraphicsLayerCA.h:
1284
1285 2015-05-07  Anders Carlsson  <andersca@apple.com>
1286
1287         Build fixes.
1288
1289         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1290         (-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
1291         * editing/cocoa/HTMLConverter.mm:
1292         (HTMLConverter::_addMarkersToList):
1293         * platform/mac/PasteboardMac.mm:
1294         (WebCore::writeFileWrapperAsRTFDAttachment):
1295         * platform/mac/PlatformPasteboardMac.mm:
1296         (WebCore::PlatformPasteboard::setTypes):
1297         Pass empty arrays and dictionaries instead of nil.
1298
1299         * rendering/RenderThemeMac.mm:
1300         (WebCore::RenderThemeMac::paintSliderThumb):
1301         Pass the document view to the AppKit paint method.
1302
1303 2015-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1304
1305         Purge PassRefPtr in WebCore/html - 3
1306         https://bugs.webkit.org/show_bug.cgi?id=144686
1307
1308         Reviewed by Andreas Kling.
1309
1310         Replace PassRefPtr with Ref in create() factory functions, because
1311         it doesn't have to change to be null.
1312
1313         No new tests, no behavior changes.
1314
1315         * html/FTPDirectoryDocument.h:
1316         * html/HTMLDetailsElement.cpp:
1317         (WebCore::DetailsContentElement::create):
1318         * html/HTMLKeygenElement.cpp:
1319         * html/HTMLSummaryElement.cpp:
1320         (WebCore::SummaryContentElement::create):
1321         * html/TimeRanges.cpp:
1322         (WebCore::TimeRanges::create):
1323         * html/shadow/SliderThumbElement.cpp:
1324         (WebCore::SliderContainerElement::create):
1325         * html/shadow/SliderThumbElement.h:
1326         (WebCore::SliderThumbElement::create):
1327         * html/shadow/SpinButtonElement.cpp:
1328         (WebCore::SpinButtonElement::create):
1329         * html/shadow/SpinButtonElement.h:
1330         * html/shadow/TextControlInnerElements.cpp:
1331         (WebCore::TextControlInnerContainer::create):
1332         (WebCore::TextControlInnerElement::create):
1333         (WebCore::TextControlInnerTextElement::create):
1334         (WebCore::SearchFieldResultsButtonElement::create):
1335         (WebCore::SearchFieldCancelButtonElement::create):
1336         * html/shadow/TextControlInnerElements.h:
1337         * html/shadow/YouTubeEmbedShadowElement.cpp:
1338         (WebCore::YouTubeEmbedShadowElement::create):
1339         * html/track/InbandDataTextTrack.cpp:
1340         (WebCore::InbandDataTextTrack::create):
1341         * html/track/InbandDataTextTrack.h:
1342         * html/track/InbandGenericTextTrack.cpp:
1343         (WebCore::InbandGenericTextTrack::create):
1344         * html/track/InbandGenericTextTrack.h:
1345         * html/track/InbandWebVTTTextTrack.cpp:
1346         (WebCore::InbandWebVTTTextTrack::create):
1347         * html/track/InbandWebVTTTextTrack.h:
1348         * html/track/LoadableTextTrack.h:
1349         * html/track/TextTrack.h:
1350         (WebCore::TextTrack::create):
1351         * html/track/TextTrackCueGeneric.cpp:
1352         * html/track/TextTrackCueGeneric.h:
1353         * html/track/TextTrackList.h:
1354         * html/track/VTTRegionList.h:
1355         (WebCore::VTTRegionList::create):
1356
1357 2015-05-07  Dean Jackson  <dino@apple.com>
1358
1359         [iOS] MediaControls: disappear while scrubbing
1360         https://bugs.webkit.org/show_bug.cgi?id=144777
1361         <rdar://problem/20065572>
1362
1363         Reviewed by Eric Carlson.
1364
1365         If we are scrubbing we shouldn't hide the controls.
1366
1367         * Modules/mediacontrols/mediaControlsApple.js:
1368         (Controller.prototype.hideControls): Return early if we are scrubbing.
1369         * Modules/mediacontrols/mediaControlsiOS.js:
1370         (ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and
1371         rename from non-underscored value throughout the file.
1372         (ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset
1373         the timer to hide the controls.
1374
1375 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
1376
1377         REGRESSION (r183300): Fixed elements flash when scrolling
1378         https://bugs.webkit.org/show_bug.cgi?id=144778
1379         rdar://problem/20769741
1380
1381         Reviewed by Dean Jackson.
1382
1383         After r183300 we can detached layer backing store when outside the coverage region.
1384         However, position:fixed layers are moved around by the ScrollingCoordinator behind
1385         GraphicsLayer's back, so we can do layer flushes with stale information about layer
1386         geometry.
1387         
1388         To avoid dropping backing store for layers in this situation, prevent backing
1389         store detachment on layers registered with the ScrollingCoordinator as viewport-constrained
1390         layers. Preventing detachment on a layer also prevents detachment on all descendant
1391         layers.
1392
1393         * platform/graphics/GraphicsLayer.h:
1394         (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment):
1395         (WebCore::GraphicsLayer::allowsBackingStoreDetachment):
1396         * platform/graphics/ca/GraphicsLayerCA.cpp:
1397         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1398         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): Set m_intersectsCoverageRect to true
1399         if backing store detachment is prevented.
1400         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Set a bit in the CommitState to 
1401         communicate to descendants that detachment is prevented.
1402         * platform/graphics/ca/GraphicsLayerCA.h:
1403         (WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.
1404         * rendering/RenderLayerBacking.cpp:
1405         (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
1406         * rendering/RenderLayerBacking.h:
1407         (WebCore::RenderLayerBacking::setScrollingNodeIDForRole): If registering with a non-zero
1408         nodeID for the ViewportConstrained role, turn off backing store detachment.
1409
1410 2015-05-07  Sam Weinig  <sam@webkit.org>
1411
1412         Consider implementing Document.scrollingElement
1413         <rdar://problem/20845213>
1414         https://bugs.webkit.org/show_bug.cgi?id=143609
1415
1416         Reviewed by Simon Fraser.
1417
1418         Add the non-compliant implementation of Document.scrollingElement that the spec,
1419         found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement, 
1420         says we should have while we have non-compliant implementations of Element.scrollTop
1421         and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133).
1422
1423         Tests: fast/dom/Document/scrollingElement-quirks-mode.html
1424                fast/dom/Document/scrollingElement-standards-mode.html
1425
1426         * dom/Document.cpp:
1427         (WebCore::Document::scrollingElement):
1428         * dom/Document.h:
1429         * dom/Document.idl:
1430
1431 2015-05-07  Dean Jackson  <dino@apple.com>
1432
1433         [iOS] While scrubbing and holding down, video continues to play
1434         https://bugs.webkit.org/show_bug.cgi?id=144776
1435         <rdar://problem/20863757>
1436
1437         Reviewed by Simon Fraser.
1438
1439         When we are scrubbing a video, we should pause playback. As we
1440         let go of the scrubber playback can resume (but only if it was
1441         playing originally).
1442
1443         * Modules/mediacontrols/mediaControlsiOS.js:
1444         (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber.
1445         (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary.
1446         (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions.
1447         (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are
1448         potentially about to scrub.
1449         (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners.
1450
1451 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
1452
1453         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
1454         https://bugs.webkit.org/show_bug.cgi?id=144335
1455
1456         Reviewed by Daniel Bates.
1457
1458         Address comments raised by Darin Adler in review.
1459
1460         * platform/graphics/ImageBuffer.cpp:
1461         (WebCore::ImageBuffer::sizeNeedsClamping):
1462         (WebCore::ImageBuffer::clampedSize):
1463         (WebCore::ImageBuffer::isSizeClamped): Deleted.
1464         * platform/graphics/ImageBuffer.h:
1465         The condition for the negative width/height in isSizeClamped() was wrong. Use
1466         FloatSize::isEmpty() instead and rename the function to sizeNeedsClamping().
1467         The new function should return the opposite of the old function return value.
1468         
1469         * platform/graphics/filters/FilterEffect.cpp:
1470         (WebCore::FilterEffect::apply):
1471         (WebCore::FilterEffect::asUnmultipliedImage):
1472         (WebCore::FilterEffect::asPremultipliedImage):
1473         (WebCore::FilterEffect::copyUnmultipliedImage):
1474         (WebCore::FilterEffect::copyPremultipliedImage):
1475         (WebCore::FilterEffect::createUnmultipliedImageResult):
1476         (WebCore::FilterEffect::createPremultipliedImageResult):
1477         * rendering/FilterEffectRenderer.cpp:
1478         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
1479         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
1480         * rendering/svg/RenderSVGResourceFilter.cpp:
1481         (WebCore::RenderSVGResourceFilter::applyResource):
1482         Call the new function and negate the condition for the return value.
1483
1484 2015-05-07  Anders Carlsson  <andersca@apple.com>
1485
1486         Build fix.
1487
1488         * editing/mac/EditorMac.mm:
1489         (WebCore::dataInRTFDFormat):
1490         (WebCore::dataInRTFFormat):
1491
1492 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
1493
1494         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
1495         https://bugs.webkit.org/show_bug.cgi?id=144335
1496
1497         Reviewed by Darin Adler.
1498
1499         When the SVG element is larger than 4096x4096 pixels and it has a filter,
1500         a clipper or a masker, the ImageBuffer which is created for drawing the
1501         sourceGraphicBuffer has to be clamped to this size. The reason for this
1502         clamping is the FilterEffect simply ignores processing any ImageBuffer
1503         larger than this size.
1504         
1505         The bug was happening because we did not propagate the clamping logic to
1506         the FilterEffect. The FilterEffect result ImageBuffer was not clamped as
1507         what we do for drawing the sourceGraphicBuffer. If only the destination
1508         point is specified, the GraphicsContext::drawImageBuffer() assumes the
1509         source and the destination images have the same size which is not true
1510         with the clamping.
1511         
1512         The fix is to add the clamping logic to the FilterEffect. Two places we
1513         need to change. (1) FilterEffect::createImageBufferResult() has to apply
1514         the same clamping we do in SVGRenderingContext::createImageBuffer(). (2)
1515         FilterEffect::drawingRegionOfInputImage() has to consider the clamping 
1516         when mapping from absolute coordinates to the ImageBuffer coordinates.
1517         
1518         Tests: svg/filters/big-sized-off-viewport-filter.svg
1519
1520         * platform/graphics/ImageBuffer.cpp:
1521         (WebCore::ImageBuffer::isSizeClamped):
1522         (WebCore::ImageBuffer::clampedSize):
1523         (WebCore::ImageBuffer::clampedRect):
1524         * platform/graphics/ImageBuffer.h:
1525         (WebCore::ImageBuffer::setSpaceSize): Move all the clamping helper methods
1526         from SVGRenderingContext and RenderSVGResourceFilter to the ImageBuffer.
1527
1528         * platform/graphics/filters/FEColorMatrix.cpp:
1529         (WebCore::FEColorMatrix::platformApplySoftware): Use logicalSize() of the
1530         result image instead of using absolutePaintRect(). The later returns the
1531         rectangle of the element without clamping.
1532         
1533         * platform/graphics/filters/FETile.cpp:
1534         (WebCore::FETile::platformApplySoftware):
1535         * rendering/svg/RenderSVGResourceClipper.cpp:
1536         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1537         * rendering/svg/RenderSVGResourceFilter.cpp:
1538         (WebCore::RenderSVGResourceFilter::applyResource):
1539         (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Deleted.
1540         * rendering/svg/RenderSVGResourceFilter.h:
1541         * rendering/svg/RenderSVGResourceGradient.cpp:
1542         (WebCore::createMaskAndSwapContextForTextGradient):
1543         (WebCore::clipToTextMask):
1544         * rendering/svg/RenderSVGResourceMasker.cpp:
1545         (WebCore::RenderSVGResourceMasker::applySVGMask):
1546         * rendering/svg/RenderSVGResourcePattern.cpp:
1547         (WebCore::RenderSVGResourcePattern::buildPattern):
1548         (WebCore::RenderSVGResourcePattern::createTileImage): Make the modifications
1549         which are needed because of moving the clamping helper methods to ImageBuffer
1550         and because of changing the prototype of SVGRenderingContext methods.
1551
1552         * platform/graphics/filters/FilterEffect.cpp:
1553         (WebCore::FilterEffect::drawingRegionOfInputImage): Consider the clamping
1554         when mapping from absolute coordinates to the ImageBuffer coordinates.
1555
1556         (WebCore::FilterEffect::createImageBufferResult): Apply the same clamping
1557         we do in SVGRenderingContext::createImageBuffer() when creating the 
1558         FilterEffect result ImageBuffer.
1559         
1560         (WebCore::FilterEffect::apply):
1561         (WebCore::FilterEffect::asUnmultipliedImage):
1562         (WebCore::FilterEffect::asPremultipliedImage):
1563         (WebCore::FilterEffect::copyUnmultipliedImage):
1564         (WebCore::FilterEffect::copyPremultipliedImage):
1565         (WebCore::FilterEffect::createUnmultipliedImageResult):
1566         (WebCore::FilterEffect::createPremultipliedImageResult):
1567         (WebCore::FilterEffect::maxFilterArea): Deleted.
1568         (WebCore::FilterEffect::isFilterSizeValid): Deleted.
1569         * platform/graphics/filters/FilterEffect.h: Use the new ImageBuffer clamping
1570         helper methods and delete the local ones.
1571
1572         * platform/graphics/transforms/AffineTransform.cpp:
1573         (WebCore::AffineTransform::scaleNonUniform):
1574         (WebCore::AffineTransform::scale):
1575         (WebCore::AffineTransform::translate):
1576         * platform/graphics/transforms/AffineTransform.h: Add new scale and translate
1577         overloads to AffineTransform.
1578         
1579         * rendering/FilterEffectRenderer.cpp:
1580         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
1581         (WebCore::FilterEffectRendererHelper::beginFilterEffect): Code clean up.
1582         
1583         * rendering/svg/SVGRenderingContext.cpp:
1584         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
1585         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
1586         Return the AffineTransform instead of passing it through the reference of
1587         an argument.
1588         
1589         (WebCore::SVGRenderingContext::createImageBuffer):
1590         (WebCore::SVGRenderingContext::createImageBufferForPattern): Deleted.
1591         Code clean up and method rename.
1592         
1593         (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): Deleted.
1594         (WebCore::SVGRenderingContext::clampedAbsoluteSize): Deleted.
1595         * rendering/svg/SVGRenderingContext.h: Move the clamping helper methods to
1596         the ImageBuffer class.
1597     
1598 2015-05-07  Beth Dakin  <bdakin@apple.com>
1599
1600         New force-related DOM events should fire in WK1 views
1601         https://bugs.webkit.org/show_bug.cgi?id=144663
1602         -and corresponding-
1603         rdar://problem/20281886
1604
1605         Reviewed by Sam Weinig.
1606
1607         All of the WK1 mouse events need to take the correspondingPressureEvent.
1608         * page/EventHandler.h:
1609
1610         Make correspondingPressureEvent a part of CurrentEventScope. This is needed to 
1611         have accurate pressure information for all of the mouse events in subframes.
1612         * page/mac/EventHandlerMac.mm:
1613         (WebCore::correspondingPressureEventSlot):
1614         (WebCore::EventHandler::correspondingPressureEvent):
1615         (WebCore::CurrentEventScope::CurrentEventScope):
1616         (WebCore::CurrentEventScope::~CurrentEventScope):
1617
1618         These events don’t have an associated pressure, so send nil for the 
1619         correspondingPressureEvent.
1620         (WebCore::EventHandler::wheelEvent):
1621         (WebCore::EventHandler::keyEvent):
1622
1623         Pipe through correspondingPressureEvent.
1624         (WebCore::EventHandler::mouseDown):
1625         (WebCore::EventHandler::mouseDragged):
1626         (WebCore::EventHandler::mouseUp):
1627         (WebCore::EventHandler::mouseMoved):
1628
1629         New function to handle pressure change events.
1630         (WebCore::EventHandler::pressureChange):
1631
1632         Pipe through correspondingPressureEvent.
1633         (WebCore::EventHandler::passMouseMovedEventToScrollbars):
1634         (WebCore::EventHandler::currentPlatformMouseEvent):
1635
1636         Take the correspondingPressureEvent in order to build a PlatformMouseEvent with 
1637         the correct pressure information.
1638         * platform/mac/PlatformEventFactoryMac.h:
1639         * platform/mac/PlatformEventFactoryMac.mm:
1640         (WebCore::globalPointForEvent):
1641         (WebCore::pointForEvent):
1642         (WebCore::mouseButtonForEvent):
1643         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
1644         (WebCore::PlatformEventFactory::createPlatformMouseEvent):
1645
1646 2015-05-06  Roger Fong  <roger_fong@apple.com>
1647
1648         Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
1649         https://bugs.webkit.org/show_bug.cgi?id=144700.
1650         <rdar://problem/19997548>
1651
1652         Reviewed by Jer Noble.
1653
1654         Update time and timeline during the timeline input event instead of the wrapper's mousemove.
1655         (Controller.prototype.handleWrapperMouseMove):
1656         (Controller.prototype.handleTimelineMouseMove):
1657         (Controller.prototype.drawTimelineBackground): 
1658
1659         (Controller.prototype.updateControlsWhileScrubbing): 
1660         Updates time and scrubber to reflect timeline user input.
1661
1662 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
1663
1664         Handle meta viewport in HTMLPreloadScanner
1665         https://bugs.webkit.org/show_bug.cgi?id=144640
1666
1667         Reviewed by Dean Jackson.
1668
1669         Add support for the <meta> tag to the HTMLPreloadScanner
1670         and when the meta tag's name is viewport, get the document
1671         to process the tag's attribute value, and set its ViewportArgument.
1672
1673         Tests: fast/dom/HTMLMetaElement/meta-preloader.html
1674
1675         * html/parser/HTMLPreloadScanner.cpp:
1676         (WebCore::TokenPreloadScanner::tagIdFor): Added meta.
1677         (WebCore::TokenPreloadScanner::initiatorFor): Added meta.
1678         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Call document.processViewport is meta viewport encountered.
1679         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1680         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Keep track of meta viewport tags.
1681         (WebCore::testPreloadScannerViewportSupport): Testing function that makes sure this functionality is working.
1682         * html/parser/HTMLPreloadScanner.h:
1683         * testing/Internals.cpp:
1684         (WebCore::Internals::testPreloaderSettingViewport): Calls the testing function.
1685         * testing/Internals.h:
1686         * testing/Internals.idl:
1687
1688 2015-05-07  Zalan Bujtas  <zalan@apple.com>
1689
1690         REGRESSION (r164449): Subpixel rendering: http://www.apple.com/iphone-6/ "Faster wireless." image displays vertical black line on 1x displays at specific window width.
1691         https://bugs.webkit.org/show_bug.cgi?id=144723
1692         rdar://problem/18307094
1693
1694         Reviewed by Simon Fraser.
1695
1696         This patch ensures that the backing store's graphics layer is always positioned on a device pixel boundary.
1697
1698         While calculating the backing store's graphics layer location, its ancestor layer's compositing bounds is taken into account.
1699         However the compositing bounds is an unsnapped value, so in order to place the graphics layer properly,
1700         we need to pixel align the ancestor compositing bounds before using it to adjust the child's graphics layer position.
1701
1702         Test: compositing/ancestor-compositing-layer-is-on-subpixel-position.html
1703
1704         * rendering/RenderLayerBacking.cpp:
1705         (WebCore::RenderLayerBacking::updateGeometry):
1706
1707 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
1708
1709         Fix sizes crash and add invalid value tests.
1710         https://bugs.webkit.org/show_bug.cgi?id=144739
1711
1712         Reviewed by Darin Adler.
1713
1714         Make sure that only CSS length are allowed when the sizes parser is calling computeLength.
1715         Also make sure that for invalid lengths, the 100vw default is used instead.
1716
1717         Test: fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html
1718
1719         * css/SourceSizeList.cpp:
1720         (WebCore::computeLength):
1721         (WebCore::defaultLength):
1722         (WebCore::parseSizesAttribute):
1723
1724 2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>
1725
1726         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
1727         https://bugs.webkit.org/show_bug.cgi?id=144746
1728
1729         Reviewed by Martin Robinson.
1730
1731         Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
1732
1733         * platform/gtk/GtkUtilities.cpp:
1734         * platform/gtk/GtkUtilities.h:
1735         * platform/text/gtk/HyphenationLibHyphen.cpp:
1736         (WebCore::availableLocales):
1737
1738 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
1739
1740         Remove the WK1-only code path for independently composited iframes
1741         https://bugs.webkit.org/show_bug.cgi?id=144722
1742
1743         Reviewed by Dean Jackson.
1744
1745         In WebKit1 on Mac, we allowed iframes to be composited independently of their
1746         parent document, relying on the fact that the frame's platform view can host
1747         a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
1748         and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
1749         because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
1750         
1751         Removing the WK1-only code path solves these problems. It also eliminates the need
1752         to do compositing-specific frame overlap testing.
1753
1754         * page/FrameView.cpp:
1755         (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
1756         Any iframe that gets composited will participate in the normal compositing overlap
1757         testing in its parent frame.
1758         (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
1759         (WebCore::FrameView::hasCompositingAncestor): Deleted.
1760         * page/FrameView.h:
1761         * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
1762         with an isMainFrameCompositor() for readability. Some 0->nullptr.
1763         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1764         (WebCore::RenderLayerCompositor::chromeClient):
1765         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
1766         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1767         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
1768         (WebCore::RenderLayerCompositor::updateBacking):
1769         (WebCore::RenderLayerCompositor::layerTreeAsText):
1770         (WebCore::RenderLayerCompositor::frameContentsCompositor):
1771         (WebCore::RenderLayerCompositor::setIsInWindow):
1772         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
1773         (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
1774         already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
1775         nothing and is removed.
1776         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
1777         (WebCore::RenderLayerCompositor::requiresScrollLayer):
1778         (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
1779         (WebCore::RenderLayerCompositor::isMainFrameCompositor):
1780         (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
1781         (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
1782         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
1783         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1784         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1785         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1786         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1787         (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
1788         all other frames attach via parent frame.
1789         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
1790         scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
1791         layout, but is no longer needed so remove it.
1792         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1793         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
1794         (WebCore::RenderLayerCompositor::scrollingCoordinator):
1795         (WebCore::RenderLayerCompositor::graphicsLayerFactory):
1796         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
1797         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
1798         (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
1799         it really asks whether the document uses tiled backing, but does not check for main frame.
1800         * rendering/RenderLayerCompositor.h:
1801         * rendering/RenderWidget.cpp:
1802         (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
1803         compositing now.
1804
1805 2015-05-06  Dean Jackson  <dino@apple.com>
1806
1807         Handle backdrop views that have to tile
1808         https://bugs.webkit.org/show_bug.cgi?id=142317
1809         <rdar://problem/20049088>
1810
1811         Reviewed by Simon Fraser.
1812
1813         Take 2 - this was rolled out because Mavericks was crashing.
1814
1815         Make sure backdrop layers don't tile. If they are big
1816         enough, we'll leave it to the platform compositor to handle.
1817
1818         This also fixes a bug where if a layer changed from a backdrop
1819         type to a tiled type, it would still retain its custom appearance
1820         and we'd try to add children to the wrong layer.
1821
1822         Test: compositing/media-controls-bar-appearance-big.html
1823
1824         * platform/graphics/ca/GraphicsLayerCA.cpp:
1825         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
1826         a layer needs a backdrop before checking if it needs to tile.
1827
1828 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
1829
1830         Revert "Introducing the Platform Abstraction Layer (PAL)"
1831         https://bugs.webkit.org/show_bug.cgi?id=144751
1832
1833         Unreviewed.
1834
1835         PAL should be a new target inside WebCore, rather than a top-level folder.
1836
1837         * WebCore.xcodeproj/project.pbxproj:
1838         * Configurations/FeatureDefines.xcconfig:
1839
1840 2015-05-07  Dan Bernstein  <mitz@apple.com>
1841
1842         Tried to fix the build.
1843
1844         * Configurations/WebCoreTestSupport.xcconfig:
1845
1846 2015-05-07  Joanmarie Diggs  <jdiggs@igalia.com>
1847
1848         AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL
1849         https://bugs.webkit.org/show_bug.cgi?id=144702
1850
1851         Reviewed by Chris Fleizach.
1852
1853         Add a new PreRole AccessibilityRole so that per-platform mapping is possible.
1854         Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole
1855         for the Mac. Add PreRole to the list of "text type" ATK roles.
1856
1857         No new tests. Existing tests were updated to reflect the corrected mapping.
1858
1859         * accessibility/AccessibilityObject.h:
1860         * accessibility/AccessibilityRenderObject.cpp:
1861         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1862         * accessibility/atk/AccessibilityObjectAtk.cpp:
1863         (WebCore::AccessibilityObject::allowsTextRanges):
1864         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1865         (atkRole):
1866         (roleIsTextType):
1867         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1868         (createAccessibilityRoleMap):
1869
1870 2015-05-07  Dan Bernstein  <mitz@apple.com>
1871
1872         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
1873         https://bugs.webkit.org/show_bug.cgi?id=144727
1874
1875         Reviewed by Darin Adler.
1876
1877         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig.
1878         * Configurations/WebCore.xcconfig: For iOS, define INSTALL_PATH in terms of
1879         INSTALL_PATH_PREFIX, and set INSTALL_PATH_PREFIX for the iOS 8.x Simulator.
1880         * Configurations/WebCoreTestSupport.xcconfig: Define INSTALL_PATH in terms of
1881         INSTALL_PATH_PREFIX and INSTALL_PATH_ACTUAL, and define INSTALL_PATH_PREFIX for the iOS 8.x
1882         Simulator.
1883
1884 2015-05-07  Eric Carlson  <eric.carlson@apple.com>
1885
1886         [Mac] Playback target isn't set on new element
1887         https://bugs.webkit.org/show_bug.cgi?id=144724
1888
1889         Reviewed by Jer Noble.
1890
1891         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1892         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1893         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget
1894         if necessary.
1895         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember
1896         the setting in case we don't have an AVPlayer yet.
1897
1898 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
1899
1900         Fix <script srcset> being loaded by the preloader.
1901         https://bugs.webkit.org/show_bug.cgi?id=144675
1902
1903         Reviewed by Darin Adler.
1904
1905         Fix HTMLPreloadScanner to make sure that srcset is only loaded
1906         when it is present on an <img>.
1907
1908         Tests: http/tests/loading/preload-script-src.html
1909                http/tests/loading/preload-script-srcset-ignored.html
1910
1911         * html/parser/HTMLPreloadScanner.cpp:
1912         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1913
1914 2015-05-07  Žan Doberšek  <zdobersek@igalia.com>
1915
1916         Add missing type traits specialization for PlatformDisplayWayland
1917         https://bugs.webkit.org/show_bug.cgi?id=144671
1918
1919         Reviewed by Carlos Garcia Campos.
1920
1921         * platform/graphics/wayland/PlatformDisplayWayland.h:
1922         Add missing type traits specialization for the PlatformDisplayWayland
1923         class via the SPECIALIZE_TYPE_TRAITS_PLATFORM_DISPLAY macro.
1924
1925 2015-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
1926
1927         [CSS Grid Layout] Mark grid shorthands as layout dependent
1928         https://bugs.webkit.org/show_bug.cgi?id=144687
1929
1930         Reviewed by Darin Adler.
1931
1932         grid-template and grid shorthands were not marked us layout dependent,
1933         so you can end up calling them before the grid has been laid out and
1934         you'll get a crash at valueForGridTrackList() because of trackPositions
1935         won't be initialized yet.
1936
1937         Tests: fast/css-grid-layout/grid-shorthand-computed-style-crash.html
1938                fast/css-grid-layout/grid-template-shorthand-computed-style-crash.html
1939
1940         * css/CSSComputedStyleDeclaration.cpp:
1941         (WebCore::isLayoutDependent): Add the grid shorthands only if the object
1942         is a RenderGrid as otherwise it's not needed (using the same condition
1943         for grid-template-columns and grid-template-rows properties too).
1944
1945 2015-05-06  Daniel Bates  <dabates@apple.com>
1946
1947         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
1948         https://bugs.webkit.org/show_bug.cgi?id=144657
1949         <rdar://problem/18894598>
1950
1951         Reviewed by Andy Estes.
1952
1953         Export WebCore functionality to pause and resume the database thread so that we can
1954         make use of this functionality from WebKit2.
1955
1956         * Modules/webdatabase/AbstractDatabaseServer.h:
1957         * Modules/webdatabase/DatabaseManager.cpp:
1958         (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
1959         * Modules/webdatabase/DatabaseManager.h:
1960         * Modules/webdatabase/DatabaseServer.cpp:
1961         (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
1962         DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
1963         For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
1964         we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
1965         * Modules/webdatabase/DatabaseServer.h:
1966
1967 2015-05-06  Brent Fulgham  <bfulgham@apple.com>
1968
1969         Scroll-snap points do not handle margins and padding propertly
1970         https://bugs.webkit.org/show_bug.cgi?id=144647
1971         <rdar://problem/20829473>
1972
1973         Reviewed by Simon Fraser.
1974
1975         The calculation of scroll snap points was incorrect because it did not account for margins or padding.
1976         This was fixed by using the "paddingBoxRect" to represent the overall size of the view area, and
1977         subtracting the relevant padding when computing the size of the scroll snap offsets.
1978
1979         Extend testing internals with accessor methods to retrieve string representations of the scroll snap
1980         offsets and scroll snap coordinates computed during layout. These values are used in the new
1981         'css3/scroll-snap/scroll-snap-offsets-and-coordinates.html' test.
1982
1983         New tests:
1984         * css3/scroll-snap/scroll-snap-offsets-and-coordinates.html: Added.
1985         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: Added.
1986         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: Added.
1987         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: Added.
1988
1989         * css/LengthFunctions.h: Expose the 'valueForLength' method so we can use it in WebCoreTestSupport.
1990         * dom/Node.h: Expose the 'renderBox' method so we can use it in WebCoreTestSupport.
1991         * page/scrolling/AxisScrollSnapOffsets.cpp:
1992         (WebCore::appendChildSnapOffsets): Use 'contentBoxRect' for overall size, so that we don't use padding
1993         as part of our offset calculations.
1994         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
1995         * rendering/RenderBox.h: Expose 'canBeScrolledAndHasScrollableArea' for use in WebCoreTestSupport.
1996         * rendering/style/RenderStyle.h: Expose 'scrollSnapCoordinates' for use in WebCoreTestSupport.
1997         * testing/Internals.cpp:
1998         (WebCore::appendOffsets): Helper function.
1999         (WebCore::Internals::scrollSnapOffsets): Added.
2000         * testing/Internals.h:
2001         * testing/Internals.idl:
2002
2003 2015-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
2004
2005         Clean up TextRun constructors
2006         https://bugs.webkit.org/show_bug.cgi?id=144712
2007
2008         Reviewed by Zalan Bujtas.
2009
2010         This patch uses constructor forwarding to make TextRun's constructors much simpler. It then
2011         updates the implementations of RenderBlock::constructTextRun() to be more consistent with
2012         TextRun (via using StringViews).
2013
2014         No new tests because there is no behavior change.
2015
2016         * mathml/MathMLMencloseElement.cpp:
2017         (WebCore::MathMLMencloseElement::longDivLeftPadding):
2018         * platform/graphics/TextRun.h:
2019         (WebCore::TextRun::TextRun):
2020         * rendering/RenderBlock.cpp:
2021         (WebCore::RenderBlock::constructTextRun):
2022         (WebCore::constructTextRunInternal): Deleted.
2023         * rendering/RenderBlock.h:
2024         * rendering/RenderEmbeddedObject.cpp:
2025         (WebCore::RenderEmbeddedObject::paintReplaced):
2026         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
2027         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2028         * rendering/svg/SVGTextMetricsBuilder.cpp:
2029         (WebCore::SVGTextMetricsBuilder::SVGTextMetricsBuilder):
2030         * platform/win/DragImageWin.cpp:
2031         (WebCore::createDragImageForLink):
2032
2033 2015-05-06  Sungmann Cho  <sungmann.cho@navercorp.com>
2034
2035         Rename URL::copy() to URL::isolatedCopy() to match String.
2036         https://bugs.webkit.org/show_bug.cgi?id=144684
2037
2038         Reviewed by Darin Adler.
2039
2040         No new tests, no behavior change.
2041
2042         * Modules/websockets/WebSocketHandshake.cpp:
2043         (WebCore::WebSocketHandshake::setURL):
2044         (WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
2045         * fileapi/ThreadableBlobRegistry.cpp:
2046         (WebCore::BlobRegistryContext::BlobRegistryContext):
2047         * html/parser/HTMLPreloadScanner.cpp:
2048         (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
2049         * html/parser/HTMLResourcePreloader.h:
2050         (WebCore::PreloadRequest::PreloadRequest):
2051         * html/parser/XSSAuditor.cpp:
2052         (WebCore::XSSAuditor::init):
2053         * platform/CrossThreadCopier.cpp:
2054         (WebCore::URL>::copy):
2055         * platform/URL.cpp:
2056         (WebCore::URL::isolatedCopy):
2057         (WebCore::URL::copy): Deleted.
2058         * platform/URL.h:
2059         (WebCore::URLCapture::URLCapture):
2060         * platform/network/BlobPart.h:
2061         (WebCore::BlobPart::detachFromCurrentThread):
2062         * platform/network/ResourceRequestBase.cpp:
2063         (WebCore::ResourceRequestBase::copyData):
2064         * platform/network/ResourceResponseBase.cpp:
2065         (WebCore::ResourceResponseBase::copyData):
2066         * workers/WorkerThread.cpp:
2067         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2068
2069 2015-05-06  Commit Queue  <commit-queue@webkit.org>
2070
2071         Unreviewed, rolling out r183894.
2072         https://bugs.webkit.org/show_bug.cgi?id=144719
2073
2074         crashes on mavericks (Requested by dino on #webkit).
2075
2076         Reverted changeset:
2077
2078         "Handle backdrop views that have to tile"
2079         https://bugs.webkit.org/show_bug.cgi?id=142317
2080         http://trac.webkit.org/changeset/183894
2081
2082 2015-05-06  Jon Lee  <jonlee@apple.com>
2083
2084         CoreTextSPI.h uses wrong version number to denote Yosemite
2085         https://bugs.webkit.org/show_bug.cgi?id=144701
2086
2087         Reviewed by Dean Jackson.
2088
2089         * platform/spi/cocoa/CoreTextSPI.h: Should 101000 not 10100.
2090
2091 2015-05-06  Jon Lee  <jonlee@apple.com>
2092
2093         Expose more font weights for -apple-system
2094         https://bugs.webkit.org/show_bug.cgi?id=144707
2095
2096         Reviewed by Dean Jackson.
2097
2098         Update to platform/mac/fast/text/systemFont.html
2099
2100         * platform/graphics/mac/FontCacheMac.mm:
2101         (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
2102         Yosemite and later.
2103         (WebCore::fontWithFamily): Request the system font with a mapped weight on Yosemite and later.
2104         * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:], and the proper NSFontWeight
2105         constants.
2106
2107 2015-05-06  Dean Jackson  <dino@apple.com>
2108
2109         Handle backdrop views that have to tile
2110         https://bugs.webkit.org/show_bug.cgi?id=142317
2111         <rdar://problem/20049088>
2112
2113         Reviewed by Simon Fraser.
2114
2115         Make sure backdrop layers don't tile. If they are big
2116         enough, we'll leave it to the platform compositor to handle.
2117
2118         This also fixes a bug where if a layer changed from a backdrop
2119         type to a tiled type, it would still retain its custom appearance
2120         and we'd try to add children to the wrong layer.
2121
2122         Test: compositing/media-controls-bar-appearance-big.html
2123
2124         * platform/graphics/ca/GraphicsLayerCA.cpp:
2125         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
2126         a layer needs a backdrop before checking if it needs to tile.
2127
2128 2015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com> and Per Arne Vollan  <peavo@outlook.com>
2129
2130         [WinCairo] Compile error due to undefined symbols after r183868
2131         https://bugs.webkit.org/show_bug.cgi?id=144692
2132
2133         Reviewed by Alex Christensen.
2134
2135         Speculative build fix. Add dummy PlatformDisplayWin.
2136
2137         * PlatformWinCairo.cmake: Add PlatformDisplay.cpp to compilation.
2138         * platform/graphics/PlatformDisplay.cpp:
2139         (WebCore::PlatformDisplay::createPlatformDisplay):
2140         * platform/graphics/PlatformDisplay.h:
2141         * platform/graphics/win/PlatformDisplayWin.h:
2142         Add stubs to compile.
2143         * WebCore.vcxproj/WebCore.vcxproj
2144         * WebCore.vcxproj/WebCore.vcxproj.filters
2145         Add new files to Windows build.
2146
2147 2015-05-06  David Hyatt  <hyatt@apple.com>
2148
2149         Avoid copies in scrollOffsetForFixedPosition() and inline it.
2150         https://bugs.webkit.org/show_bug.cgi?id=144709
2151
2152         Reviewed by Simon Fraser.
2153
2154         * page/FrameView.cpp:
2155         (WebCore::FrameView::frameScaleFactor):
2156         Added so that scrollOffsetForFixedPosition() can be inlined without having to
2157         reference Frame's implementation.
2158
2159         (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
2160         Moved this to the header.
2161
2162         * page/FrameView.h:
2163         Inline scrollOffsetForFixedPosition() and get rid of all the copying
2164         it was doing.
2165
2166 2015-05-06  David Hyatt  <hyatt@apple.com>
2167
2168         RenderLayer::currentTransform computes a pixel snapped rect it doesn't use.
2169         https://bugs.webkit.org/show_bug.cgi?id=144708
2170
2171         Reviewed by Simon Fraser.
2172
2173         * rendering/RenderLayer.cpp:
2174         (WebCore::RenderLayer::currentTransform):
2175
2176         Only compute a pixel snapped rect if we actually end up needing it. The common case
2177         is that this rect is not needed, so pushing it inside the two if statements
2178         speeds up the common case.
2179
2180 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
2181
2182         Fix the build.
2183
2184         * platform/spi/cocoa/QuartzCoreSPI.h:
2185
2186 2015-05-06  David Hyatt  <hyatt@apple.com>
2187
2188         Optimize topLeftLocationOffset() addition in updateLayerPosition
2189         https://bugs.webkit.org/show_bug.cgi?id=144704
2190
2191         Reviewed by Dean Jackson.
2192
2193         * page/FrameView.cpp:
2194         (WebCore::FrameView::FrameView):
2195         * page/FrameView.h:
2196         Move the hasFlippedBlocks bit to FrameView instead of RenderView. Works better for inlining
2197         the check in any renderer header, and it also makes more sense conceptually, since the RenderView
2198         itself could be a flipped block.
2199
2200         * rendering/RenderBox.cpp:
2201         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2202         Change over to the FrameView bit.
2203
2204         * rendering/RenderBox.h:
2205         (WebCore::RenderBox::applyTopLeftLocationOffset):
2206         Add a new inlined function that can apply the top left location offset to a point without
2207         multiple LayoutSize creations and copies. It invokes a helper for flipping that is not
2208         inlined only in the case where actual flipped blocks exist in the render tree.
2209
2210         * rendering/RenderBoxModelObject.cpp:
2211         (WebCore::RenderBoxModelObject::updateFromStyle):
2212         Set the bit on the FrameView now instead of the RenderView.
2213
2214         * rendering/RenderLayer.cpp:
2215         (WebCore::RenderLayer::updateLayerPosition):
2216         Call the new applyTopLeftLocationOffset function so that the point can have offsets added
2217         in without any extra copies.
2218
2219         (WebCore::RenderLayer::calculateClipRects):
2220         * rendering/RenderLineBoxList.cpp:
2221         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2222         Switch over to the bit on the FrameView.
2223
2224         * rendering/RenderView.cpp:
2225         (WebCore::RenderView::RenderView):
2226         * rendering/RenderView.h:
2227         Get rid of the bit on the RenderView.
2228
2229 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
2230
2231         Introducing the Platform Abstraction Layer (PAL)
2232         https://bugs.webkit.org/show_bug.cgi?id=143358
2233
2234         Reviewed by Simon Fraser.
2235
2236         * WebCore.xcodeproj/project.pbxproj: Let the project know about the .a
2237         * Configurations/FeatureDefines.xcconfig: Updated
2238
2239 2015-05-06  Eric Carlson  <eric.carlson@apple.com>
2240
2241         [iOS] remove some unnecessary iOS-only media code
2242         https://bugs.webkit.org/show_bug.cgi?id=144697
2243         <rdar://problem/20229914>
2244
2245         Reviewed by Jer Noble.
2246
2247         * html/HTMLAttributeNames.in: Remove data-youtube-id.
2248
2249         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2250         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Remove dataYouTubeID.
2251
2252 2015-05-06  David Hyatt  <hyatt@apple.com>
2253
2254         Optimize relativePositionOffset() to avoid doing unnecessary work
2255         https://bugs.webkit.org/show_bug.cgi?id=144698
2256
2257         Reviewed by Simon Fraser.
2258
2259         * rendering/RenderBoxModelObject.cpp:
2260         (WebCore::RenderBoxModelObject::relativePositionOffset):
2261
2262         Patch relativePositionOffset to avoid doing unnecessary work in the common case where
2263         all values of top/left/right/bottom are either auto or fixed. We no longer fetch
2264         containingBlock() into a local always, but instead just invoke the function only
2265         when necessary.
2266
2267         Also avoid computing the percentage-relative maximum for the top/right/bottom/left lengths
2268         when they are fixed values, since that maximum won't be examined at all.
2269
2270 2015-05-06  Martin Robinson  <mrobinson@igalia.com>
2271
2272         [FreeType] Vertical CJK glyphs should not be rendered with synthetic oblique
2273         https://bugs.webkit.org/show_bug.cgi?id=144612
2274
2275         Reviewed by Darin Adler.
2276
2277         No new tests. This causes fast/text/international/synthesized-italic-vertical.html to pass.
2278
2279         * platform/graphics/Font.cpp:
2280         (WebCore::Font::nonSyntheticItalicFont): Compile this method for Cairo as well.
2281         * platform/graphics/FontCascadeFonts.cpp:
2282         (WebCore::FontCascadeFonts::glyphDataForSystemFallback): When searching for the system fallback,
2283         ensure that we do not use synthetic oblique when rendering vertical CJK glyphs.
2284         (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Extend the CJK fix to Cairo ports.
2285         * platform/graphics/FontPlatformData.h:
2286         (WebCore::FontPlatformData::setSyntheticOblique): Added this helper method, because
2287         Freetype/Cairo ports needs to be able to recreate the scaled font matrix when the
2288         synthetic oblique settings changes.
2289         * platform/graphics/freetype/FontPlatformData.h: Rename initializeWithFontFace to buildScaledFont.
2290         Remove the now unused m_horizontalOrientationMatrix member.
2291         (WebCore::FontPlatformData::setSyntheticOblique): Added the helper here as well.
2292         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2293         (WebCore::FontPlatformData::FontPlatformData): Calculate whether or not to use synthetic oblique here,
2294         before buildScaledFont is called. Call buildScaledFont instead of initializeWithFontFace.
2295         (WebCore::FontPlatformData::operator=):
2296         (WebCore::FontPlatformData::buildScaledFont): Renamed from initializeWithFontFace, does
2297         the same thing, except calculate whether or not to use synthetic oblique. Instead just
2298         reads the value.
2299         (WebCore::FontPlatformData::setOrientation): Instead of adjusting the font matrix, recreate
2300         the entire font.
2301         (WebCore::FontPlatformData::setSyntheticOblique): Added.
2302         (WebCore::rotateCairoMatrixForVerticalOrientation): Deleted.
2303         (WebCore::FontPlatformData::initializeWithFontFace): Deleted.
2304
2305 2015-05-06  Alex Christensen  <achristensen@webkit.org>
2306
2307         [Content Extensions] Test splitting NFAs by max NFA size.
2308         https://bugs.webkit.org/show_bug.cgi?id=144659
2309
2310         Reviewed by Darin Adler.
2311
2312         * WebCore.xcodeproj/project.pbxproj:
2313         * contentextensions/CombinedURLFilters.cpp:
2314         (WebCore::ContentExtensions::generateNFAForSubtree):
2315         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
2316         * contentextensions/CombinedURLFilters.h:
2317         * contentextensions/ContentExtensionCompiler.cpp:
2318         (WebCore::ContentExtensions::compileRuleList):
2319         * contentextensions/DFABytecodeCompiler.h:
2320         * contentextensions/DFABytecodeInterpreter.h:
2321         Make maxNFASize a parameter so we can test it with small values.
2322
2323 2015-05-06  Antti Koivisto  <antti@apple.com>
2324
2325         REGRESSION (r183467): Unable to start downloads in private browsing mode
2326         https://bugs.webkit.org/show_bug.cgi?id=144533
2327
2328         Reviewed by Darin Adler.
2329
2330         If willSendRequest delegate mutated the request we would lose the requester field value from the original.
2331
2332         No test runner support for mutating requests.
2333
2334         * platform/network/cf/ResourceRequestCFNet.cpp:
2335         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2336
2337             This needs to keep the requester too.
2338
2339         * platform/network/cocoa/ResourceRequestCocoa.mm:
2340         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
2341
2342             Share implementations.
2343
2344 2015-05-06  Ryosuke Niwa  <rniwa@webkit.org>
2345
2346         Toggling underline on font panel removes strike through
2347         https://bugs.webkit.org/show_bug.cgi?id=144670
2348         <rdar://problem/3790443>
2349
2350         Reviewed by Darin Adler.
2351
2352         * editing/EditingStyle.cpp:
2353         (WebCore::EditingStyle::EditingStyle): Added a variant that takes CSSStyleDeclaration.
2354         * editing/EditingStyle.h:
2355         (WebCore::EditingStyle::create): Ditto.
2356         * editing/Editor.cpp:
2357         (WebCore::Editor::applyStyleToSelection): Takes Ref<EditingStyle>&& instead of RefPtr<EditingStyle>&&.
2358         * editing/Editor.h:
2359         * editing/EditorCommand.cpp:
2360         (WebCore::applyCommandToFrame): Ditto.
2361         (WebCore::executeStrikethrough):
2362         (WebCore::executeUnderline):
2363
2364 2015-05-06  Jessie Berlin  <jberlin@webkit.org>
2365
2366         More build fixing.
2367
2368         * page/mac/TextIndicatorWindow.mm:
2369
2370 2015-05-06  Jessie Berlin  <jberlin@webkit.org>
2371
2372         32-bit build fix after r183859 and r183860.
2373
2374         * page/mac/TextIndicatorWindow.mm:
2375         Autosynthesis isn't available for our 32-bit builds.
2376
2377 2015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2378
2379         [EGL] Move EGLDisplay handling to PlatformDisplay and remove PlatformDisplay definition from GLDefs.h
2380         https://bugs.webkit.org/show_bug.cgi?id=144685
2381
2382         Reviewed by Martin Robinson.
2383
2384         The EGL display is also initialized in multiple places, and could
2385         be unified in PlatformDisplay. Remove the PlatformDisplay
2386         definition from platform/graphics/opengl/GLDefs.h to avoid conflicts.
2387
2388         * platform/graphics/PlatformDisplay.cpp:
2389         (WebCore::PlatformDisplay::PlatformDisplay): Initialize m_eglDisplay.
2390         (WebCore::PlatformDisplay::~PlatformDisplay): Call terminateEGLDisplay().
2391         (WebCore::PlatformDisplay::eglDisplay): Lazy intialize the EGL
2392         display and return it.
2393         (WebCore::PlatformDisplay::initializeEGLDisplay):
2394         (WebCore::PlatformDisplay::terminateEGLDisplay):
2395         * platform/graphics/PlatformDisplay.h:
2396         * platform/graphics/egl/GLContextEGL.cpp:
2397         (WebCore::sharedEGLDisplay): Use PlatformDisplay::eglDisplay().
2398         * platform/graphics/opengl/GLDefs.h: Remove unneeded definitions.
2399         * platform/graphics/opengl/GLPlatformSurface.cpp:
2400         (WebCore::GLPlatformSurface::GLPlatformSurface): Remove
2401         m_sharedDisplay member, PlatformDisplay::sharedDisplay() can be used instead.
2402         (WebCore::GLPlatformSurface::sharedDisplay): Deleted.
2403         * platform/graphics/opengl/GLPlatformSurface.h:
2404         * platform/graphics/surfaces/egl/EGLConfigSelector.h: Use
2405         EGLDisplay instead of PlatformDisplay.
2406         * platform/graphics/surfaces/egl/EGLContext.cpp:
2407         (WebCore::EGLOffScreenContext::initialize): Use PlatformDisplay::eglDisplay().
2408         * platform/graphics/surfaces/egl/EGLHelper.cpp: Remove the
2409         EGLDisplayConnection clas and use PlatformDisplay instead.
2410         (WebCore::EGLHelper::eglDisplay):
2411         (WebCore::EGLHelper::currentDisplay):
2412         (WebCore::EGLDisplayConnection::EGLDisplayConnection): Deleted.
2413         (WebCore::EGLDisplayConnection::~EGLDisplayConnection): Deleted.
2414         (WebCore::EGLDisplayConnection::display): Deleted.
2415         (WebCore::EGLDisplayConnection::terminate): Deleted.
2416         * platform/graphics/surfaces/egl/EGLHelper.h:
2417         * platform/graphics/surfaces/egl/EGLSurface.cpp:
2418         (WebCore::EGLTransportSurface::EGLTransportSurface): Use EGLHelper::eglDisplay().
2419         (WebCore::EGLTransportSurface::destroy): Ditto.
2420         (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Ditto.
2421         (WebCore::EGLOffScreenSurface::destroy): Ditto.
2422         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
2423         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
2424         Use PlatformDisplay::eglDisplay().
2425         (WebCore::EGLWindowTransportSurface::swapBuffers): Ditto.
2426         (WebCore::EGLPixmapSurface::EGLPixmapSurface): Ditto.
2427         * platform/graphics/surfaces/glx/GLXContext.cpp:
2428         (WebCore::GLXOffScreenContext::initialize): Use X11Helper::nativeDisplay().
2429         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2430         (WebCore::GLXTransportSurface::GLXTransportSurface): Do not use m_sharedDisplay.
2431         (WebCore::GLXOffScreenSurface::initialize): Ditto.
2432         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
2433         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland): Call
2434         PlatformDisplay::initializeEGLDisplay() to insialize the EGL display.
2435         * platform/graphics/wayland/PlatformDisplayWayland.h:
2436         * platform/graphics/x11/PlatformDisplayX11.cpp:
2437         (WebCore::PlatformDisplayX11::initializeEGLDisplay): Override
2438         PlatformDisplay::initializeEGLDisplay() to initialize the
2439         m_eglDisplay member.
2440         * platform/graphics/x11/PlatformDisplayX11.h:
2441
2442 2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>
2443
2444         Web Inspector: DOMStorage exception and issue with sessionStorage
2445         https://bugs.webkit.org/show_bug.cgi?id=144646
2446
2447         Reviewed by Timothy Hatcher.
2448
2449         * inspector/InspectorDOMStorageAgent.cpp:
2450         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2451         Return session storage if the identifier says not local storage.
2452
2453 2015-05-06  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2454
2455         Move ReadableStreamJSSource.h/.cpp to ReadableJSStream.h/.cpp
2456         https://bugs.webkit.org/show_bug.cgi?id=144567
2457
2458         Reviewed by Darin Adler.
2459
2460         In addition to renaming ReadableStreamJSSource.h/.cpp, ReadableStreamJSSource is now made a private class of
2461         ReadableJSStream, called ReadableJSStream::Source.
2462         Made some minor refactoring (passing some ExecState by ref and not by pointer).
2463         No functional change, existing tests cover the changes.
2464
2465         * bindings/js/JSReadableStreamCustom.cpp:
2466         * bindings/js/ReadableJSStream.cpp:
2467         (WebCore::ReadableJSStream::Source::create):
2468         (WebCore::ReadableJSStream::Source::Source):
2469         (WebCore::ReadableJSStream::Source::~Source):
2470         (WebCore::ReadableJSStream::Source::globalObject):
2471         (WebCore::ReadableJSStream::Source::start):
2472         (WebCore::ReadableJSStream::create):
2473         (WebCore::ReadableJSStream::ReadableJSStream):
2474         * bindings/js/ReadableJSStream.h:
2475
2476 2015-05-05  Tim Horton  <timothy_horton@apple.com>
2477
2478         REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
2479         https://bugs.webkit.org/show_bug.cgi?id=144651
2480         <rdar://problem/20755722>
2481
2482         * page/mac/TextIndicatorWindow.mm:
2483         Fix an incorrectly-applied review comment.
2484
2485 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
2486
2487         REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
2488         https://bugs.webkit.org/show_bug.cgi?id=144651
2489         <rdar://problem/20755722>
2490
2491         Reviewed by Dan Bernstein.
2492
2493         * page/mac/TextIndicatorWindow.h:
2494         * page/mac/TextIndicatorWindow.mm:
2495         (WebCore::TextIndicatorWindow::clearTextIndicator):
2496         (WebCore::TextIndicatorWindow::setTextIndicator):
2497         (WebCore::TextIndicatorWindow::closeWindow):
2498         (WebCore::TextIndicatorWindow::startFadeOut):
2499         We can't keep m_fadingOut on TextIndicatorWindow, since it is reused.
2500         Keep it on the WebTextIndicatorView instead.
2501
2502 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
2503
2504         Add missing vtable override specifiers under Source/WebCore/html
2505         https://bugs.webkit.org/show_bug.cgi?id=144578
2506
2507         Reviewed by Daniel Bates.
2508
2509         Update virtual method overrides under Source/WebCore/html
2510         which are missing the override specifier.
2511
2512         * html/canvas/WebGL2RenderingContext.h:
2513         * html/canvas/WebGLRenderingContext.h:
2514         * html/track/InbandTextTrack.h:
2515         * html/track/TrackListBase.h:
2516
2517 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
2518
2519         Add missing vtable override specifiers under Source/WebCore/rendering
2520         https://bugs.webkit.org/show_bug.cgi?id=144570
2521
2522         Reviewed by Darin Adler.
2523
2524         Update virtual method overrides under Source/WebCore/rendering
2525         which are missing the override specifiers.
2526
2527         * rendering/InlineTextBox.h:
2528         (WebCore::InlineTextBox::calculateBoundaries): Deleted.
2529         * rendering/RenderFlowThread.h:
2530         * rendering/RenderMedia.h:
2531         (WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics): Deleted.
2532         * rendering/RenderMultiColumnSet.h:
2533         * rendering/RenderRegion.h:
2534         * rendering/RenderRegionSet.h:
2535         * rendering/RenderThemeGtk.h:
2536         * rendering/mathml/RenderMathMLOperator.h:
2537         * rendering/svg/RenderSVGBlock.h:
2538
2539 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
2540
2541         Add missing vtable override specifiers under Source/WebCore/Modules
2542         https://bugs.webkit.org/show_bug.cgi?id=144569
2543
2544         Reviewed by Darin Adler.
2545
2546         Update virtual method overrides under Source/WebCore/Modules
2547         which are missing the override specifier.
2548
2549         * Modules/mediasource/SourceBuffer.h:
2550         * Modules/mediastream/MediaStreamTrack.h:
2551         * Modules/mediastream/RTCVoidRequestImpl.h:
2552         * Modules/webaudio/AudioContext.h:
2553         (WebCore::AudioContext::mediaType): Deleted.
2554         (WebCore::AudioContext::presentationType): Deleted.
2555         (WebCore::AudioContext::canReceiveRemoteControlCommands): Deleted.
2556         (WebCore::AudioContext::didReceiveRemoteControlCommand): Deleted.
2557         (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Deleted.
2558         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
2559         * Modules/webaudio/MediaStreamAudioSourceNode.h:
2560         * Modules/webaudio/WaveShaperDSPKernel.h:
2561         * Modules/websockets/WebSocketChannel.h:
2562         (WebCore::WebSocketChannel::refThreadableWebSocketChannel): Deleted.
2563         (WebCore::WebSocketChannel::derefThreadableWebSocketChannel): Deleted.
2564         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2565         (WebCore::WorkerThreadableWebSocketChannel::refThreadableWebSocketChannel): Deleted.
2566         (WebCore::WorkerThreadableWebSocketChannel::derefThreadableWebSocketChannel): Deleted.
2567
2568 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
2569
2570         EventHandler::m_eventHandlerWillResetCapturingMouseEventsElement is incorrectly initialized
2571         https://bugs.webkit.org/show_bug.cgi?id=144583
2572
2573         Reviewed by Daniel Bates.
2574
2575         * page/EventHandler.cpp:
2576         (WebCore::EventHandler::EventHandler): The
2577         m_eventHandlerWillResetCapturingMouseEventsElement is a boolean,
2578         so initialize it to false, instead of to nullptr.
2579
2580 2015-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
2581
2582         [CSS Grid Layout] grid-template-areas should accept none value
2583         https://bugs.webkit.org/show_bug.cgi?id=144624
2584
2585         Reviewed by Darin Adler.
2586
2587         Default value for grid-template-areas property is "none":
2588         http://dev.w3.org/csswg/css-grid/#propdef-grid-template-areas
2589
2590         Currently if you set the property to "none" from JavaScript, the value
2591         doesn't get reseted and it keeps the old value.
2592
2593         Update fast/css-grid-layout/grid-template-areas-get-set.html adding a
2594         new test case.
2595
2596         * css/CSSParser.cpp:
2597         (WebCore::CSSParser::parseGridTemplateAreas): Add support to parse
2598         "none" successfully.
2599
2600 2015-05-05  Zalan Bujtas  <zalan@apple.com>
2601
2602         Remove unused RenderLayerBacking::hasContentsLayer().
2603         https://bugs.webkit.org/show_bug.cgi?id=144658
2604
2605         Reviewed by Simon Fraser.
2606
2607         No change in functionality.
2608
2609         * rendering/RenderLayerBacking.h:
2610
2611 2015-05-05  Alex Christensen  <achristensen@webkit.org>
2612
2613         [Content Extensions] Limit NFA size.
2614         https://bugs.webkit.org/show_bug.cgi?id=144649
2615
2616         Reviewed by Benjamin Poulain.
2617
2618         * contentextensions/CombinedURLFilters.cpp:
2619         (WebCore::ContentExtensions::generateNFAForSubtree):
2620         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
2621         Add a maximum NFA size to ensure that we do not use too much memory when compiling.
2622         * contentextensions/ContentExtensionCompiler.cpp:
2623         (WebCore::ContentExtensions::compileRuleList):
2624         Remove debugging code that doesn't compile any more.
2625
2626 2015-05-05  Roger Fong  <roger_fong@apple.com>
2627
2628         Unreviewed. Some assertion failures in compositing code after r183820.
2629         https://bugs.webkit.org/show_bug.cgi?id=144630.
2630
2631         * rendering/RenderLayerCompositor.cpp:
2632         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2633
2634 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
2635
2636         Add a layout mode for computing fixed layout size from a minimum size
2637         https://bugs.webkit.org/show_bug.cgi?id=144610
2638         <rdar://problem/19790341>
2639
2640         Reviewed by Simon Fraser.
2641
2642         * platform/spi/cocoa/QuartzCoreSPI.h:
2643         Add some SPI.
2644
2645 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
2646
2647         iOS] Scroll snap points trigger reentrant layout
2648         https://bugs.webkit.org/show_bug.cgi?id=144644
2649         <rdar://problem/20366547>
2650
2651         Reviewed by Simon Fraser.
2652
2653         Covered by scroll-snap-mandatory.html test.
2654
2655         We had an iOS code path in 'appendChildSnapOffsets' that used offsetLeft and offsetTop. This code
2656         was sometimes called during layout, which triggered a reentrant layout call, resulting in a debug
2657         assertion.
2658
2659         * page/scrolling/AxisScrollSnapOffsets.cpp:
2660         (WebCore::appendChildSnapOffsets): Remove iOS codepath.
2661
2662 2015-05-05  Roger Fong  <roger_fong@apple.com>
2663
2664         Blurry media control icons on non retina displays.
2665         https://bugs.webkit.org/show_bug.cgi?id=144638.
2666         <rdar://problem/20526166>
2667
2668         Reviewed by Dean Jackson.
2669
2670         * Modules/mediacontrols/mediaControlsApple.css:
2671         Adjust fullscreen buttons so that they look good on both 1x and 2x displays.
2672         (audio::-webkit-media-controls-fullscreen-button):
2673         (audio::-webkit-media-controls-fullscreen-button.exit):
2674         (audio::-webkit-media-controls-fullscreen-button:active):
2675         (audio::-webkit-media-controls-panel button.exit:active):
2676         Handle wireless playback picker button background in mediaControlsApple.js
2677         (audio::-webkit-media-controls-wireless-playback-picker-button):
2678         (audio::-webkit-media-controls-wireless-playback-picker-button.playing): Deleted.
2679
2680         * Modules/mediacontrols/mediaControlsApple.js:
2681         Update wireless playback picker button based on display type.
2682         (Controller.prototype.UIString):
2683         (Controller.prototype.handleReadyStateChange):
2684         (Controller.prototype.updateWirelessTargetPickerButton):
2685         (Controller.prototype.updateWirelessPlaybackStatus):
2686
2687 2015-05-05  Joseph Pecoraro  <pecoraro@apple.com>
2688
2689         Web Inspector: Crash under WebCore::domWindowFromExecState reloading page with inspector open
2690         https://bugs.webkit.org/show_bug.cgi?id=144636
2691
2692         Reviewed by Mark Lam.
2693
2694         This ensures we create an InjectedScript for the execution context
2695         (frame) preventing the global object / exec state from getting garbage
2696         collected before we remove it from our map.
2697
2698         * inspector/PageRuntimeAgent.cpp:
2699         (WebCore::PageRuntimeAgent::notifyContextCreated):
2700
2701 2015-05-05  Dean Jackson  <dino@apple.com>
2702
2703         [iOS] AirPlay placeholder in inline videos uses Helvetica or Times, should be system font
2704         https://bugs.webkit.org/show_bug.cgi?id=144643
2705
2706         Reviewed by Brent Fulgham.
2707
2708         The Airplay placard should use "-apple-system" as a font-family.
2709
2710         * Modules/mediacontrols/mediaControlsiOS.css:
2711         (audio::-webkit-media-controls-wireless-playback-status):
2712
2713 2015-05-05  Zalan Bujtas  <zalan@apple.com>
2714
2715         Navigating to www.apple.com hits assertion in WebCore::TextIteratorCopyableText::set()
2716         https://bugs.webkit.org/show_bug.cgi?id=144629
2717         rdar://problem/20689877
2718
2719         Reviewed by Andreas Kling.
2720
2721         This patch ensures that we don't emit empty text for the text iterator.
2722         In TextIterator::handleTextNode before emitting a string, certain characters (\n \t) need to
2723         be replaced with space. When such character is found, we emit the string we've processed so far and
2724         handle the replacement during the next callback.
2725         When the first character in the string needs replacing, there's nothing to emit. However if we don't
2726         handle at least one character, TextIterator::advance believes that processing is done and never calls  
2727         TextIterator::handleTextNode back with the rest of the string. 
2728
2729         Test: fast/text/simple-line-layout-innerText-with-newline.html
2730
2731         * editing/TextIterator.cpp:
2732         (WebCore::isNewLineOrTabCharacter):
2733         (WebCore::TextIterator::handleTextNode):
2734
2735 2015-05-05  Alex Christensen  <achristensen@webkit.org>
2736
2737         [Content Extensions] Use less memory to store the json input.
2738         https://bugs.webkit.org/show_bug.cgi?id=144604
2739
2740         Reviewed by Benjamin Poulain.
2741
2742         * contentextensions/ContentExtensionCompiler.cpp:
2743         (WebCore::ContentExtensions::compileRuleList):
2744         * contentextensions/ContentExtensionCompiler.h:
2745         (WebCore::ContentExtensions::loadEncodedRules):
2746         Don't copy strings as much or keep them alive after done using them.
2747
2748 2015-05-05  Eric Carlson  <eric.carlson@apple.com>
2749
2750         Prevent recursive calls to show target picker menu.
2751         https://bugs.webkit.org/show_bug.cgi?id=144637
2752         <rdar://problem/20824726>
2753
2754         Reviewed by Jer Noble.
2755
2756         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Add m_showingMenu.
2757         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2758         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Do nothing if the menu
2759         is already showing.
2760
2761 2015-05-05  Dean Jackson  <dino@apple.com>
2762
2763         Use system blue for Airplay Glyph
2764         https://bugs.webkit.org/show_bug.cgi?id=144614
2765
2766         There was a typo in the last commit.
2767
2768         * Modules/mediacontrols/mediaControlsiOS.css:
2769         (audio::-webkit-media-controls-optimized-fullscreen-button): Transition duration should be 250ms.
2770
2771 2015-05-04  Dean Jackson  <dino@apple.com>
2772
2773         [iOS] Use system blue for Airplay Glyph
2774         https://bugs.webkit.org/show_bug.cgi?id=144614
2775
2776         Reviewed by Eric Carlson.
2777
2778         Revert to using masks for the glyphs in the media controls,
2779         which allows us to:
2780         - use the system blue color when Airplay is active <rdar://problem/20245297>
2781         - fade out from the active state <rdar://problem/20245487>
2782         - allow the play button to give touch feedback <rdar://problem/17849930>
2783
2784         While those are three separate bugs, they all get addressed by
2785         this single change.
2786
2787         * Modules/mediacontrols/mediaControlsiOS.css:
2788         (audio::-webkit-media-controls-optimized-fullscreen-button):
2789         (audio::-webkit-media-controls-optimized-fullscreen-button:active):
2790         (video::-webkit-media-controls-play-button):
2791         (video::-webkit-media-controls-play-button.paused):
2792         (video::-webkit-media-controls-fullscreen-button):
2793         (video::-webkit-media-controls-wireless-playback-picker-button):
2794         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
2795         (video::-webkit-media-controls-optimized-fullscreen-button):
2796         (video::-webkit-media-controls-play-button:active): Deleted.
2797         (video::-webkit-media-controls-play-button.paused:active): Deleted.
2798         (video::-webkit-media-controls-fullscreen-button:active): Deleted.
2799         (video::-webkit-media-controls-wireless-playback-picker-button:active): Deleted.
2800
2801 2015-05-05  Eric Carlson  <eric.carlson@apple.com>
2802
2803         Only autoplay videos should not automatically play to playback target
2804         https://bugs.webkit.org/show_bug.cgi?id=144633
2805
2806         Reviewed by Jer Noble.
2807
2808         * html/HTMLMediaElement.cpp:
2809         (WebCore::HTMLMediaElement::HTMLMediaElement): Set RequireUserGestureToAutoplayToExternalDevice.
2810         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Remove
2811         RequireUserGestureToAutoplayToExternalDevice.
2812         (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate if playback
2813         was started from a user gesture, even if the video loops and/or doesn't have audio.
2814
2815         * html/HTMLMediaSession.h: Define RequireUserGestureToAutoplayToExternalDevice.
2816         (WebCore::HTMLMediaSession::hasBehaviorRestriction): New.
2817
2818 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
2819
2820         Unreviewed logging fix.
2821
2822         * page/WheelEventTestTrigger.cpp:
2823         (WebCore::WheelEventTestTrigger::triggerTestTimerFired): Fix typo in logging channel.
2824
2825 2015-05-04  Roger Fong  <roger_fong@apple.com>
2826
2827         Media control volume slider is opaque.
2828         https://bugs.webkit.org/show_bug.cgi?id=144470.
2829         <rdar://problem/20770350>
2830
2831         Rubberstamped by Simon Fraser.
2832
2833         * Modules/mediacontrols/mediaControlsApple.css:
2834         (audio::-webkit-media-controls-panel): 
2835         Don't create a stacking context just for the controls.
2836         Doing so causes the mix-blend-mode on the volume box to fail.
2837
2838 2015-05-05  Alex Christensen  <achristensen@webkit.org>
2839
2840         [Content Extensions] Combine NFAs properly and free memory as we compile.
2841         https://bugs.webkit.org/show_bug.cgi?id=144485
2842
2843         Reviewed by Benjamin Poulain.
2844
2845         This patch correctly combines all regular expressions with a common prefix up to
2846         the last quantified term into the same NFA.  It also deletes the prefix tree as it 
2847         creates NFAs, thus reducing the maximum memory used when compiling.
2848
2849         * contentextensions/CombinedURLFilters.cpp:
2850         (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
2851         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
2852         (WebCore::ContentExtensions::generateNFAForSubtree):
2853         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
2854         (WebCore::ContentExtensions::CombinedURLFilters::clear): Deleted.
2855         * contentextensions/CombinedURLFilters.h:
2856         * contentextensions/ContentExtensionCompiler.cpp:
2857         (WebCore::ContentExtensions::compileRuleList):
2858         * contentextensions/ContentExtensionsDebugging.h:
2859
2860 2015-05-04  Alex Christensen  <achristensen@webkit.org>
2861
2862         [Content Extensions] Use less memory when writing byte code to file
2863         https://bugs.webkit.org/show_bug.cgi?id=144602
2864
2865         Reviewed by Darin Adler.
2866
2867         * contentextensions/ContentExtensionCompiler.cpp:
2868         (WebCore::ContentExtensions::compileRuleList):
2869         * contentextensions/ContentExtensionCompiler.h:
2870         Compile one DFA at a time so we don't need to keep all the bytecode in memory at the same time.
2871         * contentextensions/DFABytecodeInterpreter.cpp:
2872         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2873         Jumps are now relative to the current DFA because we don't know about other DFAs that
2874         have been compiling when linking the DFA bytecode.  This will also make the DFA bytecode
2875         easier to minimize because more of the values are small in the DFAs after the first DFA.
2876         * platform/FileSystem.h:
2877
2878 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
2879
2880         Unreviewed, speculative WinCairo buildfix after r183807.
2881
2882         * WebCore.vcxproj/WebCore.vcxproj:
2883         * WebCore.vcxproj/WebCore.vcxproj.filters:
2884
2885 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
2886
2887         Remove TextureMapperImageBuffer
2888         https://bugs.webkit.org/show_bug.cgi?id=143561
2889
2890         Reviewed by Žan Doberšek.
2891
2892         * CMakeLists.txt:
2893         * PlatformEfl.cmake:
2894         * PlatformGTK.cmake:
2895         * PlatformWinCairo.cmake:
2896         * platform/graphics/GraphicsContext3DPrivate.cpp:
2897         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2898         * platform/graphics/cairo/ImageBufferCairo.cpp:
2899         (WebCore::ImageBufferData::paintToTextureMapper):
2900         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2901         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
2902         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Removed.
2903         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Removed.
2904         * platform/graphics/texmap/BitmapTexturePool.cpp:
2905         (WebCore::BitmapTexturePool::createTexture):
2906         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2907         (WebCore::GraphicsLayerTextureMapper::setFilters):
2908         * platform/graphics/texmap/TextureMapper.cpp:
2909         (WebCore::TextureMapper::create):
2910         (WebCore::TextureMapper::TextureMapper):
2911         * platform/graphics/texmap/TextureMapper.h:
2912         (WebCore::TextureMapper::accelerationMode): Deleted.
2913         * platform/graphics/texmap/TextureMapperGL.cpp:
2914         (WebCore::TextureMapperGL::TextureMapperGL):
2915         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Removed.
2916         * platform/graphics/texmap/TextureMapperImageBuffer.h: Removed.
2917         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2918         (WebCore::CompositingCoordinator::CompositingCoordinator):
2919         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2920         (WebCore::GraphicsLayer::supportsContentsTiling):
2921         (WebCore::CoordinatedGraphicsLayer::setShouldSupportContentsTiling): Deleted.
2922         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2923
2924 2015-05-05  Javier Fernandez  <jfernandez@igalia.com>
2925
2926         [CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
2927         https://bugs.webkit.org/show_bug.cgi?id=144443
2928
2929         Reviewed by Darin Adler.
2930
2931         Upgrade the align-content property to the last CSS3 Box
2932         Alignment specification. As it uses a different enumeration for
2933         Positional and Distribution alignment, it implies some changes in
2934         the FlexibleBox implementation.
2935
2936         Test: css3/parse-align-content.html
2937
2938         * css/CSSComputedStyleDeclaration.cpp:
2939         (WebCore::resolveContentAlignmentAuto):
2940         (WebCore::ComputedStyleExtractor::propertyValue):
2941         * css/CSSParser.cpp:
2942         (WebCore::isValidKeywordPropertyAndValue):
2943         (WebCore::isKeywordPropertyID):
2944         (WebCore::CSSParser::parseValue):
2945         * css/CSSPropertyNames.in:
2946         * rendering/RenderFlexibleBox.cpp:
2947         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2948         (WebCore::RenderFlexibleBox::layoutColumnReverse):
2949         (WebCore::initialAlignContentOffset):
2950         (WebCore::alignContentSpaceBetweenChildren):
2951         (WebCore::RenderFlexibleBox::alignFlexLines):
2952         * rendering/style/RenderStyle.cpp:
2953         (WebCore::RenderStyle::resolveContentAlignment):
2954         (WebCore::RenderStyle::resolveContentJustification):
2955         * rendering/style/RenderStyle.h:
2956         * rendering/style/StyleRareNonInheritedData.cpp:
2957         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2958         (WebCore::StyleRareNonInheritedData::operator==):
2959         * rendering/style/StyleRareNonInheritedData.h:
2960
2961 2015-05-05  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2962
2963         streams/readable-stream.html is very flaky
2964         https://bugs.webkit.org/show_bug.cgi?id=144455
2965
2966         Reviewed by Darin Adler.
2967
2968         Changed the link between readadable stream and controller.
2969         Controller ref()/deref() now increments/decrements its stream ref counter.
2970         This ensures that even if JS scripts do not keep track of the readable stream,
2971         the readable stream will not be disposed as long as the JS script has access to its controller.
2972
2973         Test: streams/readable-stream-gc.html
2974
2975         * Modules/streams/ReadableStreamController.h:
2976         (WebCore::ReadableStreamController::ReadableStreamController):
2977         (WebCore::ReadableStreamController::ref):
2978         (WebCore::ReadableStreamController::deref):
2979         (WebCore::ReadableStreamController::create): Deleted.
2980         (WebCore::ReadableStreamController::stream): Deleted.
2981         * bindings/js/JSReadableStreamControllerCustom.cpp:
2982         (WebCore::JSReadableStreamController::close):
2983         (WebCore::JSReadableStreamController::enqueue):
2984         (WebCore::JSReadableStreamController::error):
2985         * bindings/js/ReadableStreamJSSource.cpp:
2986         (WebCore::ReadableStreamJSSource::~ReadableStreamJSSource):
2987         (WebCore::ReadableStreamJSSource::start):
2988         (WebCore::ReadableJSStream::jsController):
2989         * bindings/js/ReadableStreamJSSource.h:
2990
2991 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
2992
2993         Small cleanup in RenderText::computePreferredLogicalWidths()
2994         https://bugs.webkit.org/show_bug.cgi?id=144615
2995
2996         Reviewed by Simon Fraser.
2997
2998         A little bit of cleanup before I tackle dependent widths in this function.
2999
3000         No new tests because there is no behavior change.
3001
3002         * rendering/RenderText.cpp:
3003         (WebCore::RenderText::computePreferredLogicalWidths):
3004
3005 2015-05-05  Joanmarie Diggs  <jdiggs@igalia.com>
3006
3007         [ATK] AX: figure out platform difference for ATK to make accessibility/table-cell-display-block.html work
3008         https://bugs.webkit.org/show_bug.cgi?id=143083
3009
3010         Reviewed by Chris Fleizach.
3011
3012         The main platform difference was that ATK was mapping the td element to
3013         the accessible table cell, and the render block resulting from the style
3014         wound up being the cell parent. In contrast, AX API was mapping the cell
3015         element to an AXGroup which was a child of the AXCell. Rather than try to
3016         bend yet another case to the will of our individual platforms' table needs,
3017         it made more sense to clean up the code that is competing and move toward
3018         more platform-unified handling. This is the first step in that direction,
3019         with ATK moving closer toward the WebCore/AX API mapping.
3020
3021         No new tests. Instead, modified and fixed the test which was being skipped
3022         for GTK, and also updated the expectations of some Mac tests whose FIXMEs
3023         should now be fixed.
3024
3025         * accessibility/AccessibilityNodeObject.cpp:
3026         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
3027         * accessibility/AccessibilityRenderObject.cpp:
3028         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3029         * accessibility/AccessibilityTable.cpp:
3030         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
3031         * accessibility/AccessibilityTableCell.cpp:
3032         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
3033         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3034         (createAccessibilityRoleMap):
3035
3036 2015-05-04  Jer Noble  <jer.noble@apple.com>
3037
3038         [iOS] Videos on apple.com flash when touching to show or hide the controls
3039         https://bugs.webkit.org/show_bug.cgi?id=144598
3040
3041         Reviewed by Eric Carlson.
3042
3043         The apple.com site will add a "selection" rectangle atop a playing video when it recieves a touchstart
3044         event. The default media controls use touchstart to signal the controls to become visible. Stop the touch
3045         from propagating down to the page in this case.
3046
3047         * Modules/mediacontrols/mediaControlsiOS.js:
3048         (ControllerIOS.prototype.handleWrapperTouchStart):
3049
3050 2015-05-04  Andreas Kling  <akling@apple.com>
3051
3052         Record the reference time when Performance is constructed.
3053         <https://webkit.org/b/144616>
3054
3055         Reviewed by Geoffrey Garen.
3056
3057         This is a merge of Blink's r156613 by simonjam@chromium.org.
3058
3059         Cache a copy of the DocumentLoader's reference timestamp when constructing
3060         the Performance object. That way we don't have to jump through a bunch of scary
3061         hoops to access it when now() is called later on.
3062
3063         * page/Performance.cpp:
3064         (WebCore::Performance::Performance):
3065         (WebCore::Performance::now): Deleted.
3066         * page/Performance.h:
3067
3068 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
3069
3070         Fix assertions in WK1 tests after r183777.
3071         
3072         Two issues with the original change:
3073         
3074         If not in compositing mode, we shouldn't schedule layer flushes, since
3075         Document::documentWillSuspendForPageCache() only only calls cancelCompositingLayerUpdate()
3076         if in compositing mode.
3077         
3078         Second, RenderLayerCompositor::rootBackgroundTransparencyChanged() never stored the
3079         new color, resulting in too many triggered compositing updates.
3080
3081         * rendering/RenderLayerCompositor.cpp:
3082         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
3083
3084 2015-05-04  Zalan Bujtas  <zalan@apple.com>
3085
3086         RenderWidget::setWidgetGeometry() can end up destroying *this*.
3087         https://bugs.webkit.org/show_bug.cgi?id=144601
3088
3089         Reviewed by Andreas Kling.
3090
3091         This is a speculative fix to ensure we don't crash on an invalid *this* renderer
3092         while flattening the current iframe.
3093         Calling RenderWidget::setWidgetGeometry() can result in destroying the current renderer.
3094         While it is not a issue in case of normal layout flow as widget positions are updated at post layout,
3095         frame flattening initiates this action in the middle of layout.
3096         This patch re-introduces refcount model for RenderWidgets so that the renderer is protected during layout
3097         when frame flattening is in use.
3098
3099         * rendering/RenderFrameBase.cpp:
3100         (WebCore::RenderFrameBase::layoutWithFlattening): Let's be paranoid about child view.
3101         * rendering/RenderObject.cpp:
3102         (WebCore::RenderObject::destroy):
3103         * rendering/FrameView.cpp:
3104         (WebCore::FrameView::layout):
3105         * rendering/RenderView.h:
3106         * rendering/RenderWidget.cpp:
3107         (WebCore::RenderWidget::~RenderWidget):
3108         * rendering/RenderWidget.h:
3109         (WebCore::RenderWidget::ref):
3110         (WebCore::RenderWidget::deref):
3111
3112 2015-05-04  Doug Russell  <d_russell@apple.com>
3113
3114         AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
3115         https://bugs.webkit.org/show_bug.cgi?id=144489
3116
3117         Reviewed by Chris Fleizach.
3118
3119         Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
3120         on the returned control.
3121         Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
3122         Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
3123         Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
3124         Add support for setSelectedVisibleTextRange() in accessibility tests.
3125
3126         Test: platform/mac/accessibility/selection-sync.html
3127
3128         * accessibility/AXObjectCache.cpp:
3129         (WebCore::AXObjectCache::showIntent):
3130         (WebCore::AXObjectCache::setTextSelectionIntent):
3131         (WebCore::AXObjectCache::setIsSynchronizingSelection):
3132         (WebCore::AXObjectCache::postTextStateChangeNotification):
3133         * accessibility/AXObjectCache.h:
3134         * accessibility/AXTextStateChangeIntent.h:
3135         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
3136         * accessibility/AccessibilityRenderObject.cpp:
3137         (WebCore::setTextSelectionIntent):
3138         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3139         (WebCore::AccessibilityRenderObject::setFocused):
3140         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3141         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): Deleted.
3142         * accessibility/mac/AXObjectCacheMac.mm:
3143         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3144
3145 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
3146
3147         [Mac] Audio-only files should not have a device picker
3148         https://bugs.webkit.org/show_bug.cgi?id=144606
3149         <rdar://problem/20806387>
3150
3151         Reviewed by Dean Jackson.
3152
3153         * Modules/mediacontrols/mediaControlsApple.js:
3154         (Controller.prototype.hasVideo): New.
3155         (Controller.prototype.updateFullscreenButtons): Use hasVideo.
3156         (Controller.prototype.updateHasVideo): Ditto.
3157         (Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
3158         unless a file has video.
3159
3160 2015-05-04  Chris Dumez  <cdumez@apple.com>
3161
3162         Crash at com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::createWindow + 185
3163         https://bugs.webkit.org/show_bug.cgi?id=144597
3164         <rdar://problem/20361579>
3165
3166         Reviewed by Andreas Kling.
3167
3168         Test: fast/dom/Window/window-open-activeWindow-null-frame.html
3169
3170         In our implementation of window.open(), we make sure that the window
3171         which window.open() is called has a frame. However, we did not have the
3172         same check for the activeDOMWindow (i.e. the lexicalGlobalObject) causing
3173         us to crash in WebCore::createWindow() when dereferencing it.
3174
3175         This patch updates WebCore::createWindow() takes a reference to the
3176         openerFrame instead of a pointer to make it clear the implementation
3177         expects it to be non-null. A null check is then added for the frame
3178         at the call site: DOMWindow::createWindow().
3179
3180         * inspector/InspectorFrontendClientLocal.cpp:
3181         (WebCore::InspectorFrontendClientLocal::openInNewTab):
3182         * loader/FrameLoader.cpp:
3183         (WebCore::isDocumentSandboxed):
3184         (WebCore::FrameLoader::submitForm):
3185         (WebCore::createWindow):
3186         Take a reference to openerFrame instead of a pointer as the
3187         implementation expects it to be non-null.
3188
3189         * loader/FrameLoader.h:
3190         * page/DOMWindow.cpp:
3191         (WebCore::DOMWindow::createWindow):
3192         Add null check for activeFrame before passing it to
3193         WebCore::createWindow().
3194
3195 2015-05-04  Dean Jackson  <dino@apple.com>
3196
3197         Create a named CSS property for system colors
3198         https://bugs.webkit.org/show_bug.cgi?id=144423
3199
3200         Follow-up comments from Darin Adler.
3201
3202         * rendering/RenderThemeIOS.h: Cache a Color rather than an RGBA32.
3203         * rendering/RenderThemeIOS.mm:
3204         (WebCore::RenderThemeIOS::systemColor): Use "add" to avoid multiple hits on the HashMap, and
3205         cache invalid responses so that we don't have to keep looking for non-existent colors.
3206         * rendering/RenderThemeMac.h: Same as iOS.
3207         * rendering/RenderThemeMac.mm:
3208         (WebCore::RenderThemeMac::systemColor):
3209
3210 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
3211
3212         display:none iframes cause repeated compositing flushing
3213         https://bugs.webkit.org/show_bug.cgi?id=144529
3214
3215         Reviewed by Darin Adler.
3216         
3217         FrameView::updateLayoutAndStyleIfNeededRecursive() only forces layout on rendered
3218         frames, by virtue of using its Widget children which are FrameViews.
3219         
3220         However, FrameView::flushCompositingStateIncludingSubframes() iterated over
3221         all frames, and return false if any subframe needed layout. Thus, if it saw
3222         non-rendered frames (which are never laid out), it would return false,
3223         which causes the CFRunLoopObserver that drives flushing to run again.
3224         
3225         Fix by having FrameView::flushCompositingStateIncludingSubframes() only check
3226         rendered frames, using FrameTree::traverseNextRendered() (which needs to be public).
3227         
3228         Also change FrameView::needsStyleRecalcOrLayout() and FrameView::updateLayoutAndStyleIfNeededRecursive()
3229         to fetch the list of FrameViews using FrameTree's nextRenderedSibling(), rather than using
3230         the Widget tree, since we'd like to eventually remove Widgets, and using the Frame
3231         tree matches flushCompositingStateIncludingSubframes() and other code.
3232
3233         Test: compositing/iframes/display-none-subframe.html
3234
3235         * page/FrameTree.h:
3236         * page/FrameView.cpp:
3237         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
3238         (WebCore::FrameView::needsStyleRecalcOrLayout):
3239         (WebCore::FrameView::renderedChildFrameViews): Helper that returns a vector
3240         of Ref<FrameView>s for rendered frames only.
3241         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
3242         * page/FrameView.h:
3243
3244 2015-05-04  Chris Dumez  <cdumez@apple.com>
3245
3246         Unreviewed. Fix build with SECURITY_ASSERTIONS enabled.
3247         <rdar://problem/20653104>
3248
3249         * dom/ScriptExecutionContext.cpp:
3250         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
3251         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache):
3252         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
3253         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
3254         * dom/ScriptExecutionContext.h:
3255
3256 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
3257
3258         Fix updating of tiled backing opaquenss when the page background color changes
3259         https://bugs.webkit.org/show_bug.cgi?id=144600
3260         rdar://problem/20723035
3261
3262         Reviewed by Tim Horton.
3263
3264         RenderLayerCompositor makes the page tiles opaque or not based on the result of
3265         viewHasTransparentBackground(), which consults the view transparency, and
3266         FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based
3267         on the root and/or body background colors.
3268
3269         We thus need to re-evaluate whether page tiles are opaque when any of these inputs
3270         change, but were failing to do so for the FrameView's baseBackgroundColor, and
3271         the page root background color.
3272         
3273         Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange()
3274         (for the root) trigger a compositing update when necessary.
3275
3276         Added setViewBaseBackgroundColor() on Internals for testing.
3277
3278         Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html
3279
3280         * page/FrameView.cpp:
3281         (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper.
3282         (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the 
3283         frame's document, and trigger a compositing update check if the alpha changed.
3284         (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if
3285         this FrameView is associated with the Document being displayed in the FrameView's
3286         Frame. This returns false when we're setting up a new FrameView (its Frame still
3287         points to the old document, so renderView() returns the RenderView for the Frame's
3288         existing Document).
3289         * page/FrameView.h:
3290         * rendering/RenderBox.cpp:
3291         (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs
3292         to do an update.
3293         * rendering/RenderLayerCompositor.cpp:
3294         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result
3295         of documentBackgroundColor() changed in alpha since the last time, trigger a compositing
3296         update.
3297         * rendering/RenderLayerCompositor.h:
3298         * testing/Internals.cpp:
3299         (WebCore::Internals::setViewBaseBackgroundColor):
3300         * testing/Internals.h:
3301         * testing/Internals.idl:
3302
3303 2015-05-04  Jer Noble  <jer.noble@apple.com>
3304
3305         [iOS] Crash in -[WebCALayerHostWrapper resolveBounds]
3306         https://bugs.webkit.org/show_bug.cgi?id=144595
3307
3308         Reviewed by Eric Carlson.
3309
3310         It is possible for a WebCALayorHostWrapper to outlive the WebVideoFullscreenModel to which it refers,
3311         since the model pointer is bare, rather than a RefPtr. The reference to the model must be invalidated
3312         before the model is destroyed.
3313
3314         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3315         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
3316
3317 2015-05-04  Ryosuke Niwa  <rniwa@webkit.org>
3318
3319         Toggling underline or strike through affects each other
3320         https://bugs.webkit.org/show_bug.cgi?id=27818
3321
3322         Reviewed by Darin Adler.
3323
3324         This patch introduces a new mechanism to apply and remove text decorations. This is necessary because text
3325         decorations are always additive and we can't differentiate whether we're adding or removing a text decoration.
3326         Conceptually, we need four values for text decorations: adding underline, removing underline, adding
3327         line-through, and removing line-through but we have only three: underline, line-through, none.
3328
3329         After this patch, there are three mechanism by which text decorations states are kept tracked. While applying
3330         or removing text decorations, we use newly added m_underlineChange and m_strikeThroughChange in EditingStyle.
3331         For the typing style, we use -webkit-text-decorations-in-effect to store the state since we need to preserve
3332         every type of text decorations such as overline in addition to underline and line-through. Once applied, all
3333         text decorations should be expressed in terms of the standard text-decoration property.
3334
3335         Test: editing/execCommand/toggle-mixed-text-decorations.html
3336
3337         * editing/ApplyStyleCommand.cpp:
3338         (WebCore::ApplyStyleCommand::applyBlockStyle):
3339         (WebCore::ApplyStyleCommand::removeCSSStyle): conflictsWithInlineStyleOfElement now creates a new inline style
3340         instead of a list of properties to remove.
3341         (WebCore::ApplyStyleCommand::addBlockStyle):
3342         (WebCore::ApplyStyleCommand::applyInlineStyleChange): Merge inline styles instead of adding as string.
3343         Otherwise it would generate style content attribute with multiple text-decoration properties.
3344
3345         * editing/EditingStyle.cpp:
3346         (WebCore::HTMLElementEquivalent::matches):
3347         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Takes an EditingStyle instead of StyleProperties.
3348         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
3349         (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent): 
3350         (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Respect newly added m_strikeThroughChange and
3351         m_underlineChange in EditingStyle.
3352         (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Ditto.
3353         (WebCore::HTMLTextDecorationEquivalent::changeInStyle): Added. Retrieves the change enum for the associated
3354         type of text-decoration (underline or strike through).
3355         (WebCore::HTMLAttributeEquivalent::matches):
3356         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
3357         (WebCore::EditingStyle::EditingStyle): Initialize m_underlineChange and m_strikeThroughChange. Also use the
3358         delegating constructor elsewhere. Also added the missing call to extractFontSizeDelta() in the variant that
3359         takes CSSPropertyID and String, and added a variant that takes CSSPropertyID and CSSValueID.
3360         (WebCore::EditingStyle::isEmpty): Return false when m_underlineChange and m_strikeThroughChange are not "none".
3361         (WebCore::applyTextDecorationChangeToValueList): Added.
3362         (WebCore::EditingStyle::overrideTypingStyleAt): Added. Used by Editor::computeAndSetTypingStyle to set a new
3363         typing style. Resolve m_underlineChange and m_strikeThroughChange into -webkit-text-decorations-in-effect.
3364         (WebCore::EditingStyle::clear): Clear m_underlineChange and m_strikeThroughChange.
3365         (WebCore::EditingStyle::copy): Copy m_underlineChange and m_strikeThroughChange.
3366         (WebCore::textDecorationValueList): Added.
3367         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Now takes a pointer to MutableStyleProperties
3368         instead of a vector. This was necessary we can't simply remove text-decoration property in ApplyStyleCommand's
3369         removeCSSStyle as that would result in unrelated text decorations also getting removed. Also added the code
3370         for m_underlineChange and m_strikeThroughChange. Only removing text decoration changes can cause a conflict
3371         since text decorations are always additive.
3372         (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Check isEmpty() instead of the nullity of
3373         m_mutableStyle to respect m_underlineChange and m_strikeThroughChange.
3374         (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
3375         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
3376         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): Respect the values of m_underlineChange and
3377         m_strikeThroughChange. Here, the style is considered present if it has text decorations that are being added.
3378         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
3379         (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Takes EditingStyle instead of StyleProperties to
3380         respect m_underlineChange and m_strikeThroughChange.
3381         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
3382         (WebCore::mergeTextDecorationValues):
3383         (WebCore::EditingStyle::mergeStyle): Make a copy of CSSValueList before modifying it since CSSValueList's are
3384         shared with other immutable StyleProperties.
3385         (WebCore::StyleChange::StyleChange): Set m_applyUnderline, m_applyLineThrough, and m_cssStyle if either
3386         m_underlineChange or m_strikeThroughChange are TextDecorationChange::Add in EditingStyle if the current position
3387         doesn't already have the matching style.
3388         (WebCore::StyleChange::operator==): Moved from the header file. Also added the logic to compare m_cssStyle now
3389         that it's a StyleProperties instead of String.
3390
3391         * editing/EditingStyle.h: Added TextDecorationChange.
3392         (WebCore::EditingStyle::create): Added a variant that takes CSSPropertyID and CSSValueID.
3393         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
3394         (WebCore::EditingStyle::setUnderlineChange): Added.
3395         (WebCore::EditingStyle::underlineChange): Added.
3396         (WebCore::EditingStyle::setStrikeThroughChange): Added.
3397         (WebCore::EditingStyle::strikeThroughChange): Added.
3398         (WebCore::StyleChange::cssStyle): Now returns StyleProperties* instead of String so that ApplyStyleCommand's
3399         applyInlineStyleChange could merge inline styles instead of just appending it to the end.
3400         (WebCore::StyleChange::operator==): Moved into the cpp file.
3401
3402         * editing/Editor.cpp:
3403         (WebCore::Editor::applyStyle): Added. This variant takes EditingStyle instead of StyleProperties.
3404         (WebCore::Editor::applyStyleToSelection): Ditto.
3405         (WebCore::Editor::computeAndSetTypingStyle): Added a variant for EditingStyle. Also use overrideTypingStyleAt
3406         to set -webkit-text-decorations-in-effect based on m_underlineChange and m_strikeThroughChange 
3407
3408         * editing/Editor.h:
3409         * editing/EditorCommand.cpp:
3410         (WebCore::applyCommandToFrame):
3411         (WebCore::isStylePresent): Extracted from executeToggleStyle.
3412         (WebCore::executeApplyStyle):
3413         (WebCore::executeToggleStyle):
3414         (WebCore::executeToggleStyleInList): Deleted.
3415         (WebCore::textDecorationChangeForToggling): Added. Used in executeStrikethrough and executeUnderline.
3416         (WebCore::executeStrikethrough):
3417         (WebCore::executeUnderline):
3418
3419 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
3420
3421         [Mac] Fix build breakage caused by API deprecation
3422         https://bugs.webkit.org/show_bug.cgi?id=144593
3423
3424         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3425         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Suppress warnings.
3426
3427 2015-05-04  Chris Dumez  <cdumez@apple.com>
3428
3429         REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-right property
3430         https://bugs.webkit.org/show_bug.cgi?id=144584
3431         <rdar://problem/20796829>
3432
3433         Reviewed by Darin Adler.
3434
3435         The CSS parser was rejecting calculated values at parsing time if it
3436         considered the value was negative and the CSS property did not allow
3437         negative values. However, doing so at this point will not always work
3438         because we don't necessarily know the font-size yet (for e.g. for
3439         calc(0.5em - 2px). Also, rejecting negative calculated values is not
3440         the right behavior as the the specification. The specification says
3441         we should clamp:
3442         http://dev.w3.org/csswg/css-values-3/#calc-range
3443
3444         This patch updates validateCalculationUnit() to stop marking the value
3445         as invalid if it is negative. Instead, let the CSSCalcValue's permitted
3446         range clamp the value as needed.
3447
3448         This bug was causing the bottom graphic on aldentrio.com to not be
3449         rendered properly.
3450
3451         Test: fast/css/negative-calc-values.html
3452               fast/css/padding-calc-value.html
3453
3454         * css/CSSParser.cpp:
3455         (WebCore::CSSParser::validateCalculationUnit):
3456
3457 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
3458
3459         [Mac] Show wireless playback placard even when an element has custom controls
3460         https://bugs.webkit.org/show_bug.cgi?id=144548
3461
3462         Reviewed by Brent Fulgham.
3463
3464         * Modules/mediacontrols/mediaControlsApple.js:
3465         (Controller.prototype.shouldHaveAnyUI): Return true when playing to wireless target.
3466         (Controller.prototype.reconnectControls): Add controls when playing to wireless target.
3467         (Controller.prototype.setPlaying): Return early when there is no 'controls' attribute.
3468         (Controller.prototype.showControls): Ditto.
3469         (Controller.prototype.updateWirelessPlaybackStatus): Call updateBase when playing to wireless
3470         target to ensure that controls have been set up.
3471         (Controller.prototype.handleWirelessPlaybackChange): Call reconnectControls when playing
3472         to wireless target when there is no 'controls' attribute.
3473         (Controller.prototype.showInlinePlaybackPlaceholderOnly): New.
3474
3475         * html/HTMLMediaElement.cpp:
3476         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Call configureMediaControls.
3477         (WebCore::HTMLMediaElement::configureMediaControls): Require controls when playing
3478         to wireless target.
3479         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Remove some unhelpful, noisy, logging.
3480
3481 2015-05-04  Dan Bernstein  <mitz@apple.com>
3482
3483         Fixed the build.
3484
3485         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3486         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Moved off of a deprecated
3487         method to a non-deprecated equivalent.
3488
3489 2015-05-04  Javier Fernandez  <jfernandez@igalia.com>
3490
3491         [CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
3492         https://bugs.webkit.org/show_bug.cgi?id=144442
3493
3494         Reviewed by David Hyatt.
3495
3496         Upgrade the justify-content property to the last CSS3 Box
3497         Alignment specification. It defines a different enumeration for
3498         Positional and Distribution alignment, which requires changes in
3499         the FlexibleBox implementation.
3500
3501         A new parsing function has been implemented to replace the basic
3502         keyword IDs validation. Because of the complexity of the new
3503         values, a new CSSPrimitiveValue derived class has been defined
3504         which simplifies considerably the parsing logic.
3505
3506         We will follow the same approach than for Self Alignment, defining
3507         a single class to hold all the related alignment data. This makes
3508         possible to use a StyleBuilderConverter function instead of custom
3509         builder functions for these properties.
3510
3511         Test: css3/parse-justify-content.html
3512
3513         * CMakeLists.txt:
3514         * WebCore.xcodeproj/project.pbxproj:
3515         * css/CSSComputedStyleDeclaration.cpp:
3516         (WebCore::resolveContentAlignmentAuto):
3517         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
3518         (WebCore::ComputedStyleExtractor::propertyValue):
3519         (WebCore::valueForItemPositionWithOverflowAlignment): Deleted.
3520         * css/CSSContentDistributionValue.cpp: Added.
3521         (WebCore::CSSContentDistributionValue::CSSContentDistributionValue):
3522         (WebCore::CSSContentDistributionValue::~CSSContentDistributionValue):
3523         (WebCore::CSSContentDistributionValue::customCSSText):
3524         (WebCore::CSSContentDistributionValue::equals):
3525         * css/CSSContentDistributionValue.h: Added.
3526         (WebCore::CSSContentDistributionValue::create):
3527         (WebCore::CSSContentDistributionValue::distribution):
3528         (WebCore::CSSContentDistributionValue::position):
3529         (WebCore::CSSContentDistributionValue::overflow):
3530         * css/CSSParser.cpp:
3531         (WebCore::isValidKeywordPropertyAndValue):
3532         (WebCore::isKeywordPropertyID):
3533         (WebCore::CSSParser::parseValue):
3534         (WebCore::isContentDistributionKeyword):
3535         (WebCore::isContentPositionKeyword):
3536         (WebCore::isAlignmentOverflowKeyword):
3537         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
3538         (WebCore::CSSParser::parseItemPositionOverflowPosition):
3539         (WebCore::CSSParser::parseLegacyPosition): Deleted.
3540         * css/CSSParser.h:
3541         * css/CSSPrimitiveValueMappings.h:
3542         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3543         (WebCore::CSSPrimitiveValue::operator ContentPosition):
3544         (WebCore::CSSPrimitiveValue::operator ContentDistributionType):
3545         (WebCore::CSSPrimitiveValue::operator EFlexDirection): Deleted.
3546         * css/CSSPropertyNames.in:
3547         * css/CSSValue.cpp:
3548         (WebCore::CSSValue::equals):
3549         (WebCore::CSSValue::cssText):
3550         (WebCore::CSSValue::destroy):
3551         * css/CSSValue.h:
3552         (WebCore::CSSValue::isContentDistributionValue):
3553         (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted.
3554         * css/CSSValueKeywords.in:
3555         * css/StyleBuilderConverter.h:
3556         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
3557         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): Deleted.
3558         * rendering/RenderFlexibleBox.cpp:
3559         (WebCore::initialJustifyContentOffset):
3560         (WebCore::justifyContentSpaceBetweenChildren):
3561         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3562         (WebCore::RenderFlexibleBox::layoutColumnReverse):
3563         * rendering/RenderFullScreen.cpp:
3564         (WebCore::createFullScreenStyle):
3565         * rendering/mathml/RenderMathMLScripts.cpp:
3566         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
3567         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
3568         * rendering/style/RenderStyle.h:
3569         * rendering/style/RenderStyleConstants.h:
3570         * rendering/style/StyleContentAlignmentData.h: Added.
3571         (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
3572         (WebCore::StyleContentAlignmentData::setPosition):
3573         (WebCore::StyleContentAlignmentData::setDistribution):
3574         (WebCore::StyleContentAlignmentData::setOverflow):
3575         (WebCore::StyleContentAlignmentData::position):
3576         (WebCore::StyleContentAlignmentData::distribution):
3577         (WebCore::StyleContentAlignmentData::overflow):
3578         (WebCore::StyleContentAlignmentData::operator==):
3579         (WebCore::StyleContentAlignmentData::operator!=):
3580         * rendering/style/StyleRareNonInheritedData.cpp:
3581         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3582         (WebCore::StyleRareNonInheritedData::operator==):
3583         * rendering/style/StyleRareNonInheritedData.h:
3584
3585 2015-05-04  Per Arne Vollan  <peavo@outlook.com>
3586
3587         [WinCairo] Compile error in sharedEGLDisplay() method.
3588         https://bugs.webkit.org/show_bug.cgi?id=144563
3589
3590         Reviewed by Alex Christensen.
3591
3592         The PlatformDisplay type is undefined.
3593
3594         * platform/graphics/egl/GLContextEGL.cpp:
3595         (WebCore::sharedEGLDisplay):
3596
3597 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
3598
3599         [WTF] Remove Functional.h inclusions
3600         https://bugs.webkit.org/show_bug.cgi?id=144400
3601
3602         Reviewed by Darin Adler.
3603
3604         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebCore.
3605
3606         * Modules/mediastream/MediaStreamTrack.cpp:
3607         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
3608         * Modules/mediastream/UserMediaRequest.cpp:
3609         * page/scrolling/ScrollingTree.h:
3610         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
3611         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3612         * platform/MemoryPressureHandler.cpp:
3613         * platform/UserActivity.h: Include the <objc/objc.h> header that was previously
3614         indirectly included through Functional.h.
3615         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3616         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3617         * platform/mac/SoftLinking.h: Unconditionally include the <objc/runtime.h> header
3618         that was previously included for the Mac port through Functional.h.
3619
3620 2015-05-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3621
3622         [Streams API] Refactor ReadableJSStream and ReadableStreamJSSource
3623         https://bugs.webkit.org/show_bug.cgi?id=144387
3624
3625         Reviewed by Darin Adler.
3626
3627         Made ReadableStreamReader a private class of ReadableJSStream.
3628         Simplified ReadableJSStream construction so that binding constructor does not need to know about ReadableStreamJSSource. 
3629
3630         No functional change, existing tests cover the changes.
3631
3632         * Modules/streams/ReadableStream.h:
3633         (WebCore::ReadableStream::source): Added to implement jsSource(), needed by ReadableJSStream.
3634         * bindings/js/JSReadableStreamCustom.cpp:
3635         (WebCore::constructJSReadableStream): Simplified to not have to handle source creation.
3636         * bindings/js/ReadableStreamJSSource.cpp:
3637         (WebCore::ReadableStreamJSSource::globalObject): Helper function to be used in other future methods.
3638         (WebCore::ReadableStreamJSSource::start):
3639         (WebCore::ReadableJSStream::create):
3640         (WebCore::ReadableJSStream::createReader):
3641         (WebCore::ReadableJSStream::jsSource):
3642         (WebCore::ReadableJSStream::Reader::create):
3643         (WebCore::ReadableJSStream::Reader::Reader):
3644         * bindings/js/ReadableStreamJSSource.h:
3645
3646 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
3647
3648         Remove move-js-headers.sh
3649         https://bugs.webkit.org/show_bug.cgi?id=144323
3650
3651         Reviewed by Daniel Bates.
3652
3653         move-js-headers.sh was only used by the Wx port, which has been removed from trunk long ago.
3654
3655         * move-js-headers.sh: Removed.
3656
3657 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
3658
3659         [ARM] Don't compare unsigned chars to EOF (-1)
3660         https://bugs.webkit.org/show_bug.cgi?id=144439
3661
3662         Reviewed by Geoffrey Garen.
3663
3664         * platform/linux/MemoryPressureHandlerLinux.cpp:
3665         (WebKit::nextToken): Don't cast return value of fgetc() to char.
3666
3667 2015-05-04  Manuel Rego Casasnovas  <rego@igalia.com>
3668
3669         [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
3670         https://bugs.webkit.org/show_bug.cgi?id=144449
3671
3672         Reviewed by Sergio Villar Senin.
3673
3674         If there're implicit tracks then trackPositions is bigger than
3675         trackSizes, so we need to use the proper index to append the trailing
3676         <ident>s in valueForGridTrackList().
3677
3678         Test: fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
3679
3680         * css/CSSComputedStyleDeclaration.cpp:
3681         (WebCore::valueForGridTrackList):
3682
3683 2015-05-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3684
3685         Purge PassRefPtr in WebCore/html
3686         https://bugs.webkit.org/show_bug.cgi?id=144543
3687
3688         Reviewed by Andreas Kling.
3689
3690         Change PassRefPtr in create() factory functions with Ref. In some functions,
3691         it returns RefPtr when it might have a chance to return nullptr.
3692
3693         No new tests, no behavior changes.
3694
3695         * Modules/encryptedmedia/MediaKeySession.cpp:
3696         (WebCore::MediaKeySession::sendError):
3697         * html/DOMFormData.h:
3698         (WebCore::DOMFormData::create):
3699         * html/HTMLMediaElement.cpp:
3700         (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
3701         * html/HTMLMediaElement.h:
3702         * html/MediaError.h:
3703         (WebCore::MediaError::create):
3704         * html/MediaKeyError.h:
3705         (WebCore::MediaKeyError::create):
3706         * html/canvas/CanvasGradient.h:
3707         * html/canvas/CanvasProxy.cpp:
3708         (WebCore::CanvasProxy::create):
3709         * html/canvas/CanvasProxy.h:
3710         * html/canvas/WebGLActiveInfo.h:
3711         (WebCore::WebGLActiveInfo::create):
3712         * html/canvas/WebGLContextAttributes.h:
3713         * html/canvas/WebGLContextGroup.h:
3714         * html/canvas/WebGLProgram.h:
3715         * html/canvas/WebGLQuery.h:
3716         * html/canvas/WebGLRenderbuffer.h:
3717         * html/canvas/WebGLSampler.h:
3718         * html/canvas/WebGLShader.h:
3719         * html/canvas/WebGLShaderPrecisionFormat.h:
3720         * html/canvas/WebGLSync.h:
3721         * html/canvas/WebGLTexture.h:
3722         * html/canvas/WebGLTransformFeedback.h:
3723         * html/canvas/WebGLUniformLocation.h:
3724         * html/canvas/WebGLVertexArrayObjectOES.h:
3725         * html/shadow/ImageControlsRootElement.cpp:
3726         (WebCore::ImageControlsRootElement::maybeCreate):
3727         * html/shadow/ImageControlsRootElement.h:
3728         * html/shadow/MediaControlElements.cpp:
3729         (WebCore::MediaControlPanelElement::create):
3730         (WebCore::MediaControlPanelEnclosureElement::create):
3731         (WebCore::MediaControlOverlayEnclosureElement::create):
3732         (WebCore::MediaControlTimelineContainerElement::create):
3733         (WebCore::MediaControlVolumeSliderContainerElement::create):
3734         (WebCore::MediaControlStatusDisplayElement::create):
3735         (WebCore::MediaControlPanelMuteButtonElement::create):
3736         (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
3737         (WebCore::MediaControlPlayButtonElement::create):
3738         (WebCore::MediaControlOverlayPlayButtonElement::create):
3739         (WebCore::MediaControlSeekForwardButtonElement::create):
3740         (WebCore::MediaControlSeekBackButtonElement::create):
3741         (WebCore::MediaControlRewindButtonElement::create):
3742         (WebCore::MediaControlReturnToRealtimeButtonElement::create):
3743         (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
3744         (WebCore::MediaControlClosedCaptionsContainerElement::create):
3745         (WebCore::MediaControlClosedCaptionsTrackListElement::create):
3746         (WebCore::MediaControlTimelineElement::create):
3747         (WebCore::MediaControlPanelVolumeSliderElement::create):
3748         (WebCore::MediaControlFullscreenVolumeSliderElement::create):
3749         (WebCore::MediaControlFullscreenButtonElement::create):
3750         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
3751         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
3752         (WebCore::MediaControlTimeRemainingDisplayElement::create):
3753         (WebCore::MediaControlCurrentTimeDisplayElement::create):
3754         * html/shadow/MediaControlElements.h:
3755         * html/shadow/MediaControlsApple.h:
3756         (WebCore::MediaControlsAppleEventListener::create):
3757         * html/shadow/MeterShadowElement.h:
3758         (WebCore::MeterInnerElement::create):
3759         (WebCore::MeterBarElement::create):
3760         (WebCore::MeterValueElement::create):
3761         * html/shadow/ProgressShadowElement.h:
3762         (WebCore::ProgressInnerElement::create):
3763         (WebCore::ProgressBarElement::create):
3764         (WebCore::ProgressValueElement::create):
3765         * html/shadow/mac/ImageControlsRootElementMac.cpp:
3766         (WebCore::ImageControlsRootElement::maybeCreate):
3767         * html/track/TextTrackCueList.h:
3768         (WebCore::TextTrackCueList::create):
3769         * html/track/VTTCue.cpp:
3770         (WebCore::VTTCue::create):
3771         * html/track/VTTCue.h:
3772         (WebCore::VTTCue::create):
3773         * html/track/VTTRegion.h:
3774         * html/track/VideoTrack.h:
3775         * html/track/VideoTrackList.h:
3776         * html/track/WebVTTElement.cpp:
3777         (WebCore::WebVTTElement::create):
3778         * html/track/WebVTTElement.h:
3779         * html/track/WebVTTParser.h:
3780         * platform/graphics/MediaPlayer.h:
3781         (WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
3782
3783 2015-05-03  Simon Fraser  <simon.fraser@apple.com>
3784
3785         Make some static data const
3786         https://bugs.webkit.org/show_bug.cgi?id=144552
3787
3788         Reviewed by Andreas Kling.
3789
3790         Turn baseTable and shiftTable into const data.
3791
3792         * platform/graphics/FormatConverter.cpp:
3793
3794 2015-05-02  Simon Fraser  <simon.fraser@apple.com>
3795
3796         Assertion failure (!needsLayout()) loading inkedmag.com
3797         https://bugs.webkit.org/show_bug.cgi?id=144528
3798         rdar://problem/20788681
3799
3800         Reviewed by Darin Adler.
3801         
3802         When animated GIFs get into catch-up mode, which is common on inkedmag.com,
3803         BitmapImage::advanceAnimation() can synchronously call it's observer's
3804         animationAdvanced(). This could cause RenderImage::repaintOrMarkForLayout()
3805         to repaint or mark itself as needing layout in the middle of painting.
3806         If painting multiple tiles, this could occur when painting the first tile,
3807         and then painting the second tile would assert in RenderView::paint().
3808         
3809         It's always wrong to synchronously call the observer when advancing
3810         the animation, since this happens when painting, and you can't repaint
3811         when painting. The long comment and call to startAnimation(DoNotCatchUp)
3812         was required to explain and work around this, but it's simpler to just
3813         advance the animation on a zero-delay timer.
3814         
3815         Special handling is required for the case where internalAdvanceAnimation()
3816         is catching up, and reaches the end of a non-repeating image; there, we
3817         have to set a flag and do the notify on a zero-delay timer.
3818         
3819         Lots of comment cleanup.
3820
3821         Test: fast/images/set-needs-layout-in-painting.html
3822
3823         * platform/graphics/BitmapImage.cpp:
3824         (WebCore::BitmapImage::BitmapImage):
3825         (WebCore::BitmapImage::startTimer): Utility to create and start the timer.
3826         (WebCore::BitmapImage::repetitionCount):
3827         (WebCore::BitmapImage::startAnimation): Early return in the DoNotCatchUp clause.
3828         If skipping, and internalAdvanceAnimation() returns false (meaning it must have
3829         reached the end), then queue up a notify. Change the normal behavior to just
3830         start the timer.
3831         (WebCore::BitmapImage::stopAnimation):
3832         (WebCore::BitmapImage::internalAdvanceAnimation): Notify if the flag is set.
3833         * platform/graphics/BitmapImage.h:
3834         * rendering/RenderReplaced.cpp:
3835         (WebCore::RenderReplaced::paint): Add a SetLayoutNeededForbiddenScope to
3836         detect setNeedsLayouts when painting replaced elements, including images.
3837
3838 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3839
3840         [GTK][EFL] Unify platform display handling
3841         https://bugs.webkit.org/show_bug.cgi?id=144517
3842
3843         Reviewed by Martin Robinson.
3844
3845         There are several places were we are handling the X display
3846         connection:
3847
3848         - GLContext::sharedX11Display() creates a new connection.
3849         - X11Helper::nativeDisplay() creates a new connection.
3850         - BackingStoreBackendCairoX11 uses the GTK+ shared connection.
3851         - NetscapePlugin::x11HostDisplay() uses the GTK+/ecore shared connection
3852         - The rest of the GTK+ code uses the shared GTK+ connection
3853
3854         And then we also have WaylandDisplay and the code to check if the
3855         current display is wayland or X11.
3856         We could unify all these to share the same connection to reduce
3857         the amount of ifdefs and ensure a single connection. That will
3858         also allow us to use "smart pointers" for the X resources that
3859         need a Display* to be freed.
3860
3861         * PlatformEfl.cmake: Add new files to compilation.
3862         * PlatformGTK.cmake: Move some files to WebCore_SOURCES sinc ethey
3863         don't use GTK+ anymore, and add new files to compilation.
3864         * platform/graphics/GLContext.cpp:
3865         (WebCore::GLContext::cleanupActiveContextsAtExit): Remove the
3866         custom X11 connection.
3867         (WebCore::GLContext::createContextForWindow): Check if the shared
3868         display is Wayland to create a EGL context in such case.
3869         * platform/graphics/PlatformDisplay.cpp: Added.
3870         (WebCore::PlatformDisplay::createPlatformDisplay): Creates the
3871         shared display, using the GTK+/ecore shared connection.
3872         (WebCore::PlatformDisplay::sharedDisplay): Return the shared display.
3873         * platform/graphics/PlatformDisplay.h: Added.
3874         * platform/graphics/egl/GLContextEGL.cpp:
3875         (WebCore::sharedEGLDisplay): Use PlatformDisplay::sharedDisplay()
3876         to get the native display.
3877         (WebCore::GLContextEGL::createPixmapContext): Ditto.
3878         * platform/graphics/glx/GLContextGLX.cpp:
3879         (WebCore::GLContextGLX::createWindowContext): Ditto.
3880         (WebCore::GLContextGLX::createPbufferContext): Ditto.
3881         (WebCore::GLContextGLX::createPixmapContext): Ditto.
3882         (WebCore::GLContextGLX::createContext): Ditto.
3883         (WebCore::GLContextGLX::~GLContextGLX): Ditto.
3884         (WebCore::GLContextGLX::defaultFrameBufferSize): Ditto.
3885         (WebCore::GLContextGLX::makeContextCurrent): Ditto.
3886         (WebCore::GLContextGLX::swapBuffers): Ditto.
3887         (WebCore::GLContextGLX::cairoDevice): Ditto.
3888         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3889         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Ditto.
3890         * platform/graphics/surfaces/glx/X11Helper.cpp:
3891         (WebCore::X11Helper::nativeDisplay): Ditto.
3892         * platform/graphics/wayland/PlatformDisplayWayland.cpp: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.cpp.
3893         (WebCore::PlatformDisplayWayland::globalCallback):
3894         (WebCore::PlatformDisplayWayland::globalRemoveCallback):
3895         (WebCore::PlatformDisplayWayland::create): Renamed instance() as
3896         create() since the single instance is now handled by PlatformDisplay.
3897         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
3898         (WebCore::PlatformDisplayWayland::createSurface):
3899         (WebCore::PlatformDisplayWayland::createSharingGLContext):
3900         * platform/graphics/wayland/PlatformDisplayWayland.h: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.h.
3901         * platform/graphics/x11/PlatformDisplayX11.cpp: Added.
3902         (WebCore::PlatformDisplayX11::PlatformDisplayX11):
3903         (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
3904         * platform/graphics/x11/PlatformDisplayX11.h: Added.
3905         * platform/gtk/GtkUtilities.cpp:
3906         (WebCore::getDisplaySystemType): Deleted.
3907         * platform/gtk/GtkUtilities.h:
3908
3909 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3910
3911         [GTK] API tests crashing on debug builds due to extra unref
3912         https://bugs.webkit.org/show_bug.cgi?id=144508
3913
3914         Reviewed by Mario Sanchez Prada.
3915
3916         The problem is that we were assuming that when a new DOMWindow is
3917         created, the DOM object cache was notified about the previous
3918         DOMWindow being destroyed before objects for the new DOMWindow are
3919         added to the cache. However, that's not always the case and we
3920         only create a DOMWindowObserver for the first DOMWindow. We need
3921         to keep a pointer to the DOMWindow being observed to clear() the
3922         cache and create a new DOMWindowObserver when it changes in the
3923         Frame.
3924
3925         Fixes crashes in several unit tests in debug builds.
3926
3927         * bindings/gobject/DOMObjectCache.cpp:
3928
3929 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
3930
3931         Remove timer alignment logging that I added earler today.
3932
3933         * page/Settings.cpp: (WebCore::Settings::setDOMTimerAlignmentInterval):
3934
3935 2015-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3936
3937         Purge PassRefPtr create() factory functions in html 
3938         https://bugs.webkit.org/show_bug.cgi?id=144522
3939
3940         Reviewed by Darin Adler.
3941
3942         Return Ref instead of PassRefPtr in create() factory functions in html, because the factory
3943         can't return null. This patch is a first step to purge in html. Following patch is going to
3944         be uploaded.
3945
3946         No new tests, no behavior changes.
3947
3948         * html/FileInputType.cpp:
3949         (WebCore::UploadButtonElement::create):
3950         (WebCore::UploadButtonElement::createForMultiple):
3951         * html/MediaController.cpp:
3952         (MediaController::create):
3953         * html/MediaController.h:
3954         * html/canvas/WebGLBuffer.cpp:
3955         (WebCore::WebGLBuffer::create):
3956         * html/canvas/WebGLBuffer.h:
3957         * html/canvas/WebGLContextAttributes.cpp:
3958         (WebCore::WebGLContextAttributes::create):
3959         * html/canvas/WebGLContextAttributes.h:
3960         * html/canvas/WebGLContextGroup.cpp:
3961         (WebCore::WebGLContextGroup::create):
3962         * html/canvas/WebGLContextGroup.h:
3963         * html/canvas/WebGLFramebuffer.cpp:
3964         (WebCore::WebGLFramebuffer::create):
3965         * html/canvas/WebGLFramebuffer.h:
3966         * html/canvas/WebGLProgram.cpp:
3967         (WebCore::WebGLProgram::create):
3968         * html/canvas/WebGLProgram.h:
3969         * html/canvas/WebGLQuery.cpp:
3970         (WebCore::WebGLQuery::create):
3971         * html/canvas/WebGLQuery.h:
3972         * html/canvas/WebGLRenderbuffer.cpp:
3973         (WebCore::WebGLRenderbuffer::create):
3974         * html/canvas/WebGLRenderbuffer.h:
3975         * html/canvas/WebGLSampler.cpp:
3976         (WebCore::WebGLSampler::create):
3977         * html/canvas/WebGLSampler.h:
3978         * html/canvas/WebGLShader.cpp:
3979         (WebCore::WebGLShader::create):
3980         * html/canvas/WebGLShader.h:
3981         * html/canvas/WebGLShaderPrecisionFormat.cpp:
3982         (WebCore::WebGLShaderPrecisionFormat::create):
3983         * html/canvas/WebGLShaderPrecisionFormat.h:
3984         * html/canvas/WebGLSync.cpp:
3985         (WebCore::WebGLSync::create):
3986         * html/canvas/WebGLSync.h:
3987         * html/canvas/WebGLTexture.cpp:
3988         (WebCore::WebGLTexture::create):
3989         * html/canvas/WebGLTexture.h:
3990         * html/canvas/WebGLTransformFeedback.cpp:
3991         (WebCore::WebGLTransformFeedback::create):
3992         * html/canvas/WebGLTransformFeedback.h:
3993         * html/canvas/WebGLUniformLocation.cpp:
3994         (WebCore::WebGLUniformLocation::create):
3995         * html/canvas/WebGLUniformLocation.h:
3996         * html/canvas/WebGLVertexArrayObject.cpp:
3997         (WebCore::WebGLVertexArrayObject::create):
3998         * html/canvas/WebGLVertexArrayObject.h:
3999         * html/canvas/WebGLVertexArrayObjectOES.cpp:
4000         (WebCore::WebGLVertexArrayObjectOES::create):
4001         * html/canvas/WebGLVertexArrayObjectOES.h:
4002
4003 2015-05-02  Andreas Kling  <akling@apple.com>
4004
4005         Style recalc always causes detach from shared StyleRareNonInheritedData.
4006         <https://webkit.org/b/144530>
4007