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