CTTE: SVGResourcesCache should only allow RenderElements.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-05  Andreas Kling  <akling@apple.com>
2
3         CTTE: SVGResourcesCache should only allow RenderElements.
4         <https://webkit.org/b/136578>
5
6         Only RenderElement subclasses can use SVG resources.
7         Codify this by making SVGResourcesCache::m_cache keyed on RenderElement.
8
9         Reviewed by Antti Koivisto.
10
11         * rendering/svg/RenderSVGContainer.cpp:
12         (WebCore::RenderSVGContainer::selfWillPaint):
13         * rendering/svg/RenderSVGImage.cpp:
14         (WebCore::RenderSVGImage::imageChanged):
15         * rendering/svg/RenderSVGResource.cpp:
16         (WebCore::requestPaintingResource):
17         (WebCore::removeFromCacheAndInvalidateDependencies):
18         * rendering/svg/RenderSVGResourceClipper.cpp:
19         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
20         * rendering/svg/RenderSVGRoot.cpp:
21         (WebCore::RenderSVGRoot::paintReplaced):
22         * rendering/svg/RenderSVGShape.cpp:
23         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
24         (WebCore::RenderSVGShape::markerRect):
25         (WebCore::RenderSVGShape::drawMarkers):
26         * rendering/svg/SVGRenderSupport.cpp:
27         (WebCore::invalidateResourcesOfChildren):
28         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
29         (WebCore::SVGRenderSupport::filtersForceContainerLayout):
30         (WebCore::SVGRenderSupport::pointInClippingArea):
31         * rendering/svg/SVGRenderingContext.cpp:
32         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
33         * rendering/svg/SVGResourcesCache.cpp:
34         (WebCore::resourcesCacheFromRenderer):
35         (WebCore::SVGResourcesCache::cachedResourcesForRenderer):
36         (WebCore::SVGResourcesCache::clientLayoutChanged):
37         (WebCore::SVGResourcesCache::clientDestroyed):
38         (WebCore::SVGResourcesCache::resourceDestroyed):
39         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Deleted.
40         * rendering/svg/SVGResourcesCache.h:
41         * rendering/svg/SVGResourcesCycleSolver.cpp:
42         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
43
44 2014-09-05  Simon Fraser  <simon.fraser@apple.com>
45
46         IDB version changed events should have a valid eventType()
47         https://bugs.webkit.org/show_bug.cgi?id=136583
48
49         Reviewed by Brady Eidson.
50
51         IDBDatabase::dispatchEvent() asserts that the event type is versionchangeEvent,
52         but the version changed event created with an empty event type. Correct this.
53
54         * Modules/indexeddb/IDBDatabase.cpp:
55         (WebCore::IDBDatabase::onVersionChange):
56
57 2014-09-05  Simon Fraser  <simon.fraser@apple.com>
58
59         Remove some PLATFORM(IOS) code in Color.h/cpp
60         https://bugs.webkit.org/show_bug.cgi?id=136582
61
62         Reviewed by Dan Bates.
63
64         Remove Color::tap which is unused, and remove createCGColorWithDeviceWhite()
65         which was only called in one file in WebKit.
66
67         * WebCore.exp.in:
68         * platform/graphics/Color.h:
69         * platform/graphics/cg/ColorCG.cpp:
70         (WebCore::createCGColorWithDeviceWhite): Deleted.
71
72 2014-09-05  Beth Dakin  <bdakin@apple.com>
73
74         ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not 
75         actually scrollable
76         https://bugs.webkit.org/show_bug.cgi?id=136558
77
78         Reviewed by Simon Fraser.
79
80         This patch requires adding a new virtual function to ScrollableArea called 
81         isScrollableOrRubberbandable(). Unfortunately, there is already a virtual function 
82         of that name that exists on RenderLayerModelObject, which is only problematic 
83         because RenderListBox inherits from both RenderLayerModelObject and 
84         ScrollableArea. This patch resolves that conflict in the simplest way, by re-
85         naming the RenderLayerModelObject version of the function to 
86         isScrollableOrRubberbandableBox(). It’s a little unfortunate, but simpler than the 
87         other solutions I came up with.
88
89         New ScrollableArea virtual function.
90         * page/FrameView.cpp:
91         (WebCore::FrameView::isScrollableOrRubberbandable):
92         * page/FrameView.h:
93
94         The point of the whole patch! Return early if you can’t scroll or rubber band.
95         * platform/ScrollableArea.cpp:
96         (WebCore::ScrollableArea::handleWheelEvent):
97
98         New ScrollableArea virtual function.
99         * platform/ScrollableArea.h:
100         * platform/win/PopupMenuWin.h:
101
102         Re-name.
103         * rendering/RenderBox.cpp:
104         (WebCore::RenderBox::isScrollableOrRubberbandableBox):
105         (WebCore::RenderBox::isScrollableOrRubberbandable): Deleted.
106         * rendering/RenderBox.h:
107
108         Implement new ScrollableArea virtual function, and adapt to the re-name.
109         * rendering/RenderLayer.cpp:
110         (WebCore::RenderLayer::isScrollableOrRubberbandable):
111         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
112         * rendering/RenderLayer.h:
113
114         Re-name.
115         * rendering/RenderLayerModelObject.h:
116         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandableBox):
117         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable): Deleted.
118
119         Implement ScrollableArea virtual function.
120         * rendering/RenderListBox.cpp:
121         (WebCore::RenderListBox::isScrollableOrRubberbandable):
122         * rendering/RenderListBox.h:
123
124         Re-name.
125         * rendering/RenderView.cpp:
126         (WebCore::RenderView::isScrollableOrRubberbandableBox):
127         (WebCore::RenderView::isScrollableOrRubberbandable): Deleted.
128         * rendering/RenderView.h:
129
130 2014-06-06  Jer Noble  <jer.noble@apple.com>
131
132         Refactoring: make MediaTime the primary time type for audiovisual times.
133         https://bugs.webkit.org/show_bug.cgi?id=133579
134
135         Reviewed by Eric Carlson.
136
137         In order to limit the number of floating-point rounding errors for media systems which
138         can make use of rational time objects.
139
140         Add some convenience methods to convert between QTTime and MediaTime.
141         * platform/graphics/mac/MediaTimeQTKit.h: Added.
142         * platform/graphics/mac/MediaTimeQTKit.mm: Added.
143         (WebCore::toMediaTime):
144         (WebCore::toQTTime):
145
146         Rename MediaTimeMac -> MediaTimeAVFoundation:
147         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp: Renamed from Source/WebCore/platform/mac/MediaTimeMac.cpp.
148         (WebCore::toMediaTime):
149         (WebCore::toCMTime):
150         * platform/graphics/avfoundation/MediaTimeAVFoundation.h: Renamed from Source/WebCore/platform/mac/MediaTimeMac.h.
151
152         Use MediaTime instead of double:
153         * Modules/mediasource/MediaSource.cpp:
154         (WebCore::MediaSource::duration):
155         (WebCore::MediaSource::currentTime):
156         (WebCore::MediaSource::buffered):
157         (WebCore::MediaSource::setDuration):
158         (WebCore::MediaSource::activeRanges):
159         * Modules/mediasource/MediaSource.h:
160         * Modules/mediasource/SourceBuffer.cpp:
161         (WebCore::SourceBuffer::remove):
162         (WebCore::SourceBuffer::removeCodedFrames):
163         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
164         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
165         (WebCore::SourceBuffer::hasCurrentTime):
166         (WebCore::SourceBuffer::hasFutureTime):
167         (WebCore::SourceBuffer::canPlayThrough):
168         * WebCore.xcodeproj/project.pbxproj:
169         * bindings/js/JSDataCueCustom.cpp:
170         (WebCore::JSDataCueConstructor::constructJSDataCue):
171         * html/HTMLMediaElement.cpp:
172         (WebCore::HTMLMediaElement::HTMLMediaElement):
173         (WebCore::HTMLMediaElement::parseAttribute):
174         * html/HTMLMediaElement.h:
175         (WebCore::ValueToString<MediaTime>::string):
176         * html/MediaFragmentURIParser.cpp:
177         (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
178         (WebCore::MediaFragmentURIParser::startTime):
179         (WebCore::MediaFragmentURIParser::endTime):
180         (WebCore::MediaFragmentURIParser::parseTimeFragment):
181         (WebCore::MediaFragmentURIParser::parseNPTFragment):
182         (WebCore::MediaFragmentURIParser::parseNPTTime):
183         (WebCore::MediaFragmentURIParser::invalidTimeValue): Deleted.
184         * html/MediaFragmentURIParser.h:
185         * html/TimeRanges.h:
186         (WebCore::TimeRanges::ranges):
187         * html/track/DataCue.cpp:
188         (WebCore::DataCue::DataCue):
189         * html/track/DataCue.h:
190         (WebCore::DataCue::create):
191         * html/track/InbandDataTextTrack.cpp:
192         (WebCore::InbandDataTextTrack::addDataCue):
193         (WebCore::InbandDataTextTrack::updateDataCue):
194         (WebCore::InbandDataTextTrack::removeDataCue):
195         * html/track/InbandDataTextTrack.h:
196         * html/track/InbandGenericTextTrack.cpp:
197         (WebCore::InbandGenericTextTrack::updateCueFromCueData):
198         (WebCore::InbandGenericTextTrack::addGenericCue):
199         (WebCore::InbandGenericTextTrack::removeGenericCue):
200         * html/track/InbandTextTrack.cpp:
201         (WebCore::InbandTextTrack::startTimeVariance):
202         * html/track/InbandTextTrack.h:
203         * html/track/InbandWebVTTTextTrack.cpp:
204         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
205         * html/track/TextTrack.cpp:
206         (WebCore::TextTrack::addCue):
207         (WebCore::TextTrack::hasCue):
208         * html/track/TextTrack.h:
209         (WebCore::TextTrack::startTimeVariance):
210         * html/track/TextTrackCue.cpp:
211         (WebCore::TextTrackCue::create):
212         (WebCore::TextTrackCue::TextTrackCue):
213         (WebCore::TextTrackCue::setStartTime):
214         (WebCore::TextTrackCue::setEndTime):
215         (WebCore::TextTrackCue::hasEquivalentStartTime):
216         * html/track/TextTrackCue.h:
217         (WebCore::TextTrackCue::startTime):
218         (WebCore::TextTrackCue::endTime):
219         * html/track/TextTrackCueGeneric.cpp:
220         (WebCore::TextTrackCueGeneric::TextTrackCueGeneric):
221         * html/track/TextTrackCueGeneric.h:
222         * html/track/TextTrackCueList.cpp:
223         (WebCore::TextTrackCueList::add):
224         * html/track/VTTCue.cpp:
225         (WebCore::VTTCue::VTTCue):
226         (WebCore::VTTCue::markFutureAndPastNodes):
227         (WebCore::VTTCue::updateDisplayTree):
228         * html/track/VTTCue.h:
229         (WebCore::VTTCue::create):
230         * html/track/WebVTTParser.cpp:
231         (WebCore::WebVTTParser::WebVTTParser):
232         (WebCore::WebVTTParser::resetCueValues):
233         (WebCore::WebVTTParser::collectTimeStamp):
234         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
235         * html/track/WebVTTParser.h:
236         (WebCore::WebVTTCueData::startTime):
237         (WebCore::WebVTTCueData::setStartTime):
238         (WebCore::WebVTTCueData::endTime):
239         (WebCore::WebVTTCueData::setEndTime):
240         (WebCore::WebVTTCueData::WebVTTCueData): Deleted.
241         * platform/graphics/InbandTextTrackPrivateClient.h:
242         (WebCore::GenericCueData::startTime):
243         (WebCore::GenericCueData::setStartTime):
244         (WebCore::GenericCueData::endTime):
245         (WebCore::GenericCueData::setEndTime):
246         (WebCore::GenericCueData::GenericCueData):
247         * platform/graphics/MediaPlayer.cpp:
248         (WebCore::MediaPlayer::duration):
249         (WebCore::MediaPlayer::startTime):
250         (WebCore::MediaPlayer::initialTime):
251         (WebCore::MediaPlayer::currentTime):
252         (WebCore::MediaPlayer::seekWithTolerance):
253         (WebCore::MediaPlayer::seek):
254         (WebCore::MediaPlayer::maxTimeSeekable):
255         (WebCore::MediaPlayer::minTimeSeekable):
256         (WebCore::MediaPlayer::mediaTimeForTimeValue):
257         (WebCore::MediaPlayer::totalFrameDelay):
258         * platform/graphics/MediaPlayer.h:
259         * platform/graphics/MediaPlayerPrivate.h:
260         (WebCore::MediaPlayerPrivateInterface::durationMediaTime):
261         (WebCore::MediaPlayerPrivateInterface::currentMediaTime):
262         (WebCore::MediaPlayerPrivateInterface::seek):
263         (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
264         (WebCore::MediaPlayerPrivateInterface::startTime):
265         (WebCore::MediaPlayerPrivateInterface::initialTime):
266         (WebCore::MediaPlayerPrivateInterface::seekable):
267         (WebCore::MediaPlayerPrivateInterface::maxMediaTimeSeekable):
268         (WebCore::MediaPlayerPrivateInterface::minMediaTimeSeekable):
269         (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValue):
270         (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
271         (WebCore::MediaPlayerPrivateInterface::startTimeDouble): Deleted.
272         (WebCore::MediaPlayerPrivateInterface::maxTimeSeekableDouble): Deleted.
273         (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValueDouble): Deleted.
274         * platform/graphics/MediaSourcePrivateClient.h:
275         * platform/graphics/TrackPrivateBase.h:
276         (WebCore::TrackPrivateBase::startTimeVariance):
277         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
278         (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
279         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
280         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
281         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
282         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
283         (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue):
284         (WebCore::IncompleteMetaDataCue::startTime):
285         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
286         (WebCore::InbandTextTrackPrivateAVF::processCue):
287         (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
288         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
289         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
290         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
291         (WebCore::MediaPlayerPrivateAVFoundation::durationMediaTime):
292         (WebCore::MediaPlayerPrivateAVFoundation::seek):
293         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance):
294         (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable):
295         (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable):
296         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeLoaded):
297         (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
298         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
299         (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged):
300         (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
301         (WebCore::MediaPlayerPrivateAVFoundation::timeChanged):
302         (WebCore::MediaPlayerPrivateAVFoundation::didEnd):
303         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
304         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
305         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
306         (WebCore::MediaPlayerPrivateAVFoundation::duration): Deleted.
307         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble): Deleted.
308         (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Deleted.
309         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
310         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
311         (WebCore::MediaPlayerPrivateAVFoundation::Notification::time):
312         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
313         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
314         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
315         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
316         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
317         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
318         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
319         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
320         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
321         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
322         (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
323         (WebCore::AVFWrapper::seekToTime): Deleted.
324         (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
325         (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
326         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
327         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
328         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
329         (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
330         (WebCore::AVFWrapper::seekToTime): Deleted.
331         (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
332         (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
333         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
334         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
335         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
336         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
337         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
338         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime):
339         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
340         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
341         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
342         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
343         (WebCore::MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue):
344         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue):
345         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
346         (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
347         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
348         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
349         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted.
350         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
351         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
352         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationMediaTime):
353         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTime):
354         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
355         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
356         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
357         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
358         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxMediaTimeSeekable):
359         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minMediaTimeSeekable):
360         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
361         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Deleted.
362         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Deleted.
363         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble): Deleted.
364         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble): Deleted.
365         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable): Deleted.
366         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
367         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
368         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
369         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
370         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
371         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
372         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
373         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
374         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
375         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
376         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
377         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
378         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
379         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
380         (WebCore::maxValueForTimeRanges):
381         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
382         (WebCore::MediaPlayerPrivateQTKit::durationMediaTime):
383         (WebCore::MediaPlayerPrivateQTKit::currentMediaTime):
384         (WebCore::MediaPlayerPrivateQTKit::seek):
385         (WebCore::MediaPlayerPrivateQTKit::doSeek):
386         (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
387         (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
388         (WebCore::MediaPlayerPrivateQTKit::seeking):
389         (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
390         (WebCore::MediaPlayerPrivateQTKit::buffered):
391         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
392         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
393         (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress):
394         (WebCore::MediaPlayerPrivateQTKit::updateStates):
395         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
396         (WebCore::MediaPlayerPrivateQTKit::didEnd):
397         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
398         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
399         (WebCore::MediaPlayerPrivateQTKit::createQTTime): Deleted.
400         (WebCore::MediaPlayerPrivateQTKit::duration): Deleted.
401         (WebCore::MediaPlayerPrivateQTKit::currentTime): Deleted.
402         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable): Deleted.
403         (WebCore::MediaPlayerPrivateQTKit::maxTimeLoaded): Deleted.
404         (WebCore::MediaPlayerPrivateQTKit::mediaTimeForTimeValue): Deleted.
405         * platform/mac/PlatformClockCM.mm:
406         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
407         (WebCore::MockMediaPlayerMediaSource::maxMediaTimeSeekable):
408         (WebCore::MockMediaPlayerMediaSource::currentMediaTime):
409         (WebCore::MockMediaPlayerMediaSource::durationMediaTime):
410         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
411         (WebCore::MockMediaPlayerMediaSource::totalFrameDelay):
412         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Deleted.
413         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble): Deleted.
414         (WebCore::MockMediaPlayerMediaSource::durationDouble): Deleted.
415         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
416         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
417         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
418         * platform/mock/mediasource/MockMediaSourcePrivate.h:
419         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
420         (WebCore::MockSourceBufferPrivate::enqueueSample):
421
422 2014-09-05  Antti Koivisto  <antti@apple.com>
423
424         REGRESSION(r173272): Two blob tests failing on WK1
425         https://bugs.webkit.org/show_bug.cgi?id=136573
426
427         Reviewed by Alexey Proskuryakov.
428
429         http/tests/fileapi/blob-url-in-subframe.html
430         http/tests/security/mixedContent/blob-url-in-iframe.html
431
432         * platform/network/BlobResourceHandle.cpp:
433         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
434
435             No need to set this twice.
436
437         * platform/network/mac/ResourceResponseMac.mm:
438         (WebCore::ResourceResponse::initNSURLResponse):
439
440             Also test that it is an HTTP URL before using NSHTTPURLResponse. Blobs create non-HTTP URLs with status codes.
441             Pass the accidentally lost expected content length.
442
443 2014-09-05  Zalan Bujtas  <zalan@apple.com>
444
445         Move computeInlinePreferredLogicalWidths() from RenderBlock to RenderBlockFlow
446         https://bugs.webkit.org/show_bug.cgi?id=136461
447
448         Reviewed by Darin Adler.
449
450         This patch enables us to go from const_cast<RenderBlockFlow*>(this)->computeInlinePreferredLogicalWidths()
451         to computeInlinePreferredLogicalWidths().
452
453         Covered by existing tests.
454
455         * rendering/RenderBlock.cpp:
456         (WebCore::InlineMinMaxIterator::endOfInline): Deleted.
457         (WebCore::InlineMinMaxIterator::next): Deleted.
458         (WebCore::getBPMWidth): Deleted.
459         (WebCore::getBorderPaddingMargin): Deleted.
460         (WebCore::stripTrailingSpace): Deleted.
461         (WebCore::preferredWidth): Deleted.
462         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): Deleted.
463         * rendering/RenderBlock.h:
464         * rendering/RenderBlockFlow.cpp:
465         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
466         (WebCore::InlineMinMaxIterator::initial): The (parent == current) condition was used as 'initial' state before.
467         and in order to make computeInlinePreferredLogicalWidths const, InlineMinMaxIterator() needs to take const RenderObject*.
468         (WebCore::InlineMinMaxIterator::next):
469         (WebCore::getBPMWidth):
470         (WebCore::getBorderPaddingMargin):
471         (WebCore::stripTrailingSpace):
472         (WebCore::preferredWidth):
473         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
474         * rendering/RenderBlockFlow.h:
475
476 2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
477
478         Unreviewed, build fix for EFL and GTK ports since r173272.
479
480         * platform/network/soup/ResourceResponseSoup.cpp:
481         (WebCore::ResourceResponse::updateFromSoupMessageHeaders):
482
483 2014-09-04  Pratik Solanki  <psolanki@apple.com>
484
485         Unreviewed. Speculative build fix. Add platformSuggestedFilename() to all the ResourceResponse header files.
486
487         * platform/network/curl/ResourceResponse.h:
488         (WebCore::ResourceResponse::platformSuggestedFilename):
489         * platform/network/soup/ResourceResponse.h:
490         * platform/network/win/ResourceResponse.h:
491         (WebCore::ResourceResponse::platformSuggestedFilename):
492
493 2014-09-04  Pratik Solanki  <psolanki@apple.com>
494
495         Unreviewed. Another speculative build fix after r173272. Add a stub implementation for
496         ResourceResponse::platformSuggestedFilename(). Filed bug 136562 for proper fix.
497
498         * platform/network/soup/ResourceResponseSoup.cpp:
499         (ResourceResponse::platformSuggestedFilename):
500
501 2014-09-04  Pratik Solanki  <psolanki@apple.com>
502
503         Unreviewed. Speculative EFL and GTK build fix after r173272. Remove the filename argument
504         from the various ResourceResponse constructors.
505
506         * platform/network/curl/ResourceResponse.h:
507         (WebCore::ResourceResponse::ResourceResponse):
508         * platform/network/soup/ResourceResponse.h:
509         (WebCore::ResourceResponse::ResourceResponse):
510         * platform/network/win/ResourceResponse.h:
511         (WebCore::ResourceResponse::ResourceResponse):
512
513 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
514
515         border-radius should not force layer backing store
516         https://bugs.webkit.org/show_bug.cgi?id=136555
517
518         Reviewed by Dean Jackson.
519         
520         Border-radius is not a reason to allocate backing store; it's not relevant unless
521         we also have a border or background, and hasBoxDecorations() already checks for that.
522         
523         With that gone, we can now use renderer.hasBoxDecorations() (which also checks for
524         a background), but it doesn't check for outlines, so do that in addition.
525
526         Test: compositing/backing/border-radius-no-backing.html
527
528         * rendering/RenderLayer.cpp:
529         (WebCore::RenderLayer::calculateClipRects):
530
531 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
532
533         CSS filter on a compositing layer should not cause unncessary backing store allocation
534         https://bugs.webkit.org/show_bug.cgi?id=136557
535
536         Reviewed by Dean Jackson.
537         
538         Remove the style.hasFilter() check from hasBoxDecorations(), since filters aren't
539         a box decoration. This allows creation of simple container layers with composited filters.
540
541         Test: compositing/backing/filter-no-backing.html
542
543         * rendering/RenderLayer.cpp:
544         (WebCore::RenderLayer::calculateClipRects):
545
546 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
547
548         Improve the logic for compositing backing store avoidance
549         https://bugs.webkit.org/show_bug.cgi?id=136556
550
551         Reviewed by Dean Jackson.
552         
553         Avoid backing store allocation in more cases by improving the logic that detects
554         whether a RenderLayer has any painted, non-layer descendent renderers.
555         
556         Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(),
557         and make it recur 3 levels deep, walking child lists of up to 20 siblings looking
558         for renderers that paint anything. Any renderer with box decorations paints;
559         replaced elements paint, and non-whitespace text nodes paint. We can avoid
560         making backing store when whitespace nodes are present only when user-select is none,
561         since we have to ensure that there's backing store to paint the selection into.
562
563         Tests: compositing/backing/inline-block-no-backing.html
564                compositing/backing/whitespace-nodes-no-backing.html
565
566         * rendering/RenderLayer.cpp:
567         (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants().
568         (WebCore::RenderLayer::hasBoxDecorationsOrBackground):
569         (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced()
570         rather than isReplaced(), since the latter includes inline-blocks.
571         * rendering/RenderLayerBacking.cpp:
572         (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer()
573         logic in the root layer, since it always wants backing store.
574         (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto.
575         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes
576         inline-block, so use isRenderReplaced() instead.
577
578 2014-09-04  Daniel Bates  <dabates@apple.com>
579
580         [iOS] Fix the iOS build after <http://trac.webkit.org/changeset/173258>
581         (https://bugs.webkit.org/show_bug.cgi?id=136494)
582
583         Use ENABLE_TOUCH_EVENT instead of ENABLE(TOUCH_EVENT) as the latter isn't available
584         to some clients of this private header.
585
586         * platform/ios/wak/WAKResponder.h:
587
588 2014-09-04  Roger Fong  <roger_fong@apple.com>
589
590         Increase number of maximum active WebGL contexts.
591         https://bugs.webkit.org/show_bug.cgi?id=136551.
592         <rdar://problem/18236425>
593
594         Reviewed by Brent Fulgham.
595
596         Test covered by Khronos conformance test:
597         webgl/1.0.2/conformance/context/context-creation-and-destruction.html
598
599         * platform/graphics/mac/GraphicsContext3DMac.mm:
600
601 2014-09-04  Roger Fong  <roger_fong@apple.com>
602
603         Clicking on a select element should never hide the popup menu.
604         https://bugs.webkit.org/show_bug.cgi?id=136548.
605         <rdar://problem/10215926>
606
607         Reviewed by Simon Fraser.
608
609         * html/HTMLSelectElement.cpp:
610         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
611         Never call hidePopup as a result of a click on a select element.
612         The only way you can properly hide a popup is to click again or lose focus on the popup itself.
613
614 2014-09-04  Enrica Casucci  <enrica@apple.com>
615
616         Remove PLATFORM(IOS) from WebCore/editing (Part 2).
617         https://bugs.webkit.org/show_bug.cgi?id=136474
618
619         Reviewed by Tim Horton.
620
621         Removing some more PLATFORM(IOS) from the editing code.
622         Most of these changes are fixes that were made for IOS but never merged
623         to OpenSource.
624
625         * editing/ApplyStyleCommand.cpp:
626         (WebCore::ApplyStyleCommand::applyBlockStyle):
627         * editing/ReplaceSelectionCommand.cpp:
628         (WebCore::ReplaceSelectionCommand::doApply):
629         * editing/VisibleSelection.cpp:
630         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
631         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
632         * editing/VisibleUnits.cpp:
633         (WebCore::startOfDocument):
634         (WebCore::endOfDocument):
635         * editing/ios/EditorIOS.mm: No need for platform guard, this file is not built for Mac.
636
637 2014-09-03  Andy Estes  <aestes@apple.com>
638
639         [Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
640         https://bugs.webkit.org/show_bug.cgi?id=136521
641
642         Reviewed by Anders Carlsson.
643
644         * platform/ios/wak/WebCoreThread.h: Stopped defining WEBCORE_EXPORT.
645
646 2014-09-03  David Hyatt  <hyatt@apple.com>
647
648         Initial letters should clear one another.
649         https://bugs.webkit.org/show_bug.cgi?id=136514
650
651         Reviewed by Simon Fraser.
652
653         Added fast/css-generated-content/initial-letter-clearance.html.
654
655         * rendering/RenderBlockFlow.cpp:
656         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
657         Compute the required clearance and add it both to the block's logical height
658         and to the logical top offset of the float.
659
660         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
661         * rendering/RenderBlockFlow.h:
662         A new method for determining the lowest floating initial letter.
663
664 2014-09-04  Joseph Pecoraro  <pecoraro@apple.com>
665
666         Use WTFString::find(char) in more places
667         https://bugs.webkit.org/show_bug.cgi?id=136541
668
669         Reviewed by Daniel Bates.
670
671         * Modules/plugins/YouTubePluginReplacement.cpp:
672         (WebCore::queryKeysAndValues):
673         * html/HTMLEmbedElement.cpp:
674         (WebCore::HTMLEmbedElement::parseAttribute):
675         * html/HTMLObjectElement.cpp:
676         (WebCore::HTMLObjectElement::parametersForPlugin):
677         * html/parser/XSSAuditor.cpp:
678         (WebCore::XSSAuditor::decodedSnippetForAttribute):
679         * page/UserContentURLPattern.cpp:
680         (WebCore::UserContentURLPattern::parse):
681
682 2014-09-04  Antti Koivisto  <antti@apple.com>
683
684         Try to fix iOS build.
685
686         * loader/FrameLoader.cpp:
687         (WebCore::FrameLoader::initForSynthesizedDocument):
688
689 2014-09-04  Maciej Stachowiak  <mjs@apple.com>
690
691         Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
692         https://bugs.webkit.org/show_bug.cgi?id=136527
693
694         Reviewed by Alexey Proskuryakov.
695
696         * WebCore.exp.in:
697         * WebCore.order:
698         * platform/ios/WebCoreSystemInterfaceIOS.mm:
699         * platform/mac/WebCoreSystemInterface.h:
700         * platform/mac/WebCoreSystemInterface.mm:
701
702 2014-09-04  Beth Dakin  <bdakin@apple.com>
703
704         REGRESSION (r172832): Poor 2-finger scrolling performance at theverge.com articles 
705         (all tiles repaint)
706         https://bugs.webkit.org/show_bug.cgi?id=136433
707         -and corresponding-
708         rdar://problem/18193942
709
710         Reviewed by Tim Horton.
711
712         We should ensure that we are only setting scroll elasticity for layers that return 
713         true for scrollsOverflow(). When overflow:scroll is set on the root element, we 
714         wound up setting the ScrollElasticity for the root, which messed up with the 
715         special way that the root is meant to scroll. Even though overflow:scroll has been 
716         set on the root, scrollsOverflow() is still false because we knew not to set 
717         hasOverflowClip() since it’s the root, which is why this check works.  
718         * rendering/RenderLayer.cpp:
719         (WebCore::RenderLayer::setHasHorizontalScrollbar):
720         (WebCore::RenderLayer::setHasVerticalScrollbar):
721
722         Really, we should have never even called RenderLayer::setHasVerticalScrollbar or 
723         RenderLayer::setHasHorizontalScrollbar since it’s wrong to be creating a scrollbar 
724         on RenderLayer for the root. We should make sure, in addition to the other 
725         requirements consulted, that the renderer has an overflow clip before we create 
726         the scrollbars.
727         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
728
729 2014-09-04  Antti Koivisto  <antti@apple.com>
730
731         Remove ResourceResponse::m_suggestedFilename
732         https://bugs.webkit.org/show_bug.cgi?id=136534
733
734         Reviewed by Alexey Proskuryakov.
735
736         This will simplify things.
737
738         * WebCore.exp.in:
739         * loader/DocumentLoader.cpp:
740         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
741         (WebCore::DocumentLoader::maybeLoadEmpty):
742         * loader/FrameLoader.cpp:
743         (WebCore::FrameLoader::willLoadMediaElementURL):
744         * loader/appcache/ApplicationCacheStorage.cpp:
745         (WebCore::ApplicationCacheStorage::loadCache):
746         * loader/archive/ArchiveResource.cpp:
747         (WebCore::ArchiveResource::create):
748         * platform/network/BlobResourceHandle.cpp:
749         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
750         (WebCore::BlobResourceHandle::notifyResponseOnError):
751         * platform/network/ResourceResponseBase.cpp:
752         (WebCore::ResourceResponseBase::ResourceResponseBase):
753         (WebCore::ResourceResponseBase::adopt):
754         (WebCore::ResourceResponseBase::copyData):
755         (WebCore::ResourceResponseBase::suggestedFilename):
756         (WebCore::ResourceResponseBase::httpStatusText):
757         (WebCore::ResourceResponseBase::setHTTPStatusText):
758         (WebCore::ResourceResponseBase::httpHeaderField):
759         (WebCore::ResourceResponseBase::setHTTPHeaderField):
760         (WebCore::ResourceResponseBase::addHTTPHeaderField):
761         (WebCore::ResourceResponseBase::httpHeaderFields):
762         (WebCore::ResourceResponseBase::isAttachment):
763         (WebCore::ResourceResponseBase::wasCached):
764         (WebCore::ResourceResponseBase::connectionReused):
765         (WebCore::ResourceResponseBase::setConnectionReused):
766         (WebCore::ResourceResponseBase::connectionID):
767         (WebCore::ResourceResponseBase::setConnectionID):
768
769             Remove AllFields initialization. It was only used to get m_suggestedFilename.
770             Rename CommonAndUncommonFields to AllFields
771
772         (WebCore::ResourceResponseBase::setSuggestedFilename): Deleted.
773
774             No more setter.
775
776         * platform/network/ResourceResponseBase.h:
777         (WebCore::ResourceResponseBase::platformSuggestedFileName):
778
779             Get the suggested filename from the platform class on-demand.
780
781         * platform/network/cf/ResourceResponse.h:
782         (WebCore::ResourceResponse::ResourceResponse):
783
784             Remove never-used file name constructor parameter.
785
786         * platform/network/cf/ResourceResponseCFNet.cpp:
787         (WebCore::ResourceResponse::platformLazyInit):
788         * platform/network/mac/ResourceResponseMac.mm:
789         (WebCore::ResourceResponse::initNSURLResponse):
790
791             Synthesize HTTP response properly so it can hold Content-Disposition for file name (and other headers).
792
793         (WebCore::ResourceResponse::platformLazyInit):
794
795             Don't pull the suggested filename anymore.
796
797         (WebCore::ResourceResponse::platformSuggestedFilename):
798
799             Get the suggested name from the (possibly synthetic) NSURLRequest.
800
801 2014-09-04  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
802
803         Remove CSS_FILTERS flag
804         https://bugs.webkit.org/show_bug.cgi?id=136529
805
806         Reviewed by Dirk Schulze.
807
808         No new tests, no behaviour changed.
809
810         * Configurations/FeatureDefines.xcconfig:
811         * DerivedSources.cpp:
812         * WebCore.exp.in:
813         * bindings/js/JSCSSValueCustom.cpp:
814         (WebCore::toJS):
815         * bindings/objc/DOMCSS.mm:
816         (kitClass):
817         * css/CSSComputedStyleDeclaration.cpp:
818         (WebCore::ComputedStyleExtractor::valueForFilter):
819         (WebCore::isLayoutDependent):
820         (WebCore::ComputedStyleExtractor::propertyValue):
821         * css/CSSComputedStyleDeclaration.h:
822         * css/CSSFilterImageValue.cpp:
823         * css/CSSFilterImageValue.h:
824         * css/CSSImageGeneratorValue.cpp:
825         (WebCore::CSSImageGeneratorValue::image):
826         (WebCore::CSSImageGeneratorValue::isFixedSize):
827         (WebCore::CSSImageGeneratorValue::fixedSize):
828         (WebCore::CSSImageGeneratorValue::isPending):
829         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
830         (WebCore::CSSImageGeneratorValue::loadSubimages):
831         * css/CSSParser.cpp:
832         (WebCore::CSSParser::parseValue):
833         (WebCore::CSSParser::parseGeneratedImage):
834         (WebCore::CSSParser::parseFilterImage):
835         (WebCore::CSSParser::parseFilter):
836         * css/CSSParser.h:
837         * css/CSSPropertyNames.in:
838         * css/CSSValue.cpp:
839         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
840         (WebCore::CSSValue::equals):
841         (WebCore::CSSValue::cssText):
842         (WebCore::CSSValue::destroy):
843         (WebCore::CSSValue::cloneForCSSOM):
844         * css/CSSValue.h:
845         * css/StyleResolver.cpp:
846         (WebCore::StyleResolver::State::clear):
847         (WebCore::StyleResolver::applyProperty):
848         (WebCore::StyleResolver::generatedOrPendingFromValue):
849         (WebCore::StyleResolver::loadPendingResources):
850         * css/StyleResolver.h:
851         * css/WebKitCSSFilterValue.cpp:
852         * css/WebKitCSSFilterValue.h:
853         * css/WebKitCSSFilterValue.idl:
854         * loader/cache/CachedSVGDocumentReference.cpp:
855         * loader/cache/CachedSVGDocumentReference.h:
856         * page/FrameView.cpp:
857         (WebCore::FrameView::scrollContentsFastPath):
858         * page/animation/AnimationBase.cpp:
859         (WebCore::AnimationBase::AnimationBase):
860         * page/animation/AnimationBase.h:
861         * page/animation/CSSPropertyAnimation.cpp:
862         (WebCore::blendFilter):
863         (WebCore::blendFunc):
864         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
865         * page/animation/ImplicitAnimation.cpp:
866         (WebCore::ImplicitAnimation::reset):
867         (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists):
868         * page/animation/ImplicitAnimation.h:
869         * page/animation/KeyframeAnimation.cpp:
870         (WebCore::KeyframeAnimation::KeyframeAnimation):
871         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists):
872         * page/animation/KeyframeAnimation.h:
873         * platform/graphics/GraphicsLayer.cpp:
874         (WebCore::GraphicsLayer::validateFilterOperations):
875         * platform/graphics/GraphicsLayer.h:
876         * platform/graphics/GraphicsLayerAnimation.cpp:
877         (WebCore::applyFilterAnimation):
878         (WebCore::GraphicsLayerAnimation::applyInternal):
879         * platform/graphics/GraphicsLayerAnimation.h:
880         * platform/graphics/IntRectExtent.h:
881         * platform/graphics/ca/GraphicsLayerCA.cpp:
882         (WebCore::propertyIdToString):
883         (WebCore::supportsAcceleratedFilterAnimations):
884         (WebCore::GraphicsLayerCA::filtersCanBeComposited):
885         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
886         (WebCore::GraphicsLayerCA::setFilters):
887         (WebCore::GraphicsLayerCA::addAnimation):
888         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
889         (WebCore::GraphicsLayerCA::updateFilters):
890         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
891         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
892         (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
893         * platform/graphics/ca/GraphicsLayerCA.h:
894         * platform/graphics/ca/PlatformCAAnimation.h:
895         * platform/graphics/ca/PlatformCAFilters.h:
896         * platform/graphics/ca/PlatformCALayer.h:
897         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
898         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
899         (PlatformCAAnimationMac::setFromValue):
900         (PlatformCAAnimationMac::setToValue):
901         (PlatformCAAnimationMac::setValues):
902         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
903         (PlatformCAFilters::animatedFilterPropertyName):
904         * platform/graphics/ca/mac/PlatformCALayerMac.h:
905         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
906         (PlatformCALayerMac::clone):
907         (PlatformCALayerMac::filtersCanBeComposited):
908         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
909         (PlatformCAAnimationWin::setFromValue):
910         (PlatformCAAnimationWin::setToValue):
911         (PlatformCAAnimationWin::setValues):
912         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
913         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
914         (PlatformCAFilters::animatedFilterPropertyName):
915         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
916         (PlatformCALayerWin::clone):
917         * platform/graphics/ca/win/PlatformCALayerWin.h:
918         * platform/graphics/filters/FilterOperation.cpp:
919         * platform/graphics/filters/FilterOperation.h:
920         * platform/graphics/filters/FilterOperations.cpp:
921         * platform/graphics/filters/FilterOperations.h:
922         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
923         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
924         (WebCore::GraphicsLayerTextureMapper::setFilters):
925         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
926         * platform/graphics/texmap/TextureMapper.h:
927         * platform/graphics/texmap/TextureMapperGL.cpp:
928         (WebCore::TextureMapperGLData::TextureMapperGLData):
929         (WebCore::prepareFilterProgram):
930         (WebCore::TextureMapperGL::drawTexture):
931         (WebCore::BitmapTextureGL::applyFilters):
932         * platform/graphics/texmap/TextureMapperGL.h:
933         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
934         (WebCore::BitmapTextureImageBuffer::applyFilters):
935         * platform/graphics/texmap/TextureMapperImageBuffer.h:
936         * platform/graphics/texmap/TextureMapperLayer.cpp:
937         (WebCore::TextureMapperLayer::setAnimatedFilters):
938         (WebCore::TextureMapperLayer::computeOverlapRegions):
939         (WebCore::TextureMapperLayer::paintIntoSurface):
940         (WebCore::TextureMapperLayer::setFilters):
941         (WebCore::TextureMapperLayer::syncAnimations):
942         * platform/graphics/texmap/TextureMapperLayer.h:
943         (WebCore::TextureMapperLayer::hasFilters):
944         * platform/graphics/texmap/TextureMapperShaderProgram.h:
945         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
946         (WebCore::CoordinatedGraphicsLayer::didChangeFilters):
947         (WebCore::CoordinatedGraphicsLayer::setFilters):
948         (WebCore::CoordinatedGraphicsLayer::syncFilters):
949         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
950         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
951         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
952         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
953         (WebCore::CoordinatedGraphicsScene::setLayerState):
954         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
955         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
956         * rendering/FilterEffectRenderer.cpp:
957         * rendering/FilterEffectRenderer.h:
958         * rendering/RenderElement.cpp:
959         (WebCore::RenderElement::adjustStyleDifference):
960         * rendering/RenderElement.h:
961         (WebCore::RenderElement::hasFilter): Deleted.
962         * rendering/RenderLayer.cpp:
963         (WebCore::RenderLayer::RenderLayer):
964         (WebCore::RenderLayer::~RenderLayer):
965         (WebCore::transparencyClipBox):
966         (WebCore::RenderLayer::paintLayerContents):
967         (WebCore::RenderLayer::calculateClipRects):
968         * rendering/RenderLayer.h:
969         * rendering/RenderLayerBacking.cpp:
970         (WebCore::RenderLayerBacking::RenderLayerBacking):
971         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
972         (WebCore::RenderLayerBacking::updateFilters):
973         (WebCore::RenderLayerBacking::updateGeometry):
974         (WebCore::RenderLayerBacking::startAnimation):
975         (WebCore::RenderLayerBacking::startTransition):
976         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
977         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
978         * rendering/RenderLayerBacking.h:
979         * rendering/RenderLayerCompositor.cpp:
980         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
981         (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
982         * rendering/RenderLayerFilterInfo.cpp:
983         * rendering/RenderLayerFilterInfo.h:
984         * rendering/RenderLayerModelObject.cpp:
985         (WebCore::RenderLayerModelObject::styleWillChange):
986         * rendering/RenderObject.cpp:
987         (WebCore::RenderObject::containerForRepaint):
988         (WebCore::RenderObject::repaintUsingContainer):
989         * rendering/RenderView.cpp:
990         (WebCore::RenderView::RenderView):
991         * rendering/RenderView.h:
992         * rendering/style/RenderStyle.cpp:
993         (WebCore::RenderStyle::changeRequiresLayout):
994         (WebCore::RenderStyle::changeRequiresLayerRepaint):
995         * rendering/style/RenderStyle.h:
996         * rendering/style/StyleFilterData.cpp:
997         * rendering/style/StyleFilterData.h:
998         * rendering/style/StyleRareNonInheritedData.cpp:
999         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1000         (WebCore::StyleRareNonInheritedData::operator==):
1001         (WebCore::StyleRareNonInheritedData::hasFilters):
1002         * rendering/style/StyleRareNonInheritedData.h:
1003         * rendering/svg/RenderSVGResourceContainer.cpp:
1004         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
1005
1006 2014-09-04  Pratik Solanki  <psolanki@apple.com>
1007
1008         Remove iOS specific disk image cache
1009         https://bugs.webkit.org/show_bug.cgi?id=136517
1010
1011         Reviewed by Antti Koivisto.
1012
1013         Disk image cache code unnecessarily complicates SharedBuffer implementation. We can remove
1014         this now since we don't enable it in WebKit2 on iOS.
1015
1016         * WebCore.exp.in:
1017         * WebCore.xcodeproj/project.pbxproj:
1018         * loader/ResourceBuffer.cpp:
1019         (WebCore::ResourceBuffer::isUsingDiskImageCache): Deleted.
1020         * loader/ResourceBuffer.h:
1021         * loader/cache/CachedImage.cpp:
1022         (WebCore::CachedImage::canUseDiskImageCache): Deleted.
1023         (WebCore::CachedImage::useDiskImageCache): Deleted.
1024         * loader/cache/CachedImage.h:
1025         * loader/cache/CachedResource.cpp:
1026         (WebCore::CachedResource::isUsingDiskImageCache): Deleted.
1027         * loader/cache/CachedResource.h:
1028         (WebCore::CachedResource::canUseDiskImageCache): Deleted.
1029         (WebCore::CachedResource::useDiskImageCache): Deleted.
1030         * loader/cache/MemoryCache.cpp:
1031         (WebCore::MemoryCache::TypeStatistic::addResource):
1032         (WebCore::MemoryCache::dumpStats):
1033         (WebCore::MemoryCache::dumpLRULists):
1034         (WebCore::MemoryCache::flushCachedImagesToDisk): Deleted.
1035         * loader/cache/MemoryCache.h:
1036         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
1037         * loader/ios/DiskImageCacheClientIOS.h: Removed.
1038         * loader/ios/DiskImageCacheIOS.h: Removed.
1039         * loader/ios/DiskImageCacheIOS.mm: Removed.
1040         * platform/Logging.h:
1041         * platform/SharedBuffer.cpp:
1042         (WebCore::SharedBuffer::SharedBuffer):
1043         (WebCore::SharedBuffer::~SharedBuffer):
1044         (WebCore::SharedBuffer::data):
1045         (WebCore::SharedBuffer::append):
1046         (WebCore::SharedBuffer::buffer):
1047         (WebCore::SharedBuffer::getSomeData):
1048         (WebCore::SharedBuffer::isAllowedToBeMemoryMapped): Deleted.
1049         (WebCore::SharedBuffer::allowToBeMemoryMapped): Deleted.
1050         (WebCore::SharedBuffer::failedMemoryMap): Deleted.
1051         (WebCore::SharedBuffer::markAsMemoryMapped): Deleted.
1052         (WebCore::SharedBuffer::memoryMappedNotificationCallbackData): Deleted.
1053         (WebCore::SharedBuffer::memoryMappedNotificationCallback): Deleted.
1054         (WebCore::SharedBuffer::setMemoryMappedNotificationCallback): Deleted.
1055         * platform/SharedBuffer.h:
1056         (WebCore::SharedBuffer::isMemoryMapped): Deleted.
1057         * platform/cf/SharedBufferCF.cpp:
1058         (WebCore::SharedBuffer::SharedBuffer):
1059         * platform/mac/SharedBufferMac.mm:
1060         (-[WebCoreSharedBufferData length]):
1061         (-[WebCoreSharedBufferData bytes]):
1062         (WebCore::SharedBuffer::createCFData):
1063         (-[WebCoreSharedBufferData initWithMemoryMappedSharedBuffer:]): Deleted.
1064
1065 2014-09-04  Brian J. Burg  <burg@cs.washington.edu>
1066
1067         LegacyProfiler: ProfileNodes should be used more like structs
1068         https://bugs.webkit.org/show_bug.cgi?id=136381
1069
1070         Reviewed by Timothy Hatcher.
1071
1072         * inspector/ScriptProfileNode.idl: Remove an unused property.
1073
1074 2014-09-04  Renato Nagy  <rnagy@inf.u-szeged.hu>
1075
1076         Remove Qt cruft: MIMESniffing.cpp and MIMESniffing.h
1077         https://bugs.webkit.org/show_bug.cgi?id=136528
1078
1079         Reviewed by Alexey Proskuryakov.
1080
1081         * platform/network/MIMESniffing.cpp: Removed.
1082         * platform/network/MIMESniffing.h: Removed.
1083
1084 2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1085
1086         Introduce CSS_BASIC_SHAPES_TYPE_CASTS, and use it
1087         https://bugs.webkit.org/show_bug.cgi?id=136403
1088
1089         Reviewed by Daniel Bates.
1090
1091         toCSSBasicShapeFoo() will help to detect wrong type casting. So this patch generates it, and use it
1092         instead of static_cast<const CSSBasicShapeFoo*>().
1093
1094         No new tests no behavior changes.
1095
1096         * css/BasicShapeFunctions.cpp:
1097         (WebCore::basicShapeForValue):
1098         * css/CSSBasicShapes.cpp:
1099         (WebCore::CSSBasicShapeCircle::equals):
1100         (WebCore::CSSBasicShapeEllipse::equals):
1101         (WebCore::CSSBasicShapePolygon::equals):
1102         (WebCore::CSSBasicShapeInset::equals):
1103         * css/CSSBasicShapes.h:
1104
1105 2014-09-04  Daniel Bates  <dabates@apple.com>
1106
1107         [iOS] Make iOS build when ENABLE_TOUCH_EVENT and ENABLE_IOS_TOUCH_EVENTS disabled
1108         https://bugs.webkit.org/show_bug.cgi?id=136494
1109
1110         Reviewed by Andy Estes.
1111
1112         * WebCore.exp.in: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. Also, sort this file using
1113         the script Tools/Scripts/sort-export-file.
1114         * bindings/js/JSDocumentCustom.cpp: Add ENABLE(TOUCH_EVENTS)-guard around headers JSTouch.h and JSTouchList.h.
1115         * page/ios/WebEventRegion.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS) since this
1116         code is specific to the iOS touch machinery.
1117         * page/scrolling/ScrollingCoordinator.cpp: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. 
1118         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS).
1119         * platform/ios/ScrollAnimatorIOS.h: Add ENABLE(TOUCH_EVENTS) guard.
1120         * platform/ios/ScrollAnimatorIOS.mm:
1121         (WebCore::ScrollAnimatorIOS::ScrollAnimatorIOS): Ditto.
1122         * platform/ios/wak/WAKResponder.h: Ditto.
1123         * rendering/RenderLayer.cpp:
1124         (WebCore::RenderLayer::RenderLayer): Add ENABLE(IOS_TOUCH_EVENTS) guard.
1125         (WebCore::RenderLayer::~RenderLayer): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS) since this
1126         code is specific to the iOS touch machinery.
1127         * rendering/RenderLayer.h: Add ENABLE(IOS_TOUCH_EVENTS) guard.
1128
1129 2014-09-04  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1130
1131         REGRESSION(r173240) [GTK] Debug build broken.
1132
1133         Unreviewed build fix after r173240.
1134
1135         * dom/EventListenerMap.h: Add missing include.
1136
1137 2014-09-04  Dan Bernstein  <mitz@apple.com>
1138
1139         Get rid of HIGH_DPI_CANVAS leftovers
1140         https://bugs.webkit.org/show_bug.cgi?id=136491
1141
1142         Reviewed by Benjamin Poulain.
1143
1144         * html/HTMLCanvasElement.cpp:
1145         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Removed m_deviceScaleFactor initializer.
1146         (WebCore::HTMLCanvasElement::reset): Removed checking if the scale factor has changed and
1147         updating m_deviceScaleFactor.
1148         (WebCore::HTMLCanvasElement::convertLogicalToDevice): Removed scaling by the device scale
1149         factor.
1150         (WebCore::HTMLCanvasElement::convertDeviceToLogical): Ditto.
1151         (WebCore::HTMLCanvasElement::createImageBuffer): Replaced m_deviceScaleFactor with a literal
1152         1.
1153         (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Deleted.
1154         * html/HTMLCanvasElement.h: Removed m_deviceScaleFactor member variable and its getter.
1155
1156         * html/canvas/CanvasRenderingContext2D.cpp:
1157         (WebCore::CanvasRenderingContext2D::putImageData): Removed scaling by the device scale
1158         factor.
1159         * html/canvas/CanvasRenderingContext2D.h:
1160         (WebCore::CanvasRenderingContext2D::webkitBackingStorePixelRatio): Changed to return 1.
1161
1162         * html/canvas/WebGLRenderingContext.cpp:
1163         (WebCore::WebGLRenderingContext::texImage2D): Replaced deviceScaleFactor() with 1.
1164         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
1165
1166 2014-09-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1167
1168         XMLHttpRequest always defaults Content-Type to application/xml, while it should depend on data type
1169         https://bugs.webkit.org/show_bug.cgi?id=11049
1170
1171         Reviewed by Darin Adler.
1172
1173         Updated default mime type when sending text (changed from application/xml to text/plain;charset=UTF-8)
1174         Updated default mime type when sending document (set to application/xml;charset=UTF-8 for XML documents and text/html;charset=UTF-8 for HTML documents)
1175
1176         Test: http/tests/xmlhttprequest/post-content-type-document.html
1177
1178         * xml/XMLHttpRequest.cpp:
1179         (WebCore::XMLHttpRequest::send): updating default Content-Type valuess.
1180
1181 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
1182
1183         Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
1184         https://bugs.webkit.org/show_bug.cgi?id=136476
1185
1186         Reviewed by Timothy Hatcher.
1187
1188         No new tests. No behavior changed.
1189
1190         * CMakeLists.txt:
1191         * WebCore.exp.in:
1192         * WebCore.order:
1193         * WebCore.vcxproj/WebCore.vcxproj:
1194         * WebCore.vcxproj/WebCore.vcxproj.filters:
1195         * WebCore.xcodeproj/project.pbxproj:
1196         * bindings/js/JSCustomXPathNSResolver.cpp:
1197         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1198         * bindings/js/ScriptCachedFrameData.cpp:
1199         (WebCore::ScriptCachedFrameData::restore):
1200         * bindings/js/ScriptController.cpp:
1201         (WebCore::ScriptController::clearWindowShell):
1202         (WebCore::ScriptController::initScript):
1203         * css/CSSParser.cpp:
1204         (WebCore::CSSParser::logError):
1205         * dom/Document.cpp:
1206         (WebCore::Document::addConsoleMessage):
1207         (WebCore::Document::addMessage):
1208         * inspector/PageDebuggerAgent.cpp:
1209         (WebCore::PageDebuggerAgent::muteConsole):
1210         (WebCore::PageDebuggerAgent::unmuteConsole):
1211         (WebCore::PageDebuggerAgent::breakpointActionLog):
1212         * inspector/PageRuntimeAgent.cpp:
1213         (WebCore::PageRuntimeAgent::muteConsole):
1214         (WebCore::PageRuntimeAgent::unmuteConsole):
1215         * page/DOMWindow.cpp:
1216         (WebCore::DOMWindow::console):
1217         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
1218         (WebCore::DOMWindow::close):
1219         (WebCore::DOMWindow::printErrorMessage):
1220         (WebCore::DOMWindow::pageConsole): Deleted.
1221         * page/DOMWindow.h:
1222         * page/Page.cpp:
1223         (WebCore::Page::Page):
1224         * page/Page.h:
1225         * page/PageConsoleClient.cpp: Renamed from Source/WebCore/page/PageConsole.cpp.
1226         * page/PageConsoleClient.h: Renamed from Source/WebCore/page/PageConsole.h.
1227         * testing/Internals.cpp:
1228         (WebCore::Internals::consoleProfiles):
1229         * testing/Internals.h:
1230         * xml/XSLStyleSheetLibxslt.cpp:
1231         (WebCore::XSLStyleSheet::parseString):
1232         * xml/XSLTProcessorLibxslt.cpp:
1233         (WebCore::XSLTProcessor::parseErrorFunc):
1234         (WebCore::docLoaderFunc):
1235
1236 2014-09-03  Maciej Stachowiak  <mjs@apple.com>
1237
1238         Fix a few leftovers from removing MIME-related WKSI usage
1239         https://bugs.webkit.org/show_bug.cgi?id=136513
1240
1241         Reviewed by Alexey Proskuryakov.
1242
1243         * WebCore.exp.in:
1244         * WebCore.order:
1245         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1246         * platform/mac/WebCoreSystemInterface.mm:
1247
1248 2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>
1249
1250         Text caret changes to color of text in Mail and Notes
1251         https://bugs.webkit.org/show_bug.cgi?id=135904
1252
1253         Reviewed by Simon Fraser.
1254
1255         Consult with the background color of spans inside editable divs to determine what color
1256         the caret should be.
1257
1258         Test: editing/caret/color-span-inside-editable.html
1259
1260         * editing/FrameSelection.cpp:
1261         (WebCore::CaretBase::paintCaret):
1262
1263 2014-09-03  Tim Horton  <timothy_horton@apple.com>
1264
1265         Fix the iOS build after r173230
1266
1267         * WebCore.exp.in:
1268
1269 2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>
1270
1271         Remove unnecessary function from TextPainter
1272         https://bugs.webkit.org/show_bug.cgi?id=136497
1273
1274         Reviewed by Simon Fraser.
1275
1276         Function is never called.
1277
1278         No new tests because there is no behavior change.
1279
1280         * rendering/TextPainter.cpp:
1281         (WebCore::TextPainter::paintTextInContext): Deleted.
1282         * rendering/TextPainter.h:
1283
1284 2014-09-03  Anders Carlsson  <andersca@apple.com>
1285
1286         Don't use DEPRECATED_DEFINE_STATIC_LOCAL for mutexes
1287         https://bugs.webkit.org/show_bug.cgi?id=136510
1288
1289         Reviewed by Andreas Kling.
1290
1291         Mutexes are intended to be used from multiple threads, and DEPRECATED_DEFINE_STATIC_LOCAL is not thread safe.
1292
1293         * bindings/objc/DOMInternal.mm:
1294         (wrapperCacheLock):
1295         (getDOMWrapper):
1296         (addDOMWrapper):
1297         (removeDOMWrapper):
1298         Use LazyNeverDestroyed + std::call_once, and switch the mutex over to an std::mutex.
1299
1300         * dom/EventListenerMap.cpp:
1301         (WebCore::EventListenerMap::assertNoActiveIterators):
1302         (WebCore::EventListenerIterator::EventListenerIterator):
1303         (WebCore::EventListenerIterator::~EventListenerIterator):
1304         (WebCore::activeIteratorCountMutex):
1305         (WebCore::EventListenerMap::EventListenerMap): Deleted.
1306         * dom/EventListenerMap.h:
1307         Use an std::atomic<int> instead of a mutex here.
1308
1309 2014-09-03  Enrica Casucci  <enrica@apple.com>
1310
1311         Remove PLATFORM(IOS) from WebCore/editing (Part 1).
1312         https://bugs.webkit.org/show_bug.cgi?id=136474
1313
1314         Reviewed by Tim Horton.
1315
1316         This is the first part of the work to remove PLATFORM(IOS) everywhere
1317         in the editing code.
1318
1319         * dom/Range.cpp:
1320         (WebCore::Range::create): Adding create function that takes VisiblePosition.
1321         * dom/Range.h:
1322         * editing/CompositeEditCommand.cpp:
1323         (WebCore::CompositeEditCommand::apply):
1324         (WebCore::CompositeEditCommand::inputText):
1325         * editing/CompositeEditCommand.h:
1326         * editing/DeleteButton.h: No need for the platform guard since it is already under
1327         DELETION_UI
1328         * editing/DeleteButtonController.cpp:
1329         (WebCore::DeleteButtonController::enable):
1330         (WebCore::DeleteButtonController::disable):
1331         * editing/EditAction.h:
1332         * editing/EditCommand.h:
1333         (WebCore::EditCommand::isInsertTextCommand):
1334         * editing/Editor.cpp:
1335         (WebCore::ClearTextCommand::CreateAndApply):
1336         * editing/Editor.h:
1337         * editing/EditorCommand.cpp:
1338         (WebCore::executeClearText):
1339         (WebCore::enabledCopy):
1340         (WebCore::enabledCut):
1341         (WebCore::enabledClearText):
1342         (WebCore::createCommandMap):
1343         * editing/FrameSelection.cpp:
1344         (WebCore::FrameSelection::modifyExtendingRight):
1345         (WebCore::FrameSelection::modifyExtendingForward):
1346         (WebCore::FrameSelection::modifyMovingRight):
1347         (WebCore::FrameSelection::modifyMovingForward):
1348         (WebCore::FrameSelection::modifyExtendingLeft):
1349         (WebCore::FrameSelection::modifyExtendingBackward):
1350         (WebCore::FrameSelection::modifyMovingLeft):
1351         (WebCore::FrameSelection::modifyMovingBackward):
1352         * editing/InsertTextCommand.h:
1353         * editing/TextCheckingHelper.cpp:
1354         * editing/TextGranularity.h:
1355         * editing/VisiblePosition.h:
1356         (WebCore::operator>=):
1357         * editing/VisibleSelection.cpp:
1358         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
1359         * editing/VisibleUnits.cpp:
1360         * editing/VisibleUnits.h:
1361
1362 2014-09-03  Anders Carlsson  <andersca@apple.com>
1363
1364         Get rid of some uses of OwnPtr
1365         https://bugs.webkit.org/show_bug.cgi?id=136503
1366
1367         Reviewed by Sam Weinig.
1368
1369         * dom/ElementRareData.cpp:
1370         * dom/ElementRareData.h:
1371         (WebCore::ElementRareData::create): Deleted.
1372         * dom/MutationObserverRegistration.cpp:
1373         (WebCore::MutationObserverRegistration::create): Deleted.
1374         * dom/MutationObserverRegistration.h:
1375         * dom/Node.cpp:
1376         (WebCore::Node::materializeRareData):
1377         (WebCore::Node::didMoveToNewDocument):
1378         (WebCore::eventTargetDataMap):
1379         (WebCore::Node::eventTargetData):
1380         (WebCore::Node::ensureEventTargetData):
1381         (WebCore::Node::mutationObserverRegistry):
1382         (WebCore::Node::registerMutationObserver):
1383         (WebCore::Node::unregisterMutationObserver):
1384         (WebCore::Node::notifyMutationObserversNodeWillDetach):
1385         * dom/Node.h:
1386         * dom/NodeRareData.h:
1387         (WebCore::NodeListsNodeData::NodeListsNodeData):
1388         (WebCore::NodeRareData::NodeRareData):
1389         (WebCore::NodeRareData::clearNodeLists):
1390         (WebCore::NodeRareData::ensureNodeLists):
1391         (WebCore::NodeRareData::ensureMutationObserverData):
1392         (WebCore::NodeListsNodeData::create): Deleted.
1393         (WebCore::NodeMutationObserverData::create): Deleted.
1394         (WebCore::NodeRareData::create): Deleted.
1395
1396 2014-09-02  Maciej Stachowiak  <mjs@apple.com>
1397
1398         Clean up naming for and slightly refactor legacy video fullscreen support
1399         https://bugs.webkit.org/show_bug.cgi?id=136446
1400
1401         Reviewed by Jer Noble.
1402
1403         Key changes:
1404         supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
1405         enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
1406         exitFullscreenForNode(Node*) --> exitVideoFullscreen()
1407         
1408         The old versions had unnecessary parameters, did not clearly distinguish their purpose
1409         from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
1410         Also changed many other places to use HTMLVideoElement* instead of Node* or 
1411         HTMLMediaElement* when they were in fact only used for video elements and would only
1412         work for such.
1413
1414         The implications of this include a bunch of renaming in some iOS fullscreen code.
1415
1416         * html/HTMLMediaElement.cpp:
1417         (WebCore::HTMLMediaElement::HTMLMediaElement): Rename m_isFullscreen flag to 
1418         m_isInVideoFullscreen, since it only covers the case of legacy video fullscreen,
1419         not element fullscreen.
1420         (WebCore::HTMLMediaElement::stop): ditto
1421         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): ditto
1422         (WebCore::HTMLMediaElement::isFullscreen): ditto
1423         (WebCore::HTMLMediaElement::enterFullscreen): Rename m_isFullscreen flag to
1424         m_isInVideoFullscreen. Hoist video element check here from all supportsFullscrenForNode
1425         clients. Adjust for relevant ChromeClient refactorings.
1426         (WebCore::HTMLMediaElement::enterFullscreen): ditto above
1427         * html/HTMLMediaElement.h:
1428         * html/HTMLVideoElement.cpp:
1429         (WebCore::HTMLVideoElement::supportsFullscreen): Adjust for relevant ChromeClient 
1430         refactorings.
1431         * page/ChromeClient.h:
1432         (WebCore::ChromeClient::supportsVideoFullscreen): Renamed from 
1433         supportsFullscreenForNode, and removed Node* parameter.
1434         (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): Renamed from
1435         enterFulscreenForNode and changed Node* parameter to HTMLVideoElement*.
1436         (WebCore::ChromeClient::exitVideoFullscreen): Renamed from 
1437         exitFullscreenForNode, and removed Node* parameter.
1438         * platform/ios/WebVideoFullscreenControllerAVKit.h:
1439         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1440         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement;
1441         return a video element and not just a media element.
1442         (-[WebVideoFullscreenController dealloc]): Renamed _mediaElement data member
1443         to _videoElement and changed type accordingly.
1444         (-[WebVideoFullscreenController setVideoElement:]): Renamed from setMediaElement:
1445         and adjust parameter type accordingly.
1446         (-[WebVideoFullscreenController enterFullscreen:]): Video elements, not media
1447         elements.
1448         (-[WebVideoFullscreenController exitFullscreen]): ditto
1449         (-[WebVideoFullscreenController didCleanupFullscreen]): ditto
1450         * platform/ios/WebVideoFullscreenInterface.h:
1451         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove gratuitous HTMLMEdiaElement.h include
1452         and fix declarations accordingly.
1453         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include WTFString.h
1454         * platform/ios/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.h.
1455         * platform/ios/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm.
1456         (WebVideoFullscreenModelVideoElement) Renamed from WebVideoFullscreenModelMediaElement
1457         (WebVideoFullscreenModelVideoElement::setVideoElement): Renamed from setMediaElement and
1458         change param type accordingly. Also no need to check for actual videoness of the element.
1459         (WebVideoFullscreenModelVideoElement::updateForEventName): Rename data member from m_mediaElement
1460         to m_videoElement and change type accordingly.
1461         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): ditto
1462         (WebVideoFullscreenModelVideoElement::play): ditto
1463         (WebVideoFullscreenModelVideoElement::pause): ditto
1464         (WebVideoFullscreenModelVideoElement::togglePlayState): ditto
1465         (WebVideoFullscreenModelVideoElement::beginScrubbing): ditto
1466         (WebVideoFullscreenModelVideoElement::endScrubbing): ditto
1467         (WebVideoFullscreenModelVideoElement::seekToTime): ditto
1468         (WebVideoFullscreenModelVideoElement::fastSeek): ditto
1469         (WebVideoFullscreenModelVideoElement::beginScanningForward): ditto
1470         (WebVideoFullscreenModelVideoElement::beginScanningBackward): ditto
1471         (WebVideoFullscreenModelVideoElement::endScanning): ditto
1472         (WebVideoFullscreenModelVideoElement::requestExitFullscreen): ditto
1473         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): ditto
1474         (WebVideoFullscreenModelVideoElement::setVideoLayerGravity): ditto
1475         (WebVideoFullscreenModelVideoElement::updateLegibleOptions): ditto
1476         * platform/mac/WebVideoFullscreenController.h:
1477         * platform/mac/WebVideoFullscreenController.mm:
1478         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement
1479         and update return type accordingly.
1480         (-[WebVideoFullscreenController setVideoElement:]): Renamed from 
1481         setMediaElement and update return type accordingly.
1482         (-[WebVideoFullscreenController videoElementRect]): Renamed
1483         from mediaElementRect.
1484         (-[WebVideoFullscreenController enterFullscreen:]): Update for
1485         rename.
1486         (-[WebVideoFullscreenController exitFullscreen]): ditto
1487         (-[WebVideoFullscreenController updatePowerAssertions]): Rename
1488         member from _mediaElement to _videoElement
1489         (-[WebVideoFullscreenController _requestExit]): ditto
1490         * WebCore.exp.in: Adjust for function and class renames.
1491         * WebCore.xcodeproj/project.pbxproj: Adjust for file renames.
1492
1493 2014-09-03  Benjamin Poulain  <benjamin@webkit.org>
1494
1495         Fix style invalidation of elements with multiple siblings dependencies
1496         https://bugs.webkit.org/show_bug.cgi?id=136472
1497
1498         Reviewed by Andreas Kling.
1499
1500         Previously, style invalidation of siblings was driven by a pair of flags:
1501         -ChildrenAffectedByDirectAdjacentRules.
1502         -ChildrenAffectedByForwardPositionalRules.
1503
1504         When ChildrenAffectedByDirectAdjacentRules was set, the element after an element
1505         with "needsStyleRecalc" was also recomputed. While this work for pair of elements:
1506             a + b
1507         It does not work for more than that. For example, with
1508             a.propery + b + c
1509         When the state of <a> changes, the style of <b> was updated, which is useless. The style
1510         of <c> was untouched, which is incorrect.
1511
1512         When ChildrenAffectedByForwardPositionalRules, all elements after one with "needsStyleRecalc"
1513         were invalidated. While more correct, it caused avalanche of style recalc and was not a very
1514         useful "optimization".
1515
1516  
1517         To fix the correctness issues (e.g. "a + b + c"), I could have gone two ways:
1518         1) Invalidate the parent of a, b, c. The children would always get a correct style
1519            when their parent's style would be resolved.
1520         2) Create invalidation relations to enforce that the right siblings are invalidated.
1521
1522         I have decided for a weak version of (2). The reason is that most DOM trees are very
1523         shallow while being very wide. Invalidating the parent generally causes massive style
1524         recalculation.
1525
1526         To keep things simple for now, there is no explicit dependency list between siblings.
1527         Instead, each element has a pair of flag:
1528         1) The element's style depends on the state of a previous sibling.
1529         2) The element's state affects following siblings.
1530
1531         With the notation "<-" for (1), "->" for (2), the selector "a + b + c" create this kind
1532         of marking:
1533             a  +  b  +  c
1534             ->    ->
1535                        <-
1536
1537         When <a> is invalidated, the style resolver will go through the chain of dependent elements
1538         and invalidate any element that can be affected by a prior invalidation, here <c>.
1539
1540         Overlaps are possible. For example with the two selector, "a + b + c", "b ~ d"
1541         the marking would be
1542             a  +  b  +  c  +  d
1543             ->    ->    ->
1544                        <-    <-
1545
1546         A change in <a> would invalidate both <c> and <d>. This is overkill, but the end result
1547         is correct and it is a net improvement over the previous flags.
1548
1549
1550         As usual, the CSS JIT makes an effort at compile time to reduce tree marking. SelectorChecker
1551         marks everything as usual.
1552
1553         Tests: fast/css/direct-adjacent-style-update-optimization.html
1554                fast/css/indirect-adjacent-style-update-optimization.html
1555                fast/css/non-matching-adjacent-style-update.html
1556                fast/selectors/first-of-type-direct-adjacent-style-update.html
1557                fast/selectors/first-of-type-sibling-style-update.html
1558                fast/selectors/id-direct-adjacent-style-update.html
1559                fast/selectors/id-sibling-style-update.html
1560                fast/selectors/nth-child-as-first-simple-selector-style-update.html
1561                fast/selectors/nth-child-direct-adjacent-style-update.html
1562                fast/selectors/nth-child-style-update.html
1563
1564         * css/SelectorChecker.cpp:
1565         (WebCore::isFirstOfType):
1566         (WebCore::countElementsBefore):
1567         (WebCore::countElementsOfTypeBefore):
1568         Counting selectors are not unlike adjacent combinators, they are handled the exact same way.
1569         For example a :nth-child(4) would generate somewhat similar marking as
1570             :first-child + * + * + *
1571
1572         Everything prior to the element with the counter affects the style of the element.
1573
1574         (WebCore::hasScrollbarPseudoElement):
1575         The assertion was incorrect. You can get an scrollbar pseudo ID on an element without scrollbar.
1576         It will never match, but such case is possible.
1577
1578         (WebCore::SelectorChecker::matchRecursively):
1579         (WebCore::SelectorChecker::checkOne):
1580         * css/StyleResolver.cpp:
1581         (WebCore::StyleResolver::canShareStyleWithElement):
1582         Previously, any subtree affected by sibling selectors were unshareable. That was done by checking
1583         for Element::hasFlagsSetDuringStylingOfChildren().
1584
1585         Now that sibling relation are local, they no longer prevent sharing of all children. Instead, we can
1586         test locally for subgroup with sibling relations.
1587
1588         * cssjit/SelectorCompiler.cpp:
1589         (WebCore::SelectorCompiler::isAdjacentRelation):
1590         (WebCore::SelectorCompiler::shouldMarkStyleIsAffectedByPreviousSibling):
1591         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1592         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1593         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
1594         (WebCore::SelectorCompiler::SelectorCodeGenerator::markElementIfResolvingStyle):
1595         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1596         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle): Deleted.
1597         * dom/Document.cpp:
1598         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
1599         * dom/Element.cpp:
1600         (WebCore::checkForSiblingStyleChanges):
1601         (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
1602         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
1603         (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules): Deleted.
1604         * dom/Element.h:
1605         (WebCore::Element::affectsNextSiblingElementStyle):
1606         (WebCore::Element::setAffectsNextSiblingElementStyle):
1607         (WebCore::Element::setStyleIsAffectedByPreviousSibling):
1608         (WebCore::Element::childrenAffectedByPositionalRules): Deleted.
1609         (WebCore::Element::childrenAffectedByDirectAdjacentRules): Deleted.
1610         (WebCore::Element::childrenAffectedByForwardPositionalRules): Deleted.
1611         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
1612         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
1613         * dom/ElementRareData.h:
1614         (WebCore::ElementRareData::ElementRareData):
1615         (WebCore::ElementRareData::resetDynamicRestyleObservations):
1616         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules): Deleted.
1617         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules): Deleted.
1618         * dom/Node.h:
1619         (WebCore::Node::styleIsAffectedByPreviousSibling):
1620         (WebCore::Node::flagAffectsNextSiblingElementStyle):
1621         (WebCore::Node::flagStyleIsAffectedByPreviousSibling):
1622         (WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag): Deleted.
1623         * html/HTMLElement.h:
1624         (WebCore::HTMLElement::isHTMLUnknownElement):
1625         * html/HTMLUnknownElement.h:
1626         * style/StyleResolveTree.cpp:
1627         (WebCore::Style::resetStyleForNonRenderedDescendants):
1628         (WebCore::Style::resolveTree):
1629
1630 2014-09-03  Simon Fraser  <simon.fraser@apple.com>
1631
1632         Dump SimpleLineLayout info in showRenderTree() output
1633         https://bugs.webkit.org/show_bug.cgi?id=136489
1634
1635         Reviewed by Zalan Bujtas.
1636         
1637         Include info about SimpleLineLayout to showRenderTree() output.
1638         
1639         Also show RenderText length, and truncate the RenderText contents
1640         to 80 chars (since the string is replicated in inline boxes or simple line layout output).
1641
1642         * rendering/RenderBlockFlow.cpp:
1643         (WebCore::RenderBlockFlow::showLineTreeAndMark):
1644         * rendering/RenderObject.cpp:
1645         (WebCore::RenderObject::showRenderObject):
1646         * rendering/SimpleLineLayoutFunctions.cpp:
1647         (WebCore::SimpleLineLayout::printPrefix):
1648         (WebCore::SimpleLineLayout::showLineTreeForFlow):
1649         * rendering/SimpleLineLayoutFunctions.h:
1650
1651 2014-09-03  Tim Horton  <timothy_horton@apple.com>
1652
1653         iOS build fix after r173217 
1654
1655         * platform/graphics/ios/FontServicesIOS.h:
1656         (WebCore::FontServicesIOS::capHeight):
1657         * platform/graphics/ios/FontServicesIOS.mm:
1658         (WebCore::FontServicesIOS::FontServicesIOS):
1659         This fixes the build, but I don't know if it's completely correct.
1660
1661 2014-09-03  Anders Carlsson  <andersca@apple.com>
1662
1663         Get rid of DOMImplementationFront
1664         https://bugs.webkit.org/show_bug.cgi?id=136495
1665
1666         Reviewed by Andreas Kling.
1667
1668         DOMImplementationFront was used in a workaround for a GCC bug, and since we're building with clang
1669         on Mac this is no longer an issue.
1670
1671         * WebCore.xcodeproj/project.pbxproj:
1672         * bindings/objc/DOMImplementationFront.cpp: Removed.
1673         * bindings/objc/DOMImplementationFront.h: Removed.
1674         Remove files.
1675
1676         * bindings/objc/DOMUtility.mm:
1677         (JSC::createDOMWrapper):
1678         Remove call to implementationFront.
1679
1680         * bindings/scripts/CodeGeneratorObjC.pm:
1681         (GetImplClassName):
1682         Remove DOMImplementation special case
1683
1684         (AddIncludesForType):
1685         Ditto.
1686
1687         (GenerateHeader):
1688         Use the class header name in the #import in the internal header.
1689
1690         (GenerateImplementation):
1691         Remove DOMImplementation special case.
1692
1693 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
1694
1695         [Win] Improper release of unretained AVCFAssetResourceLoaderRef
1696         https://bugs.webkit.org/show_bug.cgi?id=136493
1697         <rdar://problem/18112559>
1698
1699         Reviewed by Eric Carlson.
1700
1701         Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
1702         RetainPtr. We don't hold onto this value or want to control its lifetime; we just
1703         want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.
1704
1705         Use of the RetainPtr created a double-release and crash.
1706
1707         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1708         (WebCore::AVFWrapper::createAssetForURL): 
1709
1710 2014-09-03  David Hyatt  <hyatt@apple.com>
1711
1712         Add support for the initial-letter CSS property to first-letter
1713         https://bugs.webkit.org/show_bug.cgi?id=136484
1714
1715         Reviewed by Dean Jackson.
1716         
1717         New tests in fast/css-generated-content/initial-letter-*.html
1718
1719         This patch add support for the CSS initial-letter property, enabling
1720         better drop caps support in WebKit. Letters size to a specified number of
1721         paragraph lines, and align to the cap-height of the first line and the baseline
1722         of the last line.
1723
1724         * css/CSSComputedStyleDeclaration.cpp:
1725         (WebCore::ComputedStyleExtractor::propertyValue):
1726         Add -webkit-initial-letter to the list.
1727
1728         * css/CSSLineBoxContainValue.cpp:
1729         (WebCore::CSSLineBoxContainValue::customCSSText):
1730         * css/CSSLineBoxContainValue.h:
1731         Add support for a new value of line-box-contain, initial-letter, that causes
1732         lines to use cap-height above the baseline and the glyph bounds below the
1733         baseline.
1734
1735         * css/CSSParser.cpp:
1736         (WebCore::CSSParser::parseValue):
1737         Add support for parsing of initial-letter.
1738
1739         (WebCore::CSSParser::parseLineBoxContain):
1740         Add the new line-box-contain value for first-letters with initial-letter set.
1741
1742         * css/CSSPropertyNames.in:
1743         Add the new initial-letter property.
1744
1745         * css/CSSValueKeywords.in:
1746         Add the new initial-letter line-box-contain value.
1747
1748         * css/StyleResolver.cpp:
1749         (WebCore::StyleResolver::applyProperty):
1750         Map initial-letter into the RenderStyle.
1751
1752         * platform/graphics/FontMetrics.h:
1753         (WebCore::FontMetrics::hasCapHeight):
1754         (WebCore::FontMetrics::floatCapHeight):
1755         (WebCore::FontMetrics::setCapHeight):
1756         (WebCore::FontMetrics::capHeight):
1757         * platform/graphics/ios/SimpleFontDataIOS.mm:
1758         (WebCore::SimpleFontData::platformInit):
1759         * platform/graphics/mac/SimpleFontDataMac.mm:
1760         (WebCore::SimpleFontData::platformInit):
1761         Add support for cap-height to the font system. iOS and Mac have been patched.
1762         Other platforms will need to add support for cap-height to get this feature.
1763         hasCapHeight() will return false for unsupported platforms for graceful
1764         degradation.
1765
1766         * rendering/RenderBlock.cpp:
1767         (WebCore::styleForFirstLetter):
1768         Modified to check for initialLetterDrop/Height and to adjust the style
1769         accordingly (e.g., to apply float when needed).
1770
1771         * rendering/RenderBlockFlow.cpp:
1772         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
1773         Code to adjust the float's position and margin to do cap-height alignment
1774         and sunken letters.
1775
1776         * rendering/RenderBlockFlow.h:
1777         Remove the const from computeLogicalLocationForFloat, since the margin of the
1778         float can now be modified dynamically for sunken first-letters.
1779
1780         * rendering/RootInlineBox.cpp:
1781         (WebCore::RootInlineBox::ascentAndDescentForBox):
1782         Add support for initial-letter line-box-contain value.
1783
1784         * rendering/RootInlineBox.h:
1785         Add the includeInitialLetterForBox method to support the new line-box-contain value.
1786
1787         * rendering/style/RenderStyle.cpp:
1788         (WebCore::RenderStyle::changeRequiresLayout):
1789         * rendering/style/RenderStyle.h:
1790         * rendering/style/StyleRareNonInheritedData.cpp:
1791         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1792         (WebCore::StyleRareNonInheritedData::operator==):
1793         * rendering/style/StyleRareNonInheritedData.h:
1794         Normal maintenance stuff for addition of a new CSS property (making sure it is diffed
1795         properly for layout changes and copied on assignment, etc.)
1796
1797 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
1798
1799         [Win] Prevent double-release on AVCFURLAssetRef
1800         https://bugs.webkit.org/show_bug.cgi?id=136492
1801         <rdar://problem/18206746>
1802
1803         Reviewed by Eric Carlson.
1804
1805         The AVFWrapper::setAsset method needs to retain the passed argument, since it
1806         originates from AVCFPlayerItemGetAsset, which does not increment the
1807         reference count of its return value as expected by Cocoa Get/Create/Copy
1808         semantics.
1809
1810         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1811         (WebCore::AVFWrapper::setAsset): Retain the passed argument.
1812
1813 2014-09-03  Dan Bernstein  <mitz@apple.com>
1814
1815         Get rid of HIGH_DPI_CANVAS leftovers
1816         https://bugs.webkit.org/show_bug.cgi?id=136491
1817
1818         Reviewed by Benjamin Poulain.
1819
1820         * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
1821         and removed it from FEATURE_DEFINES.
1822         * html/HTMLCanvasElement.cpp:
1823         (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Removed #if ENABLE(HIGH_DPI_CANVAS)
1824         code.
1825
1826 2014-09-03  Joseph Pecoraro  <pecoraro@apple.com>
1827
1828         Use StringBuilder append(char) and appendLiteral in more places
1829         https://bugs.webkit.org/show_bug.cgi?id=136470
1830
1831         Reviewed by Andreas Kling.
1832
1833         * Modules/indexeddb/IDBKeyData.cpp:
1834         (WebCore::IDBKeyData::loggingString):
1835         * Modules/websockets/WebSocket.cpp:
1836         (WebCore::encodeProtocolString):
1837         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1838         (WebCore::WebSocketExtensionDispatcher::createHeaderValue):
1839         (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
1840         * Modules/websockets/WebSocketHandshake.cpp:
1841         (WebCore::WebSocketHandshake::clientLocation):
1842         (WebCore::WebSocketHandshake::clientHandshakeMessage):
1843         * css/CSSCalculationValue.cpp:
1844         (WebCore::buildCssText):
1845         * css/CSSComputedStyleDeclaration.cpp:
1846         (WebCore::CSSComputedStyleDeclaration::cssText):
1847         * css/CSSMediaRule.cpp:
1848         (WebCore::CSSMediaRule::cssText):
1849         * css/CSSSelectorList.cpp:
1850         (WebCore::CSSSelectorList::selectorsText):
1851         * css/CSSSupportsRule.cpp:
1852         (WebCore::CSSSupportsRule::cssText):
1853         * css/MediaQuery.cpp:
1854         (WebCore::MediaQuery::serialize):
1855         * editing/MarkupAccumulator.cpp:
1856         (WebCore::MarkupAccumulator::generateUniquePrefix):
1857         * editing/markup.cpp:
1858         (WebCore::urlToMarkup):
1859         * fileapi/FileReaderLoader.cpp:
1860         (WebCore::FileReaderLoader::convertToDataURL):
1861         * html/EmailInputType.cpp:
1862         (WebCore::EmailInputType::sanitizeValue):
1863         * html/FormController.cpp:
1864         (WebCore::recordFormStructure):
1865         * html/parser/XSSAuditorDelegate.cpp:
1866         (WebCore::buildConsoleError):
1867         * html/track/WebVTTParser.cpp:
1868         (WebCore::WebVTTParser::collectCueText):
1869         * mathml/MathMLMencloseElement.cpp:
1870         (WebCore::MathMLMencloseElement::longDivLeftPadding):
1871         * page/PageSerializer.cpp:
1872         (WebCore::SerializerMarkupAccumulator::appendElement):
1873         * page/SecurityOrigin.cpp:
1874         (WebCore::SecurityOrigin::toRawString):
1875         * page/scrolling/ScrollingCoordinator.cpp:
1876         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
1877         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1878         (WebCore::logThreadedScrollingMode):
1879         * platform/PODInterval.h:
1880         (WebCore::PODInterval::toString):
1881         * platform/PODRedBlackTree.h:
1882         (WebCore::PODRedBlackTree::dumpFromNode):
1883         * platform/UUID.cpp:
1884         (WebCore::createCanonicalUUIDString):
1885         * platform/network/ProxyServer.cpp:
1886         (WebCore::appendProxyServerString):
1887         (WebCore::toString):
1888         * platform/text/DateTimeFormat.cpp:
1889         (WebCore::DateTimeFormat::quoteAndAppendLiteral):
1890         * platform/text/PlatformLocale.cpp:
1891         (WebCore::DateTimeStringBuilder::zeroPadString):
1892         (WebCore::Locale::convertFromLocalizedNumber):
1893         * platform/text/TextStream.cpp:
1894         (WebCore::TextStream::operator<<):
1895         * rendering/RenderListMarker.cpp:
1896         (WebCore::listMarkerText):
1897         * testing/Internals.cpp:
1898         (WebCore::Internals::parserMetaData):
1899         (WebCore::Internals::getCurrentCursorInfo):
1900
1901 2014-09-03  Bear Travis  <betravis@adobe.com>
1902
1903         [CSS Font Loading] Enable Page Caching
1904         https://bugs.webkit.org/show_bug.cgi?id=136044
1905
1906         Reviewed by Andreas Kling.
1907
1908         Modifying FontLoader to track fonts loaded via the loadFont
1909         method as well as via CSS rules. Fonts loaded via loadFont are
1910         tracked in m_numLoadingFromJS, while fonts loaded via CSS rules
1911         are tracked in m_numLoadingFromCSS. The page is cacheable when no
1912         fonts are currently loading.
1913
1914         Added fast/css/fontloader-page-cache.html
1915
1916         * css/FontLoader.cpp:
1917         (WebCore::LoadFontCallback::create): Modified to take and store
1918         the number of fonts it will be loading.
1919         (WebCore::LoadFontCallback::createFromParams): Ditto.
1920         (WebCore::LoadFontCallback::familyCount): Getter for number of
1921         fonts loaded via this callback.
1922         (WebCore::LoadFontCallback::LoadFontCallback):
1923         (WebCore::LoadFontCallback::notifyLoaded): Callback the FontLoader
1924         to let it update its count when all the fonts have finished loading.
1925         (WebCore::FontLoader::loadFontDone): Ditto.
1926         (WebCore::FontLoader::FontLoader):
1927         (WebCore::FontLoader::beginFontLoading): Track the number of fonts
1928         loading.
1929         (WebCore::FontLoader::fontLoaded): Ditto.
1930         (WebCore::FontLoader::loadError): Ditto.
1931         (WebCore::FontLoader::loadFont):
1932         * css/FontLoader.h:
1933         (WebCore::FontLoader::loading):
1934
1935 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
1936
1937         Simplify DOMTimer::adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
1938         https://bugs.webkit.org/show_bug.cgi?id=136402
1939
1940         Reviewed by Andreas Kling.
1941
1942         When the minimum DOM timer interval changes, the Page updates all DOMTimers accordingly.
1943         Updating the fire/repeat interval on TimerBase requires a delta, but in
1944         DOMTimer::adjustMinimumTimerInterval we have the new requested interval. In the case of
1945         timers we can get the current interval to calculate the delta by calling repeatInterval(),
1946         but in the case of one-shot timers neither TimerBase nor DOMTimer have store the interval
1947         that was actually set for the timer (DOMTimer knows the original, unadjusted timer, but
1948         not the actual interval). The way this currently works is that when the minimum interval
1949         changes, Page calls adjustMinimumTimerInterval providing the previous minimum. If the
1950         timer is one-shot, then adjustMinimumTimerInterval will use this to compute the delta
1951         based on what the interval would have been.
1952
1953         We can simplify & unify with the code to throttle interval timers when the nesting
1954         threshold is hit, by instead tracking the current timer interval as a member on DOMTimer &
1955         using this to compute the delta in all cases.
1956
1957         * dom/ScriptExecutionContext.cpp:
1958         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
1959             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
1960         * page/DOMTimer.cpp:
1961         (WebCore::DOMTimer::DOMTimer):
1962             initialize m_currentTimerInterval
1963         (WebCore::DOMTimer::fired):
1964             - when the nesting level changes (potentially triggering throttling) just call updateTimerIntervalIfNecessary
1965         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
1966             - compute delta based on m_currentTimerInterval
1967         (WebCore::DOMTimer::intervalClampedToMinimum):
1968             - this now always takes m_originalInterval and scriptExecutionContext()->minimumTimerInterval()
1969               as its inputs, so remove arguments.
1970         (WebCore::DOMTimer::adjustMinimumTimerInterval): Deleted.
1971             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
1972         * page/DOMTimer.h:
1973             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary, added m_currentTimerInterval
1974
1975 2014-09-03  Daniel Bates  <dabates@apple.com>
1976
1977         [XSLT] Make WebKit build when XSLT is disabled
1978         https://bugs.webkit.org/show_bug.cgi?id=136471
1979
1980         Reviewed by Simon Fraser.
1981
1982         Fixes a Clang compiler warning that file-static function WebCore::hasNoStyleInformation is unused.
1983         This function is only called from ENABLE(XSLT)-guarded code. So, add a ENABLE(XSLT)-guard around
1984         WebCore::hasNoStyleInformation().
1985
1986         * xml/parser/XMLDocumentParserLibxml2.cpp:
1987         (WebCore::hasNoStyleInformation):
1988
1989 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
1990
1991         LegacyProfiler: remove redundant ProfileNode members and other cleanup
1992         https://bugs.webkit.org/show_bug.cgi?id=136380
1993
1994         Reviewed by Timothy Hatcher.
1995
1996         Remove Profile.idleTime, rename head to rootNode, and remove ProfileNode members.
1997
1998         Covered by existing tests.
1999
2000         * inspector/ScriptProfile.idl:
2001         * inspector/ScriptProfileNode.idl:
2002         * inspector/TimelineRecordFactory.cpp:
2003
2004 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
2005
2006         Web Inspector: remove ProfilerAgent and legacy profiler files in the frontend
2007         https://bugs.webkit.org/show_bug.cgi?id=136462
2008
2009         Reviewed by Timothy Hatcher.
2010
2011         It's not used by the frontend anymore.
2012
2013         No new tests, no behavior changed.
2014
2015         * CMakeLists.txt:
2016         * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Removed.
2017         * WebCore.order:
2018         * WebCore.vcxproj/WebCore.vcxproj:
2019         * WebCore.vcxproj/WebCore.vcxproj.filters:
2020         * WebCore.xcodeproj/project.pbxproj:
2021         * inspector/InspectorAllInOne.cpp:
2022         * inspector/InspectorController.cpp:
2023         (WebCore::InspectorController::InspectorController):
2024         * inspector/InspectorController.h:
2025         * inspector/InspectorInstrumentation.cpp:
2026         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2027         * inspector/InstrumentingAgents.cpp:
2028         (WebCore::InstrumentingAgents::InstrumentingAgents):
2029         (WebCore::InstrumentingAgents::reset):
2030         * inspector/InstrumentingAgents.h:
2031         (WebCore::InstrumentingAgents::inspectorProfilerAgent): Deleted.
2032         (WebCore::InstrumentingAgents::setInspectorProfilerAgent): Deleted.
2033         * inspector/PageProfilerAgent.cpp: Removed.
2034         * inspector/PageProfilerAgent.h: Removed.
2035         * inspector/TimelineRecordFactory.cpp: Moved these builders to their only callsite.
2036         (WebCore::buildInspectorObject):
2037         (WebCore::buildProfileInspectorObject):
2038         (WebCore::TimelineRecordFactory::appendProfile):
2039         * inspector/WebProfilerAgent.cpp: Removed.
2040         * inspector/WebProfilerAgent.h: Removed.
2041         * inspector/WorkerInspectorController.cpp:
2042         (WebCore::WorkerInspectorController::WorkerInspectorController):
2043         * inspector/WorkerProfilerAgent.cpp: Removed.
2044         * inspector/WorkerProfilerAgent.h: Removed.
2045         * inspector/protocol/Timeline.json:
2046
2047 2014-09-02  Jer Noble  <jer.noble@apple.com>
2048
2049         [EME][Mac] Refactor CDMPrivateMediaSourceAVFObjC to allow sessions to be created without being attached to an AVStreamDataParser.
2050         https://bugs.webkit.org/show_bug.cgi?id=136016
2051
2052         Reviewed by Eric Carlson.
2053
2054         The CDMPrivateMediaPlayer class will delegate creation of CDMSession instances to the current MediaPlayer. This
2055         of course requires the MediaKeys object owning the CDM to be attached to a HTMLMediaElement, and specifically to
2056         one with a valid src attribute or source node which has sucessfully begun loading. For certain CDM operations,
2057         it would be better if a given MediaKeys could create a session without actually being connected to a
2058         HTMLMediaElement (yet).
2059
2060         To facilitate this for CDMSessionPrivateMediaSourceAVFObjC, add a new class, CDMPrivateMediaSourceAVFObjC, which
2061         is the primary factory for CDMSessionPrivateMediaSOurceAVFObjC. Disclaim responsibility for creating these sessions
2062         in MediaPlayerPrivateMediaSourceAVFObjC by not passing the "supportsKeySystem" method when registering itself.
2063
2064         Add methods to CDMSessionPrivateMediaSourceAVFObjC to allow SourceBuffers to be added and removed from the session,
2065         to support adding the session to the HTMLMediaElement after the session has been created.
2066
2067         Since MediaPlayerPrivate instance and  CDMSession instances must be able to communicate with one another, add a type()
2068         enum and virtual method to allow CDMSession instnaces to be distinguisted from (and casted to) one another.
2069
2070         * Modules/encryptedmedia/CDM.cpp:
2071         (WebCore::installedCDMFactories): Register CDMPrivateMediaSourceAVFObjC.
2072         (WebCore::CDM::createSession): Notify the MediaPlayer of the new CDMSession.
2073         * Modules/encryptedmedia/MediaKeySession.h:
2074         * Modules/encryptedmedia/MediaKeys.cpp:
2075         (WebCore::MediaKeys::setMediaElement): Notify the HTMLMediaElement of any existing sessions.
2076         * WebCore.xcodeproj/project.pbxproj:
2077         * platform/graphics/CDMSession.h:
2078         (WebCore::CDMSession::type): Added.
2079         * platform/graphics/MediaPlayer.cpp:
2080         (WebCore::MediaPlayer::setCDMSession): Pass through to the MediaPlayerPrivate.
2081         * platform/graphics/MediaPlayer.h:
2082         * platform/graphics/MediaPlayerPrivate.h:
2083         (WebCore::MediaPlayerPrivateInterface::setCDMSession): Added. Default no-op.
2084         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: Added.
2085         (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Simple constructor.
2086         (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Simple destructor.
2087         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Simple factory.
2088         (WebCore::CDMPrivateMediaSourceAVFObjC::cdm): Simple accessor.
2089         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: 
2090         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Moved from MediaPlayerPrivateMediaSourceAVFObjC.
2091         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType): Ditto.
2092         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Ditto.
2093         (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Returns new CDMSessionMediaSourceAVFObjC.
2094         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
2095         (WebCore::CDMSessionAVFoundationObjC::type): Added.
2096         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2097         (WebCore::CDMSessionMediaSourceAVFObjC::type): Added.
2098         (WebCore::toCDMSessionMediaSourceAVFObjC): Throw assertion if type() is not correct.
2099         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2100         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Removed m_parent ivar.
2101         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Ditto.
2102         (WebCore::CDMSessionMediaSourceAVFObjC::update): Determing which SourceBuffer is protected.
2103         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Added.
2104         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Added.
2105         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2106         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2107         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2108         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Remove supportsKeyType parameter.
2109         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Remove keyType check.
2110         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Tell the CDMSession about outstanding SourceBuffers.
2111         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
2112         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2113
2114 2014-09-02  Daniel Bates  <dabates@apple.com>
2115
2116         [Win] Attempt to fix the Windows build after <http://trac.webkit.org/changeset/173192>
2117         (https://bugs.webkit.org/show_bug.cgi?id=136467)
2118
2119         Declare ResourceHandleClient::connectionProperties() when building for iOS or when USE(CFNETWORK).
2120
2121         * platform/network/ResourceHandleClient.h:
2122
2123 2014-09-02  Daniel Bates  <dabates@apple.com>
2124
2125         [iOS] Support using Foundation networking code
2126         https://bugs.webkit.org/show_bug.cgi?id=136467
2127
2128         Reviewed by Pratik Solanki.
2129
2130         We should support building iOS WebKit with the Foundation networking code
2131         (i.e. !USE(CFNETWORK)).
2132
2133         Additionally, disable USE(CFNETWORK) and use the Foundation networking code
2134         by default when building iOS WebKit without the Apple Internal SDK.
2135
2136         * Configurations/WebCore.xcconfig: Remove file WebCoreURLResponse.mm from the list of excluded files
2137         so that we compile an implementation for function WebCore::synthesizeRedirectResponseIfNecessary when
2138         building without USE(CFNETWORK).
2139         * WebCore.exp.in: Add symbols for WebCore::synthesizeRedirectResponseIfNecessary() and WebCore::ResourceHandleClient::willCacheResponseAsync().
2140         * WebCore.xcodeproj/project.pbxproj: Add new files CFNetworkConnectionCacheSPI.h and CFURLRequestSPI.h.
2141         Also move group platform/spi such that it appears in alphabetical order in the platform group.
2142         * platform/cf/URLCF.cpp: Remove unnecessary header <CoreFoundation/CFPriv.h>.
2143         * platform/network/ResourceHandle.h: Declare iOS-specific variant of ResourceHandle::createNSURLConnection().
2144         * platform/network/ResourceHandleClient.h: Always include header <wtf/RetainPtr.h> when building for iOS.
2145         (WebCore::ResourceHandleClient::connectionProperties): Add PLATFORM(IOS)-guard around declaration.
2146         * platform/network/cf/ResourceRequestCFNet.cpp: Substitute header CFNetworkConnectionCacheSPI.h for
2147         <CFNetwork/CFNetworkConnectionCachePriv.h>.
2148         * platform/network/mac/CredentialStorageMac.mm:
2149         (WebCore::CredentialStorage::saveToPersistentStorage): Use Credential::nsCredential() and ProtectionSpace::nsSpace()
2150         instead of WebCore::mac(const {Credential, ProtectionSpace}&) as the latter were removed in <http://trac.webkit.org/changeset/171801>
2151         and <http://trac.webkit.org/changeset/171540>, respectively.
2152         * platform/network/mac/ResourceErrorMac.mm: Add USE(CFNETWORK)-guard around <CFNetwork/CFSocketStreamPriv.h>.
2153         * platform/network/mac/ResourceHandleMac.mm: Substitute header CFURLRequestSPI.h for <CFNetwork/CFURLRequest.h>.
2154         (WebCore::ResourceHandle::start): Modified to use ResourceHandle::makeDelegate() instead of d->m_proxy, which 
2155         was removed in <http://trac.webkit.org/changeset/147476>.
2156         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
2157         * platform/network/mac/WebCoreURLResponse.mm:
2158         (WebCore::synthesizeRedirectResponseIfNecessary): Add !USE(CFNETWORK)- and PLATFORM(IOS)- guards.
2159         * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Added.
2160         * platform/spi/cf/CFURLRequestSPI.h: Added.
2161
2162 2014-09-02  Myles C. Maxfield  <mmaxfield@apple.com>
2163
2164         Use references in public EventSender functions
2165         https://bugs.webkit.org/show_bug.cgi?id=136463
2166
2167         Reviewed by Dan Bates.
2168
2169         Passing nullptr to EventSender shouldn't be allowed.
2170
2171         No new tests because there is no behavior change.
2172
2173         * dom/EventSender.h:
2174         (WebCore::EventSender::hasPendingEvents):
2175         (WebCore::EventSender<T>::dispatchEventSoon):
2176         (WebCore::EventSender<T>::cancelEvent):
2177         (WebCore::EventSender<T>::dispatchPendingEvents):
2178         * html/HTMLLinkElement.cpp:
2179         (WebCore::HTMLLinkElement::~HTMLLinkElement):
2180         (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
2181         * html/HTMLStyleElement.cpp:
2182         (WebCore::HTMLStyleElement::~HTMLStyleElement):
2183         (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
2184         * loader/ImageLoader.cpp:
2185         (WebCore::ImageLoader::~ImageLoader):
2186         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent):
2187         (WebCore::ImageLoader::updateFromElement):
2188         (WebCore::ImageLoader::notifyFinished):
2189         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
2190
2191 2014-09-02  Daniel Bates  <dabates@apple.com>
2192
2193         [iOS] Exclude touch and gesture files when building without ENABLE_TOUCH_EVENTS
2194         and ENABLE_IOS_GESTURE_EVENTS, respectively
2195         https://bugs.webkit.org/show_bug.cgi?id=136456
2196
2197         Reviewed by Andy Estes.
2198
2199         It's sufficient to exclude the touch and gesture files when building without
2200         ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS, respectively. Currently we
2201         exclude these files when building without the Apple Internal SDK, which is
2202         heavy handed.
2203
2204         * Configurations/WebCore.xcconfig:
2205
2206 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
2207
2208         Fix an assertion sometimes seen under RenderLayerCompositor::detachRootLayer()
2209         https://bugs.webkit.org/show_bug.cgi?id=136464
2210
2211         Reviewed by Tim Horton.
2212
2213         Don't try to call RenderLayer::isVisuallyNonEmpty() under RenderLayerCompositor::detachRootLayer()
2214         when layout might be stale; there's not point trying to update the backing store state
2215         when detaching, only when attaching.
2216
2217         * rendering/RenderLayerCompositor.cpp:
2218         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
2219
2220 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
2221
2222         Avoid backing store allocation with some combinations of replaced elements, masking and visibility:hidden
2223         https://bugs.webkit.org/show_bug.cgi?id=136400
2224
2225         Reviewed by Tim Horton.
2226         
2227         RenderLayer::isVisuallyNonEmpty() would return true for replaced elements (e.g. images)
2228         with visibility:hidden, and for layers with a mask, and both would cause additional
2229         backing store in some cases.
2230         
2231         We can move the hasVisibleContent() to the top of the function, since visibility:hidden
2232         will always hide any content of this layer. The hasMask() check can also be removed;
2233         a mask can only mask content that is already visible; it never contributes additional
2234         pixels.
2235
2236         Tests: compositing/backing/masked-child-no-backing.html
2237                compositing/backing/replaced-child-no-backing.html
2238
2239         * rendering/RenderLayer.cpp:
2240         (WebCore::RenderLayer::calculateClipRects):
2241
2242 2014-09-02  Joseph Pecoraro  <pecoraro@apple.com>
2243
2244         Use jsNontrivialString for strings we know are more than a single character
2245         https://bugs.webkit.org/show_bug.cgi?id=136393
2246
2247         Reviewed by Geoffrey Garen.
2248
2249         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2250         (WebCore::addUsagesToJSON):
2251
2252 2014-09-02  Alex Christensen  <achristensen@webkit.org>
2253
2254         Fix bindings tests after r173176.
2255         https://bugs.webkit.org/show_bug.cgi?id=136460
2256
2257         Reviewed by Simon Fraser.
2258
2259         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2260         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2261         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2262         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2263         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2264         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2265         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2266         * bindings/scripts/test/JS/JSTestEventTarget.h:
2267         * bindings/scripts/test/JS/JSTestException.cpp:
2268         * bindings/scripts/test/JS/JSTestException.h:
2269         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2270         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2271         * bindings/scripts/test/JS/JSTestInterface.cpp:
2272         * bindings/scripts/test/JS/JSTestInterface.h:
2273         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2274         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2275         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2276         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2277         * bindings/scripts/test/JS/JSTestNode.cpp:
2278         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2279         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2280         * bindings/scripts/test/JS/JSTestObj.cpp:
2281         * bindings/scripts/test/JS/JSTestObj.h:
2282         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2283         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2284         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2285         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2286         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2287         * bindings/scripts/test/JS/JSTestTypedefs.h:
2288         * bindings/scripts/test/JS/JSattribute.cpp:
2289         * bindings/scripts/test/JS/JSattribute.h:
2290         * bindings/scripts/test/JS/JSreadonly.cpp:
2291         * bindings/scripts/test/JS/JSreadonly.h:
2292         * bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
2293         * bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
2294         * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
2295         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
2296         * bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
2297         * bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
2298         * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
2299         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h:
2300         * bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
2301         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
2302         * bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
2303         * bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
2304         * bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h:
2305         * bindings/scripts/test/ObjC/DOMTestObjInternal.h:
2306         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
2307         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
2308         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
2309         * bindings/scripts/test/ObjC/DOMattributeInternal.h:
2310         * bindings/scripts/test/ObjC/DOMreadonlyInternal.h:
2311         Added new WEBCORE_EXPORT macros.
2312
2313 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
2314
2315         Non-composited child RenderLayers cause allocation of unncessary backing store
2316         https://bugs.webkit.org/show_bug.cgi?id=136375
2317
2318         Reviewed by David Hyatt.
2319         
2320         A composited element that has non-composited descendant elements that fall into
2321         RenderLayers was getting backing store when none was required. descendentLayerPaintsIntoAncestor()
2322         was simply checking the "visibility:visible" bit on descendant non-composited layers,
2323         instead of actually asking them if they have any visual content.
2324         
2325         Added a couple of FIXME comments.
2326
2327         Test: compositing/backing/child-layer-no-backing.html
2328
2329         * rendering/RenderLayer.cpp:
2330         (WebCore::RenderLayer::calculateClipRects):
2331         * rendering/RenderLayerBacking.cpp:
2332         (WebCore::descendentLayerPaintsIntoAncestor):
2333
2334 2014-09-02  Commit Queue  <commit-queue@webkit.org>
2335
2336         Unreviewed, rolling out r173175.
2337         https://bugs.webkit.org/show_bug.cgi?id=136454
2338
2339         it broke debug builds (Requested by jessieberlin on #webkit).
2340
2341         Reverted changeset:
2342
2343         "Introduce CSS_BASIC_TYPE_CASTS, and use it"
2344         https://bugs.webkit.org/show_bug.cgi?id=136403
2345         http://trac.webkit.org/changeset/173175
2346
2347 2014-09-02  Alex Christensen  <achristensen@webkit.org>
2348
2349         More use of WEBCORE_EXPORT.
2350
2351         Reviewed by Darin Adler.
2352
2353         These changes from a patch attached to https://bugs.webkit.org/show_bug.cgi?id=136172
2354         contain more deployment of the WEBCORE_EXPORT macro. As of this writing, the macro is
2355         defined to do nothing, so landing these is a harmless way to get closer to be the point
2356         where we can throw the switch to use these instead of explicit export files on OS X,
2357         iOS, and Windows.
2358
2359         * bindings/js/JSDOMBinding.h:
2360         * bindings/js/JSDOMGlobalObject.h:
2361         * bindings/js/JSDOMWindowBase.h:
2362         * bindings/scripts/CodeGeneratorJS.pm:
2363         (GenerateHeader):
2364         (GenerateImplementation):
2365         * bindings/scripts/CodeGeneratorObjC.pm:
2366         (GenerateHeader):
2367         * bridge/runtime_method.cpp:
2368         * bridge/runtime_object.cpp:
2369         * dom/Document.h:
2370         * dom/Element.h:
2371         * dom/Position.h:
2372         * dom/Range.h:
2373         * dom/StaticNodeList.h:
2374         * dom/make_names.pl:
2375         (printInit):
2376         (printNamesCppFile):
2377         * editing/Editor.h:
2378         * editing/FrameSelection.h:
2379         * editing/TextIterator.h:
2380         * inspector/InspectorFrontendClient.h:
2381         * inspector/InspectorFrontendClientLocal.h:
2382         * loader/DocumentLoader.h:
2383         * loader/FrameLoader.h:
2384         * loader/cache/MemoryCache.h:
2385         * loader/cocoa/DiskCacheMonitorCocoa.h:
2386         * loader/mac/LoaderNSURLExtras.h:
2387         * page/Page.h:
2388         * page/PageGroup.h:
2389         * page/SecurityPolicy.h:
2390         * page/Settings.h:
2391         * page/make_settings.pl:
2392         (printGetterAndSetter):
2393         * page/scrolling/ScrollingStateScrollingNode.h:
2394         * platform/CrossThreadCopier.h:
2395         * platform/LocalizedStrings.h:
2396         * platform/MemoryPressureHandler.cpp:
2397         * platform/PlatformScreen.h:
2398         * platform/PublicSuffix.h:
2399         * platform/graphics/Gradient.h:
2400         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
2401         * platform/graphics/filters/FilterOperation.h:
2402         * platform/ios/WebVideoFullscreenControllerAVKit.h:
2403         * platform/mac/PlatformEventFactoryMac.h:
2404         * platform/mac/WebCoreFullScreenPlaceholderView.h:
2405         * platform/mac/WebCoreFullScreenWindow.h:
2406         * platform/mac/WebCoreNSStringExtras.h:
2407         * platform/mac/WebCoreObjCExtras.h:
2408         * platform/mac/WebFontCache.h:
2409         * platform/mac/WebVideoFullscreenController.h:
2410         * platform/mac/WebWindowAnimation.h:
2411         * platform/network/BlobRegistryImpl.h:
2412         * platform/network/CredentialStorage.h:
2413         * platform/network/PlatformCookieJar.h:
2414         * platform/network/ProxyServer.h:
2415         * platform/sql/SQLiteStatement.h:
2416         * platform/text/TextEncoding.h:
2417         * rendering/HitTestResult.h:
2418         * rendering/RenderTreeAsText.h:
2419         * testing/Internals.h:
2420         Add many more correct uses of WEBCORE_EXPORT; remove a few incorrect ones.
2421
2422 2014-09-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2423
2424         Introduce CSS_BASIC_TYPE_CASTS, and use it
2425         https://bugs.webkit.org/show_bug.cgi?id=136403
2426
2427         Reviewed by Darin Adler.
2428
2429         toCSSBasicFoo() will help to detect wrong type casting. So this patch generates it, and use it
2430         instead of static_cast<const CSSBasicFoo*>().
2431
2432         No new tests no behavior changes.
2433
2434         * css/BasicShapeFunctions.cpp:
2435         (WebCore::basicShapeForValue):
2436         * css/CSSBasicShapes.cpp:
2437         (WebCore::CSSBasicShapeCircle::equals):
2438         (WebCore::CSSBasicShapeEllipse::equals):
2439         (WebCore::CSSBasicShapePolygon::equals):
2440         (WebCore::CSSBasicShapeInset::equals):
2441         * css/CSSBasicShapes.h:
2442
2443 2014-09-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2444
2445         CachedResourceLoader should check redirections to reuse or not cached resources
2446         https://bugs.webkit.org/show_bug.cgi?id=131757
2447
2448         Reviewed by Antti Koivisto.
2449
2450         Added cache-control redirection check to properly determine revalidation policy.
2451         Tightened redirection cache-control header check by testing for no-cache and must-revalidate directives.
2452         Added redirection freshness check.
2453
2454         Test: http/tests/cache/cache-redirections.html
2455
2456         * loader/cache/CachedRawResource.cpp:
2457         (WebCore::CachedRawResource::canReuse): Removed redirection check (now handled by CachedResource::redirectChainAllowsReuse).
2458         * loader/cache/CachedResource.cpp:
2459         (WebCore::currentAge): Moved from WebCore::CachedResource::currentAge method to static function. Added response and responseTimestamp as parameters.
2460         (WebCore::CachedResource::CachedResource): Initialized redirection chain status (no redirection and expiracy date set to never).
2461         (WebCore::CachedResource::isExpired): Updated according new currentAge/freshnessLifetime method parameters.
2462         (WebCore::CachedResource::freshnessLifetime): Added response as parameter.
2463         (WebCore::CachedResource::willSendRequest): Computes whether a redirection can be cached, and if cached for how long it will remain fresh.
2464         (WebCore::CachedResource::redirectChainAllowsReuse): Return false if any of the redirection in the redirection chain cannot be cached or expired. 
2465         * loader/cache/CachedResource.h: Added cache chain member that stores whether the redirection chain can be cached and if so when it will be expired.
2466         * loader/cache/CachedResourceLoader.cpp:
2467         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Added check of the redirection chain.
2468
2469 2014-09-02  Daewoong Jang  <daewoong.jang@navercorp.com>
2470
2471         Prevent decoded images from being destroyed when they're in use.
2472         https://bugs.webkit.org/show_bug.cgi?id=136259.
2473
2474         Reviewed by Darin Adler.
2475
2476         Try to fix a regression introduced by r172790. Before the patch,
2477         CachedImage does not release its Image object if it still has clients.
2478         However this behavior was changed due to removal of CachedResource::isSafeToMakePurgeable(),
2479         which implied a call to CachedResource::hasClients(). This patch restores
2480         the behavior by adding a check to hasClients() in CachedImage::destroyDecodedData().
2481
2482         * loader/cache/CachedImage.cpp:
2483         (WebCore::CachedImage::destroyDecodedData):
2484
2485 2014-09-01  Tim Horton  <timothy_horton@apple.com>
2486
2487         RenderThemeMac::paintProgressBar creates a buffer without respecting the destination's acceleration setting
2488         https://bugs.webkit.org/show_bug.cgi?id=136427
2489
2490         Reviewed by Dan Bernstein.
2491
2492         No new tests, just a performance improvement.
2493
2494         * rendering/RenderThemeMac.mm:
2495         (WebCore::RenderThemeMac::paintProgressBar):
2496
2497 2014-09-01  Tim Horton  <timothy_horton@apple.com>
2498
2499         Remove an unnecessary local in GraphicsLayerCA::ensureStructuralLayer
2500         https://bugs.webkit.org/show_bug.cgi?id=136426
2501
2502         Reviewed by Dan Bernstein.
2503
2504         * platform/graphics/ca/GraphicsLayerCA.cpp:
2505         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2506         This was here so that we could call PlatformCALayerClient::platformLayerChanged,
2507         but that no longer exists!
2508
2509 2014-08-29  Sergio Villar Senin  <svillar@igalia.com>
2510
2511         [CSS Grid Layout] Resolved value of grid-template-* must include every track listed
2512         https://bugs.webkit.org/show_bug.cgi?id=136362
2513
2514         Reviewed by Darin Adler.
2515
2516         Section 5.1.5 of the specs clearly states that the resolved value
2517         for grid-template-* must include every listed track, whether
2518         explicitly or implicitly created. We were only listing the
2519         explicit grid tracks.
2520
2521         * css/CSSComputedStyleDeclaration.cpp:
2522         (WebCore::valueForGridTrackList):
2523
2524 2014-09-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2525
2526         [CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
2527         https://bugs.webkit.org/show_bug.cgi?id=136194
2528
2529         Reviewed by Csaba Osztrogonác.
2530
2531         Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt.
2532
2533         * CMakeLists.txt:
2534
2535 2014-08-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2536
2537         Unreviewed, fix build break on EFL and GTK since r173152.
2538
2539         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2540         (WebCore::GraphicsContext::platformInit): Remove a bool parameter because it was removed from function's declaration.
2541
2542 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2543
2544         Remove GraphicsContext constructor that takes shouldUseContextColors
2545         https://bugs.webkit.org/show_bug.cgi?id=136421
2546
2547         Reviewed by Dan Bernstein.
2548
2549         * WebCore.exp.in:
2550         * platform/graphics/GraphicsContext.cpp:
2551         (WebCore::GraphicsContext::GraphicsContext):
2552         * platform/graphics/GraphicsContext.h:
2553         (WebCore::GraphicsContextState::GraphicsContextState):
2554         * platform/graphics/cg/GraphicsContextCG.cpp:
2555         (WebCore::GraphicsContext::platformInit):
2556         (WebCore::GraphicsContext::drawLinesForText):
2557         As far as I can tell, the last user of this constructor died with WebNSStringDrawing.
2558         Adjust all code to assume shouldUseContextColors=true.
2559
2560 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2561
2562         Remove unused ARMv6-specific #if branches in WebCore::canHyphenate
2563         https://bugs.webkit.org/show_bug.cgi?id=136420
2564
2565         Reviewed by Dan Bernstein.
2566
2567         * platform/text/cf/HyphenationCF.cpp:
2568         (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForNullKey):
2569         Use kCFAllocatorDefault instead of 0.
2570
2571         (WebCore::canHyphenate):
2572         Remove ARMv6-specific code.
2573
2574 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2575
2576         Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
2577         https://bugs.webkit.org/show_bug.cgi?id=136416
2578
2579         Reviewed by Dan Bernstein.
2580
2581         * WebCore.exp.in:
2582         * platform/graphics/GraphicsContext.h:
2583         * platform/graphics/cg/GraphicsContextCG.cpp:
2584         (WebCore::setStrokeAndFillColor): Deleted.
2585         Remove.
2586
2587 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2588
2589         Remove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs
2590         https://bugs.webkit.org/show_bug.cgi?id=136413
2591
2592         Reviewed by Dan Bernstein.
2593
2594         No new tests, just cleanup.
2595
2596         * platform/graphics/GraphicsContext.cpp:
2597         (WebCore::GraphicsContext::drawRaisedEllipse):
2598         There's nothing iOS specific about this function.
2599
2600         * platform/graphics/GraphicsContext.h:
2601         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2602         (WebCore::GraphicsContext::drawEllipse):
2603         * platform/graphics/cg/GraphicsContextCG.cpp:
2604         (WebCore::GraphicsContext::drawEllipse):
2605         Un-ifdef drawRaisedEllipse; delete the reimplementation of drawEllipse that takes
2606         a FloatRect and make the normal one take a FloatRect instead.
2607
2608         (WebCore::GraphicsContext::platformInit):
2609         Make sure that the CGContext's line width starts out in sync with GraphicsContext's.
2610         By default, CGContext has a line width of 1 and GraphicsContext 0, so they could previously
2611         have been out of sync until someone set the width explicitly.
2612
2613 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2614
2615         Fix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary
2616         https://bugs.webkit.org/show_bug.cgi?id=136412
2617
2618         Reviewed by Alexey Proskuryakov.
2619
2620         No new tests, just cleanup.
2621
2622         * platform/graphics/BitmapImage.cpp:
2623         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2624         Drop the leading 'c' and the 'static' on the cutoff parameter.
2625         Remove the duplicated early return (seems like it happened in the merge).
2626         Remove reference to the exact size in the comment, since it's different on iOS.
2627
2628 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2629
2630         Use SinkDocument instead of PDFDocument; get rid of PDFDocument
2631         https://bugs.webkit.org/show_bug.cgi?id=136414
2632
2633         Reviewed by Alexey Proskuryakov.
2634
2635         * WebCore.xcodeproj/project.pbxproj:
2636         * loader/DocumentWriter.cpp:
2637         (WebCore::DocumentWriter::createDocument):
2638         * pdf/ios/PDFDocument.cpp: Removed.
2639         * pdf/ios/PDFDocument.h: Removed.
2640         Use the generic SinkDocument, which ignores all incoming data just like PDFDocument.
2641         Delete the unnecessary and iOS-specific PDFDocument.cpp/h
2642
2643 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2644
2645         Adjust an antique comment in Image::drawPattern
2646         https://bugs.webkit.org/show_bug.cgi?id=136411
2647
2648         Reviewed by Dan Bernstein.
2649
2650         * platform/graphics/cg/ImageCG.cpp:
2651         (WebCore::Image::drawPattern):
2652         Reword the comment.
2653
2654 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2655
2656         SVGImage::drawPatternForContainer creates a buffer without respecting the destination's acceleration setting
2657         https://bugs.webkit.org/show_bug.cgi?id=136408
2658         <rdar://problem/12013317>
2659
2660         Reviewed by Dan Bernstein.
2661
2662         No new tests required, just a performance improvement.
2663
2664         * svg/graphics/SVGImage.cpp:
2665         (WebCore::SVGImage::drawPatternForContainer):
2666         Use ImageBuffer::createCompatibleBuffer, which passes the destination's
2667         acceleration setting through to the ImageBuffer constructor.
2668
2669         I didn't use GraphicsContext::createCompatibleBuffer because adjusting
2670         how this function applies the destination's CTM is outside the scope of this patch.
2671
2672 2014-08-30  Joseph Pecoraro  <pecoraro@apple.com>
2673
2674         Convert string literals to character literals in makeString usage
2675         https://bugs.webkit.org/show_bug.cgi?id=136394
2676
2677         Reviewed by Sam Weinig.
2678
2679         * inspector/InspectorOverlay.cpp:
2680         (WebCore::InspectorOverlay::evaluateInOverlay):
2681         * loader/FrameLoader.cpp:
2682         (WebCore::FrameLoader::setOriginalURLForDownloadRequest):
2683         * loader/MixedContentChecker.cpp:
2684         (WebCore::MixedContentChecker::logWarning):
2685         * page/ContentSecurityPolicy.cpp:
2686         (WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation):
2687         (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
2688         (WebCore::ContentSecurityPolicy::reportInvalidPathCharacter):
2689         Also reorder some code to ensure single string creation.
2690
2691 2014-08-26  Maciej Stachowiak  <mjs@apple.com>
2692
2693         Use RetainPtr::autorelease in some places where it seems appropriate
2694         https://bugs.webkit.org/show_bug.cgi?id=136280
2695
2696         Reviewed by Darin Adler.
2697
2698         * platform/mac/URLMac.mm:
2699         (WebCore::URL::operator NSURL *): Use autorelease() instead of
2700         CFBridgingRelease(leakRef())
2701
2702 2014-08-30  Yusuke Suzuki  <utatane.tea@gmail.com>
2703
2704         CSS: Refactor :visited handling in SelectorChecker
2705         https://bugs.webkit.org/show_bug.cgi?id=135639
2706
2707         Reviewed by Benjamin Poulain.
2708
2709         :visited is specially handled in the SelectorChecker and style resolution
2710         because of security issues. That is nested links and adjacent combinators.
2711         Since we propagate linkState from the ancestors,
2712
2713             1. linkStates of ancestors from the target node are only used to calculate
2714             the linkState of the current node.
2715             This is why adjacent combinators disable :visited.
2716
2717             2. linkState is overrides by the closest link element in the ancestors.
2718             This is why :visited is effective on the closest link element.
2719
2720         In this patch, we fix 3 things.
2721
2722             1. Simplify SelectorChecker. Move m_mode to CheckingContext and it makes
2723             CheckingContext more similar to SelectorCompiler::CheckingContext in CSS JIT.
2724             And hide visitedMatchType parameter from the caller of SelectorChecker.
2725
2726             2. Disable :visited inside :-webkit-any. Currently, :-webkit-any provides MatchAll
2727             link match type. So considering visited match type in the matching phase of :visited
2728             provides inconsistency. In this patch, :-webkit-any(:visited) never matches.
2729             And :-webkit-any(:link) acts like a :-webkit-any(:any-link). This behavior represents
2730             that visited match type is always considered as disabled inside :-webkit-any.
2731             This behavior may be changed when Selector Level4 is implemented.
2732
2733             3. Fix the issue when traversing the descendant element,
2734             first encountered link check is missing.
2735
2736         Tests: fast/history/link-inside-any.html
2737                fast/history/link-inside-not.html
2738                fast/history/nested-visited-test-override.html
2739                fast/history/visited-inside-any.html
2740                fast/history/visited-inside-not.html
2741
2742         * css/ElementRuleCollector.cpp:
2743         (WebCore::ElementRuleCollector::ruleMatches):
2744         * css/SelectorChecker.cpp:
2745         (WebCore::SelectorChecker::SelectorChecker):
2746         (WebCore::SelectorChecker::match):
2747         (WebCore::hasScrollbarPseudoElement):
2748         (WebCore::checkingContextForParent):
2749         (WebCore::SelectorChecker::matchRecursively):
2750         (WebCore::SelectorChecker::checkOne):
2751         * css/SelectorChecker.h:
2752         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
2753         * css/StyleResolver.h:
2754         (WebCore::checkRegionSelector):
2755         * dom/SelectorQuery.cpp:
2756         (WebCore::SelectorDataList::selectorMatches):
2757
2758 2014-08-29  Zalan Bujtas  <zalan@apple.com>
2759
2760         Subpixel layout: Remove LayoutUnit's kEffectiveFixedPointDenominator.
2761         https://bugs.webkit.org/show_bug.cgi?id=136383.
2762
2763         Reviewed by Simon Fraser.
2764
2765         There's only one subpixel denominator now.
2766
2767         No change in functionality.
2768
2769         * platform/LayoutUnit.h:
2770         (WebCore::LayoutUnit::LayoutUnit):
2771         (WebCore::LayoutUnit::fromFloatCeil):
2772         (WebCore::LayoutUnit::fromFloatFloor):
2773         (WebCore::LayoutUnit::toInt):
2774         (WebCore::LayoutUnit::toFloat):
2775         (WebCore::LayoutUnit::toDouble):
2776         (WebCore::LayoutUnit::operator++):
2777         (WebCore::LayoutUnit::ceil):
2778         (WebCore::LayoutUnit::round):
2779         (WebCore::LayoutUnit::floor):
2780         (WebCore::LayoutUnit::ceilToFloat):
2781         (WebCore::LayoutUnit::fraction):
2782         (WebCore::LayoutUnit::epsilon):
2783         (WebCore::LayoutUnit::nearlyMax):
2784         (WebCore::LayoutUnit::nearlyMin):
2785         (WebCore::LayoutUnit::isInBounds):
2786         (WebCore::LayoutUnit::setValue):
2787         (WebCore::boundedMultiply):
2788         (WebCore::operator*):
2789         (WebCore::operator/):
2790         (WebCore::operator%):
2791         (WebCore::roundToDevicePixel):
2792         (WebCore::floorToDevicePixel):
2793         (WebCore::ceilToDevicePixel):
2794
2795 2014-08-29  Zalan Bujtas  <zalan@apple.com>
2796
2797         Rename updatePreferredWidth to make it more explicit.
2798         https://bugs.webkit.org/show_bug.cgi?id=136389
2799
2800         Reviewed by Simon Fraser.
2801
2802         No change in functionality.
2803
2804         * rendering/RenderBlock.cpp:
2805         (WebCore::preferredWidth):
2806         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2807         (WebCore::updatePreferredWidth): Deleted.
2808
2809 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
2810
2811         Make timerNestingLevel threadsafe
2812         https://bugs.webkit.org/show_bug.cgi?id=136401
2813
2814         Reviewed by Tim Horton.
2815
2816         timerNestingLevel, used by DOMTimer to determine whether a timer is 'nested'
2817         (repeating, possible due to a timer rescheduling itself) is a global. Since
2818         worker threads can set timers too this is not thread safe.
2819
2820         * dom/ScriptExecutionContext.cpp:
2821         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2822             - added initialize m_timerNestingLevel
2823         * dom/ScriptExecutionContext.h:
2824         (WebCore::ScriptExecutionContext::timerNestingLevel):
2825         (WebCore::ScriptExecutionContext::setTimerNestingLevel):
2826             - added accessors
2827         * page/DOMTimer.cpp:
2828         (WebCore::DOMTimer::DOMTimer):
2829         (WebCore::DOMTimer::fired):
2830             - move timerNestingLevel to the context
2831
2832 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
2833
2834         DOMTimer::m_nestingLevel is prone to overflow
2835         https://bugs.webkit.org/show_bug.cgi?id=136399
2836
2837         Reviewed by Alexey Proskuryakov.
2838
2839         Since this would happen after the 2 billionth timer fire this is unlikely,
2840         and consequences aren't severe (breaks throttling).
2841
2842         This change has the following consequences.
2843
2844             - m_nestingLevel saturates to its max value.
2845             - unnested timers are indicated by a nesting level of 0.
2846             - repeat timers update m_nestingLevel on every fire,
2847               not just those that should have been throttled.
2848
2849         The last point is subtle, but ultimately should be inconsequential. Timers
2850         whose requested timeout is less that the minimum interval will saturate quickly
2851         anyway; timers with an original interval greater than the minimum previously
2852         wouldn't have incremented m_nestingLevel, but doing so now doesn't hurt since
2853         they won't be throttled when they hit the threshold. This simplifies things
2854         conceptually a little & reduces the test performed on each timer fire.
2855
2856         * page/DOMTimer.cpp:
2857         (WebCore::shouldForwardUserGesture):
2858             - unnested timers are indicated by a nesting level of 0
2859         (WebCore::DOMTimer::DOMTimer):
2860             - don't increment nesting level on construction
2861         (WebCore::DOMTimer::fired):
2862             - saturating increments
2863         (WebCore::DOMTimer::adjustMinimumTimerInterval):
2864         (WebCore::DOMTimer::intervalClampedToMinimum):
2865             - added ASSERTs
2866
2867 2014-08-29  Zalan Bujtas  <zalan@apple.com>
2868
2869         Improve showRenderTree() output.
2870         https://bugs.webkit.org/show_bug.cgi?id=136244
2871
2872         Reviewed by Darin Adler.
2873
2874         Add more debugging information to showRenderTree().
2875
2876         Not testable.
2877
2878         * rendering/InlineBox.cpp:
2879         (WebCore::InlineBox::showLineTreeForThis):
2880         (WebCore::InlineBox::showLineTreeAndMark):
2881         (WebCore::InlineBox::showLineBox):
2882         (showNodeTree):
2883         (showLineTree):
2884         (WebCore::InlineBox::showBox): Deleted.
2885         * rendering/InlineBox.h:
2886         * rendering/InlineFlowBox.cpp:
2887         (WebCore::InlineFlowBox::showLineTreeAndMark):
2888         * rendering/InlineFlowBox.h:
2889         * rendering/InlineTextBox.cpp:
2890         (WebCore::InlineTextBox::showLineBox):
2891         (WebCore::InlineTextBox::showBox): Deleted.
2892         * rendering/InlineTextBox.h:
2893         * rendering/RenderBlock.cpp:
2894         (WebCore::RenderBlock::showLineTreeAndMark): Deleted.
2895         * rendering/RenderBlock.h:
2896         * rendering/RenderBlockFlow.cpp:
2897         (WebCore::RenderBlockFlow::showLineTreeAndMark):
2898         * rendering/RenderBlockFlow.h:
2899         * rendering/RenderObject.cpp:
2900         (WebCore::showRenderTreeLegend):
2901         (WebCore::RenderObject::showNodeTreeForThis):
2902         (WebCore::RenderObject::showRenderTreeForThis):
2903         (WebCore::RenderObject::showLineTreeForThis):
2904         (WebCore::RenderObject::showRegionsInformation):
2905         (WebCore::RenderObject::showRenderObject):
2906         (WebCore::RenderObject::showRenderSubTreeAndMark):
2907         (showNodeTree):
2908         (showLineTree):
2909         (showRenderTree):
2910         (WebCore::RenderObject::showRenderTreeAndMark): Deleted.
2911         * rendering/RenderObject.h:
2912         * rendering/RootInlineBox.h:
2913
2914 2014-08-29  Csaba Osztrogonác  <ossy@webkit.org>
2915
2916         Unreviewed, remove empty directories.
2917
2918         * Modules/networkinfo: Removed.
2919         * inspector/front-end: Removed.
2920         * inspector/front-end/Images: Removed.
2921         * inspector/front-end/UglifyJS: Removed.
2922         * inspector/front-end/ace: Removed.
2923         * inspector/front-end/cm: Removed.
2924         * platform/audio/ffmpeg: Removed.
2925         * platform/audio/ipp: Removed.
2926         * platform/graphics/gpu/opencl: Removed.
2927
2928 2014-08-29  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2929
2930         [EFL] Remove non Coordinated Graphics code path from cmake build system after r142169
2931         https://bugs.webkit.org/show_bug.cgi?id=135560
2932
2933         Reviewed by Gyuyoung Kim.
2934
2935         No new tests required, no new functionality.
2936
2937         * PlatformEfl.cmake: Removed TEXTURE_MAPPER and 3D_GRAPHICS guards.
2938         * platform/graphics/efl/GraphicsContext3DEfl.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
2939         (WebCore::GraphicsContext3D::platformLayer):
2940         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
2941         * platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
2942         (WebCore::GraphicsContext3DPrivate::initialize):
2943         (WebCore::GraphicsContext3DPrivate::releaseResources):
2944         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2945         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
2946         * platform/graphics/efl/GraphicsContext3DPrivate.h: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
2947         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Removed GRAPHICS_SURFACE guard.
2948
2949 2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2950
2951         RenderThemeGtk depends on classes outside of platform
2952         https://bugs.webkit.org/show_bug.cgi?id=22176
2953
2954         Reviewed by Martin Robinson.
2955
2956         Move RenderThemeGtk.cpp from platform to rendering.
2957
2958         * PlatformGTK.cmake:
2959         * rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp.
2960
2961 2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2962
2963         [GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
2964         https://bugs.webkit.org/show_bug.cgi?id=136338
2965
2966         Reviewed by Philippe Normand.
2967
2968         Remove the dependency by creating the GtkStyleContext for the
2969         scrollbars in ScrollbarThemeGtk.
2970
2971         * platform/gtk/RenderThemeGtk.cpp:
2972         (WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged().
2973         (WebCore::getStyleContext): Remove the scrollbar style context support.
2974         * platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle().
2975         * platform/gtk/ScrollbarThemeGtk.cpp:
2976         (WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper
2977         class to create the global GtkStyleContext for scrollbars.
2978         (WebCore::ScrollbarStyleContext::~ScrollbarStyleContext):
2979         (WebCore::ScrollbarStyleContext::context):
2980         (WebCore::gtkScrollbarStyleContext):
2981         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization.
2982         (WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the
2983         GtkStylecontext and call updateThemeProperties().
2984         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the
2985         global style context.
2986         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
2987         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
2988         (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
2989         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
2990         * platform/gtk/ScrollbarThemeGtk.h:
2991
2992 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2993
2994         [GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp intoScrollbarThemeGtk.cpp
2995         https://bugs.webkit.org/show_bug.cgi?id=136336
2996
2997         Reviewed by Philippe Normand.
2998
2999         There's no reason to have two files now that there's no GTK+2
3000         support. Also fix coding style issues and compile warnings.
3001
3002         * PlatformGTK.cmake:
3003         * platform/gtk/RenderThemeGtk.cpp:
3004         * platform/gtk/RenderThemeGtk.h:
3005         * platform/gtk/RenderThemeGtk3.cpp: Removed.
3006         * platform/gtk/ScrollbarThemeGtk.cpp:
3007         * platform/gtk/ScrollbarThemeGtk3.cpp: Removed.
3008
3009 2014-08-28  Mark Lam  <mark.lam@apple.com>
3010
3011         DebuggerCallFrame::scope() should return a DebuggerScope.
3012         <https://webkit.org/b/134420>
3013
3014         Reviewed by Geoffrey Garen.
3015
3016         No new tests.
3017
3018         Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.
3019
3020         * bindings/js/ScriptController.cpp:
3021         (WebCore::ScriptController::attachDebugger):
3022         - We should acquire the JSLock before modifying a JS global object.
3023
3024 2014-08-28  Enrica Casucci  <enrica@apple.com>
3025
3026         Can't hit tab key more than 3 times continuously.
3027         https://bugs.webkit.org/show_bug.cgi?id=136357
3028         rdar://problem/17927266
3029
3030         Reviewed by Dean Jackson.
3031
3032         Test: fast/css/multiple-tabs.html
3033
3034         When computing the tabWidth disregard increments of less than half the size of the space character
3035         for the given font.
3036
3037         * platform/graphics/Font.h:
3038         (WebCore::Font::tabWidth):
3039
3040 2014-08-28  Daniel Bates  <dabates@apple.com>
3041
3042         [iOS] Clients that include WebCoreThread.h fail to build after <http://trac.webkit.org/changeset/172814/>
3043         (https://bugs.webkit.org/show_bug.cgi?id=136108)
3044
3045         Define WEBCORE_EXPORT (if its not already defined) in WebCoreThread.h so as to fix the
3046         build for clients that include this header.
3047
3048         * platform/ios/wak/WebCoreThread.h:
3049
3050 2014-08-28  Pratik Solanki  <psolanki@apple.com>
3051
3052         WebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing some websites
3053         https://bugs.webkit.org/show_bug.cgi?id=136347
3054         <rdar://problem/18073745>
3055
3056         Reviewed by Andreas Kling.
3057
3058         When passing data to ImageIO, we create a copy if we have to reallocate the buffer. We would
3059         set the size of the new buffer to be the size of the SharedBuffer data. This causes memory
3060         churn since we would create a new buffer for every data chunk we get. Fix this by at least
3061         doubling the capacity of the buffer when we duplicate it.
3062
3063         * platform/SharedBuffer.cpp:
3064         (WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
3065
3066 2014-08-28  Dan Bernstein  <mitz@apple.com>
3067
3068         iOS build fix.
3069
3070         * WebCore.exp.in: Updated symbol.
3071
3072 2014-08-28  Benjamin Poulain  <bpoulain@apple.com>
3073
3074         Scrolling with spacebar on a page with fixed header breaks reading flow
3075         https://bugs.webkit.org/show_bug.cgi?id=135506
3076
3077         Reviewed by Simon Fraser.
3078
3079         When scrolling by page, find the height of any bar that is obscuring the top or bottom of the page,
3080         and substract that height from the step to scroll.
3081
3082         Tests: scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html
3083                scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html
3084                scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html
3085                scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html
3086                scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html
3087                scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html
3088                scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html
3089                scrollbars/scrolling-by-page-on-keyboard-spacebar.html
3090
3091         * WebCore.exp.in:
3092         * page/FrameView.cpp:
3093         (WebCore::FrameView::adjustScrollStepForFixedContent):
3094         * page/FrameView.h:
3095         * platform/ScrollableArea.cpp:
3096         (WebCore::ScrollableArea::adjustScrollStepForFixedContent):
3097         (WebCore::ScrollableArea::scroll):
3098         * platform/ScrollableArea.h:
3099
3100 2014-08-28  Zalan Bujtas  <zalan@apple.com>
3101
3102         Subpixel layout: Remove unused pixel snapping functions.
3103         https://bugs.webkit.org/show_bug.cgi?id=136341
3104
3105         Reviewed by Simon Fraser.
3106
3107         Let's not encourage integral snapping by having these functions around.
3108         
3109         No change in functionality.
3110
3111         * accessibility/AccessibilityObject.h:
3112         (WebCore::AccessibilityObject::pixelSnappedElementRect): Deleted.
3113         (WebCore::AccessibilityObject::pixelSnappedSize): Deleted.
3114         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3115         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3116         * html/HTMLImageElement.cpp:
3117         (WebCore::HTMLImageElement::width):
3118         (WebCore::HTMLImageElement::height):
3119         * page/FrameView.cpp:
3120         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
3121         * platform/graphics/LayoutPoint.h:
3122         (WebCore::snappedIntSize):
3123         (WebCore::snapSizeToDevicePixel):
3124         * platform/graphics/LayoutRect.h:
3125         (WebCore::LayoutRect::pixelSnappedLocation): Deleted.
3126         (WebCore::LayoutRect::pixelSnappedX): Deleted.
3127         (WebCore::LayoutRect::pixelSnappedY): Deleted.
3128         (WebCore::LayoutRect::pixelSnappedWidth): Deleted.
3129         (WebCore::LayoutRect::pixelSnappedHeight): Deleted.
3130         (WebCore::LayoutRect::pixelSnappedMaxX): Deleted.
3131         (WebCore::LayoutRect::pixelSnappedMaxY): Deleted.
3132         (WebCore::snappedIntRectFromEdges): Deleted.
3133         * rendering/RenderBlockFlow.h:
3134         (WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat): Deleted.
3135         (WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat): Deleted.
3136         (WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat): Deleted.
3137         (WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat): Deleted.
3138         * rendering/RenderBox.h:
3139         (WebCore::RenderBox::pixelSnappedLogicalHeight):
3140         (WebCore::RenderBox::pixelSnappedLogicalWidth):
3141         (WebCore::RenderBox::pixelSnappedBorderBoxRect):
3142         (WebCore::RenderBox::pixelSnappedWidth): Deleted.
3143         (WebCore::RenderBox::pixelSnappedHeight): Deleted.
3144         (WebCore::RenderBox::pixelSnappedFrameRect): Deleted.
3145         * rendering/RenderFileUploadControl.cpp:
3146         (WebCore::nodeWidth):
3147         (WebCore::nodeHeight):
3148         (WebCore::RenderFileUploadControl::maxFilenameWidth):
3149         * rendering/RenderLayer.cpp:
3150         (WebCore::RenderLayer::updateLayerPosition):
3151         (WebCore::RenderLayer::isPointInResizeControl):
3152         * rendering/RenderLayerCompositor.cpp:
3153         (WebCore::RenderLayerCompositor::ensureRootLayer):
3154         * rendering/RenderMediaControls.cpp:
3155         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
3156         * rendering/RenderMultiColumnSet.cpp:
3157         (WebCore::RenderMultiColumnSet::paintColumnRules):
3158         * rendering/RenderScrollbar.cpp:
3159         (WebCore::RenderScrollbar::buttonRect):
3160         * rendering/RenderView.h:
3161
3162 2014-08-27  Enrica Casucci  <enrica@apple.com>
3163
3164         textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
3165         https://bugs.webkit.org/show_bug.cgi?id=136323
3166         rdar://problem/18141964
3167
3168         Reviewed by Antti Koivisto.
3169
3170         For underline style we need to check typingStyle first and use that information to populate
3171         the dictionary. If there is no typing style we can use the render style.
3172
3173         * WebCore.exp.in:
3174         * editing/ios/EditorIOS.mm:
3175         (WebCore::Editor::fontAttributesForSelectionStart):
3176
3177 2014-08-28  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
3178
3179         [GTK] Add WaylandEventSource
3180         https://bugs.webkit.org/show_bug.cgi?id=136213
3181
3182         Reviewed by Martin Robinson.
3183
3184         Add the WaylandEventSource class. Its static method, createEventSource(),
3185         creates a new GSource object that is attached to the main context and
3186         enables handling Wayland display events through the GLib's main loop.
3187
3188         The method will be called by the nested Wayland compositor during its
3189         initialization, which will also take the control over the ownership and
3190         will be tasked with properly removing the GSource from the main context.
3191
3192         GLibSource is a GSource-based struct that additionally holds a GPollFD object
3193         and the pointer to the wl_display object whose event loop we'll be
3194         dispatching during the GSource dispatch. This is the type that g_source_new
3195         uses when allocating the new GSource object.
3196
3197         The GSource is assigned the default priorty, can recurse, and is attached
3198         to the main context.
3199
3200         * PlatformGTK.cmake:
3201         * platform/graphics/wayland/WaylandEventSource.cpp: Added.
3202         (WebCore::GLibSource::initialize):
3203         (WebCore::GLibSource::check):
3204         (WebCore::GLibSource::dispatch):
3205         (WebCore::prepareCallback):
3206         (WebCore::checkCallback):
3207         (WebCore::dispatchCallback):
3208         (WebCore::WaylandEventSource::createDisplayEventSource):
3209         * platform/graphics/wayland/WaylandEventSource.h: Added.
3210
3211 2014-08-28  Chris Fleizach  <cfleizach@apple.com>
3212
3213         AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse
3214         https://bugs.webkit.org/show_bug.cgi?id=136333
3215
3216         Reviewed by David Kilzer.
3217
3218         If a Node is asked for it's Document when it's not actually in a document, it can lead to an assert/crash.
3219         We can avoid this by checking that the node is in a document before asking for its document.
3220
3221         I was not able to make a test case.      
3222
3223         * accessibility/AXObjectCache.cpp:
3224         (WebCore::AXObjectCache::clearTextMarkerNodesInUse):
3225
3226 2014-08-28  Andreas Kling  <akling@apple.com>
3227
3228         ASSERTION FAILED: !m_renderView.document().inPageCache() in compositing/iframes/resources/page-cache-helper.html
3229         <https://webkit.org/b/136329>
3230
3231         Cancel any pending compositing layer updates when moving a document
3232         into the page cache.
3233
3234         Reviewed by Zalan Bujtas.
3235
3236         * dom/Document.cpp:
3237         (WebCore::Document::documentWillSuspendForPageCache):
3238         * rendering/RenderLayerCompositor.cpp:
3239         (WebCore::RenderLayerCompositor::cancelCompositingLayerUpdate):
3240         * rendering/RenderLayerCompositor.h:
3241
3242 2014-08-28  Mihnea Ovidenie  <mihnea@adobe.com>
3243
3244         [CSSRegions] Incorrect selection clearing on a document without regions
3245         https://bugs.webkit.org/show_bug.cgi?id=134901
3246
3247         Reviewed by David Hyatt.
3248
3249         When we select all the content of document with named flows but without regions,
3250         the start and end points of selection is cached in RenderView. However, since
3251         the document has named flows, the selection is split between the subtrees. During the split,
3252         it is possible that the cached end-points of the original selection are not included
3253         in any of the resulting subtree selection and they are not marked accordingly.
3254         In order to process the selection clearing correctly, we have to take the original
3255         selection end-points into account.
3256
3257         Test: fast/regions/selection/select-all-without-regions.html
3258
3259         * rendering/RenderObject.cpp:
3260         (WebCore::RenderObject::isSelectionBorder):
3261
3262 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3263
3264         [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
3265         https://bugs.webkit.org/show_bug.cgi?id=136248
3266
3267         Reviewed by Gustavo Noronha Silva.
3268
3269         Move the code to update the SoupMessageHeaders to a new public
3270         method.
3271
3272         * platform/network/soup/ResourceResponse.h:
3273         * platform/network/soup/ResourceResponseSoup.cpp:
3274         (WebCore::ResourceResponse::updateSoupMessageHeaders):
3275         (WebCore::ResourceResponse::toSoupMessage):
3276
3277 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3278
3279         [GTK] Remove support for GTK+2 theme rendering
3280         https://bugs.webkit.org/show_bug.cgi?id=136285
3281
3282         Reviewed by Philippe Normand.
3283
3284         GTK+2 is only used by the plugin process that doesn't need to
3285         render html controls themed. Since the theme files are still
3286         built for WebCorePlatformGTK2, we need to provide dummy
3287         implementations for the pure virtual methods when
3288         GTK_API_VERSION_2 is defined.
3289
3290         * PlatformGTK.cmake: Remove deleted files from compilation.
3291         * platform/gtk/RenderThemeGtk.cpp:
3292         (WebCore::RenderThemeGtk::create):
3293         (WebCore::RenderTheme::themeForPage):
3294         (WebCore::getScreenDPI):
3295         (WebCore::RenderThemeGtk::systemFont):
3296         (WebCore::RenderThemeGtk::sliderTickSize):
3297         (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
3298         (WebCore::RenderThemeGtk::getScreenDPI): Deleted.
3299         * platform/gtk/RenderThemeGtk.h:
3300         * platform/gtk/RenderThemeGtk2.cpp: Removed.
3301         * platform/gtk/RenderThemeGtk3.cpp:
3302         * platform/gtk/ScrollbarThemeGtk.cpp:
3303         (WebCore::ScrollbarThemeGtk::hasThumb):
3304         (WebCore::ScrollbarThemeGtk::backButtonRect):
3305         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
3306         (WebCore::ScrollbarThemeGtk::trackRect):
3307         (WebCore::ScrollbarThemeGtk::registerScrollbar):
3308         (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
3309         (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
3310         * platform/gtk/ScrollbarThemeGtk.h:
3311         * platform/gtk/ScrollbarThemeGtk2.cpp: Removed.
3312         * platform/gtk/WidgetRenderingContext.cpp: Removed.
3313         * platform/gtk/WidgetRenderingContext.h: Removed.
3314
3315 2014-08-28  Zan Dobersek  <zdobersek@igalia.com>
3316
3317         Unreviewed GTK build fix for the Wayland windowing target after r173052.
3318
3319         * platform/graphics/wayland/WaylandSurface.cpp: Include the IntSize header.
3320         * platform/graphics/wayland/WaylandSurface.h: Forward-declare IntSize.
3321
3322 2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>
3323
3324         One more URTBF after r173047.
3325
3326         * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
3327         (webkitAccessibleComponentGetExtents):
3328
3329 2014-08-27  Iago Toral  <itoral@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
3330
3331         [GTK] Add WaylandSurface
3332         https://bugs.webkit.org/show_bug.cgi?id=136220
3333
3334         Reviewed by Martin Robinson.
3335
3336         Add the WaylandSurface class. An objects of this type is meant to be used
3337         by the LayerTreeHostGtk in the WebProcess and is constructed via the
3338         WaylandDisplay::createSurface() method.
3339
3340         LayerTreeHostGtk uses such object to perform frame requests to the nested
3341         Wayland compositor in the UIProcess, and to create the GLContextEGL object
3342         that's used during the layer flushing and compositing.
3343
3344         The resize() method is called whenever LayerTreeHostGtk is being resized,
3345         and basically only wraps the wl_egL_window_resize() call.
3346
3347         * PlatformGTK.cmake:
3348         * platform/graphics/wayland/WaylandSurface.cpp: Added.
3349         (WebCore::frameCallback):
3350         (WebCore::WaylandSurface::WaylandSurface):
3351         (WebCore::WaylandSurface::~WaylandSurface):
3352         (WebCore::WaylandSurface::resize):
3353         (WebCore::WaylandSurface::createGLContext):
3354         (WebCore::WaylandSurface::requestFrame):
3355         * platform/graphics/wayland/WaylandSurface.h: Added.
3356         (WebCore::WaylandSurface::surface):
3357         (WebCore::WaylandSurface::nativeWindowHandle):
3358
3359 2014-08-27  Csaba Osztrogonác  <ossy@webkit.org>
3360
3361         URTBF after r173047.
3362
3363         * accessibility/atk/WebKitAccessibleInterfaceImage.cpp:
3364         (webkitAccessibleImageGetImagePosition):
3365
3366 2014-08-27  Zalan Bujtas  <zalan@apple.com>
3367
3368         Subpixel layout: Cleanup snapSizeToPixel/snapSizeToDevicePixel.
3369         https://bugs.webkit.org/show_bug.cgi?id=136264
3370
3371         Reviewed by Simon Fraser.
3372         
3373         1. Align snapSizeToPixel()/snapSizeToDevicePixel() function names with the rest of snapping
3374         functions. ->snappedIntSize()/snapSizeToDevicePixel().
3375         2. Operate on LayoutSize/LayoutPoint instead of LayoutUnit/LayoutUnit to reflect functionality.
3376
3377         Covered by existing tests.
3378
3379         * platform/LayoutUnit.h:
3380         (WebCore::snapSizeToPixel): Deleted.
3381         (WebCore::snapSizeToDevicePixel): Deleted.
3382         * platform/graphics/LayoutPoint.h:
3383         (WebCore::snappedIntSize):
3384         (WebCore::snapSizeToDevicePixel):
3385         (WebCore::pixelSnappedIntSize): Deleted.
3386         * platform/graphics/LayoutRect.h:
3387         (WebCore::LayoutRect::pixelSnappedSize):
3388         (WebCore::LayoutRect::pixelSnappedWidth):
3389         (WebCore::LayoutRect::pixelSnappedHeight):
3390         (WebCore::pixelSnappedIntRect):
3391         (WebCore::pixelSnappedIntRectFromEdges):
3392         (WebCore::pixelSnappedForPainting):
3393         (WebCore::directionalPixelSnappedForPainting):
3394         * rendering/RenderBox.cpp:
3395         (WebCore::RenderBox::pixelSnappedClientWidth):
3396         (WebCore::RenderBox::pixelSnappedClientHeight):
3397         (WebCore::RenderBox::pixelSnappedOffsetWidth):
3398         (WebCore::RenderBox::pixelSnappedOffsetHeight):
3399         (WebCore::RenderBox::scrollWidth):
3400         (WebCore::RenderBox::scrollHeight):
3401         * rendering/RenderBoxModelObject.cpp:
3402         (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth):
3403         (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight):
3404         * rendering/RenderLayer.cpp:
3405         (WebCore::RenderLayer::updateLayerPosition):
3406         (WebCore::RenderLayer::scrollWidth):
3407         (WebCore::RenderLayer::scrollHeight):
3408         * rendering/RenderTreeAsText.cpp:
3409         (WebCore::writeLayers):
3410
3411 2014-08-27  Zalan Bujtas  <zalan@apple.com>
3412
3413         Subpixel layout: Rename LayoutRect's device pixel snapping functions.
3414         https://bugs.webkit.org/show_bug.cgi?id=136319
3415
3416         Reviewed by Simon Fraser.
3417
3418         From pixelSnappedForPainting() to snapRectToDevicePixels() and 
3419         pixelSnappedIntRect*() to snappedIntRect*().
3420
3421         No change in functionality.
3422
3423         * accessibility/AccessibilityObject.cpp:
3424         (WebCore::AccessibilityObject::boundingBoxForQuads):
3425         (WebCore::AccessibilityObject::isOnscreen):
3426         (WebCore::AccessibilityObject::scrollToMakeVisible):
3427         * accessibility/AccessibilityObject.h:
3428         (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect):