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