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