6ee14e73522d1e8939b93c67f649acde74d79989
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
2
3         [EFL] There are many warnings with software backend
4         https://bugs.webkit.org/show_bug.cgi?id=132422
5
6         Reviewed by Gyuyoung Kim.
7
8         ecore_evas_gl_x11_window_get should be called when only engine is opengl_x11.
9
10         This patch refactors not to call unnecessary API by checking engine type.
11         In addition, removed unnecessary isUsingEcoreX().
12
13         * platform/efl/EflScreenUtilities.cpp:
14         (WebCore::applyFallbackCursor):
15         (WebCore::getEcoreXWindow):
16         (WebCore::isUsingEcoreX): Deleted.
17         * platform/efl/EflScreenUtilities.h:
18
19 2014-05-01  Rik Cabanier  <cabanier@adobe.com>
20
21         Calling createPattern with a broken image must throw an invalidstate error
22         https://bugs.webkit.org/show_bug.cgi?id=132407
23
24         Reviewed by Dirk Schulze.
25
26         Per the WebIDL spec, passing non-finite parameter to a method that
27         takes doubles, should generate a type error.
28
29         Tests:
30         * canvas/philip/tests/2d.imageData.create2.nonfinite.html:
31         * fast/canvas/canvas-2d-imageData-create-nonfinite.html:
32
33         * html/canvas/CanvasRenderingContext2D.cpp:
34         (WebCore::CanvasRenderingContext2D::createImageData):
35
36 2014-04-30  David Hyatt  <hyatt@apple.com>
37
38         REGRESSION (r168046): [New Multicolumn] LeftToRight-rl.html (and all the other reversed/block-axis pagination tests) fail
39         https://bugs.webkit.org/show_bug.cgi?id=132419
40
41         Reviewed by Andreas Kling.
42
43         * rendering/RenderMultiColumnSet.cpp:
44         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting):
45         Don't flip here. The old code needed to do that, but the new code doesn't.
46
47 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
48
49         Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
50         Clean up unnecessary methods in the BackForwardClient interface
51
52         It broke a regression test and an API test.
53
54         * WebCore.exp.in:
55         * history/BackForwardClient.h:
56         (WebCore::BackForwardClient::backItem):
57         (WebCore::BackForwardClient::currentItem):
58         (WebCore::BackForwardClient::forwardItem):
59         * history/BackForwardController.cpp:
60         (WebCore::BackForwardController::BackForwardController):
61         * history/BackForwardController.h:
62         (WebCore::BackForwardController::client):
63         * history/BackForwardList.cpp:
64         (WebCore::BackForwardList::BackForwardList):
65         (WebCore::BackForwardList::close):
66         * history/BackForwardList.h:
67         (WebCore::BackForwardList::create):
68         (WebCore::BackForwardList::page):
69         * page/Page.cpp:
70         (WebCore::Page::Page):
71         (WebCore::Page::PageClients::PageClients):
72         * page/Page.h:
73
74 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
75
76         More iOS build fixing. MediaPlayerPrivateIOS is defunct and can be removed.
77         Fix some build errors in other media files.
78
79         * WebCore.xcodeproj/project.pbxproj:
80         * platform/graphics/MediaPlayer.cpp:
81         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
82         * platform/graphics/ios/MediaPlayerPrivateIOS.h: Removed.
83         * platform/graphics/ios/MediaPlayerPrivateIOS.mm: Removed.
84
85 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
86
87         Fix the iOS build, which no longer needs these calls
88         to enter/exitFullscreen.
89
90         * html/HTMLMediaElement.cpp:
91         (WebCore::HTMLMediaElement::parseAttribute):
92
93 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
94
95         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
96         https://bugs.webkit.org/show_bug.cgi?id=132396
97
98         Reviewed by Eric Carlson.
99
100         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
101
102         * Configurations/FeatureDefines.xcconfig:
103         * WebCore.exp.in:
104         * css/StyleResolver.cpp:
105         (WebCore::StyleResolver::canShareStyleWithElement):
106         * dom/DOMImplementation.cpp:
107         (WebCore::DOMImplementation::createDocument):
108         * editing/TextIterator.cpp:
109         (WebCore::isRendererReplacedElement):
110         * html/HTMLMediaElement.cpp:
111         (WebCore::HTMLMediaElement::HTMLMediaElement):
112         (WebCore::HTMLMediaElement::parseAttribute):
113         * html/HTMLMediaElement.h:
114         (WebCore::HTMLMediaElement::setNeedWidgetUpdate): Deleted.
115         * html/HTMLMediaSession.cpp:
116         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
117         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
118         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
119         * html/HTMLVideoElement.cpp:
120         (WebCore::HTMLVideoElement::createElementRenderer):
121         (WebCore::HTMLVideoElement::didAttachRenderers):
122         (WebCore::HTMLVideoElement::parseAttribute):
123         (WebCore::HTMLVideoElement::setDisplayMode):
124         * html/shadow/MediaControlElements.cpp:
125         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
126         * loader/EmptyClients.cpp:
127         (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
128         * loader/EmptyClients.h:
129         * loader/FrameLoaderClient.h:
130         * loader/SubframeLoader.cpp:
131         (WebCore::SubframeLoader::loadPlugin):
132         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin): Deleted.
133         * loader/SubframeLoader.h:
134         * page/FrameView.cpp:
135         (WebCore::FrameView::updateEmbeddedObject):
136         * page/Settings.cpp:
137         (WebCore::Settings::setVideoPluginProxyEnabled): Deleted.
138         * page/Settings.h:
139         (WebCore::Settings::isVideoPluginProxyEnabled): Deleted.
140         * platform/graphics/GraphicsLayerClient.h:
141         (WebCore::GraphicsLayerClient::mediaLayerMustBeUpdatedOnMainThread): Deleted.
142         * platform/graphics/MediaPlayer.cpp:
143         (WebCore::installedMediaEngines):
144         (WebCore::MediaPlayer::MediaPlayer):
145         (WebCore::MediaPlayer::loadWithNextMediaEngine):
146         (WebCore::NullMediaPlayerPrivate::deliverNotification): Deleted.
147         (WebCore::NullMediaPlayerPrivate::setMediaPlayerProxy): Deleted.
148         (WebCore::NullMediaPlayerPrivate::setControls): Deleted.
149         (WebCore::MediaPlayer::deliverNotification): Deleted.
150         (WebCore::MediaPlayer::setMediaPlayerProxy): Deleted.
151         (WebCore::MediaPlayer::setControls): Deleted.
152         * platform/graphics/MediaPlayer.h:
153         * platform/graphics/MediaPlayerPrivate.h:
154         (WebCore::MediaPlayerPrivateInterface::deliverNotification): Deleted.
155         (WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Deleted.
156         (WebCore::MediaPlayerPrivateInterface::setControls): Deleted.
157         * platform/graphics/ca/GraphicsLayerCA.cpp:
158         (WebCore::GraphicsLayerCA::updateGeometry):
159         (WebCore::GraphicsLayerCA::updateContentsRects):
160         (WebCore::GraphicsLayerCA::mediaLayerMustBeUpdatedOnMainThread): Deleted.
161         * platform/graphics/ca/GraphicsLayerCA.h:
162         * rendering/RenderEmbeddedObject.cpp:
163         (WebCore::RenderEmbeddedObject::canHaveChildren):
164         * rendering/RenderLayerBacking.cpp:
165         (WebCore::RenderLayerBacking::mediaLayerMustBeUpdatedOnMainThread): Deleted.
166         * rendering/RenderLayerBacking.h:
167         * rendering/RenderLayerCompositor.cpp:
168         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
169
170 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
171
172         [iOS WK2] Some accerated overflow-scroll doesn't scroll correctly
173         https://bugs.webkit.org/show_bug.cgi?id=132375
174
175         Reviewed by Tim Horton.
176         
177         We set the size of the scrolling layer (which becomes the bounds of
178         the UIScrollView) to a non-pixel-snapped padding box size, but the
179         size of the contents layer is an integral-snapped scroll size.
180         This would result in a fractional difference between the two, which
181         makes us thing that the element is scrollable when it really is not.
182         
183         Fix by setting the size of the scroll layer to pixel snapped client size,
184         which is what we also use for scrollability computation.
185         
186         Added some FIXMEs in code that requires pixel snapping.
187         
188         Also use #if PLATFORM(IOS)/#else to bracket some code that never runs on iOS
189         but tries to do something similar to iOS-only code.
190
191         * rendering/RenderLayerBacking.cpp:
192         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
193
194 2014-04-30  David Hyatt  <hyatt@apple.com>
195
196         REGRESSION (r168046): [New Multicolumn] Painting order is wrong for columns and fixed positioned elements
197         https://bugs.webkit.org/show_bug.cgi?id=132377
198
199         Reviewed by Simon Fraser.
200
201         Added fast/multicol/fixed-stack.html
202
203         * rendering/RenderLayer.cpp:
204         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
205         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
206         Change the flow thread layer for multicolumn layout to be normal flow only and to
207         stay self-painting. This has the effect of keeping the flow thread layer grouped
208         with the enclosing multicolumn layer, and this keeps the paint order correct when
209         compositing kicks in (or when something would otherwise try to get between the
210         two layers).
211
212 2014-04-30  Eric Carlson  <eric.carlson@apple.com>
213
214         [iOS] do not pause video when entering background while playing to external device
215         https://bugs.webkit.org/show_bug.cgi?id=132374
216
217         Reviewed by Jer Noble.
218
219         * WebCore.exp.in: Update beginInterruption signature.
220
221         * html/HTMLMediaElement.cpp:
222         (WebCore::HTMLMediaElement::canOverrideBackgroundPlaybackRestriction): New, return true when
223             playing to external device.
224         * html/HTMLMediaElement.h:
225
226         * platform/audio/MediaSession.cpp:
227         (WebCore::MediaSession::beginInterruption): Add interruption type to beginInterruption.
228         * platform/audio/MediaSession.h:
229
230         * platform/audio/MediaSessionManager.cpp:
231         (WebCore::MediaSessionManager::beginInterruption): Ditto.
232         (WebCore::MediaSessionManager::applicationWillEnterBackground): Ditto.
233         (WebCore::MediaSessionManager::systemWillSleep): Ditto.
234         * platform/audio/MediaSessionManager.h:
235
236         * platform/audio/ios/AudioDestinationIOS.h:
237         * platform/audio/ios/MediaSessionManagerIOS.mm:
238         (-[WebMediaSessionHelper interruption:]): Ditto.
239
240         * platform/audio/mac/AudioDestinationMac.h: Make most methods private. Add 
241             canOverrideBackgroundPlaybackRestriction. Add missing overrides.
242         * testing/Internals.cpp:
243         (WebCore::Internals::beginMediaSessionInterruption): Pass interruption type.
244
245 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
246
247         Unreviewed, rolling out r167879 and r167942.
248         https://bugs.webkit.org/show_bug.cgi?id=132408
249
250         OrderIterator changes caused regressions in flexbox (Requested
251         by rego on #webkit).
252
253         We're keeping the new layout test introduced in r167942
254         (fast/flexbox/order-iterator-crash.html) to avoid similar
255         regressions in the future.
256
257         Reverted changesets:
258
259         "OrderIterator refactoring to avoid extra loops"
260         https://bugs.webkit.org/show_bug.cgi?id=119061
261         http://trac.webkit.org/changeset/167879
262
263         "REGRESSION (r167879): Heap-use-after-free in
264         WebCore::RenderFlexibleBox"
265         https://bugs.webkit.org/show_bug.cgi?id=132337
266         http://trac.webkit.org/changeset/167942
267
268 2014-04-30  Enrica Casucci  <enrica@apple.com>
269
270         Cursor gets thinner on empty lines.
271         https://bugs.webkit.org/show_bug.cgi?id=132411
272         <rdar://problem/15994556>
273
274         Reviewed by Benjamin Poulain.
275
276         RenderLineBreak::localCaretRect should not define
277         locally the constant caretWidth, but use the one from
278         RenderObject.h which knows about the differences between
279         iOS and the other platforms.
280
281         * rendering/RenderLineBreak.cpp:
282         (WebCore::RenderLineBreak::localCaretRect):
283
284 2014-04-30  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
285
286         [GStreamer] Use GstMetaVideo
287         https://bugs.webkit.org/show_bug.cgi?id=132247
288
289         Reviewed by Philippe Normand.
290
291         In WebKitVideoSink we announce the usage of GstMetaVideo, but we do
292         not use it when handling the video frames. This might break
293         some decoders and filters that rely on buffer's meta, rather
294         that in the caps structures.
295
296         This patch enables the use of GstMetaVideo through the GstVideoFrame
297         API. And it is used everywhere the buffer mapping is required.
298
299         Also this patch changes to nullptr where zeros were used.
300
301         Also, compile conditionally the video buffer conversion when it is
302         ARGB/BGRA, since it is only required for the Cairo backend.
303
304         No new tests, already covered by current tests.
305
306         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
307         (WebCore::getVideoSizeAndFormatFromCaps): init the GstVideoInfo before
308         used and remove caps fixate check since it is done by
309         gst_video_info_from_caps().
310         * platform/graphics/gstreamer/ImageGStreamer.h:
311         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
312         (ImageGStreamer::ImageGStreamer): use GstVideoFrame for buffer mapping
313         and unmapping.
314         (ImageGStreamer::~ImageGStreamer): ditto.
315         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
316         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): ditto.
317         (WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
318         return nullptr if failed.
319         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
320         (webkitVideoSinkRender): rely on GstVideoInfo rather than on the
321         caps. Use GstVideoFrame for buffer mapping and unmapping. Add guards
322         for buffer transformation, since it's only used by Cairo.
323         (webkitVideoSinkDispose): remove glib version guards.
324         (webkitVideoSinkSetCaps): update the value of the private
325         GstVideoInfo.
326
327 2014-04-30  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
328
329         [GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
330         https://bugs.webkit.org/show_bug.cgi?id=132390
331
332         Reviewed by Philippe Normand.
333
334         Since EFL port use GLib 2.38 and GTK+, 2.33.2, I assume it is OK
335         remove, in GTK+ and GST, the existing glib version guards.
336
337         No new tests, already covered by current tests.
338
339         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
340         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
341         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
342         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
343         (webkitVideoSinkDispose):
344         (webkitVideoSinkFinalize): Deleted.
345
346 2014-04-30  Alex Christensen  <achristensen@webkit.org>
347
348         Updated ANGLE.
349         https://bugs.webkit.org/show_bug.cgi?id=132367
350         <rdar://problem/16211451>
351
352         Reviewed by Dean Jackson.
353
354         * CMakeLists.txt
355         Fixed ANGLE compiling with the update.
356         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
357         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
358         Removed SH_MAP_LONG_VARIABLE_NAMES which is no longer defined in ANGLE.
359         See https://chromium.googlesource.com/angle/angle/+/3cdfcce86b38ef31a0afd71855887193a7924468
360         * platform/graphics/opengl/Extensions3DOpenGLES.h:
361         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
362         Updated type names from ANGLE.
363
364 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
365
366         Move Blob.slice() implementation into BlobRegistryImpl
367         https://bugs.webkit.org/show_bug.cgi?id=132402
368
369         Reviewed by Anders Carlsson.
370
371         Part or centralizing the responsibility for file size tracking.
372
373         * fileapi/Blob.cpp:
374         (WebCore::Blob::Blob):
375         (WebCore::Blob::slice): Deleted.
376         * fileapi/Blob.h:
377         (WebCore::Blob::slice):
378         * fileapi/ThreadableBlobRegistry.cpp:
379         (WebCore::ThreadableBlobRegistry::registerBlobURL):
380         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
381         (WebCore::registerBlobURLTask): Deleted.
382         (WebCore::registerBlobURLFromTask): Deleted.
383         * fileapi/ThreadableBlobRegistry.h:
384         * platform/network/BlobRegistry.h:
385         * platform/network/BlobRegistryImpl.cpp:
386         (WebCore::BlobRegistryImpl::appendStorageItems):
387         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
388         (WebCore::BlobRegistryImpl::blobSize):
389         * platform/network/BlobRegistryImpl.h:
390
391 2014-04-30  Brent Fulgham  <bfulgham@apple.com>
392
393         Unreviewed build fix after r168041.
394
395         * WebCore.exp.in: Add missing iOS exports.
396
397 2014-04-30  Beth Dakin  <bdakin@apple.com>
398
399         Always-visible scrollbars continuously repaint after non-momentum scrollling
400         https://bugs.webkit.org/show_bug.cgi?id=132403
401         -and corresponding-
402         <rdar://problem/16553878>
403
404         Reviewed by Simon Fraser.
405
406         No longer universally opt into presentation value mode whenever the scroll 
407         position changes on the scrolling thread. We really only want it for momentum 
408         scrolls, and this will ensure that we always set it to NO once we have set it to 
409         YES.
410         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
411         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
412         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
413
414         Expose shouldUsePresentationValue.
415         * platform/mac/NSScrollerImpDetails.h:
416
417 2014-04-30  Anders Carlsson  <andersca@apple.com>
418
419         Move the legacy WebKit API into WebKitLegacy.framework and move it inside WebKit.framework
420         https://bugs.webkit.org/show_bug.cgi?id=132399
421         <rdar://problem/15920046>
422
423         Reviewed by Dan Bernstein.
424
425         Allow WebKitLegacy to link against WebCore.
426
427         * Configurations/WebCore.xcconfig:
428
429 2014-04-30  David Hyatt  <hyatt@apple.com>
430
431         [New Multicolumn] ASSERTs in fast/dynamic/continuation-detach-crash.html
432         https://bugs.webkit.org/show_bug.cgi?id=132392
433
434         Reviewed by Dean Jackson.
435
436         * rendering/RenderFlowThread.cpp:
437         (WebCore::RenderFlowThread::setRegionRangeForBox):
438         Add ASSERTs in case we ever try to set regions from the wrong flow thread
439         as part of the box's region range.
440
441         * rendering/RenderMultiColumnFlowThread.cpp:
442         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
443         Add a bunch of code that handles the discovery of a span from an outer flow thread
444         being inserted into an inner flow thread. This forces us to delete that placeholder
445         and shift the outer spanning content into the inner flow thread in order to get a new
446         mapping/placeholder created in the inner flow thread.
447
448         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
449         Tighten this code to use the parent() just in case we change the invariant of
450         parent = containingBlock later.
451
452         * rendering/RenderMultiColumnFlowThread.h:
453         Add a static guard when shifting a spanner to prevent the outer flow thread from
454         thinking the spanner belongs to it when it gets punted out of the inner flow thread.
455         A better long-term solution might be to make the spanner map global instead of
456         per-flow thread.
457
458         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
459         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
460         * rendering/RenderMultiColumnSpannerPlaceholder.h:
461         Cache the flow thread so that we can get back to it in order to detect if the
462         placeholder belongs to us or not.
463
464         * rendering/RenderObject.cpp:
465         (WebCore::RenderObject::insertedIntoTree):
466         Notifications from insertedIntoTree are problematic, since this can be called during
467         the layout of the outer flow thread for content inside an inner flow thread that is
468         not getting a layout yet. This makes the currentFlowThread in the flow thread controller
469         inaccurate, so we have to add code to clear it out and put it back.
470
471 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
472
473         AX: Make "contenteditable" regions into AXTextAreas
474         https://bugs.webkit.org/show_bug.cgi?id=132379
475
476         Reviewed by Mario Sanchez Prada.
477
478         Make contenteditable regions into AXTextAreas. This will allow for a more standardized
479         interface for interaction with assistive technologies.
480
481         Test: accessibility/content-editable-as-textarea.html
482
483         * accessibility/AccessibilityNodeObject.cpp:
484         (WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet):
485         * accessibility/AccessibilityObject.cpp:
486         (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
487         * accessibility/AccessibilityObject.h:
488         * accessibility/AccessibilityRenderObject.cpp:
489         (WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange):
490         (WebCore::AccessibilityRenderObject::selectedText):
491         (WebCore::AccessibilityRenderObject::selectedTextRange):
492         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
493         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
494         (WebCore::AccessibilityRenderObject::ariaSelectedTextRange): Deleted.
495         * accessibility/AccessibilityRenderObject.h:
496
497 2014-04-30  Brian J. Burg  <burg@cs.washington.edu>
498
499         Clean up unnecessary methods in the BackForwardClient interface
500         https://bugs.webkit.org/show_bug.cgi?id=131637
501
502         Reviewed by Andreas Kling.
503
504         Demote back/current/forwardItem and iOS-specific methods from the
505         BackForwardClient interface. Convert the class to not be refcounted.
506
507         No new tests, no behavior was changed.
508
509         * WebCore.exp.in:
510         * history/BackForwardClient.h:
511         (WebCore::BackForwardClient::~BackForwardClient): Deleted.
512         (WebCore::BackForwardClient::backItem): Deleted.
513         (WebCore::BackForwardClient::currentItem): Deleted.
514         (WebCore::BackForwardClient::forwardItem): Deleted.
515         * history/BackForwardController.cpp:
516         (WebCore::BackForwardController::BackForwardController):
517         * history/BackForwardController.h: Take ownership of the passed BackForwardClient.
518         (WebCore::BackForwardController::client): Return a reference.
519         * history/BackForwardList.h: Remove the Page field, since it isn't used any more.
520         (WebCore::BackForwardList::create): Deleted.
521         * page/Page.h: Remove RefPtr from PageClient.
522         * page/Page.cpp:
523         (WebCore::PageClients::PageClients): Initialize client to nullptr.
524
525 2014-04-30  Brent Fulgham  <bfulgham@apple.com>
526
527         [Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
528         https://bugs.webkit.org/show_bug.cgi?id=132320
529
530         Reviewed by Eric Carlson.
531
532         * Modules/mediacontrols/mediaControlsApple.css:
533         (video::-webkit-media-text-track-container .hidden): Added.
534         * html/HTMLMediaElement.cpp:
535         (WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
536         new 'updateCaptionsContainer'.
537         (WebCore::HTMLMediaElement::updateCaptionContainer): Added.
538         * html/HTMLMediaElement.h:
539
540 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
541
542         https://bugs.webkit.org/show_bug.cgi?id=132363
543         Make Blob RawData immutable
544
545         Reviewed by Anders Carlsson.
546
547         * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData):
548         Create RawData in one step.
549
550         * WebCore.exp.in: Don't export a constructor that we no longer have (and the new one is inline).
551
552         * fileapi/Blob.cpp: Removed entirely dead code.
553
554         * fileapi/WebKitBlobBuilder.cpp:
555         * fileapi/WebKitBlobBuilder.h:
556         Updated to collect data in a plain Vector, so that we don't have to modify RawData.
557         Removed FIXMEs about renaming - there used to be a BlobBuilder exposed to JS, but
558         now this is just a helper to implement JS Blob constructor. We should probably
559         still rename it, but not how the FIXME suggested.
560
561         * platform/network/BlobData.cpp:
562         (WebCore::BlobDataItem::detachFromCurrentThread): RawData::detachFromCurrentThread()
563         was a no-op.
564         (WebCore::BlobDataHandle::BlobDataHandle): Deleted. This was entirely dead code.
565         (WebCore::BlobDataHandle::~BlobDataHandle): Ditto.
566
567         * platform/network/BlobData.h: Made RawData immutable.
568
569         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob):
570         Create RawData in one step.
571
572 2014-04-30  David Hyatt  <hyatt@apple.com>
573
574         [New Multicolumn] Region offset not factored in when mapping to local coords
575         https://bugs.webkit.org/show_bug.cgi?id=132383
576
577         Reviewed by Anders Carlsson.
578
579         Make sure to cache the offset of the multicolumn set from its parent and then
580         add that in to the translation offset.
581
582         * rendering/RenderMultiColumnFlowThread.cpp:
583         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
584
585 2014-04-30  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
586
587         Move removeEquivalentProperties functions to EditingStyle
588         https://bugs.webkit.org/show_bug.cgi?id=131093
589
590         Reviewed by Csaba Osztrogonác.
591
592         A follow-up to r167967. Use single line declaration for template methods.
593
594         * editing/EditingStyle.h:
595
596 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
597
598         [CSS Grid Layout] Enable runtime feature by default
599         https://bugs.webkit.org/show_bug.cgi?id=132189
600
601         Reviewed by Benjamin Poulain.
602
603         * page/Settings.in: Set cssGridLayoutEnabled to true.
604
605 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
606
607         [CSS Grid Layout] Wrap some specific grid code under compilation flag
608         https://bugs.webkit.org/show_bug.cgi?id=132341
609
610         Reviewed by Benjamin Poulain.
611
612         Some static variables in RenderBox are only used for CSS Grid Layout code. Wrap them and the related methods
613         under ENABLE_CSS_GRID_LAYOUT compilation flag.
614
615         * rendering/RenderBox.cpp:
616         (WebCore::RenderBox::willBeDestroyed):
617         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
618         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
619         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
620         (WebCore::RenderBox::computePercentageLogicalHeight):
621         * rendering/RenderBox.h:
622
623 2014-04-29  Commit Queue  <commit-queue@webkit.org>
624
625         Unreviewed, rolling out r167962 and r167975.
626         https://bugs.webkit.org/show_bug.cgi?id=132376
627
628         Mysteriously broke many tests (Requested by ap on #webkit).
629
630         Reverted changesets:
631
632         "[Mac, iOS] Support caption activation via JS
633         webkitHasClosedCaptions method"
634         https://bugs.webkit.org/show_bug.cgi?id=132320
635         http://trac.webkit.org/changeset/167962
636
637         "Unreviewed test fix after r167962."
638         http://trac.webkit.org/changeset/167975
639
640 2014-04-29  David Hyatt  <hyatt@apple.com>
641
642         [New Multicolumn] Multiple tests assert in RenderGeometryMap
643         https://bugs.webkit.org/show_bug.cgi?id=132285
644
645         Reviewed by Simon Fraser.
646
647         Implement offsetFromContainer for RenderMultiColumnFlowThread so that the
648         geometry map gets the right offsets. This is really only relevant for the 
649         geometry map, since I already overrode mapAbsoluteToLocalPoint and multicolumn
650         flow threads are repaint containers (so mapLocalToAbsolute never needs offsetFromContainer).
651
652         * rendering/RenderMultiColumnFlowThread.cpp:
653         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
654         * rendering/RenderMultiColumnFlowThread.h:
655
656 2014-04-29  Benjamin Poulain  <bpoulain@apple.com>
657
658         [iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely messed up
659         https://bugs.webkit.org/show_bug.cgi?id=132368
660
661         Reviewed by Simon Fraser.
662
663         * platform/graphics/ca/mac/TileController.mm:
664         (WebCore::TileController::TileController):
665         The initial device scale factor was initialized to 1. We were returning the wrong zoomedOutContentsScale() and
666         contentsScale() on retina devices until the next successful scale update.
667
668 2014-04-29  Alexey Proskuryakov  <ap@apple.com>
669
670         Remove an unused override of BlobRegistryImpl::appendStorageItems
671         https://bugs.webkit.org/show_bug.cgi?id=132365
672
673         Reviewed by Andreas Kling.
674
675         * platform/network/BlobRegistryImpl.cpp:
676         (WebCore::BlobRegistryImpl::appendStorageItems): Deleted.
677         * platform/network/BlobRegistryImpl.h:
678
679 2014-04-29  Eric Carlson  <eric.carlson@apple.com>
680
681         [Mac] tag the video layers with descriptive name to aid debugging
682         https://bugs.webkit.org/show_bug.cgi?id=132371
683
684         Reviewed by Darin Adler.
685
686         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
687         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Set the AVPlayerLayer
688             name in a debug build.
689
690 2014-04-29  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
691
692         [GTK][cmake] CMake variable (non)expansion causing 'File name too long' build error.
693         https://bugs.webkit.org/show_bug.cgi?id=132244
694
695         Reviewed by Martin Robinson.
696
697         Removing quotes around include directory variable ${WebCore_INCLUDE_DIRECTORIES} in
698         the include_directories cmake macro enables the variable to be expanded correctly.
699
700         No tests created as this fixes a platform specific build issue.
701
702         * PlatformGTK.cmake:
703
704 2014-04-29  Brent Fulgham  <bfulgham@apple.com>
705
706         Unreviewed test fix after r167962.
707         * Modules/mediacontrols/mediaControlsApple.css:
708         (.hidden): Use common '.hidden' class for controls.
709         (video::-webkit-media-text-track-container .hidden): Deleted.
710
711 2014-04-29  Brady Eidson  <beidson@apple.com>
712
713         Handle selection services menu.
714         <rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
715
716         Reviewed by Tim Horton.
717
718         * WebCore.exp.in:
719
720 2014-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
721
722         Removing unused argument in InlineFlowBox::placeBoxesInInlineDirection()
723         https://bugs.webkit.org/show_bug.cgi?id=132369
724
725         Reviewed by Darin Adler.
726
727         This was not caught by our compiler because placeBoxesInInlineDirection()
728         is mutually-recursive with placeBoxRangeInInlineDirection().
729
730         No new tests are necessary because there should be no behavior change.
731
732         * rendering/InlineFlowBox.cpp:
733         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
734         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
735         * rendering/InlineFlowBox.h:
736         * rendering/RenderBlockLineLayout.cpp:
737         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
738
739 2014-04-29  Alex Christensen  <achristensen@webkit.org>
740
741         [WinCairo] Switch video from GStreamer to Media Foundation.
742         https://bugs.webkit.org/show_bug.cgi?id=132358
743
744         Reviewed by Brent Fulgham.
745
746         * WebCore.vcxproj/WebCore.vcxproj:
747         Removed dependencies on GStreamer.
748
749 2014-04-29  Simon Fraser  <simon.fraser@apple.com>
750
751         Remove some PLATFORM(IOS) #ifdefs related to hasAcceleratedTouchScrolling()
752         https://bugs.webkit.org/show_bug.cgi?id=132353
753
754         Reviewed by Tim Horton & Darin Adler.
755
756         Minor cleanup and refactoring to remove #idefs.
757
758         * rendering/RenderLayer.cpp:
759         (WebCore::RenderLayer::scrollTo): No need for this #ifdef, usesCompositedScrolling()
760         gives the right answser already.
761         (WebCore::RenderLayer::visibleContentRectInternal): Use showsOverflowControls() to
762         avoid #ifdef.
763         (WebCore::RenderLayer::invalidateScrollbarRect): Ditto.
764         (WebCore::RenderLayer::invalidateScrollCornerRect): Ditto.
765         (WebCore::RenderLayer::verticalScrollbarWidth): Ditto.
766         (WebCore::RenderLayer::horizontalScrollbarHeight): Ditto.
767         (WebCore::RenderLayer::showsOverflowControls): Return false on iOS.
768         (WebCore::RenderLayer::paintOverflowControls): Ditto.
769         (WebCore::RenderLayer::calculateClipRects): Ditto.
770         * rendering/RenderLayer.h:
771         * rendering/RenderLayerBacking.cpp:
772         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
773         Just #ifdef in side of this function rather than having two similar functions.
774         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
775         (WebCore::hasNonZeroTransformOrigin):
776         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Use a local bool
777         to reduce #ifdefs.
778         (WebCore::layerOrAncestorIsTransformedOrScrolling): Deleted.
779
780 2014-04-29  Simon Fraser  <simon.fraser@apple.com>
781
782         Remove Settings::compositedScrollingForFramesEnabled
783         https://bugs.webkit.org/show_bug.cgi?id=132352
784
785         Reviewed by Andreas Kling.
786
787         The usesCompositedScrolling setting was only used by Chromium, so
788         remove it and associated code.
789
790         * page/FrameView.cpp:
791         (WebCore::FrameView::usesCompositedScrolling): Deleted.
792         * page/FrameView.h:
793         * page/Settings.in:
794         * rendering/RenderLayerCompositor.cpp:
795         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
796
797 2014-04-29  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
798
799         Move removeEquivalentProperties functions to EditingStyle
800         https://bugs.webkit.org/show_bug.cgi?id=131093
801
802         Reviewed by Darin Adler.
803
804         Moved the removeEquivalentProperties functions
805         from StyleProperties to EditingStyle class.
806
807         * css/StyleProperties.cpp:
808         (WebCore::MutableStyleProperties::removeEquivalentProperties): Deleted.
809         * css/StyleProperties.h:
810         * editing/EditingStyle.cpp:
811         (WebCore::EditingStyle::removeStyleAddedByNode):
812         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
813         (WebCore::EditingStyle::prepareToApplyAt):
814         (WebCore::EditingStyle::removeEquivalentProperties):
815         (WebCore::extractPropertiesNotIn):
816         * editing/EditingStyle.h:
817
818 2014-04-29  David Hyatt  <hyatt@apple.com>
819
820         [New Multicolumn] Implement support for compositing
821         https://bugs.webkit.org/show_bug.cgi?id=132298
822
823         Reviewed by Simon Fraser.
824
825         * rendering/RenderLayer.cpp:
826         (WebCore::accumulateOffsetTowardsAncestor):
827         Add in a case for the new columns that calls into the multi-column flow thread
828         to get an offset to adjust by.
829
830         * rendering/RenderLayerBacking.cpp:
831         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
832         Make sure this code only runs for named flow threads.
833
834         * rendering/RenderLayerCompositor.cpp:
835         (WebCore::RenderLayerCompositor::canBeComposited):
836         Turn on compositing support for in-flow RenderFlowThreads instead of always returning
837         false
838
839         * rendering/RenderMultiColumnFlowThread.cpp:
840         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
841         Changed this function to fix a couple of bugs exposed by compositing/columns tests. Its
842         end goal is the same, but the approach is improved.
843
844         * rendering/RenderMultiColumnSet.cpp:
845         (WebCore::RenderMultiColumnSet::endFlow):
846         Don't pad out to a multiple of column height. You can't flip around a flow thread
847         to get back to accurate physical coordinates if bogus padding is introduced. This
848         seemed to have no effect on any layout tests when removed, so I don't think it 
849         was really serving any useful purpose.
850
851         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
852         Don't factor in the overall flow thread portion, since this is handled by the callers
853         now.
854
855         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
856         * rendering/RenderMultiColumnSet.h:
857         Change this function to be ASSERT_NOT_REACHED(), since we want to know if someone calls
858         it. It only runs for named flow thread compositing code, so it would be a mistake if
859         this ever gets invoked.
860
861 2014-04-29  Mark Hahnenberg  <mhahnenberg@apple.com>
862
863         JSProxies should be cacheable
864         https://bugs.webkit.org/show_bug.cgi?id=132351
865
866         Reviewed by Geoffrey Garen.
867
868         No new tests.
869
870         Whenever we encounter a proxy in an inline cache we should try to cache on the 
871         proxy's target instead of giving up.
872
873         This patch adds support for a simple "recursive" inline cache if the base object
874         we're accessing is a pure forwarding proxy. JSGlobalObject and its subclasses 
875         are the only ones to benefit from this right now.
876
877         This is performance neutral on the benchmarks we track. Currently we won't
878         cache on JSDOMWindow due to HasImpureGetOwnPropertySlot, but this issue will be fixed soon.
879
880         * bindings/js/JSDOMWindowShell.h:
881         (WebCore::JSDOMWindowShell::createStructure):
882
883 2014-04-29  Brent Fulgham  <bfulgham@apple.com>
884
885         [Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
886         https://bugs.webkit.org/show_bug.cgi?id=132320
887
888         Reviewed by Eric Carlson.
889
890         * Modules/mediacontrols/mediaControlsApple.css:
891         (video::-webkit-media-text-track-container .hidden): Added.
892         * html/HTMLMediaElement.cpp:
893         (WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
894         new 'updateCaptionsContainer'.
895         (WebCore::HTMLMediaElement::updateCaptionContainer): Added.
896         * html/HTMLMediaElement.h:
897         * html/shadow/MediaControlElements.cpp:
898         (WebCore::MediaControlTextTrackContainerElement::hide): Use CSS class .hidden instead of
899         hard-coded "display:none".
900         (WebCore::MediaControlTextTrackContainerElement::show): Ditto.
901         * html/shadow/MediaControlElements.h:
902
903 2014-04-28  Roger Fong  <roger_fong@apple.com>
904
905         Plugins hidden by images should autoplay.
906         https://bugs.webkit.org/show_bug.cgi?id=132222.
907         <rdar://problem/16653536>
908
909         Reviewed by Jon Lee and Darin Adler.
910
911         * WebCore.exp.in: Add exports needed by WK2.
912
913 2014-04-29  Filip Pizlo  <fpizlo@apple.com>
914
915         Use LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
916         https://bugs.webkit.org/show_bug.cgi?id=112840
917
918         Rubber stamped by Geoffrey Garen.
919
920         It already has a lot of tests.
921
922         * Configurations/FeatureDefines.xcconfig:
923
924 2014-04-29  Brady Eidson  <beidson@apple.com>
925
926         Change Image Controls replacement to use selection and paste
927         <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
928
929         Reviewed by Tim Horton.
930
931         * WebCore.exp.in: Remove deleted symbol.
932
933         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
934         (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
935
936         * page/ContextMenuController.cpp:
937         (WebCore::ContextMenuController::showImageControlsMenu): Select the image element
938           before showing the menu.
939         (WebCore::ContextMenuController::replaceControlledImage): Deleted.
940         * page/ContextMenuController.h:
941
942 2014-04-29  Jer Noble  <jer.noble@apple.com>
943
944         [iOS] Remove workaround for <rdar://problem/16578727>.
945         https://bugs.webkit.org/show_bug.cgi?id=132338
946
947         Reviewed by Darin Adler.
948
949         Now that <rdar://problem/16578727> is fixed, remove the workaround by replacing the
950         call to -_updatePlaybackControlsViewController with one to -layoutIfNeeded.
951
952         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
953         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
954
955 2014-04-29  Zan Dobersek  <zdobersek@igalia.com>
956
957         ScriptExecutionContext::Task should work well with C++11 lambdas
958         https://bugs.webkit.org/show_bug.cgi?id=129795
959
960         Reviewed by Darin Adler.
961
962         Instead of having classes that subclass ScriptExecutionContext::Task and override
963         the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
964         take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
965         which would contain the code currently kept in the performTask() methods.
966
967         This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
968         cleanup tasks, the Task object can be implicitly constructed by using the initializer list
969         constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
970         The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
971         object in the std::function wrapper, along with a boolean member that indicates whether the
972         task is of cleanup nature.
973
974         * Modules/quota/StorageErrorCallback.cpp:
975         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
976         (WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
977         * Modules/quota/StorageErrorCallback.h:
978         (WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
979         * Modules/webdatabase/Database.cpp:
980         (WebCore::Database::~Database):
981         (WebCore::Database::runTransaction):
982         (WebCore::Database::scheduleTransactionCallback):
983         (WebCore::DerefContextTask::create): Deleted.
984         (WebCore::DerefContextTask::performTask): Deleted.
985         (WebCore::DerefContextTask::isCleanupTask): Deleted.
986         (WebCore::DerefContextTask::DerefContextTask): Deleted.
987         (WebCore::callTransactionErrorCallback): Deleted.
988         (WebCore::DeliverPendingCallbackTask::create): Deleted.
989         (WebCore::DeliverPendingCallbackTask::performTask): Deleted.
990         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
991         * Modules/webdatabase/DatabaseManager.cpp:
992         (WebCore::DatabaseManager::openDatabase):
993         (WebCore::DatabaseCreationCallbackTask::create): Deleted.
994         (WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
995         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
996         * Modules/webdatabase/DatabaseSync.cpp:
997         (WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
998         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
999         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
1000         * Modules/webdatabase/SQLCallbackWrapper.h:
1001         (WebCore::SQLCallbackWrapper::clear):
1002         (WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
1003         (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
1004         (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
1005         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
1006         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1007         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
1008         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
1009         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
1010         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
1011         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
1012         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1013         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
1014         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
1015         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1016         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1017         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
1018         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
1019         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
1020         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
1021         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
1022         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
1023         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1024         * bindings/js/JSCallbackData.h:
1025         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
1026         (WebCore::DeleteCallbackDataTask::create): Deleted.
1027         (WebCore::DeleteCallbackDataTask::performTask): Deleted.
1028         (WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
1029         * bindings/js/JSDOMGlobalObjectTask.cpp:
1030         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1031         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
1032         (WebCore::JSGlobalObjectTask::performTask): Deleted.
1033         * bindings/js/JSDOMGlobalObjectTask.h:
1034         * bindings/js/JSDOMWindowBase.cpp:
1035         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1036         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1037         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1038         * bindings/scripts/CodeGeneratorJS.pm:
1039         * bindings/scripts/test/JS/JSTestCallback.cpp:
1040         (WebCore::JSTestCallback::~JSTestCallback):
1041         (GenerateCallbackImplementation):
1042         * dom/CrossThreadTask.h:
1043         (WebCore::CrossThreadTask1::performTask):
1044         (WebCore::CrossThreadTask2::performTask):
1045         (WebCore::CrossThreadTask3::performTask):
1046         (WebCore::CrossThreadTask4::performTask):
1047         (WebCore::CrossThreadTask5::performTask):
1048         (WebCore::CrossThreadTask6::performTask):
1049         (WebCore::CrossThreadTask7::performTask):
1050         (WebCore::CrossThreadTask8::performTask):
1051         (WebCore::createCallbackTask):
1052         (WebCore::CrossThreadTask1::create): Deleted.
1053         (WebCore::CrossThreadTask2::create): Deleted.
1054         (WebCore::CrossThreadTask3::create): Deleted.
1055         (WebCore::CrossThreadTask4::create): Deleted.
1056         (WebCore::CrossThreadTask5::create): Deleted.
1057         (WebCore::CrossThreadTask6::create): Deleted.
1058         (WebCore::CrossThreadTask7::create): Deleted.
1059         (WebCore::CrossThreadTask8::create): Deleted.
1060         * dom/Document.cpp:
1061         (WebCore::Document::addConsoleMessage):
1062         (WebCore::Document::addMessage):
1063         (WebCore::Document::postTask):
1064         (WebCore::Document::pendingTasksTimerFired):
1065         (WebCore::PerformTaskContext::PerformTaskContext): Deleted.
1066         (WebCore::Document::didReceiveTask): Deleted.
1067         * dom/Document.h:
1068         * dom/ScriptExecutionContext.cpp:
1069         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
1070         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1071         (WebCore::ProcessMessagesSoonTask::create): Deleted.
1072         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
1073         (WebCore::ScriptExecutionContext::Task::~Task): Deleted.
1074         * dom/ScriptExecutionContext.h:
1075         (WebCore::ScriptExecutionContext::Task::Task):
1076         (WebCore::ScriptExecutionContext::Task::performTask):
1077         (WebCore::ScriptExecutionContext::Task::isCleanupTask):
1078         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
1079         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
1080         * dom/StringCallback.cpp:
1081         (WebCore::StringCallback::scheduleCallback):
1082         * loader/appcache/ApplicationCacheGroup.cpp:
1083         (WebCore::ApplicationCacheGroup::postListenerTask):
1084         (WebCore::CallCacheListenerTask::create): Deleted.
1085         (WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
1086         * workers/DefaultSharedWorkerRepository.cpp:
1087         (WebCore::SharedWorkerProxy::postTaskToLoader):
1088         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
1089         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1090         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
1091         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
1092         (WebCore::SharedWorkerConnectTask::create): Deleted.
1093         (WebCore::SharedWorkerConnectTask::performTask): Deleted.
1094         * workers/WorkerEventQueue.cpp:
1095         (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
1096         (WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
1097         (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
1098         (WebCore::WorkerEventQueue::enqueueEvent):
1099         (WebCore::WorkerEventQueue::cancelEvent):
1100         (WebCore::WorkerEventQueue::close):
1101         * workers/WorkerEventQueue.h:
1102         * workers/WorkerGlobalScope.cpp:
1103         (WebCore::WorkerGlobalScope::close):
1104         (WebCore::WorkerGlobalScope::postTask):
1105         (WebCore::WorkerGlobalScope::addConsoleMessage):
1106         (WebCore::WorkerGlobalScope::addMessage):
1107         (WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
1108         (WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
1109         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
1110         * workers/WorkerGlobalScope.h:
1111         * workers/WorkerLoaderProxy.h:
1112         * workers/WorkerMessagingProxy.cpp:
1113         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1114         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
1115         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
1116         (WebCore::WorkerMessagingProxy::postTaskToLoader):
1117         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
1118         (WebCore::WorkerMessagingProxy::workerThreadCreated):
1119         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
1120         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
1121         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
1122         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
1123         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
1124         (WebCore::WorkerMessagingProxy::reportPendingActivity):
1125         (WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
1126         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
1127         (WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
1128         (WebCore::MessageWorkerTask::create): Deleted.
1129         (WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
1130         (WebCore::MessageWorkerTask::performTask): Deleted.
1131         (WebCore::WorkerExceptionTask::create): Deleted.
1132         (WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
1133         (WebCore::WorkerExceptionTask::performTask): Deleted.
1134         (WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
1135         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
1136         (WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
1137         (WebCore::WorkerTerminateTask::create): Deleted.
1138         (WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
1139         (WebCore::WorkerTerminateTask::performTask): Deleted.
1140         (WebCore::WorkerThreadActivityReportTask::create): Deleted.
1141         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
1142         (WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
1143         (WebCore::PostMessageToPageInspectorTask::create): Deleted.
1144         (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
1145         (WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
1146         (WebCore::NotifyNetworkStateChangeTask::create): Deleted.
1147         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
1148         (WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
1149         * workers/WorkerMessagingProxy.h:
1150         * workers/WorkerRunLoop.cpp:
1151         (WebCore::WorkerRunLoop::postTask):
1152         (WebCore::WorkerRunLoop::postTaskAndTerminate):
1153         (WebCore::WorkerRunLoop::postTaskForMode):
1154         (WebCore::WorkerRunLoop::Task::create):
1155         (WebCore::WorkerRunLoop::Task::performTask):
1156         (WebCore::WorkerRunLoop::Task::Task):
1157         * workers/WorkerRunLoop.h:
1158         * workers/WorkerThread.cpp:
1159         (WebCore::WorkerThread::stop):
1160         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
1161         (WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
1162         (WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
1163         (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
1164         (WebCore::WorkerThreadShutdownStartTask::create): Deleted.
1165         (WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
1166         (WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.
1167
1168 2014-04-29  Manuel Rego Casasnovas  <rego@igalia.com>
1169
1170         REGRESSION (r167879): Heap-use-after-free in WebCore::RenderFlexibleBox
1171         https://bugs.webkit.org/show_bug.cgi?id=132337
1172
1173         Reviewed by Simon Fraser.
1174
1175         From Blink r154582 by <jchaffraix@chromium.org>
1176
1177         This is a regression from the changes in OrderIterator. The issue is
1178         that we don't invalidate our iterator when a child is removed. This
1179         means that we could hold onto free'd memory until the next layout
1180         when we will recompute the iterator.
1181
1182         The solution is simple: just clear the memory when we remove a child.
1183
1184         Note that RenderGrid is not impacted by this bug as we don't use the
1185         iterator outside layout yet, but if we do it at some point the very same
1186         problem will arise, so the same treatment was applied to the class.
1187
1188         Test: fast/flexbox/order-iterator-crash.html
1189
1190         * rendering/OrderIterator.cpp:
1191         (WebCore::OrderIterator::invalidate): Clear m_children Vector.
1192         * rendering/OrderIterator.h:
1193         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Use
1194         invalidate() method.
1195         * rendering/RenderFlexibleBox.cpp:
1196         (WebCore::RenderFlexibleBox::removeChild): Invalidate m_orderIterator.
1197         * rendering/RenderFlexibleBox.h: Add removeChild() signature.
1198         * rendering/RenderGrid.cpp: Invalidate m_orderIterator.
1199         (WebCore::RenderGrid::removeChild):
1200         * rendering/RenderGrid.h: Add removeChild() header.
1201
1202 2014-04-29  Enrica Casucci  <enrica@apple.com>
1203
1204         iOS build fix after http://trac.webkit.org/changeset/167937.
1205         Unreviewed.
1206
1207         * rendering/RenderThemeIOS.mm:
1208         (WebCore::RenderThemeIOS::adjustButtonStyle):
1209
1210 2014-04-29  Hans Muller  <hmuller@adobe.com>
1211
1212         [CSS Shapes] off-by-one error in Shape::createRasterShape()
1213         https://bugs.webkit.org/show_bug.cgi?id=132154
1214
1215         Reviewed by Bem Jones-Bey.
1216
1217         This is a port of a patch for a bug that was reported by and fixed in Blink by
1218         David Vest: https://codereview.chromium.org/237123002/.  Shape::createRasterShape()
1219         now consistently reports "end-point exclusive" intervals. Before the patch
1220         an entire row of pixels was above the shape-image-threshold, the interval's end
1221         index was reported as image.width. Now it's image.width + 1, which is consistent
1222         with the way the end index is reported if the last above threshold pixel is within
1223         an image row.
1224
1225         Two existing tests were revised to account for this change.
1226
1227         * rendering/shapes/RasterShape.cpp:
1228         (WebCore::RasterShape::getExcludedIntervals):
1229         * rendering/shapes/Shape.cpp:
1230         (WebCore::Shape::createRasterShape):
1231
1232 2014-04-29  Bem Jones-Bey  <bjonesbe@adobe.com>
1233
1234         Wrap CSS length conversion arguments in an object
1235         https://bugs.webkit.org/show_bug.cgi?id=131552
1236
1237         Reviewed by Andreas Kling.
1238
1239         This patch introduces a class CSSToLengthConversionData to wrap the
1240         data required to convert CSS lengths to Lengths. This simplifies the
1241         plumbing that goes on whenever we need to resolve CSS lengths and
1242         makes it easier to update the arguments needed for resolving these (in
1243         particular adding a RenderView for resolving viewport units at style
1244         recalc time; removing the computingFontSize bool also appears
1245         possible).
1246
1247         Note that the zoom argument, which was previously a float in some
1248         places and a double in others is now a float.
1249
1250         This is a port of a Blink patch by timloh@chromium.org.
1251
1252         No new tests, no behavior change.
1253
1254         * CMakeLists.txt:
1255         * WebCore.vcxproj/WebCore.vcxproj:
1256         * WebCore.xcodeproj/project.pbxproj:
1257         * css/BasicShapeFunctions.cpp:
1258         (WebCore::convertToLength):
1259         (WebCore::convertToLengthSize):
1260         (WebCore::convertToCenterCoordinate):
1261         (WebCore::cssValueToBasicShapeRadius):
1262         (WebCore::basicShapeForValue):
1263         * css/BasicShapeFunctions.h:
1264         * css/CSSCalculationValue.cpp:
1265         (WebCore::CSSCalcValue::computeLengthPx):
1266         (WebCore::determineCategory):
1267         * css/CSSCalculationValue.h:
1268         (WebCore::CSSCalcValue::createCalculationValue):
1269         * css/CSSGradientValue.cpp:
1270         (WebCore::CSSGradientValue::addStops):
1271         (WebCore::positionFromValue):
1272         (WebCore::CSSGradientValue::computeEndPoint):
1273         (WebCore::CSSLinearGradientValue::createGradient):
1274         (WebCore::CSSRadialGradientValue::resolveRadius):
1275         (WebCore::CSSRadialGradientValue::createGradient):
1276         * css/CSSGradientValue.h:
1277         * css/CSSPrimitiveValue.cpp:
1278         (WebCore::CSSPrimitiveValue::computeLength):
1279         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1280         * css/CSSPrimitiveValue.h:
1281         * css/CSSPrimitiveValueMappings.h:
1282         (WebCore::CSSPrimitiveValue::convertToLength):
1283         * css/CSSToLengthConversionData.cpp: Added.
1284         (WebCore::CSSToLengthConversionData::zoom):
1285         * css/CSSToLengthConversionData.h: Added.
1286         (WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
1287         (WebCore::CSSToLengthConversionData::style):
1288         (WebCore::CSSToLengthConversionData::rootStyle):
1289         (WebCore::CSSToLengthConversionData::computingFontSize):
1290         (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom):
1291         * css/CSSToStyleMap.cpp:
1292         (WebCore::CSSToStyleMap::CSSToStyleMap):
1293         (WebCore::CSSToStyleMap::mapFillSize):
1294         (WebCore::CSSToStyleMap::mapFillXPosition):
1295         (WebCore::CSSToStyleMap::mapFillYPosition):
1296         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
1297         * css/CSSToStyleMap.h:
1298         (WebCore::CSSToStyleMap::CSSToStyleMap): Deleted.
1299         * css/DeprecatedStyleBuilder.cpp:
1300         (WebCore::ApplyPropertyAuto::applyValue):
1301         (WebCore::ApplyPropertyClip::convertToLength):
1302         (WebCore::ApplyPropertyLength::applyValue):
1303         (WebCore::ApplyPropertyBorderRadius::applyValue):
1304         (WebCore::ApplyPropertyComputeLength::applyValue):
1305         (WebCore::ApplyPropertyFontSize::applyValue):
1306         (WebCore::csstoLengthConversionDataWithTextZoomFactor):
1307         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
1308         (WebCore::ApplyPropertyLineHeight::applyValue):
1309         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
1310         (WebCore::ApplyPropertyWordSpacing::applyValue):
1311         (WebCore::ApplyPropertyPageSize::mmLength):
1312         (WebCore::ApplyPropertyPageSize::inchLength):
1313         (WebCore::ApplyPropertyPageSize::applyValue):
1314         (WebCore::ApplyPropertyVerticalAlign::applyValue):
1315         (WebCore::ApplyPropertyClipPath::applyValue):
1316         (WebCore::ApplyPropertyShape::applyValue):
1317         (WebCore::ApplyPropertyTextIndent::applyValue):
1318         * css/MediaQueryEvaluator.cpp:
1319         (WebCore::colorMediaFeatureEval):
1320         (WebCore::color_indexMediaFeatureEval):
1321         (WebCore::monochromeMediaFeatureEval):
1322         (WebCore::orientationMediaFeatureEval):
1323         (WebCore::aspect_ratioMediaFeatureEval):
1324         (WebCore::device_aspect_ratioMediaFeatureEval):
1325         (WebCore::device_pixel_ratioMediaFeatureEval):
1326         (WebCore::resolutionMediaFeatureEval):
1327         (WebCore::gridMediaFeatureEval):
1328         (WebCore::computeLength):
1329         (WebCore::device_heightMediaFeatureEval):
1330         (WebCore::device_widthMediaFeatureEval):
1331         (WebCore::heightMediaFeatureEval):
1332         (WebCore::widthMediaFeatureEval):
1333         (WebCore::min_colorMediaFeatureEval):
1334         (WebCore::max_colorMediaFeatureEval):
1335         (WebCore::min_color_indexMediaFeatureEval):
1336         (WebCore::max_color_indexMediaFeatureEval):
1337         (WebCore::min_monochromeMediaFeatureEval):
1338         (WebCore::max_monochromeMediaFeatureEval):
1339         (WebCore::min_aspect_ratioMediaFeatureEval):
1340         (WebCore::max_aspect_ratioMediaFeatureEval):
1341         (WebCore::min_device_aspect_ratioMediaFeatureEval):
1342         (WebCore::max_device_aspect_ratioMediaFeatureEval):
1343         (WebCore::min_device_pixel_ratioMediaFeatureEval):
1344         (WebCore::max_device_pixel_ratioMediaFeatureEval):
1345         (WebCore::min_heightMediaFeatureEval):
1346         (WebCore::max_heightMediaFeatureEval):
1347         (WebCore::min_widthMediaFeatureEval):
1348         (WebCore::max_widthMediaFeatureEval):
1349         (WebCore::min_device_heightMediaFeatureEval):
1350         (WebCore::max_device_heightMediaFeatureEval):
1351         (WebCore::min_device_widthMediaFeatureEval):
1352         (WebCore::max_device_widthMediaFeatureEval):
1353         (WebCore::min_resolutionMediaFeatureEval):
1354         (WebCore::max_resolutionMediaFeatureEval):
1355         (WebCore::animationMediaFeatureEval):
1356         (WebCore::transitionMediaFeatureEval):
1357         (WebCore::transform_2dMediaFeatureEval):
1358         (WebCore::transform_3dMediaFeatureEval):
1359         (WebCore::view_modeMediaFeatureEval):
1360         (WebCore::video_playable_inlineMediaFeatureEval):
1361         (WebCore::hoverMediaFeatureEval):
1362         (WebCore::pointerMediaFeatureEval):
1363         (WebCore::MediaQueryEvaluator::eval):
1364         * css/SVGCSSStyleSelector.cpp:
1365         (WebCore::StyleResolver::applySVGProperty):
1366         * css/StyleResolver.cpp:
1367         (WebCore::StyleResolver::State::clear):
1368         (WebCore::StyleResolver::State::initForStyleResolve):
1369         (WebCore::StyleResolver::convertToIntLength):
1370         (WebCore::StyleResolver::convertToFloatLength):
1371         (WebCore::createGridTrackBreadth):
1372         (WebCore::StyleResolver::applyProperty):
1373         (WebCore::StyleResolver::createFilterOperations):
1374         * css/StyleResolver.h:
1375         (WebCore::StyleResolver::State::setStyle):
1376         (WebCore::StyleResolver::State::cssToLengthConversionData):
1377         * css/TransformFunctions.cpp:
1378         (WebCore::convertToFloatLength):
1379         (WebCore::transformsForValue):
1380         * css/TransformFunctions.h:
1381         * css/WebKitCSSMatrix.cpp:
1382         (WebCore::WebKitCSSMatrix::setMatrixValue):
1383         * rendering/RenderThemeIOS.mm:
1384         (WebCore::applyCommonButtonPaddingToStyle):
1385         (WebCore::RenderThemeIOS::adjustButtonStyle):
1386
1387 2014-04-29  Zoltan Horvath  <zoltan@webkit.org>
1388
1389         [CSS Shapes] complex calc args for inset round vanish
1390         https://bugs.webkit.org/show_bug.cgi?id=132293
1391
1392         Reviewed by Bem Jones-Bey.
1393
1394         In order to use calc in the rounded parameters for inset shapes, we need
1395         to pass RenderStyle for the value creation as we did for the width arguments.
1396         Without taking RenderStyle into account, we hit an assert not reache
1397         in CSSPrimitiveValue::init in the debug builds.
1398
1399         I've added new parsing test.
1400
1401         * css/BasicShapeFunctions.cpp:
1402         (WebCore::valueForBasicShape):
1403         * css/CSSPrimitiveValue.cpp:
1404         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1405         (WebCore::CSSPrimitiveValue::init):
1406         * css/CSSPrimitiveValue.h:
1407         (WebCore::CSSPrimitiveValue::create):
1408         * css/CSSValuePool.h:
1409         (WebCore::CSSValuePool::createValue):
1410
1411 2014-04-29  Zoltan Horvath  <zoltan@webkit.org>
1412
1413         [CSS Shapes] complex calc values for shape-margin return null for computed style
1414         https://bugs.webkit.org/show_bug.cgi?id=132313
1415
1416         Reviewed by Bem Jones-Bey.
1417
1418         We need to pass RenderStyle* to the cssValuePool when parsing
1419         shape-margin in order to use calc() as a parameter.
1420
1421         I've added the new test case to parsing-shape-margin.html
1422
1423         * css/CSSComputedStyleDeclaration.cpp:
1424         (WebCore::ComputedStyleExtractor::propertyValue):
1425
1426 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
1427
1428         AX: Row span info is wrong for table cells when a footer section is placed above a body section
1429         https://bugs.webkit.org/show_bug.cgi?id=131832
1430
1431         Reviewed by Mario Sanchez Prada.
1432
1433         If a <footer> section is placed before the body, it renders AX row information and order incorrectly.
1434         This also affects ARIA tables because they add their children by looking at renderer children, instead
1435         interrogating the RenderTable directly.
1436
1437         Test: accessibility/table-with-footer-section-above-body.html
1438
1439         * accessibility/AccessibilityARIAGrid.cpp:
1440         (WebCore::AccessibilityARIAGrid::addTableCellChild):
1441         (WebCore::AccessibilityARIAGrid::addChildren):
1442         * accessibility/AccessibilityTable.cpp:
1443         (WebCore::AccessibilityTable::addChildren):
1444         (WebCore::AccessibilityTable::addChildrenFromSection):
1445         * accessibility/AccessibilityTable.h:
1446         * accessibility/AccessibilityTableCell.cpp:
1447         (WebCore::AccessibilityTableCell::rowIndexRange):
1448         (WebCore::AccessibilityTableCell::columnIndexRange):
1449
1450 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
1451
1452         AX: SpeechSynthesisUtterance cannot addEventListener
1453         https://bugs.webkit.org/show_bug.cgi?id=132321
1454
1455         Reviewed by Mario Sanchez Prada.
1456
1457         Modified an existing test (speech-synthesis-speak.html) to use addEventTarget.
1458
1459         * Modules/speech/SpeechSynthesisUtterance.idl:
1460
1461 2014-04-29  Hans Muller  <hmuller@adobe.com>
1462
1463         [CSS Shapes] shape-outside polygon fails when first vertex is 0,0
1464         https://bugs.webkit.org/show_bug.cgi?id=132132
1465
1466         Reviewed by Bem Jones-Bey.
1467
1468         ShapeInterval now distinguishes between x1==x2 - isEmpty() and x1,x2 haven't been
1469         set yet - isUndefined(). Removed the ShapeInterval setX1() and setX2() methods, since
1470         they're no longer used.
1471
1472         The polygon algorithm for computing excluded intervals now ignores horizontal
1473         edges. It also ignores edges whose lower vertex matches the top of the line, if
1474         the edge's Y direction is upwards (away from the top of the line). The rationale
1475         for this was explained here:
1476         http://hansmuller-webkit.blogspot.com/2012/11/revised-horizontal-box-algorithm.html
1477
1478         Test: fast/shapes/shape-outside-floats/shape-outside-polygon-zero-vertex.html
1479
1480         * rendering/shapes/PolygonShape.cpp:
1481         (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
1482         (WebCore::PolygonShape::getExcludedIntervals):
1483         * rendering/shapes/ShapeInterval.h:
1484         (WebCore::ShapeInterval::ShapeInterval):
1485         (WebCore::ShapeInterval::isUndefined):
1486         (WebCore::ShapeInterval::x1):
1487         (WebCore::ShapeInterval::x2):
1488         (WebCore::ShapeInterval::width):
1489         (WebCore::ShapeInterval::isEmpty):
1490         (WebCore::ShapeInterval::setX1):
1491         (WebCore::ShapeInterval::setX2):
1492         (WebCore::ShapeInterval::overlaps):
1493         (WebCore::ShapeInterval::contains):
1494         (WebCore::ShapeInterval::unite):
1495
1496 2014-04-29  Andrei Bucur  <abucur@adobe.com>
1497
1498         [CSS Regions] Fix getClientRects() for content nodes
1499         https://bugs.webkit.org/show_bug.cgi?id=117407
1500
1501         Reviewed by David Hyatt.
1502
1503         This patch modifies getClientRects() to return a list of fragments
1504         for a fragmented box instead of a single rectangle positioned inside
1505         the region where the box center would appear.
1506
1507         The approach is to split the border box of the element in regions using
1508         the layout positioning. Then each fragment is mapped to the view coordinates
1509         and the result added to the list of rectangles. To preserve the originating
1510         region when mapping the fragment through the ancestor tree I've introduced
1511         the concept of a current region. The current region is stored inside a
1512         CurrentRenderRegionMaintainer object, created whenever an algorithm needing
1513         it needs to run. When the maintainer is destroyed, the cleanup is made
1514         automatically. The RenderFlowThread holds a pointer to this structure for
1515         easy access.
1516
1517         Tests: fast/regions/cssom/client-rects-fixed-content.html
1518                fast/regions/cssom/client-rects-forced-breaks.html
1519                fast/regions/cssom/client-rects-inline-complex.html
1520                fast/regions/cssom/client-rects-inline.html
1521                fast/regions/cssom/client-rects-nested-regions.html
1522                fast/regions/cssom/client-rects-positioned.html
1523                fast/regions/cssom/client-rects-relative-position.html
1524                fast/regions/cssom/client-rects-simple-block.html
1525                fast/regions/cssom/client-rects-transforms.html
1526                fast/regions/cssom/client-rects-unsplittable-float.html
1527
1528         * rendering/RenderBlock.cpp:
1529         (WebCore::RenderBlock::absoluteQuads): Split the box in fragments.
1530         * rendering/RenderBox.cpp:
1531         (WebCore::RenderBox::absoluteQuads): Split the box in fragments.
1532         * rendering/RenderFlowThread.cpp:
1533         (WebCore::RenderFlowThread::RenderFlowThread):
1534         (WebCore::RenderFlowThread::mapFromFlowToRegion):
1535         (WebCore::RenderFlowThread::mapLocalToContainer):
1536         (WebCore::RenderFlowThread::currentRegion):
1537         * rendering/RenderFlowThread.h:
1538         * rendering/RenderNamedFlowFragment.cpp:
1539         (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion): Get
1540         the fragments for this box in the region.
1541         * rendering/RenderNamedFlowFragment.h:
1542         * rendering/RenderNamedFlowThread.cpp:
1543         (WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Virtual function
1544         that can be used to implement fragments to client rects mapping.
1545         * rendering/RenderNamedFlowThread.h:
1546         * rendering/RenderRegion.cpp:
1547         (WebCore::RenderRegion::rectFlowPortionForBox): Small change to correctly
1548         map empty rectangles to containers.
1549         (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
1550         (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
1551         * rendering/RenderRegion.h:
1552         (WebCore::RenderRegion::absoluteQuadsForBoxInRegion):
1553         (WebCore::CurrentRenderRegionMaintainer::region):
1554
1555 2014-04-29  Andrei Bucur  <abucur@adobe.com>
1556
1557         Store the containing region map inside the flow thread
1558         https://bugs.webkit.org/show_bug.cgi?id=131647
1559
1560         Reviewed by Mihnea Ovidenie.
1561
1562         The patch moves the containing region map inside the flow thread where
1563         it can be better handled in case the region chain changes and the map
1564         needs to be cleared.
1565
1566         As a result of this move we are able to also cleanup the lines region
1567         information of a block flow when it is removed from the tree.
1568
1569         Test: fast/regions/inline-strike-through.html
1570
1571         * rendering/InlineFlowBox.h:
1572         (WebCore::InlineFlowBox::InlineFlowBox):
1573         * rendering/RenderBlockLineLayout.cpp:
1574         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
1575         * rendering/RenderFlowThread.cpp:
1576         (WebCore::RenderFlowThread::removeFlowChildInfo):
1577         (WebCore::RenderFlowThread::invalidateRegions):
1578         (WebCore::RenderFlowThread::removeLineRegionInfo):
1579         (WebCore::RenderFlowThread::checkLinesConsistency):
1580         (WebCore::RenderFlowThread::containingRegionMap):
1581         * rendering/RenderFlowThread.h:
1582         * rendering/RootInlineBox.cpp:
1583         (WebCore::containingRegionMap):
1584         (WebCore::RootInlineBox::~RootInlineBox):
1585         (WebCore::RootInlineBox::paint):
1586         (WebCore::RootInlineBox::containingRegion):
1587         (WebCore::RootInlineBox::clearContainingRegion):
1588         (WebCore::RootInlineBox::setContainingRegion):
1589
1590 2014-04-28  Benjamin Poulain  <benjamin@webkit.org>
1591
1592         SelectorCodeGenerator::generateElementIsNthChild() leaks the parent register :nth-child() is non-filtering
1593         https://bugs.webkit.org/show_bug.cgi?id=132311
1594
1595         Reviewed by Andreas Kling.
1596
1597         In two cases, the parent register was never returned to the register allocator:
1598         -Non filtering selectors (the early return).
1599         -Non marking selectors (at the moment: only querySelector API).
1600
1601         Unfortunately, generateElementIsNthChild() makes function call, which forces us to do this manual allocation
1602         of the parentElement register. Long term, I want RegisterAllocator and FunctionCall to have a special type for that.
1603
1604         Test: fast/selectors/several-nth-child.html
1605
1606         * cssjit/SelectorCompiler.cpp:
1607         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1608
1609 2014-04-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1610
1611         CSS JIT: backtracking with current / parent element for child
1612         https://bugs.webkit.org/show_bug.cgi?id=132057
1613
1614         Reviewed by Benjamin Poulain.
1615
1616         Calculate appropriate backtracking start height from the closest
1617         descendant. And at first, we use it for a simple optimization.
1618
1619         1. When backtracking start height equals to current height, we
1620         can simply jump to a descendant element check phase.
1621         2. When backtracking start height equals to current height + 1, we
1622         can simply jump to a descendant element traversing phase.
1623
1624         We can apply this optimization to fragments with adjacent combinators.
1625         But, in the meantime, we start to implement it for a fragment with
1626         child combinator.
1627
1628         * cssjit/SelectorCompiler.cpp:
1629         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1630         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
1631         (WebCore::SelectorCompiler::solveDescendantBacktrackingActionForChild):
1632         (WebCore::SelectorCompiler::solveBacktrackingAction):
1633         (WebCore::SelectorCompiler::equalTagNames):
1634         (WebCore::SelectorCompiler::equalTagNamePatterns):
1635         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
1636         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
1637         (WebCore::SelectorCompiler::requiresAdjacentTail):
1638         (WebCore::SelectorCompiler::requiresDescendantTail):
1639         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
1640         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1641         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentNode):
1642         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
1643         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
1644         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
1645         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1646         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
1647         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1648
1649 2014-04-28  Benjamin Poulain  <bpoulain@apple.com>
1650
1651         [iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly)
1652         https://bugs.webkit.org/show_bug.cgi?id=132307
1653
1654         Reviewed by Simon Fraser.
1655
1656         * WebCore.exp.in:
1657
1658 2014-04-28  Beth Dakin  <bdakin@apple.com>
1659
1660         Scrollbars do not update properly when topContentInset changes dynamically
1661         https://bugs.webkit.org/show_bug.cgi?id=132309
1662         -and corresponding-
1663         <rdar://problem/16642232>
1664
1665         Reviewed by Tim Horton.
1666
1667         It is not sufficient to do a layout and call updateScrollbars(). We must also call 
1668         RenderLayerCompositor::frameViewDidChangeSize() in order to properly adjust the 
1669         size and position of all of the scrolling-related layers.
1670         * page/FrameView.cpp:
1671         (WebCore::FrameView::topContentInsetDidChange):
1672
1673 2014-04-28  David Hyatt  <hyatt@apple.com>
1674
1675         [New Multicolumn] event.offsetX/offsetY don't work correctly
1676         https://bugs.webkit.org/show_bug.cgi?id=132284
1677
1678         Reviewed by Simon Fraser.
1679
1680         * rendering/RenderBoxModelObject.cpp:
1681         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
1682         Change the code here to only trigger for CSS Regions and not for
1683         multi-column. Add a FIXME pointing out that the code is broken even for
1684         CSS regions.
1685
1686          * rendering/RenderMultiColumnFlowThread.cpp:
1687         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
1688         Override mapAbsoluteToLocalPoint in order to guess a region and attempt
1689         to translate the point from that region to the flow thread local coordinate
1690         space.
1691
1692         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromRegionToFlow):
1693         * rendering/RenderMultiColumnFlowThread.h:
1694         New helper function that just wraps calling the region's logical translation
1695         function and converting to/from physical coordinates.
1696
1697 2014-04-28  Commit Queue  <commit-queue@webkit.org>
1698
1699         Unreviewed, rolling out r167857.
1700         https://bugs.webkit.org/show_bug.cgi?id=132305
1701
1702         the change was rolled out, roll out the new expectations as
1703         well (Requested by thorton on #webkit).
1704
1705         Reverted changeset:
1706
1707         "Unreviewed. Updating one bindings test baseline after
1708         r167855."
1709         http://trac.webkit.org/changeset/167857
1710
1711 2014-04-28  Dean Jackson  <dino@apple.com>
1712
1713         [Mac] Use the animated version of setHighlighted on NSButtonCell where available
1714         https://bugs.webkit.org/show_bug.cgi?id=132295
1715         <rdar://problem/16747240>
1716
1717         Reviewed by Beth Dakin.
1718
1719         Like setState, there is an animated version of setHighlighted available.
1720
1721         * platform/mac/ThemeMac.mm:
1722         (WebCore::updateStates): Use private version of _setHighlighted where possible.
1723
1724 2014-04-28  Commit Queue  <commit-queue@webkit.org>
1725
1726         Unreviewed, rolling out r167855.
1727         https://bugs.webkit.org/show_bug.cgi?id=132301
1728
1729         Broke the windows build (Requested by bfulgham on #webkit).
1730
1731         Reverted changeset:
1732
1733         "ScriptExecutionContext::Task should work well with C++11
1734         lambdas"
1735         https://bugs.webkit.org/show_bug.cgi?id=129795
1736         http://trac.webkit.org/changeset/167855
1737
1738 2014-04-24  Andy Estes  <aestes@apple.com>
1739
1740         [iOS] Implement WebQuickLookHandleClient for WebKit2
1741         https://bugs.webkit.org/show_bug.cgi?id=132157
1742
1743         Reviewed by Darin Adler.
1744
1745         * WebCore.exp.in: Exported QuickLookHandle::previewUTI().
1746         * platform/network/ios/QuickLook.h:
1747         * platform/network/ios/QuickLook.mm:
1748         (WebCore::QuickLookHandle::previewFileName): Changed to return a WTF::String.
1749         (WebCore::QuickLookHandle::previewUTI): Added.
1750
1751 2014-04-28  Chris Fleizach  <cfleizach@apple.com>
1752
1753         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
1754         https://bugs.webkit.org/show_bug.cgi?id=111613
1755
1756         Reviewed by Mark Lam.
1757
1758         I think it's possible that didFinishSpeaking ends up calling directly back into start speaking, and the utterance reference
1759         we were holding can get cleared, so protecting this should avoid a few asserts.
1760
1761         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
1762         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
1763
1764 2014-04-28  Commit Queue  <commit-queue@webkit.org>
1765
1766         Unreviewed, rolling out r167871.
1767         https://bugs.webkit.org/show_bug.cgi?id=132290
1768
1769         broke a newmulticol test (spanner-nested-dynamic) (Requested
1770         by thorton on #webkit).
1771
1772         Reverted changeset:
1773
1774         "Store the containing region map inside the flow thread"
1775         https://bugs.webkit.org/show_bug.cgi?id=131647
1776         http://trac.webkit.org/changeset/167871
1777
1778 2014-04-28  Commit Queue  <commit-queue@webkit.org>
1779
1780         Unreviewed, rolling out r167853.
1781         https://bugs.webkit.org/show_bug.cgi?id=132288
1782
1783         caused crashes+timeouts+layout test failures described in the
1784         bug (Requested by thorton on #webkit).
1785
1786         Reverted changeset:
1787
1788         "Coalesce responses on network process side"
1789         https://bugs.webkit.org/show_bug.cgi?id=132229
1790         http://trac.webkit.org/changeset/167853
1791
1792 2014-04-24  Simon Fraser  <simon.fraser@apple.com>
1793
1794         [iOS WK2] flickery scrolling with overflow-scrolling:touch
1795         https://bugs.webkit.org/show_bug.cgi?id=132150
1796
1797         Reviewed by Tim Horton.
1798
1799         Fix typo in a comment.
1800
1801         * page/scrolling/AsyncScrollingCoordinator.cpp:
1802         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
1803
1804 2014-04-28  Martin Robinson  <mrobinson@igalia.com>
1805
1806         [GTK] Builtin cursors do not properly handle transparency
1807         https://bugs.webkit.org/show_bug.cgi?id=131866
1808
1809         Reviewed by Gustavo Noronha Silva.
1810
1811         Tested by ManualTests/cursor.html.
1812
1813         * platform/gtk/CursorGtk.cpp:
1814         (WebCore::createNamedCursor): Instead of interpreting the source bitmap as an A1 image, use
1815         it as a 1-bit black and white image. We do this by:
1816             1. Painting the result to a full color image with transparency instead of an alpha-only surface.
1817             2. Masking a white background using the cursor alpha surface.
1818             3. Painting the black parts of the cursor by painting the source surface, where black pixels
1819             will be interpreted as full opaque pixels.
1820
1821 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1822
1823         Unreviewed. Update GObject DOM bindings symbols file.
1824
1825         * bindings/gobject/webkitdom.symbols: Add missing symbols.
1826
1827 2014-04-28  Manuel Rego Casasnovas  <rego@igalia.com>
1828
1829         OrderIterator refactoring to avoid extra loops
1830         https://bugs.webkit.org/show_bug.cgi?id=119061
1831
1832         Reviewed by Darin Adler.
1833
1834         This patch removes order values Vector and use a Vector of pairs instead. The pairs are formed by a child
1835         (RenderBox) and the index of this child. In addition, OrderIterator code is simplified.
1836
1837         It provides a helper class OrderIteratorPopulator, used for manipulating the Vector directly. Which allows to
1838         consolidate the code into a single implementation across flexbox and grid. OrderIteratorPopulator part is based
1839         on a patch from Blink r153971 by <jchaffraix@chromium.org>.
1840
1841         Current implementation is O(number of children * number of order values). Now it will just do a sort operation
1842         and then a regular loop. So if you have different order values in a flexbox or grid the performance will
1843         improve.
1844
1845         Comparing results of perf-tests:
1846         * Layout/auto-grid-lots-of-data: ~0.5% worse.
1847         * Layout/fixed-grid-lots-of-data: ~0.5% worse.
1848         * Layout/fixed-grid-lots-of-data (setting 100 different order values): ~50% better.
1849         * Layout/flexbox-lots-of-data: ~5% better.
1850
1851         No new tests, already covered by current tests.
1852
1853         * rendering/OrderIterator.cpp:
1854         (WebCore::OrderIterator::currentChild): Return current child according to m_childrenIndex.
1855         (WebCore::OrderIterator::first): Initialize m_childrenIndex and return current child.
1856         (WebCore::OrderIterator::next): Increase m_childrenIndex and return current child.
1857         (WebCore::compareByOrderValueAndIndex): Sorts the Vector by order value and index.
1858         (WebCore::OrderIteratorPopulator::~OrderIteratorPopulator): Calls compareByOrderValueAndIndex() if there is any
1859         child with non default order value.
1860         (WebCore::OrderIteratorPopulator::collectChild): Adds the child and index to the Vector. Update
1861         m_allChildrenHaveDefaultOrderValue accordingly.
1862         (WebCore::OrderIterator::OrderIterator): Deleted.
1863         (WebCore::OrderIterator::setOrderValues): Deleted.
1864         (WebCore::OrderIterator::reset): Deleted.
1865         * rendering/OrderIterator.h:
1866         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): New helper class to manipulate the Vector.
1867         (WebCore::OrderIterator::currentChild): Deleted.
1868         * rendering/RenderFlexibleBox.cpp:
1869         (WebCore::RenderFlexibleBox::RenderFlexibleBox): Remove OrderIterator intialization.
1870         (WebCore::RenderFlexibleBox::layoutBlock): Remove unneeded code related to old OrderValues vector.
1871         (WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins): Populate OrderIterator using collectChild().
1872         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Deleted.
1873         * rendering/RenderFlexibleBox.h: Rename computeMainAxisPreferredSizes() to prepareOrderIteratorAndMargins().
1874         * rendering/RenderGrid.cpp:
1875         (WebCore::RenderGrid::RenderGrid): Remove OrderIterator initialization.
1876         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Populate OrderIterator using collectChild().
1877
1878 2014-04-28  Zan Dobersek  <zdobersek@igalia.com>
1879
1880         std::bitset<>::test() does unnecessary bounds checks on CSSPropertyID bitsets
1881         https://bugs.webkit.org/show_bug.cgi?id=131685
1882
1883         Reviewed by Darin Adler.
1884
1885         Use std::bitset<>::operator[]() instead of std::bitset<>::test() to avoid
1886         bounds checks which are not necessary as long as a CSSPropertyID value is used.
1887
1888         * css/CSSParser.cpp:
1889         (WebCore::filterProperties):
1890         * css/StyleProperties.cpp:
1891         (WebCore::StyleProperties::asText):
1892         * css/StyleResolver.cpp:
1893         (WebCore::StyleResolver::CascadedProperties::hasProperty):
1894         (WebCore::StyleResolver::CascadedProperties::set):
1895
1896 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1897
1898         [GTK] TextTrack kind and mode attributes are enums since r166180
1899         https://bugs.webkit.org/show_bug.cgi?id=132228
1900
1901         Reviewed by Martin Robinson.
1902
1903         Improve coding style according to review comments, that I forgot
1904         to do before landing previous commit.
1905
1906         * bindings/gobject/WebKitDOMCustom.cpp:
1907         (webkit_dom_text_track_get_kind):
1908         (webkit_dom_text_track_get_mode):
1909         (webkit_dom_text_track_set_mode):
1910
1911 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1912
1913         [GTK] TextTrack kind and mode attributes are enums since r166180
1914         https://bugs.webkit.org/show_bug.cgi?id=132228
1915
1916         Reviewed by Martin Robinson.
1917
1918         We don't support enum values yet in GObject DOM bindings, but they
1919         are internally strings anyway, so we can keep the old
1920         implementations using strings as custom functions until we
1921         properly support enums.
1922
1923         * bindings/gobject/WebKitDOMCustom.cpp:
1924         (webkit_dom_text_track_get_kind):
1925         (webkit_dom_text_track_get_mode):
1926         (webkit_dom_text_track_set_mode):
1927         * bindings/gobject/WebKitDOMCustom.h:
1928         * bindings/gobject/WebKitDOMCustom.symbols:
1929
1930 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1931
1932         [GTK] TextTrack::addCue can raise an exception since r163974
1933         https://bugs.webkit.org/show_bug.cgi?id=132227
1934
1935         Reviewed by Martin Robinson.
1936
1937         webkit_dom_text_track_add_cue() now receives a GError paramater
1938         which is an API break. Add
1939         webkit_dom_text_track_add_cue_with_error and keep
1940         webkit_dom_text_track_add_cue as deprecated to keep API
1941         compatibility.
1942
1943         * bindings/gobject/WebKitDOMDeprecated.cpp:
1944         (webkit_dom_text_track_add_cue):
1945         * bindings/gobject/WebKitDOMDeprecated.h:
1946         * bindings/gobject/WebKitDOMDeprecated.symbols:
1947         * bindings/gobject/webkitdom.symbols:
1948         * bindings/scripts/CodeGeneratorGObject.pm:
1949         (GetEffectiveFunctionName):
1950
1951 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1952
1953         [GTK] TextTrackCue API changed in r163649
1954         https://bugs.webkit.org/show_bug.cgi?id=132226
1955
1956         Reviewed by Martin Robinson.
1957
1958         TextTrackCue is now a base class and part of its API was moved to
1959         the derived class VTTCue. Update the GObject DOM bindings to keep
1960         backwards compatibility.
1961
1962         * PlatformGTK.cmake: Generate bindings for DataCue and VTTCue.
1963         * bindings/gobject/WebKitDOMDeprecated.cpp:
1964         (webkit_dom_text_track_cue_get_cue_as_html): Mark as deprecated in
1965         favor of VTTCue API.
1966         (webkit_dom_text_track_cue_get_vertical): Ditto.
1967         (webkit_dom_text_track_cue_set_vertical): Ditto.
1968         (webkit_dom_text_track_cue_get_snap_to_lines): Ditto.
1969         (webkit_dom_text_track_cue_set_snap_to_lines): Ditto.
1970         (webkit_dom_text_track_cue_get_line): Ditto.
1971         (webkit_dom_text_track_cue_set_line): Ditto.
1972         (webkit_dom_text_track_cue_get_position): Ditto.
1973         (webkit_dom_text_track_cue_set_position): Ditto.
1974         (webkit_dom_text_track_cue_get_size): Ditto.
1975         (webkit_dom_text_track_cue_set_size): Ditto.
1976         (webkit_dom_text_track_cue_get_align): Ditto.
1977         (webkit_dom_text_track_cue_set_align): Ditto.
1978         (webkit_dom_text_track_cue_get_text): Ditto.
1979         (webkit_dom_text_track_cue_set_text): Ditto.
1980         * bindings/gobject/WebKitDOMDeprecated.h:
1981         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new deprecated symbols.
1982         * bindings/gobject/WebKitDOMPrivate.cpp:
1983         (WebKit::wrap): Add generic wrap for TextTrackCue now that it's a
1984         base class to generate DataCue or VTTCue objects.
1985         * bindings/gobject/WebKitDOMPrivate.h:
1986         * bindings/gobject/webkitdom.symbols: Add DataCue symbols.
1987         * bindings/scripts/CodeGeneratorGObject.pm:
1988         (IsPolymorphic): Add TextTrackCue to the list of polymorphic classes.
1989
1990 2014-04-27  Andrei Bucur  <abucur@adobe.com>
1991
1992         Store the containing region map inside the flow thread
1993         https://bugs.webkit.org/show_bug.cgi?id=131647
1994
1995         Reviewed by Mihnea Ovidenie.
1996
1997         The patch moves the containing region map inside the flow thread where
1998         it can be better handled in case the region chain changes and the map
1999         needs to be cleared.
2000
2001         As a result of this move we are able to also cleanup the lines region
2002         information of a block flow when it is removed from the tree.
2003
2004         Test: fast/regions/inline-strike-through.html
2005
2006         * rendering/InlineFlowBox.h:
2007         (WebCore::InlineFlowBox::InlineFlowBox):
2008         * rendering/RenderBlockLineLayout.cpp:
2009         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
2010         * rendering/RenderFlowThread.cpp:
2011         (WebCore::RenderFlowThread::removeFlowChildInfo):
2012         (WebCore::RenderFlowThread::invalidateRegions):
2013         (WebCore::RenderFlowThread::removeLineRegionInfo):
2014         (WebCore::RenderFlowThread::checkLinesConsistency):
2015         (WebCore::RenderFlowThread::containingRegionMap):
2016         * rendering/RenderFlowThread.h:
2017         * rendering/RootInlineBox.cpp:
2018         (WebCore::containingRegionMap):
2019         (WebCore::RootInlineBox::~RootInlineBox):
2020         (WebCore::RootInlineBox::paint):
2021         (WebCore::RootInlineBox::containingRegion):
2022         (WebCore::RootInlineBox::clearContainingRegion):
2023         (WebCore::RootInlineBox::setContainingRegion):
2024
2025 2014-04-27  Darin Adler  <darin@apple.com>
2026
2027         REGRESSION (r159345): The hover state for links in the top navigation of Yahoo.com doesn't work
2028         https://bugs.webkit.org/show_bug.cgi?id=132241
2029         rdar://problem/16501924
2030
2031         Reviewed by Andreas Kling.
2032
2033         Test: fast/text/simple-lines-hover-underline.html
2034
2035         Checked that this does not hurt performance by running the
2036         run-perf-tests PerformanceTests/Layout/line-layout.html command before and after.
2037
2038         * rendering/RenderBlockFlow.cpp:
2039         (WebCore::RenderBlockFlow::hitTestInlineChildren): Use simpleLineLayout function rather than
2040         getting at the data member directly.
2041         (WebCore::RenderBlockFlow::firstLineBaseline): Ditto.
2042         (WebCore::RenderBlockFlow::inlineBlockBaseline): Ditto.
2043         (WebCore::RenderBlockFlow::lineCount): Ditto.
2044         (WebCore::RenderBlockFlow::paintInlineChildren): Ditto.
2045         (WebCore::RenderBlockFlow::hasLines): Ditto.
2046         (WebCore::RenderBlockFlow::simpleLineLayout): Added logic to determine which path to use if
2047         m_lineLayoutPath is undetermined, and call createLineBoxes if it's not simple.
2048         (WebCore::RenderBlockFlow::ensureLineBoxes): Factored out most of the code into a new
2049         createLineBoxes function.
2050         (WebCore::RenderBlockFlow::createLineBoxes): Ditto.
2051
2052         * rendering/RenderBlockFlow.h: Made simpleLineLayout function no longer an inline.
2053         Added a private createLineBoxes function.
2054
2055 2014-04-27  Praveen R Jadhav  <praveen.j@samsung.com>
2056
2057         [MediaStream] .ended shouldn't be part of MediaStream IDL
2058         https://bugs.webkit.org/show_bug.cgi?id=132104
2059
2060         Reviewed by Eric Carlson.
2061
2062         .ended attribute is spec'ed out of MediaStream IDL. Instead, .active
2063         is introduced to handle more scenarios. This patch replaces all 'ended'
2064         attribute calls with corresponding 'active' attributes. 
2065
2066         MediaStream-add-remove-tracks.html is updated.
2067
2068         * Modules/mediastream/MediaStream.cpp:
2069         (WebCore::MediaStream::addTrack): Replaced ended() with active().
2070         (WebCore::MediaStream::removeTrack): setEnded() isn't called. setActive()
2071         is retained which propagates oninactive event.
2072         (WebCore::MediaStream::trackDidEnd): setEnded() isn't called.
2073         (WebCore::MediaStream::removeRemoteSource): Replaced ended() with active().
2074         (WebCore::MediaStream::addRemoteTrack): Replaced ended() with active().
2075         (WebCore::MediaStream::removeRemoteTrack): Replaced ended() with active().
2076         (WebCore::MediaStream::ended): Deleted.
2077         (WebCore::MediaStream::setEnded): Deleted.
2078         (WebCore::MediaStream::streamDidEnd): Deleted.
2079         * Modules/mediastream/MediaStream.h:
2080         * Modules/mediastream/MediaStream.idl:
2081         * Modules/mediastream/RTCPeerConnection.cpp:
2082         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Replaced setEnded()
2083         with setActive().
2084         * platform/mediastream/MediaStreamPrivate.cpp:
2085         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
2086         (WebCore::MediaStreamPrivate::setActive): Updated comment from bug 
2087         https://bugs.webkit.org/show_bug.cgi?id=131973
2088         (WebCore::MediaStreamPrivate::setEnded): Deleted.
2089         * platform/mediastream/MediaStreamPrivate.h:
2090         (WebCore::MediaStreamPrivate::ended): Deleted.
2091
2092 2014-04-25  Andy Estes  <aestes@apple.com>
2093
2094         [iOS] Stop creating a WKWebResourceQuickLookDelegate for every WebResourceLoader
2095         https://bugs.webkit.org/show_bug.cgi?id=132215
2096
2097         Reviewed by Dan Bernstein.
2098
2099         * WebCore.exp.in: Moved QuickLook symbols to the USE(QUICK_LOOK) stanza.
2100         * platform/network/ios/QuickLook.h: Changed one of the create() overloads to no longer take a delegate argument.
2101         * platform/network/ios/QuickLook.mm: Moved WKWebResourceQuickLookDelegate to here and renamed to WebResourceLoaderQuickLookDelegate.
2102         (WebCore::QuickLookHandle::create): Created a WebResourceLoaderQuickLookDelegate only if QuickLook can handle the response.
2103
2104 2014-04-27  Sam Weinig  <sam@webkit.org>
2105
2106         [iOS WebKit2] Add support for text autosizing
2107         <rdar://problem/16545245>
2108         https://bugs.webkit.org/show_bug.cgi?id=132237
2109
2110         Reviewed by Tim Horton.
2111
2112         Move text autosizing width from Frame to Page, as it is a Page level concept.
2113
2114         * WebCore.exp.in:
2115         * page/Frame.cpp:
2116         (WebCore::Frame::textAutosizingWidth): Deleted.
2117         (WebCore::Frame::setTextAutosizingWidth): Deleted.
2118         * page/Frame.h:
2119         * page/FrameView.cpp:
2120         (WebCore::FrameView::layout):
2121         * page/Page.cpp:
2122         (WebCore::Page::Page):
2123         * page/Page.h:
2124         (WebCore::Page::textAutosizingWidth):
2125         (WebCore::Page::setTextAutosizingWidth):
2126
2127 2014-04-27  Zan Dobersek  <zdobersek@igalia.com>
2128
2129         Unreviewed. Updating one bindings test baseline after r167855.
2130
2131         * bindings/scripts/test/JS/JSTestCallback.cpp:
2132         (WebCore::JSTestCallback::~JSTestCallback):
2133
2134 2014-04-27  Darin Adler  <darin@apple.com>
2135
2136         Webpages can trigger loads with invalid URLs
2137         https://bugs.webkit.org/show_bug.cgi?id=132224
2138         rdar://problem/16697142
2139
2140         Reviewed by Alexey Proskuryakov.
2141
2142         Invalid URLs can be a way to trick the user about what website they
2143         are looking at.  Still trying to figure out a good way to regression-test this.
2144
2145         * dom/Document.cpp:
2146         (WebCore::Document::processHttpEquiv): Pass a URL rather than a String to
2147         the navigation scheduler.
2148         * loader/FrameLoader.cpp:
2149         (WebCore::FrameLoader::receivedFirstData): Ditto.
2150
2151         * loader/NavigationScheduler.cpp:
2152         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Take a URL rather
2153         than a string.
2154         (WebCore::ScheduledURLNavigation::url): Ditto.
2155         (WebCore::ScheduledRedirect::ScheduledRedirect): Ditto.
2156         (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
2157         (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
2158         (WebCore::NavigationScheduler::shouldScheduleNavigation): Added a check that
2159         prevents navigation to any URL that is invalid, except for JavaScript URLs,
2160         which need not be valid.
2161         (WebCore::NavigationScheduler::scheduleRedirect): Use URL instead of String.
2162         (WebCore::NavigationScheduler::scheduleLocationChange): Use URL instead of
2163         String. Also got rid of empty string check since empty URLs are also invalid,
2164         and so shouldScheduleNavigation will take care of it.
2165         (WebCore::NavigationScheduler::scheduleRefresh): Use URL instead of String.
2166
2167         * loader/NavigationScheduler.h: Take URL instead of String. Also removed some
2168         unneeded incldues and uses of WTF_MAKE_NONCOPYABLE. NavigationScheduler is
2169         already noncopyable because it has a reference for a data member, and the
2170         disabler doesn't have any real reason to be noncopyable.
2171
2172         * loader/SubframeLoader.cpp:
2173         (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass a URL rather than a
2174         String to the NavigationScheduler.
2175         * page/DOMWindow.cpp:
2176         (WebCore::DOMWindow::createWindow): Ditto.
2177
2178         * page/SecurityOrigin.cpp:
2179         (WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin): Return a URL instead
2180         of a String.
2181         * page/SecurityOrigin.h: Updated for above change.
2182
2183 2014-04-27  Zan Dobersek  <zdobersek@igalia.com>
2184
2185         ScriptExecutionContext::Task should work well with C++11 lambdas
2186         https://bugs.webkit.org/show_bug.cgi?id=129795
2187
2188         Reviewed by Darin Adler.
2189
2190         Instead of having classes that subclass ScriptExecutionContext::Task and override
2191         the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
2192         take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
2193         which would contain the code currently kept in the performTask() methods.
2194
2195         This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
2196         cleanup tasks, the Task object can be implicitly constructed by using the initializer list
2197         constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
2198         The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
2199         object in the std::function wrapper, along with a boolean member that indicates whether the
2200         task is of cleanup nature.
2201
2202         * Modules/quota/StorageErrorCallback.cpp:
2203         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
2204         (WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
2205         * Modules/quota/StorageErrorCallback.h:
2206         (WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
2207         * Modules/webdatabase/Database.cpp:
2208         (WebCore::Database::~Database):
2209         (WebCore::Database::runTransaction):
2210         (WebCore::Database::scheduleTransactionCallback):
2211         (WebCore::DerefContextTask::create): Deleted.
2212         (WebCore::DerefContextTask::performTask): Deleted.
2213         (WebCore::DerefContextTask::isCleanupTask): Deleted.
2214         (WebCore::DerefContextTask::DerefContextTask): Deleted.
2215         (WebCore::callTransactionErrorCallback): Deleted.
2216         (WebCore::DeliverPendingCallbackTask::create): Deleted.
2217         (WebCore::DeliverPendingCallbackTask::performTask): Deleted.
2218         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
2219         * Modules/webdatabase/DatabaseManager.cpp:
2220         (WebCore::DatabaseManager::openDatabase):
2221         (WebCore::DatabaseCreationCallbackTask::create): Deleted.
2222         (WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
2223         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
2224         * Modules/webdatabase/DatabaseSync.cpp:
2225         (WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
2226         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
2227         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
2228         * Modules/webdatabase/SQLCallbackWrapper.h:
2229         (WebCore::SQLCallbackWrapper::clear):
2230         (WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
2231         (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
2232         (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
2233         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
2234         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2235         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
2236         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
2237         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
2238         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
2239         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
2240         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
2241         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
2242         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
2243         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2244         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2245         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2246         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
2247         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
2248         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
2249         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
2250         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
2251         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2252         * bindings/js/JSCallbackData.h:
2253         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
2254         (WebCore::DeleteCallbackDataTask::create): Deleted.
2255         (WebCore::DeleteCallbackDataTask::performTask): Deleted.
2256         (WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
2257         * bindings/js/JSDOMGlobalObjectTask.cpp:
2258         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
2259         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
2260         (WebCore::JSGlobalObjectTask::performTask): Deleted.
2261         * bindings/js/JSDOMGlobalObjectTask.h:
2262         * bindings/js/JSDOMWindowBase.cpp:
2263         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
2264         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2265         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
2266         * bindings/scripts/CodeGeneratorJS.pm:
2267         (GenerateCallbackImplementation):
2268         * dom/CrossThreadTask.h:
2269         (WebCore::CrossThreadTask1::performTask):
2270         (WebCore::CrossThreadTask2::performTask):
2271         (WebCore::CrossThreadTask3::performTask):
2272         (WebCore::CrossThreadTask4::performTask):
2273         (WebCore::CrossThreadTask5::performTask):
2274         (WebCore::CrossThreadTask6::performTask):
2275         (WebCore::CrossThreadTask7::performTask):
2276         (WebCore::CrossThreadTask8::performTask):
2277         (WebCore::createCallbackTask):
2278         (WebCore::CrossThreadTask1::create): Deleted.
2279         (WebCore::CrossThreadTask2::create): Deleted.
2280         (WebCore::CrossThreadTask3::create): Deleted.
2281         (WebCore::CrossThreadTask4::create): Deleted.
2282         (WebCore::CrossThreadTask5::create): Deleted.
2283         (WebCore::CrossThreadTask6::create): Deleted.
2284         (WebCore::CrossThreadTask7::create): Deleted.
2285         (WebCore::CrossThreadTask8::create): Deleted.
2286         * dom/Document.cpp:
2287         (WebCore::Document::addConsoleMessage):
2288         (WebCore::Document::addMessage):
2289         (WebCore::Document::postTask):
2290         (WebCore::Document::pendingTasksTimerFired):
2291         (WebCore::PerformTaskContext::PerformTaskContext): Deleted.
2292         (WebCore::Document::didReceiveTask): Deleted.
2293         * dom/Document.h:
2294         * dom/ScriptExecutionContext.cpp:
2295         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
2296         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
2297         (WebCore::ProcessMessagesSoonTask::create): Deleted.
2298         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
2299         (WebCore::ScriptExecutionContext::Task::~Task): Deleted.
2300         * dom/ScriptExecutionContext.h:
2301         (WebCore::ScriptExecutionContext::Task::Task):
2302         (WebCore::ScriptExecutionContext::Task::performTask):
2303         (WebCore::ScriptExecutionContext::Task::isCleanupTask):
2304         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2305         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
2306         * dom/StringCallback.cpp:
2307         (WebCore::StringCallback::scheduleCallback):
2308         * loader/appcache/ApplicationCacheGroup.cpp:
2309         (WebCore::ApplicationCacheGroup::postListenerTask):
2310         (WebCore::CallCacheListenerTask::create): Deleted.
2311         (WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
2312         * workers/DefaultSharedWorkerRepository.cpp:
2313         (WebCore::SharedWorkerProxy::postTaskToLoader):
2314         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
2315         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
2316         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
2317         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
2318         (WebCore::SharedWorkerConnectTask::create): Deleted.
2319         (WebCore::SharedWorkerConnectTask::performTask): Deleted.
2320         * workers/WorkerEventQueue.cpp:
2321         (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
2322         (WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
2323         (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
2324         (WebCore::WorkerEventQueue::enqueueEvent):
2325         (WebCore::WorkerEventQueue::cancelEvent):
2326         (WebCore::WorkerEventQueue::close):
2327         * workers/WorkerEventQueue.h:
2328         * workers/WorkerGlobalScope.cpp:
2329         (WebCore::WorkerGlobalScope::close):
2330         (WebCore::WorkerGlobalScope::postTask):
2331         (WebCore::WorkerGlobalScope::addConsoleMessage):
2332         (WebCore::WorkerGlobalScope::addMessage):
2333         (WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
2334         (WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
2335         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
2336         * workers/WorkerGlobalScope.h:
2337         * workers/WorkerLoaderProxy.h:
2338         * workers/WorkerMessagingProxy.cpp:
2339         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
2340         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
2341         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
2342         (WebCore::WorkerMessagingProxy::postTaskToLoader):
2343         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
2344         (WebCore::WorkerMessagingProxy::workerThreadCreated):
2345         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2346         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
2347         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
2348         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2349         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
2350         (WebCore::WorkerMessagingProxy::reportPendingActivity):
2351         (WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
2352         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
2353         (WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
2354         (WebCore::MessageWorkerTask::create): Deleted.
2355         (WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
2356         (WebCore::MessageWorkerTask::performTask): Deleted.
2357         (WebCore::WorkerExceptionTask::create): Deleted.
2358         (WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
2359         (WebCore::WorkerExceptionTask::performTask): Deleted.
2360         (WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
2361         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
2362         (WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
2363         (WebCore::WorkerTerminateTask::create): Deleted.
2364         (WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
2365         (WebCore::WorkerTerminateTask::performTask): Deleted.
2366         (WebCore::WorkerThreadActivityReportTask::create): Deleted.
2367         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
2368         (WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
2369         (WebCore::PostMessageToPageInspectorTask::create): Deleted.
2370         (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
2371         (WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
2372         (WebCore::NotifyNetworkStateChangeTask::create): Deleted.
2373         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
2374         (WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
2375         * workers/WorkerMessagingProxy.h:
2376         * workers/WorkerRunLoop.cpp:
2377         (WebCore::WorkerRunLoop::postTask):
2378         (WebCore::WorkerRunLoop::postTaskAndTerminate):
2379         (WebCore::WorkerRunLoop::postTaskForMode):
2380         (WebCore::WorkerRunLoop::Task::create):
2381         (WebCore::WorkerRunLoop::Task::performTask):
2382         (WebCore::WorkerRunLoop::Task::Task):
2383         * workers/WorkerRunLoop.h:
2384         * workers/WorkerThread.cpp:
2385         (WebCore::WorkerThread::stop):
2386         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2387         (WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
2388         (WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
2389         (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
2390         (WebCore::WorkerThreadShutdownStartTask::create): Deleted.
2391         (WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
2392         (WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.
2393
2394 2014-04-27  Antti Koivisto  <antti@apple.com>
2395
2396         Coalesce responses on network process side
2397         https://bugs.webkit.org/show_bug.cgi?id=132229
2398
2399         Reviewed by Andreas Kling.
2400
2401         * WebCore.exp.in:
2402
2403 2014-04-27  David Kilzer  <ddkilzer@apple.com>
2404
2405         Roll out changes not part of the patch reviewed for Bug 132089
2406         <http://webkit.org/b/132089>
2407
2408         * loader/SubframeLoader.cpp:
2409         (WebCore::SubframeLoader::loadOrRedirectSubframe):
2410         * page/DOMWindow.cpp:
2411         (WebCore::DOMWindow::setLocation):
2412         (WebCore::DOMWindow::createWindow):
2413         (WebCore::DOMWindow::open):
2414
2415 2014-04-26  Darin Adler  <darin@apple.com>
2416
2417         Frame and page lifetime fixes in WebCore::createWindow
2418         https://bugs.webkit.org/show_bug.cgi?id=132089
2419
2420         Reviewed by Sam Weinig.
2421
2422         Speculative fix because I was unable to reproduce the crash that was
2423         reported with the test case attached to this bug.
2424
2425         * loader/FrameLoader.cpp:
2426         (WebCore::createWindow): Changed code to remove the assumption that calls
2427         out will not destroy the page or frame. Use RefPtr for the frame, and
2428         added early exits if frame->page() becomes null at any point before we
2429         use a page pointer.
2430
2431 2014-04-26  Alexey Proskuryakov  <ap@apple.com>
2432
2433         Local files should not be allowed to read pasteboard data during drag
2434         https://bugs.webkit.org/show_bug.cgi?id=131767
2435
2436         Reviewed by Sam Weinig.
2437
2438         Test: fast/files/local-file-drag-security.html
2439
2440         * page/DragController.cpp:
2441         (WebCore::DragController::dragExited):
2442         (WebCore::DragController::tryDHTMLDrag):
2443         Make an old Dashboard quirk really Dashboard only.
2444
2445 2014-04-24  Darin Adler  <darin@apple.com>
2446
2447         REGRESSION (r164133): Selection doesn't paint when scrolling some pages
2448         https://bugs.webkit.org/show_bug.cgi?id=132172
2449         rdar://problem/16719473
2450
2451         Reviewed by Brent Fulgham.
2452
2453         Tests: fast/dynamic/remove-invisible-node-inside-selection.html
2454                fast/dynamic/remove-node-inside-selection.html
2455
2456         * editing/FrameSelection.cpp:
2457         (WebCore::clearRenderViewSelection): Changed to take a Node& because having
2458         this take a Position& was unnecessary and strange, when really it just needs
2459         to take a document as an argument.
2460         (WebCore::DragCaretController::nodeWillBeRemoved): Updated for the above.
2461         (WebCore::FrameSelection::respondToNodeModification): Added code to set the
2462         m_pendingSelectionUpdate flag and call RenderView::setNeedsLayout so the
2463         selection will be recomputed after it's temporarily cleared when one of
2464         the selected nodes is removed.
2465
2466 2014-04-25  Ryosuke Niwa  <rniwa@webkit.org>
2467
2468         REGRESSION (r167689): Hovering file name in a file input causes a crash
2469         https://bugs.webkit.org/show_bug.cgi?id=132214
2470
2471         Reviewed by Andreas Kling.
2472
2473         The bug was caused by callDefaultEventHandlersInTheBubblingOrder unconditionally
2474         accessing path.contextAt(0) even if the event path was empty.
2475
2476         Fixed the bug by exiting early when the event path is empty.
2477
2478         Test: fast/events/shadow-event-path-2.html
2479
2480         * dom/EventDispatcher.cpp:
2481         (WebCore::callDefaultEventHandlersInTheBubblingOrder):
2482
2483 2014-04-25  Tim Horton  <timothy_horton@apple.com>
2484
2485         REGRESSION (r167828): http/tests/media/hls/video-controls-live-stream.html fails
2486
2487         * English.lproj/mediaControlsLocalizedStrings.js:
2488         Add 'Live Broadcast' to the localized strings list.
2489
2490 2014-04-25  Brady Eidson  <beidson@apple.com>
2491
2492         Add a selection overlay.
2493         <rdar://problem/16727797> and https://bugs.webkit.org/show_bug.cgi?id=132200
2494
2495         Reviewed by David Hyatt.
2496
2497         No new tests (WK2 feature in development).
2498
2499         * WebCore.xcodeproj/project.pbxproj:
2500
2501         Add a SelectionRectGathterer class.
2502         It creates a Notifier (given a RenderView) then accepts Rects from the RenderView.
2503         When the Notifier is destroyed, the appropriate EditorClient is notified of the gathered rects.
2504         * editing/SelectionRectGatherer.cpp: Added.
2505         (WebCore::SelectionRectGatherer::SelectionRectGatherer):
2506         (WebCore::SelectionRectGatherer::addRect):
2507         (WebCore::SelectionRectGatherer::addRects):
2508         (WebCore::SelectionRectGatherer::Notifier::Notifier):
2509         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
2510         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
2511         * editing/SelectionRectGatherer.h: Added.
2512
2513         * page/EditorClient.h:
2514         (WebCore::EditorClient::selectionRectsDidChange):
2515
2516         * rendering/RenderView.cpp:
2517         (WebCore::RenderView::RenderView):
2518         (WebCore::RenderView::setSelection): Clear the gatherer’s rects then create a Notifier.
2519         (WebCore::RenderView::setSubtreeSelection): Give all the selection rects to be painted to
2520           the SelectionRectGatherer.
2521         * rendering/RenderView.h:
2522
2523 2014-04-08  Jer Noble  <jer.noble@apple.com>
2524
2525         Support "Live" streams in media controls.
2526         https://bugs.webkit.org/show_bug.cgi?id=131390
2527
2528         Reviewed by Brent Fulgham.
2529
2530         Test: http/tests/media/hls/video-controls-live-stream.html
2531
2532         Support "Live" streams by adding an isLive property to our media controls.
2533
2534         * Modules/mediacontrols/mediaControlsApple.css:
2535         (audio::-webkit-media-controls-status-display):
2536         (video:-webkit-full-screen::-webkit-media-controls-status-display):
2537         * Modules/mediacontrols/mediaControlsApple.js:
2538         (Controller): isLive defaults to false.
2539         (Controller.prototype.setIsLive): Set the isLive property and conditionally reconfigure the controls.
2540         (Controller.prototype.configureInlineControls): Don't add the timeline if we are live.
2541         (Controller.prototype.configureFullScreenControls): Ditto.
2542         (Controller.prototype.updateStatusDisplay): Added.
2543         (Controller.prototype.handleLoadStart): Call updateStatusDisplay().
2544         (Controller.prototype.handleError): Ditto.
2545         (Controller.prototype.handleAbort): Ditto.
2546         (Controller.prototype.handleSuspend): Ditto.
2547         (Controller.prototype.handleStalled): Ditto.
2548         (Controller.prototype.handleWaiting): Ditto.
2549         (Controller.prototype.updateDuration): Ditto.
2550         (Controller.prototype.updateReadyState): Ditto.
2551
2552 2014-04-25  Dean Jackson  <dino@apple.com>
2553
2554         Allow a platform-specific size enumeration to be passed into popup-menu display
2555         https://bugs.webkit.org/show_bug.cgi?id=132195
2556
2557         Reviewed by Brent Fulgham. With some in-person review comments from Sam Weinig.
2558
2559         Platforms like OS X use a set of predefined sizes for built-in controls
2560         used for <select>: normal, small and mini. Expose that information to
2561         the PopupMenuClient via the PopupMenuStyle, allowing it to be passed
2562         into the platform code in WebKitSystemInterface.
2563
2564         * platform/PopupMenuStyle.h: Add a menu size enum.
2565         (WebCore::PopupMenuStyle::PopupMenuStyle):
2566         (WebCore::PopupMenuStyle::menuSize):
2567         * platform/mac/WebCoreSystemInterface.h: Pass in NSControlSize as a parameter
2568         to WKPopupMenu.
2569         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2570         * rendering/RenderMenuList.cpp:
2571         (RenderMenuList::menuStyle): Ask the RenderTheme to calculate the size
2572         of the menu button, so that it can be added to the PopupMenuStyle.
2573         * rendering/RenderTheme.h: New method to retrieve the menu size.
2574         (WebCore::RenderTheme::popupMenuSize): Convert an NSControlSize into a PopupMenuSize.
2575         * rendering/RenderThemeMac.h: Override the base function, and add a
2576         controlSizeForCell helper.
2577         * rendering/RenderThemeMac.mm:
2578         (WebCore::RenderThemeMac::controlSizeForCell): Used by this new
2579         code and the old setControlSizeForCell to calculate the NSControlSize
2580         that would be used for the button.
2581         (WebCore::RenderThemeMac::setControlSize): Call the new helper.
2582         (WebCore::RenderThemeMac::popupMenuSize): Return the value from the helper.
2583
2584 2014-04-25  Javier Fernandez  <jfernandez@igalia.com>
2585
2586         REGRESSION(r167799): ASSERTION in parseGridTemplateShorthand in fast/css-grid-layout/grid-template-shorthand-get-set.html
2587         https://bugs.webkit.org/show_bug.cgi?id=132194
2588
2589         Reviewed by Martin Robinson.
2590
2591         Properly resolving the grid-template shorthand for the corresponding longhand
2592         properties.
2593
2594         No new tests, grid-template-shorthand-get-set.html already covers this case.
2595
2596         * css/StyleProperties.cpp:
2597         (WebCore::StyleProperties::getPropertyValue):
2598         * css/StylePropertyShorthand.cpp:
2599         (WebCore::shorthandForProperty):
2600         (WebCore::matchingShorthandsForLonghand):
2601         * css/StyleResolver.cpp:
2602         (WebCore::StyleResolver::applyProperty):
2603
2604 2014-04-25  David Hyatt  <hyatt@apple.com>
2605
2606         Column rules not respecting scroll offsets.
2607         https://bugs.webkit.org/show_bug.cgi?id=109683
2608
2609         Reviewed by Dean Jackson.
2610
2611         Added fast/multicol/scrolling-column-rules.html
2612
2613         * rendering/RenderBlock.cpp:
2614         (WebCore::RenderBlock::paintColumnRules):
2615         Make paintColumnRules virtual so that it works with both column implementations.
2616
2617         (WebCore::RenderBlock::paintObject):
2618         Changed to call paintColumnRules with the adjusted scroll offset and to do it after
2619         bailing on the root background only check.
2620
2621         * rendering/RenderBlock.h:
2622         paintColumnRules is now virtual.
2623
2624         * rendering/RenderBlockFlow.cpp:
2625         (WebCore::RenderBlockFlow::paintColumnRules):
2626         (WebCore::RenderBlockFlow::paintBoxDecorations): Deleted.
2627         * rendering/RenderBlockFlow.h:
2628         Got rid of paintBoxDecorations override since it failed when hasBoxDecorations was false
2629         anyway. Override paintColumnRules instead to paint at the right time.
2630
2631 2014-04-23  Jon Honeycutt  <jhoneycutt@apple.com>
2632
2633         Crash applying editing commands from iframe onload event
2634
2635         <https://bugs.webkit.org/show_bug.cgi?id=132103>
2636         <rdar://problem/15696351>
2637
2638         This patch merges the Chromium bug workaround from
2639         <http://src.chromium.org/viewvc/blink?revision=162080&view=revision>,
2640         which prevents reentrancy in CompositeEditCommand::apply().
2641
2642         Reviewed by Darin Adler.
2643
2644         Test: editing/apply-style-iframe-crash.html
2645
2646         * editing/CompositeEditCommand.cpp:
2647         (WebCore::HTMLNames::ReentrancyGuard::isRecursiveCall):
2648         (WebCore::HTMLNames::ReentrancyGuard::Scope::Scope):
2649         (WebCore::HTMLNames::ReentrancyGuard::Scope::~Scope):
2650         (WebCore::CompositeEditCommand::apply):
2651         If this is a recursive call, return early.
2652
2653 2014-04-25  David Hyatt  <hyatt@apple.com>
2654
2655         [New Multicolumn] fast/multicol/hit-test-* layout tests all fail
2656         https://bugs.webkit.org/show_bug.cgi?id=132081
2657
2658         Reviewed by Dean Jackson.
2659
2660         Added a bunch of tests in fast/multicol/newmulticol/compare-with-old-impl/hit-test-*.html
2661
2662         * rendering/RenderBlock.h:
2663         Make offsetForContents public, since I need to call it from RenderMultiColumnSet.
2664
2665         * rendering/RenderMultiColumnFlowThread.cpp:
2666         (WebCore::RenderMultiColumnFlowThread::populate):
2667         Stop an ASSERT in the new columns code on the hit tests by making sure layout state is
2668         disabled when moving children around.
2669
2670         * rendering/RenderMultiColumnSet.cpp:
2671         (WebCore::RenderMultiColumnSet::positionForPoint):
2672         Refactor this function to call a helper function instead, translateRegionPointToFlowThread.
2673
2674         (WebCore::RenderMultiColumnSet::translateRegionPointToFlowThread):
2675         This function is logical (unlike the mistaken physical function I first implemented in
2676         positionForPoint).
2677
2678         (WebCore::RenderMultiColumnSet::updateHitTestResult):
2679         * rendering/RenderMultiColumnSet.h:
2680         Overridden to fill in the correct local coordinate when the HTML document is inside a paginated
2681         RenderView. Note that column spans don't actually work, but once we move over to a 
2682         non-column based pagination API, that will become irrelevant.
2683
2684 2014-04-25  Andreas Kling  <akling@apple.com>
2685
2686         Mark some things with WTF_MAKE_FAST_ALLOCATED.
2687         <https://webkit.org/b/132198>
2688
2689         Use FastMalloc for more things.
2690
2691         Reviewed by Anders Carlsson.
2692
2693         * bindings/js/ScriptController.h:
2694         * dom/DocumentOrderedMap.h:
2695         * inspector/InspectorCSSAgent.h:
2696         * inspector/InspectorDOMAgent.h:
2697         * inspector/InspectorDOMDebuggerAgent.h:
2698         * inspector/InspectorDOMStorageAgent.h:
2699         * inspector/InspectorDatabaseAgent.h:
2700         * inspector/InspectorLayerTreeAgent.h:
2701         * inspector/InspectorPageAgent.h:
2702         * inspector/InspectorResourceAgent.h:
2703         * inspector/InspectorTimelineAgent.h:
2704         * inspector/InspectorWorkerAgent.h:
2705         * inspector/PageRuntimeAgent.h:
2706         * loader/HistoryController.h:
2707         * page/DeviceClient.h:
2708         * page/DeviceController.h:
2709         * page/EventHandler.h:
2710         * page/Page.h:
2711         * page/scrolling/ScrollingStateNode.h:
2712         * platform/graphics/FontGenericFamilies.h:
2713         * platform/graphics/FontPlatformData.h:
2714
2715 2014-04-25  Radu Stavila  <stavila@adobe.com>
2716
2717         [CSS Regions] Rename objectShouldPaintInFlowRegion to something more clear
2718         https://bugs.webkit.org/show_bug.cgi?id=132050
2719
2720         Reviewed by Andreas Kling.
2721
2722         The objectShouldPaintInFlowRegion is no longer used only by the painting process
2723         but also for hit-testing, so it was renamed to something more generic (objectShouldFragmentInFlowRegion).
2724
2725         No new tests required, it's just a method rename.
2726
2727         * rendering/RenderBlock.cpp:
2728         (WebCore::RenderBlock::paint):
2729         (WebCore::RenderBlock::selectionGaps):
2730         (WebCore::RenderBlock::nodeAtPoint):
2731         * rendering/RenderBox.cpp:
2732         (WebCore::RenderBox::positionForPoint):
2733         * rendering/RenderFlowThread.cpp:
2734         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
2735         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion): Deleted.
2736         * rendering/RenderFlowThread.h:
2737         * rendering/RenderLayer.cpp:
2738         (WebCore::RenderLayer::paintLayer):
2739         (WebCore::RenderLayer::hitTestLayer):
2740         * rendering/RenderRegion.cpp:
2741         (WebCore::RenderRegion::ensureOverflowForBox):
2742         * rendering/RenderReplaced.cpp:
2743         (WebCore::RenderReplaced::shouldPaint):
2744
2745 2014-04-25  Enrica Casucci  <enrica@apple.com>
2746
2747         iOS build fix after http://trac.webkit.org/changeset/167803
2748         Unreviewed.
2749
2750         * page/Frame.cpp:
2751         (WebCore::Frame::checkOverflowScroll):
2752         * rendering/RenderBlock.cpp:
2753         (WebCore::positionForPointRespectingEditingBoundaries):
2754
2755 2014-04-24  David Hyatt  <hyatt@apple.com>
2756
2757         [New Multicolumn] Add support for offsetLeft and offsetTop.
2758         https://bugs.webkit.org/show_bug.cgi?id=132080
2759
2760         Reviewed by Andrei Bucur.
2761
2762         Added fast/multicol/client-spanners-complex.html and offset-top-left.html
2763
2764         * rendering/RenderBoxModelObject.cpp:
2765         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2766         Patch the offsetLeft/Top loop to handle calling into RenderMultiColumnFlowThread
2767         in order to adjust the coordinates for the new multicolumn layout.
2768
2769         * rendering/RenderMultiColumnFlowThread.cpp:
2770         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
2771         Modified to use a helper that can be shared by offsetLeft/Top code. This code
2772         ran for client rects, and I'm moving/refactoring it for more sharing.
2773
2774         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
2775         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
2776         * rendering/RenderMultiColumnFlowThread.h:
2777         New functions that beef up what was in mapFromFlowToRegion and fix some bugs
2778         with the translation code.
2779
2780         * rendering/RenderMultiColumnSet.cpp:
2781         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
2782         Patched to factor in the flow thread portion rect of the specific multicolumn set.
2783
2784         * rendering/RenderObject.h:
2785         (WebCore::RenderObject::isRenderMultiColumnFlowThread):
2786         Added for toRenderMultiColumnFlowThread capability.
2787
2788 2014-04-25  Brent Fulgham  <bfulgham@apple.com>
2789
2790         ScrollingCoordinator is unaware of topContentInset
2791         https://bugs.webkit.org/show_bug.cgi?id=132158
2792         <rdar://problem/16706152>
2793
2794         Reviewed by Darin Adler.
2795
2796         Test: platform/mac/fast/scrolling/scroll-select-bottom-test.html
2797
2798         The calculation of non-fast-scrollable regions does not currently take
2799         the topContentOffset into account. Consequently, the logic that decides
2800         whether to stay on the scrolling thread, or drop down to an individual
2801         page element, can make the wrong choice. This is especially true for
2802         small scrollable regions (such as <select> elements), where the
2803         topContentInset may be quite close to the size of the scrollable
2804          element itself.
2805
2806         * page/scrolling/ScrollingCoordinator.cpp:
2807         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Also
2808         include the topContentInset value in our calculation.
2809
2810 2014-04-25  Javier Fernandez  <jfernandez@igalia.com>
2811
2812         REGRESSION(r167799): Breaks debug build
2813         https://bugs.webkit.org/show_bug.cgi?id=132194
2814
2815         Reviewed by Andrei Bucur.
2816
2817         Fix the debug bots after r167799
2818
2819         No new tests, no new functionality.
2820
2821         * css/CSSParser.cpp:
2822         (WebCore::CSSParser::parseGridTemplateShorthand):
2823
2824 2014-04-25  Miyoung Shin  <myid.shin@samsung.com>
2825
2826         Web process is crashed during dispatching touchEvent created by JS.
2827         https://bugs.webkit.org/show_bug.cgi?id=113225
2828
2829         Reviewed by Benjamin Poulain.
2830
2831         TouchEvent created by JS should have the necessary attributes
2832         of touches, targetTouches and changedTouches.
2833         It should be verified weather there are touchLists before dispatching touch event.
2834
2835         Test: fast/events/touch/create-touch-event-without-touchList.html
2836
2837         * dom/EventDispatcher.cpp:
2838         (WebCore::EventDispatcher::dispatchEvent):
2839         (WebCore::EventPath::updateTouchLists):
2840         (WebCore::addRelatedNodeResolversForTouchList): Deleted.
2841
2842 2014-04-25  Philippe Normand  <pnormand@igalia.com>
2843
2844         [GTK] File webkitRelativePath attribute was removed in r163483
2845         https://bugs.webkit.org/show_bug.cgi?id=132193
2846
2847         Reviewed by Carlos Garcia Campos.
2848
2849         Add the removed getter as deprecated API to keep backwards compatibility.
2850
2851         * bindings/gobject/WebKitDOMDeprecated.cpp:
2852         (webkit_dom_file_get_webkit_relative_path):
2853         * bindings/gobject/WebKitDOMDeprecated.h:
2854         * bindings/gobject/WebKitDOMDeprecated.symbols:
2855
2856 2014-04-25  Radu Stavila  <stavila@adobe.com>
2857
2858         [CSS Regions] Overflow selection doesn't work properly
2859         https://bugs.webkit.org/show_bug.cgi?id=130715
2860
2861         Reviewed by David Hyatt.
2862
2863         When hit-testing, painting block selection gaps and searching for the node at a specific point inside a flow thread,
2864         the region range of the box being checked must be validated in order to not return false positives. Otherwise, hit-testing
2865         at the top of region B could hit elements that overflow the bottom of region A.
2866
2867         Tests: fast/regions/selection-in-overflow-hit-testing.html
2868                fast/regions/selection-in-overflow.html
2869                fast/regions/selection-in-text-after-overflow-hit-testing.html
2870
2871         * accessibility/AccessibilityRenderObject.cpp:
2872         (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
2873         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
2874         * dom/Document.cpp:
2875         (WebCore::Document::caretRangeFromPoint):
2876         * editing/FrameSelection.cpp:
2877         (WebCore::FrameSelection::contains):
2878         * editing/VisibleUnits.cpp:
2879         (WebCore::previousLinePosition):
2880         (WebCore::nextLinePosition):
2881         * page/EventHandler.cpp:
2882         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2883         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2884         (WebCore::EventHandler::handleMousePressEventTripleClick):
2885         (WebCore::EventHandler::handleMousePressEventSingleClick):
2886         (WebCore::selectionExtentRespectingEditingBoundary):
2887         (WebCore::EventHandler::updateSelectionForMouseDrag):
2888         (WebCore::EventHandler::handleMouseReleaseEvent):
2889         * page/Frame.cpp:
2890         (WebCore::Frame::visiblePositionForPoint):
2891         * rendering/RenderBlock.cpp:
2892         (WebCore::RenderBlock::selectionGaps):
2893         (WebCore::RenderBlock::nodeAtPoint):
2894         (WebCore::positionForPointRespectingEditingBoundaries):
2895         (WebCore::RenderBlock::positionForPointWithInlineChildren):
2896         (WebCore::isChildHitTestCandidate):
2897         (WebCore::RenderBlock::positionForPoint):
2898         * rendering/RenderBlock.h:
2899         * rendering/RenderBlockFlow.cpp:
2900         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
2901         (WebCore::RenderBlockFlow::positionForPoint):
2902         * rendering/RenderBlockFlow.h:
2903         * rendering/RenderBox.cpp:
2904         (WebCore::RenderBox::positionForPoint):
2905         * rendering/RenderBox.h:
2906         * rendering/RenderFileUploadControl.cpp:
2907         (WebCore::RenderFileUploadControl::positionForPoint):
2908         * rendering/RenderFileUploadControl.h:
2909         * rendering/RenderInline.cpp:
2910         (WebCore::RenderInline::positionForPoint):
2911         * rendering/RenderInline.h:
2912         * rendering/RenderLineBreak.cpp:
2913         (WebCore::RenderLineBreak::positionForPoint):
2914         * rendering/RenderLineBreak.h:
2915         * rendering/RenderMultiColumnSet.cpp:
2916         (WebCore::RenderMultiColumnSet::positionForPoint):
2917         * rendering/RenderMultiColumnSet.h:
2918         * rendering/RenderObject.cpp:
2919         (WebCore::RenderObject::positionForPoint):
2920         * rendering/RenderObject.h:
2921         * rendering/RenderRegion.cpp:
2922         (WebCore::RenderRegion::positionForPoint):
2923         * rendering/RenderRegion.h:
2924         * rendering/RenderReplaced.cpp:
2925         (WebCore::RenderReplaced::positionForPoint):
2926         * rendering/RenderReplaced.h:
2927         * rendering/RenderText.cpp:
2928         (WebCore::RenderText::positionForPoint):
2929         * rendering/RenderText.h:
2930         * rendering/svg/RenderSVGInlineText.cpp:
2931         (WebCore::RenderSVGInlineText::positionForPoint):
2932         * rendering/svg/RenderSVGInlineText.h:
2933         * rendering/svg/RenderSVGText.cpp:
2934         (WebCore::RenderSVGText::positionForPoint):
2935         * rendering/svg/RenderSVGText.h:
2936
2937 2014-04-25  Philippe Normand  <pnormand@igalia.com>
2938
2939         [GTK] Iframe seamless support was removed in r163427
2940         https://bugs.webkit.org/show_bug.cgi?id=132192
2941
2942         Reviewed by Carlos Garcia Campos.
2943
2944         Add the removed get and set methods as deprecated API to keep
2945         backwards compatibility.
2946
2947         * bindings/gobject/WebKitDOMDeprecated.cpp:
2948         (webkit_dom_processing_instruction_set_data):
2949         (webkit_dom_html_iframe_element_get_seamless):
2950         (webkit_dom_html_iframe_element_set_seamless):
2951         * bindings/gobject/WebKitDOMDeprecated.h:
2952         * bindings/gobject/WebKitDOMDeprecated.symbols:
2953
2954 2014-04-25  Philippe Normand  <pnormand@igalia.com>
2955
2956         [GTK] HTMLInputElement webkitdirectory property was removed in r163483
2957         https://bugs.webkit.org/show_bug.cgi?id=132191
2958
2959         Reviewed by Carlos Garcia Campos.
2960
2961         Add the removed get and set methods as deprecated API to keep
2962         backwards compatibility.
2963
2964         * bindings/gobject/WebKitDOMDeprecated.cpp:
2965         (webkit_dom_html_input_element_get_webkitdirectory):
2966         (webkit_dom_html_input_element_set_webkitdirectory):
2967         * bindings/gobject/WebKitDOMDeprecated.h:
2968         * bindings/gobject/WebKitDOMDeprecated.symbols:
2969
2970 2014-04-25  Javier Fernandez  <jfernandez@igalia.com>
2971
2972         [CSS Grid Layout] Implementation of the grid-template shorthand.
2973         https://bugs.webkit.org/show_bug.cgi?id=128980
2974
2975         Reviewed by Darin Adler.
2976
2977         This shorthand sets the values for the grid-template-columns,
2978         grid-template-rows and grid-template-areas, so the implementation
2979         tries to reuse as much available parsing functions as possible.
2980
2981         The "parsingGridTrackList" was refactored to return a CSSValue and
2982         let the "parseValue" function to assign the property value. The
2983         "forwardSlash" operator is now valid when the track-list clause is
2984         part of a shorthand. The "parseValue" function checkouts that only
2985         additional clauses are allowed when processing shorthands; the
2986         grid-columns-rows-get-set.html tests was modified to verify this.
2987
2988         The "parseGridTemplateAreas" was refactored too, in order to
2989         process single areas's rows. This is very useful for the
2990         gris-template secondary syntax, which mixes areas and rows values.
2991
2992         Finally, the "parseGirdLineNames" function was modified as well by
2993         defining an new argument to concatenate head/tail custom-ident
2994         elements and ensure the identList is at the heading index, since
2995         it's now possible the parseList was rewound.
2996
2997         The implementation of the grid-template shorthand tries first to
2998         match the <grid-template-columns> / <grid-template-rows> syntax,
2999         failing back to the secondary syntax if needed.  This approach
3000         requires to rewind the parseList but it produces a clearer code.
3001
3002         Test: fast/css-grid-layout/grid-template-shorthand-get-set.html
3003
3004         * css/CSSComputedStyleDeclaration.cpp:
3005         (WebCore::ComputedStyleExtractor::propertyValue):
3006         * css/CSSParser.cpp:
3007         (WebCore::CSSParser::parseValue):
3008         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
3009         (WebCore::CSSParser::parseGridTemplateShorthand):
3010         (WebCore::CSSParser::parseGridLineNames):
3011         (WebCore::CSSParser::parseGridTrackList):
3012         (WebCore::CSSParser::parseGridTemplateAreasRow):
3013         (WebCore::CSSParser::parseGridTemplateAreas):
3014         * css/CSSParser.h:
3015         * css/CSSParserValues.h:
3016         (WebCore::CSSParserValueList::setCurrentIndex):
3017         * css/CSSPropertyNames.in:
3018         * css/StylePropertyShorthand.cpp:
3019         (WebCore::webkitGridTemplateShorthand):
3020         * css/StylePropertyShorthand.h:
3021
3022 2014-04-25  Andreas Kling  <akling@apple.com>
3023
3024         Remove two unused SVGDocument functions.
3025         <https://webkit.org/b/132178>
3026
3027         Reviewed by Antti Koivisto.
3028
3029         * svg/SVGDocument.cpp:
3030         (WebCore::SVGDocument::dispatchZoomEvent): Deleted.
3031         (WebCore::SVGDocument::dispatchScrollEvent): Deleted.
3032         * svg/SVGDocument.h:
3033
3034 2014-04-25  Ion Rosca  <rosca@adobe.com>
3035
3036         Incomplete body painting when using blend modes
3037         https://bugs.webkit.org/show_bug.cgi?id=131889
3038
3039         The incomplete painting was caused by the transparency layer created for
3040         the root renderer. We can safely skip creating this transparency layer at
3041         the root level, as there is nothing else being painted behind this layer that
3042         could be used erroneously as a backdrop.
3043
3044         Reviewed by Simon Fraser.
3045
3046         Test: css3/compositing/blend-mode-with-body.html
3047
3048         * rendering/RenderLayer.h:
3049         Changing RenderLayer::paintsWithTransparency so that it will not
3050         return true when the root renderer needs to isolate blending.
3051
3052 2014-04-25  Darin Adler  <darin@apple.com>
3053
3054         ASSERTION FAILED: "!m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction" in svg/custom/use-instanceRoot-event-listeners.xhtml
3055         https://bugs.webkit.org/show_bug.cgi?id=132148
3056
3057         Reviewed by Andreas Kling.
3058
3059         Changed how JSCustomMarkFunction generation works. Instead of leaving out
3060         the generated visitChildren function, just generate a call to visitAdditionalChildren.
3061         This eliminates the need to repeat boilerplate.
3062
3063         The fix for the above bug was to correct mistaken logic where JSSVGElementInstance
3064         had a visitChildren that did not properly mark event listeners because it explicitly
3065         did not call through to the base class visitChildren. The new arrangement makes that
3066         mistake impossible.
3067
3068         * bindings/js/JSAttrCustom.cpp:
3069         (WebCore::JSAttr::visitAdditionalChildren): Use this instead of visitChildren.
3070         * bindings/js/JSAudioTrackCustom.cpp:
3071         (WebCore::JSAudioTrack::visitAdditionalChildren): Ditto.
3072         * bindings/js/JSAudioTrackListCustom.cpp:
3073         (WebCore::JSAudioTrackList::visitAdditionalChildren): Ditto.
3074         * bindings/js/JSCSSRuleCustom.cpp:
3075         (WebCore::JSCSSRule::visitAdditionalChildren): Ditto.
3076         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3077         (WebCore::JSCSSStyleDeclaration::visitAdditionalChildren): Ditto.
3078         * bindings/js/JSCanvasRenderingContextCustom.cpp:
3079         (WebCore::JSCanvasRenderingContext::visitAdditionalChildren): Ditto.
3080         * bindings/js/JSCryptoKeyPairCustom.cpp:
3081         (WebCore::JSCryptoKeyPair::visitAdditionalChildren): Ditto.
3082         * bindings/js/JSDOMWindowCustom.cpp:
3083         (WebCore::JSDOMWindow::visitAdditionalChildren): Ditto.
3084         * bindings/js/JSMessageChannelCustom.cpp:
3085         (WebCore::JSMessageChannel::visitAdditionalChildren): Ditto.
3086         * bindings/js/JSMessagePortCustom.cpp:
3087         (WebCore::JSMessagePort::visitAdditionalChildren): Ditto.
3088         * bindings/js/JSNodeCustom.cpp:
3089         (WebCore::JSNode::visitAdditionalChildren): Ditto.
3090         * bindings/js/JSNodeFilterCustom.cpp:
3091         (WebCore::JSNodeFilter::visitAdditionalChildren): Ditto.
3092         * bindings/js/JSNodeIteratorCustom.cpp:
3093         (WebCore::JSNodeIterator::visitAdditionalChildren): Ditto.
3094         * bindings/js/JSSVGElementInstanceCustom.cpp:
3095         (WebCore::JSSVGElementInstance::visitAdditionalChildren): Ditto.
3096         * bindings/js/JSSharedWorkerCustom.cpp:
3097         (WebCore::JSSharedWorker::visitAdditionalChildren): Ditto.
3098         * bindings/js/JSStyleSheetCustom.cpp:
3099         (WebCore::JSStyleSheet::visitAdditionalChildren): Ditto.
3100         * bindings/js/JSTextTrackCueCustom.cpp:
3101         (WebCore::JSTextTrackCue::visitAdditionalChildren): Ditto.
3102         * bindings/js/JSTextTrackCustom.cpp:
3103         (WebCore::JSTextTrack::visitAdditionalChildren): Ditto.
3104         * bindings/js/JSTextTrackListCustom.cpp:
3105         (WebCore::JSTextTrackList::visitAdditionalChildren): Ditto.
3106         * bindings/js/JSTreeWalkerCustom.cpp:
3107         (WebCore::JSTreeWalker::visitAdditionalChildren): Ditto.
3108         * bindings/js/JSVideoTrackCustom.cpp:
3109         (WebCore::JSVideoTrack::visitAdditionalChildren): Ditto.
3110         * bindings/js/JSVideoTrackListCustom.cpp:
3111         (WebCore::JSVideoTrackList::visitAdditionalChildren): Ditto.
3112         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3113         (WebCore::JSWebGLRenderingContext::visitAdditionalChildren): Ditto.
3114         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3115         (WebCore::JSWorkerGlobalScope::visitAdditionalChildren): Ditto.
3116         * bindings/js/JSXMLHttpRequestCustom.cpp:
3117         (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Ditto.
3118         * bindings/js/JSXPathResultCustom.cpp:
3119         (WebCore::JSXPathResult::visitAdditionalChildren): Ditto.
3120
3121         * bindings/js/JSDOMGlobalObject.cpp:
3122         (WebCore::JSDOMGlobalObject::visitChildren): Rewrote to use modern for loops.
3123
3124         * bindings/scripts/CodeGeneratorJS.pm:
3125         (GenerateHeader): Generate declaration of visitAdditionalChildren.
3126         (GenerateImplementation): Generate call to visitAdditionalChildren.
3127
3128 2014-04-24  Andreas Kling  <akling@apple.com>
3129
3130         [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
3131         <https://webkit.org/b/132171>
3132         <rdar://problem/16720733>
3133
3134         Add a missing export for the USE(CFNETWORK) + WebKit2 combo.
3135
3136         Reviewed by Antti Koivisto.
3137
3138         * WebCore.exp.in:
3139
3140 2014-04-24  Darin Adler  <darin@apple.com>
3141
3142         FrameLoader::checkCompleted can hit the "ref'ing while destroyed" assertion
3143         https://bugs.webkit.org/show_bug.cgi?id=132163
3144         rdar://problem/16720640
3145
3146         Reviewed by Brady Eidson.
3147
3148         Couldn't find a way to test this yet. Would be nice to have a test.
3149
3150         * loader/FrameLoader.cpp:
3151         (WebCore::FrameLoader::checkCompleted): Move protector until after we check
3152         if the frame is already complete. That can happen in practice when this is
3153         called from within the frame's destructor. All the code that runs before the
3154         protector simply checks state and does not require protection.
3155
3156 2014-04-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3157
3158         Mark Supplement instead of RefCountedSupplement in NavigatorContentUtils 
3159         https://bugs.webkit.org/show_bug.cgi?id=132151
3160
3161         Reviewed by Darin Adler.
3162
3163         Though Original goal was to make it sharable across navigator instances, the NavigatorContentUtils
3164         has used RefCountedSupplement<Page> instead of RefCountedSupplement<Navigator>. This patch makes it
3165         use Supplement<Page> because there is no scenario which needs to be shared across navigator instances.
3166
3167         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=171403.
3168
3169         No new tests, no behavior changes.
3170
3171         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3172         (WebCore::NavigatorContentUtils::from):
3173         (WebCore::NavigatorContentUtils::create):
3174         (WebCore::provideNavigatorContentUtilsTo):
3175         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
3176
3177 2014-04-24  Commit Queue  <commit-queue@webkit.org>
3178
3179         Unreviewed, rolling out r167700.
3180         https://bugs.webkit.org/show_bug.cgi?id=132142
3181
3182         Incorrectly reverted the change in r167547 for
3183         webkit.org/b/131898 (Requested by rniwa on #webkit).
3184
3185         Reverted changeset:
3186
3187         "Cursor doesn't change back to pointer when leaving the Safari
3188         window"
3189         https://bugs.webkit.org/show_bug.cgi?id=132038
3190         http://trac.webkit.org/changeset/167700
3191
3192 2014-04-24  Brady Eidson  <beidson@apple.com>
3193
3194         Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
3195         https://bugs.webkit.org/show_bug.cgi?id=132155
3196
3197         Reviewed by Tim Horton.
3198
3199         No new tests (No change in behavior).
3200
3201         * Configurations/FeatureDefines.xcconfig:
3202         * DerivedSources.make:
3203         * WebCore.exp.in:
3204         * css/CSSDefaultStyleSheets.cpp:
3205         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
3206         * css/CSSPrimitiveValueMappings.h:
3207         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3208         * css/CSSValueKeywords.in:
3209         * dom/Node.h:
3210         * html/HTMLImageElement.cpp:
3211         (WebCore::HTMLImageElement::HTMLImageElement):
3212         (WebCore::HTMLImageElement::parseAttribute):
3213         (WebCore::HTMLImageElement::didAttachRenderers):
3214         * html/HTMLImageElement.h:
3215         * html/shadow/ImageControlsRootElement.cpp:
3216         * html/shadow/ImageControlsRootElement.h:
3217         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
3218         * html/shadow/mac/ImageControlsButtonElementMac.h:
3219         * html/shadow/mac/ImageControlsRootElementMac.cpp:
3220         * html/shadow/mac/ImageControlsRootElementMac.h:
3221         * page/ContextMenuContext.cpp:
3222         (WebCore::ContextMenuContext::ContextMenuContext):
3223         * page/ContextMenuContext.h:
3224         * page/ContextMenuController.cpp:
3225         (WebCore::ContextMenuController::maybeCreateContextMenu):
3226         (WebCore::ContextMenuController::populate):
3227         * page/ContextMenuController.h:
3228         * page/Settings.in:
3229         * platform/ThemeTypes.h:
3230         * rendering/RenderImage.cpp:
3231         (WebCore::RenderImage::canHaveChildren):
3232         * rendering/RenderTheme.cpp:
3233         (WebCore::RenderTheme::adjustStyle):
3234         (WebCore::RenderTheme::paint):
3235         (WebCore::RenderTheme::paintBorderOnly):
3236         (WebCore::RenderTheme::paintDecorations):
3237         * rendering/RenderTheme.h:
3238         * rendering/RenderThemeMac.h:
3239         * rendering/RenderThemeMac.mm:
3240         (WebCore::RenderThemeMac::servicesRolloverButtonCell):
3241         (WebCore::RenderThemeMac::paintImageControlsButton):
3242         (WebCore::RenderThemeMac::imageControlsButtonSize):
3243
3244 2014-04-24  Timothy Hatcher  <timothy@apple.com>
3245
3246         Web Inspector: Restore PageDebuggerAgent::enable / disable
3247         https://bugs.webkit.org/show_bug.cgi?id=132156
3248
3249         Restore functions that were eroniously removed in r167530.
3250
3251         Reviewed by Joseph Pecoraro.
3252
3253         * inspector/PageDebuggerAgent.cpp:
3254         (WebCore::PageDebuggerAgent::enable): Added.
3255         (WebCore::PageDebuggerAgent::disable): Added.
3256         * inspector/PageDebuggerAgent.h:
3257
3258 2014-04-24  Alexey Proskuryakov  <ap@apple.com>
3259
3260         Dropzone effects don't work in non-file documents
3261         https://bugs.webkit.org/show_bug.cgi?id=131770
3262
3263         Reviewed by Darin Adler.
3264
3265         File documents have two quirks that were making dropzone work in these before:
3266         1. An ancient hack for Dashboard allows pasteboard access from JS.
3267         2. On Mac, sandbox doesn't prevent File object creation, as we already have the access.
3268
3269         * dom/DataTransfer.cpp:
3270         (WebCore::DataTransfer::hasFileOfType):
3271         (WebCore::DataTransfer::hasStringOfType):
3272         * dom/DataTransfer.h:
3273         Moved these functions from EventHandler to DataTransfer. We can't create a DataTransfer
3274         with Files while dragging, security doesn't permit us to. But we can get the file name.
3275
3276         * fileapi/File.cpp:
3277         (WebCore::createBlobDataForFile):
3278         (WebCore::createBlobDataForFileWithName):
3279         (WebCore::File::contentTypeFromFilePath):
3280         (WebCore::getContentTypeFromFileName): Deleted.
3281         * fileapi/File.h:
3282         Exposed a function to get file type from path without creating a File first.
3283         This is much cheaper than creating a File, and works even when sandbox disallows
3284         read access to content, such as when dragging over a target.
3285
3286         * page/EventHandler.cpp:
3287         (WebCore::hasDropZoneType):
3288         (WebCore::hasFileOfType): Deleted.
3289         (WebCore::hasStringOfType): Deleted.
3290
3291 2014-04-24  Commit Queue  <commit-queue@webkit.org>
3292
3293         Unreviewed, rolling out r167441.
3294         https://bugs.webkit.org/show_bug.cgi?id=132152
3295
3296         Caused full screen regressions on vimeo, youtube, and others.
3297         (Requested by jernoble on #webkit).
3298
3299         Reverted changeset:
3300
3301         "Fullscreen media controls are unusable in pagination mode"
3302         https://bugs.webkit.org/show_bug.cgi?id=131705
3303         http://trac.webkit.org/changeset/167441
3304
3305 2014-04-24  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3306
3307         Unused class forward declarations in Page
3308         https://bugs.webkit.org/show_bug.cgi?id=132141
3309
3310         Reviewed by Benjamin Poulain.
3311
3312         No new tests, no change on behavior.
3313
3314         * page/Page.h:
3315
3316 2014-04-24  Eric Carlson  <eric.carlson@apple.com>
3317
3318         [Mac] don't ask for AVAssetTrack properties before they are available
3319         https://bugs.webkit.org/show_bug.cgi?id=131902
3320         <rdar://problem/16505076>
3321
3322         Reviewed by Brent Fulgham.
3323
3324         No new tests, the behavior this changes can not be tested with a layout test.
3325
3326         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3327         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3328         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
3329             m_cachedTotalBytes.
3330         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Don't report that
3331             metadata has been loaded until the track properties we need have been loaded too.
3332         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Cache totalBytes instead
3333             of recalculating it every time.
3334         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Invalidate cached
3335             total bytes.
3336         (WebCore::assetTrackMetadataKeyNames): Array of AVAssetTrack properties we use.
3337
3338 2014-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
3339
3340         Unify platformWidthForGlyph across OS X and iOS
3341         https://bugs.webkit.org/show_bug.cgi?id=132036
3342
3343         Reviewed by Darin Adler.
3344
3345         This patch creates on shared SimpleFontData::platformWidthForGlyph() function for both OS X and iOS.
3346
3347         No new tests are necessary because there should be no behavior changes.
3348
3349         * platform/graphics/SimpleFontData.h: Signatures for two helper functions
3350         * platform/graphics/ios/SimpleFontDataIOS.mm: Replace iOS implementation of platformWidthForGlyph() with
3351         implementations of only the two helper functions
3352         (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
3353         (WebCore::SimpleFontData::advanceForColorBitmapFont): iOS doesn't have color bitmap fonts
3354         (WebCore::SimpleFontData::platformWidthForGlyph): Deleted.
3355         * platform/graphics/mac/SimpleFontDataMac.mm:
3356         (WebCore::SimpleFontData::getRenderingStyle): Compute style argument to CGFontGetGlyphAdvancesForStyle()
3357         (WebCore::SimpleFontData::advanceForColorBitmapFont): Use [NSFont advancementForGlyph] to compute the advance
3358         (WebCore::hasCustomTracking): Removed #if
3359         (WebCore::isEmoji): Only relevant on iOS
3360         (WebCore::SimpleFontData::platformWidthForGlyph): Shared implementation. Calls helper functions.
3361
3362 2014-04-24  Zalan Bujtas  <zalan@apple.com>
3363
3364         Subpixel rendering: Clipping on text areas when shifted by one device pixel.
3365         https://bugs.webkit.org/show_bug.cgi?id=132008
3366
3367         Reviewed by Darin Adler.
3368
3369         Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
3370         other theme controls are still on integral size/positions.
3371
3372         Test: fast/forms/hidpi-textarea-on-subpixel-position.html
3373
3374         * rendering/RenderBox.cpp:
3375         (WebCore::RenderBox::paintBoxDecorations):
3376         * rendering/RenderTheme.cpp:
3377         (WebCore::RenderTheme::paint):
3378         (WebCore::RenderTheme::paintBorderOnly):
3379         (WebCore::RenderTheme::paintDecorations):
3380         * rendering/RenderTheme.h:
3381         (WebCore::RenderTheme::paintTextField):
3382         (WebCore::RenderTheme::paintTextFieldDecorations):
3383         (WebCore::RenderTheme::paintTextArea):
3384         (WebCore::RenderTheme::paintTextAreaDecorations):
3385         * rendering/RenderThemeIOS.h:
3386         * rendering/RenderThemeIOS.mm:
3387         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
3388         (WebCore::RenderThemeIOS::paintTextAreaDecorations):
3389         * rendering/RenderThemeMac.h:
3390         * rendering/RenderThemeMac.mm:
3391         (WebCore::RenderThemeMac::paintTextField):
3392         (WebCore::RenderThemeMac::paintTextArea):
3393
3394 2014-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
3395
3396         FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
3397         https://bugs.webkit.org/show_bug.cgi?id=132110
3398
3399         Reviewed by Tim Horton.
3400
3401         Updates callers to use '.' instead of '->'.
3402
3403         No new tests are necessary because there should be no behavior change.
3404
3405         * css/CSSFontFaceSource.cpp:
3406         (WebCore::CSSFontFaceSource::getFontData):
3407         * css/CSSFontSelector.cpp:
3408         (WebCore::CSSFontSelector::CSSFontSelector):
3409         (WebCore::CSSFontSelector::~CSSFontSelector):
3410         (WebCore::CSSFontSelector::addFontFaceRule):
3411         (WebCore::fontDataForGenericFamily):
3412         (WebCore::CSSFontSelector::getFallbackFontData):
3413         * platform/MemoryPressureHandler.cpp:
3414         (WebCore::MemoryPressureHandler::releaseMemory):
3415         * platform/graphics/FontCache.cpp:
3416         (WebCore::fontCache): Return a reference
3417         * platform/graphics/FontCache.h:
3418         (WebCore::FontCachePurgePreventer::FontCachePurgePreventer):
3419         (WebCore::FontCachePurgePreventer::~FontCachePurgePreventer):
3420         * platform/graphics/FontGlyphs.cpp:
3421         (WebCore::FontGlyphs::FontGlyphs):
3422         (WebCore::FontGlyphs::releaseFontData):
3423         (WebCore::FontGlyphs::realizeFontDataAt):
3424         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
3425         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3426         (WebCore::FontPlatformData::verticalData):
3427         * platform/graphics/ios/SimpleFontDataIOS.mm:
3428         (WebCore::SimpleFontData::platformCreateScaledFontData):
3429         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3430         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
3431         * platform/graphics/mac/FontCacheMac.mm:
3432         (WebCore::invalidateFontCache):
3433         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
3434         * platform/graphics/mac/SimpleFontDataMac.mm:
3435         (WebCore::SimpleFontData::platformDestroy):
3436         (WebCore::SimpleFontData::platformCreateScaledFontData):
3437         * platform/graphics/win/FontCacheWin.cpp:
3438         (WebCore::getCJKCodePageMasks):
3439         * platform/graphics/win/SimpleFontDataWin.cpp:
3440         (WebCore::SimpleFontData::containsCharacters):
3441         * platform/graphics/wince/FontCacheWinCE.cpp:
3442         (WebCore::getCJKCodePageMasks):
3443         * platform/graphics/wince/FontPlatformData.cpp:
3444         (WebCore::FontFamilyCodePageInfo::codePages):
3445         (WebCore::FixedSizeFontData::create):
3446         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
3447         (WebCore::GlyphPage::fill):
3448         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
3449         (WebCore::SimpleFontData::platformCreateScaledFontData):
3450         (WebCore::SimpleFontData::containsCharacters):
3451
3452 2014-04-24  Eric Carlson  <eric.carlson@apple.com>
3453
3454         [iOS] Manage AudioSession category according to media type
3455         https://bugs.webkit.org/show_bug.cgi?id=132096
3456
3457         Reviewed by Jer Noble.
3458
3459         * WebCore.exp.in: Export setting.
3460
3461         * html/HTMLMediaSession.cpp:
3462         (WebCore::HTMLMediaSession::HTMLMediaSession):
3463         (WebCore::initializeAudioSession): Deleted.
3464
3465         * page/Settings.cpp:
3466         * page/Settings.h:
3467         (WebCore::Settings::setShouldManageAudioSession): New.
3468         (WebCore::Settings::shouldManageAudioSession): Ditto.
3469
3470         * platform/audio/ios/AudioDestinationIOS.cpp:
3471         (WebCore::AudioDestinationIOS::AudioDestinationIOS): Use a MediaSession instead of inheriting
3472             from AudioListener and calling the AudioSession directly.
3473         (WebCore::AudioDestinationIOS::~AudioDestinationIOS): Ditto.
3474         (WebCore::AudioDestinationIOS::start): Notify session.
3475         (WebCore::AudioDestinationIOS::stop): Ditto.
3476         (WebCore::AudioDestinationIOS::beganAudioInterruption): Deleted.
3477         (WebCore::AudioDestinationIOS::endedAudioInterruption): Deleted.
3478         * platform/audio/ios/AudioDestinationIOS.h:
3479         (WebCore::AudioDestinationIOS::mediaType):
3480         (WebCore::AudioDestinationIOS::canReceiveRemoteControlCommands):
3481         (WebCore::AudioDestinationIOS::didReceiveRemoteControlCommand):
3482         (WebCore::AudioDestinationIOS::isPlaying): Deleted.
3483
3484         * platform/audio/ios/AudioSessionIOS.mm:
3485         (WebCore::categoryName): Debug-only logging function.
3486         (WebCore::AudioSession::setCategory): Don't stick with "media" once it is set.
3487
3488         * platform/audio/ios/MediaSessionManagerIOS.mm:
3489         (WebCore::MediaSessionManageriOS::resetRestrictions): Set up restrictions for WebAudio.
3490         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Don't set invalid start time.
3491
3492         * platform/audio/mac/MediaSessionManagerMac.cpp:
3493         (MediaSessionManager::updateSessionState): Manage AudioSession.active when WebAudio clients
3494             come and go. Manage AudioSession.category according to the number of WebAudio and
3495             HTMLMediaElement clients.
3496
3497 2014-04-24  David Hyatt  <hyatt@apple.com>
3498
3499         [New Multicolumn] Client rects don't work with column spans.
3500         https://bugs.webkit.org/show_bug.cgi?id=132131
3501
3502         Reviewed by Dean Jackson.
3503         
3504         Don't factor in the offset of the multicolumn set from the top
3505         of the multicolumn block. This was added already, and it doesn't
3506         need to be a part of columnTranslationForOffset.
3507
3508         Added fast/multicol/client-rects-spanners.html
3509
3510         * rendering/RenderMultiColumnSet.cpp:
3511         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
3512
3513 2014-04-24  Praveen R Jadhav  <praveen.j@samsung.com>
3514
3515         [EFL] WebKit build fails when MEDIA_SOURCE is enabled
3516         https://bugs.webkit.org/show_bug.cgi?id=132118
3517
3518         Reviewed by Brent Fulgham.
3519
3520         Files MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp and
3521         WebKitMediaSourceGStreamer.cpp are included for EFL port build.
3522
3523         No new tests. No change in behaviour.
3524
3525         * PlatformEfl.cmake: MediaSourceGStreamer.cpp, SourceBufferPrivateGStreamer.cpp
3526         and WebKitMediaSourceGStreamer.cpp are included for compilation.
3527
3528 2014-04-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
3529
3530         ASSERTION FAILED: !begin.isIndefinite() in WebCore::SVGSMILElement::resolveFirstInterval.
3531         https://bugs.webkit.org/show_bug.cgi?id=131097
3532
3533         Reviewed by Darin Adler.
3534
3535         According to smil animation reference, max attribute cannot be 0.
3536
3537         Test: svg/animations/smil-animation-max-attribute-zero-crash.svg
3538
3539         * svg/animation/SVGSMILElement.cpp:
3540         (WebCore::SVGSMILElement::maxValue):
3541           changed (result < 0) to (result <= 0)
3542
3543 2014-04-24  Ryuan Choi  <ryuan.choi@samsung.com>
3544
3545         Remove screenColorProfile()
3546         https://bugs.webkit.org/show_bug.cgi?id=132035
3547
3548         Reviewed by Darin Adler.
3549
3550         Only chromium used screenColorProfile() since r120789.
3551
3552         * platform/PlatformScreen.h:
3553         * platform/efl/PlatformScreenEfl.cpp:
3554         (WebCore::screenColorProfile): Deleted.
3555         * platform/gtk/PlatformScreenGtk.cpp:
3556         (WebCore::screenColorProfile): Deleted.
3557         * platform/image-decoders/ImageDecoder.h:
3558         (WebCore::ImageDecoder::qcmsOutputDeviceProfile):
3559         * platform/ios/PlatformScreenIOS.mm:
3560         (WebCore::screenColorProfile): Deleted.
3561         * platform/mac/PlatformScreenMac.mm:
3562         (WebCore::screenColorProfile): Deleted.
3563         * platform/win/PlatformScreenWin.cpp:
3564         (WebCore::screenColorProfile): Deleted.
3565
3566 2014-04-24  Zalan Bujtas  <zalan@apple.com>
3567
3568         One more unreviewed build fix after r167755.
3569
3570         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
3571         (WebCore::RenderImageControlsButton::updateLogicalWidth):
3572         (WebCore::RenderImageControlsButton::computeLogicalHeight):
3573
3574 2014-04-24  Zalan Bujtas  <zalan@apple.com>
3575
3576         Unreviewed build fix after r167755.
3577
3578         * rendering/RenderThemeMac.h:
3579
3580 2014-04-24  Zalan Bujtas  <zalan@apple.com>
3581
3582         Transition RenderTheme API from RenderObject* to const RenderObject&
3583         https://bugs.webkit.org/show_bug.cgi?id=132037
3584
3585         Reviewed by Andreas Kling.
3586
3587         Using const references provides better encapsulation and improve security.
3588
3589         No change in behavior.
3590
3591         * accessibility/AccessibilityObject.cpp:
3592         (WebCore::AccessibilityObject::boundingBoxForQuads):
3593         * dom/Element.cpp:
3594         (WebCore::Element::setActive):
3595         (WebCore::Element::setHovered):
3596         * editing/FrameSelection.cpp:
3597         (WebCore::FrameSelection::focusedOrActiveStateChanged):
3598         * html/HTMLFormControlElement.cpp:
3599         (WebCore::HTMLFormControlElement::disabledStateChanged):
3600         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
3601         * html/HTMLInputElement.cpp:
3602         (WebCore::HTMLInputElement::setChecked):
3603         (WebCore::HTMLInputElement::setIndeterminate):
3604         * html/HTMLOptionElement.cpp:
3605         (WebCore::HTMLOptionElement::parseAttribute):
3606         * rendering/RenderBlock.cpp:
3607         (WebCore::RenderBlock::addVisualOverflowFromTheme):
3608         (WebCore::RenderBlock::baselinePosition):
3609         * rendering/RenderBox.cpp:
3610         (WebCore::RenderBox::paintBoxDecorations):
3611         * rendering/RenderButton.cpp:
3612         (WebCore::RenderButton::styleDidChange):
3613         * rendering/RenderFileUploadControl.cpp:
3614         (WebCore::RenderFileUploadControl::paintObject):
3615         * rendering/RenderFlowThread.cpp:
3616         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
3617         * rendering/RenderObject.cpp:
3618         (WebCore::RenderObject::drawLineForBoxSide):
3619         * rendering/RenderObject.h:
3620         * rendering/RenderProgress.cpp:
3621         (WebCore::RenderProgress::computeLogicalHeight):
3622         * rendering/RenderTextControlSingleLine.cpp:
3623         (WebCore::RenderTextControlSingleLine::paint):
3624         * rendering/RenderTheme.cpp:
3625         (WebCore::RenderTheme::paint):
3626         (WebCore::RenderTheme::paintBorderOnly):
3627         (WebCore::RenderTheme::paintDecorations):
3628         (WebCore::RenderTheme::baselinePosition):
3629         (WebCore::RenderTheme::adjustRepaintRect):
3630         (WebCore::RenderTheme::stateChanged):
3631         (WebCore::RenderTheme::updateControlStatesForRenderer):
3632         (WebCore::RenderTheme::extractControlStatesForRenderer):
3633         (WebCore::RenderTheme::isActive):
3634         (WebCore::RenderTheme::isChecked):
3635         (WebCore::RenderTheme::isIndeterminate):
3636         (WebCore::RenderTheme::isEnabled):
3637         (WebCore::RenderTheme::isFocused):
3638         (WebCore::RenderTheme::isPressed):
3639         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
3640         (WebCore::RenderTheme::isReadOnlyControl):
3641         (WebCore::RenderTheme::isHovered):
3642         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
3643         (WebCore::RenderTheme::isDefault):
3644         (WebCore::RenderTheme::paintInputFieldSpeechButton):
3645         (WebCore::RenderTheme::paintMeter):
3646         (WebCore::RenderTheme::paintSliderTicks):
3647         (WebCore::RenderTheme::progressBarRectForBounds):
3648         * rendering/RenderTheme.h:
3649         (WebCore::RenderTheme::controlSupportsTints):
3650         (WebCore::RenderTheme::paintCapsLockIndicator):
3651         (WebCore::RenderTheme::paintFileUploadIconDecorations):
3652         (WebCore::RenderTheme::imageControlsButtonSize):
3653         (WebCore::RenderTheme::paintCheckbox):
3654         (WebCore::RenderTheme::paintRadio):
3655         (WebCore::RenderTheme::paintButton):
3656         (WebCore::RenderTheme::paintInnerSpinButton):
3657         (WebCore::RenderTheme::paintCheckboxDecorations):
3658         (WebCore::RenderTheme::paintRadioDecorations):
3659         (WebCore::RenderTheme::paintButtonDecorations):
3660         (WebCore::RenderTheme::paintTextField):
3661         (WebCore::RenderTheme::paintTextFieldDecorations):
3662         (WebCore::RenderTheme::paintTextArea):
3663         (WebCore::RenderTheme::paintTextAreaDecorations):
3664         (WebCore::RenderTheme::paintMenuList):
3665         (WebCore::RenderTheme::paintMenuListDecorations):
3666         (WebCore::RenderTheme::paintMenuListButtonDecorations):
3667         (WebCore::RenderTheme::paintPushButtonDecorations):
3668         (WebCore::RenderTheme::paintSquareButtonDecorations):
3669         (WebCore::RenderTheme::paintProgressBar):
3670         (WebCore::RenderTheme::paintSliderTrack):
3671         (WebCore::RenderTheme::paintSliderThumb):
3672         (WebCore::RenderTheme::paintSliderThumbDecorations):
3673         (WebCore::RenderTheme::paintSearchField):
3674         (WebCore::RenderTheme::paintSearchFieldDecorations):
3675         (WebCore::RenderTheme::paintSearchFieldCancelButton):
3676         (WebCore::RenderTheme::paintSearchFieldDecorationPart):
3677         (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
3678         (WebCore::RenderTheme::paintSearchFieldResultsButton):
3679         (WebCore::RenderTheme::paintMediaFullscreenButton):
3680         (WebCore::RenderTheme::paintMediaPlayButton):
3681         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
3682         (WebCore::RenderTheme::paintMediaMuteButton):
3683         (WebCore::RenderTheme::paintMediaSeekBackButton):
3684         (WebCore::RenderTheme::paintMediaSeekForwardButton):
3685         (WebCore::RenderTheme::paintMediaSliderTrack):
3686         (WebCore::RenderTheme::paintMediaSliderThumb):
3687         (WebCore::RenderTheme::paintMediaVolumeSliderContainer):
3688         (WebCore::RenderTheme::paintMediaVolumeSliderTrack):
3689         (WebCore::RenderTheme::paintMediaVolumeSliderThumb):
3690         (WebCore::RenderTheme::paintMediaRewindButton):
3691         (WebCore::RenderTheme::paintMediaReturnToRealtimeButton):
3692         (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
3693         (WebCore::RenderTheme::paintMediaControlsBackground):
3694         (WebCore::RenderTheme::paintMediaCurrentTime):
3695         (WebCore::RenderTheme::paintMediaTimeRemaining):
3696         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderTrack):
3697         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderThumb):
3698         (WebCore::RenderTheme::paintSnapshottedPluginOverlay):
3699         (WebCore::RenderTheme::paintImageControlsButton):
3700         * rendering/RenderThemeIOS.h:
3701         * rendering/RenderThemeIOS.mm:
3702         (WebCore::RenderThemeIOS::addRoundedBorderClip):
3703         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
3704         (WebCore::RenderThemeIOS::baselinePosition):
3705         (WebCore::RenderThemeIOS::paintRadioDecorations):
3706         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
3707         (WebCore::RenderThemeIOS::paintTextAreaDecorations):
3708         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
3709         (WebCore::RenderThemeIOS::paintSliderTrack):
3710         (WebCore::RenderThemeIOS::paintSliderThumbDecorations):
3711         (WebCore::RenderThemeIOS::paintProgressBar):
3712         (WebCore::RenderThemeIOS::paintSearchFieldDecorations):
3713         (WebCore::RenderThemeIOS::paintButtonDecorations):
3714         (WebCore::RenderThemeIOS::paintPushButtonDecorations):
3715         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
3716         * rendering/RenderThemeMac.h:
3717         (WebCore::RenderThemeMac::updateActiveState):
3718         * rendering/RenderThemeMac.mm:
3719         (WebCore::RenderThemeMac::documentViewFor):
3720         (WebCore::RenderThemeMac::adjustRepaintRect):
3721         (WebCore::RenderThemeMac::convertToPaintingRect):
3722         (WebCore::RenderThemeMac::updateCheckedState):
3723         (WebCore::RenderThemeMac::updateEnabledState):
3724         (WebCore::RenderThemeMac::updateFocusedState):
3725         (WebCore::RenderThemeMac::updatePressedState):
3726         (WebCore::RenderThemeMac::controlSupportsTints):
3727         (WebCore::RenderThemeMac::paintTextField):
3728         (WebCore::RenderThemeMac::paintCapsLockIndicator):
3729         (WebCore::RenderThemeMac::paintTextArea):
3730         (WebCore::RenderThemeMac::paintMenuList):
3731         (WebCore::RenderThemeMac::paintMeter):
3732         (WebCore::RenderThemeMac::progressBarRectForBounds):
3733         (WebCore::RenderThemeMac::paintProgressBar):
3734         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
3735         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
3736         (WebCore::RenderThemeMac::setPopupButtonCellState):
3737         (WebCore::RenderThemeMac::paintSliderTrack):
3738         (WebCore::RenderThemeMac::paintSliderThumb):
3739         (WebCore::RenderThemeMac::paintSearchField):
3740         (WebCore::RenderThemeMac::setSearchCellState):
3741         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3742         (WebCore::RenderThemeMac::paintSearchFieldDecorationPart):
3743         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
3744         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
3745         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3746         (WebCore::RenderThemeMac::paintImageControlsButton):
3747         (WebCore::RenderThemeMac::imageControlsButtonSize):
3748
3749 2014-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3750
3751         [GTK] HTML Media capture attribute is a boolean since r163958
3752         https://bugs.webkit.org/show_bug.cgi?id=132061
3753
3754         Reviewed by Gustavo Noronha Silva.
3755
3756         Add new methods webkit_dom_html_input_element_get_capture_enabled
3757         and webkit_dom_html_input_element_set_capture_enabled using a
3758         boolean and deprecate the old methods.
3759
3760         * bindings/gobject/WebKitDOMDeprecated.cpp:
3761         (webkit_dom_html_input_element_get_capture):
3762         (webkit_dom_html_input_element_set_capture):
3763         * bindings/gobject/WebKitDOMDeprecated.h:
3764         * bindings/gobject/WebKitDOMDeprecated.symbols:
3765         * bindings/gobject/webkitdom.symbols:
3766         * bindings/scripts/CodeGeneratorGObject.pm:
3767         (GetEffectiveFunctionName): Helper function to rename API methods
3768         for special cases.
3769         (GenerateFunction): Use GetEffectiveFunctionName().
3770
3771 2014-04-23  Praveen R Jadhav  <praveen.j@samsung.com>
3772
3773         [MediaStream] Implement MediaStream active attribute
3774         https://bugs.webkit.org/show_bug.cgi?id=131973
3775
3776         Reviewed by Eric Carlson.
3777
3778         MediaStream .active attribute are introduced which will replace
3779         .ended attribute. This patch implements the newly introduced attributes.
3780
3781         MediaStream-add-remove-tracks.html is updated to handle this scenario.
3782
3783         * Modules/mediastream/MediaStream.cpp:
3784         (WebCore::MediaStream::active): Added.
3785         (WebCore::MediaStream::setActive): Added.
3786         (WebCore::MediaStream::addTrack): Propagates 'onactive' event when required.
3787         (WebCore::MediaStream::removeTrack): Propagates 'oninactive' event when required.
3788         (WebCore::MediaStream::trackDidEnd): Propagates 'oninactive' event when required.
3789         (WebCore::MediaStream::streamDidEnd):
3790         (WebCore::MediaStream::setStreamIsActive): Added.
3791         * Modules/mediastream/MediaStream.h:
3792         * Modules/mediastream/MediaStream.idl:
3793         * dom/EventNames.h:
3794         * platform/mediastream/MediaStreamPrivate.cpp:
3795         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Initialize .active attribute
3796         (WebCore::MediaStreamPrivate::setEnded):
3797         (WebCore::MediaStreamPrivate::setActive): Added.
3798         * platform/mediastream/MediaStreamPrivate.h:
3799         (WebCore::MediaStreamPrivate::active): Added.
3800
3801 2014-04-23  Darin Adler  <darin@apple.com>
3802
3803         [Cocoa] fix CF leaks found by code inspection
3804         https://bugs.webkit.org/show_bug.cgi?id=132106
3805
3806         Reviewed by Andreas Kling.
3807
3808         * page/CaptionUserPreferencesMediaAF.cpp:
3809         (WebCore::trackDisplayName): Added a missing adoptCF.
3810
3811         * platform/Language.cpp:
3812         (WebCore::displayNameForLanguageLocale): Added a missing adoptCF.
3813
3814         * platform/graphics/FontPlatformData.cpp:
3815         (WebCore::FontPlatformData::openTypeTable): Added a missing adoptCF.
3816
3817         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
3818         (WebCore::InbandTextTrackPrivateAVCF::label): Added two missing adoptCF.
3819
3820         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3821         (WebCore::AVFWrapper::createImageForTimeInRect): Added two missing adoptCF.
3822
3823         * platform/graphics/cg/PDFDocumentImage.cpp:
3824         (WebCore::PDFDocumentImage::createPDFDocument): Added missing adoptCF.
3825
3826         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3827         (WebCore::cascadeToLastResortFontDescriptor): Added two missing adoptCF.
3828
3829         * platform/graphics/mac/FontMac.mm:
3830         (WebCore::Font::primaryFontDataIsSystemFont): Added missing adoptCF.
3831
3832         * platform/graphics/mac/SimpleFontDataMac.mm:
3833         (WebCore::hasCustomTracking): Added missing adoptCF.
3834
3835         * platform/image-decoders/ImageDecoder.h:
3836         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Added CFRelease.
3837
3838         * plugins/mac/PluginPackageMac.cpp:
3839         (WebCore::readPListFile): Added two missing adoptCF.
3840
3841 2014-04-23  Ryosuke Niwa  <rniwa@webkit.org>
3842
3843         REGRESSION (r157328): popover to check into flight ba.com dismisses instantly when focusing form
3844         https://bugs.webkit.org/show_bug.cgi?id=131949
3845
3846         Address the review comment.
3847
3848         * dom/EventDispatcher.cpp:
3849         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
3850
3851 2014-04-23  Andreas Kling  <akling@apple.com>
3852
3853         CachedResourceLoader hoards URLs indefinitely for no good reason.
3854         <https://webkit.org/b/132102>
3855         <rdar://problem/16708265>
3856
3857         Since we don't care about CachedResourceLoader::m_validatedURL's after
3858         the Document has finished dispatching its initial load event, clear the
3859         set at that point, and don't add any new URLs to it.
3860
3861         Reviewed by Anders Carlsson.
3862
3863         * dom/Document.cpp:
3864         (WebCore::Document::dispatchWindowLoadEvent):
3865         * loader/cache/CachedResourceLoader.cpp:
3866         (WebCore::CachedResourceLoader::requestResource):
3867         (WebCore::CachedResourceLoader::documentDidFinishLoadEvent):
3868         * loader/cache/CachedResourceLoader.h:
3869
3870 2014-04-23  Andreas Kling  <akling@apple.com>
3871
3872         Canvas cache of clean URLs can grow without bounds.
3873         <https://webkit.org/b/132091>
3874         <rdar://problem/16695665>
3875
3876         Remove a silly "optimization" that kept a cache of clean URLs
3877         that can be drawn into a canvas without tainting it, all to avoid
3878         the "expensive" checks to determine whether it would taint.
3879
3880         Reviewed by Benjamin Poulain.
3881
3882         * html/canvas/CanvasRenderingContext.cpp:
3883         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
3884         * html/canvas/CanvasRenderingContext.h:
3885
3886 2014-04-23  Benjamin Poulain  <bpoulain@apple.com>
3887
3888         [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
3889         https://bugs.webkit.org/show_bug.cgi?id=132093
3890
3891         Reviewed by Tim Horton.
3892
3893         Change the minimum layout size to float point values to account for size defined on retina displays.
3894         The minimum layout size supports half-pixels, the value is rounded later when computing the layout size
3895         in document coordinates.
3896
3897         * WebCore.exp.in:
3898         * page/ViewportConfiguration.cpp:
3899         (WebCore::ViewportConfiguration::ViewportConfiguration):
3900         Setting the initial content size is incorrect. The layout size computation already take into account
3901         empty size for the first layout.
3902
3903         Setting the content size upfront make the first computation incorrect when the viewport arguments specify
3904         the initial scale.
3905
3906         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
3907         * page/ViewportConfiguration.h:
3908         (WebCore::ViewportConfiguration::minimumLayoutSize):
3909
3910 2014-04-23  Brent Fulgham  <bfulgham@apple.com>
3911
3912         [Mac, iOS] Stop buffering media when on an inactive tab. 
3913         https://bugs.webkit.org/show_bug.cgi?id=132077
3914
3915         Reviewed by Eric Carlson.
3916
3917         * html/HTMLMediaElement.cpp: Rename 'm_isDisplaySleepDisablingSuspended'
3918         to 'm_elementIsHidden'.
3919         (WebCore::HTMLMediaElement::HTMLMediaElement):
3920         (WebCore::HTMLMediaElement::visibilityStatusChanged): Notify the
3921         media session that the element is (or is not) hidden.
3922         (WebCore::HTMLMediaElement::setShouldBufferData): Added.
3923         * html/HTMLMediaElement.h:
3924         * platform/audio/MediaSession.cpp:
3925         (WebCore::MediaSession::clientWillBeginPlayback): Tell media to
3926         buffer if not hidden or playing.
3927         (WebCore::MediaSession::clientWillPausePlayback): Ditto.
3928         (WebCore::MediaSession::visibilityChanged): Added. Client API, just relays call
3929         to updateClientDataBuffering.
3930         (WebCore::MediaSession::updateClientDataBuffering): Tell client it should only
3931         buffer data if it's currently playing, or not hidden.
3932         * platform/audio/MediaSession.h:
3933         * platform/graphics/MediaPlayer.cpp:
3934         (WebCore::MediaPlayer::setShouldBufferData): Added: Just relays to
3935         MediaPlayerPrivate object.
3936         * platform/graphics/MediaPlayer.h:
3937         * platform/graphics/MediaPlayerPrivate.h:
3938         (WebCore::MediaPlayerPrivateInterface::setShouldBufferData):
3939         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3940         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3941         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
3942         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldBufferData): Added.
3943         Detach the player item from the player if we don't want to continue
3944         buffering or other background tasks.
3945
3946 2014-04-23  Alexey Proskuryakov  <ap@apple.com>
3947
3948         Eliminate internals.setMockScrollbarsEnabled()
3949         https://bugs.webkit.org/show_bug.cgi?id=132085
3950
3951         Reviewed by Tim Horton.
3952
3953         This was essentially unused, and also didnt work.
3954
3955         * testing/InternalSettings.cpp:
3956         (WebCore::InternalSettings::Backup::restoreTo):
3957         (WebCore::InternalSettings::setMockScrollbarsEnabled): Deleted.
3958         * testing/InternalSettings.h:
3959         * testing/InternalSettings.idl:
3960
3961 2014-04-23  Anders Carlsson  <andersca@apple.com>
3962
3963         Don't migrate the WKView.h header from WebCore to WebKit
3964         https://bugs.webkit.org/show_bug.cgi?id=132086
3965
3966         Reviewed by Dan Bernstein.
3967
3968         * WebCore.xcodeproj/project.pbxproj:
3969         Add WAKViewInternal.h.
3970
3971         * platform/WAKViewInternal.h: Added.
3972
3973         * platform/ios/wak/WAKClipView.m:
3974         Import WAKViewInternal.h instead of WAKViewPrivate.h.
3975
3976         * platform/ios/wak/WAKScrollView.mm:
3977         Import WAKViewInternal.h instead of WAKViewPrivate.h.
3978
3979         * platform/ios/wak/WAKView.h:
3980         Move ivars to a class extension in WAKViewInternal.h and remove WKView.h import.
3981
3982         * platform/ios/wak/WAKView.mm:
3983         Import WAKViewInternal.h instead of WAKViewPrivate.h.
3984
3985         * platform/ios/wak/WAKViewPrivate.h:
3986         Import WKViewPrivate.h.
3987
3988 2014-04-23  David Hyatt  <hyatt@apple.com>
3989
3990         [New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
3991         https://bugs.webkit.org/show_bug.cgi?id=132078
3992
3993         Reviewed by Anders Carlsson.
3994
3995         * rendering/RenderBox.cpp:
3996         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
3997         Add a parameter to test for orthogonal writing modes. If we're perpendicular,
3998         then we should not skip the flow thread, since we resolve relative to the column width,
3999         and that is always set.
4000
4001         (WebCore::RenderBox::computePercentageLogicalHeight):
4002         Patched to pass in whether or not the box and the ancestor block are perpendicular.
4003
4004         * rendering/RenderBox.h:
4005         Patched the signature of skipContainingBlockForPercentHeightCalculation
4006
4007 2014-04-23  Myles C. Maxfield  <mmaxfield@apple.com>
4008
4009         [OS X] Make checking if a font is the system font more robust
4010         https://bugs.webkit.org/show_bug.cgi?id=132030
4011
4012         Reviewed by Dean Jackson.
4013
4014         Instead of inspecting a font's name to determine if it is a system font,
4015         on OS X we can ask the system directly.
4016
4017         This patch also moves a platform-specific check into platform-specific
4018         code, so that other platforms don't check for OS X-specific behavior.
4019
4020         Covered by existing tests.
4021
4022         * platform/graphics/Font.cpp:
4023         (WebCore::Font::hasValidAverageCharWidth):
4024         * platform/graphics/Font.h:
4025         * platform/graphics/mac/FontMac.mm:
4026         (WebCore::Font::primaryFontDataIsSystemFont):
4027
4028 2014-04-23  David Hyatt  <hyatt@apple.com>
4029
4030         [New Multicolumn] Assertion failure in huge-column-count.html
4031         https://bugs.webkit.org/show_bug.cgi?id=132071
4032
4033         Reviewed by Dean Jackson.
4034
4035         * rendering/RenderBlock.cpp:
4036         (WebCore::RenderBlock::regionAtBlockOffset):
4037         Back out this change, since it wasn't general enough.
4038
4039         * rendering/RenderFlowThread.cpp:
4040         (WebCore::RenderFlowThread::getRegionRangeForBox):
4041         The real issue was that this loop needed to consider the actual box