1 2015-03-05 Csaba Osztrogonác <ossy@webkit.org>
3 [cmake] Fix the web replay build
4 https://bugs.webkit.org/show_bug.cgi?id=142331
6 Reviewed by Gyuyoung Kim.
9 * inspector/InspectorReplayAgent.cpp:
10 (WebCore::buildInspectorObjectForSessionState):
11 (WebCore::buildInspectorObjectForSegmentState):
13 2015-03-05 Carlos Garcia Campos <cgarcia@igalia.com>
15 [SOUP] Check TLS errors as soon as they are set in the SoupMessage
16 https://bugs.webkit.org/show_bug.cgi?id=142244
18 Reviewed by Sergio Villar Senin.
20 Connect to the notify::tls-errors signal of SoupMessage to cancel
21 the load earlier in case of TLS failure, preventing any private
22 data from being sent to the server before the TLS errors are checked.
24 * platform/network/soup/ResourceHandleSoup.cpp:
25 (WebCore::tlsErrorsChangedCallback):
26 (WebCore::gotHeadersCallback):
27 (WebCore::createSoupMessageForHandleAndRequest):
29 2015-03-05 Grzegorz Czajkowski <g.czajkowski@samsung.com>
31 TextCheckingParagraph::isEmpty() is sufficient to check whether paragraph is empty
32 https://bugs.webkit.org/show_bug.cgi?id=142276
34 Reviewed by Darin Adler.
36 TextCheckingParagraph::isEmpty() already calls TextCheckingParagraph::isRangeEmpty().
37 There is no need to call them both at the caller site.
39 No new tests. No behavior change.
42 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
45 * editing/TextCheckingHelper.cpp:
46 (WebCore::TextCheckingParagraph::isEmpty):
47 Avoid using helepers here to get rid of them as they are
48 no longer needed outside TextCheckingParagraph.
50 * editing/TextCheckingHelper.h:
51 (WebCore::TextCheckingParagraph::isTextEmpty): Deleted.
52 (WebCore::TextCheckingParagraph::isRangeEmpty): Deleted.
53 Do not expose isTextEmpty() and isRangeEmpty().
55 2015-03-04 Simon Fraser <simon.fraser@apple.com>
57 Clarify RenderElement::adjustStyleDifference()
58 https://bugs.webkit.org/show_bug.cgi?id=142256
60 Reviewed by David Hyatt.
62 Make RenderElement::adjustStyleDifference() clearer in two ways.
64 First, replace lots of if (diff < X) diff = X with
65 diff = std::max(diff, X). I did this even in cases where diff was
66 being set unconditionally, because it's never correct to change the diff
69 Second the "set at least SimplifiedLayout, but if we have PositionedMovementOnly
70 set it to SimplifiedLayoutAndPositionedMovement" was confusingly written.
72 * rendering/RenderElement.cpp:
73 (WebCore::RenderElement::adjustStyleDifference):
75 2015-03-04 David Kilzer <ddkilzer@apple.com>
77 Switch new soft-linking debug asserts to release asserts
78 <http://webkit.org/b/142176>
80 Reviewed by Alex Christensen.
82 * platform/mac/SoftLinking.h:
83 (SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
84 (SOFT_LINK_FUNCTION_SOURCE): Ditto.
85 * platform/win/SoftLinking.h:
86 (SOFT_LINK_CONSTANT_SOURCE): Ditto.
87 (SOFT_LINK_FUNCTION_SOURCE): Ditto. Note that this method is
88 effectively only called once because the function pointer is
89 replaced after the first time it's called.
91 2015-03-04 Alex Christensen <achristensen@webkit.org>
93 Optimize content extensions.
94 https://bugs.webkit.org/show_bug.cgi?id=142295
96 Reviewed by Benjamin Poulain.
98 * contentextensions/ContentExtensionCompiler.cpp:
99 (WebCore::ContentExtensions::serializeActions):
100 There is no need to add duplicate sequential actions.
101 * contentextensions/ContentExtensionRule.h:
102 (WebCore::ContentExtensions::Action::operator==):
103 Added to compare actions.
104 * contentextensions/ContentExtensionsBackend.cpp:
105 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
106 Return early if a block action is found instead of moving to the next extension.
108 2015-03-04 Commit Queue <commit-queue@webkit.org>
110 Unreviewed, rolling out r181046.
111 https://bugs.webkit.org/show_bug.cgi?id=142318
113 Broke two layout tests (Requested by sundiamonde on #webkit).
117 "Update inline media control icons for OSX."
118 https://bugs.webkit.org/show_bug.cgi?id=142305
119 http://trac.webkit.org/changeset/181046
121 2015-03-04 Timothy Horton <timothy_horton@apple.com>
123 <attachment> icons are low-resolution when transformed or under page scale
124 https://bugs.webkit.org/show_bug.cgi?id=142262
125 <rdar://problem/20035480>
127 Reviewed by Dean Jackson.
129 We should use Icon::createIconForFiles, just like <input type="file"> does,
130 instead of directly talking to IconServices. This results both in less code
131 and in NSImage's multiresolution magic making the icons sharp even under
132 the influence of transforms and page scale.
134 * WebCore.xcodeproj/project.pbxproj:
135 * platform/spi/mac/IconServicesSPI.h: Removed.
136 * platform/spi/mac/LaunchServicesSPI.h: Removed.
137 Get rid of IconServicesSPI.h and LaunchServicesSPI.h.
139 * platform/graphics/Icon.h:
140 Include RetainPtr just once.
141 paint() should take a GraphicsContext reference (null is not an option)
142 and a FloatRect (after all, it just turns around and converts to NSRect).
144 * platform/graphics/ios/IconIOS.mm:
145 (WebCore::Icon::paint):
146 * platform/graphics/mac/IconMac.mm:
147 (WebCore::Icon::createIconForFiles):
148 (WebCore::Icon::paint):
149 * platform/graphics/efl/IconEfl.cpp:
150 (WebCore::Icon::paint):
151 * platform/graphics/gtk/IconGtk.cpp:
152 (WebCore::Icon::paint):
153 * platform/graphics/win/IconWin.cpp:
154 (WebCore::Icon::paint):
155 Adapt to the paint() signature changes, fix some style, etc.
157 * rendering/RenderFileUploadControl.cpp:
158 (WebCore::RenderFileUploadControl::paintObject):
159 * rendering/RenderThemeIOS.mm:
160 (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
161 Adapt to the paint() signature changes.
163 * rendering/RenderThemeMac.mm:
164 (WebCore::paintAttachmentIcon):
165 Use Icon::createIconForFiles instead of IconServices.
167 2015-03-04 Tim Horton <timothy_horton@apple.com>
169 <attachment> should not appear selected when the cursor is adjacent to it
170 https://bugs.webkit.org/show_bug.cgi?id=142311
171 <rdar://problem/20045862>
173 Reviewed by Dean Jackson.
175 * rendering/RenderAttachment.cpp:
176 (WebCore::RenderAttachment::isSelected): Deleted.
177 * rendering/RenderAttachment.h:
178 * rendering/RenderThemeMac.mm:
179 (WebCore::titleTextColorForAttachment):
180 (WebCore::RenderThemeMac::paintAttachment):
181 (WebCore::labelTextColorForAttachment): Deleted.
182 We were using the wrong (and far too complicated) mechanism to determine
183 if the attachment is selected (to decide which highlight color to use).
184 Instead, just check selectionState().
186 2015-03-04 Timothy Horton <timothy_horton@apple.com>
188 <attachment> should show the file size as detail text below the icon
189 https://bugs.webkit.org/show_bug.cgi?id=142261
190 <rdar://problem/20009570>
192 Reviewed by Dean Jackson.
194 Test: fast/attachment/attachment-subtitle.html
196 * html/HTMLAttachmentElement.cpp:
197 (WebCore::HTMLAttachmentElement::setFile):
198 (WebCore::HTMLAttachmentElement::parseAttribute):
199 * html/HTMLAttachmentElement.h:
200 Let RenderAttachment know when the subtitle attribute changes.
202 * html/HTMLAttributeNames.in:
203 Add a subtitle attribute.
205 * rendering/RenderAttachment.cpp:
206 (WebCore::RenderAttachment::invalidate):
207 (WebCore::RenderAttachment::representedFileChanged): Deleted.
208 * rendering/RenderAttachment.h:
209 Rename representedFileChanged to invalidate; it will cause layout and
210 repaint of the attachment. Mostly for use from HTMLAttachmentElement,
211 when properties that affect the display and/or intrinsic size change.
213 * rendering/RenderThemeMac.mm:
214 (WebCore::attachmentTitleInactiveBackgroundColor):
215 (WebCore::attachmentTitleInactiveTextColor):
216 (WebCore::attachmentSubtitleTextColor):
217 (WebCore::titleTextColorForAttachment):
218 (WebCore::AttachmentLayout::addTitleLine):
219 (WebCore::AttachmentLayout::layOutTitle):
220 (WebCore::AttachmentLayout::layOutSubtitle):
221 (WebCore::AttachmentLayout::AttachmentLayout):
222 (WebCore::addAttachmentTitleBackgroundRightCorner):
223 (WebCore::addAttachmentTitleBackgroundLeftCorner):
224 (WebCore::paintAttachmentTitleBackground):
225 (WebCore::paintAttachmentTitle):
226 (WebCore::paintAttachmentSubtitle):
227 (WebCore::RenderThemeMac::paintAttachment):
228 (WebCore::attachmentLabelInactiveBackgroundColor): Deleted.
229 (WebCore::attachmentLabelInactiveTextColor): Deleted.
230 (WebCore::labelTextColorForAttachment): Deleted.
231 (WebCore::AttachmentLayout::addLine): Deleted.
232 (WebCore::AttachmentLayout::layOutLabel): Deleted.
233 (WebCore::addAttachmentLabelBackgroundRightCorner): Deleted.
234 (WebCore::addAttachmentLabelBackgroundLeftCorner): Deleted.
235 (WebCore::paintAttachmentLabelBackground): Deleted.
236 (WebCore::paintAttachmentLabel): Deleted.
237 Rename everything "label" to "title" (except LabelLine, which is not
238 specifically about the title). We're going to use "title" for the
239 main text below the icon, and "subtitle" for the secondary text below that.
241 Avoid keeping the CTFonts on the AttachmentLayout; there's no need for it.
243 Add layOutSubtitle and paintAttachmentSubtitle, which orient and paint
244 the subtitle (below the title, in blue, smaller than the label).
246 2015-03-04 David Kilzer <ddkilzer@apple.com>
248 [Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining CMSampleBuffer
252 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
253 <http://webkit.org/b/141870>
255 * platform/cf/CoreMediaSoftLink.cpp:
256 * platform/cf/CoreMediaSoftLink.h:
257 - Remove include of <CoreMedia/CoreMedia.h> here. These already
258 include CoreMediaSPI.h.
259 * platform/spi/cf/CoreMediaSPI.h:
260 - Add include of <CoreMedia/CoreMedia.h> here.
261 - Remove redundant include of <CoreMedia/CMTime.h> for Windows.
263 2015-03-04 David Kilzer <ddkilzer@apple.com>
265 [iOS] Fix build with newer clang due to duplicate macro definition
269 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
270 <http://webkit.org/b/141870>
272 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
273 Remove duplicate kCMTimeIndefinite macro.
275 2015-03-04 Roger Fong <roger_fong@apple.com>
277 Update inline media control icons for OSX.
278 https://bugs.webkit.org/show_bug.cgi?id=142305.
279 <rdar://problem/19997484>
281 Reviewed by Dean Jackson.
283 Changes include: new volume button, new full screen button, new play/pause button.
284 Repositioning of 30 second and play buttons.
285 * Modules/mediacontrols/mediaControlsApple.css:
286 (audio::-webkit-media-controls-panel button):
287 (audio::-webkit-media-controls-rewind-button):
288 (audio::-webkit-media-controls-play-button):
289 (audio::-webkit-media-controls-play-button.paused):
290 (audio::-webkit-media-controls-panel .mute-box):
291 (video::-webkit-media-controls-volume-max-button):
292 (video::-webkit-media-controls-volume-min-button):
293 (audio::-webkit-media-controls-toggle-closed-captions-button):
294 (audio::-webkit-media-controls-fullscreen-button):
295 (audio::-webkit-media-controls-current-time-display):
296 * Modules/mediacontrols/mediaControlsApple.js:
297 (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
298 (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
299 (Controller.prototype.updateVolume): Ditto
301 2015-03-04 Andy Estes <aestes@apple.com>
303 [Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
304 https://bugs.webkit.org/show_bug.cgi?id=142313
306 Reviewed by Anders Carlsson.
308 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/.
310 * WebCore.xcodeproj/project.pbxproj:
311 * platform/ContentFilter.cpp: Renamed from Source/WebCore/platform/mac/ContentFilterMac.mm.
312 * platform/cocoa/NetworkExtensionContentFilter.h: Replaced NSInteger with long.
314 2015-03-04 Dean Jackson <dino@apple.com>
316 REGRESSION (r179597): Can't see power saver banner for plugins
317 https://bugs.webkit.org/show_bug.cgi?id=142312
318 <rdar://problem/20040517>
320 Reviewed by Brent Fulgham.
322 We were being a bit too restrictive when deciding a child
323 should not create a renderer. All shadow root children
324 of the snapshotted plugin need one.
326 * html/HTMLPlugInImageElement.cpp:
327 (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
328 Test if we're part of the shadow tree.
330 2015-03-03 Andy Estes <aestes@apple.com>
332 [Content Filtering] Make it easier to add new content filters
333 https://bugs.webkit.org/show_bug.cgi?id=142255
335 Reviewed by Sam Weinig.
337 ContentFilter was becoming a bit of a mess, with both the WebFilterEvaluator and NEFilterSource implementations
338 awkwardly living side-by-side. This patch cleans things up by moving these implementations into two separate
339 classes and turning ContentFilter itself into an abstract interface that each implements. A new class called
340 ContentFilterCollection, which also inherits from ContentFilter, manages the collection of individual content
341 filters and is vended to the rest of the system by ContentFilter::createIfNeeded().
343 This refactoring will make it easier to add a third type of content filter in a follow-on patch, namely a mock
344 content filter for testing purposes.
346 * WebCore.xcodeproj/project.pbxproj:
347 * loader/DocumentLoader.cpp:
348 (WebCore::DocumentLoader::responseReceived): Called ContentFilter::createIfNeeded() instead of instantiating a ContentFilter directly.
349 * platform/ContentFilter.h:
350 (WebCore::ContentFilter::~ContentFilter):
351 * platform/cocoa/NetworkExtensionContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
352 * platform/cocoa/NetworkExtensionContentFilter.mm: Added.
353 (WebCore::NetworkExtensionContentFilter::canHandleResponse): Moved NEFilterSource code from ContentFilterMac.mm to here.
354 (WebCore::NetworkExtensionContentFilter::create): Ditto.
355 (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Ditto.
356 (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Ditto.
357 (WebCore::NetworkExtensionContentFilter::addData): Ditto.
358 (WebCore::NetworkExtensionContentFilter::finishedAddingData): Ditto.
359 (WebCore::NetworkExtensionContentFilter::needsMoreData): Ditto.
360 (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
361 (WebCore::NetworkExtensionContentFilter::getReplacementData): Ditto.
362 (WebCore::NetworkExtensionContentFilter::unblockHandler): Ditto.
363 * platform/cocoa/ParentalControlsContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
364 * platform/cocoa/ParentalControlsContentFilter.mm: Added.
365 (WebCore::ParentalControlsContentFilter::canHandleResponse): Moved WebFilterEvaluator code from ContentFilterMac.mm to here.
366 (WebCore::ParentalControlsContentFilter::create): Ditto.
367 (WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Ditto.
368 (WebCore::ParentalControlsContentFilter::addData): Ditto.
369 (WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
370 (WebCore::ParentalControlsContentFilter::needsMoreData): Ditto.
371 (WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
372 (WebCore::ParentalControlsContentFilter::getReplacementData): Ditto.
373 (WebCore::ParentalControlsContentFilter::unblockHandler): Ditto.
374 * platform/mac/ContentFilterMac.mm:
375 (WebCore::contentFilterType): Added a helper function template that creates a new ContentFilterType.
376 (WebCore::contentFilterTypes): Registered a ContentFilterType for each type of content filter.
377 (WebCore::ContentFilter::createIfNeeded): Created a ContentFilterCollection containing each content filter that can handle the given response.
378 (WebCore::ContentFilterCollection::ContentFilterCollection): Constructs a ContentFilterCollection given a Vector of content filters.
379 (WebCore::ContentFilterCollection::addData): Forwarded the call to each content filter in m_contentFilters.
380 (WebCore::ContentFilterCollection::finishedAddingData): Ditto.
381 (WebCore::ContentFilterCollection::needsMoreData): Ditto.
382 (WebCore::ContentFilterCollection::didBlockData): Ditto.
383 (WebCore::ContentFilterCollection::getReplacementData): Returned replacement data for the first filter that blocked the load.
384 If no filter blocked the load, returned the first filter's replacement data.
385 (WebCore::ContentFilterCollection::unblockHandler): Returned the unblock handler for the first filter that blocked the load.
386 (WebCore::ContentFilter::ContentFilter): Deleted.
387 (WebCore::ContentFilter::~ContentFilter): Deleted.
388 (WebCore::ContentFilter::canHandleResponse): Deleted.
389 (WebCore::ContentFilter::addData): Deleted.
390 (WebCore::ContentFilter::finishedAddingData): Deleted.
391 (WebCore::ContentFilter::needsMoreData): Deleted.
392 (WebCore::ContentFilter::didBlockData): Deleted.
393 (WebCore::ContentFilter::getReplacementData): Deleted.
394 (WebCore::ContentFilter::unblockHandler): Deleted.
396 2015-03-04 David Kilzer <ddkilzer@apple.com>
398 Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
399 <http://webkit.org/b/141870>
401 Reviewed by Alex Christensen.
403 * Configurations/WebCore.unexp:
404 - Remove all weak symbols for CoreMedia.framework as they should
407 * Modules/plugins/QuickTimePluginReplacement.mm:
408 * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
409 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
410 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
413 * platform/cf/CoreMediaSoftLink.cpp:
414 * platform/cf/CoreMediaSoftLink.h:
415 - Add soft-link functions and constants from remaining source
418 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
419 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
420 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
421 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
422 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
423 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
424 * platform/mac/PlatformClockCM.mm:
425 * platform/mediastream/mac/AVMediaCaptureSource.mm:
426 * platform/mediastream/mac/AVVideoCaptureSource.mm:
427 - Switch to using CoreMediaSoftLink.h.
429 * platform/mac/SoftLinking.h:
430 * platform/win/SoftLinking.h:
431 - Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
432 macros since it won't work with const structs.
434 * platform/spi/cf/CoreMediaSPI.h:
435 - Add SPI declarations for Windows originally from
436 InbandTextTrackPrivateAVF.cpp.
438 2015-03-04 Commit Queue <commit-queue@webkit.org>
440 Unreviewed, rolling out r181001 and r181003.
441 https://bugs.webkit.org/show_bug.cgi?id=142307
443 Broke many tests (Requested by ap on #webkit).
447 "Make JavaScript binding get and set legacy event listener
449 https://bugs.webkit.org/show_bug.cgi?id=142282
450 http://trac.webkit.org/changeset/181001
452 "Update bindings tests after r181001."
453 http://trac.webkit.org/changeset/181003
455 2015-03-04 Roger Fong <roger_fong@apple.com>
457 Update elapsed/remaining time displays on media inline controls on OSX.
458 https://bugs.webkit.org/show_bug.cgi?id=142264.
459 <rdar://problem/19997487>
461 Reviewed by Dean Jackson.
463 Div surrounding times are set widths. A larger width is used for times that are
464 an hour or longer. Time elapsed is right justified. Time remaining is left justified.
465 Times are displayed in 11pt Helvetica Neue.
466 * Modules/mediacontrols/mediaControlsApple.css:
467 (audio::-webkit-media-controls-time-remaining-display):
468 (audio::-webkit-media-controls-current-time-display):
469 (audio::-webkit-media-controls-time-remaining-display.hour-long-time):
470 (audio::-webkit-media-controls-current-time-display.hour-long-time):
471 (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time):
472 (audio::-webkit-media-controls-current-time-display.ten-hour-long-time):
473 * Modules/mediacontrols/mediaControlsApple.js:
474 (Controller.prototype.updateDuration):
476 2015-03-04 Myles C. Maxfield <mmaxfield@apple.com>
478 Implement -apple-trailing-word: -apple-partially-balanced
479 https://bugs.webkit.org/show_bug.cgi?id=142253
481 Reviewed by David Hyatt.
483 This patch implements a history mechanism for line breaking. In particular, this patch partitions
484 the updates to the current line breaking location into two kinds: conceptually new breaking locations,
485 and fixups to existing locations. Then, this patch remembers all the fixed up breaking locations, up
486 to a maximum number of remembered locations.
488 The patch then uses this memory to change the line-breaking selection based on the rules of
489 -apple-trailing-word.
491 Test: fast/text/trailing-word.html
493 * rendering/line/BreakingContextInlineHeaders.h:
494 Use InlineIteratorHistory as a proxy for the current breaking location. Note that all these functions
495 are inlined, so the overhead should be next to nothing when -apple-trailing-word is not in use.
496 (WebCore::BreakingContext::BreakingContext): Use InlineIteratorHistory instead of InlineIterator
497 (WebCore::BreakingContext::lineBreak): Ditto.
498 (WebCore::BreakingContext::clearLineBreakIfFitsOnLine): Ditto
499 (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Ditto
500 (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Keeps track of historical
502 (WebCore::BreakingContext::InlineIteratorHistory::push): Remember a new breaking location
503 (WebCore::BreakingContext::InlineIteratorHistory::update): Update an existing breaking location
504 (WebCore::BreakingContext::InlineIteratorHistory::renderer): Forwarded to the current breaking location
505 (WebCore::BreakingContext::InlineIteratorHistory::offset): Ditto
506 (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator): Ditto
507 (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode): Ditto
508 (WebCore::BreakingContext::InlineIteratorHistory::get): Get one of the remembered breaking locations
509 (WebCore::BreakingContext::InlineIteratorHistory::current): Get the current breaking location
510 (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
511 (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Forwarded to the current breaking location.
512 (WebCore::BreakingContext::InlineIteratorHistory::increment): Ditto
513 (WebCore::BreakingContext::InlineIteratorHistory::clear): Ditto
514 (WebCore::BreakingContext::handleBR): Use InlineIteratorHistory instead of InlineIterator
515 (WebCore::BreakingContext::handleFloat): Ditto
516 (WebCore::BreakingContext::handleText): Use InlineIteratorHistory instead of InlineIterator
517 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Style
518 (WebCore::checkMidpoints): Use InlineIteratorHistory instead of InlineIterator
519 (WebCore::BreakingContext::handleEndOfLine): If -apple-trailing-word is in effect, use
520 optimalLineBreakLocationForTrailingWord().
521 (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Use the remembered breaking
522 locations and choose the optimal one.
523 (WebCore::BreakingContext::lineBreakRef): Deleted.
525 2015-03-04 Timothy Horton <timothy_horton@apple.com>
527 <attachment> title text disappears when dragging
528 https://bugs.webkit.org/show_bug.cgi?id=142263
529 <rdar://problem/20035515>
531 Reviewed by Sam Weinig.
533 * rendering/RenderThemeMac.mm:
534 (WebCore::RenderThemeMac::paintAttachment):
535 We use NSColors with CoreText, which requires that Cocoa knows the current
536 CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
537 Otherwise, sometimes (especially when dragging), it will try to apply the
538 text foreground color to a null context, complain to the system log, and fail
541 2015-03-04 Jer Noble <jer.noble@apple.com>
543 [Mac] YouTube playback at 1.5x speed has audible distortion
544 https://bugs.webkit.org/show_bug.cgi?id=142280
546 Reviewed by Eric Carlson.
548 Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the
549 AVSampleBufferAudioRenderer rather than its default value of
550 AVAudioTimePitchAlgorithmTimeDomain.
554 Might as well add support for MediaPlayer::setPreservesPitch() while we're
555 changing the audio pitch algorithm. If preservesPitch() is false use the
556 AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
557 (MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).
559 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
560 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
561 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
562 (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
563 (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
564 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
565 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
566 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
567 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
569 2015-03-04 Jer Noble <jer.noble@apple.com>
571 [MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
572 https://bugs.webkit.org/show_bug.cgi?id=142285
574 Reviewed by Eric Carlson.
576 When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
577 underlying AVStreamSession is invalidated, the decryption context for in-flight
578 CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
579 one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
580 the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
581 asynchronously the next time the layer needs new samples.
583 Add a workaround until framework-level support lands to fully flush enqueued and
586 When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
587 check to see if the session has been stopped. If so, and if the error in question is
588 one that indicates that the samples decryption context has been invalidated, suppress
589 the error and instruct the sender to suppress the error as well. This workaround will
590 be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>
592 Still, we'll make our best effort to flush undisplayed frames when our CDM session is
593 invalidated. Move away from std::map and instead use HashMap to store the set of
594 AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
595 the HashMap's set of values.
597 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
598 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
599 (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
600 (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
601 error code and bail before issuing the error.
602 (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
603 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
604 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
605 (-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
606 the layer is in the set of listened-to layers only back in the main thread; the
607 listnener may have been unregistered by the time the main thread was called.
608 (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
609 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
610 (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
611 (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
612 (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
613 (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
614 (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
615 (WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
616 layers and audio renderers.
617 (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
618 asked to ignore the error, and if so, bail.
619 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.
621 2015-03-04 Alex Christensen <achristensen@webkit.org>
623 Update bindings tests after r181001.
625 * bindings/scripts/test/JS/*.cpp:
626 Class names changed to auto.
628 2015-03-04 Brent Fulgham <bfulgham@apple.com>
630 [Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
631 https://bugs.webkit.org/show_bug.cgi?id=142284
633 Reviewed by David Kilzer.
635 Make DerivedSources.make understand its build dependency on FeatureDefines.props
636 when building on Windows:
637 1. Modify DerivedSources.make to declare a default dependency (on Windows)
638 to $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props.
639 2. Update the Windows script 'build-generated-files.pl' to specify the correct
640 FeatureDefines{Cairo}.props value to use, depending on build environment.
642 * DerivedSources.make:
643 * WebCore.vcxproj/build-generated-files.pl:
645 2015-03-04 Darin Adler <darin@apple.com>
647 Make JavaScript binding get and set legacy event listener attributes directly
648 https://bugs.webkit.org/show_bug.cgi?id=142282
650 Reviewed by Sam Weinig.
652 Test: fast/dom/legacy-event-handler-attributes.html
654 This patch changes the JavaScript getters and setters for these attributes
655 to work directly without requiring any functions in the C++ DOM implementation.
656 A subsequent patch will remove the now-unused C++ DOM implementation.
658 * bindings/js/JSEventListener.cpp:
659 (WebCore::legacyEventListenerAttribute): Added.
660 (WebCore::createEventListenerForLegacyAttribute): Added.
661 (WebCore::setLegacyEventListenerAttribute): Added.
662 (WebCore::legacyWindowEventListenerAttribute): Added.
663 (WebCore::setLegacyWindowEventListenerAttribute): Added.
665 * bindings/js/JSEventListener.h:
666 (WebCore::createJSEventListenerForAttribute): Deleted.
668 * bindings/scripts/CodeGeneratorJS.pm:
669 (GenerateAttributeEventListenerCall): Deleted.
670 (LegacyEventListenerAttributeEventName): Added.
671 (LegacyEventListenerAttributePrefix): Added.
672 (GenerateImplementation): Use "auto" in lots of places to simplify the code
673 generation. Replaced the old inlined code to deal with legacy event listener
674 attributes with code that simply calls the new functions from JSEventLister.h.
675 (GenerateCallWith): Use "auto".
676 (GenerateConstructorDefinition): Ditto.
678 2015-03-03 Sam Weinig <sam@webkit.org>
680 [Content Extensions] Split parsing and compiling of content extensions into their own files
681 https://bugs.webkit.org/show_bug.cgi?id=142259
683 Reviewed by Anders Carlsson.
686 ContentFilterTest.Basic
688 * WebCore.xcodeproj/project.pbxproj:
689 Add new files (CompiledContentExtension.h/cpp, ContentExtensionCompiler.h/cpp, and ContentExtensionParser.h/cpp)
691 * contentextensions/CompiledContentExtension.cpp: Added.
692 * contentextensions/CompiledContentExtension.h: Added.
693 Add new class for holding onto the compiled content extension itself. Make it ThreadSafeRefCounted so it is easy
694 to move between threads which will be important in a subsequent patch where we enable compilation on a background
697 * contentextensions/ContentExtensionCompiler.cpp: Added.
698 (WebCore::ContentExtensions::serializeActions):
699 (WebCore::ContentExtensions::compileRuleList):
700 * contentextensions/ContentExtensionCompiler.h: Added.
701 Moving compilation to its own file. Was previously in ContentExtensionsBackend. This is necessary because
702 we will want to be able to compile without the need of a backend.
704 * contentextensions/ContentExtensionParser.cpp: Copied from contentextensions/ContentExtensionsManager.cpp.
705 * contentextensions/ContentExtensionParser.h: Copied from contentextensions/ContentExtensionsManager.h.
706 Renamed ContentExtensionsManager to ContentExtensionParser, since that is all it is doing.
708 * contentextensions/ContentExtensionsBackend.cpp:
709 (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
710 (WebCore::ContentExtensions::ContentExtensionsBackend::removeContentExtension):
711 (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllContentExtensions):
712 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
713 (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions): Deleted.
714 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList): Deleted.
715 (WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList): Deleted.
716 (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists): Deleted.
717 * contentextensions/ContentExtensionsBackend.h:
718 Change the backend to use the new CompiledContentExtension and change the terminology to
719 reference content extensions, rather than rule lists.
721 * page/UserContentController.cpp:
722 (WebCore::UserContentController::addUserContentFilter):
723 (WebCore::UserContentController::removeUserContentFilter):
724 (WebCore::UserContentController::removeAllUserContentFilters):
725 Update for new names and change addUserContentFilter to explicitly compile the JSON
726 rule list before handing it to the backend. In subsequent changes, addUserContentFilter
727 should be changed to take the compiled content extension, and it should become the responsibility
728 of the called (WebKit) to create them.
730 2015-03-04 Philippe Normand <pnormand@igalia.com>
732 [GStreamer] the GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED should be wrapped by a ifdef
733 https://bugs.webkit.org/show_bug.cgi?id=142274
735 Reviewed by Carlos Garcia Campos.
737 Don't handle scheduling queries if building against versions of
738 GStreamer older than 1.2.0.
740 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
741 (webKitWebSrcQueryWithParent):
743 2015-03-03 Yoav Weiss <yoav@yoav.ws>
745 Add a microtask abstraction
746 https://bugs.webkit.org/show_bug.cgi?id=137496
748 Reviewed by Sam Weinig.
750 This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
751 That abstraction is required in order to enable async loading of images,
752 which is in turn required to enable support for the picture element, as well as
753 to make sure that the order of properties set on HTMLImageElement has no implications.
755 A similar patch was rolled back in r180914. This patch is an improved version.
757 * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
758 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
759 * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
760 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
761 * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
762 * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
763 * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
764 (WebCore::MicroTask::~MicroTask):
765 (WebCore::MicroTask::run): Run the microtask.
766 * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
767 (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
768 (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
769 (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
770 * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
771 (WebCore::ScriptRunner::timerFired):
772 * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
773 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
774 (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
775 (WebCore::HTMLScriptRunner::runScript):
776 * testing/Internals.cpp: Add a method to queue a test microtask.
777 (WebCore::Internals::queueMicroTask):
778 * testing/Internals.h: Add a method to queue a test microtask.
779 (WebCore::Internals::queueMicroTask):
780 * testing/Internals.idl: Expose test microtask queueing to test JS.
781 * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
782 (WebCore::MicroTaskTest::run): Run the microtask
783 (WebCore::MicroTaskTest::create): Create a test microtask.
784 * testing/MicroTaskTest.h: Add a test class that implements a microtask.
785 (WebCore::MicroTaskTest::run):
786 (WebCore::MicroTaskTest::create):
788 2015-03-03 Brent Fulgham <bfulgham@apple.com>
790 Scroll snap points are not supported on the main frame
791 https://bugs.webkit.org/show_bug.cgi?id=141973
792 <rdar://problem/19938393>
794 Reviewed by Simon Fraser.
796 No new tests. Tests will be added when the animation behavior is finalized. Manual tests are attached to the bug.
798 Update the ScrollingTreeFrameScrollingNodeMac class to implement the delegate interface needed by the
799 ScrollController. This involves the following:
800 1. Implement scrollOffsetOnAxis: Used by the AxisScrollAnimator to determine the current position of the ScrollableArea.
801 2. Implement immediateScrollOnAxis: Used by the AxisScrollAnimator to scroll the ScrollableArea
803 We also need to hold a copy of the snap points vector to send to the scrolling thread.
805 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
806 (WebCore::convertToLayoutUnits): Added helper function to match Scroll Snap Points API.
807 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Recognize and react to changes to
808 Scroll Snap Points on top-level frames.
809 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Implement delegate method needed by the ScrollController.
810 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
811 * platform/cocoa/ScrollController.h:
812 * platform/cocoa/ScrollController.mm:
813 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Pass snap offsets to AxisScrollSnapAnimator constructor as references.
814 (WebCore::ScrollController::updateScrollSnapPoints): Added. Used by ScrollingTreeFrameScrollingNodeMac to update scroll snap point
815 settings in the scrolling thread.
816 * platform/mac/AxisScrollSnapAnimator.h:
817 * platform/mac/AxisScrollSnapAnimator.mm:
818 (WebCore::toWheelEventStatus): Don't ignore the "MayBegin" or "Cancelled" event phases.
819 (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Revise signature to take a reference to the layout units.
820 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Handle the case where this method gets called from a thread
821 when the scrollable area has already reached its final destination.
822 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Handle the possibility that the snap offset point vector might be
823 empty. Update method to account for m_snapOffsets being a value, instead of a pointer.
825 2015-03-03 Andy Estes <aestes@apple.com>
827 [Content Filtering] Separate unblock handling into its own class
828 https://bugs.webkit.org/show_bug.cgi?id=142251
830 Reviewed by Andreas Kling.
832 Unblock handling is currently supported only for one type of content filter (WebFilterEvaluator) on one
833 platform (iOS). Having its implementation in ContentFilter is making it difficult to support other filters and
834 platforms, so let's separate unblock handling into its own class called ContentFilterUnblockHandler.
836 * WebCore.xcodeproj/project.pbxproj:
837 * loader/DocumentLoader.cpp:
838 (WebCore::DocumentLoader::finishedLoading): Passed a ContentFilterUnblockHandler to FrameLoaderClient::contentFilterDidBlockLoad.
839 (WebCore::DocumentLoader::dataReceived): Ditto.
840 * loader/FrameLoaderClient.h:
841 * platform/ContentFilter.h:
842 * platform/ContentFilterUnblockHandler.h: Copied from Source/WebCore/platform/ios/ContentFilterIOS.mm.
843 (WebCore::ContentFilterUnblockHandler::clear):
844 * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: Renamed from Source/WebCore/platform/ios/ContentFilterIOS.mm.
845 (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
846 (WebCore::ContentFilterUnblockHandler::encode):
847 (WebCore::ContentFilterUnblockHandler::decode):
849 (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful):
850 * platform/mac/ContentFilterMac.mm:
851 (WebCore::ContentFilter::unblockHandler):
852 (WebCore::ContentFilter::ContentFilter): Deleted.
853 (WebCore::ContentFilter::encode): Deleted.
854 (WebCore::ContentFilter::decode): Deleted.
856 2015-03-03 Alexey Proskuryakov <ap@apple.com>
858 [Mac] Track localized name follows locale instead of primary language
859 https://bugs.webkit.org/show_bug.cgi?id=142242
860 rdar://problem/20000365
862 Reviewed by Eric Carlson.
864 * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the
865 language for localization, as CFBundle does.
867 2015-03-03 Alex Christensen <achristensen@webkit.org>
869 [Win] Unreviewed build fix.
871 * WebCore.vcxproj/WebCoreIncludeCommon.props:
872 Include contentextensions subdirectory.
874 2015-03-03 Alex Christensen <achristensen@webkit.org>
876 Prepare to use CSS selectors in content extensions.
877 https://bugs.webkit.org/show_bug.cgi?id=142227
879 Reviewed by Benjamin Poulain.
881 Test: http/tests/usercontentfilter/css-display-none.html
884 * WebCore.xcodeproj/project.pbxproj:
885 * contentextensions/ContentExtensionActions.h: Added.
886 * contentextensions/ContentExtensionRule.cpp:
887 (WebCore::ContentExtensions::Action::deserialize):
888 * contentextensions/ContentExtensionRule.h:
889 (WebCore::ContentExtensions::Action::Action):
890 (WebCore::ContentExtensions::Action::type):
891 (WebCore::ContentExtensions::Action::cssSelector):
892 * contentextensions/ContentExtensionsBackend.cpp:
893 (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions):
894 Put action descriptions into a compact format in a Vector
895 to be able to be put into one block of shared read-only memory.
896 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
897 Put an index of the beginning of the description into the NFA instead of the index of the rule
898 because we will be sharing the descriptions of the actions and not the rules.
899 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
900 (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL): Deleted.
901 Return a vector of actions to be able to do multiple actions for one URL.
902 * contentextensions/ContentExtensionsBackend.h:
903 * contentextensions/ContentExtensionsManager.cpp:
904 (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
905 (WebCore::ContentExtensions::ExtensionsManager::loadAction):
906 Added the css-display-none action type, which requires a selector.
907 (WebCore::ContentExtensions::ExtensionsManager::loadRule):
908 * loader/cache/CachedResourceLoader.cpp:
909 (WebCore::CachedResourceLoader::requestResource):
910 * page/UserContentController.cpp:
911 (WebCore::UserContentController::actionsForURL):
912 (WebCore::UserContentController::actionForURL): Deleted.
913 * page/UserContentController.h:
915 2015-03-03 Brent Fulgham <bfulgham@apple.com>
917 Move scroll animating functions from ScrollAnimator to ScrollController
918 https://bugs.webkit.org/show_bug.cgi?id=142102
919 <rdar://problem/20007161>
921 Reviewed by Simon Fraser.
923 Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html.
925 Do some refactoring of the various scrolling classes:
926 1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
927 and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
928 2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
929 3. Move code from ScrollAnimator{Mac} -> ScrollController.
930 4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
931 5. Rename immediateScrollInAxis -> immediateScrollOnAxis
933 * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
934 * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
935 events, just as is done for the "event not handled" case in EventHandler.cpp.
936 (WebCore::EventHandler::platformCompleteWheelEvent):
937 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
938 methods, now that ScrollController is controlling this state.
939 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
940 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
941 need to clean up the CFRunLoopTimer.
942 (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Make sure scroll
943 state is updated after rubber band snap.
944 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
945 until Bug1973 is completed.).
946 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
947 (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
948 * platform/ScrollAnimator.cpp:
949 (WebCore::ScrollAnimator::ScrollAnimator):
950 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
951 (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
952 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
953 (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
954 (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
955 (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
956 (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
957 (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
958 (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
959 (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
960 (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
961 * platform/ScrollAnimator.h:
962 * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
963 (WebCore::ScrollControllerClient::startSnapRubberbandTimer):
964 (WebCore::ScrollControllerClient::stopSnapRubberbandTimer):
965 (WebCore::ScrollControllerClient::startScrollSnapTimer):
966 (WebCore::ScrollControllerClient::stopScrollSnapTimer):
967 * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
968 (WebCore::ScrollController::ScrollController): Update to initialize new timers.
969 (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
970 (WebCore::ScrollController::startSnapRubberbandTimer): Added.
971 (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
972 require client to maintain timers.
973 (WebCore::ScrollController::snapRubberBand): Ditto.
974 (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
975 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
976 (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
977 (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
978 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
979 (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
980 (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
981 (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
982 * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
983 * platform/mac/AxisScrollSnapAnimator.mm:
984 (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Update for 'InAxis' to 'OnAxis' renaming.
985 (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Ditto.
986 (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Ditto.
987 (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Ditto.
988 (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Ditto.
989 * platform/mac/ScrollAnimatorMac.h:
990 * platform/mac/ScrollAnimatorMac.mm:
991 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
992 controlled in the ScrollController)
993 (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
994 (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
995 (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
996 * platform/mac/ScrollController.h: Removed.
997 * platform/mac/ScrollController.mm: Removed.
999 2015-03-03 Commit Queue <commit-queue@webkit.org>
1001 Unreviewed, rolling out r180683.
1002 https://bugs.webkit.org/show_bug.cgi?id=142249
1004 Broke fast/css/acid2-pixel.html (Requested by ap on #webkit).
1008 "Setting any of the <object> element plugin controlling
1009 attributes does not have any affect."
1010 https://bugs.webkit.org/show_bug.cgi?id=141936
1011 http://trac.webkit.org/changeset/180683
1013 2015-03-03 Dean Jackson <dino@apple.com>
1015 Controls panel should have system blurry background
1016 https://bugs.webkit.org/show_bug.cgi?id=142154
1017 <rdar://problem/20000964>
1019 Reviewed by Simon Fraser.
1021 In order to replicate the system style of media controls
1022 on OS X and iOS, we need to expose a special -webkit-appearance.
1023 This patch adds the new property value, and implements
1024 the iOS part of the appearance, which is a blurry shaded
1027 Test: compositing/media-controls-bar-appearance.html
1029 * css/CSSPrimitiveValueMappings.h:
1030 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the new
1031 keywords from ControlParts.
1033 * css/CSSValueKeywords.in: Add media-controls-light-bar-background
1034 and media-controls-dark-bar-background. Darin suggested they
1035 be sorted, so I did this at the same time.
1036 * platform/ThemeTypes.h: New ControlParts for the values, and
1037 sort the values since they need to be in sync with
1038 CSSValueKeywords.in.
1040 * platform/graphics/GraphicsLayer.h: Expose two new custom appearance
1042 * platform/graphics/ca/GraphicsLayerCA.cpp:
1043 (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1044 (WebCore::layerTypeForCustomBackdropAppearance): Helper function.
1045 (WebCore::isCustomBackdropLayerType): Ditto.
1046 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Merge setting
1047 a system backdrop layer in with the code that swaps to/from tiled layers.
1048 (WebCore::GraphicsLayerCA::changeLayerTypeTo): New method that does what
1049 swapFromOrToTiledLayer implemented, but also allows us to change to a
1050 system backdrop layer.
1051 (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Deleted.
1052 * platform/graphics/ca/GraphicsLayerCA.h:
1054 * platform/graphics/ca/PlatformCALayer.h: New layer types.
1055 * platform/graphics/ca/mac/PlatformCALayerMac.mm: For now expose these
1056 as regular backdrop layers.
1057 (PlatformCALayerMac::PlatformCALayerMac):
1058 (PlatformCALayerMac::updateCustomAppearance):
1060 * rendering/RenderLayerBacking.cpp:
1061 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Make sure to update
1063 (WebCore::RenderLayerBacking::updateCustomAppearance): New method.
1064 * rendering/RenderLayerBacking.h:
1066 2015-03-03 Chris Dumez <cdumez@apple.com>
1068 Access ApplicationCacheStorage global instance via singleton() static member function
1069 https://bugs.webkit.org/show_bug.cgi?id=142239
1071 Reviewed by Anders Carlsson.
1073 Access ApplicationCacheStorage global instance via singleton() static
1074 member function as per WebKit coding style.
1076 2015-03-03 Anders Carlsson <andersca@apple.com>
1078 Try to fix the build.
1080 * platform/spi/cf/CFNetworkSPI.h:
1082 2015-03-03 Timothy Horton <timothy_horton@apple.com>
1084 <attachment> label can get very wide, doesn't wrap/truncate
1085 https://bugs.webkit.org/show_bug.cgi?id=142214
1086 <rdar://problem/19982499>
1088 Reviewed by Simon Fraser.
1090 Test: fast/attachment/attachment-label-highlight.html
1092 * rendering/RenderThemeMac.h:
1093 * rendering/RenderThemeMac.mm:
1094 (WebCore::labelTextColorForAttachment):
1095 (WebCore::AttachmentLayout::addLine):
1096 (WebCore::AttachmentLayout::layOutText):
1097 (WebCore::AttachmentLayout::AttachmentLayout):
1098 Make it possible to lay out multiple lines of label text.
1099 We lay out the whole string normally, but then only draw N (where N=1 for now,
1100 but is adjustable) of the lines. The remainder of the string is then
1101 merged into a single line, which is middle-truncated with an ellipsis
1102 and drawn in place of the N+1 line.
1104 (WebCore::addAttachmentLabelBackgroundRightCorner):
1105 (WebCore::addAttachmentLabelBackgroundLeftCorner):
1106 (WebCore::paintAttachmentLabelBackground):
1107 Wrap the label background around the multiple lines of text with curved edges.
1108 We run first down the right side of the label, determining whether to use
1109 concave or convex arcs based on the relative widths of adjacent lines.
1110 Then, we run back up the left side of the label doing the same thing.
1112 If the background rects of two lines are very similar (within the rounded rect radius),
1113 they will be expanded to the larger of the two, because otherwise the arcs
1116 (WebCore::paintAttachmentLabel):
1117 Draw the label with CoreText directly instead of bothering with WebCore
1118 text layout primitives. There's no need, and it makes wrapping much more complicated.
1120 (WebCore::RenderThemeMac::paintAttachment):
1121 (WebCore::RenderThemeMac::paintAttachmentLabelBackground): Deleted.
1122 (WebCore::RenderThemeMac::paintAttachmentLabel): Deleted.
1124 2015-03-03 Simon Fraser <simon.fraser@apple.com>
1126 Avoid applying the clip-path when painting, if a layer also has a shape layer mask
1127 https://bugs.webkit.org/show_bug.cgi?id=142212
1129 Reviewed by Zalan Bujtas.
1131 After r180882 we translate clip-path into a composited shape mask when the layer
1132 is composited. However, we were also still applying the clip-path when painting
1135 Now, we set the GraphicsLayer bits GraphicsLayerPaintClipPath and GraphicsLayerPaintMask
1136 only for the m_maskLayer's painting. This translate into setting PaintLayerPaintingCompositingMaskPhase
1137 and PaintLayerPaintingCompositingClipPathPhase only when painting that same mask layer,
1138 rather than always. To ensure that masks and clip-path get applied for software paints,
1139 add shouldPaintMask() and shouldApplyClipPath() that return true for non-composited layers,
1140 and when doing a flattening paint.
1142 * rendering/RenderLayer.cpp:
1143 (WebCore::RenderLayer::paintLayerContents): Use shouldApplyClipPath().
1144 Pull three chunks of code under a single "if (shouldPaintContent && !selectionOnly)" condition.
1145 The condition for paintChildClippingMaskForFragments() is changed slightly; we need to call this
1146 only when painting the clip-path/mask layer contents, but also only when there is no mask to fill
1147 the clipped area for us.
1148 (WebCore::RenderLayer::calculateClipRects):
1149 (WebCore::RenderLayer::paintsWithClipPath): Deleted.
1150 * rendering/RenderLayer.h:
1151 * rendering/RenderLayerBacking.cpp:
1152 (WebCore::RenderLayerBacking::updateMaskingLayer): Be sure to set the GraphicsLayerPaintClipPath bit
1153 when having a mask forces us onto the painting path.
1155 2015-03-03 Anders Carlsson <andersca@apple.com>
1157 Use the correct display name for website data for local files
1158 https://bugs.webkit.org/show_bug.cgi?id=142228
1160 Reviewed by Dan Bernstein.
1162 * English.lproj/Localizable.strings:
1163 Add local file display name.
1165 * platform/spi/cf/CFNetworkSPI.h:
1166 Add kCFHTTPCookieLocalFileDomain declaration.
1168 2015-03-03 Myles C. Maxfield <mmaxfield@apple.com>
1170 BreakingContext cleanup
1171 https://bugs.webkit.org/show_bug.cgi?id=142146
1173 Reviewed by Dean Jackson.
1175 1. Use commitLineBreakAtCurrentWidth() instead of directly
1176 updating m_width and m_lineBreak, because the name makes the
1178 2. Remove duplicate function LineBreaker::nextSegmentBreak().
1179 3. lineStyle() takes care of inspecting RenderText's parent's
1181 4. Add FIXME to BreakingContext::initializeForCurrentObject()
1182 because it seems like we are ignoring first-line style for
1185 No new tests because there is no behavior change.
1187 * rendering/line/BreakingContextInlineHeaders.h:
1188 (WebCore::BreakingContext::BreakingContext):
1189 (WebCore::BreakingContext::initializeForCurrentObject):
1190 (WebCore::BreakingContext::handleReplaced):
1191 (WebCore::BreakingContext::handleText):
1192 (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
1193 (WebCore::BreakingContext::handleEndOfLine):
1194 * rendering/line/LineBreaker.cpp:
1195 (WebCore::LineBreaker::nextLineBreak): Deleted.
1196 (WebCore::LineBreaker::nextSegmentBreak): Deleted.
1197 * rendering/line/LineBreaker.h:
1198 * rendering/line/LineInlineHeaders.h:
1199 (WebCore::lineStyle):
1201 2015-03-03 Chris Dumez <cdumez@apple.com>
1203 Make AudioContext suspendable when it is not rendering
1204 https://bugs.webkit.org/show_bug.cgi?id=142210
1205 <rdar://problem/19923085>
1207 Reviewed by Eric Carlson.
1209 Make AudioContext suspendable when it is not rendering to increase the
1210 likelihood of entering the PageCache for pages using WebAudio.
1212 This patch adds a state member to AudioContext with 3 possible states:
1213 Suspended / Running / Closed, as defined in the specification:
1214 http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
1216 This state is used to decide if we can suspend the page or not. We
1217 can safely suspend if the AudioContext's state is suspended (did not
1218 start rendering) or closed (Stopped rendering).
1220 Note that this patch does not expose the AudioContext's state to the
1221 Web yet, even though it is exposed in the latest specification.
1223 Tests: fast/history/page-cache-closed-audiocontext.html
1224 fast/history/page-cache-running-audiocontext.html
1225 fast/history/page-cache-suspended-audiocontext.html
1227 * Modules/webaudio/AudioContext.cpp:
1228 (WebCore::AudioContext::AudioContext):
1229 (WebCore::AudioContext::uninitialize):
1230 (WebCore::AudioContext::canSuspend):
1231 (WebCore::AudioContext::startRendering):
1232 (WebCore::AudioContext::fireCompletionEvent):
1233 * Modules/webaudio/AudioContext.h:
1235 2015-03-02 Carlos Garcia Campos <cgarcia@igalia.com>
1237 [SOUP] Use SoupMessage::starting instead of SoupSession::request-started
1238 https://bugs.webkit.org/show_bug.cgi?id=142164
1240 Reviewed by Sergio Villar Senin.
1242 SoupSession::request-started is deprecated in libsoup 2.50. Both
1243 signals are equivalent, but SoupMessage::starting is also emitted
1244 for resources loaded from the disk cache. This fixes web timing
1245 calculations for cached resources, since we were not initializing
1248 * platform/network/soup/ResourceHandleSoup.cpp:
1249 (WebCore::startingCallback):
1250 (WebCore::createSoupMessageForHandleAndRequest):
1251 * platform/network/soup/SoupNetworkSession.cpp:
1252 (WebCore::SoupNetworkSession::SoupNetworkSession):
1254 2015-03-03 Carlos Garcia Campos <cgarcia@igalia.com>
1256 [SOUP] Synchronous XMLHttpRequests can time out when we reach the max connections limit
1257 https://bugs.webkit.org/show_bug.cgi?id=141508
1259 Reviewed by Sergio Villar Senin.
1261 Use SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS flag when loading a
1262 synchronous message instead of increasing the maximum number of
1263 connections allowed if the soup version is recent enough.
1264 The current solution of increasing/decreasing the limits doesn't
1265 always work, because connections are not marked as IDLE in libsoup
1266 until the message is unqueued, but we don't wait for the message
1267 to be unqueued to finish our loads in WebKit, we finish them as
1268 soon as we have finished reading the stream. This causes that
1269 synchronous loads keep blocked in the nested main loop until the
1270 timeout of 10 seconds is fired and the load fails.
1271 Also marked WebCoreSynchronousLoader class as final, the virtual
1272 methods as override and removed the unsused method isSynchronousClient.
1274 * platform/network/soup/ResourceHandleSoup.cpp:
1275 (WebCore::createSoupMessageForHandleAndRequest):
1276 (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
1277 (WebCore::WebCoreSynchronousLoader::isSynchronousClient): Deleted.
1278 (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
1279 (WebCore::WebCoreSynchronousLoader::didReceiveData):
1280 (WebCore::WebCoreSynchronousLoader::didReceiveBuffer):
1281 (WebCore::WebCoreSynchronousLoader::didFinishLoading):
1282 (WebCore::WebCoreSynchronousLoader::didFail):
1283 (WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge):
1284 (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
1286 2015-03-02 David Kilzer <ddkilzer@apple.com>
1288 [iOS] Disable -Wdeprecated-declaration warnings in WebVideoFullscreenInterfaceAVKit.mm
1290 Fixing the deprecations is tracked by: <rdar://problem/20018692>
1292 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1293 (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized):
1294 Ignore -Wdeprecated-declaration warnings via clang pragmas.
1296 2015-03-02 Commit Queue <commit-queue@webkit.org>
1298 Unreviewed, rolling out r180902.
1299 https://bugs.webkit.org/show_bug.cgi?id=142205
1301 It broke scrolling in some cases. See bug 142202 for details.
1302 (Requested by bdash on #webkit).
1306 "Move scroll animating functions from ScrollAnimator to
1308 https://bugs.webkit.org/show_bug.cgi?id=142102
1309 http://trac.webkit.org/changeset/180902
1311 2015-03-02 Commit Queue <commit-queue@webkit.org>
1313 Unreviewed, rolling out r180911.
1314 https://bugs.webkit.org/show_bug.cgi?id=142204
1316 The tests it added are crashing (Requested by bdash on
1321 "Add a microtask abstraction"
1322 https://bugs.webkit.org/show_bug.cgi?id=137496
1323 http://trac.webkit.org/changeset/180911
1325 2015-03-02 Yoav Weiss <yoav@yoav.ws>
1327 Add a microtask abstraction
1328 https://bugs.webkit.org/show_bug.cgi?id=137496
1330 Reviewed by Sam Weinig.
1332 This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
1333 That abstraction is required in order to enable async loading of images,
1334 which is in turn required to enable support for the picture element, as well as
1335 to make sure that the order of properties set on HTMLImageElement has no implications.
1337 * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
1338 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
1339 * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
1340 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
1341 * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
1342 * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
1343 * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
1344 (WebCore::MicroTask::~MicroTask):
1345 (WebCore::MicroTask::run): Run the microtask.
1346 * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
1347 (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
1348 (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
1349 (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
1350 * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
1351 (WebCore::ScriptRunner::timerFired):
1352 * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
1353 (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1354 (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
1355 (WebCore::HTMLScriptRunner::runScript):
1356 * testing/Internals.cpp: Add a method to queue a test microtask.
1357 (WebCore::Internals::queueMicroTask):
1358 * testing/Internals.h: Add a method to queue a test microtask.
1359 (WebCore::Internals::queueMicroTask):
1360 * testing/Internals.idl: Expose test microtask queueing to test JS.
1361 * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
1362 (WebCore::MicroTaskTest::run): Run the microtask
1363 (WebCore::MicroTaskTest::create): Create a test microtask.
1364 * testing/MicroTaskTest.h: Add a test class that implements a microtask.
1365 (WebCore::MicroTaskTest::run):
1366 (WebCore::MicroTaskTest::create):
1368 2015-03-02 Jeremy Jones <jeremyj@apple.com>
1370 RenderVideo should not paint the video frame when video is fullscreen.
1371 https://bugs.webkit.org/show_bug.cgi?id=142097
1373 Reviewed by Eric Carlson.
1375 For performance and correctness, RenderVideo should not paint the current video frame
1376 inline when video is fullscreen. This happens when snapshots are taken and can have a
1377 negative performance impact.
1379 * rendering/RenderVideo.cpp:
1380 (WebCore::RenderVideo::paintReplaced):
1382 2015-03-02 Dean Jackson <dino@apple.com>
1384 [iOS Media] Airplay button should be blue when active
1385 https://bugs.webkit.org/show_bug.cgi?id=142193
1387 Reviewed by Brent Fulgham.
1389 Add a blue form of the Airplay button that is used
1390 when we are actively displaying on another screen.
1392 * Modules/mediacontrols/mediaControlsiOS.css:
1393 (video::-webkit-media-controls-wireless-playback-picker-button):
1394 (video::-webkit-media-controls-wireless-playback-picker-button:active):
1395 (video::-webkit-media-controls-wireless-playback-picker-button.playing):
1396 * Modules/mediacontrols/mediaControlsiOS.js:
1397 (ControllerIOS.prototype.updateWirelessPlaybackStatus):
1399 2015-03-02 Brent Fulgham <bfulgham@apple.com>
1401 Move scroll animating functions from ScrollAnimator to ScrollController
1402 https://bugs.webkit.org/show_bug.cgi?id=142102
1403 <rdar://problem/20007161>
1405 Reviewed by Simon Fraser.
1407 No change in functionality.
1409 Do some refactoring of the various scrolling classes:
1410 1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
1411 and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
1412 2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
1413 3. Move code from ScrollAnimator{Mac} -> ScrollController.
1414 4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
1415 5. Rename immediateScrollInAxis -> immediateScrollOnAxis
1417 * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
1418 * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
1419 events, just as is done for the "event not handled" case in EventHandler.cpp.
1420 (WebCore::EventHandler::platformCompleteWheelEvent):
1421 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
1422 methods, now that ScrollController is controlling this state.
1423 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1424 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
1425 need to clean up the CFRunLoopTimer.
1426 (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
1427 until Bug 141973 is completed.).
1428 (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
1429 (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
1430 (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
1431 * platform/ScrollAnimator.cpp:
1432 (WebCore::ScrollAnimator::ScrollAnimator):
1433 (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
1434 (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
1435 (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
1436 (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
1437 (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
1438 (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
1439 (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
1440 (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
1441 (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
1442 (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
1443 (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
1444 * platform/ScrollAnimator.h:
1445 * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
1446 * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
1447 (WebCore::ScrollController::ScrollController): Update to initialize new timers.
1448 (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
1449 (WebCore::ScrollController::startSnapRubberbandTimer): Added.
1450 (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
1451 require client to maintain timers.
1452 (WebCore::ScrollController::snapRubberBand): Ditto.
1453 (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
1454 (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
1455 (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
1456 (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
1457 (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
1458 (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
1459 (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
1460 (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
1461 * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
1462 * platform/mac/AxisScrollSnapAnimator.mm: Ditto.
1463 * platform/mac/ScrollAnimatorMac.h:
1464 * platform/mac/ScrollAnimatorMac.mm:
1465 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
1466 controlled in the ScrollController)
1467 (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
1468 (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
1469 (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
1470 * platform/mac/ScrollController.h: Removed.
1471 * platform/mac/ScrollController.mm: Removed.
1473 2015-03-02 Mark Lam <mark.lam@apple.com>
1475 The InspectorTimelineAgent should gracefully handle attempts to start more than once.
1476 <https://webkit.org/b/142189>
1478 Reviewed by Joseph Pecoraro.
1480 No new tests. Unskipped an existing test that already asserts this.
1482 InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
1483 case the InspectorTimelineAgent is already disabled. Similarly,
1484 InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
1485 is already enabled before proceeding to do work to enable it. Though wasteful,
1486 it is legal for clients of the InspectorTimelineAgent to invoke start on it more
1487 than once. Hence, this check is needed.
1489 This check fixes the debug assertion failure when running the
1490 inspector/timeline/debugger-paused-while-recording.html test. The test can now
1493 * inspector/InspectorTimelineAgent.cpp:
1494 (WebCore::InspectorTimelineAgent::internalStart):
1496 2015-03-02 Roger Fong <roger_fong@apple.com>
1498 Update backgrounds of sliders for inline media controls on OS X.
1499 https://bugs.webkit.org/show_bug.cgi?id=142188.
1500 <rdar://problem/20012413>
1502 Reviewed by Dean Jackson.
1504 Don’t use CSS to draw volume and timeline slider backgrounds.
1505 * Modules/mediacontrols/mediaControlsApple.css:
1506 (video::-webkit-media-controls-volume-slider):
1507 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
1508 (audio::-webkit-media-controls-timeline):
1509 (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
1510 (audio::-webkit-media-controls-panel .thumbnail-track):
1511 (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
1512 (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
1514 Draw volume and timeline slider backgrounds using 2d canvases.
1515 * Modules/mediacontrols/mediaControlsApple.js:
1516 (Controller.prototype.createControls):
1517 (Controller.prototype.handleVolumeSliderInput):
1518 (Controller.prototype.addRoundedRect):
1519 (Controller.prototype.drawTimelineBackground):
1520 (Controller.prototype.drawVolumeBackground):
1521 (Controller.prototype.showControls):
1522 * Modules/mediacontrols/mediaControlsiOS.js:
1523 (ControllerIOS.prototype.addRoundedRect): Deleted.
1525 2015-03-01 Roger Fong <roger_fong@apple.com>
1527 Update inline media element controls appearance Part 1.
1528 https://bugs.webkit.org/show_bug.cgi?id=142138.
1529 <rdar://problem/19997384>
1531 Reviewed by Dean Jackson.
1533 Update positioning, sizes, and background colors media control elements.
1534 Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
1536 * Modules/mediacontrols/mediaControlsApple.css:
1537 (audio::-webkit-media-controls-panel):
1538 (video::-webkit-media-controls-panel):
1539 (audio::-webkit-media-controls-rewind-button):
1540 (audio::-webkit-media-controls-play-button):
1541 (audio::-webkit-media-controls-panel .mute-box):
1542 (video::-webkit-media-controls-volume-max-button):
1543 (audio::-webkit-media-controls-panel .volume-box):
1544 (audio::-webkit-media-controls-panel .volume-box:active):
1545 (video::-webkit-media-controls-volume-slider):
1546 (audio::-webkit-media-controls-toggle-closed-captions-button):
1547 (audio::-webkit-media-controls-fullscreen-button):
1548 (audio::-webkit-media-controls-current-time-display):
1549 (audio::-webkit-media-controls-time-remaining-display):
1550 (audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.
1552 2015-03-02 David Kilzer <ddkilzer@apple.com>
1554 REGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
1555 <http://webkit.org/b/138684>
1557 Fixes the following build failures:
1559 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
1560 In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
1561 In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
1562 WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:123:33: error: 'setShapeLayerPath' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
1563 WEBCORE_EXPORT virtual void setShapeLayerPath(const Path&);
1565 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
1566 In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
1567 In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
1568 WebCore.framework/PrivateHeaders/GraphicsLayer.h:390:18: note: overridden virtual function is here
1569 virtual void setShapeLayerPath(const Path&);
1571 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
1572 In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
1573 In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
1574 WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:124:33: error: 'setShapeLayerWindRule' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
1575 WEBCORE_EXPORT virtual void setShapeLayerWindRule(WindRule);
1577 In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
1578 In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
1579 In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
1580 WebCore.framework/PrivateHeaders/GraphicsLayer.h:393:18: note: overridden virtual function is here
1581 virtual void setShapeLayerWindRule(WindRule);
1585 * platform/graphics/ca/GraphicsLayerCA.h:
1586 (WebCore::GraphicsLayer::setShapeLayerPath): Mark as override.
1587 (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
1589 2015-03-01 Simon Fraser <simon.fraser@apple.com>
1591 Make clip-path work on <video>, <canvas> etc.
1592 https://bugs.webkit.org/show_bug.cgi?id=138684
1594 Reviewed by Darin Adler.
1596 clip-path only worked in compositing layers on the painted contents of the layer,
1597 and failed to clip children. Fix this by translating the clip path into a Path
1598 which is set on a CA shape layer (for Mac and iOS), or painted into the
1599 RenderLayerBacking's mask layer. There are two code paths:
1601 1. clip-path which is a <basic-shape> or <geometry-box>, and no mask.
1602 Here we can use the optimal code path of converting the clip into a path
1603 that is put onto a CAShapeLayer, which is then used as a mask. There is no
1604 additional backing store.
1605 2. clip-path with an SVG reference, or clip-path combined with -webkit-mask:
1606 Here we have to allocate backing store for the mask layer, and paint the
1607 clip path (possibly with the mask).
1609 We add GraphicsLayer::Type::Shape, and add a getter for the layer type.
1611 Tests: compositing/masks/compositing-clip-path-and-mask.html
1612 compositing/masks/compositing-clip-path-mask-change.html
1613 compositing/masks/compositing-clip-path.html
1614 compositing/masks/reference-clip-path-on-composited.html
1616 * platform/graphics/GraphicsLayer.cpp:
1617 (WebCore::GraphicsLayer::GraphicsLayer): Store the type in the layer so the getter can return it.
1618 (WebCore::GraphicsLayer::shapeLayerPath): Get and set the shape layer path.
1619 (WebCore::GraphicsLayer::setShapeLayerPath): Ditto.
1620 (WebCore::GraphicsLayer::shapeLayerWindRule): Get and set the shape layer wind rule.
1621 (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
1622 * platform/graphics/GraphicsLayer.h:
1623 (WebCore::GraphicsLayer::type): Expose the type.
1624 (WebCore::GraphicsLayer::supportsLayerType): Allow the cross-platform code to use
1625 shape layers when it knows they are available.
1626 (WebCore::GraphicsLayer::needsClippingMaskLayer): Deleted. This was never used.
1627 * platform/graphics/GraphicsLayerClient.h: Align the bits (helps avoid typos). Add a
1628 GraphicsLayerPaintClipPath phase.
1629 * platform/graphics/Path.h: Some exports since WK2 needs to encode Paths now.
1630 * platform/graphics/ca/GraphicsLayerCA.cpp:
1631 (WebCore::GraphicsLayerCA::initialize): Make shape layers.
1632 (WebCore::GraphicsLayerCA::setShapeLayerPath): Setter for the shape path. Sadly we
1633 can't early return on unchanged paths yet.
1634 (WebCore::GraphicsLayerCA::setShapeLayerWindRule):
1635 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Updates for shape path
1637 (WebCore::GraphicsLayerCA::updateShape):
1638 (WebCore::GraphicsLayerCA::updateWindRule):
1639 * platform/graphics/ca/GraphicsLayerCA.h: Some new dirty bits for shape path and wind rule.
1640 * platform/graphics/ca/PlatformCALayer.h:
1641 * platform/graphics/ca/mac/PlatformCALayerMac.h:
1642 * platform/graphics/ca/mac/PlatformCALayerMac.mm: Got rid of lots of m_layer.get().
1643 (PlatformCALayerMac::~PlatformCALayerMac):
1644 (PlatformCALayerMac::setNeedsDisplay):
1645 (PlatformCALayerMac::setNeedsDisplayInRect):
1646 (PlatformCALayerMac::removeFromSuperlayer):
1647 (PlatformCALayerMac::setSublayers):
1648 (PlatformCALayerMac::removeAllSublayers):
1649 (PlatformCALayerMac::appendSublayer):
1650 (PlatformCALayerMac::insertSublayer):
1651 (PlatformCALayerMac::replaceSublayer):
1652 (PlatformCALayerMac::adoptSublayers):
1653 (PlatformCALayerMac::addAnimationForKey):
1654 (PlatformCALayerMac::removeAnimationForKey):
1655 (PlatformCALayerMac::animationForKey):
1656 (PlatformCALayerMac::setMask):
1657 (PlatformCALayerMac::isOpaque):
1658 (PlatformCALayerMac::setOpaque):
1659 (PlatformCALayerMac::bounds):
1660 (PlatformCALayerMac::setBounds):
1661 (PlatformCALayerMac::position):
1662 (PlatformCALayerMac::setPosition):
1663 (PlatformCALayerMac::anchorPoint):
1664 (PlatformCALayerMac::setAnchorPoint):
1665 (PlatformCALayerMac::transform):
1666 (PlatformCALayerMac::setTransform):
1667 (PlatformCALayerMac::sublayerTransform):
1668 (PlatformCALayerMac::setSublayerTransform):
1669 (PlatformCALayerMac::setHidden):
1670 (PlatformCALayerMac::setGeometryFlipped):
1671 (PlatformCALayerMac::isDoubleSided):
1672 (PlatformCALayerMac::setDoubleSided):
1673 (PlatformCALayerMac::masksToBounds):
1674 (PlatformCALayerMac::setMasksToBounds):
1675 (PlatformCALayerMac::acceleratesDrawing):
1676 (PlatformCALayerMac::setAcceleratesDrawing):
1677 (PlatformCALayerMac::contents):
1678 (PlatformCALayerMac::setContents):
1679 (PlatformCALayerMac::setContentsRect):
1680 (PlatformCALayerMac::setMinificationFilter):
1681 (PlatformCALayerMac::setMagnificationFilter):
1682 (PlatformCALayerMac::backgroundColor):
1683 (PlatformCALayerMac::setBackgroundColor):
1684 (PlatformCALayerMac::setBorderWidth):
1685 (PlatformCALayerMac::setBorderColor):
1686 (PlatformCALayerMac::opacity):
1687 (PlatformCALayerMac::setOpacity):
1688 (PlatformCALayerMac::copyFiltersFrom):
1689 (PlatformCALayerMac::setName):
1690 (PlatformCALayerMac::setSpeed):
1691 (PlatformCALayerMac::setTimeOffset):
1692 (PlatformCALayerMac::contentsScale):
1693 (PlatformCALayerMac::setContentsScale):
1694 (PlatformCALayerMac::cornerRadius):
1695 (PlatformCALayerMac::setCornerRadius):
1696 (PlatformCALayerMac::setEdgeAntialiasingMask):
1697 (PlatformCALayerMac::shapeWindRule): New function.
1698 (PlatformCALayerMac::setShapeWindRule): Ditto.
1699 (PlatformCALayerMac::shapePath): Ditto.
1700 (PlatformCALayerMac::setShapePath): Ditto.
1701 (PlatformCALayer::isWebLayer):
1702 * platform/graphics/cg/PathCG.cpp:
1703 (WebCore::Path::Path): nullptr.
1704 * rendering/RenderLayer.cpp:
1705 (WebCore::RenderLayer::paintsWithClipPath): Return true if the clip path is painted.
1706 (WebCore::RenderLayer::computeClipPath): Factor code that computes the clip path into this
1707 function, so we can call it from RenderLayerBacking too.
1708 (WebCore::RenderLayer::setupClipPath):
1709 (WebCore::RenderLayer::paintLayerContents): We only want to apply the clip path
1710 for painting when we're either painting a non-composited layer, or we're painting the
1711 mask layer of a composited layer. We in the latter case, we just want to fill the clip
1712 path with black, so re-use the paintChildClippingMaskForFragments() which does this.
1713 * rendering/RenderLayer.h: Align the bits, add PaintLayerPaintingCompositingClipPathPhase.
1714 * rendering/RenderLayerBacking.cpp:
1715 (WebCore::RenderLayerBacking::~RenderLayerBacking):
1716 (WebCore::RenderLayerBacking::updateConfiguration):
1717 (WebCore::RenderLayerBacking::updateGeometry): Move mask updating into its own function.
1718 (WebCore::RenderLayerBacking::updateMaskingLayerGeometry): If we're using the shape layer
1719 code path, compute the Path and set it and the wind rule on the mask layer.
1720 (WebCore::RenderLayerBacking::updateMaskingLayer): This is now more complex, as it has
1721 to deal with combinations of clip-path and mask, some of which allow for the shape layer
1722 mask, and we handle dynamic changes between these and painted masks.
1723 (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): Include the GraphicsLayerPaintClipPath phase.
1724 (WebCore::RenderLayerBacking::paintIntoLayer): Map GraphicsLayerPaintClipPath to PaintLayerPaintingCompositingClipPathPhase.
1725 (WebCore::RenderLayerBacking::updateMaskLayer): Deleted.
1726 * rendering/RenderLayerBacking.h:
1728 2015-03-01 Hunseop Jeong <hs85.jeong@samsung.com>
1730 [Cairo] Implement Path::addEllipse
1731 https://bugs.webkit.org/show_bug.cgi?id=142144
1733 Reviewed by Gyuyoung Kim.
1735 Add support for addEllipse method for platforms using cairo.
1737 * platform/graphics/cairo/PathCairo.cpp:
1738 (WebCore::Path::addEllipse):
1740 2015-03-01 Joonghun Park <jh718.park@samsung.com>
1742 Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
1743 https://bugs.webkit.org/show_bug.cgi?id=142143
1745 Reviewed by Darin Adler.
1747 No new tests, no behavior changes.
1749 * platform/ScrollAnimator.cpp:
1750 (WebCore::ScrollAnimator::create):
1751 * platform/ScrollAnimator.h:
1752 * platform/ScrollAnimatorNone.cpp:
1753 (WebCore::ScrollAnimator::create):
1754 * platform/ScrollableArea.h:
1755 * platform/ios/ScrollAnimatorIOS.mm:
1756 (WebCore::ScrollAnimator::create):
1757 * platform/mac/ScrollAnimatorMac.mm:
1758 (WebCore::ScrollAnimator::create):
1760 2015-02-26 Andy Estes <aestes@apple.com>
1762 [Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
1763 https://bugs.webkit.org/show_bug.cgi?id=142066
1765 Reviewed by Andreas Kling.
1767 * platform/ios/ContentFilterIOS.mm:
1768 * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
1770 2015-03-01 Chris Dumez <cdumez@apple.com>
1772 Make NotificationCenter / Notification suspendable
1773 https://bugs.webkit.org/show_bug.cgi?id=142117
1774 <rdar://problem/19923085>
1776 Reviewed by Andreas Kling.
1778 Make NotificationCenter / Notification suspendable so that pages using
1779 them can enter the PageCache.
1781 NotificationCenter can safely be suspended if there are no pending
1782 permission requests. This required adding an
1783 "hasPendingPermissionRequests()" callback to the NotificationClient.
1785 Notification can safely be suspended if it is either idle (not showing
1788 Tests: fast/history/page-cache-notification-non-suspendable.html
1789 fast/history/page-cache-notification-suspendable.html
1791 * Modules/notifications/Notification.cpp:
1792 (WebCore::Notification::canSuspend):
1793 * Modules/notifications/NotificationCenter.cpp:
1794 (WebCore::NotificationCenter::canSuspend):
1795 * Modules/notifications/NotificationClient.h:
1797 2015-03-01 Ryosuke Niwa <rniwa@webkit.org>
1799 isContentEditable shouldn't trigger synchronous style recalc in most cases
1800 https://bugs.webkit.org/show_bug.cgi?id=129034
1802 Reviewed by Antti Koivisto.
1804 Avoid style recalc inside isContentEditable when the document doesn't contain -webkit-user-modify or
1805 -webkit-user-select: all. Instead, compute the value from contenteditable attributes in ancestors.
1806 However, still compute the editability from the style tree when it's up-to-date in order to avoid
1807 repeatedly walking up the DOM tree in a hot code path inside editing.
1809 Test: fast/dom/HTMLElement/dynamic-editability-change.html
1811 * css/CSSGrammar.y.in: No need to pass in "true" as we never call this function with false.
1812 * css/CSSParser.cpp:
1813 (WebCore::isValidKeywordPropertyAndValue): Calls parserSetUsesStyleBasedEditability as needed.
1814 (WebCore::parseKeywordValue): Passes around StyleSheetContents*.
1815 (WebCore::CSSParser::parseValue): Ditto.
1816 (WebCore::CSSParser::parseFont): Ditto.
1818 * css/StyleSheetContents.cpp:
1819 (WebCore::StyleSheetContents::StyleSheetContents): Initializes and copies m_usesStyleBasedEditability.
1821 * css/StyleSheetContents.h:
1822 (WebCore::StyleSheetContents::parserSetUsesRemUnits): Removed the argument since it was always true.
1823 (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability): Added.
1824 (WebCore::StyleSheetContents::usesStyleBasedEditability): Added.
1827 (WebCore::Document::recalcStyle): Added a FIXME as well as a comment explaining why we don't call
1828 setUsesStyleBasedEditability. Since Node::computeEditability triggers style recalc only when the flag
1829 is set to true, it's too late to update the flag here.
1830 (WebCore::Document::updateStyleIfNeeded): Uses a newly extracted needsStyleRecalc.
1831 (WebCore::Document::updateBaseURL): Preserves m_usesStyleBasedEditability as well as m_usesRemUnit.
1832 (WebCore::Document::usesStyleBasedEditability): Added. Returns true when inline style declarations or
1833 any active stylesheet uses -webkit-user-modify or -webkit-user-select: all. Flushing pending stylesheet
1834 changes here is fine because the alternative is to trigger a full blown style recalc.
1837 (WebCore::Document::needsStyleRecalc): Added. Extracted from updateStyleIfNeeded.
1839 * dom/DocumentStyleSheetCollection.cpp:
1840 (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
1841 (WebCore::styleSheetsUseRemUnits): Deleted.
1842 (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Updates m_usesStyleBasedEditability
1843 as well as m_usesRemUnit.
1845 * dom/DocumentStyleSheetCollection.h:
1846 (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Added.
1847 (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Added.
1850 (WebCore::computeEditabilityFromComputedStyle): Extracted from computeEditability.
1851 (WebCore::Node::computeEditability): When the style recalc is requested and the render tree is dirty,
1852 check if the document uses any CSS property that can affect the editability of elements. If it doesn't,
1853 compute the editability from contenteditable attributes in the anchors via matchesReadWritePseudoClass.
1854 Continue to use the style-based computation when the render tree isn't dirty to avoid the tree walk.
1856 * html/HTMLElement.cpp:
1857 (WebCore::HTMLElement::editabilityFromContentEditableAttr): Extracted from matchesReadWritePseudoClass
1858 to be called in Node::computeEditability. Also made it return Editability instead of boolean.
1859 (WebCore::HTMLElement::matchesReadWritePseudoClass):
1860 * html/HTMLElement.h:
1862 2015-03-01 Brent Fulgham <bfulgham@apple.com>
1864 [Win] Unreviewed build fix.
1866 * WebCorePrefix.h: Provide some default definitions to help build on Windows
1867 machines with different application support libraries.
1869 2015-02-28 Simon Fraser <simon.fraser@apple.com>
1871 Viewport units should not dirty style just before we do layout
1872 https://bugs.webkit.org/show_bug.cgi?id=141682
1874 Reviewed by Zalan Bujtas.
1876 In documents using viewport units, we dirtied style every time layout changed
1877 the size of the document. This is nonsensical, because viewport units depend on the
1878 viewport size, not the document size.
1880 Move the style dirtying from layout() into availableContentSizeChanged(). Hook
1881 this up for WebKit1 by calling from -[WebFrameView _frameSizeChanged], and,
1882 since that causes availableContentSizeChanged() to be called for WK1 for the first
1883 time, protect the call to updateScrollbars() with a !platformWidget check.
1885 Covered by existing viewport unit tests.
1887 * page/FrameView.cpp:
1888 (WebCore::FrameView::layout):
1889 (WebCore::FrameView::availableContentSizeChanged):
1890 (WebCore::FrameView::viewportSizeForCSSViewportUnits): Add a FIXME comment. Whether
1891 scrollbars are ignored depends on the value of the overflow property on the root element.
1893 * platform/ScrollView.cpp:
1894 (WebCore::ScrollView::availableContentSizeChanged):
1896 2015-02-28 Andreas Kling <akling@apple.com>
1898 [Cocoa] Purge SQLite page cache when under memory pressure.
1899 <https://webkit.org/b/142139>
1900 <rdar://problem/19997739>
1902 Reviewed by Pratik Solanki.
1904 Call out to sqlite3 cache purging SPI on Cocoa platforms when
1905 we need to free up some extra memory.
1907 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1908 (WebCore::MemoryPressureHandler::platformReleaseMemory):
1910 2015-02-28 Simon Fraser <simon.fraser@apple.com>
1912 FrameView::layoutTimerFired() should update style if needed before doing layout
1913 https://bugs.webkit.org/show_bug.cgi?id=141688
1915 Reviewed by Andreas Kling.
1917 If the style recalc timer has been scheduled to fire after the layout timer,
1918 when the layout timer fires, we might as well just do the style recalc
1919 too. The call to updateStyleIfNeeded() will cancel the pending style
1922 This doesn't have much impact on the number of layouts (measured via PLT)
1923 but seems like a reasonable thing to do.
1925 * page/FrameView.cpp:
1926 (WebCore::FrameView::layoutTimerFired):
1928 2015-02-28 Simon Fraser <simon.fraser@apple.com>
1930 Fullscreen video layers are off by one sometimes
1931 https://bugs.webkit.org/show_bug.cgi?id=142122
1932 rdar://problem/19878821
1934 Reviewed by Eric Carlson.
1936 Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
1937 isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
1938 backends to use FloatSizes for natural size. Convert the video image drawing code
1939 paths to FloatSize, since naturalSize is used on the destination rect computation,
1940 and painting should be floating point anyway.
1942 Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.
1944 * html/HTMLVideoElement.cpp:
1945 (WebCore::HTMLVideoElement::videoWidth):
1946 (WebCore::HTMLVideoElement::videoHeight):
1947 (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
1948 * html/HTMLVideoElement.h:
1949 * html/canvas/CanvasRenderingContext2D.cpp:
1951 (WebCore::CanvasRenderingContext2D::drawImage):
1952 * html/canvas/WebGLRenderingContextBase.cpp:
1953 (WebCore::WebGLRenderingContextBase::videoFrameToImage):
1954 * platform/graphics/MediaPlayer.cpp:
1955 (WebCore::NullMediaPlayerPrivate::naturalSize):
1956 (WebCore::MediaPlayer::naturalSize):
1957 (WebCore::MediaPlayer::paint):
1958 (WebCore::MediaPlayer::paintCurrentFrameInContext):
1959 (WebCore::NullMediaPlayerPrivate::paint): Deleted.
1960 * platform/graphics/MediaPlayer.h:
1961 * platform/graphics/MediaPlayerPrivate.h:
1962 (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
1963 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1964 (WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
1965 (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
1966 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1967 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1968 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1969 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
1970 (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
1971 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
1972 (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
1973 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1974 (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
1975 (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1976 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1977 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1978 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
1979 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
1980 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
1981 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1982 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1983 (WebCore::MediaSourcePrivateAVFObjC::naturalSize):
1984 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1985 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1986 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1987 (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
1988 * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
1989 * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
1990 (WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
1991 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1992 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1993 (WebCore::MediaPlayerPrivateQTKit::naturalSize):
1994 (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
1995 (WebCore::MediaPlayerPrivateQTKit::paint):
1996 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1997 (WebCore::MockMediaPlayerMediaSource::naturalSize):
1998 (WebCore::MockMediaPlayerMediaSource::paint):
1999 * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2000 * rendering/RenderVideo.cpp:
2001 (WebCore::RenderVideo::calculateIntrinsicSize):
2002 (WebCore::RenderVideo::paintReplaced):
2004 2015-02-27 Hunseop Jeong <hs85.jeong@samsung.com>
2006 [EFL][GTK] Fix build break after r180790,180798
2007 https://bugs.webkit.org/show_bug.cgi?id=142127
2009 Reviewed by Gyuyoung Kim.
2011 * platform/graphics/cairo/PathCairo.cpp:
2012 (WebCore::Path::addEllipse):
2014 2015-02-27 Zalan Bujtas <zalan@apple.com>
2016 Subpixel-layout: width: max-content; property might cause unnecessary scrollbar.
2017 https://bugs.webkit.org/show_bug.cgi?id=142065
2019 Reviewed by Simon Fraser.
2021 We should not pixelsnap (ceil in this case) logical coordinates during layout.
2022 Should this cause content to be partially cut off, we need to
2023 find the broken piece in the computation logic.
2025 Covered by the unskipped test.
2027 * rendering/RootInlineBox.cpp:
2028 (WebCore::RootInlineBox::paddedLayoutOverflowRect):
2030 2015-02-27 Ryosuke Niwa <rniwa@webkit.org>
2032 Node::hasEditableStyle and isEditablePosition have too many options
2033 https://bugs.webkit.org/show_bug.cgi?id=142078
2035 Reviewed by Andreas Kling.
2037 Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
2038 new editing helper functions hasEditableStyle and isEditableNode for this purpose.
2040 Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
2041 newly extracted computeEditability in call sites that specify this option since isContentEditable
2042 is a public DOM API.
2044 No new tests since there should be no observable behavior changes.
2046 * accessibility/AXObjectCache.h: Removed the declaration of an undefined function.
2049 (WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.
2052 (WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
2053 (WebCore::Node::isContentRichlyEditable): Ditto.
2054 (WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
2055 a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
2056 style tree. Also returns tri-state Editability enum instead of returning a boolean based on
2057 the value of EditableLevel argument.
2058 (WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
2059 (WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
2060 (WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.
2062 * dom/Node.h: No longer includes EditingBoundary.h.
2063 (WebCore::Node::isContentEditable):
2064 (WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
2065 (WebCore::Node::hasRichlyEditableStyle): Ditto.
2067 * editing/ApplyStyleCommand.cpp:
2068 (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
2069 (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
2070 * editing/DeleteFromTextNodeCommand.cpp:
2071 (WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
2072 * editing/FrameSelection.cpp:
2073 (WebCore::CaretBase::invalidateCaretRect): Ditto.
2074 * editing/InsertNodeBeforeCommand.cpp:
2075 (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
2076 (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
2077 * editing/RemoveNodeCommand.cpp:
2078 (WebCore::RemoveNodeCommand::doApply): Ditto.
2080 * editing/VisibleSelection.cpp:
2081 (WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
2082 which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
2083 not possible prior to r180726 because isEditablePosition had to move out of tables.
2085 * editing/VisibleUnits.cpp:
2086 (WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
2087 (WebCore::nextLeafWithSameEditability): Ditto.
2088 (WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
2089 in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
2090 (WebCore::previousLinePosition):
2091 (WebCore::nextLinePosition):
2093 * editing/htmlediting.cpp:
2094 (WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
2095 (WebCore::isEditableToAccessibility): Moved from Node.
2096 (WebCore::computeEditability): Extracted from isEditablePosition.
2097 (WebCore::hasEditableStyle): Added.
2098 (WebCore::isEditableNode): Added.
2099 (WebCore::isEditablePosition): Now calls computeEditability.
2100 (WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
2101 (WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.
2103 * editing/htmlediting.h:
2105 2015-02-27 Chris Dumez <cdumez@apple.com>
2107 Make ActiveDOMObject::canSuspend() pure virtual
2108 https://bugs.webkit.org/show_bug.cgi?id=142096
2109 <rdar://problem/19923085>
2111 Reviewed by Andreas Kling.
2113 Make ActiveDOMObject::canSuspend() pure virtual so that people at least
2114 try to provide an implementation for it. The default implementation was
2115 returning false unconditionally and thus was preventing pages from
2116 entering the PageCache.
2118 2015-02-27 Commit Queue <commit-queue@webkit.org>
2120 Unreviewed, rolling out r180203 and r180210.
2121 https://bugs.webkit.org/show_bug.cgi?id=142116
2123 broke process suspension and tile map (Requested by thorton on
2126 Reverted changesets:
2128 "Adopt CAMachPort-as-layer-contents"
2129 https://bugs.webkit.org/show_bug.cgi?id=141687
2130 http://trac.webkit.org/changeset/180203
2132 "Fix the !USE(IOSURFACE) build"
2133 http://trac.webkit.org/changeset/180210
2135 2015-02-27 Sam Weinig <sam@webkit.org>
2137 Add WebKit2 SPI to create a DOM File object
2138 https://bugs.webkit.org/show_bug.cgi?id=142109
2140 Reviewed by Tim Horton.
2142 * WebCore.xcodeproj/project.pbxproj:
2143 Make <WebCore/File.h> (and associated files) available to WebKit2.
2145 2015-02-27 Myles C. Maxfield <mmaxfield@apple.com>
2147 [Subpixel] Subpixelize RenderListMarker
2148 https://bugs.webkit.org/show_bug.cgi?id=142093
2150 Reviewed by Zalan Bujtas.
2152 Use floats instead of ints.
2154 Test: fast/lists/rtl-marker.html
2156 * rendering/RenderListMarker.cpp:
2157 (WebCore::RenderListMarker::paint):
2158 (WebCore::RenderListMarker::updateContent):
2159 (WebCore::RenderListMarker::getRelativeMarkerRect):
2160 * rendering/RenderListMarker.h:
2162 2015-02-27 Timothy Horton <timothy_horton@apple.com>
2164 <attachment> should be selected immediately upon click, and be drag/copyable upon click
2165 https://bugs.webkit.org/show_bug.cgi?id=142114
2166 <rdar://problem/19982520>
2168 Reviewed by Enrica Casucci.
2172 Make attachment use 'user-select: all' to act as a single click-to-select unit.
2174 * html/HTMLAttachmentElement.cpp:
2175 (WebCore::HTMLAttachmentElement::setFocus): Deleted.
2176 * html/HTMLAttachmentElement.h:
2177 * rendering/RenderAttachment.cpp:
2178 (WebCore::RenderAttachment::isFocused): Deleted.
2179 (WebCore::RenderAttachment::focusChanged): Deleted.
2180 * rendering/RenderAttachment.h:
2181 * rendering/RenderThemeMac.mm:
2182 (WebCore::RenderThemeMac::paintAttachment):
2183 Remove focus-related code; instead of focusing the element upon click,
2184 we get a selection including just the <attachment>, and everything
2185 behaves much more consistently (copy works, drag works, etc.).
2187 2015-02-27 Myles C. Maxfield <mmaxfield@apple.com>
2189 [iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
2190 https://bugs.webkit.org/show_bug.cgi?id=141371
2192 Reviewed by David Kilzer.
2196 Covered by existing mathml tests.
2198 * rendering/mathml/RenderMathMLOperator.cpp:
2199 (WebCore::RenderMathMLOperator::boundsForGlyph):
2200 (WebCore::RenderMathMLOperator::advanceForGlyph):
2201 (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
2203 2015-02-27 Chris Dumez <cdumez@apple.com>
2205 Make SourceBuffer ActiveDOMObject suspendable
2206 https://bugs.webkit.org/show_bug.cgi?id=142108
2207 <rdar://problem/19923085>
2209 Reviewed by Jer Noble.
2211 Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
2212 MediaSource and does not have any pending events. This makes it more
2213 likely for pages using SourceBuffer objects to go into the PageCache.
2215 Test: fast/history/page-cache-removed-source-buffer.html
2217 * Modules/mediasource/SourceBuffer.cpp:
2218 (WebCore::SourceBuffer::canSuspend):
2219 * Modules/mediasource/SourceBuffer.h:
2221 2015-02-26 Sam Weinig <sam@webkit.org>
2223 Add support for canvas ellipse method
2224 https://bugs.webkit.org/show_bug.cgi?id=82791
2225 <rdar://problem/11159172>
2227 Reviewed by Dirk Schulze.
2229 Tests: fast/canvas/canvas-ellipse-360-winding.html
2230 fast/canvas/canvas-ellipse-circumference-fill.html
2231 fast/canvas/canvas-ellipse-circumference.html
2232 fast/canvas/canvas-ellipse-connecting-line.html
2233 fast/canvas/canvas-ellipse-negative-radius.html
2234 fast/canvas/canvas-ellipse-zero-lineto.html
2235 fast/canvas/canvas-ellipse.html
2237 * html/canvas/CanvasPathMethods.h:
2238 * html/canvas/CanvasPathMethods.cpp:
2239 (WebCore::CanvasPathMethods::lineTo):
2240 Convenience for passing a FloatPoint instead of two floats.
2242 (WebCore::normalizeAngles):
2243 Normalizes the angles as described in the HTML spec. Ensuring the startAngle
2244 is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
2245 from the start angle.
2247 (WebCore::CanvasPathMethods::arc):
2248 - Renames some of the parameters to be clearer.
2249 - Normalizes the angles for consistency with ellipse.
2250 - Moves hasInvertibleTransform() higher in the function for consistency.
2252 (WebCore::CanvasPathMethods::ellipse): Added.
2254 * html/canvas/CanvasRenderingContext2D.idl:
2255 * html/canvas/DOMPath.idl:
2258 * platform/graphics/Path.h:
2259 * platform/graphics/cg/PathCG.cpp:
2260 (WebCore::Path::addArc):
2261 Rename parameters for clarity and use a nullptr.
2263 (WebCore::Path::addEllipse):
2264 Added. Constructs an ellipse via a transformed arc.
2266 2015-02-27 Enrica Casucci <enrica@apple.com>
2268 Adding support for serializing HTMLAttachment elements.
2269 https://bugs.webkit.org/show_bug.cgi?id=142026
2271 Reviewed by Tim Horton.
2273 Test: editing/pasteboard/copy-paste-attachment.html
2275 Adding support to serialize the attachment element
2276 and properly handle it when converting a DOM range
2277 to NSAttributedString.
2279 * editing/cocoa/HTMLConverter.mm:
2280 (HTMLConverter::_processElement):
2281 * editing/markup.cpp:
2282 (WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
2283 for attachment element when serializating.
2284 (WebCore::StyledMarkupAccumulator::appendElement):
2285 (WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
2286 when creating the fragment.
2287 * html/HTMLAttachmentElement.cpp:
2288 (WebCore::HTMLAttachmentElement::file): Added const to file() to
2289 use it in appendCustonAttributes where the element is a const reference.
2290 * html/HTMLAttachmentElement.h:
2291 * html/HTMLAttributeNames.in:
2293 2015-02-27 Timothy Horton <timothy_horton@apple.com>
2295 <attachment> should have an inactive style (gray in background)
2296 https://bugs.webkit.org/show_bug.cgi?id=142103
2297 <rdar://problem/19982486>
2299 Reviewed by Dan Bernstein.
2301 * rendering/RenderThemeMac.mm:
2302 (WebCore::attachmentLabelInactiveBackgroundColor):
2303 (WebCore::attachmentLabelInactiveTextColor):
2304 (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
2305 (WebCore::RenderThemeMac::paintAttachmentLabel):
2306 Use a gray background and gray text when the selection containing the
2307 attachment isn't focused and active.
2309 2015-02-27 Brady Eidson <beidson@apple.com>
2311 Add a "block-cookies" rule to the user content filter.
2312 https://bugs.webkit.org/show_bug.cgi?id=142105
2314 Reviewed by Alex Christensen.
2316 Tests: http/tests/usercontentfilter/block-cookies-basic.html
2317 http/tests/usercontentfilter/block-cookies-send.html
2319 * contentextensions/ContentExtensionRule.h:
2321 * contentextensions/ContentExtensionsBackend.cpp:
2322 (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
2323 (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
2324 * contentextensions/ContentExtensionsBackend.h:
2326 * contentextensions/ContentExtensionsManager.cpp:
2327 (WebCore::ContentExtensions::ExtensionsManager::loadAction):
2329 * loader/cache/CachedResourceLoader.cpp:
2330 (WebCore::CachedResourceLoader::requestResource):
2332 * page/UserContentController.cpp:
2333 (WebCore::UserContentController::actionForURL):
2334 (WebCore::UserContentController::contentFilterBlocksURL): Deleted.
2335 * page/UserContentController.h:
2337 2015-02-27 Alex Christensen <achristensen@webkit.org>
2339 [WinCairo] Unreviewed build fix.
2341 * platform/graphics/BitmapImage.h:
2342 * platform/win/BitmapInfo.h:
2343 Added WEBCORE_EXPORT.
2345 2015-02-27 Timothy Horton <timothy_horton@apple.com>
2347 <attachment>'s label baseline should match that of the surrounding text
2348 https://bugs.webkit.org/show_bug.cgi?id=142099
2349 rdar://problem/19982495
2351 Reviewed by Dan Bernstein.
2353 * rendering/RenderAttachment.cpp:
2354 (WebCore::RenderAttachment::baselinePosition):
2355 * rendering/RenderAttachment.h:
2356 Override baselinePosition and retrieve it from RenderTheme.
2358 * rendering/RenderTheme.h:
2359 (WebCore::RenderTheme::attachmentBaseline):
2360 * rendering/RenderThemeMac.h:
2361 * rendering/RenderThemeMac.mm:
2362 (WebCore::AttachmentLayout::AttachmentLayout):
2363 (WebCore::RenderThemeMac::attachmentBaseline):
2364 Plumb the label baseline from AttachmentLayout to RenderAttachment.
2366 2015-02-27 Commit Queue <commit-queue@webkit.org>
2368 Unreviewed, rolling out r180752.
2369 https://bugs.webkit.org/show_bug.cgi?id=142098
2371 Causes 10 SVG test failures on Windows. (Requested by
2372 bfulgham_ on #webkit).
2376 "Cache glyph widths to GlyphPages"
2377 https://bugs.webkit.org/show_bug.cgi?id=142028
2378 http://trac.webkit.org/changeset/180752
2380 2015-02-27 David Kilzer <ddkilzer@apple.com>
2382 [iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>
2384 * platform/spi/ios/OpenGLESSPI.h: Define EAGL_IOSURFACE macro
2385 until header refactoring is completed.
2387 2015-02-27 Chris Dumez <cdumez@apple.com>
2389 MediaSource should be suspendable when closed
2390 https://bugs.webkit.org/show_bug.cgi?id=142089
2391 <rdar://problem/19923085>
2393 Reviewed by Jer Noble.
2395 Make MediaSource ActiveDOMObject suspendable when it is in closed state
2396 and it has no pending events. This increases the likelihood of pages
2397 using MediaSource to enter the PageCache.
2399 Tests: fast/history/page-cache-media-source-closed-2.html
2400 fast/history/page-cache-media-source-closed.html
2401 fast/history/page-cache-media-source-opened.html
2403 2015-02-27 Andreas Kling <akling@apple.com>
2405 Use NeverDestroyed for JS wrapper owners.
2406 <https://webkit.org/b/142090>
2408 Reviewed by Chris Dumez.
2410 Using NeverDestroyed puts these objects in BSS which is preferable
2411 since that prevents them from pinning down entire malloc pages forever.
2413 * bindings/scripts/CodeGeneratorJS.pm:
2414 (GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
2416 * bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.
2418 2015-02-27 Chris Dumez <cdumez@apple.com>
2420 Make IDBDatabase / IDBRequest suspendable
2421 https://bugs.webkit.org/show_bug.cgi?id=142076
2422 <rdar://problem/19923085>
2424 Reviewed by Andreas Kling.
2426 Make IDBDatabase / IDBRequest suspendable under certain conditions to
2427 make it more likely for pages using indexeddb to enter the PageCache.
2429 IDBDatabase is safely suspendable if the database is closed. IDBRequest
2430 is safely suspendable if the request no longer has any pending activity
2431 (i.e. state is DONE and success / failure handler was called). We may
2432 be able to do better later but this is the bare minimum for now.
2434 Tests: fast/history/page-cache-indexed-closed-db.html
2435 fast/history/page-cache-indexed-opened-db.html
2437 * Modules/indexeddb/IDBDatabase.cpp:
2438 (WebCore::IDBDatabase::IDBDatabase):
2439 (WebCore::IDBDatabase::closeConnection):
2440 (WebCore::IDBDatabase::enqueueEvent):
2441 (WebCore::IDBDatabase::canSuspend):
2442 * Modules/indexeddb/IDBDatabase.h:
2443 * Modules/indexeddb/IDBRequest.cpp:
2444 (WebCore::IDBRequest::canSuspend):
2445 * Modules/indexeddb/IDBRequest.h:
2447 2015-02-27 Chris Dumez <cdumez@apple.com>
2449 Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
2450 https://bugs.webkit.org/show_bug.cgi?id=142052
2452 Reviewed by Andreas Kling.
2454 Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
2455 DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
2456 returning false so pages using WebDatabase would never enter the PageCache anyway.
2458 This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
2459 return false when there are open databases. This check is now equivalent to the one
2460 that was in PageCache.
2462 An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
2463 to false so once a page opened a database, it will never be page-cacheable. This
2464 will be taken care of separately though.
2466 Test: fast/history/page-cache-webdatabase-opened-db.html
2468 * Modules/webdatabase/DatabaseContext.cpp:
2469 (WebCore::DatabaseContext::canSuspend):
2470 * Modules/webdatabase/DatabaseContext.h:
2471 * history/PageCache.cpp:
2472 (WebCore::logCanCacheFrameDecision):
2473 (WebCore::PageCache::canCachePageContainingThisFrame):
2474 * page/DiagnosticLoggingKeys.cpp:
2475 (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
2476 * page/DiagnosticLoggingKeys.h:
2478 2015-02-27 Alex Christensen <achristensen@webkit.org>
2480 Compile DFA to bytecode.
2481 https://bugs.webkit.org/show_bug.cgi?id=142031
2483 Reviewed by Benjamin Poulain.
2485 * WebCore.xcodeproj/project.pbxproj:
2486 * contentextensions/ContentExtensionsBackend.cpp:
2487 (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2488 (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2489 * contentextensions/ContentExtensionsBackend.h:
2490 * contentextensions/DFA.cpp:
2491 (WebCore::ContentExtensions::DFA::nextState): Deleted.
2492 (WebCore::ContentExtensions::DFA::actions): Deleted.
2493 * contentextensions/DFA.h:
2494 (WebCore::ContentExtensions::DFA::size):
2495 (WebCore::ContentExtensions::DFA::nodeAt):
2496 * contentextensions/DFABytecode.h: Added.
2497 (WebCore::ContentExtensions::instructionSizeWithArguments):
2498 * contentextensions/DFABytecodeCompiler.cpp: Added.
2499 (WebCore::ContentExtensions::append):
2500 (WebCore::ContentExtensions::set32Bits):
2501 (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
2502 (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
2503 (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
2504 (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
2505 (WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
2506 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2507 (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2508 * contentextensions/DFABytecodeCompiler.h: Added.
2509 (WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
2510 * contentextensions/DFABytecodeInterpreter.cpp: Added.
2511 (WebCore::ContentExtensions::getBits):
2512 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2513 * contentextensions/DFABytecodeInterpreter.h: Added.
2514 (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
2516 2015-02-27 Zalan Bujtas <zalan@apple.com>
2518 Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
2519 https://bugs.webkit.org/show_bug.cgi?id=138366
2521 Reviewed by Dave Hyatt.
2523 This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.
2525 In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
2526 When a child is being detached from the tree, it removes itself from this hashmap.
2527 We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
2528 However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
2529 is inside a flow too and continue the cleanup accordingly.
2531 Test: fast/regions/region-with-multicolumn-embedded-crash.html
2533 * rendering/RenderObject.cpp:
2534 (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
2536 2015-02-27 Brady Eidson <beidson@apple.com>
2538 Add API to remove a single content filter.
2539 <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
2541 Reviewed by Sam Weinig.
2543 * page/UserContentController.cpp:
2544 (WebCore::UserContentController::removeUserContentFilter):
2545 * page/UserContentController.h:
2547 2015-02-26 Brent Fulgham <bfulgham@apple.com>
2549 [Win] Remove remaining SafariTheme cruft
2550 https://bugs.webkit.org/show_bug.cgi?id=142075
2552 Reviewed by Anders Carlsson.
2554 Remove reference to SafariTheme-switching preference.
2556 Tested by existing layout tests.
2558 * WebCore.vcxproj/WebCore.vcxproj:
2559 * WebCore.vcxproj/WebCore.vcxproj.filters:
2561 * page/Settings.cpp:
2562 (WebCore::Settings::fontRenderingMode):
2563 (WebCore::Settings::setShouldPaintNativeControls): Deleted.
2565 (WebCore::Settings::shouldPaintNativeControls): Deleted.
2566 * platform/win/ScrollbarThemeWin.cpp:
2567 (WebCore::ScrollbarTheme::nativeTheme):
2568 * rendering/RenderThemeWin.cpp:
2569 (WebCore::RenderTheme::themeForPage):
2571 2015-02-27 Myles C. Maxfield <mmaxfield@apple.com>
2573 Add comment about CSS value name mangling
2577 * css/CSSParser.cpp:
2578 (WebCore::cssValueKeywordID):
2580 2015-02-27 Antti Koivisto <antti@apple.com>
2582 Cache glyph widths to GlyphPages
2583 https://bugs.webkit.org/show_bug.cgi?id=142028
2585 Reviewed by Andreas Kling.
2587 Currently we have a separate cache in Font for glyph widths. In practice we always need
2588 the widths so we can just cache them in GlyphPages. This simplifies the code and removes
2589 a per-character hash lookup from WidthIterator.
2591 * platform/graphics/Font.cpp:
2592 (WebCore::Font::Font):
2593 (WebCore::Font::initCharWidths):
2594 (WebCore::Font::platformGlyphInit):
2595 (WebCore::createAndFillGlyphPage):
2596 (WebCore::Font::computeWidthForGlyph):
2598 Rename to make it clear this doesn't cache.
2600 (WebCore::GlyphPage::setGlyphDataForIndex):
2602 Initialize the width.
2603 This could go to GlyphPage.cpp if we had one.
2605 * platform/graphics/Font.h:
2606 (WebCore::Font::glyphZeroWidth):
2607 (WebCore::Font::isZeroWidthSpaceGlyph):
2608 (WebCore::Font::zeroGlyph): Deleted.
2609 (WebCore::Font::setZeroGlyph): Deleted.
2610 (WebCore::Font::widthForGlyph): Deleted.
2611 * platform/graphics/FontCascade.cpp:
2612 (WebCore::offsetToMiddleOfGlyph):
2613 * platform/graphics/FontCascadeFonts.cpp:
2614 (WebCore::FontCascadeFonts::glyphDataForCharacter):
2615 * platform/graphics/GlyphPage.h:
2616 (WebCore::GlyphData::GlyphData):
2618 Return width too as part of GlyphData.
2620 (WebCore::GlyphPage::glyphDataForIndex):
2621 (WebCore::GlyphPage::setGlyphDataForCharacter):
2622 (WebCore::GlyphPage::setGlyphDataForIndex):
2623 (WebCore::GlyphPage::GlyphPage):
2624 * platform/graphics/WidthIterator.cpp:
2625 (WebCore::WidthIterator::advanceInternal):
2627 No need to lookup width separately now.
2629 * platform/graphics/mac/ComplexTextController.cpp:
2630 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2631 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2632 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2633 * rendering/mathml/RenderMathMLOperator.cpp:
2634 (WebCore::RenderMathMLOperator::advanceForGlyph):
2635 * rendering/svg/SVGTextRunRenderingContext.cpp:
2636 (WebCore::missingGlyphForFont):
2637 * svg/SVGFontData.cpp:
2638 (WebCore::SVGFontData::initializeFont):
2640 2015-02-26 Alexey Proskuryakov <ap@apple.com>
2642 iOS build fix after r180717.
2644 * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):
2646 2015-02-26 Ryosuke Niwa <rniwa@webkit.org>
2648 isEditablePosition and related functions shouldn't move position out of table
2649 https://bugs.webkit.org/show_bug.cgi?id=129200
2651 Reviewed by Darin Adler.
2653 This patch removes the legacy editing position for elements display: table in its computed style.
2654 Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
2655 such an element for historical reasons. This forced us to update the style tree before computing
2656 the editability of a position because we have to check the editability of the position outside
2657 the element with display: table if the position was using such a legacy editing position.
2658 e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
2659 should still be considered editable if the parent node of the table was editable.
2661 This patch replaces such a legacy editing position by using modern position types:
2662 PositionIsBeforeAnchor and PositionIsAfterAnchor.
2664 No new tests since there should be no change in the user perceived editing operations.
2667 (WebCore::Position::previous): Setup the node and the offset correctly when the original position's
2668 type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
2669 is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
2670 position inside a table.
2671 (WebCore::Position::next): Ditto.
2672 (WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
2674 (WebCore::Position::atEndOfTree): Ditto.
2675 (WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
2676 for an atomic element or a table element as done in the equivalent code in Position::upstream.
2677 (WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
2678 (table, 1) when there are more than two children of the table.
2680 * dom/PositionIterator.cpp:
2681 (WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
2682 positions. So convert it to a modern position by returning a position before or after a table here.
2683 * editing/ApplyBlockElementCommand.cpp:
2684 (WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
2685 is actually empty before executing the simple code path for an empty unsplittable element. Without
2686 this check, block formatting a table element will fail.
2688 * editing/htmlediting.cpp:
2689 (WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
2690 of a position before or after an element is determined by its parent, not the element itself.
2691 (WebCore::isAtUnsplittableElement): Ditto.
2692 (WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
2693 an element with display: table. This is the code removal for which this patch was made.
2694 (WebCore::editableRootForPosition): Ditto.
2696 2015-02-26 Timothy Horton <timothy_horton@apple.com>
2698 Implement <attachment> element appearance on Mac
2699 https://bugs.webkit.org/show_bug.cgi?id=142023
2701 Reviewed by Dean Jackson.
2703 * css/CSSParser.cpp:
2704 (WebCore::isValidKeywordPropertyAndValue):
2705 * css/CSSPrimitiveValueMappings.h:
2706 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2707 * css/CSSValueKeywords.in:
2710 * platform/ThemeTypes.h:
2711 Add a new -webkit-appearance value, attachment.
2713 * WebCore.xcodeproj/project.pbxproj:
2714 * html/HTMLAttachmentElement.cpp:
2715 (WebCore::HTMLAttachmentElement::setFile):
2716 Let the renderer know when the file changes (so it can relayout and repaint).
2718 (WebCore::HTMLAttachmentElement::filePath):
2719 (WebCore::HTMLAttachmentElement::fileName):
2720 * html/HTMLAttachmentElement.h:
2721 Handy acccessors for the full path and the name of the file.
2723 * platform/spi/mac/IconServicesSPI.h: Added.
2724 * platform/spi/mac/LaunchServicesSPI.h: Added.
2725 Add some IconServices and LaunchServices SPI headers.
2727 * rendering/RenderAttachment.cpp:
2728 (WebCore::RenderAttachment::RenderAttachment):
2729 Don't have a default intrinsic size; we'll adjust in layout().
2731 (WebCore::RenderAttachment::isSelected):
2732 (WebCore::RenderAttachment::isFocused):
2733 (WebCore::RenderAttachment::isSelectedOrFocused):
2734 Factor out from paintReplaced().
2736 (WebCore::RenderAttachment::layout):
2737 Use RenderTheme to compute the intrinsic size of this attachment.
2739 (WebCore::RenderAttachment::paintReplaced):
2740 Use RenderTheme to paint the attachment.
2742 (WebCore::RenderAttachment::representedFileChanged):
2743 When the represented file changes, we need to recompute the intrinsic size and repaint.
2745 * rendering/RenderTheme.cpp:
2746 (WebCore::RenderTheme::adjustStyle):
2747 (WebCore::RenderTheme::paint):
2748 (WebCore::RenderTheme::adjustAttachmentStyle):
2749 (WebCore::RenderTheme::paintAttachment):
2750 Plumb through the attachment appearance.
2752 * rendering/RenderAttachment.h:
2753 * rendering/RenderTheme.h:
2754 (WebCore::RenderTheme::paintAttachment):
2755 (WebCore::RenderTheme::attachmentIntrinsicSize):
2756 * rendering/RenderThemeMac.h:
2757 * rendering/RenderThemeMac.mm:
2758 (WebCore::attachmentIconBackgroundColor):
2759 (WebCore::attachmentIconBorderColor):
2760 (WebCore::AttachmentLayout):
2761 AttachmentLayout lays out the innards of the RenderThemeMac attachment
2762 presentation: an icon with an optional bordered background, with a label
2763 underneath it with an optional background.
2765 (WebCore::RenderThemeMac::attachmentIntrinsicSize):
2766 (WebCore::paintAttachmentIconBackground):
2767 (WebCore::paintAttachmentIcon):
2768 (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
2769 (WebCore::RenderThemeMac::paintAttachmentLabel):
2770 (WebCore::RenderThemeMac::paintAttachment):
2771 Paint the attachment element. Paint the optional backgrounds (and swap
2772 out the text color) if the element is selected/focused.
2774 2015-02-26 Doug Russell <d_russell@apple.com>
2776 AX: Expose caret browsing preference to accessibility API
2777 https://bugs.webkit.org/show_bug.cgi?id=141862
2779 Reviewed by Chris Fleizach.
2781 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).
2782 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.
2784 Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
2785 platform/mac/accessibility/caret-browsing-attribute.html
2786 platform/mac/accessibility/caret-browsing-tab-selection.html
2788 * accessibility/AccessibilityObject.h:
2789 * accessibility/mac/AccessibilityObjectMac.mm:
2790 (WebCore::AccessibilityObject::caretBrowsingEnabled):
2791 (WebCore::AccessibilityObject::setCaretBrowsingEnabled):
2792 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2793 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2794 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2795 (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2796 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
2797 (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):
2799 2015-02-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2801 Remove unnecessary create() factory functions
2802 https://bugs.webkit.org/show_bug.cgi?id=142039
2804 Reviewed by Chris Dumez.
2806 Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
2807 and DatabaseUnpauseTask::create.
2809 * Modules/webdatabase/DatabaseThread.cpp:
2810 (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
2811 (WebCore::DatabaseThread::setPaused):
2812 (WebCore::DatabaseUnpauseTask::create): Deleted.
2813 * bindings/js/JSCryptoKeySerializationJWK.h:
2814 * bindings/js/JSSubtleCryptoCustom.cpp:
2815 (WebCore::importKey):
2816 * html/HTMLMediaElement.cpp:
2817 (WebCore::HTMLMediaElement::HTMLMediaElement):
2818 * html/HTMLMediaSession.cpp:
2819 (WebCore::HTMLMediaSession::create): Deleted.
2820 * html/HTMLMediaSession.h:
2822 2015-02-26 Joseph Pecoraro <pecoraro@apple.com>
2824 Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
2825 https://bugs.webkit.org/show_bug.cgi?id=142061
2827 Reviewed by Timothy Hatcher.
2829 * inspector/CommandLineAPIModuleSource.js:
2830 Replace $1-$4 "inspected objects" with $1-$99 "saved results".
2832 * bindings/js/JSCommandLineAPIHostCustom.cpp:
2833 (WebCore::JSCommandLineAPIHost::inspectedObject):
2834 * inspector/CommandLineAPIHost.cpp:
2835 (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2836 (WebCore::CommandLineAPIHost::InspectableObject::get):
2837 (WebCore::CommandLineAPIHost::addInspectedObject):
2838 (WebCore::CommandLineAPIHost::inspectedObject):
2839 (WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
2840 * inspector/CommandLineAPIHost.h:
2841 * inspector/CommandLineAPIHost.idl:
2842 Since we now just save the single $0 inspected object, eliminate
2843 keeping track of a list of 5 values.
2845 2015-02-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2847 Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
2848 https://bugs.webkit.org/show_bug.cgi?id=141902
2850 Reviewed by Darin Adler.
2852 Create instance using std::make_unique<> in CDMFactory directly. To do that,
2853 CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.
2855 No new tests, no behavior changes.
2857 * Modules/encryptedmedia/CDM.cpp:
2858 (WebCore::installedCDMFactories):
2859 * Modules/encryptedmedia/CDM.h:
2860 * Modules/encryptedmedia/CDMPrivateClearKey.h:
2861 (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
2862 (WebCore::CDMPrivateClearKey::create): Deleted.
2863 * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
2864 (WebCore::CDMPrivateMediaPlayer::create): Deleted.
2866 (WebCore::Element::attributes):
2867 * dom/NamedNodeMap.h:
2868 (WebCore::NamedNodeMap::NamedNodeMap):
2869 (WebCore::NamedNodeMap::create): Deleted.
2870 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
2871 (WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.
2873 2015-02-26 Andy Estes <aestes@apple.com>
2875 [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
2876 https://bugs.webkit.org/show_bug.cgi?id=142062
2878 Reviewed by Daniel Bates.
2880 * WebCore.xcodeproj/project.pbxproj:
2881 * platform/mac/ContentFilterMac.mm:
2882 * platform/spi/cocoa/NEFilterSourceSPI.h: Added.
2883 * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
2885 2015-02-26 Anders Carlsson <andersca@apple.com>
2887 Add API to remove all website data for the given data records
2888 https://bugs.webkit.org/show_bug.cgi?id=142060
2890 Reviewed by Beth Dakin.
2892 * loader/cache/MemoryCache.cpp:
2893 (WebCore::MemoryCache::removeResourcesWithOrigins):
2894 New function that removes all resources that match the set of origins in a given session.
2896 2015-02-26 Chris Dumez <cdumez@apple.com>
2898 Rename DatabaseManager::manager() to DatabaseManager::singleton()
2899 https://bugs.webkit.org/show_bug.cgi?id=142054
2901 Reviewed by Ryosuke Niwa.
2903 Rename DatabaseManager::manager() to DatabaseManager::singleton() as
2904 per coding style and use WTF::NeverDestroyed.
2906 * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2907 (WebCore::DOMWindowWebDatabase::openDatabase):
2908 * Modules/webdatabase/DatabaseBackendBase.cpp:
2909 (WebCore::DatabaseBackendBase::DatabaseBackendBase):
2910 * Modules/webdatabase/DatabaseContext.cpp:
2911 (WebCore::DatabaseContext::DatabaseContext):
2912 (WebCore::DatabaseContext::~DatabaseContext):
2913 (WebCore::DatabaseContext::stopDatabases):
2914 (WebCore::DatabaseContext::databaseExceededQuota):
2915 * Modules/webdatabase/DatabaseManager.cpp:
2916 (WebCore::DatabaseManager::singleton):
2917 (WebCore::DatabaseManager::manager): Deleted.
2918 * Modules/webdatabase/DatabaseManager.h:
2919 (WebCore::DatabaseManager::~DatabaseManager): Deleted.
2920 * Modules/webdatabase/SQLTransactionClient.cpp:
2921 (WebCore::SQLTransactionClient::didExceedQuota):
2922 * history/PageCache.cpp:
2923 (WebCore::logCanCacheFrameDecision):
2924 (WebCore::PageCache::canCachePageContainingThisFrame):
2925 * loader/FrameLoader.cpp:
2926 (WebCore::FrameLoader::stopLoading):
2928 2015-02-26 Csaba Osztrogonác <ossy@webkit.org>
2930 Fix the !ENABLE(GEOLOCATION) build after r180533
2931 https://bugs.webkit.org/show_bug.cgi?id=142053
2933 Reviewed by Chris Dumez.
2935 * Modules/geolocation/GeoNotifier.cpp:
2936 * Modules/geolocation/GeoNotifier.h:
2938 2015-02-26 Dean Jackson <dino@apple.com>
2940 [iOS Media] incorrect front padding on time values
2941 https://bugs.webkit.org/show_bug.cgi?id=142027
2942 <rdar://problem/19960790>
2944 Reviewed by Brent Fulgham.
2946 My last commit was updating the OS X file,
2949 We don't want to prefix times with a "0".
2951 * Modules/mediacontrols/mediaControlsApple.js:
2952 (Controller.prototype.formatTime):
2953 * Modules/mediacontrols/mediaControlsiOS.js:
2954 (ControllerIOS.prototype.formatTime):
2956 2015-02-26 Mark Lam <mark.lam@apple.com>
2958 Rolling out r180602, r180608, r180613, r180617, r180671.
2959 <https://webkit.org/b/141990>
2963 The r180602 solution does result in more work for GC when worker
2964 threads are in use. Filip is uncomfortable with that.
2965 The EFL and GTK ports also seem to be unhappy with this change.
2966 Rolling out while we investigate.
2968 * bindings/js/JSDOMWindowBase.cpp:
2969 (WebCore::JSDOMWindowBase::commonVM):
2971 2015-02-26 Myles C. Maxfield <mmaxfield@apple.com>
2973 [Mac] [iOS] Parsing support for -apple-trailing-word
2974 https://bugs.webkit.org/show_bug.cgi?id=141939
2976 Reviewed by Andreas Kling.
2978 This patch implements initial parsing support for the -apple-trailing-word CSS property.
2979 This property has two possible (mutually exclusive) values: auto and
2980 -apple-partially-balanced. This property is inherited.
2982 The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
2984 This is an internal property that will allow us to control line breaking behavior for
2987 Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
2988 the new value must be implemented as -webkit-partially-balanced. Using the -apple-
2989 prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
2992 Test: platform/mac/fast/text/trailing-word-parse.html
2994 * Configurations/FeatureDefines.xcconfig:
2995 * css/CSSComputedStyleDeclaration.cpp:
2996 (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
2998 * css/CSSParser.cpp:
2999 (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
3001 (WebCore::isKeywordPropertyID): New property is a keyword property.
3002 (WebCore::CSSParser::parseValue): Use the keyword property codepath.
3003 * css/CSSPrimitiveValueMappings.h:
3004 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
3005 representation and CSS values.
3006 (WebCore::CSSPrimitiveValue::operator TrailingWord):
3007 * css/CSSPropertyNames.in: New property.
3008 * css/CSSValueKeywords.in: New value.
3009 * rendering/SimpleLineLayout.cpp:
3010 (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
3011 * rendering/style/RenderStyle.h: Getter, setter and initial value.
3012 * rendering/style/RenderStyleConstants.h: Internal data type.
3013 * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
3014 * rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.
3016 2015-02-26 Roger Fong <roger_fong@apple.com>
3018 Unreviewed. Fix a accidental deletion from r178674.
3020 * html/canvas/WebGLRenderingContextBase.cpp:
3021 (WebCore::WebGLRenderingContextBase::create):
3022 Return the fake WebGL context.
3024 2015-02-26 Said Abou-Hallawa <sabouhallawa@apple.com>
3026 Cleanup RenderSVGResourceClipper class.
3027 https://bugs.webkit.org/show_bug.cgi?id=142032.
3029 Reviewed by Darin Adler.
3031 This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
3032 It includes cleanup for RenderSVGResourceClipper class.
3034 * rendering/svg/RenderSVGResourceClipper.cpp:
3035 (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3036 (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
3037 * rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
3038 typedef instead of a class and rename it to ClipperMaskImage. The purpose
3039 of having it a class even though it includes only one member was because
3040 we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
3041 as a separate object on the heap anymore.
3043 (WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
3044 double hash table lookups by calling HashMap::contains() and then HashMap::get(),
3045 we can use HashMap::add() instead.
3047 2015-02-26 Said Abou-Hallawa <sabouhallawa@apple.com>
3049 Setting any of the <object> element plugin controlling attributes does not have any affect.
3050 https://bugs.webkit.org/show_bug.cgi?id=141936.
3052 Reviewed by Zalan Bujtas.
3054 When setting any of the <object> element plugin controlling attributes
3055 dynamically we need to mark the the element to be dirty by calling
3056 setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
3058 Test: svg/as-object/svg-in-object-dynamic-attribute-change.html
3060 * dom/Element.h: Delete unimplemented function.
3062 * html/HTMLObjectElement.cpp:
3063 (WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
3064 setNeedsStyleRecalc() when one of the plugin controlling attributes gets
3065 changed. We have to clear the m_useFallbackContent because the attribute's
3066 new value might fix the object rendering.
3068 * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
3070 * html/HTMLPlugInImageElement.cpp:
3071 (WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to
3072 reconstruct the object renderer in the image case. This can happen if the
3073 image was rendering fallback content and the attribute's new value fixes
3074 the object rendering.
3076 2015-02-26 Brent Fulgham <bfulgham@apple.com>
3078 [Win] Make build logs more legible by reducing noise
3079 https://bugs.webkit.org/show_bug.cgi?id=142034
3081 Reviewed by Alexey Proskuryakov.
3083 Modify batch files, makefiles, and DOS commands to remove
3084 uninteresting/unhelpful output.
3086 * WebCore.vcxproj/WebCoreGenerated.make:
3087 * WebCore.vcxproj/WebCorePreBuild.cmd:
3088 * WebCore.vcxproj/copyForwardingHeaders.cmd:
3089 * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
3091 2015-02-26 Michael Catanzaro <mcatanzaro@igalia.com>
3093 [FreeType] REGRESSION(r180563): Introduced crashes
3094 https://bugs.webkit.org/show_bug.cgi?id=142044
3096 Reviewed by Martin Robinson.
3098 No new tests, should be caught by any woff font test.
3100 Use optionsPattern, not m_pattern, when m_pattern may be null.
3102 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3103 (WebCore::FontPlatformData::initializeWithFontFace):
3105 2015-02-26 Sergio Villar Senin <svillar@igalia.com>
3107 ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
3108 https://bugs.webkit.org/show_bug.cgi?id=141645
3110 Reviewed by Chris Dumez.
3112 This bug has been here since r110484 but was uncovered by
3113 r180140. The problem r110484 was trying to fix was that
3114 CSSPrimitiveValue::convertToLength<Length> ended up calling
3115 CSSPrimitiveValue::computeLengthDouble() which was apparently
3116 dereferencing conversionData.style() and
3117 conversionData.rootStyle() pointers without checking them. That's
3118 why that fix added this condition to convertToLength():
3120 isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())
3122 which is not correct, because for the 4 possible font relative
3123 length types, 3 of them just use the style() pointer and the other
3124 one just uses rootStyle() which BTW could be NULL. This erroneous
3125 condition makes that function to return Length(Undefined) more
3126 often than it should.
3128 From now on it only returns Length(Undefined) if the style()
3129 pointer is NULL and the font relative length type is one in the
3130 set (CSS_EMS, CSS_EXS, CSS_CHS);
3132 Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html
3134 * css/CSSPrimitiveValue.h:
3135 * css/CSSPrimitiveValueMappings.h:
3136 (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
3137 (WebCore::CSSPrimitiveValue::convertToLength):
3140 2015-02-26 Andreas Kling <akling@apple.com>
3142 [Cocoa] Prod libcache to drop caches in memory pressure relief handler.
3143 <https://webkit.org/b/142024>
3144 <rdar://problem/19966096>
3146 Reviewed by Antti Koivisto.
3148 libcache already listens to the OS memory pressure notifications, but we still
3149 need to manually request a cleanup when doing an iOS process suspension, or when
3150 simulating memory pressure.
3152 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3153 (WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
3154 cache_simulate_memory_warning_event() to make sure that nonessential objects
3155 being kept alive by NSCaches get dropped when we need the memory.
3157 2015-02-25 Zalan Bujtas <zalan@apple.com>
3159 Black line across screen on Adobe Illustrator detail page (non-retina only)
3160 https://bugs.webkit.org/show_bug.cgi?id=141866
3162 Reviewed by Simon Fraser.
3164 Phase is relative to the destination origin. We need to take location information into account
3165 while snapping so that the result is inline with the snapped destination rect.
3166 (location affects the snapped size.)
3168 Test: fast/backgrounds/gradient-background-on-subpixel-position.html
3170 * rendering/RenderBoxModelObject.cpp:
3171 (WebCore::pixelSnapBackgroundImageGeometryForPainting):
3172 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3174 2015-02-25 Brent Fulgham <bfulgham@apple.com>
3176 [Win] Use WEBCORE_EXPORT instead of Definition file
3177 https://bugs.webkit.org/show_bug.cgi?id=141734
3179 Reviewed by Alex Christensen.
3181 No change in functionality.
3183 * WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
3184 settings on certain files.
3185 * WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
3187 * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
3188 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
3189 * WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
3190 * WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
3191 * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
3192 * WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
3193 * WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
3194 * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
3195 * WebCorePrefix.h: Provide proper export definitions for Windows.
3196 * bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
3197 needed by the new export style.
3198 * bindings/js/JSDOMWindowBase.h: Export class since DRT needs
3199 access to parts of it.
3200 * bindings/js/ScriptCachedFrameData.cpp: Add missing #include
3201 needed by the new export style.
3202 * bindings/scripts/CodeGeneratorJS.pm: Use different export macro
3203 when generating WebCoreTestSupport files, so that we don't confuse
3204 the linker when WebCore.lib and WebCoreTestSupport.lib try to
3205 both export WEBCORE_EXPORT symbols.
3206 (ExportLabelForClass):
3208 * bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
3210 * css/CSSParser.cpp: Ditto.
3211 * dom/Document.cpp: Ditto.
3212 * html/HTMLImageLoader.cpp: Ditto.
3213 * inspector/CommandLineAPIModule.cpp: Ditto.
3214 * inspector/PageDebuggerAgent.cpp: Ditto.
3215 * inspector/PageRuntimeAgent.cpp: Ditto.
3216 * inspector/WorkerRuntimeAgent.cpp: Ditto.
3217 * page/DOMWindow.cpp: Ditto.
3218 * page/DOMWindow.h: Export the destructor, as it is needed by
3219 DumpRenderTree (on Windows).
3220 * page/Page.cpp: Add missing #include needed by the new export style.
3221 * platform/Logging.h: Remove conflicting export declaration.
3222 * platform/PlatformExportMacros.h: Update for Windows use.
3223 * testing/Internals.cpp: Add missing #include needed by the new export style.
3224 * testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
3225 are supposed to be exported by WebCoreTestSupport, not WebCore.
3226 * testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
3228 * testing/js/WebCoreTestSupportPrefix.cpp: Added.
3229 * testing/js/WebCoreTestSupportPrefix.h: Added.
3230 * xml/XMLHttpRequest.h: Export the destructor.
3231 * xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
3233 * xml/XSLTProcessorLibxslt.cpp: Ditto.
3235 2015-02-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3237 Remove unnecessary DatabaseFooTask::create
3238 https://bugs.webkit.org/show_bug.cgi?id=142002
3240 Reviewed by Darin Adler.
3242 DatabaseFooTask::create can be replaced with std::make_unique<>.
3244 No new tests, no behavior changes.
3246 * Modules/webdatabase/Database.cpp:
3247 (WebCore::Database::scheduleTransaction):
3248 (WebCore::Database::scheduleTransactionStep):
3249 (WebCore::Database::markAsDeletedAndClose):
3250 (WebCore::Database::closeImmediately):
3251 (WebCore::Database::tableNames):
3252 * Modules/webdatabase/DatabaseTask.h:
3253 (WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
3254 (WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
3255 (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.
3257 2015-02-25 Dean Jackson <dino@apple.com>
3259 [iOS Media] incorrect front padding on time values
3260 https://bugs.webkit.org/show_bug.cgi?id=142027
3261 <rdar://problem/19960790>
3263 Reviewed by Brent Fulgham.
3265 We don't want to prefix times with a "0".
3267 * Modules/mediacontrols/mediaControlsApple.js:
3268 (Controller.prototype.formatTime):
3270 2015-02-25 Chris Dumez <cdumez@apple.com>
3272 Make PublicURLManager suspendable
3273 https://bugs.webkit.org/show_bug.cgi?id=141977
3274 <rdar://problem/19923085>
3276 Reviewed by Andreas Kling.
3278 Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
3279 and returning true. Nothing prevents suspending the PublicURLManager as its
3280 implementation never causes JS to be executed. No implementation for
3281 suspend() / resume() needs to be provided for the same reason.
3283 The fact that PublicURLManager wasn't suspendable was preventing pages using
3284 URL.createObjectURL() from entering the PageCache. Baidu.com search results
3285 pages are using the API for example.
3287 Test: fast/history/page-cache-createObjectURL.html
3289 * html/PublicURLManager.cpp:
3290 (WebCore::PublicURLManager::canSuspend):
3291 * html/PublicURLManager.h:
3293 2015-02-25 Zalan Bujtas <zalan@apple.com>
3295 Cleanup BackgroundImageGeometry class.
3296 https://bugs.webkit.org/show_bug.cgi?id=141997
3298 Reviewed by Simon Fraser.
3300 This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
3301 removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
3302 becomes a read only class (with the exception of the clip() method).
3304 No change in functionality.
3306 * rendering/RenderBoxModelObject.cpp:
3307 (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
3308 (WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
3309 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3310 (WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
3311 (WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
3312 (WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
3313 (WebCore::BackgroundImageGeometry::clip): Deleted.
3314 (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
3315 * rendering/RenderBoxModelObject.h:
3316 (WebCore::BackgroundImageGeometry::clip):
3317 (WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
3318 (WebCore::BackgroundImageGeometry::setDestRect): Deleted.
3319 (WebCore::BackgroundImageGeometry::setPhase): Deleted.
3320 (WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
3321 (WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
3322 (WebCore::BackgroundImageGeometry::setTileSize): Deleted.
3323 (WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
3324 (WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
3326 2015-02-25 Said Abou-Hallawa <sabouhallawa@apple.com>
3328 Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
3329 https://bugs.webkit.org/show_bug.cgi?id=141776.
3331 Reviewed by Dean Jackson.
3333 Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
3334 svg/clip-path/clip-path-line-use-before-defined.svg
3336 * rendering/svg/RenderSVGResourceClipper.cpp:
3337 (WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
3338 is added to m_clipper if it does not exist. The same renderer might have been
3339 added to m_clipper in resourceBoundingBox().
3341 (WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
3342 m_clipper if it does not exist. Return the associated ClipperData.
3344 (WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
3345 referenced before it is defined, add the renderer to m_clipper. While doing the
3346 layout() for the clipper, we can check if m_clipper has values or not. If it does
3347 have, we are going to mark the clipper for client invalidation which is done by
3350 * rendering/svg/RenderSVGResourceClipper.h:
3351 * rendering/svg/RenderSVGResourceContainer.h:
3352 (WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a
3353 new function selfNeedsClientInvalidation() which controls marking the clipper
3354 for client invalidation. In RenderSVGResourceClipper, override it so it checks
3355 m_clipper to force clients validation even if it the first time we do layout
3358 * rendering/svg/RenderSVGResourceContainer.cpp:
3359 (WebCore::RenderSVGResourceContainer::layout): Call the virtual function
3360 selfNeedsClientInvalidation() to check whether we need to mark the clipper for
3361 client invalidation.
3363 * svg/SVGElement.cpp: Delete unneeded header file.
3365 2015-02-25 peavo@outlook.com <peavo@outlook.com>
3367 [WinCairo] WinLauncher is not starting on Vista.
3368 https://bugs.webkit.org/show_bug.cgi?id=141905
3370 Reviewed by Alex Christensen.
3372 We have to soft link with Media Foundation functions to be able
3373 to start on Vista and WinXP.
3375 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: