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