Unreviewed Windows build fix after r183031.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Unreviewed Windows build fix after r183031.
4
5         * platform/graphics/OpenGLShims.cpp:
6         (WebCore::lookupOpenGLFunctionAddress):
7         Windows needs an explicit cast converting LChar* to const char*.
8         Also, add a FIXME comment for sketchy behavior.
9
10 2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>
11
12         Cleanup some StringBuilder use
13         https://bugs.webkit.org/show_bug.cgi?id=143550
14
15         Reviewed by Darin Adler.
16
17         * Modules/plugins/YouTubePluginReplacement.cpp:
18         (WebCore::YouTubePluginReplacement::youTubeURL):
19         * css/CSSAnimationTriggerScrollValue.cpp:
20         (WebCore::CSSAnimationTriggerScrollValue::customCSSText):
21         * css/CSSCanvasValue.cpp:
22         (WebCore::CSSCanvasValue::customCSSText):
23         * html/HTMLCanvasElement.cpp:
24         (WebCore::HTMLCanvasElement::createImageBuffer):
25         * page/CaptionUserPreferencesMediaAF.cpp:
26         (WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS):
27         (WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS):
28         (WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor):
29         (WebCore::CaptionUserPreferencesMediaAF::colorPropertyCSS):
30         (WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
31         (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
32         * page/EventSource.cpp:
33         (WebCore::EventSource::didReceiveResponse):
34         * page/PageSerializer.cpp:
35         (WebCore::PageSerializer::serializeCSSStyleSheet):
36         * platform/graphics/OpenGLShims.cpp:
37         (WebCore::lookupOpenGLFunctionAddress):
38         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
39         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
40         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
41         (WebCore::generateHashedName):
42         * platform/text/DateTimeFormat.cpp:
43         (WebCore::DateTimeFormat::quoteAndAppendLiteral):
44         * rendering/RenderLayerCompositor.cpp:
45         (WebCore::RenderLayerCompositor::logLayerInfo):
46         * rendering/RenderTreeAsText.cpp:
47         (WebCore::writeRenderRegionList):
48         * testing/MicroTaskTest.cpp:
49         (WebCore::MicroTaskTest::run):
50         * testing/MockContentFilterSettings.cpp:
51         (WebCore::MockContentFilterSettings::unblockRequestURL):
52
53 2015-04-20  Said Abou-Hallawa  <sabouhallawa@apple.com>
54
55         SVGFitToViewBox::viewBoxToViewTransform() has to count for zero physical width and height before calling SVGPreserveAspectRatio::getCTM()
56         https://bugs.webkit.org/show_bug.cgi?id=143903
57
58         Reviewed by Daniel Bates.
59
60         Ensure that the SVG viewBoxToView transformation is always invertible.
61         CG path drawing functions crash if the context is transformed to non-
62         invertible matrix.
63
64         Tests: svg/css/crash-path-zero-height-viewbox.svg
65                svg/css/crash-path-zero-width-viewbox.svg
66
67         * svg/SVGFitToViewBox.cpp:
68         (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
69         Do not call SVGPreserveAspectRatio::getCTM() if the physical width or the
70         physical height is zero.
71
72         * svg/SVGPreserveAspectRatio.cpp:
73         (WebCore::SVGPreserveAspectRatio::getCTM):
74         Ensure that we are not dividing by zero in this function.
75
76 2015-04-20  Chris Dumez  <cdumez@apple.com>
77
78         CSSParser::parseValue() copies the m_parsedProperties vector at addParsedProperties()
79         https://bugs.webkit.org/show_bug.cgi?id=143925
80
81         Reviewed by Simon Fraser.
82
83         Update MutableStyleProperties::addParsedProperties() to use
84         CSSParser::ParsedPropertyVector type (i.e. Vector<CSSProperty, 256>)
85         instead of Vector<CSSProperty> so that the properties vector is no
86         longer copied unnecessarily to convert one type to the other.
87
88         * css/CSSParser.h:
89         * css/StyleProperties.cpp:
90         (WebCore::MutableStyleProperties::addParsedProperties):
91         * css/StyleProperties.h:
92
93 2015-04-20  Beth Dakin  <bdakin@apple.com>
94
95         Should remove mouseForceClick and mouseForceCancelled from DOM force events
96         https://bugs.webkit.org/show_bug.cgi?id=143904
97         -and corresponding-
98         rdar://problem/20578842
99
100         Reviewed by Dan Bernstein.
101
102         After more thought and discussion, we decided to remove mouseForceClick and 
103         mouseForceCancelled from DOM force events. mouseForceClick is confusing and 
104         redundant. mouseForceCancelled is confusing as it is currently implemented, and 
105         all of its functionality can be filled by exisiting events such as mouseup, 
106         mouseout, etc.
107
108         * dom/Document.cpp:
109         (WebCore::Document::addListenerTypeIfNeeded):
110         * dom/Document.h:
111         * dom/Document.idl:
112         * dom/Element.cpp:
113         (WebCore::Element::dispatchMouseForceWillBegin):
114         (WebCore::Element::dispatchMouseForceClick): Deleted.
115         (WebCore::Element::dispatchMouseForceCancelled): Deleted.
116         * dom/Element.h:
117         * dom/Element.idl:
118         * dom/EventNames.h:
119         * html/HTMLAttributeNames.in:
120         * html/HTMLBodyElement.cpp:
121         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
122         * html/HTMLBodyElement.idl:
123         * html/HTMLElement.cpp:
124         (WebCore::HTMLElement::createEventHandlerNameMap):
125         * page/DOMWindow.idl:
126
127 2015-04-20  Simon Fraser  <simon.fraser@apple.com>
128
129         Setting inline style to the same value it already has triggers a style recalc
130         https://bugs.webkit.org/show_bug.cgi?id=143922
131
132         Reviewed by Antti Koivisto.
133
134         MutableStyleProperties::setProperty() was taking the result of CSSParser::parseValue()
135         to mean "parsing changed the style", but it actually just means "parsing succeeded".
136         Add a new out param, piped through various parser functions, to indicate whether
137         parsing actually changed style, and instead return that from setProperty().
138
139         Add internals.startTrackingStyleRecalcs() and internals.styleRecalcCount() so
140         we can write tests for style recalc.
141
142         Test: fast/css/set-inline-style-recalc.html
143
144         * WebCore.xcodeproj/project.pbxproj: Let Xcode have it's way.
145         * css/CSSParser.cpp:
146         (WebCore::parseColorValue):
147         (WebCore::parseSimpleLengthValue):
148         (WebCore::parseKeywordValue):
149         (WebCore::parseTranslateTransformValue):
150         (WebCore::CSSParser::parseFontFaceValue):
151         (WebCore::CSSParser::parseValue):
152         * css/CSSParser.h:
153         * css/CSSProperty.h:
154         (WebCore::StylePropertyMetadata::operator==):
155         (WebCore::CSSProperty::operator==):
156         * css/DOMWindowCSS.cpp:
157         (WebCore::DOMWindowCSS::supports):
158         * css/StyleProperties.cpp:
159         (WebCore::MutableStyleProperties::setProperty):
160         (WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
161         (WebCore::MutableStyleProperties::addParsedProperties):
162         (WebCore::MutableStyleProperties::addParsedProperty):
163         * css/StyleProperties.h:
164         * css/WebKitCSSMatrix.cpp:
165         (WebCore::WebKitCSSMatrix::setMatrixValue):
166         * dom/Document.cpp:
167         (WebCore::Document::recalcStyle):
168         (WebCore::Document::startTrackingStyleRecalcs):
169         (WebCore::Document::styleRecalcCount):
170         * dom/Document.h:
171         * html/canvas/CanvasRenderingContext2D.cpp:
172         (WebCore::CanvasRenderingContext2D::setFont):
173         * testing/Internals.cpp:
174         (WebCore::Internals::startTrackingStyleRecalcs):
175         (WebCore::Internals::styleRecalcCount):
176         * testing/Internals.h:
177         * testing/Internals.idl:
178
179 2015-04-20  Brady Eidson  <beidson@apple.com>
180
181         Crash in StyleResolver::invalidateMatchedPropertiesCache() when using content extensions.
182         <rdar://problem/20554405> and https://bugs.webkit.org/show_bug.cgi?id=143892
183
184         Reviewed by Chris Dumez.
185
186         Test: http/tests/contentextensions/style-resolver-changed-reentrancy.html
187
188         * contentextensions/ContentExtensionsBackend.cpp:
189         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
190
191         * dom/DocumentStyleSheetCollection.cpp:
192         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
193         (WebCore::DocumentStyleSheetCollection::addContentExtensionUserSheet): Call styleResolverChanged on a delay.
194         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet): Ditto.
195         (WebCore::DocumentStyleSheetCollection::styleResolverChangedTimerFired):
196         * dom/DocumentStyleSheetCollection.h:
197
198 2015-04-20  Per Arne Vollan  <peavo@outlook.com>
199
200         Favicons are not always loaded.
201         https://bugs.webkit.org/show_bug.cgi?id=143880
202
203         Reviewed by Darin Adler.
204
205         If the favicon link element(s) in the document does not have a mime type,
206         the favicon is loaded from the domain root (/favicon.ico). If no favicon
207         exists at this location, the favicon loading will fail. This can be solved
208         by not demanding that the link element has a mime type.
209
210         Test: fast/dom/icon-url-without-mimetype.html
211
212         * loader/icon/IconController.cpp:
213         (WebCore::iconFromLinkElements): Return the chosen icon URL instead of a vector of URLs.
214         (WebCore::IconController::url):
215         (WebCore::iconsFromLinkElements): Deleted.
216
217 2015-04-20  Martin Robinson  <mrobinson@igalia.com>
218
219         [CMake] Include ICU unconditionally on the source lists
220         https://bugs.webkit.org/show_bug.cgi?id=143900
221
222         Reviewed by Darin Adler.
223
224         No new tests. This is just a build file change.
225
226         * CMakeLists.txt: Integrate ICU source files, includes, and libraries into the main
227         sections. They are shared by all platforms.
228         * PlatformGTK.cmake: Eliminate build rules that are duplicated from the main CMakeLists.txt.
229
230 2015-04-20  Chris Fleizach  <cfleizach@apple.com>
231
232         AX: iOS: Text input field ignores value of read-only and aria-readonly attributes
233         https://bugs.webkit.org/show_bug.cgi?id=143946
234
235         Reviewed by Mario Sanchez Prada.
236
237         Expose an existing method for determining whether the value can be set to the iOS accessibility platform.
238
239         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
240         (-[WebAccessibilityObjectWrapper accessibilityCanSetValue]):
241
242 2015-04-20  Andreas Kling  <akling@apple.com>
243
244         Merge TreeShared into Node.
245         <https://webkit.org/b/143942>
246
247         Reviewed by Darin Adler.
248
249         Node was the only remaining user of TreeShared, so just fold the class into Node.
250
251         * WebCore.vcxproj/WebCore.vcxproj:
252         * WebCore.vcxproj/WebCore.vcxproj.filters:
253         * WebCore.xcodeproj/project.pbxproj:
254         * dom/Node.cpp:
255         (WebCore::Node::Node):
256         (WebCore::Node::~Node):
257         * dom/Node.h:
258         (WebCore::Node::ref):
259         (WebCore::Node::deref):
260         (WebCore::Node::hasOneRef):
261         (WebCore::Node::refCount):
262         (WebCore::adopted):
263         (WebCore::Node::hasTreeSharedParent): Deleted.
264         * platform/TreeShared.h: Removed.
265
266 2015-04-19  Benjamin Poulain  <benjamin@webkit.org>
267
268         Improve the feature.json files
269
270         * features.json:
271
272 2015-04-18  Jon Lee  <jonlee@apple.com>
273
274         [Mac] Time elapsed should be right-aligned
275         https://bugs.webkit.org/show_bug.cgi?id=143927
276
277         Reviewed by Eric Carlson.
278
279         Current time is left-aligned, which is visually jarring when going from < 1 hour to > 1 hour.
280
281         * Modules/mediacontrols/mediaControlsApple.css:
282         (audio::-webkit-media-controls-current-time-display): Set justify-content to flex-end.
283         (audio::-webkit-media-controls-time-remaining-display): Explicitly set justify-content to flex-start.
284
285 2015-04-18  Simon Fraser  <simon.fraser@apple.com>
286
287         REGRESSION (r181656): Animated tiled layers are missing content
288         https://bugs.webkit.org/show_bug.cgi?id=143911
289         rdar://problem/20596328
290
291         Reviewed by Darin Adler.
292
293         After r181656, all requestAnimationFrame was falling back to timers, and not
294         using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
295         fumble. As a result, GraphicsLayerUpdater (which updates tiled layers during
296         animations) was failing to do any updates.
297         
298         Replace this confusing Optional<> code with simpler code that just forces the
299         clients to make a DisplayRefreshMonitor if they can, first asking
300         ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().
301         
302         Make lots of things into references, and use C++11 initialization in some places.
303         
304         Add Internals API to allow a test to get the number of layer flushes that have
305         occurred.
306         
307         * dom/ScriptedAnimationController.cpp:
308         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
309         (WebCore::ScriptedAnimationController::windowScreenDidChange):
310         (WebCore::ScriptedAnimationController::scheduleAnimation):
311         (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
312         * dom/ScriptedAnimationController.h:
313         * page/ChromeClient.h:
314         * platform/graphics/DisplayRefreshMonitor.cpp:
315         (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor):
316         (WebCore::DisplayRefreshMonitor::create):
317         (WebCore::DisplayRefreshMonitor::addClient):
318         (WebCore::DisplayRefreshMonitor::removeClient):
319         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
320         * platform/graphics/DisplayRefreshMonitor.h:
321         * platform/graphics/DisplayRefreshMonitorClient.cpp:
322         (WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
323         * platform/graphics/DisplayRefreshMonitorClient.h:
324         * platform/graphics/DisplayRefreshMonitorManager.cpp:
325         (WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
326         (WebCore::DisplayRefreshMonitorManager::registerClient):
327         (WebCore::DisplayRefreshMonitorManager::unregisterClient):
328         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
329         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
330         (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
331         * platform/graphics/DisplayRefreshMonitorManager.h:
332         * platform/graphics/GraphicsLayerUpdater.cpp:
333         (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
334         (WebCore::GraphicsLayerUpdater::scheduleUpdate):
335         (WebCore::GraphicsLayerUpdater::screenDidChange):
336         (WebCore::GraphicsLayerUpdater::displayRefreshFired):
337         (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
338         * platform/graphics/GraphicsLayerUpdater.h:
339         * rendering/RenderLayerCompositor.cpp:
340         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
341         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
342         (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
343         (WebCore::RenderLayerCompositor::flushLayersSoon):
344         (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
345         (WebCore::RenderLayerCompositor::startTrackingLayerFlushes):
346         (WebCore::RenderLayerCompositor::layerFlushCount):
347         * rendering/RenderLayerCompositor.h:
348         * testing/Internals.cpp:
349         (WebCore::Internals::startTrackingLayerFlushes):
350         (WebCore::Internals::layerFlushCount):
351         * testing/Internals.h:
352         * testing/Internals.idl:
353
354 2015-04-17  Bem Jones-Bey  <bjonesbe@adobe.com>
355
356         Large values for line-height cause integer overflow in RenderStyle::computedLineHeight
357         https://bugs.webkit.org/show_bug.cgi?id=143863
358
359         Reviewed by Rob Buis.
360
361         When we compute huge values for line-height through percentage or CSS
362         calc, we'll overflow the integer and later on
363         ShapeOutsideInfo::computeDeltasForContainingBlockLine will ASSERT
364         because it expects non-negative line height.  So for the computed
365         line-height, clamp to an integer range to avoid overflow. Note that
366         the code path for percentages here is safe because LayoutUnit clamps
367         to an int on conversion.
368
369         This is based on a Blink patch by Rob Buis.
370
371         Test: fast/shapes/shape-outside-floats/shape-outside-negative-line-height-crash.html
372
373         * rendering/style/RenderStyle.cpp:
374         (WebCore::RenderStyle::computedLineHeight): Clamp line-height to an
375             int to avoid overflow.
376
377 2015-04-17  Beth Dakin  <bdakin@apple.com>
378
379         Force mouse events should go through normal mouse event handling code paths
380         https://bugs.webkit.org/show_bug.cgi?id=143749
381         -and corresponding-
382         rdar://problem/20472895
383
384         Reviewed by Dean Jackson.
385
386         This patch moves all of the code to dispatch mouseforcedown, mouseforceup, and 
387         mouseforcechanged into normal mouse event dispatching code. This patch leaves 
388         behind the cancel and click events because we plan to remove those, and it also 
389         leaves mouseforcewillbegin because that is necessarily a very different event more 
390         tied to the NSImmediateActionGestureRecognizer than these other events which are 
391         tied to NSResponder’s pressureChangeWithEvent.
392
393         New helper functions.
394         * dom/Document.cpp:
395         (WebCore::Document::hasListenerTypeForEventType):
396         * dom/Document.h:
397         * dom/Element.cpp:
398         (WebCore::isForceEvent):
399
400         Move the code to ensure the force events have listeners in order to fire to 
401         dispatchMouseEvent, and delete the old implementations.
402         (WebCore::Element::dispatchMouseEvent):
403         (WebCore::Element::dispatchMouseForceChanged): Deleted.
404         (WebCore::Element::dispatchMouseForceDown): Deleted.
405         (WebCore::Element::dispatchMouseForceUp): Deleted.
406         * dom/Element.h:
407
408         Perform a hit test and pipe the events through dispatchMouseEvent(). 
409         * page/EventHandler.cpp:
410         (WebCore::EventHandler::handleMouseForceEvent):
411         * page/EventHandler.h:
412
413         New types for the new events.
414         * platform/PlatformEvent.h:
415
416         Forward to EventHandler. 
417         * replay/UserInputBridge.cpp:
418         (WebCore::UserInputBridge::handleMouseForceEvent):
419         * replay/UserInputBridge.h:
420
421 2015-04-17  Zalan Bujtas  <zalan@apple.com>
422
423         RenderTableCell::computeCollapsed*Border() should check if the cell is still attached to the render tree.
424         https://bugs.webkit.org/show_bug.cgi?id=143887
425         rdar://problem/20568989
426
427         Reviewed by Simon Fraser.
428
429         Detached table cell has no access to its parent table. This is a speculative fix to
430         avoid dereferencing the invalid table pointer.
431
432         * rendering/RenderTableCell.cpp:
433         (WebCore::RenderTableCell::computeCollapsedStartBorder):
434         (WebCore::RenderTableCell::computeCollapsedEndBorder):
435         (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
436         (WebCore::RenderTableCell::computeCollapsedAfterBorder):
437
438 2015-04-16  Roger Fong  <roger_fong@apple.com>
439
440         Update fullscreen button visibility on fullscreen change.
441         https://bugs.webkit.org/show_bug.cgi?id=143861.
442         <rdar://problem/20143218>
443
444         Reviewed by Eric Carlson.
445
446         * Modules/mediacontrols/mediaControlsApple.js:
447         (Controller): There is no need for hasVisualMedia to be a class variable.
448         (Controller.prototype.handleReadyStateChange):
449         (Controller.prototype.handleFullscreenChange):
450         (Controller.prototype.updateFullscreenButtons):
451
452 2015-04-17  Daniel Bates  <dabates@apple.com>
453
454         REGRESSION: SVG does not support link dragging
455         https://bugs.webkit.org/show_bug.cgi?id=141597
456
457         Reviewed by Darin Adler.
458
459         Fixes an issue where a SVG hyperlink cannot be dragged. We should support
460         dragging an SVG A element just as we support dragging an HTML A element.
461
462         Test: fast/events/drag-and-drop-link.html
463
464         * page/DragController.cpp: Removed explicit include of header Element.h as it will
465         be ultimately included by HTMLAnchorElement.h, among other headers.
466         (WebCore::isDraggableLink): Added. Extracted code from HitTestResult::isLiveLink().
467         (WebCore::DragController::draggableElement): Call WebCore::isDraggableLink() to
468         determine whether a element is a hyperlink that can be dragged.
469         * page/DragController.h:
470         * page/EventHandler.cpp:
471         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Write code in terms of
472          WebCore::isDraggableLink().
473         * rendering/HitTestResult.cpp:
474         (WebCore::HitTestResult::isLiveLink): Deleted.
475         * rendering/HitTestResult.h:
476
477 2015-04-17  Commit Queue  <commit-queue@webkit.org>
478
479         Unreviewed, rolling out r182912 and r182920.
480         https://bugs.webkit.org/show_bug.cgi?id=143881
481
482         Build breakage in some configurations (Requested by ap on
483         #webkit).
484
485         Reverted changesets:
486
487         "Force mouse events should go through normal mouse event
488         handling code paths"
489         https://bugs.webkit.org/show_bug.cgi?id=143749
490         http://trac.webkit.org/changeset/182912
491
492         http://trac.webkit.org/changeset/182920
493
494 2015-04-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
495
496         Fix review comments for https://bugs.webkit.org/show_bug.cgi?id=143590
497         following http://trac.webkit.org/changeset/182876.
498
499         Reviewed by Daniel Bates.
500
501         * ChangeLog:
502         Fixed typo.
503         
504         * style/StyleFontSizeFunctions.cpp:
505         (WebCore::Style::computedFontSizeFromSpecifiedSize):
506         Fixed a typo in an enum definition and changed the name of an argument.
507
508 2015-04-17  Philippe Normand  <pnormand@igalia.com>
509
510         [GStreamer] Silent WebAudio buffers support
511         https://bugs.webkit.org/show_bug.cgi?id=143869
512
513         Reviewed by Carlos Garcia Campos.
514
515         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
516         (webKitWebAudioSrcLoop): Set gap flag on silent buffers. The audio
517         sink can then drop them and avoid un-necessary buffer processing.
518
519 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
520
521         [SOUP] Redirect to non HTTP destination is broken
522         https://bugs.webkit.org/show_bug.cgi?id=143866
523
524         Reviewed by Sergio Villar Senin.
525
526         This is because we are passing true unconditionally as
527         isHTTPFamilyRequest parameter of
528         createSoupRequestAndMessageForHandle in continueAfterWillSendRequest.
529         We don't actually need to pass isHTTPFamilyRequest parameter to
530         createSoupRequestAndMessageForHandle, since it can simply check
531         that from the given request.
532
533         Covered by unit tets and also cache/disk-cache/disk-cache-redirect-to-data.html.
534
535         * platform/network/soup/ResourceHandleSoup.cpp:
536         (WebCore::continueAfterWillSendRequest):
537         (WebCore::createSoupRequestAndMessageForHandle):
538         (WebCore::ResourceHandle::start):
539
540 2015-04-16  Alex Christensen  <achristensen@webkit.org>
541
542         Use less memory when compiling content extensions
543         https://bugs.webkit.org/show_bug.cgi?id=143857
544
545         Reviewed by Benjamin Poulain.
546
547         When compiling a content extension, we convert the rule list into several intermediate forms:
548
549         1) A String.
550         2) A JSValue from JSONParse in loadEncodedRules.
551         3) A Vector of ContentExtensionRules.
552         4) A CombinedURLFilters object representing the pieces of the regular expressions from the triggers.
553         5) A Vector of NFAs.
554         6) A DFA for each NFA.
555         7) A Vector of DFABytecode.
556         
557         Each one of these contains all the information contained in the content extension,
558         so we do not need to keep them all in memory at the same time like we are doing now.
559         When we are done with one, we can free that memory to greatly reduce the maximum memory usage while compiling.
560         The next step will be to reduce the copies of the original JSON String and to generate NFAs one at a time.
561
562         * contentextensions/CombinedURLFilters.cpp:
563         (WebCore::ContentExtensions::CombinedURLFilters::clear):
564         * contentextensions/CombinedURLFilters.h:
565         * contentextensions/ContentExtensionCompiler.cpp:
566         (WebCore::ContentExtensions::compileRuleList):
567         Clear structures when finished using them.
568
569 2015-04-16  Brady Eidson  <beidson@apple.com>
570
571         Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
572         https://bugs.webkit.org/show_bug.cgi?id=143834
573
574         Reviewed by Anders Carlsson.
575
576         - Add moveFile() for a WK2 call site to use.
577         - Remove renameFile() as it is now dead code.
578
579         * platform/FileSystem.h:
580
581         * platform/gtk/FileSystemGtk.cpp:
582         (WebCore::renameFile): Deleted.
583
584         * platform/mac/FileSystemMac.mm:
585         (WebCore::moveFile):
586
587         * platform/posix/FileSystemPOSIX.cpp:
588         (WebCore::renameFile): Deleted.
589
590         * platform/win/FileSystemWin.cpp:
591         (WebCore::renameFile): Deleted.
592
593 2015-04-16  Roger Fong  <roger_fong@apple.com>
594
595         Media element time displays shouldn't wrap.
596         https://bugs.webkit.org/show_bug.cgi?id=143854.
597         <rdar://problem/20284766>
598
599         Reviewed by Brent Fulgham.
600
601         * Modules/mediacontrols/mediaControlsApple.css:
602         (::-webkit-media-controls): Don't wrap any text.
603         (audio::-webkit-media-controls-time-remaining-display): Also increase remaining time display width by 1.
604         (audio::-webkit-media-controls-time-remaining-display.five-digit-time): Ditto.
605         (audio::-webkit-media-controls-time-remaining-display.six-digit-time): Ditto.
606
607 2015-04-16  Chris Dumez  <cdumez@apple.com>
608
609         Add assertions to make sure ActiveDOMObject::suspend() / resume() / stop() overrides don't fire events
610         https://bugs.webkit.org/show_bug.cgi?id=143850
611
612         Reviewed by Alexey Proskuryakov.
613
614         Add assertions to make sure ActiveDOMObject::suspend() / resume() / stop()
615         overrides don't fire events as this is not allowed. This would cause
616         arbitrary JS execution which would be very dangerous in these stages.
617
618         Firing JS events from these functions is a common source of crashes.
619
620         * Modules/websockets/WebSocket.cpp:
621         (WebCore::WebSocket::suspend):
622         (WebCore::WebSocket::resume):
623         * dom/ScriptExecutionContext.cpp:
624         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
625         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
626         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
627         * xml/XMLHttpRequest.cpp:
628         (WebCore::XMLHttpRequest::suspend):
629         (WebCore::XMLHttpRequest::resume):
630         (WebCore::XMLHttpRequest::stop):
631
632 2015-04-16  Brady Eidson  <beidson@apple.com>
633
634         Media element can manipulate DOM during Document destruction.
635         rdar://problem/20553898 and https://bugs.webkit.org/show_bug.cgi?id=143780
636
637         Reviewed by Jer Noble.
638
639         * html/HTMLMediaElement.cpp:
640         (WebCore::HTMLMediaElement::configureMediaControls): Bail if the element has no active document.
641
642 2015-04-13  Jer Noble  <jer.noble@apple.com>
643
644         [iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
645         https://bugs.webkit.org/show_bug.cgi?id=143680
646
647         Reviewed by Simon Fraser.
648
649         Add getters for the video's fullscreen layer, and be more tolerant about the order in which setVideoElement() and 
650         setWebVideoFullscreenInterface are called.
651
652         * html/HTMLMediaElement.h:
653         (WebCore::HTMLMediaElement::videoFullscreenLayer): Added simple getter.
654         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
655         * platform/ios/WebVideoFullscreenModelVideoElement.h:
656         (WebCore::WebVideoFullscreenModelVideoElement::videoElement): Added simple getter.
657         (WebCore::WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface): Deleted. Moved to .mm file.
658         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
659         (WebVideoFullscreenModelVideoElement::WebVideoFullscreenModelVideoElement): Initialize ivars in the .h file.
660         (WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface): Call those methods skipped in setVideoElement()
661             if m_videoFullscreenInterface had not yet been set.
662         (WebVideoFullscreenModelVideoElement::setVideoElement): Null-check m_videoFullscreenInterface.
663
664 2015-04-16  Beth Dakin  <bdakin@apple.com>
665
666         Force mouse events should go through normal mouse event handling code paths
667         https://bugs.webkit.org/show_bug.cgi?id=143749
668         -and corresponding-
669         rdar://problem/20472895
670
671         Reviewed by Dean Jackson.
672
673         This patch moves all of the code to dispatch mouseforcedown, mouseforceup, and 
674         mouseforcechanged into normal mouse event dispatching code. This patch leaves 
675         behind the cancel and click events because we plan to remove those, and it also 
676         leaves mouseforcewillbegin because that is necessarily a very different event more 
677         tied to the NSImmediateActionGestureRecognizer than these other events which are 
678         tied to NSResponder’s pressureChangeWithEvent.
679
680         New helper functions.
681         * dom/Document.cpp:
682         (WebCore::Document::hasListenerTypeForEventType):
683         * dom/Document.h:
684         * dom/Element.cpp:
685         (WebCore::isForceEvent):
686
687         Move the code to ensure the force events have listeners in order to fire to 
688         dispatchMouseEvent, and delete the old implementations.
689         (WebCore::Element::dispatchMouseEvent):
690         (WebCore::Element::dispatchMouseForceChanged): Deleted.
691         (WebCore::Element::dispatchMouseForceDown): Deleted.
692         (WebCore::Element::dispatchMouseForceUp): Deleted.
693         * dom/Element.h:
694
695         Perform a hit test and pipe the events through dispatchMouseEvent(). 
696         * page/EventHandler.cpp:
697         (WebCore::EventHandler::handleMouseForceEvent):
698         * page/EventHandler.h:
699
700         New types for the new events.
701         * platform/PlatformEvent.h:
702
703         Forward to EventHandler. 
704         * replay/UserInputBridge.cpp:
705         (WebCore::UserInputBridge::handleMouseForceEvent):
706         * replay/UserInputBridge.h:
707
708 2015-04-16  Tim Horton  <timothy_horton@apple.com>
709
710         Sites with both width=device-width and height=device-height load zoomed out
711         https://bugs.webkit.org/show_bug.cgi?id=143795
712         <rdar://problem/20369671>
713
714         Reviewed by Ben Poulain.
715
716         * page/ViewportConfiguration.cpp:
717         (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
718         Some sites specify both width=device-width and height=device-height, and
719         then lay out to device width but with a large amount of vertically scrollable content
720         (so, height=device-height was a lie).
721
722         In all other cases where we use device-width and device-height, we prefer
723         width=device-width over height=device-height, but in the code to ignore scaling constraints,
724         the two paths were completely separate. On sites that specify both, this
725         resulted in us attempting to zoom out to fit the entire height of the very tall page,
726         which isn't at all what we wanted. So, ignore height=device-height if a width is specified.
727
728 2015-04-16  Chris Dumez  <cdumez@apple.com>
729
730         Regression(r182517): WebSocket::suspend() causes error event to be fired
731         https://bugs.webkit.org/show_bug.cgi?id=143806
732         <rdar://problem/20559812>
733
734         Reviewed by Alexey Proskuryakov.
735
736         WebSocket::suspend() causes an error event to be fired after r182517.
737         This is not allowed as firing the event could trigger arbitrary JS
738         execution, which is no longer allowed at this point.
739
740         This patch delays the error event firing until after
741         WebSocket::resume() is called, similarly to what we already do for
742         the close event.
743
744         Also add assertions in WebSocket::suspend() / WebSocket::resume()
745         that will be hit if JS events are fired from within these functions.
746         The pre-existing closed-when-entering-page-cache.html test is hitting
747         one of these assertions without the fix above.
748
749         Tests:
750           - http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html
751           - http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html
752
753         * Modules/websockets/WebSocket.cpp:
754         (WebCore::WebSocket::suspend):
755         (WebCore::WebSocket::resume):
756         (WebCore::WebSocket::resumeTimerFired):
757         (WebCore::WebSocket::stop):
758         (WebCore::WebSocket::didReceiveMessageError):
759         (WebCore::WebSocket::didClose):
760         (WebCore::WebSocket::dispatchOrQueueEvent):
761         * Modules/websockets/WebSocket.h:
762
763 2015-04-15  Roger Fong  <roger_fong@apple.com>
764
765         Adjustments to button graphics for media controls.
766         https://bugs.webkit.org/show_bug.cgi?id=143797.
767         <rdar://problem/20083708>
768
769         Reviewed by Dean Jackson.
770
771         These changes are visual in nature and mainly affect the buttons.
772         I've gotten rid of the text-shadow for all the buttons,
773         used plus-lighter blending mode and changed the button opacity to reflect the specs,
774         and made all the buttons turn opaque white when active.
775
776         * Modules/mediacontrols/mediaControlsApple.css:
777         (audio::-webkit-media-controls-panel button):
778         (audio::-webkit-media-controls-rewind-button):
779         (audio::-webkit-media-controls-play-button):
780         (audio::-webkit-media-controls-play-button.paused):
781         (video::-webkit-media-controls-volume-max-button):
782         (video::-webkit-media-controls-volume-slider):
783         (video::-webkit-media-controls-volume-min-button):
784         (audio::-webkit-media-controls-wireless-playback-picker-button):
785         (audio::-webkit-media-controls-toggle-closed-captions-button):
786         (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
787         (audio::-webkit-media-controls-fullscreen-button):
788         (audio::-webkit-media-controls-fullscreen-button.exit):
789         (audio::-webkit-media-controls-status-display):
790         (audio::-webkit-media-controls-timeline):
791         (audio::-webkit-media-controls-time-remaining-display):
792         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
793         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
794         (video:-webkit-full-screen::-webkit-media-controls-play-button):
795         (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
796         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
797         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
798         (video::-webkit-media-controls-volume-max-button:active):
799         (video::-webkit-media-controls-volume-min-button:active):
800         (audio::-webkit-media-controls-toggle-closed-captions-button:active):
801         (audio::-webkit-media-controls-rewind-button:active):
802         (audio::-webkit-media-controls-play-button:active):
803         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button:active):
804         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button:active):
805         (video:-webkit-full-screen::-webkit-media-controls-play-button:active):
806         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button:active):
807         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button:active):
808         (audio::-webkit-media-controls-fullscreen-button:active):
809
810         Using the pseudo id itself here currently does not work, which is why we rely on the button.* selector for these.
811         (video:-webkit-full-screen::-webkit-media-controls-panel button.paused:active):
812         (audio::-webkit-media-controls-panel button.paused:active):
813         (audio::-webkit-media-controls-panel button.exit:active):
814  
815         Draw volume slider knob as opaque white when active.
816         Adjust colors of timeline and volume sliders now that we are using plus-lighter blending.
817         * Modules/mediacontrols/mediaControlsApple.js:
818         (Controller):
819         (Controller.prototype.createControls):
820         (Controller.prototype.handleVolumeSliderMouseDown):
821         (Controller.prototype.handleVolumeSliderMouseUp):
822         (Controller.prototype.drawTimelineBackground):
823         (Controller.prototype.drawVolumeBackground):
824
825 2015-04-15  Simon Fraser  <simon.fraser@apple.com>
826
827         Pull emoji-position adjustment code into its own function
828         https://bugs.webkit.org/show_bug.cgi?id=143592
829
830         Reviewed by Myles C. Maxfield.
831
832         First step to cleaning up FontCascade::drawGlyphs(). Pull iOS-only code related to
833         emoji positioning into its own function.
834
835         * platform/graphics/cocoa/FontCascadeCocoa.mm:
836         (WebCore::pointAdjustedForEmoji):
837         (WebCore::FontCascade::drawGlyphs):
838
839 2015-04-16  Myles C. Maxfield  <mmaxfield@apple.com>
840
841         [iOS] Delete hardcoded font fallback tables
842         https://bugs.webkit.org/show_bug.cgi?id=143583
843
844         Reviewed by Darin Adler
845
846         Instead of hardcoding which font to use for a particular character, use
847         CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage().
848
849         Updated test expected results:
850             editing/selection/vertical-rl-rtl-extend-line-backward-br.html
851             editing/selection/vertical-rl-rtl-extend-line-backward-p.html
852             editing/selection/vertical-rl-rtl-extend-line-forward-br.html
853             editing/selection/vertical-rl-rtl-extend-line-forward-p.html
854             fast/text/international/danda-space.html
855             fast/text/international/thai-baht-space.html
856
857         * platform/graphics/ios/FontCacheIOS.mm:
858         (WebCore::FontCache::getSystemFontFallbackForCharacters):
859         (WebCore::FontCache::systemFallbackForCharacters):
860         * platform/spi/cocoa/CoreTextSPI.h:
861
862 2015-04-16  Per Arne Vollan  <peavo@outlook.com>
863
864         [WinCairo] Compile error when environment variable WEBKITLIBRARIESDIR is not defined.
865         https://bugs.webkit.org/show_bug.cgi?id=143828
866
867         Reviewed by Brent Fulgham.
868
869         Python throws an exception when calling os.environ['WEBKITLIBRARIESDIR'] and
870         WEBKITLIBRARIESDIR is not defined. WEBKITLIBRARIESDIR is obsolete, we can remove it.
871
872         * AVFoundationSupport.py:
873         (lookFor):
874
875 2015-04-16  Alexey Proskuryakov  <ap@apple.com>
876
877         Minor AudioContext cleanup
878         https://bugs.webkit.org/show_bug.cgi?id=143816
879
880         Reviewed by Jer Noble.
881
882         * Modules/webaudio/AudioContext.cpp:
883         (WebCore::AudioContext::~AudioContext):
884         (WebCore::AudioContext::lazyInitialize):
885         (WebCore::AudioContext::stop):
886         (WebCore::AudioContext::derefNode):
887         (WebCore::AudioContext::scheduleNodeDeletion):
888         (WebCore::AudioContext::deleteMarkedNodes):
889         (WebCore::AudioContext::stopDispatch): Deleted.
890         (WebCore::AudioContext::deleteMarkedNodesDispatch): Deleted.
891         * Modules/webaudio/AudioContext.h:
892
893         * Modules/webaudio/AudioNode.cpp: (WebCore::AudioNode::~AudioNode):
894
895 2015-04-16  Chris Dumez  <cdumez@apple.com>
896
897         Unreviewed attempt to fix Windows build after r182881.
898
899         Add missing header include.
900
901         * page/PageConsoleClient.h:
902
903 2015-04-16  Chris Dumez  <cdumez@apple.com>
904
905         Tests introduced in r182877 are flaky
906         https://bugs.webkit.org/show_bug.cgi?id=143784
907
908         Reviewed by Alexey Proskuryakov.
909
910         Tests introduced in r182877 are flaky as the line number sometimes
911         appears in the console messages. This patch updates the console
912         logging code so that no Document is provided when logging. Therefore,
913         no line number will ever be displayed. In this case, I don't think
914         having the line number is terribly useful anyway.
915
916         * css/StyleSheetContents.cpp:
917         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
918
919 2015-04-15  Simon Fraser  <simon.fraser@apple.com>
920
921         We should dump GraphicsLayer's anchorPoint z component
922         https://bugs.webkit.org/show_bug.cgi?id=143815
923
924         Reviewed by Tim Horton.
925
926         We didn't include the z component of a layer's anchor point when dumping.
927         Dump if it's non-zero (to avoid having to change lots of test output).
928         No test with non-zero z appears to dump layers.
929
930         * platform/graphics/GraphicsLayer.cpp:
931         (WebCore::GraphicsLayer::dumpProperties):
932         * rendering/style/RenderStyle.cpp:
933         (WebCore::requireTransformOrigin): Remove a FIXME which, on further consideration,
934         is wrong.
935
936 2015-04-15  Brent Fulgham  <bfulgham@apple.com>
937
938         [Mac] Disable "Save to Downloads" option for local files
939         https://bugs.webkit.org/show_bug.cgi?id=143794
940
941         Reviewed by Tim Horton.
942
943         Disable the Image and Media download options if the download
944         target is a local file. We can only download web resources;
945         anything else is actually a no-op.
946
947         * page/ContextMenuController.cpp:
948         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Disable
949         menu item if appropriate.
950
951 2015-04-15  Chris Dumez  <cdumez@apple.com>
952
953         Add a console message when a stylesheet is not parsed due to invalid MIME type
954         https://bugs.webkit.org/show_bug.cgi?id=143784
955
956         Reviewed by Joseph Pecoraro.
957
958         After r180020, we no longer have a quirks mode exception for CSS MIME
959         types. This means that we'll start rejecting stylesheets that were
960         previously accepted due to this quirk. In this case we log a console
961         message to help Web developers understand why their stylesheet is being
962         rejected.
963
964         * css/StyleRuleImport.cpp:
965         (WebCore::StyleRuleImport::setCSSStyleSheet):
966
967         * css/StyleSheetContents.cpp:
968         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
969         - Initialize hasValidMIMEType to true so that it ends up being false
970           only when canUseSheet(hasValidMIMEType) is called and we've determined
971           the MIME type is indeed invalid. Otherwise, hasValidMIMEType would
972           also be false when m_data is null or empty in
973           CachedCSSStyleSheet::sheetText() and we don't want to display the MIME
974           type error in this case.
975         - If hasValidMIMEType is false, display the console message and abort
976           early. We don't need to execute the rest of the function in this case
977           as sheetText is a null String and there is no point in trying to parse
978           it.
979         - Drop handling of !hasValidMIMEType && !hasSyntacticallyValidCSSHeader()
980           as this can no longer be reached. This handling no longer makes sense
981           after r180020 as sheetText() will now always return a null String if
982           the MIME type is invalid (as we no longer support the CSS MIME type
983           quirks mode).
984
985         * css/StyleSheetContents.h:
986         * html/HTMLLinkElement.cpp:
987         (WebCore::HTMLLinkElement::setCSSStyleSheet):
988
989 2015-04-15  Said Abou-Hallawa  <said@apple.com>
990
991         Minimum font size pref breaks SVG text very badly.
992         https://bugs.webkit.org/show_bug.cgi?id=143590.
993
994         Reviewed by Simon Fraser.
995
996         When enabling the minimum font size perf, the computed font size is set
997         to the minimum font size if the computed value is smaller than the minimum.
998         The bug happens because the SVG text element applies its scaling on the
999         computed value after applying the minimum font size rule. This means the
1000         final computed value for the font size will be the scaling of the minimum
1001         font size and not minimum font size itself. What we need is to postpone
1002         applying the minimum font size rules, till the SVG scaling is applied.
1003
1004         Tests: svg/text/font-small-enlarged-minimum-larger.svg
1005                svg/text/font-small-enlarged-minimum-smaller.svg
1006
1007         * rendering/svg/RenderSVGInlineText.cpp:
1008         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): Call
1009         computedFontSizeFromSpecifiedSizeForSVGInlineText() even if scalingFactor
1010         is 1. We need to make sure the minimum font size rules are applied. This
1011         function was assuming the mininum font size rule was applied when resolving
1012         the style. This is not true anymore for the SVG text.
1013
1014         * style/StyleFontSizeFunctions.cpp:
1015         (WebCore::Style::computedFontSizeFromSpecifiedSize): Do not apply the
1016         minimum size rules for the SVG element until it applies its scaling to
1017         the font size.
1018
1019 2015-04-15  Mark Lam  <mark.lam@apple.com>
1020
1021         Remove obsolete VMInspector debugging tool.
1022         https://bugs.webkit.org/show_bug.cgi?id=143798
1023
1024         Reviewed by Michael Saboff.
1025
1026         No new tests needed.  Just removing obsolete code.
1027
1028         * ForwardingHeaders/interpreter/VMInspector.h: Removed.
1029
1030 2015-04-15  Timothy Horton  <timothy_horton@apple.com>
1031
1032         Custom CSS cursors do not use -webkit-image-set on retina displays
1033         https://bugs.webkit.org/show_bug.cgi?id=120783
1034         <rdar://problem/14921432>
1035
1036         Reviewed by Beth Dakin.
1037         Patch by Evan Wallace <evan.exe@gmail.com>.
1038
1039         Scale NSCursor images correctly so custom CSS cursors work with
1040         -webkit-image-set on retina displays.
1041
1042         * WebCore.exp.in:
1043         * page/EventHandler.cpp:
1044         (WebCore::EventHandler::selectCursor):
1045         * platform/mac/CursorMac.mm:
1046         (WebCore::createCustomCursor):
1047         (WebCore::Cursor::ensurePlatformCursor):
1048
1049 2015-04-15  Alexey Proskuryakov  <ap@apple.com>
1050
1051         No thread safety when passing ThreadableLoaderOptions from a worker thread
1052         https://bugs.webkit.org/show_bug.cgi?id=143790
1053
1054         Reviewed by Geoffrey Garen.
1055
1056         * loader/ThreadableLoader.h:
1057         * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::isolatedCopy): Added.
1058
1059         * loader/WorkerThreadableLoader.cpp:
1060         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Don't just send
1061         a structure with strings to a different thread, that's bad.
1062
1063         * platform/CrossThreadCopier.h: I think that this is dead code, but for this bug,
1064         just removing a clearly wrong specialization.
1065
1066 2015-04-15  Alex Christensen  <achristensen@webkit.org>
1067
1068         Progress towards CMake on Mac.
1069         https://bugs.webkit.org/show_bug.cgi?id=143785
1070
1071         Reviewed by Csaba Osztrogonác.
1072
1073         * CMakeLists.txt:
1074         * PlatformMac.cmake:
1075
1076 2015-04-15  Daniel Bates  <dabates@apple.com>
1077
1078         Clean up: Have SVGTextLayoutEngine::beginTextPathLayout() take a reference to a
1079         RenderSVGTextPath instead of a pointer
1080         https://bugs.webkit.org/show_bug.cgi?id=143787
1081
1082         Reviewed by Andreas Kling.
1083
1084         SVGTextLayoutEngine::beginTextPathLayout() assumes that the passed RenderObject is a
1085         non-null pointer to a RenderSVGTextPath object. Instead we should have this function take a
1086         reference to a RenderSVGTextPath object to help callers catch bad usage and better document
1087         the expectation of a valid RenderSVGTextPath object.
1088
1089         * rendering/svg/SVGRootInlineBox.cpp:
1090         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): Downcast the renderer of the
1091         inline box to a RenderSVGTextPath object and pass it to SVGTextLayoutEngine::beginTextPathLayout().
1092         We ensured that this cast is safe earlier in this function.
1093         SVGTextLayoutEngine::beginTextPathLayout().
1094         * rendering/svg/SVGTextLayoutEngine.cpp:
1095         (WebCore::SVGTextLayoutEngine::beginTextPathLayout): Change type of first parameter from
1096         RenderObject* to RenderSVGTextPath. Remove ASSERT() that was checking for a non-null
1097         RenderObject pointer since we are passing the renderer by reference and a well-formed
1098         reference must refer to a valid object.
1099         * rendering/svg/SVGTextLayoutEngine.h: Substitute RenderSVGTextPath& for RenderObject*.
1100
1101 2015-04-13  Jer Noble  <jer.noble@apple.com>
1102
1103         [Fullscreen] ChromeClient::exitVideoFullscreen() should take a pointer to a HTMLVideoElement.
1104         https://bugs.webkit.org/show_bug.cgi?id=143674
1105
1106         Reviewed by Darin Adler.
1107
1108         * html/HTMLMediaElement.cpp:
1109         (WebCore::HTMLMediaElement::enterFullscreen): Pass a reference.
1110         (WebCore::HTMLMediaElement::exitFullscreen): exitVideoFullscreen() -> exitVideoFullscreenForVideoElement(...).
1111         * page/ChromeClient.h:
1112
1113 2015-04-14  Anders Carlsson  <andersca@apple.com>
1114
1115         Make creating send rights from shared memory more robust
1116         https://bugs.webkit.org/show_bug.cgi?id=143730
1117         rdar://problem/16595870
1118
1119         Reviewed by Darin Adler.
1120
1121         Add a bool conversion operator to MachSendRight and tidy up the default constructor.
1122
1123         * platform/cocoa/MachSendRight.h:
1124         (WebCore::MachSendRight::operator bool):
1125         (WebCore::MachSendRight::MachSendRight): Deleted.
1126
1127 2015-04-15  Eric Carlson  <eric.carlson@apple.com>
1128
1129         Generalize "isPlayingAudio" to include other media characteristics
1130         https://bugs.webkit.org/show_bug.cgi?id=143713
1131
1132         Reviewed by Jer Noble.
1133
1134         No new functionality.
1135
1136         * Modules/webaudio/AudioContext.cpp:
1137         (WebCore::AudioContext::stop): updateIsPlayingAudio -> updateIsPlayingMedia.
1138         (WebCore::AudioContext::isPlayingAudioDidChange): Ditto.
1139
1140         * dom/Document.cpp:
1141         (WebCore::Document::addAudioProducer): Ditto.
1142         (WebCore::Document::removeAudioProducer): Ditto.
1143         (WebCore::Document::updateIsPlayingMedia): Renamed.
1144         (WebCore::Document::updateIsPlayingAudio): Deleted.
1145         * dom/Document.h:
1146
1147         * html/HTMLMediaElement.cpp:
1148         (WebCore::HTMLMediaElement::setMuted): updateIsPlayingAudio -> updateIsPlayingMedia.
1149         (WebCore::HTMLMediaElement::setPlaying): Ditto.
1150
1151         * page/ChromeClient.h:
1152         * page/Page.cpp:
1153         (WebCore::Page::updateIsPlayingMedia): Renamed.
1154         (WebCore::Page::updateIsPlayingAudio): Deleted.
1155         * page/Page.h:
1156
1157 2015-04-15  Joonghun Park  <jh718.park@samsung.com>
1158
1159         Fix Debug build error 'comparison of unsigned expression >= 0 is always true [-Werror=type-limits]'
1160         https://bugs.webkit.org/show_bug.cgi?id=143751
1161
1162         Reviewed by Csaba Osztrogonác.
1163
1164         No new tests, no new behaviors.
1165
1166         * rendering/svg/SVGTextChunk.cpp:
1167         (WebCore::SVGTextChunk::SVGTextChunk):
1168
1169 2015-04-14  Zalan Bujtas  <zalan@apple.com>
1170
1171         Make inline continuation style change logic consistent.
1172         https://bugs.webkit.org/show_bug.cgi?id=143737
1173         rdar://problem/20486596
1174
1175         Reviewed by Simon Fraser.
1176
1177         Do not force RenderBlock type-casting on the first sibling of the continuation's container.
1178         The first sibling of the container of a continuation should be handled as the rest of the siblings.
1179
1180         Test: fast/inline/inline-with-column-span-and-remove-block-child-crash.html
1181
1182         * rendering/RenderInline.cpp:
1183         (WebCore::updateStyleOfAnonymousBlockContinuations):
1184         (WebCore::RenderInline::styleDidChange):
1185
1186 2015-04-14  Chris Dumez  <cdumez@apple.com>
1187
1188         Regression(r180020): Web Inspector crashes on pages that have a stylesheet with an invalid MIME type
1189         https://bugs.webkit.org/show_bug.cgi?id=143745
1190         <rdar://problem/20243916>
1191
1192         Reviewed by Joseph Pecoraro.
1193
1194         After r180020, we are stricter and no longer accept CSS resources that
1195         are not served with a CSS MIME type. Showing Web inspector on a page
1196         with such bad resource would crash because
1197         InspectorPageAgent::cachedResourceContent() would return true but
1198         the result String would be null. This null String would then later
1199         be passed to the Yarr interpreter and crash on a String::is8Bit()
1200         call.
1201
1202         cachedResourceContent() calls CachedCSSStyleSheet::sheetText(). Before
1203         r180020, it would return the text, even if the MIME type was incorrect.
1204         However, this is no longer the case and we now need to make sure that
1205         cachedResourceContent() returns false if sheetText() returns a null
1206         String.
1207
1208         Test: http/tests/inspector/css/bad-mime-type.html
1209
1210         * inspector/InspectorPageAgent.cpp:
1211         (WebCore::InspectorPageAgent::cachedResourceContent):
1212
1213 2015-04-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
1214
1215         textPath layout performance improvement.
1216         https://bugs.webkit.org/show_bug.cgi?id=141570.
1217
1218         Reviewed by Darin Adler.
1219
1220         The bottleneck of the text-on-path performance is the position and angle
1221         calculations for every single character. If the number of characters is
1222         'n' and the number of path elements is 'm', the total number of processing
1223         the path elements is O(2 x n x m). What makes it really worse is, for every
1224         curve we keep splitting the curve till the split curve is almost a straight
1225         line. The changes we need to do are:
1226         1. Merge the position and the angle traversals in one pass since they are
1227            returning info for the same length on the path. There is a degenerate
1228            case for the starting point when calculating the angle. The original
1229            code was solving this problem by passing an epsilon instead of zero but
1230            because traversing the path for position and angle are now merged, we
1231            will pass zero for the starting point as is. All we need is to move one
1232            step ahead without moving the position. We need the extra step forward
1233            to calculate the slope of the path at the starting point.
1234         2. We need to add a new mode to traversing a path. The new mode will take
1235            a vector of lengths and returns a vector of arrow vectors. Every arrow
1236            vector represents a position and an angle on the path at a certain length.
1237            This requires changing the SVGTextLayoutEngine to calculate the lengths
1238            of the characters on the curve first and then passing all of them to the
1239            path traversal function. Instead of traversing the path for every length,
1240            we are going to get the required point and angle from the vector of arrow
1241            vectors.
1242
1243         This patch is addressing the first fix only. The second one will require
1244         refactoring the SVGTextLayoutEngine so I am going to address it in a
1245         different patch.
1246
1247         * platform/graphics/Path.cpp:
1248         (WebCore::pathLengthApplierFunction): It is cleaner to move the function
1249         of this method to PathTraversalState::processPathElement().
1250         
1251         (WebCore::Path::length): Use new enum Action value and access methods.
1252         
1253         (WebCore::Path::traversalStateAtLength): New function which returns the
1254         traversalState at a certain length on a path.
1255         
1256         (WebCore::Path::pointAtLength):
1257         (WebCore::Path::normalAngleAtLength): Use traversalStateAtLength() to get
1258         the traversalState and from it return either the position or the angle.
1259         
1260         * platform/graphics/Path.h: Define traversalStateAtLength().
1261         
1262         * platform/graphics/PathTraversalState.cpp:
1263         (WebCore::distanceLine): Code clean up.
1264         
1265         (WebCore::curveLength): Make the setting of m_previous and m_current happens
1266         only in this function.
1267         
1268         (WebCore::PathTraversalState::PathTraversalState): Add an optional parameter
1269         for the desired length and move the initialization of the other members to
1270         the class definition.
1271         
1272         (WebCore::PathTraversalState::closeSubpath):
1273         (WebCore::PathTraversalState::moveTo):
1274         (WebCore::PathTraversalState::lineTo): Add the distance to the m_totalLength
1275         instead of returning it since this is what all the callers were doing.
1276         
1277         (WebCore::PathTraversalState::quadraticBezierTo):
1278         (WebCore::PathTraversalState::cubicBezierTo): Add the distance to the
1279         m_totalLength. Move the setting of m_previous and m_current to curveLength().
1280         Remove unused members m_control1 and m_control2.
1281
1282         (WebCore::PathTraversalState::processSegment): Deleted.        
1283         (WebCore::PathTraversalState::finalizeAppendPathElement): Create a new
1284         name for the function. Handle the case of the angle at the starting point
1285         where m_desiredLength is set to zero. The new flag m_isZeroVector will be
1286         set to notify the caller that the  next iteration will be the last one and
1287         it is only needed for the calculating the angle of a zero vector. m_current
1288         should not change by this last iteration.
1289         
1290         (WebCore::PathTraversalState::appendPathElement): This code is moved from
1291         pathLengthApplierFunction().
1292         
1293         (WebCore::PathTraversalState::processPathElement): This function is used
1294         by the class Path. It is a wrapper for appendPathElement(). If m_isZeroVector
1295         is set we append the new element to a copy for the PathTraversalState just
1296         to get the angle for the zero vector.
1297
1298         * platform/graphics/PathTraversalState.h: Change the enum values to not
1299         not include the class or the enum class. Make the data members private and
1300         expose the needed ones through access methods. Make all the internal methods
1301         to be private.
1302         
1303         (WebCore::PathTraversalState::processPathElement):  Another wrapper for
1304         appendPathElement() which is used by SVGPathTraversalStateBuilder.
1305         
1306         (WebCore::PathTraversalState::action):
1307         (WebCore::PathTraversalState::setAction):
1308         (WebCore::PathTraversalState::desiredLength):
1309         (WebCore::PathTraversalState::setDesiredLength):
1310         (WebCore::PathTraversalState::success):
1311         (WebCore::PathTraversalState::totalLength):
1312         (WebCore::PathTraversalState::current):
1313         (WebCore::PathTraversalState::normalAngle): New access methods which are now
1314         needed after making the data members private.
1315         
1316         * rendering/svg/SVGRootInlineBox.cpp:
1317         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): Make the casting
1318         of the renderer on the caller side.
1319         
1320         * rendering/svg/SVGTextChunk.cpp:
1321         (WebCore::SVGTextChunk::SVGTextChunk): The constructor should append the
1322         elements of m_boxes instead of making this from outside the class.
1323         
1324         (WebCore::SVGTextChunk::totalCharacters):
1325         (WebCore::SVGTextChunk::totalLength):
1326         (WebCore::SVGTextChunk::calculateLength): Deleted.
1327         Replace calculateLength() by totalCharacters() and totalLength() to make
1328         the interface cleaner.
1329         
1330         (WebCore::SVGTextChunk::totalAnchorShift):
1331         (WebCore::SVGTextChunk::calculateTextAnchorShift): Deleted.
1332         Rename the function name.
1333         
1334         (WebCore::SVGTextChunk::layout):
1335         (WebCore::SVGTextChunk::processTextLengthSpacingCorrection):
1336         (WebCore::SVGTextChunk::buildBoxTransformations):
1337         (WebCore::SVGTextChunk::boxSpacingAndGlyphsTransform):
1338         (WebCore::SVGTextChunk::processTextAnchorCorrection):
1339         Move the chunk layout code from SVGTextChunkBuilder::layoutTextChunks()
1340         to the SVGTextChunk::layout(). Move all the helper functions as well.
1341         
1342         * rendering/svg/SVGTextChunk.h:
1343         (WebCore::SVGTextChunk::hasTextAnchor):
1344         (WebCore::SVGTextChunk::boxes): Deleted.
1345         Add the new methods and change most of the public methods to be private.
1346         
1347         * rendering/svg/SVGTextChunkBuilder.cpp:
1348         (WebCore::SVGTextChunkBuilder::totalCharacters):
1349         (WebCore::SVGTextChunkBuilder::totalLength):
1350         (WebCore::SVGTextChunkBuilder::totalAnchorShift): This code is moved from
1351         SVGTextLayoutEngine. It scans the boxes stored in the SVGTextChunkBuilder
1352         and sums up the total values.
1353         
1354         (WebCore::SVGTextChunkBuilder::transformationForTextBox):
1355         (WebCore::SVGTextChunkBuilder::buildTextChunks):
1356         (WebCore::SVGTextChunkBuilder::layoutTextChunks): Code clean up.
1357         
1358         (WebCore::SVGTextChunkBuilder::addTextChunk): Deleted.
1359         (WebCore::SVGTextChunkBuilder::processTextChunk): Deleted.
1360         (WebCore::SVGTextChunkBuilder::processTextLengthSpacingCorrection): Deleted.
1361         (WebCore::SVGTextChunkBuilder::processTextAnchorCorrection): Deleted.
1362         (WebCore::SVGTextChunkBuilder::buildSpacingAndGlyphsTransform): Deleted.
1363         This code now lives in SVGTextChunk.
1364         
1365         * rendering/svg/SVGTextChunkBuilder.h: Add new methods for code which was
1366         moved from SVGTextLayoutEngine and remove methods for code which was removed
1367         to SVGTextChunk.
1368         
1369         * rendering/svg/SVGTextLayoutEngine.cpp:
1370         (WebCore::SVGTextLayoutEngine::beginTextPathLayout): Use the sum up methods
1371         from SVGTextChunkBuilder instead of looping through the chunks. Also get a
1372         clean order for defining variables and doing the calculations.
1373         
1374         (WebCore::SVGTextLayoutEngine::finalizeTransformMatrices): Code clean up.
1375         
1376         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): Do a single path
1377         traversal to get the position and the angle for a length on a path.
1378         
1379         * svg/SVGAnimateMotionElement.cpp:
1380         (WebCore::SVGAnimateMotionElement::buildTransformForProgress): Do a single
1381         path traversal to get the position and the angle at a length on a path.
1382         
1383         * svg/SVGPathTraversalStateBuilder.cpp:
1384         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
1385         (WebCore::SVGPathTraversalStateBuilder::moveTo):
1386         (WebCore::SVGPathTraversalStateBuilder::lineTo):
1387         (WebCore::SVGPathTraversalStateBuilder::curveToCubic):
1388         (WebCore::SVGPathTraversalStateBuilder::closePath):
1389         (WebCore::SVGPathTraversalStateBuilder::setDesiredLength):
1390         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
1391         (WebCore::SVGPathTraversalStateBuilder::totalLength):
1392         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
1393         (WebCore::SVGPathTraversalStateBuilder::incrementPathSegmentCount): Deleted.
1394         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex): Deleted.
1395         * svg/SVGPathTraversalStateBuilder.h:
1396         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
1397         Code clean up.
1398         
1399         * svg/SVGPathUtilities.cpp:
1400         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
1401         (WebCore::getTotalLengthOfSVGPathByteStream):
1402         (WebCore::getPointAtLengthOfSVGPathByteStream): Use new TraversalState::Action
1403         enum values.
1404
1405 2015-04-14  Simon Fraser  <simon.fraser@apple.com>
1406
1407         Re-enable custom dilation for antialiased fonts
1408         https://bugs.webkit.org/show_bug.cgi?id=143738
1409
1410         Reviewed by Tim Horton.
1411         
1412         Enabling custom dilation for antialised fonts broke layout tests, so re-land it,
1413         but disable in WebKitTestRunner and DumpRenderTree. The latter requires adding
1414         a private WebKit pref. This pref defaults to YES, enabling the feature by default
1415         in WK1 as we do for WK2.
1416
1417         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1418         (WebCore::dilationSizeForTextColor):
1419         (WebCore::FontCascade::drawGlyphs):
1420
1421 2015-04-14  Andy Estes  <aestes@apple.com>
1422
1423         [Content Filtering] Use ASSERT_WITH_SECURITY_IMPLICATION for verifying types from NEFilterSource
1424         https://bugs.webkit.org/show_bug.cgi?id=143742
1425
1426         Reviewed by David Kilzer.
1427
1428         * platform/cocoa/NetworkExtensionContentFilter.mm:
1429         (replacementDataFromDecisionInfo): ASSERT_WITH_SECURITY_IMPLICATION that decisionInfo is really a NSDictionary.
1430         (WebCore::NetworkExtensionContentFilter::handleDecision): ASSERT_WITH_SECURITY_IMPLICATION that replacementData is really a NSData.
1431
1432 2015-04-14  Brent Fulgham  <bfulgham@apple.com>
1433
1434         Correct layering violation in DumpRenderTree Build
1435         https://bugs.webkit.org/show_bug.cgi?id=143732
1436
1437         Reviewed by Simon Fraser.
1438
1439         * testing/js/WebCoreTestSupport.cpp:
1440         (WebCoreTestSupport::monitorWheelEvents): Added. Provides a wrapper around
1441         the internal WebCore objects needed to implement this function.
1442         (WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.
1443         * testing/js/WebCoreTestSupport.h:
1444
1445 2015-04-14  Brady Eidson  <beidson@apple.com>
1446
1447         Make sure media element loads hit content filter extensions.
1448         <rdar://problem/20014012> and https://bugs.webkit.org/show_bug.cgi?id=143731
1449
1450         Reviewed by Jer Noble.
1451
1452         Tests: http/tests/contentextensions/media-filtered.html
1453                http/tests/contentextensions/text-track-blocked.html
1454
1455         * html/HTMLMediaElement.cpp:
1456         (WebCore::HTMLMediaElement::parseAttribute): Skip loads that are filtered.
1457
1458 2015-04-14  Brian Weinstein  <bweinstein@apple.com>
1459
1460         Add SPI to clear HSTS hosts added since a date.
1461         https://bugs.webkit.org/show_bug.cgi?id=143726
1462         and
1463         rdar://problem/16664597
1464
1465         Declare _CFNetworkResetHSTSHostsSinceDate in CFNetworkSPI.h.
1466
1467         Reviewed by Anders Carlsson.
1468
1469         * platform/spi/cf/CFNetworkSPI.h:
1470
1471 2015-04-14  Roger Fong  <roger_fong@apple.com>
1472
1473         Unreviewed. Time numbers on media controls move as they update on OSX.
1474         <rdar://problem/20141790>.
1475
1476         * Modules/mediacontrols/mediaControlsApple.css:
1477         (audio::-webkit-media-controls-current-time-display):
1478         (audio::-webkit-media-controls-time-remaining-display):
1479         Don't bother justifying content to end. We size the box to fit the time displays exactly anyways.
1480
1481 2015-04-14  Roger Fong  <roger_fong@apple.com>
1482
1483         Insert volume control in correct place after exiting wireless play.
1484         https://bugs.webkit.org/show_bug.cgi?id=143721.
1485         <rdar://problem/20526106>
1486
1487         Reviewed by Darin Adler.
1488
1489         * Modules/mediacontrols/mediaControlsApple.js:
1490         (Controller.prototype.updateWirelessPlaybackStatus):
1491
1492 2015-04-14  Brady Eidson  <beidson@apple.com>
1493
1494         Media elements not in a page shouldn't load.
1495         https://bugs.webkit.org/show_bug.cgi?id=143720
1496
1497         Reviewed by Jer Noble.
1498
1499         No new tests (Theoretical problem noticed in code review).
1500
1501         * html/HTMLMediaElement.cpp:
1502         (WebCore::HTMLMediaElement::loadResource): Make sure the frame is in a page.
1503
1504 2015-04-14  Simon Fraser  <simon.fraser@apple.com>
1505
1506         [iOS] Clean up registration of layers with the ScrollingCoordinator
1507         https://bugs.webkit.org/show_bug.cgi?id=143725
1508
1509         Reviewed by Tim Horton.
1510
1511         Simplify a couple of bits of code related to the registration of layers with
1512         the ScrollingCoordinator in RenderLayerCompositor.
1513
1514         First, RenderLayerBacking was using ScrollingNodeTypes to choose which scrolling
1515         roles a layer has, which let to ambiguous code where we hardcoded a ScrollingNodeType
1516         with knowledge of what RenderLayerBacking did with it. Clean up by using LayerScrollCoordinationRole,
1517         which is moved to RenderLayer.h so that RenderLayerCompositor.h and RenderLayerBacking.h
1518         both see it.
1519
1520         Secondly, avoid having both detachFromScrollingCoordinator() and detachFromScrollingCoordinatorForRole()
1521         by passing in the bitmask of roles.
1522
1523         * page/FrameView.cpp:
1524         (WebCore::FrameView::scrollLayerID):
1525         * rendering/RenderLayer.h:
1526         * rendering/RenderLayerBacking.cpp:
1527         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1528         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1529         (WebCore::RenderLayerBacking::detachFromScrollingCoordinatorForRole): Deleted.
1530         * rendering/RenderLayerBacking.h:
1531         * rendering/RenderLayerCompositor.cpp:
1532         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1533         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1534         (WebCore::scrollCoordinationRoleForNodeType):
1535         (WebCore::RenderLayerCompositor::attachScrollingNode):
1536         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1537         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1538         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1539         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerForRole): Deleted.
1540         * rendering/RenderLayerCompositor.h:
1541
1542 2015-04-14  Benjamin Poulain  <benjamin@webkit.org>
1543
1544         Add a conservative DFA minimizer for the content extension matcher
1545         https://bugs.webkit.org/show_bug.cgi?id=143501
1546
1547         Reviewed by Alex Christensen.
1548
1549         This patch adds a simple minimizer for DFA graphs. It is not a perfect minimizer:
1550         some indistinguishable are not merged, but no two distinguishable are merged.
1551
1552         The general idea of the algorithm is to put all the state into a single set
1553         and partition iteratively until it is impossible to split any subset by using
1554         a transition to distinguish two states.
1555
1556         Let's ignore fallback transition for now, and I'll explain later how they fit in
1557         the big picture.
1558
1559
1560         The first thing we do is create a partition of the transition by grouping every
1561         transition by the same character in the same subset. This partition of transitions
1562         is the base by which we will partition the states.
1563
1564         Each subset in the transition partition is a "distinguisher" by which we can
1565         separate the state partition.
1566
1567         We also create a second partition, the state partition. This is where we keep
1568         all the subsets of states that have been split so far.
1569
1570         Let say we have the following graph.
1571
1572             1 --a--> 2
1573             1 --b--> 3
1574             2 --c--> 4 (final)
1575             3 --c--> 4 (final)
1576
1577         The partition of transition would start with:
1578         Set 0:
1579             1 --a--> 2
1580         Set 1:
1581             1 --b--> 3
1582         Set 2:
1583             2 --c--> 4
1584             3 --c--> 4
1585
1586         The state partition would have a single set with { 1, 2, 3, 4 }.
1587
1588
1589         Next, we split the state partition by distinguishable final states. In this case,
1590         we would split it into { 1, 2, 3 }, { 4 }.
1591
1592         We then refine the transition partition by splitting it by the states that have
1593         been distinguished. Here, the only transitions to 4 are both is the same set (set 2),
1594         so the transition partition remains the same.
1595
1596
1597         We can now execute the main loop of the algorithm:
1598         1) Split the states by the transitions.
1599         2) Split the transitions that are now reaching two different sets of the state partition.
1600         3) Add any newly discovered "distinguisher" (the ones we split) to the list of "distinguisher"
1601            to process.
1602
1603         In this case, we just iterate over the partition set in order, and add newly split transitions
1604         to the end of the list.
1605
1606         In the example, we would first visit set 0. We have that state 1 is distinguishable
1607         by "a", and the state partition would become { 1 }, { 2, 3 }, { 4 }.
1608
1609         We then visit transition set 1, it distinguishes state 1 which is already alone -> nothing to do.
1610
1611         Finally, we process the transition set 2, it distinguishes 2 and 3, they are already in the same
1612         set -> nothing to do.
1613
1614         There is no more transition to process, we have 3 unique subsets and we should merge 2 and 3.
1615
1616         ---
1617
1618         Okay, now how to we fit fallback transition in this model. In this patch, I take the conservative
1619         approach: we split everything assuming fallback transition do not exist, then we refine
1620         by the fallback transitions.
1621
1622         Let's take the following example:
1623             1 --a--> 3
1624             2 --a--> 3
1625             1 -[f]-> 4
1626             2 -[f]-> 5
1627
1628         and at this stage in the algorithm, we have the sets { 1, 2 }, { 3 }, { 4 }, { 5 }.
1629         The states 1 and 2 are together because they cannot be distinguished by 'a', but
1630         the fallback transition distinguishes them.
1631
1632         Since we have done every other split, we have one useful property: we know that every
1633         state in every set transition with the exact set of characters within that set.
1634         If that was not true, there would be one "distinguisher" 'x' that could spit the set
1635         into two subsets: the one with the transition 'x' and the ones without.
1636
1637         Since all the transitions are the same, there is no overlap between the defined transition
1638         and the fallback transition. Consequently, we can use the fallback transition as a whole
1639         transition and use it to distinguish the states.
1640
1641         The fallback transitions are handled like any other transition, we have a partition of such
1642         transitions and split by each of them. BUT, we can only use them after every unique transition
1643         has been covered.
1644
1645         This trick is also what makes the minimization imperfect: it should be possible to merge
1646         states with overlap in their fallback transitions but we would split them.
1647
1648         ---
1649
1650         Antti Valmari, Petri Lehtinen, Marie-Pierre Béal and Maxime Crochemore deserve credit for their indirect
1651         work on this patch. Thanks for your wonderful papers about DFA minimization.
1652
1653         * WebCore.xcodeproj/project.pbxproj:
1654         * contentextensions/ContentExtensionCompiler.cpp:
1655         (WebCore::ContentExtensions::compileRuleList):
1656         * contentextensions/DFA.cpp:
1657         (WebCore::ContentExtensions::DFA::minimize):
1658         (WebCore::ContentExtensions::DFA::debugPrintDot):
1659         * contentextensions/DFA.h:
1660         * contentextensions/DFABytecodeCompiler.cpp:
1661         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
1662         * contentextensions/DFAMinimizer.cpp: Added.
1663         (WebCore::ContentExtensions::DFAMinimizer::simplifyTransitions):
1664         (WebCore::ContentExtensions::DFAMinimizer::Partition::initialize):
1665         (WebCore::ContentExtensions::DFAMinimizer::Partition::markElementInCurrentGeneration):
1666         (WebCore::ContentExtensions::DFAMinimizer::Partition::refineGeneration):
1667         (WebCore::ContentExtensions::DFAMinimizer::Partition::iterateSet):
1668         (WebCore::ContentExtensions::DFAMinimizer::Partition::setIndex):
1669         (WebCore::ContentExtensions::DFAMinimizer::Partition::firstElementInSet):
1670         (WebCore::ContentExtensions::DFAMinimizer::Partition::size):
1671         (WebCore::ContentExtensions::DFAMinimizer::Partition::SetDescriptor::indexAfterMarkedElements):
1672         (WebCore::ContentExtensions::DFAMinimizer::Partition::SetDescriptor::end):
1673         (WebCore::ContentExtensions::DFAMinimizer::FullGraphPartition::FullGraphPartition):
1674         (WebCore::ContentExtensions::DFAMinimizer::FullGraphPartition::markNode):
1675         (WebCore::ContentExtensions::DFAMinimizer::FullGraphPartition::refinePartitions):
1676         (WebCore::ContentExtensions::DFAMinimizer::FullGraphPartition::splitByUniqueTransitions):
1677         (WebCore::ContentExtensions::DFAMinimizer::FullGraphPartition::splitByFallbackTransitions):
1678         (WebCore::ContentExtensions::DFAMinimizer::FullGraphPartition::nodeReplacement):
1679         (WebCore::ContentExtensions::DFAMinimizer::ActionKey::ActionKey):
1680         (WebCore::ContentExtensions::DFAMinimizer::ActionKey::isEmptyValue):
1681         (WebCore::ContentExtensions::DFAMinimizer::ActionKey::isDeletedValue):
1682         (WebCore::ContentExtensions::DFAMinimizer::ActionKeyHash::hash):
1683         (WebCore::ContentExtensions::DFAMinimizer::ActionKeyHash::equal):
1684         (WebCore::ContentExtensions::DFAMinimizer::minimize):
1685         * contentextensions/DFAMinimizer.h: Copied from Source/WebCore/contentextensions/DFA.h.
1686         * contentextensions/DFANode.h:
1687         * contentextensions/NFAToDFA.cpp:
1688         (WebCore::ContentExtensions::NFAToDFA::convert):
1689         (WebCore::ContentExtensions::simplifyTransitions): Deleted.
1690
1691 2015-04-14  Chris Dumez  <cdumez@apple.com>
1692
1693         ASSERT(frame().view() == this) assertion hit in FrameView::windowClipRect() on Windows bots
1694         https://bugs.webkit.org/show_bug.cgi?id=143723
1695
1696         Reviewed by Brent Fulgham.
1697
1698         ASSERT(frame().view() == this) in FrameView::windowClipRect() can be hit
1699         if the post layout timer timer fires after the page has entered page
1700         cache. Upon entering page cache, we call FrameView::unscheduleRelayout()
1701         to stop the layout timer if it is active, however, we don't stop the
1702         post-layout timer. Therefore, there was nothing preventing the
1703         post-layout timer from firing after entering page cache.
1704
1705         In this patch, we unschedule the post-layout timer in
1706         FrameView::unscheduleRelayout() to protect ourselves against this.
1707
1708         I think we were only seeing the assertion hit on Windows because this
1709         timer probably gets scheduled more frequently on Windows. On Mac, I
1710         rarely see it getting scheduled.
1711
1712         No new tests, should fix crashing tests on the bots.
1713
1714         * page/FrameView.cpp:
1715         (WebCore::FrameView::unscheduleRelayout):
1716
1717 2015-04-14  Chris Dumez  <cdumez@apple.com>
1718
1719         FrameView::m_frame should be a Ref<Frame>
1720         https://bugs.webkit.org/show_bug.cgi?id=143716
1721
1722         Reviewed by Andreas Kling.
1723
1724         FrameView::m_frame should be a Ref<Frame> instead of a RefPtr<Frame> as
1725         it can never be null.
1726
1727         * page/FrameView.cpp:
1728         (WebCore::FrameView::FrameView):
1729         (WebCore::FrameView::flushCompositingStateForThisFrame):
1730         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
1731         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
1732         (WebCore::FrameView::updateCanBlitOnScrollRecursively):
1733         (WebCore::FrameView::setIsOverlapped):
1734         (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):
1735         (WebCore::FrameView::renderedCharactersExceed):
1736         (WebCore::FrameView::updateLayerFlushThrottling):
1737         (WebCore::FrameView::serviceScriptedAnimations):
1738         (WebCore::FrameView::updateBackgroundRecursively):
1739         (WebCore::FrameView::adjustScrollStepForFixedContent):
1740         (WebCore::FrameView::paintContentsForSnapshot):
1741         (WebCore::FrameView::notifyWidgetsInAllFrames):
1742         (WebCore::FrameView::setExposedRect):
1743         (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
1744         * page/FrameView.h:
1745
1746 2015-04-13  Simon Fraser  <simon.fraser@apple.com>
1747
1748         [iOS WK2] Interactive elements of developer.apple.com are broken
1749         https://bugs.webkit.org/show_bug.cgi?id=143692
1750         rdar://problem/19320087
1751
1752         Reviewed by Sam Weinig.
1753         
1754         When a composited RenderLayer had nodes in the scrolling tree by virtue of
1755         both position and overflow:scroll, and one of those reasons disappeared,
1756         we'd fail to remove the corresponding node from the scrolling tree. This
1757         could leave an overflow:scroll element behaving as if it were position:fixed.
1758         
1759         Fix by having RenderLayerCompositor::updateScrollCoordinationForThisFrame()
1760         detach the layer on a per-role basis.
1761
1762         Test: platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html
1763
1764         * rendering/RenderLayerBacking.cpp:
1765         (WebCore::RenderLayerBacking::detachFromScrollingCoordinatorForRole):
1766         * rendering/RenderLayerBacking.h:
1767         * rendering/RenderLayerCompositor.cpp:
1768         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerForRole):
1769         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Just moved.
1770         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Call detachScrollCoordinatedLayerForRole()
1771         if the layer doesn't have the relevant scrolling reasons.
1772         * rendering/RenderLayerCompositor.h:
1773
1774 2015-04-14  Commit Queue  <commit-queue@webkit.org>
1775
1776         Unreviewed, rolling out r182794.
1777         https://bugs.webkit.org/show_bug.cgi?id=143714
1778
1779         readable-stream-templated.html fails on Debug bots (Requested
1780         by youenn on #webkit).
1781
1782         Reverted changeset:
1783
1784         "[Streams API] ReadableStream constructor start function
1785         should be able to close the stream"
1786         https://bugs.webkit.org/show_bug.cgi?id=143363
1787         http://trac.webkit.org/changeset/182794
1788
1789 2015-04-14  Per Arne Vollan  <peavo@outlook.com>
1790
1791         [WinCairo] Unreviewed build fix after r182707.
1792
1793         * platform/network/curl/MultipartHandle.cpp:
1794         (WebCore::MultipartHandle::didReceiveResponse):
1795
1796 2015-04-14  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1797
1798         [Streams API] ReadableStream constructor start function should be able to close the stream
1799         https://bugs.webkit.org/show_bug.cgi?id=143363
1800
1801         Reviewed by Benjamin Poulain.
1802
1803         Implements https://streams.spec.whatwg.org/#close-readable-stream.
1804         When the "close" JS function is called, the stream is getting closed.
1805         The stream state is changed to close and if it has a reader, the reader gets closed as well:
1806         The reader resolves the closed promise and release the stream.
1807
1808         Enabled the possibility to resolve a promise with any JS value.
1809         This is used to resolve closed promise with jsUndefined and will be used for read promises.
1810
1811         Covered by reference tests that are now passing.
1812
1813         * Modules/streams/ReadableStream.cpp:
1814         (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
1815         * Modules/streams/ReadableStream.h:
1816         * Modules/streams/ReadableStreamReader.cpp:
1817         (WebCore::ReadableStreamReader::ReadableStreamReader):
1818         (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time (in particular closed/errored state).
1819         (WebCore::ReadableStreamReader::releaseStream):
1820         (WebCore::ReadableStreamReader::closed): Storing the closed promise callbacks.
1821         (WebCore::ReadableStreamReader::changeStateToClosed): Resolution of closed promise.
1822         * Modules/streams/ReadableStreamReader.h:
1823         * bindings/js/JSDOMPromise.h:
1824         (WebCore::DeferredWrapper::resolve<JSC::JSValue>):
1825         * bindings/js/JSReadableStreamReaderCustom.cpp:
1826         (WebCore::JSReadableStreamReader::closed):
1827         * bindings/js/ReadableStreamJSSource.cpp:
1828         (WebCore::readableStreamSlotName):
1829         (WebCore::getReadableJSStream): Helper function to retrieve the stream from the exec state.
1830         (WebCore::closeReadableStreamFunction):
1831         (WebCore::createReadableStreamCloseFunction):
1832         (WebCore::createReadableStreamController):
1833         (WebCore::ReadableStreamJSSource::start):
1834         (WebCore::ReadableJSStreamReader::ReadableJSStreamReader): Deleted.
1835
1836 2015-04-13  Joonghun Park  <jh718.park@samsung.com>
1837
1838         Use modern for-loops in Document
1839         https://bugs.webkit.org/show_bug.cgi?id=143600
1840
1841         Reviewed by Darin Adler.
1842
1843         No new tests, no behavior changes.
1844
1845         * dom/Document.cpp:
1846         (WebCore::Document::visibilityStateChanged):
1847         (WebCore::Document::processBaseElement):
1848         (WebCore::Document::moveNodeIteratorsToNewDocument):
1849         (WebCore::Document::updateRangesAfterChildrenChanged):
1850         (WebCore::Document::nodeChildrenWillBeRemoved):
1851         (WebCore::Document::nodeWillBeRemoved):
1852         (WebCore::Document::textInserted):
1853         (WebCore::Document::textRemoved):
1854         (WebCore::Document::textNodesMerged):
1855         (WebCore::Document::textNodeSplit):
1856         (WebCore::Document::documentWillSuspendForPageCache):
1857         (WebCore::Document::documentDidResumeFromPageCache):
1858         (WebCore::Document::mediaVolumeDidChange):
1859         (WebCore::Document::privateBrowsingStateDidChange):
1860         (WebCore::Document::captionPreferencesChanged):
1861         (WebCore::Document::validateAutoSizingNodes):
1862         (WebCore::Document::resetAutoSizingNodes):
1863         (WebCore::Document::webkitExitFullscreen):
1864         (WebCore::Document::absoluteRegionForEventTargets):
1865
1866 2015-04-13  Manuel Rego Casasnovas  <rego@igalia.com>
1867
1868         [CSS Grid Layout] Columns set in percentages collapse to auto width
1869         https://bugs.webkit.org/show_bug.cgi?id=141435
1870
1871         Reviewed by David Hyatt.
1872
1873         Based on a patch by Sergio Villar Senin  <svillar@igalia.com>.
1874
1875         This patch adds 2 new new methods in RenderBox to determine if the grid
1876         has a definite size or not.
1877
1878         RenderGrid::gridTrackSize() was not checking properly if the grid has or
1879         not an indefinite size.
1880         The condition was including auto which is not indefinite per se. For
1881         example, auto is definite if the containing block is definite.
1882         As the new method is more expensive, we just call it when it's really
1883         needed to avoid performance regressions.
1884
1885         Finally we were setting the override logical width/height to -1 (no
1886         possible resolution) for all the items regardless if they've a relative
1887         width/height or a fixed one.
1888         Added the condition, including not only items with percentage logical
1889         width/height but also relative, to avoid overriding the value for items
1890         with fixed width/height as it's not needed.
1891
1892         Tests: fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html
1893                fast/css-grid-layout/percent-intrinsic-track-breadth.html
1894                fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
1895
1896         * rendering/RenderBox.cpp:
1897         (WebCore::logicalWidthIsResolvable):
1898         (WebCore::RenderBox::hasDefiniteLogicalWidth):
1899         (WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
1900         (WebCore::RenderBox::hasRelativeLogicalWidth):
1901         * rendering/RenderBox.h:
1902         * rendering/RenderGrid.cpp:
1903         (WebCore::RenderGrid::hasDefiniteLogicalSize):
1904         (WebCore::RenderGrid::gridTrackSize):
1905         (WebCore::RenderGrid::logicalContentHeightForChild):
1906         (WebCore::RenderGrid::minContentForChild):
1907         (WebCore::RenderGrid::maxContentForChild):
1908         * rendering/RenderGrid.h:
1909
1910 2015-04-13  Chris Dumez  <cdumez@apple.com>
1911
1912         Regression: Scrolling on popsci.com spends too much time in FrameView::viewportsContentsChanged()
1913         https://bugs.webkit.org/show_bug.cgi?id=143675
1914
1915         Reviewed by Simon Fraser.
1916
1917         Optimize resumeVisibleImageAnimationsIncludingSubframes() so that the FrameViews'
1918         windowClipRect gets computed less often:
1919         - Cache the FrameView's windowClipRect before resuming image animations in subframes
1920           as calling windowClipRect() on those subframes' view is going to call windowClipRect()
1921           on their ancestors. This avoids a lot of unnecessary windowClipRect recomputations
1922           in deep frame trees.
1923         - Stop traversing the Frame tree if the current frame does not have a content
1924           renderer, as this means the subframes won't have one either.
1925         - Stop traversing the Frame tree if the current frame's view has an empty
1926           windowClipRect() as this means the windowClipRect will be empty for those
1927           subframes as well.
1928
1929         On popsci.com, this cuts down the number of uncached windowClipRect() calls by
1930         approximately half. I see viewportsContentsChanged() at ~0.4% when scrolling
1931         on popsci.com after this change.
1932
1933         * page/FrameView.cpp:
1934         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
1935         (WebCore::FrameView::windowClipRect):
1936         * page/FrameView.h:
1937         * rendering/RenderView.cpp:
1938         (WebCore::RenderView::resumePausedImageAnimationsIfNeeded):
1939         * rendering/RenderView.h:
1940
1941 2015-04-13  Roger Fong  <roger_fong@apple.com>
1942
1943         Unreviewed. Set the title text of the placard added in r182631.
1944         https://bugs.webkit.org/show_bug.cgi?id=143585.
1945         <rdar://problem/12067439>
1946
1947         * Modules/mediacontrols/mediaControlsApple.js:
1948         (Controller.prototype.updateWirelessPlaybackStatus):
1949
1950 2015-04-10  Brent Fulgham  <bfulgham@apple.com>
1951
1952         Expand test infrastructure to support scrolling tests
1953         https://bugs.webkit.org/show_bug.cgi?id=143286
1954         <rdar://problem/20375516>
1955
1956         Reviewed by Simon Fraser.
1957
1958         No new functionality.
1959
1960         This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
1961         function object to be fired when scroll events are finished. The object also keeps track of reasons
1962         why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
1963         check rendering state in the middle of an animation.
1964
1965         This code is not yet hooked up to the rendering system, and so does not have any effect on behavior.
1966
1967         * CMakeLists.txt: Add new WheelEventTestTrigger files.
1968         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1969         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1970         * WebCore.xcodeproj/project.pbxproj: Ditto.
1971         * page/MainFrame.cpp:
1972         (WebCore::MainFrame::MainFrame): Add new member to constructor.
1973         (WebCore::MainFrame::testTrigger): Added.
1974         (WebCore::MainFrame::ensureTestTrigger): Added.
1975         (WebCore::MainFrame::clearTrigger): Added.
1976         * page/MainFrame.h:
1977         * page/WheelEventTestTrigger.cpp: Added.
1978         (WebCore::WheelEventTestTrigger::WheelEventTestTrigger):
1979         (WebCore::WheelEventTestTrigger::createWeakPtr):
1980         (WebCore::WheelEventTestTrigger::clearAllTestDeferrals):
1981         (WebCore::WheelEventTestTrigger::setTestNotificationCallback):
1982         (WebCore::WheelEventTestTrigger::deferTestsForReason):
1983         (WebCore::WheelEventTestTrigger::removeTestDeferralForReason):
1984         (WebCore::WheelEventTestTrigger::triggerTestTimerFired):
1985         * page/WheelEventTestTrigger.h: Added.
1986
1987 2015-04-13  Jer Noble  <jer.noble@apple.com>
1988
1989         [iOS] When entering optimized fullscreen, standard fullscreen view should exit.
1990         https://bugs.webkit.org/show_bug.cgi?id=143615
1991
1992         Reviewed by Simon Fraser.
1993
1994         When entering optimized fullscreen from standard fullscreen, the original fullscreen
1995         view should animate out.
1996
1997         The original method for entering optimized fullscreen is deprecated, so replace it with
1998         the new method (which doesn't take completion blocks) and use delegate methods to detect
1999         when the animation transition completes.
2000
2001         * platform/Logging.h:
2002         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2003         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2004         (boolString): Added; use for logging boolean parameters.
2005         (-[WebAVPlayerController playerViewControllerWillStartOptimizedFullscreen:]): Pass to WebVideoFullscreenInterfaceAVKit.
2006         (-[WebAVPlayerController playerViewControllerDidStartOptimizedFullscreen:]): Ditto.
2007         (-[WebAVPlayerController playerViewControllerWillStopOptimizedFullscreen:]): Ditto.
2008         (-[WebAVPlayerController playerViewControllerDidStopOptimizedFullscreen:]): Ditto.
2009         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]): Ditto.
2010         (-[WebAVPlayerController playerViewControllerDidCancelOptimizedFullscreen:]): Ditto.
2011         (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]): Ditto.
2012         (-[WebAVVideoLayer setPlayerViewController:]): Remove the KVO registration; now handled by above delegate methods.
2013         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Add logging.
2014         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
2015         (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized): Use new -startOptimizedFullscreen method.
2016         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): Add logging.
2017         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
2018         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Use hasMode() & isMode() rather than checking m_mode directly.
2019         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Ditto.
2020         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline): Callback now stored on this object rather than the WebAVPlayerController.
2021         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Moved.
2022         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline): Added; store the passed callback.
2023         (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen): Exit out of standard fullscreen mode if necessary.
2024         (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen): Moved from the start lambda in enterFullscreenOptimized().
2025         (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen): Call the model's requestExitFullscreen() method.
2026         (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen): Moved from the stop lambda in enterFullscreenOptimized().
2027         (WebVideoFullscreenInterfaceAVKit::willCancelOptimizedFullscreen): Call the model's requestExitFullscreen() method.
2028         (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Moved from the stop lambda in enterFullscreenOptimized().
2029         (WebVideoFullscreenInterfaceAVKit::prepareForOptimizedFullscreenStopWithCompletionHandler): Moved from -playerViewController:shouldExitFullScreenWithReason:.
2030         (WebVideoFullscreenInterfaceAVKit::setMode): Added; Call fullscreenModeChanged() if necessary.
2031         (WebVideoFullscreenInterfaceAVKit::clearMode): Ditto.
2032         (-[WebAVVideoLayer observeValueForKeyPath:ofObject:change:context:]): Deleted.
2033         (WebVideoFullscreenInterfaceAVKit::setIsOptimized): Deleted.
2034
2035 2015-04-13  Brent Fulgham  <bfulgham@apple.com>
2036
2037         [Win] Unreviewed fix after r182757.
2038
2039         * platform/win/FileSystemWin.cpp:
2040         (WebCore::renameFile): Checked in wrong version.
2041
2042 2015-04-13  Brent Fulgham  <bfulgham@apple.com>
2043
2044         [Win] Unreviewed fix after r182161.
2045
2046         The change caused Windows to lose Media UI, since the new 'getFileSize'
2047         signature was being improperly used for a 'UInt8'-based string.
2048
2049         Fix was to provide implementations for the two new methods, and to make
2050         sure RenderThemeWin was using the proper signature.
2051
2052         This should actually be a little more efficient, since we have the file
2053         handle when we call this new method. Previously, a Windows 'find file' was
2054         being done with the requested path, which was unnecessary work.
2055
2056         * platform/win/FileSystemWin.cpp:
2057         (WebCore::getFileSizeFromByHandleFileInformationStructure): Added helper function.
2058         (WebCore::getFileSize): Provide implementation.
2059         (WebCore::renameFile):
2060         * rendering/RenderThemeWin.cpp:
2061         (WebCore::RenderThemeWin::stringWithContentsOfFile): Use the file handle to
2062         get the file size, rather than using the path-based size lookup (which involves
2063         performing an unnecessary file search.
2064
2065 2015-04-13  Brady Eidson  <beidson@apple.com>
2066
2067         Share sheets from Share menus appear outside the browser window.
2068         <rdar://problem/20455592> and https://bugs.webkit.org/show_bug.cgi?id=143620
2069
2070         Reviewed by Darin Adler.
2071
2072         * page/ContextMenuController.h:
2073         (WebCore::ContextMenuController::client):
2074
2075 2015-04-13  Andreas Kling  <akling@apple.com>
2076
2077         Rebaseline bindings tests.
2078
2079         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2080         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2081         * bindings/scripts/test/JS/JSTestEventTarget.h:
2082         * bindings/scripts/test/JS/JSTestException.h:
2083         * bindings/scripts/test/JS/JSTestInterface.h:
2084         * bindings/scripts/test/JS/JSTestObj.h:
2085         * bindings/scripts/test/JS/JSTestTypedefs.h:
2086
2087 2015-04-13  Jer Noble  <jer.noble@apple.com>
2088
2089         [iOS] Treat a 'not found' media option index as the 'off' track.
2090         https://bugs.webkit.org/show_bug.cgi?id=143672
2091
2092         Reviewed by Eric Carlson.
2093
2094         The UIProcess will pass in UINT64_MAX for the index of the legible option to select. Treat this
2095         as if the captionOffMenuItem() had been selected to avoid a null dereference.
2096
2097         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2098         (WebVideoFullscreenModelVideoElement::selectLegibleMediaOption):
2099
2100 2015-04-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
2101
2102         list-style-image with SVG image renders at incorrect size.
2103         https://bugs.webkit.org/show_bug.cgi?id=141367.
2104
2105         Reviewed by Darin Adler.
2106         
2107         This patch imports https://codereview.chromium.org/197203003.
2108
2109         When using an SVG as list marker image, don't unconditionally set the
2110         dimensions to a square with the dimensions of ascent / 2, but rather
2111         determine a suitable size using intrinsic dimensions (and ratio).
2112
2113         Test: svg/as-list-image/svg-list-image-intrinsic-size-1.html
2114
2115         * rendering/RenderListMarker.cpp:
2116         (WebCore::RenderListMarker::updateContent):
2117
2118 2015-04-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
2119
2120         Canvas drawImage() has a security hole when the image isn't yet fully loaded.
2121         https://bugs.webkit.org/show_bug.cgi?id=58681.
2122
2123         Reviewed by Darin Adler.
2124
2125         There is a race condition which may happen if an image from a different
2126         origin is drawn on a canvas before it finishes loading. The check to taint
2127         the canvas comes before drawing it. This check returns false if the image
2128         is not completely loaded because we check the URL of the resource response.
2129         If after this check and before the drawing, the image finishes loading, the
2130         canvas will not be tainted but the image will be drawn.
2131         
2132         The fix is to move the check to taint the canvas after drawing the image.
2133         The only problem with this solution is basically the opposite of this bug:
2134         we will become stricter than before with images which are from a different
2135         origin and before they finish loading. The image has not finished loading,
2136         so we do not draw it. Before we check for tainting, the image finishes
2137         loading. So we decide to taint the canvas even the image is not drawn.
2138         
2139         But this should not be a security issue anymore. I personally do not know
2140         if it is even a correctness issue or not.
2141
2142         Test: http/tests/canvas/canvas-tainted-after-draw-image.html
2143
2144         * html/canvas/CanvasRenderingContext2D.cpp:
2145         (WebCore::CanvasRenderingContext2D::drawImage):
2146
2147 2015-04-13  Beth Dakin  <bdakin@apple.com>
2148
2149         Add force property to MouseEvents
2150         https://bugs.webkit.org/show_bug.cgi?id=143569
2151         -and corresponding-
2152         rdar://problem/20472954
2153
2154         Reviewed by Darin Adler.
2155
2156         This patch removes WebKitMouseForceEvent and uses a MouseEvent everywhere that it 
2157         was used. That’s possible because this patch also adds a force property to all 
2158         MouseEvents and to PlatformMouseEvent.
2159
2160         Remove WebKitMouseForceEvent.
2161         * CMakeLists.txt:
2162         * DerivedSources.cpp:
2163         * DerivedSources.make:
2164         * WebCore.vcxproj/WebCore.vcxproj:
2165         * WebCore.vcxproj/WebCore.vcxproj.filters:
2166         * WebCore.xcodeproj/project.pbxproj:
2167         * dom/DOMAllInOne.cpp:
2168
2169         Create MouseEvents with the appropriate force instead of WebKitMouseForceEvents. 
2170         This patch also gets rid of the PlatformMouseEvent parameter for these events. 
2171         They were re-using the cached mousedown event before, which they never should have 
2172         done. Instead, we create PlatformMouseEvents inside these functions and then use 
2173         that to make MouseEvents.
2174         * dom/Element.cpp:
2175         (WebCore::Element::dispatchMouseForceWillBegin):
2176         (WebCore::Element::dispatchMouseForceChanged):
2177         (WebCore::Element::dispatchMouseForceDown):
2178         (WebCore::Element::dispatchMouseForceUp):
2179         (WebCore::Element::dispatchMouseForceClick):
2180         (WebCore::Element::dispatchMouseForceCancelled):
2181         * dom/Element.h:
2182
2183         No More WebKitMouseForceEvent.
2184         * dom/EventNames.in:
2185
2186         Add force to MouseEvent.
2187         * dom/MouseEvent.cpp:
2188         (WebCore::MouseEvent::create):
2189         (WebCore::MouseEvent::MouseEvent):
2190         (WebCore::MouseEvent::cloneFor):
2191         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
2192         * dom/MouseEvent.h:
2193         (WebCore::MouseEvent::force):
2194         (WebCore::MouseEvent::setForce):
2195         * dom/MouseEvent.idl:
2196
2197         No More WebKitMouseForceEvent.
2198         * dom/WebKitMouseForceEvent.cpp: Removed.
2199         * dom/WebKitMouseForceEvent.h: Removed.
2200         * dom/WebKitMouseForceEvent.idl: Removed.
2201
2202         PlatformMouseEvent now takes a force parameter.
2203         * dom/WheelEvent.cpp:
2204         (WebCore::WheelEvent::WheelEvent):
2205         * page/ContextMenuController.cpp:
2206         (WebCore::ContextMenuController::showContextMenuAt):
2207         * page/DragController.cpp:
2208         (WebCore::createMouseEvent):
2209         * page/EventHandler.cpp:
2210         (WebCore::EventHandler::dispatchDragEvent):
2211         (WebCore::EventHandler::sendContextMenuEventForKey):
2212         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
2213
2214         We don’t need lastMouseDownEvent() anymore. We were using it to avoid creating new 
2215         PlatformMouseEvents for the force events, but we fix that in this patch.
2216         (WebCore::EventHandler::lastMouseDownEvent): Deleted.
2217         * page/EventHandler.h:
2218
2219         At force to PlatformMouseEvent.
2220         * platform/PlatformMouseEvent.h:
2221         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2222         (WebCore::PlatformMouseEvent::force):
2223         * replay/SerializationMethods.cpp:
2224         (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue):
2225         (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue):
2226
2227 2015-04-13  Andreas Kling  <akling@apple.com>
2228
2229         Don't segregate heap objects based on Structure immortality.
2230         <https://webkit.org/b/143638>
2231
2232         Reviewed by Darin Adler.
2233
2234         * bindings/js/JSDOMBinding.h:
2235         * bindings/scripts/CodeGeneratorJS.pm:
2236         (GenerateHeader):
2237         (GeneratePrototypeDeclaration):
2238         * bridge/objc/objc_runtime.h:
2239         * bridge/runtime_array.h:
2240         * bridge/runtime_method.h:
2241         * bridge/runtime_object.h:
2242
2243 2015-04-13  Simon Fraser  <simon.fraser@apple.com>
2244
2245         Fixed position element is truncated if moved onscreen by a transform
2246         https://bugs.webkit.org/show_bug.cgi?id=143655
2247         rdar://problem/15020044
2248
2249         Reviewed by Darin Adler.
2250         
2251         Our "don't do layout if transform changes" code was too aggressive.
2252         If an element changes between having a transform and not having one, we
2253         really need to do a layout since so much else depends on transforms. In
2254         this particular case, we clip position:fixed elements to the viewport if
2255         they are not transformed, and were failing to re-evaluate this when a
2256         transform was added. Doing a layout fixes this.
2257
2258         Test: compositing/geometry/fixed-transformed.html
2259
2260         * rendering/style/RenderStyle.cpp:
2261         (WebCore::RenderStyle::changeRequiresLayout):
2262         * rendering/style/StyleTransformData.h:
2263         (WebCore::StyleTransformData::hasTransform):
2264
2265 2015-04-12  Darin Adler  <darin@apple.com>
2266
2267         [Cocoa] Localizable strings are inconsistent and need to be regenerated
2268         https://bugs.webkit.org/show_bug.cgi?id=143661
2269         rdar://problem/19634388
2270
2271         Reviewed by Dan Bernstein.
2272
2273         * English.lproj/Localizable.strings: Updated by running the
2274         update-webkit-localizable-strings script.
2275
2276 2015-04-13  Darin Adler  <darin@apple.com>
2277
2278         Remove needless recreation of URL in NavigationScheduler::scheduleLocationChange
2279         https://bugs.webkit.org/show_bug.cgi?id=143662
2280
2281         Reviewed by Sam Weinig.
2282
2283         * loader/NavigationScheduler.cpp:
2284         (WebCore::NavigationScheduler::scheduleLocationChange): Removed unnecessary code
2285         to convert a URL to a String and then back into a URL.
2286
2287 2015-04-13  Csaba Osztrogonác  <ossy@webkit.org>
2288
2289         [cmake] Add ENABLE(ATTACHMENT_ELEMENT) to the build system
2290         https://bugs.webkit.org/show_bug.cgi?id=143664
2291
2292         Reviewed by Gyuyoung Kim.
2293
2294         * page/efl/DragControllerEfl.cpp:
2295         (WebCore::DragController::declareAndWriteAttachment): Added stub implementation to fix the build.
2296         * page/gtk/DragControllerGtk.cpp:
2297         (WebCore::DragController::declareAndWriteAttachment): Added stub implementation to fix the build.
2298
2299 2015-04-13  Sungmann Cho  <sungmann.cho@navercorp.com>
2300
2301         [Curl] Small improvements to CurlCacheEntry::parseResponseHeaders()
2302         https://bugs.webkit.org/show_bug.cgi?id=143597
2303
2304         Reviewed by Csaba Osztrogonác.
2305
2306         Most lines of code in CurlCacheEntry::parseResponseHeaders() don't need to be
2307         executed if the response has "no-cache" or "no-store" directive, but we are
2308         checking these conditions in the middle of the method. We can move this to the
2309         beginning of the method for efficiency.
2310
2311         No new tests, no behavior change.
2312
2313         * platform/network/curl/CurlCacheEntry.cpp:
2314         (WebCore::CurlCacheEntry::parseResponseHeaders):
2315
2316 2015-04-13  Sergio Villar Senin  <svillar@igalia.com>
2317
2318         Unreviewed, build fix after r182704.
2319
2320         * rendering/RenderGrid.cpp:
2321         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2322
2323 2015-04-13  Joonghun Park  <jh718.park@samsung.com>
2324
2325         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceResponse
2326         https://bugs.webkit.org/show_bug.cgi?id=143056
2327
2328         Reviewed by Gyuyoung Kim.
2329
2330         No new tests, no behavior changes.
2331
2332         * loader/WorkerThreadableLoader.cpp:
2333         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2334         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
2335         * platform/CrossThreadCopier.h:
2336         * platform/network/ResourceResponseBase.cpp:
2337         (WebCore::ResourceResponseBase::adopt):
2338         (WebCore::ResourceResponseBase::copyData):
2339         * platform/network/ResourceResponseBase.h:
2340         * platform/network/cf/ResourceResponse.h:
2341         (WebCore::ResourceResponse::doPlatformCopyData):
2342         (WebCore::ResourceResponse::doPlatformAdopt):
2343         * platform/network/curl/ResourceResponse.h:
2344         (WebCore::ResourceResponse::doPlatformCopyData):
2345         (WebCore::ResourceResponse::doPlatformAdopt):
2346         * platform/network/soup/ResourceResponse.h:
2347         (WebCore::ResourceResponse::doPlatformCopyData):
2348         (WebCore::ResourceResponse::doPlatformAdopt):
2349
2350 2015-04-10  Sergio Villar Senin  <svillar@igalia.com>
2351
2352         [CSS Grid Layout] Support marking/unmarking tracks as infinitely growable
2353         https://bugs.webkit.org/show_bug.cgi?id=141431
2354
2355         Reviewed by Darin Adler.
2356
2357         As explained here
2358         http://lists.w3.org/Archives/Public/www-style/2014Mar/0512.html we
2359         sometimes need to consider that some tracks are infinitely
2360         growable even when they are really not, in order to produce more
2361         "natural" results.
2362
2363         For example the following case:
2364           grid-template-columns: auto auto;
2365           item 1 in column 1 with min-content = max-content = 10px;
2366           item 2 in columns 1-2 with min-content = 30, max-content = 100px;
2367
2368         will produce (45px, 55px) without this patch. But considering the
2369         second column as infinitely growable the result is (10px, 90px), a
2370         more "natural" result because column 1 just needs to be 10px to
2371         accommodate item 1. From now on we can flag GridTracks so that
2372         they can infinitely grow even when the growth limit is finite.
2373
2374         Apart from that distributeSpaceToTracks() is now unconditionally
2375         called even though the extra space is 0. That's because it
2376         computes the plannedSize value.
2377
2378         Test: fast/css-grid-layout/mark-as-infinitely-growable.html
2379
2380         * rendering/RenderGrid.cpp:
2381         (WebCore::GridTrack::infiniteGrowthPotential):
2382         (WebCore::GridTrack::infinitelyGrowable):
2383         (WebCore::GridTrack::setInfinitelyGrowable):
2384         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2385         (WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase): Updated with new phase.
2386         (WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase): Ditto.
2387         (WebCore::RenderGrid::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase): Ditto.
2388         (WebCore::RenderGrid::updateTrackSizeForTrackSizeComputationPhase): Ditto.
2389         (WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase): Ditto.
2390         (WebCore::RenderGrid::markAsInfinitelyGrowableForTrackSizeComputationPhase):
2391         New helper method which does the mark/unmark just for growth limits.
2392         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2393         (WebCore::sortByGridTrackGrowthPotential): Use
2394         infiniteGrowthPotential() for sorting.
2395         (WebCore::RenderGrid::distributeSpaceToTracks):
2396         * rendering/RenderGrid.h:
2397
2398 2015-04-12  Benjamin Poulain  <benjamin@webkit.org>
2399
2400         Legacy scroll behavior on HTMLBodyElement should only apply to the first body element of a document
2401         https://bugs.webkit.org/show_bug.cgi?id=143651
2402
2403         Reviewed by Sam Weinig.
2404
2405         WebKit has some very weird behaviors for the scroll methods on body. This patch
2406         address the first bug: only the first body element should have the legacy behavior.
2407
2408         The relevant text in spec:
2409         -http://dev.w3.org/csswg/cssom-view/#dom-element-scrollleft
2410         -http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop
2411         -http://dev.w3.org/csswg/cssom-view/#dom-element-scrollwidth
2412         -http://dev.w3.org/csswg/cssom-view/#dom-element-scrollheight
2413
2414         Tests: fast/dom/Element/body-scrollHeight-basics-quirks.html
2415                fast/dom/Element/body-scrollLeft-basics-quirks.html
2416                fast/dom/Element/body-scrollTop-basics-quirks.html
2417                fast/dom/Element/body-scrollWidth-basics-quirks.html
2418                fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollLeft.html
2419                fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollTop.html
2420
2421         * html/HTMLBodyElement.cpp:
2422         (WebCore::HTMLBodyElement::isFirstBodyElementOfDocument):
2423         (WebCore::HTMLBodyElement::scrollLeft):
2424         (WebCore::HTMLBodyElement::setScrollLeft):
2425         (WebCore::HTMLBodyElement::scrollTop):
2426         (WebCore::HTMLBodyElement::setScrollTop):
2427         (WebCore::HTMLBodyElement::scrollHeight):
2428         (WebCore::HTMLBodyElement::scrollWidth):
2429         * html/HTMLBodyElement.h:
2430
2431 2015-04-12  Sungmann Cho  <sungmann.cho@navercorp.com>
2432
2433         Fix trival typos related to the word "coordinate".
2434         https://bugs.webkit.org/show_bug.cgi?id=143644
2435
2436         Reviewed by Alexey Proskuryakov.
2437
2438         No new tests, no behavior change.
2439
2440         * rendering/RenderBox.cpp:
2441         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2442
2443 2015-04-12  Simon Fraser  <simon.fraser@apple.com>
2444
2445         Scrollbars in composited overflow and iframes fail to render on Mac
2446         https://bugs.webkit.org/show_bug.cgi?id=143647
2447         rdar://problem/20340544
2448
2449         Reviewed by Darin Adler.
2450
2451         When adding support for drawing scrollbars on the scrolling thread, we inadvertently
2452         disabled scrollbar drawing in other composited, main-thread scrolling configurations.
2453         
2454         Fix by having Scrollbar::supportsUpdateOnSecondaryThread() only return true if
2455         the scrollable area is using async scrolling.
2456         
2457         Sadly, we can't layout-test this.
2458
2459         * platform/Scrollbar.cpp:
2460         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
2461
2462 2015-04-12  Simon Fraser  <simon.fraser@apple.com>
2463
2464         Selects don't scroll at some aspect ratios
2465         https://bugs.webkit.org/show_bug.cgi?id=143649
2466         rdar://problem/19365694
2467
2468         Reviewed by Darin Adler.
2469         
2470         Fix width/height flip in RenderListBox which caused us to fail to scroll when
2471         the list was wider than the scroll height.
2472         
2473         We're generally confused about RenderListBox scroll offsets (webkit.org/b/143648)
2474         but this fixes the immediate problem.
2475
2476         Test: fast/forms/listbox-visible-size.html
2477
2478         * rendering/RenderListBox.h:
2479
2480 2015-04-12  Simon Fraser  <simon.fraser@apple.com>
2481
2482         Too much repainting on scrolling with fixed backgrounds
2483         https://bugs.webkit.org/show_bug.cgi?id=143637
2484         rdar://problem/20245243
2485
2486         Reviewed by Darin Adler.
2487         
2488         FrameView::scrollContentsSlowPath() would repaint the entire viewport if there were
2489         any slow-repaint objects (those with background-attachment: fixed) and the contents
2490         were using compositing for scrolling.
2491         
2492         This is wrong; we only need to issue repaint for the slow-repaint renderers,
2493         and, if the frame is hosted in a compositing layer and not using compositing for scrolling,
2494         repaint that hosting layer.
2495
2496         Tests: compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint.html
2497                compositing/repaint/iframes/compositing-iframe-scroll-repaint.html
2498                compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint.html
2499                platform/mac-wk2/tiled-drawing/fixed-background-scroll-repaint.html
2500
2501         * page/FrameView.cpp:
2502         (WebCore::FrameView::scrollContentsSlowPath):
2503
2504 2015-04-11  Matt Baker  <mattbaker@apple.com>
2505
2506         Web Inspector: create content view and details sidebar for Frames timeline
2507         https://bugs.webkit.org/show_bug.cgi?id=143533
2508
2509         Reviewed by Timothy Hatcher.
2510
2511         Refactoring: RunLoop prefix changed to RenderingFrame.
2512
2513         * inspector/InspectorTimelineAgent.cpp:
2514         (WebCore::InspectorTimelineAgent::internalStart):
2515         (WebCore::toProtocol):
2516         * inspector/InspectorTimelineAgent.h:
2517
2518 2015-04-11  Chris Dumez  <cdumez@apple.com>
2519
2520         Stop referring to outdated RFC2616 in CacheValidation.cpp
2521         https://bugs.webkit.org/show_bug.cgi?id=143619
2522
2523         Reviewed by Darin Adler.
2524
2525         Stop referring to outdated RFC2616 in CacheValidation.cpp and refer to
2526         the newer RFC7230 & RFC7234. Also update some variables to match the
2527         naming in the RFC for clarity.
2528
2529         No behavior change.
2530
2531         * platform/network/CacheValidation.cpp:
2532         (WebCore::updateResponseHeadersAfterRevalidation):
2533         (WebCore::computeCurrentAge):
2534         (WebCore::computeFreshnessLifetimeForHTTPFamily):
2535         (WebCore::isCacheHeaderSeparator):
2536         (WebCore::parseCacheControlDirectives):
2537
2538 2015-04-11  Ryosuke Niwa  <rniwa@webkit.org>
2539
2540         WebKit places caret in front of pasted Numbers cells instead of behind
2541         https://bugs.webkit.org/show_bug.cgi?id=143627
2542
2543         Reviewed by Darin Adler.
2544
2545         The bug was caused by Position::downstream not respecting modern position types inside a table.
2546         Fixed it by using Position::atStartOfNode which respects before/after positions.
2547
2548         This bug doesn't reproduce when there is no whitespace after td element in the pasted content
2549         because positionAtEndOfInsertedContent() will be inside the last pasted cell inside
2550         ReplaceSelectionCommand::completeHTMLReplacement in those cases. This related but separate bug
2551         is tracked in https://webkit.org/b/143628.
2552
2553         Tests: editing/pasteboard/paste-table-with-unrendered-text-nodes.html
2554
2555         * dom/Position.cpp:
2556         (WebCore::Position::downstream):
2557
2558 2015-04-11  Yusuke Suzuki  <utatane.tea@gmail.com>
2559
2560         [ES6] Enable Symbol in web pages
2561         https://bugs.webkit.org/show_bug.cgi?id=143375
2562
2563         Reviewed by Ryosuke Niwa.
2564
2565         * inspector/InspectorFrontendClientLocal.cpp:
2566         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2567
2568 2015-04-10  Roger Fong  <roger_fong@apple.com>
2569
2570         Hide volume controls when playing wirelessly.
2571         https://bugs.webkit.org/show_bug.cgi?id=143621.
2572         <rdar://problem/20490673>
2573
2574         Reviewed by Darin Adler.
2575
2576         * Modules/mediacontrols/mediaControlsApple.js:
2577         (Controller.prototype.updateWirelessPlaybackStatus):
2578
2579 2015-04-10  Alexey Proskuryakov  <ap@apple.com>
2580
2581         Build fix.
2582
2583         * WebCore.xcodeproj/project.pbxproj: Make LaunchServicesSPI.h a private header
2584         instead of project, as it's used in WebKit.
2585
2586 2015-04-08  Sam Weinig  <sam@webkit.org>
2587
2588         Allow LaunchServices to handle URLs on link navigations
2589         <rdar://problem/19446826>
2590         https://bugs.webkit.org/show_bug.cgi?id=143544
2591
2592         Reviewed by Anders Carlsson.
2593
2594         * WebCore.xcodeproj/project.pbxproj:
2595         * platform/spi/ios/LaunchServicesSPI.h: Added.
2596         Add new SPI header.
2597
2598 2015-04-10  Bem Jones-Bey  <bjonesbe@adobe.com>
2599
2600         Unreviewed, added CSS Shapes to features.json file.
2601
2602         * features.json:
2603
2604 2015-04-10  Andy Estes  <aestes@apple.com>
2605
2606         [Content Filtering] Support modifying request URLs
2607         https://bugs.webkit.org/show_bug.cgi?id=143599
2608         rdar://problem/20442560
2609
2610         Reviewed by Darin Adler.
2611
2612         Tests: contentfiltering/modify-request-url.html
2613                http/tests/contentfiltering/modify-redirect-request-url.html
2614
2615         Allow NEFilterSource to modifiy request URLs. Also teach MockContentFilter to do the same for testing.
2616
2617         * platform/cocoa/NetworkExtensionContentFilter.mm:
2618         (WebCore::NetworkExtensionContentFilter::willSendRequest): If NEFilterSource provided a string representing a
2619         valid URL in decisionInfo[NEFilterSourceOptionsRedirectURL], then used that as the request URL.
2620         * platform/spi/cocoa/NEFilterSourceSPI.h: Temporarily defined NEFilterSourceOptionsRedirectURL.
2621         * testing/MockContentFilter.cpp:
2622         (WebCore::MockContentFilter::willSendRequest): If settings() has a valid modifiedRequestURL, use it as the
2623         request URL. Only do so once MockContentFilter has reached its decision point so that both initial requests and
2624         redirect requests can be tested.
2625         * testing/MockContentFilterSettings.h: Added modifiedRequestURL.
2626         (WebCore::MockContentFilterSettings::modifiedRequestURL): Ditto.
2627         (WebCore::MockContentFilterSettings::setModifiedRequestURL): Ditto.
2628         * testing/MockContentFilterSettings.idl: Ditto.
2629
2630 2015-04-10  Zalan Bujtas  <zalan@apple.com>
2631
2632         showRenderTree: Include the render object to the inlinebox output.
2633         https://bugs.webkit.org/show_bug.cgi?id=143610
2634
2635         This helps to match the inlinebox and its renderer.
2636
2637         Reviewed by Antti Koivisto.
2638
2639         * rendering/InlineBox.cpp:
2640         (WebCore::InlineBox::showLineBox):
2641
2642 2015-04-09  Roger Fong  <roger_fong@apple.com>
2643
2644         Update wireless player placard for OSX.
2645         https://bugs.webkit.org/show_bug.cgi?id=143585.
2646         <rdar://problem/12067439>
2647
2648         Reviewed by Eric Carlson.
2649
2650         * Modules/mediacontrols/mediaControlsApple.css:
2651         Adjust button positioning and svg.
2652         (audio::-webkit-media-controls-wireless-playback-picker-button):
2653         (audio::-webkit-media-controls-wireless-playback-picker-button.playing):
2654         Style the wireless playback status placard, small and big versions.
2655         (audio::-webkit-media-controls-wireless-playback-status):
2656         (audio::-webkit-media-controls-wireless-playback-text):
2657         (audio::-webkit-media-controls-wireless-playback-text-top):
2658         (audio::-webkit-media-controls-wireless-playback-text-bottom):
2659         (audio::-webkit-media-controls-wireless-playback-status.small):
2660         (audio::-webkit-media-controls-wireless-playback-text-top.small):
2661         (audio::-webkit-media-controls-wireless-playback-text-bottom.small):
2662         * Modules/mediacontrols/mediaControlsApple.js:
2663         Add new wireless player placard elements.
2664         (Controller.prototype.createControls):
2665         (Controller.prototype.configureInlineControls):
2666         Make sure to switch between small and big placards when switching between fullscreen and small videos.
2667         (Controller.prototype.configureFullScreenControls):
2668         (Controller.prototype.handleFullscreenChange):
2669         (Controller.prototype.updateWirelessPlaybackStatus):
2670
2671 2015-04-10  Eric Carlson  <eric.carlson@apple.com>
2672
2673         [Mac] Refactor MediaPlaybackTarget
2674         https://bugs.webkit.org/show_bug.cgi?id=143571
2675
2676         Reviewed by Jer Noble.
2677
2678         * WebCore.xcodeproj/project.pbxproj:
2679         * dom/Document.cpp:
2680         (WebCore::Document::addPlaybackTargetPickerClient): Don't call client if page playback target
2681             is NULL.
2682         (WebCore::Document::didChoosePlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
2683         * dom/Document.h:
2684
2685         * html/HTMLMediaElement.cpp:
2686         (WebCore::HTMLMediaElement::setWirelessPlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
2687         * html/HTMLMediaElement.h:
2688
2689         * html/HTMLMediaSession.cpp:
2690         (WebCore::HTMLMediaSession::HTMLMediaSession): Don't initialize m_playbackTarget.
2691         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
2692         * html/HTMLMediaSession.h:
2693
2694         * page/Page.cpp:
2695         (WebCore::Page::Page):
2696         (WebCore::Page::playbackTarget): m_playbackTarget is a RefPtr<MediaPlaybackTarget>
2697         (WebCore::Page::didChoosePlaybackTarget): Ditto.
2698         * page/Page.h:
2699
2700         * platform/audio/MediaSession.h:
2701         (WebCore::MediaSessionClient::setWirelessPlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.
2702
2703         Make MediaPlaybackTarget RefCounted, and don't require it to be serializable so it can be
2704         subclassed to keep port-specific iformation out of the base class.
2705         * platform/graphics/MediaPlaybackTarget.h: 
2706         (WebCore::MediaPlaybackTarget::targetType):
2707         (WebCore::MediaPlaybackTarget::targetContext):
2708         (WebCore::MediaPlaybackTarget::hasActiveRoute):
2709         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget):
2710         (WebCore::MediaPlaybackTarget::setDevicePickerContext): Deleted.
2711         (WebCore::MediaPlaybackTarget::devicePickerContext): Deleted.
2712
2713         MediaPlaybackTargetContext is the struct that is serialized to pass across the process boudary.
2714         It has union to hold port-specific data.
2715         * platform/graphics/MediaPlaybackTargetContext.h: Added.
2716
2717         * platform/graphics/MediaPlaybackTargetPicker.h: didChoosePlaybackTarget takes a Ref<MediaPlaybackTarget>&&
2718         * platform/graphics/MediaPlaybackTargetPickerClient.h: Ditto.
2719         * platform/graphics/MediaPlayer.cpp:
2720         (WebCore::MediaPlayer::setWirelessPlaybackTarget): Ditto.
2721         * platform/graphics/MediaPlayer.h:
2722
2723         * platform/graphics/MediaPlayerPrivate.h:
2724         (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
2725
2726         * platform/graphics/avfoundation/MediaPlaybackTargetMac.h: Added.
2727         (WebCore::MediaPlaybackTargetMac::targetType):
2728         (WebCore::MediaPlaybackTargetMac::outputContext):
2729         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2730         (WebCore::MediaPlaybackTargetMac::create):
2731         (WebCore::MediaPlaybackTargetMac::MediaPlaybackTargetMac):
2732         (WebCore::MediaPlaybackTargetMac::~MediaPlaybackTargetMac):
2733         (WebCore::MediaPlaybackTargetMac::targetContext):
2734         (WebCore::MediaPlaybackTargetMac::hasActiveRoute):
2735         (WebCore::toMediaPlaybackTargetMac):
2736         (WebCore::MediaPlaybackTarget::encode): Deleted.
2737         (WebCore::MediaPlaybackTarget::decode): Deleted.
2738         (WebCore::MediaPlaybackTarget::hasActiveRoute): Deleted.
2739
2740         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2741         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Allocate and pass a MediaPlaybackTargetMac
2742         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2743
2744         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2745         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Take a Ref<MediaPlaybackTarget&&
2746
2747         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2748         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2749         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setWirelessPlaybackTarget): Ditto.
2750
2751         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2752         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2753         (WebCore::MediaPlayerPrivateQTKit::setWirelessPlaybackTarget): Ditto.
2754
2755 2015-04-09  Sergio Villar Senin  <svillar@igalia.com>
2756
2757         [CSS Grid Layout] Fix raw function pointer usages
2758         https://bugs.webkit.org/show_bug.cgi?id=143481
2759
2760         Reviewed by Antti Koivisto.
2761
2762         The argument list of
2763         resolveContentBasedTrackSizingFunctionsForItems() became too long
2764         and rather incomprehensible as it included up to 6 function
2765         pointers. This replaces all of them by an enum which describes the
2766         phase of the algorithm that is currently running. With that phase
2767         we have enough information to select the right function to call.
2768
2769         In order not to tangle up too much the method, the new explicit
2770         switch statements where moved to static helper functions.
2771
2772         No new tests as this is just a code refactoring.
2773
2774         * rendering/RenderGrid.cpp:
2775         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2776         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2777         (WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase): New helper function.
2778         (WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase): Ditto.
2779         (WebCore::RenderGrid::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase): Ditto.
2780         (WebCore::RenderGrid::updateTrackSizeForTrackSizeComputationPhase): Ditto.
2781         (WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase): Ditto.
2782         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2783         (WebCore::RenderGrid::distributeSpaceToTracks):
2784         * rendering/RenderGrid.h:
2785
2786 2015-04-10  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2787
2788         WebRTC: Remove AudioStreamTrack and VideoStreamTrack (removed in spec)
2789         https://bugs.webkit.org/show_bug.cgi?id=143336
2790
2791         Reviewed by Philippe Normand.
2792
2793         The specific MediaStreamTrakc types (AudioStreamTrack and VideoStreamTrack) have been
2794         removed from the Media Capture and Streams [1] specification.
2795
2796         [1] http://w3c.github.io/mediacapture-main/archives/20150324/getusermedia.html
2797
2798         There are no test for this feature to remove.
2799
2800         * CMakeLists.txt:
2801         * DerivedSources.make:
2802         * Modules/mediastream/AudioStreamTrack.cpp: Removed.
2803         * Modules/mediastream/AudioStreamTrack.h: Removed.
2804         * Modules/mediastream/AudioStreamTrack.idl: Removed.
2805         * Modules/mediastream/MediaStream.cpp:
2806         (WebCore::MediaStream::MediaStream):
2807         (WebCore::MediaStream::addRemoteTrack):
2808         (WebCore::MediaStream::active): Deleted.
2809         * Modules/mediastream/MediaStreamTrack.cpp:
2810         (WebCore::MediaStreamTrack::create):
2811         (WebCore::MediaStreamTrack::MediaStreamTrack):
2812         (WebCore::MediaStreamTrack::kind):
2813         (WebCore::MediaStreamTrack::clone):
2814         (WebCore::MediaStreamTrack::trackEnded): Deleted.
2815         * Modules/mediastream/MediaStreamTrack.h:
2816         * Modules/mediastream/VideoStreamTrack.cpp: Removed.
2817         * Modules/mediastream/VideoStreamTrack.h: Removed.
2818         * Modules/mediastream/VideoStreamTrack.idl: Removed.
2819         * WebCore.xcodeproj/project.pbxproj:
2820
2821 2015-04-09  Andy Estes  <aestes@apple.com>
2822
2823         [Cocoa] Add a HAVE(AVKIT) and use it
2824         https://bugs.webkit.org/show_bug.cgi?id=143593
2825
2826         Reviewed by David Kilzer.
2827
2828         * page/Settings.h: Only defined setAVKitEnabled() if HAVE(AVKIT).
2829         * platform/ios/WebVideoFullscreenControllerAVKit.mm: Only compiled if HAVE(AVKIT).
2830         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Ditto.
2831
2832 2015-04-09  Simon Fraser  <simon.fraser@apple.com>
2833
2834         Some CSS3 filters tests crash under iOS testing
2835         https://bugs.webkit.org/show_bug.cgi?id=143594
2836         rdar://problem/20491140
2837
2838         Reviewed by David Kilzer.
2839
2840         Some tests disable accelerated compositing via testRunner.overridePreference(). In this case,
2841         we'd not create a root scrolling tree node, so null-check it in AsyncScrollingCoordinator::updateNonFastScrollableRegion().
2842
2843         * page/scrolling/AsyncScrollingCoordinator.cpp:
2844         (WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
2845
2846 2015-04-09  Zalan Bujtas  <zalan@apple.com>
2847
2848         Simple line layout: Add <br> support.
2849         https://bugs.webkit.org/show_bug.cgi?id=139012
2850
2851         This patch enables RenderBlockFlows to use simple line layout on text content when <br> is present.
2852         Simple text with <br> is a fairly common pattern on discussion(forum)-like web pages. This patch reduces memory usage
2853         and speeds up layout for such content.
2854
2855         PerformanceTest/layout/line-layout-simple.html shows more than 2x speedup, when each paragraph is modified by appending <br> to the end.
2856         With <br> support enabled:
2857           mean: 70.02391461289068 runs/s
2858           median: 70.47986488932318 runs/s
2859
2860         While with <br> support disabled:
2861           mean: 30.417295049468184 runs/s
2862           median: 30.36517778760357 runs/s
2863
2864         Reviewed by Antti Koivisto.
2865
2866         Test: fast/text/simple-line-with-br.html
2867
2868         * editing/TextIterator.cpp:
2869         (WebCore::TextIterator::handleTextNode):
2870         * rendering/RenderBlock.h:
2871         * rendering/RenderBlockFlow.cpp:
2872         (WebCore::RenderBlockFlow::setSelectionState):
2873         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
2874         * rendering/RenderBlockFlow.h:
2875         * rendering/RenderLineBreak.cpp:
2876         (WebCore::simpleLineLayout):
2877         (WebCore::ensureLineBoxes):
2878         (WebCore::RenderLineBreak::deleteLineBoxesBeforeSimpleLineLayout):
2879         (WebCore::RenderLineBreak::positionForPoint):
2880         (WebCore::RenderLineBreak::setSelectionState):
2881         (WebCore::RenderLineBreak::linesBoundingBox):
2882         (WebCore::RenderLineBreak::absoluteRects):
2883         (WebCore::RenderLineBreak::absoluteQuads):
2884         (WebCore::RenderLineBreak::collectSelectionRects):
2885         * rendering/RenderLineBreak.h:
2886         * rendering/RenderText.cpp:
2887         (WebCore::RenderText::absoluteRects):
2888         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
2889         (WebCore::RenderText::absoluteQuads):
2890         (WebCore::RenderText::linesBoundingBox):
2891         (WebCore::RenderText::caretMinOffset):
2892         (WebCore::RenderText::caretMaxOffset):
2893         (WebCore::RenderText::containsCaretOffset):
2894         (WebCore::RenderText::hasRenderedText):
2895         * rendering/SimpleLineLayout.cpp:
2896         (WebCore::SimpleLineLayout::canUseFor):
2897         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
2898         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2899         (WebCore::SimpleLineLayout::consumeLineBreakIfNeeded):
2900         (WebCore::SimpleLineLayout::skipWhitespaceIfNeeded):
2901         (WebCore::SimpleLineLayout::firstFragment):
2902         (WebCore::SimpleLineLayout::forceFragmentToLine):
2903         (WebCore::SimpleLineLayout::createLineRuns):
2904         (WebCore::SimpleLineLayout::create):
2905         * rendering/SimpleLineLayoutFlowContents.cpp:
2906         (WebCore::SimpleLineLayout::initializeSegments):
2907         (WebCore::SimpleLineLayout::FlowContents::segmentForRenderer): Deleted.
2908         * rendering/SimpleLineLayoutFlowContents.h:
2909         * rendering/SimpleLineLayoutFunctions.cpp:
2910         (WebCore::SimpleLineLayout::paintFlow):
2911         (WebCore::SimpleLineLayout::hitTestFlow):
2912         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
2913         * rendering/SimpleLineLayoutResolver.cpp:
2914         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
2915         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
2916         (WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
2917         * rendering/SimpleLineLayoutResolver.h:
2918         (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode):
2919         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator--):
2920         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2921         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2922         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):
2923         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
2924         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2925         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2926         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLastInRenderer):
2927         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLineBreak):
2928         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isEmpty):
2929         (WebCore::SimpleLineLayout::TextFragmentIterator::isSoftLineBreak):
2930         (WebCore::SimpleLineLayout::TextFragmentIterator::isHardLineBreak):
2931         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak): Deleted.
2932
2933 2015-04-09  Chris Dumez  <cdumez@apple.com>
2934
2935         Regression(r182603): editing/selection/selection-invalid-offset.html is crashing
2936         https://bugs.webkit.org/show_bug.cgi?id=143591
2937
2938         Reviewed by Ryosuke Niwa.
2939
2940         Add missing null-check for m_frame->editor().client() in
2941         FrameSelection::updateAndRevealSelection().
2942
2943         * editing/FrameSelection.cpp:
2944         (WebCore::FrameSelection::updateAndRevealSelection):
2945
2946 2015-04-09  Sungmann Cho  <sungmann.cho@navercorp.com>
2947
2948         Minor cleanups to WebCore/plugins
2949         https://bugs.webkit.org/show_bug.cgi?id=143509
2950
2951         Reviewed by Anders Carlsson.
2952
2953         1. Remove unnecessary #includes.
2954         2. Fix some wrong namespace comments for consistency.
2955
2956         No new tests, no behavior change.
2957
2958         * plugins/DOMMimeType.cpp:
2959         * plugins/DOMMimeType.h:
2960         * plugins/DOMMimeTypeArray.h:
2961         * plugins/DOMPlugin.h:
2962         * plugins/DOMPluginArray.h:
2963         * plugins/PluginData.cpp:
2964         * plugins/PluginData.h:
2965         * plugins/PluginMainThreadScheduler.cpp:
2966         * plugins/PluginViewBase.h:
2967
2968 2015-04-09  Javier Fernandez  <jfernandez@igalia.com>
2969
2970         [CSS Grid Layout] Implement justify-self and justify-item css properties.
2971         https://bugs.webkit.org/show_bug.cgi?id=133281
2972
2973         Reviewed by David Hyatt.
2974
2975         Implement the new property 'justify-items', defined in the CSS Box Alignment
2976         specification to describe the container's alignment behavior, in the same way
2977         the 'align-items' property does. The 'justify-self' 'auto' value of any relative
2978         positioned element will be resolved to its container's 'justify-items' value.
2979
2980         Test: fast/css/parse-justify-items.html
2981
2982         * css/CSSComputedStyleDeclaration.cpp:
2983         (WebCore::resolveContainerAlignmentAuto): Function to resolve 'auto' values for 'align-items' or 'justify-items'.
2984         (WebCore::resolveSelfAlignmentAuto): Function to resolve 'auto' values for 'align-self' or 'justify-self'.
2985         (WebCore::valueForItemPositionWithOverflowAlignment): Take into account the 'legacy' keyword.
2986         (WebCore::ComputedStyleExtractor::propertyValue):
2987         (WebCore::resolveAlignmentAuto): Deleted (renamed to resolveContainerAlignmentAuto).
2988         * css/CSSParser.cpp:
2989         (WebCore::CSSParser::parseValue): Refactoring to share logic between justify-xxx and align-xxx properties.
2990         (WebCore::CSSParser::parseLegacyPosition): Parsing logic of 'legacy' keyword,
2991         (WebCore::CSSParser::parseItemPositionOverflowPosition): Take into account the 'legacy' keyword.
2992         * css/CSSParser.h:
2993         * css/CSSPropertyNames.in:
2994         * css/CSSValueKeywords.in:
2995         * css/StyleBuilderCustom.h:
2996         (WebCore::StyleBuilderCustom::applyInheritJustifyItems): Added.
2997         (WebCore::StyleBuilderCustom::applyInitialJustifyItems): Added.
2998         (WebCore::StyleBuilderCustom::applyValueJustifyItems): Added.
2999         * css/StyleResolver.cpp:
3000         (WebCore::StyleResolver::adjustRenderStyle): Resolve 'auto' values for justify-items when parents have the 'legacy' keyword.
3001         * rendering/style/RenderStyle.h: Managing the new ItemPositionType fields.
3002         * rendering/style/RenderStyleConstants.h: Added the ItemPositionType enumeration for handling the 'legacy' keyword.
3003         * rendering/style/StyleRareNonInheritedData.cpp: Managing the new ItemPositionType fields.
3004         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3005         (WebCore::StyleRareNonInheritedData::operator==):
3006         * rendering/style/StyleRareNonInheritedData.h:
3007
3008 2015-04-09  Anders Carlsson  <andersca@apple.com>
3009
3010         Make it possible to create an application cache storage with custom directories
3011         https://bugs.webkit.org/show_bug.cgi?id=143588
3012
3013         Reviewed by Sam Weinig.
3014
3015         Add cache directory and flat file directory name parameters to ApplicationCacheStorage::create.
3016
3017         * loader/appcache/ApplicationCacheStorage.cpp:
3018         (WebCore::ApplicationCacheStorage::store):
3019         (WebCore::ApplicationCacheStorage::loadCache):
3020         (WebCore::ApplicationCacheStorage::checkForDeletedResources):
3021         (WebCore::ApplicationCacheStorage::flatFileAreaSize):
3022         (WebCore::ApplicationCacheStorage::ApplicationCacheStorage):
3023         (WebCore::ApplicationCacheStorage::create):
3024         (WebCore::ApplicationCacheStorage::singleton):
3025         * loader/appcache/ApplicationCacheStorage.h:
3026
3027 2015-04-09  Myles C. Maxfield  <mmaxfield@apple.com>
3028
3029         Text-combine erroneously draws vertically after non-layout-causing style change
3030         https://bugs.webkit.org/show_bug.cgi?id=143461
3031         <rdar://problem/19285490>
3032
3033         Reviewed by Darin Adler.
3034
3035         RenderCombineText::styleDidChange() unconditionally uncombines its text. Layout then
3036         recombines it. However, if there is a style change that does not cause layout, the
3037         RenderCombineText will be left uncombined until the next layout.
3038
3039         Test: fast/text/text-combine-style-change-no-layout.html
3040
3041         * rendering/RenderCombineText.cpp:
3042         (WebCore::RenderCombineText::styleDidChange):
3043
3044 2015-04-09  Simon Fraser  <simon.fraser@apple.com>
3045
3046         Revert part of 182516: it broke tests
3047         https://bugs.webkit.org/show_bug.cgi?id=143568
3048         rdar://problem/20484578
3049
3050         Reviewed by Myles Maxfield.
3051
3052         Revert the FontCascadeCocoa parts of r182516, since it broke some CSS shapes tests.
3053
3054         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3055         (WebCore::FontCascade::drawGlyphs):
3056         (WebCore::dilationSizeForTextColor): Deleted.
3057
3058 2015-04-09  Zalan Bujtas  <zalan@apple.com>
3059
3060         Simple line layout(regression): Calling innerText on RenderFlow with multiple children is slow.
3061         https://bugs.webkit.org/show_bug.cgi?id=143554
3062
3063         Reviewed by Antti Koivisto.
3064
3065         Initialize render flow's segments only when the render flow changes in TextIterator.
3066         The included performance test shows 6x speedup. (from ~10 runs/sec to ~60 runs/sec)
3067
3068         Test: PerformanceTests/Layout/simple-line-layout-innertext.html.
3069
3070         * editing/TextIterator.cpp:
3071         (WebCore::TextIterator::handleTextNode):
3072         * editing/TextIterator.h:
3073         * rendering/SimpleLineLayoutFlowContents.cpp: Instruments log shows that vector's expandCapacity could be expensive when flow has large amount of children.
3074         (WebCore::SimpleLineLayout::initializeSegments):
3075
3076 2015-04-09  Chris Dumez  <cdumez@apple.com>
3077
3078         [WK2][iOS] editorState() should not cause a synchronous layout
3079         https://bugs.webkit.org/show_bug.cgi?id=142536
3080         <rdar://problem/20041506>
3081
3082         Reviewed by Enrica Casucci.
3083
3084         Add didChangeSelectionAndUpdateLayout() callback to EditorClient
3085         that is called at the end of FrameSelection::updateAndRevealSelection().
3086
3087         * editing/FrameSelection.cpp:
3088         (WebCore::FrameSelection::updateAndRevealSelection):
3089         * loader/EmptyClients.h:
3090         * page/EditorClient.h:
3091
3092 2015-04-08  Anders Carlsson  <andersca@apple.com>
3093
3094         Give each cache group a storage and use it in place of the singleton
3095         https://bugs.webkit.org/show_bug.cgi?id=143540
3096
3097         Reviewed by Sam Weinig.
3098
3099         This is another step towards making the cache storage be per page.
3100
3101         * loader/appcache/ApplicationCacheGroup.cpp:
3102         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
3103         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
3104         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
3105         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
3106         (WebCore::ApplicationCacheGroup::selectCache):
3107         (WebCore::ApplicationCacheGroup::makeObsolete):
3108         (WebCore::ApplicationCacheGroup::didReachMaxAppCacheSize):
3109         (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
3110         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
3111         * loader/appcache/ApplicationCacheGroup.h:
3112         * loader/appcache/ApplicationCacheStorage.cpp:
3113         (WebCore::ApplicationCacheStorage::loadCacheGroup):
3114         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
3115         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
3116         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
3117
3118 2015-04-09  Andy Estes  <aestes@apple.com>
3119
3120         Try to fix the Mac build after r182596.
3121
3122         I was wrong to replace PLATFORM(IOS) with HAVE(PARENTAL_CONTROLS) in ContentFilterUnblockHandler.
3123         The conditional should be HAVE(PARENTAL_CONTROLS) && PLATFORM(IOS).
3124
3125         * platform/ContentFilterUnblockHandler.h:
3126         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
3127         (WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler):
3128         (WebCore::ContentFilterUnblockHandler::needsUIProcess):
3129         (WebCore::ContentFilterUnblockHandler::encode):
3130         (WebCore::ContentFilterUnblockHandler::decode):
3131         (WebCore::ContentFilterUnblockHandler::canHandleRequest):
3132         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync):
3133
3134 2015-04-09  Andy Estes  <aestes@apple.com>
3135
3136         [Content Filtering] Add a HAVE(PARENTAL_CONTROLS) and use it
3137         https://bugs.webkit.org/show_bug.cgi?id=143559
3138
3139         Reviewed by David Kilzer.
3140
3141         * loader/ContentFilter.cpp:
3142         (WebCore::ContentFilter::types): Only registered ParentalControlsContentFilter if HAVE(PARENTAL_CONTROLS).
3143         * platform/ContentFilterUnblockHandler.h: Changed PLATFORM(IOS) to HAVE(PARENTAL_CONTROLS).
3144         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
3145         (WebCore::ContentFilterUnblockHandler::wrapWithDecisionHandler): Ditto.
3146         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Ditto.
3147         (WebCore::ContentFilterUnblockHandler::encode): Ditto.
3148         (WebCore::ContentFilterUnblockHandler::decode): Ditto.
3149         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Ditto.
3150         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Ditto.
3151         * platform/cocoa/ParentalControlsContentFilter.mm: Wrapped the file with HAVE(PARENTAL_CONTROLS)
3152
3153 2015-04-09  Sergio Villar Senin  <svillar@igalia.com>
3154
3155         Unreviewed, added CSS Grid Layout to features.json file.
3156
3157         * features.json:
3158
3159 2015-04-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3160
3161         [Streams API] Support the start function parameter in ReadableStream constructor
3162         https://bugs.webkit.org/show_bug.cgi?id=141160
3163
3164         Reviewed by Benjamin Poulain.
3165
3166         Stores the JS source object in ReadableStreamJSSource and calls its "start" function.
3167         This function takes a controller object that has three JS functions as members: close, enqueue and error.
3168         This controller is stored in ReadableStreamJSSource as it will be reused as "pull" parameter.
3169         All three JS functions do not currently do anything.
3170
3171         Test: streams/readablestream-start.html
3172
3173         * Modules/streams/ReadableStream.cpp:
3174         (WebCore::ReadableStream::start): Place holder for step 11 of https://streams.spec.whatwg.org/#rs-constructor.
3175         * Modules/streams/ReadableStream.h:
3176         * bindings/js/JSReadableStreamCustom.cpp:
3177         (WebCore::constructJSReadableStream):
3178         * bindings/js/ReadableStreamJSSource.cpp:
3179         (WebCore::getPropertyFromObject): Helper function to get a public property from an object.
3180         (WebCore::setPropertyToObject): Helper function to set a public property to an object.
3181         (WebCore::callFunction): Helper function to call a JS function from C++.
3182         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource):
3183         (WebCore::notImplementedFunction):
3184         (WebCore::createReadableStreamEnqueueFunction): Creates the JS function for enqueue.
3185         (WebCore::createReadableStreamCloseFunction): Creates the JS function for close.
3186         (WebCore::createReadableStreamErrorFunction): Creates the JS function for error.
3187         (WebCore::startReadableStreamAsync): Equivalent of promise resolution for start.
3188         (WebCore::ReadableStreamJSSource::start): Calls the "start" function of the JS source with all three JS functions (enqueue, close, error) as parameters.
3189         * bindings/js/ReadableStreamJSSource.h:
3190
3191 2015-04-08  Brent Fulgham  <bfulgham@apple.com>
3192
3193         [Mac] Unreviewed test fix after r182584
3194         https://bugs.webkit.org/show_bug.cgi?id=143452
3195
3196         Correct bit comparison to use the correct value for the Control-key
3197
3198         * platform/mac/PlatformEventFactoryMac.mm:
3199         (WebCore::typeForEvent):
3200
3201 2015-04-08  Simon Fraser  <simon.fraser@apple.com>
3202
3203         Add a debug assertion that will fire if we try to paint layer contents on a background thread
3204         https://bugs.webkit.org/show_bug.cgi?id=143547
3205
3206         Reviewed by Alexey Proskuryakov.
3207
3208         New assertion to catch cases where other frameworks erroneously trigger painting
3209         on a non-main (or non-Web) thread.
3210
3211         * platform/graphics/mac/WebLayer.mm:
3212         (-[WebSimpleLayer display]):
3213         (-[WebSimpleLayer drawInContext:]):
3214
3215 2015-04-08  Brent Fulgham  <bfulgham@apple.com>
3216
3217         [Mac] WebKit is not honoring OS preferences for secondary click behaviors
3218         https://bugs.webkit.org/show_bug.cgi?id=143452
3219         <rdar://problem/20437483>
3220
3221         Reviewed by Tim Horton.
3222
3223         We cannot rely on the event's button number to decide behavior. The OS settings might have
3224         mapped middle button to context menu, etc. Instead, we should ask the OS (via NSMenu) what
3225         the proper button press behavior is.
3226
3227         * platform/mac/PlatformEventFactoryMac.mm:
3228         (WebCore::mouseButtonForEvent): Ask NSMenu what kind of button press we have received.
3229
3230 2015-04-08  Michael Catanzaro  <mcatanzaro@igalia.com>
3231
3232         Fix -Wformat in AnimationBase.cpp
3233         https://bugs.webkit.org/show_bug.cgi?id=143541
3234
3235         Reviewed by Simon Fraser.
3236
3237         * page/animation/AnimationBase.cpp:
3238         (WebCore::nameForStateInput): Added. Converts an AnimationBase::AnimationStateInput to a
3239         string.
3240         (WebCore::AnimationBase::updateStateMachine): Print AnimationBase::AnimationStateInput as a
3241         string, instead of passing it to %d and assuming that works, to silence GCC's -Wformat.
3242
3243 2015-04-08  Brady Eidson  <beidson@apple.com>
3244
3245         Expose the "Share" menu for links, images, and media.
3246         <rdar://problem/20435340> and https://bugs.webkit.org/show_bug.cgi?id=143502
3247
3248         Reviewed by Tim Horton.
3249
3250         * loader/EmptyClients.h:
3251         * page/ContextMenuClient.h:
3252         (WebCore::ContextMenuClient::shareSelectedTextMenuItem): Deleted.
3253
3254         * page/ContextMenuController.cpp:
3255         (WebCore::ContextMenuController::populate):
3256         (WebCore::selectionContainsPossibleWord): Deleted.
3257         * page/ContextMenuController.h:
3258         (WebCore::ContextMenuController::page):
3259
3260         * platform/ContextMenuItem.cpp:
3261         (WebCore::ContextMenuItem::ContextMenuItem):
3262         (WebCore::ContextMenuItem::isNull):
3263         (WebCore::ContextMenuItem::shareMenuItem):
3264         (WebCore::ContextMenuItem::supportsShareMenu): Deleted.
3265         (WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.
3266         * platform/ContextMenuItem.h:
3267
3268         * platform/gtk/ContextMenuItemGtk.cpp:
3269         (WebCore::ContextMenuItem::shareMenuItem): Return a null item.
3270         (WebCore::ContextMenuItem::supportsShareMenu): Deleted.
3271         (WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.
3272
3273         * platform/mac/ContextMenuItemMac.mm:
3274         (WebCore::ContextMenuItem::shareMenuItem): Create a full-featured Share menu item instead of just for selected text.
3275         (WebCore::ContextMenuItem::supportsShareMenu): Deleted.
3276         (WebCore::ContextMenuItem::shareSelectedTextMenuItem): Deleted.
3277
3278         * rendering/HitTestResult.cpp:
3279         (WebCore::HitTestResult::selectedText): Instead of calculating selected text outside the HitTestResult, let the
3280           HitTestResult do what it does best: Calculate things!
3281         * rendering/HitTestResult.h:
3282
3283 2015-04-08  Per Arne Vollan  <peavo@outlook.com>
3284
3285         [Curl] Compile error in CurlCacheEntry::parseResponseHeaders method.
3286         https://bugs.webkit.org/show_bug.cgi?id=143531
3287
3288         Reviewed by Alex Christensen.
3289
3290         Cache related methods in ResourceResponse have changed return type.
3291
3292         * platform/network/curl/CurlCacheEntry.cpp:
3293         (WebCore::CurlCacheEntry::parseResponseHeaders):
3294
3295 2015-04-08  Anders Carlsson  <andersca@apple.com>
3296
3297         Remove ApplicationCacheGroup::m_isCopy
3298         https://bugs.webkit.org/show_bug.cgi?id=143536
3299
3300         Reviewed by Tim Horton.
3301
3302         Code that used to set m_isCopy to true is long gone.
3303
3304         * loader/appcache/ApplicationCache.cpp:
3305         (WebCore::ApplicationCache::~ApplicationCache):
3306         * loader/appcache/ApplicationCacheGroup.cpp:
3307         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
3308         (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup):
3309         * loader/appcache/ApplicationCacheGroup.h:
3310         (WebCore::ApplicationCacheGroup::isCopy): Deleted.
3311
3312 2015-04-08  Anders Carlsson  <andersca@apple.com>
3313
3314         Delete ApplicationCache static member functions
3315         https://bugs.webkit.org/show_bug.cgi?id=143534
3316
3317         Reviewed by Tim Horton.
3318
3319         * loader/appcache/ApplicationCache.cpp:
3320         (WebCore::ApplicationCache::deleteCacheForOrigin): Deleted.
3321         (WebCore::ApplicationCache::deleteAllCaches): Deleted.
3322         (WebCore::ApplicationCache::diskUsageForOrigin): Deleted.
3323         * loader/appcache/ApplicationCache.h:
3324
3325 2015-04-08  Alex Christensen  <achristensen@webkit.org>
3326
3327         Block popups from content extensions.
3328         https://bugs.webkit.org/show_bug.cgi?id=143497
3329
3330         Reviewed by Brady Eidson.
3331
3332         Test: http/tests/contentextensions/popups.html
3333
3334         * loader/ResourceLoadInfo.cpp:
3335         (WebCore::readResourceType):
3336         * loader/ResourceLoadInfo.h:
3337         * page/DOMWindow.cpp:
3338         (WebCore::DOMWindow::open):
3339         * page/UserContentController.cpp:
3340         (WebCore::UserContentController::actionsForResourceLoad):
3341         * page/UserContentController.h:
3342         Check content extensions before opening a window.
3343
3344 2015-04-08  Bem Jones-Bey  <bjonesbe@adobe.com>
3345
3346         [CSS Shapes] Properly handle negative reference box widths and center coordinates
3347         https://bugs.webkit.org/show_bug.cgi?id=142610
3348
3349         Reviewed by Rob Buis.
3350
3351         Fix a few cases where values that should not be negative end up that
3352         way.
3353
3354         This patch is based on a couple of Blink patches by Rob Buis.
3355
3356         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-circle-negative-radius-crash.html
3357                fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-negative-width-crash.html
3358
3359         * rendering/shapes/ShapeOutsideInfo.cpp:
3360         (WebCore::ShapeOutsideInfo::computeDeltasForContainingBlockLine): A
3361             negative margin box width means that the shape has no extent, so
3362             clamp to zero.
3363         * rendering/style/BasicShapes.cpp:
3364         (WebCore::BasicShapeCircle::floatValueForRadiusInBox): When computing
3365             the radii, take the absolute value, since the radii is based on
3366             the distance, which is always positive.
3367         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.
3368
3369 2015-04-08  Commit Queue  <commit-queue@webkit.org>
3370
3371         Unreviewed, rolling out r182522.
3372         https://bugs.webkit.org/show_bug.cgi?id=143529
3373
3374         Not needed any more (Requested by ap on #webkit).
3375
3376         Reverted changeset:
3377
3378         "Fix the build."
3379         http://trac.webkit.org/changeset/182522
3380
3381 2015-04-08  Beth Dakin  <bdakin@apple.com>
3382
3383         Force events should not require preventDefault in order to fire
3384         https://bugs.webkit.org/show_bug.cgi?id=143503
3385         -and corresponding-
3386         rdar://problem/20458916
3387
3388         Reviewed by Tim Horton.
3389
3390         Since these events will fire whether or not preventDefault was set on the 
3391         willBegin event, we should make sure we only send them when there are registered 
3392         event listeners. These are new events, so we don’t want to spam the vast majority 
3393         of web content that doesn’t use them yet.
3394         * dom/Document.cpp:
3395         (WebCore::Document::addListenerTypeIfNeeded):
3396         * dom/Document.h:
3397         * dom/Element.cpp:
3398         (WebCore::Element::dispatchMouseForceWillBegin):
3399         (WebCore::Element::dispatchMouseForceChanged):
3400         (WebCore::Element::dispatchMouseForceDown):
3401         (WebCore::Element::dispatchMouseForceUp):
3402         (WebCore::Element::dispatchMouseForceClick):
3403         (WebCore::Element::dispatchMouseForceCancelled):
3404
3405 2015-04-08  Jer Noble  <jer.noble@apple.com>
3406
3407         [Mac][WebAudio] Update the AVAudioMix in the AudioSourceProviderAVFObjC when the list of enabled audio tracks change.
3408         https://bugs.webkit.org/show_bug.cgi?id=143332
3409
3410         Reviewed by Eric Carlson.
3411
3412         Some media assets (notably, mp3s) will not have an enabled audio track when the AVAsset is
3413         first loaded, so the AVAudioMix will have no trackID in it's parameters. Whenever the list
3414         of enabled tracks change, recreate the AVAudioMix with the new first enabled audio trackID.
3415
3416         To facilitate this, add a new setter to AudioSourceProviderAVFObjC taking an AVAssetTrack to
3417         use with the AVAudioMix. Whenever this parameter changes, the AVAudioMix is destroyed and
3418         recreated.
3419
3420         * html/HTMLMediaElement.cpp:
3421         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Drive-by fix: when the media
3422             player switches engines, re-associate the audio source node with its provider.
3423         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
3424         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3425         (WebCore::AudioSourceProviderAVFObjC::setPlayerItem): Only create the mix if there is a valid AVPlayerItem and AVAssetTrack
3426         (WebCore::AudioSourceProviderAVFObjC::setAudioTrack): Ditto.
3427         (WebCore::AudioSourceProviderAVFObjC::createMix): Don't iterate over the AVPlayerItem's tracks,
3428             just use the one passed in through setAudioTrack().
3429         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3430         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Clear the provider's track.
3431         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Set the provider's track.
3432         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Ditto.
3433         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider): Ditto.
3434
3435 2015-04-08  Anders Carlsson  <andersca@apple.com>
3436
3437         Move some ApplicationCache static member functions to ApplicationCacheStorage
3438         https://bugs.webkit.org/show_bug.cgi?id=143524
3439
3440         Reviewed by Antti Koivisto.
3441
3442         This is yet another step towards eliminating ApplicationCacheStorage::singleton() and making the storage be per page instead.
3443
3444         * loader/appcache/ApplicationCache.cpp:
3445         (WebCore::ApplicationCache::deleteCacheForOrigin):
3446         (WebCore::ApplicationCache::deleteAllCaches):
3447         (WebCore::ApplicationCache::diskUsageForOrigin):
3448         * loader/appcache/ApplicationCacheStorage.cpp:
3449         (WebCore::ApplicationCacheStorage::deleteAllCaches):
3450         (WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
3451         (WebCore::ApplicationCacheStorage::diskUsageForOrigin):
3452         * loader/appcache/ApplicationCacheStorage.h:
3453
3454 2015-04-08  ChangSeok Oh  <changseok.oh@collabora.com>
3455
3456         Fill list style background with same color with that of list background.
3457         https://bugs.webkit.org/show_bug.cgi?id=143483
3458
3459         Reviewed by Simon Fraser.
3460
3461         LayoutListMarker does not have a node so its selectionBackgroundColor alway returns
3462         the default theme color for selection. We can make it more natural by filling
3463         the same color with that of LayoutListItem into it.
3464
3465         Tests: fast/backgrounds/selection-background-color-of-image-list-style.html
3466                fast/backgrounds/selection-background-color-of-list-style.html
3467
3468         * rendering/RenderListMarker.cpp:
3469         (WebCore::RenderListMarker::paint):
3470
3471 2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
3472
3473         Add CMake build system for WinCairo port.
3474         https://bugs.webkit.org/show_bug.cgi?id=115944
3475
3476         Reviewed by Chris Dumez.
3477
3478         * CMakeLists.txt:
3479         * PlatformWin.cmake:
3480         * PlatformWinCairo.cmake:
3481         * platform/graphics/texmap/TextureMapperGL.cpp:
3482         (WebCore::TextureMapperGL::TextureMapperGL):
3483
3484 2015-04-08  Chris Dumez  <cdumez@apple.com>
3485
3486         Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for clarity
3487         https://bugs.webkit.org/show_bug.cgi?id=143513
3488
3489         Reviewed by Andreas Kling.
3490
3491         Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for
3492         clarity as it is only used for the page cache. Also rename the
3493         'DocumentWillBecomeInactive' value of the ReasonForSuspension enum to
3494         'PageCache' as it is only used by CachedFrame for the page cache and it
3495         is a lot more understandable.
3496
3497 2015-04-08  Commit Queue  <commit-queue@webkit.org>
3498
3499         Unreviewed, rolling out r182536.
3500         https://bugs.webkit.org/show_bug.cgi?id=143523
3501
3502         Made accessibility/table-sections.html time out on debug bots
3503         (Requested by ap on #webkit).
3504
3505         Reverted changeset:
3506
3507         "Simple line layout: Add <br> support."
3508         https://bugs.webkit.org/show_bug.cgi?id=139012
3509         http://trac.webkit.org/changeset/182536
3510
3511 2015-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3512
3513         [GTK] Crash in DOMObjectCache when a wrapped object owned by the cache is unreffed by the user
3514         https://bugs.webkit.org/show_bug.cgi?id=143521
3515
3516         Reviewed by Martin Robinson.
3517
3518         This is a case we claim to support, but it only works if the
3519         object has only one reference. In that case, when the user unrefs
3520         it, the weak ref notify callback removes the object from the
3521         cache. However, if the object has more than one ref, the cache
3522         doesn't know the user unreffed it, and when clearing the cache we
3523         try to remove more references than what the object actually has,
3524         causing a crash in g_object_unref.
3525
3526         * bindings/gobject/DOMObjectCache.cpp:
3527         (WebKit::DOMObjectCacheData::clearObject):
3528
3529 2015-04-08  Zalan Bujtas  <zalan@apple.com>
3530
3531         Simple line layout: Add <br> support.
3532         https://bugs.webkit.org/show_bug.cgi?id=139012
3533
3534         This patch enables RenderBlockFlows to use simple line layout on text content when <br> is present.
3535         Simple text with <br> is a fairly common pattern on discussion(forum)-like web pages. This patch reduces memory usage
3536         and speeds up layout for such content.
3537
3538         PerformanceTest/layout/line-layout-simple.html shows more than 2x speedup, when each paragraph is modified by appending <br> to the end.
3539         With <br> support enabled:
3540           mean: 70.02391461289068 runs/s
3541           median: 70.47986488932318 runs/s
3542     
3543         While with <br> support disabled: 
3544           mean: 30.417295049468184 runs/s
3545           median: 30.36517778760357 runs/s
3546
3547         Reviewed by Antti Koivisto.
3548
3549         Test: fast/text/simple-line-with-br.html
3550
3551         * editing/TextIterator.cpp:
3552         (WebCore::TextIterator::handleTextNode):
3553         * rendering/RenderBlock.h:
3554         * rendering/RenderBlockFlow.cpp:
3555         (WebCore::RenderBlockFlow::setSelectionState):
3556         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
3557         * rendering/RenderBlockFlow.h:
3558         * rendering/RenderLineBreak.cpp:
3559         (WebCore::simpleLineLayout):
3560         (WebCore::ensureLineBoxes):
3561         (WebCore::RenderLineBreak::deleteLineBoxesBeforeSimpleLineLayout):
3562         (WebCore::RenderLineBreak::positionForPoint):
3563         (WebCore::RenderLineBreak::setSelectionState):
3564         (WebCore::RenderLineBreak::linesBoundingBox):
3565         (WebCore::RenderLineBreak::absoluteRects):
3566         (WebCore::RenderLineBreak::absoluteQuads):
3567         (WebCore::RenderLineBreak::collectSelectionRects):
3568         * rendering/RenderLineBreak.h:
3569         * rendering/SimpleLineLayout.cpp:
3570         (WebCore::SimpleLineLayout::canUseFor):
3571         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
3572         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3573         (WebCore::SimpleLineLayout::consumeLineBreakIfNeeded):
3574         (WebCore::SimpleLineLayout::skipWhitespaceIfNeeded):
3575         (WebCore::SimpleLineLayout::firstFragment):
3576         (WebCore::SimpleLineLayout::forceFragmentToLine):
3577         (WebCore::SimpleLineLayout::createLineRuns):
3578         (WebCore::SimpleLineLayout::create):
3579         * rendering/SimpleLineLayoutFlowContents.cpp:
3580         (WebCore::SimpleLineLayout::initializeSegments):
3581         (WebCore::SimpleLineLayout::FlowContents::segmentForRenderer): Deleted.
3582         * rendering/SimpleLineLayoutFlowContents.h:
3583         * rendering/SimpleLineLayoutFunctions.cpp:
3584         (WebCore::SimpleLineLayout::paintFlow):
3585         (WebCore::SimpleLineLayout::hitTestFlow):
3586         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
3587         * rendering/SimpleLineLayoutResolver.cpp:
3588         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
3589         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
3590         (WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
3591         * rendering/SimpleLineLayoutResolver.h:
3592         (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode):
3593         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator--):
3594         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3595         (WebCore::SimpleLineLayout::EndOfSegmentSetter::EndOfSegmentSetter):
3596         (WebCore::SimpleLineLayout::EndOfSegmentSetter::~EndOfSegmentSetter):
3597         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
3598         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
3599         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3600         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3601         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLastInRenderer):
3602         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isLineBreak):
3603         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isEmpty):
3604         (WebCore::SimpleLineLayout::TextFragmentIterator::isSoftLineBreak):
3605         (WebCore::SimpleLineLayout::TextFragmentIterator::isHardLineBreak):
3606         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak): Deleted.
3607
3608 2015-04-08  Philippe Normand  <pnormand@igalia.com>
3609
3610         [GStreamer] compress property for the HTTP source element
3611         https://bugs.webkit.org/show_bug.cgi?id=143518
3612
3613         Reviewed by Carlos Garcia Campos.
3614
3615         Added a compress property so the default behavior or not
3616         requesting content encoded to the server can be overridden if
3617         needed. This is useful for adaptive streaming playback.
3618
3619         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3620         (webKitWebSrcSetProperty):
3621         (webKitWebSrcGetProperty):
3622         (webKitWebSrcStart):
3623
3624 2015-04-08  Joonghun Park  <jh718.park@samsung.com>
3625
3626         Remove CSS functions min() and max() which had been dropped from specification
3627         https://bugs.webkit.org/show_bug.cgi?id=143440
3628
3629         Reviewed by Darin Adler.
3630
3631         No new tests, No Behavior changes.
3632
3633         * css/CSSCalculationValue.cpp:
3634         (WebCore::CSSCalcValue::create):
3635         * css/CSSParser.cpp:
3636         (WebCore::CSSParser::isCalculation):
3637
3638 2015-04-07  Philippe Normand  <pnormand@igalia.com>
3639
3640         [GStreamer] extra-headers and keep-alive properties for HTTP source element
3641         https://bugs.webkit.org/show_bug.cgi?id=143480
3642
3643         Reviewed by Carlos Garcia Campos.
3644
3645         Keep the resource loader around when persistent HTTP connection
3646         support is enabled. The keep-alive property is set to false by
3647         default. Also before sending the HTTP request we now check the
3648         contents of the extra-headers GstStructure and set additional
3649         headers based on the structure contents.
3650
3651         Patch inspired by GStreamer's souphttpsrc element.
3652
3653         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3654         (webkit_web_src_init):
3655         (webKitWebSrcFinalize):
3656         (webKitWebSrcSetProperty):
3657         (webKitWebSrcGetProperty):
3658         (webKitWebSrcStop): Clear resource loader only for non-persistent connections.
3659         (webKitWebSrcSetExtraHeader): Utility function to append headers
3660         to an existing request based on a GValue contents.
3661         (webKitWebSrcProcessExtraHeaders): Parse a GValue and set headers
3662         based on its contents.
3663         (webKitWebSrcStart): Extra headers and persistent connection
3664         support. The resource loader is now lazily initialized here.
3665
3666 2015-04-07  Simon Fraser  <simon.fraser@apple.com>
3667
3668         Fix the build.
3669
3670         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3671         (WebCore::FontCascade::drawGlyphs):
3672         * platform/spi/cg/CoreGraphicsSPI.h:
3673
3674 2015-04-07  Chris Dumez  <cdumez@apple.com>
3675
3676         Unreviewed, another iOS build fix after r182516.
3677
3678         I missed another use of __MAC_OS_X_VERSION_MIN_REQUIRED without a
3679         PLATFORM(MAC) check.
3680
3681         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3682
3683 2015-04-07  Michael Peechatt  <mpeechatt@gmail.com>
3684
3685         Bug 142887 - role progress bar does not support indeterminate state
3686         https://bugs.webkit.org/show_bug.cgi?id=142887
3687
3688         Reviewed by Chris Fleizach.
3689
3690         Test: platform/mac/accessibility/progressbar-indeterminate.html
3691
3692         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3693         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3694         When getting min or max value of an indeterminate progress indicator, return 0.
3695         This is so VoiceOver will recognize it as indeterminate.
3696
3697 2015-04-07  Chris Dumez  <cdumez@apple.com>
3698
3699         Unreviewed, speculative iOS build fix after r182516.
3700
3701         Add #if PLATFORM(MAC) checks.
3702
3703         * platform/spi/cg/CoreGraphicsSPI.h:
3704
3705 2015-04-07  Simon Fraser  <simon.fraser@apple.com>
3706
3707         Try to fix incremental builds by forcing *InternalSettings* to get
3708         regenerated.
3709
3710         * testing/InternalSettings.idl:
3711
3712 2015-04-07  Chris Dumez  <cdumez@apple.com>
3713
3714         Open WebSockets should not prevent a page from entering PageCache
3715         https://bugs.webkit.org/show_bug.cgi?id=143505
3716         <rdar://problem/19923085>
3717
3718         Reviewed by Alexey Proskuryakov.
3719
3720         Open WebSockets should not prevent a page from entering PageCache. This
3721         is currently causing mobile.nytimes.com to not be page-cacheable.
3722
3723         In this patch, We close open WebSockets when entering the page cache
3724         and fire the "close" events after resuming, similarly to what we did
3725         for XMLHttpRequest in r181480. This gives a chance for the content to
3726         handle the 'close' event (with wasClean being false and code being
3727         1006) in order to reopen the connection if necessary.
3728
3729         Test: http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html
3730
3731         * Modules/websockets/WebSocket.cpp:
3732         (WebCore::WebSocket::WebSocket):
3733         (WebCore::WebSocket::canSuspend):
3734         (WebCore::WebSocket::suspend):
3735         (WebCore::WebSocket::resume):
3736         (WebCore::WebSocket::resumeTimerFired):
3737         (WebCore::WebSocket::didClose):
3738         * Modules/websockets/WebSocket.h:
3739
3740 2015-04-07  Simon Fraser  <simon.fraser@apple.com>
3741
3742         Add experimental code to use custom font dilation when rendering into non-opaque contexts
3743         https://bugs.webkit.org/show_bug.cgi?id=143508
3744
3745         Reviewed by Sam Weinig.
3746
3747         Add GraphicsContext::setAntialiasedFontDilationEnabled(), and set it to true
3748         when rendering into a compositing layer which is not opaque (at the same location
3749         where we disable font smoothing).
3750
3751         If Settings::antialiasedFontDilationEnabled() is true, when rendering non-smoothed
3752         text (and if CSS hasn't opted into antialiased mode), use custom font dilation
3753         parameters, chosen using a light/medium/dark heuristic, to make this text
3754         match more closely with LCD-smoothed text.
3755
3756         * page/Settings.cpp:
3757         (WebCore::Settings::Settings):
3758         (WebCore::Settings::setAntialiasedFontDilationEnabled): Set global state
3759         in FontCascade (which can't easily get at Settings). This it not ideal,
3760         but is temporary.
3761         * page/Settings.h:
3762         (WebCore::Settings::antialiasedFontDilationEnabled):
3763         * page/Settings.in: Can't autogenerate this setting any more.
3764         * platform/graphics/FontCascade.cpp:
3765         (WebCore::FontCascade::setAntialiasedFontDilationEnabled): Set the global.
3766         (WebCore::FontCascade::antialiasedFontDilationEnabled):
3767         * platform/graphics/FontCascade.h:
3768         * platform/graphics/GraphicsContext.cpp:
3769         (WebCore::GraphicsContext::setAntialiasedFontDilationEnabled): Set graphics state
3770         to say that we should do dilation of antialiased text.
3771         * platform/graphics/GraphicsContext.h:
3772         (WebCore::GraphicsContextState::GraphicsContextState):
3773         (WebCore::GraphicsContext::antialiasedFontDilationEnabled):
3774         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3775         (PlatformCALayer::drawLayerContents): If the layer is not opaque, enable the
3776         dilated text code path.
3777         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3778         (WebCore::dilationSizeForTextColor): Heuristic (values chosen empirically) to
3779         computed custom dilation based on foreground color.
3780         (WebCore::FontCascade::drawGlyphs): Set the custom dilation parameters, and the
3781         antialiasing state if we're not doing smoothing, and CSS hasn't opted into the
3782         antialiased path.
3783         * platform/spi/cg/CoreGraphicsSPI.h: New SPI.
3784
3785 2015-04-07  Commit Queue  <commit-queue@webkit.org>
3786
3787         Unreviewed, rolling out r182511.
3788         https://bugs.webkit.org/show_bug.cgi?id=143507
3789
3790         caused debug test failures (Requested by alexchristensen on
3791         #webkit).
3792
3793         Reverted changeset:
3794
3795         "Block popups from content extensions."
3796         https://bugs.webkit.org/show_bug.cgi?id=143497
3797         http://trac.webkit.org/changeset/182511
3798
3799 2015-04-07  Myles C. Maxfield  <mmaxfield@apple.com>
3800
3801         [Cocoa] System fonts do not get correct tracking
3802         https://bugs.webkit.org/show_bug.cgi?id=143395
3803
3804         Reviewed by Ryosuke Niwa.
3805
3806         Inside FontPlatformData, we have two CTFonts. If the user has specified
3807         -webkit-system-font, we will pass in a CTFont, and the FontPlatformData
3808         will wrap it. However, we will then roundtrip through CGFont in order
3809         to create a second CTFont. We were basing our tracking and system
3810         font knowledge off of this round-tripped font instead of the original font.
3811
3812         Note that this design is terrible and needs to be overhauled.
3813         FontPlatformData should only have a single platform font inside it.
3814
3815         This patch also caches whether or not a font is a system font.
3816
3817         No new tests because it is impossible to test the tracking of the
3818         system font in a robust way.
3819
3820         * platform/graphics/Font.cpp:
3821         (WebCore::Font::Font): Rearrange member variables.
3822         * platform/graphics/Font.h: Move member variables around for better
3823         packing, and cache whether or not the font is a system font.
3824         * platform/graphics/FontData.h: Add comment
3825         * platform/graphics/cocoa/FontCocoa.mm:
3826         (WebCore::Font::platformInit): Cache whether or not the font is a system
3827         font.
3828         (WebCore::hasCustomTracking): Use cached value.
3829         (WebCore::canUseFastGlyphAdvanceGetter):
3830         (WebCore::Font::platformWidthForGlyph):
3831
3832 2015-04-07  Alex Christensen  <achristensen@webkit.org>
3833
3834         Block popups from content extensions.
3835         https://bugs.webkit.org/show_bug.cgi?id=143497
3836
3837         Reviewed by Brady Eidson.
3838
3839         Test: http/tests/contentextensions/popups.html
3840
3841         * loader/ResourceLoadInfo.cpp:
3842         (WebCore::readResourceType):
3843         * loader/ResourceLoadInfo.h:
3844         * page/DOMWindow.cpp:
3845         (WebCore::DOMWindow::open):
3846         * page/UserContentController.cpp:
3847         (WebCore::UserContentController::actionsForResourceLoad):
3848         * page/UserContentController.h:
3849         Check content extensions before opening a window.
3850
3851 2015-04-07  Benjamin Poulain  <benjamin@webkit.org>
3852
3853         Get the features.json files ready for open contributions
3854         https://bugs.webkit.org/show_bug.cgi?id=143436
3855
3856         Reviewed by Darin Adler.
3857
3858         * features.json:
3859
3860 2015-04-07  Alex Christensen  <achristensen@webkit.org>
3861
3862         More unreviewed fixing API tests.
3863
3864         * contentextensions/ContentExtensionsBackend.cpp:
3865         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3866         Don't check for javascript protocol.
3867
3868 2015-04-07  Eric Carlson  <eric.carlson@apple.com>
3869
3870         [Mac] never update caption user style sheet during parsing
3871         https://bugs.webkit.org/show_bug.cgi?id=143499
3872
3873         Reviewed by Jer Noble.
3874
3875         * page/CaptionUserPreferencesMediaAF.cpp:
3876         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
3877         (WebCore::CaptionUserPreferencesMediaAF::captionPreferencesChanged):  Ignore a
3878             "preferences changed" notification fired while registering for said notification, we 
3879             already create and insert the style sheet after a brief delay anyway.
3880         * page/CaptionUserPreferencesMediaAF.h:
3881
3882 2015-04-07  Alex Christensen  <achristensen@webkit.org>
3883
3884         [Win] Unreviewed build fix after r182494.
3885
3886         * platform/win/ContextMenuItemWin.cpp:
3887         (WebCore::ContextMenuItem::ContextMenuItem): Deleted.
3888
3889 2015-04-07  Alex Christensen  <achristensen@webkit.org>
3890
3891         Unreviewed fixing API tests.
3892
3893         * contentextensions/ContentExtensionsBackend.cpp:
3894         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3895         * platform/URL.cpp:
3896         (WebCore::URL::init):
3897         * platform/URL.h:
3898         (WebCore::URL::protocolIsData):
3899         (WebCore::URL::protocolIsJavaScript): Deleted.
3900         Revert part of r182492 that changed URL.h.
3901
3902 2015-04-07  Anders Carlsson  <andersca@apple.com>
3903
3904         More work on making the application cache storage be per page
3905         https://bugs.webkit.org/show_bug.cgi?id=143498
3906
3907         Reviewed by Andreas Kling.
3908
3909         * loader/appcache/ApplicationCacheStorage.cpp:
3910         (WebCore::ApplicationCacheStorage::create):
3911         (WebCore::ApplicationCacheStorage::singleton):
3912         * loader/appcache/ApplicationCacheStorage.h:
3913         * page/Page.cpp:
3914         (WebCore::Page::Page):
3915         * page/Page.h:
3916         (WebCore::Page::applicationCacheStorage):
3917         * page/PageConfiguration.cpp:
3918         (WebCore::PageConfiguration::PageConfiguration): Deleted.
3919         * page/PageConfiguration.h:
3920
3921 2015-04-07  Matthew Mirman  <mmirman@apple.com>
3922
3923         Source and stack information should get appended only to native errors
3924         and should be added directly after construction rather than when thrown.
3925         This fixes frozen objects being unfrozen when thrown while conforming to 
3926         ecma script standard and other browser behavior.
3927         rdar://problem/19927293
3928         https://bugs.webkit.org/show_bug.cgi?id=141871
3929         
3930         Reviewed by Geoffrey Garen.
3931
3932         Covered by existing tests.
3933         
3934         Sets line, column, source and stack information for DOMExceptions as 
3935         expected by the webinspector for native errors.
3936         
3937         * bindings/js/JSDOMBinding.cpp:
3938         (WebCore::setDOMException):
3939
3940 2015-04-07  Brady Eidson  <beidson@apple.com>
3941
3942         ContextMenuItem refactoring
3943         https://bugs.webkit.org/show_bug.cgi?id=143485
3944
3945         Reviewed by Beth Dakin.
3946
3947         * platform/ContextMenuItem.h:
3948         (WebCore::ContextMenuItem::isNull):
3949
3950         * platform/gtk/ContextMenuItemGtk.cpp:
3951         (WebCore::ContextMenuItem::ContextMenuItem):
3952
3953         * platform/mac/ContextMenuItemMac.mm:
3954         (WebCore::ContextMenuItem::ContextMenuItem):
3955         (WebCore::ContextMenuItem::platformDescription):
3956         (WebCore::ContextMenuItem::setSubMenu):
3957         (WebCore::ContextMenuItem::releasePlatformDescription): Deleted.
3958         (WebCore::ContextMenuItem::getPlatformDescription): Deleted.
3959
3960         * platform/mac/ContextMenuMac.mm:
3961         (WebCore::ContextMenu::appendItem):
3962         (WebCore::ContextMenu::insertItem):
3963         (WebCore::platformMenuDescription):
3964
3965         * platform/win/ContextMenuItemWin.cpp:
3966         (WebCore::ContextMenuItem::ContextMenuItem):
3967
3968 2015-04-07  Alex Christensen  <achristensen@webkit.org>
3969
3970         Optimize content extensions interpreting speed.
3971         https://bugs.webkit.org/show_bug.cgi?id=143490
3972
3973         Reviewed by Brady Eidson.
3974
3975         * contentextensions/ContentExtensionCompiler.cpp:
3976         (WebCore::ContentExtensions::compileRuleList):
3977         * contentextensions/ContentExtensionsBackend.cpp:
3978         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3979         Measure total time added by content extensions.
3980         * contentextensions/DFABytecodeCompiler.cpp:
3981         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
3982         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
3983         When jumping to the root, don't re-add all the actions.
3984         * contentextensions/DFABytecodeCompiler.h:
3985         * platform/URL.cpp:
3986         (WebCore::URL::init):
3987         * platform/URL.h:
3988         (WebCore::URL::protocolIsJavaScript): Added.
3989
3990 2015-04-07  Simon Fraser  <simon.fraser@apple.com>
3991
3992         Add a new setting, AntialiasedFontDilationEnabled, exposed via WK2.
3993         https://bugs.webkit.org/show_bug.cgi?id=143495
3994
3995         Reviewed by Tim Horton.
3996
3997         Add a new Setting, antialiasedFontDilationEnabled, which defaults to true. This 
3998         will be used in an upcoming patch.
3999
4000         * page/Settings.in:
4001
4002 2015-04-07  Andy Estes  <aestes@apple.com>
4003