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