<attachment> label can get very wide, doesn't wrap/truncate
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-03  Timothy Horton  <timothy_horton@apple.com>
2
3         <attachment> label can get very wide, doesn't wrap/truncate
4         https://bugs.webkit.org/show_bug.cgi?id=142214
5         <rdar://problem/19982499>
6
7         Reviewed by Simon Fraser.
8
9         Test: fast/attachment/attachment-label-highlight.html
10
11         * rendering/RenderThemeMac.h:
12         * rendering/RenderThemeMac.mm:
13         (WebCore::labelTextColorForAttachment):
14         (WebCore::AttachmentLayout::addLine):
15         (WebCore::AttachmentLayout::layOutText):
16         (WebCore::AttachmentLayout::AttachmentLayout):
17         Make it possible to lay out multiple lines of label text.
18         We lay out the whole string normally, but then only draw N (where N=1 for now,
19         but is adjustable) of the lines. The remainder of the string is then
20         merged into a single line, which is middle-truncated with an ellipsis
21         and drawn in place of the N+1 line.
22
23         (WebCore::addAttachmentLabelBackgroundRightCorner):
24         (WebCore::addAttachmentLabelBackgroundLeftCorner):
25         (WebCore::paintAttachmentLabelBackground):
26         Wrap the label background around the multiple lines of text with curved edges.
27         We run first down the right side of the label, determining whether to use
28         concave or convex arcs based on the relative widths of adjacent lines.
29         Then, we run back up the left side of the label doing the same thing.
30
31         If the background rects of two lines are very similar (within the rounded rect radius),
32         they will be expanded to the larger of the two, because otherwise the arcs
33         look quite wrong.
34
35         (WebCore::paintAttachmentLabel):
36         Draw the label with CoreText directly instead of bothering with WebCore
37         text layout primitives. There's no need, and it makes wrapping much more complicated.
38
39         (WebCore::RenderThemeMac::paintAttachment):
40         (WebCore::RenderThemeMac::paintAttachmentLabelBackground): Deleted.
41         (WebCore::RenderThemeMac::paintAttachmentLabel): Deleted.
42
43 2015-03-03  Simon Fraser  <simon.fraser@apple.com>
44
45         Avoid applying the clip-path when painting, if a layer also has a shape layer mask
46         https://bugs.webkit.org/show_bug.cgi?id=142212
47
48         Reviewed by Zalan Bujtas.
49
50         After r180882 we translate clip-path into a composited shape mask when the layer
51         is composited. However, we were also still applying the clip-path when painting
52         the layer contents.
53         
54         Now, we set the GraphicsLayer bits GraphicsLayerPaintClipPath and GraphicsLayerPaintMask
55         only for the m_maskLayer's painting. This translate into setting PaintLayerPaintingCompositingMaskPhase
56         and PaintLayerPaintingCompositingClipPathPhase only when painting that same mask layer,
57         rather than always. To ensure that masks and clip-path get applied for software paints,
58         add shouldPaintMask() and shouldApplyClipPath() that return true for non-composited layers,
59         and when doing a flattening paint.
60
61         * rendering/RenderLayer.cpp:
62         (WebCore::RenderLayer::paintLayerContents): Use shouldApplyClipPath().
63         Pull three chunks of code under a single "if (shouldPaintContent && !selectionOnly)" condition.
64         The condition for paintChildClippingMaskForFragments() is changed slightly; we need to call this
65         only when painting the clip-path/mask layer contents, but also only when there is no mask to fill
66         the clipped area for us.
67         (WebCore::RenderLayer::calculateClipRects):
68         (WebCore::RenderLayer::paintsWithClipPath): Deleted.
69         * rendering/RenderLayer.h:
70         * rendering/RenderLayerBacking.cpp:
71         (WebCore::RenderLayerBacking::updateMaskingLayer): Be sure to set the GraphicsLayerPaintClipPath bit
72         when having a mask forces us onto the painting path.
73
74 2015-03-03  Anders Carlsson  <andersca@apple.com>
75
76         Use the correct display name for website data for local files
77         https://bugs.webkit.org/show_bug.cgi?id=142228
78
79         Reviewed by Dan Bernstein.
80
81         * English.lproj/Localizable.strings:
82         Add local file display name.
83
84         * platform/spi/cf/CFNetworkSPI.h:
85         Add kCFHTTPCookieLocalFileDomain declaration.
86
87 2015-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
88
89         BreakingContext cleanup
90         https://bugs.webkit.org/show_bug.cgi?id=142146
91
92         Reviewed by Dean Jackson.
93
94         1. Use commitLineBreakAtCurrentWidth() instead of directly
95         updating m_width and m_lineBreak, because the name makes the
96         intent clearer.
97         2. Remove duplicate function LineBreaker::nextSegmentBreak().
98         3. lineStyle() takes care of inspecting RenderText's parent's
99         style.
100         4. Add FIXME to BreakingContext::initializeForCurrentObject()
101         because it seems like we are ignoring first-line style for
102         some properties.
103
104         No new tests because there is no behavior change.
105
106         * rendering/line/BreakingContextInlineHeaders.h:
107         (WebCore::BreakingContext::BreakingContext):
108         (WebCore::BreakingContext::initializeForCurrentObject):
109         (WebCore::BreakingContext::handleReplaced):
110         (WebCore::BreakingContext::handleText):
111         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
112         (WebCore::BreakingContext::handleEndOfLine):
113         * rendering/line/LineBreaker.cpp:
114         (WebCore::LineBreaker::nextLineBreak): Deleted.
115         (WebCore::LineBreaker::nextSegmentBreak): Deleted.
116         * rendering/line/LineBreaker.h:
117         * rendering/line/LineInlineHeaders.h:
118         (WebCore::lineStyle):
119
120 2015-03-03  Chris Dumez  <cdumez@apple.com>
121
122         Make AudioContext suspendable when it is not rendering
123         https://bugs.webkit.org/show_bug.cgi?id=142210
124         <rdar://problem/19923085>
125
126         Reviewed by Eric Carlson.
127
128         Make AudioContext suspendable when it is not rendering to increase the
129         likelihood of entering the PageCache for pages using WebAudio.
130
131         This patch adds a state member to AudioContext with 3 possible states:
132         Suspended / Running / Closed, as defined in the specification:
133         http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
134
135         This state is used to decide if we can suspend the page or not. We
136         can safely suspend if the AudioContext's state is suspended (did not
137         start rendering) or closed (Stopped rendering).
138
139         Note that this patch does not expose the AudioContext's state to the
140         Web yet, even though it is exposed in the latest specification.
141
142         Tests: fast/history/page-cache-closed-audiocontext.html
143                fast/history/page-cache-running-audiocontext.html
144                fast/history/page-cache-suspended-audiocontext.html
145
146         * Modules/webaudio/AudioContext.cpp:
147         (WebCore::AudioContext::AudioContext):
148         (WebCore::AudioContext::uninitialize):
149         (WebCore::AudioContext::canSuspend):
150         (WebCore::AudioContext::startRendering):
151         (WebCore::AudioContext::fireCompletionEvent):
152         * Modules/webaudio/AudioContext.h:
153
154 2015-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
155
156         [SOUP] Use SoupMessage::starting instead of SoupSession::request-started
157         https://bugs.webkit.org/show_bug.cgi?id=142164
158
159         Reviewed by Sergio Villar Senin.
160
161         SoupSession::request-started is deprecated in libsoup 2.50. Both
162         signals are equivalent, but SoupMessage::starting is also emitted
163         for resources loaded from the disk cache. This fixes web timing
164         calculations for cached resources, since we were not initializing
165         m_requestStart.
166
167         * platform/network/soup/ResourceHandleSoup.cpp:
168         (WebCore::startingCallback):
169         (WebCore::createSoupMessageForHandleAndRequest):
170         * platform/network/soup/SoupNetworkSession.cpp:
171         (WebCore::SoupNetworkSession::SoupNetworkSession):
172
173 2015-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
174
175         [SOUP] Synchronous XMLHttpRequests can time out when we reach the max connections limit
176         https://bugs.webkit.org/show_bug.cgi?id=141508
177
178         Reviewed by Sergio Villar Senin.
179
180         Use SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS flag when loading a
181         synchronous message instead of increasing the maximum number of
182         connections allowed if the soup version is recent enough.
183         The current solution of increasing/decreasing the limits doesn't
184         always work, because connections are not marked as IDLE in libsoup
185         until the message is unqueued, but we don't wait for the message
186         to be unqueued to finish our loads in WebKit, we finish them as
187         soon as we have finished reading the stream. This causes that
188         synchronous loads keep blocked in the nested main loop until the
189         timeout of 10 seconds is fired and the load fails.
190         Also marked WebCoreSynchronousLoader class as final, the virtual
191         methods as override and removed the unsused method isSynchronousClient.
192
193         * platform/network/soup/ResourceHandleSoup.cpp:
194         (WebCore::createSoupMessageForHandleAndRequest):
195         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
196         (WebCore::WebCoreSynchronousLoader::isSynchronousClient): Deleted.
197         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
198         (WebCore::WebCoreSynchronousLoader::didReceiveData):
199         (WebCore::WebCoreSynchronousLoader::didReceiveBuffer):
200         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
201         (WebCore::WebCoreSynchronousLoader::didFail):
202         (WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge):
203         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
204
205 2015-03-02  David Kilzer  <ddkilzer@apple.com>
206
207         [iOS] Disable -Wdeprecated-declaration warnings in WebVideoFullscreenInterfaceAVKit.mm
208
209         Fixing the deprecations is tracked by: <rdar://problem/20018692>
210
211         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
212         (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized):
213         Ignore -Wdeprecated-declaration warnings via clang pragmas.
214
215 2015-03-02  Commit Queue  <commit-queue@webkit.org>
216
217         Unreviewed, rolling out r180902.
218         https://bugs.webkit.org/show_bug.cgi?id=142205
219
220         It broke scrolling in some cases. See bug 142202 for details.
221         (Requested by bdash on #webkit).
222
223         Reverted changeset:
224
225         "Move scroll animating functions from ScrollAnimator to
226         ScrollController"
227         https://bugs.webkit.org/show_bug.cgi?id=142102
228         http://trac.webkit.org/changeset/180902
229
230 2015-03-02  Commit Queue  <commit-queue@webkit.org>
231
232         Unreviewed, rolling out r180911.
233         https://bugs.webkit.org/show_bug.cgi?id=142204
234
235         The tests it added are crashing (Requested by bdash on
236         #webkit).
237
238         Reverted changeset:
239
240         "Add a microtask abstraction"
241         https://bugs.webkit.org/show_bug.cgi?id=137496
242         http://trac.webkit.org/changeset/180911
243
244 2015-03-02  Yoav Weiss  <yoav@yoav.ws>
245
246         Add a microtask abstraction
247         https://bugs.webkit.org/show_bug.cgi?id=137496
248
249         Reviewed by Sam Weinig.
250
251         This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
252         That abstraction is required in order to enable async loading of images,
253         which is in turn required to enable support for the picture element, as well as
254         to make sure that the order of properties set on HTMLImageElement has no implications.
255
256         * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
257         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
258         * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
259         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
260         * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
261         * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
262         * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
263         (WebCore::MicroTask::~MicroTask):
264         (WebCore::MicroTask::run): Run the microtask.
265         * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
266         (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
267         (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
268         (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
269         * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
270         (WebCore::ScriptRunner::timerFired):
271         * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
272         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
273         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
274         (WebCore::HTMLScriptRunner::runScript):
275         * testing/Internals.cpp: Add a method to queue a test microtask.
276         (WebCore::Internals::queueMicroTask):
277         * testing/Internals.h: Add a method to queue a test microtask.
278         (WebCore::Internals::queueMicroTask):
279         * testing/Internals.idl: Expose test microtask queueing to test JS.
280         * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
281         (WebCore::MicroTaskTest::run): Run the microtask
282         (WebCore::MicroTaskTest::create): Create a test microtask.
283         * testing/MicroTaskTest.h: Add a test class that implements a microtask.
284         (WebCore::MicroTaskTest::run):
285         (WebCore::MicroTaskTest::create):
286
287 2015-03-02  Jeremy Jones  <jeremyj@apple.com>
288
289         RenderVideo should not paint the video frame when video is fullscreen.
290         https://bugs.webkit.org/show_bug.cgi?id=142097
291
292         Reviewed by Eric Carlson.
293
294         For performance and correctness, RenderVideo should not paint the current video frame
295         inline when video is fullscreen. This happens when snapshots are taken and can have a
296         negative performance impact.
297
298         * rendering/RenderVideo.cpp:
299         (WebCore::RenderVideo::paintReplaced):
300
301 2015-03-02  Dean Jackson  <dino@apple.com>
302
303         [iOS Media] Airplay button should be blue when active
304         https://bugs.webkit.org/show_bug.cgi?id=142193
305
306         Reviewed by Brent Fulgham.
307
308         Add a blue form of the Airplay button that is used
309         when we are actively displaying on another screen.
310
311         * Modules/mediacontrols/mediaControlsiOS.css:
312         (video::-webkit-media-controls-wireless-playback-picker-button):
313         (video::-webkit-media-controls-wireless-playback-picker-button:active):
314         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
315         * Modules/mediacontrols/mediaControlsiOS.js:
316         (ControllerIOS.prototype.updateWirelessPlaybackStatus):
317
318 2015-03-02  Brent Fulgham  <bfulgham@apple.com>
319
320         Move scroll animating functions from ScrollAnimator to ScrollController
321         https://bugs.webkit.org/show_bug.cgi?id=142102
322         <rdar://problem/20007161>
323
324         Reviewed by Simon Fraser.
325
326         No change in functionality.
327         
328         Do some refactoring of the various scrolling classes:
329         1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
330            and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
331         2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
332         3. Move code from ScrollAnimator{Mac} -> ScrollController.
333         4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
334         5. Rename immediateScrollInAxis -> immediateScrollOnAxis
335
336         * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
337         * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
338         events, just as is done for the "event not handled" case in EventHandler.cpp. 
339         (WebCore::EventHandler::platformCompleteWheelEvent):
340         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
341         methods, now that ScrollController is controlling this state.
342         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
343         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
344         need to clean up the CFRunLoopTimer.
345         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
346         until Bug 141973 is completed.).
347         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
348         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
349         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
350         * platform/ScrollAnimator.cpp:
351         (WebCore::ScrollAnimator::ScrollAnimator):
352         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
353         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
354         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
355         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
356         (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
357         (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
358         (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
359         (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
360         (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
361         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
362         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
363         * platform/ScrollAnimator.h:
364         * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
365         * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
366         (WebCore::ScrollController::ScrollController): Update to initialize new timers.
367         (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
368         (WebCore::ScrollController::startSnapRubberbandTimer): Added.
369         (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
370         require client to maintain timers.
371         (WebCore::ScrollController::snapRubberBand): Ditto.
372         (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
373         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
374         (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
375         (WebCore::ScrollController::stopScrollSnapTimer):  Ditto. Also updated to use RunLoop::Timer.
376         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
377         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
378         (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
379         (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
380         * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
381         * platform/mac/AxisScrollSnapAnimator.mm: Ditto.
382         * platform/mac/ScrollAnimatorMac.h:
383         * platform/mac/ScrollAnimatorMac.mm:
384         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
385         controlled in the ScrollController)
386         (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
387         (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
388         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
389         * platform/mac/ScrollController.h: Removed.
390         * platform/mac/ScrollController.mm: Removed.
391
392 2015-03-02  Mark Lam  <mark.lam@apple.com>
393
394         The InspectorTimelineAgent should gracefully handle attempts to start more than once.
395         <https://webkit.org/b/142189>
396
397         Reviewed by Joseph Pecoraro.
398
399         No new tests.  Unskipped an existing test that already asserts this.
400
401         InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
402         case the InspectorTimelineAgent is already disabled. Similarly,
403         InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
404         is already enabled before proceeding to do work to enable it. Though wasteful,
405         it is legal for clients of the InspectorTimelineAgent to invoke start on it more
406         than once. Hence, this check is needed.
407
408         This check fixes the debug assertion failure when running the
409         inspector/timeline/debugger-paused-while-recording.html test. The test can now
410         be unskipped.
411
412         * inspector/InspectorTimelineAgent.cpp:
413         (WebCore::InspectorTimelineAgent::internalStart):
414
415 2015-03-02  Roger Fong  <roger_fong@apple.com>
416
417         Update backgrounds of sliders for inline media controls on OS X.
418         https://bugs.webkit.org/show_bug.cgi?id=142188.
419         <rdar://problem/20012413>
420
421         Reviewed by Dean Jackson.
422
423         Don’t use CSS to draw volume and timeline slider backgrounds.
424         * Modules/mediacontrols/mediaControlsApple.css:
425         (video::-webkit-media-controls-volume-slider):
426         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
427         (audio::-webkit-media-controls-timeline):
428         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
429         (audio::-webkit-media-controls-panel .thumbnail-track):
430         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
431         (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
432
433         Draw volume and timeline slider backgrounds using 2d canvases.
434         * Modules/mediacontrols/mediaControlsApple.js:
435         (Controller.prototype.createControls):
436         (Controller.prototype.handleVolumeSliderInput):
437         (Controller.prototype.addRoundedRect):
438         (Controller.prototype.drawTimelineBackground):
439         (Controller.prototype.drawVolumeBackground):
440         (Controller.prototype.showControls):
441         * Modules/mediacontrols/mediaControlsiOS.js:
442         (ControllerIOS.prototype.addRoundedRect): Deleted.
443
444 2015-03-01  Roger Fong  <roger_fong@apple.com>
445
446         Update inline media element controls appearance Part 1.
447         https://bugs.webkit.org/show_bug.cgi?id=142138.
448         <rdar://problem/19997384>
449
450         Reviewed by Dean Jackson.
451
452         Update positioning, sizes, and background colors media control elements.
453         Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
454
455         * Modules/mediacontrols/mediaControlsApple.css:
456         (audio::-webkit-media-controls-panel):
457         (video::-webkit-media-controls-panel):
458         (audio::-webkit-media-controls-rewind-button):
459         (audio::-webkit-media-controls-play-button):
460         (audio::-webkit-media-controls-panel .mute-box):
461         (video::-webkit-media-controls-volume-max-button):
462         (audio::-webkit-media-controls-panel .volume-box):
463         (audio::-webkit-media-controls-panel .volume-box:active):
464         (video::-webkit-media-controls-volume-slider):
465         (audio::-webkit-media-controls-toggle-closed-captions-button):
466         (audio::-webkit-media-controls-fullscreen-button):
467         (audio::-webkit-media-controls-current-time-display):
468         (audio::-webkit-media-controls-time-remaining-display):
469         (audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.
470
471 2015-03-02  David Kilzer  <ddkilzer@apple.com>
472
473         REGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
474         <http://webkit.org/b/138684>
475
476         Fixes the following build failures:
477
478             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
479             In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
480             In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
481             WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:123:33: error: 'setShapeLayerPath' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
482                 WEBCORE_EXPORT virtual void setShapeLayerPath(const Path&);
483                                             ^
484             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
485             In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
486             In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
487             WebCore.framework/PrivateHeaders/GraphicsLayer.h:390:18: note: overridden virtual function is here
488                 virtual void setShapeLayerPath(const Path&);
489                              ^
490             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
491             In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
492             In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
493             WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:124:33: error: 'setShapeLayerWindRule' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
494                 WEBCORE_EXPORT virtual void setShapeLayerWindRule(WindRule);
495                                             ^
496             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
497             In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
498             In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
499             WebCore.framework/PrivateHeaders/GraphicsLayer.h:393:18: note: overridden virtual function is here
500                 virtual void setShapeLayerWindRule(WindRule);
501                              ^
502             2 errors generated.
503
504         * platform/graphics/ca/GraphicsLayerCA.h:
505         (WebCore::GraphicsLayer::setShapeLayerPath): Mark as override.
506         (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
507
508 2015-03-01  Simon Fraser  <simon.fraser@apple.com>
509
510         Make clip-path work on <video>, <canvas> etc.
511         https://bugs.webkit.org/show_bug.cgi?id=138684
512
513         Reviewed by Darin Adler.
514         
515         clip-path only worked in compositing layers on the painted contents of the layer,
516         and failed to clip children. Fix this by translating the clip path into a Path
517         which is set on a CA shape layer (for Mac and iOS), or painted into the
518         RenderLayerBacking's mask layer. There are two code paths:
519
520         1. clip-path which is a <basic-shape> or <geometry-box>, and no mask.
521             Here we can use the optimal code path of converting the clip into a path
522             that is put onto a CAShapeLayer, which is then used as a mask. There is no
523             additional backing store.
524         2. clip-path with an SVG reference, or clip-path combined with -webkit-mask:
525             Here we have to allocate backing store for the mask layer, and paint the
526             clip path (possibly with the mask).
527         
528         We add GraphicsLayer::Type::Shape, and add a getter for the layer type.
529
530         Tests: compositing/masks/compositing-clip-path-and-mask.html
531                compositing/masks/compositing-clip-path-mask-change.html
532                compositing/masks/compositing-clip-path.html
533                compositing/masks/reference-clip-path-on-composited.html
534
535         * platform/graphics/GraphicsLayer.cpp:
536         (WebCore::GraphicsLayer::GraphicsLayer): Store the type in the layer so the getter can return it.
537         (WebCore::GraphicsLayer::shapeLayerPath): Get and set the shape layer path.
538         (WebCore::GraphicsLayer::setShapeLayerPath): Ditto.
539         (WebCore::GraphicsLayer::shapeLayerWindRule): Get and set the shape layer wind rule.
540         (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
541         * platform/graphics/GraphicsLayer.h:
542         (WebCore::GraphicsLayer::type): Expose the type.
543         (WebCore::GraphicsLayer::supportsLayerType): Allow the cross-platform code to use
544         shape layers when it knows they are available.
545         (WebCore::GraphicsLayer::needsClippingMaskLayer): Deleted. This was never used.
546         * platform/graphics/GraphicsLayerClient.h: Align the bits (helps avoid typos). Add a
547         GraphicsLayerPaintClipPath phase.
548         * platform/graphics/Path.h: Some exports since WK2 needs to encode Paths now.
549         * platform/graphics/ca/GraphicsLayerCA.cpp:
550         (WebCore::GraphicsLayerCA::initialize): Make shape layers.
551         (WebCore::GraphicsLayerCA::setShapeLayerPath): Setter for the shape path. Sadly we
552         can't early return on unchanged paths yet.
553         (WebCore::GraphicsLayerCA::setShapeLayerWindRule):
554         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Updates for shape path
555         and wind rule.
556         (WebCore::GraphicsLayerCA::updateShape):
557         (WebCore::GraphicsLayerCA::updateWindRule):
558         * platform/graphics/ca/GraphicsLayerCA.h: Some new dirty bits for shape path and wind rule.
559         * platform/graphics/ca/PlatformCALayer.h:
560         * platform/graphics/ca/mac/PlatformCALayerMac.h:
561         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Got rid of lots of m_layer.get().
562         (PlatformCALayerMac::~PlatformCALayerMac):
563         (PlatformCALayerMac::setNeedsDisplay):
564         (PlatformCALayerMac::setNeedsDisplayInRect):
565         (PlatformCALayerMac::removeFromSuperlayer):
566         (PlatformCALayerMac::setSublayers):
567         (PlatformCALayerMac::removeAllSublayers):
568         (PlatformCALayerMac::appendSublayer):
569         (PlatformCALayerMac::insertSublayer):
570         (PlatformCALayerMac::replaceSublayer):
571         (PlatformCALayerMac::adoptSublayers):
572         (PlatformCALayerMac::addAnimationForKey):
573         (PlatformCALayerMac::removeAnimationForKey):
574         (PlatformCALayerMac::animationForKey):
575         (PlatformCALayerMac::setMask):
576         (PlatformCALayerMac::isOpaque):
577         (PlatformCALayerMac::setOpaque):
578         (PlatformCALayerMac::bounds):
579         (PlatformCALayerMac::setBounds):
580         (PlatformCALayerMac::position):
581         (PlatformCALayerMac::setPosition):
582         (PlatformCALayerMac::anchorPoint):
583         (PlatformCALayerMac::setAnchorPoint):
584         (PlatformCALayerMac::transform):
585         (PlatformCALayerMac::setTransform):
586         (PlatformCALayerMac::sublayerTransform):
587         (PlatformCALayerMac::setSublayerTransform):
588         (PlatformCALayerMac::setHidden):
589         (PlatformCALayerMac::setGeometryFlipped):
590         (PlatformCALayerMac::isDoubleSided):
591         (PlatformCALayerMac::setDoubleSided):
592         (PlatformCALayerMac::masksToBounds):
593         (PlatformCALayerMac::setMasksToBounds):
594         (PlatformCALayerMac::acceleratesDrawing):
595         (PlatformCALayerMac::setAcceleratesDrawing):
596         (PlatformCALayerMac::contents):
597         (PlatformCALayerMac::setContents):
598         (PlatformCALayerMac::setContentsRect):
599         (PlatformCALayerMac::setMinificationFilter):
600         (PlatformCALayerMac::setMagnificationFilter):
601         (PlatformCALayerMac::backgroundColor):
602         (PlatformCALayerMac::setBackgroundColor):
603         (PlatformCALayerMac::setBorderWidth):
604         (PlatformCALayerMac::setBorderColor):
605         (PlatformCALayerMac::opacity):
606         (PlatformCALayerMac::setOpacity):
607         (PlatformCALayerMac::copyFiltersFrom):
608         (PlatformCALayerMac::setName):
609         (PlatformCALayerMac::setSpeed):
610         (PlatformCALayerMac::setTimeOffset):
611         (PlatformCALayerMac::contentsScale):
612         (PlatformCALayerMac::setContentsScale):
613         (PlatformCALayerMac::cornerRadius):
614         (PlatformCALayerMac::setCornerRadius):
615         (PlatformCALayerMac::setEdgeAntialiasingMask):
616         (PlatformCALayerMac::shapeWindRule): New function.
617         (PlatformCALayerMac::setShapeWindRule): Ditto.
618         (PlatformCALayerMac::shapePath): Ditto.
619         (PlatformCALayerMac::setShapePath): Ditto.
620         (PlatformCALayer::isWebLayer):
621         * platform/graphics/cg/PathCG.cpp:
622         (WebCore::Path::Path): nullptr.
623         * rendering/RenderLayer.cpp:
624         (WebCore::RenderLayer::paintsWithClipPath): Return true if the clip path is painted.
625         (WebCore::RenderLayer::computeClipPath): Factor code that computes the clip path into this
626         function, so we can call it from RenderLayerBacking too.
627         (WebCore::RenderLayer::setupClipPath):
628         (WebCore::RenderLayer::paintLayerContents): We only want to apply the clip path
629         for painting when we're either painting a non-composited layer, or we're painting the
630         mask layer of a composited layer. We in the latter case, we just want to fill the clip
631         path with black, so re-use the paintChildClippingMaskForFragments() which does this.
632         * rendering/RenderLayer.h: Align the bits, add PaintLayerPaintingCompositingClipPathPhase.
633         * rendering/RenderLayerBacking.cpp:
634         (WebCore::RenderLayerBacking::~RenderLayerBacking):
635         (WebCore::RenderLayerBacking::updateConfiguration):
636         (WebCore::RenderLayerBacking::updateGeometry): Move mask updating into its own function.
637         (WebCore::RenderLayerBacking::updateMaskingLayerGeometry): If we're using the shape layer
638         code path, compute the Path and set it and the wind rule on the mask layer.
639         (WebCore::RenderLayerBacking::updateMaskingLayer): This is now more complex, as it has
640         to deal with combinations of clip-path and mask, some of which allow for the shape layer
641         mask, and we handle dynamic changes between these and painted masks.
642         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): Include the GraphicsLayerPaintClipPath phase.
643         (WebCore::RenderLayerBacking::paintIntoLayer): Map GraphicsLayerPaintClipPath to PaintLayerPaintingCompositingClipPathPhase.
644         (WebCore::RenderLayerBacking::updateMaskLayer): Deleted.
645         * rendering/RenderLayerBacking.h:
646
647 2015-03-01  Hunseop Jeong  <hs85.jeong@samsung.com>
648
649         [Cairo] Implement Path::addEllipse 
650         https://bugs.webkit.org/show_bug.cgi?id=142144
651
652         Reviewed by Gyuyoung Kim.
653
654         Add support for addEllipse method for platforms using cairo.
655
656         * platform/graphics/cairo/PathCairo.cpp:
657         (WebCore::Path::addEllipse):
658
659 2015-03-01  Joonghun Park  <jh718.park@samsung.com>
660
661         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
662         https://bugs.webkit.org/show_bug.cgi?id=142143
663
664         Reviewed by Darin Adler.
665
666         No new tests, no behavior changes.
667
668         * platform/ScrollAnimator.cpp:
669         (WebCore::ScrollAnimator::create):
670         * platform/ScrollAnimator.h:
671         * platform/ScrollAnimatorNone.cpp:
672         (WebCore::ScrollAnimator::create):
673         * platform/ScrollableArea.h:
674         * platform/ios/ScrollAnimatorIOS.mm:
675         (WebCore::ScrollAnimator::create):
676         * platform/mac/ScrollAnimatorMac.mm:
677         (WebCore::ScrollAnimator::create):
678
679 2015-02-26  Andy Estes  <aestes@apple.com>
680
681         [Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
682         https://bugs.webkit.org/show_bug.cgi?id=142066
683
684         Reviewed by Andreas Kling.
685
686         * platform/ios/ContentFilterIOS.mm:
687         * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
688
689 2015-03-01  Chris Dumez  <cdumez@apple.com>
690
691         Make NotificationCenter / Notification suspendable
692         https://bugs.webkit.org/show_bug.cgi?id=142117
693         <rdar://problem/19923085>
694
695         Reviewed by Andreas Kling.
696
697         Make NotificationCenter / Notification suspendable so that pages using
698         them can enter the PageCache.
699
700         NotificationCenter can safely be suspended if there are no pending
701         permission requests. This required adding an
702         "hasPendingPermissionRequests()" callback to the NotificationClient.
703
704         Notification can safely be suspended if it is either idle (not showing
705         yet) or closed.
706
707         Tests: fast/history/page-cache-notification-non-suspendable.html
708                fast/history/page-cache-notification-suspendable.html
709
710         * Modules/notifications/Notification.cpp:
711         (WebCore::Notification::canSuspend):
712         * Modules/notifications/NotificationCenter.cpp:
713         (WebCore::NotificationCenter::canSuspend):
714         * Modules/notifications/NotificationClient.h:
715
716 2015-03-01  Ryosuke Niwa  <rniwa@webkit.org>
717
718         isContentEditable shouldn't trigger synchronous style recalc in most cases
719         https://bugs.webkit.org/show_bug.cgi?id=129034
720
721         Reviewed by Antti Koivisto.
722
723         Avoid style recalc inside isContentEditable when the document doesn't contain -webkit-user-modify or
724         -webkit-user-select: all. Instead, compute the value from contenteditable attributes in ancestors.
725         However, still compute the editability from the style tree when it's up-to-date in order to avoid
726         repeatedly walking up the DOM tree in a hot code path inside editing.
727
728         Test: fast/dom/HTMLElement/dynamic-editability-change.html
729
730         * css/CSSGrammar.y.in: No need to pass in "true" as we never call this function with false.
731         * css/CSSParser.cpp:
732         (WebCore::isValidKeywordPropertyAndValue): Calls parserSetUsesStyleBasedEditability as needed.
733         (WebCore::parseKeywordValue): Passes around StyleSheetContents*.
734         (WebCore::CSSParser::parseValue): Ditto.
735         (WebCore::CSSParser::parseFont): Ditto.
736
737         * css/StyleSheetContents.cpp:
738         (WebCore::StyleSheetContents::StyleSheetContents): Initializes and copies m_usesStyleBasedEditability.
739
740         * css/StyleSheetContents.h:
741         (WebCore::StyleSheetContents::parserSetUsesRemUnits): Removed the argument since it was always true.
742         (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability): Added.
743         (WebCore::StyleSheetContents::usesStyleBasedEditability): Added.
744
745         * dom/Document.cpp:
746         (WebCore::Document::recalcStyle): Added a FIXME as well as a comment explaining why we don't call
747         setUsesStyleBasedEditability. Since Node::computeEditability triggers style recalc only when the flag
748         is set to true, it's too late to update the flag here.
749         (WebCore::Document::updateStyleIfNeeded): Uses a newly extracted needsStyleRecalc.
750         (WebCore::Document::updateBaseURL): Preserves m_usesStyleBasedEditability as well as m_usesRemUnit.
751         (WebCore::Document::usesStyleBasedEditability): Added. Returns true when inline style declarations or
752         any active stylesheet uses -webkit-user-modify or -webkit-user-select: all. Flushing pending stylesheet
753         changes here is fine because the alternative is to trigger a full blown style recalc.
754
755         * dom/Document.h:
756         (WebCore::Document::needsStyleRecalc): Added. Extracted from updateStyleIfNeeded.
757
758         * dom/DocumentStyleSheetCollection.cpp:
759         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
760         (WebCore::styleSheetsUseRemUnits): Deleted.
761         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Updates m_usesStyleBasedEditability
762         as well as m_usesRemUnit.
763
764         * dom/DocumentStyleSheetCollection.h:
765         (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Added.
766         (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Added.
767
768         * dom/Node.cpp:
769         (WebCore::computeEditabilityFromComputedStyle): Extracted from computeEditability.
770         (WebCore::Node::computeEditability): When the style recalc is requested and the render tree is dirty,
771         check if the document uses any CSS property that can affect the editability of elements. If it doesn't,
772         compute the editability from contenteditable attributes in the anchors via matchesReadWritePseudoClass.
773         Continue to use the style-based computation when the render tree isn't dirty to avoid the tree walk.
774
775         * html/HTMLElement.cpp:
776         (WebCore::HTMLElement::editabilityFromContentEditableAttr): Extracted from matchesReadWritePseudoClass
777         to be called in Node::computeEditability. Also made it return Editability instead of boolean.
778         (WebCore::HTMLElement::matchesReadWritePseudoClass):
779         * html/HTMLElement.h:
780
781 2015-03-01  Brent Fulgham  <bfulgham@apple.com>
782
783         [Win] Unreviewed build fix.
784
785         * WebCorePrefix.h: Provide some default definitions to help build on Windows
786         machines with different application support libraries.
787
788 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
789
790         Viewport units should not dirty style just before we do layout
791         https://bugs.webkit.org/show_bug.cgi?id=141682
792
793         Reviewed by Zalan Bujtas.
794         
795         In documents using viewport units, we dirtied style every time layout changed
796         the size of the document. This is nonsensical, because viewport units depend on the
797         viewport size, not the document size.
798         
799         Move the style dirtying from layout() into availableContentSizeChanged(). Hook
800         this up for WebKit1 by calling from -[WebFrameView _frameSizeChanged], and,
801         since that causes availableContentSizeChanged() to be called for WK1 for the first
802         time, protect the call to updateScrollbars() with a !platformWidget check.
803
804         Covered by existing viewport unit tests.
805
806         * page/FrameView.cpp:
807         (WebCore::FrameView::layout):
808         (WebCore::FrameView::availableContentSizeChanged):
809         (WebCore::FrameView::viewportSizeForCSSViewportUnits): Add a FIXME comment. Whether
810         scrollbars are ignored depends on the value of the overflow property on the root element.
811         * page/FrameView.h:
812         * platform/ScrollView.cpp:
813         (WebCore::ScrollView::availableContentSizeChanged):
814
815 2015-02-28  Andreas Kling  <akling@apple.com>
816
817         [Cocoa] Purge SQLite page cache when under memory pressure.
818         <https://webkit.org/b/142139>
819         <rdar://problem/19997739>
820
821         Reviewed by Pratik Solanki.
822
823         Call out to sqlite3 cache purging SPI on Cocoa platforms when
824         we need to free up some extra memory.
825
826         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
827         (WebCore::MemoryPressureHandler::platformReleaseMemory):
828
829 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
830
831         FrameView::layoutTimerFired() should update style if needed before doing layout
832         https://bugs.webkit.org/show_bug.cgi?id=141688
833
834         Reviewed by Andreas Kling.
835
836         If the style recalc timer has been scheduled to fire after the layout timer,
837         when the layout timer fires, we might as well just do the style recalc
838         too. The call to updateStyleIfNeeded() will cancel the pending style
839         recalc timer.
840         
841         This doesn't have much impact on the number of layouts (measured via PLT)
842         but seems like a reasonable thing to do.
843
844         * page/FrameView.cpp:
845         (WebCore::FrameView::layoutTimerFired):
846
847 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
848
849         Fullscreen video layers are off by one sometimes
850         https://bugs.webkit.org/show_bug.cgi?id=142122
851         rdar://problem/19878821
852
853         Reviewed by Eric Carlson.
854
855         Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
856         isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
857         backends to use FloatSizes for natural size. Convert the video image drawing code
858         paths to FloatSize, since naturalSize is used on the destination rect computation,
859         and painting should be floating point anyway.
860         
861         Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.
862
863         * html/HTMLVideoElement.cpp:
864         (WebCore::HTMLVideoElement::videoWidth):
865         (WebCore::HTMLVideoElement::videoHeight):
866         (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
867         * html/HTMLVideoElement.h:
868         * html/canvas/CanvasRenderingContext2D.cpp:
869         (WebCore::size):
870         (WebCore::CanvasRenderingContext2D::drawImage):
871         * html/canvas/WebGLRenderingContextBase.cpp:
872         (WebCore::WebGLRenderingContextBase::videoFrameToImage):
873         * platform/graphics/MediaPlayer.cpp:
874         (WebCore::NullMediaPlayerPrivate::naturalSize):
875         (WebCore::MediaPlayer::naturalSize):
876         (WebCore::MediaPlayer::paint):
877         (WebCore::MediaPlayer::paintCurrentFrameInContext):
878         (WebCore::NullMediaPlayerPrivate::paint): Deleted.
879         * platform/graphics/MediaPlayer.h:
880         * platform/graphics/MediaPlayerPrivate.h:
881         (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
882         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
883         (WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
884         (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
885         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
886         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
887         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
888         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
889         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
890         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
891         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
892         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
893         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
894         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
895         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
896         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
897         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
898         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
899         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
900         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
901         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
902         (WebCore::MediaSourcePrivateAVFObjC::naturalSize):
903         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
904         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
905         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
906         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
907         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
908         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
909         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
910         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
911         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
912         (WebCore::MediaPlayerPrivateQTKit::naturalSize):
913         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
914         (WebCore::MediaPlayerPrivateQTKit::paint):
915         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
916         (WebCore::MockMediaPlayerMediaSource::naturalSize):
917         (WebCore::MockMediaPlayerMediaSource::paint):
918         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
919         * rendering/RenderVideo.cpp:
920         (WebCore::RenderVideo::calculateIntrinsicSize):
921         (WebCore::RenderVideo::paintReplaced):
922
923 2015-02-27  Hunseop Jeong  <hs85.jeong@samsung.com>
924
925         [EFL][GTK] Fix build break after r180790,180798
926         https://bugs.webkit.org/show_bug.cgi?id=142127
927
928         Reviewed by Gyuyoung Kim.
929
930         * platform/graphics/cairo/PathCairo.cpp:
931         (WebCore::Path::addEllipse):
932
933 2015-02-27  Zalan Bujtas  <zalan@apple.com>
934
935         Subpixel-layout: width: max-content; property might cause unnecessary scrollbar.
936         https://bugs.webkit.org/show_bug.cgi?id=142065
937
938         Reviewed by Simon Fraser.
939
940         We should not pixelsnap (ceil in this case) logical coordinates during layout.
941         Should this cause content to be partially cut off, we need to
942         find the broken piece in the computation logic.
943
944         Covered by the unskipped test.
945
946         * rendering/RootInlineBox.cpp:
947         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
948
949 2015-02-27  Ryosuke Niwa  <rniwa@webkit.org>
950
951         Node::hasEditableStyle and isEditablePosition have too many options
952         https://bugs.webkit.org/show_bug.cgi?id=142078
953
954         Reviewed by Andreas Kling.
955
956         Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
957         new editing helper functions hasEditableStyle and isEditableNode for this purpose.
958
959         Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
960         newly extracted computeEditability in call sites that specify this option since isContentEditable
961         is a public DOM API.
962
963         No new tests since there should be no observable behavior changes.
964
965         * accessibility/AXObjectCache.h: Removed the declaration of an undefined function.
966
967         * dom/Element.cpp:
968         (WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.
969
970         * dom/Node.cpp:
971         (WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
972         (WebCore::Node::isContentRichlyEditable): Ditto.
973         (WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
974         a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
975         style tree. Also returns tri-state Editability enum instead of returning a boolean based on
976         the value of EditableLevel argument.
977         (WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
978         (WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
979         (WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.
980
981         * dom/Node.h: No longer includes EditingBoundary.h.
982         (WebCore::Node::isContentEditable):
983         (WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
984         (WebCore::Node::hasRichlyEditableStyle): Ditto.
985
986         * editing/ApplyStyleCommand.cpp:
987         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
988         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
989         * editing/DeleteFromTextNodeCommand.cpp:
990         (WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
991         * editing/FrameSelection.cpp:
992         (WebCore::CaretBase::invalidateCaretRect): Ditto.
993         * editing/InsertNodeBeforeCommand.cpp:
994         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
995         (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
996         * editing/RemoveNodeCommand.cpp:
997         (WebCore::RemoveNodeCommand::doApply): Ditto.
998
999         * editing/VisibleSelection.cpp:
1000         (WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
1001         which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
1002         not possible prior to r180726 because isEditablePosition had to move out of tables.
1003
1004         * editing/VisibleUnits.cpp:
1005         (WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
1006         (WebCore::nextLeafWithSameEditability): Ditto.
1007         (WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
1008         in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
1009         (WebCore::previousLinePosition):
1010         (WebCore::nextLinePosition):
1011
1012         * editing/htmlediting.cpp:
1013         (WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
1014         (WebCore::isEditableToAccessibility): Moved from Node.
1015         (WebCore::computeEditability): Extracted from isEditablePosition.
1016         (WebCore::hasEditableStyle): Added.
1017         (WebCore::isEditableNode): Added.
1018         (WebCore::isEditablePosition): Now calls computeEditability.
1019         (WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
1020         (WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.
1021
1022         * editing/htmlediting.h:
1023
1024 2015-02-27  Chris Dumez  <cdumez@apple.com>
1025
1026         Make ActiveDOMObject::canSuspend() pure virtual
1027         https://bugs.webkit.org/show_bug.cgi?id=142096
1028         <rdar://problem/19923085>
1029
1030         Reviewed by Andreas Kling.
1031
1032         Make ActiveDOMObject::canSuspend() pure virtual so that people at least
1033         try to provide an implementation for it. The default implementation was
1034         returning false unconditionally and thus was preventing pages from
1035         entering the PageCache.
1036
1037 2015-02-27  Commit Queue  <commit-queue@webkit.org>
1038
1039         Unreviewed, rolling out r180203 and r180210.
1040         https://bugs.webkit.org/show_bug.cgi?id=142116
1041
1042         broke process suspension and tile map (Requested by thorton on
1043         #webkit).
1044
1045         Reverted changesets:
1046
1047         "Adopt CAMachPort-as-layer-contents"
1048         https://bugs.webkit.org/show_bug.cgi?id=141687
1049         http://trac.webkit.org/changeset/180203
1050
1051         "Fix the !USE(IOSURFACE) build"
1052         http://trac.webkit.org/changeset/180210
1053
1054 2015-02-27  Sam Weinig  <sam@webkit.org>
1055
1056         Add WebKit2 SPI to create a DOM File object
1057         https://bugs.webkit.org/show_bug.cgi?id=142109
1058
1059         Reviewed by Tim Horton.
1060
1061         * WebCore.xcodeproj/project.pbxproj:
1062         Make <WebCore/File.h> (and associated files) available to WebKit2.
1063
1064 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
1065
1066         [Subpixel] Subpixelize RenderListMarker
1067         https://bugs.webkit.org/show_bug.cgi?id=142093
1068
1069         Reviewed by Zalan Bujtas.
1070
1071         Use floats instead of ints.
1072
1073         Test: fast/lists/rtl-marker.html
1074
1075         * rendering/RenderListMarker.cpp:
1076         (WebCore::RenderListMarker::paint):
1077         (WebCore::RenderListMarker::updateContent):
1078         (WebCore::RenderListMarker::getRelativeMarkerRect):
1079         * rendering/RenderListMarker.h:
1080
1081 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
1082
1083         <attachment> should be selected immediately upon click, and be drag/copyable upon click
1084         https://bugs.webkit.org/show_bug.cgi?id=142114
1085         <rdar://problem/19982520>
1086
1087         Reviewed by Enrica Casucci.
1088
1089         * css/html.css:
1090         (attachment):
1091         Make attachment use 'user-select: all' to act as a single click-to-select unit.
1092
1093         * html/HTMLAttachmentElement.cpp:
1094         (WebCore::HTMLAttachmentElement::setFocus): Deleted.
1095         * html/HTMLAttachmentElement.h:
1096         * rendering/RenderAttachment.cpp:
1097         (WebCore::RenderAttachment::isFocused): Deleted.
1098         (WebCore::RenderAttachment::focusChanged): Deleted.
1099         * rendering/RenderAttachment.h:
1100         * rendering/RenderThemeMac.mm:
1101         (WebCore::RenderThemeMac::paintAttachment):
1102         Remove focus-related code; instead of focusing the element upon click,
1103         we get a selection including just the <attachment>, and everything
1104         behaves much more consistently (copy works, drag works, etc.).
1105
1106 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
1107
1108         [iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
1109         https://bugs.webkit.org/show_bug.cgi?id=141371
1110
1111         Reviewed by David Kilzer.
1112
1113         Null checks.
1114
1115         Covered by existing mathml tests.
1116
1117         * rendering/mathml/RenderMathMLOperator.cpp:
1118         (WebCore::RenderMathMLOperator::boundsForGlyph):
1119         (WebCore::RenderMathMLOperator::advanceForGlyph):
1120         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
1121
1122 2015-02-27  Chris Dumez  <cdumez@apple.com>
1123
1124         Make SourceBuffer ActiveDOMObject suspendable
1125         https://bugs.webkit.org/show_bug.cgi?id=142108
1126         <rdar://problem/19923085>
1127
1128         Reviewed by Jer Noble.
1129
1130         Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
1131         MediaSource and does not have any pending events. This makes it more
1132         likely for pages using SourceBuffer objects to go into the PageCache.
1133
1134         Test: fast/history/page-cache-removed-source-buffer.html
1135
1136         * Modules/mediasource/SourceBuffer.cpp:
1137         (WebCore::SourceBuffer::canSuspend):
1138         * Modules/mediasource/SourceBuffer.h:
1139
1140 2015-02-26  Sam Weinig  <sam@webkit.org>
1141
1142         Add support for canvas ellipse method
1143         https://bugs.webkit.org/show_bug.cgi?id=82791
1144         <rdar://problem/11159172>
1145
1146         Reviewed by Dirk Schulze.
1147
1148         Tests: fast/canvas/canvas-ellipse-360-winding.html
1149                fast/canvas/canvas-ellipse-circumference-fill.html
1150                fast/canvas/canvas-ellipse-circumference.html
1151                fast/canvas/canvas-ellipse-connecting-line.html
1152                fast/canvas/canvas-ellipse-negative-radius.html
1153                fast/canvas/canvas-ellipse-zero-lineto.html
1154                fast/canvas/canvas-ellipse.html
1155
1156         * html/canvas/CanvasPathMethods.h:
1157         * html/canvas/CanvasPathMethods.cpp:
1158         (WebCore::CanvasPathMethods::lineTo):
1159         Convenience for passing a FloatPoint instead of two floats.
1160
1161         (WebCore::normalizeAngles):
1162         Normalizes the angles as described in the HTML spec. Ensuring the startAngle
1163         is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
1164         from the start angle.
1165
1166         (WebCore::CanvasPathMethods::arc):
1167         - Renames some of the parameters to be clearer.
1168         - Normalizes the angles for consistency with ellipse.
1169         - Moves hasInvertibleTransform() higher in the function for consistency.
1170
1171         (WebCore::CanvasPathMethods::ellipse): Added.
1172
1173         * html/canvas/CanvasRenderingContext2D.idl:
1174         * html/canvas/DOMPath.idl:
1175         Add ellipse(...).
1176
1177         * platform/graphics/Path.h:
1178         * platform/graphics/cg/PathCG.cpp:
1179         (WebCore::Path::addArc):
1180         Rename parameters for clarity and use a nullptr.
1181
1182         (WebCore::Path::addEllipse):
1183         Added. Constructs an ellipse via a transformed arc.
1184
1185 2015-02-27  Enrica Casucci  <enrica@apple.com>
1186
1187         Adding support for serializing HTMLAttachment elements.
1188         https://bugs.webkit.org/show_bug.cgi?id=142026
1189
1190         Reviewed by Tim Horton.
1191
1192         Test: editing/pasteboard/copy-paste-attachment.html
1193
1194         Adding support to serialize the attachment element
1195         and properly handle it when converting a DOM range
1196         to NSAttributedString.
1197
1198         * editing/cocoa/HTMLConverter.mm:
1199         (HTMLConverter::_processElement):
1200         * editing/markup.cpp:
1201         (WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
1202         for attachment element when serializating.
1203         (WebCore::StyledMarkupAccumulator::appendElement):
1204         (WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
1205         when creating the fragment.
1206         * html/HTMLAttachmentElement.cpp:
1207         (WebCore::HTMLAttachmentElement::file): Added const to file() to
1208         use it in appendCustonAttributes where the element is a const reference.
1209         * html/HTMLAttachmentElement.h:
1210         * html/HTMLAttributeNames.in:
1211
1212 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
1213
1214         <attachment> should have an inactive style (gray in background)
1215         https://bugs.webkit.org/show_bug.cgi?id=142103
1216         <rdar://problem/19982486>
1217
1218         Reviewed by Dan Bernstein.
1219
1220         * rendering/RenderThemeMac.mm:
1221         (WebCore::attachmentLabelInactiveBackgroundColor):
1222         (WebCore::attachmentLabelInactiveTextColor):
1223         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
1224         (WebCore::RenderThemeMac::paintAttachmentLabel):
1225         Use a gray background and gray text when the selection containing the
1226         attachment isn't focused and active.
1227
1228 2015-02-27  Brady Eidson  <beidson@apple.com>
1229
1230         Add a "block-cookies" rule to the user content filter.
1231         https://bugs.webkit.org/show_bug.cgi?id=142105
1232
1233         Reviewed by Alex Christensen.
1234
1235         Tests: http/tests/usercontentfilter/block-cookies-basic.html
1236                http/tests/usercontentfilter/block-cookies-send.html
1237
1238         * contentextensions/ContentExtensionRule.h:
1239
1240         * contentextensions/ContentExtensionsBackend.cpp:
1241         (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
1242         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
1243         * contentextensions/ContentExtensionsBackend.h:
1244
1245         * contentextensions/ContentExtensionsManager.cpp:
1246         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
1247
1248         * loader/cache/CachedResourceLoader.cpp:
1249         (WebCore::CachedResourceLoader::requestResource):
1250
1251         * page/UserContentController.cpp:
1252         (WebCore::UserContentController::actionForURL):
1253         (WebCore::UserContentController::contentFilterBlocksURL): Deleted.
1254         * page/UserContentController.h:
1255
1256 2015-02-27  Alex Christensen  <achristensen@webkit.org>
1257
1258         [WinCairo] Unreviewed build fix.
1259
1260         * platform/graphics/BitmapImage.h:
1261         * platform/win/BitmapInfo.h:
1262         Added WEBCORE_EXPORT.
1263
1264 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
1265
1266         <attachment>'s label baseline should match that of the surrounding text
1267         https://bugs.webkit.org/show_bug.cgi?id=142099
1268         rdar://problem/19982495
1269
1270         Reviewed by Dan Bernstein.
1271
1272         * rendering/RenderAttachment.cpp:
1273         (WebCore::RenderAttachment::baselinePosition):
1274         * rendering/RenderAttachment.h:
1275         Override baselinePosition and retrieve it from RenderTheme.
1276
1277         * rendering/RenderTheme.h:
1278         (WebCore::RenderTheme::attachmentBaseline):
1279         * rendering/RenderThemeMac.h:
1280         * rendering/RenderThemeMac.mm:
1281         (WebCore::AttachmentLayout::AttachmentLayout):
1282         (WebCore::RenderThemeMac::attachmentBaseline):
1283         Plumb the label baseline from AttachmentLayout to RenderAttachment.
1284
1285 2015-02-27  Commit Queue  <commit-queue@webkit.org>
1286
1287         Unreviewed, rolling out r180752.
1288         https://bugs.webkit.org/show_bug.cgi?id=142098
1289
1290         Causes 10 SVG test failures on Windows. (Requested by
1291         bfulgham_ on #webkit).
1292
1293         Reverted changeset:
1294
1295         "Cache glyph widths to GlyphPages"
1296         https://bugs.webkit.org/show_bug.cgi?id=142028
1297         http://trac.webkit.org/changeset/180752
1298
1299 2015-02-27  David Kilzer  <ddkilzer@apple.com>
1300
1301         [iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>
1302
1303         * platform/spi/ios/OpenGLESSPI.h:  Define EAGL_IOSURFACE macro
1304         until header refactoring is completed.
1305
1306 2015-02-27  Chris Dumez  <cdumez@apple.com>
1307
1308         MediaSource should be suspendable when closed
1309         https://bugs.webkit.org/show_bug.cgi?id=142089
1310         <rdar://problem/19923085>
1311
1312         Reviewed by Jer Noble.
1313
1314         Make MediaSource ActiveDOMObject suspendable when it is in closed state
1315         and it has no pending events. This increases the likelihood of pages
1316         using MediaSource to enter the PageCache.
1317
1318         Tests: fast/history/page-cache-media-source-closed-2.html
1319                fast/history/page-cache-media-source-closed.html
1320                fast/history/page-cache-media-source-opened.html
1321
1322 2015-02-27  Andreas Kling  <akling@apple.com>
1323
1324         Use NeverDestroyed for JS wrapper owners.
1325         <https://webkit.org/b/142090>
1326
1327         Reviewed by Chris Dumez.
1328
1329         Using NeverDestroyed puts these objects in BSS which is preferable
1330         since that prevents them from pinning down entire malloc pages forever.
1331
1332         * bindings/scripts/CodeGeneratorJS.pm:
1333         (GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
1334
1335         * bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.
1336
1337 2015-02-27  Chris Dumez  <cdumez@apple.com>
1338
1339         Make IDBDatabase / IDBRequest suspendable
1340         https://bugs.webkit.org/show_bug.cgi?id=142076
1341         <rdar://problem/19923085>
1342
1343         Reviewed by Andreas Kling.
1344
1345         Make IDBDatabase / IDBRequest suspendable under certain conditions to
1346         make it more likely for pages using indexeddb to enter the PageCache.
1347
1348         IDBDatabase is safely suspendable if the database is closed. IDBRequest
1349         is safely suspendable if the request no longer has any pending activity
1350         (i.e. state is DONE and success / failure handler was called). We may
1351         be able to do better later but this is the bare minimum for now.
1352
1353         Tests: fast/history/page-cache-indexed-closed-db.html
1354                fast/history/page-cache-indexed-opened-db.html
1355
1356         * Modules/indexeddb/IDBDatabase.cpp:
1357         (WebCore::IDBDatabase::IDBDatabase):
1358         (WebCore::IDBDatabase::closeConnection):
1359         (WebCore::IDBDatabase::enqueueEvent):
1360         (WebCore::IDBDatabase::canSuspend):
1361         * Modules/indexeddb/IDBDatabase.h:
1362         * Modules/indexeddb/IDBRequest.cpp:
1363         (WebCore::IDBRequest::canSuspend):
1364         * Modules/indexeddb/IDBRequest.h:
1365
1366 2015-02-27  Chris Dumez  <cdumez@apple.com>
1367
1368         Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
1369         https://bugs.webkit.org/show_bug.cgi?id=142052
1370
1371         Reviewed by Andreas Kling.
1372
1373         Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
1374         DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
1375         returning false so pages using WebDatabase would never enter the PageCache anyway.
1376
1377         This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
1378         return false when there are open databases. This check is now equivalent to the one
1379         that was in PageCache.
1380
1381         An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
1382         to false so once a page opened a database, it will never be page-cacheable. This
1383         will be taken care of separately though.
1384
1385         Test: fast/history/page-cache-webdatabase-opened-db.html
1386
1387         * Modules/webdatabase/DatabaseContext.cpp:
1388         (WebCore::DatabaseContext::canSuspend):
1389         * Modules/webdatabase/DatabaseContext.h:
1390         * history/PageCache.cpp:
1391         (WebCore::logCanCacheFrameDecision):
1392         (WebCore::PageCache::canCachePageContainingThisFrame):
1393         * page/DiagnosticLoggingKeys.cpp:
1394         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
1395         * page/DiagnosticLoggingKeys.h:
1396
1397 2015-02-27  Alex Christensen  <achristensen@webkit.org>
1398
1399         Compile DFA to bytecode.
1400         https://bugs.webkit.org/show_bug.cgi?id=142031
1401
1402         Reviewed by Benjamin Poulain.
1403
1404         * WebCore.xcodeproj/project.pbxproj:
1405         * contentextensions/ContentExtensionsBackend.cpp:
1406         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1407         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
1408         * contentextensions/ContentExtensionsBackend.h:
1409         * contentextensions/DFA.cpp:
1410         (WebCore::ContentExtensions::DFA::nextState): Deleted.
1411         (WebCore::ContentExtensions::DFA::actions): Deleted.
1412         * contentextensions/DFA.h:
1413         (WebCore::ContentExtensions::DFA::size):
1414         (WebCore::ContentExtensions::DFA::nodeAt):
1415         * contentextensions/DFABytecode.h: Added.
1416         (WebCore::ContentExtensions::instructionSizeWithArguments):
1417         * contentextensions/DFABytecodeCompiler.cpp: Added.
1418         (WebCore::ContentExtensions::append):
1419         (WebCore::ContentExtensions::set32Bits):
1420         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
1421         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
1422         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
1423         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
1424         (WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
1425         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
1426         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1427         * contentextensions/DFABytecodeCompiler.h: Added.
1428         (WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
1429         * contentextensions/DFABytecodeInterpreter.cpp: Added.
1430         (WebCore::ContentExtensions::getBits):
1431         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1432         * contentextensions/DFABytecodeInterpreter.h: Added.
1433         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
1434
1435 2015-02-27  Zalan Bujtas  <zalan@apple.com>
1436
1437         Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
1438         https://bugs.webkit.org/show_bug.cgi?id=138366
1439
1440         Reviewed by Dave Hyatt.
1441
1442         This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.
1443
1444         In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
1445         When a child is being detached from the tree, it removes itself from this hashmap.
1446         We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
1447         However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
1448         is inside a flow too and continue the cleanup accordingly.
1449
1450         Test: fast/regions/region-with-multicolumn-embedded-crash.html
1451
1452         * rendering/RenderObject.cpp:
1453         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
1454
1455 2015-02-27  Brady Eidson  <beidson@apple.com>
1456
1457         Add API to remove a single content filter.
1458         <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
1459
1460         Reviewed by Sam Weinig.
1461
1462         * page/UserContentController.cpp:
1463         (WebCore::UserContentController::removeUserContentFilter):
1464         * page/UserContentController.h:
1465
1466 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
1467
1468         [Win] Remove remaining SafariTheme cruft
1469         https://bugs.webkit.org/show_bug.cgi?id=142075
1470
1471         Reviewed by Anders Carlsson.
1472
1473         Remove reference to SafariTheme-switching preference.
1474
1475         Tested by existing layout tests.
1476
1477         * WebCore.vcxproj/WebCore.vcxproj:
1478         * WebCore.vcxproj/WebCore.vcxproj.filters:
1479         * config.h:
1480         * page/Settings.cpp:
1481         (WebCore::Settings::fontRenderingMode):
1482         (WebCore::Settings::setShouldPaintNativeControls): Deleted.
1483         * page/Settings.h:
1484         (WebCore::Settings::shouldPaintNativeControls): Deleted.
1485         * platform/win/ScrollbarThemeWin.cpp:
1486         (WebCore::ScrollbarTheme::nativeTheme):
1487         * rendering/RenderThemeWin.cpp:
1488         (WebCore::RenderTheme::themeForPage):
1489
1490 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
1491
1492         Add comment about CSS value name mangling
1493
1494         Unreviewed
1495
1496         * css/CSSParser.cpp:
1497         (WebCore::cssValueKeywordID):
1498
1499 2015-02-27  Antti Koivisto  <antti@apple.com>
1500
1501         Cache glyph widths to GlyphPages
1502         https://bugs.webkit.org/show_bug.cgi?id=142028
1503
1504         Reviewed by Andreas Kling.
1505
1506         Currently we have a separate cache in Font for glyph widths. In practice we always need
1507         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
1508         a per-character hash lookup from WidthIterator.
1509
1510         * platform/graphics/Font.cpp:
1511         (WebCore::Font::Font):
1512         (WebCore::Font::initCharWidths):
1513         (WebCore::Font::platformGlyphInit):
1514         (WebCore::createAndFillGlyphPage):
1515         (WebCore::Font::computeWidthForGlyph):
1516
1517             Rename to make it clear this doesn't cache.
1518
1519         (WebCore::GlyphPage::setGlyphDataForIndex):
1520
1521             Initialize the width.
1522             This could go to GlyphPage.cpp if we had one.
1523
1524         * platform/graphics/Font.h:
1525         (WebCore::Font::glyphZeroWidth):
1526         (WebCore::Font::isZeroWidthSpaceGlyph):
1527         (WebCore::Font::zeroGlyph): Deleted.
1528         (WebCore::Font::setZeroGlyph): Deleted.
1529         (WebCore::Font::widthForGlyph): Deleted.
1530         * platform/graphics/FontCascade.cpp:
1531         (WebCore::offsetToMiddleOfGlyph):
1532         * platform/graphics/FontCascadeFonts.cpp:
1533         (WebCore::FontCascadeFonts::glyphDataForCharacter):
1534         * platform/graphics/GlyphPage.h:
1535         (WebCore::GlyphData::GlyphData):
1536
1537             Return width too as part of GlyphData.
1538
1539         (WebCore::GlyphPage::glyphDataForIndex):
1540         (WebCore::GlyphPage::setGlyphDataForCharacter):
1541         (WebCore::GlyphPage::setGlyphDataForIndex):
1542         (WebCore::GlyphPage::GlyphPage):
1543         * platform/graphics/WidthIterator.cpp:
1544         (WebCore::WidthIterator::advanceInternal):
1545
1546             No need to lookup width separately now.
1547
1548         * platform/graphics/mac/ComplexTextController.cpp:
1549         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1550         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1551         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1552         * rendering/mathml/RenderMathMLOperator.cpp:
1553         (WebCore::RenderMathMLOperator::advanceForGlyph):
1554         * rendering/svg/SVGTextRunRenderingContext.cpp:
1555         (WebCore::missingGlyphForFont):
1556         * svg/SVGFontData.cpp:
1557         (WebCore::SVGFontData::initializeFont):
1558
1559 2015-02-26  Alexey Proskuryakov  <ap@apple.com>
1560
1561         iOS build fix after r180717.
1562
1563         * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):
1564
1565 2015-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1566
1567         isEditablePosition and related functions shouldn't move position out of table
1568         https://bugs.webkit.org/show_bug.cgi?id=129200
1569
1570         Reviewed by Darin Adler.
1571
1572         This patch removes the legacy editing position for elements display: table in its computed style.
1573         Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
1574         such an element for historical reasons. This forced us to update the style tree before computing
1575         the editability of a position because we have to check the editability of the position outside
1576         the element with display: table if the position was using such a legacy editing position.
1577         e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
1578         should still be considered editable if the parent node of the table was editable.
1579
1580         This patch replaces such a legacy editing position by using modern position types:
1581         PositionIsBeforeAnchor and PositionIsAfterAnchor.
1582
1583         No new tests since there should be no change in the user perceived editing operations.
1584
1585         * dom/Position.cpp:
1586         (WebCore::Position::previous): Setup the node and the offset correctly when the original position's
1587         type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
1588         is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
1589         position inside a table.
1590         (WebCore::Position::next): Ditto.
1591         (WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
1592         of positions.
1593         (WebCore::Position::atEndOfTree): Ditto.
1594         (WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
1595         for an atomic element or a table element as done in the equivalent code in Position::upstream.
1596         (WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
1597         (table, 1) when there are more than two children of the table.
1598
1599         * dom/PositionIterator.cpp:
1600         (WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
1601         positions. So convert it to a modern position by returning a position before or after a table here.
1602         * editing/ApplyBlockElementCommand.cpp:
1603         (WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
1604         is actually empty before executing the simple code path for an empty unsplittable element. Without
1605         this check, block formatting a table element will fail.
1606
1607         * editing/htmlediting.cpp:
1608         (WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
1609         of a position before or after an element is determined by its parent, not the element itself.
1610         (WebCore::isAtUnsplittableElement): Ditto.
1611         (WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
1612         an element with display: table. This is the code removal for which this patch was made.
1613         (WebCore::editableRootForPosition): Ditto.
1614
1615 2015-02-26  Timothy Horton  <timothy_horton@apple.com>
1616
1617         Implement <attachment> element appearance on Mac
1618         https://bugs.webkit.org/show_bug.cgi?id=142023
1619
1620         Reviewed by Dean Jackson.
1621
1622         * css/CSSParser.cpp:
1623         (WebCore::isValidKeywordPropertyAndValue):
1624         * css/CSSPrimitiveValueMappings.h:
1625         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1626         * css/CSSValueKeywords.in:
1627         * css/html.css:
1628         (attachment):
1629         * platform/ThemeTypes.h:
1630         Add a new -webkit-appearance value, attachment.
1631
1632         * WebCore.xcodeproj/project.pbxproj:
1633         * html/HTMLAttachmentElement.cpp:
1634         (WebCore::HTMLAttachmentElement::setFile):
1635         Let the renderer know when the file changes (so it can relayout and repaint).
1636
1637         (WebCore::HTMLAttachmentElement::filePath):
1638         (WebCore::HTMLAttachmentElement::fileName):
1639         * html/HTMLAttachmentElement.h:
1640         Handy acccessors for the full path and the name of the file.
1641
1642         * platform/spi/mac/IconServicesSPI.h: Added.
1643         * platform/spi/mac/LaunchServicesSPI.h: Added.
1644         Add some IconServices and LaunchServices SPI headers.
1645
1646         * rendering/RenderAttachment.cpp:
1647         (WebCore::RenderAttachment::RenderAttachment):
1648         Don't have a default intrinsic size; we'll adjust in layout().
1649
1650         (WebCore::RenderAttachment::isSelected):
1651         (WebCore::RenderAttachment::isFocused):
1652         (WebCore::RenderAttachment::isSelectedOrFocused):
1653         Factor out from paintReplaced().
1654
1655         (WebCore::RenderAttachment::layout):
1656         Use RenderTheme to compute the intrinsic size of this attachment.
1657
1658         (WebCore::RenderAttachment::paintReplaced):
1659         Use RenderTheme to paint the attachment.
1660
1661         (WebCore::RenderAttachment::representedFileChanged):
1662         When the represented file changes, we need to recompute the intrinsic size and repaint.
1663
1664         * rendering/RenderTheme.cpp:
1665         (WebCore::RenderTheme::adjustStyle):
1666         (WebCore::RenderTheme::paint):
1667         (WebCore::RenderTheme::adjustAttachmentStyle):
1668         (WebCore::RenderTheme::paintAttachment):
1669         Plumb through the attachment appearance.
1670
1671         * rendering/RenderAttachment.h:
1672         * rendering/RenderTheme.h:
1673         (WebCore::RenderTheme::paintAttachment):
1674         (WebCore::RenderTheme::attachmentIntrinsicSize):
1675         * rendering/RenderThemeMac.h:
1676         * rendering/RenderThemeMac.mm:
1677         (WebCore::attachmentIconBackgroundColor):
1678         (WebCore::attachmentIconBorderColor):
1679         (WebCore::AttachmentLayout):
1680         AttachmentLayout lays out the innards of the RenderThemeMac attachment
1681         presentation: an icon with an optional bordered background, with a label
1682         underneath it with an optional background.
1683
1684         (WebCore::RenderThemeMac::attachmentIntrinsicSize):
1685         (WebCore::paintAttachmentIconBackground):
1686         (WebCore::paintAttachmentIcon):
1687         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
1688         (WebCore::RenderThemeMac::paintAttachmentLabel):
1689         (WebCore::RenderThemeMac::paintAttachment):
1690         Paint the attachment element. Paint the optional backgrounds (and swap
1691         out the text color) if the element is selected/focused.
1692
1693 2015-02-26  Doug Russell  <d_russell@apple.com>
1694
1695         AX: Expose caret browsing preference to accessibility API
1696         https://bugs.webkit.org/show_bug.cgi?id=141862
1697
1698         Reviewed by Chris Fleizach.
1699
1700         Exposing the caret browsing setting on WebCore::Frame via the accessibility API would allow assistive tech apps to enable it contextually (for example, when the assistive tech app is running).
1701         Enabling caret browsing when assistive tech apps are running greatly improves the reliability of keyboard navigation on the web. Most especially in cases where selection would be disrupted by focus events.
1702
1703         Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
1704                platform/mac/accessibility/caret-browsing-attribute.html
1705                platform/mac/accessibility/caret-browsing-tab-selection.html
1706
1707         * accessibility/AccessibilityObject.h:
1708         * accessibility/mac/AccessibilityObjectMac.mm:
1709         (WebCore::AccessibilityObject::caretBrowsingEnabled):
1710         (WebCore::AccessibilityObject::setCaretBrowsingEnabled):
1711         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1712         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1713         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1714         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1715         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1716         (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):
1717
1718 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1719
1720         Remove unnecessary create() factory functions
1721         https://bugs.webkit.org/show_bug.cgi?id=142039
1722
1723         Reviewed by Chris Dumez.
1724
1725         Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
1726         and DatabaseUnpauseTask::create.
1727
1728         * Modules/webdatabase/DatabaseThread.cpp:
1729         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
1730         (WebCore::DatabaseThread::setPaused):
1731         (WebCore::DatabaseUnpauseTask::create): Deleted.
1732         * bindings/js/JSCryptoKeySerializationJWK.h:
1733         * bindings/js/JSSubtleCryptoCustom.cpp:
1734         (WebCore::importKey):
1735         * html/HTMLMediaElement.cpp:
1736         (WebCore::HTMLMediaElement::HTMLMediaElement):
1737         * html/HTMLMediaSession.cpp:
1738         (WebCore::HTMLMediaSession::create): Deleted.
1739         * html/HTMLMediaSession.h:
1740
1741 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1742
1743         Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
1744         https://bugs.webkit.org/show_bug.cgi?id=142061
1745
1746         Reviewed by Timothy Hatcher.
1747
1748         * inspector/CommandLineAPIModuleSource.js:
1749         Replace $1-$4 "inspected objects" with $1-$99 "saved results".
1750
1751         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1752         (WebCore::JSCommandLineAPIHost::inspectedObject):
1753         * inspector/CommandLineAPIHost.cpp:
1754         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
1755         (WebCore::CommandLineAPIHost::InspectableObject::get):
1756         (WebCore::CommandLineAPIHost::addInspectedObject):
1757         (WebCore::CommandLineAPIHost::inspectedObject):
1758         (WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
1759         * inspector/CommandLineAPIHost.h:
1760         * inspector/CommandLineAPIHost.idl:
1761         Since we now just save the single $0 inspected object, eliminate
1762         keeping track of a list of 5 values.
1763
1764 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1765
1766         Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
1767         https://bugs.webkit.org/show_bug.cgi?id=141902
1768
1769         Reviewed by Darin Adler.
1770
1771         Create instance using std::make_unique<> in CDMFactory directly. To do that,
1772         CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.
1773
1774         No new tests, no behavior changes.
1775
1776         * Modules/encryptedmedia/CDM.cpp:
1777         (WebCore::installedCDMFactories):
1778         * Modules/encryptedmedia/CDM.h:
1779         * Modules/encryptedmedia/CDMPrivateClearKey.h:
1780         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
1781         (WebCore::CDMPrivateClearKey::create): Deleted.
1782         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
1783         (WebCore::CDMPrivateMediaPlayer::create): Deleted.
1784         * dom/Element.cpp:
1785         (WebCore::Element::attributes):
1786         * dom/NamedNodeMap.h:
1787         (WebCore::NamedNodeMap::NamedNodeMap):
1788         (WebCore::NamedNodeMap::create): Deleted.
1789         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
1790         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.
1791
1792 2015-02-26  Andy Estes  <aestes@apple.com>
1793
1794         [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
1795         https://bugs.webkit.org/show_bug.cgi?id=142062
1796
1797         Reviewed by Daniel Bates.
1798
1799         * WebCore.xcodeproj/project.pbxproj:
1800         * platform/mac/ContentFilterMac.mm:
1801         * platform/spi/cocoa/NEFilterSourceSPI.h: Added.
1802         * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
1803
1804 2015-02-26  Anders Carlsson  <andersca@apple.com>
1805
1806         Add API to remove all website data for the given data records
1807         https://bugs.webkit.org/show_bug.cgi?id=142060
1808
1809         Reviewed by Beth Dakin.
1810
1811         * loader/cache/MemoryCache.cpp:
1812         (WebCore::MemoryCache::removeResourcesWithOrigins):
1813         New function that removes all resources that match the set of origins in a given session.
1814
1815 2015-02-26  Chris Dumez  <cdumez@apple.com>
1816
1817         Rename DatabaseManager::manager() to DatabaseManager::singleton()
1818         https://bugs.webkit.org/show_bug.cgi?id=142054
1819
1820         Reviewed by Ryosuke Niwa.
1821
1822         Rename DatabaseManager::manager() to DatabaseManager::singleton() as
1823         per coding style and use WTF::NeverDestroyed.
1824
1825         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1826         (WebCore::DOMWindowWebDatabase::openDatabase):
1827         * Modules/webdatabase/DatabaseBackendBase.cpp:
1828         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
1829         * Modules/webdatabase/DatabaseContext.cpp:
1830         (WebCore::DatabaseContext::DatabaseContext):
1831         (WebCore::DatabaseContext::~DatabaseContext):
1832         (WebCore::DatabaseContext::stopDatabases):
1833         (WebCore::DatabaseContext::databaseExceededQuota):
1834         * Modules/webdatabase/DatabaseManager.cpp:
1835         (WebCore::DatabaseManager::singleton):
1836         (WebCore::DatabaseManager::manager): Deleted.
1837         * Modules/webdatabase/DatabaseManager.h:
1838         (WebCore::DatabaseManager::~DatabaseManager): Deleted.
1839         * Modules/webdatabase/SQLTransactionClient.cpp:
1840         (WebCore::SQLTransactionClient::didExceedQuota):
1841         * history/PageCache.cpp:
1842         (WebCore::logCanCacheFrameDecision):
1843         (WebCore::PageCache::canCachePageContainingThisFrame):
1844         * loader/FrameLoader.cpp:
1845         (WebCore::FrameLoader::stopLoading):
1846
1847 2015-02-26  Csaba Osztrogonác  <ossy@webkit.org>
1848
1849         Fix the !ENABLE(GEOLOCATION) build after r180533
1850         https://bugs.webkit.org/show_bug.cgi?id=142053
1851
1852         Reviewed by Chris Dumez.
1853
1854         * Modules/geolocation/GeoNotifier.cpp:
1855         * Modules/geolocation/GeoNotifier.h:
1856
1857 2015-02-26  Dean Jackson  <dino@apple.com>
1858
1859         [iOS Media] incorrect front padding on time values
1860         https://bugs.webkit.org/show_bug.cgi?id=142027
1861         <rdar://problem/19960790>
1862
1863         Reviewed by Brent Fulgham.
1864
1865         My last commit was updating the OS X file,
1866         not the iOS file.
1867
1868         We don't want to prefix times with a "0".
1869
1870         * Modules/mediacontrols/mediaControlsApple.js:
1871         (Controller.prototype.formatTime):
1872         * Modules/mediacontrols/mediaControlsiOS.js:
1873         (ControllerIOS.prototype.formatTime):
1874
1875 2015-02-26  Mark Lam  <mark.lam@apple.com>
1876
1877         Rolling out r180602, r180608, r180613, r180617, r180671.
1878         <https://webkit.org/b/141990>
1879
1880         Not reviewed.
1881
1882         The r180602 solution does result in more work for GC when worker
1883         threads are in use.  Filip is uncomfortable with that.
1884         The EFL and GTK ports also seem to be unhappy with this change.
1885         Rolling out while we investigate.
1886
1887         * bindings/js/JSDOMWindowBase.cpp:
1888         (WebCore::JSDOMWindowBase::commonVM):
1889
1890 2015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1891
1892         [Mac] [iOS] Parsing support for -apple-trailing-word
1893         https://bugs.webkit.org/show_bug.cgi?id=141939
1894
1895         Reviewed by Andreas Kling.
1896
1897         This patch implements initial parsing support for the -apple-trailing-word CSS property.
1898         This property has two possible (mutually exclusive) values: auto and
1899         -apple-partially-balanced. This property is inherited.
1900
1901         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
1902
1903         This is an internal property that will allow us to control line breaking behavior for
1904         short paragraphs.
1905
1906         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
1907         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
1908         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
1909         version.
1910
1911         Test: platform/mac/fast/text/trailing-word-parse.html
1912
1913         * Configurations/FeatureDefines.xcconfig:
1914         * css/CSSComputedStyleDeclaration.cpp:
1915         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
1916         CSS value.
1917         * css/CSSParser.cpp:
1918         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
1919         pair.
1920         (WebCore::isKeywordPropertyID): New property is a keyword property.
1921         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
1922         * css/CSSPrimitiveValueMappings.h:
1923         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
1924         representation and CSS values.
1925         (WebCore::CSSPrimitiveValue::operator TrailingWord):
1926         * css/CSSPropertyNames.in: New property.
1927         * css/CSSValueKeywords.in: New value.
1928         * rendering/SimpleLineLayout.cpp:
1929         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
1930         * rendering/style/RenderStyle.h: Getter, setter and initial value.
1931         * rendering/style/RenderStyleConstants.h: Internal data type.
1932         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
1933         * rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.
1934
1935 2015-02-26  Roger Fong  <roger_fong@apple.com>
1936
1937         Unreviewed. Fix a accidental deletion from r178674.
1938
1939         * html/canvas/WebGLRenderingContextBase.cpp:
1940         (WebCore::WebGLRenderingContextBase::create):
1941         Return the fake WebGL context.
1942
1943 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1944
1945         Cleanup RenderSVGResourceClipper class.
1946         https://bugs.webkit.org/show_bug.cgi?id=142032.
1947
1948         Reviewed by Darin Adler.
1949         
1950         This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
1951         It includes cleanup for RenderSVGResourceClipper class.
1952
1953         * rendering/svg/RenderSVGResourceClipper.cpp:
1954         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1955         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1956         * rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
1957         typedef instead of a class and rename it to ClipperMaskImage. The purpose
1958         of having it a class even though it includes only one member was because
1959         we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
1960         as a separate object on the heap anymore.
1961         
1962         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
1963         double hash table lookups by calling HashMap::contains() and then HashMap::get(),
1964         we can use HashMap::add() instead.
1965
1966 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1967
1968         Setting any of the <object> element plugin controlling attributes does not have any affect.
1969         https://bugs.webkit.org/show_bug.cgi?id=141936.
1970
1971         Reviewed by Zalan Bujtas.
1972
1973         When setting any of the <object> element plugin controlling attributes
1974         dynamically we need to mark the the element to be dirty by calling
1975         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
1976         
1977         Test: svg/as-object/svg-in-object-dynamic-attribute-change.html
1978
1979         * dom/Element.h: Delete unimplemented function.
1980         
1981         * html/HTMLObjectElement.cpp:
1982         (WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
1983         setNeedsStyleRecalc() when one of the plugin controlling attributes gets
1984         changed. We have to clear the m_useFallbackContent because the attribute's
1985         new value might fix the object rendering.
1986         
1987         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
1988         
1989         * html/HTMLPlugInImageElement.cpp:
1990         (WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to 
1991         reconstruct the object renderer in the image case. This can happen if the
1992         image was rendering fallback content and the attribute's new value fixes
1993         the object rendering.
1994
1995 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
1996
1997         [Win] Make build logs more legible by reducing noise
1998         https://bugs.webkit.org/show_bug.cgi?id=142034
1999
2000         Reviewed by Alexey Proskuryakov.
2001
2002         Modify batch files, makefiles, and DOS commands to remove
2003         uninteresting/unhelpful output.
2004
2005         * WebCore.vcxproj/WebCoreGenerated.make:
2006         * WebCore.vcxproj/WebCorePreBuild.cmd:
2007         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2008         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2009
2010 2015-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>
2011
2012         [FreeType] REGRESSION(r180563): Introduced crashes
2013         https://bugs.webkit.org/show_bug.cgi?id=142044
2014
2015         Reviewed by Martin Robinson.
2016
2017         No new tests, should be caught by any woff font test.
2018
2019         Use optionsPattern, not m_pattern, when m_pattern may be null.
2020
2021         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2022         (WebCore::FontPlatformData::initializeWithFontFace):
2023
2024 2015-02-26  Sergio Villar Senin  <svillar@igalia.com>
2025
2026         ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
2027         https://bugs.webkit.org/show_bug.cgi?id=141645
2028
2029         Reviewed by Chris Dumez.
2030
2031         This bug has been here since r110484 but was uncovered by
2032         r180140. The problem r110484 was trying to fix was that
2033         CSSPrimitiveValue::convertToLength<Length> ended up calling
2034         CSSPrimitiveValue::computeLengthDouble() which was apparently
2035         dereferencing conversionData.style() and
2036         conversionData.rootStyle() pointers without checking them. That's
2037         why that fix added this condition to convertToLength():
2038
2039         isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())
2040
2041         which is not correct, because for the 4 possible font relative
2042         length types, 3 of them just use the style() pointer and the other
2043         one just uses rootStyle() which BTW could be NULL. This erroneous
2044         condition makes that function to return Length(Undefined) more
2045         often than it should.
2046
2047         From now on it only returns Length(Undefined) if the style()
2048         pointer is NULL and the font relative length type is one in the
2049         set (CSS_EMS, CSS_EXS, CSS_CHS);
2050
2051         Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html
2052
2053         * css/CSSPrimitiveValue.h:
2054         * css/CSSPrimitiveValueMappings.h:
2055         (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
2056         (WebCore::CSSPrimitiveValue::convertToLength):
2057
2058
2059 2015-02-26  Andreas Kling  <akling@apple.com>
2060
2061         [Cocoa] Prod libcache to drop caches in memory pressure relief handler.
2062         <https://webkit.org/b/142024>
2063         <rdar://problem/19966096>
2064
2065         Reviewed by Antti Koivisto.
2066
2067         libcache already listens to the OS memory pressure notifications, but we still
2068         need to manually request a cleanup when doing an iOS process suspension, or when
2069         simulating memory pressure.
2070
2071         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2072         (WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
2073         cache_simulate_memory_warning_event() to make sure that nonessential objects
2074         being kept alive by NSCaches get dropped when we need the memory.
2075
2076 2015-02-25  Zalan Bujtas  <zalan@apple.com>
2077
2078         Black line across screen on Adobe Illustrator detail page (non-retina only)
2079         https://bugs.webkit.org/show_bug.cgi?id=141866
2080
2081         Reviewed by Simon Fraser.
2082
2083         Phase is relative to the destination origin. We need to take location information into account
2084         while snapping so that the result is inline with the snapped destination rect.
2085         (location affects the snapped size.)
2086
2087         Test: fast/backgrounds/gradient-background-on-subpixel-position.html
2088
2089         * rendering/RenderBoxModelObject.cpp:
2090         (WebCore::pixelSnapBackgroundImageGeometryForPainting):
2091         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2092
2093 2015-02-25  Brent Fulgham  <bfulgham@apple.com>
2094
2095         [Win] Use WEBCORE_EXPORT instead of Definition file
2096         https://bugs.webkit.org/show_bug.cgi?id=141734
2097
2098         Reviewed by Alex Christensen.
2099
2100         No change in functionality.
2101
2102         * WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
2103         settings on certain files.
2104         * WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
2105         by Visual Studio.
2106         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
2107         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
2108         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
2109         * WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
2110         * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
2111         * WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
2112         * WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
2113         * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
2114         * WebCorePrefix.h: Provide proper export definitions for Windows.
2115         * bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
2116         needed by the new export style.
2117         * bindings/js/JSDOMWindowBase.h: Export class since DRT needs
2118         access to parts of it.
2119         * bindings/js/ScriptCachedFrameData.cpp: Add missing #include
2120         needed by the new export style.
2121         * bindings/scripts/CodeGeneratorJS.pm: Use different export macro
2122         when generating WebCoreTestSupport files, so that we don't confuse
2123         the linker when WebCore.lib and WebCoreTestSupport.lib try to
2124         both export WEBCORE_EXPORT symbols.
2125         (ExportLabelForClass):
2126         (GenerateHeader):
2127         * bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
2128         export style.
2129         * css/CSSParser.cpp: Ditto.
2130         * dom/Document.cpp: Ditto.
2131         * html/HTMLImageLoader.cpp: Ditto.
2132         * inspector/CommandLineAPIModule.cpp: Ditto.
2133         * inspector/PageDebuggerAgent.cpp: Ditto.
2134         * inspector/PageRuntimeAgent.cpp: Ditto.
2135         * inspector/WorkerRuntimeAgent.cpp: Ditto.
2136         * page/DOMWindow.cpp: Ditto.
2137         * page/DOMWindow.h: Export the destructor, as it is needed by
2138         DumpRenderTree (on Windows).
2139         * page/Page.cpp: Add missing #include needed by the new export style.
2140         * platform/Logging.h: Remove conflicting export declaration.
2141         * platform/PlatformExportMacros.h: Update for Windows use.
2142         * testing/Internals.cpp: Add missing #include needed by the new export style.
2143         * testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
2144         are supposed to be exported by WebCoreTestSupport, not WebCore.
2145         * testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
2146         new export style.
2147         * testing/js/WebCoreTestSupportPrefix.cpp: Added.
2148         * testing/js/WebCoreTestSupportPrefix.h: Added.
2149         * xml/XMLHttpRequest.h: Export the destructor.
2150         * xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
2151         export style.
2152         * xml/XSLTProcessorLibxslt.cpp: Ditto.
2153
2154 2015-02-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2155
2156         Remove unnecessary DatabaseFooTask::create
2157         https://bugs.webkit.org/show_bug.cgi?id=142002
2158
2159         Reviewed by Darin Adler.
2160
2161         DatabaseFooTask::create can be replaced with std::make_unique<>.
2162
2163         No new tests, no behavior changes.
2164
2165         * Modules/webdatabase/Database.cpp:
2166         (WebCore::Database::scheduleTransaction):
2167         (WebCore::Database::scheduleTransactionStep):
2168         (WebCore::Database::markAsDeletedAndClose):
2169         (WebCore::Database::closeImmediately):
2170         (WebCore::Database::tableNames):
2171         * Modules/webdatabase/DatabaseTask.h:
2172         (WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
2173         (WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
2174         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.
2175
2176 2015-02-25  Dean Jackson  <dino@apple.com>
2177
2178         [iOS Media] incorrect front padding on time values
2179         https://bugs.webkit.org/show_bug.cgi?id=142027
2180         <rdar://problem/19960790>
2181
2182         Reviewed by Brent Fulgham.
2183
2184         We don't want to prefix times with a "0".
2185
2186         * Modules/mediacontrols/mediaControlsApple.js:
2187         (Controller.prototype.formatTime):
2188
2189 2015-02-25  Chris Dumez  <cdumez@apple.com>
2190
2191         Make PublicURLManager suspendable
2192         https://bugs.webkit.org/show_bug.cgi?id=141977
2193         <rdar://problem/19923085>
2194
2195         Reviewed by Andreas Kling.
2196
2197         Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
2198         and returning true. Nothing prevents suspending the PublicURLManager as its
2199         implementation never causes JS to be executed. No implementation for
2200         suspend() / resume() needs to be provided for the same reason.
2201
2202         The fact that PublicURLManager wasn't suspendable was preventing pages using
2203         URL.createObjectURL() from entering the PageCache. Baidu.com search results
2204         pages are using the API for example.
2205
2206         Test: fast/history/page-cache-createObjectURL.html
2207
2208         * html/PublicURLManager.cpp:
2209         (WebCore::PublicURLManager::canSuspend):
2210         * html/PublicURLManager.h:
2211
2212 2015-02-25  Zalan Bujtas  <zalan@apple.com>
2213
2214         Cleanup BackgroundImageGeometry class.
2215         https://bugs.webkit.org/show_bug.cgi?id=141997
2216
2217         Reviewed by Simon Fraser.
2218
2219         This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
2220         removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
2221         becomes a read only class (with the exception of the clip() method).
2222
2223         No change in functionality.
2224
2225         * rendering/RenderBoxModelObject.cpp:
2226         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
2227         (WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
2228         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2229         (WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
2230         (WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
2231         (WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
2232         (WebCore::BackgroundImageGeometry::clip): Deleted.
2233         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
2234         * rendering/RenderBoxModelObject.h:
2235         (WebCore::BackgroundImageGeometry::clip):
2236         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
2237         (WebCore::BackgroundImageGeometry::setDestRect): Deleted.
2238         (WebCore::BackgroundImageGeometry::setPhase): Deleted.
2239         (WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
2240         (WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
2241         (WebCore::BackgroundImageGeometry::setTileSize): Deleted.
2242         (WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
2243         (WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
2244
2245 2015-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
2246
2247         Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
2248         https://bugs.webkit.org/show_bug.cgi?id=141776.
2249
2250         Reviewed by Dean Jackson.
2251
2252         Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
2253                svg/clip-path/clip-path-line-use-before-defined.svg
2254
2255         * rendering/svg/RenderSVGResourceClipper.cpp:
2256         (WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
2257         is added to m_clipper if it does not exist. The same renderer might have been 
2258         added to m_clipper in resourceBoundingBox().
2259         
2260         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
2261         m_clipper if it does not exist. Return the associated ClipperData.
2262         
2263         (WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
2264         referenced before it is defined, add the renderer to m_clipper. While doing the
2265         layout() for the clipper, we can check if m_clipper has values or not. If it does
2266         have, we are going to mark the clipper for client invalidation which is done by
2267         the SVG root.
2268         
2269         * rendering/svg/RenderSVGResourceClipper.h:
2270         * rendering/svg/RenderSVGResourceContainer.h:
2271         (WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a 
2272         new function selfNeedsClientInvalidation() which controls marking the clipper 
2273         for client invalidation. In RenderSVGResourceClipper, override it so it checks
2274         m_clipper to force clients validation even if it the first time we do layout
2275         for this clipper.
2276
2277         * rendering/svg/RenderSVGResourceContainer.cpp:
2278         (WebCore::RenderSVGResourceContainer::layout): Call the virtual function
2279         selfNeedsClientInvalidation() to check whether we need to mark the clipper for
2280         client invalidation.
2281         
2282         * svg/SVGElement.cpp: Delete unneeded header file.
2283
2284 2015-02-25  peavo@outlook.com  <peavo@outlook.com>
2285
2286         [WinCairo] WinLauncher is not starting on Vista.
2287         https://bugs.webkit.org/show_bug.cgi?id=141905
2288
2289         Reviewed by Alex Christensen.
2290
2291         We have to soft link with Media Foundation functions to be able
2292         to start on Vista and WinXP.
2293
2294         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2295         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
2296         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
2297         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
2298         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
2299         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
2300         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
2301         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
2302         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
2303
2304 2015-02-25  Beth Dakin  <bdakin@apple.com>
2305
2306         REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
2307         https://bugs.webkit.org/show_bug.cgi?id=142020
2308         -and corresponding-
2309         rdar://problem/19945216
2310
2311         Reviewed by Tom Horton.
2312
2313         It was a mistaken assumption that it was necessary to return false in the zero-
2314         delta case. That is clearly conceptually wrong since false represents the DOM 
2315         doing something special with the event, which is clearly not the case if we never 
2316         even send the event to the DOM. Returning true will allow the rest of the 
2317         scrolling machinery the ability to handle the event.
2318         * dom/Element.cpp:
2319         (WebCore::Element::dispatchWheelEvent):
2320
2321 2015-02-25  Ryosuke Niwa  <rniwa@webkit.org>
2322
2323         HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
2324         https://bugs.webkit.org/show_bug.cgi?id=142003
2325
2326         Reviewed by Sam Weinig.
2327
2328         Utilized contentEditableType to reduce the code duplication.
2329
2330         * html/HTMLElement.cpp:
2331         (WebCore::contentEditableType): Moved and added a version that takes AtomicString.
2332         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
2333
2334 2015-02-25  Sergio Villar Senin  <svillar@igalia.com>
2335
2336         [CSS Grid Layout] Tracks growing beyond limits when they should not
2337         https://bugs.webkit.org/show_bug.cgi?id=140883
2338
2339         Reviewed by Darin Adler.
2340
2341         Our track sizing algorithm implementation incorrectly grew some
2342         tracks beyond limits when handling min-content and max-content
2343         base sizes. In those cases we should only grow "any affected track
2344         that happens to also have an intrinsic max track sizing function"
2345         or all of them if there are none.
2346
2347         The problem was that we're using a vector of indexes pointing to
2348         the vector with the list of affected tracks. Those indexes become
2349         easily incorrect because the first thing we do in
2350         distributeSpaceToTracks() is to sort the vector with the affected
2351         tracks by growth potential.
2352
2353         Instead of that we now pass a vector with pointers to the list of
2354         tracks allowed to grow over the limits. The size changes are now
2355         directly stored in the GridTracks (it's called plannedSize)
2356         instead of in a separate vector, so we don't need to worry about
2357         tracks being rearranged (and we also get rid of the ugly vector of
2358         indexes pointing to another vector).
2359
2360         * rendering/RenderGrid.cpp:
2361         (WebCore::GridTrack::plannedSize): New member with getter/setter.
2362         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2363         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2364         Pass a setXXX() function instead of a growXXX() one to ForItems().
2365         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2366         Renamed additionalBreadthSpace to extraSpace which is the term
2367         used by specs.
2368         (WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
2369         plannedSize instead of the old distribution vector.
2370         (WebCore::GridTrack::growBaseSize): Deleted.
2371         (WebCore::GridTrack::growGrowthLimit): Deleted.
2372         * rendering/RenderGrid.h:
2373
2374 2015-02-25  Joanmarie Diggs  <jdiggs@igalia.com>
2375
2376         AX: Implement support for ARIA 1.1 'searchbox' role
2377         https://bugs.webkit.org/show_bug.cgi?id=142004
2378
2379         Reviewed by Chris Fleizach.
2380
2381         Add a new accessible SearchFieldRole to handle both the ARIA role
2382         and the "search" input type.
2383
2384         No new tests. Instead, added a new test case to roles-exposed.html
2385         for the mapping, and updated roles-computedRoleString.html because
2386         there is now a one-to-one mapping between the "search" input type
2387         and an ARIA role.
2388
2389         * accessibility/AccessibilityNodeObject.cpp:
2390         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2391         (WebCore::AccessibilityNodeObject::isSearchField):
2392         * accessibility/AccessibilityObject.cpp:
2393         (WebCore::AccessibilityObject::isARIATextControl):
2394         (WebCore::AccessibilityObject::isARIAInput):
2395         (WebCore::initializeRoleMap):
2396         * accessibility/AccessibilityObject.h:
2397         * accessibility/AccessibilityRenderObject.cpp:
2398         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2399         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2400         (atkRole):
2401         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2402         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2403         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2404         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2405         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2406         (createAccessibilityRoleMap):
2407
2408 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
2409
2410         Clarify some resizing terminology in ScrollView/FrameView
2411         https://bugs.webkit.org/show_bug.cgi?id=141996
2412
2413         Reviewed by Zalan Bujtas.
2414
2415         ScrollableArea/ScrollView/FrameView had some confusing terminology around
2416         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
2417         
2418         Clarify this by distinguishing between:
2419         1. Available size changes because of
2420             i) non-overlay scrollbar presence
2421            ii) ScrollableArea frame change
2422         2. Removing fixedLayoutSizeChanged() and just treating it like an
2423            available size change.
2424            
2425         contentsResized() is relegated to simply being a hook that allows Mac to
2426         flash overlay scrollbars.
2427         
2428         The confusingly named visibleContentsResized() is now updateContentsSize(),
2429         and is the way that a ScrollableArea tells its subclasss that it should recompute
2430         the size of the contents (i.e. do a layout).
2431
2432         * page/FrameView.cpp:
2433         (WebCore::FrameView::setContentsSize): No longer mysteriously skip the
2434         FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
2435         which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
2436         (WebCore::FrameView::adjustViewSize): Whitespace.
2437         (WebCore::FrameView::layout): Ditto.
2438         (WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
2439         change.
2440         (WebCore::FrameView::updateContentsSize): This actually does the layout.
2441         (WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
2442         will bail if not a forced update.
2443         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
2444         (WebCore::FrameView::contentsResized): Deleted.
2445         (WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
2446         (WebCore::FrameView::visibleContentsResized): Deleted.
2447         * page/FrameView.h:
2448         * platform/ScrollView.cpp:
2449         (WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
2450         (WebCore::ScrollView::setUseFixedLayout): Ditto.
2451         (WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
2452         the reason we are being called.
2453         (WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
2454         replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
2455         replace with updateContentsSize().
2456         (WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
2457         updating scrollbars, so no need to explicitly do that.
2458         (WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
2459         (WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
2460         * platform/ScrollView.h:
2461         * platform/ScrollableArea.cpp:
2462         (WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
2463         to flash the scrollbars.
2464         (WebCore::ScrollableArea::scrolledToRight):
2465         (WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
2466         scrollbar style affects available space.
2467         * platform/ScrollableArea.h:
2468         (WebCore::ScrollableArea::updateContentsSize):
2469         (WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.
2470
2471 2015-02-24  Ryosuke Niwa  <rniwa@webkit.org>
2472
2473         Unreviewed Mavericks build attempt fix after r180609.
2474
2475         * platform/graphics/mac/GraphicsContext3DMac.mm:
2476         (WebCore::GraphicsContext3D::GraphicsContext3D):
2477         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
2478
2479 2015-02-19  Roger Fong  <roger_fong@apple.com>
2480
2481         WebGL: Destroy the GLContext if a GPU restart has been detected.
2482         https://bugs.webkit.org/show_bug.cgi?id=141567.
2483         <rdar://problem/18507496>
2484
2485         Reviewed by Dean Jackson.
2486
2487         * html/canvas/WebGLRenderingContextBase.cpp:
2488         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
2489         * platform/graphics/GraphicsContext3D.h:
2490         (WebCore::GraphicsContext3D::setWebGLContext): 
2491         Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
2492         * platform/graphics/mac/GraphicsContext3DMac.mm:
2493         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
2494         (WebCore::GraphicsContext3D::GraphicsContext3D): 
2495         Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
2496         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2497         (WebCore::GraphicsContext3D::forceContextLost): 
2498         Force the WebGLRenderingContext to be lost.
2499         (WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
2500         (WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
2501         * WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
2502         * platform/spi/ios/OpenGLESSPI.h: Added.
2503
2504 2015-02-24  Stephanie Lewis  <slewis@apple.com>
2505
2506         Unreviewed ios build fix after http://trac.webkit.org/changeset/180602.
2507
2508         * bindings/js/JSDOMWindowBase.cpp:
2509         (WebCore::JSDOMWindowBase::commonVM):
2510
2511 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
2512
2513         Use an enum for scrollbar style
2514         https://bugs.webkit.org/show_bug.cgi?id=141985
2515
2516         Reviewed by Beth Dakin.
2517
2518         Switch to an enum class for the scrollbar style (normal or overlay).
2519
2520         * page/ChromeClient.h:
2521         * page/FrameView.cpp:
2522         (WebCore::FrameView::scrollbarStyleChanged):
2523         * page/FrameView.h:
2524         * platform/ScrollTypes.h:
2525         * platform/ScrollView.cpp:
2526         (WebCore::ScrollView::scrollbarStyleChanged):
2527         * platform/ScrollView.h:
2528         * platform/ScrollableArea.h:
2529         (WebCore::ScrollableArea::scrollbarStyleChanged):
2530         * platform/mac/ScrollAnimatorMac.mm:
2531         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2532
2533 2015-02-24  Commit Queue  <commit-queue@webkit.org>
2534
2535         Unreviewed, rolling out r180599.
2536         https://bugs.webkit.org/show_bug.cgi?id=141998
2537
2538         Lots of new test failures (Requested by smfr on #webkit).
2539
2540         Reverted changeset:
2541
2542         "Parsing support for -webkit-trailing-word"
2543         https://bugs.webkit.org/show_bug.cgi?id=141939
2544         http://trac.webkit.org/changeset/180599
2545
2546 2015-02-24  Sam Weinig  <sam@webkit.org>
2547
2548         [Attachment] Give <attachment> elements an underlying File
2549         https://bugs.webkit.org/show_bug.cgi?id=141993
2550
2551         Reviewed by Tim Horton.
2552
2553         - Add a JS subclass for attachments so that <attachment>s are
2554           instances of HTMLAttachmentElement rather than HTMLElement.
2555         - Give HTMLAttachmentElements an underlying File that they
2556           are the representation of. Expose it via a new 'file' property.
2557         - Expose a new Internals function called window.internals.createFile(url)
2558           that allows creating File objects for testing.
2559
2560         * CMakeLists.txt:
2561         * DerivedSources.cpp:
2562         * DerivedSources.make:
2563         * WebCore.vcxproj/WebCore.vcxproj:
2564         * WebCore.vcxproj/WebCore.vcxproj.filters:
2565         * WebCore.xcodeproj/project.pbxproj:
2566         * fileapi/File.h:
2567         * html/HTMLAttachmentElement.cpp:
2568         (WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
2569         (WebCore::HTMLAttachmentElement::file):
2570         (WebCore::HTMLAttachmentElement::setFile):
2571         * html/HTMLAttachmentElement.h:
2572         * html/HTMLAttachmentElement.idl: Added.
2573         * html/HTMLTagNames.in:
2574         * testing/Internals.cpp:
2575         (WebCore::Internals::createFile):
2576         * testing/Internals.h:
2577         * testing/Internals.idl:
2578
2579 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
2580
2581         AX: Implement support for ARIA 1.1 'switch' role
2582         https://bugs.webkit.org/show_bug.cgi?id=141986
2583
2584         Reviewed by Chris Fleizach.
2585
2586         Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
2587         AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
2588         widget to accessibility APIs (supports and emits notifications when
2589         toggled, doesn't have children, exposes a name and description when
2590         provided).
2591
2592         Tests: accessibility/aria-switch-checked.html
2593                accessibility/aria-switch-sends-notification.html
2594                accessibility/aria-switch-text.html
2595
2596         * accessibility/AccessibilityNodeObject.cpp:
2597         (WebCore::AccessibilityNodeObject::canHaveChildren):
2598         (WebCore::AccessibilityNodeObject::isChecked):
2599         (WebCore::AccessibilityNodeObject::visibleText):
2600         (WebCore::AccessibilityNodeObject::title):
2601         * accessibility/AccessibilityObject.cpp:
2602         (WebCore::AccessibilityObject::isARIAInput):
2603         (WebCore::AccessibilityObject::actionVerb):
2604         (WebCore::initializeRoleMap):
2605         (WebCore::AccessibilityObject::supportsChecked):
2606         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2607         * accessibility/AccessibilityObject.h:
2608         (WebCore::AccessibilityObject::isSwitch):
2609         * accessibility/atk/AXObjectCacheAtk.cpp:
2610         (WebCore::AXObjectCache::postPlatformNotification):
2611         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2612         (atkRole):
2613         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2614         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2615         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2616         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2617         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2618         (createAccessibilityRoleMap):
2619         (-[WebAccessibilityObjectWrapper subrole]):
2620         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2621
2622 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
2623
2624         [Mac] [iOS] Parsing support for -apple-trailing-word
2625         https://bugs.webkit.org/show_bug.cgi?id=141939
2626
2627         Reviewed by Andreas Kling.
2628
2629         This patch implements initial parsing support for the -apple-trailing-word CSS property.
2630         This property has two possible (mutually exclusive) values: auto and
2631         -apple-partially-balanced. This property is inherited.
2632
2633         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
2634
2635         This is an internal property that will allow us to control line breaking behavior for
2636         short paragraphs.
2637
2638         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
2639         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
2640         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
2641         version.
2642
2643         Test: platform/mac/fast/text/trailing-word-parse.html
2644
2645         * Configurations/FeatureDefines.xcconfig:
2646         * css/CSSComputedStyleDeclaration.cpp:
2647         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
2648         CSS value.
2649         * css/CSSParser.cpp:
2650         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
2651         pair.
2652         (WebCore::isKeywordPropertyID): New property is a keyword property.
2653         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
2654         * css/CSSPrimitiveValueMappings.h:
2655         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
2656         representation and CSS values.
2657         (WebCore::CSSPrimitiveValue::operator TrailingWord):
2658         * css/CSSPropertyNames.in: New property.
2659         * css/CSSValueKeywords.in: New value.
2660         * rendering/SimpleLineLayout.cpp:
2661         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
2662         * rendering/style/RenderStyle.h: Getter, setter and initial value.
2663         * rendering/style/RenderStyleConstants.h: Internal data type.
2664         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
2665
2666 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2667
2668         Remove DecodingTask::create and DatabaseOpenTask::create
2669         https://bugs.webkit.org/show_bug.cgi?id=141966
2670
2671         Reviewed by Anders Carlsson.
2672
2673         These create() factory functions are redundant. We can use std::make_unique<> directly.
2674
2675         No new tests, no behavior changes.
2676
2677         * Modules/webaudio/AsyncAudioDecoder.cpp:
2678         (WebCore::AsyncAudioDecoder::decodeAsync):
2679         (WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
2680         * Modules/webaudio/AsyncAudioDecoder.h:
2681         * Modules/webdatabase/Database.cpp:
2682         (WebCore::Database::openAndVerifyVersion):
2683         * Modules/webdatabase/DatabaseTask.h:
2684         (WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.
2685
2686 2015-02-24  Commit Queue  <commit-queue@webkit.org>
2687
2688         Unreviewed, rolling out r180578.
2689         https://bugs.webkit.org/show_bug.cgi?id=141992
2690
2691         Broke scrolling in Inspector Console. (Requested by JoePeck on
2692         #webkit).
2693
2694         Reverted changeset:
2695
2696         "[Mac] WebKit abandons overlay scrollbar CALayers."
2697         https://bugs.webkit.org/show_bug.cgi?id=141943
2698         http://trac.webkit.org/changeset/180578
2699
2700 2015-02-24  Dean Jackson  <dino@apple.com>
2701
2702         [ios Media] the inline controls are visible after pressing Done on iPhone
2703         https://bugs.webkit.org/show_bug.cgi?id=141987
2704         <rdar://problem/19944110>
2705
2706         Reviewed by Beth Dakin.
2707
2708         When exiting out of a playing video, we should show the
2709         start playback button if we don't allow inline media
2710         (such as on iPhone).
2711
2712         * Modules/mediacontrols/mediaControlsiOS.js:
2713         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
2714         allowsInline as well.
2715
2716 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2717
2718         Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
2719         https://bugs.webkit.org/show_bug.cgi?id=141982
2720
2721         Reviewed by Simon Fraser.
2722
2723         There should always be a valid FillLayer.
2724
2725         No change in functionality.
2726
2727         * rendering/RenderBox.cpp:
2728         (WebCore::RenderBox::getBackgroundPaintedExtent):
2729         (WebCore::RenderBox::maskClipRect):
2730         (WebCore::RenderBox::repaintLayerRectsForImage):
2731         * rendering/RenderBoxModelObject.cpp:
2732         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2733         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2734         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2735         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2736         * rendering/RenderBoxModelObject.h:
2737
2738 2015-02-24  Dean Jackson  <dino@apple.com>
2739
2740         [iOS Media] Be specific about which document to use for the timeline background canvas
2741         https://bugs.webkit.org/show_bug.cgi?id=141981
2742
2743         Reviewed by Eric Carlson.
2744
2745         In some cases, especially with nested iframes, the document
2746         reference for the shadow DOM might not be the one used
2747         to create a -webkit-canvas context for rendering via CSS.
2748         Explicitly get the context from the video's owner
2749         document.
2750
2751         There is still a bug here:
2752         https://bugs.webkit.org/show_bug.cgi?id=141983
2753
2754         * Modules/mediacontrols/mediaControlsiOS.js:
2755         (ControllerIOS.prototype.drawTimelineBackground):
2756
2757 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2758
2759         Remove unused BackgroundImageGeometry::m_destOrigin
2760         https://bugs.webkit.org/show_bug.cgi?id=141980
2761
2762         Reviewed by Simon Fraser.
2763
2764         Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
2765         They are not used at all.
2766
2767         No change in functionality.
2768
2769         * rendering/RenderBoxModelObject.cpp:
2770         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2771         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2772         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2773         (WebCore::BackgroundImageGeometry::relativePhase): Deleted.
2774         * rendering/RenderBoxModelObject.h:
2775         (WebCore::BackgroundImageGeometry::destOrigin): Deleted.
2776         (WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
2777         * rendering/svg/RenderSVGResourceMasker.cpp:
2778         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
2779
2780 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2781
2782         RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
2783         https://bugs.webkit.org/show_bug.cgi?id=141979
2784
2785         Reviewed by Simon Fraser.
2786
2787         No change in functionality.
2788
2789         * rendering/RenderBox.cpp:
2790         (WebCore::RenderBox::getBackgroundPaintedExtent):
2791         (WebCore::RenderBox::maskClipRect):
2792         (WebCore::RenderBox::repaintLayerRectsForImage):
2793         * rendering/RenderBoxModelObject.cpp:
2794         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2795         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2796         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2797         * rendering/RenderBoxModelObject.h:
2798
2799 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2800
2801         Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
2802         https://bugs.webkit.org/show_bug.cgi?id=141972
2803
2804         Reviewed by Simon Fraser.
2805
2806         Image geometry's phase represents distance.
2807
2808         No change in functionality.
2809
2810         * WebCore.order:
2811         * platform/graphics/GraphicsLayer.h:
2812         (WebCore::GraphicsLayer::setContentsTilePhase):
2813         (WebCore::GraphicsLayer::contentsTilePhase):
2814         * platform/graphics/texmap/TextureMapperLayer.cpp:
2815         (WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
2816         (WebCore::TextureMapperLayer::setContentsTilePhase):
2817         * platform/graphics/texmap/TextureMapperLayer.h:
2818         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2819         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
2820         * rendering/RenderBoxModelObject.cpp:
2821         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2822         (WebCore::BackgroundImageGeometry::setNoRepeatX):
2823         (WebCore::BackgroundImageGeometry::setNoRepeatY):
2824         (WebCore::BackgroundImageGeometry::useFixedAttachment):
2825         (WebCore::BackgroundImageGeometry::relativePhase):
2826         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2827         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2828         * rendering/RenderBoxModelObject.h:
2829         (WebCore::BackgroundImageGeometry::phase):
2830         (WebCore::BackgroundImageGeometry::setPhase):
2831         (WebCore::BackgroundImageGeometry::setPhaseX):
2832         (WebCore::BackgroundImageGeometry::setPhaseY):
2833         * rendering/RenderLayerBacking.cpp:
2834         (WebCore::RenderLayerBacking::resetContentsRect):
2835         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2836         * rendering/svg/RenderSVGResourceMasker.cpp:
2837         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
2838
2839 2015-02-24  Andreas Kling  <akling@apple.com>
2840
2841         [Mac] WebKit abandons overlay scrollbar CALayers.
2842         <https://webkit.org/b/141943>
2843         <rdar://problem/19932199>
2844
2845         Reviewed by Beth Dakin.
2846
2847         * platform/mac/ScrollAnimatorMac.mm:
2848         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
2849         Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
2850         The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
2851         amounts of abandoned memory to accumulate over time.
2852
2853 2015-02-24  Anders Carlsson  <andersca@apple.com>
2854
2855         Implement more of the data fetching API
2856         https://bugs.webkit.org/show_bug.cgi?id=141975
2857
2858         Reviewed by Andreas Kling.
2859
2860         Add API for getting origins in a given session that has cached data.
2861
2862         * loader/cache/MemoryCache.cpp:
2863         (WebCore::MemoryCache::originsWithCache):
2864
2865 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
2866
2867         Use nullptr in more places in FrameView, RenderView, RenderObject
2868         https://bugs.webkit.org/show_bug.cgi?id=141974
2869
2870         Reviewed by Zalan Bujtas.
2871
2872         0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp.
2873         
2874         Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount
2875         to make it more clear that it's a count.
2876
2877         * page/FrameView.cpp:
2878         (WebCore::FrameView::FrameView):
2879         (WebCore::FrameView::reset):
2880         (WebCore::FrameView::setContentsSize):
2881         (WebCore::FrameView::calculateScrollbarModesForLayout):
2882         (WebCore::FrameView::layerForScrolling):
2883         (WebCore::FrameView::layerForHorizontalScrollbar):
2884         (WebCore::FrameView::layerForVerticalScrollbar):
2885         (WebCore::FrameView::layerForScrollCorner):
2886         (WebCore::FrameView::tiledBacking):
2887         (WebCore::FrameView::scrollLayerID):
2888         (WebCore::FrameView::layerForOverhangAreas):
2889         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
2890         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
2891         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
2892         (WebCore::FrameView::layoutRoot):
2893         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
2894         (WebCore::FrameView::layout):
2895         (WebCore::FrameView::hostWindow):
2896         (WebCore::FrameView::scheduleRelayout):
2897         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2898         (WebCore::FrameView::needsLayout):
2899         (WebCore::FrameView::setNeedsLayout):
2900         (WebCore::FrameView::enclosingScrollableArea):
2901         (WebCore::FrameView::parentFrameView):
2902         (WebCore::FrameView::paintControlTints):
2903         (WebCore::FrameView::adjustPageHeightDeprecated):
2904         (WebCore::FrameView::axObjectCache):
2905         * page/FrameView.h:
2906         * rendering/RenderObject.cpp:
2907         (WebCore::RenderObject::RenderObject):
2908         (WebCore::RenderObject::nextInPreOrderAfterChildren):
2909         (WebCore::RenderObject::previousInPreOrder):
2910         (WebCore::RenderObject::firstLeafChild):
2911         (WebCore::RenderObject::lastLeafChild):
2912         (WebCore::RenderObject::traverseNext):
2913         (WebCore::RenderObject::firstLineBlock):
2914         (WebCore::RenderObject::containerForRepaint):
2915         (WebCore::RenderObject::showRenderSubTreeAndMark):
2916         (WebCore::RenderObject::localToAbsolute):
2917         (WebCore::RenderObject::container):
2918         * rendering/RenderObject.h:
2919         (WebCore::RenderObject::virtualContinuation):
2920         (WebCore::RenderObject::node):
2921         (WebCore::RenderObject::nonPseudoNode):
2922         (WebCore::RenderObject::localToAbsoluteQuad):
2923         (WebCore::RenderObject::absoluteQuads):
2924         (WebCore::RenderObject::absoluteClippedOverflowRect):
2925         (WebCore::RenderObject::outlineBoundsForRepaint):
2926         (WebCore::RenderObject::computeAbsoluteRepaintRect):
2927         (WebCore::RenderObject::selectionRect):
2928         (WebCore::RenderObject::imageChanged):
2929         (WebCore::RenderObject::addFocusRingRects):
2930         (WebCore::RenderObject::absoluteOutlineBounds):
2931         * rendering/RenderView.cpp:
2932         (WebCore::SelectionIterator::next):
2933         (WebCore::RenderView::RenderView):
2934         (WebCore::RenderView::mapLocalToContainer):
2935         (WebCore::RenderView::pushMappingToContainer):
2936         (WebCore::RenderView::computeRectForRepaint):
2937         (WebCore::rendererAfterPosition):
2938         (WebCore::RenderView::splitSelectionBetweenSubtrees):
2939         (WebCore::RenderView::rootBackgroundIsEntirelyFixed):
2940         * rendering/RenderView.h:
2941
2942 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2943
2944         REGRESSION(r179429): Can't type comments in Facebook
2945         https://bugs.webkit.org/show_bug.cgi?id=141859
2946
2947         Reviewed by Brent Fulgham.
2948
2949         Enable SymbolEnabled runtime flag in inspector context.
2950
2951         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
2952         * WebCore.order:
2953         * WebCore.vcxproj/WebCore.vcxproj:
2954         * WebCore.vcxproj/WebCore.vcxproj.filters:
2955         * bindings/js/JSDOMWindowBase.cpp:
2956         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
2957         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
2958         * bindings/js/JSDOMWindowBase.h:
2959         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2960         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
2961         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
2962         * bindings/js/JSWorkerGlobalScopeBase.h:
2963         * inspector/InspectorFrontendClientLocal.cpp:
2964         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2965         * page/Settings.h:
2966         * page/Settings.in:
2967
2968 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
2969
2970         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
2971         https://bugs.webkit.org/show_bug.cgi?id=141748
2972
2973         Reviewed by Sergio Villar Senin.
2974
2975         The first step of grid item placement algorithm has been updated in
2976         order to support both "sparse" and "dense" modes. Current code is always
2977         doing a "dense" packing in this case.
2978
2979         See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo
2980
2981         Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html
2982
2983         * rendering/RenderGrid.cpp:
2984         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
2985         for each row/column and use it to place items in the right position.
2986
2987 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
2988
2989         [GTK] Layout Test accessibility/roles-exposed.html is failing
2990         https://bugs.webkit.org/show_bug.cgi?id=141960
2991
2992         Reviewed by Martin Robinson.
2993
2994         The test was failing because Gtk now uses GtkColorChooserDialog for the
2995         color input, making the input field a button which results in the color
2996         chooser dialog appearing. As a side effect of this change, the input now
2997         has an accessible role of ColorWell, which is currently mapped to
2998         ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
2999         upon activating the button input field). Changed the Gtk platform mapping
3000         to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.
3001
3002         No new tests. Instead, updated and unskipped failing test.
3003
3004         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3005         (atkRole):
3006
3007 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
3008
3009         [GTK] Fonts loaded via @font-face look bad
3010         https://bugs.webkit.org/show_bug.cgi?id=140994
3011
3012         Reviewed by Martin Robinson.
3013
3014         We've had several complaints that woff fonts look bad on some websites. This seems to be a
3015         combination of multiple issues. For one, we don't look at Fontconfig settings at all when
3016         creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
3017         use sane default settings from Fontconfig when loading a web font, rather than accepting the
3018         default settings from GTK+, which are normally overridden by Fontconfig when loading system
3019         fonts. However, we will hardcode the hinting setting for web fonts to always force use of
3020         the light autohinter, so that we do not use a font's native hints. This avoids compatibility
3021         issues when fonts with poor native hinting are only tested in browsers that do not use the
3022         native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
3023         bytecode interpreter.
3024
3025         The net result of this is that there should be little noticable difference if you have GTK+
3026         set to use slight hinting (which forces use of the autohinter) unless you have customized
3027         Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
3028         or full hinting. This should reduce complaints about our font rendering on "fancy sites."
3029
3030         No new tests, since the affected fonts we've found are not freely redistributable.
3031
3032         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
3033         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
3034         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3035         (WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
3036         (WebCore::getDefaultFontconfigOptions): Added.
3037         (WebCore::FontPlatformData::initializeWithFontFace): Always call
3038         FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
3039         created with an FcPattern (e.g. because this is a web font), call
3040         getDefaultFontconfigOptions to get a sane default FcPattern.
3041         (WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
3042         (WebCore::getDefaultFontOptions): Deleted.
3043
3044 2015-02-24  Andreas Kling  <akling@apple.com>
3045
3046         [Cocoa] Break internal reference cycle in WebCore::Font.
3047         <https://webkit.org/b/141941>
3048         <rdar://problem/19650570>
3049
3050         Reviewed by Antti Koivisto.
3051
3052         The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
3053         This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.
3054
3055         We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
3056         variant (really "this") in Font::m_derivedData->smallCaps.
3057
3058         Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
3059         This stops us from accumulating tons of abandoned Font objects over time.
3060
3061         * platform/graphics/Font.cpp:
3062         (WebCore::Font::verticalRightOrientationFont):
3063         (WebCore::Font::uprightOrientationFont):
3064         (WebCore::Font::smallCapsFont):
3065         (WebCore::Font::emphasisMarkFont):
3066         (WebCore::Font::brokenIdeographFont):
3067         (WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.
3068
3069         * platform/graphics/cocoa/FontCocoa.mm:
3070         (WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.
3071
3072 2015-02-24  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3073
3074         [Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
3075         https://bugs.webkit.org/show_bug.cgi?id=141650
3076
3077         Reviewed by Benjamin Poulain.
3078
3079         The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
3080         This patch stores them as private slots in JSReadableStream.
3081         This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.
3082
3083         An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
3084         That may be the cleanest solution, especially if other APIs express the same need.
3085         Another alternative is to store DeferredWrapper in ReadableStream objects.
3086         But it is currently preferred to keep DeferredWrapper in bindings/js code.
3087
3088         Added new constructor for DeferredWrapper to use these stored values.
3089         Updated ready and closed methods to use that new constructor.
3090         Changes are covered by new test in streams/readablestream-constructor.html.
3091
3092         * bindings/js/JSDOMPromise.cpp:
3093         (WebCore::DeferredWrapper::DeferredWrapper):
3094         * bindings/js/JSDOMPromise.h:
3095         * bindings/js/JSReadableStreamCustom.cpp:
3096         (WebCore::closedPromiseSlotName):
3097         (WebCore::getOrCreatePromiseDeferredFromObject):
3098         (WebCore::readyPromiseSlotName):
3099         (WebCore::JSReadableStream::ready):
3100         (WebCore::JSReadableStream::closed):
3101         * bindings/js/ReadableStreamJSSource.cpp:
3102         (WebCore::setInternalSlotToObject):
3103         (WebCore::getInternalSlotFromObject):
3104         * bindings/js/ReadableStreamJSSource.h:
3105
3106 2015-02-24  Dhi Aurrahman  <diorahman@rockybars.com>
3107
3108         Always serialize :lang()'s arguments to strings
3109         https://bugs.webkit.org/show_bug.cgi?id=141944
3110
3111         Reviewed by Benjamin Poulain.
3112
3113         As specified in [1] :lang()'s arguments are always serialized to strings.
3114
3115         [1] http://dev.w3.org/csswg/cssom/#serializing-selectors
3116
3117         Related tests are updated.
3118
3119         * css/CSSGrammar.y.in:
3120         * css/CSSParserValues.cpp:
3121         (WebCore::CSSParserSelector::setLangArgumentList):
3122         * css/CSSParserValues.h:
3123         (WebCore::CSSParserString::init):
3124         (WebCore::CSSParserString::clear):
3125         (WebCore::CSSParserString::tokenType): Deleted.
3126         (WebCore::CSSParserString::setTokenType): Deleted.
3127         * css/CSSSelector.cpp:
3128         (WebCore::appendLangArgumentList):
3129         (WebCore::CSSSelector::setLangArgumentList):
3130         * css/CSSSelector.h:
3131         (WebCore::CSSSelector::langArgumentList):
3132         * css/SelectorCheckerTestFunctions.h:
3133         (WebCore::matchesLangPseudoClass):
3134         * cssjit/SelectorCompiler.cpp:
3135         (WebCore::SelectorCompiler::addPseudoClassType):
3136         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
3137
3138 2015-02-24  Antti Koivisto  <antti@apple.com>
3139
3140        Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.
3141
3142         * css/StyleResolver.cpp:
3143         (WebCore::StyleResolver::loadPendingImages):
3144
3145 2015-02-23  Commit Queue  <commit-queue@webkit.org>
3146
3147         Unreviewed, rolling out r180547 and r180550.
3148         https://bugs.webkit.org/show_bug.cgi?id=141957
3149
3150         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
3151
3152         Reverted changesets:
3153
3154         "REGRESSION(r179429): Can't type comments in Facebook"
3155         https://bugs.webkit.org/show_bug.cgi?id=141859
3156         http://trac.webkit.org/changeset/180547
3157
3158         "Constructor returning null should construct an object instead
3159         of null"
3160         https://bugs.webkit.org/show_bug.cgi?id=141640
3161         http://trac.webkit.org/changeset/180550
3162
3163 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
3164
3165         Disable font loading events until our implementation gets updated to match the latest spec
3166         https://bugs.webkit.org/show_bug.cgi?id=141938
3167
3168         Reviewed by Andreas Kling.
3169
3170         Revert r173531 for now since our implementation is outdated.
3171
3172         * Configurations/FeatureDefines.xcconfig:
3173
3174 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
3175
3176         EventHandler references deleted Scrollbar
3177         https://bugs.webkit.org/show_bug.cgi?id=141931
3178         <rdar://problem/19915210>
3179
3180         Reviewed by Tim Horton.
3181
3182         Tested by scrollbars/overflow-custom-scrollbar-crash.html
3183
3184         Update the EventHandler class to use a WeakPtr to reference the
3185         last used Scrollbar, rather than retaining the Scrollbar and
3186         artificially extending its life. This keeps the EventHandler
3187         state in proper sync with the state of the render tree, and
3188         avoids cases where we have destroyed a ScrollableArea (and
3189         Scrollbar) but are still sending messages to a fake zombie
3190         version of the element.
3191
3192         * page/EventHandler.cpp:
3193         (WebCore::EventHandler::clear):
3194         (WebCore::EventHandler::handleMousePressEvent):
3195         (WebCore::EventHandler::updateMouseEventTargetNode):
3196         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
3197         * page/EventHandler.h:
3198         * platform/Scrollbar.cpp:
3199         (WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
3200         * platform/Scrollbar.h:
3201         (WebCore::Scrollbar::createWeakPtr): Added,
3202
3203 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
3204
3205         REGRESSION(r179429): Can't type comments in Facebook
3206         https://bugs.webkit.org/show_bug.cgi?id=141859
3207
3208         Reviewed by Geoffrey Garen.
3209
3210         Enable SymbolEnabled runtime flag in inspector context.
3211
3212         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
3213         * WebCore.order:
3214         * WebCore.vcxproj/WebCore.vcxproj:
3215         * WebCore.vcxproj/WebCore.vcxproj.filters:
3216         * bindings/js/JSDOMWindowBase.cpp:
3217         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
3218         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
3219         * bindings/js/JSDOMWindowBase.h:
3220         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3221         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
3222         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
3223         * bindings/js/JSWorkerGlobalScopeBase.h:
3224         * inspector/InspectorFrontendClientLocal.cpp:
3225         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
3226         * page/Settings.h:
3227         * page/Settings.in:
3228
3229 2015-02-23  Benjamin Poulain  <benjamin@webkit.org>
3230
3231         CSS JIT: add support for case-insensitive attribute matching
3232         https://bugs.webkit.org/show_bug.cgi?id=141880
3233
3234         Reviewed by Andreas Kling.
3235
3236         The value matching now has 3 cases:
3237         1) Case-sensitive.
3238         2) Case-insensitive.
3239         3) Legacy HTML Case-insensitive.
3240
3241         The information to determine the case is split over 2 source:
3242         -To know if explicit case-insensitive is needed, we need to ask the selector
3243          for attributeValueMatchingIsCaseInsensitive().
3244         -To know if the legacy HTML behavior is needed, we need to test the attribute
3245          name filter with HTMLDocument::isCaseSensitiveAttribute().
3246
3247         I decided to perform all those checks at the fragment creation step.
3248         This makes the register requirements and code generation more explicit.
3249
3250         From there, everything is easy: switch() on the type of matching needed,
3251         and generate the code. The new case-insensitive case is a simplified version
3252         of the legacy HTML behavior without runtime check for the element type.
3253
3254         Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
3255                fast/selectors/case-insensitive-attribute-register-requirement-1.html
3256                fast/selectors/case-insensitive-attribute-register-requirement-2.html
3257                fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
3258
3259         * cssjit/SelectorCompiler.cpp:
3260         (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
3261         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
3262         (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
3263         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
3264         (WebCore::SelectorCompiler::constructFragmentsInternal):
3265         Compute the type of value matching and store it on the AttributeMatchingInfo
3266         when creating the fragment.
3267
3268         (WebCore::SelectorCompiler::minimumRegisterRequirements):
3269         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
3270         (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
3271         In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
3272         register. I have made an exception for generateElementAttributeValueExactMatching()
3273         for simplicity. I use that register to load the StringImpl of the attribute
3274         being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
3275
3276         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
3277         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
3278         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
3279         Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
3280         the behavior is consistent between XML and HTML.
3281
3282 2015-02-23  Alex Christensen  <achristensen@webkit.org>
3283
3284         [WinCairo] Unreviewed build fix after r180532
3285
3286         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3287         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
3288         Fixed typo.
3289
3290 2015-02-23  Chris Dumez  <cdumez@apple.com>
3291
3292         Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
3293         https://bugs.webkit.org/show_bug.cgi?id=141922
3294         <rdar://problem/19923085>
3295
3296         Reviewed by Andreas Kling.
3297
3298         Log using diagnostic logging which ActiveDOMObjects prevent using the
3299         PageCache.
3300
3301         * history/PageCache.cpp:
3302         (WebCore::logCanCacheFrameDecision):
3303         * page/DiagnosticLoggingKeys.cpp:
3304         (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
3305         * page/DiagnosticLoggingKeys.h:
3306
3307 2015-02-23  Chris Dumez  <cdumez@apple.com>
3308
3309         Move GeoNotifier class to its own file
3310         https://bugs.webkit.org/show_bug.cgi?id=141918
3311
3312         Reviewed by Andreas Kling.
3313
3314         Move GeoNotifier class to its own file to make Geolocation class less
3315         crowded.
3316
3317 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3318
3319         Remove unnecessary PlatformTimeRanges::create()
3320         https://bugs.webkit.org/show_bug.cgi?id=141901
3321
3322         Reviewed by Filip Pizlo.
3323
3324         PlatformTimeRanges::create() functions have just created an instance of PlatformTimeRanges.
3325         This functionality can be replaced with std::make_unique<> use directly.
3326
3327         No new tests, no behavior changes.
3328
3329         * Modules/mediasource/MediaSource.cpp:
3330         (WebCore::MediaSource::buffered):
3331         * Modules/mediasource/SourceBuffer.cpp:
3332         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
3333         * platform/graphics/MediaPlayer.cpp:
3334         (WebCore::NullMediaPlayerPrivate::buffered):
3335         * platform/graphics/MediaPlayerPrivate.h:
3336         (WebCore::MediaPlayerPrivateInterface::seekable):
3337         * platform/graphics/PlatformTimeRanges.cpp:
3338         (WebCore::PlatformTimeRanges::create): Deleted.
3339         * platform/graphics/PlatformTimeRanges.h:
3340         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3341         (WebCore::MediaPlayerPrivateAVFoundation::buffered):
3342         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3343         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
3344         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3345         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
3346         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3347         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
3348         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
3349         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3350         (WebCore::MediaPlayerPrivateGStreamer::buffered):
3351         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3352         (WebCore::MediaPlayerPrivateQTKit::buffered):
3353         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3354         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
3355         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3356         (WebCore::MockMediaPlayerMediaSource::buffered):
3357
3358 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3359
3360         Partial clean up OwnPtr and PassOwnPtr in WebCore/platform
3361         https://bugs.webkit.org/show_bug.cgi?id=141888
3362
3363         Reviewed by Filip Pizlo.
3364
3365         Use std::unique_ptr<> and std::make_unique<>. Besides this patch removes
3366         unnecessary OwnPtr.h|PasSOwnPtr.h includes.
3367
3368         No new tests, no behavior changes.
3369
3370         * platform/SharedBuffer.h:
3371         * platform/Supplementable.h:
3372         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
3373         (WebCore::AudioSourceProviderGStreamer::create): Deleted.
3374         * platform/graphics/ImageBuffer.h:
3375         * platform/graphics/TiledBackingStoreBackend.h:
3376         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3377         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3378         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
3379         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3380         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3381         * platform/gtk/GamepadsGtk.cpp:
3382
3383 2015-02-23  Shivakumar JM  <shiva.jm@samsung.com>
3384
3385         Default value of HTMLSelectElement size IDL attribute should be 0.
3386         https://bugs.webkit.org/show_bug.cgi?id=141795
3387
3388         Reviewed by Andreas Kling.
3389
3390         Default value of HTMLSelectElement size IDL attribute should be 0. 
3391         As in spec: http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element, also this matches the behavior of Chrome, IE and
3392         Gecko.
3393
3394         Test: fast/dom/select-size.html
3395
3396         * html/HTMLSelectElement.cpp:
3397         (WebCore::HTMLSelectElement::parseAttribute):
3398
3399 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
3400
3401         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
3402         https://bugs.webkit.org/show_bug.cgi?id=141729.
3403
3404         Reviewed by Daniel Bates.
3405
3406         Fix a build break which is caused by http://trac.webkit.org/changeset/180511/trunk.
3407         Two functions of GraphicsContext were made inline but they were kept WEBCORE_EXPORT.
3408
3409         * platform/graphics/GraphicsContext.h:
3410         (WebCore::GraphicsContext::paintingDisabled):
3411         (WebCore::GraphicsContext::updatingControlTints):
3412
3413 2015-02-22  Dean Jackson  <dino@apple.com>
3414
3415         [iOS] Max canvas size is lower than expected
3416         https://bugs.webkit.org/show_bug.cgi?id=141886
3417         <rdar://problem/19729246>
3418
3419         Reviewed by Tim Horton.
3420
3421         Use the same maximum canvas area for all ports,
3422         which bumps the iOS limit up from 4580 * 1145
3423         to 16k * 16k.
3424
3425         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
3426
3427 2015-02-23  Chris Dumez  <cdumez@apple.com>
3428
3429         Add support for diagnostic logging messages sampling
3430         https://bugs.webkit.org/show_bug.cgi?id=141823
3431         <rdar://problem/19899030>
3432
3433         Reviewed by Andreas Kling.
3434
3435         Add support for diagnostic logging messages sampling to decrease the
3436         impact of diagnostic logging on CPU usage, while still getting useful
3437         overall results. This patch adds a ShouldSample argument to
3438         logDiagnosticMessage*() functions and logs 5% of the messages when
3439         sampling. Sampling is turned on for keys that are known to be verbose
3440         (e.g. per resource load logging).
3441
3442         On the page load test I am tracking, CPU usage caused by diagnostic
3443         logging went down to 0.3% of UIProcess from 2.8% with this change.
3444
3445         * history/PageCache.cpp:
3446         (WebCore::logPageCacheFailureDiagnosticMessage):
3447         (WebCore::logCanCachePageDecision):
3448         * html/HTMLMediaElement.cpp:
3449         (WebCore::HTMLMediaElement::parseAttribute):
3450         * loader/EmptyClients.h:
3451         * loader/FrameLoader.cpp:
3452         (WebCore::logNavigation):
3453         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3454         * loader/ResourceLoader.cpp:
3455         (WebCore::logResourceResponseSource):
3456         * loader/SubframeLoader.cpp:
3457         (WebCore::logPluginRequest):
3458         * loader/SubresourceLoader.cpp:
3459         (WebCore::SubresourceLoader::willSendRequest):
3460         (WebCore::SubresourceLoader::didReceiveResponse):
3461         (WebCore::logResourceLoaded):
3462         * loader/cache/CachedResource.cpp:
3463         (WebCore::logResourceRevalidationReason):
3464         * loader/cache/CachedResourceLoader.cpp:
3465         (WebCore::logMemoryCacheResourceRequest):
3466         * page/DiagnosticLoggingClient.h:
3467
3468 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
3469
3470         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
3471         https://bugs.webkit.org/show_bug.cgi?id=141729.
3472
3473         Reviewed by Simon Fraser.
3474
3475         When drawing an SVG image and the drawing context is set to be transparent,
3476         make sure this transparency is applied to the compositing layer.
3477
3478         Test: svg/canvas/canvas-global-alpha-svg.html
3479
3480         * platform/graphics/GraphicsContext.cpp:
3481         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
3482         function and sets 'm_state.alpha' to the input value.
3483
3484         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
3485         returns the value of the global alpha.
3486         
3487         * platform/graphics/GraphicsContext.h:
3488         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
3489         'alpha' to the context state since the getter function CGContextGetAlpha
3490         is defined only in a private header file. Also move single line functions
3491         from the source file to the header file.
3492     
3493         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3494         (WebCore::GraphicsContext::setPlatformAlpha):
3495         (WebCore::GraphicsContext::setAlpha): Deleted.
3496         * platform/graphics/cg/GraphicsContextCG.cpp:
3497         (WebCore::GraphicsContext::setPlatformAlpha):
3498         (WebCore::GraphicsContext::setAlpha): Deleted.
3499         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
3500         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
3501         setPlatformAlpha().
3502     
3503         * svg/graphics/SVGImage.cpp:
3504         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
3505         global alpha value to the compositing layer.
3506         
3507 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
3508
3509         Occasional crash in MediaPlayer::setPrivateBrowsingMode
3510         https://bugs.webkit.org/show_bug.cgi?id=141910
3511
3512         Reviewed by Jer Noble.
3513
3514         No new tests, I was unable to reproduce the crash.
3515
3516         * html/HTMLMediaElement.cpp:
3517         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
3518         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
3519             to NULL.
3520         * html/HTMLMediaElement.h: Define EveryDelayedAction.
3521
3522 2015-02-23  Philippe Normand  <pnormand@igalia.com>
3523
3524         [GStreamer] Redundant track language notifications
3525         https://bugs.webkit.org/show_bug.cgi?id=141908
3526
3527         Reviewed by Žan Doberšek.
3528
3529         Invoke languageChanged only if the language code actually
3530         changed.
3531
3532         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3533         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
3534
3535 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
3536
3537         [WinCairo] Crash when media player is destroyed.
3538         https://bugs.webkit.org/show_bug.cgi?id=141248
3539
3540         Reviewed by Darin Adler.
3541
3542         A COM smart pointer is both released, and set to null.
3543         This means that the COM Release method is called twice, causing a crash.
3544
3545         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3546         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
3547
3548 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
3549
3550         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
3551         https://bugs.webkit.org/show_bug.cgi?id=141899
3552
3553         Reviewed by Sergio Villar Senin.
3554
3555         There was a FIXME about not re-resolving positions if the grid is grown during
3556         auto-placement. But as the spec has changed [1] and you can only refer to the
3557         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
3558         we can get rid of this FIXME as it's not a causing a problem anymore.
3559
3560         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
3561
3562         No new tests (no change in behavior).
3563
3564         * rendering/RenderGrid.cpp:
3565         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
3566
3567 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3568
3569         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
3570         https://bugs.webkit.org/show_bug.cgi?id=137877
3571
3572         Reviewed by Sam Weinig.
3573
3574         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
3575         change OwnPtr with std::unique_ptr<>|make_unique<>.
3576
3577         No new tests, no behavior changes.
3578
3579         * page/scrolling/AsyncScrollingCoordinator.h:
3580         * page/scrolling/ScrollingStateFixedNode.cpp:
3581         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3582         * page/scrolling/ScrollingStateNode.cpp:
3583         (WebCore::ScrollingStateNode::appendChild):
3584         * page/scrolling/ScrollingStateNode.h:
3585         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
3586         * page/scrolling/ScrollingStateScrollingNode.cpp:
3587         * page/scrolling/ScrollingStateStickyNode.cpp:
3588         * page/scrolling/ScrollingTree.h:
3589         * page/scrolling/ScrollingTreeNode.cpp:
3590         (WebCore::ScrollingTreeNode::appendChild):
3591         * page/scrolling/ScrollingTreeNode.h:
3592         * page/scrolling/ScrollingTreeScrollingNode.h:
3593
3594 2015-02-22  Dean Jackson  <dino@apple.com>
3595
3596         Print a console warning when HTMLCanvasElement exceeds the maximum size
3597         https://bugs.webkit.org/show_bug.cgi?id=141861
3598         <rdar://problem/19729145>
3599
3600         Reviewed by Simon Fraser.
3601
3602         Add a warning if we ever try to create a canvas that is
3603         too big.
3604
3605         No test because:
3606         1. We can't ref-test against console messages.
3607         2. The output is platform specific.
3608
3609         * html/HTMLCanvasElement.cpp:
3610         (WebCore::HTMLCanvasElement::createImageBuffer):
3611
3612 2015-02-21  Sam Weinig  <sam@webkit.org>
3613
3614         Convert the caps lock indicator to be implemented using the shadow DOM
3615         https://bugs.webkit.org/show_bug.cgi?id=141868
3616
3617         Reviewed by Dan Bernstein.
3618
3619         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
3620           in r74099 to work around a site bug, that should not be a problem anymore.
3621         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
3622           than a paint time effect. This gives the proper overflow behavior (it now clips) and
3623           behaves correctly in RTL.
3624
3625         * css/CSSParser.cpp:
3626         (WebCore::isValidKeywordPropertyAndValue):
3627         Make 'caps-lock-indicator' a valid -webkit-appearance value.
3628
3629         * css/CSSValueKeywords.in:
3630         Remove comment that indicated that caps-lock-indicator was not a valid
3631         -webkit-appearance value.
3632
3633         * css/html.css:
3634         (input::-webkit-caps-lock-indicator):
3635         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
3636         trick employed here is to use a content: image to both implement the painting of
3637         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
3638
3639         * html/HTMLInputElement.cpp:
3640         (WebCore::HTMLInputElement::capsLockIndicatorElement):
3641         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
3642         * html/HTMLInputElement.h:
3643         * html/InputType.cpp:
3644         (WebCore::InputType::capsLockStateMayHaveChanged):
3645         * html/InputType.h:
3646         (WebCore::InputType::capsLockIndicatorElement):
3647         Pipe notification of changes in the caps locks state to the <input> element
3648         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
3649         lock indicator element in the shadow DOM.
3650
3651         * html/TextFieldInputType.cpp:
3652         (WebCore::TextFieldInputType::forwardEvent):
3653         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
3654         (WebCore::TextFieldInputType::createShadowSubtree):
3655         (WebCore::TextFieldInputType::capsLockIndicatorElement):
3656         (WebCore::TextFieldInputType::destroyShadowSubtree):
3657         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
3658         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
3659         * html/TextFieldInputType.h:
3660         Add a new element to the text field shadow DOM to act as the caps lock indicator.
3661         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
3662         from CSS. The element is always in the DOM for a password field. It toggles between
3663         display: none and display: block depending on the state of the caps lock key.
3664
3665         * page/EventHandler.cpp:
3666         (WebCore::EventHandler::capsLockStateMayHaveChanged):
3667         Pipe notification of changes in the caps locks state to the <input> element
3668         rather than the RenderTextControlSingleLine.
3669
3670         * rendering/RenderTextControlSingleLine.cpp:
3671         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3672         (WebCore::RenderTextControlSingleLine::paint): Deleted.
3673         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
3674         * rendering/RenderTextControlSingleLine.h:
3675         Remove logic for drawing the caps lock indicator.
3676
3677         * rendering/RenderTheme.cpp:
3678         (WebCore::RenderTheme::adjustStyle):
3679         (WebCore::RenderTheme::paint):
3680         (WebCore::RenderTheme::paintMeter):
3681         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
3682         (WebCore::RenderTheme::paintCapsLockIndicator):
3683         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
3684         * rendering/RenderTheme.h:
3685         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
3686         * rendering/RenderThemeIOS.h:
3687         * rendering/RenderThemeIOS.mm:
3688         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
3689         * rendering/RenderThemeMac.h:
3690         * rendering/RenderThemeMac.mm:
3691         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
3692         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
3693         Now that the caps lock indicator is implemented like other aspects of form controls,
3694         the theme code can be converted to be similar as well.
3695
3696 2015-02-21  David Kilzer  <ddkilzer@apple.com>
3697
3698         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
3699         <http://webkit.org/b/141816>
3700
3701         Attempt to fix the following build failure:
3702
3703             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
3704             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
3705             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3706             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3707             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
3708             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
3709             <scratch space>:58:1: note: expanded from here
3710             CoreMediaLibrary
3711             ^~~~~~~~~~~~~~~~
3712             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3713             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
3714             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
3715             ^
3716             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3717             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
3718             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
3719             <scratch space>:42:1: note: expanded from here
3720             CoreMediaLibrary
3721             ^
3722             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
3723             SOFT_LINK_FRAMEWORK(CoreMedia)
3724             ^
3725             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3726             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
3727             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
3728             <scratch space>:51:1: note: expanded from here
3729             CoreMediaLibrary
3730             ^
3731
3732         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
3733         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
3734         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
3735         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
3736
3737 2015-02-21  David Kilzer  <ddkilzer@apple.com>
3738
3739         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
3740         <http://webkit.org/b/141816>
3741
3742         Reviewed by Alexey Proskuryakov.
3743
3744         * WebCore.vcxproj/WebCore.vcxproj:
3745         * WebCore.vcxproj/WebCore.vcxproj.filters:
3746         - Remove CoreMediaSoftLinking.h.
3747
3748         * platform/cf/CoreMediaSoftLink.cpp:
3749         - Add kCMTimeZero constant.
3750         * platform/cf/CoreMediaSoftLink.h:
3751         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
3752         - Add kCMTimeZero constant.
3753
3754         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
3755
3756         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3757         - Remove reference to CoreMediaSoftLinking.h and update comment.
3758         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
3759         - Switch to using new method to check if a framework is
3760           available.
3761
3762         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3763         - Remove all local soft-linking macros for CoreMedia.
3764           CoreMediaSoftLink.h handles everything now.
3765         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
3766         - Switch to using new method to check if a framework is
3767           available.
3768
3769         * platform/mac/SoftLinking.h:
3770         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
3771         is_Name_FrameworkAvailable() macro.
3772         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
3773         optional framework checks without a separate macro.
3774         (SOFT_LINK_CONSTANT_HEADER): Add.
3775         (SOFT_LINK_CONSTANT_SOURCE): Add.
3776         - Support soft-links to constants.
3777
3778         * platform/win/SoftLinking.h:
3779         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
3780         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
3781         non-static function.
3782         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
3783         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
3784         SOFT_LINK_DEBUG_LIBRARY.
3785         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
3786         is_Name_FrameworkAvailable() macro.
3787         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
3788         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
3789         (SOFT_LINK_CONSTANT_HEADER): Add.
3790         (SOFT_LINK_CONSTANT_SOURCE): Add.
3791         - Support soft-links to constants.
3792
3793 2015-02-20  David Kilzer  <ddkilzer@apple.com>
3794
3795         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
3796         <http://webkit.org/b/141849>
3797
3798         Reviewed by Brent Fulgham.
3799
3800         This patch does the following:
3801         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
3802           macros for reuse in other projects.
3803         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
3804           141816.
3805         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
3806           and includes framework name in generated function names.  This
3807           adds more entropy to the names in case there are two functions
3808           with the same name in different frameworks.
3809
3810         * platform/cf/CoreMediaSoftLink.cpp:
3811         - Add FIXME about USE(COREMEDIA).
3812         - Switch from SOFT_LINK_FRAMEWORK() to
3813           SOFT_LINK_FRAMEWORK_SOURCE().
3814         * platform/cf/CoreMediaSoftLink.h:
3815         - Add FIXME about USE(COREMEDIA).
3816         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
3817           macros.
3818
3819         * platform/mac/SoftLinking.h:
3820         - Add missing header guards.
3821         - Add pragmas for different macro groups.
3822         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
3823         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
3824         (SOFT_LINK_FUNCTION_SOURCE): Move.
3825         - Add framework name to generated function names.
3826         - Incorporates namespace so that it doesn't have to be listed in
3827           the *SoftLink.{cpp,h} file.
3828
3829         * platform/win/SoftLinking.h:
3830         - Add pragmas for different macro groups.
3831         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
3832         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
3833         (SOFT_LINK_FUNCTION_SOURCE): Move.
3834         - Add framework name to generated function names.
3835         - Incorporates namespace so that it doesn't have to be listed in
3836           the *SoftLink.{cpp,h} file.
3837
3838 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3839
3840         [Gtk] Unreviewed build fix.
3841
3842         * platform/ScrollAnimatorNone.cpp:
3843         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
3844         uses of ScrollableArea.
3845
3846 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3847
3848         Scrollbars and ScrollAnimators must always have a ScrollableArea
3849         https://bugs.webkit.org/show_bug.cgi?id=141855
3850
3851         Reviewed by Simon Fraser.
3852
3853         No change in functionality.
3854         
3855         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
3856         a number of unnecessary nullptr checks.
3857
3858         * accessibility/AccessibilityScrollbar.cpp:
3859         (WebCore::AccessibilityScrollbar::setValue):
3860         * css/SelectorCheckerTestFunctions.h:
3861         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
3862         * page/FrameView.cpp:
3863         (WebCore::FrameView::createScrollbar):
3864         (WebCore::FrameView::setFixedVisibleContentRect):
3865         * page/scrolling/ScrollingCoordinator.cpp:
3866         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
3867         * platform/PopupMenuClient.h:
3868         * platform/ScrollAnimator.cpp:
3869         (WebCore::ScrollAnimator::ScrollAnimator):
3870         (WebCore::ScrollAnimator::scroll):
3871         (WebCore::ScrollAnimator::handleWheelEvent):
3872         (WebCore::ScrollAnimator::notifyPositionChanged):
3873         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
3874         * platform/ScrollAnimator.h:
3875         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
3876         * platform/ScrollAnimatorNone.cpp:
3877         * platform/ScrollAnimatorNone.h:
3878         * platform/ScrollView.cpp:
3879         (WebCore::ScrollView::createScrollbar):
3880         * platform/ScrollableArea.cpp:
3881         (WebCore::ScrollableArea::scrollAnimator):
3882         (WebCore::ScrollableArea::scroll):
3883         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
3884         (WebCore::ScrollableArea::notifyScrollPositionChanged):
3885         (WebCore::ScrollableArea::scrollPositionChanged):
3886         (WebCore::ScrollableArea::handleWheelEvent):
3887         (WebCore::ScrollableArea::handleTouchEvent):
3888         (WebCore::ScrollableArea::mouseEnteredScrollbar):
3889         (WebCore::ScrollableArea::mouseExitedScrollbar):
3890         (WebCore::ScrollableArea::didAddScrollbar):
3891         (WebCore::ScrollableArea::willRemoveScrollbar):
3892         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
3893         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
3894         * platform/ScrollableArea.h:
3895         * platform/Scrollbar.cpp:
3896         (WebCore::Scrollbar::createNativeScrollbar):
3897         (WebCore::Scrollbar::Scrollbar):
3898         (WebCore::Scrollbar::scrollbarOverlayStyle):
3899         (WebCore::Scrollbar::isScrollableAreaActive):
3900         (WebCore::Scrollbar::offsetDidChange):
3901         (WebCore::Scrollbar::autoscrollPressedPart):
3902         (WebCore::Scrollbar::moveThumb):
3903         (WebCore::Scrollbar::mouseMoved):
3904         (WebCore::Scrollbar::mouseEntered):
3905         (WebCore::Scrollbar::mouseExited):
3906         (WebCore::Scrollbar::mouseUp):
3907         (WebCore::Scrollbar::shouldParticipateInHitTesting):
3908         (WebCore::Scrollbar::isWindowActive):
3909         (WebCore::Scrollbar::invalidateRect):
3910         (WebCore::Scrollbar::convertToContainingView):
3911         (WebCore::Scrollbar::convertFromContainingView):
3912         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
3913         * platform/Scrollbar.h:
3914         (WebCore::Scrollbar::scrollableArea):
3915         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
3916         * platform/ios/ScrollAnimatorIOS.mm:
3917         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
3918         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
3919         * platform/mac/ScrollAnimatorMac.h:
3920         * platform/mac/ScrollAnimatorMac.mm:
3921         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
3922         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
3923         (-[WebScrollbarPainterDelegate scrollAnimator]):
3924         (-[WebScrollbarPainterDelegate layer]):
3925         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
3926         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
3927         (WebCore::ScrollAnimator::create):
3928         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3929         (WebCore::ScrollAnimatorMac::scroll):
3930         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
3931         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
3932         (WebCore::ScrollAnimatorMac::immediateScrollTo):
3933         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
3934         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
3935         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
3936         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
3937         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
3938         (WebCore::ScrollAnimatorMac::pinnedInDirection):
3939         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
3940         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
3941         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
3942         (WebCore::ScrollAnimatorMac::stretchAmount):
3943         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
3944         (WebCore::ScrollAnimatorMac::canScrollVertically):
3945         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
3946         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
3947         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3948         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
3949         * rendering/RenderLayer.cpp:
3950         (WebCore::RenderLayer::RenderLayer):
3951         (WebCore::RenderLayer::createScrollbar):
3952         (WebCore::RenderLayer::destroyScrollbar):
3953         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3954         * rendering/RenderListBox.cpp:
3955         (WebCore::RenderListBox::createScrollbar):
3956         (WebCore::RenderListBox::destroyScrollbar):
3957         * rendering/RenderMenuList.cpp:
3958         (RenderMenuList::createScrollbar):
3959         * rendering/RenderMenuList.h:
3960         * rendering/RenderScrollbar.cpp:
3961         (WebCore::RenderScrollbar::createCustomScrollbar):
3962         (WebCore::RenderScrollbar::RenderScrollbar):
3963         * rendering/RenderScrollbar.h:
3964         * rendering/RenderSearchField.cpp:
3965         (WebCore::RenderSearchField::createScrollbar):