[iOS] Max canvas size is lower than expected
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-22  Dean Jackson  <dino@apple.com>
2
3         [iOS] Max canvas size is lower than expected
4         https://bugs.webkit.org/show_bug.cgi?id=141886
5         <rdar://problem/19729246>
6
7         Reviewed by Tim Horton.
8
9         Use the same maximum canvas area for all ports,
10         which bumps the iOS limit up from 4580 * 1145
11         to 16k * 16k.
12
13         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
14
15 2015-02-23  Chris Dumez  <cdumez@apple.com>
16
17         Add support for diagnostic logging messages sampling
18         https://bugs.webkit.org/show_bug.cgi?id=141823
19         <rdar://problem/19899030>
20
21         Reviewed by Andreas Kling.
22
23         Add support for diagnostic logging messages sampling to decrease the
24         impact of diagnostic logging on CPU usage, while still getting useful
25         overall results. This patch adds a ShouldSample argument to
26         logDiagnosticMessage*() functions and logs 5% of the messages when
27         sampling. Sampling is turned on for keys that are known to be verbose
28         (e.g. per resource load logging).
29
30         On the page load test I am tracking, CPU usage caused by diagnostic
31         logging went down to 0.3% of UIProcess from 2.8% with this change.
32
33         * history/PageCache.cpp:
34         (WebCore::logPageCacheFailureDiagnosticMessage):
35         (WebCore::logCanCachePageDecision):
36         * html/HTMLMediaElement.cpp:
37         (WebCore::HTMLMediaElement::parseAttribute):
38         * loader/EmptyClients.h:
39         * loader/FrameLoader.cpp:
40         (WebCore::logNavigation):
41         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
42         * loader/ResourceLoader.cpp:
43         (WebCore::logResourceResponseSource):
44         * loader/SubframeLoader.cpp:
45         (WebCore::logPluginRequest):
46         * loader/SubresourceLoader.cpp:
47         (WebCore::SubresourceLoader::willSendRequest):
48         (WebCore::SubresourceLoader::didReceiveResponse):
49         (WebCore::logResourceLoaded):
50         * loader/cache/CachedResource.cpp:
51         (WebCore::logResourceRevalidationReason):
52         * loader/cache/CachedResourceLoader.cpp:
53         (WebCore::logMemoryCacheResourceRequest):
54         * page/DiagnosticLoggingClient.h:
55
56 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
57
58         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
59         https://bugs.webkit.org/show_bug.cgi?id=141729.
60
61         Reviewed by Simon Fraser.
62
63         When drawing an SVG image and the drawing context is set to be transparent,
64         make sure this transparency is applied to the compositing layer.
65
66         Test: svg/canvas/canvas-global-alpha-svg.html
67
68         * platform/graphics/GraphicsContext.cpp:
69         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
70         function and sets 'm_state.alpha' to the input value.
71
72         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
73         returns the value of the global alpha.
74         
75         * platform/graphics/GraphicsContext.h:
76         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
77         'alpha' to the context state since the getter function CGContextGetAlpha
78         is defined only in a private header file. Also move single line functions
79         from the source file to the header file.
80     
81         * platform/graphics/cairo/GraphicsContextCairo.cpp:
82         (WebCore::GraphicsContext::setPlatformAlpha):
83         (WebCore::GraphicsContext::setAlpha): Deleted.
84         * platform/graphics/cg/GraphicsContextCG.cpp:
85         (WebCore::GraphicsContext::setPlatformAlpha):
86         (WebCore::GraphicsContext::setAlpha): Deleted.
87         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
88         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
89         setPlatformAlpha().
90     
91         * svg/graphics/SVGImage.cpp:
92         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
93         global alpha value to the compositing layer.
94         
95 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
96
97         Occasional crash in MediaPlayer::setPrivateBrowsingMode
98         https://bugs.webkit.org/show_bug.cgi?id=141910
99
100         Reviewed by Jer Noble.
101
102         No new tests, I was unable to reproduce the crash.
103
104         * html/HTMLMediaElement.cpp:
105         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
106         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
107             to NULL.
108         * html/HTMLMediaElement.h: Define EveryDelayedAction.
109
110 2015-02-23  Philippe Normand  <pnormand@igalia.com>
111
112         [GStreamer] Redundant track language notifications
113         https://bugs.webkit.org/show_bug.cgi?id=141908
114
115         Reviewed by Žan Doberšek.
116
117         Invoke languageChanged only if the language code actually
118         changed.
119
120         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
121         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
122
123 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
124
125         [WinCairo] Crash when media player is destroyed.
126         https://bugs.webkit.org/show_bug.cgi?id=141248
127
128         Reviewed by Darin Adler.
129
130         A COM smart pointer is both released, and set to null.
131         This means that the COM Release method is called twice, causing a crash.
132
133         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
134         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
135
136 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
137
138         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
139         https://bugs.webkit.org/show_bug.cgi?id=141899
140
141         Reviewed by Sergio Villar Senin.
142
143         There was a FIXME about not re-resolving positions if the grid is grown during
144         auto-placement. But as the spec has changed [1] and you can only refer to the
145         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
146         we can get rid of this FIXME as it's not a causing a problem anymore.
147
148         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
149
150         No new tests (no change in behavior).
151
152         * rendering/RenderGrid.cpp:
153         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
154
155 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
156
157         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
158         https://bugs.webkit.org/show_bug.cgi?id=137877
159
160         Reviewed by Sam Weinig.
161
162         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
163         change OwnPtr with std::unique_ptr<>|make_unique<>.
164
165         No new tests, no behavior changes.
166
167         * page/scrolling/AsyncScrollingCoordinator.h:
168         * page/scrolling/ScrollingStateFixedNode.cpp:
169         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
170         * page/scrolling/ScrollingStateNode.cpp:
171         (WebCore::ScrollingStateNode::appendChild):
172         * page/scrolling/ScrollingStateNode.h:
173         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
174         * page/scrolling/ScrollingStateScrollingNode.cpp:
175         * page/scrolling/ScrollingStateStickyNode.cpp:
176         * page/scrolling/ScrollingTree.h:
177         * page/scrolling/ScrollingTreeNode.cpp:
178         (WebCore::ScrollingTreeNode::appendChild):
179         * page/scrolling/ScrollingTreeNode.h:
180         * page/scrolling/ScrollingTreeScrollingNode.h:
181
182 2015-02-22  Dean Jackson  <dino@apple.com>
183
184         Print a console warning when HTMLCanvasElement exceeds the maximum size
185         https://bugs.webkit.org/show_bug.cgi?id=141861
186         <rdar://problem/19729145>
187
188         Reviewed by Simon Fraser.
189
190         Add a warning if we ever try to create a canvas that is
191         too big.
192
193         No test because:
194         1. We can't ref-test against console messages.
195         2. The output is platform specific.
196
197         * html/HTMLCanvasElement.cpp:
198         (WebCore::HTMLCanvasElement::createImageBuffer):
199
200 2015-02-21  Sam Weinig  <sam@webkit.org>
201
202         Convert the caps lock indicator to be implemented using the shadow DOM
203         https://bugs.webkit.org/show_bug.cgi?id=141868
204
205         Reviewed by Dan Bernstein.
206
207         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
208           in r74099 to work around a site bug, that should not be a problem anymore.
209         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
210           than a paint time effect. This gives the proper overflow behavior (it now clips) and
211           behaves correctly in RTL.
212
213         * css/CSSParser.cpp:
214         (WebCore::isValidKeywordPropertyAndValue):
215         Make 'caps-lock-indicator' a valid -webkit-appearance value.
216
217         * css/CSSValueKeywords.in:
218         Remove comment that indicated that caps-lock-indicator was not a valid
219         -webkit-appearance value.
220
221         * css/html.css:
222         (input::-webkit-caps-lock-indicator):
223         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
224         trick employed here is to use a content: image to both implement the painting of
225         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
226
227         * html/HTMLInputElement.cpp:
228         (WebCore::HTMLInputElement::capsLockIndicatorElement):
229         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
230         * html/HTMLInputElement.h:
231         * html/InputType.cpp:
232         (WebCore::InputType::capsLockStateMayHaveChanged):
233         * html/InputType.h:
234         (WebCore::InputType::capsLockIndicatorElement):
235         Pipe notification of changes in the caps locks state to the <input> element
236         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
237         lock indicator element in the shadow DOM.
238
239         * html/TextFieldInputType.cpp:
240         (WebCore::TextFieldInputType::forwardEvent):
241         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
242         (WebCore::TextFieldInputType::createShadowSubtree):
243         (WebCore::TextFieldInputType::capsLockIndicatorElement):
244         (WebCore::TextFieldInputType::destroyShadowSubtree):
245         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
246         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
247         * html/TextFieldInputType.h:
248         Add a new element to the text field shadow DOM to act as the caps lock indicator.
249         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
250         from CSS. The element is always in the DOM for a password field. It toggles between
251         display: none and display: block depending on the state of the caps lock key.
252
253         * page/EventHandler.cpp:
254         (WebCore::EventHandler::capsLockStateMayHaveChanged):
255         Pipe notification of changes in the caps locks state to the <input> element
256         rather than the RenderTextControlSingleLine.
257
258         * rendering/RenderTextControlSingleLine.cpp:
259         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
260         (WebCore::RenderTextControlSingleLine::paint): Deleted.
261         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
262         * rendering/RenderTextControlSingleLine.h:
263         Remove logic for drawing the caps lock indicator.
264
265         * rendering/RenderTheme.cpp:
266         (WebCore::RenderTheme::adjustStyle):
267         (WebCore::RenderTheme::paint):
268         (WebCore::RenderTheme::paintMeter):
269         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
270         (WebCore::RenderTheme::paintCapsLockIndicator):
271         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
272         * rendering/RenderTheme.h:
273         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
274         * rendering/RenderThemeIOS.h:
275         * rendering/RenderThemeIOS.mm:
276         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
277         * rendering/RenderThemeMac.h:
278         * rendering/RenderThemeMac.mm:
279         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
280         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
281         Now that the caps lock indicator is implemented like other aspects of form controls,
282         the theme code can be converted to be similar as well.
283
284 2015-02-21  David Kilzer  <ddkilzer@apple.com>
285
286         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
287         <http://webkit.org/b/141816>
288
289         Attempt to fix the following build failure:
290
291             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
292             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
293             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
294             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
295             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
296             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
297             <scratch space>:58:1: note: expanded from here
298             CoreMediaLibrary
299             ^~~~~~~~~~~~~~~~
300             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
301             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
302             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
303             ^
304             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
305             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
306             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
307             <scratch space>:42:1: note: expanded from here
308             CoreMediaLibrary
309             ^
310             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
311             SOFT_LINK_FRAMEWORK(CoreMedia)
312             ^
313             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
314             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
315             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
316             <scratch space>:51:1: note: expanded from here
317             CoreMediaLibrary
318             ^
319
320         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
321         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
322         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
323         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
324
325 2015-02-21  David Kilzer  <ddkilzer@apple.com>
326
327         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
328         <http://webkit.org/b/141816>
329
330         Reviewed by Alexey Proskuryakov.
331
332         * WebCore.vcxproj/WebCore.vcxproj:
333         * WebCore.vcxproj/WebCore.vcxproj.filters:
334         - Remove CoreMediaSoftLinking.h.
335
336         * platform/cf/CoreMediaSoftLink.cpp:
337         - Add kCMTimeZero constant.
338         * platform/cf/CoreMediaSoftLink.h:
339         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
340         - Add kCMTimeZero constant.
341
342         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
343
344         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
345         - Remove reference to CoreMediaSoftLinking.h and update comment.
346         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
347         - Switch to using new method to check if a framework is
348           available.
349
350         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
351         - Remove all local soft-linking macros for CoreMedia.
352           CoreMediaSoftLink.h handles everything now.
353         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
354         - Switch to using new method to check if a framework is
355           available.
356
357         * platform/mac/SoftLinking.h:
358         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
359         is_Name_FrameworkAvailable() macro.
360         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
361         optional framework checks without a separate macro.
362         (SOFT_LINK_CONSTANT_HEADER): Add.
363         (SOFT_LINK_CONSTANT_SOURCE): Add.
364         - Support soft-links to constants.
365
366         * platform/win/SoftLinking.h:
367         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
368         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
369         non-static function.
370         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
371         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
372         SOFT_LINK_DEBUG_LIBRARY.
373         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
374         is_Name_FrameworkAvailable() macro.
375         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
376         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
377         (SOFT_LINK_CONSTANT_HEADER): Add.
378         (SOFT_LINK_CONSTANT_SOURCE): Add.
379         - Support soft-links to constants.
380
381 2015-02-20  David Kilzer  <ddkilzer@apple.com>
382
383         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
384         <http://webkit.org/b/141849>
385
386         Reviewed by Brent Fulgham.
387
388         This patch does the following:
389         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
390           macros for reuse in other projects.
391         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
392           141816.
393         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
394           and includes framework name in generated function names.  This
395           adds more entropy to the names in case there are two functions
396           with the same name in different frameworks.
397
398         * platform/cf/CoreMediaSoftLink.cpp:
399         - Add FIXME about USE(COREMEDIA).
400         - Switch from SOFT_LINK_FRAMEWORK() to
401           SOFT_LINK_FRAMEWORK_SOURCE().
402         * platform/cf/CoreMediaSoftLink.h:
403         - Add FIXME about USE(COREMEDIA).
404         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
405           macros.
406
407         * platform/mac/SoftLinking.h:
408         - Add missing header guards.
409         - Add pragmas for different macro groups.
410         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
411         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
412         (SOFT_LINK_FUNCTION_SOURCE): Move.
413         - Add framework name to generated function names.
414         - Incorporates namespace so that it doesn't have to be listed in
415           the *SoftLink.{cpp,h} file.
416
417         * platform/win/SoftLinking.h:
418         - Add pragmas for different macro groups.
419         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
420         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
421         (SOFT_LINK_FUNCTION_SOURCE): Move.
422         - Add framework name to generated function names.
423         - Incorporates namespace so that it doesn't have to be listed in
424           the *SoftLink.{cpp,h} file.
425
426 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
427
428         [Gtk] Unreviewed build fix.
429
430         * platform/ScrollAnimatorNone.cpp:
431         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
432         uses of ScrollableArea.
433
434 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
435
436         Scrollbars and ScrollAnimators must always have a ScrollableArea
437         https://bugs.webkit.org/show_bug.cgi?id=141855
438
439         Reviewed by Simon Fraser.
440
441         No change in functionality.
442         
443         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
444         a number of unnecessary nullptr checks.
445
446         * accessibility/AccessibilityScrollbar.cpp:
447         (WebCore::AccessibilityScrollbar::setValue):
448         * css/SelectorCheckerTestFunctions.h:
449         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
450         * page/FrameView.cpp:
451         (WebCore::FrameView::createScrollbar):
452         (WebCore::FrameView::setFixedVisibleContentRect):
453         * page/scrolling/ScrollingCoordinator.cpp:
454         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
455         * platform/PopupMenuClient.h:
456         * platform/ScrollAnimator.cpp:
457         (WebCore::ScrollAnimator::ScrollAnimator):
458         (WebCore::ScrollAnimator::scroll):
459         (WebCore::ScrollAnimator::handleWheelEvent):
460         (WebCore::ScrollAnimator::notifyPositionChanged):
461         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
462         * platform/ScrollAnimator.h:
463         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
464         * platform/ScrollAnimatorNone.cpp:
465         * platform/ScrollAnimatorNone.h:
466         * platform/ScrollView.cpp:
467         (WebCore::ScrollView::createScrollbar):
468         * platform/ScrollableArea.cpp:
469         (WebCore::ScrollableArea::scrollAnimator):
470         (WebCore::ScrollableArea::scroll):
471         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
472         (WebCore::ScrollableArea::notifyScrollPositionChanged):
473         (WebCore::ScrollableArea::scrollPositionChanged):
474         (WebCore::ScrollableArea::handleWheelEvent):
475         (WebCore::ScrollableArea::handleTouchEvent):
476         (WebCore::ScrollableArea::mouseEnteredScrollbar):
477         (WebCore::ScrollableArea::mouseExitedScrollbar):
478         (WebCore::ScrollableArea::didAddScrollbar):
479         (WebCore::ScrollableArea::willRemoveScrollbar):
480         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
481         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
482         * platform/ScrollableArea.h:
483         * platform/Scrollbar.cpp:
484         (WebCore::Scrollbar::createNativeScrollbar):
485         (WebCore::Scrollbar::Scrollbar):
486         (WebCore::Scrollbar::scrollbarOverlayStyle):
487         (WebCore::Scrollbar::isScrollableAreaActive):
488         (WebCore::Scrollbar::offsetDidChange):
489         (WebCore::Scrollbar::autoscrollPressedPart):
490         (WebCore::Scrollbar::moveThumb):
491         (WebCore::Scrollbar::mouseMoved):
492         (WebCore::Scrollbar::mouseEntered):
493         (WebCore::Scrollbar::mouseExited):
494         (WebCore::Scrollbar::mouseUp):
495         (WebCore::Scrollbar::shouldParticipateInHitTesting):
496         (WebCore::Scrollbar::isWindowActive):
497         (WebCore::Scrollbar::invalidateRect):
498         (WebCore::Scrollbar::convertToContainingView):
499         (WebCore::Scrollbar::convertFromContainingView):
500         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
501         * platform/Scrollbar.h:
502         (WebCore::Scrollbar::scrollableArea):
503         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
504         * platform/ios/ScrollAnimatorIOS.mm:
505         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
506         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
507         * platform/mac/ScrollAnimatorMac.h:
508         * platform/mac/ScrollAnimatorMac.mm:
509         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
510         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
511         (-[WebScrollbarPainterDelegate scrollAnimator]):
512         (-[WebScrollbarPainterDelegate layer]):
513         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
514         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
515         (WebCore::ScrollAnimator::create):
516         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
517         (WebCore::ScrollAnimatorMac::scroll):
518         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
519         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
520         (WebCore::ScrollAnimatorMac::immediateScrollTo):
521         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
522         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
523         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
524         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
525         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
526         (WebCore::ScrollAnimatorMac::pinnedInDirection):
527         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
528         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
529         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
530         (WebCore::ScrollAnimatorMac::stretchAmount):
531         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
532         (WebCore::ScrollAnimatorMac::canScrollVertically):
533         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
534         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
535         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
536         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
537         * rendering/RenderLayer.cpp:
538         (WebCore::RenderLayer::RenderLayer):
539         (WebCore::RenderLayer::createScrollbar):
540         (WebCore::RenderLayer::destroyScrollbar):
541         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
542         * rendering/RenderListBox.cpp:
543         (WebCore::RenderListBox::createScrollbar):
544         (WebCore::RenderListBox::destroyScrollbar):
545         * rendering/RenderMenuList.cpp:
546         (RenderMenuList::createScrollbar):
547         * rendering/RenderMenuList.h:
548         * rendering/RenderScrollbar.cpp:
549         (WebCore::RenderScrollbar::createCustomScrollbar):
550         (WebCore::RenderScrollbar::RenderScrollbar):
551         * rendering/RenderScrollbar.h:
552         * rendering/RenderSearchField.cpp:
553         (WebCore::RenderSearchField::createScrollbar):
554         * rendering/RenderSearchField.h:
555
556 2015-02-20  Enrica Casucci  <enrica@apple.com>
557
558         [WK2] Add support for font panel on OS X.
559         https://bugs.webkit.org/show_bug.cgi?id=141777
560
561         Reviewed by Tim Horton.
562
563         This patch adds the necessary hooks to the Editor class to support
564         the font panel.
565
566         * editing/Editor.h:
567         * editing/mac/EditorMac.mm:
568         (WebCore::Editor::applyFontStyles):
569
570 2015-02-20  Zalan Bujtas  <zalan@apple.com>
571
572         Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore
573         https://bugs.webkit.org/show_bug.cgi?id=141854
574
575         Reviewed by Ryosuke Niwa.
576
577         Inserting content before/after the body as the result of editing is a valid operation.
578         This assert was originally introduced to cover cases where edited content would get moved
579         out of body. However, asserting such operation properly is not possible atm.
580
581         Test: editing/inserting/insert-as-body-sibling.html
582
583         * editing/CompositeEditCommand.cpp:
584         (WebCore::CompositeEditCommand::insertNodeBefore):
585         (WebCore::CompositeEditCommand::insertNodeAfter):
586
587 2015-02-20  Chris Dumez  <cdumez@apple.com>
588
589         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
590         https://bugs.webkit.org/show_bug.cgi?id=141803
591         <rdar://problem/19632080>
592
593         Reviewed by Antti Koivisto.
594
595         Add more diagnostic logging keys for the network cache.
596
597         * page/DiagnosticLoggingKeys.cpp:
598         (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey):
599         (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey):
600         (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey):
601         (WebCore::DiagnosticLoggingKeys::isAttachmentKey):
602         (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey):
603         (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey):
604         (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey):
605         (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey):
606         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey):
607         (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey):
608         (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey):
609         (WebCore::DiagnosticLoggingKeys::notInCacheKey):
610         (WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey): Deleted.
611         (WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey): Deleted.
612         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey): Deleted.
613         * page/DiagnosticLoggingKeys.h:
614
615 2015-02-20  Tim Horton  <timothy_horton@apple.com>
616
617         <attachment> turns the wrong blue when you highlight it
618         https://bugs.webkit.org/show_bug.cgi?id=141853
619
620         Reviewed by Simon Fraser.
621
622         * rendering/RenderAttachment.h:
623         * rendering/RenderReplaced.cpp:
624         (WebCore::RenderReplaced::shouldDrawSelectionTint):
625         (WebCore::RenderReplaced::paint):
626         * rendering/RenderReplaced.h:
627         Don't draw the selection tint for RenderAttachment.
628
629 2015-02-20  Tim Horton  <timothy_horton@apple.com>
630
631         Allow <attachment> elements to be focused
632         https://bugs.webkit.org/show_bug.cgi?id=141847
633
634         Reviewed by Enrica Casucci.
635
636         * css/html.css:
637         (attachment:focus):
638         Disable focus rings for <attachment>.
639
640         * html/HTMLAttachmentElement.cpp:
641         (WebCore::HTMLAttachmentElement::setFocus):
642         * html/HTMLAttachmentElement.h:
643         Allow HTMLAttachmentElement to get editing focus.
644         Let RenderAttachment know when focus changes.
645
646         * rendering/RenderAttachment.cpp:
647         (WebCore::RenderAttachment::paintReplaced):
648         Paint the background in cyan when we are inside the selection or have focus.
649         Otherwise, it will be gray.
650
651         (WebCore::RenderAttachment::focusChanged):
652         When focus changes, repaint.
653
654         * rendering/RenderAttachment.h:
655
656 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
657
658         Rename ScrollElasticityController to ScrollController
659         https://bugs.webkit.org/show_bug.cgi?id=141842
660
661         Reviewed by Simon Fraser.
662
663         No change in functionality.
664
665         * PlatformMac.cmake:
666         * WebCore.order:
667         * WebCore.xcodeproj/project.pbxproj:
668         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
669         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
670         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
671         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
672         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
673         * platform/mac/ScrollAnimatorMac.h:
674         * platform/mac/ScrollAnimatorMac.mm:
675         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
676         (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
677         (WebCore::ScrollAnimatorMac::handleWheelEvent):
678         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
679         * platform/mac/ScrollController.h: Copied from WebCore/platform/mac/ScrollElasticityController.h.
680         (WebCore::ScrollControllerClient::~ScrollControllerClient):
681         (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): Deleted.
682         * platform/mac/ScrollController.mm: Copied from WebCore/platform/mac/ScrollElasticityController.mm.
683         (WebCore::ScrollController::ScrollController):
684         (WebCore::ScrollController::handleWheelEvent):
685         (WebCore::ScrollController::snapRubberBandTimerFired):
686         (WebCore::ScrollController::isRubberBandInProgress):
687         (WebCore::ScrollController::stopSnapRubberbandTimer):
688         (WebCore::ScrollController::snapRubberBand):
689         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection):
690         (WebCore::ScrollElasticityController::ScrollElasticityController): Deleted.
691         (WebCore::ScrollElasticityController::handleWheelEvent): Deleted.
692         (WebCore::ScrollElasticityController::snapRubberBandTimerFired): Deleted.
693         (WebCore::ScrollElasticityController::isRubberBandInProgress): Deleted.
694         (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): Deleted.
695         (WebCore::ScrollElasticityController::snapRubberBand): Deleted.
696         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Deleted.
697         * platform/mac/ScrollElasticityController.h: Removed.
698         * platform/mac/ScrollElasticityController.mm: Removed.
699
700 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
701
702         Remove svn:keywords property.
703
704         As far as I can tell, the property had no effect on any of these files, but also,
705         when it has effect it's likely harmful.
706
707         * Modules/mediacontrols/assets-apple-iOS.svg: Removed property svn:keywords.
708         * Modules/mediacontrols/mediaControlsBase.css: Removed property svn:keywords.
709         * Modules/mediacontrols/mediaControlsBase.js: Removed property svn:keywords.
710         * bindings/js/JSDeviceMotionEventCustom.cpp: Removed property svn:keywords.
711         * css/CSSKeyframeRule.cpp: Removed property svn:keywords.
712         * css/CSSKeyframeRule.h: Removed property svn:keywords.
713         * css/CSSKeyframesRule.cpp: Removed property svn:keywords.
714         * css/CSSKeyframesRule.h: Removed property svn:keywords.
715         * css/WebKitCSSFilterValue.cpp: Removed property svn:keywords.
716         * css/WebKitCSSFilterValue.h: Removed property svn:keywords.
717         * css/plugIns.css: Removed property svn:keywords.
718         * dom/AnimationEvent.cpp: Removed property svn:keywords.
719         * dom/AnimationEvent.h: Removed property svn:keywords.
720         * dom/DeviceMotionClient.h: Removed property svn:keywords.
721         * dom/DeviceMotionController.cpp: Removed property svn:keywords.
722         * dom/DeviceMotionController.h: Removed property svn:keywords.
723         * dom/DeviceMotionData.cpp: Removed property svn:keywords.
724         * dom/DeviceMotionData.h: Removed property svn:keywords.
725         * dom/DeviceMotionEvent.cpp: Removed property svn:keywords.
726         * dom/DeviceMotionEvent.h: Removed property svn:keywords.
727         * html/canvas/ANGLEInstancedArrays.cpp: Removed property svn:keywords.
728         * html/canvas/ANGLEInstancedArrays.h: Removed property svn:keywords.
729         * html/canvas/OESTextureFloatLinear.cpp: Removed property svn:keywords.
730         * html/canvas/OESTextureFloatLinear.h: Removed property svn:keywords.
731         * html/canvas/OESTextureHalfFloatLinear.cpp: Removed property svn:keywords.
732         * html/canvas/OESTextureHalfFloatLinear.h: Removed property svn:keywords.
733         * html/shadow/MediaControlsApple.cpp: Removed property svn:keywords.
734         * html/shadow/MediaControlsApple.h: Removed property svn:keywords.
735         * page/Frame.h: Removed property svn:keywords.
736         * page/scrolling/ScrollingConstraints.cpp: Removed property svn:keywords.
737         * page/scrolling/ScrollingConstraints.h: Removed property svn:keywords.
738         * page/scrolling/ScrollingStateStickyNode.cpp: Removed property svn:keywords.
739         * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed property svn:keywords.
740         * page/scrolling/mac/ScrollingTreeStickyNode.h: Removed property svn:keywords.
741         * platform/ControlStates.h: Removed property svn:keywords.
742         * platform/ScrollbarTheme.cpp: Removed property svn:keywords.
743         * platform/graphics/GraphicsLayerUpdater.cpp: Removed property svn:keywords.
744         * platform/graphics/GraphicsLayerUpdater.h: Removed property svn:keywords.
745         * platform/graphics/ca/TileController.h: Removed property svn:keywords.
746         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Removed property svn:keywords.
747         * platform/graphics/filters/FilterOperation.cpp: Removed property svn:keywords.
748         * platform/graphics/filters/FilterOperation.h: Removed property svn:keywords.
749         * platform/graphics/filters/FilterOperations.h: Removed property svn:keywords.
750         * platform/ios/SystemMemory.h: Removed property svn:keywords.
751         * platform/mock/ScrollbarThemeMock.cpp: Removed property svn:keywords.
752         * platform/mock/ScrollbarThemeMock.h: Removed property svn:keywords.
753         * platform/spi/cocoa/ServersSPI.h: Removed property svn:keywords.
754         * platform/text/mac/ios-encodings.txt: Removed property svn:keywords.
755         * rendering/FilterEffectRenderer.cpp: Removed property svn:keywords.
756         * rendering/FilterEffectRenderer.h: Removed property svn:keywords.
757         * rendering/RenderGeometryMap.cpp: Removed property svn:keywords.
758         * rendering/RenderGeometryMap.h: Removed property svn:keywords.
759         * rendering/RenderMediaControlElements.h: Removed property svn:keywords.
760         * rendering/TextAutoSizing.cpp: Removed property svn:keywords.
761         * rendering/TextAutoSizing.h: Removed property svn:keywords.
762         * rendering/style/StylePendingImage.h: Removed property svn:keywords.
763
764 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
765
766         [Mac] REGRESSION: Scroll snap points broken after r180018
767         https://bugs.webkit.org/show_bug.cgi?id=141821
768         <rdar://problem/19898333>
769
770         Reviewed by Simon Fraser.
771
772         * page/EventHandler.cpp:
773         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added stub.
774         (WebCore::EventHandler::handleWheelEvent): Call new 'platformNotifySnapIfNecessary' method
775         to catch the 'ended wheel' gesture.
776         * page/EventHandler.h:
777         * page/mac/EventHandlerMac.mm:
778         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added. If the wheel event signifies
779         the end of a wheel/swipe gesture, let the snap logic decide if it should do anything
780         (i.e., trigger an animation)
781         * platform/ScrollAnimator.cpp:
782         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Added.
783         * platform/ScrollAnimator.h:
784
785 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
786
787         [iOS] cleanup AirPlay code
788         https://bugs.webkit.org/show_bug.cgi?id=141811
789
790         Reviewed by Jer Noble.
791
792         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
793
794         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Ditto.
795         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
796         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
797
798         * Modules/mediacontrols/MediaControlsHost.cpp:
799         (WebCore::MediaControlsHost::externalDeviceDisplayName): Ditto.
800         (WebCore::MediaControlsHost::externalDeviceType):
801
802         * dom/EventNames.h: Ditto.
803         * dom/EventNames.in:
804
805         * html/HTMLMediaElement.cpp:
806         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
807         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
808         (WebCore::HTMLMediaElement::parseAttribute):
809         * html/HTMLMediaElement.h:
810         * html/HTMLMediaElement.idl:
811
812         * html/HTMLMediaSession.cpp:
813         (WebCore::restrictionName): Ditto.
814         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): Ditto.
815         * html/HTMLMediaSession.h:
816
817         * html/HTMLVideoElement.cpp:
818         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
819         * html/HTMLVideoElement.h:
820         * html/HTMLVideoElement.idl:
821
822         * page/Settings.in: Ditto.
823
824         * platform/audio/MediaSessionManager.h:
825         * platform/audio/ios/MediaSessionManagerIOS.h:
826         * platform/audio/ios/MediaSessionManagerIOS.mm: Ditto.
827
828         * platform/graphics/MediaPlayer.cpp:
829         (WebCore::MediaPlayer::showPlaybackTargetPicker): Deleted.
830         (WebCore::MediaPlayer::hasWirelessPlaybackTargets): Deleted.
831         * platform/graphics/MediaPlayer.h:
832         * platform/graphics/MediaPlayerPrivate.h:
833         (WebCore::MediaPlayerPrivateInterface::showPlaybackTargetPicker): Deleted.
834         (WebCore::MediaPlayerPrivateInterface::hasWirelessPlaybackTargets): Deleted.
835         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
836         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
837         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
838
839         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
840         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
841         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
842         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
843         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
844         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
845         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
846         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Ditto.
847
848 2015-02-20  Dhi Aurrahman  <diorahman@rockybars.com>
849
850         Language ranges containing asterisks must be quoted as strings
851         https://bugs.webkit.org/show_bug.cgi?id=141659
852
853         Reviewed by Benjamin Poulain.
854
855         As specified in [1], the language ranges containing asterisks must be quoted as strings.
856
857         [1] http://dev.w3.org/csswg/selectors-4/#the-lang-pseudo.
858
859         * css/CSSGrammar.y.in:
860         * css/CSSParser.cpp:
861         (WebCore::CSSParser::realLex):
862
863 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
864
865         Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
866         https://bugs.webkit.org/show_bug.cgi?id=137765
867
868         Reviewed by Ryosuke Niwa.
869
870         As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr
871         with std::unique_ptr<>|std::make_unique<>. To remove all create() factory function, lambdas is
872         used in registerMediaEngine().
873
874         No new tests, no behavior changes.
875
876         * WebCore.exp.in:
877         * html/HTMLMediaElement.cpp:
878         (WebCore::HTMLMediaElement::parseAttribute):
879         * html/HTMLMediaElement.h:
880         * platform/graphics/MediaPlayer.cpp:
881         (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
882         (WebCore::MediaPlayer::MediaPlayer):
883         (WebCore::MediaPlayer::loadWithNextMediaEngine):
884         (WebCore::createNullMediaPlayer): Deleted.
885         * platform/graphics/MediaPlayer.h:
886         (WebCore::MediaPlayer::create): Deleted.
887         * platform/graphics/MediaPlayerPrivate.h:
888         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
889         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
890         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
891         (WebCore::MediaPlayerPrivateAVFoundationCF::create): Deleted.
892         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
893         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
894         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
895         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
896         (WebCore::MediaPlayerPrivateAVFoundationObjC::create): Deleted.
897         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
898         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
899         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
900         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): Deleted.
901         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
902         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
903         (WebCore::MediaPlayerPrivateGStreamer::create): Deleted.
904         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
905         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
906         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
907         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
908         (WebCore::MediaPlayerPrivateQTKit::create): Deleted.
909         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
910         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
911         (WebCore::MediaPlayerPrivateMediaFoundation::create): Deleted.
912         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
913         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
914         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
915         (WebCore::MockMediaPlayerMediaSource::create): Deleted.
916         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
917
918 2015-02-19  David Kilzer  <ddkilzer@apple.com>
919
920         Rename SOFT_LINK_FUNCTION_{DECL,IMPL}() to SOFT_LINK_FUNCTION_{HEADER,SOURCE}()
921
922         Rubber-stamped by Brent Fulgham.
923
924         "HEADER" and "SOURCE" seem clearer than "DECL" and "IMPL", and
925         Brent agreed when I talked to him in person.
926
927         * platform/cf/CoreMediaSoftLink.cpp:
928         * platform/cf/CoreMediaSoftLink.h:
929         * platform/mac/SoftLinking.h:
930         * platform/win/SoftLinking.h:
931         - Do the rename.
932
933 2015-02-19  David Kilzer  <ddkilzer@apple.com>
934
935         Move more CoreMedia soft-linked functions to CoreMediaSoftLink.{cpp,h}
936         <http://webkit.org/b/141791>
937
938         Reviewed by Alexey Proskuryakov.
939
940         * Configurations/WebCore.unexp:
941         - Remove five more symbols.
942
943         * Modules/plugins/QuickTimePluginReplacement.mm:
944         - Remove all local soft-links and include CoreMediaSoftLink.h.
945           Note that SOFT_LINK_FRAMEWORK_OPTIONAL() should not have been
946           used here since we didn't use the optional function soft-link
947           method.
948
949         * WebCore.vcxproj/WebCore.vcxproj.filters:
950         * WebCore.vcxproj/WebCoreCFNetwork.props:
951         * WebCore.xcodeproj/project.pbxproj:
952         - Add CoreMediaSPI.h to the project.
953
954         * platform/cf/CoreMediaSoftLink.cpp:
955         * platform/cf/CoreMediaSoftLink.h:
956         - Add three cross-platform symbols, five Cocoa-only symbols, and
957           two Windows-only symbols (based on current usage, not
958           availability on each platform).
959         - Include CoreMediaSPI.h header.
960         - Include <CoreMedia/CoreMedia.h> instead of just CMTime.h.
961
962         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
963         - Remove all CoreMedia soft-linked functions.  Constants remain.
964
965         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
966         - Remove one CoreMedia soft-linked method.
967
968         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
969         - Remove all CoreMedia soft-linked funtions.  With this change,
970           we are already realizing space savings for duplicate
971           SOFT_LINK_FRAMEWORK() calls.  (On Windows, there was code
972           generated for many unused functions included by
973           CoreMediaSoftLinking.h.)
974
975         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
976         - Remove all CoreMedia soft-linked funtions.  Constants remain.
977
978         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
979         - Remove duplicate header included by CoreMediaSoftLink.h.
980
981         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
982         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
983         - Remove all CoreMedia soft-linked funtions.  Constants remain.
984
985         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
986         - Remove three CoreMedia soft-linked methods.
987
988         * platform/mac/PlatformClockCM.mm:
989         - Remove two CoreMedia soft-linked methods.
990
991         * platform/mac/SerializedPlatformRepresentationMac.mm:
992         - Remove only CoreMedia soft-linked funtion.  It wasn't even
993           used.
994
995         * platform/mediastream/mac/AVVideoCaptureSource.mm:
996         - Remove two CoreMedia soft-linked method.
997
998         * platform/spi/cf/CoreMediaSPI.h:
999         - Add for SPI from CMNotificationCenter.h.
1000
1001 2015-02-19  David Hyatt  <hyatt@apple.com>
1002
1003         Columns are splitting unsplittable content.
1004         https://bugs.webkit.org/show_bug.cgi?id=141807
1005         <rdar://problem/18387659>
1006
1007         Reviewed by Dean Jackson.
1008
1009         Added inline-table-dynamic-movement.html
1010
1011         * rendering/RenderBlockFlow.cpp:
1012         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
1013         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
1014         Patch these functions to always check the layout state for a zero
1015         pageLogicalHeight, since that is actually our indicator that we're
1016         doing column balancing and don't have a height set yet.
1017
1018         * rendering/RenderMultiColumnFlowThread.cpp:
1019         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
1020         * rendering/RenderMultiColumnSet.cpp:
1021         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1022         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
1023         (WebCore::RenderMultiColumnSet::prepareForLayout):
1024         * rendering/RenderMultiColumnSet.h:
1025         The function for deciding whether the logical height of the columns was
1026         known was checking for a zero computedColumnHeight. However, a column set
1027         can legitimately compute a zero column height, and with the fix to examine
1028         the layout state, this bug was exposed.
1029
1030         The fix is to add a new variable that caches whether or not the column height
1031         has been computed, so that even if it computes to zero, we aren't fooled.
1032
1033 2015-02-19  Chris Dumez  <cdumez@apple.com>
1034
1035         [iOS] Fix inefficiencies in ResourceResponse::platformLazyInit()
1036         https://bugs.webkit.org/show_bug.cgi?id=141744
1037
1038         Reviewed by Alexey Proskuryakov.
1039
1040         Fix inefficiencies in iOS's ResourceResponse::platformLazyInit()
1041         implementation, similarly to what was already done for Mac in:
1042         <http://trac.webkit.org/changeset/174717>
1043
1044         The following changes were made:
1045         - Add missing "initLevel == AllFields" check before initializing
1046           uncommon fields. This bug was causing us to initialize uncommon
1047           fields even if called with 'CommonFieldsOnly' initLevel.
1048         - Bypass the first pass populating common HTTP headers in
1049           m_httpHeaderFields if the initLevel is AllFields. If called
1050           with AllFields initLevel, we will end up populating all HTTP
1051           headers later on so this first pass is redundant.
1052         - Use C++11 range loop to iterator over commonHeaderFields array
1053           for readability.
1054         - Use CFDictionaryApplyFunction() to populate m_httpHeaderFields
1055           for the CFDictionaryRef containing the headers instead of creating
1056           copies of keys and values using CFDictionaryGetKeysAndValues() and
1057           then iterating over those. This avoids allocating Vectors for keys /
1058           values and avoids unnecessary copying.
1059
1060
1061 2015-02-18  Dean Jackson  <dino@apple.com>
1062
1063         Sufficiently small media controls should remove toolbar elements
1064         https://bugs.webkit.org/show_bug.cgi?id=141780
1065         <rdar://problem/16548548>
1066         <rdar://problem/17598778>
1067         <rdar://problem/18351963>
1068
1069         Reviewed by Eric Carlson.
1070
1071         Implement some logic where elements on the media controls are
1072         hidden when there isn't enough room. We start by dropping
1073         the scrubber, then the various buttons on the right hand
1074         side.
1075
1076         This solution isn't perfect. If we had perfection, it would
1077         be because we get resize events and respond accordingly. Instead
1078         we check the size when the user has pinch-zoomed, or when
1079         we start/stop playing.
1080
1081         This is going to cause some extra layout, because we need
1082         to know the size of things before we can work out which
1083         bits to hide.
1084
1085         * Modules/mediacontrols/mediaControlsiOS.css:
1086         (::-webkit-media-controls): Remove the minimum width. This can
1087         cause the controls to get clipped.
1088         (audio::-webkit-media-controls-spacer): Add this empty element to
1089         replace the scrubber when it is hidden.
1090         (audio::-webkit-media-controls-timeline-container):
1091         * Modules/mediacontrols/mediaControlsiOS.js:
1092         (ControllerIOS): Remember our size so we don't churn.
1093         (ControllerIOS.prototype.createControls): Create a new spacer element.
1094         (ControllerIOS.prototype.configureInlineControls):
1095         (ControllerIOS.prototype.showControls): Check if we need to hide stuff.
1096         (ControllerIOS.prototype.updateControls):
1097         (ControllerIOS.prototype.setPlaying): Ditto.
1098         (ControllerIOS.prototype.set pageScaleFactor): Ditto.
1099         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Trigger an update
1100         asap. In this case it's probably ok to be in a bad state for a frame, or
1101         we are inside setup and we know that we'll layout soon.
1102         (ControllerIOS.prototype.updateLayoutForDisplayedWidth): The actual code
1103         that hides elements.
1104
1105 2015-02-19  Tim Horton  <timothy_horton@apple.com>
1106
1107         Move the software-only ImageBuffer::m_context to ImageBufferData
1108         https://bugs.webkit.org/show_bug.cgi?id=141784
1109
1110         Reviewed by Simon Fraser.
1111
1112         * platform/graphics/ImageBuffer.h:
1113         * platform/graphics/cairo/ImageBufferCairo.cpp:
1114         (WebCore::ImageBuffer::ImageBuffer):
1115         (WebCore::ImageBuffer::context):
1116         * platform/graphics/cairo/ImageBufferDataCairo.h:
1117         * platform/graphics/cg/ImageBufferCG.cpp:
1118         (WebCore::ImageBuffer::ImageBuffer):
1119         (WebCore::ImageBuffer::context):
1120         * platform/graphics/cg/ImageBufferDataCG.h:
1121         Move m_context to ImageBufferData in the software-only section;
1122         for accelerated contexts, the GraphicsContext is owned by the IOSurface wrapper.
1123         This will make it harder for ImageBuffer to make the mistake of using
1124         m_context blindly without thinking when it will often be null.
1125
1126 2015-02-18  Andreas Kling  <akling@apple.com>
1127
1128         REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
1129         <https://webkit.org/b/141788>
1130
1131         Reviewed by Anders Carlsson.
1132
1133         Once again we've fallen into the TemporaryChange trap:
1134
1135             TemporaryChange<unsigned>(m_member, temporaryValue);
1136
1137         The code above doesn't actually do anything. Since the TemporaryChange local is not named,
1138         it immediately goes out of scope and restores the original value of m_member.
1139
1140         Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
1141         to catch bugs like this. Whatever we do will be done separately from this bug.
1142
1143         Test: fast/history/page-cache-clearing.html
1144
1145         * history/PageCache.cpp:
1146         (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.
1147
1148         * testing/Internals.cpp:
1149         (WebCore::Internals::clearPageCache):
1150         (WebCore::Internals::pageCacheSize):
1151         * testing/Internals.h:
1152         * testing/Internals.idl: Add a way to clear the page cache and query its size from
1153         window.internals to facilitate writing a simple test for this bug.
1154
1155 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
1156
1157         Roll out r180280.
1158
1159         Crashes under IDBDatabase::closeConnection.
1160         https://bugs.webkit.org/show_bug.cgi?id=141745
1161         rdar://problem/19816412
1162
1163         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
1164
1165 2015-02-18  Tim Horton  <timothy_horton@apple.com>
1166
1167         Fix the iOS Simulator build after r180308.
1168
1169         * platform/graphics/cg/ImageBufferDataCG.h:
1170
1171 2015-02-18  Zalan Bujtas  <zalan@apple.com>
1172
1173         REGRESSION(r174761) Dangling spanner pointer in RenderMultiColumnSpannerPlaceholder.
1174         https://bugs.webkit.org/show_bug.cgi?id=138224
1175
1176         Reviewed by Dave Hyatt.
1177
1178         It's wrong to call flowThreadRelativeWillBeRemoved(child).
1179         RenderMultiColumnFlowThread::removeFlowChildInfo() does not mean that the child is actually about to be removed.
1180         Should this introduce any regressions, we need to deal with those separately.
1181
1182         Test: fast/multicol/crash-when-spanner-gets-moved-around.html
1183
1184         * rendering/RenderMultiColumnFlowThread.cpp:
1185         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): Deleted.
1186         * rendering/RenderMultiColumnFlowThread.h:
1187
1188 2015-02-18  Brent Fulgham  <bfulgham@apple.com>
1189
1190         [Win] CFData leak in CDMSessionAVFoundationCF
1191         https://bugs.webkit.org/show_bug.cgi?id=141765
1192         <rdar://problem/141765>
1193
1194         Reviewed by Joseph Pecoraro.
1195
1196         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
1197         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): use 'adoptCF'
1198         so we don't double-increment the retain count.
1199
1200 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
1201
1202         Adopt WebCore::IOSurface in ImageBuffer
1203         https://bugs.webkit.org/show_bug.cgi?id=141751
1204
1205         Reviewed by Simon Fraser.
1206
1207         * platform/graphics/cg/ImageBufferCG.cpp:
1208         (WebCore::createIOSurface): Deleted.
1209         (WebCore::ImageBuffer::ImageBuffer):
1210         Make use of cachedCGColorSpace.
1211         Make use of WebCore::IOSurface.
1212         Remove the unused size argument from ImageBufferDataCG.
1213         Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
1214         do this for us, unlike wkIOSurfaceContextCreate.
1215         Apply the flipping and scale factor to whichever context we made.
1216         We don't need to setIsAcceleratedContext anymore because it's always
1217         false for software contexts, and WebCore::IOSurface will set it for
1218         any accelerated contexts.
1219
1220         (WebCore::ImageBuffer::context):
1221         If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
1222
1223         (WebCore::ImageBuffer::flushContext):
1224         Make use of context(); m_context is now null for accelerated ImageBuffers.
1225
1226         (WebCore::ImageBuffer::copyNativeImage):
1227         Adopt in-line with the Create functions for clarity. Make use of
1228         IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
1229
1230         (WebCore::ImageBuffer::draw):
1231         (WebCore::ImageBuffer::drawPattern):
1232         (WebCore::ImageBuffer::getUnmultipliedImageData):
1233         (WebCore::ImageBuffer::getPremultipliedImageData):
1234         (WebCore::ImageBuffer::putByteArray):
1235         (WebCore::ImageBuffer::toDataURL):
1236         Make use of context(); m_context is now null for accelerated ImageBuffers.
1237
1238         * platform/graphics/cg/ImageBufferDataCG.cpp:
1239         (WebCore::ImageBufferData::ImageBufferData):
1240         Indentation fix, and use nullptr.
1241
1242         (WebCore::convertScanline):
1243         Grammar fix (is -> are).
1244
1245         (WebCore::ImageBufferData::getData):
1246         (WebCore::ImageBufferData::putData):
1247         Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
1248         should be made more convenient by the wrapper.
1249
1250         * platform/graphics/cg/ImageBufferDataCG.h:
1251         Drop the unused size argument from the constructor.
1252         Reorganize and label the various members which are only used
1253         for a particular type of ImageBufferDataCG.
1254
1255         * platform/graphics/cocoa/IOSurface.mm:
1256         (IOSurface::ensureGraphicsContext):
1257         IOSurface-backed GraphicsContexts are always considered accelerated.
1258
1259         (IOSurface::create):
1260         (IOSurface::IOSurface):
1261         Add a constructor that take an extra size to use when making the CGContext;
1262         it can only be less than the actual backing IOSurface size.
1263         This is needed for r160121.
1264
1265         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1266         * platform/mac/WebCoreSystemInterface.h:
1267         * platform/mac/WebCoreSystemInterface.mm:
1268         Remove old WKSI IOSurface-related functions.
1269
1270 2015-02-18  Alex Christensen  <achristensen@webkit.org>
1271
1272         Prepare to use WEBCORE_EXPORT on Windows.
1273         https://bugs.webkit.org/show_bug.cgi?id=141735
1274
1275         Reviewed by Brent Fulgham.
1276
1277         * bindings/js/GCController.h:
1278         * bindings/js/JSDOMGlobalObject.h:
1279         * bindings/scripts/CodeGeneratorJS.pm:
1280         (GenerateHeader):
1281         (GenerateImplementation):
1282         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1283         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1284         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1285         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1286         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1287         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1288         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1289         * bindings/scripts/test/JS/JSTestEventTarget.h:
1290         * bindings/scripts/test/JS/JSTestException.cpp:
1291         * bindings/scripts/test/JS/JSTestException.h:
1292         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1293         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1294         * bindings/scripts/test/JS/JSTestInterface.cpp:
1295         * bindings/scripts/test/JS/JSTestInterface.h:
1296         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1297         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1298         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1299         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1300         * bindings/scripts/test/JS/JSTestNode.cpp:
1301         * bindings/scripts/test/JS/JSTestNode.h:
1302         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1303         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1304         * bindings/scripts/test/JS/JSTestObj.cpp:
1305         * bindings/scripts/test/JS/JSTestObj.h:
1306         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1307         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1308         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1309         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1310         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1311         * bindings/scripts/test/JS/JSTestTypedefs.h:
1312         * bindings/scripts/test/JS/JSattribute.cpp:
1313         * bindings/scripts/test/JS/JSattribute.h:
1314         * bindings/scripts/test/JS/JSreadonly.cpp:
1315         * bindings/scripts/test/JS/JSreadonly.h:
1316         * bridge/runtime_method.h:
1317         * bridge/runtime_object.h:
1318         * dom/make_names.pl:
1319         (printNamesHeaderFile):
1320         * history/HistoryItem.h:
1321         * loader/FrameLoader.h:
1322         * loader/LoaderStrategy.h:
1323         * loader/ResourceLoadScheduler.h:
1324         * loader/icon/IconDatabase.h:
1325         * loader/icon/IconDatabaseBase.h:
1326         * page/DatabaseProvider.h:
1327         * page/Page.h:
1328         * page/PageConsoleClient.h:
1329         * page/PageOverlay.h:
1330         * platform/FileSystem.h:
1331         * platform/MemoryPressureHandler.h:
1332         * platform/ThreadGlobalData.h:
1333         * platform/URL.h:
1334         * platform/graphics/ca/PlatformCALayer.h:
1335         * platform/network/BlobDataFileReference.h:
1336         * platform/network/BlobRegistry.h:
1337         * platform/network/BlobRegistryImpl.h:
1338         * platform/sql/SQLiteDatabase.h:
1339         * rendering/ScrollBehavior.h:
1340         * rendering/break_lines.h:
1341         Add and move some WEBCORE_EXPORT macros.
1342
1343 2015-02-18  Anders Carlsson  <andersca@apple.com>
1344
1345         Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
1346         https://bugs.webkit.org/show_bug.cgi?id=141767
1347
1348         Reviewed by Tim Horton.
1349
1350         Also, move it to platform/cocoa instead of platform/mac.
1351
1352         * WebCore.xcodeproj/project.pbxproj:
1353         * platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.
1354
1355 2015-02-18  Antti Koivisto  <antti@apple.com>
1356
1357         Rename FontGlyphs to FontCascadeFonts
1358         https://bugs.webkit.org/show_bug.cgi?id=141754
1359
1360         Reviewed by Andreas Kling.
1361
1362         "It is better than Impl."
1363
1364         The purpose of the class to own to create and own the realized Font instances and the associated caches
1365         for FontCascade instances.
1366
1367 2015-02-18  Commit Queue  <commit-queue@webkit.org>
1368
1369         Unreviewed, rolling out r180286.
1370         https://bugs.webkit.org/show_bug.cgi?id=141766
1371
1372         Caused >50 crashed LayoutTests (Requested by jernoble on
1373         #webkit).
1374
1375         Reverted changeset:
1376
1377         "Page::userContentController() should return a reference, not
1378         a pointer"
1379         https://bugs.webkit.org/show_bug.cgi?id=141764
1380         http://trac.webkit.org/changeset/180286
1381
1382 2015-02-18  David Kilzer  <ddkilzer@apple.com>
1383
1384         Consolidate soft-linked CMTimeMakeWithSeconds() function
1385         <http://webkit.org/b/141655>
1386
1387         Reviewed by Brent Fulgham.
1388
1389         * Configurations/WebCore.unexp: Remove workaround for
1390         CMTimeMakeWithSeconds() weak external.
1391
1392         * WebCore.vcxproj/WebCore.vcxproj:
1393         * WebCore.vcxproj/WebCore.vcxproj.filters:
1394         * WebCore.xcodeproj/project.pbxproj:
1395         - Add CoreMediaSoftLink.{cpp,h} to the project.
1396
1397         * platform/cf/CoreMediaSoftLink.cpp: Add.
1398         * platform/cf/CoreMediaSoftLink.h: Add.
1399         - Implement new strategy where code for soft-linking is only
1400           in one place, and the header can simply be included wherever a
1401           soft-linked method is needed.
1402
1403         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
1404         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
1405         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1406         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1407         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1408         * platform/mac/PlatformClockCM.mm:
1409         - Remove old soft-linking strategy and include
1410           CoreMediaSoftLink.h.
1411
1412         * platform/mac/SoftLinking.h:
1413         (SOFT_LINK_FUNCTION_DECL): Add.  New macro function used for
1414         header declaration.  Split out from SOFT_LINK() macro.  Also
1415         stop violating C++ standards by redeclaring an inline function
1416         with the exact same signature as an extern "C" function.  This
1417         now matches what we do on Windows (where Visual C++ already
1418         prevented these shenanigans).
1419         (SOFT_LINK_FUNCTION_IMPL): Add.  New macro function used for
1420         source implementation.  Split out the from SOFT_LINK() macro.
1421
1422         * platform/win/SoftLinking.h:
1423         (SOFT_LINK_FRAMEWORK): Map mac/SoftLinking.h macro name to
1424         Windows macros so we can simplify CoreMediaSoftLink.{cpp,h}.
1425         (SOFT_LINK_FUNCTION_DECL): Add.
1426         (SOFT_LINK_FUNCTION_IMPL): Add.
1427         - New macro functions split out from SOFT_LINK_DLL_IMPORT()
1428           macro for header declaration and source implementation.
1429         - We assume the __cdecl calling convention because that's what
1430           all Apple libraries use, and so we are able to use the exact
1431           same macro function on both Mac and Windows to simplify
1432           CoreMediaSoftLink.{cpp,h}.
1433
1434 2015-02-18  Brady Eidson  <beidson@apple.com>
1435
1436         Page::userContentController() should return a reference, not a pointer
1437         https://bugs.webkit.org/show_bug.cgi?id=141764
1438
1439         Reviewed by Jer Noble.
1440
1441         No new tests (No behavior change)
1442
1443         * dom/DocumentStyleSheetCollection.cpp:
1444         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
1445         * loader/cache/CachedResourceLoader.cpp:
1446         (WebCore::CachedResourceLoader::requestResource):
1447         * page/CaptionUserPreferences.cpp:
1448         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
1449         * page/DOMWindow.cpp:
1450         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
1451         * page/Frame.cpp:
1452         (WebCore::Frame::injectUserScripts):
1453         * page/Page.cpp:
1454         (WebCore::Page::Page):
1455         (WebCore::Page::~Page):
1456         (WebCore::Page::setUserContentController):
1457         * page/Page.h:
1458         (WebCore::Page::userContentController):
1459         * page/UserMessageHandlersNamespace.cpp:
1460         (WebCore::UserMessageHandlersNamespace::handler):
1461
1462 2015-02-18  Roger Fong  <roger_fong@apple.com>
1463
1464         WebGL2: Promote various WebGL1 extensions to core for WebGL2.
1465         https://bugs.webkit.org/show_bug.cgi?id=141446
1466         <rdar://problem/19633715>
1467
1468         Reviewed by Brent Fulham.
1469
1470         Tests covered by WebGL2 conformance tests.
1471
1472         This patch promotes the following WebGL1 extensions to core in WebGL2:
1473         OES_element_index_uint 
1474         EXT_sRGB 
1475         EXT_blend_minmax 
1476         EXT_frag_depth 
1477         EXT_shader_texture_lod
1478         OES_standard_derivatives 
1479         
1480         The latter 3 are enabled by default now for GLSL1, though we will get these extensions 
1481         for free when GLSL3 becomes available.
1482
1483         WebGL2 binding code should actually fall back to base implementation for getFramebufferAttachmentParameter.
1484         * bindings/js/JSWebGL2RenderingContextCustom.cpp: 
1485         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter): Deleted.
1486         * html/canvas/WebGL2RenderingContext.idl: Ditto.
1487
1488         * html/canvas/WebGL2RenderingContext.cpp:
1489         (WebCore::WebGL2RenderingContext::getExtension): Enable WEBGL_lose_context as an extension again.
1490         It was not promoted to core as I originally thought it had been.
1491         (WebCore::WebGL2RenderingContext::getSupportedExtensions): Ditto.
1492         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): Promote the 3 shader extensions for GLSL1 to core.
1493         (WebCore::WebGL2RenderingContext::initializeShaderExtensions): Ditto.
1494         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Promote SRGB extension to core.
1495         (WebCore::WebGL2RenderingContext::renderbufferStorage): Ditto.
1496         (WebCore::WebGL2RenderingContext::hint): Ditto.
1497         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Ditto.
1498         (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Promote OES_element_index_uint extension to core.
1499         (WebCore::WebGL2RenderingContext::validateDrawElements): Ditto.
1500         (WebCore::WebGL2RenderingContext::validateBlendEquation): Promote EXT_blend_minmax extension to core.
1501         * html/canvas/WebGL2RenderingContext.h:
1502
1503         * html/canvas/WebGLRenderingContext.cpp:
1504         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Copied form WebGLRenderingContextBase.
1505         (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
1506         (WebCore::WebGLRenderingContext::hint): Ditto.
1507         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
1508         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
1509         (WebCore::WebGLRenderingContext::validateBlendEquation): Ditto.
1510         * html/canvas/WebGLRenderingContext.h:
1511
1512         * html/canvas/WebGLRenderingContextBase.cpp:
1513         (WebCore::WebGLRenderingContextBase::validateIndexArrayConservative): Deleted.
1514         (WebCore::WebGLRenderingContextBase::validateDrawElements): Deleted.
1515         (WebCore::WebGLRenderingContextBase::getExtension): Deleted.
1516         (WebCore::WebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
1517         (WebCore::WebGLRenderingContextBase::hint): Deleted.
1518         (WebCore::WebGLRenderingContextBase::renderbufferStorage): Deleted.
1519         (WebCore::WebGLRenderingContextBase::validateBlendEquation): Deleted.
1520         * html/canvas/WebGLRenderingContextBase.h:
1521
1522 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
1523
1524         Streamline unexported function build fixes
1525         https://bugs.webkit.org/show_bug.cgi?id=141761
1526
1527         Reviewed by Alex Christensen.
1528
1529         * Configurations/WebCore.unexp: Added some functions for symbols only used on newer
1530         OS versions. Removed a special case for NodeList, to handle it uniformly with Node.
1531
1532         * Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
1533         it's not only Xcode 5 that is affected.
1534
1535         * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
1536         Node, NodeList needs an exactly the same one. Also updated the comments.
1537
1538 2015-02-18  Chris Dumez  <cdumez@apple.com>
1539
1540         Access FontCache global instance via singleton() static member function
1541         https://bugs.webkit.org/show_bug.cgi?id=141726
1542
1543         Reviewed by Daniel Bates.
1544
1545         Access FontCache global instance via singleton() static member function,
1546         as per coding style.
1547
1548 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
1549
1550         Crashes under IDBDatabase::closeConnection.
1551         https://bugs.webkit.org/show_bug.cgi?id=141745
1552         rdar://problem/19816412
1553
1554         Reviewed by David Kilzer.
1555
1556         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
1557         Add a missing protector.
1558
1559 2015-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
1560
1561         Justified ruby can cause lines to grow beyond their container
1562         https://bugs.webkit.org/show_bug.cgi?id=141732
1563
1564         Reviewed by David Hyatt.
1565
1566         After we re-layout RenderRubyRuns, this can change the environment upon which
1567         ruby's overhang calculation is sensitive to. Before this patch, we would recalculate
1568         the overhang after the RenderRubyRun gets relaid out. However, doing such causes the
1569         effective width of the RenderRubyRun to change, which causes out subsequent
1570         justification calculations to be off.
1571
1572         Therefore, we have a cycle; the amount of ruby overhang can change the justification
1573         in a line, and the layout of the line affects the ruby overhang calculation. Instead
1574         of performing a layout in a loop until it converges, this patch simply observes that
1575         having a flush right edge is more valuable than having a perfectly correct overhang.
1576         It therefore simply removes the secondary overhang calculation.
1577
1578         Test: fast/text/ruby-justification-flush.html
1579
1580         * rendering/RenderBlockFlow.h:
1581         * rendering/RenderBlockLineLayout.cpp:
1582         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
1583         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
1584         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1585
1586 2015-02-18  Chris Dumez  <cdumez@apple.com>
1587
1588         Evict dead resources in MemoryCache in MemoryPressureHandler::releaseNoncriticalMemory()
1589         https://bugs.webkit.org/show_bug.cgi?id=141723
1590
1591         Reviewed by Andreas Kling.
1592
1593         Evict dead resources from the MemoryCache on non-critical memory
1594         pressure. On critical memory pressure, we already evict ALL resources
1595         from the MemoryCache. It is a good idea to start by evicting resources
1596         we care less about on non-critical warning to decrease the chances of
1597         getting a critical warning and thus having to clear the whole
1598         MemoryCache.
1599
1600         * loader/cache/MemoryCache.h:
1601         * platform/MemoryPressureHandler.cpp:
1602         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
1603         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1604         (WebCore::MemoryPressureHandler::releaseMemory):
1605         Call releaseCriticalMemory() before releaseNoncriticalMemory()
1606         as releaseCriticalMemory() is more aggressive. Doing it the
1607         other way around would mean that on critical warning, we would
1608         first evict dead resources, then evict all resources. It is
1609         more efficient to evict all resources first, as it makes the
1610         non-critical operation (evict dead resources) a no-op.
1611
1612 2015-02-18  Eric Carlson  <eric.carlson@apple.com>
1613
1614         [iOS] pause video when a tab moves to the background on some devices
1615         https://bugs.webkit.org/show_bug.cgi?id=141753
1616         <rdar://problem/19814562>
1617
1618         Reviewed by Jer Noble.
1619
1620         Test: media/video-background-tab-playback.html
1621
1622         * platform/audio/MediaSession.cpp:
1623         (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
1624             hidden if the BackgroundTabPlaybackRestricted is set.
1625
1626         * platform/audio/MediaSessionManager.cpp:
1627         (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
1628              to BackgroundProcessPlaybackRestricted.
1629         (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
1630         * platform/audio/MediaSessionManager.h:
1631
1632         * platform/audio/ios/MediaSessionManagerIOS.mm:
1633         (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
1634             devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
1635
1636         * testing/Internals.cpp:
1637         (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
1638             BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
1639
1640 2015-02-16  David Hyatt  <hyatt@apple.com>
1641
1642         Wrong element's style is used for text-decoration-style.
1643         https://bugs.webkit.org/show_bug.cgi?id=141673
1644         <rdar://problem/19876774>
1645
1646         Reviewed by Dean Jackson.
1647
1648         Added fast/text/text-underline-style.html
1649
1650         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1651         (AXAttributeStringSetStyle):
1652         Add arguments for fetching styles.
1653
1654         * rendering/InlineTextBox.cpp:
1655         (WebCore::InlineTextBox::paint):
1656         (WebCore::InlineTextBox::paintDecoration):
1657         * rendering/InlineTextBox.h:
1658         Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
1659         way it fetches the colors.
1660
1661         * rendering/RenderObject.cpp:
1662         (WebCore::RenderObject::getTextDecorationColorsAndStyles):
1663         (WebCore::RenderObject::getTextDecorationColors): Deleted.
1664         * rendering/RenderObject.h:
1665         Add style fetching to the same function that fetches colors and rename it.
1666
1667 2015-02-18  David Kilzer  <ddkilzer@apple.com>
1668
1669         REGRESSION (r180260): Try to fix incremental builds by changing UserContentController.cpp
1670
1671         Attempt to fix this linker error by making a non-coding change:
1672
1673             Undefined symbols for architecture i386:
1674               "__ZN7WebCore17ContentExtensions24ContentExtensionsBackendC1Ev", referenced from:
1675                   __ZN7WebCore21UserContentController20addUserContentFilterERKN3WTF6StringES4_ in UserContentController.o
1676             ld: symbol(s) not found for architecture i386
1677
1678         This should have been fixed by r180266, but perhaps Xcode didn't
1679         recognize that it needed to rebuild this source file.
1680
1681         * page/UserContentController.cpp: Update copyright.
1682
1683 2015-02-18  Andreas Kling  <akling@apple.com>
1684
1685         Purge PassRefPtr from CanvasRenderingContext2D.
1686         <https://webkit.org/b/141749>
1687
1688         Reviewed by Gyuyoung Kim.
1689
1690         Switch from using PassRefPtr to RefPtr/Ref in CanvasRenderingContext2D.
1691
1692         * html/TextMetrics.h:
1693         (WebCore::TextMetrics::create): Changed create() helper to return Ref.
1694
1695         * html/canvas/CanvasRenderingContext2D.h:
1696         * html/canvas/CanvasRenderingContext2D.cpp:
1697         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Changed to take a reference.
1698
1699         (WebCore::CanvasRenderingContext2D::createLinearGradient):
1700         (WebCore::CanvasRenderingContext2D::createRadialGradient):
1701         (WebCore::CanvasRenderingContext2D::createPattern):
1702         (WebCore::createEmptyImageData):
1703         (WebCore::CanvasRenderingContext2D::createImageData):
1704         (WebCore::CanvasRenderingContext2D::getImageData):
1705         (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Made these return RefPtr. Also did
1706         a bunch of 0 -> nullptr conversion, removed a bunch of unnecessary RefPtr::release() calls,
1707         and changed a PassRefPtr argument to RefPtr&&.
1708
1709         (WebCore::CanvasRenderingContext2D::measureText): Made this return Ref.
1710
1711 2015-02-18  Commit Queue  <commit-queue@webkit.org>
1712
1713         Unreviewed, rolling out r180260.
1714         https://bugs.webkit.org/show_bug.cgi?id=141757
1715
1716         Broke the 32-bit builders (Requested by jessieberlin on
1717         #webkit).
1718
1719         Reverted changeset:
1720
1721         "Add a trivial code generator for the DFA"
1722         https://bugs.webkit.org/show_bug.cgi?id=141017
1723         http://trac.webkit.org/changeset/180260
1724
1725 2015-02-17  Anders Carlsson  <andersca@apple.com>
1726
1727         Add API for clearing in-memory caches to WKWebsiteDataStore
1728         https://bugs.webkit.org/show_bug.cgi?id=141724
1729
1730         Reviewed by Tim Horton.
1731
1732         Add a version of evictResources that takes a session id.
1733
1734         * loader/cache/MemoryCache.cpp:
1735         (WebCore::MemoryCache::evictResources):
1736
1737 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
1738
1739         Remove more references to WebCore.exp.in
1740         https://bugs.webkit.org/show_bug.cgi?id=141747
1741
1742         Reviewed by Alexey Proskuryakov.
1743
1744         * WebCore.xcodeproj/project.pbxproj:
1745
1746 2015-02-17  Benjamin Poulain  <benjamin@webkit.org>
1747
1748         Add a trivial code generator for the DFA
1749         https://bugs.webkit.org/show_bug.cgi?id=141017
1750
1751         Reviewed by Andreas Kling.
1752
1753         Nothing fancy yet, this is just doing a literal translation from the DFA
1754         to machine code. It is extremely inefficient at the moment.
1755
1756         * WebCore.xcodeproj/project.pbxproj:
1757         * contentextensions/ContentExtensionsBackend.cpp:
1758         (WebCore::ContentExtensions::ContentExtensionsBackend::ContentExtensionsBackend):
1759         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1760         (WebCore::ContentExtensions::addActionToHashSet):
1761         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
1762         * contentextensions/ContentExtensionsBackend.h:
1763         * contentextensions/DFA.cpp:
1764         (WebCore::ContentExtensions::DFA::nextState): Deleted.
1765         (WebCore::ContentExtensions::DFA::actions): Deleted.
1766         * contentextensions/DFA.h:
1767         (WebCore::ContentExtensions::DFA::size):
1768         (WebCore::ContentExtensions::DFA::nodeAt):
1769         * contentextensions/DFACompiler.cpp: Added.
1770         (WebCore::ContentExtensions::compileDFA):
1771         (WebCore::ContentExtensions::DFACodeGenerator::DFACodeGenerator):
1772         (WebCore::ContentExtensions::DFACodeGenerator::compile):
1773         (WebCore::ContentExtensions::DFACodeGenerator::lowerStateMachine):
1774         (WebCore::ContentExtensions::DFACodeGenerator::lowerNode):
1775         (WebCore::ContentExtensions::DFACodeGenerator::getNextCharacter):
1776         (WebCore::ContentExtensions::DFACodeGenerator::callAddActionFunction):
1777         * contentextensions/DFACompiler.h: Copied from Source/WebCore/contentextensions/DFA.h.
1778
1779 2015-02-17  Chris Dumez  <cdumez@apple.com>
1780
1781         Rename ScopedEventQueue::instance() to singleton()
1782         https://bugs.webkit.org/show_bug.cgi?id=141738
1783
1784         Reviewed by Daniel Bates.
1785
1786         Rename ScopedEventQueue::instance() to singleton(), as per coding
1787         style. Also modernize the code a little bit.
1788
1789         * dom/EventDispatcher.cpp:
1790         (WebCore::EventDispatcher::dispatchScopedEvent):
1791         * dom/ScopedEventQueue.cpp:
1792         (WebCore::ScopedEventQueue::singleton):
1793         (WebCore::ScopedEventQueue::dispatchAllEvents):
1794         (WebCore::ScopedEventQueue::incrementScopingLevel):
1795         (WebCore::ScopedEventQueue::decrementScopingLevel):
1796         (WebCore::ScopedEventQueue::ScopedEventQueue): Deleted.
1797         (WebCore::ScopedEventQueue::~ScopedEventQueue): Deleted.
1798         (WebCore::ScopedEventQueue::instance): Deleted.
1799         * dom/ScopedEventQueue.h:
1800         (WebCore::EventQueueScope::EventQueueScope):
1801         (WebCore::EventQueueScope::~EventQueueScope):
1802
1803 2015-02-17  Chris Dumez  <cdumez@apple.com>
1804
1805         Remove dead code from FontCache
1806         https://bugs.webkit.org/show_bug.cgi?id=141741
1807
1808         Reviewed by Daniel Bates.
1809
1810         Remove dead code from FontCache:
1811         - getFontFamilyForCharacters() has no implementation.
1812         - SimpleFontFamily is unused.
1813
1814         * platform/graphics/FontCache.h:
1815
1816 2015-02-17  Chris Dumez  <cdumez@apple.com>
1817
1818         Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
1819         https://bugs.webkit.org/show_bug.cgi?id=141739
1820
1821         Reviewed by Simon Fraser.
1822
1823         Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
1824         per coding style.
1825
1826         * page/animation/CSSPropertyAnimation.cpp:
1827         (WebCore::CSSPropertyAnimationWrapperMap::singleton):
1828         (WebCore::CSSPropertyAnimation::blendProperties):
1829         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
1830         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
1831         (WebCore::CSSPropertyAnimation::propertiesEqual):
1832         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
1833         (WebCore::CSSPropertyAnimation::getNumProperties):
1834         (WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.
1835
1836 2015-02-17  David Kilzer  <ddkilzer@apple.com>
1837
1838         REGRESSION (r180224): Remove unused generate-export-file script
1839         <http://webkit.org/b/141491>
1840
1841         * generate-export-file: Removed.  This was the script used to
1842         create WebCore.exp files for iOS since we couldn't compile a
1843         host-side tool to run like we did on Mac OS X.  Dont't tell
1844         anyone, but this was an epic hack I created while merging open
1845         source changes to the internal iOS WebKit repository around the
1846         time that the WebCore.exp.in file was created.  End of an era.
1847
1848 2015-02-17  David Kilzer  <ddkilzer@apple.com>
1849
1850         SoftLinking.h: Update copyright and license; clean up whitespace
1851
1852         * platform/win/SoftLinking.h:
1853
1854 2015-02-17  Chris Dumez  <cdumez@apple.com>
1855
1856         Slight CachedPage class clean up
1857         https://bugs.webkit.org/show_bug.cgi?id=141693
1858
1859         Reviewed by Andreas Kling.
1860
1861         Slight CachedPage class clean up:
1862         - Drop unnecessary m_timeStamp data member
1863         - Protect m_needsCaptionPreferencesChanged data member with
1864           #if ENABLE(VIDEO_TRACK)
1865         - Merge destroy() method into the destructor as this is the
1866           only caller
1867         - Update clear() to reset 2 data members that were missing
1868
1869 2015-02-17  Anders Carlsson  <andersca@apple.com>
1870
1871         Silence two -Wcast-qual warnings.
1872         rdar://problem/19758266
1873
1874         * platform/ios/wak/WKUtilities.c:
1875         (WKRetain):
1876         (WKRelease):
1877
1878 2015-02-17  Zalan Bujtas  <zalan@apple.com>
1879
1880         Minor RenderTable* class cleanups.
1881         https://bugs.webkit.org/show_bug.cgi?id=141707
1882
1883         Reviewed by Andreas Kling.
1884
1885         Use in-class initializer where possible.
1886         Remove redundant code.
1887         Move multiline implementations out of class declaration.
1888
1889         No change in functionality.
1890
1891         * rendering/RenderTableCaption.cpp:
1892         (WebCore::RenderTableCaption::insertedIntoTree):
1893         (WebCore::RenderTableCaption::willBeRemovedFromTree):
1894         (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Deleted.
1895         * rendering/RenderTableCaption.h:
1896         * rendering/RenderTableCell.cpp:
1897         (WebCore::RenderTableCell::RenderTableCell):
1898         * rendering/RenderTableCell.h:
1899         (WebCore::RenderTableCell::colSpan):
1900         (WebCore::RenderTableCell::rowSpan):
1901         (WebCore::RenderTableCell::setCol):
1902         (WebCore::RenderTableCell::col):
1903         (WebCore::RenderTableCell::section):
1904         (WebCore::RenderTableCell::table):
1905         (WebCore::RenderTableCell::rowIndex):
1906         (WebCore::RenderTableCell::styleOrColLogicalWidth):
1907         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1908         (WebCore::RenderTableCell::isBaselineAligned):
1909         (WebCore::RenderTableCell::borderAdjoiningTableStart):
1910         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
1911         (WebCore::RenderTableCell::borderAdjoiningCellBefore):
1912         (WebCore::RenderTableCell::borderAdjoiningCellAfter):
1913         * rendering/RenderTableCol.cpp:
1914         (WebCore::RenderTableCol::RenderTableCol):
1915         * rendering/RenderTableCol.h:
1916         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore):
1917         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter):
1918         * rendering/RenderTableRow.h:
1919         (WebCore::RenderTableRow::setRowIndex):
1920         (WebCore::RenderTableRow::rowIndex):
1921         (WebCore::RenderTableRow::borderAdjoiningTableStart):
1922         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
1923         (WebCore::RenderTableRow::table):
1924         (WebCore::RenderTableSection::firstRow):
1925         (WebCore::RenderTableSection::lastRow):
1926         * rendering/RenderTableSection.cpp:
1927         (WebCore::RenderTableSection::RenderTableSection):
1928         (WebCore::RenderTableSection::dirtiedRows):
1929         (WebCore::RenderTableSection::dirtiedColumns):
1930         (WebCore::RenderTableSection::paintObject):
1931         (WebCore::RenderTableSection::nodeAtPoint):
1932         * rendering/RenderTableSection.h:
1933         (WebCore::CellSpan::CellSpan):
1934         (WebCore::RenderTableSection::borderAdjoiningTableStart):
1935         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
1936         (WebCore::RenderTableSection::cellAt):
1937         (WebCore::RenderTableSection::primaryCellAt):
1938         (WebCore::RenderTableSection::rowRendererAt):
1939         (WebCore::RenderTableSection::outerBorderLeft):
1940         (WebCore::RenderTableSection::outerBorderRight):
1941         (WebCore::RenderTableSection::outerBorderTop):
1942         (WebCore::RenderTableSection::outerBorderBottom):
1943         (WebCore::RenderTableSection::numRows):
1944         (WebCore::RenderTableSection::recalcCellsIfNeeded):
1945         (WebCore::RenderTableSection::rowBaseline):
1946         (WebCore::RenderTableSection::fullTableRowSpan):
1947         (WebCore::CellSpan::start): Deleted.
1948         (WebCore::CellSpan::end): Deleted.
1949
1950 2015-02-16  Dean Jackson  <dino@apple.com>
1951
1952         REGRESSION: Video control fails to hide after playback begins in reflowable EPUB files
1953         https://bugs.webkit.org/show_bug.cgi?id=141689
1954         <rdar://problem/19689286>
1955
1956         Reviewed by Eric Carlson.
1957
1958         The iBooks app turns off the requirement for a user gesture
1959         before triggering playback. When we moved to script-based
1960         media controls there were a few regressions in this setup.
1961         This makes them behave a lot more like iOS 7.
1962
1963         * Modules/mediacontrols/mediaControlsApple.js:
1964         (Controller.prototype.setPlaying): We don't want to hide the controls
1965         yet, just start a hiding timer.
1966         * Modules/mediacontrols/mediaControlsiOS.js:
1967         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): If we've ever
1968         played before, we don't want to show the big start button. If we
1969         are in the middle of construction, we do want to show it. We no
1970         longer care about the case where you're not in setup and have
1971         the relaxed restrictions (we still want to show the start button
1972         in that case).
1973         (ControllerIOS.prototype.showControls): When we show the controls,
1974         make sure our timeline is up to date. This is necessary for the
1975         cases where we automatically show the controls, such as when we hit
1976         the end of a video.
1977         (ControllerIOS.prototype.updateTime): Make sure to pass the forceUpdate
1978         parameter on to the super-method.
1979         (ControllerIOS.prototype.setPlaying):
1980         (ControllerIOS.prototype.progressFillStyle): Deleted.
1981
1982 2015-02-17  Chris Dumez  <cdumez@apple.com>
1983
1984         Access MemoryPressureHandler global instance via a singleton() static member function
1985         https://bugs.webkit.org/show_bug.cgi?id=141691
1986
1987         Reviewed by Andreas Kling.
1988
1989         Access MemoryPressureHandler global instance via a singleton() static
1990         member function as per coding style. Also make all other member
1991         functions non-static as callers can just use singleton() to get the
1992         instance and access methods. This avoid having to call
1993         MemoryPressureHandler::singleton() from member functions.
1994
1995         * bindings/js/ScriptController.cpp:
1996         (WebCore::collectGarbageAfterWindowShellDestruction):
1997         * history/PageCache.cpp:
1998         (WebCore::PageCache::canCache):
1999         * loader/FrameLoader.cpp:
2000         (WebCore::FrameLoader::commitProvisionalLoad):
2001         * page/FrameView.cpp:
2002         (WebCore::FrameView::willPaintContents):
2003         (WebCore::FrameView::didPaintContents):
2004         (WebCore::FrameView::computeCoverageRect):
2005         * platform/MemoryPressureHandler.cpp:
2006         (WebCore::MemoryPressureHandler::singleton):
2007         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2008         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2009         (WebCore::memoryPressureHandler): Deleted.
2010         * platform/MemoryPressureHandler.h:
2011         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
2012         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2013         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2014         (WebCore::MemoryPressureHandler::install):
2015         (WebCore::MemoryPressureHandler::holdOff):
2016         (WebCore::respondToMemoryPressureCallback):
2017         * platform/graphics/FontCache.cpp:
2018         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
2019         * platform/ios/LegacyTileCache.mm:
2020         (WebCore::LegacyTileCache::createTilesInActiveGrid):
2021         * platform/ios/LegacyTileGrid.mm:
2022         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
2023         * platform/ios/LegacyTileLayerPool.mm:
2024         (WebCore::LegacyTileLayerPool::addLayer):
2025         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
2026         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
2027         * platform/linux/MemoryPressureHandlerLinux.cpp:
2028         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
2029
2030 2015-02-17  Alex Christensen  <achristensen@webkit.org>
2031
2032         Remove WebCore.exp.in and clean up.
2033         https://bugs.webkit.org/show_bug.cgi?id=141491
2034
2035         Reviewed by Andreas Kling.
2036
2037         * Configurations/WebCore.xcconfig:
2038         Don't use exported symbols files.
2039         * DerivedSources.make:
2040         Don't generate export files.
2041         * WebCore.exp.in: Removed.
2042         * WebCore.xcodeproj/project.pbxproj:
2043         Removed WebCoreExportFileGenerator targets.
2044         * make-export-file-generator: Removed.
2045
2046 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2047
2048         Use HashMap::add instead of get/contains + set in DOMObjectCache
2049         https://bugs.webkit.org/show_bug.cgi?id=141558
2050
2051         Rubber-stamped by Žan Doberšek.
2052
2053         * bindings/gobject/DOMObjectCache.cpp:
2054         (WebKit::getOrCreateDOMObjectCacheFrameObserver):
2055         (WebKit::DOMObjectCache::put):
2056
2057 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2058
2059         [GTK] GObject DOM bindings object are cached forever
2060         https://bugs.webkit.org/show_bug.cgi?id=141558
2061
2062         Reviewed by Sergio Villar Senin.
2063
2064         Rework the DOMObjectCache to avoid having to manually clear the
2065         objects when the frame is destroyed, using a FrameDestructionObserver
2066         instead. When a new object associated to a Frame is added to the
2067         cache, a FrameDestructionObserver is created for the frame if
2068         needed, and the DOM object is tracked by the observer too. When
2069         the frame is detached from the page all its objects are cleared,
2070         and if the aren't additional references, the object is finalized
2071         and removed from the cache normally.
2072         This patch also simplifies and modernizes the code to make it
2073         easier to read an maintain.
2074
2075         * bindings/gobject/DOMObjectCache.cpp:
2076         (WebKit::DOMObjectCacheData::DOMObjectCacheData): Add constructor
2077         to initialize its members and simplify the callers.
2078         (WebKit::DOMObjectCacheData::clearObject): Remove the references
2079         added by the cache, ensuring the GObject is not finalized until
2080         the method returns.
2081         (WebKit::DOMObjectCacheData::refObject): Adds a reference owned by
2082         the cache.
2083         (WebKit::domObjectCacheFrameObservers): Map a frame to a FrameDestructionObserver.
2084         (WebKit::getOrCreateDOMObjectCacheFrameObserver): Create a new
2085         FrameDestructionObserver for the given Frame or return the
2086         existing one.
2087         (WebKit::domObjects): Map wrapped object to wrapper object.
2088         (WebKit::DOMObjectCache::forget): Remove the wrapped object from
2089         the cache.
2090         (WebKit::DOMObjectCache::get): Return the wrapped object if it is
2091         in the cache, increasing the cache references.
2092         (WebKit::DOMObjectCache::put): Add the wrapper object to the cache
2093         for the given wrapped object. If it's a Node and has a frame add
2094         the node to the FrameDestructionObserver corresponding to the frame.
2095         (WebKit::getFrameFromHandle): Deleted.
2096         (WebKit::weakRefNotify): Deleted.
2097         (WebKit::DOMObjectCache::clearByFrame): Deleted.
2098         (WebKit::DOMObjectCache::~DOMObjectCache): Deleted.
2099         * bindings/gobject/DOMObjectCache.h:
2100
2101 2015-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
2102
2103         REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
2104         https://bugs.webkit.org/show_bug.cgi?id=141647
2105
2106         Reviewed by Csaba Osztrogonác.
2107
2108         No new tests since this just fixes a build break.
2109
2110         * dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
2111         (WebCore::Position::isCandidate):
2112
2113 2015-02-16  Chris Dumez  <cdumez@apple.com>
2114
2115         Keep all memory cache resources in ListHashSets
2116         https://bugs.webkit.org/show_bug.cgi?id=141667
2117
2118         Reviewed by Andreas Kling.
2119
2120         Keep all memory cache resources in ListHashSets instead of manual linked
2121         lists. This simplifies the code a lot and is also more efficient for
2122         retrieving / removing particular CachedResources.
2123
2124         * loader/cache/CachedResource.cpp:
2125         (WebCore::CachedResource::CachedResource):
2126         * loader/cache/CachedResource.h:
2127         * loader/cache/MemoryCache.cpp:
2128         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2129         (WebCore::MemoryCache::removeFromLRUList):
2130         (WebCore::MemoryCache::insertInLRUList):
2131         (WebCore::MemoryCache::dumpLRULists):
2132         (WebCore::MemoryCache::lruListFor): Deleted.
2133         * loader/cache/MemoryCache.h:
2134
2135 2015-02-16  Benjamin Poulain  <benjamin@webkit.org>
2136
2137         CSS JIT: finish :nth-last-child()
2138         https://bugs.webkit.org/show_bug.cgi?id=141629
2139
2140         Reviewed by Andreas Kling.
2141
2142         This patch adds the matcher for :nth-child(An+B of selector list) and
2143         fix a small bug I discovered while working on it.
2144
2145         The matcher is straightforward: count the next siblings matching the selector,
2146         nothing fancy.
2147
2148         While working on it I noticed I forgot the test for IsParsingChildrenFinished
2149         on the simple version of :nth-last-child(). I add it in both matcher, write
2150         a couple of tests, the first part of the tests now succeed, but the second part
2151         fails...
2152
2153         What happened is:
2154         1) We interupt the parsing to execute the JavaScript.
2155            From there, we force the style resolution to get the computed style.
2156         2) When resolving the style, the early check for isFinishedParsingChildren()
2157            quits the function early. This is done *before* we marked the parent
2158            for :nth-last-child() style resolution.
2159         3) After the script, parsing resume and the following elements are added.
2160         4) When resolving the style, only the new elements are marked dirty,
2161            the elements pending their :nth-last-child() style never get udpated.
2162
2163         To fix the problem, I moved the test for FinishedParsingChildren after
2164         the parent marking.
2165
2166         Honestly, those early return for FinishedParsingChildren need to be refined
2167         and they should be tested properly. We should not do this kind of things
2168         for Query for example.
2169
2170         Tests: fast/selectors/nth-last-child-cannot-match-during-parsing-1.html
2171                fast/selectors/nth-last-child-cannot-match-during-parsing-2.html
2172                fast/selectors/nth-last-child-of-cannot-match-during-parsing-1.html
2173                fast/selectors/nth-last-child-of-cannot-match-during-parsing-2.html
2174                fast/selectors/nth-last-child-of-register-requirement.html
2175
2176         * css/SelectorChecker.cpp:
2177         (WebCore::SelectorChecker::checkOne):
2178         Fix the tree marking.
2179
2180         * cssjit/SelectorCompiler.cpp:
2181         (WebCore::SelectorCompiler::addPseudoClassType):
2182         The fragment creation was already done, all I had to do was
2183         accept the compile.
2184
2185         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2186         :nth-child() and :nth-last-child() with a selector list are heavier than :not()
2187         and :matches(), move them accordingly.
2188
2189         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
2190         More the early return after the tree marking.
2191
2192         (WebCore::SelectorCompiler::setParentAffectedByLastChildOf):
2193         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
2194         New matcher, nothing optimized yet.
2195
2196 2015-02-16  Tim Horton  <timothy_horton@apple.com>
2197
2198         Adopt CAMachPort-as-layer-contents
2199         https://bugs.webkit.org/show_bug.cgi?id=141687
2200         <rdar://problem/19393233>
2201
2202         Reviewed by Simon Fraser.
2203
2204         No new tests, just a performance bump.
2205
2206         * platform/cocoa/MachSendRight.h:
2207         (WebCore::MachSendRight::operator bool):
2208         Add an operator bool() that checks if the underlying port is nonnull.
2209
2210         * platform/spi/cocoa/QuartzCoreSPI.h:
2211         Add some SPI.
2212
2213 2015-02-15  Sam Weinig  <sam@webkit.org>
2214
2215         Add experimental <attachment> element support
2216         https://bugs.webkit.org/show_bug.cgi?id=141626
2217
2218         Reviewed by Tim Horton.
2219
2220         Adds scaffolding for an experimental implementation of an <attachment> element
2221         which can represent a file attachment (e.g. NSTextAttachment in NSAttributedString
2222         parlance).
2223
2224         The implementation is guarded by both an #ifdef (ENABLE(ATTACHMENT_ELEMENT)) and 
2225         a setting (Settings::attachmentElementEnabled()).
2226
2227         Tests: fast/attachment/attachment-disabled-dom.html
2228                fast/attachment/attachment-disabled-rendering.html
2229                fast/attachment/attachment-dom.html
2230                fast/attachment/attachment-rendering.html
2231
2232         * Configurations/FeatureDefines.xcconfig:
2233         Add new ENABLE_ATTACHMENT_ELEMENT macro.
2234
2235         * CMakeLists.txt:
2236         * WebCore.vcxproj/WebCore.vcxproj:
2237         * WebCore.xcodeproj/project.pbxproj:
2238         Add new files.
2239
2240         * dom/make_names.pl:
2241         Add support for checking a setting to determine if a particular tag should be exposed.
2242
2243         * html/HTMLAttachmentElement.cpp: Added.
2244         * html/HTMLAttachmentElement.h: Added.
2245         Stub out the basics of the new element.
2246
2247         * html/HTMLElementsAllInOne.cpp:
2248         Add HTMLAttachmentElement.cpp.
2249
2250         * html/HTMLTagNames.in:
2251         Add 'attachment'.
2252
2253         * page/Settings.in:
2254         Add attachmentElementEnabled setting.
2255
2256         * rendering/RenderAttachment.cpp: Added.
2257         * rendering/RenderAttachment.h: Added.
2258         Stub out the basics of the new render. We will probably want to replace this with
2259         a non-replaced render, but this will do as a placeholder for now.
2260
2261         * rendering/RenderObject.h:
2262         (WebCore::RenderObject::isAttachment):
2263         Add predicate for type casting.
2264
2265         * rendering/RenderingAllInOne.cpp:
2266         Add RenderAttachment.cpp.
2267
2268 2015-02-16  Andreas Kling  <akling@apple.com>
2269
2270         GC (almost) immediately when navigating under memory pressure.
2271         <https://webkit.org/b/141663>
2272
2273         Reviewed by Geoffrey Garen.
2274
2275         Since the PageCache is already disabled in memory pressure situations,
2276         we know that detaching the old window shell on navigation is basically
2277         guaranteed to generate a bunch of garbage, we can soften the memory
2278         peak a bit by doing a GC right away instead of scheduling one for soon(tm).
2279
2280         * bindings/js/GCController.cpp:
2281         (WebCore::GCController::GCController):
2282         (WebCore::GCController::garbageCollectSoon):
2283         (WebCore::GCController::garbageCollectOnNextRunLoop):
2284         (WebCore::GCController::gcTimerFired):
2285         * bindings/js/GCController.h:
2286
2287             Add a GCController::garbageCollectOnNextRunLoop() complement to the
2288             "soon" and "now" options. There was already a zero timer in here for
2289             non-CF builds, so I just used that same timer to implement this
2290             and have the non-CF code path call garbageCollectOnNextRunLoop().
2291
2292         * bindings/js/ScriptController.cpp:
2293         (WebCore::collectGarbageAfterWindowShellDestruction):
2294         (WebCore::ScriptController::~ScriptController):
2295         (WebCore::ScriptController::clearWindowShell):
2296
2297             Under system memory pressure conditions, schedule a full GC on next
2298             runloop iteration instead of just asking for it to happen soon.
2299             We do it on next runloop to ensure that there's no pointer to the
2300             window object on the stack.
2301
2302 2015-02-16  Enrica Casucci  <enrica@apple.com>
2303
2304         Emoji sequences do not render properly.
2305         https://bugs.webkit.org/show_bug.cgi?id=141661
2306         rdar://problem/19820463
2307
2308         Reviewed by Sam Weinig.
2309
2310         Emoji sequences and emoji with variations should be rendered
2311         using the Complex code path and should be treated as graphemes.
2312         This change modifies advanceByCombiningCharacterSequence to add
2313         this logic.
2314
2315         Test: fast/text/emoji.html
2316
2317         * WebCore.xcodeproj/project.pbxproj:
2318         * platform/graphics/FontCascade.cpp:
2319         (WebCore::FontCascade::characterRangeCodePath):
2320         * platform/graphics/mac/ComplexTextController.cpp:
2321         (WebCore::advanceByCombiningCharacterSequence): Implements a simple
2322         logic to treat emoji sequences and emoji with variations as graphemes.
2323         * platform/text/CharacterProperties.h: Added.
2324         (WebCore::isEmojiGroupCandidate):
2325         (WebCore::isEmojiModifier):
2326         (WebCore::isVariationSelector):
2327         * rendering/RenderText.cpp:
2328         (WebCore::isEmojiGroupCandidate): Deleted.
2329         (WebCore::isEmojiModifier): Deleted.
2330
2331 2015-02-16  Zalan Bujtas  <zalan@apple.com>
2332
2333         RenderTableRow should check if it has access to its ancestor chain.
2334         https://bugs.webkit.org/show_bug.cgi?id=141668
2335
2336         Reviewed by Andreas Kling.
2337
2338         Preventive fix.
2339
2340         * rendering/RenderTableRow.cpp:
2341         (WebCore::RenderTableRow::styleDidChange):
2342         (WebCore::RenderTableRow::addChild):
2343         * rendering/RenderTableRow.h:
2344
2345 2015-02-16  Jer Noble  <jer.noble@apple.com>
2346
2347         [iOS] Build fix: declare undeclared identifier 'credential'.
2348
2349         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2350         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential):
2351
2352 2015-02-16  Jer Noble  <jer.noble@apple.com>
2353
2354         [iOS] Unable to play .mp4 file over http with basic http authentication
2355         https://bugs.webkit.org/show_bug.cgi?id=141503
2356         rdar://problem/15799844
2357
2358         Reviewed by Alexey Proskuryakov.
2359
2360         On iOS, CFNetwork is used for authentication, so the NSURLAuthenticationChallenge
2361         provided by AVAssetResourceLoader needs to be shoehorned into a AuthenticationChallenge
2362         object by way of CFURLAuthChallengeRef.
2363
2364         Create a new class, WebCoreNSURLAuthenticationChallengeClient, whose sole purpose
2365         is to take AuthenticationChallengeClient callbacks and pass them along to a
2366         NSURLAuthenticationChallenge sender.
2367
2368         Create a NSURLAuthenticationChallenge out of the CF version through an SPI, and add
2369         that SPI to a new header. Drive-by fix: take two of our existing SPI calls and move
2370         them into that same header.
2371
2372         * WebCore.xcodeproj/project.pbxproj: Add CFNSURLConnectionSPI.h to project.
2373         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2374         (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Factory.
2375         (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Simple constructor.
2376         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Pass to m_challenge.
2377         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Ditto.
2378         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Ditto.
2379         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Ditto.
2380         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Ditto.
2381         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
2382             Create an AuthenticationChallenge out of the nsChallenge and client and pass it up
2383             to the HTMLMediaElement.
2384         * platform/network/mac/AuthenticationMac.mm:
2385         * platform/spi/cocoa/CFNSURLConnectionSPI.h: Added.
2386
2387 2015-02-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
2388
2389         Revert a change in SVGRenderSupport::mapLocalToContainer committed for fixing <https://bugs.webkit.org/show_bug.cgi?id=119626>.
2390         https://bugs.webkit.org/show_bug.cgi?id=138439
2391
2392         Reviewed by Darin Adler.
2393
2394         The change http://trac.webkit.org/changeset/164861 was ported from Blink
2395         but it was was revert later because it broke Chrome SVG rendering. It also
2396         broke the WebKit SVG text search highlighting.
2397         
2398         Tests: svg/transforms/svg-geometry-crash.html: This test was added by the
2399         blamed change. A new but correct solution is required to fix the assertion.
2400
2401         * rendering/svg/SVGRenderSupport.h:
2402         * rendering/svg/SVGRenderSupport.cpp:
2403         Notice that TransformState.applyTransform() does matrix-left-multiplication,
2404         i.e. state = transform * state. But operator*() of AffineTransform and
2405         MatrixTransform  does right multiply, i.e. this = this * transform.
2406         
2407         (WebCore::SVGRenderSupport::localToParentTransform): Have the calculation
2408         of the SVG localToParentTransform in one shared function.
2409         
2410         (WebCore::SVGRenderSupport::mapLocalToContainer): Revert the Blink change.
2411         If the parent is the SVG root, the transform state should be equal to
2412         transform = svg_to_css_mapping * local_to_parent_mapping * transform.
2413         
2414         (WebCore::SVGRenderSupport::pushMappingToContainer): Get the localToParent
2415         transform to be pushed in the geometryMap. If the parent is the SVG root,
2416         localToParent = svg_to_css_mapping * local_to_parent_mapping. The original
2417         code was doing the opposite and this is the cause of the assertion which 
2418         was fixed wrongly by reversing the correct multiplication order in 
2419         SVGRenderSupport::mapLocalToContainer().
2420
2421 2015-02-16  Zalan Bujtas  <zalan@apple.com>
2422
2423         RenderTableCell can't access its parent while in detached state.
2424         https://bugs.webkit.org/show_bug.cgi?id=141639
2425         rdar://problem/19850760
2426
2427         Reviewed by Simon Fraser.
2428
2429         Null check against ancestor chain so that certain methods in RenderTableCell can
2430         be called even if the renderer is not yet attached.
2431
2432         Test: fast/table/table-cell-crash-when-detached-state.html
2433
2434         * rendering/RenderTableCell.cpp:
2435         (WebCore::RenderTableCell::borderLeft):
2436         (WebCore::RenderTableCell::borderRight):
2437         (WebCore::RenderTableCell::borderTop):
2438         (WebCore::RenderTableCell::borderBottom):
2439         (WebCore::RenderTableCell::borderStart):
2440         (WebCore::RenderTableCell::borderEnd):
2441         (WebCore::RenderTableCell::borderBefore):
2442         (WebCore::RenderTableCell::borderAfter):
2443         * rendering/RenderTableCell.h:
2444
2445 2015-02-16  David Hyatt  <hyatt@apple.com>
2446
2447         Add ifdefs to avoid adjusting Ruby selection rects to avoid overlap on iOS.
2448         https://bugs.webkit.org/show_bug.cgi?id=141651
2449         <rdar://problem/19182526>
2450         
2451         Reviewed by Simon Fraser.
2452
2453         * rendering/RootInlineBox.cpp:
2454         (WebCore::RootInlineBox::selectionTop):
2455         (WebCore::RootInlineBox::selectionBottom):
2456
2457 2015-02-16  David Kilzer  <ddkilzer@apple.com>
2458
2459         SoftLinking.h: Update copyright and license; clean up whitespace
2460
2461         * platform/mac/SoftLinking.h:
2462
2463 2015-02-12  David Hyatt  <hyatt@apple.com>
2464
2465         text-underline-position:under has multiple correctness issues
2466         https://bugs.webkit.org/show_bug.cgi?id=141528
2467
2468         Reviewed by Dean Jackson.
2469
2470         Added a bunch of new tests in fast/text
2471
2472         * rendering/InlineFlowBox.cpp:
2473         (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
2474         (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
2475         (WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
2476         * rendering/InlineFlowBox.h:
2477         These functions have been re-written to take an enclosing renderer that specified the
2478         decoration. This way they can properly limit the bottom/top computation to only line boxes
2479         that are contained inside the renderer.
2480
2481         * rendering/InlineTextBox.cpp:
2482         (WebCore::InlineTextBox::paintDecoration):
2483         Tweak the call to get the decoration colors now that quirks mode has been removed.
2484
2485         * rendering/RenderElement.cpp:
2486         (WebCore::RenderElement::enclosingRendererWithTextDecoration):
2487         * rendering/RenderElement.h:
2488         New function that finds the enclosing renderer that specified a text decoration. For now
2489         this is only used in the "under" position computation, but soon we'll be using it
2490         everywhere.
2491
2492         * rendering/RenderObject.cpp:
2493         (WebCore::RenderObject::getTextDecorationColors):
2494         * rendering/RenderObject.h:
2495         Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).
2496
2497         * rendering/RootInlineBox.cpp:
2498         (WebCore::RootInlineBox::maxLogicalBottom): Deleted.
2499         * rendering/RootInlineBox.h:
2500         Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
2501         the InlineFlowBox functions directly.
2502
2503         * style/InlineTextBoxStyle.cpp:
2504         (WebCore::computeUnderlineOffset):
2505         Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
2506         computation to limit which line boxes get included.
2507
2508 2015-02-16  Brent Fulgham  <bfulgham@apple.com>
2509
2510         FEGaussianBlur::calculateUnscaledKernelSize does unspeakable things with signed and unsigned values
2511         https://bugs.webkit.org/show_bug.cgi?id=141596
2512         <rdar://problem/19837103>
2513
2514         Reviewed by Zalan Bujtas.
2515
2516         No new tests. Covered by css3/filters/huge-blur-value.html
2517
2518         Avoid overflowing the signed integer values by not converting from unsigned
2519         until the maximum size has been clamped to the expected max.
2520
2521         * platform/graphics/filters/FEGaussianBlur.cpp:
2522         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
2523
2524 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
2525
2526         [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
2527         https://bugs.webkit.org/show_bug.cgi?id=140763
2528
2529         Reviewed by Antti Koivisto.
2530
2531         Content sized tracks with non-spanning grid items were not
2532         properly sized because the growth limit was sometimes infinity
2533         (-1) after calling resolveContentBasedTrackSizingFunctions() when
2534         it should not. This patch adds an special initialization phase for
2535         non-spanning grid items as the new track sizing algorithm
2536         describes.
2537
2538         Granted, that was handled in the old algorithm in
2539         distributeSpaceToTracks() as a special case. The problem is that
2540         it regressed after the optimization added in r173868 because that
2541         method is no longer called when the space to distribute is 0.
2542
2543         That's why we could fix this by allowing calls to
2544         distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
2545         it with an explicit initialization our implementation becomes
2546         closer to the new algorithm and the initialization is now explicit
2547         in the code instead of a side effect of calling
2548         distributeSpaceToTracks() with no space to be distributed. It also
2549         brings a slight performance improvement as we save sorts and hash
2550         lookups.
2551
2552         I also took the change to add caching to several GridTrackSize
2553         methods that were hot on the profiler (each one accounted for ~1%
2554         of the total time, now they account for ~0.3% each).
2555
2556         Test: fast/css-grid-layout/grid-initialize-span-one-items.html
2557
2558         * rendering/RenderGrid.cpp:
2559         (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
2560         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2561         Exclude non spanning grid items from the calls to
2562         resolveContentBasedTrackSizingFunctionsForItems().
2563         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
2564         New method to resolve track sizes only using non-spanning grid
2565         items.
2566         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2567         Ensure that it isn't called for non-spanning grid items.
2568         * rendering/RenderGrid.h:
2569         * rendering/style/GridTrackSize.h:
2570         (WebCore::GridTrackSize::GridTrackSize): Cache return values.
2571         (WebCore::GridTrackSize::setLength): Ditto.
2572         (WebCore::GridTrackSize::setMinMax): Ditto.
2573         (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
2574         that caches the return values for hasXXXTrackBreadth() methods.
2575         (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
2576         the cached return value.
2577         (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
2578         (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
2579         (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
2580         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
2581         (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
2582         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
2583         Ditto.
2584         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
2585         Ditto.
2586
2587 2015-02-16  Milan Crha  <mcrha@redhat.com>
2588
2589         [GTK] Loading page into WebView shows g_closure_unref warning
2590         https://bugs.webkit.org/show_bug.cgi?id=127474
2591
2592         Reviewed by Carlos Garcia Campos.
2593
2594         * bindings/gobject/GObjectEventListener.cpp:
2595         (WebCore::GObjectEventListener::gobjectDestroyed):
2596
2597 2015-02-13  Sergio Villar Senin  <svillar@igalia.com>
2598
2599         [CSS Grid Layout] Remove the usage of Length(Undefined) in GridLength
2600         https://bugs.webkit.org/show_bug.cgi?id=141562
2601
2602         Reviewed by Chris Dumez.
2603
2604         From Blink r164154 by <timloh@chromium.org>
2605
2606         The patch simplifies some of the logic in creating and applying
2607         GridLength and GridTrackSize values to RenderStyles by using the
2608         constructors for initialisation instead of deferring to setters.
2609
2610         The rationale behind this change is that neither of
2611         createGridTrackSize() nor createGridTrackBreadth() should be able
2612         to fail, so these are changed to return objects directly instead
2613         of taking an out reference (note that in general failing in
2614         applying properties is incorrect and we should catch these in the
2615         parser).
2616
2617         The quirk value across to the Lengths was also removed because it
2618         doesn't apply to Grid.
2619
2620         * css/CSSPropertyNames.in:
2621         * css/StyleBuilderConverter.h:
2622         (WebCore::StyleBuilderConverter::createGridTrackBreadth): Return a
2623         GridLength instead of a bool.
2624         (WebCore::StyleBuilderConverter::createGridTrackSize): Return a
2625         GridTrackSize instead of a bool.
2626         (WebCore::StyleBuilderConverter::createGridTrackList): Do not
2627         create temporary GridTrackSizes with undefined Lengths.
2628         (WebCore::StyleBuilderConverter::convertGridTrackSize): Ditto.
2629         * rendering/style/GridLength.h:
2630         (WebCore::GridLength::GridLength): It now requires a mandatory
2631         Length argument.
2632         (WebCore::GridLength::length): Deleted.
2633         (WebCore::GridLength::setFlex): Deleted.
2634         * rendering/style/GridTrackSize.h:
2635         (WebCore::GridTrackSize::GridTrackSize): It now requires a
2636         mandatory GridLength argument.
2637         (WebCore::GridTrackSize::length): Removed no longer valid ASSERTs.
2638         (WebCore::GridTrackSize::minTrackBreadth): Ditto.
2639         (WebCore::GridTrackSize::maxTrackBreadth): Ditto.
2640         (WebCore::GridTrackSize::setLength): Deleted.
2641         (WebCore::GridTrackSize::setMinMax): Deleted.
2642         * rendering/style/RenderStyle.h:
2643
2644 2015-02-13  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2645
2646         Removing text node does not remove its associated markers
2647         https://bugs.webkit.org/show_bug.cgi?id=140999
2648
2649         Reviewed by Ryosuke Niwa.
2650
2651         Removing text node via script does not remove its markers.
2652         For example, running the following script:
2653
2654         <script>
2655             var div = document.getElementById("testElement");
2656             div.focus();
2657             document.execCommand("InsertText", false, "welllcome ");
2658
2659             // Give a time async spellchecker to show its markers and
2660             // remove the node.
2661             setTimeout(function() { div.removeChild(div.firstChild); }, 100);
2662         </script>
2663
2664         will cause that DocumentMarkerController still stores the markers for
2665         detached node.
2666
2667         The same issue occurs when the text gets cleared, for example,
2668         <script>
2669             input.value = ""; // for HTMLTextAreaElement, HTMLInputElement
2670             // or
2671             div.innerHTML = ""; // for content editable
2672         </script>
2673
2674         No new tests. Internals marker APIs operate on text node attached
2675         to the element. To test it we could expose document().markers().hasMarkers()
2676         but there is no more useful cases where it could be used.
2677         Another obstacle is that we are in isInShadowTree() so that there is
2678         no possible to register on "DOMSubtreeModified" event.
2679         Test cases attached to the bug:
2680         1. input.value = ""  https://bug-140999-attachments.webkit.org/attachment.cgi?id=245704
2681         2. elem.removeChild(textNode) https://bug-140999-attachments.webkit.org/attachment.cgi?id=246515
2682
2683         Remove markers when text nodes are about to remove.
2684         * dom/Document.cpp:
2685         (WebCore::Document::nodeChildrenWillBeRemoved):
2686         Fixes input.value = ""
2687         (WebCore::Document::nodeWillBeRemoved):
2688         Fixes elem.removeChild(textNode)
2689
2690 2015-02-15  David Kilzer  <ddkilzer@apple.com>
2691
2692         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
2693         <http://webkit.org/b/141607>
2694
2695         This should fix the build, but leaves a FIXME list in
2696         WebCore.unexp.
2697
2698         * Configurations/WebCore.unexp: Add weak externals with a FIXME
2699         statement so they can be removed later.  It's more important to
2700         fix the build first.
2701
2702         * Configurations/WebCore.xcconfig: Change XCODE_VERSION_MINOR to
2703         XCODE_VERSION_MAJOR since the internal bots use version 5.1.1
2704         which still has the error.
2705
2706 2015-02-15  Brian J. Burg  <burg@cs.washington.edu>
2707
2708         Web Inspector: remove unused XHR replay code
2709         https://bugs.webkit.org/show_bug.cgi?id=141622
2710
2711         Reviewed by Timothy Hatcher.
2712
2713         XHR Replay functionality became unused with the last frontend rewrite.
2714         Remove instrumentation and data storage classes only used by this feature.
2715
2716         * inspector/InspectorInstrumentation.cpp:
2717         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientImpl): Deleted.
2718         (WebCore::InspectorInstrumentation::willLoadXHRImpl): Deleted.
2719         (WebCore::InspectorInstrumentation::didFailXHRLoadingImpl): Deleted.
2720         * inspector/InspectorInstrumentation.h:
2721         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
2722         (WebCore::InspectorInstrumentation::willLoadXHR): Deleted.
2723         (WebCore::InspectorInstrumentation::didFailXHRLoading): Deleted.
2724         * inspector/InspectorResourceAgent.cpp:
2725         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2726         (WebCore::InspectorResourceAgent::didFinishXHRLoading):
2727         (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
2728         (WebCore::InspectorResourceAgent::willLoadXHR): Deleted.
2729         (WebCore::InspectorResourceAgent::didFailXHRLoading): Deleted.
2730         (WebCore::InspectorResourceAgent::replayXHR): Deleted.
2731         * inspector/InspectorResourceAgent.h:
2732         * inspector/NetworkResourcesData.cpp:
2733         (WebCore::NetworkResourcesData::clear):
2734         (WebCore::XHRReplayData::create): Deleted.
2735         (WebCore::XHRReplayData::XHRReplayData): Deleted.
2736         (WebCore::NetworkResourcesData::xhrReplayData): Deleted.
2737         (WebCore::NetworkResourcesData::setXHRReplayData): Deleted.
2738         (WebCore::NetworkResourcesData::reuseXHRReplayData): Deleted.
2739         * inspector/NetworkResourcesData.h:
2740         (WebCore::XHRReplayData::method): Deleted.
2741         (WebCore::XHRReplayData::url): Deleted.
2742         (WebCore::XHRReplayData::async): Deleted.
2743         (WebCore::XHRReplayData::formData): Deleted.
2744         (WebCore::XHRReplayData::headers): Deleted.
2745         (WebCore::XHRReplayData::includeCredentials): Deleted.
2746         (WebCore::NetworkResourcesData::ResourceData::xhrReplayData): Deleted.
2747         (WebCore::NetworkResourcesData::ResourceData::setXHRReplayData): Deleted.
2748         * loader/DocumentThreadableLoader.cpp:
2749         (WebCore::DocumentThreadableLoader::loadRequest):
2750         * xml/XMLHttpRequest.cpp:
2751         (WebCore::XMLHttpRequest::createRequest):
2752         (WebCore::XMLHttpRequest::internalAbort):
2753         (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Deleted.
2754         * xml/XMLHttpRequest.h:
2755
2756 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
2757
2758         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
2759         https://bugs.webkit.org/show_bug.cgi?id=141550.
2760
2761         Reviewed by David Kilzer.
2762
2763         * svg/properties/SVGMatrixTearOff.h:
2764         (WebCore::SVGMatrixTearOff::create): Fix a compilation error on the release build.
2765         The ASSERT() here references a parameter which is not used anywhere else. We need 
2766         to change it to ASSERT_UNUSED(). 
2767
2768 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
2769
2770         Crash when accessing an item in SVGTransformList and then removing a previous item from this list.
2771         https://bugs.webkit.org/show_bug.cgi?id=141550.
2772
2773         Reviewed by Darin Adler.
2774
2775         Tests: LayoutTests/svg/dom/SVGTransformList-basics.xhtml: This test is modified to
2776         include a new test case.
2777
2778         * svg/properties/SVGMatrixTearOff.h: m_value of SVGMatrixTearOff will be a null
2779         pointer. There is no point in having SVGMatrixTearOff points to the parent and
2780         the property of the parent at the same time.
2781         
2782         (WebCore::SVGMatrixTearOff::create): SVGMatrixTearOff will hold a pointer to
2783         the parent SVGPropertyTearOff<SVGTransform>. But it should overrides setValue()
2784         and propertyReference() so it can set and get the SVGMatrix from the SVGTransform
2785         parent.
2786         
2787         (WebCore::SVGMatrixTearOff::SVGMatrixTearOff): Pass a nullptr to the base class.
2788         SVGMatrixTearOff will act as a proxy of the parent. It does not hold any data by
2789         itself but it knows what property to set and get from the parent.
2790         
2791         * svg/properties/SVGPropertyTearOff.h:
2792         (WebCore::SVGPropertyTearOff::create): Add a create method which can take a pointer value.
2793         
2794         (WebCore::SVGPropertyTearOff::propertyReference):
2795         (WebCore::SVGPropertyTearOff::setValue): Make these functions virtual so concrete classes
2796         like SVGMatrixTearOff can override them.
2797         
2798         (WebCore::SVGPropertyTearOff::SVGPropertyTearOff): Add a new constructor.
2799
2800 2015-02-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
2801
2802         Crash when accessing an item in SVGLengthList and then replacing it with a previous item in the list.
2803         https://bugs.webkit.org/show_bug.cgi?id=141552.
2804
2805         Reviewed by Darin Adler.
2806
2807         Tests: LayoutTests/svg/dom/SVGLengthList-basics.xhtml: This test is modified to
2808         include a new test case.
2809
2810         * svg/properties/SVGListPropertyTearOff.h: Commit the removal of the replacing item
2811         before trying to detach the wrapper of the item which going to be replaced.
2812
2813 2015-02-15  David Kilzer  <ddkilzer@apple.com>
2814
2815         CoreText only needs to be soft-linked on Windows
2816
2817         More work towards the Maverick Debug build fix:
2818
2819         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
2820         <http://webkit.org/b/141607>
2821
2822         * page/CaptionUserPreferencesMediaAF.cpp:
2823
2824 2015-02-15  Alexey Proskuryakov  <ap@apple.com>
2825
2826         More build fixing.
2827
2828         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
2829
2830 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
2831
2832         More internal build fixing.
2833
2834         DDDFACache.h is not an actual private header, so we were using open source
2835         redeclaration of DDDFACacheRef with an internal function prototype from DDDFAScanner.h.
2836
2837         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
2838         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
2839
2840 2015-02-14  Benjamin Poulain  <benjamin@webkit.org>
2841
2842         Add the initial matching implementation for attribute selectors with case-insensitive value
2843         https://bugs.webkit.org/show_bug.cgi?id=141615
2844
2845         Reviewed by Andreas Kling.
2846
2847         Tests: fast/css/case-insensitive-attribute-selector-specificity.html
2848                fast/css/case-insensitive-attribute-selector-styling-html-1.html
2849                fast/css/case-insensitive-attribute-selector-styling-html-2.html
2850                fast/css/case-insensitive-attribute-selector-styling-html-3.html
2851                fast/css/case-insensitive-attribute-selector-styling-xhtml-1.xhtml
2852                fast/css/case-insensitive-attribute-selector-styling-xhtml-2.xhtml
2853                fast/css/case-insensitive-attribute-selector-styling-xhtml-3.xhtml
2854                fast/selectors/case-insensitive-attribute-bascis.html
2855                fast/selectors/case-insensitive-attribute-matching-style-attribute.html
2856                fast/selectors/case-insensitive-attribute-style-update.html
2857                fast/selectors/case-insensitive-attribute-with-case-sensitive-name.html
2858
2859         * css/SelectorChecker.cpp:
2860         (WebCore::SelectorChecker::checkOne):
2861         We already had case-insensitive value matching due to some legacy HTML
2862         behaviors where some attribute values would be matched case-insensitively
2863         depending on the attribute name.
2864
2865         For this patch, I just re-use the same mechanism. I used branches to try
2866         to convey the idea that matching is case sensitive by default unless
2867         the selector has a flag or we are in the weird HTML exception.
2868
2869         * cssjit/SelectorCompiler.cpp:
2870         (WebCore::SelectorCompiler::constructFragmentsInternal):
2871         Disable that case in the CSS JIT for now, I'll implement it later.
2872
2873 2015-02-14  David Kilzer  <ddkilzer@apple.com>
2874
2875         Declare soft-linked functions with extern "C" linkage
2876
2877         More work towards the Maverick Debug build fix:
2878
2879         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
2880         <http://webkit.org/b/141607>
2881
2882         * platform/mac/SoftLinking.h: Try declaring soft-linked
2883         functions with extern "C" linkage to see if they stop appearing
2884         as weak externals.  This has the added benefit that if the
2885         function signature changes, we'll get a build failure.
2886
2887 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
2888
2889         [Mac] RetainPtr member cleanup, possible leaks
2890         https://bugs.webkit.org/show_bug.cgi?id=141616
2891
2892         Reviewed by Andreas Kling.
2893
2894         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2895         (-[WebSpeechSynthesisWrapper speakUtterance:]):
2896         Adopt the allocated object to avoid a possible leak.
2897
2898         * platform/mac/ScrollAnimatorMac.mm:
2899         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2900         Adopt to avoid unnecessary retain/autorelease.
2901
2902 2015-02-14  Joseph Pecoraro  <pecoraro@apple.com>
2903
2904         IncompleteMetaDataCue leak seen on leaks bot
2905         https://bugs.webkit.org/show_bug.cgi?id=141611
2906
2907         Reviewed by Eric Carlson.        
2908
2909         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
2910         (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue): Deleted.
2911         (WebCore::IncompleteMetaDataCue::~IncompleteMetaDataCue): Deleted.
2912         (WebCore::IncompleteMetaDataCue::cueData): Deleted.
2913         (WebCore::IncompleteMetaDataCue::startTime): Deleted.
2914         Convert to a struct and hold a list of structs instead of pointers.
2915
2916         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
2917         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
2918         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
2919         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
2920         Update use of IncompleteMetaDataCue and modernize related code.
2921
2922 2015-02-09  Brian J. Burg  <burg@cs.washington.edu>
2923
2924         Web Inspector: remove some unnecessary Inspector prefixes from class names in Inspector namespace
2925         https://bugs.webkit.org/show_bug.cgi?id=141372
2926
2927         Reviewed by Joseph Pecoraro.
2928
2929         * WebCore.exp.in:
2930         * inspector/InspectorApplicationCacheAgent.cpp:
2931         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
2932         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
2933         * inspector/InspectorApplicationCacheAgent.h:
2934         * inspector/InspectorCSSAgent.cpp:
2935         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
2936         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
2937         * inspector/InspectorCSSAgent.h:
2938         * inspector/InspectorController.cpp:
2939         (WebCore::InspectorController::InspectorController):
2940         (WebCore::InspectorController::inspectedPageDestroyed):
2941         (WebCore::InspectorController::connectFrontend):
2942         (WebCore::InspectorController::disconnectFrontend):
2943         (WebCore::InspectorController::show):
2944         (WebCore::InspectorController::close):
2945         (WebCore::InspectorController::dispatchMessageFromFrontend):
2946         * inspector/InspectorController.h:
2947         * inspector/InspectorDOMAgent.cpp:
2948         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
2949         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
2950         * inspector/InspectorDOMAgent.h:
2951         * inspector/InspectorDOMDebuggerAgent.cpp:
2952         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
2953         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
2954         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
2955         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
2956         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
2957         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
2958         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
2959         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
2960         * inspector/InspectorDOMDebuggerAgent.h:
2961         * inspector/InspectorDOMStorageAgent.cpp:
2962         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
2963         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
2964         * inspector/InspectorDOMStorageAgent.h:
2965         * inspector/InspectorDatabaseAgent.cpp:
2966         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
2967         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
2968         * inspector/InspectorDatabaseAgent.h:
2969         * inspector/InspectorDatabaseResource.cpp:
2970         (WebCore::InspectorDatabaseResource::bind):
2971         * inspector/InspectorDatabaseResource.h:
2972         * inspector/InspectorForwarding.h:
2973         * inspector/InspectorIndexedDBAgent.cpp:
2974         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
2975         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
2976         * inspector/InspectorIndexedDBAgent.h:
2977         * inspector/InspectorLayerTreeAgent.cpp:
2978         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
2979         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
2980         * inspector/InspectorLayerTreeAgent.h:
2981         * inspector/InspectorPageAgent.cpp:
2982         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
2983         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
2984         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
2985         * inspector/InspectorPageAgent.h:
2986         * inspector/InspectorReplayAgent.cpp:
2987         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
2988         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
2989         * inspector/InspectorReplayAgent.h:
2990         * inspector/InspectorResourceAgent.cpp:
2991         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
2992         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
2993         * inspector/InspectorResourceAgent.h:
2994         * inspector/InspectorStyleSheet.cpp:
2995         (WebCore::InspectorStyle::styleWithProperties):
2996         * inspector/InspectorTimelineAgent.cpp:
2997         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2998         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
2999         * inspector/InspectorTimelineAgent.h:
3000         * inspector/InspectorWorkerAgent.cpp:
3001         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
3002         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
3003         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
3004         * inspector/InspectorWorkerAgent.h:
3005         * inspector/PageRuntimeAgent.cpp:
3006         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
3007         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
3008         * inspector/PageRuntimeAgent.h:
3009         * inspector/WorkerInspectorController.cpp:
3010         (WebCore::WorkerInspectorController::~WorkerInspectorController):
3011         (WebCore::WorkerInspectorController::connectFrontend):
3012         (WebCore::WorkerInspectorController::disconnectFrontend):
3013         * inspector/WorkerInspectorController.h:
3014         * inspector/WorkerRuntimeAgent.cpp:
3015         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
3016         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
3017         * inspector/WorkerRuntimeAgent.h:
3018         * loader/EmptyClients.h:
3019         * page/PageDebuggable.cpp:
3020         (WebCore::PageDebuggable::connect):
3021         (WebCore::PageDebuggable::disconnect):
3022         * page/PageDebuggable.h:
3023         * testing/Internals.cpp:
3024         (WebCore::Internals::closeDummyInspectorFrontend):
3025         * workers/WorkerMessagingProxy.cpp:
3026         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
3027
3028 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3029
3030         REGRESSION (r180082): WebCore Debug builds fail on Mavericks due to weak export symbols
3031         <http://webkit.org/b/141607>
3032
3033         Work towards fixing the Mavericks Debug build.
3034
3035         * dom/Document.h:
3036         (WebCore::Document::setAnnotatedRegionsDirty):
3037         * dom/Event.h:
3038         (WebCore::Event::create):
3039         * dom/Node.h:
3040         (WebCore::Node::hasEditableStyle):
3041         * dom/Position.h:
3042         (WebCore::Position::Position):
3043         * editing/FrameSelection.h:
3044         (WebCore::DragCaretController::clear):
3045         * loader/ResourceLoader.h:
3046         (WebCore::ResourceLoader::originalRequest):
3047         - Do not mark inline methods for export.
3048
3049 2015-02-14  Alexey Proskuryakov  <ap@apple.com>
3050
3051         rel="noreferrer" should make window.opener null
3052         https://bugs.webkit.org/show_bug.cgi?id=141579
3053
3054         Reviewed by Darin Adler.
3055
3056         Tests: http/tests/navigation/target-blank-opener-post.html
3057                http/tests/navigation/target-blank-opener.html
3058
3059         We used to avoid passing window.opener policy by temporarily storing it in a FrameLoader
3060         member variable. This works for some clients - ones that invoke delegate callbacks
3061         synchronously - but not in the general case.
3062
3063         So, changed to passing the policy explicitly.
3064
3065         * WebCore.exp.in:
3066         * loader/FrameLoader.cpp:
3067         (WebCore::FrameLoader::FrameLoader):
3068         (WebCore::FrameLoader::urlSelected):
3069         (WebCore::FrameLoader::loadURLIntoChildFrame):
3070         (WebCore::FrameLoader::loadFrameRequest):
3071         (WebCore::FrameLoader::loadURL):
3072         (WebCore::FrameLoader::load):
3073         (WebCore::FrameLoader::loadPostRequest):
3074         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3075         * loader/FrameLoader.h:
3076         (WebCore::FrameLoader::suppressOpenerInNewFrame): Deleted.
3077         * loader/FrameLoaderTypes.h:
3078         * loader/NavigationScheduler.cpp:
3079         * page/ContextMenuController.cpp:
3080         (WebCore::openNewWindow):
3081         (WebCore::ContextMenuController::contextMenuItemSelected):
3082
3083 2015-02-14  David Kilzer  <ddkilzer@apple.com>
3084
3085         REGRESSION (r180082): WebCore build on Mountain Lion fails due to weak export for i386
3086         <rdar://problem/19838127>
3087
3088         * Configurations/WebCore.unexp: Add missing symbol.
3089
3090 2015-02-13  Chris Dumez  <cdumez@apple.com>
3091
3092         RenderListItem resets its marker's style on style change even if the diff is StyleDifferenceEqual
3093         https://bugs.webkit.org/show_bug.cgi?id=141572
3094         <rdar://problem/19759818>
3095
3096         Reviewed by Simon Fraser.
3097
3098         Do not unnecessarily update the marker's style in RenderListItem::styleDidChange()
3099         if the RenderStyle diff is StyleDifferenceEqual. Doing so can cause unnecessary
3100         layouts.
3101
3102         This was causing high cpu usage on
3103         http://www.nokogiri.org/tutorials/searching_a_xml_html_document.html because there
3104         is an animation that changes the style every second (but the diff is equal) and the
3105         RenderListItem keeps resetting its marker's margin, which triggers a layout and the
3106         RenderListMarker re-computes its margin during layout and updates its style again.
3107
3108         With this change, CPU usage on the page goes from 150% to 20%. There is only a style
3109         recalc happening every second, no more relayouts and repaints.
3110
3111         Test: fast/repaint/list-item-equal-style-change-no-repaint.html
3112
3113         * rendering/RenderListItem.cpp:
3114         (WebCore::RenderListItem::styleDidChange):
3115
3116 2015-02-13  Timothy Horton  <timothy_horton@apple.com>
3117
3118         Make WebCore::IOSurface have single ownership instead of refcounting
3119         https://bugs.webkit.org/show_bug.cgi?id=141578
3120
3121         Reviewed by Anders Carlsson.
3122
3123         In the interests of making it harder to misuse and to make it more like
3124         ImageBuffer, our IOSurface wrapper should have single ownership.
3125
3126         This will also allow future changes which depend on temporarily
3127         consuming an IOSurface to more easily enforce correct usage.
3128
3129         * WebCore.exp.in:
3130         * platform/graphics/cg/IOSurfacePool.cpp:
3131         (WebCore::IOSurfacePool::takeSurface):
3132         (WebCore::IOSurfacePool::addSurface):
3133         (WebCore::IOSurfacePool::insertSurfaceIntoPool):
3134         (WebCore::IOSurfacePool::tryEvictInUseSurface):
3135         (WebCore::IOSurfacePool::tryEvictOldestCachedSurface):
3136         (WebCore::IOSurfacePool::collectInUseSurfaces):
3137         * platform/graphics/cg/IOSurfacePool.h:
3138         * platform/graphics/cocoa/IOSurface.h:
3139         * platform/graphics/cocoa/IOSurface.mm:
3140         (IOSurface::create):
3141         (IOSurface::createFromSendRight):
3142         (IOSurface::createFromSurface):
3143         (IOSurface::createFromImage):
3144         Make IOSurface::create()s return a unique_ptr, and adjust everywhere.
3145
3146 2015-02-12  Enrica Casucci  <enrica@apple.com>
3147
3148         Additional emoji group support.
3149         https://bugs.webkit.org/show_bug.cgi?id=141539
3150         rdar://problem/19727527
3151
3152         Reviewed by Sam Weinig.
3153
3154         Adding some new emoji ligatures.
3155         Updated existing test to include the new sequences.
3156
3157         * platform/text/TextBreakIterator.cpp:
3158         (WebCore::cursorMovementIterator):
3159         * rendering/RenderText.cpp:
3160         (WebCore::isEmojiGroupCandidate):
3161
3162 2015-02-13  Alex Christensen  <achristensen@webkit.org>
3163
3164         Really stop using export files.
3165         https://bugs.webkit.org/show_bug.cgi?id=141521
3166
3167         Reviewed by Mark Rowe.
3168
3169         * Configurations/WebCore.xcconfig:
3170         Don't use exported symbols files.
3171         * Configurations/WebCore.unexp:
3172         Added list of symbols not to export (needed by Xcode 5.0.2).
3173
3174 2015-02-13  Zalan Bujtas  <zalan@apple.com>
3175
3176         Simplify ASSERT in lastRubyRun().
3177         https://bugs.webkit.org/show_bug.cgi?id=141574
3178
3179         Reviewed by Daniel Bates.
3180
3181         r180064 made some of the conditions in the ASSERT redundant.
3182
3183         Covered by existing tests.
3184
3185         * rendering/RenderRuby.cpp:
3186         (WebCore::lastRubyRun):
3187
3188 2015-02-13  Brent Fulgham  <bfulgham@apple.com>
3189
3190         [Mac, iOS] Adjust pagination behavior for Mail.app printing use
3191         https://bugs.webkit.org/show_bug.cgi?id=141569
3192         <rdar://problem/14912763>
3193
3194         Reviewed by Anders Carlsson.
3195
3196         * page/Settings.in: Add new pagination setting flag.
3197         * rendering/RenderBlockFlow.cpp:
3198         (WebCore::messageContainerName): Added.
3199         (WebCore::needsPaginationQuirk): Added.
3200         (WebCore::RenderBlockFlow::adjustLinePositionForPagination): Don't move the message content
3201         div to a new page when using this special printing mode.
3202
3203 2015-02-13  Daniel Bates  <dabates@apple.com>
3204
3205         [iOS] DumpRenderTree.app fails to link due to undefined classes
3206         <rdar://problem/19831228>
3207
3208         Following r179945, DumpRenderTree.app fails to link due to undefined symbols:
3209
3210         Undefined symbols for architecture x86_64:
3211           "_OBJC_CLASS_$_WebEvent", referenced from:
3212               objc-class-ref in libDumpRenderTree.a(EventSendingController.o)
3213           "_OBJC_CLASS_$_WebUndefined", referenced from:
3214               objc-class-ref in libDumpRenderTree.a(ObjCController.o)
3215
3216         We need to export the classes WebScriptObject and WebEvent.
3217
3218         * bindings/objc/WebScriptObject.h:
3219         * platform/ios/WebEvent.h:
3220
3221 2015-02-13  Andreas Kling  <akling@apple.com>
3222
3223         CachedResource::clearLoader() should self-destruct if nothing else retains the CachedResource.
3224         <https://webkit.org/b/141568>
3225         <rdar://problem/19800310>
3226
3227         Reviewed by Antti Koivisto.
3228
3229         Anything that may cause CachedResource::canDelete() to return true must also make sure
3230         to call CachedResource::deleteIfPossible(), or we risk leaking the CachedResource.
3231         This is because CachedResource employs an extremely convoluted lifetime mechanism that
3232         depends on its presence in a number of collections, as well as internal counters and
3233         state.
3234
3235         This is a speculative fix for a potential CachedResource leak that I'm not sure exists
3236         in practice, but let's be good citizens here.
3237
3238         * loader/cache/CachedResource.cpp:
3239         (WebCore::CachedResource::clearLoader):
3240
3241 2015-02-13  Jer Noble  <jer.noble@apple.com>
3242
3243         [MSE][Mac] Crash at WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset + 2357
3244         https://bugs.webkit.org/show_bug.cgi?id=141566
3245         rdar://problem/19826075
3246
3247         Reviewed by Andreas Kling.
3248
3249         Null check m_mediaSource before dereferencing.
3250
3251         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3252         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
3253
3254 2015-02-13  Zalan Bujtas  <zalan@apple.com>
3255
3256         REGRESSION (r174761): Invalid cast in WebCore::lastRubyRun / WebCore::RenderRubyAsBlock::addChild
3257         https://bugs.webkit.org/show_bug.cgi?id=137929
3258         rdar://problem/18723492
3259
3260         Reviewed by Chris Dumez.
3261
3262         Ensure that the child renderer is a RenderRubyRun.
3263
3264         Test: fast/ruby/crash-with-before-after-on-ruby.html
3265
3266         * rendering/RenderRuby.cpp:
3267         (WebCore::lastRubyRun):
3268
3269 2015-02-13  Simon Fraser  <simon.fraser@apple.com>
3270
3271         Crashes under RenderLayer::hitTestLayer under determinePrimarySnapshottedPlugIn()
3272         https://bugs.webkit.org/show_bug.cgi?id=141551
3273
3274         Reviewed by Zalan Bujtas.
3275         
3276         It's possible for a layout to dirty the parent frame's state, via the calls to
3277         ownerElement()->scheduleSetNeedsStyleRecalc() that RenderLayerCompositor does when
3278         iframes toggle their compositing mode.
3279         
3280         That could cause FrameView::updateLayoutAndStyleIfNeededRecursive() to fail to 
3281         leave all the frames in a clean state. Later on, we could enter hit testing,
3282         which calls document().updateLayout() on each frame's document. Document::updateLayout()
3283         does layout on all ancestor documents, so in the middle of hit testing, we could
3284         layout a subframe (dirtying an ancestor frame), then layout another frame, which
3285         would forcing that ancestor to be laid out while we're hit testing it, thus
3286         corrupting the RenderLayer tree while it's being iterated over.
3287         
3288         Fix by having FrameView::updateLayoutAndStyleIfNeededRecursive() do a second
3289         layout after laying out subframes, which most of the time will be a no-op.
3290         
3291         Also add a stronger assertion, that this frame and all subframes are clean
3292         at the end of FrameView::updateLayoutAndStyleIfNeededRecursive() for the
3293         main frame.
3294
3295         Various existing frames tests hit the new assertion if the code change is removed,
3296         so this is covered by existing tests.
3297
3298         * page/FrameView.cpp:
3299         (WebCore::FrameView::needsStyleRecalcOrLayout):
3300         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
3301         * page/FrameView.h:
3302         * rendering/RenderWidget.cpp:
3303         (WebCore::RenderWidget::willBeDestroyed):
3304
3305 2015-02-12  Simon Fraser  <simon.fraser@apple.com>
3306
3307         determinePrimarySnapshottedPlugIn() should only traverse visible Frames
3308         https://bugs.webkit.org/show_bug.cgi?id=141547
3309         Part of rdar://problem/18445733.
3310
3311         Reviewed by Anders Carlsson.
3312
3313         There's an expectation from clients that FrameView::updateLayoutAndStyleIfNeededRecursive()
3314         updates layout in all frames, but it uses the widget tree, so only hits frames
3315         that are parented via renderers (i.e. not display:none frames or their descendants).
3316         
3317         Moving towards a future where we remove Widgets, fix by adding a FrameTree 
3318         traversal function that only finds rendered frames (those with an ownerRenderer).
3319         
3320         Not testable.
3321
3322         * page/FrameTree.cpp:
3323         (WebCore::FrameTree::firstRenderedChild):
3324         (WebCore::FrameTree::nextRenderedSibling):
3325         (WebCore::FrameTree::traverseNextRendered):
3326         (printFrames):
3327         * page/FrameTree.h:
3328         * page/FrameView.cpp:
3329         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
3330
3331 2015-02-13  Alexey Proskuryakov  <ap@apple.com>
3332
3333         TimerBase::m_heapInsertionOrder calculation is racy
3334         https://bugs.webkit.org/show_bug.cgi?id=141554
3335
3336         Reviewed by Anders Carlsson.
3337
3338         Use an atomic increment.
3339
3340         * platform/Timer.cpp: (WebCore::TimerBase::setNextFireTime):
3341
3342 2015-02-13  Andreas Kling  <akling@apple.com>
3343
3344         [iOS] Refine GC behavior in response to process suspension and memory pressure.
3345         <https://webkit.org/b/141543>
3346         <rdar://problem/19738024>
3347
3348         Reviewed by Geoffrey Garen.
3349
3350         Do an immediate full garbage collection when the web process is about to
3351         be suspended (when another tab is moving to the foreground on iOS.)
3352         This ensures that we make a best effort to reduce the process footprint
3353         before we lose the ability to execute code.
3354
3355         When receiving a memory pressure warning, tell the garbage collector to
3356         accelerate its next collection (by calling garbageCollectSoon().)
3357         This gives us some confidence that a collection will happen within a
3358         reasonable timeframe, but doesn't risk dooming us to a loop of endless
3359         garbage collections.
3360
3361         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3362         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3363
3364 2015-02-13  Antti Koivisto  <antti@apple.com>
3365
3366         Add some RELEASE_ASSERTs to try to catch crashes in StyleResolver::loadPendingImages
3367         https://bugs.webkit.org/show_bug.cgi?id=141561
3368
3369         Reviewed by Simon Fraser.
3370
3371         One possibility is that loads triggered by loadPendingImages end up synchronously destroying or re-entering
3372         style resolver. Try to catch these in release builds.
3373
3374         * css/StyleResolver.cpp:
3375         (WebCore::StyleResolver::~StyleResolver):
3376         (WebCore::StyleResolver::styleForElement):
3377         (WebCore::StyleResolver::styleForKeyframe):
3378         (WebCore::StyleResolver::styleForPage):
3379         (WebCore::StyleResolver::loadPendingImages):
3380         * css/StyleResolver.h:
3381
3382 2015-02-13  ChangSeok Oh  <changseok.oh@collabora.com>
3383
3384         Div having contentEditable and display:grid cannot be edited if it is empty.
3385         https://bugs.webkit.org/show_bug.cgi?id=141465
3386
3387         Reviewed by Ryosuke Niwa.
3388
3389         This bug is quite similar to webkit.org/b/141218. RenderGrid should be also treated as a candidate
3390         for visible position as like RenderFlexibleBox. The only different situation between them is
3391         that RenderGrid has a bug setting "0px" for logicalHeight when it is empty. RenderGrid should also have
3392         a minimum height of a single line if it is editable as well as RenderFlexibleBox does.
3393
3394         Test: fast/events/key-events-in-editable-gridbox.html
3395
3396         * dom/Position.cpp:
3397         (WebCore::Position::isCandidate):
3398         (WebCore::Position::isRenderedCharacter):
3399         * rendering/RenderGrid.cpp:
3400         (WebCore::RenderGrid::layoutGridItems):
3401
3402 2015-02-12  Zalan Bujtas  <zalan@apple.com>
3403
3404         REGRESSION (r176262): Invalid cast in WebCore`WebCore::RootInlineBox::selectionTop
3405         https://bugs.webkit.org/show_bug.cgi?id=138992
3406
3407         Reviewed by Dave Hyatt.
3408
3409         RenderRubyText requires the ancestor chain to be (RenderRubyAsInline | RenderRubyAsBlock) -> RenderRubyRun -> RenderRubyText.
3410         This patch ensures that we create RenderRubyText for an <rt> element only when
3411         the expected ancestor chain is guaranteed.
3412
3413         Test: fast/ruby/crash-when-ruby-is-set-to-inline-block.html
3414
3415         * rendering/RenderElement.cpp:
3416         (WebCore::RenderElement::createFor): treat inline-block <ruby> as block.
3417         * rendering/RenderObject.h:
3418         (WebCore::RenderObject::isRubyInline):
3419         (WebCore::RenderObject::isRubyBlock):
3420         (WebCore::RenderObject::isRuby): Deleted.
3421         * rendering/RenderRuby.cpp:
3422         (WebCore::isAnonymousRubyInlineBlock):
3423         * rendering/RenderRuby.h: add support for is<RenderRubyAsBlock>(renderer) and for is<RenderRubyAsInline>(renderer)
3424         The isRuby() method does not follow the is*() -> maps to one class pattern.
3425         (WebCore::isRuby):
3426         * rendering/RenderRubyRun.cpp:
3427  &n