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