1 2015-06-25 Alex Christensen <achristensen@webkit.org>
3 [Content Extensions] Add a way to match a domain but not subdomains
4 https://bugs.webkit.org/show_bug.cgi?id=146241
5 rdar://problem/21557754
7 Reviewed by Darin Adler.
9 This patch makes it possible to have a trigger with an if-domain apply to sub2.sub1.webkit.org
10 but not sub1.webkit.org by making the domains default to only applying to the domain and not subdomains.
11 To make a domain apply to a domain and any subdomains, the domain must begin with a '*'.
13 * contentextensions/CombinedURLFilters.cpp:
14 (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
15 (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
16 Make domains apply only to the exact domain unless there is a * at the beginning,
17 in which case they apply to the domain and any subdomains.
19 2015-06-25 Simon Fraser <simon.fraser@apple.com>
21 [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
22 https://bugs.webkit.org/show_bug.cgi?id=146329
23 rdar://problem/21233010
25 Reviewed by Tim Horton.
27 Have the Compositing log channel dump the visible rect used for layer flushing.
29 * rendering/RenderLayerCompositor.cpp:
30 (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
32 2015-06-25 Brent Fulgham <bfulgham@apple.com>
34 [WIN] Enable WEB_TIMING API
35 https://bugs.webkit.org/show_bug.cgi?id=146330
36 <rdar://problem/21530765>
38 Reviewed by Dean Jackson.
40 Tested by internal HLS tests.
42 Enable WEB_TIMING features on Windows by activating the feature flag,
43 and correcting some build errors.
45 * platform/network/cf/ResourceHandleCFNet.cpp:
46 (WebCore::ResourceHandle::start): "setCollectionTimingData" is only
47 defined for PLATFORM(COCOA).
48 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
49 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
50 The 'ResourceHandle::getConnectionTimingData' method is only defined
53 2015-06-25 Dean Jackson <dino@apple.com>
55 Inline media controls disappear when returning a video to inline
56 https://bugs.webkit.org/show_bug.cgi?id=146328
57 <rdar://problem/21142862>
59 Reviewed by Tim Horton.
61 We were getting into a state where the controls were being
62 hidden via a timer while we were in fullscreen or on
63 another tab. Meanwhile, we could exit from such
64 a condition to a point where the controls were
65 not visible, but not completely removed from the DOM, confusing
66 the logic that decided whether to show them on tap.
68 * Modules/mediacontrols/mediaControlsApple.js:
69 (Controller.prototype.hideControls): If we are in the act of hiding
70 controls, we can clear any existing timers that are going to try
72 (Controller.prototype.resetHideControlsTimer): Make sure we null
73 out the hideTimer object, since we look at its value often to
74 decide whether or not a timer exists.
75 * Modules/mediacontrols/mediaControlsiOS.js:
76 (ControllerIOS.prototype.handlePlayButtonTouchEnd): If the user
77 taps play, then we should call showControls, which resets the hide
78 timers amongst other things. We need to do this due to the next change,
79 so that a timer started before we pressed play doesn't cause the
80 controls to instantly disappear as soon as we start playing.
81 (ControllerIOS.prototype.handleWrapperTouchStart): We can get into
82 the state where controls are invisible but still in the tree. Since the
83 controlsAreHidden() logic only looks for the latter, we need to also
84 look for invisible when the user taps for the controls. Yes, this
85 naming doesn't make much sense :(
87 2015-06-25 Joseph Pecoraro <pecoraro@apple.com>
89 [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
90 https://bugs.webkit.org/show_bug.cgi?id=146324
92 Reviewed by Timothy Hatcher.
94 * inspector/InspectorFrontendClient.h:
95 * inspector/InspectorFrontendClientLocal.h:
96 Do nothing or pass it up to the the frontend client.
98 * inspector/InspectorFrontendHost.h:
99 * inspector/InspectorFrontendHost.idl:
100 * inspector/InspectorFrontendHost.cpp:
101 (WebCore::InspectorFrontendHost::startWindowDrag):
102 Add a new host function to get native window dragging behavior.
104 2015-06-25 Tim Horton <timothy_horton@apple.com>
106 Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
107 https://bugs.webkit.org/show_bug.cgi?id=146322
108 <rdar://problem/21413884>
110 Reviewed by Simon Fraser.
112 * page/FrameView.cpp:
113 (WebCore::FrameView::viewportSizeForCSSViewportUnits):
114 Use the fixed layout size, if enabled, instead of the visibleContentRect,
115 for the viewport unit size. This ensures that viewport units take up the whole
116 fixed-layout viewport, not just the size of the view scaled by the page scale
117 (which visibleContentRect provides).
119 2015-06-25 Eric Carlson <eric.carlson@apple.com>
121 [Mac] AirPlay menu button still doesn't always show on page load
122 https://bugs.webkit.org/show_bug.cgi?id=146325
124 Reviewed by Dean Jackson.
126 * html/HTMLMediaElement.cpp:
127 (WebCore::HTMLMediaElement::mediaState): A player that can't currently play to a wireless
128 target does require target monitoring if an availability event listner has been registered,
129 otherwise we may not register for availability change notifications.
131 2015-06-25 Anders Carlsson <andersca@apple.com>
133 Stop using ScrollbarThemeClient and just use Scrollbar directly
134 https://bugs.webkit.org/show_bug.cgi?id=146320
136 Reviewed by Tim Horton.
138 * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
139 (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
140 * platform/ScrollableArea.cpp:
141 (WebCore::ScrollableArea::setScrollbarOverlayStyle):
142 * platform/Scrollbar.cpp:
143 (WebCore::Scrollbar::Scrollbar):
144 (WebCore::Scrollbar::~Scrollbar):
145 (WebCore::Scrollbar::offsetDidChange):
146 (WebCore::Scrollbar::updateThumb):
147 (WebCore::Scrollbar::paint):
148 (WebCore::thumbUnderMouse):
149 (WebCore::Scrollbar::autoscrollPressedPart):
150 (WebCore::Scrollbar::startTimerIfNeeded):
151 (WebCore::Scrollbar::moveThumb):
152 (WebCore::Scrollbar::setHoveredPart):
153 (WebCore::Scrollbar::setPressedPart):
154 (WebCore::Scrollbar::mouseMoved):
155 (WebCore::Scrollbar::mouseUp):
156 (WebCore::Scrollbar::mouseDown):
157 (WebCore::Scrollbar::setEnabled):
158 * platform/ScrollbarTheme.h:
159 (WebCore::ScrollbarTheme::updateEnabledState):
160 (WebCore::ScrollbarTheme::paint):
161 (WebCore::ScrollbarTheme::hitTest):
162 (WebCore::ScrollbarTheme::updateScrollbarOverlayStyle):
163 (WebCore::ScrollbarTheme::invalidateParts):
164 (WebCore::ScrollbarTheme::invalidatePart):
165 (WebCore::ScrollbarTheme::paintTickmarks):
166 (WebCore::ScrollbarTheme::shouldCenterOnThumb):
167 (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin):
168 (WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb):
169 (WebCore::ScrollbarTheme::thumbPosition):
170 (WebCore::ScrollbarTheme::thumbLength):
171 (WebCore::ScrollbarTheme::trackPosition):
172 (WebCore::ScrollbarTheme::trackLength):
173 (WebCore::ScrollbarTheme::registerScrollbar):
174 (WebCore::ScrollbarTheme::unregisterScrollbar):
175 * platform/ScrollbarThemeComposite.cpp:
176 (WebCore::ScrollbarThemeComposite::paint):
177 (WebCore::ScrollbarThemeComposite::hitTest):
178 (WebCore::ScrollbarThemeComposite::invalidatePart):
179 (WebCore::ScrollbarThemeComposite::splitTrack):
180 (WebCore::usedTotalSize):
181 (WebCore::ScrollbarThemeComposite::thumbPosition):
182 (WebCore::ScrollbarThemeComposite::thumbLength):
183 (WebCore::ScrollbarThemeComposite::minimumThumbLength):
184 (WebCore::ScrollbarThemeComposite::trackPosition):
185 (WebCore::ScrollbarThemeComposite::trackLength):
186 (WebCore::ScrollbarThemeComposite::thumbRect):
187 * platform/ScrollbarThemeComposite.h:
188 (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
189 (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
190 (WebCore::ScrollbarThemeComposite::paintScrollbarBackground):
191 (WebCore::ScrollbarThemeComposite::paintTrackBackground):
192 (WebCore::ScrollbarThemeComposite::paintTrackPiece):
193 (WebCore::ScrollbarThemeComposite::paintButton):
194 (WebCore::ScrollbarThemeComposite::paintThumb):
195 (WebCore::ScrollbarThemeComposite::constrainTrackRectToTrackPieces):
196 * platform/efl/ScrollbarThemeEfl.h:
197 * platform/gtk/ScrollbarThemeGtk.cpp:
198 (WebCore::ScrollbarThemeGtk::hasThumb):
199 (WebCore::ScrollbarThemeGtk::backButtonRect):
200 (WebCore::ScrollbarThemeGtk::forwardButtonRect):
201 (WebCore::ScrollbarThemeGtk::trackRect):
202 (WebCore::ScrollbarThemeGtk::registerScrollbar):
203 (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
204 (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
205 (WebCore::ScrollbarThemeGtk::thumbRect):
206 (WebCore::ScrollbarThemeGtk::paintTrackBackground):
207 (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
208 (WebCore::ScrollbarThemeGtk::paintThumb):
209 (WebCore::ScrollbarThemeGtk::paintButton):
210 (WebCore::ScrollbarThemeGtk::paint):
211 (WebCore::ScrollbarThemeGtk::shouldCenterOnThumb):
212 (WebCore::ScrollbarThemeGtk::buttonSize):
213 (WebCore::ScrollbarThemeGtk::minimumThumbLength):
214 * platform/gtk/ScrollbarThemeGtk.h:
215 (WebCore::ScrollbarThemeGtk::hasButtons):
216 * platform/ios/ScrollbarThemeIOS.h:
217 * platform/ios/ScrollbarThemeIOS.mm:
218 (WebCore::ScrollbarThemeIOS::registerScrollbar):
219 (WebCore::ScrollbarThemeIOS::unregisterScrollbar):
220 (WebCore::ScrollbarThemeIOS::hasButtons):
221 (WebCore::ScrollbarThemeIOS::hasThumb):
222 (WebCore::ScrollbarThemeIOS::backButtonRect):
223 (WebCore::ScrollbarThemeIOS::forwardButtonRect):
224 (WebCore::ScrollbarThemeIOS::trackRect):
225 (WebCore::ScrollbarThemeIOS::minimumThumbLength):
226 (WebCore::ScrollbarThemeIOS::shouldCenterOnThumb):
227 (WebCore::ScrollbarThemeIOS::paint):
228 * platform/mac/ScrollAnimatorMac.mm:
229 (scrollbarPainterForScrollbar):
230 (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
231 (-[WebScrollbarPartAnimation startAnimation]):
232 (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
233 (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
234 (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
235 (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
236 (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
237 (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
238 (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
239 (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
240 (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
241 (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
242 (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
243 (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
244 (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
245 (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
246 (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
247 (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
248 (WebCore::ScrollAnimatorMac::updateScrollerStyle):
249 * platform/mac/ScrollbarThemeMac.h:
250 * platform/mac/ScrollbarThemeMac.mm:
251 (WebCore::ScrollbarThemeMac::registerScrollbar):
252 (WebCore::ScrollbarThemeMac::unregisterScrollbar):
253 (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
254 (WebCore::ScrollbarThemeMac::painterForScrollbar):
255 (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
256 (WebCore::ScrollbarThemeMac::hasButtons):
257 (WebCore::ScrollbarThemeMac::hasThumb):
258 (WebCore::ScrollbarThemeMac::backButtonRect):
259 (WebCore::ScrollbarThemeMac::forwardButtonRect):
260 (WebCore::ScrollbarThemeMac::trackRect):
261 (WebCore::ScrollbarThemeMac::minimumThumbLength):
262 (WebCore::ScrollbarThemeMac::shouldCenterOnThumb):
263 (WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb):
264 (WebCore::ScrollbarThemeMac::updateEnabledState):
265 (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
266 (WebCore::ScrollbarThemeMac::paint):
267 * platform/mock/ScrollbarThemeMock.cpp:
268 (WebCore::ScrollbarThemeMock::trackRect):
269 (WebCore::ScrollbarThemeMock::paintTrackBackground):
270 (WebCore::ScrollbarThemeMock::paintThumb):
271 * platform/mock/ScrollbarThemeMock.h:
272 (WebCore::ScrollbarThemeMock::hasButtons): Deleted.
273 (WebCore::ScrollbarThemeMock::hasThumb): Deleted.
274 (WebCore::ScrollbarThemeMock::backButtonRect): Deleted.
275 (WebCore::ScrollbarThemeMock::forwardButtonRect): Deleted.
276 (WebCore::ScrollbarThemeMock::maxOverlapBetweenPages): Deleted.
277 (WebCore::ScrollbarThemeMock::isMockTheme): Deleted.
278 * platform/win/ScrollbarThemeSafari.cpp:
279 (WebCore::ScrollbarThemeSafari::hasButtons):
280 (WebCore::ScrollbarThemeSafari::hasThumb):
281 (WebCore::ScrollbarThemeSafari::backButtonRect):
282 (WebCore::ScrollbarThemeSafari::forwardButtonRect):
283 (WebCore::ScrollbarThemeSafari::trackRect):
284 (WebCore::ScrollbarThemeSafari::minimumThumbLength):
285 (WebCore::ScrollbarThemeSafari::shouldCenterOnThumb):
286 (WebCore::ScrollbarThemeSafari::paintTrackBackground):
287 (WebCore::ScrollbarThemeSafari::paintButton):
288 (WebCore::ScrollbarThemeSafari::paintThumb):
289 * platform/win/ScrollbarThemeSafari.h:
290 * platform/win/ScrollbarThemeWin.cpp:
291 (WebCore::ScrollbarThemeWin::hasThumb):
292 (WebCore::ScrollbarThemeWin::backButtonRect):
293 (WebCore::ScrollbarThemeWin::forwardButtonRect):
294 (WebCore::ScrollbarThemeWin::trackRect):
295 (WebCore::ScrollbarThemeWin::shouldCenterOnThumb):
296 (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
297 (WebCore::ScrollbarThemeWin::paintTrackBackground):
298 (WebCore::ScrollbarThemeWin::paintTrackPiece):
299 (WebCore::ScrollbarThemeWin::paintButton):
300 (WebCore::paintGripper):
301 (WebCore::ScrollbarThemeWin::paintThumb):
302 * platform/win/ScrollbarThemeWin.h:
303 * rendering/RenderScrollbar.h:
305 * rendering/RenderScrollbarPart.cpp:
306 (WebCore::RenderScrollbarPart::styleDidChange):
307 (WebCore::RenderScrollbarPart::imageChanged):
308 * rendering/RenderScrollbarTheme.cpp:
309 (WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis):
310 (WebCore::RenderScrollbarTheme::hasButtons):
311 (WebCore::RenderScrollbarTheme::hasThumb):
312 (WebCore::RenderScrollbarTheme::minimumThumbLength):
313 (WebCore::RenderScrollbarTheme::backButtonRect):
314 (WebCore::RenderScrollbarTheme::forwardButtonRect):
315 (WebCore::RenderScrollbarTheme::trackRect):
316 (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
317 (WebCore::RenderScrollbarTheme::willPaintScrollbar):
318 (WebCore::RenderScrollbarTheme::didPaintScrollbar):
319 (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
320 (WebCore::RenderScrollbarTheme::paintTrackBackground):
321 (WebCore::RenderScrollbarTheme::paintTrackPiece):
322 (WebCore::RenderScrollbarTheme::paintButton):
323 (WebCore::RenderScrollbarTheme::paintThumb):
324 (WebCore::RenderScrollbarTheme::paintTickmarks):
325 * rendering/RenderScrollbarTheme.h:
327 2015-06-24 Matt Rajca <mrajca@apple.com>
329 MediaSession: fall back to "content" kind when an unsupported media session kind is passed in
330 https://bugs.webkit.org/show_bug.cgi?id=146293
332 Reviewed by Eric Carlson.
334 * Modules/mediasession/MediaSession.cpp:
335 (WebCore::MediaSession::parseKind): Parse the media session kind to one of the four supported types.
336 (WebCore::MediaSession::MediaSession):
337 (WebCore::MediaSession::kind): Format the value as a string (which the JS bindings expect).
338 * Modules/mediasession/MediaSession.h: The media session kind is now stored as an enum rather than a string
339 since we only support a small, fixed number of values.
341 2015-06-25 Eric Carlson <eric.carlson@apple.com>
343 [Mac] Crash in WebCore::MediaPlayer::canPlayToWirelessPlaybackTarget
344 https://bugs.webkit.org/show_bug.cgi?id=146317
346 Reviewed by Brent Fulgham.
348 * html/HTMLMediaElement.cpp:
349 (WebCore::HTMLMediaElement::mediaState): NULL-check m_player before using it.
351 2015-06-25 Commit Queue <commit-queue@webkit.org>
353 Unreviewed, rolling out r185956.
354 https://bugs.webkit.org/show_bug.cgi?id=146321
356 Causes massive crashes on test bots (Requested by bfulgham on
361 "Enabling MEDIA_STREAM"
362 https://bugs.webkit.org/show_bug.cgi?id=145947
363 http://trac.webkit.org/changeset/185956
365 2015-06-25 Brent Fulgham <bfulgham@apple.com>
367 [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
368 https://bugs.webkit.org/show_bug.cgi?id=146302
369 <rdar://problem/19726553>
371 Reviewed by Eric Carlson.
373 Tested by existing media tests.
375 Update the AVFoundationCF version of 'supportsType' to more closely match the AVFoundation
376 version. Use this new code when the necessary AVFoundationCF functions are present.
378 * AVFoundationSupport.py: Check for presence of AVCFURLAssetIsPlayableExtendedMIMEType.
379 (fileContains): Added helper function.
380 * WebCore.vcxproj/WebCoreGenerated.vcxproj: Add AVFoundationSupport.py to project file to make
382 * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Ditto.
383 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
384 (WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType): Moved from ObjC version.
385 (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Ditto.
386 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
387 * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration.
388 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
389 (WebCore::avfMIMETypes): Added CF version of AVFoundation code.
390 (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Update to use new AVCF
391 method if it is available.
392 (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack): Handle case of a
393 null language locale. This is a drive-by fix of a bug found during testing.
394 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
395 (WebCore::isUnsupportedMIMEType): Deleted.
396 (WebCore::staticMIMETypeList): Deleted.
398 2015-06-25 Matthew Daiter <mdaiter@apple.com>
400 Enabling MEDIA_STREAM
401 https://bugs.webkit.org/show_bug.cgi?id=145947
402 <rdar://problem/21365829>
404 Reviewed by Brent Fulgham.
406 * Configurations/FeatureDefines.xcconfig:
407 * Modules/mediastream/UserMediaClient.h:
408 * WebCore.xcodeproj/project.pbxproj:
409 * platform/mediastream/mac/AVAudioCaptureSource.mm:
410 * platform/mock/UserMediaClientMock.h:
412 2015-06-25 Zalan Bujtas <zalan@apple.com>
414 Do not send touch events to the slider's thumb when it does not have a renderer.
415 https://bugs.webkit.org/show_bug.cgi?id=146307
416 rdar://problem/21539399
418 Reviewed by Simon Fraser.
420 Bail out early if either the touch target or the renderer() is null.
422 Test: fast/events/touch/input-range-with-thumb-display-none-crash.html
424 * html/shadow/SliderThumbElement.cpp:
425 (WebCore::findTouchWithIdentifier):
426 (WebCore::SliderThumbElement::handleTouchStart):
427 (WebCore::SliderThumbElement::handleTouchMove):
428 (WebCore::SliderThumbElement::handleTouchEndAndCancel):
430 2015-06-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
432 [Streams API] Implement HighWaterMark
433 https://bugs.webkit.org/show_bug.cgi?id=146235
435 Reviewed by Darin Adler.
437 Retrieval of HighWaterMark parameter from arguments passed to the ReadableStream JS constructor.
438 Retrieval of size function callback from arguments passed to the ReadableStream JS constructor.
439 Calling doPull() if buffer size is below HighWaterMark.
441 Covered by rebased tests.
443 * Modules/streams/ReadableStream.cpp:
444 (WebCore::ReadableStream::pull): Adding precise check for HWM.
445 * Modules/streams/ReadableStream.h: Introducing hasEnoughValues.
446 * bindings/js/ReadableJSStream.cpp:
447 (WebCore::getHighWaterMark): Utility routine to get properly HWM value.
448 (WebCore::ReadableJSStream::create): Retrieval of HWM and size function.
449 (WebCore::ReadableJSStream::ReadableJSStream):
450 * bindings/js/ReadableJSStream.h: Adding hasEnoughValues and desiredSize prototypes.
452 2015-06-25 Tim Horton <timothy_horton@apple.com>
454 Try to fix the iOS EWS build.
456 * platform/spi/cocoa/SecuritySPI.h:
458 2015-06-25 Carlos Garcia Campos <cgarcia@igalia.com>
460 [GTK] Empty gtk-font-name setting causes WebProcess crash rendering pages
461 https://bugs.webkit.org/show_bug.cgi?id=146246
463 Reviewed by Sergio Villar Senin.
465 Return early if system font is empty.
467 * rendering/RenderThemeGtk.cpp:
468 (WebCore::RenderThemeGtk::updateCachedSystemFontDescription):
470 2015-06-24 Chris Dumez <cdumez@apple.com>
472 Unreviewed, EFL build fix after r185940.
474 Members were initialized in wrong order.
476 * Modules/mediastream/MediaDeviceInfo.cpp:
477 (WebCore::MediaDeviceInfo::MediaDeviceInfo):
479 2015-06-24 Chris Dumez <cdumez@apple.com>
481 Unreviewed, Build fix after r185940.
483 Move implementation inside WebCore namespace.
485 * Modules/mediastream/MediaDeviceInfo.cpp:
487 2015-06-24 Chris Dumez <cdumez@apple.com>
489 Unreviewed, speculative GTK build fix after 185940.
491 Add new cpp file to CMakeLists.txt.
495 2015-06-24 Matt Daiter <mdaiter@apple.com>
497 Building MediaDeviceInfo for enumerateDevices
498 https://bugs.webkit.org/show_bug.cgi?id=146257
499 <rdar://problem/21513462>
501 Reviewed by Eric Carlson.
503 MediaDeviceInfo necessary for enumerateDevices
505 * CMakeLists.txt: Added MediaDevicesInfo.idl
506 * DerivedSources.make: Added MediaDevicesInfo.idl
507 * Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
508 (WebCore::MediaDeviceInfo::create): Allocates class
509 (WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
510 (WebCore::MediaDeviceInfo::~MediaDeviceInfo):
511 (WebCore::MediaDeviceInfo::label):
512 (WebCore::MediaDeviceInfo::deviceId):
513 (WebCore::MediaDeviceInfo::groupId):
514 (WebCore::MediaDeviceInfo::kind):
515 * Modules/mediastream/MediaDeviceInfo.idl:
516 * WebCore.xcodeproj/project.pbxproj:
518 2015-06-24 Anders Carlsson <andersca@apple.com>
520 Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
521 https://bugs.webkit.org/show_bug.cgi?id=146301
523 Reviewed by Tim Horton.
525 * WebCore.xcodeproj/project.pbxproj:
526 * platform/spi/cocoa/SecuritySPI.h:
528 2015-06-24 Said Abou-Hallawa <sabouhallawa@apple.com>
530 Add a new color -apple-wireless-playback-target-active
531 https://bugs.webkit.org/show_bug.cgi?id=146269
532 <rdar://problem/21465189>
534 Reviewed by Dean Jackson.
536 At the moment we use -apple-system-blue to indicate an Airplay route is
537 active. This might not always be blue, so we need to add another system
538 color with a name that will allow us to change the underlying color.
539 Initially -apple-wireless-playback-target-active will be an alias to
542 Existing tests are modified to include the new color value.
544 * Modules/mediacontrols/mediaControlsApple.js:
545 (Controller.prototype.updateWirelessTargetPickerButton):
546 * Modules/mediacontrols/mediaControlsiOS.css:
547 (video::-webkit-media-controls-wireless-playback-picker-button.playing):
548 Use the new color value in the media controls.
551 (WebCore::isAppleLegacyCssValueKeyword): Returns true if the value keyword
552 has an '-apple' prefix which has to be replaced by '-webkit'
554 (WebCore::cssValueKeywordID): Call a new function which handles all the
555 '-apple' legacy keywords.
557 * css/CSSValueKeywords.in: Define the new color keyword.
559 * rendering/RenderThemeIOS.mm:
560 (WebCore::RenderThemeIOS::systemColor):
561 * rendering/RenderThemeMac.mm:
562 (WebCore::RenderThemeMac::systemColor):
563 Define the value of the new color keyword to be an alias of systemBlueColor.
565 2015-06-24 Matt Rajca <mrajca@apple.com>
567 MediaSession: propagate MediaSessionMetadata to WebPageProxy
568 https://bugs.webkit.org/show_bug.cgi?id=146282
570 Reviewed by Darin Adler and Tim Horton.
572 * Modules/mediasession/MediaSession.cpp:
573 (WebCore::MediaSession::setMetadata):
575 2015-06-24 Chris Dumez <cdumez@apple.com>
577 Null dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
578 https://bugs.webkit.org/show_bug.cgi?id=146286
579 <rdar://problem/21523788>
581 Reviewed by Sam Weinig.
583 Add null check for the Page in areAllLoadersPageCacheAcceptable()
584 to fix this top crasher until I can investigate how this can happen.
586 * loader/DocumentLoader.cpp:
587 (WebCore::areAllLoadersPageCacheAcceptable):
589 2015-06-24 Anders Carlsson <andersca@apple.com>
591 Move PluginMainThreadScheduler to WebKit/win
592 https://bugs.webkit.org/show_bug.cgi?id=146289
594 Reviewed by Tim Horton.
597 * Configurations/WebCore.xcconfig:
598 * WebCore.vcxproj/WebCore.vcxproj:
599 * WebCore.vcxproj/WebCore.vcxproj.filters:
600 * WebCore.xcodeproj/project.pbxproj:
601 * plugins/PluginMainThreadScheduler.cpp:
602 (WebCore::PluginMainThreadScheduler::scheduler): Deleted.
603 (WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler): Deleted.
604 (WebCore::PluginMainThreadScheduler::scheduleCall): Deleted.
605 (WebCore::PluginMainThreadScheduler::registerPlugin): Deleted.
606 (WebCore::PluginMainThreadScheduler::unregisterPlugin): Deleted.
607 (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Deleted.
608 (WebCore::PluginMainThreadScheduler::dispatchCalls): Deleted.
609 (WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
610 * plugins/PluginMainThreadScheduler.h:
611 (WebCore::PluginMainThreadScheduler::Call::Call): Deleted.
612 (WebCore::PluginMainThreadScheduler::Call::performCall): Deleted.
614 2015-06-24 Dean Jackson <dino@apple.com>
616 Better fix for Element with blur backdrop-filter shows edge duplication and dark edges
617 https://bugs.webkit.org/show_bug.cgi?id=146287
618 <rdar://problem/21530437>
620 Reviewed by Simon Fraser.
622 There is no need to carry around a bit in FilterOperations indicating what
623 type of source property the object came from. Whether or not to clip to the
624 bounds of the filter region is purely a property of the type of CALayer
625 we are applying the filter to.
627 This basically reverts r185846.
629 Covered by the test for the previous commit.
631 * css/CSSPropertyNames.in:
632 * css/StyleBuilderConverter.h:
633 (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): Deleted.
634 * page/animation/CSSPropertyAnimation.cpp:
635 (WebCore::blendFilterOperations): Deleted.
636 * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Set the normalized
637 edges property if we are a CABackdropLayer.
638 * platform/graphics/filters/FilterOperations.cpp:
639 (WebCore::FilterOperations::operator==):
640 (WebCore::FilterOperations::operationsMatch):
641 (WebCore::FilterOperations::operator=): Deleted.
642 * platform/graphics/filters/FilterOperations.h:
643 (WebCore::FilterOperations::isUsedForBackdropFilters): Deleted.
644 (WebCore::FilterOperations::setUsedForBackdropFilters): Deleted.
646 2015-06-24 Doug Russell <d_russell@apple.com>
648 Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject
649 when posting a selection notification when on the border between two accessibilityObjects
650 https://bugs.webkit.org/show_bug.cgi?id=146177
652 Reviewed by Darin Adler.
654 Add support for position to be passed for selection changes to allow checking.
655 for boundaries in the case of ignored elements.
656 Add support for searching for unignored siblings of AccessibilityObjects.
657 Include AccessibilityObject wrappers in notifications for tests.
659 Test: platform/mac/accessibility/selection-element-tabbing-to-link.html
661 * accessibility/AXObjectCache.cpp:
662 (WebCore::AXObjectCache::postTextStateChangeNotification):
663 * accessibility/AXObjectCache.h:
664 * accessibility/AccessibilityObject.cpp:
665 (WebCore::AccessibilityObject::previousSiblingUnignored):
666 (WebCore::AccessibilityObject::nextSiblingUnignored):
667 * accessibility/AccessibilityObject.h:
668 * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
669 (isValueTypeSupported):
670 (arrayRemovingNonSupportedTypes):
671 (dictionaryRemovingNonSupportedTypes):
672 (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
673 * editing/mac/FrameSelectionMac.mm:
674 (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
676 2015-06-24 Anders Carlsson <andersca@apple.com>
678 Enable -Winconsistent-missing-override when building with Xcode
679 https://bugs.webkit.org/show_bug.cgi?id=146288
681 Reviewed by Sam Weinig.
683 * Configurations/Base.xcconfig:
684 * Modules/encryptedmedia/MediaKeySession.h:
685 * Modules/webdatabase/DatabaseTask.h:
686 * html/DateTimeLocalInputType.h:
687 * page/scrolling/ios/ScrollingCoordinatorIOS.h:
688 * page/scrolling/mac/ScrollingCoordinatorMac.h:
689 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
690 (WebCore::MediaPlayerPrivateAVFoundation::platformLayer): Deleted.
691 (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Deleted.
692 (WebCore::MediaPlayerPrivateAVFoundation::fileSize): Deleted.
693 (WebCore::MediaPlayerPrivateAVFoundation::engineDescription): Deleted.
694 (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): Deleted.
695 (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Deleted.
696 * platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
697 (WebCore::VideoTrackPrivateAVF::trackIndex): Deleted.
698 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
699 (WebCore::CDMSessionAVFoundationObjC::type): Deleted.
700 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
701 (WebCore::CDMSessionMediaSourceAVFObjC::type): Deleted.
702 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
703 (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsAcceleratedRendering): Deleted.
704 (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget): Deleted.
705 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
706 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Deleted.
707 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Deleted.
708 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Deleted.
709 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Deleted.
710 (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Deleted.
711 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
712 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Deleted.
713 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
714 (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Deleted.
715 (WebCore::MediaPlayerPrivateQTKit::networkState): Deleted.
716 (WebCore::MediaPlayerPrivateQTKit::readyState): Deleted.
717 (WebCore::MediaPlayerPrivateQTKit::maximumDurationToCacheMediaTime): Deleted.
718 (WebCore::MediaPlayerPrivateQTKit::engineDescription): Deleted.
719 * platform/mac/ScrollAnimatorMac.h:
720 * platform/mac/SerializedPlatformRepresentationMac.h:
721 (WebCore::SerializedPlatformRepresentationMac::platformType): Deleted.
722 * platform/mac/ThemeMac.h:
723 (WebCore::ThemeMac::controlRequiresPreWhiteSpace): Deleted.
724 * testing/MockCDM.cpp:
725 (WebCore::MockCDMSession::setClient): Deleted.
727 2015-06-24 Youenn Fablet <youenn.fablet@crf.canon.fr>
729 Improve JSDOMPromise callPromiseFunction naming
730 https://bugs.webkit.org/show_bug.cgi?id=146280
734 No change in behavior.
736 * bindings/js/JSDOMPromise.h:
737 (WebCore::callPromiseFunction):
739 2015-06-24 Tim Horton <timothy_horton@apple.com>
741 REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
742 <rdar://problem/21525376>
744 Reviewed by Sam Weinig.
746 * page/TextIndicator.cpp:
747 (WebCore::TextIndicator::createWithRange):
750 2015-06-24 Zalan Bujtas <zalan@apple.com>
752 Subpixel rendering: roundToDevicePixel() snaps to wrong value.
753 https://bugs.webkit.org/show_bug.cgi?id=146273
754 rdar://problem/18509840
756 Reviewed by Simon Fraser.
758 Due to the floating point approximate representation, we can't always produce
759 the correct snap value. This patch addresses the issue by removing redundant kFixedPointDenominator multiplication
760 and by changing the rounding in roundToDevicePixel() from float to double.
764 * platform/LayoutUnit.h:
765 (WebCore::roundToDevicePixel):
767 2015-06-23 Matt Rajca <mrajca@apple.com>
769 MediaSession: Support setting of metadata
770 https://bugs.webkit.org/show_bug.cgi?id=146253
772 Reviewed by Eric Carlson.
774 * Modules/mediasession/MediaSession.cpp:
775 (WebCore::MediaSession::MediaSession): Store a reference to the document so we can use it in setMetadata.
776 (WebCore::MediaSession::setMetadata): Implemented as described in the Media Session spec.
777 * Modules/mediasession/MediaSession.h:
778 * Modules/mediasession/MediaSession.idl: Added the setMetadata method.
779 * Modules/mediasession/MediaSessionMetadata.h:
780 (WebCore::MediaSessionMetadata::MediaSessionMetadata): Added to keep track of media session metadata.
781 (WebCore::MediaSessionMetadata::title):
782 (WebCore::MediaSessionMetadata::artist):
783 (WebCore::MediaSessionMetadata::album):
784 (WebCore::MediaSessionMetadata::artworkURL):
785 * WebCore.xcodeproj/project.pbxproj: Added MediaSessionMetadata.h.
787 2015-06-24 Daniel Bates <dabates@apple.com>
789 Content Security Policy error message when frame load is blocked does not read well
790 https://bugs.webkit.org/show_bug.cgi?id=146279
792 Reviewed by Csaba Osztrogonác.
794 Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
795 emitted when the Content Security Policy of the page blocks a frame load.
797 * page/ContentSecurityPolicy.cpp:
798 (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
800 2015-06-11 Sergio Villar Senin <svillar@igalia.com>
802 intrinsic size keywords don't work for heights
803 https://bugs.webkit.org/show_bug.cgi?id=113610
805 Reviewed by Darin Adler.
807 Based on Blink's r148314 & r150355 by <cbiesinger@chromium.org>.
809 Adds intrinsic values support to heigh & min/max-height. This involves the
811 - RenderBox needs to pass the content height through to computeLogicalHeight and
812 related functions, which needs it to resolve max-content, et. al.
813 - Make the callers pass the content height to this function. Some callers pass
814 logicalHeight() (adjusted for border/padding) which works because if
815 logicalHeight is not the content height, then it is the height we ended up using,
816 so the constrain* functions will just constrain to that value again.
817 - Parsing code needs to be adjusted to support intrinsic values for heights.
819 Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
820 fast/css-intrinsic-dimensions/height-css-tables.html
821 fast/css-intrinsic-dimensions/height-flexbox.html
822 fast/css-intrinsic-dimensions/height-positioned-replaced.html
823 fast/css-intrinsic-dimensions/height-positioned.html
824 fast/css-intrinsic-dimensions/height-replaced.html
825 fast/css-intrinsic-dimensions/height-tables-collapsed.html
826 fast/css-intrinsic-dimensions/height-tables.html
827 fast/css-intrinsic-dimensions/height.html
830 (WebCore::CSSParser::isValidSize): Refactored from validateWidth and
832 (WebCore::CSSParser::parseValue):
833 (WebCore::CSSParser::validateWidth): Deleted.
834 (WebCore::CSSParser::validateHeight): Deleted.
837 (WebCore::Length::isFillAvailable):
838 (WebCore::Length::isFitContent):
839 * rendering/RenderBox.cpp:
840 (WebCore::RenderBox::constrainLogicalHeightByMinMax):
841 (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
842 (WebCore::RenderBox::computeLogicalHeight):
843 (WebCore::RenderBox::computeLogicalHeightUsing):
844 (WebCore::RenderBox::computeContentLogicalHeight):
845 (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
846 (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
847 (WebCore::RenderBox::computePercentageLogicalHeight):
848 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
849 (WebCore::RenderBox::availableLogicalHeight):
850 (WebCore::RenderBox::availableLogicalHeightUsing):
851 (WebCore::RenderBox::computePositionedLogicalHeight):
852 (WebCore::RenderBox::computePositionedLogicalHeightUsing):
853 * rendering/RenderBox.h:
854 * rendering/RenderFlexibleBox.cpp:
855 (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
856 (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
857 * rendering/RenderFlowThread.cpp:
858 (WebCore::RenderFlowThread::addForcedRegionBreak):
859 * rendering/RenderGrid.cpp:
860 (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
861 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
862 * rendering/RenderMultiColumnSet.cpp:
863 (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
864 * rendering/RenderReplaced.cpp:
865 (WebCore::RenderReplaced::hasReplacedLogicalHeight):
866 * rendering/RenderTable.cpp:
867 (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
868 (WebCore::RenderTable::layout):
870 2015-06-24 Commit Queue <commit-queue@webkit.org>
872 Unreviewed, rolling out r185906.
873 https://bugs.webkit.org/show_bug.cgi?id=146276
875 MSVC doesn't yet provide a const-qualified std::array<T,
876 N>::size(), failing to compile the static_assert (Requested by
877 zdobersek on #webkit).
881 "Improve the source code generated by make_names.pl"
882 https://bugs.webkit.org/show_bug.cgi?id=146208
883 http://trac.webkit.org/changeset/185906
885 2015-06-24 Zan Dobersek <zdobersek@igalia.com>
887 Improve the source code generated by make_names.pl
888 https://bugs.webkit.org/show_bug.cgi?id=146208
890 Reviewed by Darin Adler.
892 Clean up and optimize the output that's generated by the make_names.pl script
893 when generating large sets of DOM names for attributes and tags.
895 The GenerateStrings() function in the StaticString.pm module is split into
896 GenerateStringData() and GenerateASCIILiteral() so that the two new functions
897 can be used independently, with the original function still being called when
898 generating font names.
900 Tags and attributes have the corresponding static QualifiedName globals defined
901 as before. After that, two static const std::array<> objects are defined for
902 both types -- the first is an ordered array of addresses of the QualifiedName
903 objects (corresponding to the C array that was defined in getHTMLTags(),
904 getSVGAttrs() etc.), and the second is an ordered array of StringImpl::StaticASCIILiteral
905 objects that replaces separately defined StringImpl::StaticASCIILiteral objects
906 and the additional tables that contained pairs of QualifiedName object addresses
907 and the corresponding StaticASCIILiteral object references in the init() function.
908 This is all generated by the printStaticData() function in make_names.pl.
910 The printQualifiedNameCreation() function generates a static_assert() that ensures
911 that the corresponding std::array<QualifiedName*> and std::array<StaticASCIILiteral>
912 objects have the same amount of items, and then sets up a loop that walks through
913 the two arrays and properly constructs the QualifiedName objects from the static
916 On the GTK port, this shaves off ~54kB from the final stripped shared library
917 on a 64-bit build, and ~21kB on a 32-bit build.
919 * bindings/scripts/StaticString.pm:
920 (GenerateStringData):
921 (GenerateASCIILiteral):
927 (printQualifiedNameCreation):
928 (printInit): Deleted.
929 (printDefinitions): Deleted.
931 2015-06-24 Youenn Fablet <youenn.fablet@crf.canon.fr>
933 Refactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and legacy webkitGetUserMedia
934 https://bugs.webkit.org/show_bug.cgi?id=146237
936 Reviewed by Darin Adler.
938 Covered by existing tests, no change in behavior.
940 * Modules/mediastream/MediaConstraintsImpl.cpp:
941 (WebCore::MediaConstraintsImpl::create): Simplified error handling by removing exception code parameter.
942 * Modules/mediastream/MediaConstraintsImpl.h: Ditto.
943 * Modules/mediastream/MediaDevices.cpp:
944 (WebCore::MediaDevices::getUserMedia): Removed code now in UserMediaRequest::start.
945 * Modules/mediastream/NavigatorUserMedia.cpp:
946 (WebCore::NavigatorUserMedia::webkitGetUserMedia): Ditto.
947 * Modules/mediastream/UserMediaRequest.cpp:
948 (WebCore::parseOptions): Simplified error handling by removing exception code parameter.
949 (WebCore::UserMediaRequest::start): Renamed create in start and added common code.
950 * Modules/mediastream/UserMediaRequest.h:
952 2015-06-23 Andreas Kling <akling@apple.com>
954 Should reduce tile coverage for the first paint after a tab switch.
955 <https://webkit.org/b/146252>
956 <rdar://problem/19821583>
958 Reviewed by Darin Adler.
960 Reduce the number of tiles we need to paint after switching tabs,
961 to shorten the time it takes before we can flush pixels to screen.
963 We accomplish this by piggybacking on the "speculative tiling enabled"
964 mode of FrameView, which was previously only used to throttle painting
965 and layer flushes during page load.
967 When a FrameView becomes visible, which is what happens when you
968 switch to its tab, we revert the speculative tiling optimization to
969 its initial state, and reset the "scrolled by user" flag.
971 In practice this means that after switching tabs, we only generate
972 enough tiles to fill the viewport. Then, after 500ms has passed
973 or the user scrolls the page, we go back to the usual speculative
976 * page/FrameView.cpp:
977 (WebCore::FrameView::show):
979 2015-06-23 Anders Carlsson <andersca@apple.com>
981 Remove windowResizerRect code, nobody is using it anymore
982 https://bugs.webkit.org/show_bug.cgi?id=146265
984 Reviewed by Beth Dakin.
986 * loader/EmptyClients.h:
988 (WebCore::Chrome::windowResizerRect): Deleted.
990 * page/ChromeClient.h:
991 * page/FrameView.cpp:
992 (WebCore::FrameView::windowResizerRect): Deleted.
994 * platform/ScrollView.cpp:
995 (WebCore::ScrollView::ScrollView): Deleted.
996 (WebCore::ScrollView::windowResizerRectChanged): Deleted.
997 (WebCore::ScrollView::containsScrollbarsAvoidingResizer): Deleted.
998 (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): Deleted.
999 (WebCore::ScrollView::setParent): Deleted.
1000 * platform/ScrollView.h:
1001 (WebCore::ScrollView::windowResizerRect): Deleted.
1002 * platform/Scrollbar.cpp:
1003 (WebCore::Scrollbar::Scrollbar): Deleted.
1004 (WebCore::Scrollbar::setFrameRect): Deleted.
1005 (WebCore::Scrollbar::setParent): Deleted.
1006 * platform/Scrollbar.h:
1008 2015-06-23 Dean Jackson <dino@apple.com>
1010 Media controls are missing the white backdrop in UIWebViews
1011 https://bugs.webkit.org/show_bug.cgi?id=146251
1012 <rdar://problem/20181345>
1014 Reviewed by Simon Fraser.
1016 Implement two new CALayer subclasses that explicitly set
1017 something that resembles the system appearance for
1018 media-controls-dark-bar-background and media-controls-light-bar-background.
1019 This way, WebKit1 clients get a visible result.
1021 Creating the actual system recipes is tracked by:
1022 https://bugs.webkit.org/show_bug.cgi?id=146250
1024 * WebCore.xcodeproj/project.pbxproj: Add new files.
1025 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1026 (PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
1027 the appropriate layer types.
1028 * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
1029 * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
1030 (-[WebLightSystemBackdropLayer init]):
1031 (-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
1032 (-[WebDarkSystemBackdropLayer init]):
1033 (-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.
1035 2015-06-18 Matt Rajca <mrajca@apple.com>
1037 Support releasing media sessions
1038 https://bugs.webkit.org/show_bug.cgi?id=146132
1040 Reviewed by Darin Adler.
1042 * Modules/mediasession/MediaSession.cpp: Implemented as described in the Media Session spec.
1043 (WebCore::MediaSession::releaseSession):
1044 (WebCore::MediaSession::releaseInternal):
1045 * Modules/mediasession/MediaSession.h:
1047 2015-06-23 Chris Fleizach <cfleizach@apple.com>
1049 AX: iOS: VoiceOver and ARIA: has popup property not announced
1050 https://bugs.webkit.org/show_bug.cgi?id=146188
1052 Reviewed by Darin Adler.
1054 Expose the existing "has popup" property to the iOS Accessibility API.
1056 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1057 (-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
1059 2015-06-23 Javier Fernandez <jfernandez@igalia.com>
1061 [CSS Grid Layout] Performance optimization: avoid computing overflow alignment if not needed
1062 https://bugs.webkit.org/show_bug.cgi?id=146231
1064 Reviewed by Sergio Villar Senin.
1066 We don't need to apply any overflow handling if alignment value don't have a potential
1067 risk of data loss, as it's the case of 'start' value.
1069 This patch avoid computing the overflow in all the cases, since it adds an unneeded
1070 overhead which affects performance.
1072 New code improves performance around 3%-8%, depending on the grid tests.
1074 No new tests, no new funcitonality.
1076 * rendering/RenderGrid.cpp:
1077 (WebCore::RenderGrid::rowPositionForChild):
1078 (WebCore::RenderGrid::columnPositionForChild):
1080 2015-06-23 Youenn Fablet <youenn.fablet@crf.canon.fr>
1082 MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
1083 https://bugs.webkit.org/show_bug.cgi?id=146200
1085 Reviewed by Darin Adler.
1087 Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
1088 Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
1089 Removed MediaDevices.getUserMedia custom binding.
1091 Covered by existing tests.
1093 * CMakeLists.txt: Removing custom binding.
1094 * Modules/mediastream/MediaDevices.cpp:
1095 (WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
1096 * Modules/mediastream/MediaDevices.h: Ditto.
1097 * Modules/mediastream/MediaDevices.idl: Removing custom binding.
1098 * Modules/mediastream/NavigatorUserMedia.cpp:
1099 (WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
1100 * Modules/mediastream/UserMediaRequest.cpp:
1101 (WebCore::UserMediaRequest::create): Moving from callback to promise.
1102 (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
1103 (WebCore::UserMediaRequest::didCreateStream): Ditto.
1104 (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
1105 (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
1106 * Modules/mediastream/UserMediaRequest.h: Ditto.
1107 * bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
1108 (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
1109 (WebCore::Error>::resolve):
1110 (WebCore::Error>::reject):
1111 * bindings/js/JSMediaDevicesCustom.cpp: Removed.
1112 * bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.
1114 2015-06-23 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1116 [Streams API] Implement ReadableStream js source "'cancel" callback
1117 https://bugs.webkit.org/show_bug.cgi?id=146204
1119 Reviewed by Darin Adler.
1121 Calling "cancel" JS function when web app is cancelling a JS readable stream.
1122 Handling of promise returned value in case of async cancel.
1124 Covered by rebased tests.
1126 * bindings/js/ReadableJSStream.cpp:
1127 (WebCore::ReadableJSStream::invoke): Refactoring to pass cancel reason or controller to the JS function.
1128 (WebCore::ReadableJSStream::doStart): Ditto.
1129 (WebCore::startReadableStreamAsync): Renaming readableStream as protectedStream.
1130 (WebCore::createPullResultFulfilledFunction): Ditto.
1131 (WebCore::ReadableJSStream::doPull): Refactoring to pass cancel reason or controller to the JS function.
1132 (WebCore::createCancelResultFulfilledFunction): Cancel promise fullfil callback.
1133 (WebCore::createCancelResultRejectedFunction): Cancel promise reject callback.
1134 (WebCore::ReadableJSStream::doCancel): Calling cancel JS callback and handling promise returned value.
1135 * bindings/js/ReadableJSStream.h: Refactoring to pass cancel reason or controller to the JS function.
1137 2015-06-22 Ryuan Choi <ryuan.choi@navercorp.com>
1139 [EFL] Hyphenation is not supported
1140 https://bugs.webkit.org/show_bug.cgi?id=89830
1142 Reviewed by Gyuyoung Kim.
1144 Share libHyphen backend of GTK port.
1146 Rebased fast/text/hyphenate-*.html
1148 * PlatformEfl.cmake:
1149 * PlatformGTK.cmake:
1150 * platform/efl/FileSystemEfl.cpp:
1151 (WebCore::listDirectory): Deleted because of lack of functionality.
1152 eina_file_ls returns full directory path so fnmatch fails to check dict file.
1153 This patch reuse Posix implementation instead of EFL port specific function.
1154 * platform/posix/FileSystemPOSIX.cpp: Ditto.
1155 * platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
1156 * platform/text/hyphen/HyphenationLibHyphen.cpp:
1157 Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
1158 (WebCore::scanTestDictionariesDirectoryIfNecessary):
1159 Added PLATFORM guard and EFL implementation for the test directory
1161 2015-06-22 Chris Dumez <cdumez@apple.com>
1163 [WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
1164 https://bugs.webkit.org/show_bug.cgi?id=146228
1165 <rdar://problem/15179262>
1167 Reviewed by Daniel Bates.
1169 Add Geolocation::resetIsAllowed() API that merely resets
1170 m_allowGeolocation to Unknown, so that we will request the permission
1171 again the next time a position is requested.
1173 * Modules/geolocation/Geolocation.h:
1174 (WebCore::Geolocation::resetIsAllowed):
1176 2015-06-22 Simon Fraser <simon.fraser@apple.com>
1178 ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
1179 https://bugs.webkit.org/show_bug.cgi?id=146225
1181 Reviewed by Zalan Bujtas.
1183 Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
1184 been updated; this happens to work most of the time because painting updates them,
1185 but if incremental rendering is suppressed, we may not have painted yet.
1187 Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.
1189 * rendering/RenderLayer.cpp:
1190 (WebCore::RenderLayer::hitTest):
1191 (WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
1192 dirty bits is cheaper than calling isStackingContext().
1194 2015-06-22 Dean Jackson <dino@apple.com>
1196 Rename PlatformCA*Mac to PlatformCA*Cocoa
1197 https://bugs.webkit.org/show_bug.cgi?id=146224
1198 <rdar://problem/21497182>
1200 Reviewed by Simon Fraser.
1202 Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
1203 to the more accurate Cocoa suffix.
1205 * WebCore.xcodeproj/project.pbxproj:
1206 * page/mac/ServicesOverlayController.mm:
1207 * platform/graphics/ca/GraphicsLayerCA.cpp:
1208 * platform/graphics/ca/PlatformCAAnimation.h:
1209 * platform/graphics/ca/PlatformCALayer.h:
1210 * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
1211 * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
1212 * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
1213 * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
1214 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
1215 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
1216 * platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
1217 * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
1218 * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
1219 * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1220 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
1221 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1222 * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
1224 2015-06-22 Alex Christensen <achristensen@webkit.org>
1226 [cssjit] Disable compiling scrollbar pseudoclass selectors
1227 https://bugs.webkit.org/show_bug.cgi?id=146220
1229 Reviewed by Benjamin Poulain.
1231 * cssjit/SelectorCompiler.cpp:
1232 (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
1233 Don't compile selectors with scrollbar pseudoclasses.
1235 2015-06-22 Simon Fraser <simon.fraser@apple.com>
1237 -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
1238 https://bugs.webkit.org/show_bug.cgi?id=146218
1239 rdar://problem/21127840
1241 Reviewed by Zalan Bujtas.
1243 The clip path is computed using the RenderLayer's bounding box, so needs to be offset
1244 by the offsetFromRenderer when set on the mask layer.
1246 Test: compositing/masks/compositing-clip-path-origin.html
1248 * rendering/RenderLayerBacking.cpp:
1249 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
1251 2015-06-22 Michael Catanzaro <mcatanzaro@igalia.com>
1253 Web sockets should be treated as active mixed content
1254 https://bugs.webkit.org/show_bug.cgi?id=140624
1256 Reviewed by Sam Weinig.
1258 Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
1259 http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html
1261 * Modules/websockets/WebSocket.cpp:
1262 (WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
1263 emit the onerror event after doing so.
1264 * platform/SchemeRegistry.cpp:
1265 (WebCore::secureSchemes): Add wss:// to the list of secure schemes.
1267 2015-06-22 Dean Jackson <dino@apple.com>
1269 Element with blur backdrop-filter shows edge duplication and dark edges
1270 https://bugs.webkit.org/show_bug.cgi?id=146215
1271 <rdar://problem/20367695>
1273 Reviewed by Tim Horton.
1275 The input images to backdrop filters should duplicate their edge pixels
1276 outwards, rather than using transparent pixels. This is a flag we
1277 set on the Gaussian blur, but means we have to remember if the
1278 FilterOperations list came from a regular filter or a backdrop filter.
1280 Test: css3/filters/backdrop/blur-input-bounds.html
1282 * css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
1283 * css/StyleBuilderConverter.h:
1284 (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
1285 that sets the backdrop flag, but is otherwise the same as a normal filter
1287 * page/animation/CSSPropertyAnimation.cpp:
1288 (WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
1290 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
1291 key on the CAFilter if necessary.
1292 * platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
1293 these operations are intended for backdrops.
1294 (WebCore::FilterOperations::operator=):
1295 (WebCore::FilterOperations::operator==):
1296 * platform/graphics/filters/FilterOperations.h:
1297 (WebCore::FilterOperations::isUsedForBackdropFilters):
1298 (WebCore::FilterOperations::setUsedForBackdropFilters):
1300 2015-06-22 Tim Horton <timothy_horton@apple.com>
1302 [TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
1303 https://bugs.webkit.org/show_bug.cgi?id=146214
1304 <rdar://problem/20782970>
1306 Reviewed by Dean Jackson.
1308 * page/mac/TextIndicatorWindow.mm:
1309 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
1310 (WebCore::TextIndicatorWindow::setTextIndicator):
1311 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
1312 When the WebView is at a nonintegral position, we can end up needing a TextIndicator
1313 with a nonintegral position. We need to round the window position, so we need to apply
1314 the fractional part to the indicator layers inside, not to the window.
1316 2015-06-22 Myles C. Maxfield <mmaxfield@apple.com>
1318 [iOS] Arabic text styled with Georgia is rendered as boxes
1319 https://bugs.webkit.org/show_bug.cgi?id=145681
1320 <rdar://problem/21169844>
1322 Reviewed by Darin Adler.
1324 Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
1325 TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
1326 of using TimesNewRomanPSMT, we will simply just use GeezaPro.
1328 Test: fast/text/arabic-times-new-roman.html
1330 * platform/graphics/ios/FontCacheIOS.mm:
1331 (WebCore::FontCache::systemFallbackForCharacters):
1332 * platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
1333 * platform/graphics/cocoa/FontCocoa.mm:
1334 (WebCore::fontFamilyShouldNotBeUsedForArabic):
1336 2015-06-22 Alex Christensen <achristensen@webkit.org>
1338 Unreviewed non-mac debug build fix after r185840.
1340 * loader/ResourceLoader.cpp:
1341 (WebCore::ResourceLoader::willSendRequest):
1342 Added enable flag around assertion.
1344 2015-06-20 Alex Christensen <achristensen@webkit.org>
1346 [Content Extensions] Add SPI to reload without content blocking.
1347 https://bugs.webkit.org/show_bug.cgi?id=146128
1348 rdar://problem/20351903
1350 Reviewed by Sam Weinig.
1352 * html/HTMLMediaElement.cpp:
1353 (WebCore::HTMLMediaElement::loadResource):
1354 * loader/ResourceLoader.cpp:
1355 (WebCore::ResourceLoader::willSendRequest):
1356 * loader/cache/CachedResourceLoader.cpp:
1357 (WebCore::CachedResourceLoader::requestResource):
1358 * page/DOMWindow.cpp:
1359 (WebCore::DOMWindow::open):
1361 (WebCore::Page::userContentController):
1362 (WebCore::Page::userContentExtensionsEnabled):
1363 (WebCore::Page::setUserContentExtensionsEnabled):
1364 (WebCore::Page::group):
1365 * page/UserContentController.cpp:
1366 (WebCore::UserContentController::removeAllUserContentExtensions):
1367 (WebCore::UserContentController::processContentExtensionRulesForLoad):
1368 (WebCore::UserContentController::actionsForResourceLoad):
1369 * page/UserContentController.h:
1371 2015-06-22 Zalan Bujtas <zalan@apple.com>
1373 REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
1374 https://bugs.webkit.org/show_bug.cgi?id=146116
1375 rdar://problem/20959369
1377 Reviewed by Brent Fulgham.
1379 This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.
1381 When multiple selection roots are present we need to ensure that a RenderObject
1382 only shows up in one of them.
1383 RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
1384 selection and sets the selection range (start/end) on each selection root.
1385 However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
1386 based on visible selection and that could end up collecting renderers as selection start/end
1387 from another selection subtree.
1388 RenderObject's holds the last selection state (RenderObject::setSelectionState).
1389 If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
1390 we can't clean up selections properly when this object gets destroyed.
1391 One of the roots ends up with a dangling RenderObject pointer.
1393 Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html
1395 * rendering/SelectionSubtreeRoot.cpp:
1396 (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
1398 2015-06-22 Jeremy Jones <jeremyj@apple.com>
1400 Do not exit fullscreen when starting PiP since this is done automatically.
1401 https://bugs.webkit.org/show_bug.cgi?id=144871
1403 Reviewed by Darin Adler.
1405 Since we don't explicitly exit fullscreen, update state in shouldExitFullscreenWithReason()
1407 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare shouldExitFullscreenWithReason().
1408 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1409 (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Forward to WebVideoFullscreenInterfaceAVKit.
1410 (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Added.
1411 (WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Remove enter fullscreen code.
1412 * platform/spi/cocoa/AVKitSPI.h: Add missing enums.
1414 2015-06-22 Daniel Bates <dabates@apple.com>
1416 AX: UI Automation cannot find AutoFill or search cancel buttons
1417 https://bugs.webkit.org/show_bug.cgi?id=145241
1418 <rdar://problem/21051411>
1420 Reviewed by Chris Fleizach.
1422 Add support for hit testing the search cancel button and AutoFill button so that
1423 they can be accessed by UI Automation.
1425 Currently the accessibility hit test machinery ignores nodes in a shadow tree.
1426 So, it neither finds the <input type="search"> cancel button nor the AutoFill button
1427 when it performs a hit test. Therefore these buttons cannot be accessed using
1430 Tests: accessibility/hit-test-input-auto-fill-button.html
1431 accessibility/hit-test-input-search-cancel-button.html
1432 accessibility/input-search-cancel-button.html
1434 * accessibility/AccessibilityRenderObject.cpp:
1435 (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Added; returns
1436 the AccessibilityObject for the search cancel button or AutoFill text field decoration as applicable.
1437 (WebCore::AccessibilityRenderObject::accessibilityHitTest): Check whether the hit node
1438 is a text field decoration.
1440 2015-06-22 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1442 [Streams API] Implement ReadableStream cancel (abstract part)
1443 https://bugs.webkit.org/show_bug.cgi?id=146111
1445 Reviewed by Darin Adler.
1447 This patch implements ReadableStream and ReadableStreamReader cancel.
1448 The reader delegates cancellation to its stream.
1450 This patch also ensures that controller.close() will not throw in case cancellation is on-going.
1452 A follow-up patch will implement the calling of 'cancel' JS callback for JS sources.
1454 Covered by rebased tests.
1456 * Modules/streams/ReadableStream.cpp:
1457 (WebCore::ReadableStream::cancel): Checks whether locked or not before cancelling.
1458 (WebCore::ReadableStream::cancelNoCheck): Cancel without lock check.
1459 (WebCore::ReadableStream::notifyCancelSucceeded): Async cancel callback.
1460 (WebCore::ReadableStream::notifyCancelFailed): Ditto.
1461 * Modules/streams/ReadableStream.h:
1462 * Modules/streams/ReadableStream.idl: Cleaned up IDL.
1463 * Modules/streams/ReadableStreamReader.cpp:
1464 (WebCore::ReadableStreamReader::cancel):
1465 * Modules/streams/ReadableStreamReader.h:
1466 * Modules/streams/ReadableStreamReader.idl: Cleaned up IDL
1467 * bindings/js/JSReadableStreamControllerCustom.cpp:
1468 (WebCore::JSReadableStreamController::close):
1469 * bindings/js/JSReadableStreamCustom.cpp:
1470 (WebCore::JSReadableStream::cancel):
1471 * bindings/js/JSReadableStreamReaderCustom.cpp:
1472 (WebCore::JSReadableStreamReader::cancel):
1473 * bindings/js/ReadableJSStream.cpp:
1474 (WebCore::ReadableJSStream::doCancel):
1475 * bindings/js/ReadableJSStream.h:
1477 2015-06-22 Adam Bergkvist <adam.bergkvist@ericsson.com>
1479 WebRTC: Navigator.webkitGetUserMedia() requires three arguments
1480 https://bugs.webkit.org/show_bug.cgi?id=146022
1482 Reviewed by Eric Carlson.
1484 Updated custom binding to make the third error callback argument
1485 mandatory. Updated and unskipped three tests (for the GTK+ port).
1487 * bindings/js/JSNavigatorCustom.cpp:
1488 (WebCore::JSNavigator::webkitGetUserMedia):
1490 2015-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
1492 Unreviewed. Fix GTK+ build after r185818.
1494 Actually rollout r185320.
1496 * platform/network/soup/DNSSoup.cpp:
1497 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1498 (WebCore::DNSResolveQueue::platformResolve):
1499 (WebCore::gotProxySettingsCallback): Deleted.
1500 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1502 2015-06-16 Gavin Barraclough <barraclough@apple.com>
1504 Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
1505 https://bugs.webkit.org/show_bug.cgi?id=146198
1509 * platform/network/DNSResolveQueue.cpp:
1510 (WebCore::DNSResolveQueue::DNSResolveQueue):
1511 (WebCore::DNSResolveQueue::isUsingProxy):
1512 (WebCore::DNSResolveQueue::add):
1513 (WebCore::DNSResolveQueue::timerFired):
1514 * platform/network/DNSResolveQueue.h:
1515 * platform/network/cf/DNSCFNet.cpp:
1516 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1517 (WebCore::clientCallback):
1518 (WebCore::DNSResolveQueue::platformResolve):
1519 (WebCore::proxyIsEnabledInSystemPreferences): Deleted.
1520 (WebCore::isUsingProxy): Deleted.
1521 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1522 * platform/network/soup/DNSSoup.cpp:
1524 2015-06-21 Alexey Proskuryakov <ap@apple.com>
1526 REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
1527 https://bugs.webkit.org/show_bug.cgi?id=146121
1528 rdar://problem/21395180
1530 Reviewed by Darin Adler.
1532 Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.
1534 * platform/mac/Language.mm:
1535 (WebCore::httpStyleLanguageCode):
1536 (WebCore::platformUserPreferredLanguages):
1537 * platform/spi/cf/CFBundleSPI.h:
1539 2015-06-19 Andy Estes <aestes@apple.com>
1541 Give Node::didNotifySubtreeInsertions() a better name
1542 https://bugs.webkit.org/show_bug.cgi?id=146170
1544 Reviewed by Darin Adler.
1546 didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.
1548 This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
1549 (i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.
1551 * dom/ContainerNode.cpp:
1552 (WebCore::ContainerNode::notifyChildInserted):
1553 * dom/ContainerNodeAlgorithms.h:
1554 (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1555 (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1557 (WebCore::Element::addShadowRoot):
1559 (WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1560 (WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1561 * dom/ScriptElement.cpp:
1562 (WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1563 (WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1564 * dom/ScriptElement.h:
1565 * html/HTMLFrameElementBase.cpp:
1566 (WebCore::HTMLFrameElementBase::insertedInto):
1567 (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1568 (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1569 * html/HTMLFrameElementBase.h:
1570 * html/HTMLScriptElement.cpp:
1571 (WebCore::HTMLScriptElement::insertedInto):
1572 (WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1573 (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1574 * html/HTMLScriptElement.h:
1575 * svg/SVGFEImageElement.cpp:
1576 (WebCore::SVGFEImageElement::insertedInto):
1577 (WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1578 (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1579 * svg/SVGFEImageElement.h:
1580 * svg/SVGMPathElement.cpp:
1581 (WebCore::SVGMPathElement::insertedInto):
1582 (WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1583 (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1584 * svg/SVGMPathElement.h:
1585 * svg/SVGScriptElement.cpp:
1586 (WebCore::SVGScriptElement::insertedInto):
1587 (WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1588 (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1589 * svg/SVGScriptElement.h:
1590 * svg/SVGTRefElement.cpp:
1591 (WebCore::SVGTRefElement::insertedInto):
1592 (WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1593 (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1594 * svg/SVGTRefElement.h:
1595 * svg/SVGTextPathElement.cpp:
1596 (WebCore::SVGTextPathElement::insertedInto):
1597 (WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1598 (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1599 * svg/SVGTextPathElement.h:
1600 * svg/animation/SVGSMILElement.cpp:
1601 (WebCore::SVGSMILElement::insertedInto):
1602 (WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1603 (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1604 * svg/animation/SVGSMILElement.h:
1606 2015-06-21 Philip Chimento <philip.chimento@gmail.com>
1608 libwebkit2gtk fails to link without opengl
1609 https://bugs.webkit.org/show_bug.cgi?id=138332
1611 Reviewed by Carlos Garcia Campos.
1613 * CMakeLists.txt: The third-party ANGLE directories need to be
1614 included even if ENABLE(GRAPHICS_CONTEXT_3D) is false. They must
1615 be included after the OpenGL headers as the comment says.
1616 * platform/graphics/texmap/BitmapTexturePool.cpp: Remove
1617 reference to no longer existent header file.
1619 2015-06-20 Tim Horton <timothy_horton@apple.com>
1621 Deselection of text causes a noticeable jump on force touch machines
1622 https://bugs.webkit.org/show_bug.cgi?id=146173
1623 <rdar://problem/20992842>
1625 Reviewed by Sam Weinig.
1627 When we have a TextIndicator of type Crossfade, we end up putting
1628 a layer with the blue highlight + text painted into it on top of the
1629 content, and cross-fading that layer to the yellow-highlighted text.
1631 This is necessary for BounceAndCrossfade TextIndicators, because the
1632 blue highlight has to bounce, but is not necessary for Crossfade-only
1633 ones; we can just fade in the yellow highlight on top of the
1634 existing blue page highlight, and all is well.
1636 So, get rid of the Crossfade TextIndicator type and use FadeIn, separately
1637 keeping track of whether or not we can add a margin (we still can't
1638 add a margin to TextIndicators that indicate the page's current selection,
1639 because the blue highlight cannot have the margin applied to it, and we
1640 want the bounds to match exactly).
1642 * page/TextIndicator.cpp:
1643 (WebCore::TextIndicator::createWithRange):
1644 If the range is the same as the selection, turn off the margin.
1645 We were previously doing this based on the presentation transition, but now
1646 there's no difference in presentation transition in this case.
1648 (WebCore::TextIndicator::createWithSelectionInFrame):
1649 (WebCore::TextIndicator::wantsBounce):
1650 (WebCore::TextIndicator::wantsContentCrossfade):
1651 (WebCore::TextIndicator::wantsFadeIn):
1652 (WebCore::TextIndicator::wantsManualAnimation):
1653 * page/TextIndicator.h:
1654 Get rid of TextIndicatorPresentationTransition::Crossfade.
1656 (WebCore::TextIndicator::setWantsMargin):
1657 (WebCore::TextIndicator::wantsMargin):
1658 Keep track of whether we want a margin.
1660 * page/mac/TextIndicatorWindow.mm:
1661 (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
1662 Determine if we should use a margin based on wantsMargin instead of the
1663 presentation transition.
1665 2015-06-20 Ryuan Choi <ryuan.choi@navercorp.com>
1667 [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
1668 https://bugs.webkit.org/show_bug.cgi?id=146171
1670 Reviewed by Gyuyoung Kim.
1672 * platform/efl/EflInspectorUtilities.cpp:
1673 (WebCore::inspectorResourcePath): Only used WEB_INSPECTOR_DIR which CMake decides properly.
1675 2015-06-19 Michael Catanzaro <mcatanzaro@igalia.com>
1677 Fix absolute value warning in LocalizedStringsGtk.cpp
1678 https://bugs.webkit.org/show_bug.cgi?id=145919
1680 Reviewed by Martin Robinson.
1682 Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
1683 warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
1686 * platform/gtk/LocalizedStringsGtk.cpp:
1687 (WebCore::localizedMediaTimeDescription):
1689 2015-06-19 Devin Rousso <drousso@apple.com>
1691 Web Inspector: Highlight currently edited CSS selector
1692 https://bugs.webkit.org/show_bug.cgi?id=145658
1694 Reviewed by Joseph Pecoraro.
1696 Test: inspector/dom/highlight-multiple-shapes.html
1698 * inspector/InspectorController.cpp:
1699 (WebCore::InspectorController::buildObjectForHighlightedNode):
1700 * inspector/InspectorController.h:
1701 * inspector/InspectorDOMAgent.cpp:
1702 (WebCore::InspectorDOMAgent::highlightSelector): Gets a list of all nodes matching a given selector string and highlights each of them.
1703 * inspector/InspectorDOMAgent.h:
1704 * inspector/InspectorOverlay.cpp:
1705 (WebCore::InspectorOverlay::hideHighlight):
1706 (WebCore::InspectorOverlay::highlightNodeList): Loops through a given NodeList to create highlightObjects for each of them.
1707 (WebCore::InspectorOverlay::shouldShowOverlay):
1708 (WebCore::buildObjectForElementData): Don't show flow fragments when highlighting multiple nodes.
1709 (WebCore::InspectorOverlay::buildHighlightObjectForNode):
1710 (WebCore::InspectorOverlay::buildObjectForHighlightedNode): Now returns an array containing the highlightObject for each highligthed node.
1711 (WebCore::InspectorOverlay::drawNodeHighlight): Now sends an array to the InspectorOverlayPage.js to provide support for highlighting multiple nodes.
1712 * inspector/InspectorOverlay.h:
1713 * inspector/InspectorOverlayPage.js: Now expects an array as its parameter and loops through it to highlight each node given.
1714 If the parameter array contains more than one element, do not draw the textbox containing info on that node.
1715 (drawNodeHighlight):
1717 2015-06-19 Joseph Pecoraro <pecoraro@apple.com>
1719 Crash under WebCore::PageConsoleClient::addMessage attempting to log insecure content message in ImageDocument
1720 https://bugs.webkit.org/show_bug.cgi?id=146096
1722 Reviewed by Timothy Hatcher.
1724 Was able to reproduce this using a user stylesheet with an http css font
1725 on a pdf (ImageDocument) main document loaded over https. Was unable to
1726 create a reliable test for this scenario.
1728 * page/PageConsoleClient.cpp:
1729 (WebCore::getParserLocationForConsoleMessage):
1730 The scriptableDocumentParser could be null, such as in an ImageDocument.
1732 2015-06-19 Dean Jackson <dino@apple.com>
1734 Extremely large canvas crashes on pre-El Capitan machines
1735 https://bugs.webkit.org/show_bug.cgi?id=146169
1736 <rdar://problem/21410046>
1738 Reviewed by Tim Horton.
1740 On machines before El Capitan, make the maximum canvas size
1743 Covered by existing tests.
1745 * html/HTMLCanvasElement.cpp:
1747 2015-06-19 Tim Horton <timothy_horton@apple.com>
1749 Selection services cannot be invoked when force click is enabled
1750 https://bugs.webkit.org/show_bug.cgi?id=146166
1751 <rdar://problem/21468362>
1753 Reviewed by Darin Adler.
1755 * page/mac/ServicesOverlayController.h:
1756 Turn Highlight::Type into something we can use for dirty flags.
1758 * page/mac/ServicesOverlayController.mm:
1759 (WebCore::ServicesOverlayController::Highlight::createForSelection):
1760 (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
1761 (WebCore::ServicesOverlayController::ServicesOverlayController):
1762 (WebCore::ServicesOverlayController::selectionRectsDidChange):
1763 (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
1764 (WebCore::ServicesOverlayController::invalidateHighlightsOfType):
1765 (WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
1766 (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1767 (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
1768 (WebCore::ServicesOverlayController::buildSelectionHighlight):
1769 (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
1770 (WebCore::ServicesOverlayController::determineActiveHighlight):
1771 (WebCore::ServicesOverlayController::didScrollFrame):
1772 (WebCore::ServicesOverlayController::handleClick):
1773 Coalesce highlight rebuilding so that things (like TextIndicator creation)
1774 that change the selection and then reset it immediately don't cause us
1775 to lose the active highlight.
1777 This also means that if the selection changes multiple times in a runloop
1778 (easily possible from script), we won't waste a lot of time rebuilding highlights.
1780 (WebCore::ServicesOverlayController::didRebuildPotentialHighlights):
1781 Merged into buildPotentialHighlightsIfNeeded.
1783 2015-06-19 Matt Baker <mattbaker@apple.com>
1785 Web Inspector: TimelineAgent needs to handle nested runloops
1786 https://bugs.webkit.org/show_bug.cgi?id=145090
1788 Reviewed by Joseph Pecoraro.
1790 Previously nested run loops caused InspectorTimelineAgent to prematurely pop the current run loop record. This
1791 patch adds a counter to track the run loop nesting level, and rendering frame records are only pushed/popped
1792 when the nesting level is zero. Run loop entry/exit notifications received while the debugger is paused do not
1793 affect the nesting level.
1795 * inspector/InspectorTimelineAgent.cpp:
1796 (WebCore::InspectorTimelineAgent::internalStart):
1797 (WebCore::InspectorTimelineAgent::internalStop):
1798 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1799 * inspector/InspectorTimelineAgent.h:
1801 2015-06-19 Brent Fulgham <bfulgham@apple.com>
1803 Follow-up fix to r185766.
1804 https://bugs.webkit.org/show_bug.cgi?id=22132
1806 Reviewed by Zalan Bujtas.
1808 Suggested by Darin Adler in the bug.
1810 * platform/graphics/filters/FETile.cpp:
1811 (WebCore::FETile::platformApplySoftware): Use WTF::move when passing
1812 the new tileImageCopy RefPtr.
1814 2015-06-19 Michael Catanzaro <mcatanzaro@igalia.com>
1816 [SOUP] Fix return-type-c-linkage warning after r185553
1817 https://bugs.webkit.org/show_bug.cgi?id=146014
1819 Reviewed by Martin Robinson.
1821 * platform/network/soup/WebKitSoupRequestGeneric.cpp:
1822 (webkitSoupRequestGenericGetRequest): Return a pointer rather than a reference.
1823 * platform/network/soup/WebKitSoupRequestGeneric.h: webkitSoupRequestGenericGetRequest now
1824 returns a pointer rather than a reference.
1826 2015-06-19 Dean Jackson <dino@apple.com>
1828 Played <audio> looks invisible against the gray background
1829 https://bugs.webkit.org/show_bug.cgi?id=146164
1830 <rdar://problem/21014284>
1832 Reviewed by Brent Fulgham.
1834 The plus-darker blend mode was not allowing any white to
1835 show through in the rendering. We don't need this for
1836 audio controls, where we draw on an opaque grey background.
1838 * Modules/mediacontrols/mediaControlsiOS.css:
1839 (audio::-webkit-media-controls-panel): Darken the color of the controls a
1840 little to make white stand out more.
1841 (audio::-webkit-media-controls-timeline): Remove the plus-darker blending.
1842 (video::-webkit-media-controls-timeline): Apply blending only to video.
1844 2015-06-19 Andy Estes <aestes@apple.com>
1846 Various assertion failures occur when executing script in the midst of DOM insertion
1847 https://bugs.webkit.org/show_bug.cgi?id=132482
1849 Reviewed by Darin Adler.
1851 Prior to this change, when an element containing a <script> child was inserted into a document, the script was
1852 executed in ScriptElement::insertedInto(). That script can access nodes that follow it in the newly-inserted
1853 hierarchy but are not yet fully inserted, leading to at least the following problems:
1855 - The script could remove a node that is not yet marked as in the document.
1856 - The script could remove a named <map> that has yet to be added to TreeScope::m_imageMapsByName.
1857 - The script could remove a form control that has yet to be added to FormController::m_formElementsWithState.
1859 These scenarios all result in assertion failures. This change ensures that each node in the newly-inserted
1860 hierarchy is fully inserted before executing any scripts.
1862 Tests: fast/dom/element-removed-while-inserting-parent-crash.html
1863 fast/dom/named-map-removed-while-inserting-parent-crash.html
1864 fast/forms/form-control-removed-while-inserting-parent-crash.html
1865 svg/dom/element-removed-while-inserting-parent-crash.html
1867 * dom/ScriptElement.cpp:
1868 (WebCore::ScriptElement::shouldNotifySubtreeInsertions): Renamed from insertedInto().
1869 Returned true in the case where insertedInto() would've called prepareScript().
1870 (WebCore::ScriptElement::didNotifySubtreeInsertions): Called prepareScript().
1871 (WebCore::ScriptElement::insertedInto): Renamed to shouldNotifySubtreeInsertions().
1872 * dom/ScriptElement.h:
1873 * html/HTMLScriptElement.cpp:
1874 (WebCore::HTMLScriptElement::insertedInto): If shouldNotifySubtreeInsertions() is true, returned InsertionShouldCallDidNotifySubtreeInsertions.
1875 Otherwise, returned InsertionDone.
1876 (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
1877 * html/HTMLScriptElement.h:
1878 * svg/SVGScriptElement.cpp:
1879 (WebCore::SVGScriptElement::insertedInto): Did the same as HTMLScriptElement::insertedInto().
1880 (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
1881 * svg/SVGScriptElement.h:
1883 2015-06-19 Brent Fulgham <bfulgham@apple.com>
1885 All calls of ImageBuffer::create should null check the return value
1886 https://bugs.webkit.org/show_bug.cgi?id=22132
1888 Reviewed by Zalan Bujtas.
1890 ImageBuffer::create returns nullptr for a number of reasons, and should be
1891 expected to do so. We missed this check in a few places, resulting in
1892 crashes on some systems. Likewise, ImageBuffer::copyImage may return nullptr
1893 in normal use and should be checked.
1895 * platform/graphics/BitmapImage.cpp:
1896 (WebCore::BitmapImage::drawPattern): Add nullptr check for create and copyImage. Remove
1897 extra call to 'setImageObserver'.
1898 * platform/graphics/cairo/ImageBufferCairo.cpp:
1899 (WebCore::ImageBuffer::drawPattern): Add nullptr check for copyImage.
1900 * platform/graphics/cg/ImageBufferCG.cpp:
1901 (WebCore::ImageBuffer::drawPattern): Add nullptr checks for copyImage.
1902 * platform/graphics/filters/FETile.cpp:
1903 (WebCore::FETile::platformApplySoftware): Add nullptr check for copyImage.
1904 * platform/graphics/filters/FilterEffect.cpp:
1905 (WebCore::FilterEffect::asImageBuffer): Add nullptr check for create.
1906 (WebCore::FilterEffect::openCLImageToImageBuffer): Ditto.
1907 * platform/graphics/texmap/BitmapTexture.cpp:
1908 (WebCore::BitmapTexture::updateContents): Add nullptr checks for create and copyImage.
1909 * svg/graphics/SVGImage.cpp:
1910 (WebCore::SVGImage::drawPatternForContainer): Add nullptr check for copyImage.
1912 2015-06-19 Jeremy Jones <jeremyj@apple.com>
1914 Get CAContext directly for CALayer instead of walking the layer tree.
1915 https://bugs.webkit.org/show_bug.cgi?id=146138
1916 <rdar://problem/21455974>
1918 Reviewed by Darin Adler.
1920 This will get the context directly from the CALayer instead of getting all CAContexts, walking the layer tree
1921 to the root and comparing that against each CAContext's root layer.
1923 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1924 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
1926 2015-06-18 Brent Fulgham <bfulgham@apple.com>
1928 [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
1929 https://bugs.webkit.org/show_bug.cgi?id=145318
1930 <rdar://problem/21081501>
1932 Reviewed by Simon Fraser.
1934 Use the ScrollController in iOS to track the scroll snap point state.
1935 We do not need the animation implementation or timers since the actual
1936 animation is handled by UIKit.
1938 This change lets us communicate the current offset into the scroll snap
1939 offset vector between the WebProcess and RemoteScrollingTree so that
1940 both sides stay in sync regardless of whether user gestures or style
1941 updates have caused us to shift to a different snap point.
1943 * page/scrolling/AsyncScrollingCoordinator.cpp:
1944 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Set the
1945 current horizontal and vertical scroll snap offset indices.
1946 (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
1947 * page/scrolling/AsyncScrollingCoordinator.h: Mark the setActiveScrollSnapIndices
1948 for export so that it can be reached by the UIProcess.
1949 * page/scrolling/ScrollingCoordinator.h: Keep track of horizontal and
1950 vertical scroll snap offset indices.
1951 * page/scrolling/ScrollingStateScrollingNode.cpp:
1952 (WebCore::ScrollingStateScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
1953 (WebCore::ScrollingStateScrollingNode::setCurrentVerticalSnapPointIndex): Added.
1954 * page/scrolling/ScrollingStateScrollingNode.h:
1955 (WebCore::ScrollingStateScrollingNode::currentHorizontalSnapPointIndex): Added.
1956 (WebCore::ScrollingStateScrollingNode::currentVerticalSnapPointIndex): Added.
1957 * page/scrolling/ScrollingTree.h:
1958 * page/scrolling/ScrollingTreeScrollingNode.cpp:
1959 (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Update the scroll snap
1960 point offset indices if either has changed.
1961 * page/scrolling/ScrollingTreeScrollingNode.h:
1962 (WebCore::ScrollingTreeScrollingNode::currentHorizontalSnapPointIndex): Added.
1963 (WebCore::ScrollingTreeScrollingNode::currentVerticalSnapPointIndex): Added.
1964 (WebCore::ScrollingTreeScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
1965 (WebCore::ScrollingTreeScrollingNode::setCurrentVerticalSnapPointIndex): Added.
1966 * page/scrolling/ThreadedScrollingTree.cpp:
1967 (WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange): New method
1968 to handle notifications about scroll snap index changes from the UIProcess.
1969 * page/scrolling/ThreadedScrollingTree.h:
1970 * page/scrolling/ios/ScrollingTreeIOS.cpp:
1971 (WebCore::ScrollingTreeIOS::currentSnapPointIndicesDidChange): New method
1972 to handle notifications about scroll snap index changes from the UIProcess.
1973 * page/scrolling/ios/ScrollingTreeIOS.h:
1974 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1975 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Update scroll
1976 snap point current offset indices if they have changed.
1977 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Remove unneeded
1978 PLATFORM(MAC) macro.
1979 * platform/ScrollAnimator.cpp:
1980 (WebCore::ScrollAnimator::ScrollAnimator): We have a ScrollController if we are
1981 supporting scroll snap points or rubber banding.
1982 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): This method is not needed
1984 (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): Enable this on iOS.
1985 (WebCore::ScrollAnimator::updateScrollSnapState): Renamed from 'updateScrollAnimatorsAndTimers'
1987 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Deleted.
1988 * platform/ScrollAnimator.h: Enable some scroll snap methods on iOS.
1989 * platform/ScrollableArea.cpp:
1990 (WebCore::ScrollableArea::handleWheelEvent): Enable scroll snap index bookkeeping on iOS, too.
1991 (WebCore::ScrollableArea::updateScrollSnapState): Revise to call 'updateScrollSnapState' instead
1992 of 'updateScrollAnimatorsAndTimers'.
1993 * platform/cocoa/ScrollController.h: Enable some methods on iOS. Reorder methods to
1994 reduce the number of macros needed to do so.
1995 * platform/cocoa/ScrollController.mm:
1996 (systemUptime): Only build for Mac.
1997 (WebCore::ScrollController::ScrollController): Disable rubber band-specific members on iOS.
1998 (WebCore::ScrollController::handleWheelEvent): Only build this on Mac.
1999 (WebCore::ScrollController::isRubberBandInProgress): Always return 'false' on iOS.
2000 (WebCore::ScrollController::startSnapRubberbandTimer): Only build this on Mac.
2001 (WebCore::ScrollController::shouldRubberBandInHorizontalDirection): Ditto.
2002 (WebCore::ScrollController::scrollSnapPointState): Enable on iOS.
2003 (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Only build on Mac.
2004 (WebCore::ScrollController::updateScrollSnapState): renamed from 'updateScrollAnimatorsAndTimers'
2005 (WebCore::ScrollController::startScrollSnapTimer): Only build on Mac.
2006 (WebCore::ScrollController::initializeGlideParameters): Ditto.
2007 (WebCore::ScrollController::activeScrollSnapIndexForAxis): Enable on iOS.
2008 (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Ditto.
2009 (WebCore::ScrollController::beginScrollSnapAnimation): Only build on Mac.
2010 (WebCore::ScrollController::computeGlideDelta): Ditto.
2011 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Deleted.
2012 * rendering/RenderLayerCompositor.cpp:
2013 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Capture any changes in scroll
2014 snap offset indices.
2016 2015-06-19 Jeremy Jones <jeremyj@apple.com>
2018 Fullscreen view should not update bounds of video when in PiP.
2019 https://bugs.webkit.org/show_bug.cgi?id=146134
2021 Reviewed by Darin Adler.
2023 Don't update bounds on video layer when it is not a child.
2025 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2026 (-[WebAVVideoLayer setBounds:]):
2028 2015-06-19 Zalan Bujtas <zalan@apple.com>
2030 RenderRubyText requires RenderRubyRun parent.
2031 https://bugs.webkit.org/show_bug.cgi?id=146148
2032 rdar://problem/21423319
2034 Reviewed by Simon Fraser.
2036 RenderRubyText expects its parent to be RenderRubyRun and since a
2037 a non-block <rt> requires anonymous wrapper, we should check whether
2038 the display type is actually block.
2040 Test: fast/ruby/crash-when-ruby-rt-is-non-block.html
2042 * html/RubyTextElement.cpp:
2043 (WebCore::RubyTextElement::createElementRenderer):
2045 2015-06-19 Jeremy Jones <jeremyj@apple.com>
2047 cancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
2048 https://bugs.webkit.org/show_bug.cgi?id=146140
2050 Reviewed by Eric Carlson.
2052 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2053 (-[WebCALayerHostWrapper dealloc]): Added.
2054 (-[WebAVVideoLayer dealloc]): Deleted.
2056 2015-06-19 Per Arne Vollan <peavo@outlook.com>
2058 [WinCairo] Null pointer crash in BitmapTexture::updateContents.
2059 https://bugs.webkit.org/show_bug.cgi?id=146147
2061 Reviewed by Brent Fulgham.
2063 Added null pointer check.
2065 * platform/graphics/texmap/BitmapTexture.cpp:
2066 (WebCore::BitmapTexture::updateContents):
2068 2015-06-19 Anders Carlsson <andersca@apple.com>
2070 Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
2071 https://bugs.webkit.org/show_bug.cgi?id=146124
2072 rdar://problem/21449395
2074 Reviewed by Geoffrey Garen.
2076 * platform/spi/cg/CoreGraphicsSPI.h:
2078 2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
2080 Remove unnecessary svn:executable flags
2081 https://bugs.webkit.org/show_bug.cgi?id=146107
2083 Reviewed by Alexey Proskuryakov.
2085 * html/canvas/CanvasRenderingContext2D.cpp: Removed property svn:executable.
2086 * mathml/MathMLMencloseElement.cpp: Removed property svn:executable.
2087 * mathml/MathMLMencloseElement.h: Removed property svn:executable.
2088 * platform/efl/RenderThemeEfl.cpp: Removed property svn:executable.
2089 * rendering/mathml/RenderMathMLMenclose.cpp: Removed property svn:executable.
2090 * rendering/mathml/RenderMathMLMenclose.h: Removed property svn:executable.
2092 2015-06-19 Youenn Fablet <youenn.fablet@crf.canon.fr>
2094 Bindings generator should generate code to catch exception and reject promises for Promise-based APIs
2095 https://bugs.webkit.org/show_bug.cgi?id=146060
2097 Reviewed by Darin Adler.
2099 The binding generator splits the function that binds JS to the DOM class implementation in two for functions returning promise.
2100 The first function, called from JS, is responsible of casting this to the expected JSXXX class.
2101 If casting fails, an exception is raised. Otherwise, it calls the second function.
2102 After calling the second function, it checks whether an exception is raised, in which case it returns a rejected promise.
2103 The second function is responsible of argument conversion and calling the DOM class function.
2105 Covered by expectations and AudioContext promise still working.
2106 A test case is added for a promise returning function taking a typed argument as input (if argument value cannot be typed, the promise is rejected).
2107 A second test case is a promise-returning function that can raise an exception. In that case the DOMException is used as rejection value.
2109 As can be seen from generated code, this generalized code adds a mandatory check (is there an exception?) at the end of the function.
2110 This check is done even in cases we know there will be no exception.
2111 This may be covered by another patch if this optimization is thought useful enough.
2113 * bindings/js/JSDOMPromise.cpp:
2114 (WebCore::rejectPromiseWithExceptionIfAny): Utility method for the binding code.
2115 (WebCore::callPromiseFunction): Ditto.
2116 * bindings/js/JSDOMPromise.h:
2117 * bindings/scripts/CodeGeneratorJS.pm:
2118 (GenerateImplementation):
2119 (GenerateFunctionCastedThis): Extracted from GenerateImplementationFunctionCall to reuse it in case of promise-returning functions.
2120 (GenerateImplementationFunctionCall):
2121 (GenerateCallbackImplementation): Deleted.
2122 * bindings/scripts/test/JS/JSTestObj.cpp:
2123 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
2124 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
2125 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
2126 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
2127 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
2128 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
2129 * bindings/scripts/test/TestObj.idl:
2131 2015-06-18 Jeremy Jones <jeremyj@apple.com>
2133 Disable UIWindow for fullscreen video for selected clients.
2134 https://bugs.webkit.org/show_bug.cgi?id=145852
2136 Reviewed by Simon Fraser.
2138 Disable UIWindow for fullscreen video doesn't work everywhere (rdar://problem/21315993), so just disable it when creating a UIWindow won't work.
2139 Fix some interface hiding and layout problems that showed up in the non UIWindow code path.
2141 * platform/RuntimeApplicationChecksIOS.h:
2142 * platform/RuntimeApplicationChecksIOS.mm: Remove iAD bundle identifier.
2143 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2144 (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Opt out of UIWindow when hosted in another process. And fix view parenting for non-window case.
2145 (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Fix for AVKit exit fullscreen complaining about -needsLayout.
2147 (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
2148 (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
2149 (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
2150 (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
2151 (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
2152 (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
2153 These hide and show the view controller where we hide and show the window.
2155 2015-06-18 Dean Jackson <dino@apple.com>
2157 Provide a way for web developers to draw a Theme-specific Wireless Playback icon
2158 https://bugs.webkit.org/show_bug.cgi?id=146123
2159 <rdar://problem/21119287>
2161 Reviewed by Simon Fraser.
2163 Implement a -webkit-named-image() CSS <image> generator that allows a site to
2164 request artwork by name and get the platform variant. At the moment
2165 we only support "wireless-playback" which returns a generic image everywhere
2166 but Cocoa platforms, where we render the AirPlay icon.
2168 In order to do this I added a ThemeCocoa to share any Theme code between
2171 Test: fast/css/named-icons.html
2173 * WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.
2175 * css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
2176 (WebCore::CSSImageGeneratorValue::image):
2177 (WebCore::CSSImageGeneratorValue::isFixedSize):
2178 (WebCore::CSSImageGeneratorValue::isPending):
2179 (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
2181 * css/CSSNamedImageValue.cpp: New class. Just holds a name String.
2182 (WebCore::CSSNamedImageValue::customCSSText):
2183 (WebCore::CSSNamedImageValue::image):
2184 (WebCore::CSSNamedImageValue::equals):
2185 * css/CSSNamedImageValue.h:
2186 (WebCore::CSSNamedImageValue::create):
2187 (WebCore::CSSNamedImageValue::isFixedSize):
2188 (WebCore::CSSNamedImageValue::isPending):
2189 (WebCore::CSSNamedImageValue::CSSNamedImageValue):
2191 * css/CSSParser.cpp:
2192 (WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
2193 (WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
2194 (WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
2197 * css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
2198 (WebCore::CSSValue::equals):
2199 (WebCore::CSSValue::cssText):
2200 (WebCore::CSSValue::destroy):
2202 (WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.
2204 * platform/Theme.cpp:
2205 (WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
2206 * platform/Theme.h: Add drawNamedImage.
2208 * platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
2209 (WebCore::fitContextToBox):
2210 (WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
2211 * platform/cocoa/ThemeCocoa.h:
2213 * platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.
2215 * platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.
2217 * platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
2218 (WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
2219 (WebCore::NamedImageGeneratedImage::draw):
2220 (WebCore::NamedImageGeneratedImage::drawPattern):
2221 * platform/graphics/NamedImageGeneratedImage.h:
2223 * platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
2224 * platform/mac/ThemeMac.h: Ditto.
2226 2015-06-18 KyungTae Kim <ktf.kim@samsung.com> and Myles C. Maxfield <mmaxfield@apple.com>
2228 [CSS3] Add support for the word-break:keep-all CSS property
2229 https://bugs.webkit.org/show_bug.cgi?id=123782
2231 Reviewed by Darin Adler.
2233 Add support for word-break:keep-all CSS property by CSS3 spec:
2234 http://www.w3.org/TR/2013/WD-css-text-3-20131010/#word-break-property
2236 Test: fast/text/word-break-keep-all.html
2238 * css/CSSParser.cpp:
2239 (WebCore::isValidKeywordPropertyAndValue):
2240 * css/CSSPrimitiveValueMappings.h:
2241 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2242 (WebCore::CSSPrimitiveValue::operator EWordBreak):
2243 * css/CSSValueKeywords.in:
2244 * rendering/RenderText.cpp:
2245 (WebCore::RenderText::computePreferredLogicalWidths):
2246 * rendering/break_lines.h:
2247 (WebCore::nextBreakablePositionKeepingAllWords):
2248 (WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP):
2249 (WebCore::isBreakable):
2250 * rendering/line/BreakingContext.h:
2251 (WebCore::BreakingContext::handleText):
2252 (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
2253 * rendering/style/RenderStyleConstants.h:
2255 2015-06-18 Jon Lee <jonlee@apple.com>
2257 Update AVKit usage of pip
2258 https://bugs.webkit.org/show_bug.cgi?id=146095
2259 <rdar://problem/21386853>
2261 Reviewed by Eric Carlson.
2263 - Rename enum VideoFullscreenModeOptimized to VideoFullscreenModePictureInPicture
2264 - Rename MediaElementSession::allowsAlternateFullscreen to allowsPictureInPicture
2265 - Rename Settings::allowsAlternateFullscreen to allowsPictureInPictureMediaPlayback
2266 - Update AVKit calls and AVKitSPI.h
2267 - Rename WebVideoFullscreenInterfaceAVKit delegate functions and member variables
2269 * html/HTMLMediaElement.cpp:
2270 * html/HTMLVideoElement.cpp:
2271 * html/MediaElementSession.cpp:
2272 (WebCore::MediaElementSession::allowsPictureInPicture): Renamed.
2273 (WebCore::MediaElementSession::allowsAlternateFullscreen): Deleted.
2274 * html/MediaElementSession.h:
2275 * page/Settings.cpp:
2277 * platform/graphics/MediaPlayerEnums.h:
2278 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2279 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2280 * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove unused setIsOptimized.
2281 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2282 * platform/spi/cocoa/AVKitSPI.h: Remove unused typedef.
2283 * platform/spi/mac/AVFoundationSPI.h:
2285 2015-06-18 Jeremy Jones <jeremyj@apple.com>
2287 Fix crash when entering fullscreen during exit fullscreen animation.
2288 https://bugs.webkit.org/show_bug.cgi?id=146117
2290 Reviewed by Simon Fraser.
2292 Because enterFullscreen can be called during exitFullscreen animation, the exit fullscreen teardown
2293 should not imply a fullscreen state change on video element.
2295 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2296 (WebVideoFullscreenControllerContext::exitFullscreen): May be called from mainThread
2297 (-[WebVideoFullscreenController exitFullscreen]): May be called from mainThread
2298 * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2299 (WebVideoFullscreenModelVideoElement::setVideoElement):
2300 Changing associated video element does not imply fullscreen mode change.
2302 2015-06-18 Brian J. Burg <burg@cs.washington.edu>
2304 Web Inspector: improve generated types for objects passed to backend commands
2305 https://bugs.webkit.org/show_bug.cgi?id=146091
2307 Reviewed by Joseph Pecoraro.
2309 Update type signatures for backend command implementations. In a few cases, clean
2310 up relevant helper function signatures and copy data out of parameter objects where
2311 the code previously held onto a reference.
2313 No new tests, no behavior changed.
2315 * inspector/InspectorCSSAgent.cpp:
2316 (WebCore::computePseudoClassMask):
2317 (WebCore::InspectorCSSAgent::setStyleText):
2318 (WebCore::InspectorCSSAgent::setRuleSelector):
2319 (WebCore::InspectorCSSAgent::forcePseudoState):
2320 * inspector/InspectorCSSAgent.h:
2321 * inspector/InspectorDOMAgent.cpp:
2322 (WebCore::parseColor):
2323 (WebCore::parseConfigColor):
2324 (WebCore::parseQuad):
2325 (WebCore::InspectorDOMAgent::performSearch):
2326 (WebCore::InspectorDOMAgent::setSearchingForNode):
2327 (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
2328 (WebCore::InspectorDOMAgent::setInspectModeEnabled):
2329 (WebCore::InspectorDOMAgent::highlightRect):
2330 (WebCore::InspectorDOMAgent::highlightQuad):
2331 (WebCore::InspectorDOMAgent::innerHighlightQuad):
2332 (WebCore::InspectorDOMAgent::highlightNode):
2333 (WebCore::InspectorDOMAgent::highlightFrame):
2334 * inspector/InspectorDOMAgent.h:
2335 * inspector/InspectorDOMStorageAgent.cpp:
2336 (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2337 (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2338 (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2339 (WebCore::InspectorDOMStorageAgent::findStorageArea):
2340 * inspector/InspectorDOMStorageAgent.h:
2341 * inspector/InspectorIndexedDBAgent.cpp:
2342 (WebCore::InspectorIndexedDBAgent::requestData):
2343 * inspector/InspectorIndexedDBAgent.h:
2344 * inspector/InspectorReplayAgent.cpp:
2345 (WebCore::InspectorReplayAgent::replayToPosition):
2346 * inspector/InspectorReplayAgent.h:
2347 * inspector/InspectorResourceAgent.cpp:
2348 (WebCore::InspectorResourceAgent::willSendRequest):
2349 (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
2350 Clean up extraHTTPHeaders to copy header key/values out of the InspectorObject, rather
2351 than retaining the protocol object indefinitely. This matches the ownership scheme used
2354 * inspector/InspectorResourceAgent.h:
2355 * inspector/InspectorStyleSheet.h:
2356 (WebCore::InspectorCSSId::InspectorCSSId):
2357 * inspector/InspectorWorkerAgent.cpp:
2358 (WebCore::InspectorWorkerAgent::sendMessageToWorker):
2359 * inspector/InspectorWorkerAgent.h:
2361 2015-06-18 Anders Carlsson <andersca@apple.com>
2363 Remove shouldInterruptJavaScript
2364 https://bugs.webkit.org/show_bug.cgi?id=146118
2366 Reviewed by Antti Koivisto.
2368 The WebKit SPI methods for deciding whether JavaScript execution should be interrupted hasn't been used
2369 for many releases. Furthermore, they don't make sense in the multi-process architecture since it's still possible
2370 to interrupt execution (by closing the browser tab or window) from the UI process.
2372 * bindings/js/JSDOMWindowBase.cpp:
2373 (WebCore::JSDOMWindowBase::shouldInterruptScript):
2374 * loader/EmptyClients.h:
2376 (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
2378 * page/ChromeClient.h:
2380 2015-06-18 Benjamin Poulain <bpoulain@apple.com>
2382 [CSS JIT][ARMv7] The pseudo element early exit trashes r6
2383 https://bugs.webkit.org/show_bug.cgi?id=146078
2385 Reviewed by Alex Christensen.
2387 The pseudo element early failure runs before we generate the prologue.
2388 The reason is that we can often exit immediately on function entry, before
2389 we even touch any memory.
2391 On ARMv7, we don't have many spare registers so the MacroAssembler
2392 uses r6 as a scratch register and the client code is expected to save
2395 In the early failure case, we were not pushing r6 before using the MacroAssembler
2396 and its value could be trashed.
2398 This patch push the macro assembler registers separately from the prologue.
2400 For restoring the registers, a new function generateFunctionEnding() encapsulate
2401 the pop() and ret().
2403 * cssjit/SelectorCompiler.cpp:
2404 (WebCore::SelectorCompiler::SelectorCodeGenerator::pushMacroAssemblerRegisters):
2405 (WebCore::SelectorCompiler::SelectorCodeGenerator::popMacroAssemblerRegisters):
2406 (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2407 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2408 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2410 * cssjit/StackAllocator.h:
2411 (WebCore::StackAllocator::operator=):
2412 We have a new case for the stack allocator: some stack changes are conditional
2413 at compile time instead of runtime. This is easy to deal with by overriding
2414 the stack if a path is not taken at compile time.
2416 2015-06-17 Conrad Shultz <conrad_shultz@apple.com>
2418 REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
2419 https://bugs.webkit.org/show_bug.cgi?id=144399
2421 Reviewed by Darin Adler.
2423 Earlier work made the array of web-visible plug-ins dynamic, but allowed DOMPlugin (and, indirectly by extension,
2424 DOMMimeType) to continue keeping a reference to a plug-in in terms of an index into that array. This superficially
2425 appeared correct since DOMPlugin immutably holds onto a PluginData instance, which in turn immutably holds onto a
2426 Page instance. PluginStrategy::getWebVisiblePluginInfo() is passed this Page, which is used to determine the contents
2427 of the plugin array. The expectation was that keeping an index would still be safe since the Page is not changing,
2428 but this is not strictly correct since relevant attributes of the Page and/or the available plugins may still change.
2430 It's not entirely clear why the test failures are intermittent and occur only on certain configurations, but address
2431 them by eliminating the incorrect storage of indexes in favor of keeping copies of the relevant plugin info itself.
2433 * plugins/DOMMimeType.cpp:
2434 (WebCore::DOMMimeType::DOMMimeType):
2435 Instead of storing the MIME type index, retrieve and store the MIME class info and plugin info.
2436 (WebCore::DOMMimeType::type):
2437 Directly access the m_mimeClassInfo member.
2438 (WebCore::DOMMimeType::suffixes):
2440 (WebCore::DOMMimeType::description):
2442 (WebCore::DOMMimeType::enabledPlugin):
2443 Directly access the m_pluginInfo member.
2444 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
2446 * plugins/DOMMimeType.h:
2447 Update member variables.
2449 * plugins/DOMPlugin.cpp:
2450 (WebCore::DOMPlugin::DOMPlugin):
2451 Instead of storing the plugin index, store the plugin info directly.
2452 (WebCore::DOMPlugin::name):
2453 Directly access m_pluginInfo.
2454 (WebCore::DOMPlugin::filename):
2456 (WebCore::DOMPlugin::description):
2458 (WebCore::DOMPlugin::length):
2460 (WebCore::DOMPlugin::item):
2461 Access m_pluginInfo directly; find the matching plug-in based on matching PluginInfo (for which an overloaded
2462 comparator is supplied below).
2463 (WebCore::DOMPlugin::pluginInfo): Deleted.
2465 * plugins/DOMPlugin.h:
2466 Update member variables.
2467 (WebCore::DOMPlugin::create):
2468 Accept a PluginInfo instead of a plugin index.
2470 * plugins/DOMPluginArray.cpp:
2471 (WebCore::DOMPluginArray::item):
2472 (WebCore::DOMPluginArray::namedItem):
2474 * plugins/PluginData.h:
2475 (WebCore::operator==):
2476 Added; compare PluginInfo structs on the basis of member equality.
2478 2015-06-17 Alex Christensen <achristensen@webkit.org>
2480 [Content Extensions] Log blocked loads to the WebInspector console
2481 https://bugs.webkit.org/show_bug.cgi?id=146089
2483 Reviewed by Joseph Pecoraro.
2485 * contentextensions/ContentExtensionsBackend.cpp:
2486 (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2487 (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2488 Log which URLs are blocked and the URL of the page they are blocked from.
2490 2015-06-18 Joseph Pecoraro <pecoraro@apple.com>
2492 Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
2493 https://bugs.webkit.org/show_bug.cgi?id=146093
2495 Reviewed by Timothy Hatcher.
2497 * page/DOMWindow.cpp:
2498 (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2499 The console could be null so null check its use.
2501 2015-06-18 Csaba Osztrogonác <ossy@webkit.org>
2503 Suppress null-conversion warnings in ANGLE
2504 https://bugs.webkit.org/show_bug.cgi?id=145125
2506 Reviewed by Alex Christensen.
2510 2015-06-18 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
2512 [Streams API] Implement ReadableStreamReader.releaseLock
2513 https://bugs.webkit.org/show_bug.cgi?id=145299
2515 Reviewed by Darin Adler.
2517 Covered by rebased tests.
2519 * Modules/streams/ReadableStream.cpp:
2520 (WebCore::ReadableStream::close): Moving some close code to newly added releaseReader.
2521 (WebCore::ReadableStream::releaseReader): Implements reader release and callbacks finalization.
2522 (WebCore::ReadableStream::changeStateToErrored): Calls releaseReader.
2523 * Modules/streams/ReadableStream.h:
2524 (WebCore::ReadableStream::hasReadPendingRequests): Added to enable reader.releaseLock throwing if read requests are pending.
2525 * Modules/streams/ReadableStreamReader.cpp:
2526 (WebCore::ReadableStreamReader::releaseLock): Implementation of releaseLock
2527 * Modules/streams/ReadableStreamReader.h:
2528 * Modules/streams/ReadableStreamReader.idl:
2529 (WebCore::releaseLock): Deleted.
2531 2015-06-18 Youenn Fablet <youenn.fablet@crf.canon.fr>
2533 GObject and ObjC bindings generator should not generate code for promise-based APIs
2534 https://bugs.webkit.org/show_bug.cgi?id=146059
2536 Reviewed by Darin Adler.
2538 Covered by rebased expectations.
2540 * bindings/scripts/CodeGeneratorGObject.pm:
2541 (SkipFunction): Disabling GObject DOM binding for functions returning promises.
2542 * bindings/scripts/CodeGeneratorObjC.pm:
2543 (SkipFunction): Disabling ObjC DOM binding for functions returning promises.
2544 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
2545 (webkit_dom_test_obj_get_read_only_long_attr): Deleted.
2546 (webkit_dom_test_obj_get_read_only_string_attr): Deleted.
2547 * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
2548 * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
2549 * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
2552 2015-06-17 Ryuan Choi <ryuan.choi@navercorp.com>
2554 [EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
2555 https://bugs.webkit.org/show_bug.cgi?id=146075
2557 Reviewed by Carlos Garcia Campos.
2559 Since r185553, CustomProtocolManager sends StartLoading message to UIProcess
2560 with request of SoupGenericRequest instead of request itself.
2561 But, request of SoupGenericRequest is nullptr in EFL port because EFL port
2562 does not use m_initiatingPageID.
2564 This patch updates request of SoupGenericRequest although m_initiatingPageID is null.
2566 * platform/network/soup/ResourceRequestSoup.cpp:
2567 (WebCore::ResourceRequest::updateSoupRequest):
2569 2015-06-17 Daniel Bates <dabates@apple.com>
2571 Client may receive began editing callback for already focused text field
2572 https://bugs.webkit.org/show_bug.cgi?id=146074
2573 <rdar://problem/21293562>
2575 Reviewed by Darin Adler.
2577 Fixes an issue where the client would be notified that began editing in a text field
2578 for each programmatic DOM focus event dispatched at the text field regardless of
2579 whether the field was focused. The client should only be notified that began editing
2580 exactly once when a text field becomes focused (either programmatically or by user interaction).
2582 * html/TextFieldInputType.cpp:
2583 (WebCore::TextFieldInputType::forwardEvent): Move logic to dispatch editing began callback from here...
2584 (WebCore::TextFieldInputType::handleFocusEvent): to here. This function is called when the
2585 text field becomes newly focused.
2586 * html/TextFieldInputType.h:
2588 2015-06-17 Alex Christensen <achristensen@webkit.org>
2590 [Content Extensions] Fail to parse invalid arrays
2591 https://bugs.webkit.org/show_bug.cgi?id=146079
2592 rdar://problem/21422649
2594 Reviewed by Benjamin Poulain.
2596 Covered by new and corrected API tests.
2598 * contentextensions/ContentExtensionParser.cpp:
2599 (WebCore::ContentExtensions::loadTrigger):
2600 Fail to parse invalid arrays for if-domain, unless-domain, resource-type, and load-type arrays.
2602 2015-06-16 Jon Honeycutt <jhoneycutt@apple.com>
2604 Position::findParent() should take a reference
2605 https://bugs.webkit.org/show_bug.cgi?id=146038
2607 Reviewed by Darin Adler.
2610 (WebCore::Position::containerNode):
2611 (WebCore::Position::parentAnchoredEquivalent):
2612 Pass a reference; there is already a null check.
2613 (WebCore::Position::previous):
2614 Add a missing null check. Code below this expects that node is non-null.
2615 (WebCore::Position::next):
2617 (WebCore::Position::atStartOfTree):
2618 (WebCore::Position::atEndOfTree):
2620 (WebCore::Position::findParent):
2621 Changed to take a reference.
2626 2015-06-17 Brent Fulgham <bfulgham@apple.com>
2628 Overflow regions with scroll snap points are not reliably rubber banding
2629 https://bugs.webkit.org/show_bug.cgi?id=142522
2630 <rdar://problem/20100726>
2632 Reviewed by Darin Adler.
2634 When computing the target scroll destination, update the nearest snap point index
2635 and other bookkeeping, but keep the original gesture target if it would have taken
2636 us beyond either limit of the scroll container.
2638 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2639 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2640 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtents): Add new method
2641 to support client API.
2642 * platform/ScrollAnimator.cpp:
2643 (WebCore::ScrollAnimator::scrollExtents): Add new method to support client API.
2644 * platform/ScrollAnimator.h:
2645 * platform/cocoa/ScrollController.h:
2646 (WebCore::ScrollControllerClient::scrollExtents): Added new pure virtual method to API.
2647 * platform/cocoa/ScrollController.mm:
2648 (WebCore::ScrollController::beginScrollSnapAnimation): Hold onto original user gesture
2649 target, and use that instead of our nearest snap point if the gesture takes us past
2650 either extreme of the scroll container.
2652 2015-06-17 Tim Horton <timothy_horton@apple.com>
2654 Swipe gesture can get stuck, preventing scrolling and other gestures
2655 https://bugs.webkit.org/show_bug.cgi?id=146088
2656 <rdar://problem/16056087>
2658 Reviewed by Darin Adler.
2660 * WebCore.xcodeproj/project.pbxproj:
2661 * platform/spi/mac/NSEventSPI.h: Added.
2664 2015-06-16 Matt Rajca <mrajca@apple.com>
2666 MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
2667 https://bugs.webkit.org/show_bug.cgi?id=146028
2669 Reviewed by Darin Adler.
2671 * Modules/mediasession/MediaRemoteControls.idl: Added nexttrack/previoustrack event handlers.
2672 * Modules/mediasession/MediaSession.cpp: Dispatch the nexttrack/previoustrack events.
2673 (WebCore::MediaSession::skipToNextTrack):
2674 (WebCore::MediaSession::skipToPreviousTrack):
2675 * Modules/mediasession/MediaSession.h:
2676 * Modules/mediasession/MediaSessionManager.cpp: Skip to the next/previous track as described in the media session spec.
2677 (WebCore::MediaSessionManager::skipToNextTrack):
2678 (WebCore::MediaSessionManager::skipToPreviousTrack):
2679 * Modules/mediasession/MediaSessionManager.h:
2680 * dom/EventNames.h: Added the nexttrack/previoustrack event names.
2681 * page/Page.cpp: Tell MediaSessionManager to handle the new track-skipping events.
2682 (WebCore::Page::handleMediaEvent):
2684 2015-06-17 Chris Fleizach <cfleizach@apple.com>
2686 AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
2687 https://bugs.webkit.org/show_bug.cgi?id=146066
2689 Reviewed by Darin Adler.
2691 Allow the region role to identify as a landmark type.
2693 Updated test: platform/ios-simulator/accessibility/landmark-types.html
2695 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2696 (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
2698 2015-06-17 Simon Fraser <simon.fraser@apple.com>
2700 REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
2701 https://bugs.webkit.org/show_bug.cgi?id=146073
2702 rdar://problem/21022203
2704 Reviewed by Tim Horton.
2706 Text controls (text inputs and textareas) need backing store even when empty, because
2707 they need to be able to paint a caret.
2709 Test: compositing/backing/form-controls-backing.html
2711 * rendering/RenderLayerBacking.cpp:
2712 (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2714 2015-06-17 Zalan Bujtas <zalan@apple.com>
2716 Selection cache produces invalid result when ancestor has float element.
2717 https://bugs.webkit.org/show_bug.cgi?id=146042
2718 rdar://problem/20604592
2720 Reviewed by Ryosuke Niwa.
2722 Selection cache already takes floats into account, however it's not enough to check current
2723 block against floats. Any of the ancestor's float starting from the selection root block
2724 can impact the selection offsets.
2726 Test: fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html
2728 * rendering/LogicalSelectionOffsetCaches.h:
2729 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
2730 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
2731 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block):
2732 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache):
2733 (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads):
2734 (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2736 2015-06-17 Joanmarie Diggs <jdiggs@igalia.com>
2738 AX: [ATK] Expose element tag name as an object attribute
2739 https://bugs.webkit.org/show_bug.cgi?id=146062
2741 Reviewed by Mario Sanchez Prada.
2743 Expose the element tag name as an object attribute with name "tag" and
2744 value being the lowercase tag name, both being what Gecko does for ATK.
2746 No new tests. We already have sufficient coverage for AtkObject attributes.
2747 These tests have been updated to reflect the addition of the new attribute.
2749 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2750 (webkitAccessibleGetAttributes):
2752 2015-06-17 Antti Koivisto <antti@apple.com>
2754 iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
2755 https://bugs.webkit.org/show_bug.cgi?id=146072
2756 rdar://problem/21149759
2758 Reviewed by Simon Fraser
2760 There are some scenarios where we end up drawing without web lock due to client or system issues.
2761 This can cause crashes.
2763 * platform/ios/LegacyTileLayer.mm:
2764 (-[LegacyTileLayer setNeedsDisplayInRect:]):
2765 (-[LegacyTileLayer drawInContext:]):
2767 Ensure we have the web lock when called in main thread (even though we should have it already).
2769 2015-06-17 Brent Fulgham <bfulgham@apple.com>
2771 CSS scroll snap: defining snap points on axis that does not scroll does not work properly
2772 https://bugs.webkit.org/show_bug.cgi?id=146043
2773 <rdar://problem/20125511>
2775 Reviewed by Simon Fraser.
2777 Tested by css3/scroll-snap/scroll-snap-mismatch.html
2779 We always seed the set of scroll snap points with the start and end of the scroll container. This is not
2780 the right behavior if there are no scroll points defined, because we end up creating a snap for the start
2781 and end of the container, and any scroll gesture just takes us across the entire element.
2783 Instead, when we do not find any scroll snap points, we should clear the snap point state for the container.
2785 * page/scrolling/AxisScrollSnapOffsets.cpp:
2786 (WebCore::updateFromStyle): If we did not find any snap points (i.e., the snapOffsets container
2787 only holds '0', return an empty Vector.
2788 (WebCore::updateSnapOffsetsForScrollableArea): If the set of snap points produced by 'updateFromStyle' is empty,
2789 clear the horizontal (or vertical) snap offsets for the scroll area.
2792 2015-06-17 Chris Fleizach <cfleizach@apple.com>
2794 AX: input role="spinbutton" gets skipped in voiceover
2795 https://bugs.webkit.org/show_bug.cgi?id=145514
2797 Reviewed by Mario Sanchez Prada.
2799 SpinButton role was added, but left out of iOS.
2800 To prevent this from happening again, explicitly list every role in the switch statement that
2801 determines accessible visibility.
2803 Test: platform/ios-simulator/accessibility/spinbutton.html
2805 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2806 (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2807 (-[WebAccessibilityObjectWrapper isAccessibilityElement]):
2809 2015-06-17 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2811 [Streams API] ReadableJSStream should handle promises returned by JS source pull callback
2812 https://bugs.webkit.org/show_bug.cgi?id=145965
2814 Reviewed by Darin Adler.
2816 Implemented asynchronous pulling.
2817 In particular, ensuring that doPull is not called as long as previous call to doPull is finished.
2818 Storing whether to pull automatically when the current pull is finished.
2820 Covered by rebased tests.
2822 * Modules/streams/ReadableStream.cpp:
2823 (WebCore::ReadableStream::pull): stores whether to pull again.
2824 (WebCore::ReadableStream::finishPulling): called when pulling finishes.
2825 * Modules/streams/ReadableStream.h:
2826 * bindings/js/ReadableJSStream.cpp:
2827 (WebCore::createPullResultFulfilledFunction): The promise resolve callback.
2828 (WebCore::ReadableJSStream::doPull): Handling of promise.
2829 * bindings/js/ReadableJSStream.h:
2831 2015-06-16 Carlos Garcia Campos <cgarcia@igalia.com>
2833 WebProcess crashes after too many redirect error when there's an active NPAPI plugin
2834 https://bugs.webkit.org/show_bug.cgi?id=146019
2836 Reviewed by Darin Adler.
2838 This happens with the GTK+ port after a navigation action ends up
2839 in an infinite redirection and the ResourceHandle fails with too
2840 many redirections error. I should actually happen after any error
2841 is reported by the ResourceHnalder before the load is
2842 committed. But tt only happens if there's an active NPAPI
2843 plugin. The problem is that FrameLoader::receivedMainResourceError()
2844 is called recursively because DocumentLoader::stopLoading() ends up
2845 calling mainReceivedError() that calls FrameLoader::receivedMainResourceError()
2846 again. DocumentLoader::stopLoading() checks if the document is
2847 still loading, which can happen if the main resource is loading,
2848 if there's any subresource loading or if there's a plugin
2849 loading. So, in case of being loading, those cases are handled
2850 individually to cancel the main resource, or set an error in the
2851 document loader and cancel subresources and plugins, except for
2852 this case of plugins, that mainReceivedError is called instead of
2853 setting cancelled error on the document loader.
2855 * loader/DocumentLoader.cpp:
2856 (WebCore::DocumentLoader::stopLoading): If the document is still
2857 loading because there are active plugins, set the cancelled error
2858 on the document instead of calling mainReceivedError again.
2860 2015-06-16 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
2862 [Streams API] Implement ReadableStream locked property
2863 https://bugs.webkit.org/show_bug.cgi?id=146023
2865 Reviewed by Darin Adler.
2867 Covered by rebased tests.
2869 * Modules/streams/ReadableStream.h:
2870 (WebCore::ReadableStream::locked): Renamed isLocked by locked.
2871 * Modules/streams/ReadableStream.idl: Adding locked.
2872 * bindings/js/JSReadableStreamCustom.cpp:
2873 (WebCore::JSReadableStream::getReader): Using isLocked.
2874 * bindings/js/JSReadableStreamReaderCustom.cpp:
2875 (WebCore::constructJSReadableStreamReader): Using isLocked.
2877 2015-06-16 Myles C. Maxfield <mmaxfield@apple.com>
2879 REGRESSION(r184899): [Cocoa] font-variant: small-caps is not honored with web fonts
2880 https://bugs.webkit.org/show_bug.cgi?id=145873
2881 <rdar://problem/21314282>
2883 Reviewed by Dean Jackson.
2885 When font-variant: small-caps is applied, we create a smaller version of the original font
2886 and draw capital characters in that smaller font. CGFontRefs do not have an intrinsic size,
2887 and web fonts historically only had a CGFontRef, which means that there was no need to
2888 convert the CGFontRef to be smaller (as opposed to regular fonts, which had a CTFontRef and
2889 therefore needed the conversion). Instead, we just changed m_size, which represents
2890 the size that the text should be drawn in.
2892 However, r184899 gave CTFontRefs to web fonts. This means that now the FontPlatformData's
2893 m_size variable disagreed with the CTFontRef member. The solution here is to unify the web
2894 font and regular font codepaths, and treat them the same throughout.
2896 Note that this patch removes the last use of the m_isCustomFont variable. As soon as we
2897 entirely migrate to CORETEXT_WEB_FONTS, we should delete this variable.
2899 Test: fast/text/small-caps-web-font.html
2901 * platform/graphics/cocoa/FontCocoa.mm:
2902 (WebCore::Font::platformCreateScaledFont): Treat web fonts the same as regular fonts.
2903 * platform/text/TextFlags.h: Add a comment regarding teh deletion of m_isCustomFont.
2905 2015-06-16 Alex Christensen <achristensen@webkit.org>
2907 [Content Extensions] Implement branch compaction for DFA bytecode.
2908 https://bugs.webkit.org/show_bug.cgi?id=145619
2910 Reviewed by Benjamin Poulain.
2912 This patch adds another pass to the DFABytecodeCompiler which finds where the bytecode from each node
2913 would be if it were compiled with no branch compaction, then uses that as a worst-case value to determine
2914 how many bytes are needed to store the relative jump distance. Then when linking, it will fill in the
2915 value as it already did, but with a variable size jump. The jumps are also now signed distances relative to
2916 where the jump is stored.
2918 This patch is covered by existing tests, which have many jumps that are near the -128/127 byte boundary,
2919 and the switch from 16-bit jumps to 32-bit jumps near the -65536/65535 byte boundary is analogous.
2921 * contentextensions/ContentExtensionCompiler.cpp:
2922 (WebCore::ContentExtensions::compileRuleList):
2923 * contentextensions/DFABytecode.h:
2924 (WebCore::ContentExtensions::smallestPossibleJumpSize):
2925 (WebCore::ContentExtensions::instructionSizeWithArguments):
2926 * contentextensions/DFABytecodeCompiler.cpp:
2927 (WebCore::ContentExtensions::append):
2928 (WebCore::ContentExtensions::appendZeroes):
2929 (WebCore::ContentExtensions::setBits):
2930 (WebCore::ContentExtensions::appendActionBytecodeSize):
2931 (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
2932 (WebCore::ContentExtensions::DFABytecodeCompiler::longestPossibleJump):
2933 (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
2934 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
2935 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
2936 (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
2937 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2938 (WebCore::ContentExtensions::DFABytecodeCompiler::compiledNodeMaxBytecodeSize):
2939 (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
2940 (WebCore::ContentExtensions::DFABytecodeCompiler::checkForRangeMaxBytecodeSize):
2941 (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
2942 (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
2943 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
2944 (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2945 (WebCore::ContentExtensions::set32Bits): Deleted.
2946 * contentextensions/DFABytecodeCompiler.h:
2947 * contentextensions/DFABytecodeInterpreter.cpp:
2948 (WebCore::ContentExtensions::getBits):
2949 (WebCore::ContentExtensions::getInstruction):
2950 (WebCore::ContentExtensions::jumpSizeInBytes):
2951 (WebCore::ContentExtensions::getJumpSize):
2952 (WebCore::ContentExtensions::getJumpDistance):
2953 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
2954 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
2955 (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
2956 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2957 * loader/ResourceLoadInfo.h:
2959 2015-06-16 Carlos Alberto Lopez Perez <clopez@igalia.com>
2961 [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
2962 https://bugs.webkit.org/show_bug.cgi?id=145701
2964 Reviewed by Darin Adler.
2966 No new tests, no behavior changes.
2968 When building both targets, we have to include the wayland-egl
2969 headers in order to build the Wayland target. This causes that
2970 EGLNativePixmapType and EGLNativeWindowType get defined as
2971 different types than when building only the X11 target.
2973 By type casting them to the ones that are expected, we are able
2974 to build both targets at the same time.
2976 I have done tests (building each target alone as also both targets
2977 at the same time), and everything seems to works as expected.
2979 Once built for both targets, if you try to launch the MiniBrowser
2980 from inside a Wayland compositor (Weston on top of X for example),
2981 it will trigger the X11 target if the DISPLAY environment variable
2982 is set and the environment variable GDK_BACKEND is not set to wayland,
2983 otherwise it will trigger the Wayland target.
2985 * platform/graphics/GLContext.cpp:
2986 (WebCore::GLContext::createContextForWindow): Add type casts. We have
2987 to consider here two different type casts depending on the type of
2988 GLNativeWindowType to avoid a build failure on 32-bits platforms.
2989 The static_cast one was already beeing done as an implicit cast
2990 (from uint64_t to XID), the reinterpret_cast is the new one that
2991 we need to do only when building on both platforms.
2992 * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
2993 building both targets that is required for defining DefaultRootWindow().
2994 (WebCore::GLContextEGL::createPixmapContext): Add type cast.
2996 2015-06-15 Jon Honeycutt <jhoneycutt@apple.com>
2998 [iOS] Crash long pressing on <input type=file>
2999 https://bugs.webkit.org/show_bug.cgi?id=146009
3000 <rdar://problem/21234453>
3002 Reviewed by Ryosuke Niwa.
3005 (WebCore::Position::atStartOfTree):
3006 (WebCore::Position::atEndOfTree):
3007 Null check the container node before passing it to findParent().
3009 2015-06-15 Chris Fleizach <cfleizach@apple.com>
3011 AX: iOS accessibility tests are not running because we need WKTR support
3012 https://bugs.webkit.org/show_bug.cgi?id=145991
3014 Reviewed by Daniel Bates.
3016 Make some minor modifications to support notification handling in WKTR.
3018 * accessibility/ios/AXObjectCacheIOS.mm:
3019 (WebCore::AXObjectCache::postPlatformNotification):
3020 (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3021 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3022 (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
3023 (-[WebAccessibilityObjectWrapper description]):
3024 (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
3025 (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.
3027 2015-06-16 Mark Lam <mark.lam@apple.com>
3029 Use NakedPtr<Exception>& to return exception results.
3030 https://bugs.webkit.org/show_bug.cgi?id=145870
3032 Reviewed by Anders Carlsson and Filip Pizlo.
3034 No new WebCore tests because this functionality is already covered by existing tests.
3035 API tests added for WTF::NakedPtr.
3037 * bindings/js/JSCallbackData.cpp:
3038 (WebCore::JSCallbackData::invokeCallback):
3039 * bindings/js/JSCustomXPathNSResolver.cpp:
3040 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3041 * bindings/js/JSErrorHandler.cpp:
3042 (WebCore::JSErrorHandler::handleEvent):
3043 * bindings/js/JSEventListener.cpp:
3044 (WebCore::JSEventListener::handleEvent):
3045 * bindings/js/JSMainThreadExecState.cpp:
3046 (WebCore::JSMainThreadExecState::didLeaveScriptContext):
3047 (WebCore::functionCallHandlerFromAnyThread):
3048 (WebCore::evaluateHandlerFromAnyThread):
3049 * bindings/js/JSMainThreadExecState.h:
3050 (WebCore::JSMainThreadExecState::currentState):
3051 (WebCore::JSMainThreadExecState::call):
3052 (WebCore::JSMainThreadExecState::evaluate):
3053 * bindings/js/JSMutationCallback.cpp:
3054 (WebCore::JSMutationCallback::call):
3055 * bindings/js/ScheduledAction.cpp:
3056 (WebCore::ScheduledAction::executeFunctionInContext):
3057 * bindings/js/ScriptController.cpp:
3058 (WebCore::ScriptController::evaluateInWorld):
3059 * bindings/js/WorkerScriptController.cpp:
3060 (WebCore::WorkerScriptController::evaluate):
3061 (WebCore::WorkerScriptController::setException):
3062 * bindings/js/WorkerScriptController.h:
3063 (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
3064 * bindings/objc/WebScriptObject.mm:
3065 (-[WebScriptObject callWebScriptMethod:withArguments:]):
3066 * workers/WorkerGlobalScope.cpp:
3067 (WebCore::WorkerGlobalScope::importScripts):
3069 2015-06-16 Brent Fulgham <bfulgham@apple.com>
3071 CSS Scroll Snap - support snapping to nested elements
3072 https://bugs.webkit.org/show_bug.cgi?id=145843
3073 <rdar://problem/21339581>
3075 Reviewed by Darin Adler.
3077 Tested by css3/scroll-snap/nested-elements.html
3079 The Scroll Snap Point implementation was not properly handling nested elements.
3080 This could be resolved by recursively calling 'appendChildSnapOffsets', but this
3081 seemed like an inefficient approach, especially considering how often this method
3082 is called during various scaling and other operations.
3084 Instead, do the following:
3085 (1) Add a new HashSet to RenderView that holds a collection of RenderElements that
3086 have scroll-snap-coordinates.
3087 (2) During RenderElement::styleWillChange, register all elements that have the
3088 scroll-snap-coordinates style with the RenderView.
3089 (3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
3090 subset of these entries relevant to the current scrolling container, and build up the
3091 set of scroll-snap-coordinates needed for the current scrolling container.
3093 * page/scrolling/AxisScrollSnapOffsets.cpp:
3094 (WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
3095 for the RenderView to find all elements that are children of the current scrolling container.
3096 Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
3097 * rendering/RenderElement.cpp:
3098 (WebCore::findEnclosingScrollableContainer): New helper function.
3099 (WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
3100 defined, remember it for later so we can use it with the relevant scrolling container
3101 after layout completes.
3102 (WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
3104 (WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
3105 scrolling container for the current object.
3106 * rendering/RenderElement.h:
3107 * rendering/RenderView.cpp:
3108 (WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
3109 (WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
3110 * rendering/RenderView.h:
3112 2015-06-16 Brady Eidson <beidson@apple.com>
3114 [IndexedDB] array index keys are concatenated across cursor lifetime
3115 <rdar://problem/19684902> and https://bugs.webkit.org/show_bug.cgi?id=138504
3117 Reviewed by Brady Eidson, patch by Mark Dixon <mark@lowla.io>
3120 storage/indexeddb/keypath-arrays.html
3122 IDBKeyData and IDBKeyPath need to clear any existing array values before calling
3123 decodeObjects to update the value of an existing object.
3125 * Modules/indexeddb/IDBKeyData.cpp:
3126 (WebCore::IDBKeyData::decode):
3127 * Modules/indexeddb/IDBKeyPath.cpp:
3128 (WebCore::IDBKeyPath::decode):
3130 2015-06-16 Said Abou-Hallawa <sabouhallawa@apple.com>
3132 Canvas dimensions should be limited to 4096x4096 pixels on iOS devices.
3133 https://bugs.webkit.org/show_bug.cgi?id=145998
3135 Reviewed by Darin Adler.
3137 The value of MaxCanvasArea should depend on the platform. If the platform
3138 is iOS, the limit should be 64M. Otherwise the limit should be 1G.
3140 Test: fast/canvas/pattern-too-large-to-create-2.html
3142 * html/HTMLCanvasElement.cpp: Change MaxCanvasArea value based on the platform.
3144 * rendering/svg/RenderSVGShape.h:
3145 (WebCore::RenderSVGShape::graphicsElement): Remove un-implemented constructor.
3147 2015-06-16 Chris Dumez <cdumez@apple.com>
3149 REGRESSION(r185012): chat frame in Gmail now says "Something's not right"
3150 https://bugs.webkit.org/show_bug.cgi?id=146025
3151 <rdar://problem/21391412>
3153 Reviewed by Darin Adler.
3155 Only throttle timers in non-visible iframes once they've reached the
3156 max nesting level to avoid throttling critical one-shot timers. This is
3157 consistent with the default DOMTimer throttling behavior that is
3158 defined in the specification.
3160 Power-wise, we are mostly interested in DOMTimers that fire frequently
3161 and cause high CPU usage over an extended period of time anyway.
3164 (WebCore::Document::setTimerThrottlingEnabled):
3165 (WebCore::Document::timerAlignmentInterval):
3167 * dom/ScriptExecutionContext.cpp:
3168 (WebCore::ScriptExecutionContext::timerAlignmentInterval):
3169 * dom/ScriptExecutionContext.h:
3170 * page/DOMTimer.cpp:
3171 (WebCore::DOMTimer::alignedFireTime):
3173 2015-06-16 sylvain-galineau <galineau@adobe.com>
3175 Incorrect order of arguments in initial-letter property
3176 https://bugs.webkit.org/show_bug.cgi?id=139667
3178 Reviewed by Sam Weinig.
3180 The CSS specification swapped the order of the initial-letters numeric values.
3181 The drop cap's height now comes first, followed by its optional vertical position.
3182 See http://www.w3.org/TR/css-inline/#sizing-drop-initials.
3184 No new tests. Existing tests updated.
3186 * css/CSSParser.cpp:
3187 (WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.
3189 2015-06-16 Alex Christensen <achristensen@webkit.org>
3191 Remove some unused values.
3192 https://bugs.webkit.org/show_bug.cgi?id=145997
3194 Reviewed by Gyuyoung Kim.
3196 This patch should have no change in behavior.
3198 * accessibility/AccessibilityObject.cpp:
3199 (WebCore::computeBestScrollOffset):
3200 (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
3201 (WebCore::AccessibilityObject::scrollToGlobalPoint):
3202 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3203 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3204 * html/canvas/WebGL2RenderingContext.cpp:
3205 (WebCore::WebGL2RenderingContext::validateTexFuncData):
3206 * html/canvas/WebGLRenderingContext.cpp:
3207 (WebCore::WebGLRenderingContext::validateTexFuncData):
3208 * platform/graphics/StringTruncator.cpp:
3209 (WebCore::leftTruncateToBuffer):
3210 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3211 (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
3212 * rendering/InlineTextBox.cpp:
3213 (WebCore::InlineTextBox::localSelectionRect):
3214 * rendering/RenderElement.cpp:
3215 (WebCore::RenderElement::anchorRect):
3216 * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3217 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3218 * rendering/svg/SVGTextQuery.cpp:
3219 (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
3220 Remove unused values.
3222 2015-06-16 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
3224 [Streams API] Calling controller.error() should trigger storing an undefined error
3225 https://bugs.webkit.org/show_bug.cgi?id=145976
3227 Reviewed by Darin Adler.
3229 Covered by rebased test.
3231 * bindings/js/JSReadableStreamControllerCustom.cpp:
3232 (WebCore::JSReadableStreamController::error): Storing undefined if no error value passed.
3233 * bindings/js/ReadableJSStream.cpp: Removed storeError(ExecState*).
3234 (WebCore::ReadableJSStream::ReadableJSStream):
3236 2015-06-16 Chris Dumez <cdumez@apple.com>
3238 Purge StyledElement's presentation attribute cache on memory pressure
3239 https://bugs.webkit.org/show_bug.cgi?id=145999
3240 <rdar://problem/21359252>
3242 Reviewed by Andreas Kling.
3244 Purge StyledElement's presentation attribute cache on memory pressure.
3246 * dom/StyledElement.cpp:
3247 (WebCore::presentationAttributeCache):
3248 (WebCore::presentationAttributeCacheCleaner):
3249 (WebCore::StyledElement::clearPresentationAttributeCache):
3250 * dom/StyledElement.h:
3251 * platform/MemoryPressureHandler.cpp:
3252 (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
3254 2015-06-15 Brent Fulgham <bfulgham@apple.com>
3256 REGRESSION(r175251, Mavericks Only): Playback may stall
3257 https://bugs.webkit.org/show_bug.cgi?id=145989
3258 <rdar://problem/21271919>
3260 Unreviewed post-review correction.
3262 Dave Kilzer pointed out that the macro around the waitForVideoOutputMediaDataWillChange
3263 call was incorrect. This patch corrects this error.
3265 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3266 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Correct the
3269 2015-06-15 Chris Fleizach <cfleizach@apple.com>
3271 AX: Changing state of radio buttons causes VoiceOver to go busy for a short time.
3272 https://bugs.webkit.org/show_bug.cgi?id=145933
3274 Reviewed by Dean Jackson.
3276 When radio buttons animate the new focus selection state, the thread activity looks a lot like short burst of
3277 activity to draw, then wait on CoreAnimation to apply those changes.
3279 Since those periods of activity during animation are so short, VoiceOver is not able to query for all the
3280 attributes it needs, and gets stuck in the queue behind rendering.
3282 The fix here is to turn off button state animations while VoiceOver is running.
3284 * platform/mac/ThemeMac.mm:
3285 (WebCore::updateStates):
3287 2015-06-15 Zalan Bujtas <zalan@apple.com>
3289 RootInlineBox::m_lineBreakObj becomes invalid when a child renderer is removed and the line does not get marked dirty.
3290 https://bugs.webkit.org/show_bug.cgi?id=145988
3291 rdar://problem/20959137
3293 Reviewed by David Hyatt.
3295 This patch ensures that we find the right first inline box so that we can dirty the
3296 the appropriate line boxes.
3297 With marking the right line boxes dirty, now we can update RootInlineBox::m_lineBreakObj at the next layout.
3299 Test: fast/inline/crash-when-child-renderer-is-removed-and-line-stays-clean.html
3301 * rendering/RenderInline.cpp:
3302 (WebCore::RenderInline::culledInlineFirstLineBox):
3303 (WebCore::RenderInline::culledInlineLastLineBox):
3304 * rendering/RootInlineBox.cpp:
3305 (WebCore::RootInlineBox::setLineBreakInfo): Deleted. Remove misleading assert and comment.
3307 2015-06-15 Matt Rajca <mrajca@apple.com>
3309 Media Session: Improve the safety of playback toggling
3310 https://bugs.webkit.org/show_bug.cgi?id=145986
3312 Reviewed by Darin Adler.
3314 * Modules/mediasession/MediaSession.cpp:
3315 (WebCore::MediaSession::togglePlayback): Improved the safety of the loop so that we don't re-visit elements that
3316 may have been deleted underneath us.
3317 * Modules/mediasession/MediaSession.h: Added a pointer to the set of iterated active participating elements so
3318 we can remove any elements that are deleted from the underlying "real" set.
3320 2015-06-15 Brent Fulgham <bfulgham@apple.com>
3322 REGRESSION(r175251, Mavericks Only): Playback may stall
3323 https://bugs.webkit.org/show_bug.cgi?id=145989
3324 <rdar://problem/21271919>
3326 Reviewed by Dean Jackson.
3328 Revert r175251 for Mavericks build targets.
3330 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3331 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
3332 (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
3333 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3335 2015-06-15 Darin Adler <darin@apple.com>
3337 REGRESSION (r182215): Reproducible crash at drawsvg.org due to reentrant layout
3338 https://bugs.webkit.org/show_bug.cgi?id=145964
3340 Reviewed by Simon Fraser.
3342 Test: svg/as-object/mutate-on-load.html
3344 * page/FrameView.cpp:
3345 (WebCore::FrameView::forceLayoutParentViewIfNeeded): Don't do a synchronous layout here,
3346 because it can lead indirectly to unwanted layout reentrancy. Instead schedule a layout.
3348 2015-06-15 Matt Rajca <mrajca@apple.com>
3350 Media Session: Active participating elements can change while being iterated
3351 https://bugs.webkit.org/show_bug.cgi?id=145978
3353 Reviewed by Alex Christensen.
3355 * Modules/mediasession/MediaSession.cpp:
3356 (WebCore::MediaSession::togglePlayback): Iterate through a copy of m_activeParticipatingElements since its contents
3357 can be modified in the loop.
3359 2015-06-15 Chris Fleizach <cfleizach@apple.com>
3361 AX: no accessibility support for details element
3362 https://bugs.webkit.org/show_bug.cgi?id=131111
3364 Reviewed by Darin Adler.
3366 Add accessibility support for Mac for details element by:
3367 1) Returning new subroles for <details> and <summary>
3368 2) Exposing isExpanded property for <details> element.
3370 Test: platform/mac/accessibility/details-summary.html
3372 * accessibility/AccessibilityObject.cpp:
3373 (WebCore::AccessibilityObject::supportsARIAPressed):
3374 (WebCore::AccessibilityObject::supportsExpanded):
3375 (WebCore::AccessibilityObject::isExpanded):
3376 (WebCore::AccessibilityObject::supportsARIAExpanded): Deleted.
3377 * accessibility/AccessibilityObject.h:
3378 (WebCore::AccessibilityObject::canvasHasFallbackContent):
3379 * accessibility/AccessibilityRenderObject.cpp:
3380 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3381 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3382 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3383 (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
3384 (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
3385 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3386 (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3387 (createAccessibilityRoleMap):
3388 (-[WebAccessibilityObjectWrapper subrole]):
3389 * html/HTMLDetailsElement.h:
3390 * inspector/InspectorDOMAgent.cpp:
3391 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3393 2015-06-15 Alex Christensen <achristensen@webkit.org>
3395 [Content Extensions] Limit number of rules.
3396 https://bugs.webkit.org/show_bug.cgi?id=145663
3398 Reviewed by Benjamin Poulain.
3400 Added an API test to make sure that parsing fails when there are too many rules.
3402 * contentextensions/ContentExtensionError.cpp:
3403 (WebCore::ContentExtensions::contentExtensionErrorCategory):