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