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