[CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-05  Javier Fernandez  <jfernandez@igalia.com>
2
3         [CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
4         https://bugs.webkit.org/show_bug.cgi?id=144443
5
6         Reviewed by Darin Adler.
7
8         Upgrade the align-content property to the last CSS3 Box
9         Alignment specification. As it uses a different enumeration for
10         Positional and Distribution alignment, it implies some changes in
11         the FlexibleBox implementation.
12
13         Test: css3/parse-align-content.html
14
15         * css/CSSComputedStyleDeclaration.cpp:
16         (WebCore::resolveContentAlignmentAuto):
17         (WebCore::ComputedStyleExtractor::propertyValue):
18         * css/CSSParser.cpp:
19         (WebCore::isValidKeywordPropertyAndValue):
20         (WebCore::isKeywordPropertyID):
21         (WebCore::CSSParser::parseValue):
22         * css/CSSPropertyNames.in:
23         * rendering/RenderFlexibleBox.cpp:
24         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
25         (WebCore::RenderFlexibleBox::layoutColumnReverse):
26         (WebCore::initialAlignContentOffset):
27         (WebCore::alignContentSpaceBetweenChildren):
28         (WebCore::RenderFlexibleBox::alignFlexLines):
29         * rendering/style/RenderStyle.cpp:
30         (WebCore::RenderStyle::resolveContentAlignment):
31         (WebCore::RenderStyle::resolveContentJustification):
32         * rendering/style/RenderStyle.h:
33         * rendering/style/StyleRareNonInheritedData.cpp:
34         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
35         (WebCore::StyleRareNonInheritedData::operator==):
36         * rendering/style/StyleRareNonInheritedData.h:
37
38 2015-05-05  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
39
40         streams/readable-stream.html is very flaky
41         https://bugs.webkit.org/show_bug.cgi?id=144455
42
43         Reviewed by Darin Adler.
44
45         Changed the link between readadable stream and controller.
46         Controller ref()/deref() now increments/decrements its stream ref counter.
47         This ensures that even if JS scripts do not keep track of the readable stream,
48         the readable stream will not be disposed as long as the JS script has access to its controller.
49
50         Test: streams/readable-stream-gc.html
51
52         * Modules/streams/ReadableStreamController.h:
53         (WebCore::ReadableStreamController::ReadableStreamController):
54         (WebCore::ReadableStreamController::ref):
55         (WebCore::ReadableStreamController::deref):
56         (WebCore::ReadableStreamController::create): Deleted.
57         (WebCore::ReadableStreamController::stream): Deleted.
58         * bindings/js/JSReadableStreamControllerCustom.cpp:
59         (WebCore::JSReadableStreamController::close):
60         (WebCore::JSReadableStreamController::enqueue):
61         (WebCore::JSReadableStreamController::error):
62         * bindings/js/ReadableStreamJSSource.cpp:
63         (WebCore::ReadableStreamJSSource::~ReadableStreamJSSource):
64         (WebCore::ReadableStreamJSSource::start):
65         (WebCore::ReadableJSStream::jsController):
66         * bindings/js/ReadableStreamJSSource.h:
67
68 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
69
70         Small cleanup in RenderText::computePreferredLogicalWidths()
71         https://bugs.webkit.org/show_bug.cgi?id=144615
72
73         Reviewed by Simon Fraser.
74
75         A little bit of cleanup before I tackle dependent widths in this function.
76
77         No new tests because there is no behavior change.
78
79         * rendering/RenderText.cpp:
80         (WebCore::RenderText::computePreferredLogicalWidths):
81
82 2015-05-05  Joanmarie Diggs  <jdiggs@igalia.com>
83
84         [ATK] AX: figure out platform difference for ATK to make accessibility/table-cell-display-block.html work
85         https://bugs.webkit.org/show_bug.cgi?id=143083
86
87         Reviewed by Chris Fleizach.
88
89         The main platform difference was that ATK was mapping the td element to
90         the accessible table cell, and the render block resulting from the style
91         wound up being the cell parent. In contrast, AX API was mapping the cell
92         element to an AXGroup which was a child of the AXCell. Rather than try to
93         bend yet another case to the will of our individual platforms' table needs,
94         it made more sense to clean up the code that is competing and move toward
95         more platform-unified handling. This is the first step in that direction,
96         with ATK moving closer toward the WebCore/AX API mapping.
97
98         No new tests. Instead, modified and fixed the test which was being skipped
99         for GTK, and also updated the expectations of some Mac tests whose FIXMEs
100         should now be fixed.
101
102         * accessibility/AccessibilityNodeObject.cpp:
103         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
104         * accessibility/AccessibilityRenderObject.cpp:
105         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
106         * accessibility/AccessibilityTable.cpp:
107         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
108         * accessibility/AccessibilityTableCell.cpp:
109         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
110         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
111         (createAccessibilityRoleMap):
112
113 2015-05-04  Jer Noble  <jer.noble@apple.com>
114
115         [iOS] Videos on apple.com flash when touching to show or hide the controls
116         https://bugs.webkit.org/show_bug.cgi?id=144598
117
118         Reviewed by Eric Carlson.
119
120         The apple.com site will add a "selection" rectangle atop a playing video when it recieves a touchstart
121         event. The default media controls use touchstart to signal the controls to become visible. Stop the touch
122         from propagating down to the page in this case.
123
124         * Modules/mediacontrols/mediaControlsiOS.js:
125         (ControllerIOS.prototype.handleWrapperTouchStart):
126
127 2015-05-04  Andreas Kling  <akling@apple.com>
128
129         Record the reference time when Performance is constructed.
130         <https://webkit.org/b/144616>
131
132         Reviewed by Geoffrey Garen.
133
134         This is a merge of Blink's r156613 by simonjam@chromium.org.
135
136         Cache a copy of the DocumentLoader's reference timestamp when constructing
137         the Performance object. That way we don't have to jump through a bunch of scary
138         hoops to access it when now() is called later on.
139
140         * page/Performance.cpp:
141         (WebCore::Performance::Performance):
142         (WebCore::Performance::now): Deleted.
143         * page/Performance.h:
144
145 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
146
147         Fix assertions in WK1 tests after r183777.
148         
149         Two issues with the original change:
150         
151         If not in compositing mode, we shouldn't schedule layer flushes, since
152         Document::documentWillSuspendForPageCache() only only calls cancelCompositingLayerUpdate()
153         if in compositing mode.
154         
155         Second, RenderLayerCompositor::rootBackgroundTransparencyChanged() never stored the
156         new color, resulting in too many triggered compositing updates.
157
158         * rendering/RenderLayerCompositor.cpp:
159         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
160
161 2015-05-04  Zalan Bujtas  <zalan@apple.com>
162
163         RenderWidget::setWidgetGeometry() can end up destroying *this*.
164         https://bugs.webkit.org/show_bug.cgi?id=144601
165
166         Reviewed by Andreas Kling.
167
168         This is a speculative fix to ensure we don't crash on an invalid *this* renderer
169         while flattening the current iframe.
170         Calling RenderWidget::setWidgetGeometry() can result in destroying the current renderer.
171         While it is not a issue in case of normal layout flow as widget positions are updated at post layout,
172         frame flattening initiates this action in the middle of layout.
173         This patch re-introduces refcount model for RenderWidgets so that the renderer is protected during layout
174         when frame flattening is in use.
175
176         * rendering/RenderFrameBase.cpp:
177         (WebCore::RenderFrameBase::layoutWithFlattening): Let's be paranoid about child view.
178         * rendering/RenderObject.cpp:
179         (WebCore::RenderObject::destroy):
180         * rendering/FrameView.cpp:
181         (WebCore::FrameView::layout):
182         * rendering/RenderView.h:
183         * rendering/RenderWidget.cpp:
184         (WebCore::RenderWidget::~RenderWidget):
185         * rendering/RenderWidget.h:
186         (WebCore::RenderWidget::ref):
187         (WebCore::RenderWidget::deref):
188
189 2015-05-04  Doug Russell  <d_russell@apple.com>
190
191         AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
192         https://bugs.webkit.org/show_bug.cgi?id=144489
193
194         Reviewed by Chris Fleizach.
195
196         Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
197         on the returned control.
198         Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
199         Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
200         Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
201         Add support for setSelectedVisibleTextRange() in accessibility tests.
202
203         Test: platform/mac/accessibility/selection-sync.html
204
205         * accessibility/AXObjectCache.cpp:
206         (WebCore::AXObjectCache::showIntent):
207         (WebCore::AXObjectCache::setTextSelectionIntent):
208         (WebCore::AXObjectCache::setIsSynchronizingSelection):
209         (WebCore::AXObjectCache::postTextStateChangeNotification):
210         * accessibility/AXObjectCache.h:
211         * accessibility/AXTextStateChangeIntent.h:
212         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
213         * accessibility/AccessibilityRenderObject.cpp:
214         (WebCore::setTextSelectionIntent):
215         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
216         (WebCore::AccessibilityRenderObject::setFocused):
217         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
218         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): Deleted.
219         * accessibility/mac/AXObjectCacheMac.mm:
220         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
221
222 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
223
224         [Mac] Audio-only files should not have a device picker
225         https://bugs.webkit.org/show_bug.cgi?id=144606
226         <rdar://problem/20806387>
227
228         Reviewed by Dean Jackson.
229
230         * Modules/mediacontrols/mediaControlsApple.js:
231         (Controller.prototype.hasVideo): New.
232         (Controller.prototype.updateFullscreenButtons): Use hasVideo.
233         (Controller.prototype.updateHasVideo): Ditto.
234         (Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
235         unless a file has video.
236
237 2015-05-04  Chris Dumez  <cdumez@apple.com>
238
239         Crash at com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::createWindow + 185
240         https://bugs.webkit.org/show_bug.cgi?id=144597
241         <rdar://problem/20361579>
242
243         Reviewed by Andreas Kling.
244
245         Test: fast/dom/Window/window-open-activeWindow-null-frame.html
246
247         In our implementation of window.open(), we make sure that the window
248         which window.open() is called has a frame. However, we did not have the
249         same check for the activeDOMWindow (i.e. the lexicalGlobalObject) causing
250         us to crash in WebCore::createWindow() when dereferencing it.
251
252         This patch updates WebCore::createWindow() takes a reference to the
253         openerFrame instead of a pointer to make it clear the implementation
254         expects it to be non-null. A null check is then added for the frame
255         at the call site: DOMWindow::createWindow().
256
257         * inspector/InspectorFrontendClientLocal.cpp:
258         (WebCore::InspectorFrontendClientLocal::openInNewTab):
259         * loader/FrameLoader.cpp:
260         (WebCore::isDocumentSandboxed):
261         (WebCore::FrameLoader::submitForm):
262         (WebCore::createWindow):
263         Take a reference to openerFrame instead of a pointer as the
264         implementation expects it to be non-null.
265
266         * loader/FrameLoader.h:
267         * page/DOMWindow.cpp:
268         (WebCore::DOMWindow::createWindow):
269         Add null check for activeFrame before passing it to
270         WebCore::createWindow().
271
272 2015-05-04  Dean Jackson  <dino@apple.com>
273
274         Create a named CSS property for system colors
275         https://bugs.webkit.org/show_bug.cgi?id=144423
276
277         Follow-up comments from Darin Adler.
278
279         * rendering/RenderThemeIOS.h: Cache a Color rather than an RGBA32.
280         * rendering/RenderThemeIOS.mm:
281         (WebCore::RenderThemeIOS::systemColor): Use "add" to avoid multiple hits on the HashMap, and
282         cache invalid responses so that we don't have to keep looking for non-existent colors.
283         * rendering/RenderThemeMac.h: Same as iOS.
284         * rendering/RenderThemeMac.mm:
285         (WebCore::RenderThemeMac::systemColor):
286
287 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
288
289         display:none iframes cause repeated compositing flushing
290         https://bugs.webkit.org/show_bug.cgi?id=144529
291
292         Reviewed by Darin Adler.
293         
294         FrameView::updateLayoutAndStyleIfNeededRecursive() only forces layout on rendered
295         frames, by virtue of using its Widget children which are FrameViews.
296         
297         However, FrameView::flushCompositingStateIncludingSubframes() iterated over
298         all frames, and return false if any subframe needed layout. Thus, if it saw
299         non-rendered frames (which are never laid out), it would return false,
300         which causes the CFRunLoopObserver that drives flushing to run again.
301         
302         Fix by having FrameView::flushCompositingStateIncludingSubframes() only check
303         rendered frames, using FrameTree::traverseNextRendered() (which needs to be public).
304         
305         Also change FrameView::needsStyleRecalcOrLayout() and FrameView::updateLayoutAndStyleIfNeededRecursive()
306         to fetch the list of FrameViews using FrameTree's nextRenderedSibling(), rather than using
307         the Widget tree, since we'd like to eventually remove Widgets, and using the Frame
308         tree matches flushCompositingStateIncludingSubframes() and other code.
309
310         Test: compositing/iframes/display-none-subframe.html
311
312         * page/FrameTree.h:
313         * page/FrameView.cpp:
314         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
315         (WebCore::FrameView::needsStyleRecalcOrLayout):
316         (WebCore::FrameView::renderedChildFrameViews): Helper that returns a vector
317         of Ref<FrameView>s for rendered frames only.
318         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
319         * page/FrameView.h:
320
321 2015-05-04  Chris Dumez  <cdumez@apple.com>
322
323         Unreviewed. Fix build with SECURITY_ASSERTIONS enabled.
324         <rdar://problem/20653104>
325
326         * dom/ScriptExecutionContext.cpp:
327         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
328         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache):
329         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
330         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
331         * dom/ScriptExecutionContext.h:
332
333 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
334
335         Fix updating of tiled backing opaquenss when the page background color changes
336         https://bugs.webkit.org/show_bug.cgi?id=144600
337         rdar://problem/20723035
338
339         Reviewed by Tim Horton.
340
341         RenderLayerCompositor makes the page tiles opaque or not based on the result of
342         viewHasTransparentBackground(), which consults the view transparency, and
343         FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based
344         on the root and/or body background colors.
345
346         We thus need to re-evaluate whether page tiles are opaque when any of these inputs
347         change, but were failing to do so for the FrameView's baseBackgroundColor, and
348         the page root background color.
349         
350         Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange()
351         (for the root) trigger a compositing update when necessary.
352
353         Added setViewBaseBackgroundColor() on Internals for testing.
354
355         Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html
356
357         * page/FrameView.cpp:
358         (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper.
359         (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the 
360         frame's document, and trigger a compositing update check if the alpha changed.
361         (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if
362         this FrameView is associated with the Document being displayed in the FrameView's
363         Frame. This returns false when we're setting up a new FrameView (its Frame still
364         points to the old document, so renderView() returns the RenderView for the Frame's
365         existing Document).
366         * page/FrameView.h:
367         * rendering/RenderBox.cpp:
368         (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs
369         to do an update.
370         * rendering/RenderLayerCompositor.cpp:
371         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result
372         of documentBackgroundColor() changed in alpha since the last time, trigger a compositing
373         update.
374         * rendering/RenderLayerCompositor.h:
375         * testing/Internals.cpp:
376         (WebCore::Internals::setViewBaseBackgroundColor):
377         * testing/Internals.h:
378         * testing/Internals.idl:
379
380 2015-05-04  Jer Noble  <jer.noble@apple.com>
381
382         [iOS] Crash in -[WebCALayerHostWrapper resolveBounds]
383         https://bugs.webkit.org/show_bug.cgi?id=144595
384
385         Reviewed by Eric Carlson.
386
387         It is possible for a WebCALayorHostWrapper to outlive the WebVideoFullscreenModel to which it refers,
388         since the model pointer is bare, rather than a RefPtr. The reference to the model must be invalidated
389         before the model is destroyed.
390
391         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
392         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
393
394 2015-05-04  Ryosuke Niwa  <rniwa@webkit.org>
395
396         Toggling underline or strike through affects each other
397         https://bugs.webkit.org/show_bug.cgi?id=27818
398
399         Reviewed by Darin Adler.
400
401         This patch introduces a new mechanism to apply and remove text decorations. This is necessary because text
402         decorations are always additive and we can't differentiate whether we're adding or removing a text decoration.
403         Conceptually, we need four values for text decorations: adding underline, removing underline, adding
404         line-through, and removing line-through but we have only three: underline, line-through, none.
405
406         After this patch, there are three mechanism by which text decorations states are kept tracked. While applying
407         or removing text decorations, we use newly added m_underlineChange and m_strikeThroughChange in EditingStyle.
408         For the typing style, we use -webkit-text-decorations-in-effect to store the state since we need to preserve
409         every type of text decorations such as overline in addition to underline and line-through. Once applied, all
410         text decorations should be expressed in terms of the standard text-decoration property.
411
412         Test: editing/execCommand/toggle-mixed-text-decorations.html
413
414         * editing/ApplyStyleCommand.cpp:
415         (WebCore::ApplyStyleCommand::applyBlockStyle):
416         (WebCore::ApplyStyleCommand::removeCSSStyle): conflictsWithInlineStyleOfElement now creates a new inline style
417         instead of a list of properties to remove.
418         (WebCore::ApplyStyleCommand::addBlockStyle):
419         (WebCore::ApplyStyleCommand::applyInlineStyleChange): Merge inline styles instead of adding as string.
420         Otherwise it would generate style content attribute with multiple text-decoration properties.
421
422         * editing/EditingStyle.cpp:
423         (WebCore::HTMLElementEquivalent::matches):
424         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Takes an EditingStyle instead of StyleProperties.
425         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
426         (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent): 
427         (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Respect newly added m_strikeThroughChange and
428         m_underlineChange in EditingStyle.
429         (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Ditto.
430         (WebCore::HTMLTextDecorationEquivalent::changeInStyle): Added. Retrieves the change enum for the associated
431         type of text-decoration (underline or strike through).
432         (WebCore::HTMLAttributeEquivalent::matches):
433         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
434         (WebCore::EditingStyle::EditingStyle): Initialize m_underlineChange and m_strikeThroughChange. Also use the
435         delegating constructor elsewhere. Also added the missing call to extractFontSizeDelta() in the variant that
436         takes CSSPropertyID and String, and added a variant that takes CSSPropertyID and CSSValueID.
437         (WebCore::EditingStyle::isEmpty): Return false when m_underlineChange and m_strikeThroughChange are not "none".
438         (WebCore::applyTextDecorationChangeToValueList): Added.
439         (WebCore::EditingStyle::overrideTypingStyleAt): Added. Used by Editor::computeAndSetTypingStyle to set a new
440         typing style. Resolve m_underlineChange and m_strikeThroughChange into -webkit-text-decorations-in-effect.
441         (WebCore::EditingStyle::clear): Clear m_underlineChange and m_strikeThroughChange.
442         (WebCore::EditingStyle::copy): Copy m_underlineChange and m_strikeThroughChange.
443         (WebCore::textDecorationValueList): Added.
444         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Now takes a pointer to MutableStyleProperties
445         instead of a vector. This was necessary we can't simply remove text-decoration property in ApplyStyleCommand's
446         removeCSSStyle as that would result in unrelated text decorations also getting removed. Also added the code
447         for m_underlineChange and m_strikeThroughChange. Only removing text decoration changes can cause a conflict
448         since text decorations are always additive.
449         (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Check isEmpty() instead of the nullity of
450         m_mutableStyle to respect m_underlineChange and m_strikeThroughChange.
451         (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
452         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
453         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): Respect the values of m_underlineChange and
454         m_strikeThroughChange. Here, the style is considered present if it has text decorations that are being added.
455         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
456         (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Takes EditingStyle instead of StyleProperties to
457         respect m_underlineChange and m_strikeThroughChange.
458         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
459         (WebCore::mergeTextDecorationValues):
460         (WebCore::EditingStyle::mergeStyle): Make a copy of CSSValueList before modifying it since CSSValueList's are
461         shared with other immutable StyleProperties.
462         (WebCore::StyleChange::StyleChange): Set m_applyUnderline, m_applyLineThrough, and m_cssStyle if either
463         m_underlineChange or m_strikeThroughChange are TextDecorationChange::Add in EditingStyle if the current position
464         doesn't already have the matching style.
465         (WebCore::StyleChange::operator==): Moved from the header file. Also added the logic to compare m_cssStyle now
466         that it's a StyleProperties instead of String.
467
468         * editing/EditingStyle.h: Added TextDecorationChange.
469         (WebCore::EditingStyle::create): Added a variant that takes CSSPropertyID and CSSValueID.
470         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
471         (WebCore::EditingStyle::setUnderlineChange): Added.
472         (WebCore::EditingStyle::underlineChange): Added.
473         (WebCore::EditingStyle::setStrikeThroughChange): Added.
474         (WebCore::EditingStyle::strikeThroughChange): Added.
475         (WebCore::StyleChange::cssStyle): Now returns StyleProperties* instead of String so that ApplyStyleCommand's
476         applyInlineStyleChange could merge inline styles instead of just appending it to the end.
477         (WebCore::StyleChange::operator==): Moved into the cpp file.
478
479         * editing/Editor.cpp:
480         (WebCore::Editor::applyStyle): Added. This variant takes EditingStyle instead of StyleProperties.
481         (WebCore::Editor::applyStyleToSelection): Ditto.
482         (WebCore::Editor::computeAndSetTypingStyle): Added a variant for EditingStyle. Also use overrideTypingStyleAt
483         to set -webkit-text-decorations-in-effect based on m_underlineChange and m_strikeThroughChange 
484
485         * editing/Editor.h:
486         * editing/EditorCommand.cpp:
487         (WebCore::applyCommandToFrame):
488         (WebCore::isStylePresent): Extracted from executeToggleStyle.
489         (WebCore::executeApplyStyle):
490         (WebCore::executeToggleStyle):
491         (WebCore::executeToggleStyleInList): Deleted.
492         (WebCore::textDecorationChangeForToggling): Added. Used in executeStrikethrough and executeUnderline.
493         (WebCore::executeStrikethrough):
494         (WebCore::executeUnderline):
495
496 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
497
498         [Mac] Fix build breakage caused by API deprecation
499         https://bugs.webkit.org/show_bug.cgi?id=144593
500
501         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
502         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Suppress warnings.
503
504 2015-05-04  Chris Dumez  <cdumez@apple.com>
505
506         REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-right property
507         https://bugs.webkit.org/show_bug.cgi?id=144584
508         <rdar://problem/20796829>
509
510         Reviewed by Darin Adler.
511
512         The CSS parser was rejecting calculated values at parsing time if it
513         considered the value was negative and the CSS property did not allow
514         negative values. However, doing so at this point will not always work
515         because we don't necessarily know the font-size yet (for e.g. for
516         calc(0.5em - 2px). Also, rejecting negative calculated values is not
517         the right behavior as the the specification. The specification says
518         we should clamp:
519         http://dev.w3.org/csswg/css-values-3/#calc-range
520
521         This patch updates validateCalculationUnit() to stop marking the value
522         as invalid if it is negative. Instead, let the CSSCalcValue's permitted
523         range clamp the value as needed.
524
525         This bug was causing the bottom graphic on aldentrio.com to not be
526         rendered properly.
527
528         Test: fast/css/negative-calc-values.html
529               fast/css/padding-calc-value.html
530
531         * css/CSSParser.cpp:
532         (WebCore::CSSParser::validateCalculationUnit):
533
534 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
535
536         [Mac] Show wireless playback placard even when an element has custom controls
537         https://bugs.webkit.org/show_bug.cgi?id=144548
538
539         Reviewed by Brent Fulgham.
540
541         * Modules/mediacontrols/mediaControlsApple.js:
542         (Controller.prototype.shouldHaveAnyUI): Return true when playing to wireless target.
543         (Controller.prototype.reconnectControls): Add controls when playing to wireless target.
544         (Controller.prototype.setPlaying): Return early when there is no 'controls' attribute.
545         (Controller.prototype.showControls): Ditto.
546         (Controller.prototype.updateWirelessPlaybackStatus): Call updateBase when playing to wireless
547         target to ensure that controls have been set up.
548         (Controller.prototype.handleWirelessPlaybackChange): Call reconnectControls when playing
549         to wireless target when there is no 'controls' attribute.
550         (Controller.prototype.showInlinePlaybackPlaceholderOnly): New.
551
552         * html/HTMLMediaElement.cpp:
553         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Call configureMediaControls.
554         (WebCore::HTMLMediaElement::configureMediaControls): Require controls when playing
555         to wireless target.
556         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Remove some unhelpful, noisy, logging.
557
558 2015-05-04  Dan Bernstein  <mitz@apple.com>
559
560         Fixed the build.
561
562         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
563         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Moved off of a deprecated
564         method to a non-deprecated equivalent.
565
566 2015-05-04  Javier Fernandez  <jfernandez@igalia.com>
567
568         [CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
569         https://bugs.webkit.org/show_bug.cgi?id=144442
570
571         Reviewed by David Hyatt.
572
573         Upgrade the justify-content property to the last CSS3 Box
574         Alignment specification. It defines a different enumeration for
575         Positional and Distribution alignment, which requires changes in
576         the FlexibleBox implementation.
577
578         A new parsing function has been implemented to replace the basic
579         keyword IDs validation. Because of the complexity of the new
580         values, a new CSSPrimitiveValue derived class has been defined
581         which simplifies considerably the parsing logic.
582
583         We will follow the same approach than for Self Alignment, defining
584         a single class to hold all the related alignment data. This makes
585         possible to use a StyleBuilderConverter function instead of custom
586         builder functions for these properties.
587
588         Test: css3/parse-justify-content.html
589
590         * CMakeLists.txt:
591         * WebCore.xcodeproj/project.pbxproj:
592         * css/CSSComputedStyleDeclaration.cpp:
593         (WebCore::resolveContentAlignmentAuto):
594         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
595         (WebCore::ComputedStyleExtractor::propertyValue):
596         (WebCore::valueForItemPositionWithOverflowAlignment): Deleted.
597         * css/CSSContentDistributionValue.cpp: Added.
598         (WebCore::CSSContentDistributionValue::CSSContentDistributionValue):
599         (WebCore::CSSContentDistributionValue::~CSSContentDistributionValue):
600         (WebCore::CSSContentDistributionValue::customCSSText):
601         (WebCore::CSSContentDistributionValue::equals):
602         * css/CSSContentDistributionValue.h: Added.
603         (WebCore::CSSContentDistributionValue::create):
604         (WebCore::CSSContentDistributionValue::distribution):
605         (WebCore::CSSContentDistributionValue::position):
606         (WebCore::CSSContentDistributionValue::overflow):
607         * css/CSSParser.cpp:
608         (WebCore::isValidKeywordPropertyAndValue):
609         (WebCore::isKeywordPropertyID):
610         (WebCore::CSSParser::parseValue):
611         (WebCore::isContentDistributionKeyword):
612         (WebCore::isContentPositionKeyword):
613         (WebCore::isAlignmentOverflowKeyword):
614         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
615         (WebCore::CSSParser::parseItemPositionOverflowPosition):
616         (WebCore::CSSParser::parseLegacyPosition): Deleted.
617         * css/CSSParser.h:
618         * css/CSSPrimitiveValueMappings.h:
619         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
620         (WebCore::CSSPrimitiveValue::operator ContentPosition):
621         (WebCore::CSSPrimitiveValue::operator ContentDistributionType):
622         (WebCore::CSSPrimitiveValue::operator EFlexDirection): Deleted.
623         * css/CSSPropertyNames.in:
624         * css/CSSValue.cpp:
625         (WebCore::CSSValue::equals):
626         (WebCore::CSSValue::cssText):
627         (WebCore::CSSValue::destroy):
628         * css/CSSValue.h:
629         (WebCore::CSSValue::isContentDistributionValue):
630         (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted.
631         * css/CSSValueKeywords.in:
632         * css/StyleBuilderConverter.h:
633         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
634         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): Deleted.
635         * rendering/RenderFlexibleBox.cpp:
636         (WebCore::initialJustifyContentOffset):
637         (WebCore::justifyContentSpaceBetweenChildren):
638         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
639         (WebCore::RenderFlexibleBox::layoutColumnReverse):
640         * rendering/RenderFullScreen.cpp:
641         (WebCore::createFullScreenStyle):
642         * rendering/mathml/RenderMathMLScripts.cpp:
643         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
644         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
645         * rendering/style/RenderStyle.h:
646         * rendering/style/RenderStyleConstants.h:
647         * rendering/style/StyleContentAlignmentData.h: Added.
648         (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
649         (WebCore::StyleContentAlignmentData::setPosition):
650         (WebCore::StyleContentAlignmentData::setDistribution):
651         (WebCore::StyleContentAlignmentData::setOverflow):
652         (WebCore::StyleContentAlignmentData::position):
653         (WebCore::StyleContentAlignmentData::distribution):
654         (WebCore::StyleContentAlignmentData::overflow):
655         (WebCore::StyleContentAlignmentData::operator==):
656         (WebCore::StyleContentAlignmentData::operator!=):
657         * rendering/style/StyleRareNonInheritedData.cpp:
658         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
659         (WebCore::StyleRareNonInheritedData::operator==):
660         * rendering/style/StyleRareNonInheritedData.h:
661
662 2015-05-04  Per Arne Vollan  <peavo@outlook.com>
663
664         [WinCairo] Compile error in sharedEGLDisplay() method.
665         https://bugs.webkit.org/show_bug.cgi?id=144563
666
667         Reviewed by Alex Christensen.
668
669         The PlatformDisplay type is undefined.
670
671         * platform/graphics/egl/GLContextEGL.cpp:
672         (WebCore::sharedEGLDisplay):
673
674 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
675
676         [WTF] Remove Functional.h inclusions
677         https://bugs.webkit.org/show_bug.cgi?id=144400
678
679         Reviewed by Darin Adler.
680
681         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebCore.
682
683         * Modules/mediastream/MediaStreamTrack.cpp:
684         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
685         * Modules/mediastream/UserMediaRequest.cpp:
686         * page/scrolling/ScrollingTree.h:
687         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
688         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
689         * platform/MemoryPressureHandler.cpp:
690         * platform/UserActivity.h: Include the <objc/objc.h> header that was previously
691         indirectly included through Functional.h.
692         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
693         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
694         * platform/mac/SoftLinking.h: Unconditionally include the <objc/runtime.h> header
695         that was previously included for the Mac port through Functional.h.
696
697 2015-05-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
698
699         [Streams API] Refactor ReadableJSStream and ReadableStreamJSSource
700         https://bugs.webkit.org/show_bug.cgi?id=144387
701
702         Reviewed by Darin Adler.
703
704         Made ReadableStreamReader a private class of ReadableJSStream.
705         Simplified ReadableJSStream construction so that binding constructor does not need to know about ReadableStreamJSSource. 
706
707         No functional change, existing tests cover the changes.
708
709         * Modules/streams/ReadableStream.h:
710         (WebCore::ReadableStream::source): Added to implement jsSource(), needed by ReadableJSStream.
711         * bindings/js/JSReadableStreamCustom.cpp:
712         (WebCore::constructJSReadableStream): Simplified to not have to handle source creation.
713         * bindings/js/ReadableStreamJSSource.cpp:
714         (WebCore::ReadableStreamJSSource::globalObject): Helper function to be used in other future methods.
715         (WebCore::ReadableStreamJSSource::start):
716         (WebCore::ReadableJSStream::create):
717         (WebCore::ReadableJSStream::createReader):
718         (WebCore::ReadableJSStream::jsSource):
719         (WebCore::ReadableJSStream::Reader::create):
720         (WebCore::ReadableJSStream::Reader::Reader):
721         * bindings/js/ReadableStreamJSSource.h:
722
723 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
724
725         Remove move-js-headers.sh
726         https://bugs.webkit.org/show_bug.cgi?id=144323
727
728         Reviewed by Daniel Bates.
729
730         move-js-headers.sh was only used by the Wx port, which has been removed from trunk long ago.
731
732         * move-js-headers.sh: Removed.
733
734 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
735
736         [ARM] Don't compare unsigned chars to EOF (-1)
737         https://bugs.webkit.org/show_bug.cgi?id=144439
738
739         Reviewed by Geoffrey Garen.
740
741         * platform/linux/MemoryPressureHandlerLinux.cpp:
742         (WebKit::nextToken): Don't cast return value of fgetc() to char.
743
744 2015-05-04  Manuel Rego Casasnovas  <rego@igalia.com>
745
746         [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
747         https://bugs.webkit.org/show_bug.cgi?id=144449
748
749         Reviewed by Sergio Villar Senin.
750
751         If there're implicit tracks then trackPositions is bigger than
752         trackSizes, so we need to use the proper index to append the trailing
753         <ident>s in valueForGridTrackList().
754
755         Test: fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
756
757         * css/CSSComputedStyleDeclaration.cpp:
758         (WebCore::valueForGridTrackList):
759
760 2015-05-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
761
762         Purge PassRefPtr in WebCore/html
763         https://bugs.webkit.org/show_bug.cgi?id=144543
764
765         Reviewed by Andreas Kling.
766
767         Change PassRefPtr in create() factory functions with Ref. In some functions,
768         it returns RefPtr when it might have a chance to return nullptr.
769
770         No new tests, no behavior changes.
771
772         * Modules/encryptedmedia/MediaKeySession.cpp:
773         (WebCore::MediaKeySession::sendError):
774         * html/DOMFormData.h:
775         (WebCore::DOMFormData::create):
776         * html/HTMLMediaElement.cpp:
777         (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
778         * html/HTMLMediaElement.h:
779         * html/MediaError.h:
780         (WebCore::MediaError::create):
781         * html/MediaKeyError.h:
782         (WebCore::MediaKeyError::create):
783         * html/canvas/CanvasGradient.h:
784         * html/canvas/CanvasProxy.cpp:
785         (WebCore::CanvasProxy::create):
786         * html/canvas/CanvasProxy.h:
787         * html/canvas/WebGLActiveInfo.h:
788         (WebCore::WebGLActiveInfo::create):
789         * html/canvas/WebGLContextAttributes.h:
790         * html/canvas/WebGLContextGroup.h:
791         * html/canvas/WebGLProgram.h:
792         * html/canvas/WebGLQuery.h:
793         * html/canvas/WebGLRenderbuffer.h:
794         * html/canvas/WebGLSampler.h:
795         * html/canvas/WebGLShader.h:
796         * html/canvas/WebGLShaderPrecisionFormat.h:
797         * html/canvas/WebGLSync.h:
798         * html/canvas/WebGLTexture.h:
799         * html/canvas/WebGLTransformFeedback.h:
800         * html/canvas/WebGLUniformLocation.h:
801         * html/canvas/WebGLVertexArrayObjectOES.h:
802         * html/shadow/ImageControlsRootElement.cpp:
803         (WebCore::ImageControlsRootElement::maybeCreate):
804         * html/shadow/ImageControlsRootElement.h:
805         * html/shadow/MediaControlElements.cpp:
806         (WebCore::MediaControlPanelElement::create):
807         (WebCore::MediaControlPanelEnclosureElement::create):
808         (WebCore::MediaControlOverlayEnclosureElement::create):
809         (WebCore::MediaControlTimelineContainerElement::create):
810         (WebCore::MediaControlVolumeSliderContainerElement::create):
811         (WebCore::MediaControlStatusDisplayElement::create):
812         (WebCore::MediaControlPanelMuteButtonElement::create):
813         (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
814         (WebCore::MediaControlPlayButtonElement::create):
815         (WebCore::MediaControlOverlayPlayButtonElement::create):
816         (WebCore::MediaControlSeekForwardButtonElement::create):
817         (WebCore::MediaControlSeekBackButtonElement::create):
818         (WebCore::MediaControlRewindButtonElement::create):
819         (WebCore::MediaControlReturnToRealtimeButtonElement::create):
820         (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
821         (WebCore::MediaControlClosedCaptionsContainerElement::create):
822         (WebCore::MediaControlClosedCaptionsTrackListElement::create):
823         (WebCore::MediaControlTimelineElement::create):
824         (WebCore::MediaControlPanelVolumeSliderElement::create):
825         (WebCore::MediaControlFullscreenVolumeSliderElement::create):
826         (WebCore::MediaControlFullscreenButtonElement::create):
827         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
828         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
829         (WebCore::MediaControlTimeRemainingDisplayElement::create):
830         (WebCore::MediaControlCurrentTimeDisplayElement::create):
831         * html/shadow/MediaControlElements.h:
832         * html/shadow/MediaControlsApple.h:
833         (WebCore::MediaControlsAppleEventListener::create):
834         * html/shadow/MeterShadowElement.h:
835         (WebCore::MeterInnerElement::create):
836         (WebCore::MeterBarElement::create):
837         (WebCore::MeterValueElement::create):
838         * html/shadow/ProgressShadowElement.h:
839         (WebCore::ProgressInnerElement::create):
840         (WebCore::ProgressBarElement::create):
841         (WebCore::ProgressValueElement::create):
842         * html/shadow/mac/ImageControlsRootElementMac.cpp:
843         (WebCore::ImageControlsRootElement::maybeCreate):
844         * html/track/TextTrackCueList.h:
845         (WebCore::TextTrackCueList::create):
846         * html/track/VTTCue.cpp:
847         (WebCore::VTTCue::create):
848         * html/track/VTTCue.h:
849         (WebCore::VTTCue::create):
850         * html/track/VTTRegion.h:
851         * html/track/VideoTrack.h:
852         * html/track/VideoTrackList.h:
853         * html/track/WebVTTElement.cpp:
854         (WebCore::WebVTTElement::create):
855         * html/track/WebVTTElement.h:
856         * html/track/WebVTTParser.h:
857         * platform/graphics/MediaPlayer.h:
858         (WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
859
860 2015-05-03  Simon Fraser  <simon.fraser@apple.com>
861
862         Make some static data const
863         https://bugs.webkit.org/show_bug.cgi?id=144552
864
865         Reviewed by Andreas Kling.
866
867         Turn baseTable and shiftTable into const data.
868
869         * platform/graphics/FormatConverter.cpp:
870
871 2015-05-02  Simon Fraser  <simon.fraser@apple.com>
872
873         Assertion failure (!needsLayout()) loading inkedmag.com
874         https://bugs.webkit.org/show_bug.cgi?id=144528
875         rdar://problem/20788681
876
877         Reviewed by Darin Adler.
878         
879         When animated GIFs get into catch-up mode, which is common on inkedmag.com,
880         BitmapImage::advanceAnimation() can synchronously call it's observer's
881         animationAdvanced(). This could cause RenderImage::repaintOrMarkForLayout()
882         to repaint or mark itself as needing layout in the middle of painting.
883         If painting multiple tiles, this could occur when painting the first tile,
884         and then painting the second tile would assert in RenderView::paint().
885         
886         It's always wrong to synchronously call the observer when advancing
887         the animation, since this happens when painting, and you can't repaint
888         when painting. The long comment and call to startAnimation(DoNotCatchUp)
889         was required to explain and work around this, but it's simpler to just
890         advance the animation on a zero-delay timer.
891         
892         Special handling is required for the case where internalAdvanceAnimation()
893         is catching up, and reaches the end of a non-repeating image; there, we
894         have to set a flag and do the notify on a zero-delay timer.
895         
896         Lots of comment cleanup.
897
898         Test: fast/images/set-needs-layout-in-painting.html
899
900         * platform/graphics/BitmapImage.cpp:
901         (WebCore::BitmapImage::BitmapImage):
902         (WebCore::BitmapImage::startTimer): Utility to create and start the timer.
903         (WebCore::BitmapImage::repetitionCount):
904         (WebCore::BitmapImage::startAnimation): Early return in the DoNotCatchUp clause.
905         If skipping, and internalAdvanceAnimation() returns false (meaning it must have
906         reached the end), then queue up a notify. Change the normal behavior to just
907         start the timer.
908         (WebCore::BitmapImage::stopAnimation):
909         (WebCore::BitmapImage::internalAdvanceAnimation): Notify if the flag is set.
910         * platform/graphics/BitmapImage.h:
911         * rendering/RenderReplaced.cpp:
912         (WebCore::RenderReplaced::paint): Add a SetLayoutNeededForbiddenScope to
913         detect setNeedsLayouts when painting replaced elements, including images.
914
915 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
916
917         [GTK][EFL] Unify platform display handling
918         https://bugs.webkit.org/show_bug.cgi?id=144517
919
920         Reviewed by Martin Robinson.
921
922         There are several places were we are handling the X display
923         connection:
924
925         - GLContext::sharedX11Display() creates a new connection.
926         - X11Helper::nativeDisplay() creates a new connection.
927         - BackingStoreBackendCairoX11 uses the GTK+ shared connection.
928         - NetscapePlugin::x11HostDisplay() uses the GTK+/ecore shared connection
929         - The rest of the GTK+ code uses the shared GTK+ connection
930
931         And then we also have WaylandDisplay and the code to check if the
932         current display is wayland or X11.
933         We could unify all these to share the same connection to reduce
934         the amount of ifdefs and ensure a single connection. That will
935         also allow us to use "smart pointers" for the X resources that
936         need a Display* to be freed.
937
938         * PlatformEfl.cmake: Add new files to compilation.
939         * PlatformGTK.cmake: Move some files to WebCore_SOURCES sinc ethey
940         don't use GTK+ anymore, and add new files to compilation.
941         * platform/graphics/GLContext.cpp:
942         (WebCore::GLContext::cleanupActiveContextsAtExit): Remove the
943         custom X11 connection.
944         (WebCore::GLContext::createContextForWindow): Check if the shared
945         display is Wayland to create a EGL context in such case.
946         * platform/graphics/PlatformDisplay.cpp: Added.
947         (WebCore::PlatformDisplay::createPlatformDisplay): Creates the
948         shared display, using the GTK+/ecore shared connection.
949         (WebCore::PlatformDisplay::sharedDisplay): Return the shared display.
950         * platform/graphics/PlatformDisplay.h: Added.
951         * platform/graphics/egl/GLContextEGL.cpp:
952         (WebCore::sharedEGLDisplay): Use PlatformDisplay::sharedDisplay()
953         to get the native display.
954         (WebCore::GLContextEGL::createPixmapContext): Ditto.
955         * platform/graphics/glx/GLContextGLX.cpp:
956         (WebCore::GLContextGLX::createWindowContext): Ditto.
957         (WebCore::GLContextGLX::createPbufferContext): Ditto.
958         (WebCore::GLContextGLX::createPixmapContext): Ditto.
959         (WebCore::GLContextGLX::createContext): Ditto.
960         (WebCore::GLContextGLX::~GLContextGLX): Ditto.
961         (WebCore::GLContextGLX::defaultFrameBufferSize): Ditto.
962         (WebCore::GLContextGLX::makeContextCurrent): Ditto.
963         (WebCore::GLContextGLX::swapBuffers): Ditto.
964         (WebCore::GLContextGLX::cairoDevice): Ditto.
965         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
966         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Ditto.
967         * platform/graphics/surfaces/glx/X11Helper.cpp:
968         (WebCore::X11Helper::nativeDisplay): Ditto.
969         * platform/graphics/wayland/PlatformDisplayWayland.cpp: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.cpp.
970         (WebCore::PlatformDisplayWayland::globalCallback):
971         (WebCore::PlatformDisplayWayland::globalRemoveCallback):
972         (WebCore::PlatformDisplayWayland::create): Renamed instance() as
973         create() since the single instance is now handled by PlatformDisplay.
974         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
975         (WebCore::PlatformDisplayWayland::createSurface):
976         (WebCore::PlatformDisplayWayland::createSharingGLContext):
977         * platform/graphics/wayland/PlatformDisplayWayland.h: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.h.
978         * platform/graphics/x11/PlatformDisplayX11.cpp: Added.
979         (WebCore::PlatformDisplayX11::PlatformDisplayX11):
980         (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
981         * platform/graphics/x11/PlatformDisplayX11.h: Added.
982         * platform/gtk/GtkUtilities.cpp:
983         (WebCore::getDisplaySystemType): Deleted.
984         * platform/gtk/GtkUtilities.h:
985
986 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
987
988         [GTK] API tests crashing on debug builds due to extra unref
989         https://bugs.webkit.org/show_bug.cgi?id=144508
990
991         Reviewed by Mario Sanchez Prada.
992
993         The problem is that we were assuming that when a new DOMWindow is
994         created, the DOM object cache was notified about the previous
995         DOMWindow being destroyed before objects for the new DOMWindow are
996         added to the cache. However, that's not always the case and we
997         only create a DOMWindowObserver for the first DOMWindow. We need
998         to keep a pointer to the DOMWindow being observed to clear() the
999         cache and create a new DOMWindowObserver when it changes in the
1000         Frame.
1001
1002         Fixes crashes in several unit tests in debug builds.
1003
1004         * bindings/gobject/DOMObjectCache.cpp:
1005
1006 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
1007
1008         Remove timer alignment logging that I added earler today.
1009
1010         * page/Settings.cpp: (WebCore::Settings::setDOMTimerAlignmentInterval):
1011
1012 2015-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1013
1014         Purge PassRefPtr create() factory functions in html 
1015         https://bugs.webkit.org/show_bug.cgi?id=144522
1016
1017         Reviewed by Darin Adler.
1018
1019         Return Ref instead of PassRefPtr in create() factory functions in html, because the factory
1020         can't return null. This patch is a first step to purge in html. Following patch is going to
1021         be uploaded.
1022
1023         No new tests, no behavior changes.
1024
1025         * html/FileInputType.cpp:
1026         (WebCore::UploadButtonElement::create):
1027         (WebCore::UploadButtonElement::createForMultiple):
1028         * html/MediaController.cpp:
1029         (MediaController::create):
1030         * html/MediaController.h:
1031         * html/canvas/WebGLBuffer.cpp:
1032         (WebCore::WebGLBuffer::create):
1033         * html/canvas/WebGLBuffer.h:
1034         * html/canvas/WebGLContextAttributes.cpp:
1035         (WebCore::WebGLContextAttributes::create):
1036         * html/canvas/WebGLContextAttributes.h:
1037         * html/canvas/WebGLContextGroup.cpp:
1038         (WebCore::WebGLContextGroup::create):
1039         * html/canvas/WebGLContextGroup.h:
1040         * html/canvas/WebGLFramebuffer.cpp:
1041         (WebCore::WebGLFramebuffer::create):
1042         * html/canvas/WebGLFramebuffer.h:
1043         * html/canvas/WebGLProgram.cpp:
1044         (WebCore::WebGLProgram::create):
1045         * html/canvas/WebGLProgram.h:
1046         * html/canvas/WebGLQuery.cpp:
1047         (WebCore::WebGLQuery::create):
1048         * html/canvas/WebGLQuery.h:
1049         * html/canvas/WebGLRenderbuffer.cpp:
1050         (WebCore::WebGLRenderbuffer::create):
1051         * html/canvas/WebGLRenderbuffer.h:
1052         * html/canvas/WebGLSampler.cpp:
1053         (WebCore::WebGLSampler::create):
1054         * html/canvas/WebGLSampler.h:
1055         * html/canvas/WebGLShader.cpp:
1056         (WebCore::WebGLShader::create):
1057         * html/canvas/WebGLShader.h:
1058         * html/canvas/WebGLShaderPrecisionFormat.cpp:
1059         (WebCore::WebGLShaderPrecisionFormat::create):
1060         * html/canvas/WebGLShaderPrecisionFormat.h:
1061         * html/canvas/WebGLSync.cpp:
1062         (WebCore::WebGLSync::create):
1063         * html/canvas/WebGLSync.h:
1064         * html/canvas/WebGLTexture.cpp:
1065         (WebCore::WebGLTexture::create):
1066         * html/canvas/WebGLTexture.h:
1067         * html/canvas/WebGLTransformFeedback.cpp:
1068         (WebCore::WebGLTransformFeedback::create):
1069         * html/canvas/WebGLTransformFeedback.h:
1070         * html/canvas/WebGLUniformLocation.cpp:
1071         (WebCore::WebGLUniformLocation::create):
1072         * html/canvas/WebGLUniformLocation.h:
1073         * html/canvas/WebGLVertexArrayObject.cpp:
1074         (WebCore::WebGLVertexArrayObject::create):
1075         * html/canvas/WebGLVertexArrayObject.h:
1076         * html/canvas/WebGLVertexArrayObjectOES.cpp:
1077         (WebCore::WebGLVertexArrayObjectOES::create):
1078         * html/canvas/WebGLVertexArrayObjectOES.h:
1079
1080 2015-05-02  Andreas Kling  <akling@apple.com>
1081
1082         Style recalc always causes detach from shared StyleRareNonInheritedData.
1083         <https://webkit.org/b/144530>
1084
1085         Reviewed by Darin Adler.
1086
1087         StyleResolver::adjustStyleForMaskImages() was always calling RenderStyle::ensureMaskLayers()
1088         when we were in style recalc. This caused the RenderStyle to COW off from the previously
1089         shared StyleRareNonInheritedData even if nothing actually changes.
1090
1091         This patch adds an early return to adjustStyleForMaskImages() when the previous style had
1092         no mask images. Further refinements could be made, but this covers the most common case where
1093         we don't have any mask images at all.
1094
1095         * css/StyleResolver.cpp:
1096         (WebCore::StyleResolver::adjustStyleForMaskImages):
1097
1098 2015-05-02  Alexey Proskuryakov  <ap@apple.com>
1099
1100         fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
1101         https://bugs.webkit.org/show_bug.cgi?id=144155
1102
1103         Unreviewed, will roll out soon.
1104
1105         Added some temporary logging to better see if alignment is indeed the culprit.
1106
1107         * page/Settings.cpp: (WebCore::Settings::setDOMTimerAlignmentInterval):
1108
1109 2015-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1110
1111         Use Ref instead of PassRefPtr in WebCore/svg 
1112         https://bugs.webkit.org/show_bug.cgi?id=144479
1113
1114         Reviewed by Darin Adler.
1115
1116         Remove remained PassRefPtr in svg.
1117
1118         No new tests, no behavior changes.
1119
1120         * svg/SVGFontFaceSrcElement.cpp:
1121         (WebCore::SVGFontFaceSrcElement::srcValue):
1122         * svg/SVGFontFaceSrcElement.h:
1123         * svg/properties/SVGPropertyInfo.h:
1124
1125 2015-05-02  Simon Fraser  <simon.fraser@apple.com>
1126
1127         Small cleanup in BitmapImage
1128         https://bugs.webkit.org/show_bug.cgi?id=144515
1129
1130         Reviewed by Darin Adler.
1131
1132         Use an enum for the internalAdvanceAnimation() argument, with a default.
1133         
1134         Wrap the clearing of the timer in a clearTimer() function, called from
1135         stopAnimation(). This fixes the jarring reading of BitmapImage::internalAdvanceAnimation(),
1136         which used to start by calling stopAnimation().
1137
1138         * platform/graphics/BitmapImage.cpp:
1139         (WebCore::BitmapImage::clearTimer):
1140         (WebCore::BitmapImage::startAnimation):
1141         (WebCore::BitmapImage::stopAnimation):
1142         (WebCore::BitmapImage::advanceAnimation):
1143         (WebCore::BitmapImage::internalAdvanceAnimation):
1144         * platform/graphics/BitmapImage.h:
1145         * platform/graphics/Image.h:
1146
1147 2015-05-01  Simon Fraser  <simon.fraser@apple.com>
1148
1149         Avoid compositing updates after style recalcs which have no compositing implications
1150         https://bugs.webkit.org/show_bug.cgi?id=144502
1151
1152         Reviewed by Darin Adler.
1153         
1154         After r183461, we have reliable information about whether a style change with zero
1155         diff can be reliably ignored. Use that information to track whether a given
1156         recalcStyle() does anything which should force a compositing update.
1157         
1158         This eliminates up to 40% of the post-recalcStyle compositing updates on some pages.
1159         
1160         Add Internals API to test.
1161
1162         Test: compositing/updates/no-style-change-updates.html
1163
1164         * dom/Document.cpp:
1165         (WebCore::Document::recalcStyle): Tell the FrameView we're going to recalc style.
1166         * page/FrameView.cpp:
1167         (WebCore::FrameView::willRecalcStyle): Pass it on to the compositor.
1168         (WebCore::FrameView::updateCompositingLayersAfterStyleChange): Move the code
1169         that was here into RenderLayerCompositor::didRecalcStyleWithNoPendingLayout().
1170         * page/FrameView.h:
1171         * rendering/RenderLayerCompositor.cpp:
1172         (WebCore::RenderLayerCompositor::willRecalcStyle): Reset the m_layerNeedsCompositingUpdate flag.
1173         (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout): Bail on the update if
1174         no layers changed.
1175         (WebCore::RenderLayerCompositor::updateCompositingLayers): Logging. Increment m_compositingUpdateCount,
1176         which is used for testing.
1177         (WebCore::RenderLayerCompositor::layerStyleChanged): Set the m_layerNeedsCompositingUpdate flag.
1178         (WebCore::RenderLayerCompositor::startTrackingCompositingUpdates): Reset the counter.
1179         (WebCore::RenderLayerCompositor::compositingUpdateCount):
1180         * rendering/RenderLayerCompositor.h:
1181         * testing/Internals.cpp:
1182         (WebCore::Internals::startTrackingCompositingUpdates):
1183         (WebCore::Internals::compositingUpdateCount):
1184         * testing/Internals.h:
1185         * testing/Internals.idl:
1186
1187 2015-05-01  Andreas Kling  <akling@apple.com>
1188
1189         Reproducible crash removing name attribute from <img> node
1190         <https://webkit.org/b/144371>
1191         <rdar://problem/17198583>
1192
1193         Reviewed by Darin Adler.
1194
1195         The problem here was with HTMLImageElement::getNameAttribute(), which relies
1196         on Element::hasName() to avoid slow attribute lookups when the attribute
1197         is already known not to be present. Unfortunately hasName() uses an ElementData
1198         flag that wasn't getting updated until after the call to parseAttribute().
1199
1200         This patch fixes the issue by moving the code that updates the hasName() flag
1201         before the parseAttribute() virtual dispatch.
1202
1203         Test: fast/dom/HTMLImageElement/remove-name-id-attribute-from-image.html
1204
1205         * dom/Element.cpp:
1206         (WebCore::Element::attributeChanged):
1207
1208 2015-05-01  Eric Carlson  <eric.carlson@apple.com>
1209
1210         Postpone caption style sheet creation
1211         https://bugs.webkit.org/show_bug.cgi?id=144499
1212
1213         Reviewed by Simon Fraser.
1214         
1215         Generating and inserting the caption user style sheet is expensive so don't do it until
1216         we see a text track, and only do it for the first video element in a PageGroup.
1217
1218         Test: media/track/track-user-stylesheet.html
1219
1220         * html/HTMLMediaElement.cpp:
1221         (WebCore::HTMLMediaElement::registerWithDocument): Only register for caption preferences
1222         changes if we have done so before.
1223         (WebCore::HTMLMediaElement::unregisterWithDocument): Only unregister for caption preferences
1224         changes if we registered for them.
1225         (WebCore::HTMLMediaElement::addTextTrack): Register for caption preference changes.
1226         * html/HTMLMediaElement.h:
1227
1228         * page/CaptionUserPreferencesMediaAF.cpp:
1229         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Only
1230         generate the style sheet when called for the first time.
1231
1232 2015-05-01  Dean Jackson  <dino@apple.com>
1233
1234         [iOS] Scrubber display is broken if the buffered range is empty
1235         https://bugs.webkit.org/show_bug.cgi?id=144511
1236
1237         Reviewed by Eric Carlson.
1238
1239         Make sure that if video.buffered returns an empty list, we
1240         still draw the scrubber background correctly.
1241
1242         * Modules/mediacontrols/mediaControlsiOS.js:
1243         (ControllerIOS.prototype.drawTimelineBackground): Ensure that buffered
1244         is always at least as big as the current time.
1245
1246 2015-05-01  Roger Fong  <roger_fong@apple.com>
1247
1248         Media control volume slider should be vertical to avoid flickering issues.
1249         https://bugs.webkit.org/show_bug.cgi?id=144496.
1250         <rdar://problem/20451328>
1251
1252         Reviewed by Darin Adler.
1253
1254         * Modules/mediacontrols/mediaControlsApple.css:
1255         Resize and reposition the volume box so that it does not have to rotated via a transform.
1256         (audio::-webkit-media-controls-panel):
1257         (audio::-webkit-media-controls-panel .volume-box): Also set overflow: hidden so we can't interact
1258              with the volume slider while the volume box is hidden.
1259         (audio::-webkit-media-controls-panel .volume-box:active):
1260         Rotate and position the volume slider via transforms. Make sure it's not transformed in the fullscreen controls.
1261         (video::-webkit-media-controls-volume-slider):
1262         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
1263
1264 2015-05-01  Brent Fulgham  <bfulgham@apple.com>
1265
1266         Expand test infrastructure to support scrolling tests (Part 4): Scroll Snap Support
1267         https://bugs.webkit.org/show_bug.cgi?id=144482
1268
1269         Reviewed by Simon Fraser.
1270
1271         New tests will be landed in a second patch.
1272
1273         The new WheelEventTestTriggers do not work properly with scroll snap points, because some test deferral notifications
1274         need to be triggered for state changes on the scrolling thread. This required the following changes:
1275         1. A flag indicating that we want to know about WheelEvent state changes needed to be propagated to the scrolling thread,
1276            so that tests could be deferred until Scrolling thread rubberband or scroll-snap animations had completed.
1277         2. The ScrollingNodeID needed to be used for registering and clearing deferrals.
1278         3. The scrolling thread needed a way to dispatch messages to the main thread indicating that we should (or should not)
1279            defer tests due to scrolling actions.
1280
1281         Note that a future patch will extend this support to include the RemoteScrollingTree.
1282
1283         * page/WheelEventTestTrigger.cpp:
1284         (WebCore::WheelEventTestTrigger::deferTestsForReason): Added some logging features.
1285         (WebCore::WheelEventTestTrigger::removeTestDeferralForReason): Ditto.
1286         (WebCore::dumpState): Helper function for logging test deferral state.
1287         (WebCore::WheelEventTestTrigger::triggerTestTimerFired): Added some logging features.
1288         * page/scrolling/AsyncScrollingCoordinator.cpp:
1289         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Make sure that the scrolling thread is
1290         told that it needs to send scrolling state back to the main thread. Only do this if we are in testing mode.
1291         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): The scrollingNodeID should be
1292         used as the identifier for this operation, not the page address.
1293         (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added. receives messages from the scrolling thread
1294         and notifies the testing infrastructure.
1295         (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
1296         * page/scrolling/AsyncScrollingCoordinator.h:
1297         * page/scrolling/ScrollingStateScrollingNode.cpp:
1298         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): When cloning the ScrollingStateScrollingNode,
1299         include the testing mode state.
1300         (WebCore::ScrollingStateScrollingNode::setExpectsWheelEventTestTrigger): Added.
1301         * page/scrolling/ScrollingStateScrollingNode.h:
1302         (WebCore::ScrollingStateScrollingNode::expectsWheelEventTestTrigger): Added.
1303         * page/scrolling/ScrollingTree.h:
1304         (WebCore::ScrollingTree::deferTestsForReason): Added stub.
1305         (WebCore::ScrollingTree::removeTestDeferralForReason): Ditto.
1306         * page/scrolling/ThreadedScrollingTree.cpp:
1307         (WebCore::ThreadedScrollingTree::deferTestsForReason): Added. Dispatches messages from the scrolling thread to the
1308         main thread.
1309         (WebCore::ThreadedScrollingTree::removeTestDeferralForReason): Ditto.
1310         * page/scrolling/ThreadedScrollingTree.h:
1311         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1312         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1313         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac): Initialize testing state flag.
1314         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): If the 'ExpectsWheelEventTestTrigger' flag is
1315         set, update local state.
1316         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): If we are testing, and the wheel event should be handled
1317         asynchronously, tell the testing infrastructure we need to wait for the thread state to sync.
1318         (WebCore::ScrollingTreeFrameScrollingNodeMac::deferTestsForReason): Added. Notifies test system we need to defer tests
1319         until we notify them. Also used by the ScrollController during animations.
1320         (WebCore::ScrollingTreeFrameScrollingNodeMac::removeTestDeferralForReason): Ditto.
1321         * platform/Logging.h:
1322         * platform/ScrollAnimator.cpp:
1323         (WebCore::ScrollAnimator::deferTestsForReason): Added. Used by ScrollController during animation. This updates the
1324         testing infrastructure directly, since it is running in the same process and main thread.
1325         (WebCore::ScrollAnimator::removeTestDeferralForReason): Ditto.
1326         * platform/ScrollAnimator.h:
1327         * platform/cocoa/ScrollController.h:
1328         (WebCore::ScrollControllerClient::deferTestsForReason): Change client API.
1329         (WebCore::ScrollControllerClient::removeTestDeferralForReason): Ditto.
1330         (WebCore::ScrollControllerClient::testTrigger): Deleted.
1331         * platform/cocoa/ScrollController.mm:
1332         (WebCore::ScrollController::startSnapRubberbandTimer): Use new client API.
1333         (WebCore::ScrollController::stopSnapRubberbandTimer): Ditto.
1334         (WebCore::ScrollController::startScrollSnapTimer): Ditto.
1335         (WebCore::ScrollController::stopScrollSnapTimer): Ditto.
1336
1337 2015-05-01  Joseph Pecoraro  <pecoraro@apple.com>
1338
1339         Inline some small methods instead of them being EXPORT'd and out of line
1340         https://bugs.webkit.org/show_bug.cgi?id=144498
1341
1342         Reviewed by Darin Adler.
1343
1344         * page/Page.cpp:
1345         (WebCore::Page::testTrigger): Deleted.
1346         (WebCore::Page::clearTrigger): Deleted.
1347         (WebCore::Page::expectsWheelEventTriggers): Deleted.
1348         * page/Page.h:
1349         (WebCore::Page::testTrigger):
1350         (WebCore::Page::clearTrigger):
1351         (WebCore::Page::expectsWheelEventTriggers):
1352
1353 2015-05-01  Dan Bernstein  <mitz@apple.com>
1354
1355         WebCore part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
1356         https://bugs.webkit.org/show_bug.cgi?id=144501
1357
1358         Reviewed by Darin Adler.
1359
1360         Test: TestWebKitAPI/Tests/WebKit2Cocoa/LoadAlternateHTMLString.mm
1361
1362         Normally, loading substitute data (such as an error page) creates a new back-forward list
1363         item. FrameLoader has a mechanism that detects when a substitute data load occurs during
1364         handling of a provisional load error and prevents the creation of a new back-forwards list
1365         item in that case if the unreachable URL is the same as the failing provisional URL. This
1366         mechanism was broken in WebKit2, where handling the provisional load error is asynchronous.
1367
1368         The fix is to capture some state (namely, the failing provisional URL) when dispatching the
1369         load error and allow it to be restored when loading the substitute data.
1370
1371         * loader/FrameLoader.cpp:
1372         (WebCore::FrameLoader::FrameLoader): Removed initialization of
1373         m_delegateIsHandlingProvisionalLoadError.
1374         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL): Instead of checking
1375         m_delegateIsHandlingProvisionalLoadError and if true using the provisional document loader’s
1376         URL, check m_provisionalLoadErrorBeingHandledURL.
1377         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Instead of checking and setting
1378         m_delegateIsHandlingProvisionalLoadError, use m_provisionalLoadErrorBeingHandledURL.
1379         * loader/FrameLoader.h:
1380         (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL): Added this getter. The client
1381         can call this from its override of dispatchDidFailProvisionalLoad and store the result.
1382         (WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Added this setter. The
1383         client can call this prior to loading substitute data if it’s done as part of handling a
1384         previously-dispatched didFailProvisionalLoad.
1385
1386 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1387
1388         USE(...) macro should expect unprefixed variables
1389         https://bugs.webkit.org/show_bug.cgi?id=144454
1390
1391         Reviewed by Daniel Bates.
1392
1393         * DerivedSources.make: Replace all occurrences WTF_USE with USE.
1394         * PlatformEfl.cmake: Ditto.
1395         * PlatformGTK.cmake: Ditto.
1396         * bindings/objc/PublicDOMInterfaces.h: Ditto.
1397         * config.h: Ditto.
1398         * crypto/mac/SerializedCryptoKeyWrapMac.mm: Ditto.
1399         * page/AlternativeTextClient.h: Ditto.
1400         * platform/efl/FileSystemEfl.cpp: Ditto.
1401         (WebCore::fileSystemRepresentation): Ditto.
1402         * platform/graphics/cg/ImageBufferDataCG.h: Ditto.
1403         * platform/graphics/cg/PDFDocumentImage.h: Ditto.
1404         * platform/ios/wak/WAKAppKitStubs.h: Ditto.
1405         * rendering/RenderLayerCompositor.cpp: Ditto.
1406
1407 2015-05-01  Myles C. Maxfield  <mmaxfield@apple.com>
1408
1409         [OS X] Text dilation parameters are not restored after being set
1410         https://bugs.webkit.org/show_bug.cgi?id=144507
1411         <rdar://problem/19446938>
1412
1413         Reviewed by Simon Fraser and Ned Holbrook.
1414
1415         Create a RAII class who is in charge of saving, applying, and restoring dilation parameters. Use this class
1416         around our text drawing routines.
1417
1418         Note that this migrates our use of CTFontSetRenderingParameters() to CTFontSetRenderingStyle().
1419
1420         Test: fast/text/dilation-save-restore.html
1421
1422         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1423         (WebCore::RenderingStyleSaver::RenderingStyleSaver):
1424         (WebCore::RenderingStyleSaver::~RenderingStyleSaver):
1425         (WebCore::showGlyphsWithAdvances):
1426         * platform/spi/cg/CoreGraphicsSPI.h:
1427         * platform/spi/cocoa/CoreTextSPI.h:
1428
1429 2015-05-01  Commit Queue  <commit-queue@webkit.org>
1430
1431         Unreviewed, rolling out r183687.
1432         https://bugs.webkit.org/show_bug.cgi?id=144505
1433
1434         Appears to have caused assertions (Requested by ap on
1435         #webkit).
1436
1437         Reverted changeset:
1438
1439         "Media control volume slider is opaque."
1440         https://bugs.webkit.org/show_bug.cgi?id=144470
1441         http://trac.webkit.org/changeset/183687
1442
1443 2015-05-01  Jeremy Jones  <jeremyj@apple.com>
1444
1445         Stop using deprecated AVKit SPI for enter and exit fullscreen.
1446         https://bugs.webkit.org/show_bug.cgi?id=144493
1447
1448         Reviewed by Jer Noble.
1449
1450         Replace 
1451             -enterFullScreenWithCompletionHandler:
1452             -exitFullScreenWithCompletionHandler:
1453         with
1454             -enterFullScreenAnimated:completionHandler:
1455             -exitFullScreenAnimated:completionHandler:
1456         
1457         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1458         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard):
1459         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
1460         * platform/spi/cocoa/AVKitSPI.h:
1461
1462 2015-05-01  Roger Fong  <roger_fong@apple.com>
1463
1464         Media control volume slider is opaque.
1465         https://bugs.webkit.org/show_bug.cgi?id=144470.
1466         <rdar://problem/20770350>
1467
1468         Rubberstamped by Simon Fraser.
1469
1470         * Modules/mediacontrols/mediaControlsApple.css:
1471         (audio::-webkit-media-controls-panel): 
1472         Don't create a stacking context just for the controls.
1473         Doing so causes the mix-blend-mode on the volume box to fail.
1474
1475 2015-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
1476
1477         [GTK] REGRESSION(183368): It made editing tests assert
1478         https://bugs.webkit.org/show_bug.cgi?id=144447
1479
1480         Reviewed by Chris Fleizach.
1481
1482         Don't notify platforms of editing actions of type EditActionUnspecified.
1483         If we don't know what the action is, platform accessibility APIs certainly
1484         won't.
1485
1486         Add AXTextEditTypeAttributesChange and AXTextAttributesChanged as catch-alls
1487         for formatting changes. ATK lacks finely-grained signals through which to
1488         specify which text attributes have changed. If other platforms have such
1489         signals, new types can always be added.
1490
1491         Don't post an accessible replacement notification for AXTextEditTypeCut.
1492         The notification is handled by DeleteSelectionCommand. It is possible for
1493         white space to be inserted in preparation for a cut which was triggering
1494         a not-reached assert, but insertion of whitespace in preparation for a
1495         cut does not seem notification-worthy.
1496
1497         Treat AXTextEditTypeDictation the same as other insertion types (insert,
1498         paste, typing) with respect to replacement notifications.
1499
1500         No new tests. The hundreds of editing tests that had been crashing seem sufficient.
1501
1502         * accessibility/AXObjectCache.cpp:
1503         (WebCore::AXObjectCache::showIntent):
1504         (WebCore::AXObjectCache::textChangeForEditType):
1505         * accessibility/AXObjectCache.h:
1506         * accessibility/AXTextStateChangeIntent.h:
1507         * accessibility/atk/AXObjectCacheAtk.cpp:
1508         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1509         * editing/AppendNodeCommand.cpp:
1510         (WebCore::AppendNodeCommand::doApply):
1511         (WebCore::AppendNodeCommand::doUnapply):
1512         * editing/DeleteFromTextNodeCommand.cpp:
1513         (WebCore::DeleteFromTextNodeCommand::doApply):
1514         (WebCore::DeleteFromTextNodeCommand::doUnapply):
1515         * editing/EditCommand.cpp:
1516         (WebCore::EditCommand::applyEditType):
1517         (WebCore::EditCommand::unapplyEditType):
1518         * editing/InsertIntoTextNodeCommand.cpp:
1519         (WebCore::InsertIntoTextNodeCommand::doApply):
1520         (WebCore::InsertIntoTextNodeCommand::doUnapply):
1521         * editing/InsertNodeBeforeCommand.cpp:
1522         (WebCore::InsertNodeBeforeCommand::doApply):
1523         (WebCore::InsertNodeBeforeCommand::doUnapply):
1524         * editing/ReplaceInsertIntoTextNodeCommand.cpp:
1525         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
1526
1527 2015-05-01  Brady Eidson  <beidson@apple.com>
1528
1529         Add API to disable meta refreshes.
1530         <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
1531
1532         Reviewed by Alexey Proskuryakov.
1533
1534         Test: loader/meta-refresh-disabled.html
1535
1536         * dom/Document.cpp:
1537         (WebCore::Document::processHttpEquiv): Bail early if Settings have meta refreshes disabled.
1538         * page/Settings.in:
1539
1540 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1541
1542         [Freetype] Properly support synthetic oblique in vertical text
1543         https://bugs.webkit.org/show_bug.cgi?id=144492
1544
1545         Reviewed by Sergio Villar Senin.
1546
1547         No new tests. Covered by existing tests.
1548
1549         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1550         (WebCore::FontPlatformData::initializeWithFontFace): Skew vertical when using synthetic
1551         oblique for vertical text.
1552
1553 2015-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
1554
1555         AX: [ATK] REGRESSION: accessibility/canvas-fallback-content.html now crashes
1556         https://bugs.webkit.org/show_bug.cgi?id=144481
1557
1558         Reviewed by Chris Fleizach.
1559
1560         Canvas fallback content is allowed to be focusable if the canvas is displayed
1561         and visible. Update the style when creating an accessible object for a node in
1562         a canvas subtree and before Element::isFocusable() gets called.
1563
1564         No new tests. The existing, crashing test no longer crashes.
1565
1566         * accessibility/AXObjectCache.cpp:
1567         (WebCore::AXObjectCache::getOrCreate):
1568
1569 2015-05-01  Alex Christensen  <achristensen@webkit.org>
1570
1571         [Content Extensions] Add CombinedURLFilters debugging code.
1572         https://bugs.webkit.org/show_bug.cgi?id=144491
1573
1574         Reviewed by Daniel Bates.
1575
1576         No change in behavior.
1577
1578         * contentextensions/CombinedURLFilters.cpp:
1579         (WebCore::ContentExtensions::recursiveMemoryUsed):
1580         (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
1581         (WebCore::ContentExtensions::prefixTreeVertexToString):
1582         (WebCore::ContentExtensions::recursivePrint):
1583         (WebCore::ContentExtensions::CombinedURLFilters::print):
1584         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1585         (WebCore::ContentExtensions::generateNFAForSubtree):
1586         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1587         * contentextensions/CombinedURLFilters.h:
1588         * contentextensions/NFA.cpp:
1589         (WebCore::ContentExtensions::NFA::memoryUsed):
1590         * contentextensions/NFA.h:
1591         * contentextensions/Term.h:
1592         (WebCore::ContentExtensions::quantifierToString):
1593         (WebCore::ContentExtensions::Term::toString):
1594
1595 2015-05-01  Eric Carlson  <eric.carlson@apple.com>
1596
1597         Fix text track language selection logic
1598         https://bugs.webkit.org/show_bug.cgi?id=144467
1599
1600         Reviewed by Brent Fulgham.
1601
1602         No new tests, media/track/track-language-preference.html was updated.
1603
1604         * html/HTMLMediaElement.cpp:
1605         (WebCore::HTMLMediaElement::configureTextTrackGroup): Correct a minor style typo.
1606         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Update logging.
1607
1608         * page/CaptionUserPreferences.cpp:
1609         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Minor cleanup.
1610         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Give exact matches a
1611         higher score.
1612
1613         * page/CaptionUserPreferencesMediaAF.cpp:
1614         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Update for 
1615         indexOfBestMatchingLanguageInList change.
1616
1617         * platform/Language.cpp:
1618         (WebCore::indexOfBestMatchingLanguageInList): Add parameter for exact match. Convert the
1619         passed language to lower case as we do with the preferred languages.
1620         * platform/Language.h:
1621
1622 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1623
1624         [Freetype] Add support for the font-synthesis property
1625         https://bugs.webkit.org/show_bug.cgi?id=144472
1626
1627         Reviewed by Sergio Villar Senin.
1628
1629         No new tests. This causes fast/css3-text/font-synthesis.html to pass
1630         for WebKitGTK+.
1631
1632         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1633         (WebCore::FontPlatformData::FontPlatformData): Only use synthetic bold when the font description allows it.
1634         (WebCore::FontPlatformData::initializeWithFontFace): Ditto for synthetic oblique.
1635
1636 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1637
1638         [GTK] New CORS tests from r183280 fail on WebKitGTK+
1639         https://bugs.webkit.org/show_bug.cgi?id=144469
1640
1641         Reviewed by Sergio Villar Senin.
1642
1643         No new tests. This causes failing tests to pass.
1644
1645         * platform/network/soup/ResourceHandleSoup.cpp:
1646         (WebCore::doRedirect): Clear the origin header on cross-origin redirects.
1647
1648 2015-04-30  Alex Christensen  <achristensen@webkit.org>
1649
1650         Compile fix when using content extensions debugging code.
1651
1652         * contentextensions/ContentExtensionCompiler.cpp:
1653         (WebCore::ContentExtensions::compileRuleList):
1654         * contentextensions/ContentExtensionsDebugging.h:
1655         * contentextensions/DFA.cpp:
1656         (WebCore::ContentExtensions::printTransitions):
1657         (WebCore::ContentExtensions::DFA::debugPrintDot):
1658         * contentextensions/DFANode.h:
1659         * contentextensions/NFA.cpp:
1660         (WebCore::ContentExtensions::NFA::memoryUsed):
1661         (WebCore::ContentExtensions::NFA::debugPrintDot):
1662
1663 2015-04-30  Dan Bernstein  <mitz@apple.com>
1664
1665         Fixed the build for <rdar://problem/20758514>
1666
1667         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1668         (WebCore::AudioSourceProviderAVFObjC::destroyMix): Don’t pass nil to
1669         -[AVMutableAudioMix setInputParameters:].
1670
1671 2015-04-30  Daniel Bates  <dabates@apple.com>
1672
1673         Clean up: Remove unnecessary runtime computation of string length
1674         https://bugs.webkit.org/show_bug.cgi?id=144483
1675
1676         Reviewed by Joseph Pecoraro.
1677
1678         Following <http://trac.webkit.org/changeset/183649>, WebCore::fullyQualifiedInfoTableName()
1679         computes strlen() of the first string literal as part of concatenating two string literals.
1680         It is sufficient to use sizeof() - 1 instead of strlen() to compute the length of the first
1681         string literal because the size of the string literal is known at compile time.
1682
1683         * Modules/webdatabase/DatabaseBackendBase.cpp:
1684         (WebCore::fullyQualifiedInfoTableName):
1685
1686 2015-04-30  Dean Jackson  <dino@apple.com>
1687
1688         Expose -apple-system as a font family
1689         https://bugs.webkit.org/show_bug.cgi?id=144484
1690         <rdar://problem/20767330>
1691
1692         Reviewed by Tim Horton.
1693
1694         Accept "-apple-system" for the font-family property, and
1695         rename "-apple-system-font-monospaced-numbers" to
1696         "-apple-system-monospaced-numbers".
1697
1698         Also change the media controls to use the new name.
1699
1700         Covered by existing tests and this new one:
1701             fast/text/system-font-legacy-name.html
1702
1703         * Modules/mediacontrols/mediaControlsApple.css:
1704         (audio::-webkit-media-controls-time-remaining-display):
1705         * Modules/mediacontrols/mediaControlsiOS.css:
1706         (::-webkit-media-controls):
1707         (audio::-webkit-media-controls-time-remaining-display):
1708         (audio::-webkit-media-controls-status-display):
1709         * platform/graphics/ios/FontCacheIOS.mm: Add support for the new name.
1710         (WebCore::createCTFontWithFamilyNameAndWeight):
1711         * platform/graphics/mac/FontCacheMac.mm: Ditto.
1712         (WebCore::fontWithFamily):
1713
1714 2015-04-30  Javier Fernandez  <jfernandez@igalia.com>
1715
1716         [CSS Grid Layout] overflow-position keyword for align and justify properties.
1717         https://bugs.webkit.org/show_bug.cgi?id=144235
1718
1719         Reviewed by Sergio Villar Senin.
1720
1721         When the alignment subject is larger than the alignment container,
1722         it will overflow. Some alignment modes, if honored in this
1723         situation, may cause data loss; an overflow alignment mode can be
1724         explicitly specified to avoid this.
1725
1726         This patch implements overflow-keyword handling for Grid Layout on
1727         align-self and justify-self properties.
1728
1729         Test: fast/css-grid-layout/grid-align-justify-overflow.html
1730
1731         * rendering/RenderGrid.cpp:
1732         (WebCore::computeOverflowAlignmentOffset):
1733         (WebCore::RenderGrid::rowPositionForChild):
1734         (WebCore::RenderGrid::columnPositionForChild):
1735         (WebCore::RenderGrid::rowAxisPositionForChild): Deleted.
1736         * rendering/style/RenderStyle.cpp:
1737         (WebCore::resolveAlignmentData):
1738         (WebCore::resolveJustificationData):
1739         (WebCore::RenderStyle::resolveAlignment):
1740         (WebCore::RenderStyle::resolveAlignmentOverflow):
1741         (WebCore::RenderStyle::resolveJustification):
1742         (WebCore::RenderStyle::resolveJustificationOverflow):
1743         * rendering/style/RenderStyle.h:
1744
1745 2015-04-30  Jon Honeycutt  <jhoneycutt@apple.com>
1746
1747         Rebaseline bindings tests results after r183648.
1748
1749         Unreviewed.
1750
1751         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1752         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1753         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1754         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1755         * bindings/scripts/test/JS/JSTestInterface.cpp:
1756         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
1757         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
1758         (WebCore::setJSTestInterfaceImplementsStr2):
1759         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1760         (WebCore::setJSTestInterfaceSupplementalStr2):
1761         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
1762         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1763         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1764         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
1765         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1766         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
1767         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
1768         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
1769         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
1770         * bindings/scripts/test/JS/JSTestObj.cpp:
1771         (WebCore::setJSTestObjConstructorStaticStringAttr):
1772         (WebCore::setJSTestObjStringAttr):
1773         (WebCore::setJSTestObjReflectedStringAttr):
1774         (WebCore::setJSTestObjReflectedURLAttr):
1775         (WebCore::setJSTestObjReflectedCustomURLAttr):
1776         (WebCore::setJSTestObjStringAttrWithGetterException):
1777         (WebCore::setJSTestObjStringAttrWithSetterException):
1778         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1779         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
1780         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
1781         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1782         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1783         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1784         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
1785         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
1786         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
1787         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1788         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1789         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1790         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
1791         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1792         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1793         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1794         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
1795         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1796         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
1797         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1798         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1799         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1800
1801 2015-04-30  Simon Fraser  <simon.fraser@apple.com>
1802
1803         Fixed elements end up in the middle of the view with pageScale < 1
1804         https://bugs.webkit.org/show_bug.cgi?id=144428
1805         rdar://problem/20404982
1806
1807         Reviewed by Tim Horton.
1808
1809         When pageScale is < 1, we used fixed layout mode, and FrameView::fixedElementsLayoutRelativeToFrame()
1810         returns true. However, the scrolling thread was calling the static scrollOffsetForFixedPosition()
1811         hardcoding 'false' for this parameter.
1812         
1813         Fix by sending the value of fixedElementsLayoutRelativeToFrame over to the scrolling thread,
1814         so we can use it when doing scrolling-thread fixed position stuff.
1815
1816         Not testable.
1817
1818         * page/scrolling/AsyncScrollingCoordinator.cpp:
1819         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1820         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1821         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
1822         (WebCore::ScrollingStateFrameScrollingNode::setFixedElementsLayoutRelativeToFrame):
1823         * page/scrolling/ScrollingStateFrameScrollingNode.h:
1824         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
1825         (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
1826         (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren):
1827         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
1828         (WebCore::ScrollingTreeFrameScrollingNode::fixedElementsLayoutRelativeToFrame):
1829         (WebCore::ScrollingTreeFrameScrollingNode::shouldUpdateScrollLayerPositionSynchronously): Deleted.
1830         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1831         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
1832
1833 2015-04-30  Beth Dakin  <bdakin@apple.com>
1834
1835         Remove invalid assertion from MouseEvent::create()
1836         https://bugs.webkit.org/show_bug.cgi?id=144477
1837
1838         Reviewed by Tim Horton.
1839
1840         mouseforcechanged events and mouseforcewillbegin trigger this assertion. The 
1841         assertion does not seem valuable, so rather than changing it, just remove it.
1842         * dom/MouseEvent.cpp:
1843         (WebCore::MouseEvent::create):
1844
1845 2015-04-30  Dean Jackson  <dino@apple.com>
1846
1847         -apple-system-font-monospaced-numbers doesn't work on iOS
1848         https://bugs.webkit.org/show_bug.cgi?id=144478
1849         <rdar://problem/20544940>
1850
1851         Reviewed by Brent Fulgham.
1852
1853         Make sure to start from the system font descriptor when
1854         asking for a monospaced numeric alternate.
1855
1856         Test: platform/ios-simulator/fast/text/system-monospaced-numbers.html
1857
1858         * platform/graphics/ios/FontCacheIOS.mm:
1859         (WebCore::createCTFontWithFamilyNameAndWeight):
1860
1861 2015-04-30  Oliver Hunt  <oliver@apple.com>
1862
1863         DOM bindings should not be using a reference type to point to a temporary object
1864         https://bugs.webkit.org/show_bug.cgi?id=144474
1865
1866         Reviewed by Beth Dakin.
1867
1868         The DOM bindings will currently try and use a local reference to point
1869         to a temporary object. This currently works as a by product of the compiler's
1870         stack layout. This patch removes the dependency on undefined behaviour
1871         by ensuring that we use a value rather than reference type.
1872
1873         * bindings/scripts/CodeGeneratorJS.pm:
1874         (GenerateParametersCheck):
1875         (GetNativeTypeForCallbacks):
1876
1877 2015-04-30  Brady Eidson  <beidson@apple.com>
1878
1879         Build fix after r183646 for less enlightened platforms.
1880
1881         Unreviewed.
1882
1883         * Modules/webdatabase/DatabaseBackendBase.cpp:
1884         (WebCore::fullyQualifiedInfoTableName): Windows doesn’t have stpcpy :(
1885
1886 2015-04-30  Brady Eidson  <beidson@apple.com>
1887
1888         Javascript using WebSQL can create their own WebKit info table.
1889         <rdar://problem/20688792> and https://bugs.webkit.org/show_bug.cgi?id=144466
1890
1891         Reviewed by Alex Christensen.
1892
1893         Test: storage/websql/alter-to-info-table.html
1894
1895         * Modules/webdatabase/DatabaseBackendBase.cpp:
1896         (WebCore::DatabaseBackendBase::databaseInfoTableName): Return the info table name.
1897         (WebCore::fullyQualifiedInfoTableName): Append "main." to the info table name.
1898         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Use the fully qualified name.
1899         (WebCore::DatabaseBackendBase::performOpenAndVerify): Ditto.
1900         (WebCore::DatabaseBackendBase::getVersionFromDatabase): Ditto.
1901         (WebCore::DatabaseBackendBase::setVersionInDatabase): Ditto.
1902
1903 2015-04-30  Beth Dakin  <bdakin@apple.com>
1904
1905         Should choose UIScrollView indicatorStyle based on the document background color
1906         https://bugs.webkit.org/show_bug.cgi?id=144473
1907         -and corresponding-
1908         rdar://problem/19897699
1909
1910         Reviewed by Simon Fraser.
1911
1912         Export this function.
1913         * platform/graphics/Color.h:
1914
1915 2015-04-30  Brent Fulgham  <bfulgham@apple.com>
1916
1917         [Win] Allow WebKit to build without ANGLE support
1918         https://bugs.webkit.org/show_bug.cgi?id=144459
1919         <rdar://problem/20707307>
1920
1921         Reviewed by Dean Jackson.
1922
1923         * platform/graphics/GLContext.cpp: Use the ENABLE(GRAPHICS_CONTEXT_3D)
1924         macro to avoid compiling this code if not using WEBGL/3D contexts.
1925
1926 2015-04-29  David Hyatt  <hyatt@apple.com>
1927
1928         Avoid containingBlock() calls when no writing mode flipping is needed.
1929         https://bugs.webkit.org/show_bug.cgi?id=144407
1930
1931         Reviewed by Simon Fraser.
1932
1933         Add a bool to RenderView that indicates whether or not any flipped blocks have been
1934         added to the view. Once tainted, the view just stays dirty forever. If no flipped
1935         blocks are ever seen, we can then optimize away calls to containingBlock().
1936
1937         The motivation for this patch is to improve layer position updating, which makes many
1938         calls to topLeftLocationOffset(), one of the functions that can be optimized by this
1939         change.
1940
1941         * rendering/RenderBox.cpp:
1942         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1943         * rendering/RenderBoxModelObject.cpp:
1944         (WebCore::RenderBoxModelObject::updateFromStyle):
1945         * rendering/RenderLayer.cpp:
1946         (WebCore::RenderLayer::calculateClipRects):
1947         * rendering/RenderLineBoxList.cpp:
1948         (WebCore::RenderLineBoxList::rangeIntersectsRect):
1949         * rendering/RenderView.cpp:
1950         (WebCore::RenderView::RenderView):
1951         * rendering/RenderView.h:
1952
1953 2015-04-29  Jer Noble  <jer.noble@apple.com>
1954
1955         Make GenericTaskQueue even more generic (and usable inside platform/)
1956         https://bugs.webkit.org/show_bug.cgi?id=144414
1957
1958         Reviewed by Eric Carlson.
1959
1960         Templatize GenericTaskQueue so that it can be used from within platform/.
1961
1962         * CMakeLists.txt:
1963         * WebCore.vcxproj/WebCore.vcxproj:
1964         * WebCore.vcxproj/WebCore.vcxproj.filters:
1965         * WebCore.xcodeproj/project.pbxproj:
1966         * dom/GenericTaskQueue.cpp: Removed.
1967         * html/HTMLMediaElement.h:
1968         * platform/GenericTaskQueue.h: Renamed from Source/WebCore/dom/GenericTaskQueue.h.
1969         (WebCore::TaskDispatcher::TaskDispatcher): Added default templatized class which just calls the parameter's postTask().
1970         (WebCore::TaskDispatcher::postTask): Call context's postTask().
1971         (WebCore::TaskDispatcher<Timer>::TaskDispatcher): Add a timer version which does not require a context.
1972         (WebCore::TaskDispatcher<Timer>::postTask): Set the timer.
1973         (WebCore::TaskDispatcher<Timer>::timerFired): Call the task.
1974         (WebCore::GenericTaskQueue::GenericTaskQueue): Moved from .cpp.
1975         (WebCore::GenericTaskQueue::enqueueTask): Ditto.
1976         (WebCore::GenericTaskQueue::close): Ditto.
1977         (WebCore::GenericTaskQueue::cancelAllTasks): Ditto.
1978         (WebCore::GenericTaskQueue::hasPendingTasks): Ditto.
1979
1980 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
1981
1982         Unreviewed build fix. WebCore has a weak symbol.
1983
1984         WebCore has a weak external symbol in it. A common cause of weak external
1985         symbols is when an inline function is listed in the linker export file.
1986         ERROR: symbol __ZNK7WebCore4Page25expectsWheelEventTriggersEv
1987
1988         * page/Page.cpp:
1989         (WebCore::Page::expectsWheelEventTriggers):
1990         * page/Page.h:
1991         (WebCore::Page::expectsWheelEventTriggers): Deleted.
1992
1993 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
1994
1995         Crash at WebCore::Document::absoluteRegionForEventTargets 
1996         https://bugs.webkit.org/show_bug.cgi?id=144426
1997         rdar://problem/20502166
1998
1999         Reviewed by Tim Horton.
2000
2001         When a frame had wheel event handlers, we would register the document itself
2002         as a handler in its parent document. This is problematic, because there's not
2003         code path that removes it when the frame is destroyed.
2004         
2005         It turns out we don't need to do this at all; the non-fast scrollable region
2006         already takes handlers in subframes into account.
2007
2008         Tests: fast/events/wheelevent-in-frame.html
2009                fast/events/wheelevent-in-reattached-frame.html
2010
2011         * dom/Document.cpp:
2012         (WebCore::Document::didAddWheelEventHandler):
2013         (WebCore::Document::didRemoveWheelEventHandler):
2014
2015 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
2016
2017         Not all videos should automatically play to playback target
2018         https://bugs.webkit.org/show_bug.cgi?id=144430
2019         <rdar://problem/20718523>
2020
2021         Reviewed by Darin Adler.
2022
2023         * Modules/mediasession/WebMediaSessionManager.cpp:
2024         (WebCore::WebMediaSessionManager::clientStateDidChange): Consider ExternalDeviceAutoPlayCandidate.
2025         Minor cleanup.
2026
2027         * html/HTMLMediaElement.cpp:
2028         (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate when a <video>
2029         has a file with an audio track that does not loop.
2030
2031         * page/MediaProducer.h: Add ExternalDeviceAutoPlayCandidate.
2032
2033 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2034
2035         LiveNodeList may unexpectedly return an element for empty string
2036         https://bugs.webkit.org/show_bug.cgi?id=144429
2037
2038         Reviewed by Darin Adler.
2039
2040         * dom/LiveNodeList.cpp:
2041         (WebCore::LiveNodeList::namedItem):
2042         Never return a result for an empty string.
2043
2044 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2045
2046         Remove PassRefPtr in SVGFEFooElement classes
2047         https://bugs.webkit.org/show_bug.cgi?id=144425
2048
2049         Reviewed by Darin Adler.
2050
2051         As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
2052         in SVGFEFooElement.
2053
2054         No new tests, no behavior changes.
2055
2056         * css/RGBColor.cpp:
2057         (WebCore::RGBColor::create):
2058         * css/RGBColor.h:
2059         * platform/graphics/filters/PointLightSource.h:
2060         (WebCore::PointLightSource::create):
2061         * platform/graphics/filters/SpotLightSource.h:
2062         (WebCore::SpotLightSource::create):
2063         * svg/SVGColor.cpp:
2064         (WebCore::SVGColor::rgbColor):
2065         * svg/SVGColor.h:
2066         * svg/SVGFEDistantLightElement.cpp:
2067         (WebCore::SVGFEDistantLightElement::lightSource):
2068         * svg/SVGFEDistantLightElement.h:
2069         * svg/SVGFELightElement.cpp:
2070         (WebCore::SVGFELightElement::findLightSource):
2071         * svg/SVGFELightElement.h:
2072         * svg/SVGFEPointLightElement.cpp:
2073         (WebCore::SVGFEPointLightElement::lightSource):
2074         * svg/SVGFEPointLightElement.h:
2075         * svg/SVGFESpotLightElement.cpp:
2076         (WebCore::SVGFESpotLightElement::lightSource):
2077         * svg/SVGFESpotLightElement.h:
2078
2079 2015-04-29  Dean Jackson  <dino@apple.com>
2080
2081         Create a named CSS property for system colors
2082         https://bugs.webkit.org/show_bug.cgi?id=144423
2083         <rdar://problem/20491011>
2084
2085         Reviewed by Tim Horton.
2086
2087         Test: fast/css/apple-system-colors.html
2088
2089         Expose the following values to CSS color properties:
2090             -apple-system-blue
2091             -apple-system-brown
2092             -apple-system-gray
2093             -apple-system-green
2094             -apple-system-orange
2095             -apple-system-pink
2096             -apple-system-purple
2097             -apple-system-red
2098             -apple-system-yellow
2099
2100         On platforms other than OS X Yosemite and iOS, the
2101         actual color values are undefined and become transparent
2102         black. (In fact, not all are defined on iOS either.)
2103
2104         * WebCore.xcodeproj/project.pbxproj: Two new SPI header files.
2105
2106         * css/CSSParser.cpp:
2107         (WebCore::CSSParser::validSystemColorValue): New helper function that
2108         checks if a CSSValueID is between the two system color values. This
2109         was being tested everywhere, which meant adding a new system color was
2110         at risk of being ignored. It's a static method so it can be used
2111         from the SVG CSS parser too.
2112         (WebCore::validPrimitiveValueColor): Use the new helper.
2113         (WebCore::CSSParser::parseValue): Ditto.
2114         (WebCore::CSSParser::parseBackgroundColor): Ditto.
2115         (WebCore::CSSParser::parseShadow): Ditto.
2116         (WebCore::parseDeprecatedGradientColorStop): Ditto.
2117         (WebCore::parseGradientColorOrKeyword): Ditto.
2118         * css/CSSParser.h: New static helper function.
2119
2120         * css/CSSValueKeywords.in: Add the new CSS value keywords.
2121
2122         * css/SVGCSSParser.cpp:
2123         (WebCore::validSystemControlColorValue): SVG has a restricted
2124         set of system colors, so use the helper from CSSParser but with
2125         an extra condition.
2126         (WebCore::CSSParser::parseSVGValue): Use the helper.
2127
2128         * platform/spi/ios/UIColorSPI.h: Added.
2129         * platform/spi/cocoa/NSColorSPI.h: Added.
2130
2131         * rendering/RenderThemeIOS.h: New systemColor override. Also add a cache for system colors.
2132         * rendering/RenderThemeIOS.mm:
2133         (WebCore::RenderThemeIOS::systemColor): Ask UIColor to provide the color values for the new CSS values.
2134         * rendering/RenderThemeMac.mm:
2135         (WebCore::RenderThemeMac::systemColor): Ditto.
2136
2137 2015-04-29  Commit Queue  <commit-queue@webkit.org>
2138
2139         Unreviewed, rolling out r183600.
2140         https://bugs.webkit.org/show_bug.cgi?id=144432
2141
2142         New tests time out everywhere (Requested by ap on #webkit).
2143
2144         Reverted changeset:
2145
2146         "Crash at WebCore::Document::absoluteRegionForEventTargets"
2147         https://bugs.webkit.org/show_bug.cgi?id=144426
2148         http://trac.webkit.org/changeset/183600
2149
2150 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2151
2152         Unreviewed iOS build fix. Unused parameter no longer exists.
2153
2154         * page/scrolling/ScrollingCoordinator.cpp:
2155         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
2156
2157 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
2158
2159         Crash at WebCore::Document::absoluteRegionForEventTargets 
2160         https://bugs.webkit.org/show_bug.cgi?id=144426
2161         rdar://problem/20502166
2162
2163         Reviewed by Tim Horton.
2164
2165         When a frame had wheel event handlers, we would register the document itself
2166         as a handler in its parent document. This is problematic, because there's not
2167         code path that removes it when the frame is destroyed.
2168         
2169         It turns out we don't need to do this at all; the non-fast scrollable region
2170         already takes handlers in subframes into account.
2171
2172         Tests: fast/events/wheelevent-in-frame.html
2173                fast/events/wheelevent-in-reattached-frame.html
2174
2175         * dom/Document.cpp:
2176         (WebCore::Document::didAddWheelEventHandler):
2177         (WebCore::Document::didRemoveWheelEventHandler):
2178
2179 2015-04-29  David Kilzer  <ddkilzer@apple.com>
2180
2181         Attempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
2182         <http://webkit.org/b/144362>
2183
2184         Reviewed by Andy Estes.
2185
2186         This patch switches soft-linking of QuickLook.framework to
2187         QuickLookSoftLink.{h,mm} so that we stop exporting unintended
2188         symbols.
2189
2190         No new tests since no change in behavior.
2191
2192         * WebCore.xcodeproj/project.pbxproj:
2193         - Add QuickLookSoftLinking.{h,mm} to the project.
2194
2195         * platform/ios/QuickLookSoftLink.h: Added.
2196         * platform/ios/QuickLookSoftLink.mm: Added.
2197         * platform/mac/SoftLinking.h:
2198         (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
2199         (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
2200         (SOFT_LINK_POINTER_FOR_HEADER): Add macro.
2201         (SOFT_LINK_POINTER_FOR_SOURCE): Add macro.
2202
2203         * platform/network/ios/QuickLook.h:
2204         - Remove unused declarations.
2205
2206         * platform/network/ios/QuickLook.mm:
2207         (WebCore::QLPreviewConverterClass): Deleted.
2208         (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
2209         (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
2210         (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
2211         - Remove SOFT_LINK macros and unused methods after switching to
2212           new QuickLookSoftLink.{h,mm}.
2213         (WebCore::QLPreviewGetSupportedMIMETypesSet):
2214         - Switch to use NeverDestroyed<>.
2215         (WebCore::registerQLPreviewConverterIfNeeded):
2216         (createQLPreviewProtocol):
2217         (WebCore::QLPreviewProtocol):
2218         (WebCore::QuickLookHandle::QuickLookHandle):
2219         (WebCore::QuickLookHandle::create):
2220         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
2221         - Simplify code when using QuickLookSoftLink.h.
2222
2223         * platform/network/ios/WebCoreURLResponseIOS.mm:
2224         - Include QuickLookSoftLink.h header.
2225
2226 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
2227
2228         Compute the non-fast-scrollable region in main-document coordinates
2229         https://bugs.webkit.org/show_bug.cgi?id=144420
2230
2231         Reviewed by Tim Horton.
2232
2233         Compute the non-fast-scrollable region in document coordinates, to make it easier
2234         to reason about. Previously, it was document coordinates offset by top content inset.
2235
2236         * page/DebugPageOverlays.cpp:
2237         (WebCore::MouseWheelRegionOverlay::updateRegion): Traverse all frames to compute the wheel
2238         event handler region, mapping each to root view coords, and then mapping back into document
2239         coords at the end.
2240         (WebCore::NonFastScrollableRegionOverlay::updateRegion): No offset needed here; the
2241         overlay and region are both document coordinates.
2242         * page/FrameView.h: Make some mapping function overrides public, and expose widgetsInRenderTree().
2243         * page/Page.cpp:
2244         (WebCore::Page::nonFastScrollableRects): Remove frame argument.
2245         * page/Page.h:
2246         * page/PageOverlay.cpp:
2247         (WebCore::PageOverlay::bounds):
2248         (WebCore::PageOverlay::viewToOverlayOffset): Convenience function to map between
2249         view and overlay coordinates.
2250         * page/PageOverlay.h:
2251         * page/scrolling/AsyncScrollingCoordinator.cpp: New computeNonFastScrollableRegion() signature.
2252         (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
2253         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2254         (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
2255         * page/scrolling/ScrollingCoordinator.cpp:
2256         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): This function
2257         recurses on frames, computing an absolute (document-relative) region per frame. This
2258         removes the confusing offsetting through top content inset.
2259         Change how we get to plugins that want wheel events; we can't get from PluginViewBase
2260         to renderers, so use FrameView's list of Widgets, and their RenderWidgets. This fixes
2261         regions for transformed plugin-ins.
2262         For subframes, we get a region in the subframe's document coords. Map to that sub-frame,
2263         then to our frame, then to our document.
2264         (WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Wrapper that hides
2265         the recursive function.
2266         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Deleted.
2267         * page/scrolling/ScrollingCoordinator.h:
2268         * page/scrolling/ScrollingTree.cpp:
2269         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Map the event point
2270         from view coordinates to document coordinates for testing against the non-fast region.
2271         We previously assert that the root note is a FrameScrolling node.
2272         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2273         (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset): Similar to ScrollView::viewToContents()
2274         for the scrolling tree.
2275         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2276         * testing/Internals.cpp:
2277         (WebCore::Internals::nonFastScrollableRects): No need for frame arg.
2278
2279 2015-04-29  Brent Fulgham  <bfulgham@apple.com>
2280
2281         Expand test infrastructure to support scrolling tests
2282         https://bugs.webkit.org/show_bug.cgi?id=143684
2283         <rdar://problem/20375516>
2284
2285         Reviewed by Simon Fraser.
2286
2287         Tested by various fast/scrolling and platform/mac-wk2/tiled-drawing/scrolling tests.
2288
2289         This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
2290         function object to be fired when scroll events are finished. The object also keeps track of reasons
2291         why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
2292         check rendering state in the middle of an animation.
2293
2294         Switch from the original WeakPtr design to ThreadSafeRefPtr, because WeakPtr cannot be shared
2295         across multiple threads.
2296
2297         * page/FrameView.cpp:
2298         (WebCore::FrameView::layout): Make sure ScrollAnimator knows about any active test trigger.
2299         (WebCore::FrameView::setScrollPosition): Ditto.
2300         (WebCore::FrameView::didAddScrollbar): Ditto.
2301         * page/MainFrame.cpp:
2302         (WebCore::MainFrame::testTrigger): Moved to Page.
2303         (WebCore::MainFrame::ensureTestTrigger): Ditto.
2304         * page/MainFrame.h:
2305         * page/Page.cpp:
2306         (WebCore::Page::testTrigger): Moved from MainFrame, and converted to use RefPtr.
2307         (WebCore::Page::ensureTestTrigger): Ditto.
2308         * page/Page.h:
2309         * page/WheelEventTestTrigger.cpp:
2310         (WebCore::WheelEventTestTrigger::WheelEventTestTrigger): Remove WeakPtr code.
2311         (WebCore::WheelEventTestTrigger::createWeakPtr): Deleted.
2312         * page/WheelEventTestTrigger.h:
2313         * page/mac/EventHandlerMac.mm:
2314         (WebCore::EventHandler::platformPrepareForWheelEvents): Make sure the scroll animator knows about
2315         any active test trigger object.
2316         * page/scrolling/AsyncScrollingCoordinator.cpp:
2317         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Notify WheelEventTestTrigger
2318         that the scrolling thread is synced with the main thread.
2319         * platform/ScrollAnimator.h: Hold a RefPtr to the WheelEventTestTrigger. 
2320         (WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger):
2321         * platform/cocoa/ScrollController.h:
2322         * platform/cocoa/ScrollController.mm:
2323         (WebCore::ScrollController::startSnapRubberbandTimer): Notify test trigger to hold tests until rubber band
2324         snapping is complete.
2325         (WebCore::ScrollController::stopSnapRubberbandTimer): Notify test trigger that rubber band snapping is done.
2326         (WebCore::ScrollController::startScrollSnapTimer): Notify test trigger to hold tests until scroll snapping
2327         is complete.
2328         (WebCore::ScrollController::stopScrollSnapTimer): Notify test trigger that scroll snapping is done.
2329         * platform/mac/ScrollAnimatorMac.mm:
2330         (WebCore::ScrollAnimatorMac::didBeginScrollGesture): Notify test trigger that a content scroll is in progress.
2331         (WebCore::ScrollAnimatorMac::didEndScrollGesture): Notify test trigger that a content scroll is finished.
2332         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): Notify test trigger to hold tests until the content
2333         scrolling is complete.
2334         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): Notify test trigger that content scrolling is done.
2335         * rendering/RenderBox.cpp:
2336         (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
2337         (WebCore::RenderBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
2338         to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
2339         (WebCore::RenderBox::setScrollTop): Ditto.
2340         * rendering/RenderLayer.cpp:
2341         (WebCore::RenderLayer::createScrollbar): Make sure the ScrollAnimator knows about any active test triggers.
2342         * rendering/RenderListBox.cpp:
2343         (WebCore::connectScrollAnimatorToTestTrigger): Helper function.
2344         (WebCore::RenderListBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
2345         to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
2346         (WebCore::RenderListBox::setScrollTop): Ditto.
2347         (WebCore::RenderListBox::createScrollbar): Ditto.
2348         * testing/js/WebCoreTestSupport.cpp:
2349         (WebCoreTestSupport::monitorWheelEvents): Look for WheelEventTestTrigger in Page, rather than MainFrame.
2350         (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
2351
2352 2015-04-29  Javier Fernandez  <jfernandez@igalia.com>
2353
2354         [CSS Box Alignment] Unifying alignment data in a single class
2355         https://bugs.webkit.org/show_bug.cgi?id=144384
2356
2357         Reviewed by David Hyatt.
2358
2359         The new CSS Box Alignment specification introduces more complex
2360         values and syntax for defining alignment properties. Most of the
2361         alignment values were just keyword identifiers, but the new syntax
2362         allows different combinations of identifiers to determine the
2363         alignment behavior (eg. overflow-alignment keyword).
2364
2365         This patch wll help to implement later overflow handling and
2366         specially Content Dstribution alignment, the most complex case by
2367         far. It will be more consistent against style changes and repaint,
2368         snce we will have just one field to monitoring for value
2369         modfications.
2370
2371         No new tests, because no new functionality was added; it's just a
2372         code refactoring which is just expected to pass current tests.
2373
2374         * css/CSSComputedStyleDeclaration.cpp:
2375         (WebCore::resolveSelfAlignmentAuto):
2376         (WebCore::ComputedStyleExtractor::propertyValue):
2377         * css/CSSPropertyNames.in:
2378         * css/StyleBuilderConverter.h:
2379         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
2380         (WebCore::StyleBuilderConverter::convertSVGColor): Deleted.
2381         * css/StyleBuilderCustom.h:
2382         (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage): Deleted.
2383         (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage): Deleted.
2384         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
2385         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
2386         (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
2387         (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
2388         (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
2389         (WebCore::StyleBuilderCustom::applyInheritLineHeight): Deleted.
2390         * css/StyleResolver.cpp:
2391         (WebCore::StyleResolver::adjustRenderStyle):
2392         * mathml/MathMLTextElement.cpp:
2393         (WebCore::MathMLTextElement::createElementRenderer):
2394         * rendering/RenderFlexibleBox.cpp:
2395         (WebCore::RenderFlexibleBox::styleDidChange):
2396         * rendering/RenderFullScreen.cpp:
2397         (WebCore::createFullScreenStyle):
2398         * rendering/RenderMenuList.cpp:
2399         (WebCore::RenderMenuList::adjustInnerStyle):
2400         * rendering/mathml/RenderMathMLRoot.cpp:
2401         (WebCore::RenderMathMLRoot::updateStyle):
2402         * rendering/mathml/RenderMathMLScripts.cpp:
2403         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
2404         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
2405         * rendering/style/RenderStyle.cpp:
2406         (WebCore::RenderStyle::resolveAlignment):
2407         (WebCore::RenderStyle::resolveJustification):
2408         * rendering/style/RenderStyle.h:
2409         * rendering/style/StyleRareNonInheritedData.cpp:
2410         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2411         (WebCore::StyleRareNonInheritedData::operator==):
2412         (WebCore::StyleRareNonInheritedData::contentDataEquivalent): Deleted.
2413         * rendering/style/StyleRareNonInheritedData.h:
2414         * rendering/style/StyleSelfAlignmentData.h: Added.
2415         (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
2416         (WebCore::StyleSelfAlignmentData::setPosition):
2417         (WebCore::StyleSelfAlignmentData::setPositionType):
2418         (WebCore::StyleSelfAlignmentData::setOverflow):
2419         (WebCore::StyleSelfAlignmentData::position):
2420         (WebCore::StyleSelfAlignmentData::positionType):
2421         (WebCore::StyleSelfAlignmentData::overflow):
2422         (WebCore::StyleSelfAlignmentData::operator==):
2423         (WebCore::StyleSelfAlignmentData::operator!=):
2424
2425 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2426
2427         NodeList has issues with Symbol and empty string
2428         https://bugs.webkit.org/show_bug.cgi?id=144310
2429
2430         Reviewed by Darin Adler.
2431
2432         Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
2433                fast/dom/dataset-name-getter-symbols.html
2434                fast/dom/named-items-with-empty-name.html
2435                fast/dom/named-items-with-symbol-name.html
2436                storage/domstorage/localstorage/named-items.html
2437
2438         Test different bindings objects with custom named setter
2439         and getter handlers. Ensure that they handle Symbol properties
2440         gracefully. Often times avoiding the string path.
2441
2442         * dom/StaticNodeList.cpp:
2443         (WebCore::StaticNodeList::namedItem):
2444         (WebCore::StaticElementList::namedItem):
2445         Better handle the empty string. It should not match an item.
2446
2447         * bindings/js/JSDOMBinding.h:
2448         (WebCore::propertyNameToString):
2449         In cases where we would use this, we should have handled
2450         Symbol properties.
2451
2452         (WebCore::propertyNameToAtomicString):
2453         For Symbols, use the unique string. This should result
2454         in no matches for a Symbol property.
2455
2456         * bindings/js/JSDOMStringMapCustom.cpp:
2457         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
2458         (WebCore::JSDOMStringMap::deleteProperty):
2459         (WebCore::JSDOMStringMap::putDelegate):
2460         * bindings/js/JSStorageCustom.cpp:
2461         (WebCore::JSStorage::canGetItemsForName):
2462         (WebCore::JSStorage::nameGetter):
2463         (WebCore::JSStorage::deleteProperty):
2464         (WebCore::JSStorage::putDelegate):
2465         * bindings/js/JSStyleSheetListCustom.cpp:
2466         (WebCore::JSStyleSheetList::canGetItemsForName):
2467         Treat Symbol properties as private properties. They just
2468         go directly through to the Object, and avoid the string
2469         getter/setter property path.
2470
2471 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
2472
2473         [Mac] Register with device picker whenever a page has <video>
2474         https://bugs.webkit.org/show_bug.cgi?id=144408
2475
2476         Reviewed by Jer Noble.
2477
2478         * Modules/mediasession/WebMediaSessionManager.cpp:
2479         (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
2480         to the target when it has not routes.
2481
2482         * html/HTMLMediaElement.cpp:
2483         (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the 
2484         element is <video> with a video track that does not block wireless playback.
2485
2486 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
2487
2488         [GTK] Add support for automatic hyphenation
2489         https://bugs.webkit.org/show_bug.cgi?id=44478
2490
2491         Reviewed by Carlos Garcia Campos.
2492
2493         No new tests. This patch unskips and updates results for existing hyphenation tests.
2494
2495         * PlatformGTK.cmake: Add the libhypen implementation to the source list.
2496         * platform/gtk/GtkUtilities.cpp:
2497         (WebCore::topLevelPath): Add this helper function taken from the test harness.
2498         (WebCore::getWebKitBuildDirectory): Ditto.
2499         * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
2500         * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
2501           so that it can still be shared.
2502         * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
2503         (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
2504         determine the locale that it covers.
2505         (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
2506         as ones in the JHBuild root for testing.
2507         (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
2508         in the JHBuild root.
2509         (WebCore::availableLocales): Getter for global hash of installed dictionaries.
2510         (WebCore::canHyphenate): Added libhyphen implementation.
2511         (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
2512         an open libhyphen dictionary. This is useful so that they can be stored in an MRU
2513         cache. This is a similar approach to the CoreFoundation implementation.
2514         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
2515         helper.
2516         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
2517         (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
2518         (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
2519         (WebCore::lastHyphenLocation): Added libhyphen implementation.
2520
2521 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
2522
2523         Unreviewed build fix.
2524
2525         * platform/graphics/mac/FontCacheMac.mm:
2526         (WebCore::fontWithFamily):
2527
2528 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
2529
2530         Some media tests assert after r183096
2531         https://bugs.webkit.org/show_bug.cgi?id=144098
2532
2533         Reviewed by Brent Fulgham.
2534
2535         Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
2536         after it has been unregistered. A media element unregisters itself when it is removed from the 
2537         document, but scripts can still run and modify state that results in a call to
2538         playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
2539         the various call sites.
2540
2541         * dom/Document.cpp:
2542         (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
2543         been unregistered.
2544         (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
2545
2546 2015-04-29  Zalan Bujtas  <zalan@apple.com>
2547
2548         Simple line layout: Web process spins endlessly below layoutSimpleLines.
2549         https://bugs.webkit.org/show_bug.cgi?id=144403
2550         rdar://problem/20742783
2551
2552         Reviewed by Antti Koivisto.
2553
2554         When a text fragment overlaps multiple renderes and it does not fit the current line,
2555         we revert the text fragment iterator position so that the overlapping content
2556         gets processed again for the next line.
2557         However, TextFragmentIterator::revertToFragment() was reverting too much and
2558         we started processing old content all over again -> infinite loop.
2559
2560         This patch ensures that text fragment iterator is reverted to the right position.
2561
2562         Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
2563
2564         * rendering/SimpleLineLayout.cpp:
2565         (WebCore::SimpleLineLayout::createLineRuns):
2566         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2567         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
2568         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
2569         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2570
2571 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
2572
2573         JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
2574         https://bugs.webkit.org/show_bug.cgi?id=144397
2575
2576         Reviewed by Andreas Kling.
2577
2578         If you override getCallData() and you want to be called a "function", then you need to use the
2579         new TypeOfShouldCallGetCallData flag.
2580
2581         * bindings/scripts/CodeGeneratorJS.pm:
2582         (GenerateHeader):
2583         * bridge/objc/objc_runtime.h:
2584         * bridge/runtime_method.h:
2585         * bridge/runtime_object.h:
2586
2587 2015-04-29  Commit Queue  <commit-queue@webkit.org>
2588
2589         Unreviewed, rolling out r183553 and r183561.
2590         https://bugs.webkit.org/show_bug.cgi?id=144406
2591
2592         broke the iOS build (Requested by thorton__ on #webkit).
2593
2594         Reverted changesets:
2595
2596         "Switch QuickLook soft-linking to use
2597         QuickLookSoftLink.{h,mm}"
2598         https://bugs.webkit.org/show_bug.cgi?id=144362
2599         http://trac.webkit.org/changeset/183553
2600
2601         "Unreviewed iOS build fix after r183553: fix declaration of
2602         QLPreviewScheme"
2603         http://trac.webkit.org/changeset/183561
2604
2605 2015-04-29  Antti Koivisto  <antti@apple.com>
2606
2607         ResourceLoadPriority should be enum class
2608         https://bugs.webkit.org/show_bug.cgi?id=144326
2609
2610         Reviewed by Darin Adler.
2611
2612         * html/HTMLLinkElement.cpp:
2613         (WebCore::HTMLLinkElement::process):
2614         * loader/LinkLoader.cpp:
2615         (WebCore::LinkLoader::loadLink):
2616         * loader/ResourceLoadScheduler.cpp:
2617         (WebCore::ResourceLoadScheduler::scheduleLoad):
2618         (WebCore::ResourceLoadScheduler::servePendingRequests):
2619         (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
2620         (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
2621         (WebCore::ResourceLoadScheduler::HostInformation::schedule):
2622         (WebCore::ResourceLoadScheduler::HostInformation::remove):
2623         (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
2624         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
2625         * loader/ResourceLoadScheduler.h:
2626         (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
2627
2628             Modernize ResourceLoadScheduler code a bit while switching to enum class.
2629
2630         * loader/cache/CachedResource.cpp:
2631         (WebCore::defaultPriorityForResourceType):
2632         * loader/cache/CachedResourceLoader.cpp:
2633         (WebCore::CachedResourceLoader::requestResource):
2634         * loader/icon/IconLoader.cpp:
2635         (WebCore::IconLoader::startLoading):
2636         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2637         (WebCore::WebCoreAVFResourceLoader::startLoading):
2638         * platform/network/ResourceLoadPriority.h:
2639         (WebCore::operator++):
2640         (WebCore::operator--):
2641         * platform/network/ResourceRequestBase.cpp:
2642         (WebCore::ResourceRequestBase::adopt):
2643         (WebCore::ResourceRequestBase::copyData):
2644         (WebCore::ResourceRequestBase::cachePolicy):
2645         (WebCore::ResourceRequestBase::priority):
2646         (WebCore::ResourceRequestBase::setPriority):
2647         * platform/network/ResourceRequestBase.h:
2648
2649             Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
2650             Use modern initialization syntax.
2651
2652         (WebCore::ResourceRequestBase::ResourceRequestBase):
2653         (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
2654         * platform/network/cf/ResourceRequestCFNet.cpp:
2655         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
2656         (WebCore::initializeHTTPConnectionSettingsOnStartup):
2657         * platform/network/cf/ResourceRequestCFNet.h:
2658         (WebCore::toResourceLoadPriority):
2659         (WebCore::toPlatformRequestPriority):
2660         * platform/network/soup/ResourceRequest.h:
2661         (WebCore::toSoupMessagePriority):
2662         * testing/Internals.cpp:
2663         (WebCore::stringToResourceLoadPriority):
2664
2665 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
2666
2667         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
2668         https://bugs.webkit.org/show_bug.cgi?id=132159
2669
2670         Reviewed by Darin Adler.
2671
2672         On platforms that support it, delegate font selection logic to the platform. Currently, this is
2673         only supported on Mac, using CTFontCreateForCSS().
2674
2675         This also changes the mechanism that enforces our font whitelist in our tests. We used to
2676         swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
2677         font family names instead.
2678
2679         Note that this patch is a work in progress, because it makes the following tests fail:
2680         fast/css/font-weight-1.html
2681         fast/forms/validation-message-appearance.html
2682         fast/forms/select/optgroup-rendering.html
2683
2684         No new tests, because there is no behavior change.
2685
2686         * platform/graphics/FontCache.h: Add a function to set the whitlist.
2687         * platform/graphics/mac/FontCacheMac.mm:
2688         (WebCore::fontWhitelist):
2689         (WebCore::FontCache::setFontWhitelist):
2690         (WebCore::toAppKitFontWeight):
2691         (WebCore::toCoreTextFontWeight):
2692         (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
2693         (WebCore::FontCache::createFontPlatformData):
2694         * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
2695
2696 2015-04-29  Jer Noble  <jer.noble@apple.com>
2697
2698         Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
2699
2700         * platform/ios/QuickLookSoftLink.mm:
2701
2702 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
2703
2704         [Mac] Use new device picker menu API
2705         https://bugs.webkit.org/show_bug.cgi?id=144392
2706
2707         Reviewed by Jer Noble.
2708
2709         * Modules/mediasession/WebMediaSessionManager.cpp:
2710         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
2711         * platform/graphics/MediaPlaybackTargetPicker.h:
2712
2713         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
2714         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2715         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):  m_deviceChangeTimer -> m_pendingActionTimer.
2716         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
2717         (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from 
2718         outputeDeviceAvailabilityChangedTimerFired.
2719         (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
2720         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
2721         available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
2722         (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
2723         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it 
2724         can now be called from showPlaybackTargetPicker.
2725         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
2726         pendingActionTimerFired.
2727
2728         * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
2729
2730 2015-04-29  Antti Koivisto  <antti@apple.com>
2731
2732         Main resource loaded via 304 response becomes empty if reloaded by user
2733         https://bugs.webkit.org/show_bug.cgi?id=144386
2734
2735         Reviewed by Darin Adler.
2736
2737         Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
2738         DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
2739         conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
2740         Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
2741         However DocumentLoader has no code to handle 304 so we would end up with an empty document.
2742
2743         Test: http/tests/cache/main-resource-304-reload.html
2744
2745         * loader/DocumentLoader.cpp:
2746         (WebCore::DocumentLoader::startLoadingMainResource):
2747
2748             Ensure DocumentLoader doesn't issue conditional requests.
2749
2750 2015-04-28  Jer Noble  <jer.noble@apple.com>
2751
2752         Replace HTMLMediaElement's seek timer with a task queue.
2753         https://bugs.webkit.org/show_bug.cgi?id=144353
2754
2755         Reviewed by Eric Carlson.
2756
2757         No change in functionality, so no new tests added.
2758
2759         Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
2760         make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
2761         GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
2762
2763         * CMakeLists.txt:
2764         * WebCore.vcxproj/WebCore.vcxproj:
2765         * WebCore.vcxproj/WebCore.vcxproj.filters:
2766         * WebCore.xcodeproj/project.pbxproj:
2767         * dom/GenericTaskQueue.cpp: Added.
2768         (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
2769         (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
2770         (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
2771         (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
2772         * dom/GenericTaskQueue.h: Added.
2773         (WebCore::GenericTaskQueue::hasPendingTasks):
2774         * html/HTMLMediaElement.cpp:
2775         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
2776         (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
2777         (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
2778         (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
2779         (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
2780         * html/HTMLMediaElement.h:
2781
2782 2015-04-28  David Kilzer  <ddkilzer@apple.com>
2783
2784         Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
2785         <http://webkit.org/b/144362>
2786
2787         Reviewed by Andy Estes.
2788
2789         This patch switches soft-linking of QuickLook.framework to
2790         QuickLookSoftLink.{h,mm} so that we stop exporting unintended
2791         symbols.
2792
2793         No new tests since no change in behavior.
2794
2795         * WebCore.xcodeproj/project.pbxproj:
2796         - Add QuickLookSoftLinking.{h,mm} to the project.
2797
2798         * platform/ios/QuickLookSoftLink.h: Added.
2799         * platform/ios/QuickLookSoftLink.mm: Added.
2800         * platform/mac/SoftLinking.h:
2801         (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
2802         (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
2803
2804         * platform/network/ios/QuickLook.h:
2805         - Remove unused declarations.
2806
2807         * platform/network/ios/QuickLook.mm:
2808         (WebCore::QLPreviewConverterClass): Deleted.
2809         (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
2810         (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
2811         (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
2812         - Remove SOFT_LINK macros and unused methods after switching to
2813           new QuickLookSoftLink.{h,mm}.
2814         (WebCore::QLPreviewGetSupportedMIMETypesSet):
2815         - Switch to use NeverDestroyed<>.
2816         (WebCore::registerQLPreviewConverterIfNeeded):
2817         (createQLPreviewProtocol):
2818         (WebCore::QLPreviewProtocol):
2819         (WebCore::QuickLookHandle::QuickLookHandle):
2820         (WebCore::QuickLookHandle::create):
2821         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
2822         - Simplify code when using QuickLookSoftLink.h.
2823
2824         * platform/network/ios/WebCoreURLResponseIOS.mm:
2825         - Include QuickLookSoftLink.h header.
2826
2827 2015-04-29  Darin Adler  <darin@apple.com>
2828
2829         [ES6] Implement Unicode code point escapes
2830         https://bugs.webkit.org/show_bug.cgi?id=144377
2831
2832         Reviewed by Antti Koivisto.
2833
2834         Test: js/unicode-escape-sequences.html
2835
2836         * css/CSSParser.cpp:
2837         (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
2838         out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
2839         writing out 0xFFFD.
2840
2841         * html/parser/HTMLEntityParser.cpp:
2842         (WebCore::isAlphaNumeric): Deleted.
2843         (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
2844         U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
2845         because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
2846         but maye it's something we want to do in the future.
2847         (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
2848         of a the function in this file that does the same thing less efficiently.
2849
2850         * html/parser/InputStreamPreprocessor.h:
2851         (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
2852         replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
2853
2854         * xml/parser/CharacterReferenceParserInlines.h:
2855         (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
2856         defining our own local highestValidCharacter constant.
2857
2858 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
2859
2860         [CMake] [GTK] Organize and clean up unused CMake variables
2861         https://bugs.webkit.org/show_bug.cgi?id=144364
2862
2863         Reviewed by Gyuyoung Kim.
2864
2865         * PlatformGTK.cmake: Add variables specific to this project.
2866
2867 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2868
2869         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
2870         https://bugs.webkit.org/show_bug.cgi?id=144388
2871
2872         Reviewed by Brady Eidson.
2873
2874         There used to be a method in ContextMenuItem to check if share
2875         menu item was supported or not, but since r182573, there's a
2876         method to get the share menu item. If the returned menu item is
2877         null, it's not added to the menu, but we are not returning a null
2878         ContextMenu item even though we don't support share menu item.
2879
2880         * platform/gtk/ContextMenuItemGtk.cpp:
2881         (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
2882
2883 2015-04-29  Zan Dobersek  <zdobersek@igalia.com>
2884
2885         Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
2886         https://bugs.webkit.org/show_bug.cgi?id=144232
2887
2888         Reviewed by Darin Adler.
2889
2890         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2891         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): 
2892         Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
2893
2894 2015-04-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2895
2896         Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
2897         https://bugs.webkit.org/show_bug.cgi?id=140261
2898
2899         Reviewed by Darin Adler.
2900
2901         We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
2902         because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
2903
2904         * rendering/RenderView.cpp:
2905         (WebCore::isValidObjectForNewSelection):
2906         (WebCore::RenderView::clearSubtreeSelection):
2907         (WebCore::RenderView::applySubtreeSelection):
2908
2909 2015-04-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2910
2911         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
2912         https://bugs.webkit.org/show_bug.cgi?id=143711
2913
2914         Reviewed by Darin Adler.
2915
2916         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
2917         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
2918         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
2919
2920         Test: http/tests/appcache/simple-video-sync.html
2921
2922         * html/HTMLMediaElement.cpp:
2923         (WebCore::HTMLMediaElement::parseAttribute):
2924         * loader/DocumentThreadableLoader.cpp:
2925         (WebCore::DocumentThreadableLoader::loadRequest):
2926         * loader/FrameLoader.cpp:
2927         (WebCore::FrameLoader::loadResourceSynchronously):
2928         * loader/FrameLoader.h:
2929         * loader/appcache/ApplicationCacheHost.cpp:
2930         (WebCore::ApplicationCacheHost::maybeLoadResource):
2931         (WebCore::ApplicationCacheHost::createFileURL):
2932         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
2933         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
2934         * loader/appcache/ApplicationCacheHost.h:
2935         * xml/XSLTProcessorLibxslt.cpp:
2936         (WebCore::docLoaderFunc):
2937         * xml/parser/XMLDocumentParserLibxml2.cpp:
2938         (WebCore::openFunc):
2939
2940 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2941
2942         Purge PassRefPtr from createSVGPathSegFoo factory functions
2943         https://bugs.webkit.org/show_bug.cgi?id=144374
2944
2945         Reviewed by Darin Adler.
2946
2947         Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
2948         those factory functions can't return null. Additionally let's remove unnecessary
2949         #include<PassRefPtr.h> there.
2950
2951         No new tests, no behavior changes.
2952
2953         * svg/SVGColor.cpp:
2954         (WebCore::SVGColor::cloneForCSSOM):
2955         * svg/SVGColor.h:
2956         * svg/SVGGlyphMap.h:
2957         (WebCore::GlyphMapNode::create):
2958         * svg/SVGPaint.cpp:
2959         (WebCore::SVGPaint::cloneForCSSOM):
2960         * svg/SVGPaint.h:
2961         * svg/SVGPathElement.cpp:
2962         (WebCore::SVGPathElement::createSVGPathSegClosePath):
2963         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
2964         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
2965         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
2966         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
2967         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
2968         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
2969         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
2970         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
2971         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
2972         (WebCore::SVGPathElement::createSVGPathSegArcRel):
2973         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
2974         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
2975         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
2976         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
2977         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
2978         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
2979         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
2980         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
2981         * svg/SVGPathElement.h:
2982         * svg/SVGPathSegArcAbs.h:
2983         (WebCore::SVGPathSegArcAbs::create):
2984         * svg/SVGPathSegArcRel.h:
2985         (WebCore::SVGPathSegArcRel::create):
2986         * svg/SVGPathSegClosePath.h:
2987         (WebCore::SVGPathSegClosePath::create):
2988         * svg/SVGPathSegCurvetoCubicAbs.h:
2989         (WebCore::SVGPathSegCurvetoCubicAbs::create):
2990         * svg/SVGPathSegCurvetoCubicRel.h:
2991         (WebCore::SVGPathSegCurvetoCubicRel::create):
2992         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
2993         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
2994         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
2995         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
2996         * svg/SVGPathSegCurvetoQuadraticAbs.h:
2997         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
2998         * svg/SVGPathSegCurvetoQuadraticRel.h:
2999         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
3000         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
3001         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
3002         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
3003         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
3004         * svg/SVGPathSegLinetoAbs.h:
3005         (WebCore::SVGPathSegLinetoAbs::create):
3006         * svg/SVGPathSegLinetoHorizontalAbs.h:
3007         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
3008         * svg/SVGPathSegLinetoHorizontalRel.h:
3009         (WebCore::SVGPathSegLinetoHorizontalRel::create):
3010         * svg/SVGPathSegLinetoRel.h:
3011         (WebCore::SVGPathSegLinetoRel::create):
3012         * svg/SVGPathSegLinetoVerticalAbs.h:
3013         (WebCore::SVGPathSegLinetoVerticalAbs::create):
3014         * svg/SVGPathSegLinetoVerticalRel.h:
3015         (WebCore::SVGPathSegLinetoVerticalRel::create):
3016         * svg/SVGPathSegMovetoAbs.h:
3017         (WebCore::SVGPathSegMovetoAbs::create):
3018         * svg/SVGPathSegMovetoRel.h:
3019         (WebCore::SVGPathSegMovetoRel::create):
3020         * svg/SVGViewSpec.h:
3021         (WebCore::SVGViewSpec::create):
3022         * svg/animation/SMILTimeContainer.h:
3023         (WebCore::SMILTimeContainer::create):
3024         * svg/animation/SVGSMILElement.cpp:
3025         (WebCore::ConditionEventListener::create):
3026         * svg/graphics/SVGImage.h:
3027         * svg/graphics/SVGImageForContainer.h:
3028         * svg/graphics/filters/SVGFilter.cpp:
3029         (WebCore::SVGFilter::create):
3030         * svg/graphics/filters/SVGFilter.h:
3031
3032 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
3033
3034         Make a non-static version of FrameView::yPositionForRootContentLayer()
3035         https://bugs.webkit.org/show_bug.cgi?id=144375
3036
3037         Reviewed by Andy Estes.
3038
3039         There were two calls to the static FrameView::yPositionForRootContentLayer()
3040         which passed in all the arguments for the same FrameView. Make a member
3041         function for convenience.
3042
3043         * page/FrameView.cpp:
3044         (WebCore::FrameView::yPositionForRootContentLayer):
3045         * page/FrameView.h:
3046         * rendering/RenderLayerCompositor.cpp:
3047         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3048
3049 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
3050
3051         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
3052         https://bugs.webkit.org/show_bug.cgi?id=143001
3053
3054         Reviewed by Gyuyoung Kim.
3055
3056         TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
3057         So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
3058
3059         In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
3060         where other coordinated graphics files are located.
3061
3062         * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
3063         * PlatformEfl.cmake:
3064         * PlatformGTK.cmake:
3065         * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
3066         * WebCore.vcxproj/WebCore.vcxproj.filters:
3067         * loader/EmptyClients.h:
3068         * page/Chrome.cpp:
3069         * page/Chrome.h:
3070         * page/ChromeClient.h:
3071         * page/Frame.cpp:
3072         (WebCore::Frame::createView):
3073         * page/FrameView.cpp:
3074         (WebCore::FrameView::requestScrollPositionUpdate):
3075         * page/FrameView.h:
3076         * page/Page.cpp:
3077         (WebCore::Page::setPageScaleFactor):
3078         * platform/HostWindow.h:
3079         * platform/ScrollView.cpp:
3080         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
3081         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
3082         (WebCore::ScrollView::visibleContentRectInternal):
3083         (WebCore::ScrollView::scrollTo):
3084         * platform/ScrollView.h:
3085         * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
3086         * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
3087         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
3088         * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
3089         * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
3090         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
3091
3092 2015-04-28  Brent Fulgham  <bfulgham@apple.com>
3093
3094         REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
3095         https://bugs.webkit.org/show_bug.cgi?id=144366
3096         <rdar://problem/20533513>
3097
3098         Reviewed by Dean Jackson.
3099
3100         * rendering/RenderBlockFlow.cpp:
3101         (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
3102         before attempting to dereference it. 
3103
3104 2015-04-28  Andreas Kling  <akling@apple.com>
3105
3106         Simplify DOM wrapper destruction, don't deref() in finalizers.
3107         <https://webkit.org/b/144183>
3108
3109         Reviewed by Darin Adler.
3110
3111         DOM JS bindings had two mechanisms to call deref() on the WebCore object,
3112         once through a weak finalizer, and once through the JSCell's regular destructor.
3113
3114         That was once believed to be an optimization, but these days the finalizer will
3115         run just moments before the destructor anyway, all in the same call stack.
3116         And more importantly, the finalizer is not guaranteed to run, for instance in the
3117         case where a Weak is assigned to after going dead, but before the WeakBlock
3118         has been swept by the incremental sweeper.
3119
3120         Simplify this by just removing the deref() from the generated finalizers.
3121         This makes it easier to reason about DOM wrapper destruction, and eliminates
3122         the awkward time window  where a DOM wrapper could have a null impl().
3123
3124         We could spend more time on figuring out a way to have finalizers manage the
3125         destruction of these wrappers, but that would require fundamental changes to
3126         our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
3127         destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
3128         However the risk:reward ratio does not seem justified at this point in time.
3129
3130         * bindings/scripts/CodeGeneratorJS.pm:
3131         (GenerateHeader):
3132         (GenerateImplementation):
3133         * bindings/js/JSCSSValueCustom.cpp:
3134         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3135         (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
3136         (WebCore::JSTestActiveDOMObjectOwner::finalize):
3137         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3138         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3139         (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
3140         (WebCore::JSTestCustomNamedGetterOwner::finalize):
3141         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3142         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3143         (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
3144         (WebCore::JSTestEventConstructorOwner::finalize):
3145         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3146         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3147         (WebCore::JSTestEventTarget::~JSTestEventTarget):
3148         (WebCore::JSTestEventTargetOwner::finalize):
3149         * bindings/scripts/test/JS/JSTestEventTarget.h:
3150         * bindings/scripts/test/JS/JSTestException.cpp:
3151         (WebCore::JSTestException::~JSTestException):
3152         (WebCore::JSTestExceptionOwner::finalize):
3153         * bindings/scripts/test/JS/JSTestException.h:
3154         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3155         (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
3156         (WebCore::JSTestGenerateIsReachableOwner::finalize):
3157         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3158         * bindings/scripts/test/JS/JSTestInterface.cpp:
3159         (WebCore::JSTestInterface::~JSTestInterface):
3160         (WebCore::JSTestInterfaceOwner::finalize):
3161         * bindings/scripts/test/JS/JSTestInterface.h:
3162         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3163         (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
3164         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
3165         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3166         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3167         (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
3168         (WebCore::JSTestNamedConstructorOwner::finalize):
3169         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3170         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3171         (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
3172         (WebCore::JSTestNondeterministicOwner::finalize):
3173         * bindings/scripts/test/JS/JSTestNondeterministic.h:
3174         * bindings/scripts/test/JS/JSTestObj.cpp:
3175         (WebCore::JSTestObj::~JSTestObj):
3176         (WebCore::JSTestObjOwner::finalize):
3177         * bindings/scripts/test/JS/JSTestObj.h:
3178         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3179         (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
3180         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
3181         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3182         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3183         (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
3184         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
3185         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3186         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3187         (WebCore::JSTestTypedefs::~JSTestTypedefs):
3188         (WebCore::JSTestTypedefsOwner::finalize):
3189         * bindings/scripts/test/JS/JSTestTypedefs.h:
3190         * bindings/scripts/test/JS/JSattribute.cpp:
3191         (WebCore::JSattribute::~JSattribute):
3192         (WebCore::JSattributeOwner::finalize):
3193         * bindings/scripts/test/JS/JSattribute.h:
3194         * bindings/scripts/test/JS/JSreadonly.cpp:
3195         (WebCore::JSreadonly::~JSreadonly):
3196         (WebCore::JSreadonlyOwner::finalize):
3197         * bindings/scripts/test/JS/JSreadonly.h:
3198
3199 2015-04-28  Alex Christensen  <achristensen@webkit.org>
3200
3201         Build WinCairo without cygwin.
3202         https://bugs.webkit.org/show_bug.cgi?id=144365
3203
3204         Reviewed by Myles Maxfield.
3205
3206         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
3207         Pass the CC executable to build-generated-files.pl like r182164.
3208         * WebCore.vcxproj/build-generated-files.pl:
3209         Default to 8 CPUs unless otherwise specified.
3210
3211 2015-04-28  Sam Weinig  <sam@webkit.org>
3212
3213         [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
3214         https://bugs.webkit.org/show_bug.cgi?id=144363
3215
3216         Reviewed by Alex Christensen.
3217
3218         This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
3219
3220         * contentextensions/CombinedURLFilters.cpp:
3221         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
3222         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
3223         * contentextensions/CombinedURLFilters.h:
3224         Replace function that creates a Vector of all the NFAs with one that allows incremental processing
3225         as they are created.
3226
3227         * contentextensions/ContentExtensionCompiler.cpp:
3228         (WebCore::ContentExtensions::addUniversalActionsToDFA):
3229         Extract code to add universal actions into a helper, since we need to call it in two places now.
3230
3231         (WebCore::ContentExtensions::compileRuleList):
3232         Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
3233         of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
3234         ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
3235         placed on the first DFA.
3236
3237 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
3238
3239         [TextIndicator] Yellow highlight takes too long to fade out on scroll
3240         https://bugs.webkit.org/show_bug.cgi?id=144358
3241         <rdar://problem/19451011>
3242
3243         Reviewed by Beth Dakin.
3244
3245         * page/TextIndicator.h:
3246         Add Lifetime and DismissalAnimation enums.
3247
3248         (WebCore::TextIndicator::contentImageWithHighlight):
3249         (WebCore::TextIndicator::contentImage):
3250         Fix style.
3251
3252         * page/mac/TextIndicatorWindow.h:
3253         * page/mac/TextIndicatorWindow.mm:
3254         (WebCore::TextIndicatorWindow::TextIndicatorWindow):
3255         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
3256         (WebCore::TextIndicatorWindow::clearTextIndicator):
3257         (WebCore::TextIndicatorWindow::setTextIndicator):
3258         (WebCore::TextIndicatorWindow::closeWindow):
3259         (WebCore::TextIndicatorWindow::startFadeOut):
3260         Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
3261         This is just about temporary-lifetime TextIndicators, like the ones
3262         you get when the find-in-page UI is hidden but you hit Cmd-G.
3263
3264         Add clearTextIndicator, which takes a DismissalAnimation, providing
3265         clients an opportunity to avoid the normal fade-out animation, if it
3266         was going to happen.
3267
3268 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
3269
3270         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
3271         https://bugs.webkit.org/show_bug.cgi?id=144304
3272
3273         Reviewed by Geoffrey Garen.
3274
3275         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
3276
3277         * Configurations/FeatureDefines.xcconfig:
3278
3279 2015-04-28  Commit Queue  <commit-queue@webkit.org>
3280
3281         Unreviewed, rolling out r183514.
3282         https://bugs.webkit.org/show_bug.cgi?id=144359
3283
3284         It broke cloop test bots (Requested by mcatanzaro on #webkit).
3285
3286         Reverted changeset:
3287
3288         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
3289         https://bugs.webkit.org/show_bug.cgi?id=144304
3290         http://trac.webkit.org/changeset/183514
3291
3292 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
3293
3294         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
3295         https://bugs.webkit.org/show_bug.cgi?id=144304
3296
3297         Reviewed by Geoffrey Garen.
3298
3299         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
3300
3301         * Configurations/FeatureDefines.xcconfig:
3302
3303 2015-04-28  Zalan Bujtas  <zalan@apple.com>
3304
3305         Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
3306         https://bugs.webkit.org/show_bug.cgi?id=144351
3307
3308         Reviewed by Simon Fraser.
3309
3310         This patch ensures that CG context is properly restored after painting dashed/dotted lines.
3311
3312         Test: fast/forms/checkbox-painting-with-hr.html
3313
3314         * platform/graphics/cg/GraphicsContextCG.cpp:
3315         (WebCore::GraphicsContext::drawLine):
3316
3317 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
3318
3319         Provide contentsToView() and viewToContents() functions on ScrollView, and use them
3320         https://bugs.webkit.org/show_bug.cgi?id=144357
3321
3322         Reviewed by Tim Horton.
3323
3324         Too much code was consulting topContentInset() and headerHeight() directly. Replace
3325         with calls to new contentsToView() and viewToContents() functions, which wrap the
3326         exisiting documentScrollOffsetRelativeToViewOrigin().
3327         
3328         Use the new functions in FrameView and ScrollView coordinate mapping functions.
3329         
3330         No behavior change.
3331
3332         * page/FrameView.cpp:
3333         (WebCore::FrameView::convertFromRendererToContainingView):
3334         (WebCore::FrameView::convertFromContainingViewToRenderer):
3335         * platform/ScrollView.cpp:
3336         (WebCore::ScrollView::viewToContents):
3337         (WebCore::ScrollView::contentsToView):
3338         (WebCore::ScrollView::rootViewToContents):
3339         (WebCore::ScrollView::contentsToRootView):
3340         (WebCore::ScrollView::rootViewToTotalContents):
3341         (WebCore::ScrollView::windowToContents):
3342         (WebCore::ScrollView::contentsToWindow):
3343         * platform/ScrollView.h:
3344
3345 2015-04-28  Eric Carlson  <eric.carlson@apple.com>
3346
3347         [Mac] Simplify code to support media engines which do not support target playback
3348         https://bugs.webkit.org/show_bug.cgi?id=144332
3349
3350         Reviewed by Jer Noble.
3351
3352         * Modules/mediasession/WebMediaSessionManager.cpp:
3353         (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
3354         callback, let them decide if it is significant or not.
3355
3356         * html/HTMLMediaElement.cpp:
3357         (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
3358         (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
3359         (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
3360         (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
3361         (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
3362         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
3363         (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
3364         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
3365         (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
3366         event is dispatched when the current target is wireless but the media engine does not support
3367         wireless playback, tell the media engine not to play to the target.
3368         * html/HTMLMediaElement.h:
3369         * html/HTMLMediaElement.idl:
3370
3371         * html/HTMLMediaSession.cpp:
3372         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
3373         (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
3374         * html/HTMLMediaSession.h:
3375
3376         * platform/graphics/MediaPlayer.cpp:
3377         (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
3378         * platform/graphics/MediaPlayer.h:
3379         * platform/graphics/MediaPlayerPrivate.h:
3380
3381         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3382         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
3383         to explicitly manage the lifetime of the temporary object.
3384         (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
3385         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3386
3387         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3388         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
3389         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
3390         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
3391
3392         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3393         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3394         (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
3395         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
3396         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): De