1 2015-03-04 Simon Fraser <simon.fraser@apple.com>
3 Clarify RenderElement::adjustStyleDifference()
4 https://bugs.webkit.org/show_bug.cgi?id=142256
6 Reviewed by David Hyatt.
8 Make RenderElement::adjustStyleDifference() clearer in two ways.
10 First, replace lots of if (diff < X) diff = X with
11 diff = std::max(diff, X). I did this even in cases where diff was
12 being set unconditionally, because it's never correct to change the diff
15 Second the "set at least SimplifiedLayout, but if we have PositionedMovementOnly
16 set it to SimplifiedLayoutAndPositionedMovement" was confusingly written.
18 * rendering/RenderElement.cpp:
19 (WebCore::RenderElement::adjustStyleDifference):
21 2015-03-04 David Kilzer <ddkilzer@apple.com>
23 Switch new soft-linking debug asserts to release asserts
24 <http://webkit.org/b/142176>
26 Reviewed by Alex Christensen.
28 * platform/mac/SoftLinking.h:
29 (SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
30 (SOFT_LINK_FUNCTION_SOURCE): Ditto.
31 * platform/win/SoftLinking.h:
32 (SOFT_LINK_CONSTANT_SOURCE): Ditto.
33 (SOFT_LINK_FUNCTION_SOURCE): Ditto. Note that this method is
34 effectively only called once because the function pointer is
35 replaced after the first time it's called.
37 2015-03-04 Alex Christensen <achristensen@webkit.org>
39 Optimize content extensions.
40 https://bugs.webkit.org/show_bug.cgi?id=142295
42 Reviewed by Benjamin Poulain.
44 * contentextensions/ContentExtensionCompiler.cpp:
45 (WebCore::ContentExtensions::serializeActions):
46 There is no need to add duplicate sequential actions.
47 * contentextensions/ContentExtensionRule.h:
48 (WebCore::ContentExtensions::Action::operator==):
49 Added to compare actions.
50 * contentextensions/ContentExtensionsBackend.cpp:
51 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
52 Return early if a block action is found instead of moving to the next extension.
54 2015-03-04 Commit Queue <commit-queue@webkit.org>
56 Unreviewed, rolling out r181046.
57 https://bugs.webkit.org/show_bug.cgi?id=142318
59 Broke two layout tests (Requested by sundiamonde on #webkit).
63 "Update inline media control icons for OSX."
64 https://bugs.webkit.org/show_bug.cgi?id=142305
65 http://trac.webkit.org/changeset/181046
67 2015-03-04 Timothy Horton <timothy_horton@apple.com>
69 <attachment> icons are low-resolution when transformed or under page scale
70 https://bugs.webkit.org/show_bug.cgi?id=142262
71 <rdar://problem/20035480>
73 Reviewed by Dean Jackson.
75 We should use Icon::createIconForFiles, just like <input type="file"> does,
76 instead of directly talking to IconServices. This results both in less code
77 and in NSImage's multiresolution magic making the icons sharp even under
78 the influence of transforms and page scale.
80 * WebCore.xcodeproj/project.pbxproj:
81 * platform/spi/mac/IconServicesSPI.h: Removed.
82 * platform/spi/mac/LaunchServicesSPI.h: Removed.
83 Get rid of IconServicesSPI.h and LaunchServicesSPI.h.
85 * platform/graphics/Icon.h:
86 Include RetainPtr just once.
87 paint() should take a GraphicsContext reference (null is not an option)
88 and a FloatRect (after all, it just turns around and converts to NSRect).
90 * platform/graphics/ios/IconIOS.mm:
91 (WebCore::Icon::paint):
92 * platform/graphics/mac/IconMac.mm:
93 (WebCore::Icon::createIconForFiles):
94 (WebCore::Icon::paint):
95 * platform/graphics/efl/IconEfl.cpp:
96 (WebCore::Icon::paint):
97 * platform/graphics/gtk/IconGtk.cpp:
98 (WebCore::Icon::paint):
99 * platform/graphics/win/IconWin.cpp:
100 (WebCore::Icon::paint):
101 Adapt to the paint() signature changes, fix some style, etc.
103 * rendering/RenderFileUploadControl.cpp:
104 (WebCore::RenderFileUploadControl::paintObject):
105 * rendering/RenderThemeIOS.mm:
106 (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
107 Adapt to the paint() signature changes.
109 * rendering/RenderThemeMac.mm:
110 (WebCore::paintAttachmentIcon):
111 Use Icon::createIconForFiles instead of IconServices.
113 2015-03-04 Tim Horton <timothy_horton@apple.com>
115 <attachment> should not appear selected when the cursor is adjacent to it
116 https://bugs.webkit.org/show_bug.cgi?id=142311
117 <rdar://problem/20045862>
119 Reviewed by Dean Jackson.
121 * rendering/RenderAttachment.cpp:
122 (WebCore::RenderAttachment::isSelected): Deleted.
123 * rendering/RenderAttachment.h:
124 * rendering/RenderThemeMac.mm:
125 (WebCore::titleTextColorForAttachment):
126 (WebCore::RenderThemeMac::paintAttachment):
127 (WebCore::labelTextColorForAttachment): Deleted.
128 We were using the wrong (and far too complicated) mechanism to determine
129 if the attachment is selected (to decide which highlight color to use).
130 Instead, just check selectionState().
132 2015-03-04 Timothy Horton <timothy_horton@apple.com>
134 <attachment> should show the file size as detail text below the icon
135 https://bugs.webkit.org/show_bug.cgi?id=142261
136 <rdar://problem/20009570>
138 Reviewed by Dean Jackson.
140 Test: fast/attachment/attachment-subtitle.html
142 * html/HTMLAttachmentElement.cpp:
143 (WebCore::HTMLAttachmentElement::setFile):
144 (WebCore::HTMLAttachmentElement::parseAttribute):
145 * html/HTMLAttachmentElement.h:
146 Let RenderAttachment know when the subtitle attribute changes.
148 * html/HTMLAttributeNames.in:
149 Add a subtitle attribute.
151 * rendering/RenderAttachment.cpp:
152 (WebCore::RenderAttachment::invalidate):
153 (WebCore::RenderAttachment::representedFileChanged): Deleted.
154 * rendering/RenderAttachment.h:
155 Rename representedFileChanged to invalidate; it will cause layout and
156 repaint of the attachment. Mostly for use from HTMLAttachmentElement,
157 when properties that affect the display and/or intrinsic size change.
159 * rendering/RenderThemeMac.mm:
160 (WebCore::attachmentTitleInactiveBackgroundColor):
161 (WebCore::attachmentTitleInactiveTextColor):
162 (WebCore::attachmentSubtitleTextColor):
163 (WebCore::titleTextColorForAttachment):
164 (WebCore::AttachmentLayout::addTitleLine):
165 (WebCore::AttachmentLayout::layOutTitle):
166 (WebCore::AttachmentLayout::layOutSubtitle):
167 (WebCore::AttachmentLayout::AttachmentLayout):
168 (WebCore::addAttachmentTitleBackgroundRightCorner):
169 (WebCore::addAttachmentTitleBackgroundLeftCorner):
170 (WebCore::paintAttachmentTitleBackground):
171 (WebCore::paintAttachmentTitle):
172 (WebCore::paintAttachmentSubtitle):
173 (WebCore::RenderThemeMac::paintAttachment):
174 (WebCore::attachmentLabelInactiveBackgroundColor): Deleted.
175 (WebCore::attachmentLabelInactiveTextColor): Deleted.
176 (WebCore::labelTextColorForAttachment): Deleted.
177 (WebCore::AttachmentLayout::addLine): Deleted.
178 (WebCore::AttachmentLayout::layOutLabel): Deleted.
179 (WebCore::addAttachmentLabelBackgroundRightCorner): Deleted.
180 (WebCore::addAttachmentLabelBackgroundLeftCorner): Deleted.
181 (WebCore::paintAttachmentLabelBackground): Deleted.
182 (WebCore::paintAttachmentLabel): Deleted.
183 Rename everything "label" to "title" (except LabelLine, which is not
184 specifically about the title). We're going to use "title" for the
185 main text below the icon, and "subtitle" for the secondary text below that.
187 Avoid keeping the CTFonts on the AttachmentLayout; there's no need for it.
189 Add layOutSubtitle and paintAttachmentSubtitle, which orient and paint
190 the subtitle (below the title, in blue, smaller than the label).
192 2015-03-04 David Kilzer <ddkilzer@apple.com>
194 [Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining CMSampleBuffer
198 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
199 <http://webkit.org/b/141870>
201 * platform/cf/CoreMediaSoftLink.cpp:
202 * platform/cf/CoreMediaSoftLink.h:
203 - Remove include of <CoreMedia/CoreMedia.h> here. These already
204 include CoreMediaSPI.h.
205 * platform/spi/cf/CoreMediaSPI.h:
206 - Add include of <CoreMedia/CoreMedia.h> here.
207 - Remove redundant include of <CoreMedia/CMTime.h> for Windows.
209 2015-03-04 David Kilzer <ddkilzer@apple.com>
211 [iOS] Fix build with newer clang due to duplicate macro definition
215 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
216 <http://webkit.org/b/141870>
218 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
219 Remove duplicate kCMTimeIndefinite macro.
221 2015-03-04 Roger Fong <roger_fong@apple.com>
223 Update inline media control icons for OSX.
224 https://bugs.webkit.org/show_bug.cgi?id=142305.
225 <rdar://problem/19997484>
227 Reviewed by Dean Jackson.
229 Changes include: new volume button, new full screen button, new play/pause button.
230 Repositioning of 30 second and play buttons.
231 * Modules/mediacontrols/mediaControlsApple.css:
232 (audio::-webkit-media-controls-panel button):
233 (audio::-webkit-media-controls-rewind-button):
234 (audio::-webkit-media-controls-play-button):
235 (audio::-webkit-media-controls-play-button.paused):
236 (audio::-webkit-media-controls-panel .mute-box):
237 (video::-webkit-media-controls-volume-max-button):
238 (video::-webkit-media-controls-volume-min-button):
239 (audio::-webkit-media-controls-toggle-closed-captions-button):
240 (audio::-webkit-media-controls-fullscreen-button):
241 (audio::-webkit-media-controls-current-time-display):
242 * Modules/mediacontrols/mediaControlsApple.js:
243 (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
244 (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
245 (Controller.prototype.updateVolume): Ditto
247 2015-03-04 Andy Estes <aestes@apple.com>
249 [Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
250 https://bugs.webkit.org/show_bug.cgi?id=142313
252 Reviewed by Anders Carlsson.
254 ContentFilterMac.mm no longer contains any Objective-C code, so rename it to ContentFilter.cpp. It is also no longer Mac-specific, so move it up to platform/.
256 * WebCore.xcodeproj/project.pbxproj:
257 * platform/ContentFilter.cpp: Renamed from Source/WebCore/platform/mac/ContentFilterMac.mm.
258 * platform/cocoa/NetworkExtensionContentFilter.h: Replaced NSInteger with long.
260 2015-03-04 Dean Jackson <dino@apple.com>
262 REGRESSION (r179597): Can't see power saver banner for plugins
263 https://bugs.webkit.org/show_bug.cgi?id=142312
264 <rdar://problem/20040517>
266 Reviewed by Brent Fulgham.
268 We were being a bit too restrictive when deciding a child
269 should not create a renderer. All shadow root children
270 of the snapshotted plugin need one.
272 * html/HTMLPlugInImageElement.cpp:
273 (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
274 Test if we're part of the shadow tree.
276 2015-03-03 Andy Estes <aestes@apple.com>
278 [Content Filtering] Make it easier to add new content filters
279 https://bugs.webkit.org/show_bug.cgi?id=142255
281 Reviewed by Sam Weinig.
283 ContentFilter was becoming a bit of a mess, with both the WebFilterEvaluator and NEFilterSource implementations
284 awkwardly living side-by-side. This patch cleans things up by moving these implementations into two separate
285 classes and turning ContentFilter itself into an abstract interface that each implements. A new class called
286 ContentFilterCollection, which also inherits from ContentFilter, manages the collection of individual content
287 filters and is vended to the rest of the system by ContentFilter::createIfNeeded().
289 This refactoring will make it easier to add a third type of content filter in a follow-on patch, namely a mock
290 content filter for testing purposes.
292 * WebCore.xcodeproj/project.pbxproj:
293 * loader/DocumentLoader.cpp:
294 (WebCore::DocumentLoader::responseReceived): Called ContentFilter::createIfNeeded() instead of instantiating a ContentFilter directly.
295 * platform/ContentFilter.h:
296 (WebCore::ContentFilter::~ContentFilter):
297 * platform/cocoa/NetworkExtensionContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
298 * platform/cocoa/NetworkExtensionContentFilter.mm: Added.
299 (WebCore::NetworkExtensionContentFilter::canHandleResponse): Moved NEFilterSource code from ContentFilterMac.mm to here.
300 (WebCore::NetworkExtensionContentFilter::create): Ditto.
301 (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Ditto.
302 (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Ditto.
303 (WebCore::NetworkExtensionContentFilter::addData): Ditto.
304 (WebCore::NetworkExtensionContentFilter::finishedAddingData): Ditto.
305 (WebCore::NetworkExtensionContentFilter::needsMoreData): Ditto.
306 (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
307 (WebCore::NetworkExtensionContentFilter::getReplacementData): Ditto.
308 (WebCore::NetworkExtensionContentFilter::unblockHandler): Ditto.
309 * platform/cocoa/ParentalControlsContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
310 * platform/cocoa/ParentalControlsContentFilter.mm: Added.
311 (WebCore::ParentalControlsContentFilter::canHandleResponse): Moved WebFilterEvaluator code from ContentFilterMac.mm to here.
312 (WebCore::ParentalControlsContentFilter::create): Ditto.
313 (WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Ditto.
314 (WebCore::ParentalControlsContentFilter::addData): Ditto.
315 (WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
316 (WebCore::ParentalControlsContentFilter::needsMoreData): Ditto.
317 (WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
318 (WebCore::ParentalControlsContentFilter::getReplacementData): Ditto.
319 (WebCore::ParentalControlsContentFilter::unblockHandler): Ditto.
320 * platform/mac/ContentFilterMac.mm:
321 (WebCore::contentFilterType): Added a helper function template that creates a new ContentFilterType.
322 (WebCore::contentFilterTypes): Registered a ContentFilterType for each type of content filter.
323 (WebCore::ContentFilter::createIfNeeded): Created a ContentFilterCollection containing each content filter that can handle the given response.
324 (WebCore::ContentFilterCollection::ContentFilterCollection): Constructs a ContentFilterCollection given a Vector of content filters.
325 (WebCore::ContentFilterCollection::addData): Forwarded the call to each content filter in m_contentFilters.
326 (WebCore::ContentFilterCollection::finishedAddingData): Ditto.
327 (WebCore::ContentFilterCollection::needsMoreData): Ditto.
328 (WebCore::ContentFilterCollection::didBlockData): Ditto.
329 (WebCore::ContentFilterCollection::getReplacementData): Returned replacement data for the first filter that blocked the load.
330 If no filter blocked the load, returned the first filter's replacement data.
331 (WebCore::ContentFilterCollection::unblockHandler): Returned the unblock handler for the first filter that blocked the load.
332 (WebCore::ContentFilter::ContentFilter): Deleted.
333 (WebCore::ContentFilter::~ContentFilter): Deleted.
334 (WebCore::ContentFilter::canHandleResponse): Deleted.
335 (WebCore::ContentFilter::addData): Deleted.
336 (WebCore::ContentFilter::finishedAddingData): Deleted.
337 (WebCore::ContentFilter::needsMoreData): Deleted.
338 (WebCore::ContentFilter::didBlockData): Deleted.
339 (WebCore::ContentFilter::getReplacementData): Deleted.
340 (WebCore::ContentFilter::unblockHandler): Deleted.
342 2015-03-04 David Kilzer <ddkilzer@apple.com>
344 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
345 <http://webkit.org/b/141870>
347 Reviewed by Alex Christensen.
349 * Configurations/WebCore.unexp:
350 - Remove all weak symbols for CoreMedia.framework as they should
353 * Modules/plugins/QuickTimePluginReplacement.mm:
354 * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
355 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
356 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
359 * platform/cf/CoreMediaSoftLink.cpp:
360 * platform/cf/CoreMediaSoftLink.h:
361 - Add soft-link functions and constants from remaining source
364 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
365 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
366 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
367 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
368 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
369 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
370 * platform/mac/PlatformClockCM.mm:
371 * platform/mediastream/mac/AVMediaCaptureSource.mm:
372 * platform/mediastream/mac/AVVideoCaptureSource.mm:
373 - Switch to using CoreMediaSoftLink.h.
375 * platform/mac/SoftLinking.h:
376 * platform/win/SoftLinking.h:
377 - Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
378 macros since it won't work with const structs.
380 * platform/spi/cf/CoreMediaSPI.h:
381 - Add SPI declarations for Windows originally from
382 InbandTextTrackPrivateAVF.cpp.
384 2015-03-04 Commit Queue <commit-queue@webkit.org>
386 Unreviewed, rolling out r181001 and r181003.
387 https://bugs.webkit.org/show_bug.cgi?id=142307
389 Broke many tests (Requested by ap on #webkit).
393 "Make JavaScript binding get and set legacy event listener
395 https://bugs.webkit.org/show_bug.cgi?id=142282
396 http://trac.webkit.org/changeset/181001
398 "Update bindings tests after r181001."
399 http://trac.webkit.org/changeset/181003
401 2015-03-04 Roger Fong <roger_fong@apple.com>
403 Update elapsed/remaining time displays on media inline controls on OSX.
404 https://bugs.webkit.org/show_bug.cgi?id=142264.
405 <rdar://problem/19997487>
407 Reviewed by Dean Jackson.
409 Div surrounding times are set widths. A larger width is used for times that are
410 an hour or longer. Time elapsed is right justified. Time remaining is left justified.
411 Times are displayed in 11pt Helvetica Neue.
412 * Modules/mediacontrols/mediaControlsApple.css:
413 (audio::-webkit-media-controls-time-remaining-display):
414 (audio::-webkit-media-controls-current-time-display):
415 (audio::-webkit-media-controls-time-remaining-display.hour-long-time):
416 (audio::-webkit-media-controls-current-time-display.hour-long-time):
417 (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time):
418 (audio::-webkit-media-controls-current-time-display.ten-hour-long-time):
419 * Modules/mediacontrols/mediaControlsApple.js:
420 (Controller.prototype.updateDuration):
422 2015-03-04 Myles C. Maxfield <mmaxfield@apple.com>
424 Implement -apple-trailing-word: -apple-partially-balanced
425 https://bugs.webkit.org/show_bug.cgi?id=142253
427 Reviewed by David Hyatt.
429 This patch implements a history mechanism for line breaking. In particular, this patch partitions
430 the updates to the current line breaking location into two kinds: conceptually new breaking locations,
431 and fixups to existing locations. Then, this patch remembers all the fixed up breaking locations, up
432 to a maximum number of remembered locations.
434 The patch then uses this memory to change the line-breaking selection based on the rules of
435 -apple-trailing-word.
437 Test: fast/text/trailing-word.html
439 * rendering/line/BreakingContextInlineHeaders.h:
440 Use InlineIteratorHistory as a proxy for the current breaking location. Note that all these functions
441 are inlined, so the overhead should be next to nothing when -apple-trailing-word is not in use.
442 (WebCore::BreakingContext::BreakingContext): Use InlineIteratorHistory instead of InlineIterator
443 (WebCore::BreakingContext::lineBreak): Ditto.
444 (WebCore::BreakingContext::clearLineBreakIfFitsOnLine): Ditto
445 (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Ditto
446 (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Keeps track of historical
448 (WebCore::BreakingContext::InlineIteratorHistory::push): Remember a new breaking location
449 (WebCore::BreakingContext::InlineIteratorHistory::update): Update an existing breaking location
450 (WebCore::BreakingContext::InlineIteratorHistory::renderer): Forwarded to the current breaking location
451 (WebCore::BreakingContext::InlineIteratorHistory::offset): Ditto
452 (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator): Ditto
453 (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode): Ditto
454 (WebCore::BreakingContext::InlineIteratorHistory::get): Get one of the remembered breaking locations
455 (WebCore::BreakingContext::InlineIteratorHistory::current): Get the current breaking location
456 (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
457 (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Forwarded to the current breaking location.
458 (WebCore::BreakingContext::InlineIteratorHistory::increment): Ditto
459 (WebCore::BreakingContext::InlineIteratorHistory::clear): Ditto
460 (WebCore::BreakingContext::handleBR): Use InlineIteratorHistory instead of InlineIterator
461 (WebCore::BreakingContext::handleFloat): Ditto
462 (WebCore::BreakingContext::handleText): Use InlineIteratorHistory instead of InlineIterator
463 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Style
464 (WebCore::checkMidpoints): Use InlineIteratorHistory instead of InlineIterator
465 (WebCore::BreakingContext::handleEndOfLine): If -apple-trailing-word is in effect, use
466 optimalLineBreakLocationForTrailingWord().
467 (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Use the remembered breaking
468 locations and choose the optimal one.
469 (WebCore::BreakingContext::lineBreakRef): Deleted.
471 2015-03-04 Timothy Horton <timothy_horton@apple.com>
473 <attachment> title text disappears when dragging
474 https://bugs.webkit.org/show_bug.cgi?id=142263
475 <rdar://problem/20035515>
477 Reviewed by Sam Weinig.
479 * rendering/RenderThemeMac.mm:
480 (WebCore::RenderThemeMac::paintAttachment):
481 We use NSColors with CoreText, which requires that Cocoa knows the current
482 CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
483 Otherwise, sometimes (especially when dragging), it will try to apply the
484 text foreground color to a null context, complain to the system log, and fail
487 2015-03-04 Jer Noble <jer.noble@apple.com>
489 [Mac] YouTube playback at 1.5x speed has audible distortion
490 https://bugs.webkit.org/show_bug.cgi?id=142280
492 Reviewed by Eric Carlson.
494 Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the
495 AVSampleBufferAudioRenderer rather than its default value of
496 AVAudioTimePitchAlgorithmTimeDomain.
500 Might as well add support for MediaPlayer::setPreservesPitch() while we're
501 changing the audio pitch algorithm. If preservesPitch() is false use the
502 AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
503 (MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).
505 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
506 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
507 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
508 (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
509 (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
510 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
511 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
512 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
513 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
515 2015-03-04 Jer Noble <jer.noble@apple.com>
517 [MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
518 https://bugs.webkit.org/show_bug.cgi?id=142285
520 Reviewed by Eric Carlson.
522 When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
523 underlying AVStreamSession is invalidated, the decryption context for in-flight
524 CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
525 one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
526 the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
527 asynchronously the next time the layer needs new samples.
529 Add a workaround until framework-level support lands to fully flush enqueued and
532 When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
533 check to see if the session has been stopped. If so, and if the error in question is
534 one that indicates that the samples decryption context has been invalidated, suppress
535 the error and instruct the sender to suppress the error as well. This workaround will
536 be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>
538 Still, we'll make our best effort to flush undisplayed frames when our CDM session is
539 invalidated. Move away from std::map and instead use HashMap to store the set of
540 AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
541 the HashMap's set of values.
543 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
544 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
545 (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
546 (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
547 error code and bail before issuing the error.
548 (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
549 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
550 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
551 (-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
552 the layer is in the set of listened-to layers only back in the main thread; the
553 listnener may have been unregistered by the time the main thread was called.
554 (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
555 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
556 (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
557 (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
558 (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
559 (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
560 (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
561 (WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
562 layers and audio renderers.
563 (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
564 asked to ignore the error, and if so, bail.
565 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.
567 2015-03-04 Alex Christensen <achristensen@webkit.org>
569 Update bindings tests after r181001.
571 * bindings/scripts/test/JS/*.cpp:
572 Class names changed to auto.
574 2015-03-04 Brent Fulgham <bfulgham@apple.com>
576 [Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
577 https://bugs.webkit.org/show_bug.cgi?id=142284
579 Reviewed by David Kilzer.
581 Make DerivedSources.make understand its build dependency on FeatureDefines.props
582 when building on Windows:
583 1. Modify DerivedSources.make to declare a default dependency (on Windows)
584 to $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props.
585 2. Update the Windows script 'build-generated-files.pl' to specify the correct
586 FeatureDefines{Cairo}.props value to use, depending on build environment.
588 * DerivedSources.make:
589 * WebCore.vcxproj/build-generated-files.pl:
591 2015-03-04 Darin Adler <darin@apple.com>
593 Make JavaScript binding get and set legacy event listener attributes directly
594 https://bugs.webkit.org/show_bug.cgi?id=142282
596 Reviewed by Sam Weinig.
598 Test: fast/dom/legacy-event-handler-attributes.html
600 This patch changes the JavaScript getters and setters for these attributes
601 to work directly without requiring any functions in the C++ DOM implementation.
602 A subsequent patch will remove the now-unused C++ DOM implementation.
604 * bindings/js/JSEventListener.cpp:
605 (WebCore::legacyEventListenerAttribute): Added.
606 (WebCore::createEventListenerForLegacyAttribute): Added.
607 (WebCore::setLegacyEventListenerAttribute): Added.
608 (WebCore::legacyWindowEventListenerAttribute): Added.
609 (WebCore::setLegacyWindowEventListenerAttribute): Added.
611 * bindings/js/JSEventListener.h:
612 (WebCore::createJSEventListenerForAttribute): Deleted.
614 * bindings/scripts/CodeGeneratorJS.pm:
615 (GenerateAttributeEventListenerCall): Deleted.
616 (LegacyEventListenerAttributeEventName): Added.
617 (LegacyEventListenerAttributePrefix): Added.
618 (GenerateImplementation): Use "auto" in lots of places to simplify the code
619 generation. Replaced the old inlined code to deal with legacy event listener
620 attributes with code that simply calls the new functions from JSEventLister.h.
621 (GenerateCallWith): Use "auto".
622 (GenerateConstructorDefinition): Ditto.
624 2015-03-03 Sam Weinig <sam@webkit.org>
626 [Content Extensions] Split parsing and compiling of content extensions into their own files
627 https://bugs.webkit.org/show_bug.cgi?id=142259
629 Reviewed by Anders Carlsson.
632 ContentFilterTest.Basic
634 * WebCore.xcodeproj/project.pbxproj:
635 Add new files (CompiledContentExtension.h/cpp, ContentExtensionCompiler.h/cpp, and ContentExtensionParser.h/cpp)
637 * contentextensions/CompiledContentExtension.cpp: Added.
638 * contentextensions/CompiledContentExtension.h: Added.
639 Add new class for holding onto the compiled content extension itself. Make it ThreadSafeRefCounted so it is easy
640 to move between threads which will be important in a subsequent patch where we enable compilation on a background
643 * contentextensions/ContentExtensionCompiler.cpp: Added.
644 (WebCore::ContentExtensions::serializeActions):
645 (WebCore::ContentExtensions::compileRuleList):
646 * contentextensions/ContentExtensionCompiler.h: Added.
647 Moving compilation to its own file. Was previously in ContentExtensionsBackend. This is necessary because
648 we will want to be able to compile without the need of a backend.
650 * contentextensions/ContentExtensionParser.cpp: Copied from contentextensions/ContentExtensionsManager.cpp.
651 * contentextensions/ContentExtensionParser.h: Copied from contentextensions/ContentExtensionsManager.h.
652 Renamed ContentExtensionsManager to ContentExtensionParser, since that is all it is doing.
654 * contentextensions/ContentExtensionsBackend.cpp:
655 (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
656 (WebCore::ContentExtensions::ContentExtensionsBackend::removeContentExtension):
657 (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllContentExtensions):
658 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
659 (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions): Deleted.
660 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList): Deleted.
661 (WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList): Deleted.
662 (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists): Deleted.
663 * contentextensions/ContentExtensionsBackend.h:
664 Change the backend to use the new CompiledContentExtension and change the terminology to
665 reference content extensions, rather than rule lists.
667 * page/UserContentController.cpp:
668 (WebCore::UserContentController::addUserContentFilter):
669 (WebCore::UserContentController::removeUserContentFilter):
670 (WebCore::UserContentController::removeAllUserContentFilters):
671 Update for new names and change addUserContentFilter to explicitly compile the JSON
672 rule list before handing it to the backend. In subsequent changes, addUserContentFilter
673 should be changed to take the compiled content extension, and it should become the responsibility
674 of the called (WebKit) to create them.
676 2015-03-04 Philippe Normand <pnormand@igalia.com>
678 [GStreamer] the GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED should be wrapped by a ifdef
679 https://bugs.webkit.org/show_bug.cgi?id=142274
681 Reviewed by Carlos Garcia Campos.
683 Don't handle scheduling queries if building against versions of
684 GStreamer older than 1.2.0.
686 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
687 (webKitWebSrcQueryWithParent):
689 2015-03-03 Yoav Weiss <yoav@yoav.ws>
691 Add a microtask abstraction
692 https://bugs.webkit.org/show_bug.cgi?id=137496
694 Reviewed by Sam Weinig.
696 This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
697 That abstraction is required in order to enable async loading of images,
698 which is in turn required to enable support for the picture element, as well as
699 to make sure that the order of properties set on HTMLImageElement has no implications.
701 A similar patch was rolled back in r180914. This patch is an improved version.
703 * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
704 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
705 * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
706 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
707 * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
708 * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
709 * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
710 (WebCore::MicroTask::~MicroTask):
711 (WebCore::MicroTask::run): Run the microtask.
712 * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
713 (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
714 (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
715 (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
716 * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
717 (WebCore::ScriptRunner::timerFired):
718 * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
719 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
720 (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
721 (WebCore::HTMLScriptRunner::runScript):
722 * testing/Internals.cpp: Add a method to queue a test microtask.
723 (WebCore::Internals::queueMicroTask):
724 * testing/Internals.h: Add a method to queue a test microtask.
725 (WebCore::Internals::queueMicroTask):
726 * testing/Internals.idl: Expose test microtask queueing to test JS.
727 * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
728 (WebCore::MicroTaskTest::run): Run the microtask
729 (WebCore::MicroTaskTest::create): Create a test microtask.
730 * testing/MicroTaskTest.h: Add a test class that implements a microtask.
731 (WebCore::MicroTaskTest::run):
732 (WebCore::MicroTaskTest::create):
734 2015-03-03 Brent Fulgham <bfulgham@apple.com>
736 Scroll snap points are not supported on the main frame
737 https://bugs.webkit.org/show_bug.cgi?id=141973
738 <rdar://problem/19938393>
740 Reviewed by Simon Fraser.
742 No new tests. Tests will be added when the animation behavior is finalized. Manual tests are attached to the bug.
744 Update the ScrollingTreeFrameScrollingNodeMac class to implement the delegate interface needed by the
745 ScrollController. This involves the following:
746 1. Implement scrollOffsetOnAxis: Used by the AxisScrollAnimator to determine the current position of the ScrollableArea.
747 2. Implement immediateScrollOnAxis: Used by the AxisScrollAnimator to scroll the ScrollableArea
749 We also need to hold a copy of the snap points vector to send to the scrolling thread.
751 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
752 (WebCore::convertToLayoutUnits): Added helper function to match Scroll Snap Points API.
753 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Recognize and react to changes to
754 Scroll Snap Points on top-level frames.
755 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Implement delegate method needed by the ScrollController.
756 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
757 * platform/cocoa/ScrollController.h:
758 * platform/cocoa/ScrollController.mm:
759 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Pass snap offsets to AxisScrollSnapAnimator constructor as references.
760 (WebCore::ScrollController::updateScrollSnapPoints): Added. Used by ScrollingTreeFrameScrollingNodeMac to update scroll snap point
761 settings in the scrolling thread.
762 * platform/mac/AxisScrollSnapAnimator.h:
763 * platform/mac/AxisScrollSnapAnimator.mm:
764 (WebCore::toWheelEventStatus): Don't ignore the "MayBegin" or "Cancelled" event phases.
765 (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Revise signature to take a reference to the layout units.
766 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Handle the case where this method gets called from a thread
767 when the scrollable area has already reached its final destination.
768 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Handle the possibility that the snap offset point vector might be
769 empty. Update method to account for m_snapOffsets being a value, instead of a pointer.
771 2015-03-03 Andy Estes <aestes@apple.com>
773 [Content Filtering] Separate unblock handling into its own class
774 https://bugs.webkit.org/show_bug.cgi?id=142251
776 Reviewed by Andreas Kling.
778 Unblock handling is currently supported only for one type of content filter (WebFilterEvaluator) on one
779 platform (iOS). Having its implementation in ContentFilter is making it difficult to support other filters and
780 platforms, so let's separate unblock handling into its own class called ContentFilterUnblockHandler.
782 * WebCore.xcodeproj/project.pbxproj:
783 * loader/DocumentLoader.cpp:
784 (WebCore::DocumentLoader::finishedLoading): Passed a ContentFilterUnblockHandler to FrameLoaderClient::contentFilterDidBlockLoad.
785 (WebCore::DocumentLoader::dataReceived): Ditto.
786 * loader/FrameLoaderClient.h:
787 * platform/ContentFilter.h:
788 * platform/ContentFilterUnblockHandler.h: Copied from Source/WebCore/platform/ios/ContentFilterIOS.mm.
789 (WebCore::ContentFilterUnblockHandler::clear):
790 * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: Renamed from Source/WebCore/platform/ios/ContentFilterIOS.mm.
791 (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
792 (WebCore::ContentFilterUnblockHandler::encode):
793 (WebCore::ContentFilterUnblockHandler::decode):
795 (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful):
796 * platform/mac/ContentFilterMac.mm:
797 (WebCore::ContentFilter::unblockHandler):
798 (WebCore::ContentFilter::ContentFilter): Deleted.
799 (WebCore::ContentFilter::encode): Deleted.
800 (WebCore::ContentFilter::decode): Deleted.
802 2015-03-03 Alexey Proskuryakov <ap@apple.com>
804 [Mac] Track localized name follows locale instead of primary language
805 https://bugs.webkit.org/show_bug.cgi?id=142242
806 rdar://problem/20000365
808 Reviewed by Eric Carlson.
810 * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the
811 language for localization, as CFBundle does.
813 2015-03-03 Alex Christensen <achristensen@webkit.org>
815 [Win] Unreviewed build fix.
817 * WebCore.vcxproj/WebCoreIncludeCommon.props:
818 Include contentextensions subdirectory.
820 2015-03-03 Alex Christensen <achristensen@webkit.org>
822 Prepare to use CSS selectors in content extensions.
823 https://bugs.webkit.org/show_bug.cgi?id=142227
825 Reviewed by Benjamin Poulain.
827 Test: http/tests/usercontentfilter/css-display-none.html
830 * WebCore.xcodeproj/project.pbxproj:
831 * contentextensions/ContentExtensionActions.h: Added.
832 * contentextensions/ContentExtensionRule.cpp:
833 (WebCore::ContentExtensions::Action::deserialize):
834 * contentextensions/ContentExtensionRule.h:
835 (WebCore::ContentExtensions::Action::Action):
836 (WebCore::ContentExtensions::Action::type):
837 (WebCore::ContentExtensions::Action::cssSelector):
838 * contentextensions/ContentExtensionsBackend.cpp:
839 (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions):
840 Put action descriptions into a compact format in a Vector
841 to be able to be put into one block of shared read-only memory.
842 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
843 Put an index of the beginning of the description into the NFA instead of the index of the rule
844 because we will be sharing the descriptions of the actions and not the rules.
845 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
846 (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL): Deleted.
847 Return a vector of actions to be able to do multiple actions for one URL.
848 * contentextensions/ContentExtensionsBackend.h:
849 * contentextensions/ContentExtensionsManager.cpp:
850 (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
851 (WebCore::ContentExtensions::ExtensionsManager::loadAction):
852 Added the css-display-none action type, which requires a selector.
853 (WebCore::ContentExtensions::ExtensionsManager::loadRule):
854 * loader/cache/CachedResourceLoader.cpp:
855 (WebCore::CachedResourceLoader::requestResource):
856 * page/UserContentController.cpp:
857 (WebCore::UserContentController::actionsForURL):
858 (WebCore::UserContentController::actionForURL): Deleted.
859 * page/UserContentController.h:
861 2015-03-03 Brent Fulgham <bfulgham@apple.com>
863 Move scroll animating functions from ScrollAnimator to ScrollController
864 https://bugs.webkit.org/show_bug.cgi?id=142102
865 <rdar://problem/20007161>
867 Reviewed by Simon Fraser.
869 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html.
871 Do some refactoring of the various scrolling classes:
872 1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
873 and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
874 2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
875 3. Move code from ScrollAnimator{Mac} -> ScrollController.
876 4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
877 5. Rename immediateScrollInAxis -> immediateScrollOnAxis
879 * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
880 * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
881 events, just as is done for the "event not handled" case in EventHandler.cpp.
882 (WebCore::EventHandler::platformCompleteWheelEvent):
883 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
884 methods, now that ScrollController is controlling this state.
885 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
886 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
887 need to clean up the CFRunLoopTimer.
888 (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Make sure scroll
889 state is updated after rubber band snap.
890 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
891 until Bug1973 is completed.).
892 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
893 (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
894 * platform/ScrollAnimator.cpp:
895 (WebCore::ScrollAnimator::ScrollAnimator):
896 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
897 (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
898 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
899 (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
900 (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
901 (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
902 (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
903 (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
904 (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
905 (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
906 (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
907 * platform/ScrollAnimator.h:
908 * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
909 (WebCore::ScrollControllerClient::startSnapRubberbandTimer):
910 (WebCore::ScrollControllerClient::stopSnapRubberbandTimer):
911 (WebCore::ScrollControllerClient::startScrollSnapTimer):
912 (WebCore::ScrollControllerClient::stopScrollSnapTimer):
913 * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
914 (WebCore::ScrollController::ScrollController): Update to initialize new timers.
915 (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
916 (WebCore::ScrollController::startSnapRubberbandTimer): Added.
917 (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
918 require client to maintain timers.
919 (WebCore::ScrollController::snapRubberBand): Ditto.
920 (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
921 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
922 (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
923 (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
924 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
925 (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
926 (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
927 (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
928 * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
929 * platform/mac/AxisScrollSnapAnimator.mm:
930 (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Update for 'InAxis' to 'OnAxis' renaming.
931 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Ditto.
932 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Ditto.
933 (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Ditto.
934 (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Ditto.
935 * platform/mac/ScrollAnimatorMac.h:
936 * platform/mac/ScrollAnimatorMac.mm:
937 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
938 controlled in the ScrollController)
939 (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
940 (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
941 (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
942 * platform/mac/ScrollController.h: Removed.
943 * platform/mac/ScrollController.mm: Removed.
945 2015-03-03 Commit Queue <commit-queue@webkit.org>
947 Unreviewed, rolling out r180683.
948 https://bugs.webkit.org/show_bug.cgi?id=142249
950 Broke fast/css/acid2-pixel.html (Requested by ap on #webkit).
954 "Setting any of the <object> element plugin controlling
955 attributes does not have any affect."
956 https://bugs.webkit.org/show_bug.cgi?id=141936
957 http://trac.webkit.org/changeset/180683
959 2015-03-03 Dean Jackson <dino@apple.com>
961 Controls panel should have system blurry background
962 https://bugs.webkit.org/show_bug.cgi?id=142154
963 <rdar://problem/20000964>
965 Reviewed by Simon Fraser.
967 In order to replicate the system style of media controls
968 on OS X and iOS, we need to expose a special -webkit-appearance.
969 This patch adds the new property value, and implements
970 the iOS part of the appearance, which is a blurry shaded
973 Test: compositing/media-controls-bar-appearance.html
975 * css/CSSPrimitiveValueMappings.h:
976 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the new
977 keywords from ControlParts.
979 * css/CSSValueKeywords.in: Add media-controls-light-bar-background
980 and media-controls-dark-bar-background. Darin suggested they
981 be sorted, so I did this at the same time.
982 * platform/ThemeTypes.h: New ControlParts for the values, and
983 sort the values since they need to be in sync with
986 * platform/graphics/GraphicsLayer.h: Expose two new custom appearance
988 * platform/graphics/ca/GraphicsLayerCA.cpp:
989 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
990 (WebCore::layerTypeForCustomBackdropAppearance): Helper function.
991 (WebCore::isCustomBackdropLayerType): Ditto.
992 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Merge setting
993 a system backdrop layer in with the code that swaps to/from tiled layers.
994 (WebCore::GraphicsLayerCA::changeLayerTypeTo): New method that does what
995 swapFromOrToTiledLayer implemented, but also allows us to change to a
996 system backdrop layer.
997 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Deleted.
998 * platform/graphics/ca/GraphicsLayerCA.h:
1000 * platform/graphics/ca/PlatformCALayer.h: New layer types.
1001 * platform/graphics/ca/mac/PlatformCALayerMac.mm: For now expose these
1002 as regular backdrop layers.
1003 (PlatformCALayerMac::PlatformCALayerMac):
1004 (PlatformCALayerMac::updateCustomAppearance):
1006 * rendering/RenderLayerBacking.cpp:
1007 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Make sure to update
1009 (WebCore::RenderLayerBacking::updateCustomAppearance): New method.
1010 * rendering/RenderLayerBacking.h:
1012 2015-03-03 Chris Dumez <cdumez@apple.com>
1014 Access ApplicationCacheStorage global instance via singleton() static member function
1015 https://bugs.webkit.org/show_bug.cgi?id=142239
1017 Reviewed by Anders Carlsson.
1019 Access ApplicationCacheStorage global instance via singleton() static
1020 member function as per WebKit coding style.
1022 2015-03-03 Anders Carlsson <andersca@apple.com>
1024 Try to fix the build.
1026 * platform/spi/cf/CFNetworkSPI.h:
1028 2015-03-03 Timothy Horton <timothy_horton@apple.com>
1030 <attachment> label can get very wide, doesn't wrap/truncate
1031 https://bugs.webkit.org/show_bug.cgi?id=142214
1032 <rdar://problem/19982499>
1034 Reviewed by Simon Fraser.
1036 Test: fast/attachment/attachment-label-highlight.html
1038 * rendering/RenderThemeMac.h:
1039 * rendering/RenderThemeMac.mm:
1040 (WebCore::labelTextColorForAttachment):
1041 (WebCore::AttachmentLayout::addLine):
1042 (WebCore::AttachmentLayout::layOutText):
1043 (WebCore::AttachmentLayout::AttachmentLayout):
1044 Make it possible to lay out multiple lines of label text.
1045 We lay out the whole string normally, but then only draw N (where N=1 for now,
1046 but is adjustable) of the lines. The remainder of the string is then
1047 merged into a single line, which is middle-truncated with an ellipsis
1048 and drawn in place of the N+1 line.
1050 (WebCore::addAttachmentLabelBackgroundRightCorner):
1051 (WebCore::addAttachmentLabelBackgroundLeftCorner):
1052 (WebCore::paintAttachmentLabelBackground):
1053 Wrap the label background around the multiple lines of text with curved edges.
1054 We run first down the right side of the label, determining whether to use
1055 concave or convex arcs based on the relative widths of adjacent lines.
1056 Then, we run back up the left side of the label doing the same thing.
1058 If the background rects of two lines are very similar (within the rounded rect radius),
1059 they will be expanded to the larger of the two, because otherwise the arcs
1062 (WebCore::paintAttachmentLabel):
1063 Draw the label with CoreText directly instead of bothering with WebCore
1064 text layout primitives. There's no need, and it makes wrapping much more complicated.
1066 (WebCore::RenderThemeMac::paintAttachment):
1067 (WebCore::RenderThemeMac::paintAttachmentLabelBackground): Deleted.
1068 (WebCore::RenderThemeMac::paintAttachmentLabel): Deleted.
1070 2015-03-03 Simon Fraser <simon.fraser@apple.com>
1072 Avoid applying the clip-path when painting, if a layer also has a shape layer mask
1073 https://bugs.webkit.org/show_bug.cgi?id=142212
1075 Reviewed by Zalan Bujtas.
1077 After r180882 we translate clip-path into a composited shape mask when the layer
1078 is composited. However, we were also still applying the clip-path when painting
1081 Now, we set the GraphicsLayer bits GraphicsLayerPaintClipPath and GraphicsLayerPaintMask
1082 only for the m_maskLayer's painting. This translate into setting PaintLayerPaintingCompositingMaskPhase
1083 and PaintLayerPaintingCompositingClipPathPhase only when painting that same mask layer,
1084 rather than always. To ensure that masks and clip-path get applied for software paints,
1085 add shouldPaintMask() and shouldApplyClipPath() that return true for non-composited layers,
1086 and when doing a flattening paint.
1088 * rendering/RenderLayer.cpp:
1089 (WebCore::RenderLayer::paintLayerContents): Use shouldApplyClipPath().
1090 Pull three chunks of code under a single "if (shouldPaintContent && !selectionOnly)" condition.
1091 The condition for paintChildClippingMaskForFragments() is changed slightly; we need to call this
1092 only when painting the clip-path/mask layer contents, but also only when there is no mask to fill
1093 the clipped area for us.
1094 (WebCore::RenderLayer::calculateClipRects):
1095 (WebCore::RenderLayer::paintsWithClipPath): Deleted.
1096 * rendering/RenderLayer.h:
1097 * rendering/RenderLayerBacking.cpp:
1098 (WebCore::RenderLayerBacking::updateMaskingLayer): Be sure to set the GraphicsLayerPaintClipPath bit
1099 when having a mask forces us onto the painting path.
1101 2015-03-03 Anders Carlsson <andersca@apple.com>
1103 Use the correct display name for website data for local files
1104 https://bugs.webkit.org/show_bug.cgi?id=142228
1106 Reviewed by Dan Bernstein.
1108 * English.lproj/Localizable.strings:
1109 Add local file display name.
1111 * platform/spi/cf/CFNetworkSPI.h:
1112 Add kCFHTTPCookieLocalFileDomain declaration.
1114 2015-03-03 Myles C. Maxfield <mmaxfield@apple.com>
1116 BreakingContext cleanup
1117 https://bugs.webkit.org/show_bug.cgi?id=142146
1119 Reviewed by Dean Jackson.
1121 1. Use commitLineBreakAtCurrentWidth() instead of directly
1122 updating m_width and m_lineBreak, because the name makes the
1124 2. Remove duplicate function LineBreaker::nextSegmentBreak().
1125 3. lineStyle() takes care of inspecting RenderText's parent's
1127 4. Add FIXME to BreakingContext::initializeForCurrentObject()
1128 because it seems like we are ignoring first-line style for
1131 No new tests because there is no behavior change.
1133 * rendering/line/BreakingContextInlineHeaders.h:
1134 (WebCore::BreakingContext::BreakingContext):
1135 (WebCore::BreakingContext::initializeForCurrentObject):
1136 (WebCore::BreakingContext::handleReplaced):
1137 (WebCore::BreakingContext::handleText):
1138 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
1139 (WebCore::BreakingContext::handleEndOfLine):
1140 * rendering/line/LineBreaker.cpp:
1141 (WebCore::LineBreaker::nextLineBreak): Deleted.
1142 (WebCore::LineBreaker::nextSegmentBreak): Deleted.
1143 * rendering/line/LineBreaker.h:
1144 * rendering/line/LineInlineHeaders.h:
1145 (WebCore::lineStyle):
1147 2015-03-03 Chris Dumez <cdumez@apple.com>
1149 Make AudioContext suspendable when it is not rendering
1150 https://bugs.webkit.org/show_bug.cgi?id=142210
1151 <rdar://problem/19923085>
1153 Reviewed by Eric Carlson.
1155 Make AudioContext suspendable when it is not rendering to increase the
1156 likelihood of entering the PageCache for pages using WebAudio.
1158 This patch adds a state member to AudioContext with 3 possible states:
1159 Suspended / Running / Closed, as defined in the specification:
1160 http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
1162 This state is used to decide if we can suspend the page or not. We
1163 can safely suspend if the AudioContext's state is suspended (did not
1164 start rendering) or closed (Stopped rendering).
1166 Note that this patch does not expose the AudioContext's state to the
1167 Web yet, even though it is exposed in the latest specification.
1169 Tests: fast/history/page-cache-closed-audiocontext.html
1170 fast/history/page-cache-running-audiocontext.html
1171 fast/history/page-cache-suspended-audiocontext.html
1173 * Modules/webaudio/AudioContext.cpp:
1174 (WebCore::AudioContext::AudioContext):
1175 (WebCore::AudioContext::uninitialize):
1176 (WebCore::AudioContext::canSuspend):
1177 (WebCore::AudioContext::startRendering):
1178 (WebCore::AudioContext::fireCompletionEvent):
1179 * Modules/webaudio/AudioContext.h:
1181 2015-03-02 Carlos Garcia Campos <cgarcia@igalia.com>
1183 [SOUP] Use SoupMessage::starting instead of SoupSession::request-started
1184 https://bugs.webkit.org/show_bug.cgi?id=142164
1186 Reviewed by Sergio Villar Senin.
1188 SoupSession::request-started is deprecated in libsoup 2.50. Both
1189 signals are equivalent, but SoupMessage::starting is also emitted
1190 for resources loaded from the disk cache. This fixes web timing
1191 calculations for cached resources, since we were not initializing
1194 * platform/network/soup/ResourceHandleSoup.cpp:
1195 (WebCore::startingCallback):
1196 (WebCore::createSoupMessageForHandleAndRequest):
1197 * platform/network/soup/SoupNetworkSession.cpp:
1198 (WebCore::SoupNetworkSession::SoupNetworkSession):
1200 2015-03-03 Carlos Garcia Campos <cgarcia@igalia.com>
1202 [SOUP] Synchronous XMLHttpRequests can time out when we reach the max connections limit
1203 https://bugs.webkit.org/show_bug.cgi?id=141508
1205 Reviewed by Sergio Villar Senin.
1207 Use SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS flag when loading a
1208 synchronous message instead of increasing the maximum number of
1209 connections allowed if the soup version is recent enough.
1210 The current solution of increasing/decreasing the limits doesn't
1211 always work, because connections are not marked as IDLE in libsoup
1212 until the message is unqueued, but we don't wait for the message
1213 to be unqueued to finish our loads in WebKit, we finish them as
1214 soon as we have finished reading the stream. This causes that
1215 synchronous loads keep blocked in the nested main loop until the
1216 timeout of 10 seconds is fired and the load fails.
1217 Also marked WebCoreSynchronousLoader class as final, the virtual
1218 methods as override and removed the unsused method isSynchronousClient.
1220 * platform/network/soup/ResourceHandleSoup.cpp:
1221 (WebCore::createSoupMessageForHandleAndRequest):
1222 (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
1223 (WebCore::WebCoreSynchronousLoader::isSynchronousClient): Deleted.
1224 (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
1225 (WebCore::WebCoreSynchronousLoader::didReceiveData):
1226 (WebCore::WebCoreSynchronousLoader::didReceiveBuffer):
1227 (WebCore::WebCoreSynchronousLoader::didFinishLoading):
1228 (WebCore::WebCoreSynchronousLoader::didFail):
1229 (WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge):
1230 (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
1232 2015-03-02 David Kilzer <ddkilzer@apple.com>
1234 [iOS] Disable -Wdeprecated-declaration warnings in WebVideoFullscreenInterfaceAVKit.mm
1236 Fixing the deprecations is tracked by: <rdar://problem/20018692>
1238 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1239 (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized):
1240 Ignore -Wdeprecated-declaration warnings via clang pragmas.
1242 2015-03-02 Commit Queue <commit-queue@webkit.org>
1244 Unreviewed, rolling out r180902.
1245 https://bugs.webkit.org/show_bug.cgi?id=142205
1247 It broke scrolling in some cases. See bug 142202 for details.
1248 (Requested by bdash on #webkit).
1252 "Move scroll animating functions from ScrollAnimator to
1254 https://bugs.webkit.org/show_bug.cgi?id=142102
1255 http://trac.webkit.org/changeset/180902
1257 2015-03-02 Commit Queue <commit-queue@webkit.org>
1259 Unreviewed, rolling out r180911.
1260 https://bugs.webkit.org/show_bug.cgi?id=142204
1262 The tests it added are crashing (Requested by bdash on
1267 "Add a microtask abstraction"
1268 https://bugs.webkit.org/show_bug.cgi?id=137496
1269 http://trac.webkit.org/changeset/180911
1271 2015-03-02 Yoav Weiss <yoav@yoav.ws>
1273 Add a microtask abstraction
1274 https://bugs.webkit.org/show_bug.cgi?id=137496
1276 Reviewed by Sam Weinig.
1278 This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
1279 That abstraction is required in order to enable async loading of images,
1280 which is in turn required to enable support for the picture element, as well as
1281 to make sure that the order of properties set on HTMLImageElement has no implications.
1283 * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
1284 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
1285 * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
1286 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
1287 * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
1288 * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
1289 * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
1290 (WebCore::MicroTask::~MicroTask):
1291 (WebCore::MicroTask::run): Run the microtask.
1292 * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
1293 (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
1294 (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
1295 (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
1296 * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
1297 (WebCore::ScriptRunner::timerFired):
1298 * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
1299 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1300 (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
1301 (WebCore::HTMLScriptRunner::runScript):
1302 * testing/Internals.cpp: Add a method to queue a test microtask.
1303 (WebCore::Internals::queueMicroTask):
1304 * testing/Internals.h: Add a method to queue a test microtask.
1305 (WebCore::Internals::queueMicroTask):
1306 * testing/Internals.idl: Expose test microtask queueing to test JS.
1307 * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
1308 (WebCore::MicroTaskTest::run): Run the microtask
1309 (WebCore::MicroTaskTest::create): Create a test microtask.
1310 * testing/MicroTaskTest.h: Add a test class that implements a microtask.
1311 (WebCore::MicroTaskTest::run):
1312 (WebCore::MicroTaskTest::create):
1314 2015-03-02 Jeremy Jones <jeremyj@apple.com>
1316 RenderVideo should not paint the video frame when video is fullscreen.
1317 https://bugs.webkit.org/show_bug.cgi?id=142097
1319 Reviewed by Eric Carlson.
1321 For performance and correctness, RenderVideo should not paint the current video frame
1322 inline when video is fullscreen. This happens when snapshots are taken and can have a
1323 negative performance impact.
1325 * rendering/RenderVideo.cpp:
1326 (WebCore::RenderVideo::paintReplaced):
1328 2015-03-02 Dean Jackson <dino@apple.com>
1330 [iOS Media] Airplay button should be blue when active
1331 https://bugs.webkit.org/show_bug.cgi?id=142193
1333 Reviewed by Brent Fulgham.
1335 Add a blue form of the Airplay button that is used
1336 when we are actively displaying on another screen.
1338 * Modules/mediacontrols/mediaControlsiOS.css:
1339 (video::-webkit-media-controls-wireless-playback-picker-button):
1340 (video::-webkit-media-controls-wireless-playback-picker-button:active):
1341 (video::-webkit-media-controls-wireless-playback-picker-button.playing):
1342 * Modules/mediacontrols/mediaControlsiOS.js:
1343 (ControllerIOS.prototype.updateWirelessPlaybackStatus):
1345 2015-03-02 Brent Fulgham <bfulgham@apple.com>
1347 Move scroll animating functions from ScrollAnimator to ScrollController
1348 https://bugs.webkit.org/show_bug.cgi?id=142102
1349 <rdar://problem/20007161>
1351 Reviewed by Simon Fraser.
1353 No change in functionality.
1355 Do some refactoring of the various scrolling classes:
1356 1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
1357 and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
1358 2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
1359 3. Move code from ScrollAnimator{Mac} -> ScrollController.
1360 4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
1361 5. Rename immediateScrollInAxis -> immediateScrollOnAxis
1363 * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
1364 * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
1365 events, just as is done for the "event not handled" case in EventHandler.cpp.
1366 (WebCore::EventHandler::platformCompleteWheelEvent):
1367 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
1368 methods, now that ScrollController is controlling this state.
1369 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1370 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
1371 need to clean up the CFRunLoopTimer.
1372 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
1373 until Bug 141973 is completed.).
1374 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
1375 (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
1376 (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
1377 * platform/ScrollAnimator.cpp:
1378 (WebCore::ScrollAnimator::ScrollAnimator):
1379 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
1380 (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
1381 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
1382 (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
1383 (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
1384 (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
1385 (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
1386 (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
1387 (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
1388 (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
1389 (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
1390 * platform/ScrollAnimator.h:
1391 * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
1392 * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
1393 (WebCore::ScrollController::ScrollController): Update to initialize new timers.
1394 (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
1395 (WebCore::ScrollController::startSnapRubberbandTimer): Added.
1396 (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
1397 require client to maintain timers.
1398 (WebCore::ScrollController::snapRubberBand): Ditto.
1399 (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
1400 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
1401 (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
1402 (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
1403 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
1404 (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
1405 (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
1406 (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
1407 * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
1408 * platform/mac/AxisScrollSnapAnimator.mm: Ditto.
1409 * platform/mac/ScrollAnimatorMac.h:
1410 * platform/mac/ScrollAnimatorMac.mm:
1411 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
1412 controlled in the ScrollController)
1413 (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
1414 (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
1415 (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
1416 * platform/mac/ScrollController.h: Removed.
1417 * platform/mac/ScrollController.mm: Removed.
1419 2015-03-02 Mark Lam <mark.lam@apple.com>
1421 The InspectorTimelineAgent should gracefully handle attempts to start more than once.
1422 <https://webkit.org/b/142189>
1424 Reviewed by Joseph Pecoraro.
1426 No new tests. Unskipped an existing test that already asserts this.
1428 InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
1429 case the InspectorTimelineAgent is already disabled. Similarly,
1430 InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
1431 is already enabled before proceeding to do work to enable it. Though wasteful,
1432 it is legal for clients of the InspectorTimelineAgent to invoke start on it more
1433 than once. Hence, this check is needed.
1435 This check fixes the debug assertion failure when running the
1436 inspector/timeline/debugger-paused-while-recording.html test. The test can now
1439 * inspector/InspectorTimelineAgent.cpp:
1440 (WebCore::InspectorTimelineAgent::internalStart):
1442 2015-03-02 Roger Fong <roger_fong@apple.com>
1444 Update backgrounds of sliders for inline media controls on OS X.
1445 https://bugs.webkit.org/show_bug.cgi?id=142188.
1446 <rdar://problem/20012413>
1448 Reviewed by Dean Jackson.
1450 Don’t use CSS to draw volume and timeline slider backgrounds.
1451 * Modules/mediacontrols/mediaControlsApple.css:
1452 (video::-webkit-media-controls-volume-slider):
1453 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
1454 (audio::-webkit-media-controls-timeline):
1455 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
1456 (audio::-webkit-media-controls-panel .thumbnail-track):
1457 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
1458 (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
1460 Draw volume and timeline slider backgrounds using 2d canvases.
1461 * Modules/mediacontrols/mediaControlsApple.js:
1462 (Controller.prototype.createControls):
1463 (Controller.prototype.handleVolumeSliderInput):
1464 (Controller.prototype.addRoundedRect):
1465 (Controller.prototype.drawTimelineBackground):
1466 (Controller.prototype.drawVolumeBackground):
1467 (Controller.prototype.showControls):
1468 * Modules/mediacontrols/mediaControlsiOS.js:
1469 (ControllerIOS.prototype.addRoundedRect): Deleted.
1471 2015-03-01 Roger Fong <roger_fong@apple.com>
1473 Update inline media element controls appearance Part 1.
1474 https://bugs.webkit.org/show_bug.cgi?id=142138.
1475 <rdar://problem/19997384>
1477 Reviewed by Dean Jackson.
1479 Update positioning, sizes, and background colors media control elements.
1480 Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
1482 * Modules/mediacontrols/mediaControlsApple.css:
1483 (audio::-webkit-media-controls-panel):
1484 (video::-webkit-media-controls-panel):
1485 (audio::-webkit-media-controls-rewind-button):
1486 (audio::-webkit-media-controls-play-button):
1487 (audio::-webkit-media-controls-panel .mute-box):
1488 (video::-webkit-media-controls-volume-max-button):
1489 (audio::-webkit-media-controls-panel .volume-box):
1490 (audio::-webkit-media-controls-panel .volume-box:active):
1491 (video::-webkit-media-controls-volume-slider):
1492 (audio::-webkit-media-controls-toggle-closed-captions-button):
1493 (audio::-webkit-media-controls-fullscreen-button):
1494 (audio::-webkit-media-controls-current-time-display):
1495 (audio::-webkit-media-controls-time-remaining-display):
1496 (audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.
1498 2015-03-02 David Kilzer <ddkilzer@apple.com>
1500 REGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
1501 <http://webkit.org/b/138684>
1503 Fixes the following build failures:
1505 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
1506 In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
1507 In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
1508 WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:123:33: error: 'setShapeLayerPath' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
1509 WEBCORE_EXPORT virtual void setShapeLayerPath(const Path&);
1511 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
1512 In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
1513 In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
1514 WebCore.framework/PrivateHeaders/GraphicsLayer.h:390:18: note: overridden virtual function is here
1515 virtual void setShapeLayerPath(const Path&);
1517 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
1518 In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
1519 In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
1520 WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:124:33: error: 'setShapeLayerWindRule' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
1521 WEBCORE_EXPORT virtual void setShapeLayerWindRule(WindRule);
1523 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
1524 In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
1525 In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
1526 WebCore.framework/PrivateHeaders/GraphicsLayer.h:393:18: note: overridden virtual function is here
1527 virtual void setShapeLayerWindRule(WindRule);
1531 * platform/graphics/ca/GraphicsLayerCA.h:
1532 (WebCore::GraphicsLayer::setShapeLayerPath): Mark as override.
1533 (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
1535 2015-03-01 Simon Fraser <simon.fraser@apple.com>
1537 Make clip-path work on <video>, <canvas> etc.
1538 https://bugs.webkit.org/show_bug.cgi?id=138684
1540 Reviewed by Darin Adler.
1542 clip-path only worked in compositing layers on the painted contents of the layer,
1543 and failed to clip children. Fix this by translating the clip path into a Path
1544 which is set on a CA shape layer (for Mac and iOS), or painted into the
1545 RenderLayerBacking's mask layer. There are two code paths:
1547 1. clip-path which is a <basic-shape> or <geometry-box>, and no mask.
1548 Here we can use the optimal code path of converting the clip into a path
1549 that is put onto a CAShapeLayer, which is then used as a mask. There is no
1550 additional backing store.
1551 2. clip-path with an SVG reference, or clip-path combined with -webkit-mask:
1552 Here we have to allocate backing store for the mask layer, and paint the
1553 clip path (possibly with the mask).
1555 We add GraphicsLayer::Type::Shape, and add a getter for the layer type.
1557 Tests: compositing/masks/compositing-clip-path-and-mask.html
1558 compositing/masks/compositing-clip-path-mask-change.html
1559 compositing/masks/compositing-clip-path.html
1560 compositing/masks/reference-clip-path-on-composited.html
1562 * platform/graphics/GraphicsLayer.cpp:
1563 (WebCore::GraphicsLayer::GraphicsLayer): Store the type in the layer so the getter can return it.
1564 (WebCore::GraphicsLayer::shapeLayerPath): Get and set the shape layer path.
1565 (WebCore::GraphicsLayer::setShapeLayerPath): Ditto.
1566 (WebCore::GraphicsLayer::shapeLayerWindRule): Get and set the shape layer wind rule.
1567 (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
1568 * platform/graphics/GraphicsLayer.h:
1569 (WebCore::GraphicsLayer::type): Expose the type.
1570 (WebCore::GraphicsLayer::supportsLayerType): Allow the cross-platform code to use
1571 shape layers when it knows they are available.
1572 (WebCore::GraphicsLayer::needsClippingMaskLayer): Deleted. This was never used.
1573 * platform/graphics/GraphicsLayerClient.h: Align the bits (helps avoid typos). Add a
1574 GraphicsLayerPaintClipPath phase.
1575 * platform/graphics/Path.h: Some exports since WK2 needs to encode Paths now.
1576 * platform/graphics/ca/GraphicsLayerCA.cpp:
1577 (WebCore::GraphicsLayerCA::initialize): Make shape layers.
1578 (WebCore::GraphicsLayerCA::setShapeLayerPath): Setter for the shape path. Sadly we
1579 can't early return on unchanged paths yet.
1580 (WebCore::GraphicsLayerCA::setShapeLayerWindRule):
1581 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Updates for shape path
1583 (WebCore::GraphicsLayerCA::updateShape):
1584 (WebCore::GraphicsLayerCA::updateWindRule):
1585 * platform/graphics/ca/GraphicsLayerCA.h: Some new dirty bits for shape path and wind rule.
1586 * platform/graphics/ca/PlatformCALayer.h:
1587 * platform/graphics/ca/mac/PlatformCALayerMac.h:
1588 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Got rid of lots of m_layer.get().
1589 (PlatformCALayerMac::~PlatformCALayerMac):
1590 (PlatformCALayerMac::setNeedsDisplay):
1591 (PlatformCALayerMac::setNeedsDisplayInRect):
1592 (PlatformCALayerMac::removeFromSuperlayer):
1593 (PlatformCALayerMac::setSublayers):
1594 (PlatformCALayerMac::removeAllSublayers):
1595 (PlatformCALayerMac::appendSublayer):
1596 (PlatformCALayerMac::insertSublayer):
1597 (PlatformCALayerMac::replaceSublayer):
1598 (PlatformCALayerMac::adoptSublayers):
1599 (PlatformCALayerMac::addAnimationForKey):
1600 (PlatformCALayerMac::removeAnimationForKey):
1601 (PlatformCALayerMac::animationForKey):
1602 (PlatformCALayerMac::setMask):
1603 (PlatformCALayerMac::isOpaque):
1604 (PlatformCALayerMac::setOpaque):
1605 (PlatformCALayerMac::bounds):
1606 (PlatformCALayerMac::setBounds):
1607 (PlatformCALayerMac::position):
1608 (PlatformCALayerMac::setPosition):
1609 (PlatformCALayerMac::anchorPoint):
1610 (PlatformCALayerMac::setAnchorPoint):
1611 (PlatformCALayerMac::transform):
1612 (PlatformCALayerMac::setTransform):
1613 (PlatformCALayerMac::sublayerTransform):
1614 (PlatformCALayerMac::setSublayerTransform):
1615 (PlatformCALayerMac::setHidden):
1616 (PlatformCALayerMac::setGeometryFlipped):
1617 (PlatformCALayerMac::isDoubleSided):
1618 (PlatformCALayerMac::setDoubleSided):
1619 (PlatformCALayerMac::masksToBounds):
1620 (PlatformCALayerMac::setMasksToBounds):
1621 (PlatformCALayerMac::acceleratesDrawing):
1622 (PlatformCALayerMac::setAcceleratesDrawing):
1623 (PlatformCALayerMac::contents):
1624 (PlatformCALayerMac::setContents):
1625 (PlatformCALayerMac::setContentsRect):
1626 (PlatformCALayerMac::setMinificationFilter):
1627 (PlatformCALayerMac::setMagnificationFilter):
1628 (PlatformCALayerMac::backgroundColor):
1629 (PlatformCALayerMac::setBackgroundColor):
1630 (PlatformCALayerMac::setBorderWidth):
1631 (PlatformCALayerMac::setBorderColor):
1632 (PlatformCALayerMac::opacity):
1633 (PlatformCALayerMac::setOpacity):
1634 (PlatformCALayerMac::copyFiltersFrom):
1635 (PlatformCALayerMac::setName):
1636 (PlatformCALayerMac::setSpeed):
1637 (PlatformCALayerMac::setTimeOffset):
1638 (PlatformCALayerMac::contentsScale):
1639 (PlatformCALayerMac::setContentsScale):
1640 (PlatformCALayerMac::cornerRadius):
1641 (PlatformCALayerMac::setCornerRadius):
1642 (PlatformCALayerMac::setEdgeAntialiasingMask):
1643 (PlatformCALayerMac::shapeWindRule): New function.
1644 (PlatformCALayerMac::setShapeWindRule): Ditto.
1645 (PlatformCALayerMac::shapePath): Ditto.
1646 (PlatformCALayerMac::setShapePath): Ditto.
1647 (PlatformCALayer::isWebLayer):
1648 * platform/graphics/cg/PathCG.cpp:
1649 (WebCore::Path::Path): nullptr.
1650 * rendering/RenderLayer.cpp:
1651 (WebCore::RenderLayer::paintsWithClipPath): Return true if the clip path is painted.
1652 (WebCore::RenderLayer::computeClipPath): Factor code that computes the clip path into this
1653 function, so we can call it from RenderLayerBacking too.
1654 (WebCore::RenderLayer::setupClipPath):
1655 (WebCore::RenderLayer::paintLayerContents): We only want to apply the clip path
1656 for painting when we're either painting a non-composited layer, or we're painting the
1657 mask layer of a composited layer. We in the latter case, we just want to fill the clip
1658 path with black, so re-use the paintChildClippingMaskForFragments() which does this.
1659 * rendering/RenderLayer.h: Align the bits, add PaintLayerPaintingCompositingClipPathPhase.
1660 * rendering/RenderLayerBacking.cpp:
1661 (WebCore::RenderLayerBacking::~RenderLayerBacking):
1662 (WebCore::RenderLayerBacking::updateConfiguration):
1663 (WebCore::RenderLayerBacking::updateGeometry): Move mask updating into its own function.
1664 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry): If we're using the shape layer
1665 code path, compute the Path and set it and the wind rule on the mask layer.
1666 (WebCore::RenderLayerBacking::updateMaskingLayer): This is now more complex, as it has
1667 to deal with combinations of clip-path and mask, some of which allow for the shape layer
1668 mask, and we handle dynamic changes between these and painted masks.
1669 (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): Include the GraphicsLayerPaintClipPath phase.
1670 (WebCore::RenderLayerBacking::paintIntoLayer): Map GraphicsLayerPaintClipPath to PaintLayerPaintingCompositingClipPathPhase.
1671 (WebCore::RenderLayerBacking::updateMaskLayer): Deleted.
1672 * rendering/RenderLayerBacking.h:
1674 2015-03-01 Hunseop Jeong <hs85.jeong@samsung.com>
1676 [Cairo] Implement Path::addEllipse
1677 https://bugs.webkit.org/show_bug.cgi?id=142144
1679 Reviewed by Gyuyoung Kim.
1681 Add support for addEllipse method for platforms using cairo.
1683 * platform/graphics/cairo/PathCairo.cpp:
1684 (WebCore::Path::addEllipse):
1686 2015-03-01 Joonghun Park <jh718.park@samsung.com>
1688 Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
1689 https://bugs.webkit.org/show_bug.cgi?id=142143
1691 Reviewed by Darin Adler.
1693 No new tests, no behavior changes.
1695 * platform/ScrollAnimator.cpp:
1696 (WebCore::ScrollAnimator::create):
1697 * platform/ScrollAnimator.h:
1698 * platform/ScrollAnimatorNone.cpp:
1699 (WebCore::ScrollAnimator::create):
1700 * platform/ScrollableArea.h:
1701 * platform/ios/ScrollAnimatorIOS.mm:
1702 (WebCore::ScrollAnimator::create):
1703 * platform/mac/ScrollAnimatorMac.mm:
1704 (WebCore::ScrollAnimator::create):
1706 2015-02-26 Andy Estes <aestes@apple.com>
1708 [Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
1709 https://bugs.webkit.org/show_bug.cgi?id=142066
1711 Reviewed by Andreas Kling.
1713 * platform/ios/ContentFilterIOS.mm:
1714 * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
1716 2015-03-01 Chris Dumez <cdumez@apple.com>
1718 Make NotificationCenter / Notification suspendable
1719 https://bugs.webkit.org/show_bug.cgi?id=142117
1720 <rdar://problem/19923085>
1722 Reviewed by Andreas Kling.
1724 Make NotificationCenter / Notification suspendable so that pages using
1725 them can enter the PageCache.
1727 NotificationCenter can safely be suspended if there are no pending
1728 permission requests. This required adding an
1729 "hasPendingPermissionRequests()" callback to the NotificationClient.
1731 Notification can safely be suspended if it is either idle (not showing
1734 Tests: fast/history/page-cache-notification-non-suspendable.html
1735 fast/history/page-cache-notification-suspendable.html
1737 * Modules/notifications/Notification.cpp:
1738 (WebCore::Notification::canSuspend):
1739 * Modules/notifications/NotificationCenter.cpp:
1740 (WebCore::NotificationCenter::canSuspend):
1741 * Modules/notifications/NotificationClient.h:
1743 2015-03-01 Ryosuke Niwa <rniwa@webkit.org>
1745 isContentEditable shouldn't trigger synchronous style recalc in most cases
1746 https://bugs.webkit.org/show_bug.cgi?id=129034
1748 Reviewed by Antti Koivisto.
1750 Avoid style recalc inside isContentEditable when the document doesn't contain -webkit-user-modify or
1751 -webkit-user-select: all. Instead, compute the value from contenteditable attributes in ancestors.
1752 However, still compute the editability from the style tree when it's up-to-date in order to avoid
1753 repeatedly walking up the DOM tree in a hot code path inside editing.
1755 Test: fast/dom/HTMLElement/dynamic-editability-change.html
1757 * css/CSSGrammar.y.in: No need to pass in "true" as we never call this function with false.
1758 * css/CSSParser.cpp:
1759 (WebCore::isValidKeywordPropertyAndValue): Calls parserSetUsesStyleBasedEditability as needed.
1760 (WebCore::parseKeywordValue): Passes around StyleSheetContents*.
1761 (WebCore::CSSParser::parseValue): Ditto.
1762 (WebCore::CSSParser::parseFont): Ditto.
1764 * css/StyleSheetContents.cpp:
1765 (WebCore::StyleSheetContents::StyleSheetContents): Initializes and copies m_usesStyleBasedEditability.
1767 * css/StyleSheetContents.h:
1768 (WebCore::StyleSheetContents::parserSetUsesRemUnits): Removed the argument since it was always true.
1769 (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability): Added.
1770 (WebCore::StyleSheetContents::usesStyleBasedEditability): Added.
1773 (WebCore::Document::recalcStyle): Added a FIXME as well as a comment explaining why we don't call
1774 setUsesStyleBasedEditability. Since Node::computeEditability triggers style recalc only when the flag
1775 is set to true, it's too late to update the flag here.
1776 (WebCore::Document::updateStyleIfNeeded): Uses a newly extracted needsStyleRecalc.
1777 (WebCore::Document::updateBaseURL): Preserves m_usesStyleBasedEditability as well as m_usesRemUnit.
1778 (WebCore::Document::usesStyleBasedEditability): Added. Returns true when inline style declarations or
1779 any active stylesheet uses -webkit-user-modify or -webkit-user-select: all. Flushing pending stylesheet
1780 changes here is fine because the alternative is to trigger a full blown style recalc.
1783 (WebCore::Document::needsStyleRecalc): Added. Extracted from updateStyleIfNeeded.
1785 * dom/DocumentStyleSheetCollection.cpp:
1786 (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
1787 (WebCore::styleSheetsUseRemUnits): Deleted.
1788 (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Updates m_usesStyleBasedEditability
1789 as well as m_usesRemUnit.
1791 * dom/DocumentStyleSheetCollection.h:
1792 (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Added.
1793 (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Added.
1796 (WebCore::computeEditabilityFromComputedStyle): Extracted from computeEditability.
1797 (WebCore::Node::computeEditability): When the style recalc is requested and the render tree is dirty,
1798 check if the document uses any CSS property that can affect the editability of elements. If it doesn't,
1799 compute the editability from contenteditable attributes in the anchors via matchesReadWritePseudoClass.
1800 Continue to use the style-based computation when the render tree isn't dirty to avoid the tree walk.
1802 * html/HTMLElement.cpp:
1803 (WebCore::HTMLElement::editabilityFromContentEditableAttr): Extracted from matchesReadWritePseudoClass
1804 to be called in Node::computeEditability. Also made it return Editability instead of boolean.
1805 (WebCore::HTMLElement::matchesReadWritePseudoClass):
1806 * html/HTMLElement.h:
1808 2015-03-01 Brent Fulgham <bfulgham@apple.com>
1810 [Win] Unreviewed build fix.
1812 * WebCorePrefix.h: Provide some default definitions to help build on Windows
1813 machines with different application support libraries.
1815 2015-02-28 Simon Fraser <simon.fraser@apple.com>
1817 Viewport units should not dirty style just before we do layout
1818 https://bugs.webkit.org/show_bug.cgi?id=141682
1820 Reviewed by Zalan Bujtas.
1822 In documents using viewport units, we dirtied style every time layout changed
1823 the size of the document. This is nonsensical, because viewport units depend on the
1824 viewport size, not the document size.
1826 Move the style dirtying from layout() into availableContentSizeChanged(). Hook
1827 this up for WebKit1 by calling from -[WebFrameView _frameSizeChanged], and,
1828 since that causes availableContentSizeChanged() to be called for WK1 for the first
1829 time, protect the call to updateScrollbars() with a !platformWidget check.
1831 Covered by existing viewport unit tests.
1833 * page/FrameView.cpp:
1834 (WebCore::FrameView::layout):
1835 (WebCore::FrameView::availableContentSizeChanged):
1836 (WebCore::FrameView::viewportSizeForCSSViewportUnits): Add a FIXME comment. Whether
1837 scrollbars are ignored depends on the value of the overflow property on the root element.
1839 * platform/ScrollView.cpp:
1840 (WebCore::ScrollView::availableContentSizeChanged):
1842 2015-02-28 Andreas Kling <akling@apple.com>
1844 [Cocoa] Purge SQLite page cache when under memory pressure.
1845 <https://webkit.org/b/142139>
1846 <rdar://problem/19997739>
1848 Reviewed by Pratik Solanki.
1850 Call out to sqlite3 cache purging SPI on Cocoa platforms when
1851 we need to free up some extra memory.
1853 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1854 (WebCore::MemoryPressureHandler::platformReleaseMemory):
1856 2015-02-28 Simon Fraser <simon.fraser@apple.com>
1858 FrameView::layoutTimerFired() should update style if needed before doing layout
1859 https://bugs.webkit.org/show_bug.cgi?id=141688
1861 Reviewed by Andreas Kling.
1863 If the style recalc timer has been scheduled to fire after the layout timer,
1864 when the layout timer fires, we might as well just do the style recalc
1865 too. The call to updateStyleIfNeeded() will cancel the pending style
1868 This doesn't have much impact on the number of layouts (measured via PLT)
1869 but seems like a reasonable thing to do.
1871 * page/FrameView.cpp:
1872 (WebCore::FrameView::layoutTimerFired):
1874 2015-02-28 Simon Fraser <simon.fraser@apple.com>
1876 Fullscreen video layers are off by one sometimes
1877 https://bugs.webkit.org/show_bug.cgi?id=142122
1878 rdar://problem/19878821
1880 Reviewed by Eric Carlson.
1882 Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
1883 isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
1884 backends to use FloatSizes for natural size. Convert the video image drawing code
1885 paths to FloatSize, since naturalSize is used on the destination rect computation,
1886 and painting should be floating point anyway.
1888 Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.
1890 * html/HTMLVideoElement.cpp:
1891 (WebCore::HTMLVideoElement::videoWidth):
1892 (WebCore::HTMLVideoElement::videoHeight):
1893 (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
1894 * html/HTMLVideoElement.h:
1895 * html/canvas/CanvasRenderingContext2D.cpp:
1897 (WebCore::CanvasRenderingContext2D::drawImage):
1898 * html/canvas/WebGLRenderingContextBase.cpp:
1899 (WebCore::WebGLRenderingContextBase::videoFrameToImage):
1900 * platform/graphics/MediaPlayer.cpp:
1901 (WebCore::NullMediaPlayerPrivate::naturalSize):
1902 (WebCore::MediaPlayer::naturalSize):
1903 (WebCore::MediaPlayer::paint):
1904 (WebCore::MediaPlayer::paintCurrentFrameInContext):
1905 (WebCore::NullMediaPlayerPrivate::paint): Deleted.
1906 * platform/graphics/MediaPlayer.h:
1907 * platform/graphics/MediaPlayerPrivate.h:
1908 (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
1909 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1910 (WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
1911 (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
1912 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1913 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1914 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1915 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
1916 (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
1917 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
1918 (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
1919 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1920 (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
1921 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1922 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1923 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1924 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
1925 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
1926 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
1927 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1928 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1929 (WebCore::MediaSourcePrivateAVFObjC::naturalSize):
1930 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1931 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1932 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1933 (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
1934 * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
1935 * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
1936 (WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
1937 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1938 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1939 (WebCore::MediaPlayerPrivateQTKit::naturalSize):
1940 (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
1941 (WebCore::MediaPlayerPrivateQTKit::paint):
1942 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1943 (WebCore::MockMediaPlayerMediaSource::naturalSize):
1944 (WebCore::MockMediaPlayerMediaSource::paint):
1945 * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1946 * rendering/RenderVideo.cpp:
1947 (WebCore::RenderVideo::calculateIntrinsicSize):
1948 (WebCore::RenderVideo::paintReplaced):
1950 2015-02-27 Hunseop Jeong <hs85.jeong@samsung.com>
1952 [EFL][GTK] Fix build break after r180790,180798
1953 https://bugs.webkit.org/show_bug.cgi?id=142127
1955 Reviewed by Gyuyoung Kim.
1957 * platform/graphics/cairo/PathCairo.cpp:
1958 (WebCore::Path::addEllipse):
1960 2015-02-27 Zalan Bujtas <zalan@apple.com>
1962 Subpixel-layout: width: max-content; property might cause unnecessary scrollbar.
1963 https://bugs.webkit.org/show_bug.cgi?id=142065
1965 Reviewed by Simon Fraser.
1967 We should not pixelsnap (ceil in this case) logical coordinates during layout.
1968 Should this cause content to be partially cut off, we need to
1969 find the broken piece in the computation logic.
1971 Covered by the unskipped test.
1973 * rendering/RootInlineBox.cpp:
1974 (WebCore::RootInlineBox::paddedLayoutOverflowRect):
1976 2015-02-27 Ryosuke Niwa <rniwa@webkit.org>
1978 Node::hasEditableStyle and isEditablePosition have too many options
1979 https://bugs.webkit.org/show_bug.cgi?id=142078
1981 Reviewed by Andreas Kling.
1983 Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
1984 new editing helper functions hasEditableStyle and isEditableNode for this purpose.
1986 Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
1987 newly extracted computeEditability in call sites that specify this option since isContentEditable
1988 is a public DOM API.
1990 No new tests since there should be no observable behavior changes.
1992 * accessibility/AXObjectCache.h: Removed the declaration of an undefined function.
1995 (WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.
1998 (WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
1999 (WebCore::Node::isContentRichlyEditable): Ditto.
2000 (WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
2001 a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
2002 style tree. Also returns tri-state Editability enum instead of returning a boolean based on
2003 the value of EditableLevel argument.
2004 (WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
2005 (WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
2006 (WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.
2008 * dom/Node.h: No longer includes EditingBoundary.h.
2009 (WebCore::Node::isContentEditable):
2010 (WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
2011 (WebCore::Node::hasRichlyEditableStyle): Ditto.
2013 * editing/ApplyStyleCommand.cpp:
2014 (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
2015 (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
2016 * editing/DeleteFromTextNodeCommand.cpp:
2017 (WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
2018 * editing/FrameSelection.cpp:
2019 (WebCore::CaretBase::invalidateCaretRect): Ditto.
2020 * editing/InsertNodeBeforeCommand.cpp:
2021 (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
2022 (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
2023 * editing/RemoveNodeCommand.cpp:
2024 (WebCore::RemoveNodeCommand::doApply): Ditto.
2026 * editing/VisibleSelection.cpp:
2027 (WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
2028 which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
2029 not possible prior to r180726 because isEditablePosition had to move out of tables.
2031 * editing/VisibleUnits.cpp:
2032 (WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
2033 (WebCore::nextLeafWithSameEditability): Ditto.
2034 (WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
2035 in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
2036 (WebCore::previousLinePosition):
2037 (WebCore::nextLinePosition):
2039 * editing/htmlediting.cpp:
2040 (WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
2041 (WebCore::isEditableToAccessibility): Moved from Node.
2042 (WebCore::computeEditability): Extracted from isEditablePosition.
2043 (WebCore::hasEditableStyle): Added.
2044 (WebCore::isEditableNode): Added.
2045 (WebCore::isEditablePosition): Now calls computeEditability.
2046 (WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
2047 (WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.
2049 * editing/htmlediting.h:
2051 2015-02-27 Chris Dumez <cdumez@apple.com>
2053 Make ActiveDOMObject::canSuspend() pure virtual
2054 https://bugs.webkit.org/show_bug.cgi?id=142096
2055 <rdar://problem/19923085>
2057 Reviewed by Andreas Kling.
2059 Make ActiveDOMObject::canSuspend() pure virtual so that people at least
2060 try to provide an implementation for it. The default implementation was
2061 returning false unconditionally and thus was preventing pages from
2062 entering the PageCache.
2064 2015-02-27 Commit Queue <commit-queue@webkit.org>
2066 Unreviewed, rolling out r180203 and r180210.
2067 https://bugs.webkit.org/show_bug.cgi?id=142116
2069 broke process suspension and tile map (Requested by thorton on
2072 Reverted changesets:
2074 "Adopt CAMachPort-as-layer-contents"
2075 https://bugs.webkit.org/show_bug.cgi?id=141687
2076 http://trac.webkit.org/changeset/180203
2078 "Fix the !USE(IOSURFACE) build"
2079 http://trac.webkit.org/changeset/180210
2081 2015-02-27 Sam Weinig <sam@webkit.org>
2083 Add WebKit2 SPI to create a DOM File object
2084 https://bugs.webkit.org/show_bug.cgi?id=142109
2086 Reviewed by Tim Horton.
2088 * WebCore.xcodeproj/project.pbxproj:
2089 Make <WebCore/File.h> (and associated files) available to WebKit2.
2091 2015-02-27 Myles C. Maxfield <mmaxfield@apple.com>
2093 [Subpixel] Subpixelize RenderListMarker
2094 https://bugs.webkit.org/show_bug.cgi?id=142093
2096 Reviewed by Zalan Bujtas.
2098 Use floats instead of ints.
2100 Test: fast/lists/rtl-marker.html
2102 * rendering/RenderListMarker.cpp:
2103 (WebCore::RenderListMarker::paint):
2104 (WebCore::RenderListMarker::updateContent):
2105 (WebCore::RenderListMarker::getRelativeMarkerRect):
2106 * rendering/RenderListMarker.h:
2108 2015-02-27 Timothy Horton <timothy_horton@apple.com>
2110 <attachment> should be selected immediately upon click, and be drag/copyable upon click
2111 https://bugs.webkit.org/show_bug.cgi?id=142114
2112 <rdar://problem/19982520>
2114 Reviewed by Enrica Casucci.
2118 Make attachment use 'user-select: all' to act as a single click-to-select unit.
2120 * html/HTMLAttachmentElement.cpp:
2121 (WebCore::HTMLAttachmentElement::setFocus): Deleted.
2122 * html/HTMLAttachmentElement.h:
2123 * rendering/RenderAttachment.cpp:
2124 (WebCore::RenderAttachment::isFocused): Deleted.
2125 (WebCore::RenderAttachment::focusChanged): Deleted.
2126 * rendering/RenderAttachment.h:
2127 * rendering/RenderThemeMac.mm:
2128 (WebCore::RenderThemeMac::paintAttachment):
2129 Remove focus-related code; instead of focusing the element upon click,
2130 we get a selection including just the <attachment>, and everything
2131 behaves much more consistently (copy works, drag works, etc.).
2133 2015-02-27 Myles C. Maxfield <mmaxfield@apple.com>
2135 [iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
2136 https://bugs.webkit.org/show_bug.cgi?id=141371
2138 Reviewed by David Kilzer.
2142 Covered by existing mathml tests.
2144 * rendering/mathml/RenderMathMLOperator.cpp:
2145 (WebCore::RenderMathMLOperator::boundsForGlyph):
2146 (WebCore::RenderMathMLOperator::advanceForGlyph):
2147 (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
2149 2015-02-27 Chris Dumez <cdumez@apple.com>
2151 Make SourceBuffer ActiveDOMObject suspendable
2152 https://bugs.webkit.org/show_bug.cgi?id=142108
2153 <rdar://problem/19923085>
2155 Reviewed by Jer Noble.
2157 Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
2158 MediaSource and does not have any pending events. This makes it more
2159 likely for pages using SourceBuffer objects to go into the PageCache.
2161 Test: fast/history/page-cache-removed-source-buffer.html
2163 * Modules/mediasource/SourceBuffer.cpp:
2164 (WebCore::SourceBuffer::canSuspend):
2165 * Modules/mediasource/SourceBuffer.h:
2167 2015-02-26 Sam Weinig <sam@webkit.org>
2169 Add support for canvas ellipse method
2170 https://bugs.webkit.org/show_bug.cgi?id=82791
2171 <rdar://problem/11159172>
2173 Reviewed by Dirk Schulze.
2175 Tests: fast/canvas/canvas-ellipse-360-winding.html
2176 fast/canvas/canvas-ellipse-circumference-fill.html
2177 fast/canvas/canvas-ellipse-circumference.html
2178 fast/canvas/canvas-ellipse-connecting-line.html
2179 fast/canvas/canvas-ellipse-negative-radius.html
2180 fast/canvas/canvas-ellipse-zero-lineto.html
2181 fast/canvas/canvas-ellipse.html
2183 * html/canvas/CanvasPathMethods.h:
2184 * html/canvas/CanvasPathMethods.cpp:
2185 (WebCore::CanvasPathMethods::lineTo):
2186 Convenience for passing a FloatPoint instead of two floats.
2188 (WebCore::normalizeAngles):
2189 Normalizes the angles as described in the HTML spec. Ensuring the startAngle
2190 is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
2191 from the start angle.
2193 (WebCore::CanvasPathMethods::arc):
2194 - Renames some of the parameters to be clearer.
2195 - Normalizes the angles for consistency with ellipse.
2196 - Moves hasInvertibleTransform() higher in the function for consistency.
2198 (WebCore::CanvasPathMethods::ellipse): Added.
2200 * html/canvas/CanvasRenderingContext2D.idl:
2201 * html/canvas/DOMPath.idl:
2204 * platform/graphics/Path.h:
2205 * platform/graphics/cg/PathCG.cpp:
2206 (WebCore::Path::addArc):
2207 Rename parameters for clarity and use a nullptr.
2209 (WebCore::Path::addEllipse):
2210 Added. Constructs an ellipse via a transformed arc.
2212 2015-02-27 Enrica Casucci <enrica@apple.com>
2214 Adding support for serializing HTMLAttachment elements.
2215 https://bugs.webkit.org/show_bug.cgi?id=142026
2217 Reviewed by Tim Horton.
2219 Test: editing/pasteboard/copy-paste-attachment.html
2221 Adding support to serialize the attachment element
2222 and properly handle it when converting a DOM range
2223 to NSAttributedString.
2225 * editing/cocoa/HTMLConverter.mm:
2226 (HTMLConverter::_processElement):
2227 * editing/markup.cpp:
2228 (WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
2229 for attachment element when serializating.
2230 (WebCore::StyledMarkupAccumulator::appendElement):
2231 (WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
2232 when creating the fragment.
2233 * html/HTMLAttachmentElement.cpp:
2234 (WebCore::HTMLAttachmentElement::file): Added const to file() to
2235 use it in appendCustonAttributes where the element is a const reference.
2236 * html/HTMLAttachmentElement.h:
2237 * html/HTMLAttributeNames.in:
2239 2015-02-27 Timothy Horton <timothy_horton@apple.com>
2241 <attachment> should have an inactive style (gray in background)
2242 https://bugs.webkit.org/show_bug.cgi?id=142103
2243 <rdar://problem/19982486>
2245 Reviewed by Dan Bernstein.
2247 * rendering/RenderThemeMac.mm:
2248 (WebCore::attachmentLabelInactiveBackgroundColor):
2249 (WebCore::attachmentLabelInactiveTextColor):
2250 (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
2251 (WebCore::RenderThemeMac::paintAttachmentLabel):
2252 Use a gray background and gray text when the selection containing the
2253 attachment isn't focused and active.
2255 2015-02-27 Brady Eidson <beidson@apple.com>
2257 Add a "block-cookies" rule to the user content filter.
2258 https://bugs.webkit.org/show_bug.cgi?id=142105
2260 Reviewed by Alex Christensen.
2262 Tests: http/tests/usercontentfilter/block-cookies-basic.html
2263 http/tests/usercontentfilter/block-cookies-send.html
2265 * contentextensions/ContentExtensionRule.h:
2267 * contentextensions/ContentExtensionsBackend.cpp:
2268 (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
2269 (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
2270 * contentextensions/ContentExtensionsBackend.h:
2272 * contentextensions/ContentExtensionsManager.cpp:
2273 (WebCore::ContentExtensions::ExtensionsManager::loadAction):
2275 * loader/cache/CachedResourceLoader.cpp:
2276 (WebCore::CachedResourceLoader::requestResource):
2278 * page/UserContentController.cpp:
2279 (WebCore::UserContentController::actionForURL):
2280 (WebCore::UserContentController::contentFilterBlocksURL): Deleted.
2281 * page/UserContentController.h:
2283 2015-02-27 Alex Christensen <achristensen@webkit.org>
2285 [WinCairo] Unreviewed build fix.
2287 * platform/graphics/BitmapImage.h:
2288 * platform/win/BitmapInfo.h:
2289 Added WEBCORE_EXPORT.
2291 2015-02-27 Timothy Horton <timothy_horton@apple.com>
2293 <attachment>'s label baseline should match that of the surrounding text
2294 https://bugs.webkit.org/show_bug.cgi?id=142099
2295 rdar://problem/19982495
2297 Reviewed by Dan Bernstein.
2299 * rendering/RenderAttachment.cpp:
2300 (WebCore::RenderAttachment::baselinePosition):
2301 * rendering/RenderAttachment.h:
2302 Override baselinePosition and retrieve it from RenderTheme.
2304 * rendering/RenderTheme.h:
2305 (WebCore::RenderTheme::attachmentBaseline):
2306 * rendering/RenderThemeMac.h:
2307 * rendering/RenderThemeMac.mm:
2308 (WebCore::AttachmentLayout::AttachmentLayout):
2309 (WebCore::RenderThemeMac::attachmentBaseline):
2310 Plumb the label baseline from AttachmentLayout to RenderAttachment.
2312 2015-02-27 Commit Queue <commit-queue@webkit.org>
2314 Unreviewed, rolling out r180752.
2315 https://bugs.webkit.org/show_bug.cgi?id=142098
2317 Causes 10 SVG test failures on Windows. (Requested by
2318 bfulgham_ on #webkit).
2322 "Cache glyph widths to GlyphPages"
2323 https://bugs.webkit.org/show_bug.cgi?id=142028
2324 http://trac.webkit.org/changeset/180752
2326 2015-02-27 David Kilzer <ddkilzer@apple.com>
2328 [iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>
2330 * platform/spi/ios/OpenGLESSPI.h: Define EAGL_IOSURFACE macro
2331 until header refactoring is completed.
2333 2015-02-27 Chris Dumez <cdumez@apple.com>
2335 MediaSource should be suspendable when closed
2336 https://bugs.webkit.org/show_bug.cgi?id=142089
2337 <rdar://problem/19923085>
2339 Reviewed by Jer Noble.
2341 Make MediaSource ActiveDOMObject suspendable when it is in closed state
2342 and it has no pending events. This increases the likelihood of pages
2343 using MediaSource to enter the PageCache.
2345 Tests: fast/history/page-cache-media-source-closed-2.html
2346 fast/history/page-cache-media-source-closed.html
2347 fast/history/page-cache-media-source-opened.html
2349 2015-02-27 Andreas Kling <akling@apple.com>
2351 Use NeverDestroyed for JS wrapper owners.
2352 <https://webkit.org/b/142090>
2354 Reviewed by Chris Dumez.
2356 Using NeverDestroyed puts these objects in BSS which is preferable
2357 since that prevents them from pinning down entire malloc pages forever.
2359 * bindings/scripts/CodeGeneratorJS.pm:
2360 (GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
2362 * bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.
2364 2015-02-27 Chris Dumez <cdumez@apple.com>
2366 Make IDBDatabase / IDBRequest suspendable
2367 https://bugs.webkit.org/show_bug.cgi?id=142076
2368 <rdar://problem/19923085>
2370 Reviewed by Andreas Kling.
2372 Make IDBDatabase / IDBRequest suspendable under certain conditions to
2373 make it more likely for pages using indexeddb to enter the PageCache.
2375 IDBDatabase is safely suspendable if the database is closed. IDBRequest
2376 is safely suspendable if the request no longer has any pending activity
2377 (i.e. state is DONE and success / failure handler was called). We may
2378 be able to do better later but this is the bare minimum for now.
2380 Tests: fast/history/page-cache-indexed-closed-db.html
2381 fast/history/page-cache-indexed-opened-db.html
2383 * Modules/indexeddb/IDBDatabase.cpp:
2384 (WebCore::IDBDatabase::IDBDatabase):
2385 (WebCore::IDBDatabase::closeConnection):
2386 (WebCore::IDBDatabase::enqueueEvent):
2387 (WebCore::IDBDatabase::canSuspend):
2388 * Modules/indexeddb/IDBDatabase.h:
2389 * Modules/indexeddb/IDBRequest.cpp:
2390 (WebCore::IDBRequest::canSuspend):
2391 * Modules/indexeddb/IDBRequest.h:
2393 2015-02-27 Chris Dumez <cdumez@apple.com>
2395 Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
2396 https://bugs.webkit.org/show_bug.cgi?id=142052
2398 Reviewed by Andreas Kling.
2400 Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
2401 DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
2402 returning false so pages using WebDatabase would never enter the PageCache anyway.
2404 This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
2405 return false when there are open databases. This check is now equivalent to the one
2406 that was in PageCache.
2408 An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
2409 to false so once a page opened a database, it will never be page-cacheable. This
2410 will be taken care of separately though.
2412 Test: fast/history/page-cache-webdatabase-opened-db.html
2414 * Modules/webdatabase/DatabaseContext.cpp:
2415 (WebCore::DatabaseContext::canSuspend):
2416 * Modules/webdatabase/DatabaseContext.h:
2417 * history/PageCache.cpp:
2418 (WebCore::logCanCacheFrameDecision):
2419 (WebCore::PageCache::canCachePageContainingThisFrame):
2420 * page/DiagnosticLoggingKeys.cpp:
2421 (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
2422 * page/DiagnosticLoggingKeys.h:
2424 2015-02-27 Alex Christensen <achristensen@webkit.org>
2426 Compile DFA to bytecode.
2427 https://bugs.webkit.org/show_bug.cgi?id=142031
2429 Reviewed by Benjamin Poulain.
2431 * WebCore.xcodeproj/project.pbxproj:
2432 * contentextensions/ContentExtensionsBackend.cpp:
2433 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2434 (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2435 * contentextensions/ContentExtensionsBackend.h:
2436 * contentextensions/DFA.cpp:
2437 (WebCore::ContentExtensions::DFA::nextState): Deleted.
2438 (WebCore::ContentExtensions::DFA::actions): Deleted.
2439 * contentextensions/DFA.h:
2440 (WebCore::ContentExtensions::DFA::size):
2441 (WebCore::ContentExtensions::DFA::nodeAt):
2442 * contentextensions/DFABytecode.h: Added.
2443 (WebCore::ContentExtensions::instructionSizeWithArguments):
2444 * contentextensions/DFABytecodeCompiler.cpp: Added.
2445 (WebCore::ContentExtensions::append):
2446 (WebCore::ContentExtensions::set32Bits):
2447 (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
2448 (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
2449 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
2450 (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
2451 (WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
2452 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2453 (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2454 * contentextensions/DFABytecodeCompiler.h: Added.
2455 (WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
2456 * contentextensions/DFABytecodeInterpreter.cpp: Added.
2457 (WebCore::ContentExtensions::getBits):
2458 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2459 * contentextensions/DFABytecodeInterpreter.h: Added.
2460 (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
2462 2015-02-27 Zalan Bujtas <zalan@apple.com>
2464 Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
2465 https://bugs.webkit.org/show_bug.cgi?id=138366
2467 Reviewed by Dave Hyatt.
2469 This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.
2471 In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
2472 When a child is being detached from the tree, it removes itself from this hashmap.
2473 We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
2474 However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
2475 is inside a flow too and continue the cleanup accordingly.
2477 Test: fast/regions/region-with-multicolumn-embedded-crash.html
2479 * rendering/RenderObject.cpp:
2480 (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
2482 2015-02-27 Brady Eidson <beidson@apple.com>
2484 Add API to remove a single content filter.
2485 <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
2487 Reviewed by Sam Weinig.
2489 * page/UserContentController.cpp:
2490 (WebCore::UserContentController::removeUserContentFilter):
2491 * page/UserContentController.h:
2493 2015-02-26 Brent Fulgham <bfulgham@apple.com>
2495 [Win] Remove remaining SafariTheme cruft
2496 https://bugs.webkit.org/show_bug.cgi?id=142075
2498 Reviewed by Anders Carlsson.
2500 Remove reference to SafariTheme-switching preference.
2502 Tested by existing layout tests.
2504 * WebCore.vcxproj/WebCore.vcxproj:
2505 * WebCore.vcxproj/WebCore.vcxproj.filters:
2507 * page/Settings.cpp:
2508 (WebCore::Settings::fontRenderingMode):
2509 (WebCore::Settings::setShouldPaintNativeControls): Deleted.
2511 (WebCore::Settings::shouldPaintNativeControls): Deleted.
2512 * platform/win/ScrollbarThemeWin.cpp:
2513 (WebCore::ScrollbarTheme::nativeTheme):
2514 * rendering/RenderThemeWin.cpp:
2515 (WebCore::RenderTheme::themeForPage):
2517 2015-02-27 Myles C. Maxfield <mmaxfield@apple.com>
2519 Add comment about CSS value name mangling
2523 * css/CSSParser.cpp:
2524 (WebCore::cssValueKeywordID):
2526 2015-02-27 Antti Koivisto <antti@apple.com>
2528 Cache glyph widths to GlyphPages
2529 https://bugs.webkit.org/show_bug.cgi?id=142028
2531 Reviewed by Andreas Kling.
2533 Currently we have a separate cache in Font for glyph widths. In practice we always need
2534 the widths so we can just cache them in GlyphPages. This simplifies the code and removes
2535 a per-character hash lookup from WidthIterator.
2537 * platform/graphics/Font.cpp:
2538 (WebCore::Font::Font):
2539 (WebCore::Font::initCharWidths):
2540 (WebCore::Font::platformGlyphInit):
2541 (WebCore::createAndFillGlyphPage):
2542 (WebCore::Font::computeWidthForGlyph):
2544 Rename to make it clear this doesn't cache.
2546 (WebCore::GlyphPage::setGlyphDataForIndex):
2548 Initialize the width.
2549 This could go to GlyphPage.cpp if we had one.
2551 * platform/graphics/Font.h:
2552 (WebCore::Font::glyphZeroWidth):
2553 (WebCore::Font::isZeroWidthSpaceGlyph):
2554 (WebCore::Font::zeroGlyph): Deleted.
2555 (WebCore::Font::setZeroGlyph): Deleted.
2556 (WebCore::Font::widthForGlyph): Deleted.
2557 * platform/graphics/FontCascade.cpp:
2558 (WebCore::offsetToMiddleOfGlyph):
2559 * platform/graphics/FontCascadeFonts.cpp:
2560 (WebCore::FontCascadeFonts::glyphDataForCharacter):
2561 * platform/graphics/GlyphPage.h:
2562 (WebCore::GlyphData::GlyphData):
2564 Return width too as part of GlyphData.
2566 (WebCore::GlyphPage::glyphDataForIndex):
2567 (WebCore::GlyphPage::setGlyphDataForCharacter):
2568 (WebCore::GlyphPage::setGlyphDataForIndex):
2569 (WebCore::GlyphPage::GlyphPage):
2570 * platform/graphics/WidthIterator.cpp:
2571 (WebCore::WidthIterator::advanceInternal):
2573 No need to lookup width separately now.
2575 * platform/graphics/mac/ComplexTextController.cpp:
2576 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2577 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2578 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2579 * rendering/mathml/RenderMathMLOperator.cpp:
2580 (WebCore::RenderMathMLOperator::advanceForGlyph):
2581 * rendering/svg/SVGTextRunRenderingContext.cpp:
2582 (WebCore::missingGlyphForFont):
2583 * svg/SVGFontData.cpp:
2584 (WebCore::SVGFontData::initializeFont):
2586 2015-02-26 Alexey Proskuryakov <ap@apple.com>
2588 iOS build fix after r180717.
2590 * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):
2592 2015-02-26 Ryosuke Niwa <rniwa@webkit.org>
2594 isEditablePosition and related functions shouldn't move position out of table
2595 https://bugs.webkit.org/show_bug.cgi?id=129200
2597 Reviewed by Darin Adler.
2599 This patch removes the legacy editing position for elements display: table in its computed style.
2600 Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
2601 such an element for historical reasons. This forced us to update the style tree before computing
2602 the editability of a position because we have to check the editability of the position outside
2603 the element with display: table if the position was using such a legacy editing position.
2604 e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
2605 should still be considered editable if the parent node of the table was editable.
2607 This patch replaces such a legacy editing position by using modern position types:
2608 PositionIsBeforeAnchor and PositionIsAfterAnchor.
2610 No new tests since there should be no change in the user perceived editing operations.
2613 (WebCore::Position::previous): Setup the node and the offset correctly when the original position's
2614 type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
2615 is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
2616 position inside a table.
2617 (WebCore::Position::next): Ditto.
2618 (WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
2620 (WebCore::Position::atEndOfTree): Ditto.
2621 (WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
2622 for an atomic element or a table element as done in the equivalent code in Position::upstream.
2623 (WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
2624 (table, 1) when there are more than two children of the table.
2626 * dom/PositionIterator.cpp:
2627 (WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
2628 positions. So convert it to a modern position by returning a position before or after a table here.
2629 * editing/ApplyBlockElementCommand.cpp:
2630 (WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
2631 is actually empty before executing the simple code path for an empty unsplittable element. Without
2632 this check, block formatting a table element will fail.
2634 * editing/htmlediting.cpp:
2635 (WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
2636 of a position before or after an element is determined by its parent, not the element itself.
2637 (WebCore::isAtUnsplittableElement): Ditto.
2638 (WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
2639 an element with display: table. This is the code removal for which this patch was made.
2640 (WebCore::editableRootForPosition): Ditto.
2642 2015-02-26 Timothy Horton <timothy_horton@apple.com>
2644 Implement <attachment> element appearance on Mac
2645 https://bugs.webkit.org/show_bug.cgi?id=142023
2647 Reviewed by Dean Jackson.
2649 * css/CSSParser.cpp:
2650 (WebCore::isValidKeywordPropertyAndValue):
2651 * css/CSSPrimitiveValueMappings.h:
2652 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2653 * css/CSSValueKeywords.in:
2656 * platform/ThemeTypes.h:
2657 Add a new -webkit-appearance value, attachment.
2659 * WebCore.xcodeproj/project.pbxproj:
2660 * html/HTMLAttachmentElement.cpp:
2661 (WebCore::HTMLAttachmentElement::setFile):
2662 Let the renderer know when the file changes (so it can relayout and repaint).
2664 (WebCore::HTMLAttachmentElement::filePath):
2665 (WebCore::HTMLAttachmentElement::fileName):
2666 * html/HTMLAttachmentElement.h:
2667 Handy acccessors for the full path and the name of the file.
2669 * platform/spi/mac/IconServicesSPI.h: Added.
2670 * platform/spi/mac/LaunchServicesSPI.h: Added.
2671 Add some IconServices and LaunchServices SPI headers.
2673 * rendering/RenderAttachment.cpp:
2674 (WebCore::RenderAttachment::RenderAttachment):
2675 Don't have a default intrinsic size; we'll adjust in layout().
2677 (WebCore::RenderAttachment::isSelected):
2678 (WebCore::RenderAttachment::isFocused):
2679 (WebCore::RenderAttachment::isSelectedOrFocused):
2680 Factor out from paintReplaced().
2682 (WebCore::RenderAttachment::layout):
2683 Use RenderTheme to compute the intrinsic size of this attachment.
2685 (WebCore::RenderAttachment::paintReplaced):
2686 Use RenderTheme to paint the attachment.
2688 (WebCore::RenderAttachment::representedFileChanged):
2689 When the represented file changes, we need to recompute the intrinsic size and repaint.
2691 * rendering/RenderTheme.cpp:
2692 (WebCore::RenderTheme::adjustStyle):
2693 (WebCore::RenderTheme::paint):
2694 (WebCore::RenderTheme::adjustAttachmentStyle):
2695 (WebCore::RenderTheme::paintAttachment):
2696 Plumb through the attachment appearance.
2698 * rendering/RenderAttachment.h:
2699 * rendering/RenderTheme.h:
2700 (WebCore::RenderTheme::paintAttachment):
2701 (WebCore::RenderTheme::attachmentIntrinsicSize):
2702 * rendering/RenderThemeMac.h:
2703 * rendering/RenderThemeMac.mm:
2704 (WebCore::attachmentIconBackgroundColor):
2705 (WebCore::attachmentIconBorderColor):
2706 (WebCore::AttachmentLayout):
2707 AttachmentLayout lays out the innards of the RenderThemeMac attachment
2708 presentation: an icon with an optional bordered background, with a label
2709 underneath it with an optional background.
2711 (WebCore::RenderThemeMac::attachmentIntrinsicSize):
2712 (WebCore::paintAttachmentIconBackground):
2713 (WebCore::paintAttachmentIcon):
2714 (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
2715 (WebCore::RenderThemeMac::paintAttachmentLabel):
2716 (WebCore::RenderThemeMac::paintAttachment):
2717 Paint the attachment element. Paint the optional backgrounds (and swap
2718 out the text color) if the element is selected/focused.
2720 2015-02-26 Doug Russell <d_russell@apple.com>
2722 AX: Expose caret browsing preference to accessibility API
2723 https://bugs.webkit.org/show_bug.cgi?id=141862
2725 Reviewed by Chris Fleizach.
2727 Exposing the caret browsing setting on WebCore::Frame via the accessibility API would allow assistive tech apps to enable it contextually (for example, when the assistive tech app is running).
2728 Enabling caret browsing when assistive tech apps are running greatly improves the reliability of keyboard navigation on the web. Most especially in cases where selection would be disrupted by focus events.
2730 Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
2731 platform/mac/accessibility/caret-browsing-attribute.html
2732 platform/mac/accessibility/caret-browsing-tab-selection.html
2734 * accessibility/AccessibilityObject.h:
2735 * accessibility/mac/AccessibilityObjectMac.mm:
2736 (WebCore::AccessibilityObject::caretBrowsingEnabled):
2737 (WebCore::AccessibilityObject::setCaretBrowsingEnabled):
2738 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2739 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2740 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2741 (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2742 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
2743 (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):
2745 2015-02-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2747 Remove unnecessary create() factory functions
2748 https://bugs.webkit.org/show_bug.cgi?id=142039
2750 Reviewed by Chris Dumez.
2752 Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
2753 and DatabaseUnpauseTask::create.
2755 * Modules/webdatabase/DatabaseThread.cpp:
2756 (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
2757 (WebCore::DatabaseThread::setPaused):
2758 (WebCore::DatabaseUnpauseTask::create): Deleted.
2759 * bindings/js/JSCryptoKeySerializationJWK.h:
2760 * bindings/js/JSSubtleCryptoCustom.cpp:
2761 (WebCore::importKey):
2762 * html/HTMLMediaElement.cpp:
2763 (WebCore::HTMLMediaElement::HTMLMediaElement):
2764 * html/HTMLMediaSession.cpp:
2765 (WebCore::HTMLMediaSession::create): Deleted.
2766 * html/HTMLMediaSession.h:
2768 2015-02-26 Joseph Pecoraro <pecoraro@apple.com>
2770 Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
2771 https://bugs.webkit.org/show_bug.cgi?id=142061
2773 Reviewed by Timothy Hatcher.
2775 * inspector/CommandLineAPIModuleSource.js:
2776 Replace $1-$4 "inspected objects" with $1-$99 "saved results".
2778 * bindings/js/JSCommandLineAPIHostCustom.cpp:
2779 (WebCore::JSCommandLineAPIHost::inspectedObject):
2780 * inspector/CommandLineAPIHost.cpp:
2781 (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2782 (WebCore::CommandLineAPIHost::InspectableObject::get):
2783 (WebCore::CommandLineAPIHost::addInspectedObject):
2784 (WebCore::CommandLineAPIHost::inspectedObject):
2785 (WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
2786 * inspector/CommandLineAPIHost.h:
2787 * inspector/CommandLineAPIHost.idl:
2788 Since we now just save the single $0 inspected object, eliminate
2789 keeping track of a list of 5 values.
2791 2015-02-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2793 Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
2794 https://bugs.webkit.org/show_bug.cgi?id=141902
2796 Reviewed by Darin Adler.
2798 Create instance using std::make_unique<> in CDMFactory directly. To do that,
2799 CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.
2801 No new tests, no behavior changes.
2803 * Modules/encryptedmedia/CDM.cpp:
2804 (WebCore::installedCDMFactories):
2805 * Modules/encryptedmedia/CDM.h:
2806 * Modules/encryptedmedia/CDMPrivateClearKey.h:
2807 (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
2808 (WebCore::CDMPrivateClearKey::create): Deleted.
2809 * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
2810 (WebCore::CDMPrivateMediaPlayer::create): Deleted.
2812 (WebCore::Element::attributes):
2813 * dom/NamedNodeMap.h:
2814 (WebCore::NamedNodeMap::NamedNodeMap):
2815 (WebCore::NamedNodeMap::create): Deleted.
2816 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
2817 (WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.
2819 2015-02-26 Andy Estes <aestes@apple.com>
2821 [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
2822 https://bugs.webkit.org/show_bug.cgi?id=142062
2824 Reviewed by Daniel Bates.
2826 * WebCore.xcodeproj/project.pbxproj:
2827 * platform/mac/ContentFilterMac.mm:
2828 * platform/spi/cocoa/NEFilterSourceSPI.h: Added.
2829 * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
2831 2015-02-26 Anders Carlsson <andersca@apple.com>
2833 Add API to remove all website data for the given data records
2834 https://bugs.webkit.org/show_bug.cgi?id=142060
2836 Reviewed by Beth Dakin.
2838 * loader/cache/MemoryCache.cpp:
2839 (WebCore::MemoryCache::removeResourcesWithOrigins):
2840 New function that removes all resources that match the set of origins in a given session.
2842 2015-02-26 Chris Dumez <cdumez@apple.com>
2844 Rename DatabaseManager::manager() to DatabaseManager::singleton()
2845 https://bugs.webkit.org/show_bug.cgi?id=142054
2847 Reviewed by Ryosuke Niwa.
2849 Rename DatabaseManager::manager() to DatabaseManager::singleton() as
2850 per coding style and use WTF::NeverDestroyed.
2852 * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2853 (WebCore::DOMWindowWebDatabase::openDatabase):
2854 * Modules/webdatabase/DatabaseBackendBase.cpp:
2855 (WebCore::DatabaseBackendBase::DatabaseBackendBase):
2856 * Modules/webdatabase/DatabaseContext.cpp:
2857 (WebCore::DatabaseContext::DatabaseContext):
2858 (WebCore::DatabaseContext::~DatabaseContext):
2859 (WebCore::DatabaseContext::stopDatabases):
2860 (WebCore::DatabaseContext::databaseExceededQuota):
2861 * Modules/webdatabase/DatabaseManager.cpp:
2862 (WebCore::DatabaseManager::singleton):
2863 (WebCore::DatabaseManager::manager): Deleted.
2864 * Modules/webdatabase/DatabaseManager.h:
2865 (WebCore::DatabaseManager::~DatabaseManager): Deleted.
2866 * Modules/webdatabase/SQLTransactionClient.cpp:
2867 (WebCore::SQLTransactionClient::didExceedQuota):
2868 * history/PageCache.cpp:
2869 (WebCore::logCanCacheFrameDecision):
2870 (WebCore::PageCache::canCachePageContainingThisFrame):
2871 * loader/FrameLoader.cpp:
2872 (WebCore::FrameLoader::stopLoading):
2874 2015-02-26 Csaba Osztrogonác <ossy@webkit.org>
2876 Fix the !ENABLE(GEOLOCATION) build after r180533
2877 https://bugs.webkit.org/show_bug.cgi?id=142053
2879 Reviewed by Chris Dumez.
2881 * Modules/geolocation/GeoNotifier.cpp:
2882 * Modules/geolocation/GeoNotifier.h:
2884 2015-02-26 Dean Jackson <dino@apple.com>
2886 [iOS Media] incorrect front padding on time values
2887 https://bugs.webkit.org/show_bug.cgi?id=142027
2888 <rdar://problem/19960790>
2890 Reviewed by Brent Fulgham.
2892 My last commit was updating the OS X file,
2895 We don't want to prefix times with a "0".
2897 * Modules/mediacontrols/mediaControlsApple.js:
2898 (Controller.prototype.formatTime):
2899 * Modules/mediacontrols/mediaControlsiOS.js:
2900 (ControllerIOS.prototype.formatTime):
2902 2015-02-26 Mark Lam <mark.lam@apple.com>
2904 Rolling out r180602, r180608, r180613, r180617, r180671.
2905 <https://webkit.org/b/141990>
2909 The r180602 solution does result in more work for GC when worker
2910 threads are in use. Filip is uncomfortable with that.
2911 The EFL and GTK ports also seem to be unhappy with this change.
2912 Rolling out while we investigate.
2914 * bindings/js/JSDOMWindowBase.cpp:
2915 (WebCore::JSDOMWindowBase::commonVM):
2917 2015-02-26 Myles C. Maxfield <mmaxfield@apple.com>
2919 [Mac] [iOS] Parsing support for -apple-trailing-word
2920 https://bugs.webkit.org/show_bug.cgi?id=141939
2922 Reviewed by Andreas Kling.
2924 This patch implements initial parsing support for the -apple-trailing-word CSS property.
2925 This property has two possible (mutually exclusive) values: auto and
2926 -apple-partially-balanced. This property is inherited.
2928 The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
2930 This is an internal property that will allow us to control line breaking behavior for
2933 Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
2934 the new value must be implemented as -webkit-partially-balanced. Using the -apple-
2935 prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
2938 Test: platform/mac/fast/text/trailing-word-parse.html
2940 * Configurations/FeatureDefines.xcconfig:
2941 * css/CSSComputedStyleDeclaration.cpp:
2942 (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
2944 * css/CSSParser.cpp:
2945 (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
2947 (WebCore::isKeywordPropertyID): New property is a keyword property.
2948 (WebCore::CSSParser::parseValue): Use the keyword property codepath.
2949 * css/CSSPrimitiveValueMappings.h:
2950 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
2951 representation and CSS values.
2952 (WebCore::CSSPrimitiveValue::operator TrailingWord):
2953 * css/CSSPropertyNames.in: New property.
2954 * css/CSSValueKeywords.in: New value.
2955 * rendering/SimpleLineLayout.cpp:
2956 (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
2957 * rendering/style/RenderStyle.h: Getter, setter and initial value.
2958 * rendering/style/RenderStyleConstants.h: Internal data type.
2959 * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
2960 * rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.
2962 2015-02-26 Roger Fong <roger_fong@apple.com>
2964 Unreviewed. Fix a accidental deletion from r178674.
2966 * html/canvas/WebGLRenderingContextBase.cpp:
2967 (WebCore::WebGLRenderingContextBase::create):
2968 Return the fake WebGL context.
2970 2015-02-26 Said Abou-Hallawa <sabouhallawa@apple.com>
2972 Cleanup RenderSVGResourceClipper class.
2973 https://bugs.webkit.org/show_bug.cgi?id=142032.
2975 Reviewed by Darin Adler.
2977 This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
2978 It includes cleanup for RenderSVGResourceClipper class.
2980 * rendering/svg/RenderSVGResourceClipper.cpp:
2981 (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2982 (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2983 * rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
2984 typedef instead of a class and rename it to ClipperMaskImage. The purpose
2985 of having it a class even though it includes only one member was because
2986 we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
2987 as a separate object on the heap anymore.
2989 (WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
2990 double hash table lookups by calling HashMap::contains() and then HashMap::get(),
2991 we can use HashMap::add() instead.
2993 2015-02-26 Said Abou-Hallawa <sabouhallawa@apple.com>
2995 Setting any of the <object> element plugin controlling attributes does not have any affect.
2996 https://bugs.webkit.org/show_bug.cgi?id=141936.
2998 Reviewed by Zalan Bujtas.
3000 When setting any of the <object> element plugin controlling attributes
3001 dynamically we need to mark the the element to be dirty by calling
3002 setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
3004 Test: svg/as-object/svg-in-object-dynamic-attribute-change.html
3006 * dom/Element.h: Delete unimplemented function.
3008 * html/HTMLObjectElement.cpp:
3009 (WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
3010 setNeedsStyleRecalc() when one of the plugin controlling attributes gets
3011 changed. We have to clear the m_useFallbackContent because the attribute's
3012 new value might fix the object rendering.
3014 * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
3016 * html/HTMLPlugInImageElement.cpp:
3017 (WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to
3018 reconstruct the object renderer in the image case. This can happen if the
3019 image was rendering fallback content and the attribute's new value fixes
3020 the object rendering.
3022 2015-02-26 Brent Fulgham <bfulgham@apple.com>
3024 [Win] Make build logs more legible by reducing noise
3025 https://bugs.webkit.org/show_bug.cgi?id=142034
3027 Reviewed by Alexey Proskuryakov.
3029 Modify batch files, makefiles, and DOS commands to remove
3030 uninteresting/unhelpful output.
3032 * WebCore.vcxproj/WebCoreGenerated.make:
3033 * WebCore.vcxproj/WebCorePreBuild.cmd:
3034 * WebCore.vcxproj/copyForwardingHeaders.cmd:
3035 * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
3037 2015-02-26 Michael Catanzaro <mcatanzaro@igalia.com>
3039 [FreeType] REGRESSION(r180563): Introduced crashes
3040 https://bugs.webkit.org/show_bug.cgi?id=142044
3042 Reviewed by Martin Robinson.
3044 No new tests, should be caught by any woff font test.
3046 Use optionsPattern, not m_pattern, when m_pattern may be null.
3048 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3049 (WebCore::FontPlatformData::initializeWithFontFace):
3051 2015-02-26 Sergio Villar Senin <svillar@igalia.com>
3053 ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
3054 https://bugs.webkit.org/show_bug.cgi?id=141645
3056 Reviewed by Chris Dumez.
3058 This bug has been here since r110484 but was uncovered by
3059 r180140. The problem r110484 was trying to fix was that
3060 CSSPrimitiveValue::convertToLength<Length> ended up calling
3061 CSSPrimitiveValue::computeLengthDouble() which was apparently
3062 dereferencing conversionData.style() and
3063 conversionData.rootStyle() pointers without checking them. That's
3064 why that fix added this condition to convertToLength():
3066 isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())
3068 which is not correct, because for the 4 possible font relative
3069 length types, 3 of them just use the style() pointer and the other
3070 one just uses rootStyle() which BTW could be NULL. This erroneous
3071 condition makes that function to return Length(Undefined) more
3072 often than it should.
3074 From now on it only returns Length(Undefined) if the style()
3075 pointer is NULL and the font relative length type is one in the
3076 set (CSS_EMS, CSS_EXS, CSS_CHS);
3078 Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html
3080 * css/CSSPrimitiveValue.h:
3081 * css/CSSPrimitiveValueMappings.h:
3082 (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
3083 (WebCore::CSSPrimitiveValue::convertToLength):
3086 2015-02-26 Andreas Kling <akling@apple.com>
3088 [Cocoa] Prod libcache to drop caches in memory pressure relief handler.
3089 <https://webkit.org/b/142024>
3090 <rdar://problem/19966096>
3092 Reviewed by Antti Koivisto.
3094 libcache already listens to the OS memory pressure notifications, but we still
3095 need to manually request a cleanup when doing an iOS process suspension, or when
3096 simulating memory pressure.
3098 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3099 (WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
3100 cache_simulate_memory_warning_event() to make sure that nonessential objects
3101 being kept alive by NSCaches get dropped when we need the memory.
3103 2015-02-25 Zalan Bujtas <zalan@apple.com>
3105 Black line across screen on Adobe Illustrator detail page (non-retina only)
3106 https://bugs.webkit.org/show_bug.cgi?id=141866
3108 Reviewed by Simon Fraser.
3110 Phase is relative to the destination origin. We need to take location information into account
3111 while snapping so that the result is inline with the snapped destination rect.
3112 (location affects the snapped size.)
3114 Test: fast/backgrounds/gradient-background-on-subpixel-position.html
3116 * rendering/RenderBoxModelObject.cpp:
3117 (WebCore::pixelSnapBackgroundImageGeometryForPainting):
3118 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3120 2015-02-25 Brent Fulgham <bfulgham@apple.com>
3122 [Win] Use WEBCORE_EXPORT instead of Definition file
3123 https://bugs.webkit.org/show_bug.cgi?id=141734
3125 Reviewed by Alex Christensen.
3127 No change in functionality.
3129 * WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
3130 settings on certain files.
3131 * WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
3133 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
3134 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
3135 * WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
3136 * WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
3137 * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
3138 * WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
3139 * WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
3140 * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
3141 * WebCorePrefix.h: Provide proper export definitions for Windows.
3142 * bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
3143 needed by the new export style.
3144 * bindings/js/JSDOMWindowBase.h: Export class since DRT needs
3145 access to parts of it.
3146 * bindings/js/ScriptCachedFrameData.cpp: Add missing #include
3147 needed by the new export style.
3148 * bindings/scripts/CodeGeneratorJS.pm: Use different export macro
3149 when generating WebCoreTestSupport files, so that we don't confuse
3150 the linker when WebCore.lib and WebCoreTestSupport.lib try to
3151 both export WEBCORE_EXPORT symbols.
3152 (ExportLabelForClass):
3154 * bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
3156 * css/CSSParser.cpp: Ditto.
3157 * dom/Document.cpp: Ditto.
3158 * html/HTMLImageLoader.cpp: Ditto.
3159 * inspector/CommandLineAPIModule.cpp: Ditto.
3160 * inspector/PageDebuggerAgent.cpp: Ditto.
3161 * inspector/PageRuntimeAgent.cpp: Ditto.
3162 * inspector/WorkerRuntimeAgent.cpp: Ditto.
3163 * page/DOMWindow.cpp: Ditto.
3164 * page/DOMWindow.h: Export the destructor, as it is needed by
3165 DumpRenderTree (on Windows).
3166 * page/Page.cpp: Add missing #include needed by the new export style.
3167 * platform/Logging.h: Remove conflicting export declaration.
3168 * platform/PlatformExportMacros.h: Update for Windows use.
3169 * testing/Internals.cpp: Add missing #include needed by the new export style.
3170 * testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
3171 are supposed to be exported by WebCoreTestSupport, not WebCore.
3172 * testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
3174 * testing/js/WebCoreTestSupportPrefix.cpp: Added.
3175 * testing/js/WebCoreTestSupportPrefix.h: Added.
3176 * xml/XMLHttpRequest.h: Export the destructor.
3177 * xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
3179 * xml/XSLTProcessorLibxslt.cpp: Ditto.
3181 2015-02-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3183 Remove unnecessary DatabaseFooTask::create
3184 https://bugs.webkit.org/show_bug.cgi?id=142002
3186 Reviewed by Darin Adler.
3188 DatabaseFooTask::create can be replaced with std::make_unique<>.
3190 No new tests, no behavior changes.
3192 * Modules/webdatabase/Database.cpp:
3193 (WebCore::Database::scheduleTransaction):
3194 (WebCore::Database::scheduleTransactionStep):
3195 (WebCore::Database::markAsDeletedAndClose):
3196 (WebCore::Database::closeImmediately):
3197 (WebCore::Database::tableNames):
3198 * Modules/webdatabase/DatabaseTask.h:
3199 (WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
3200 (WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
3201 (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.
3203 2015-02-25 Dean Jackson <dino@apple.com>
3205 [iOS Media] incorrect front padding on time values
3206 https://bugs.webkit.org/show_bug.cgi?id=142027
3207 <rdar://problem/19960790>
3209 Reviewed by Brent Fulgham.
3211 We don't want to prefix times with a "0".
3213 * Modules/mediacontrols/mediaControlsApple.js:
3214 (Controller.prototype.formatTime):
3216 2015-02-25 Chris Dumez <cdumez@apple.com>
3218 Make PublicURLManager suspendable
3219 https://bugs.webkit.org/show_bug.cgi?id=141977
3220 <rdar://problem/19923085>
3222 Reviewed by Andreas Kling.
3224 Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
3225 and returning true. Nothing prevents suspending the PublicURLManager as its
3226 implementation never causes JS to be executed. No implementation for
3227 suspend() / resume() needs to be provided for the same reason.
3229 The fact that PublicURLManager wasn't suspendable was preventing pages using
3230 URL.createObjectURL() from entering the PageCache. Baidu.com search results
3231 pages are using the API for example.
3233 Test: fast/history/page-cache-createObjectURL.html
3235 * html/PublicURLManager.cpp:
3236 (WebCore::PublicURLManager::canSuspend):
3237 * html/PublicURLManager.h:
3239 2015-02-25 Zalan Bujtas <zalan@apple.com>
3241 Cleanup BackgroundImageGeometry class.
3242 https://bugs.webkit.org/show_bug.cgi?id=141997
3244 Reviewed by Simon Fraser.
3246 This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
3247 removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
3248 becomes a read only class (with the exception of the clip() method).
3250 No change in functionality.
3252 * rendering/RenderBoxModelObject.cpp:
3253 (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
3254 (WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
3255 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3256 (WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
3257 (WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
3258 (WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
3259 (WebCore::BackgroundImageGeometry::clip): Deleted.
3260 (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
3261 * rendering/RenderBoxModelObject.h:
3262 (WebCore::BackgroundImageGeometry::clip):
3263 (WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
3264 (WebCore::BackgroundImageGeometry::setDestRect): Deleted.
3265 (WebCore::BackgroundImageGeometry::setPhase): Deleted.
3266 (WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
3267 (WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
3268 (WebCore::BackgroundImageGeometry::setTileSize): Deleted.
3269 (WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
3270 (WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
3272 2015-02-25 Said Abou-Hallawa <sabouhallawa@apple.com>
3274 Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
3275 https://bugs.webkit.org/show_bug.cgi?id=141776.
3277 Reviewed by Dean Jackson.
3279 Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
3280 svg/clip-path/clip-path-line-use-before-defined.svg
3282 * rendering/svg/RenderSVGResourceClipper.cpp:
3283 (WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
3284 is added to m_clipper if it does not exist. The same renderer might have been
3285 added to m_clipper in resourceBoundingBox().
3287 (WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
3288 m_clipper if it does not exist. Return the associated ClipperData.
3290 (WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
3291 referenced before it is defined, add the renderer to m_clipper. While doing the
3292 layout() for the clipper, we can check if m_clipper has values or not. If it does
3293 have, we are going to mark the clipper for client invalidation which is done by
3296 * rendering/svg/RenderSVGResourceClipper.h:
3297 * rendering/svg/RenderSVGResourceContainer.h:
3298 (WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a
3299 new function selfNeedsClientInvalidation() which controls marking the clipper
3300 for client invalidation. In RenderSVGResourceClipper, override it so it checks
3301 m_clipper to force clients validation even if it the first time we do layout
3304 * rendering/svg/RenderSVGResourceContainer.cpp:
3305 (WebCore::RenderSVGResourceContainer::layout): Call the virtual function
3306 selfNeedsClientInvalidation() to check whether we need to mark the clipper for
3307 client invalidation.
3309 * svg/SVGElement.cpp: Delete unneeded header file.
3311 2015-02-25 peavo@outlook.com <peavo@outlook.com>
3313 [WinCairo] WinLauncher is not starting on Vista.
3314 https://bugs.webkit.org/show_bug.cgi?id=141905
3316 Reviewed by Alex Christensen.
3318 We have to soft link with Media Foundation functions to be able
3319 to start on Vista and WinXP.
3321 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3322 (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
3323 (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
3324 (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
3325 (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
3326 (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
3327 (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
3328 (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
3329 (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
3331 2015-02-25 Beth Dakin <bdakin@apple.com>
3333 REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
3334 https://bugs.webkit.org/show_bug.cgi?id=142020
3336 rdar://problem/19945216
3338 Reviewed by Tom Horton.
3340 It was a mistaken assumption that it was necessary to return false in the zero-
3341 delta case. That is clearly conceptually wrong since false represents the DOM
3342 doing something special with the event, which is clearly not the case if we never
3343 even send the event to the DOM. Returning true will allow the rest of the
3344 scrolling machinery the ability to handle the event.
3346 (WebCore::Element::dispatchWheelEvent):
3348 2015-02-25 Ryosuke Niwa <rniwa@webkit.org>
3350 HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
3351 https://bugs.webkit.org/show_bug.cgi?id=142003
3353 Reviewed by Sam Weinig.
3355 Utilized contentEditableType to reduce the code duplication.
3357 * html/HTMLElement.cpp:
3358 (WebCore::contentEditableType): Moved and added a version that takes AtomicString.
3359 (WebCore::HTMLElement::collectStyleForPresentationAttribute):
3361 2015-02-25 Sergio Villar Senin <svillar@igalia.com>
3363 [CSS Grid Layout] Tracks growing beyond limits when they should not
3364 https://bugs.webkit.org/show_bug.cgi?id=140883
3366 Reviewed by Darin Adler.
3368 Our track sizing algorithm implementation incorrectly grew some
3369 tracks beyond limits when handling min-content and max-content
3370 base sizes. In those cases we should only grow "any affected track
3371 that happens to also have an intrinsic max track sizing function"
3372 or all of them if there are none.