[Streams API] Error storage should be moved from source to stream/reader
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2
3         [Streams API] Error storage should be moved from source to stream/reader
4         https://bugs.webkit.org/show_bug.cgi?id=143048
5
6         Reviewed by Benjamin Poulain.
7
8         This patch removes error storage from the source as it should be stored at the stream level as error access goes through the reader.
9         It removes abstract ReadableStreamSource::isErrored and the storage of JavaScript errors from ReadableStreamJSSource.
10
11         Existing tests cover most of the changes.
12         Added test case for creating readable stream from empty JS object.
13
14         * Modules/streams/ReadableStreamSource.h: Removing isErrored().
15         * bindings/js/JSReadableStreamCustom.cpp:
16         (WebCore::constructJSReadableStream): Added JS stream constructor parameters checking.
17         * bindings/js/ReadableStreamJSSource.cpp:
18         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource): Removed JS stream constructor parameters checking.
19         (WebCore::ReadableStreamJSSource::start): Changed prototype of start so that start can throw errors directly.
20         (WebCore::ReadableStreamJSSource::setInternalError): Deleted.
21         * bindings/js/ReadableStreamJSSource.h: Removed m_error, setInternalError and updated start declaration.
22
23 2015-03-30  Philippe Normand  <pnormand@igalia.com>
24
25         [GStreamer] More GL shared context fixes
26         https://bugs.webkit.org/show_bug.cgi?id=143216
27
28         Reviewed by Carlos Garcia Campos.
29
30         Moved the GLX/EGL context tests to be done at runtime rather than
31         using build-time macros because in the GTK port at least, both EGL
32         and GLX support are mutually exclusive. Also fixed a couple wrong
33         defines (USE(GLES2) doesn't exist).
34
35         * platform/graphics/GLContext.h: Simple utility method to check if
36         the platform context is compatible with EGL APIs or not.
37         * platform/graphics/egl/GLContextEGL.h:
38         (WebCore::GLContextEGL::isEGLContext):
39         * platform/graphics/glx/GLContextGLX.h:
40         (WebCore::GLContextGLX::isEGLContext):
41         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
42         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Do
43         runtime checks and properly ensure GLES2/GL API usage.
44
45 2015-03-30  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
46
47         Add support for deleting emoji on GTK
48         https://bugs.webkit.org/show_bug.cgi?id=141419
49
50         Reviewed by Gustavo Noronha Silva.
51
52         The code for deleting special group of characters was specific for
53         COCOA and EFL platforms. The fix consists on add GTK to the #if
54         preprocessor directive.
55
56         * rendering/RenderText.cpp:
57         (WebCore::RenderText::previousOffsetForBackwardDeletion):
58
59 2015-03-30  Benjamin Poulain  <benjamin@webkit.org>
60
61         Start the features.json files
62         https://bugs.webkit.org/show_bug.cgi?id=143207
63
64         Reviewed by Darin Adler.
65
66         * features.json: Added.
67
68 2015-03-29  Simon Fraser  <simon.fraser@apple.com>
69
70         Convert arguments to ScrollingCoordinator functions to references
71         https://bugs.webkit.org/show_bug.cgi?id=143198
72
73         Reviewed by Darin Adler.
74
75         Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
76         references, and use references in a few other places.
77
78         * dom/Document.cpp:
79         (WebCore::wheelEventHandlerCountChanged):
80         * loader/HistoryController.cpp:
81         (WebCore::HistoryController::restoreScrollPositionAndViewState):
82         * page/DebugPageOverlays.cpp:
83         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
84         * page/Frame.cpp:
85         (WebCore::Frame::willDetachPage):
86         * page/FrameView.cpp:
87         (WebCore::FrameView::prepareForDetach):
88         (WebCore::FrameView::addSlowRepaintObject):
89         (WebCore::FrameView::removeSlowRepaintObject):
90         (WebCore::FrameView::addViewportConstrainedObject):
91         (WebCore::FrameView::removeViewportConstrainedObject):
92         (WebCore::FrameView::requestScrollPositionUpdate):
93         (WebCore::FrameView::performPostLayoutTasks):
94         (WebCore::FrameView::scrollableAreaSetChanged):
95         (WebCore::FrameView::wheelEvent):
96         * page/Page.cpp:
97         (WebCore::Page::nonFastScrollableRects):
98         * page/Page.h:
99         * page/scrolling/AsyncScrollingCoordinator.cpp:
100         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
101         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
102         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
103         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
104         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
105         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
106         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
107         (WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
108         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
109         * page/scrolling/AsyncScrollingCoordinator.h:
110         * page/scrolling/ScrollingCoordinator.cpp:
111         (WebCore::ScrollingCoordinator::pageDestroyed):
112         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
113         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
114         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
115         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
116         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
117         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
118         (WebCore::ScrollingCoordinator::scrollLayerForFrameView):
119         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
120         (WebCore::ScrollingCoordinator::footerLayerForFrameView):
121         (WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
122         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
123         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
124         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
125         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
126         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
127         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
128         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
129         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
130         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
131         (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
132         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
133         * page/scrolling/ScrollingCoordinator.h: Align the bitmask enums to make mistakes easier to spot.
134         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
135         (WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
136         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
137         (WebCore::ScrollingCoordinator::handleWheelEvent):
138         (WebCore::ScrollingCoordinator::willDestroyScrollableArea):
139         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
140         (WebCore::ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
141         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
142         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
143         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
144         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
145         (WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate):
146         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
147         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
148         * page/scrolling/mac/ScrollingCoordinatorMac.h:
149         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
150         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
151         * rendering/RenderLayer.cpp:
152         (WebCore::RenderLayer::~RenderLayer):
153         * rendering/RenderLayerBacking.cpp:
154         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
155         * rendering/RenderLayerCompositor.cpp:
156         (WebCore::RenderLayerCompositor::updateBacking):
157         (WebCore::RenderLayerCompositor::hasCoordinatedScrolling):
158         (WebCore::RenderLayerCompositor::scrollingLayerDidChange):
159         (WebCore::RenderLayerCompositor::updateLayerForHeader):
160         (WebCore::RenderLayerCompositor::updateLayerForFooter):
161         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
162         (WebCore::RenderLayerCompositor::destroyRootLayer):
163         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
164         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
165         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
166         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
167         * testing/Internals.cpp:
168         (WebCore::Internals::nonFastScrollableRects):
169
170 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
171
172         Use :matches() instead of :-webkit-any() for the sections and headings default style
173         https://bugs.webkit.org/show_bug.cgi?id=143197
174
175         Reviewed by Darin Adler.
176
177         We no longer need to use the :-webkit-any() hack in the default stylesheet.
178
179         The pseudo class :matches() also support correct specificity. This is not observable
180         since those selector do not conflict with any other rule in the default stylesheet.
181
182         * css/CSSSelector.h:
183         * css/SelectorChecker.cpp:
184         (WebCore::SelectorChecker::determineLinkMatchType):
185         * css/html.css:
186         (:matches(article, aside, nav, section) h1):
187         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
188         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
189         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
190         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
191         (:-webkit-any(article,aside,nav,section) h1): Deleted.
192         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
193         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
194         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
195         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
196
197 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
198
199         `currentColor` computes to the same colour on all elements, even if 'color' is inherited differently
200         https://bugs.webkit.org/show_bug.cgi?id=133420
201
202         Reviewed by Darin Adler.
203
204         When resolving a style with the help of the property cache, we were
205         completely ignoring currentColor.
206
207         Since you can set currentColor on properties that are not inherited,
208         those properties would just be copied from the cached style, which
209         may have a completely different inherited color.
210
211         This pacth fixes the issue by preventing any MatchResult from hitting
212         the cache if it contains any non-inherited property that would require
213         resolution by the cache:
214         -Using the inherit value.
215         -Using the currentColor value.
216
217         Tests: fast/css/currentColor-on-before-after-pseudo-elements.html
218                fast/css/currentColor-style-update-reftest.html
219                fast/css/currentColor-value-style-update.html
220
221         * css/ElementRuleCollector.cpp:
222         (WebCore::ElementRuleCollector::addElementStyleProperties):
223         (WebCore::ElementRuleCollector::matchAuthorRules):
224         (WebCore::ElementRuleCollector::matchUserRules):
225         (WebCore::ElementRuleCollector::matchUARules):
226         * css/StyleResolver.cpp:
227         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
228         (WebCore::StyleResolver::styleForKeyframe):
229         (WebCore::StyleResolver::pseudoStyleForElement):
230         (WebCore::StyleResolver::styleForPage):
231         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
232         (WebCore::StyleResolver::addToMatchedPropertiesCache):
233         (WebCore::extractDirectionAndWritingMode):
234         (WebCore::StyleResolver::applyMatchedProperties):
235         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
236         (WebCore::StyleResolver::CascadedProperties::addMatches):
237         * css/StyleResolver.h:
238         (WebCore::StyleResolver::MatchResult::matchedProperties):
239
240 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
241
242         Enable :any-link by default
243         https://bugs.webkit.org/show_bug.cgi?id=143201
244
245         Reviewed by Sam Weinig.
246
247         The pseudo class :any-link has been stable for a while. This patch enables
248         it by default and remove the -webkit- prefix on the default style.
249
250         * css/CSSDefaultStyleSheets.cpp:
251         * css/CSSSelector.cpp:
252         (WebCore::CSSSelector::selectorText):
253         * css/CSSSelector.h:
254         * css/RuleSet.cpp:
255         (WebCore::RuleSet::addRule):
256         * css/SelectorChecker.cpp:
257         (WebCore::SelectorChecker::checkOne):
258         * css/SelectorChecker.h:
259         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
260         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
261         * css/html.css:
262         (a:any-link):
263         (a:any-link:active):
264         (:any-link img):
265         (a:-webkit-any-link): Deleted.
266         (a:-webkit-any-link:active): Deleted.
267         (:-webkit-any-link img): Deleted.
268         * cssjit/SelectorCompiler.cpp:
269         (WebCore::SelectorCompiler::addPseudoClassType):
270         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
271
272 2015-03-29  Joonghun Park  <jh718.park@samsung.com>
273
274         nullptr cleanup in RenderFooBox classes
275         https://bugs.webkit.org/show_bug.cgi?id=143182
276
277         Reviewed by Ryosuke Niwa.
278
279         No new tests, no behavior changes
280
281         Replace 0 with nullptr in RenderFooBox classes.
282
283         * rendering/RenderBox.cpp:
284         (WebCore::RenderBox::RenderBox):
285         (WebCore::RenderBox::paintFillLayer):
286         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
287         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
288         (WebCore::RenderBox::renderBoxRegionInfo):
289         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
290         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
291         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
292         (WebCore::RenderBox::positionForPoint):
293         (WebCore::RenderBox::layoutOverflowRectForPropagation):
294         * rendering/RenderBox.h:
295         (WebCore::RenderBox::setMarginBefore):
296         (WebCore::RenderBox::setMarginAfter):
297         (WebCore::RenderBox::setMarginStart):
298         (WebCore::RenderBox::setMarginEnd):
299         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
300         (WebCore::RenderBox::setInlineBoxWrapper):
301         * rendering/RenderBoxModelObject.cpp:
302         (WebCore::RenderBoxModelObject::willBeDestroyed):
303         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
304         (WebCore::RenderBoxModelObject::paintBorderSides):
305         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
306         * rendering/RenderBoxModelObject.h:
307         (WebCore::RenderBoxModelObject::moveChildTo):
308         (WebCore::RenderBoxModelObject::moveAllChildrenTo):
309         (WebCore::RenderBoxModelObject::moveChildrenTo):
310         * rendering/RenderDeprecatedFlexibleBox.cpp:
311         (WebCore::FlexBoxIterator::reset):
312         (WebCore::FlexBoxIterator::next):
313         * rendering/RenderDeprecatedFlexibleBox.h:
314         * rendering/RenderFlexibleBox.cpp:
315         (WebCore::RenderFlexibleBox::firstLineBaseline):
316         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
317         * rendering/RenderLineBoxList.cpp:
318         (WebCore::RenderLineBoxList::deleteLineBoxTree):
319         (WebCore::RenderLineBoxList::extractLineBox):
320         (WebCore::RenderLineBoxList::deleteLineBoxes):
321         (WebCore::RenderLineBoxList::checkConsistency):
322         * rendering/RenderLineBoxList.h:
323         (WebCore::RenderLineBoxList::RenderLineBoxList):
324         * rendering/RenderListBox.cpp:
325         (WebCore::RenderListBox::enclosingScrollableArea):
326         (WebCore::RenderListBox::setHasVerticalScrollbar):
327         * rendering/RenderListBox.h:
328
329 2015-03-29  Darin Adler  <darin@apple.com>
330
331         HTMLCollection caches incorrect length if item(0) is called before length on an empty collection
332         https://bugs.webkit.org/show_bug.cgi?id=143203
333         rdar://problem/18460462
334
335         Reviewed by Antti Koivisto.
336
337         Test: fast/dom/htmlcollection-length-after-item-2.html
338
339         * dom/CollectionIndexCache.h:
340         (CollectionIndexCache::nodeAt): If we hit the end looking for index 0, cache a length
341         of 0, not a length of 1.
342
343 2015-03-29  Darin Adler  <darin@apple.com>
344
345         Remove unneeded SVG code, including most isSupportedAttribute functions
346         https://bugs.webkit.org/show_bug.cgi?id=143194
347
348         Reviewed by Antti Koivisto.
349
350         - Removed most implementations of isSupportedAttribute. Others can be removed in
351           future patches. The ones left behind are now all private static member functions.
352           It's dangerous for them to be public because they tend to indicate which attributes
353           are supported at a particular level in the class hierarchy and they are not virtual
354           functions; might want to rethink the function name if we keep any of these long term.
355
356         - Removed unneeded includes, especially of Attr.h and Attribute.h.
357
358         - Changed most parseAttribute and svgAttributeChanged functions so they no longer
359           rely on checking attribute names against a set. Also removed lots of unneeded calls
360           to SVGLangSpace::parseAttribute, which is called by SVGElement::parseAttribute and
361           need not be called by derived classes.
362
363         - Removed return values from parseAttribute functions. Skipping other parseAttribute
364           logic is not an important optimization and makes functions needlessly complex.
365
366         - Moved use of InstanceInvalidationGuard closer to where they are needed. Eventually
367           we may be able to remove many of these.
368
369         - Used auto in a few places where the same type is repeated twice on the same line of
370           code, and auto makes it a bit smaller.
371
372         - Got rid of protected sections in some final classes; doesn't make sense to combine
373           these two. Also moved a few functions from protected to private in other classes.
374
375         - Made a number of functions into static member functions in the base classes such
376           as SVGLangSpace; they were not making any use of the object, and so it was wasteful
377           to compile them as non-static member functions.
378
379         * rendering/svg/RenderSVGImage.cpp: Removed unneeded includes.
380         * svg/SVGAElement.cpp: Removed unneeded includes.
381         (WebCore::SVGAElement::isSupportedAttribute): Deleted.
382         (WebCore::SVGAElement::parseAttribute): Don't use isSupportedAttribute.
383         (WebCore::SVGAElement::svgAttributeChanged): Don't use isSupportedAttribute.
384         * svg/SVGAElement.h: Removed isSupportedAttribute.
385         * svg/SVGAnimateMotionElement.cpp: Removed unneeded includes.
386         (WebCore::SVGAnimateMotionElement::isSupportedAttribute): Deleted.
387         (WebCore::SVGAnimateMotionElement::parseAttribute): Don't use isSupportedAttribute.
388         * svg/SVGAnimateMotionElement.h: Removed isSupportedAttribute.
389         * svg/SVGAnimateTransformElement.cpp:
390         (WebCore::SVGAnimateTransformElement::isSupportedAttribute): Deleted.
391         (WebCore::SVGAnimateTransformElement::parseAttribute): Don't use isSupportedAttribute.
392         * svg/SVGAnimateTransformElement.h: Removed isSupportedAttribute.
393         * svg/SVGAnimationElement.cpp:
394         (WebCore::SVGAnimationElement::parseAttribute): Don't use isSupportedAttribute.
395         * svg/SVGCircleElement.cpp:
396         (WebCore::SVGCircleElement::isSupportedAttribute): Deleted.
397         (WebCore::SVGCircleElement::parseAttribute): Don't use isSupportedAttribute.
398         (WebCore::SVGCircleElement::svgAttributeChanged): Don't use isSupportedAttribute.
399         * svg/SVGCircleElement.h: Removed isSupportedAttribute.
400         * svg/SVGClipPathElement.cpp: Removed unneeded includes.
401         (WebCore::SVGClipPathElement::parseAttribute): Don't use isSupportedAttribute.
402         * svg/SVGComponentTransferFunctionElement.cpp:
403         (WebCore::SVGComponentTransferFunctionElement::parseAttribute): Don't use isSupportedAttribute.
404         * svg/SVGCursorElement.cpp: Removed unneeded includes.
405         (WebCore::SVGCursorElement::parseAttribute): Don't use isSupportedAttribute.
406         (WebCore::SVGCursorElement::svgAttributeChanged): Don't use isSupportedAttribute.
407         * svg/SVGElement.cpp: Removed unneeded includes.
408         * svg/SVGEllipseElement.cpp: Removed unneeded includes.
409         (WebCore::SVGEllipseElement::isSupportedAttribute): Deleted.
410         (WebCore::SVGEllipseElement::parseAttribute): Don't use isSupportedAttribute.
411         (WebCore::SVGEllipseElement::svgAttributeChanged): Don't use isSupportedAttribute.
412         * svg/SVGEllipseElement.h: Removed isSupportedAttribute.
413         * svg/SVGExternalResourcesRequired.cpp: Removed unneeded includes.
414         (WebCore::SVGExternalResourcesRequired::parseAttribute): Don't return a boolean.
415         * svg/SVGExternalResourcesRequired.h: Don't return a boolean.
416         * svg/SVGFEBlendElement.cpp: Removed unneeded includes.
417         (WebCore::SVGFEBlendElement::isSupportedAttribute): Deleted.
418         (WebCore::SVGFEBlendElement::parseAttribute): Don't use isSupportedAttribute.
419         (WebCore::SVGFEBlendElement::svgAttributeChanged): Don't use isSupportedAttribute.
420         * svg/SVGFEBlendElement.h: Removed isSupportedAttribute.
421         * svg/SVGFEColorMatrixElement.cpp: Removed unneeded includes.
422         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): Deleted.
423         (WebCore::SVGFEColorMatrixElement::parseAttribute): Don't use isSupportedAttribute.
424         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
425         * svg/SVGFEColorMatrixElement.h: Removed isSupportedAttribute.
426         * svg/SVGFEComponentTransferElement.cpp: Removed unneeded includes.
427         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): Deleted.
428         (WebCore::SVGFEComponentTransferElement::parseAttribute): Don't use isSupportedAttribute.
429         * svg/SVGFEComponentTransferElement.h: Removed unneeded includes.
430         * svg/SVGFECompositeElement.cpp: Removed unneeded includes.
431         (WebCore::SVGFECompositeElement::isSupportedAttribute): Deleted.
432         (WebCore::SVGFECompositeElement::parseAttribute): Don't use isSupportedAttribute.
433         (WebCore::SVGFECompositeElement::svgAttributeChanged): Don't use isSupportedAttribute.
434         * svg/SVGFECompositeElement.h:
435         * svg/SVGFEConvolveMatrixElement.cpp: Removed unneeded includes.
436         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): Deleted.
437         (WebCore::SVGFEConvolveMatrixElement::parseAttribute): Don't use isSupportedAttribute.
438         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
439         * svg/SVGFEConvolveMatrixElement.h:
440         * svg/SVGFEDiffuseLightingElement.cpp: Removed unneeded includes.
441         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): Deleted.
442         (WebCore::SVGFEDiffuseLightingElement::parseAttribute): Don't use isSupportedAttribute.
443         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
444         * svg/SVGFEDiffuseLightingElement.h:
445         * svg/SVGFEDisplacementMapElement.cpp: Removed unneeded includes.
446         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): Deleted.
447         (WebCore::SVGFEDisplacementMapElement::parseAttribute): Don't use isSupportedAttribute.
448         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Don't use isSupportedAttribute.
449         * svg/SVGFEDisplacementMapElement.h:
450         * svg/SVGFEDropShadowElement.cpp: Removed unneeded includes.
451         (WebCore::SVGFEDropShadowElement::isSupportedAttribute): Deleted.
452         (WebCore::SVGFEDropShadowElement::parseAttribute): Don't use isSupportedAttribute.
453         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Don't use isSupportedAttribute.
454         * svg/SVGFEDropShadowElement.h:
455         * svg/SVGFEFloodElement.cpp: Removed unneeded includes.
456         * svg/SVGFEGaussianBlurElement.cpp: Removed unneeded includes.
457         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): Deleted.
458         (WebCore::SVGFEGaussianBlurElement::parseAttribute): Don't use isSupportedAttribute.
459         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Don't use isSupportedAttribute.
460         * svg/SVGFEGaussianBlurElement.h:
461         * svg/SVGFEImageElement.cpp: Removed unneeded includes.
462         (WebCore::SVGFEImageElement::isSupportedAttribute): Deleted.
463         (WebCore::SVGFEImageElement::parseAttribute): Don't use isSupportedAttribute.
464         (WebCore::SVGFEImageElement::svgAttributeChanged): Don't use isSupportedAttribute.
465         * svg/SVGFEImageElement.h:
466         * svg/SVGFELightElement.cpp: Removed unneeded includes.
467         (WebCore::SVGFELightElement::isSupportedAttribute): Deleted.
468         (WebCore::SVGFELightElement::parseAttribute): Don't use isSupportedAttribute.
469         (WebCore::SVGFELightElement::svgAttributeChanged): Don't use isSupportedAttribute.
470         * svg/SVGFELightElement.h:
471         * svg/SVGFEMergeNodeElement.cpp: Removed unneeded includes.
472         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): Deleted.
473         (WebCore::SVGFEMergeNodeElement::parseAttribute): Don't use isSupportedAttribute.
474         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Don't use isSupportedAttribute.
475         * svg/SVGFEMergeNodeElement.h:
476         * svg/SVGFEMorphologyElement.cpp: Removed unneeded includes.
477         (WebCore::SVGFEMorphologyElement::isSupportedAttribute): Deleted.
478         (WebCore::SVGFEMorphologyElement::parseAttribute): Don't use isSupportedAttribute.
479         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Don't use isSupportedAttribute.
480         * svg/SVGFEMorphologyElement.h:
481         * svg/SVGFEOffsetElement.cpp: Removed unneeded includes.
482         (WebCore::SVGFEOffsetElement::isSupportedAttribute): Deleted.
483         (WebCore::SVGFEOffsetElement::parseAttribute): Don't use isSupportedAttribute.
484         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Don't use isSupportedAttribute.
485         * svg/SVGFEOffsetElement.h:
486         * svg/SVGFESpecularLightingElement.cpp: Removed unneeded includes.
487         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): Deleted.
488         (WebCore::SVGFESpecularLightingElement::parseAttribute): Don't use isSupportedAttribute.
489         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
490         * svg/SVGFESpecularLightingElement.h:
491         * svg/SVGFETileElement.cpp: Removed unneeded includes.
492         (WebCore::SVGFETileElement::isSupportedAttribute): Deleted.
493         (WebCore::SVGFETileElement::parseAttribute): Don't use isSupportedAttribute.
494         (WebCore::SVGFETileElement::svgAttributeChanged): Don't use isSupportedAttribute.
495         * svg/SVGFETileElement.h:
496         * svg/SVGFETurbulenceElement.cpp: Removed unneeded includes.
497         (WebCore::SVGFETurbulenceElement::isSupportedAttribute): Deleted.
498         (WebCore::SVGFETurbulenceElement::parseAttribute): Don't use isSupportedAttribute.
499         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Don't use isSupportedAttribute.
500         * svg/SVGFETurbulenceElement.h:
501         * svg/SVGFilterElement.cpp: Removed unneeded includes.
502         (WebCore::SVGFilterElement::parseAttribute): Don't use isSupportedAttribute.
503         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Removed unneeded includes.
504         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): Don't use isSupportedAttribute.
505         * svg/SVGFilterPrimitiveStandardAttributes.h: Removed isSupportedAttribute and also moved a
506         couple functions out of the class definition.
507         * svg/SVGFitToViewBox.cpp: Removed unneeded includes.
508         * svg/SVGFontFaceElement.cpp: Removed unneeded includes.
509         * svg/SVGFontFaceUriElement.cpp: Removed unneeded includes.
510         * svg/SVGForeignObjectElement.cpp: Removed unneeded includes.
511         (WebCore::SVGForeignObjectElement::parseAttribute): Don't use isSupportedAttribute.
512         * svg/SVGGElement.cpp: Removed unneeded includes.
513         (WebCore::SVGGElement::parseAttribute): Don't use isSupportedAttribute.
514         * svg/SVGGlyphElement.cpp: Removed unneeded includes.
515         * svg/SVGGlyphRefElement.cpp: Removed unneeded includes.
516         (WebCore::SVGGlyphRefElement::hasValidGlyphElement): Rewrote to use is<> instead of hasTagName.
517         (WebCore::SVGGlyphRefElement::parseAttribute): Don't use return value from SVGURIReference::parseAttribute.
518         * svg/SVGGradientElement.cpp: Removed unneeded includes.
519         (WebCore::SVGGradientElement::parseAttribute): Don't use isSupportedAttribute.
520         * svg/SVGGraphicsElement.cpp: Removed unneeded includes.
521         (WebCore::SVGGraphicsElement::parseAttribute): Don't use isSupportedAttribute.
522         * svg/SVGImageElement.cpp: Removed unneeded includes.
523         (WebCore::SVGImageElement::parseAttribute): Don't use isSupportedAttribute.
524         * svg/SVGLangSpace.cpp: Removed unneeded includes.
525         (WebCore::SVGLangSpace::parseAttribute): Removed the return value.
526         * svg/SVGLangSpace.h: Converted functions to static member functions and removed the
527         return value from parseAttribute.
528         * svg/SVGLineElement.cpp: Removed unneeded includes.
529         (WebCore::SVGLineElement::parseAttribute): Don't use isSupportedAttribute.
530         * svg/SVGLinearGradientElement.cpp: Removed unneeded includes.
531         (WebCore::SVGLinearGradientElement::parseAttribute): Don't use isSupportedAttribute.
532         * svg/SVGMPathElement.cpp: Removed unneeded includes.
533         (WebCore::SVGMPathElement::isSupportedAttribute): Deleted.
534         (WebCore::SVGMPathElement::parseAttribute): Don't use isSupportedAttribute.
535         (WebCore::SVGMPathElement::svgAttributeChanged): Don't use isSupportedAttribute.
536         * svg/SVGMPathElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
537         private instead of protected.
538         * svg/SVGMarkerElement.cpp: Removed unneeded includes.
539         (WebCore::SVGMarkerElement::parseAttribute): Don't use isSupportedAttribute.
540         * svg/SVGMaskElement.cpp: Removed unneeded includes.
541         (WebCore::SVGMaskElement::parseAttribute): Don't use isSupportedAttribute.
542         * svg/SVGPathElement.cpp: Removed unneeded includes.
543         (WebCore::SVGPathElement::parseAttribute): Don't use isSupportedAttribute.
544         * svg/SVGPatternElement.cpp: Removed unneeded includes.
545         (WebCore::SVGPatternElement::parseAttribute): Don't use isSupportedAttribute.
546         * svg/SVGPolyElement.cpp: Removed unneeded includes.
547         (WebCore::SVGPolyElement::isSupportedAttribute): Deleted.
548         (WebCore::SVGPolyElement::parseAttribute): Don't use isSupportedAttribute.
549         (WebCore::SVGPolyElement::svgAttributeChanged): Don't use isSupportedAttribute.
550         * svg/SVGPolyElement.h:
551         * svg/SVGRadialGradientElement.cpp: Removed unneeded includes.
552         (WebCore::SVGRadialGradientElement::parseAttribute): Don't use isSupportedAttribute.
553         * svg/SVGRectElement.cpp: Removed unneeded includes.
554         (WebCore::SVGRectElement::isSupportedAttribute): Deleted.
555         (WebCore::SVGRectElement::parseAttribute): Don't use isSupportedAttribute.
556         (WebCore::SVGRectElement::svgAttributeChanged): Don't use isSupportedAttribute.
557         * svg/SVGRectElement.h:
558         * svg/SVGSVGElement.cpp: Removed unneeded includes.
559         (WebCore::SVGSVGElement::parseAttribute): Don't use isSupportedAttribute.
560         * svg/SVGScriptElement.cpp: Removed unneeded includes.
561         * svg/SVGStopElement.cpp: Removed unneeded includes.
562         (WebCore::SVGStopElement::isSupportedAttribute): Deleted.
563         (WebCore::SVGStopElement::parseAttribute): Don't use isSupportedAttribute.
564         (WebCore::SVGStopElement::svgAttributeChanged): Don't use isSupportedAttribute.
565         * svg/SVGStopElement.h: Removed isSupportedAttribute.
566         * svg/SVGStyleElement.cpp: Removed unneeded includes.
567         (WebCore::SVGStyleElement::isSupportedAttribute): Deleted.
568         (WebCore::SVGStyleElement::parseAttribute): Don't use isSupportedAttribute.
569         * svg/SVGStyleElement.h: Removed isSupportedAttribute.
570         * svg/SVGSymbolElement.cpp: Removed unneeded includes.
571         (WebCore::SVGSymbolElement::isSupportedAttribute): Deleted.
572         (WebCore::SVGSymbolElement::parseAttribute): Don't use isSupportedAttribute.
573         (WebCore::SVGSymbolElement::svgAttributeChanged): Don't use isSupportedAttribute.
574         * svg/SVGSymbolElement.h: Removed isSupportedAttribute.
575         * svg/SVGTRefElement.cpp: Removed unneeded includes.
576         (WebCore::SVGTRefElement::isSupportedAttribute): Deleted.
577         (WebCore::SVGTRefElement::parseAttribute): Don't use isSupportedAttribute.
578         (WebCore::SVGTRefElement::svgAttributeChanged): Don't use isSupportedAttribute.
579         * svg/SVGTRefElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
580         private instead of protected.
581         * svg/SVGTests.cpp: Removed unneeded includes.
582         (WebCore::SVGTests::parseAttribute): Removed return value.
583         * svg/SVGTests.h: Removed return value of parseAttribute.
584         * svg/SVGTextContentElement.cpp: Removed unneeded includes.
585         (WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Don't use
586         isSupportedAttribute. Also removed global to optimize comparing attribute value against
587         the string "preserve".
588         (WebCore::SVGTextContentElement::parseAttribute): Don't use isSupportedAttribute.
589         (WebCore::SVGTextContentElement::svgAttributeChanged): Don't use isSupportedAttribute.
590         * svg/SVGTextContentElement.h: Made isSupportedAttribute private instead of protected.
591         * svg/SVGTextElement.cpp: Removed unneeded includes.
592         * svg/SVGTextPathElement.cpp: Removed unneeded includes.
593         (WebCore::SVGTextPathElement::parseAttribute): Don't use isSupportedAttribute.
594         * svg/SVGTextPositioningElement.cpp: Removed unneeded includes.
595         (WebCore::SVGTextPositioningElement::isSupportedAttribute): Deleted.
596         (WebCore::SVGTextPositioningElement::parseAttribute): Don't use isSupportedAttribute.
597         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Don't use isSupportedAttribute.
598         * svg/SVGTextPositioningElement.h: Removed isSupportedAttribute and made some functions
599         private insetad of protected.
600         * svg/SVGURIReference.cpp: Removed unneeded includes.
601         (WebCore::SVGURIReference::parseAttribute): Don't use isSupportedAttribute.
602         * svg/SVGURIReference.h:
603         (WebCore::SVGURIReference::isExternalURIReference):
604         * svg/SVGUseElement.cpp: Removed unneeded includes.
605         (WebCore::SVGUseElement::parseAttribute): Don't use isSupportedAttribute.
606         * svg/SVGViewElement.h: Removed isSupportedAttribute.
607         * svg/animation/SVGSMILElement.cpp: Removed unneeded includes.
608
609 2015-03-29  Darin Adler  <darin@apple.com>
610
611         Remove unneeded includes of "Attribute.h"
612         https://bugs.webkit.org/show_bug.cgi?id=143195
613
614         Reviewed by Antti Koivisto.
615
616         * css/StyleResolver.cpp:
617         * html/HTMLAnchorElement.cpp:
618         * html/HTMLAreaElement.cpp:
619         * html/HTMLBRElement.cpp:
620         * html/HTMLBaseElement.cpp:
621         * html/HTMLBodyElement.cpp:
622         * html/HTMLButtonElement.cpp:
623         * html/HTMLCanvasElement.cpp:
624         * html/HTMLDivElement.cpp:
625         * html/HTMLElement.cpp:
626         * html/HTMLEmbedElement.cpp:
627         * html/HTMLFontElement.cpp:
628         * html/HTMLFormControlElement.cpp:
629         * html/HTMLFormElement.cpp:
630         * html/HTMLFrameElement.cpp:
631         * html/HTMLFrameElementBase.cpp:
632         * html/HTMLFrameSetElement.cpp:
633         * html/HTMLHRElement.cpp:
634         * html/HTMLIFrameElement.cpp:
635         * html/HTMLImageElement.cpp:
636         * html/HTMLOListElement.cpp:
637         * html/HTMLOptionElement.cpp:
638         * html/HTMLParagraphElement.cpp:
639         * html/HTMLParamElement.cpp:
640         * html/HTMLPlugInElement.cpp:
641         * html/HTMLPreElement.cpp:
642         * html/HTMLProgressElement.cpp:
643         * html/HTMLScriptElement.cpp:
644         * html/HTMLSelectElement.cpp:
645         * html/HTMLStyleElement.cpp:
646         * html/HTMLTableCaptionElement.cpp:
647         * html/HTMLTableCellElement.cpp:
648         * html/HTMLTableColElement.cpp:
649         * html/HTMLTableElement.cpp:
650         * html/HTMLTablePartElement.cpp:
651         * html/HTMLTextAreaElement.cpp:
652         * html/HTMLTextFormControlElement.cpp:
653         * html/HTMLUListElement.cpp:
654         * html/HTMLVideoElement.cpp:
655         * html/parser/HTMLScriptRunner.cpp:
656         * inspector/InspectorNodeFinder.cpp:
657         Removed includes of "Attribute.h".
658
659 2015-03-28  Eric Carlson  <eric.carlson@apple.com>
660
661         [Mac] Update for output device API change
662         https://bugs.webkit.org/show_bug.cgi?id=143187
663
664         Reviewed by Zalan Bujtas.
665
666         The API used for output device is being deprecated, update to the replacement.
667
668         * WebCore.xcodeproj/project.pbxproj: Add SPI headers.
669
670         * platform/graphics/MediaPlaybackTarget.h:
671         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
672         (WebCore::MediaPlaybackTarget::setDevicePickerContext):
673         (WebCore::MediaPlaybackTarget::devicePickerContext):
674
675         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
676         (WebCore::MediaPlaybackTarget::encode):
677         (WebCore::MediaPlaybackTarget::decode):
678
679         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
680         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
681         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
682         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
683         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
684         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
685         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
686         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
687         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
688         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.
689
690         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
691         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
692         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
693         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
694         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
695         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
696
697         * platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
698             from ios directory, added Mac includes and prototypes.
699         * platform/spi/ios/AVKitSPI.h: Removed.
700
701         * platform/spi/mac/AVFoundationSPI.h: Added.
702
703 2015-03-28  Simon Fraser  <simon.fraser@apple.com>
704
705         Optimize RenderLayer::intersectsDamageRect() slightly
706         https://bugs.webkit.org/show_bug.cgi?id=143186
707
708         Reviewed by Zalan Bujtas.
709
710         We can early return from RenderLayer::intersectsDamageRect() if the
711         damageRect is empty, since nothing will intersect with the empty rect.
712         
713         Slight performance gain when scrolling overflow-scroll with lots of nested,
714         clipping layers.
715
716         * rendering/RenderLayer.cpp:
717         (WebCore::RenderLayer::calculateClipRects):
718
719 2015-03-28  Anders Carlsson  <andersca@apple.com>
720
721         Remove an unused SPI method from WebKitLegacy
722         https://bugs.webkit.org/show_bug.cgi?id=143185
723
724         Reviewed by Sam Weinig.
725
726         * loader/appcache/ApplicationCacheStorage.cpp:
727         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
728         * loader/appcache/ApplicationCacheStorage.h:
729
730 2015-03-28  Joonghun Park  <jh718.park@samsung.com>
731
732         nullptr cleanup in InlineFooBox classes
733         https://bugs.webkit.org/show_bug.cgi?id=143178
734
735         Reviewed by Csaba Osztrogonác.
736
737         No new tests, no behavior changes
738
739         Replace 0 with nullptr in InlineFooBox classes.
740
741         * rendering/InlineBox.cpp:
742         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
743         * rendering/InlineFlowBox.cpp:
744         (WebCore::InlineFlowBox::removeChild):
745         (WebCore::InlineFlowBox::deleteLine):
746         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
747         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
748         * rendering/InlineFlowBox.h:
749         (WebCore::InlineFlowBox::InlineFlowBox):
750         * rendering/InlineTextBox.h:
751         (WebCore::InlineTextBox::InlineTextBox):
752         * rendering/RootInlineBox.cpp:
753         (WebCore::RootInlineBox::getLogicalStartBoxWithNode):
754         (WebCore::RootInlineBox::getLogicalEndBoxWithNode):
755         * rendering/RootInlineBox.h:
756         * rendering/svg/SVGInlineTextBox.cpp:
757         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
758         (WebCore::SVGInlineTextBox::releasePaintingResource):
759         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
760         * rendering/svg/SVGRootInlineBox.cpp:
761         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
762         (WebCore::findFirstAndLastAttributesInVector):
763         * rendering/svg/SVGRootInlineBox.h:
764
765 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
766
767         More modern loops in RenderLayer.cpp
768         https://bugs.webkit.org/show_bug.cgi?id=143175
769
770         Reviewed by Ryosuke Niwa.
771
772         Use modern loops in more places in RenderLayer.app.
773
774         * rendering/RenderLayer.cpp:
775         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
776         (WebCore::RenderLayer::paint):
777         (WebCore::performOverlapTests):
778         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
779         (WebCore::RenderLayer::paintList):
780         (WebCore::RenderLayer::collectFragments):
781         (WebCore::RenderLayer::updatePaintingInfoForFragments):
782         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
783         (WebCore::RenderLayer::calculateClipRects):
784
785 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
786
787         nullptr cleanup in RenderLayer
788         https://bugs.webkit.org/show_bug.cgi?id=143174
789
790         Reviewed by Ryosuke Niwa.
791
792         Replace 0 with nullptr in RenderLayer.cpp.
793
794         * rendering/RenderLayer.cpp:
795         (WebCore::RenderLayer::filterRenderer):
796         (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
797         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
798         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
799         (WebCore::RenderLayer::enclosingOverflowClipLayer):
800         (WebCore::RenderLayer::enclosingCompositingLayer):
801         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
802         (WebCore::RenderLayer::enclosingFilterLayer):
803         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
804         (WebCore::RenderLayer::clippingRootForPainting):
805         (WebCore::RenderLayer::transparentPaintingAncestor):
806         (WebCore::transparencyClipBox):
807         (WebCore::RenderLayer::removeChild):
808         (WebCore::RenderLayer::removeOnlyThisLayer):
809         (WebCore::RenderLayer::insertOnlyThisLayer):
810         (WebCore::accumulateOffsetTowardsAncestor):
811         (WebCore::RenderLayer::enclosingScrollableArea):
812         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
813         (WebCore::RenderLayer::enclosingElement):
814         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
815         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
816         (WebCore::RenderLayer::hitTestLayer):
817         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
818         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
819         (WebCore::RenderLayer::hitTestList):
820         (WebCore::RenderLayer::updateClipRects):
821         (WebCore::RenderLayer::clipRects):
822         (WebCore::RenderLayer::calculateClipRects):
823
824 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
825
826         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
827         https://bugs.webkit.org/show_bug.cgi?id=142386
828
829         Reviewed by Žan Doberšek.
830
831         TextureMapper and TextureMapperGL are bloated and tightly coupled with
832         BitmapTexture. We should move these classes to seperated file of their own.
833         Also, this patch removes friend relationship from TextureMapperGL and  its
834         subsidiary classes.
835
836         The main purpose of this refactoring is to expose BitmapTexturePool to
837         renderers of platformlayers like Video and Canvas. By doing this, each
838         renderer can acquire textures from the global texture pool to paint
839         their contents directly.
840
841         No new tests needed.
842
843         * PlatformEfl.cmake:
844         * PlatformGTK.cmake:
845         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
846         Include BitmapTextureGL and BitmapTexturePool explicitly
847
848         * platform/graphics/texmap/BitmapTexture.cpp: Added.
849         * platform/graphics/texmap/BitmapTexture.h: Added.
850         (WebCore::BitmapTexture::updateContents):
851         Exclude BitmapTexture class from TextureMapper
852
853         * platform/graphics/texmap/BitmapTextureGL.cpp: Added.
854         * platform/graphics/texmap/BitmapTextureGL.h: Added.
855         Exclude BitmapTextureGL class from TextureMapperGL
856         (WebCore::BitmapTextureGL::clipStack): Added.
857         Add the getter for clipStack for TextureMapperGL
858         (WebCore::BitmapTextureGL::Bind): Deleted.
859         (WebCore::BitmapTextureGL::BindAsSurface): Added.
860         Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
861         However, TextureMapperGL can compute projection matrix itself after binding job, so this
862         friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.
863
864         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
865         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
866         Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer
867
868         * platform/graphics/texmap/BitmapTexturePool.cpp: Added.
869         * platform/graphics/texmap/BitmapTexturePool.h: Added.
870         Exclude BitmapTexturePool class from TextureMapperGL
871         (WebCore::BitmapTexturePool::acquireTexture):
872         Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling
873
874         * platform/graphics/texmap/TextureMapper.cpp:
875         * platform/graphics/texmap/TextureMapper.h:
876         Remove BitmapTexturePool and BitmapTexture from its implementation.
877
878         * platform/graphics/texmap/TextureMapperGL.cpp:
879         * platform/graphics/texmap/TextureMapperGL.h:
880         Remove BitmapTextureGL from its implementation.
881         (WebCore::TextureMapperGL::TextureMapperGL):
882         (WebCore::TextureMapperGL::clipStack):
883         (WebCore::TextureMapperGL::bindSurface):
884         (WebCore::TextureMapperGL::currentSurface):
885         Add a getter of the current surface for filtering operation in BitmapTextureGL.
886         It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.
887
888         (WebCore::TextureMapperGL::ClipStack):
889         Move inner class declaration to public.
890
891         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
892         * platform/graphics/texmap/TextureMapperImageBuffer.h:
893         Remove BitmapTextureImageBuffer from its implementation.
894
895 2015-03-27  Tim Horton  <timothy_horton@apple.com>
896
897         WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
898         https://bugs.webkit.org/show_bug.cgi?id=143142
899         <rdar://problem/20324495>
900
901         Reviewed by Anders Carlsson.
902
903         Calling DataDetectorsLibrary() is expensive; we should avoid doing it
904         until actually necessary. When loading a page that makes a caret selection,
905         ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
906         that a caret selection can't have any services associated with it) to avoid
907         crashing on systems where DataDetectors is not available. Instead, we should
908         first check if there's anything to do, and then check for the existence
909         of DataDetectors.
910
911         * page/mac/ServicesOverlayController.mm:
912         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
913         Build the list of phone number ranges, and bail (clearing the potential highlights)
914         if it is empty, before calling DataDetectorsLibrary().
915
916         (WebCore::ServicesOverlayController::buildSelectionHighlight):
917         Check the list of selection rects, and bail (clearing the potential highlights)
918         if it is empty, before calling DataDetectorsLibrary().
919
920 2015-03-27  Jer Noble  <jer.noble@apple.com>
921
922         [Mac] Safari fails to fire page "load" event with video[preload=none]
923         https://bugs.webkit.org/show_bug.cgi?id=143147
924
925         Reviewed by Simon Fraser.
926
927         Test: media/video-page-load-preload-none.html
928
929         When told to load() when preload == None, set the networkState to Idle.
930         This causes HTMLMediaElement to set the shouldDelayLoadEvent flag to
931         false, and allows the page's 'load' event to fire.
932
933         Drive-by fix: add setNetworkState() and setReadyState() methods to
934         MediaPlayerPrivateAVFoundation, reducing a bunch of code duplication.
935
936         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
937         (WebCore::MediaPlayerPrivateAVFoundation::load):
938         (WebCore::MediaPlayerPrivateAVFoundation::setNetworkState):
939         (WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
940         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
941         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
942
943 2015-03-27  Alexey Proskuryakov  <ap@apple.com>
944
945         Calling crypto.webkitSubtle.generateKey causes page memory to never be released
946         https://bugs.webkit.org/show_bug.cgi?id=143151
947         rdar://problem/18940687
948
949         Reviewed by Tim Horton.
950
951         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): Don't.
952
953 2015-03-27  Brent Fulgham  <bfulgham@apple.com>
954
955         Null dereference in InbandMetadataTextTrack handling
956         https://bugs.webkit.org/show_bug.cgi?id=143144
957         <rdar://problem/18983250>
958
959         Reviewed by Eric Carlson.
960
961         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
962         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
963         'client()', just like we do in all other methods.
964
965 2015-03-27  Oliver Hunt  <oliver@apple.com>
966
967         Forward additional CFNetwork ATS information to child processes
968         https://bugs.webkit.org/show_bug.cgi?id=143136
969
970         Reviewed by Anders Carlsson.
971
972         Declare SPI.
973
974         * platform/spi/cf/CFNetworkSPI.h:
975
976 2015-03-27  Chris Dumez  <cdumez@apple.com>
977
978         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
979         https://bugs.webkit.org/show_bug.cgi?id=143125
980         <rdar://problem/20321172>
981
982         Reviewed by Antti Koivisto.
983
984         Export a couple of extra symbols.
985
986         * platform/network/ResourceResponseBase.h:
987
988 2015-03-27  Jer Noble  <jer.noble@apple.com>
989
990         HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
991         https://bugs.webkit.org/show_bug.cgi?id=143132
992
993         Reviewed by Eric Carlson.
994
995         When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
996         event and continue playback. However, if a media engine updates the ready state before its
997         seek operation actually completes, the currentTime it returns may still be the time before
998         the seek.
999
1000         Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
1001         false before firing the 'seeked' event.
1002
1003         * html/HTMLMediaElement.cpp:
1004         (WebCore::HTMLMediaElement::parseAttribute):
1005
1006 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1007
1008         Make some more objects use FastMalloc
1009         https://bugs.webkit.org/show_bug.cgi?id=143122
1010
1011         Reviewed by Csaba Osztrogonác.
1012
1013         * Modules/geolocation/GeolocationController.h:
1014         * Modules/geolocation/NavigatorGeolocation.h:
1015         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
1016         * Modules/notifications/NotificationController.h:
1017         * Modules/webdatabase/DatabaseServer.h:
1018         * css/CSSFontFaceSource.h:
1019         * html/HTMLMediaSession.h:
1020         * inspector/InspectorIndexedDBAgent.h:
1021         * inspector/InspectorReplayAgent.h:
1022         * page/CaptionUserPreferencesMediaAF.h:
1023         * page/PageConsoleClient.h:
1024         * page/PageDebuggable.h:
1025         * page/animation/CSSPropertyAnimation.cpp:
1026         * page/mac/ServicesOverlayController.h:
1027         * platform/RemoteCommandListener.h:
1028         * platform/Timer.h:
1029         * platform/audio/MediaSessionManager.h:
1030         * platform/mac/SystemSleepListenerMac.h:
1031         * platform/mac/ThemeMac.h:
1032         * rendering/svg/RenderSVGResourceSolidColor.h:
1033         * replay/ReplayController.h:
1034
1035 2015-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
1036
1037         FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
1038         https://bugs.webkit.org/show_bug.cgi?id=142885.
1039
1040         Reviewed by Dean Jackson.
1041
1042         FEMorphology class implementation code clean up.
1043         
1044         Tests: svg/filters/feMorphology-radius-cases.svg
1045
1046         * platform/graphics/filters/FEMorphology.cpp:
1047         (WebCore::shouldSupersedeExtremum): Reuse code instead of repeating it and
1048         use < and > instead of =< and >=.
1049         
1050         (WebCore::pixelArrayIndex): Returns the array index of a pixel in an image
1051         buffer, given: position(x, y), image width and the color channel.
1052         
1053         (WebCore::columnExtremum): Returns the extremum of a column of pixels.
1054         
1055         (WebCore::kernelExtremum): Returns the extremum of a filter kernel.
1056         
1057         (WebCore::FEMorphology::platformApplyGeneric): Apply some code clean-up.
1058         The kernel size should be equal to radius of the filter. The extra pixel
1059         was causing the resulted image to be asymmetric in some cases.
1060         
1061         (WebCore::FEMorphology::platformApplyDegenerate):
1062         (WebCore::FEMorphology::platformApplySoftware): After applying scaling, we
1063         still need to check the resulted radius is negative (overflow case) or less
1064         than one (zero radius case) and treat these cases differently.
1065         
1066         (WebCore::FEMorphology::morphologyOperator): Deleted.
1067         (WebCore::FEMorphology::radiusX): Deleted.
1068         (WebCore::FEMorphology::radiusY): Deleted.
1069         * platform/graphics/filters/FEMorphology.h:
1070         (WebCore::FEMorphology::morphologyOperator):
1071         (WebCore::FEMorphology::radiusX):
1072         (WebCore::FEMorphology::radiusY):
1073         Move a single line functions from the source file to the header file.
1074
1075 2015-03-27  Antti Koivisto  <antti@apple.com>
1076
1077         Move CacheValidation to platform
1078         https://bugs.webkit.org/show_bug.cgi?id=143133
1079
1080         Reviewed by Chris Dumez.
1081
1082         It deals with platform types only and is currently violating layering.
1083
1084         * WebCore.xcodeproj/project.pbxproj:
1085         * loader/cache/CacheValidation.cpp: Removed.
1086         * loader/cache/CacheValidation.h: Removed.
1087         * platform/network/CacheValidation.cpp: Copied from Source/WebCore/loader/cache/CacheValidation.cpp.
1088         * platform/network/CacheValidation.h: Copied from Source/WebCore/loader/cache/CacheValidation.h.
1089
1090 2015-03-27  Commit Queue  <commit-queue@webkit.org>
1091
1092         Unreviewed, rolling out r177896.
1093         https://bugs.webkit.org/show_bug.cgi?id=142978
1094
1095         Loading libgstclutter.so in-process hangs web process
1096         (Requested by mcatanzaro on #webkit).
1097
1098         Reverted changeset:
1099
1100         "[GStreamer] Disable gst-plugin-scanner if seccomp filters are
1101         enabled"
1102         https://bugs.webkit.org/show_bug.cgi?id=140069
1103         http://trac.webkit.org/changeset/177896
1104
1105 2015-03-26  Antti Koivisto  <antti@apple.com>
1106
1107         Respect cache-control directives in request
1108         https://bugs.webkit.org/show_bug.cgi?id=143121
1109         rdar://problem/19714040
1110
1111         Reviewed by Chris Dumez.
1112
1113         Test: http/tests/cache/disk-cache/disk-cache-request-headers.html
1114
1115         * loader/cache/CacheValidation.cpp:
1116         (WebCore::isCacheHeaderSeparator):
1117         (WebCore::isControlCharacter):
1118         (WebCore::trimToNextSeparator):
1119         (WebCore::parseCacheHeader):
1120         (WebCore::parseCacheControlDirectives):
1121
1122             Factor Cache-control parsing here so it can be used for both requests and responses.
1123
1124         * loader/cache/CacheValidation.h:
1125         * platform/network/ResourceRequestBase.h:
1126         * platform/network/ResourceResponseBase.cpp:
1127         (WebCore::ResourceResponseBase::ResourceResponseBase):
1128         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
1129         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
1130         (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
1131         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
1132         (WebCore::ResourceResponseBase::cacheControlMaxAge):
1133         (WebCore::isCacheHeaderSeparator): Deleted.
1134         (WebCore::isControlCharacter): Deleted.
1135         (WebCore::trimToNextSeparator): Deleted.
1136         (WebCore::parseCacheHeader): Deleted.
1137         * platform/network/ResourceResponseBase.h:
1138
1139 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1140
1141         [GStreamer] share GL context in pipeline, part 2
1142         https://bugs.webkit.org/show_bug.cgi?id=143049
1143
1144         Reviewed by Carlos Garcia Campos.
1145
1146         This patch, instead of cluttering the GstGL attributes creation in
1147         ::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
1148         where those attributes are defined. This method is guarded by
1149         USE(GSTREAMER_GL)
1150
1151         ::handlSyncMessage() shall return nothing, according to GStreamer
1152         documentation, not a boolean.
1153
1154         The GstGL attributes are now GRefPtr<> to avoid memory leaks.
1155
1156         The GstGLAPI and GstGLPlatform are now set given by the pre-processor
1157         directives, and the code in ::ensureGstGLContext() is simpler.
1158
1159         No new tests because this is platform specific and it depends in the
1160         run-time availability and configurations of GstGL elements.
1161
1162         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1163         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1164         Don't initialise the GstGL attributes since are GRefPtr<>
1165         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
1166         signature to use void instead of gboolean.
1167         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
1168         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1169
1170 2015-03-26  Jeremy Jones  <jeremyj@apple.com>
1171
1172         Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
1173         https://bugs.webkit.org/show_bug.cgi?id=143120
1174
1175         Reviewed by Eric Carlson.
1176
1177         We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure 
1178         media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
1179         media state via resetMediaState(). m_playerController is already released in 
1180         WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
1181         fullscreen process from completing successfully.
1182
1183         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1184         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
1185
1186 2015-03-26  Zalan Bujtas  <zalan@apple.com>
1187
1188         Inline continuation code should not take anonymous containing wrapper granted.
1189         https://bugs.webkit.org/show_bug.cgi?id=133312
1190
1191         Reviewed by Dave Hyatt.
1192
1193         It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
1194         is an anonymous wrapper and its sibling might be a block level renderer.
1195         When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
1196         is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
1197         anonymous wrappers)
1198
1199         Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html
1200
1201         * rendering/RenderInline.cpp:
1202         (WebCore::updateStyleOfAnonymousBlockContinuations):
1203         (WebCore::RenderInline::styleDidChange):
1204
1205 2015-03-26  Tim Horton  <timothy_horton@apple.com>
1206
1207         REGRESSION (r181358 and r181507): Lots of sites think that we support touch events on OS X
1208         https://bugs.webkit.org/show_bug.cgi?id=142888
1209         <rdar://problem/20227304>
1210
1211         Reviewed by Beth Dakin.
1212
1213         * dom/Document.idl:
1214         * dom/Element.idl:
1215         * html/HTMLBodyElement.idl:
1216         * html/HTMLFrameSetElement.idl:
1217         * page/DOMWindow.idl:
1218         Re-conditionalize a lot of event listeners; sites test ("ontouchstart" in window), which
1219         is not covered by NotEnumerable, and so r181358 and r181507 broke a bunch of sites
1220         (apple.com, blaze.com, anything using nicescroll.js, etc.) by causing them to think
1221         that (Mac) Safari was touch-enabled.
1222
1223 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1224
1225         "lineNo" does not match WebKit coding style guidelines
1226         https://bugs.webkit.org/show_bug.cgi?id=143119
1227
1228         Reviewed by Michael Saboff.
1229
1230         We can afford to use whole words.
1231
1232         * bindings/js/JSLazyEventListener.cpp:
1233         (WebCore::JSLazyEventListener::initializeJSFunction):
1234         * bindings/js/JSMainThreadExecStateInstrumentation.h:
1235         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
1236         * inspector/InspectorDOMAgent.cpp:
1237         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1238         * testing/Internals.cpp:
1239         (WebCore::Internals::parserMetaData):
1240
1241 2015-03-26  Roger Fong  <roger_fong@apple.com>
1242
1243         Apply blur effect to media control background.
1244         https://bugs.webkit.org/show_bug.cgi?id=143116.
1245         <rdar://problem/20316964>.
1246
1247         Reviewed by Brent Fulgham.
1248
1249         There are still a few issues, like the borders of the controls being blurred with black,
1250         and the volume slider background not showing the blur effect. Will fix those separately.
1251
1252         Add CSS for new divs to create blur effect using back drop filters and blend modes.
1253         * Modules/mediacontrols/mediaControlsApple.css:
1254         (audio::-webkit-media-controls-panel):
1255         (audio::-webkit-media-controls-panel-tint):
1256         (audio::-webkit-media-controls-panel-background):
1257         (audio::-webkit-media-controls-panel .volume-box):
1258         (audio::-webkit-media-controls-volume-slider-container-background):
1259         (audio::-webkit-media-controls-volume-slider-container-tint):
1260         (audio::-webkit-media-controls-toggle-closed-captions-button): Adjust fill.
1261         (audio::-webkit-media-controls-fullscreen-button): Adjust fill.
1262         (audio::-webkit-media-controls-fullscreen-button.exit): Adjust fill.
1263         (video:-webkit-full-screen::-webkit-media-controls-panel):
1264         (audio:-webkit-full-screen::-webkit-media-controls-panel-tint):
1265         (audio:-webkit-full-screen::-webkit-media-controls-panel-background):
1266         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
1267         (video:-webkit-full-screen::-webkit-media-controls-play-button):
1268         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
1269         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
1270         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
1271         (video:-webkit-full-screen::-webkit-media-controls-status-display):
1272         (audio::-webkit-media-controls-panel .volume-box:active): Deleted.
1273         * Modules/mediacontrols/mediaControlsApple.js:
1274         (Controller.prototype.createControls):
1275         (Controller.prototype.configureInlineControls): Add new divs for blurred background effect.
1276         (Controller.prototype.configureFullScreenControls): Ditto.
1277         (Controller.prototype.handlePanelMouseDown): The tint div is now in front.
1278         (Controller.prototype.drawTimelineBackground): Adjust colors to make border look better with new background.
1279         (Controller.prototype.drawVolumeBackground): Ditto.
1280
1281 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1282
1283         Assertion firing in JavaScriptCore/parser/parser.h for statesman.com site
1284         https://bugs.webkit.org/show_bug.cgi?id=142974
1285
1286         Reviewed by Joseph Pecoraro.
1287
1288         * bindings/js/JSLazyEventListener.cpp:
1289         (WebCore::JSLazyEventListener::initializeJSFunction): Use the new override
1290         line number API to guarantee that errors will map to the .html file locations
1291         that we like.
1292
1293         * bindings/js/ScriptController.cpp:
1294         (WebCore::ScriptController::eventHandlerPosition): Added a FIXME to cover
1295         some cases where our line and column numbers are still nonsense.
1296
1297 2015-03-26  Beth Dakin  <bdakin@apple.com>
1298
1299         Relevant repainted objects callback is inaccurate and inconsistent for PDF 
1300         documents
1301         https://bugs.webkit.org/show_bug.cgi?id=143118
1302         -and corresponding-
1303         rdar://problem/13371582
1304
1305         Reviewed by Tim Horton.
1306
1307         Investigating this bug resulted in finding two things that should change for the 
1308         relevant repainted objects heuristic. First, we should not count any objects 
1309         painted while updating control tints. And secondly, we should not use it at all 
1310         for plugin documents. In other documents, we count the plugin area as “painted” 
1311         when we get to paint whether or not the plugin has actually loaded. This is 
1312         intentional because it allows us to account for chunks of the page that will be 
1313         filled in by possibly slow-loading ads. However, if the plugin is the whole 
1314         document, then the heuristic just doesn’t make any sense and it leads to 
1315         inconsistent behavior at different window sizes. So we’ll only count plugins when 
1316         the document is not a plugin document. 
1317
1318         Don’t count objects during this paint!
1319         * page/FrameView.cpp:
1320         (WebCore::FrameView::updateControlTints):
1321         * page/Page.h:
1322         (WebCore::Page::setIsCountingRelevantRepaintedObjects):
1323
1324         Make sure the document is not a plugin document.
1325         * rendering/RenderEmbeddedObject.cpp:
1326         (WebCore::RenderEmbeddedObject::paint):
1327
1328 2015-03-26  Alex Christensen  <achristensen@webkit.org>
1329
1330         Progress towards CMake on Mac.
1331         https://bugs.webkit.org/show_bug.cgi?id=143112
1332
1333         Reviewed by Chris Dumez.
1334
1335         * CMakeLists.txt:
1336         * PlatformEfl.cmake:
1337         * PlatformGTK.cmake:
1338         * PlatformMac.cmake:
1339         * platform/graphics/mac/IconMac.mm:
1340
1341 2015-03-26  Jer Noble  <jer.noble@apple.com>
1342
1343         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
1344         https://bugs.webkit.org/show_bug.cgi?id=142970
1345
1346         Reviewed by Eric Carlson.
1347
1348         isMainThread() will (ironically) return true if called from the web thread. Rather than dispatch
1349         synchronously to the main thread to allocate the _volumeView, dispatch asynchronously and handle
1350         the case where the MPVolumeView has not yet been created.
1351
1352         * platform/audio/ios/MediaSessionManagerIOS.mm:
1353         (-[WebMediaSessionHelper allocateVolumeView]): Dispatch to the main thread to allocate. Move notification
1354             registration to -setVolumeView:.
1355         (-[WebMediaSessionHelper setVolumeView:]): Added. Register/Unregister for route availablitiy notifications.
1356         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Handle the possibility of a nil _volumeView.
1357
1358 2015-03-26  Benjamin Poulain  <bpoulain@apple.com>
1359
1360         Fix state maching debugging after r181964
1361         https://bugs.webkit.org/show_bug.cgi?id=143082
1362
1363         Reviewed by Alex Christensen.
1364
1365         * contentextensions/ContentExtensionCompiler.cpp:
1366         (WebCore::ContentExtensions::compileRuleList):
1367
1368 2015-03-25  David Hyatt  <hyatt@apple.com>
1369
1370         Improve the offsetWidth/Height layout optimization
1371         https://bugs.webkit.org/show_bug.cgi?id=143008
1372
1373         Reviewed by Zalan Bujtas.
1374
1375         * dom/Document.cpp:
1376         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1377         * dom/Document.h:
1378         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
1379         the positioning restrictions on the optimization check.
1380
1381         * dom/Element.cpp:
1382         (WebCore::Element::offsetWidth):
1383         (WebCore::Element::offsetHeight):
1384         Change to use Element& instead of Element*.
1385
1386         (WebCore::Element::clientWidth):
1387         (WebCore::Element::clientHeight):
1388         (WebCore::Element::scrollWidth):
1389         (WebCore::Element::scrollHeight):
1390         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
1391
1392 2015-03-26  Brady Eidson  <beidson@apple.com>
1393
1394         Apply ContentExtension actions after redirects.
1395         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
1396
1397         Reviewed by Alex Christensen.
1398
1399         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
1400                http/tests/contentextensions/subresource-redirect-blocked.html
1401
1402         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
1403         the ContentExtensionsBackend.
1404
1405         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
1406         ResourceLoader where redirects are handled.
1407
1408         * contentextensions/ContentExtension.cpp:
1409         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
1410
1411         * contentextensions/ContentExtensionsBackend.cpp:
1412         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1413         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
1414         * contentextensions/ContentExtensionsBackend.h:
1415
1416         * loader/NetscapePlugInStreamLoader.cpp:
1417         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1418
1419         * loader/ResourceLoadInfo.h:
1420
1421         * loader/ResourceLoader.cpp:
1422         (WebCore::ResourceLoader::ResourceLoader):
1423         (WebCore::ResourceLoader::willSendRequest):
1424         * loader/ResourceLoader.h:
1425
1426         * loader/SubresourceLoader.cpp:
1427         (WebCore::SubresourceLoader::SubresourceLoader):
1428
1429         * loader/cache/CachedResourceLoader.cpp:
1430         (WebCore::CachedResourceLoader::requestResource):
1431
1432         * page/UserContentController.cpp:
1433         (WebCore::UserContentController::processContentExtensionRulesForLoad):
1434         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
1435         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
1436         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
1437         * page/UserContentController.h:
1438
1439 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
1440
1441         Crash when laying out (char)0
1442         https://bugs.webkit.org/show_bug.cgi?id=143103
1443
1444         Reviewed by Dean Jackson.
1445
1446         We currently cache a character -> Font mapping in a HashMap.
1447         However, keys in Hashmaps can't be 0. This patch simply skips
1448         the cache in this case.
1449
1450         No new tests, for now. I'm having trouble creating a test because
1451         the site that causes this bug generates their page using script,
1452         and the script is all minified, and difficult to understand. I
1453         will contact the owner of the site and ask for and unminified
1454         version of their sources. However, I don't want to that to block
1455         this tiny fix from going in.
1456
1457         * platform/graphics/Font.cpp:
1458         (WebCore::Font::systemFallbackFontForCharacter):
1459
1460 2015-03-26  Jer Noble  <jer.noble@apple.com>
1461
1462         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
1463         https://bugs.webkit.org/show_bug.cgi?id=143080
1464
1465         Reviewed by Eric Carlson.
1466
1467         Null-check m_certificate before dereferencing.
1468
1469         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1470         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
1471
1472 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
1473
1474         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
1475         https://bugs.webkit.org/show_bug.cgi?id=115298
1476
1477         Reviewed by Mario Sanchez Prada.
1478
1479         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
1480         aria-pressed state into a 0, 1, 2 number value for the Mac.
1481
1482         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
1483
1484         * accessibility/AccessibilityObject.cpp:
1485         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1486         * accessibility/AccessibilityObject.h:
1487         (WebCore::AccessibilityObject::isToggleButton):
1488         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1489         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1490         (createAccessibilityRoleMap):
1491         (-[WebAccessibilityObjectWrapper subrole]):
1492         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1493
1494 2015-03-25  Dean Jackson  <dino@apple.com>
1495
1496         CSS blend modes do not parse when in the shadow tree
1497         https://bugs.webkit.org/show_bug.cgi?id=143067
1498         <rdar://problem/20302662>
1499
1500         Reviewed by Anders Carlson.
1501
1502         The media controls style sheets are injected as UA stylesheets
1503         when we come across a <video> or <audio> element. These stylesheets
1504         have a different parsing context than the document stylesheets -
1505         one that uses the default constructor, which initializes some
1506         features like cssCompositingEnabled to false without checking
1507         the runtime state.
1508
1509         The easy fix is to use the global state to initialize the context.
1510
1511         Unfortunately we can't test this since it only occurs in the shadow
1512         tree.
1513
1514         * css/CSSParser.cpp:
1515         (WebCore::CSSParserContext::CSSParserContext): Check the state
1516         of RuntimeEnabledFeatures to initialize CSS Regions and
1517         CSS Compositing (Blending).
1518
1519 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
1520
1521         AX: table cells that use display:block render the table inaccessible to VoiceOver
1522         https://bugs.webkit.org/show_bug.cgi?id=143007
1523
1524         Reviewed by Mario Sanchez Prada.
1525
1526         When display:block is used on a table cell, it was being ignored because it was anonymous.
1527         This is still a valid scenario however if it's still inside of a valid table.
1528
1529         Test: accessibility/table-cell-display-block.html
1530
1531         * accessibility/AccessibilityTableCell.cpp:
1532         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
1533
1534 2015-03-25  Tim Horton  <timothy_horton@apple.com>
1535
1536         Add a preference to prevent "user-scalable=no" from having any effect
1537         https://bugs.webkit.org/show_bug.cgi?id=143032
1538
1539         Reviewed by Sam Weinig.
1540
1541         * page/ViewportConfiguration.cpp:
1542         (WebCore::ViewportConfiguration::ViewportConfiguration):
1543         (WebCore::ViewportConfiguration::allowsUserScaling):
1544         * page/ViewportConfiguration.h:
1545         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
1546         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
1547
1548 2015-03-25  Dan Bernstein  <mitz@apple.com>
1549
1550         Another attempt to get the iOS EWS building again.
1551
1552         * WebCore.xcodeproj/project.pbxproj:
1553
1554 2015-03-25  Alex Christensen  <achristensen@webkit.org>
1555
1556         Add case-insensitive checks to DFA bytecode.
1557         https://bugs.webkit.org/show_bug.cgi?id=142977
1558
1559         Reviewed by Benjamin Poulain.
1560
1561         * contentextensions/DFABytecode.h:
1562         (WebCore::ContentExtensions::instructionSizeWithArguments):
1563         * contentextensions/DFABytecodeCompiler.cpp:
1564         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
1565         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
1566         Add case-insensitive bytecode.
1567         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
1568         Check to see if case-insensitive bytecodes can be used.
1569         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
1570         * contentextensions/DFABytecodeCompiler.h:
1571         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
1572         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
1573         * contentextensions/DFABytecodeInterpreter.cpp:
1574         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1575         Interpret case-insensitive bytecodes.
1576
1577 2015-03-25  Sam Weinig  <sam@webkit.org>
1578
1579         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
1580
1581         * contentextensions/ContentExtensionCompiler.cpp:
1582         (WebCore::ContentExtensions::compileRuleList):
1583         * contentextensions/ContentExtensionCompiler.h:
1584         * contentextensions/ContentExtensionParser.cpp:
1585         (WebCore::ContentExtensions::getTypeFlags):
1586
1587 2015-03-25  Sam Weinig  <sam@webkit.org>
1588
1589         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
1590         https://bugs.webkit.org/show_bug.cgi?id=143059
1591
1592         Reviewed by Alex Christensen.
1593
1594         * WebCore.xcodeproj/project.pbxproj:
1595         Add ContentExtensionError.h/cpp.
1596
1597         * contentextensions/ContentExtensionError.cpp: Added.
1598         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1599         * contentextensions/ContentExtensionError.h: Added.
1600         (WebCore::ContentExtensions::make_error_code):
1601         Add ContentExtensionError enum and std::error_code adaptor.
1602
1603         * contentextensions/ContentExtensionCompiler.h:
1604         Instead of returning CompiledContentExtensionData, use a client interface
1605         to pass data. Eventually, this should be turned into a direct streaming 
1606         interface so we can write directly to a file.
1607
1608         * contentextensions/ContentExtensionCompiler.cpp:
1609         (WebCore::ContentExtensions::compileRuleList):
1610         * contentextensions/ContentExtensionParser.cpp:
1611         (WebCore::ContentExtensions::getTypeFlags):
1612         (WebCore::ContentExtensions::loadTrigger):
1613         (WebCore::ContentExtensions::loadAction):
1614         (WebCore::ContentExtensions::loadRule):
1615         (WebCore::ContentExtensions::loadEncodedRules):
1616         (WebCore::ContentExtensions::parseRuleList):
1617         * contentextensions/ContentExtensionParser.h:
1618         Convert to return an error.
1619
1620 2015-03-25  Beth Dakin  <bdakin@apple.com>
1621
1622         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
1623         force preview
1624         https://bugs.webkit.org/show_bug.cgi?id=143057
1625         -and corresponding-
1626         rdar://problem/20251436
1627
1628         Reviewed by Tim Horton.
1629
1630         This patch adds a value for ActionUpdated to the ImmediateActionStage enum. Now if 
1631         m_immediateActionStage indicates that an immediate action has either begun or 
1632         completed then we can have the same behavior.
1633         * page/EventHandler.cpp:
1634         (WebCore::EventHandler::handleMouseReleaseEvent):
1635         * page/EventHandler.h:
1636
1637 2015-03-25  Dean Jackson  <dino@apple.com>
1638
1639         MediaControls: Use font with fixed number width
1640         https://bugs.webkit.org/show_bug.cgi?id=143018
1641         <rdar://problem/20245415>
1642
1643         Reviewed by Eric Carlson.
1644
1645         Add a new font-family, specific to Apple platforms,
1646         called -apple-system-font-monospaced-numbers. This is
1647         a special variant of the system font which uses monospaced
1648         forms for the number glyphs - allowing a time reading that
1649         doesn't bounce around as the time changes.
1650
1651         * Modules/mediacontrols/mediaControlsApple.css: Media controls should
1652         use the new font.
1653         (audio::-webkit-media-controls-time-remaining-display):
1654         * Modules/mediacontrols/mediaControlsiOS.css:
1655         (audio::-webkit-media-controls-time-remaining-display):
1656
1657         * platform/graphics/ios/FontCacheIOS.mm: Request a new CTFontRef with
1658         the appropriate attributes.
1659         (WebCore::createCTFontWithFamilyNameAndWeight):
1660         * platform/graphics/mac/FontCacheMac.mm: Ditto, but NSFont.
1661         (WebCore::fontWithFamily):
1662         * platform/spi/cocoa/CoreTextSPI.h: Expose the constants for
1663         the new form so that the public SDK can build.
1664
1665 2015-03-25  Alex Christensen  <achristensen@webkit.org>
1666
1667         [Content Extensions] Add multi-DFA compiling and interpreting.
1668         https://bugs.webkit.org/show_bug.cgi?id=143010
1669
1670         Reviewed by Benjamin Poulain.
1671
1672         * contentextensions/ContentExtensionCompiler.cpp:
1673         (WebCore::ContentExtensions::compileRuleList):
1674         Compile multiple NFAs to DFAs.
1675         * contentextensions/ContentExtensionsBackend.cpp:
1676         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1677         Fixed a bug when there are no non-universal actions.
1678         We still need to report that no ignore-previous-rules was hit to apply the
1679         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
1680         and skipped in DFABytecodeInterpreter::interpret.
1681         * contentextensions/DFABytecodeCompiler.cpp:
1682         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1683         Add a header for each DFA.
1684         * contentextensions/DFABytecodeInterpreter.cpp:
1685         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1686         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1687         Interpret as many DFAs as there are in the bytecode.
1688
1689 2015-03-25  Per Arne Vollan  <peavo@outlook.com>
1690
1691         [Win] Illegal character in project file.
1692         https://bugs.webkit.org/show_bug.cgi?id=143051
1693
1694         Reviewed by Brent Fulgham.
1695
1696         There is an illegal character in the WebCore project filter.
1697         WebCore files are shown unfiltered.
1698
1699         * WebCore.vcxproj/WebCore.vcxproj.filters:
1700
1701 2015-03-25  David Hyatt  <hyatt@apple.com>
1702
1703         Add a pref to enable the new block-inside-inline model
1704         https://bugs.webkit.org/show_bug.cgi?id=143050
1705
1706         Reviewed by Sam Weinig.
1707
1708         * page/Settings.in:
1709
1710 2015-03-25  Dan Bernstein  <mitz@apple.com>
1711
1712         iOS Simulator build fix.
1713
1714         * platform/spi/cocoa/IOSurfaceSPI.h:
1715
1716 2015-03-25  Commit Queue  <commit-queue@webkit.org>
1717
1718         Unreviewed, rolling out r181932.
1719         https://bugs.webkit.org/show_bug.cgi?id=143041
1720
1721         The test fails most of the time on bots (Requested by ap on
1722         #webkit).
1723
1724         Reverted changeset:
1725
1726         "[Content Extensions] Add multi-DFA compiling and
1727         interpreting."
1728         https://bugs.webkit.org/show_bug.cgi?id=143010
1729         http://trac.webkit.org/changeset/181932
1730
1731 2015-03-24  Dean Jackson  <dino@apple.com>
1732
1733         Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
1734         https://bugs.webkit.org/show_bug.cgi?id=143039
1735
1736         Unreviewed build fix for newer versions of OS X.
1737
1738         * rendering/RenderThemeMac.mm: Define a null language parameter. This
1739         seemed better than turning the clang warning off for just that
1740         function.
1741         (WebCore::AttachmentLayout::layOutTitle):
1742         (WebCore::AttachmentLayout::layOutSubtitle):
1743
1744 2015-03-24  Dan Bernstein  <mitz@apple.com>
1745
1746         Another attempt to fix the build.
1747
1748         * WebCore.xcodeproj/project.pbxproj:
1749         * platform/spi/cocoa/QuartzCoreSPI.h:
1750
1751 2015-03-24  Alex Christensen  <achristensen@webkit.org>
1752
1753         [Content Extensions] Add multi-DFA compiling and interpreting.
1754         https://bugs.webkit.org/show_bug.cgi?id=143010
1755
1756         Reviewed by Benjamin Poulain.
1757
1758         * contentextensions/ContentExtensionCompiler.cpp:
1759         (WebCore::ContentExtensions::compileRuleList):
1760         Compile multiple NFAs to DFAs.
1761         * contentextensions/ContentExtensionsBackend.cpp:
1762         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1763         Fixed a bug when there are no non-universal actions.
1764         We still need to report that no ignore-previous-rules was hit to apply the
1765         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
1766         and skipped in DFABytecodeInterpreter::interpret.
1767         * contentextensions/DFABytecodeCompiler.cpp:
1768         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1769         Add a header for each DFA.
1770         * contentextensions/DFABytecodeInterpreter.cpp:
1771         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1772         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1773         Interpret as many DFAs as there are in the bytecode.
1774
1775 2015-03-24  Dan Bernstein  <mitz@apple.com>
1776
1777         Tried to fix the EWS build.
1778
1779         * platform/spi/cocoa/QuartzCoreSPI.h:
1780
1781 2015-03-24  Commit Queue  <commit-queue@webkit.org>
1782
1783         Unreviewed, rolling out r181898 and r181909.
1784         https://bugs.webkit.org/show_bug.cgi?id=143034
1785
1786         Broke fast/regions/auto-size/autoheight-two-pass-layout-
1787         complex-002.html (Requested by ap on #webkit).
1788
1789         Reverted changesets:
1790
1791         "Improve the offsetWidth/Height layout optimization"
1792         https://bugs.webkit.org/show_bug.cgi?id=143008
1793         http://trac.webkit.org/changeset/181898
1794
1795         "Disable layout dimensions optimization for RenderRegions"
1796         https://bugs.webkit.org/show_bug.cgi?id=143017
1797         http://trac.webkit.org/changeset/181909
1798
1799 2015-03-24  Zhuo Li  <zachli@apple.com>
1800
1801         Scripts running in isolated world should not subject to a page's CSP about 'eval'.
1802         https://bugs.webkit.org/show_bug.cgi?id=141316.
1803
1804         Reviewed by Geoffrey Garen.
1805
1806         * bindings/js/ScriptController.cpp:
1807         (WebCore::ScriptController::initScript):
1808         We should not impose the main world Content Security Policy onto the isolated world.
1809
1810 2015-03-24  Chris Dumez  <cdumez@apple.com>
1811
1812         [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
1813         https://bugs.webkit.org/show_bug.cgi?id=143026
1814
1815         Reviewed by Andy Estes.
1816
1817         Use .cpp file extension instead of .mm for SharedTimerCF and
1818         PowerObserverMac.
1819
1820         * WebCore.xcodeproj/project.pbxproj:
1821         * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
1822         (WebCore::timerFired):
1823         Use WTF::AutodrainedPool instead of @autoreleasepool {}.
1824
1825         * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
1826
1827 2015-03-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1828
1829         REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
1830         https://bugs.webkit.org/show_bug.cgi?id=142696
1831
1832         Reviewed and tweaked by Geoffrey Garen.
1833
1834         Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
1835
1836         * ForwardingHeaders/runtime/JSMapIterator.h: Added.
1837         * ForwardingHeaders/runtime/JSSetIterator.h: Added.
1838         * bindings/js/SerializedScriptValue.cpp:
1839         (WebCore::CloneSerializer::serialize):
1840
1841 2015-03-24  Dan Bernstein  <mitz@apple.com>
1842
1843         Tried to fix the iOS Simulator build.
1844
1845         * platform/spi/cocoa/QuartzCoreSPI.h:
1846
1847 2015-03-24  Benjamin Poulain  <bpoulain@apple.com>
1848
1849         Make URL filter patterns matching consistent and add a simple canonicalization step
1850         https://bugs.webkit.org/show_bug.cgi?id=142998
1851
1852         Reviewed by Alex Christensen.
1853
1854         This patch makes two changes to the url filter input:
1855         -Make the matching "Search" by default, the pattern can now appear anywhere
1856          in the URL by default.
1857         -Make the input a little less fragile: do not explode on valid input
1858          that is not formatted in a certain way.
1859
1860         To implement the search behavior, I simply add an implict ".*" in front of the patterns
1861         when that make sense.
1862
1863         To make the input more solid, we do some little modification on the input:
1864         -Remove duplicated ".*".
1865         -Remove matching suffixes that do not bring new information.
1866         -Unify all the ".*" in the same format.
1867
1868         Why do that here? That should be done through a graph analysis on the machine.
1869
1870         The reason is this is incredibly cheap compared to the graph analysis. Any state
1871         removed upfront will save the handling of several hundred nodes in the deterministic
1872         graph.
1873
1874         * contentextensions/URLFilterParser.cpp:
1875         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
1876         (WebCore::ContentExtensions::Term::isUniversalTransition):
1877         (WebCore::ContentExtensions::GraphBuilder::finalize):
1878         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
1879         (WebCore::ContentExtensions::GraphBuilder::fail):
1880         (WebCore::ContentExtensions::GraphBuilder::simplifySunkTerms):
1881
1882 2015-03-24  Chris Dumez  <cdumez@apple.com>
1883
1884         Regression(r181671): Caused Timer-related crashes on iOS / WK1
1885         https://bugs.webkit.org/show_bug.cgi?id=143025
1886
1887         Reviewed by Andy Estes.
1888
1889         Call CFRunLoopAddTimer() on WebThreadRunLoop() instead of
1890         CFRunLoopGetCurrent() for iOS, as we did before r181671.
1891
1892         I inadvertently changed this in r181671 when merging the Mac
1893         and iOS implementations.
1894
1895         No new tests, already covered by existing tests.
1896
1897         * platform/cf/SharedTimerCF.mm:
1898         (WebCore::setSharedTimerFireInterval):
1899
1900 2015-03-24  Dan Bernstein  <mitz@apple.com>
1901
1902         WebCore part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
1903         https://bugs.webkit.org/show_bug.cgi?id=143023
1904
1905         Reviewed by Tim Horton.
1906
1907         * platform/spi/cocoa/QuartzCoreSPI.h: Added the declaration of
1908         CARenderServerRenderLayerWithTransform.
1909
1910 2015-03-24  David Hyatt  <hyatt@apple.com>
1911
1912         Disable layout dimensions optimization for RenderRegions
1913         https://bugs.webkit.org/show_bug.cgi?id=143017
1914
1915         Reviewed by Dean Jackson.
1916
1917         * dom/Document.cpp:
1918         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1919         Turn off the optimization for regions, since auto height regions can change size
1920         without needing a layout.
1921
1922 2015-03-24  Beth Dakin  <bdakin@apple.com>
1923
1924         Add events related to force click gesture
1925         https://bugs.webkit.org/show_bug.cgi?id=142836
1926         -and corresponding-
1927         rdar://problem/20210239
1928
1929         Reviewed by Dean Jackson.
1930
1931         This patch adds six new events for the force click gesture:
1932
1933         webkitmouseforcewillbegin -> Event is sent just before mousedown to indicate that 
1934         force can be perceived if the user presses any harder. The author should prevent 
1935         default on this event to both prevent the user agent’s default force click 
1936         features and to receive the other 5 events.
1937
1938         webkitmouseforcechanged -> This event fires whenever force changes between the 
1939         mousedown and mouseup. It is a new type of mouse event that includes a force 
1940         variable which is a normalized number between 0 (corresponds to click) and 1 
1941         (corresponds to force click). In this patch, I have only added code to send this 
1942         event between mousedown and mouseforcedown, but as a followup patch, we plan to 
1943         send it through mouseup.
1944
1945         webkitmouseforcecancelled -> If the user releases their finger from the trackpad 
1946         after pressing hard enough to send webkitmouseforcewillbegin events but not hard 
1947         enough to force click, this event will be sent to indicate that the user bailed 
1948         out on the gesture.
1949
1950         webkitmouseforcedown -> The down part of the force click.
1951
1952         webkitmouseforceup -> The up part of the force click. This event is added in this 
1953         patch, but does not yet fire. That is work for a follow-up patch.
1954
1955         webkitmouseforceclick -> The equivalent of the click event for the force click. 
1956         Should fire just after webkitmouseforceup. This event is added in this patch, but 
1957         does not yet fire. That is work for a follow-up patch.
1958
1959         Add new files for WebKitMouseForceEvent to build systems.
1960         * DerivedSources.cpp:
1961         * DerivedSources.make:
1962         * WebCore.vcxproj/WebCore.vcxproj:
1963         * WebCore.vcxproj/WebCore.vcxproj.filters:
1964         * WebCore.xcodeproj/project.pbxproj:
1965         * WebCore.xcodeproj/project.pbxproj:
1966
1967         Plumbing for new events.
1968         * dom/Document.idl:
1969
1970         Code to dispatch the new events. Currently the code that calls these functions is 
1971         in WebKit2.
1972         * dom/Element.cpp:
1973         (WebCore::Element::dispatchMouseForceWillBegin):
1974         (WebCore::Element::dispatchMouseForceChanged):
1975         (WebCore::Element::dispatchMouseForceDown):
1976         (WebCore::Element::dispatchMouseForceUp):
1977         (WebCore::Element::dispatchMouseForceClick):
1978         (WebCore::Element::dispatchMouseForceCancelled):
1979         * dom/Element.h:
1980
1981         More plumbing.
1982         * dom/Element.idl:
1983         * dom/EventNames.h:
1984         * dom/EventNames.in:
1985
1986         Our new type of mouse event that includes force.
1987         * dom/WebKitMouseForceEvent.cpp: Added.
1988         (WebCore::WebKitMouseForceEventInit::WebKitMouseForceEventInit):
1989         (WebCore::WebKitMouseForceEvent::WebKitMouseForceEvent):
1990         (WebCore::WebKitMouseForceEvent::~WebKitMouseForceEvent):
1991         (WebCore::WebKitMouseForceEvent::eventInterface):
1992         * dom/WebKitMouseForceEvent.h: Added.
1993         * dom/WebKitMouseForceEvent.idl: Added.
1994
1995         More plumbing.
1996         * html/HTMLAttributeNames.in:
1997         * html/HTMLBodyElement.cpp:
1998         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
1999         * html/HTMLBodyElement.idl:
2000         * html/HTMLElement.cpp:
2001         (WebCore::HTMLElement::createEventHandlerNameMap):
2002         * page/DOMWindow.idl:
2003         * page/EventHandler.h:
2004         (WebCore::EventHandler::lastMouseDownEvent):
2005
2006 2015-03-24  Anders Carlsson  <andersca@apple.com>
2007
2008         Fix designated initializer violations
2009         https://bugs.webkit.org/show_bug.cgi?id=143016
2010         rdar://problem/20268858
2011
2012         Reviewed by Dan Bernstein.
2013
2014         Mark -[DOMObject init] as unavailable.
2015
2016         * bindings/objc/DOMObject.h:
2017         * bindings/objc/DOMObject.mm:
2018         (-[DOMObject init]):
2019
2020 2015-03-24  Benjamin Poulain  <benjamin@webkit.org>
2021
2022         CSS Selectors Level 4: enable case-insensitive attribute matching by default
2023         https://bugs.webkit.org/show_bug.cgi?id=142960
2024
2025         Reviewed by Andreas Kling.
2026
2027         All open issues have been resolved, enable the feature by default.
2028
2029         Test: fast/css/attribute-selector-case-insensitive.html
2030
2031         * css/CSSGrammar.y.in:
2032
2033 2015-03-24  Dean Jackson  <dino@apple.com>
2034
2035         MediaControls: Scrubber and Time displays have the incorrect blending
2036         https://bugs.webkit.org/show_bug.cgi?id=143011
2037         <rdar://problem/20245251>
2038
2039         Reviewed by Eric Carlson.
2040
2041         The scrubber in media controls should use plus-darker blending. Then
2042         the scrubber itself should use a slightly transparent black (55% opacity)
2043         when drawing.
2044
2045         * Modules/mediacontrols/mediaControlsiOS.css:
2046         (audio::-webkit-media-controls-timeline): Add the blend mode.
2047         * Modules/mediacontrols/mediaControlsiOS.js:
2048         (ControllerIOS.prototype.drawTimelineBackground): Start drawing with
2049         transparency. I changed the order of rendering to make it
2050         more clear we draw the three parts in left to right order.
2051
2052 2015-03-24  David Hyatt  <hyatt@apple.com>
2053
2054         Improve the offsetWidth/Height layout optimization
2055         https://bugs.webkit.org/show_bug.cgi?id=143008
2056
2057         Reviewed by Dean Jackson.
2058
2059         * dom/Document.cpp:
2060         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2061         * dom/Document.h:
2062         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
2063         the positioning restrictions on the optimization check.
2064
2065         * dom/Element.cpp:
2066         (WebCore::Element::offsetWidth):
2067         (WebCore::Element::offsetHeight):
2068         Change to use Element& instead of Element*.
2069
2070         (WebCore::Element::clientWidth):
2071         (WebCore::Element::clientHeight):
2072         (WebCore::Element::scrollWidth):
2073         (WebCore::Element::scrollHeight):
2074         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
2075
2076 2015-03-24  Yoav Weiss  <yoav@yoav.ws>
2077
2078         Stop image from displaying when src attribute is removed or emptied
2079         https://bugs.webkit.org/show_bug.cgi?id=142677
2080
2081         Reviewed by Chris Dumez.
2082
2083         Previously, we ignored empty attribute as failed URL, and didn't update the
2084         renderer when an image was removed. This patch fixes that.
2085
2086         Tests: fast/dom/HTMLImageElement/image-empty-src.html
2087                fast/dom/HTMLImageElement/image-remove-src.html
2088
2089         * loader/ImageLoader.cpp:
2090         (WebCore::ImageLoader::updateFromElement):
2091
2092 2015-03-17  Philippe Normand  <pnormand@igalia.com>
2093
2094         [OpenWebRTC] RealtimeMediaSourceCenter implementation
2095         https://bugs.webkit.org/show_bug.cgi?id=142476
2096
2097         Reviewed by Eric Carlson.
2098
2099         The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
2100         RealtimeMediaSourceCenter. It is not yet able to correctly assess
2101         MediaConstraints so it selects the first audio/video sources
2102         available through OpenWebRTC.
2103
2104         * PlatformEfl.cmake: Add new files to the build.
2105         * PlatformGTK.cmake: Ditto.
2106         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
2107         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
2108         (WebCore::initializeOpenWebRTC): Simple function to initialize the
2109         framework, it is going to be used by the PeerConnection backend as well.
2110         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
2111         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
2112         (WebCore::mediaSourcesAvailableCallback): Function invoked once
2113         the media sources discovery succeeded within OpenWebRTC.
2114         (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
2115         the OpenWebRTC RealtimeMediaSourceCenter.
2116         (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
2117         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
2118         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
2119         Schedule a discovery process for the capture sources.
2120         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
2121         the first audio/video sources and create a MediaStream accordingly.
2122         (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
2123         Not yet implemented.
2124         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
2125         Method invoked once the capture sources process succeeded. Parse
2126         them and create an internal cache of RealtimeMediaSources accordingly.
2127         (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
2128         function to fetch the first source of the given type from the
2129         RealtimeMediaSources cache.
2130         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
2131         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
2132
2133 2015-03-24  Csaba Osztrogonác  <ossy@webkit.org>
2134
2135         [EFL] Add OpenWebRTC in jhbuild
2136         https://bugs.webkit.org/show_bug.cgi?id=142778
2137
2138         Reviewed by Gyuyoung Kim.
2139
2140         Original patch by Philippe Normand <pnormand@igalia.com>
2141
2142         * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
2143
2144 2015-03-23 Yoav Weiss  <yoav@yoav.ws>
2145
2146         Update empty image canvas tests and fix a related bug
2147         https://bugs.webkit.org/show_bug.cgi?id=142694
2148
2149         Reviewed by Chris Dumez.
2150
2151         During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
2152         we encountered an issue with canvas tests related to empty image handling
2153         when drawn or used as a pattern. After updating these tests, an issue with
2154         pattern handling was encountered.
2155
2156         The spec, as well as Chrome's implementation, say that when an empty image
2157         is used as a pattern, createPattern should return null. See
2158         https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
2159         Instead, createPattern returned an exception in this case.
2160         This patch fixes that and makes sure that it returns a null when image loading hasn't started.
2161
2162         Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
2163                canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
2164                canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
2165                canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
2166                canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
2167
2168         * html/canvas/CanvasRenderingContext2D.cpp:
2169         (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
2170
2171 2015-03-23  Alex Christensen  <achristensen@webkit.org>
2172
2173         Fix api tests after r181876.
2174
2175         * contentextensions/ContentExtensionsBackend.cpp:
2176         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2177         Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
2178         * loader/cache/CachedResourceLoader.cpp:
2179         (WebCore::CachedResourceLoader::requestResource):
2180         Changed an assertion to a null check.
2181
2182 2015-03-23  Dean Jackson  <dino@apple.com>
2183
2184         Timelines are sharing the same canvas background
2185         https://bugs.webkit.org/show_bug.cgi?id=142994
2186         <rdar://problem/20209466>
2187
2188         Reviewed by Brent Fulgham.
2189
2190         Since each MediaControl lives in an isolated world, we
2191         can't rely on a global variable to provide a unique
2192         identifier for a named canvas. The fix is to expose
2193         WebCore's UUID generator, and have each canvas use
2194         that for a name.
2195
2196         * Modules/mediacontrols/MediaControlsHost.cpp:
2197         (WebCore::MediaControlsHost::generateUUID): New method on the
2198         MediaControlsHost that generates a UUID.
2199         * Modules/mediacontrols/MediaControlsHost.h:
2200         * Modules/mediacontrols/MediaControlsHost.idl:
2201
2202         * Modules/mediacontrols/mediaControlsApple.js: Remove the global
2203         variable unique ID that wasn't working, and instead get
2204         an ID from the MediaControlsHost.
2205         (Controller.prototype.createControls):
2206         * Modules/mediacontrols/mediaControlsiOS.js:
2207         (ControllerIOS):
2208
2209 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2210
2211         Scroll latching logic can get stuck in 'scrollable="no"' iframes
2212         https://bugs.webkit.org/show_bug.cgi?id=142789
2213         <rdar://problem/20129494>
2214
2215         Reviewed by Dean Jackson.
2216
2217         Clean up the EventHandler and latching code as follows:
2218         (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
2219             be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
2220             frames.
2221         (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
2222             different.
2223         (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
2224             the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
2225             treat iframe as a suitable target.
2226         (4) Do not create a latching state object when the container being evaluated is already scrolled to the
2227             extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
2228             to be the latching target.
2229         (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
2230             momentum scrolling, as an appropriate time to select a latching target.
2231
2232         * page/EventHandler.cpp:
2233         (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
2234         (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
2235         * page/EventHandler.h:
2236         * page/mac/EventHandlerMac.mm:
2237         (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
2238         notes above.
2239         (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
2240         consolidate logic.
2241         (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
2242         longer needed here, now that iframes are not processed by this code.
2243         (WebCore::findEnclosingScrollableContainer): Deleted.
2244         * page/scrolling/ScrollLatchingState.cpp:
2245         (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
2246         a temporary RefPtr to the the function.
2247         * page/scrolling/ScrollLatchingState.h:
2248         * platform/PlatformWheelEvent.h:
2249         (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
2250         that should not cause latching state to be revised.
2251
2252 2015-03-23  Anders Carlsson  <andersca@apple.com>
2253
2254         Try to fix the iOS build.
2255
2256         * platform/network/mac/CookieJarMac.mm:
2257
2258 2015-03-23  Brady Eidson  <beidson@apple.com>
2259
2260         Content extensions should apply css selectors
2261         https://bugs.webkit.org/show_bug.cgi?id=142604
2262
2263         Reviewed by Alex Christensen.
2264
2265         Tests: http/tests/contentextensions/css-display-none.html
2266
2267         * WebCore.xcodeproj/project.pbxproj:
2268
2269         * contentextensions/ContentExtension.cpp:
2270         (WebCore::ContentExtensions::ContentExtension::create):
2271         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
2272         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
2273         * contentextensions/ContentExtension.h:
2274         (WebCore::ContentExtensions::ContentExtension::identifier):
2275         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
2276
2277         * contentextensions/ContentExtensionsBackend.cpp:
2278         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
2279         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2280         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
2281         * contentextensions/ContentExtensionsBackend.h:
2282
2283         * contentextensions/DFABytecodeInterpreter.cpp:
2284         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2285
2286         * dom/DocumentStyleSheetCollection.cpp:
2287         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
2288         * dom/DocumentStyleSheetCollection.h:
2289
2290         * loader/DocumentLoader.cpp:
2291         (WebCore::DocumentLoader::commitData):
2292         (WebCore::DocumentLoader::startLoadingMainResource):
2293         (WebCore::DocumentLoader::addPendingContentExtensionSheet):
2294         * loader/DocumentLoader.h:
2295
2296         * loader/cache/CachedResourceLoader.cpp:
2297         (WebCore::CachedResourceLoader::requestResource):
2298
2299         * loader/cache/CachedResourceRequest.cpp:
2300         (WebCore::CachedResourceRequest::setInitiator):
2301         * loader/cache/CachedResourceRequest.h:
2302         (WebCore::CachedResourceRequest::initiatingDocumentLoader):
2303
2304         * page/UserContentController.cpp:
2305         (WebCore::UserContentController::globalDisplayNoneStyleSheet):
2306         (WebCore::UserContentController::displayNoneCSSRule):
2307         * page/UserContentController.h:
2308
2309 2015-03-23  Anders Carlsson  <andersca@apple.com>
2310
2311         -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
2312         https://bugs.webkit.org/show_bug.cgi?id=142990
2313         rdar://problem/20241645
2314
2315         Reviewed by Andreas Kling.
2316
2317         Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
2318
2319         * platform/network/cf/CookieJarCFNet.cpp:
2320         * platform/network/mac/CookieJarMac.mm:
2321
2322 2015-03-23  Conrad Shultz  <conrad_shultz@apple.com>
2323
2324         Replace uses of kCTFontSystemFontType
2325         https://bugs.webkit.org/show_bug.cgi?id=142984
2326
2327         Reviewed by Tim Horton.
2328
2329         * rendering/RenderThemeMac.mm:
2330         (WebCore::AttachmentLayout::layOutTitle):
2331         (WebCore::AttachmentLayout::layOutSubtitle):
2332
2333 2015-03-23  Dean Jackson  <dino@apple.com>
2334
2335         kCTFontSystemFontType is deprecated in CoreText
2336         https://bugs.webkit.org/show_bug.cgi?id=142981
2337         <rdar://problem/20261171>
2338
2339         Reviewed by Beth Dakin.
2340
2341         Update to the non-deprecated version.
2342
2343         * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
2344         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2345
2346 2015-03-23  Eric Carlson  <eric.carlson@apple.com>
2347
2348         [Mac] Enable fullscreen for MSE-based videos
2349         https://bugs.webkit.org/show_bug.cgi?id=142971
2350
2351         Reviewed by Jer Noble.
2352
2353         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2354         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
2355
2356 2015-03-23  Alex Christensen  <achristensen@webkit.org>
2357
2358         [MediaFoundation] Implement seek.
2359         https://bugs.webkit.org/show_bug.cgi?id=142594
2360
2361         Reviewed by Darin Adler.
2362
2363         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2364         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
2365         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
2366         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
2367         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2368
2369 2015-03-23  Dan Bernstein  <mitz@apple.com>
2370
2371         Fixed the build.
2372
2373         * platform/graphics/cocoa/FontCocoa.mm:
2374         (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
2375         (WebCore::Font::platformWidthForGlyph): Ditto.
2376
2377 2015-03-23  Jer Noble  <jer.noble@apple.com>
2378
2379         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
2380         https://bugs.webkit.org/show_bug.cgi?id=142970
2381
2382         Reviewed by Eric Carlson.
2383
2384         Return early after synchronously calling to the main thread to allocate the volume
2385         view, to avoid re-allocating the volume view again on the web thread.
2386
2387         * platform/audio/ios/MediaSessionManagerIOS.mm:
2388         (-[WebMediaSessionHelper allocateVolumeView]):
2389
2390 2015-03-23  Tim Horton  <timothy_horton@apple.com>
2391
2392         Add a share item to the link action menu
2393         https://bugs.webkit.org/show_bug.cgi?id=142961
2394         <rdar://problem/19198374>
2395
2396         Reviewed by Beth Dakin.
2397
2398         * English.lproj/Localizable.strings:
2399         Remove some now-unused strings.
2400
2401         * platform/spi/mac/NSMenuSPI.h:
2402         Add some SPI.
2403
2404 2015-03-23  David Kilzer  <ddkilzer@apple.com>
2405
2406         [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
2407
2408         Fix tracked by:  <rdar://problem/20261171>
2409
2410         * rendering/RenderThemeIOS.mm:
2411         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2412         Add clang pragmas.
2413
2414 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2415
2416         Unreviewed test fix.
2417
2418         * css/CSSParser.cpp:
2419         (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
2420
2421 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2422
2423         scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
2424         https://bugs.webkit.org/show_bug.cgi?id=142552
2425         <rdar://problem/20114743>
2426
2427         Reviewed by Dean Jackson.
2428
2429         Revise the snap point logic as follows:
2430         (1) Put the snap point destination handling in a helper function to make the rest of the code
2431             easier to read.
2432         (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
2433             left-hand snap points.
2434         (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
2435             behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
2436         (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
2437
2438         * css/CSSParser.cpp:
2439         (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
2440         * page/scrolling/AxisScrollSnapOffsets.cpp:
2441         (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
2442         destination coordinates.
2443         (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
2444         (WebCore::styleUsesElements): Added helper function.
2445         (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
2446         offsets.
2447
2448 2015-03-23  Yoav Weiss  <yoav@yoav.ws>
2449
2450         Refactor ImageLoader's setting of CachedImage
2451         https://bugs.webkit.org/show_bug.cgi?id=142825
2452
2453         Reviewed by Chris Dumez.
2454
2455         No new tests, since there's no functional change.
2456
2457         setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
2458         CachedImages and were not used as originally intended. That resulted in some dead code,
2459         and confusion when going over the code.
2460         This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
2461
2462         * html/HTMLObjectElement.cpp:
2463         (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
2464         * loader/ImageLoader.cpp:
2465         (WebCore::ImageLoader::clearImage):
2466         (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
2467         (WebCore::ImageLoader::notifyFinished):
2468         (WebCore::ImageLoader::elementDidMoveToNewDocument):
2469         (WebCore::ImageLoader::setImage): Deleted.
2470         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
2471         * loader/ImageLoader.h:
2472
2473 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
2474
2475         CSS Selectors: fix attribute case-insensitive matching of Contain and List
2476         https://bugs.webkit.org/show_bug.cgi?id=142932
2477
2478         Reviewed by Darin Adler.
2479
2480         Fix the last two attribute selectors that were using full case-insensitive
2481         match:
2482             -Contain ([foo*=bar]).
2483             -List (foo~=bar]).
2484
2485         Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
2486                fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
2487
2488         * css/SelectorChecker.cpp:
2489         (WebCore::attributeValueMatches):
2490         * cssjit/SelectorCompiler.cpp:
2491         (WebCore::SelectorCompiler::attributeValueContains):
2492         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
2493
2494 2015-03-22  Benjamin Poulain  <bpoulain@apple.com>
2495
2496         Detect when url filter pattern with groups match the empty string
2497         https://bugs.webkit.org/show_bug.cgi?id=142930
2498
2499         Reviewed by Sam Weinig.
2500
2501         The previous test was only accounting for simple atoms. This patch extends
2502         it to groups.
2503
2504         * contentextensions/URLFilterParser.cpp:
2505         (WebCore::ContentExtensions::Term::quantify):
2506         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
2507         (WebCore::ContentExtensions::GraphBuilder::finalize):
2508         (WebCore::ContentExtensions::Term::quantifier): Deleted.
2509
2510 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
2511
2512         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
2513         https://bugs.webkit.org/show_bug.cgi?id=142940
2514
2515         Reviewed by Sam Weinig.
2516
2517         * dom/Document.cpp:
2518         (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
2519         * dom/Document.h:
2520
2521         * html/HTMLMediaSession.cpp:
2522         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
2523         * html/HTMLMediaSession.h:
2524
2525         * page/Page.cpp:
2526         (WebCore::Page::didChoosePlaybackTarget):  Ditto.
2527         * page/Page.h:
2528
2529         * platform/audio/MediaSession.h:
2530         * platform/graphics/MediaPlaybackTargetPickerClient.h:
2531         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: 
2532         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):  Ditto.
2533
2534 2015-03-22  Anders Carlsson  <andersca@apple.com>
2535
2536         _WKWebsiteDataStore should clear WebSQL databases
2537         https://bugs.webkit.org/show_bug.cgi?id=142947
2538
2539         Reviewed by Sam Weinig.
2540
2541         * Modules/webdatabase/DatabaseTracker.cpp:
2542         (WebCore::DatabaseTracker::trackerWithDatabasePath):
2543         Add a hack so we can get at a tracker from the UI process.
2544
2545         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
2546         New function that deletes all databases modified after a given time.
2547
2548         * Modules/webdatabase/DatabaseTracker.h:
2549         Add new members and export the ones we want to call from WebKit2.
2550
2551         * Modules/webdatabase/OriginLock.h:
2552         Export the destructor.
2553
2554 2015-03-21  Dean Jackson  <dino@apple.com>
2555
2556         Remove the prefix for CSS Transforms
2557         https://bugs.webkit.org/show_bug.cgi?id=142927
2558         <rdar://problem/11568151>
2559
2560         Reviewed by Simon Fraser.
2561
2562         Support the bare form of:
2563         - transform
2564         - transform-style
2565         - transform-origin
2566         - perspective
2567         - perspective-origin
2568
2569         For transform-style, we also still differentiate the prefixed property
2570         because we may want to use that as an indicator of legacy content.
2571
2572         This is mostly a find and replace, but with some related naming
2573         changes. The DOM interface for WebKitCSSTransformValue remains
2574         unchanged.
2575
2576         Tests: transforms/2d/transform-2d-prefixed.html
2577                transforms/3d/general/prefixed-3dtransform-values.html
2578
2579         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2580         (WebCore::propertyChangeMayRepaintNonDescendants):
2581         * css/CSSComputedStyleDeclaration.cpp:
2582         (WebCore::isLayoutDependent):
2583         (WebCore::ComputedStyleExtractor::propertyValue):
2584         * css/CSSParser.cpp:
2585         (WebCore::isValidKeywordPropertyAndValue):
2586         (WebCore::isKeywordPropertyID):
2587         (WebCore::parseTranslateTransformValue):
2588         (WebCore::CSSParser::parseValue):
2589         (WebCore::CSSParser::parseTransformOrigin):
2590         (WebCore::CSSParser::parsePerspectiveOrigin):
2591         * css/CSSPropertyNames.in:
2592         * css/StyleProperties.cpp:
2593         (WebCore::StyleProperties::getPropertyValue):
2594         (WebCore::StyleProperties::asText):
2595         * css/WebKitCSSMatrix.cpp:
2596         (WebCore::WebKitCSSMatrix::setMatrixValue):
2597         * html/track/VTTCue.cpp:
2598         (WebCore::VTTCueBox::applyCSSProperties):
2599         * page/animation/AnimationController.cpp:
2600         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
2601         * page/animation/CSSPropertyAnimation.cpp:
2602         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2603         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2604         * page/animation/CompositeAnimation.cpp:
2605         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2606         * page/animation/ImplicitAnimation.cpp:
2607         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2608         * page/animation/KeyframeAnimation.cpp:
2609         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2610         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2611         * platform/graphics/GraphicsLayer.cpp:
2612         (WebCore::GraphicsLayer::validateTransformOperations):
2613         * platform/graphics/GraphicsLayerClient.h:
2614         * platform/graphics/ca/GraphicsLayerCA.cpp:
2615         (WebCore::propertyIdToString):
2616         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2617         (WebCore::GraphicsLayerCA::addAnimation):
2618         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
2619         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2620         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2621         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2622         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2623         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2624         (WebCore::TextureMapperAnimation::applyInternal):
2625         * platform/graphics/texmap/TextureMapperLayer.cpp:
2626         (WebCore::TextureMapperLayer::syncAnimations):
2627         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2628         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
2629         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
2630         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2631         * rendering/RenderLayerBacking.cpp:
2632         (WebCore::RenderLayerBacking::updateGeometry):
2633         (WebCore::RenderLayerBacking::startAnimation):
2634         (WebCore::RenderLayerBacking::startTransition):
2635         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2636         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2637         * rendering/RenderLayerCompositor.cpp:
2638         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2639         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
2640         * svg/SVGElement.cpp:
2641         (WebCore::populateAttributeNameToCSSPropertyIDMap):
2642
2643 2015-03-21  Commit Queue  <commit-queue@webkit.org>
2644
2645         Unreviewed, rolling out r181824.
2646         https://bugs.webkit.org/show_bug.cgi?id=142935
2647
2648         Broke Windows build (Requested by ap on #webkit).
2649
2650         Reverted changeset:
2651
2652         "Remove the prefix for CSS Transforms"
2653         https://bugs.webkit.org/show_bug.cgi?id=142927
2654         http://trac.webkit.org/changeset/181824
2655
2656 2015-03-20  Dean Jackson  <dino@apple.com>
2657
2658         Remove the prefix for CSS Transforms
2659         https://bugs.webkit.org/show_bug.cgi?id=142927
2660         <rdar://problem/11568151>
2661
2662         Reviewed by Simon Fraser.
2663
2664         Support the bare form of:
2665         - transform
2666         - transform-style
2667         - transform-origin
2668         - perspective
2669         - perspective-origin
2670
2671         For transform-style, we also still differentiate the prefixed property
2672         because we may want to use that as an indicator of legacy content.
2673
2674         This is mostly a find and replace, but with some related naming
2675         changes. The DOM interface for WebKitCSSTransformValue remains
2676         unchanged.
2677
2678         Tests: transforms/2d/transform-2d-prefixed.html
2679                transforms/3d/general/prefixed-3dtransform-values.html
2680
2681         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2682         (WebCore::propertyChangeMayRepaintNonDescendants):
2683         * css/CSSComputedStyleDeclaration.cpp:
2684         (WebCore::isLayoutDependent):
2685         (WebCore::ComputedStyleExtractor::propertyValue):
2686         * css/CSSParser.cpp:
2687         (WebCore::isValidKeywordPropertyAndValue):
2688         (WebCore::isKeywordPropertyID):
2689         (WebCore::parseTranslateTransformValue):
2690         (WebCore::CSSParser::parseValue):
2691         (WebCore::CSSParser::parseTransformOrigin):
2692         (WebCore::CSSParser::parsePerspectiveOrigin):
2693         * css/CSSPropertyNames.in:
2694         * css/StyleProperties.cpp:
2695         (WebCore::StyleProperties::getPropertyValue):
2696         (WebCore::StyleProperties::asText):
2697         * css/WebKitCSSMatrix.cpp:
2698         (WebCore::WebKitCSSMatrix::setMatrixValue):
2699         * html/track/VTTCue.cpp:
2700         (WebCore::VTTCueBox::applyCSSProperties):
2701         * page/animation/AnimationController.cpp:
2702         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
2703         * page/animation/CSSPropertyAnimation.cpp:
2704         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2705         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2706         * page/animation/CompositeAnimation.cpp:
2707         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2708         * page/animation/ImplicitAnimation.cpp:
2709         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2710         * page/animation/KeyframeAnimation.cpp:
2711         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2712         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2713         * platform/graphics/GraphicsLayer.cpp:
2714         (WebCore::GraphicsLayer::validateTransformOperations):
2715         * platform/graphics/GraphicsLayerClient.h:
2716         * platform/graphics/ca/GraphicsLayerCA.cpp:
2717         (WebCore::propertyIdToString):
2718         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2719         (WebCore::GraphicsLayerCA::addAnimation):
2720         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
2721         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2722         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2723         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2724         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2725         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2726         (WebCore::TextureMapperAnimation::applyInternal):
2727         * platform/graphics/texmap/TextureMapperLayer.cpp:
2728         (WebCore::TextureMapperLayer::syncAnimations):
2729         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2730         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
2731         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
2732         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2733         * rendering/RenderLayerBacking.cpp:
2734         (WebCore::RenderLayerBacking::updateGeometry):
2735         (WebCore::RenderLayerBacking::startAnimation):
2736         (WebCore::RenderLayerBacking::startTransition):
2737         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2738         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2739         * rendering/RenderLayerCompositor.cpp:
2740         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2741         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
2742         * svg/SVGElement.cpp:
2743         (WebCore::populateAttributeNameToCSSPropertyIDMap):
2744
2745 2015-03-20  Yusuke Suzuki  <utatane.tea@gmail.com>
2746
2747         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
2748         https://bugs.webkit.org/show_bug.cgi?id=142410
2749
2750         Reviewed by Geoffrey Garen.
2751
2752         The same issues are found in the existing code; PropertyName does not have ownership.
2753         This patch rewrite the point that should have ownership to Identifier.
2754
2755         * bindings/js/JSDOMWindowCustom.cpp:
2756         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2757         (WebCore::JSDOMWindow::putByIndex):
2758         * bindings/js/ReadableStreamJSSource.cpp:
2759         (WebCore::getInternalSlotFromObject):
2760         * bindings/scripts/CodeGeneratorJS.pm:
2761         (GenerateImplementation):
2762         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2763         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
2764         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2765         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
2766         * bindings/scripts/test/JS/JSTestInterface.cpp:
2767         (WebCore::JSTestInterface::putByIndex):
2768
2769 2015-03-20  Simon Fraser  <simon.fraser@apple.com>
2770
2771         Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
2772         https://bugs.webkit.org/show_bug.cgi?id=142917
2773
2774         Reviewed by Beth Dakin.
2775         
2776         The scrollperf test would fail to detect transitions between slow and fast scrolling
2777         for new pages, because there was no logging when slow-scrolling scrolling tree was
2778         torn down, and a new fast-scrolling tree constructed.
2779         
2780         Fix by always logging the slow-scrolling reasons in the first update of the
2781         ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
2782         changed.
2783
2784         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2785         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2786         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2787         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2788
2789 2015-03-19  Geoffrey Garen  <ggaren@apple.com>
2790
2791         Function.prototype.toString should not decompile the AST
2792         https://bugs.webkit.org/show_bug.cgi?id=142853
2793
2794         Reviewed by Sam Weinig.
2795
2796         * bindings/js/JSLazyEventListener.cpp:
2797         (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
2798         number of attribute event listeners to account for the leading newline
2799         now added by JavaScriptCore.
2800
2801         This solution is not perfect, but there are a lot of pre-existing problems
2802         with line and column reporting for attribute event listeners, and this
2803         preserves existing behavior with reasonable reliability.
2804
2805 2015-03-20  Alex Christensen  <achristensen@webkit.org>
2806
2807         Progress towards CMake on Mac.
2808         https://bugs.webkit.org/show_bug.cgi?id=136003
2809
2810         Reviewed by Chris Dumez.
2811
2812         * PlatformMac.cmake:
2813         Added some directories to create forwarding headers from.
2814         Generate ObjC bindings.
2815
2816 2015-03-20  Per Arne Vollan  <peavo@outlook.com>
2817
2818         [WinCairo] Crash when leaving page while video is playing.
2819         https://bugs.webkit.org/show_bug.cgi?id=142578
2820
2821         Reviewed by Alex Christensen.
2822
2823         This can happen when there is an asynchronous event invoked from a video worker
2824         thread, accessing the media player object after it has been deleted.
2825         This is solved by resetting the media player pointer in the event object,
2826         when the media player is deleted.
2827
2828         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2829         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
2830         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
2831         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
2832         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
2833         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
2834         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
2835         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
2836         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
2837         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2838         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
2839         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
2840         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
2841
2842 2015-03-20  Chris Dumez  <cdumez@apple.com>
2843
2844         Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
2845         https://bugs.webkit.org/show_bug.cgi?id=142911
2846
2847         Reviewed by Antti Koivisto.
2848
2849         Drop the isBackForwardLoadType(m_loadType) assertion in
2850         FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
2851         used to hold true when goToBackForwardItem() was only called with
2852         history navigation load types. However, after r181782, we use a Standard
2853         load in the cases where we do not wish to display stale content (e.g.
2854         restoring session state).
2855
2856         The assertion comment says "We only use cache-only loads to avoid
2857         resubmitting forms". However, we then call loadDifferentDocumentItem()
2858         which already takes care of using the ReturnCacheDataElseLoad cache
2859         policy as the HistoryItem has form data and we pass
2860         MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
2861
2862         No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
2863         API test.
2864
2865         * loader/FrameLoader.cpp:
2866         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
2867
2868 2015-03-20  Andy Estes  <aestes@apple.com>
2869
2870         [Content Filtering] Adopt NEFilterSource unblock handling
2871         https://bugs.webkit.org/show_bug.cgi?id=142904
2872
2873         Reviewed by Andreas Kling.
2874
2875         * platform/cocoa/NetworkExtensionContentFilter.mm:
2876         (WebCore::NetworkExtensionContentFilter::unblockHandler):
2877         Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
2878         * platform/cocoa/ParentalControlsContentFilter.mm:
2879         (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
2880
2881 2015-03-19  Andy Estes  <aestes@apple.com>
2882
2883         [Content Filtering] Add tests for unblock requests
2884         https://bugs.webkit.org/show_bug.cgi?id=142900
2885
2886         Reviewed by Andreas Kling.
2887
2888         Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
2889         WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
2890         and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
2891         successful then we schedule a reload of the frame in order to display the unblocked document.
2892
2893         NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
2894         content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
2895         and writes tests to cover both allowed and denied unblock requests.
2896
2897         The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
2898         when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
2899         the context of its error page if the unblock is denied.
2900
2901         All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
2902         Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
2903         existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
2904
2905         Tests: contentfiltering/allow-after-unblock-request.html
2906                contentfiltering/block-after-unblock-request.html
2907
2908         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
2909         (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
2910         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
2911         (WebCore::toJSValue): Returns a JSValue from a Decision.
2912         (WebCore::toDecision): Returns a Decision from a JSValue.
2913         (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
2914         (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
2915         (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
2916         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
2917         * loader/ContentFilter.cpp:
2918         (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
2919         (WebCore::ContentFilter::ContentFilter): Ditto.
2920         (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
2921         unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
2922         * loader/ContentFilter.h:
2923         * loader/DocumentLoader.cpp:
2924         (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
2925         * loader/FrameLoader.cpp:
2926         (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
2927         * loader/PolicyChecker.cpp:
2928         (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
2929         (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
2930         Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
2931         be called in the UI process).
2932         * loader/PolicyChecker.h:
2933         (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
2934         * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
2935         copied by background threads managed by the underlying platform.
2936         * platform/ContentFilterUnblockHandler.h:
2937         (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
2938         (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
2939         (WebCore::ContentFilterUnblockHandler::clear): Deleted.
2940         * platform/PlatformContentFilter.h:
2941         (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
2942         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2943         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
2944         unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
2945         WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
2946         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
2947         (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
2948         (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
2949         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
2950         or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
2951         (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
2952         is enabled on iOS, dispatch it there.
2953         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
2954         Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
2955         (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
2956         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
2957         * platform/cocoa/ParentalControlsContentFilter.mm:
2958         (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
2959         * testing/MockContentFilter.cpp: Added using statments for clarity.
2960         (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
2961         (WebCore::MockContentFilter::canHandleResponse): Used the helper.
2962         (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
2963         (WebCore::MockContentFilter::addData): Ditto.
2964         (WebCore::MockContentFilter::finishedAddingData): Ditto.
2965         (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
2966         (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
2967         error page when an unblock request is denied.
2968         (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
2969         * testing/MockContentFilterSettings.cpp:
2970         (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
2971         * testing/MockContentFilterSettings.h:
2972         (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
2973         (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
2974         (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
2975         * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
2976
2977 2015-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2978
2979         [GTK] Crash due to empty drag image during drag-and-drop
2980         https://bugs.webkit.org/show_bug.cgi?id=142671
2981
2982         Reviewed by Philippe Normand.
2983
2984         Return early from ImageBuffer constructor if an empty size is
2985         given. This is a speculative fix for a crash while starting a drag
2986         and drop operation, that I haven't been able to reproduce.
2987
2988         * platform/graphics/cairo/ImageBufferCairo.cpp:
2989         (WebCore::ImageBuffer::ImageBuffer):
2990
2991 2015-03-19  Chris Dumez  <cdumez@apple.com>
2992
2993         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
2994         https://bugs.webkit.org/show_bug.cgi?id=142893
2995         <rdar://problem/19633737>
2996         <rdar://problem/19869257>
2997
2998         Reviewed by Antti Koivisto.
2999
3000         Always use ReturnCacheDataElseLoad cache policy for history navigations.
3001         Previously, we would use the default protocol cache policy for history
3002         navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
3003         false so that we do not display stale content when restoring the session
3004         state of Safari statup (rdar://problem/8131355). This is now handled
3005         before reaching this method by no longer using "IndexedBackForward"
3006         FrameLoadType when restoring session tabs, and using "Standard" load
3007         type instead.
3008
3009         * loader/FrameLoader.cpp:
3010         (WebCore::FrameLoader::loadDifferentDocumentItem):
3011
3012 2015-03-19  Andy Estes  <aestes@apple.com>
3013
3014         [Content Filtering] Move ContentFilter to from platform/ to loader/
3015         https://bugs.webkit.org/show_bug.cgi?id=142897
3016
3017         Reviewed by Dan Bernstein.
3018
3019         ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
3020         Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
3021         the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
3022         individual filters inherit from.
3023
3024         * WebCore.xcodeproj/project.pbxproj:
3025         * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
3026         (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
3027         (WebCore::ContentFilter::createIfNeeded): Ditto.
3028         (WebCore::ContentFilter::ContentFilter): Ditto.
3029         (WebCore::ContentFilter::addData): Ditto.
3030         (WebCore::ContentFilter::finishedAddingData): Ditto.
3031         (WebCore::ContentFilter::needsMoreData): Ditto.
3032         (WebCore::ContentFilter::didBlockData): Ditto.
3033         (WebCore::ContentFilter::getReplacementData): Ditto.
3034         (WebCore::ContentFilter::unblockHandler): Ditto.
3035         * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
3036         (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
3037         * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
3038         * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
3039         * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
3040         * testing/MockContentFilter.h: Ditto.
3041
3042 2015-03-19  Dean Jackson  <dino@apple.com>
3043
3044         CSS Animations with triggers should map scroll position to duration
3045         https://bugs.webkit.org/show_bug.cgi?id=142870
3046         <rdar://problem/20227244>
3047
3048         Reviewed by Simon Fraser.
3049
3050         Expose a prototype implementation of what will eventually be called
3051         animation-timebase, mapping the scroll location to the duration of an
3052         animation. This only applies if the animation has a start and end
3053         trigger.
3054
3055         Test: animations/trigger-container-scroll-boundaries.html
3056
3057         * css/CSSComputedStyleDeclaration.cpp:
3058         (WebCore::createAnimationTriggerValue): Change to downcast.
3059
3060         * css/CSSToStyleMap.cpp:
3061         (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
3062         telling the ScrollAnimationTrigger object whether or not it had
3063         an end value. This wasn't visible before because we were not using
3064         the end value.
3065
3066         * page/animation/AnimationBase.cpp:
3067         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
3068         change to using a downcast.
3069         (WebCore::AnimationBase::timeToNextService): Change to downcast.
3070         (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
3071         (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
3072         on the scroll position relative to the start and end trigger spots.
3073
3074         * page/animation/AnimationController.cpp:
3075         (WebCore::AnimationControllerPrivate::updateAnimations): Since this
3076         can potentially call into beginAnimationUpdateTime, it should have
3077         an update blocker. This fixes the assert we were seeing in tests.
3078         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
3079         position so we don't need to ask for it all the time.
3080         * page/animation/AnimationControllerPrivate.h:
3081         (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
3082
3083         * platform/animation/AnimationTrigger.h: Add downcast macros.
3084         (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
3085         parameters rather than a separate value.
3086         (WebCore::ScrollAnimationTrigger::hasEndValue):
3087         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
3088         (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
3089
3090         * platform/graphics/ca/GraphicsLayerCA.cpp:
3091         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
3092         animation of this sort, we can't use a CAAnimation.
3093
3094 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
3095
3096         [Mac] Move MediaPlaybackTargetPicker
3097         https://bugs.webkit.org/show_bug.cgi?id=142889
3098
3099         Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
3100         can be used by both WK2 and WK1.
3101
3102         Reviewed by Tim Horton.
3103
3104         * WebCore.xcodeproj/project.pbxproj:
3105         * platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
3106         * platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
3107         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
3108         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.
3109
3110 2015-03-19  Enrica Casucci  <enrica@apple.com>
3111
3112         REGRESSION (r109593): Clicking after last inline element could cause a crash.
3113         https://bugs.webkit.org/show_bug.cgi?id=142880
3114         rdar://problem/17222294
3115
3116         Reviewed by Ryosuke Niwa.
3117
3118         Test: editing/selection/click-after-last-inline-crash.html
3119
3120         * rendering/RootInlineBox.cpp:
3121         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
3122
3123 2015-03-19  Enrica Casucci  <enrica@apple.com>
3124
3125         One more build fix after r181760.
3126
3127         * page/EventHandler.cpp:
3128         (WebCore::EventHandler::handleDrag):
3129
3130 2015-03-19  Jessie Berlin  <jberlin@webkit.org>
3131
3132         Build fix after r181760.
3133
3134         * rendering/RenderAttachment.h:
3135
3136 2015-03-19  Jer Noble  <jer.noble@apple.com>
3137
3138         [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
3139         https://bugs.webkit.org/show_bug.cgi?id=142132
3140
3141         Reviewed by Tim Horton.
3142
3143         Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.
3144
3145         * platform/graphics/GeometryUtilities.cpp:
3146         (WebCore::smallestRectWithAspectRatioAroundRect):
3147         * platform/graphics/GeometryUtilities.h:
3148
3149 2015-03-19  Chris Dumez  <cdumez@apple.com>
3150
3151         Get rid of "CachePolicyCache" cache policy
3152         https://bugs.webkit.org/show_bug.cgi?id=142881
3153
3154         Reviewed by Antti Koivisto.
3155
3156         Get rid of "CachePolicyCache" cache policy as it is unused.
3157
3158         * loader/cache/CachePolicy.h:
3159         * loader/cache/CachedResource.cpp:
3160         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
3161         * page/DiagnosticLoggingKeys.cpp:
3162         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
3163         * page/DiagnosticLoggingKeys.h:
3164
3165 2015-03-19  Alex Christensen  <achristensen@webkit.org>
3166
3167         [Content Extensions] Test regular expression parse failures.
3168         https://bugs.webkit.org/show_bug.cgi?id=142872
3169
3170         Reviewed by Benjamin Poulain.
3171
3172         * contentextensions/URLFilterParser.cpp:
3173         (WebCore::ContentExtensions::GraphBuilder::finalize):
3174         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
3175         (WebCore::ContentExtensions::URLFilterParser::addPattern):
3176         (WebCore::ContentExtensions::URLFilterParser::statusString):
3177         * contentextensions/URLFilterParser.h:
3178         Changed failures that can never happen to assertions.
3179
3180 2015-03-19  Enrica Casucci  <enrica@apple.com>
3181
3182         Release build fix after https://trac.webkit.org/r181760.
3183
3184         Unreviewed.
3185
3186         * page/EventHandler.cpp:
3187         (WebCore::EventHandler::handleDrag):
3188
3189 2015-03-19  Enrica Casucci  <enrica@apple.com>
3190
3191         <attachment> should put URLs on the pasteboard so that Finder can accept drops.
3192         https://bugs.webkit.org/show_bug.cgi?id=142801
3193         rdar://problem/19982527
3194
3195         Reviewed by Tim Horton.
3196
3197         Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html
3198
3199         This patch adds all the necessary support to write attachment elements into
3200         the pasteboard, including the promised type.
3201
3202         * WebCore.xcodeproj/project.pbxproj:
3203         * page/DragActions.h:
3204         * page/DragClient.h:
3205         (WebCore::DragClient::declareAndWriteAttachment):
3206         * page/DragController.cpp:
3207         (WebCore::DragController::draggableElement):
3208         (WebCore::DragController::startDrag):
3209         * page/DragController.h:
3210         (WebCore::DragController::draggingAttachmentURL):
3211         * page/EventHandler.cpp:
3212         (WebCore::EventHandler::dragHysteresisExceeded):
3213         (WebCore::EventHandler::handleDrag):
3214         * page/mac/DragControllerMac.mm:
3215         (WebCore::DragController::declareAndWriteAttachment):
3216         * page/win/DragControllerWin.cpp:
3217         (WebCore::DragController::declareAndWriteAttachment):
3218         * platform/URL.cpp:
3219         (WebCore::URL::fileURLWithFileSystemPath):
3220         * platform/URL.h:
3221         * rendering/HitTestResult.cpp:
3222         (WebCore::HitTestResult::absoluteAttachmentURL):
3223         * rendering/HitTestResult.h:
3224
3225 2015-03-19  Chris Dumez  <cdumez@apple.com>
3226
3227         Unreviewed, fix linking error after r181753.
3228
3229         Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
3230         now inlined.
3231
3232         * page/Settings.h:
3233         (WebCore::Settings::minimumDOMTimerInterval):
3234
3235 2015-03-19  Brady Eidson  <beidson@apple.com>
3236
3237         Part of content extensions should apply css selectors
3238         https://bugs.webkit.org/show_bug.cgi?id=142604
3239
3240         Reviewed by Alex Christensen.
3241
3242         Add a new action for applying the cached global stylesheet.
3243
3244         * contentextensions/CompiledContentExtension.cpp:
3245         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
3246
3247         * contentextensions/ContentExtensionActions.h:
3248
3249         * contentextensions/ContentExtensionCompiler.cpp:
3250         (WebCore::ContentExtensions::serializeActions):
3251
3252         * contentextensions/ContentExtensionParser.cpp:
3253         (WebCore::ContentExtensions::loadAction):
3254
3255         * contentextensions/ContentExtensionRule.cpp:
3256         (WebCore::ContentExtensions::Action::deserialize):
3257         * contentextensions/ContentExtensionRule.h:
3258         (WebCore::ContentExtensions::Action::Action):
3259         (WebCore::ContentExtensions::Action::operator==):
3260         (WebCore::ContentExtensions::Action::stringArgument):
3261         (WebCore::ContentExtensions::Action::cssSelector): Deleted.
3262
3263         * contentextensions/ContentExtensionsBackend.cpp:
3264         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3265
3266         * loader/cache/CachedResourceLoader.cpp:
3267         (WebCore::CachedResourceLoader::requestResource):
3268
3269 2015-03-19  Chris Dumez  <cdumez@apple.com>
3270
3271         Clean up DOMTimer related settings
3272         https://bugs.webkit.org/show_bug.cgi?id=142837
3273
3274         Reviewed by Darin Adler.
3275
3276         Clean up DOMTimer related settings:
3277         - Make default minimum timer interval 4ms instead of 10ms as all ports
3278           were setting it to 4ms and the specifications says 4ms.
3279         - Get rid of setters for default DOMTimer interval values as they are
3280           not set anymore.
3281         - Move default DOMTimer interval values from Settings to DOMTimer as
3282           those are global (not per-page) and not really settings.
3283         - Stop using abbreviations in the names (e.g. min -> minimum).
3284         - Move DOMTimer settings members from Page to Settings. There is no
3285           reason for those to be stored on the Page. The getters were private
3286           so call-sites had to go via Settings anyway. Also, call-sites already
3287           had to do a null check on the page to get the settings. It seems
3288           unfortunate for the settings to do another null-check on the page for
3289           retrieving the setting value from the page.
3290         - Inline the DOMTimer settings getters as these are trivial.
3291
3292         * dom/Document.cpp:
3293         (WebCore::Document::minimumTimerInterval):
3294         (WebCore::Document::timerAlignmentInterval):
3295         * dom/ScriptExecutionContext.cpp:
3296         (WebCore::ScriptExecutionContext::minimumTimerInterval):
3297         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
3298         * page/DOMTimer.h:
3299         * page/Page.cpp:
3300         (WebCore::Page::Page):
3301         (WebCore::Page::setTimerThrottlingEnabled):
3302         (WebCore::Page::setMinimumTimerInterval): Deleted.
3303         (WebCore::Page::minimumTimerInterval): Deleted.
3304         * page/Page.h:
3305         (WebCore::Page::timerAlignmentInterval): Deleted.
3306         * page/Settings.cpp:
3307         (WebCore::Settings::Settings):
3308         (WebCore::Settings::setMinimumDOMTimerInterval):
3309         (WebCore::Settings::setDOMTimerAlignmentInterval):
3310         (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
3311         (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
3312         (WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
3313         (WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
3314         (WebCore::Settings::setMinDOMTimerInterval): Deleted.
3315         (WebCore::Settings::minDOMTimerInterval): Deleted.
3316         (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
3317         (WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
3318         (WebCore::Settings::domTimerAlignmentInterval): Deleted.
3319         * page/Settings.h:
3320         (WebCore::Settings::minimumDOMTimerInterval):
3321         (WebCore::Settings::domTimerAlignmentInterval):
3322         * testing/InternalSettings.cpp:
3323         (WebCore::InternalSettings::Backup::Backup):
3324         (WebCore::InternalSettings::Backup::restoreTo):
3325         (WebCore::InternalSettings::setMinimumTimerInterval):
3326
3327 2015-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3328
3329         [GTK] Scrollbars look bad with GTK+ 3.16
3330         https://bugs.webkit.org/show_bug.cgi?id=140800
3331
3332         Reviewed by Sergio Villar Senin.
3333
3334         Take margin into account when rendering scrollbars. This fixes the
3335         huge scrollbars rendered with GTK+ 3.16. We don't need to check
3336         the GTK+ version because in previous versions the marging were 0,
3337         so the same code just works.
3338
3339         * platform/gtk/ScrollbarThemeGtk.cpp:
3340         (WebCore::adjustRectAccordingToMargin):
3341         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
3342         (WebCore::ScrollbarThemeGtk::paintThumb):
3343
3344 2015-03-19  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3345
3346         [Streams API] Update ReadableStream API according new version of the specification
3347         https://bugs.webkit.org/show_bug.cgi?id=142822
3348
3349         Reviewed by Benjamin Poulain.
3350
3351         This patch updates the IDL of ReadableStream according the new version of the spec, which splits functionality between ReadableStream and ReadableStreamReader.
3352         In particular, this patch removes read(), ready, closed and state from ReadableStream and it adds the getReader method.
3353
3354         Covered by updated readablestream-constructor.html test.
3355
3356         * Modules/streams/ReadableStream.cpp:
3357         (WebCore::ReadableStream::ReadableStream):
3358         (WebCore::ReadableStream::state): Deleted.
3359         (WebCore::ReadableStream::closed): Deleted.
3360         (WebCore::ReadableStream::ready): Deleted.
3361         * Modules/streams/ReadableStream.h:
3362         (WebCore::ReadableStream::internalState): Added to make mac build system happy, to be used by ReadableStreamReader.
3363         * Modules/streams/ReadableStream.idl:
3364         * bindings/js/JSReadableStreamCustom.cpp:
3365         (WebCore::JSReadableStream::cancel):
3366         (WebCore::JSReadableStream::getReader):
3367         (WebCore::JSReadableStream::read): Deleted.
3368         (WebCore::getOrCreatePromiseDeferredFromObject): Deleted.
3369         (WebCore::readyPromiseSlotName): Deleted.
3370         (WebCore::JSReadableStream::ready): Deleted.
3371         (WebCore::closedPromiseSlotName): Deleted.
3372         (WebCore::JSReadableStream::closed): Deleted.
3373
3374 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
3375
3376         Unreviewed. GTK build fix after r181720.
3377
3378         * rendering/RenderImage.cpp:
3379         (WebCore::RenderImage::styleDidChange):
3380
3381 2015-03-18  Antti Koivisto  <antti@apple.com>
3382
3383         Test disk cache behavior when using back navigation cache policy
3384         https://bugs.webkit.org/show_bug.cgi?id=142848
3385
3386         Reviewed by Chris Dumez.
3387
3388         Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.
3389
3390         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
3391
3392         * loader/FrameLoader.cpp:
3393         (WebCore::FrameLoader::addExtraFieldsToRequest):
3394         * loader/FrameLoader.h:
3395         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
3396         * testing/Internals.cpp:
3397         (WebCore::Internals::setOverrideCachePolicy):
3398         * testing/Internals.h:
3399         * testing/Internals.idl:
3400
3401 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
3402
3403         TextFragment#start() is always >= 0 since its type is unsigned
3404         https://bugs.webkit.org/show_bug.cgi?id=142860
3405
3406         Reviewed by Andreas Kling.
3407
3408         Since TextFragment::m_start is unsigned, the result of
3409         TextFragment::start() is always >= 0 and assertion is not effective.