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