Remove "System Font" from whitelisted DRT fonts and char width calculations
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-04-09  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         Remove "System Font" from whitelisted DRT fonts and char width calculations
4         https://bugs.webkit.org/show_bug.cgi?id=131411
5
6         Reviewed by Tim Horton.
7
8         Covered by existing tests.
9
10         * platform/graphics/Font.cpp:
11         (WebCore::Font::hasValidAverageCharWidth):
12
13 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
14
15         Fullscreen does two view controller changes at once
16         https://bugs.webkit.org/show_bug.cgi?id=131432
17
18         Reviewed by Eric Carlson.
19
20         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
21         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
22         delay -presentViewController on the main run loop to allow
23         previous view controller change to complete.
24
25 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
26
27         Enable fullscreen captions selection
28         https://bugs.webkit.org/show_bug.cgi?id=131069
29
30         Reviewed by Eric Carlson.
31
32         Enable media selection options from fullscreen. i.e. captions.
33
34         * WebCore.exp.in:
35         Add exports for 
36         setAudioMediaSelectionOptions
37         setLegibleMediaSelectionOptions
38         selectAudioMediaOption
39         selectLegibleMediaOption
40
41         * platform/ios/WebVideoFullscreenInterface.h:
42         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
43
44         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
45         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
46
47         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
48         Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
49
50         (-[WebAVPlayerController dealloc]):
51         (-[WebAVPlayerController hasMediaSelectionOptions]):
52         (+[WebAVPlayerController keyPathsForValuesAffectingHasMediaSelectionOptions]):
53         (-[WebAVPlayerController hasAudioMediaSelectionOptions]):
54         (+[WebAVPlayerController keyPathsForValuesAffectingHasAudioMediaSelectionOptions]):
55         (-[WebAVPlayerController hasLegibleMediaSelectionOptions]):
56         (+[WebAVPlayerController keyPathsForValuesAffectingHasLegibleMediaSelectionOptions]):
57         (-[WebAVPlayerController currentAudioMediaSelectionOption]):
58         (-[WebAVPlayerController setCurrentAudioMediaSelectionOption:]):
59         (-[WebAVPlayerController currentLegibleMediaSelectionOption]):
60         (-[WebAVPlayerController setCurrentLegibleMediaSelectionOption:]):
61         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions):
62         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions):
63         * platform/ios/WebVideoFullscreenModel.h:
64         Add selectAudioMediaOption/selectLegibleMediaOption
65
66         * platform/ios/WebVideoFullscreenModelMediaElement.h:
67         Add selectAudioMediaOption/selectLegibleMediaOption
68
69         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
70         Add selectAudioMediaOption/selectLegibleMediaOption
71
72         (WebVideoFullscreenModelMediaElement::setMediaElement):
73         Send initial media selection options.
74
75         (WebVideoFullscreenModelMediaElement::selectAudioMediaOption):
76         Will be implemented when audio track slection is implemented.
77
78         (WebVideoFullscreenModelMediaElement::selectLegibleMediaOption):
79         Select corresponding text track on HTMLMediaElement.
80
81 2014-04-09  Antti Koivisto  <antti@apple.com>
82
83         TileGrid should be PlatformCALayerClient instead of TileController
84         https://bugs.webkit.org/show_bug.cgi?id=131456
85
86         Reviewed by Tim Horton.
87
88         The client interface is for the tiles in the grid.
89
90         * platform/graphics/ca/mac/TileController.h:
91         * platform/graphics/ca/mac/TileController.mm:
92         (WebCore::TileController::setContentsScale):
93         (WebCore::TileController::createTileLayer):
94         (WebCore::TileController::platformCALayerPaintContents): Deleted.
95         (WebCore::TileController::platformCALayerDeviceScaleFactor): Deleted.
96         (WebCore::TileController::platformCALayerShowDebugBorders): Deleted.
97         (WebCore::TileController::platformCALayerShowRepaintCounter): Deleted.
98         (WebCore::TileController::platformCALayerIncrementRepaintCount): Deleted.
99         * platform/graphics/ca/mac/TileGrid.h:
100         
101             Move repaint counter to TileGrid too.
102
103         * platform/graphics/ca/mac/TileGrid.mm:
104         (WebCore::TileGrid::removeTiles):
105         (WebCore::TileGrid::removeAllSecondaryTiles):
106         (WebCore::TileGrid::removeTilesInCohort):
107         
108            Cleaned up tile removal.
109
110         (WebCore::TileGrid::revalidateTiles):
111         (WebCore::TileGrid::ensureTilesForRect):
112         (WebCore::TileGrid::platformCALayerPaintContents):
113         (WebCore::TileGrid::platformCALayerDeviceScaleFactor):
114         (WebCore::TileGrid::platformCALayerShowDebugBorders):
115         (WebCore::TileGrid::platformCALayerShowRepaintCounter):
116         (WebCore::TileGrid::platformCALayerContentsOpaque):
117         (WebCore::TileGrid::platformCALayerIncrementRepaintCount):
118         (WebCore::queueTileForRemoval): Deleted.
119
120 2014-04-09  Alexey Proskuryakov  <ap@apple.com>
121
122         Rename some dragging functions
123         https://bugs.webkit.org/show_bug.cgi?id=131460
124
125         Reviewed by Tim Horton.
126
127         Renamed performDrag to performDragOperation. This function is responsible for
128         accepting a drop, not for the whole drag.
129
130         The new name is not perfect either, but I think that it's better, and at least
131         it matches AppKit, like the other dragging destination functions already do.
132
133         * WebCore.exp.in:
134         * page/DragController.cpp:
135         (WebCore::DragController::performDragOperation):
136         (WebCore::DragController::performDrag): Deleted.
137         * page/DragController.h:
138
139 2014-04-08  Samuel White  <samuel_white@apple.com>
140
141         AX: Initial text selection point should respect element focus.
142         https://bugs.webkit.org/show_bug.cgi?id=131402
143
144         Reviewed by Chris Fleizach.
145
146         Support the case where we want to set the initial selection and there's already a focused element.
147
148         No new tests, updated existing selection-initial to test this functionality.
149
150         * page/EventHandler.cpp:
151         (WebCore::setKeyboardSelection):
152         (WebCore::handleKeyboardSelectionMovement):
153
154 2014-04-09  Ryosuke Niwa  <rniwa@webkit.org>
155
156         HTMLCollection::updateNamedElementCach iterates over items twice
157         https://bugs.webkit.org/show_bug.cgi?id=131448
158
159         Reviewed by Andreas Kling.
160
161         Compute the length first and go through the cache interface to traverse through items.
162
163         * html/HTMLCollection.cpp:
164         (WebCore::HTMLCollection::updateNamedElementCache):
165
166 2014-04-09  Brendan Long  <b.long@cablelabs.com>
167
168         [GStreamer] Expose MPEG-TS metadata
169         https://bugs.webkit.org/show_bug.cgi?id=122001
170
171         Reviewed by Eric Carlson.
172
173         Test: media/track/in-band/track-in-band-mpegts-metadata.html
174
175         * CMakeLists.txt: Add InbandDataTextTrack.
176         * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available.
177         * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack.
178         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
179         * WebCore.xcodeproj/project.pbxproj: Same.
180         * html/track/DataCue.cpp:
181         (WebCore::DataCue::DataCue): Add a constructor using raw data.
182         * html/track/DataCue.h:
183         (WebCore::DataCue::create): Same.
184         * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue().
185         * html/track/InbandDataTextTrack.h:
186         * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack.
187         * html/track/InbandWebVTTTextTrack.h: Same.
188         * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType.
189         * html/track/InbandTextTrack.cpp:
190         (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack.
191         (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added.
192         * html/track/TextTrack.h:
193         (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty).
194         * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType.
195         * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format.
196         (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType):
197         * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method.
198         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
199         (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id.
200          (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same.
201         (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added.
202         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added.
203         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added.
204         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
205         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections.
206         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT.
207         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat.
208         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
209
210 2014-04-08  Chris Fleizach  <cfleizach@apple.com>
211
212         AX: Make AXPress much more reliable on the Web
213         https://bugs.webkit.org/show_bug.cgi?id=131426
214
215         Reviewed by Mario Sanchez Prada.
216
217         AXPress fails when an event handler is on a node higher in the parent chain than the focused node.
218
219         We need to make AXPress more reliable by 
220             1) Using the element that is focused as the target of the event
221             2) Search for the inner most control object when dispatching the event
222
223         Updated existing accessibility/press-works-on-control-types.html
224
225         * accessibility/AccessibilityMenuList.cpp:
226         (WebCore::AccessibilityMenuList::press):
227         * accessibility/AccessibilityMenuList.h:
228         * accessibility/AccessibilityMenuListPopup.cpp:
229         (WebCore::AccessibilityMenuListPopup::press):
230         * accessibility/AccessibilityMenuListPopup.h:
231         * accessibility/AccessibilityObject.cpp:
232         (WebCore::AccessibilityObject::press):
233         * accessibility/AccessibilityObject.h:
234         (WebCore::AccessibilityObject::performDefaultAction):
235         * accessibility/AccessibilitySearchFieldButtons.cpp:
236         (WebCore::AccessibilitySearchFieldCancelButton::press):
237         * accessibility/AccessibilitySearchFieldButtons.h:
238         * accessibility/AccessibilitySpinButton.cpp:
239         (WebCore::AccessibilitySpinButtonPart::press):
240         * accessibility/AccessibilitySpinButton.h:
241
242 2014-04-09  Brady Eidson  <beidson@apple.com>
243
244         ContentFilterMac is broken when NE_FILTER_SOURCE is enabled.
245         <rdar://problem/15978793> and https://bugs.webkit.org/show_bug.cgi?id=131445
246
247         Reviewed by Andy Estes.
248
249         No new tests (Not a tested feature).
250
251         * platform/mac/ContentFilterMac.mm:
252         (WebCore::ContentFilter::needsMoreData): Only consider m_neFilterSourceStatus if m_neFilterSource exists.
253         (WebCore::ContentFilter::didBlockData): Ditto.
254
255 2014-04-08  Oliver Hunt  <oliver@apple.com>
256
257         Rewrite Function.bind as a builtin
258         https://bugs.webkit.org/show_bug.cgi?id=131083
259
260         Reviewed by Geoffrey Garen.
261
262         Switch WebCore to use the helper functions when defining the
263         prototype properties on DOM constructors, and update bindings
264         tests accordingly.
265
266         * bindings/js/JSImageConstructor.cpp:
267         (WebCore::JSImageConstructor::finishCreation):
268         * bindings/scripts/CodeGeneratorJS.pm:
269         (GenerateConstructorHelperMethods):
270         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
271         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
272         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
273         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
274         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
275         (WebCore::JSTestEventConstructorConstructor::finishCreation):
276         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
277         (WebCore::JSTestEventTargetConstructor::finishCreation):
278         * bindings/scripts/test/JS/JSTestException.cpp:
279         (WebCore::JSTestExceptionConstructor::finishCreation):
280         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
281         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
282         * bindings/scripts/test/JS/JSTestInterface.cpp:
283         (WebCore::JSTestInterfaceConstructor::finishCreation):
284         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
285         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
286         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
287         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
288         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
289         * bindings/scripts/test/JS/JSTestNode.cpp:
290         (WebCore::JSTestNodeConstructor::finishCreation):
291         * bindings/scripts/test/JS/JSTestObj.cpp:
292         (WebCore::JSTestObjConstructor::finishCreation):
293         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
294         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
295         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
296         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
297         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
298         (WebCore::JSTestTypedefsConstructor::finishCreation):
299         * bindings/scripts/test/JS/JSattribute.cpp:
300         (WebCore::JSattributeConstructor::finishCreation):
301         * bindings/scripts/test/JS/JSreadonly.cpp:
302         (WebCore::JSreadonlyConstructor::finishCreation):
303
304 2014-04-09  Enrica Casucci  <enrica@apple.com>
305
306         Unreviewed iOS build fix. Replacing deprecated enum with AVPlayerViewControllerExitFullScreenReason.
307
308         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
309         (-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
310
311 2014-04-09  Radu Stavila  <stavila@adobe.com>
312
313         [CSS Regions] Monolithic elements should not affect the layout of the content outside its region
314         https://bugs.webkit.org/show_bug.cgi?id=130499
315
316         Reviewed by David Hyatt.
317
318         When performing layout on an element flowed into regions, its logical height must not be incremented 
319         past the region's logical bottom for monolithic elements in regions different than the last region their containing
320         block is fragmented into. This ensures that the following elements are correctly laid out 
321         from the top of the next region.
322         This change must also be applied to floats in order to prevent text from avoiding part
323         of a float that did not actually made it into the current region, but instead overflowed
324         the previous one.
325
326         Tests: fast/regions/fragmentation-after-float-overflow-single-region.html
327                fast/regions/fragmentation-after-monolithic-overflow-self-collapsed.html
328                fast/regions/fragmentation-after-monolithic-overflow-single-region.html
329                fast/regions/fragmentation-after-monolithic-overflow.html
330
331         * rendering/FloatingObjects.cpp:
332         (WebCore::FloatingObjects::computePlacedFloatsTree):
333         * rendering/RenderBlockFlow.cpp:
334         (WebCore::RenderBlockFlow::layoutBlockChild):
335         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
336         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
337         (WebCore::RenderBlockFlow::getClearDelta):
338         (WebCore::RenderBlockFlow::applyAfterBreak): Deleted.
339         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow): Deleted.
340         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock): Deleted.
341         (WebCore::RenderBlockFlow::flipFloatForWritingModeForChild): Deleted.
342         * rendering/RenderBlockFlow.h:
343         * rendering/RenderFlowThread.cpp:
344         (WebCore::RenderFlowThread::isBoxInDifferentRegionsAsFloat):
345         * rendering/RenderFlowThread.h:
346
347 2014-04-09  Anders Carlsson  <andersca@apple.com>
348
349         Use std::array in AffineTransform, and get rid of setMatrix
350         https://bugs.webkit.org/show_bug.cgi?id=131416
351
352         Reviewed by Sam Weinig.
353
354         * platform/graphics/transforms/AffineTransform.cpp:
355         (WebCore::AffineTransform::AffineTransform):
356         (WebCore::AffineTransform::multiply):
357         * platform/graphics/transforms/AffineTransform.h:
358         (WebCore::AffineTransform::setMatrix): Deleted.
359
360 2014-04-09  Carlos Garcia Campos  <cgarcia@igalia.com>
361
362         [GTK] Plugin process crashes when loading totem plugin
363         https://bugs.webkit.org/show_bug.cgi?id=131357
364
365         Reviewed by Martin Robinson.
366
367         Remove netscape plugin implementation from WebCore that was only
368         used by WebKit1. This removes the conflict between the WebCore NPN
369         symbols and the ones used by the plugins.
370
371         * CMakeLists.txt:
372         * PlatformEfl.cmake:
373         * PlatformGTK.cmake:
374         * PlatformWin.cmake:
375         * plugins/PluginViewNone.cpp:
376         * plugins/gtk/PluginPackageGtk.cpp: Removed.
377         * plugins/gtk/PluginViewGtk.cpp: Removed.
378         * plugins/gtk/gtk2xtbin.c: Removed.
379         * plugins/gtk/gtk2xtbin.h: Removed.
380         * plugins/gtk/xembed.h: Removed.
381
382 2014-04-09  Jeremy Jones  <jeremyj@apple.com>
383
384         fullscreen controls first show a play button instead of a pause button
385         https://bugs.webkit.org/show_bug.cgi?id=131430
386
387         Reviewed by Jer Noble.
388
389         isPlaying() is false while buffering, paused() isn't; use paused() for
390         the play button.
391
392         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
393         (WebVideoFullscreenModelMediaElement::setMediaElement):
394         (WebVideoFullscreenModelMediaElement::handleEvent):
395         Use HTMLMediaElement::paused() instead of HTMLMediaElement::isPlaying()
396
397 2014-04-09  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
398
399         Remove duplicated files and unnecessary conditions from UseJSC.cmake
400         https://bugs.webkit.org/show_bug.cgi?id=131438
401
402         Reviewed by Csaba Osztrogonác.
403
404         No new tests required.
405
406         * UseJSC.cmake:
407
408 2014-04-09  Mario Sanchez Prada  <mario.prada@samsung.com>
409
410         [GTK] Layout tests accessibility/children-changed-sends-notification.html and accessibility/notification-listeners.html fails
411         https://bugs.webkit.org/show_bug.cgi?id=131380
412
413         Reviewed by Chris Fleizach.
414
415         Don't emit signals for added objects that we know won't be exposed
416         to the accessibility hierarchy (e.g. static text).
417
418         * accessibility/atk/AXObjectCacheAtk.cpp:
419         (WebCore::AXObjectCache::attachWrapper): Add extra check and early return.
420
421 2014-04-09  Mario Sanchez Prada  <mario.prada@samsung.com>
422
423         [AX][GTK] No new lines in some AX tests output
424         https://bugs.webkit.org/show_bug.cgi?id=131294
425
426         Reviewed by Martin Robinson.
427
428         Do not implement Hypetext or AtkText for the WebArea. Those
429         interfaces will be implemented by the containers (automatically
430         generated or not) for the different parts of the DOM and the
431         render subtree under this element anyway.
432
433         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
434         (getInterfaceMaskFromObject): Make sure we don't apply
435         WAIHypertext nor WAIText to objects with role WebAreaRole.
436
437 2014-04-08  Conrad Shultz  <conrad_shultz@apple.com>
438
439         nil should only be used for objects
440         https://bugs.webkit.org/show_bug.cgi?id=131431
441
442         Reviewed by Chris Fleizach.
443
444         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
445         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
446         nil -> NO.
447
448         * platform/mac/WebVideoFullscreenController.mm:
449         (-[WebVideoFullscreenController setMediaElement:]):
450         nil -> 0; change a NULL to nullptr while we're here.
451
452 2014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
453
454         [CSSRegions] Crash when video in region exits fullscreen
455         https://bugs.webkit.org/show_bug.cgi?id=131366
456
457         Reviewed by Andrei Bucur.
458
459         After fix for https://bugs.webkit.org/show_bug.cgi?id=130392, we compute the region ranges
460         information for inline elements collected in named flows with associated region chains.
461         The algorithm for this computation, implemented in RenderFlowThread::getRegionRangeForBox,
462         walks up the render tree trying to find the top-most unsplittable box under the named flow
463         in the case where the region ranges information is not available.
464
465         As this traversal works properly only when the starting box is not detached from the render tree,
466         i changed the named flow information clearing in RenderBlock::collapseAnonymousBoxChild
467         to occur before the child to be collapsed is removed from the render tree.
468
469         Test: fast/regions/full-screen-video-in-region-crash.html
470
471         * rendering/RenderBlock.cpp:
472         (WebCore::RenderBlock::collapseAnonymousBoxChild):
473         * rendering/RenderFlowThread.cpp:
474         (WebCore::RenderFlowThread::getRegionRangeForBox):
475
476 2014-04-08  Chris Fleizach  <cfleizach@apple.com>
477
478         Unreviewed build fix for iOS (redux).
479
480         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
481         (-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):
482         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
483
484 2014-04-08  Chris Fleizach  <cfleizach@apple.com>
485  
486         Unreviewed build fix for iOS.
487
488         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
489         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
490
491 2014-04-08  Antti Koivisto  <antti@apple.com>
492
493         Factor tile coverage map into a class
494         https://bugs.webkit.org/show_bug.cgi?id=131417
495
496         Reviewed by Tim Horton.
497
498         * WebCore.xcodeproj/project.pbxproj:
499         * platform/graphics/ca/PlatformCALayerClient.h:
500         (WebCore::PlatformCALayerClient::platformCALayerLayoutSublayersOfLayer):
501         (WebCore::PlatformCALayerClient::platformCALayerRespondsToLayoutChanges):
502         (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
503         (WebCore::PlatformCALayerClient::platformCALayerContentsOrientation):
504         (WebCore::PlatformCALayerClient::platformCALayerShowDebugBorders):
505         (WebCore::PlatformCALayerClient::platformCALayerShowRepaintCounter):
506         (WebCore::PlatformCALayerClient::platformCALayerIncrementRepaintCount):
507         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
508         
509             Added default implementation to some of these to make clients less messy.
510
511         * platform/graphics/ca/mac/TileController.h:
512         * platform/graphics/ca/mac/TileController.mm:
513         (WebCore::TileController::~TileController):
514         (WebCore::TileController::platformCALayerPaintContents):
515         (WebCore::TileController::setTiledScrollingIndicatorPosition):
516         (WebCore::TileController::updateTileCoverageMap):
517         (WebCore::TileController::tiledScrollingIndicatorLayer):
518         * platform/graphics/ca/mac/TileCoverageMap.h: Added.
519         (WebCore::TileCoverageMap::setPosition):
520         (WebCore::TileCoverageMap::layer):
521         * platform/graphics/ca/mac/TileCoverageMap.mm: Added.
522         
523             The new class.
524
525         (WebCore::TileCoverageMap::TileCoverageMap):
526         (WebCore::TileCoverageMap::~TileCoverageMap):
527         (WebCore::TileCoverageMap::update):
528         (WebCore::TileCoverageMap::platformCALayerPaintContents):
529         (WebCore::TileCoverageMap::platformCALayerDeviceScaleFactor):
530         * platform/graphics/ca/mac/TileGrid.h:
531         * platform/graphics/ca/mac/TileGrid.mm:
532         (WebCore::TileGrid::drawTileMapContents):
533
534 2014-04-08  Zalan Bujtas  <zalan@apple.com>
535
536         Subpixel rendering: Clip outer rounded border rect on device pixel boundaries.
537         https://bugs.webkit.org/show_bug.cgi?id=131404
538
539         Reviewed by Simon Fraser.
540
541         Use device pixel snapped rectangle to clip out rounded rects, when not all sides are solid/double.
542         Snapping it to device pixel boundaries ensures that when we call drawRect(devicePixelSnappedRect) later,
543         it leaves no cruft behind.
544
545         Test: fast/borders/hidpi-rounded-border-on-subpixel-position.html
546
547         * rendering/RenderBoxModelObject.cpp:
548         (WebCore::RenderBoxModelObject::paintBorder):
549
550 2014-04-08  Jon Lee  <jonlee@apple.com>
551
552         Turn MSE on by default
553         https://bugs.webkit.org/show_bug.cgi?id=131313
554         <rdar://problem/16525223>
555
556         Reviewed by Jer Noble.
557
558         * Configurations/FeatureDefines.xcconfig:
559         * page/Settings.in: Add MEDIA_SOURCE conditional.
560
561 2014-04-08  Anders Carlsson  <andersca@apple.com>
562
563         Remove an unused parameter from loadResource.
564
565         Reviewed by Darin Adler.
566
567         Since the CachedResourceRequest has the charset in it, we don't need to pass it separately to loadRequest.
568
569         * loader/cache/CachedResourceLoader.cpp:
570         (WebCore::CachedResourceLoader::requestResource):
571         (WebCore::CachedResourceLoader::loadResource):
572         * loader/cache/CachedResourceLoader.h:
573
574 2014-04-08  Ryuan Choi  <ryuan.choi@samsung.com>
575
576         Unreviewed EFL build fix attempt since r166956
577
578         * page/efl/DragControllerEfl.cpp: Rename Clipboard to DataTransfer.
579         (WebCore::DragController::declareAndWriteDragImage):
580
581 2014-04-08  Simon Fraser  <simon.fraser@apple.com>
582
583         REGRESSION (r155998): Elements render at very low resolution with some 3d transforms
584         https://bugs.webkit.org/show_bug.cgi?id=131412
585         <rdar://problem/16525044>
586
587         Reviewed by Tim Horton.
588         
589         In r155998 we started to compute a root-relative transform in order to choose
590         a good contentsScale to avoid blurring on scaling.
591         
592         However, the code failed to update this transform when passing over
593         GraphicsLayerCAs with no uncommitted changes, which caused us to choose
594         an incorrect contentsScale sometimes, resulting in blurriness.
595         
596         Fix by updating the root-relative transform on layers with no uncommitted
597         changes.
598
599         Test: compositing/contents-scale/incremental-change.html
600
601         * platform/graphics/ca/GraphicsLayerCA.cpp:
602         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
603
604 2014-04-08  Anders Carlsson  <andersca@apple.com>
605
606         Don't call CGPathAddPath with invalid CGAffineTransform objects
607         https://bugs.webkit.org/show_bug.cgi?id=131413
608         <rdar://problem/16399645>
609
610         Reviewed by Darin Adler.
611
612         Covered by existing tests.
613
614         * platform/graphics/cg/PathCG.cpp:
615         (WebCore::Path::addPath):
616         Don't try to add the path if the affine transform isn't invertible.
617
618         * platform/graphics/transforms/AffineTransform.cpp:
619         (WebCore::AffineTransform::isInvertible):
620         Handle infinite and NaN determinants.
621
622         (WebCore::AffineTransform::inverse):
623         Handle infinite and NaN determinants.
624
625 2014-04-08  Brian J. Burg  <burg@cs.washington.edu>
626
627         Web Replay: memoize nondeterministic attributes of the Screen interface
628         https://bugs.webkit.org/show_bug.cgi?id=131339
629
630         Reviewed by Timothy Hatcher.
631
632         The values from the screen interface are nondeterministic. Since we can't
633         change the physical screen dimensions, instead memoize values of attributes.
634
635         Test: ManualTests/inspector/replay-window-screen.html
636
637         * page/Screen.idl: Add Nondeterministic attribute.
638
639 2014-04-08  Beth Dakin  <bdakin@apple.com>
640
641         https://bugs.webkit.org/show_bug.cgi?id=131408
642         Scrollbars layers don't dynamically update when device scale factor changes
643         -and corresponding-
644         <rdar://problem/16503875>
645
646         Reviewed by Tim Horton.
647
648         The scrollbar layers are not children of the RenderView's layer, so they were 
649         completely skipped over by this function before. We need to start this higher up 
650         the tree in the rootGraphicsLayer(), which will typically return the 
651         m_overflowControlsHostLayer.
652         * rendering/RenderLayerCompositor.cpp:
653         (WebCore::RenderLayerCompositor::deviceOrPageScaleFactorChanged):
654
655 2014-04-08  Ryosuke Niwa  <rniwa@webkit.org>
656
657         HTMLConverter::aggregatedAttributesForAncestors should cache intermediate results
658         https://bugs.webkit.org/show_bug.cgi?id=131400
659
660         Reviewed by Sam Weinig.
661
662         Instead of accumulating attributes from a character node to the highest ancestor,
663         recursively call aggregatedAttributesForElementAndItsAncestors so that aggregated
664         attributes are cached on each ancestor to eliminate the old O(n^2) behavior.
665
666         * editing/cocoa/HTMLConverter.mm:
667         (HTMLConverter::aggregatedAttributesForAncestors):
668         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors): Extracted from aggregatedAttributesForAncestors.
669
670 2014-04-08  Jinwoo Song  <jinwoo7.song@samsung.com>
671
672         Unreviewed CMake build fix after r166965.
673
674         * UseJSC.cmake: Rename JSClipboardCustom.cpp to JSDataTransferCustom.cpp.
675
676 2014-04-08  Enrica Casucci  <enrica@apple.com>
677
678         Unreviewed iOS build fix.
679
680         Return false instead of nil in a function that returns BOOL.
681
682         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
683         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
684
685 2014-04-08  Brady Eidson  <beidson@apple.com>
686
687         Non-empty ranges misdetected as empty ranges, avoiding telephone number detection.
688         <rdar://problem/16553441> and https://bugs.webkit.org/show_bug.cgi?id=131397 
689
690         Reviewed by Tim Horton.
691
692         No new tests (Only affects a currently untested Mac-only WK2 feature)
693
694         * editing/Editor.cpp:
695         (WebCore::Editor::scanSelectionForTelephoneNumbers): Fix detection of empty ranges so we don’t
696           early return erroneously.
697
698 2014-04-08  Adenilson Cavalcanti  <cavalcantii@gmail.com>
699
700         [SVG] Fix CSS transform handling when zoomed
701         https://bugs.webkit.org/show_bug.cgi?id=125836
702
703         Reviewed by Tim Horton.
704
705         Tests: svg/zoom/page/zoom-css-transforms-expected.svg
706                svg/zoom/page/zoom-css-transforms.svg
707
708         Adjusts CSS transforms when used in SVG to account for unexpected
709         translation scale. Backport from Chromium #174910.
710
711         * svg/SVGGraphicsElement.cpp:
712         (WebCore::SVGGraphicsElement::animatedLocalTransform):
713
714 2014-04-08  Hans Muller  <hmuller@adobe.com>
715
716         [CSS Shapes] large corner radius combined with 0 radius does not wrap properly
717         https://bugs.webkit.org/show_bug.cgi?id=129739
718
719         Reviewed by Bem Jones-Bey.
720
721         Corrected special case handling for shape-outside border-box values with border-radius
722         values that greater than or equal to the box's height.
723
724         Tests: fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html
725                fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-002.html
726
727         * rendering/shapes/BoxShape.cpp:
728         (WebCore::BoxShape::getExcludedIntervals):
729
730 2014-04-08  Alexey Proskuryakov  <ap@apple.com>
731
732         Rename Clipboard to DataTransfer
733         https://bugs.webkit.org/show_bug.cgi?id=131371
734
735         Reviewed by Anders Carlsson.
736
737         This is the name used in HTML5, and it's much better than the confusing Clipboard one.
738
739         Renamed related enums too, and made DataTransferAccessPolicy an enum class.
740
741         * CMakeLists.txt:
742         * Configurations/WebCore.xcconfig:
743         * DerivedSources.cpp:
744         * DerivedSources.make:
745         * WebCore.exp.in:
746         * WebCore.vcxproj/WebCore.vcxproj:
747         * WebCore.vcxproj/WebCore.vcxproj.filters:
748         * WebCore.xcodeproj/project.pbxproj:
749         * bindings/js/JSBindingsAllInOne.cpp:
750         * bindings/js/JSClipboardCustom.cpp: Removed.
751         * bindings/js/JSDataTransferCustom.cpp: Copied from Source/WebCore/bindings/js/JSClipboardCustom.cpp.
752         (WebCore::JSDataTransfer::types):
753         (WebCore::JSClipboard::types): Deleted.
754         * bindings/js/JSEventCustom.cpp:
755         * dom/Clipboard.cpp: Removed.
756         * dom/Clipboard.h: Removed.
757         * dom/Clipboard.idl: Removed.
758         * dom/ClipboardAccessPolicy.h: Removed.
759         * dom/ClipboardEvent.cpp:
760         (WebCore::ClipboardEvent::ClipboardEvent):
761         * dom/ClipboardEvent.h:
762         (WebCore::ClipboardEvent::create):
763         (WebCore::ClipboardEvent::clipboard): Deleted.
764         * dom/ClipboardMac.mm: Removed.
765         * dom/DOMAllInOne.cpp:
766         * dom/DataTransfer.cpp: Copied from Source/WebCore/dom/Clipboard.cpp.
767         (WebCore::DataTransfer::DataTransfer):
768         (WebCore::DataTransfer::createForCopyAndPaste):
769         (WebCore::DataTransfer::~DataTransfer):
770         (WebCore::DataTransfer::setAccessPolicy):
771         (WebCore::DataTransfer::canReadTypes):
772         (WebCore::DataTransfer::canReadData):
773         (WebCore::DataTransfer::canWriteData):
774         (WebCore::DataTransfer::clearData):
775         (WebCore::DataTransfer::getData):
776         (WebCore::DataTransfer::setData):
777         (WebCore::DataTransfer::types):
778         (WebCore::DataTransfer::files):
779         (WebCore::DataTransfer::dropEffect):
780         (WebCore::DataTransfer::setDropEffect):
781         (WebCore::DataTransfer::effectAllowed):
782         (WebCore::DataTransfer::setEffectAllowed):
783         (WebCore::DataTransfer::setDragImage):
784         (WebCore::DataTransfer::createForDragAndDrop):
785         (WebCore::DataTransfer::canSetDragImage):
786         (WebCore::DataTransfer::updateDragImage):
787         (WebCore::DataTransfer::createDragImage):
788         (WebCore::DragImageLoader::DragImageLoader):
789         (WebCore::DragImageLoader::imageChanged):
790         (WebCore::DataTransfer::sourceOperation):
791         (WebCore::DataTransfer::destinationOperation):
792         (WebCore::DataTransfer::setSourceOperation):
793         (WebCore::DataTransfer::setDestinationOperation):
794         (WebCore::Clipboard::Clipboard): Deleted.
795         (WebCore::Clipboard::createForCopyAndPaste): Deleted.
796         (WebCore::Clipboard::~Clipboard): Deleted.
797         (WebCore::Clipboard::setAccessPolicy): Deleted.
798         (WebCore::Clipboard::canReadTypes): Deleted.
799         (WebCore::Clipboard::canReadData): Deleted.
800         (WebCore::Clipboard::canWriteData): Deleted.
801         (WebCore::Clipboard::clearData): Deleted.
802         (WebCore::Clipboard::getData): Deleted.
803         (WebCore::Clipboard::setData): Deleted.
804         (WebCore::Clipboard::types): Deleted.
805         (WebCore::Clipboard::files): Deleted.
806         (WebCore::Clipboard::dropEffect): Deleted.
807         (WebCore::Clipboard::setDropEffect): Deleted.
808         (WebCore::Clipboard::effectAllowed): Deleted.
809         (WebCore::Clipboard::setEffectAllowed): Deleted.
810         (WebCore::Clipboard::setDragImage): Deleted.
811         (WebCore::Clipboard::createForDragAndDrop): Deleted.
812         (WebCore::Clipboard::canSetDragImage): Deleted.
813         (WebCore::Clipboard::updateDragImage): Deleted.
814         (WebCore::Clipboard::createDragImage): Deleted.
815         (WebCore::Clipboard::sourceOperation): Deleted.
816         (WebCore::Clipboard::destinationOperation): Deleted.
817         (WebCore::Clipboard::setSourceOperation): Deleted.
818         (WebCore::Clipboard::setDestinationOperation): Deleted.
819         * dom/DataTransfer.h: Copied from Source/WebCore/dom/Clipboard.h.
820         * dom/DataTransfer.idl: Copied from Source/WebCore/dom/Clipboard.idl.
821         * dom/DataTransferAccessPolicy.h: Copied from Source/WebCore/dom/ClipboardAccessPolicy.h.
822         * dom/DataTransferItemList.h:
823         * dom/DataTransferMac.mm: Copied from Source/WebCore/dom/ClipboardMac.mm.
824         (WebCore::DataTransfer::createDragImage):
825         (WebCore::Clipboard::createDragImage): Deleted.
826         * dom/Event.h:
827         (WebCore::Event::clipboardData):
828         (WebCore::Event::internalDataTransfer):
829         (WebCore::Event::clipboard): Deleted.
830         * dom/Event.idl:
831         * dom/MouseEvent.cpp:
832         (WebCore::MouseEvent::create):
833         (WebCore::MouseEvent::MouseEvent):
834         (WebCore::MouseEvent::initMouseEvent):
835         * dom/MouseEvent.h:
836         (WebCore::MouseEvent::dataTransfer):
837         * dom/MouseEvent.idl:
838         * dom/WheelEvent.cpp:
839         * editing/Editor.cpp:
840         (WebCore::Editor::canDHTMLCut):
841         (WebCore::Editor::canDHTMLCopy):
842         (WebCore::Editor::canDHTMLPaste):
843         (WebCore::Editor::tryDHTMLCopy):
844         (WebCore::Editor::tryDHTMLCut):
845         (WebCore::Editor::tryDHTMLPaste):
846         (WebCore::Editor::dispatchCPPEvent):
847         (WebCore::Editor::performCutOrCopy):
848         (WebCore::Editor::selectedTextForDataTransfer):
849         (WebCore::Editor::selectedTextForClipboard): Deleted.
850         * editing/Editor.h:
851         * editing/ios/EditorIOS.mm:
852         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
853         * editing/mac/EditorMac.mm:
854         (WebCore::Editor::takeFindStringFromSelection):
855         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
856         * loader/EmptyClients.h:
857         * page/DragClient.h:
858         * page/DragController.cpp:
859         (WebCore::DragController::dragExited):
860         (WebCore::DragController::performDrag):
861         (WebCore::DragController::tryDHTMLDrag):
862         (WebCore::DragController::startDrag):
863         (WebCore::DragController::doImageDrag):
864         (WebCore::DragController::doSystemDrag):
865         * page/DragController.h:
866         * page/DragState.h:
867         * page/EventHandler.cpp:
868         (WebCore::EventHandler::dispatchDragEvent):
869         (WebCore::hasFileOfType):
870         (WebCore::hasStringOfType):
871         (WebCore::hasDropZoneType):
872         (WebCore::findDropZone):
873         (WebCore::EventHandler::updateDragAndDrop):
874         (WebCore::EventHandler::cancelDragAndDrop):
875         (WebCore::EventHandler::performDragAndDrop):
876         (WebCore::EventHandler::freeDataTransfer):
877         (WebCore::EventHandler::dragSourceEndedAt):
878         (WebCore::EventHandler::dispatchDragSrcEvent):
879         (WebCore::EventHandler::handleDrag):
880         (WebCore::EventHandler::freeClipboard): Deleted.
881         * page/EventHandler.h:
882         * page/efl/EventHandlerEfl.cpp:
883         (WebCore::EventHandler::createDraggingDataTransfer):
884         (WebCore::EventHandler::createDraggingClipboard): Deleted.
885         * page/gtk/DragControllerGtk.cpp:
886         (WebCore::DragController::declareAndWriteDragImage):
887         * page/gtk/EventHandlerGtk.cpp:
888         (WebCore::EventHandler::createDraggingDataTransfer):
889         (WebCore::EventHandler::createDraggingClipboard): Deleted.
890         * page/mac/DragControllerMac.mm:
891         (WebCore::DragController::declareAndWriteDragImage):
892         * page/mac/EventHandlerMac.mm:
893         (WebCore::EventHandler::createDraggingDataTransfer):
894         (WebCore::EventHandler::createDraggingClipboard): Deleted.
895         * page/win/DragControllerWin.cpp:
896         (WebCore::DragController::declareAndWriteDragImage):
897         * page/win/EventHandlerWin.cpp:
898         (WebCore::EventHandler::createDraggingataTransfer):
899         (WebCore::EventHandler::createDraggingClipboard): Deleted.
900         * platform/Pasteboard.h:
901         * platform/gtk/PasteboardGtk.cpp:
902         (WebCore::Pasteboard::writeSelection):
903         * platform/mac/PasteboardMac.mm:
904         * platform/win/PasteboardWin.cpp:
905         (WebCore::Pasteboard::writeRangeToDataObject):
906         (WebCore::Pasteboard::writeSelection):
907
908 2014-04-08  Jer Noble  <jer.noble@apple.com>
909
910         Unreviewed iOS build fix. Pass 0 instead of nil to the options parameter of addObserver:forKeyPath:options:context.
911
912         * platform/graphics/ios/TextTrackRepresentationIOS.mm:
913         (-[WebCoreTextTrackRepresentationIOSHelper setParent:]):
914
915 2014-04-08  Antti Koivisto  <antti@apple.com>
916
917         Remove exposedRect from TileController
918         https://bugs.webkit.org/show_bug.cgi?id=131378
919
920         Reviewed by Simon Fraser.
921
922         Having two separate visible rectangles is confusing. We should compute one on higher level.
923
924         * page/FrameView.cpp:
925         (WebCore::FrameView::setExposedRect):
926         
927             Push exposed rect to tile controller by doing a layer flush (like the changed visible rect is normally passed).
928
929         * platform/graphics/TiledBacking.h:
930         * platform/graphics/ca/mac/TileController.h:
931         * platform/graphics/ca/mac/TileController.mm:
932         
933             Remove exposedRect and just use visibleRect.
934
935         (WebCore::TileController::TileController):
936         (WebCore::TileController::setTiledScrollingIndicatorPosition):
937         
938             Update the scrolling indicator position.
939
940         (WebCore::TileController::updateTileCoverageMap):
941         (WebCore::TileController::setExposedRect): Deleted.
942         * platform/graphics/ca/mac/TileGrid.h:
943         * platform/graphics/ca/mac/TileGrid.mm:
944         (WebCore::TileGrid::tilesWouldChangeForVisibleRect):
945         (WebCore::TileGrid::revalidateTiles):
946         (WebCore::TileGrid::scaledExposedRect): Deleted.
947         * rendering/RenderLayerBacking.cpp:
948         (WebCore::RenderLayerBacking::RenderLayerBacking):
949         
950             No need to push exposedRect anymore.
951
952         * rendering/RenderLayerCompositor.cpp:
953         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
954         
955             Integrate exposed rect to visible rect when flushing layers.
956
957 2014-04-08  Andreas Kling  <akling@apple.com>
958
959         [Mac] Always do a full GC when simulating memory pressure.
960         <https://webkit.org/b/129790>
961
962         To get more consistent accounting on automated memory testers,
963         add a synchronous GC as part of the simulated memory pressure event.
964
965         Reviewed by Geoffrey Garen.
966
967         * platform/mac/MemoryPressureHandlerMac.mm:
968         (WebCore::MemoryPressureHandler::install):
969
970 2014-04-08  Jer Noble  <jer.noble@apple.com>
971
972         Unreviewed iOS build fix. Pass 0 instead of nil to setRate: when pausing.
973
974         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
975         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
976
977 2014-04-08  Mark Lam  <mark.lam@apple.com>
978
979         Refactor to make JSMainThreadExecState's constructor and destructor private.
980         <https://webkit.org/b/131372>
981
982         Reviewed by Mark Hahnenberg.
983
984         This is in preparation for subsequent patches to ensure that we don't
985         exit the VM with an exception still pending.
986
987         No new tests required.  This is only a refactor of existing behavior.
988
989         * bindings/js/JSDOMGlobalObjectTask.cpp:
990         * bindings/js/JSMainThreadExecState.h:
991         (WebCore::JSMainThreadExecState::runTask):
992
993 2014-04-07  Jer Noble  <jer.noble@apple.com>
994
995         [WK2][iOS] Consecutive videos in full screen display only black
996         https://bugs.webkit.org/show_bug.cgi?id=131316
997
998         Reviewed by Eric Carlson.
999
1000         Update the MediaPlayer's full screen attributes whenever the underlying engine changes,
1001         not just when the engine is initially created. Also, clear the videoLayer out of the
1002         fullscreen layer when destroying the videoLayer.
1003
1004         * html/HTMLMediaElement.cpp:
1005         (WebCore::HTMLMediaElement::parseAttribute):
1006         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1007         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
1008
1009 2014-04-08  Morten Stenshorne  <mstensho@opera.com>
1010
1011         [New Multicolumn] Child top margin sometimes ignored for column balancing
1012         https://bugs.webkit.org/show_bug.cgi?id=122754
1013
1014         Reviewed by David Hyatt.
1015
1016         We need to set zero page logical height in LayoutState when column
1017         height is unknown (when the columns haven't yet been
1018         balanced). There's code that assumes that non-zero page height means
1019         that page height is known. Lying about this makes the pagination code
1020         believe that every top margin is adjacent to a column break, which
1021         makes it eat and ignore all top margins.
1022
1023         This should be cleaned up, but it's easier to wait until the old
1024         multicol code has been removed.
1025
1026         Tests: fast/multicol/break-in-scrollable.html
1027                fast/multicol/newmulticol/leading-and-trailing-margin.html
1028                fast/multicol/newmulticol/leading-margin.html
1029
1030         * rendering/LayoutState.cpp:
1031         (WebCore::LayoutState::LayoutState):
1032         * rendering/RenderBlockFlow.cpp:
1033         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
1034         * rendering/RenderFlowThread.h:
1035         * rendering/RenderMultiColumnFlowThread.cpp:
1036         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
1037         * rendering/RenderMultiColumnFlowThread.h:
1038
1039 2014-04-07  Dean Jackson  <dino@apple.com>
1040
1041         Allow elements to register for changes in page scale
1042         https://bugs.webkit.org/show_bug.cgi?id=131319
1043
1044         Reviewed by Eric Carlson.
1045
1046         Some parts of WebCore need to react to changes in the page
1047         scale factor, such as resizing when the user zooms. A followup
1048         patch will enable this for media controls - this simply lays
1049         the groundwork.
1050
1051         At the moment we only allow HTMLMediaElements to register, but if
1052         necessary this could be expanded in the future.
1053
1054         * dom/Document.cpp: New methods to keep a list of HTMLMediaElements that
1055         are interested in updates.
1056         (WebCore::Document::registerForPageScaleFactorChangedCallbacks):
1057         (WebCore::Document::unregisterForPageScaleFactorChangedCallbacks):
1058         (WebCore::Document::pageScaleFactorChanged):
1059         * dom/Document.h:
1060         * html/HTMLMediaElement.cpp:
1061         (WebCore::HTMLMediaElement::HTMLMediaElement):
1062         (WebCore::HTMLMediaElement::registerWithDocument): Add ourselves to the
1063         the document's pageScale callback.
1064         (WebCore::HTMLMediaElement::unregisterWithDocument): Remove ourselves from the
1065         the document's pageScale callback.
1066         (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Add/remove ourselves to/from
1067         the callback if necessary.
1068         (WebCore::HTMLMediaElement::pageScaleFactorChanged): The callback function. Empty for now.
1069         * html/HTMLMediaElement.h:
1070         (WebCore::HTMLMediaElement::mediaControlsDependOnPageScaleFactor): Accessor.
1071         * page/Page.cpp:
1072         (WebCore::Page::setPageScaleFactor): Tell all documents that the user has zoomed.
1073
1074 2014-04-08  peavo@outlook.com  <peavo@outlook.com>
1075
1076         [WinCairo] Compile error in TextureMapper.h
1077         https://bugs.webkit.org/show_bug.cgi?id=131360
1078
1079         Reviewed by Brent Fulgham.
1080
1081         The TextureMapper class has pure virtual methods, and cannot be instantiated.
1082
1083         * platform/graphics/texmap/TextureMapper.h:
1084         (WebCore::TextureMapper::platformCreateAccelerated):
1085
1086 2014-04-08  Zalan Bujtas  <zalan@apple.com>
1087
1088         Subpixel rendering: Slow paint path for inlines should snap to device pixels.
1089         https://bugs.webkit.org/show_bug.cgi?id=131259
1090
1091         Reviewed by Simon Fraser.
1092
1093         InlineTextBox::paint needs to round to the same device pixel position as SimpleLineLayout does.
1094
1095         Test: fast/inline/hidpi-slow-path-text-on-subpixel-position.html
1096
1097         * rendering/InlineTextBox.cpp:
1098         (WebCore::InlineTextBox::paint):
1099         * rendering/TextPainter.h: Cleanup. No reason to have them as references here.
1100
1101 2014-04-07  Brent Fulgham  <bfulgham@apple.com>
1102
1103         Keep 'webkitClosedCaptionsVisible' API in sync with captions display preferences
1104         https://bugs.webkit.org/show_bug.cgi?id=131344
1105
1106         Reviewed by Eric Carlson.
1107
1108         * html/HTMLMediaElement.cpp:
1109         (WebCore::HTMLMediaElement::configureTextTrackGroup) If we decide that captions should
1110         be active (due to user preferences) make sure the 'webkitClosedCaptionsVisible' state
1111         is turned on.
1112
1113 2014-04-08  Zalan Bujtas  <zalan@apple.com>
1114
1115         Subpixel rendering: Paint the filter effect result image on device pixel position.
1116         https://bugs.webkit.org/show_bug.cgi?id=131255
1117
1118         Reviewed by Simon Fraser.
1119
1120         This patch moves filter effect images from integral to device pixel position. However,
1121         result images are still integral based.
1122
1123         Test: css3/filters/hidpi-filter-is-on-subpixel-position.html
1124
1125         * rendering/FilterEffectRenderer.cpp:
1126         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
1127
1128 2014-04-08  Zalan Bujtas  <zalan@apple.com>
1129
1130         Subpixel rendering: Make border images device pixel aware.
1131         https://bugs.webkit.org/show_bug.cgi?id=131209
1132
1133         Reviewed by Simon Fraser.
1134
1135         Snap border-image size and position to device pixels. It works both on generated and bitmap images.
1136
1137         Test: fast/borders/hidpi-border-image-gradient-on-subpixels.html
1138
1139         * rendering/RenderBoxModelObject.cpp:
1140         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1141
1142 2014-04-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1143
1144         [SOUP] Control cookie management according ResourceRequest.allowCookies()
1145         https://bugs.webkit.org/show_bug.cgi?id=131026
1146
1147         Reviewed by Sergio Villar Senin.
1148
1149         Added per soup-message disabling of cookie jar manager when related ResourceRequest does not allow cookies (e.g. some cross-origin requests).
1150
1151         Patch is covered by unskipped test http/tests/xmlhttprequest/cross-origin-cookie-storage.html.
1152
1153         * platform/network/soup/ResourceRequestSoup.cpp:
1154         (WebCore::ResourceRequest::updateSoupMessageMembers): Added disabling of cookie jar manager if cookies are not allowed.
1155
1156 2014-04-08  Sergio Villar Senin  <svillar@igalia.com>
1157
1158         [CSS Grid Layout] Handle min/max height in the grid element
1159         https://bugs.webkit.org/show_bug.cgi?id=131302
1160
1161         Reviewed by Darin Adler.
1162
1163         Removed a FIXME in the code as we're already handling min/max
1164         height in the code. Added a couple of test cases to improve the
1165         test coverage.
1166
1167         Merged from Blink r161876 by <jchaffraix@chromium.org>
1168
1169         Tests: fast/css-grid-layout/flex-content-sized-columns-resize.html
1170                fast/css-grid-layout/grid-element-min-max-height.html
1171
1172         * rendering/RenderGrid.cpp:
1173         (WebCore::RenderGrid::layoutGridItems):
1174
1175 2014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
1176
1177         [CSSRegions] Remove unused RenderBox::clearRenderBoxRegionInfo
1178         https://bugs.webkit.org/show_bug.cgi?id=131352
1179
1180         Reviewed by Andrei Bucur.
1181
1182         No new tests, code clean-up.
1183
1184         * rendering/RenderBox.cpp:
1185         (WebCore::RenderBox::clearRenderBoxRegionInfo): Deleted.
1186         * rendering/RenderBox.h:
1187
1188 2014-04-08  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1189
1190         Buildfix after r166917
1191         https://bugs.webkit.org/show_bug.cgi?id=131351
1192
1193         Reviewed by Andrei Bucur.
1194
1195         * accessibility/AccessibilityNodeObject.cpp:
1196         (WebCore::accessibleNameForNode):
1197
1198 2014-04-08  Darin Adler  <darin@apple.com>
1199
1200         Fix assertions triggered by CSS calc changes in r166860
1201         https://bugs.webkit.org/show_bug.cgi?id=131346
1202
1203         Reviewed by Andrei Bucur.
1204
1205         * css/CSSComputedStyleDeclaration.cpp:
1206         (WebCore::getBorderRadiusCornerValues): Use isPercentNotCalculated() instead of
1207         type() == Percent; no behavior change.
1208         (WebCore::getBorderRadiusCornerValue): Ditto.
1209         (WebCore::lineHeightFromStyle): Use isPercentNotCalculated() before code
1210         that calls percent(), which won't work for a calculated length.
1211
1212         * css/DeprecatedStyleBuilder.cpp:
1213         (WebCore::ApplyPropertyBorderRadius::applyValue): Use isNegative and isZero rather
1214         than calling value() unconditionally. Should make calculated values work better.
1215
1216         * html/HTMLPlugInImageElement.cpp:
1217         (WebCore::is100Percent): Use isPercentNotCalculated() before code
1218         that calls percent(), which won't work for a calculated length.
1219
1220         * platform/Length.cpp:
1221         (WebCore::CalculationValueMap::deref): Use adoptRef here instead of calling deref
1222         immediately, so the deref will happen after calling remove. This makes the code
1223         work properly even if it's reentered inside the calculation value's destructor.
1224
1225         * platform/Length.h:
1226         (WebCore::Length::percent): Change assert to isPercentNotCalculated, since the
1227         value function this calls only works for non-calculated values anyway.
1228         (WebCore::Length::isPercentNotCalculated): Added.
1229         (WebCore::Length::isPercent): Changed to call isPercentNotCalculated.
1230         (WebCore::Length::isSpecified): Changed to call isPercent.
1231
1232         * platform/graphics/transforms/TranslateTransformOperation.h:
1233         (WebCore::TranslateTransformOperation::apply): Use isPercentNotCalculated()
1234         instead of type() == Percent; no behavior change.
1235
1236         * rendering/AutoTableLayout.cpp:
1237         (WebCore::AutoTableLayout::recalcColumn): Use isPercentNotCalculated()
1238         before code that calls value() or percent(), which won't work for a calculated length.
1239         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths): Ditto.
1240         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth): Ditto.
1241         (WebCore::AutoTableLayout::layout): Ditto.
1242         * rendering/FixedTableLayout.cpp:
1243         (WebCore::FixedTableLayout::layout): Ditto.
1244         * rendering/RenderBoxModelObject.cpp:
1245         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Ditto.
1246         * rendering/RenderTableSection.cpp:
1247         (WebCore::updateLogicalHeightForCell): Ditto.
1248         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows): Ditto.
1249         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows): Ditto.
1250
1251         * rendering/style/RenderStyle.cpp:
1252         (WebCore::requireTransformOrigin): Use modern for loop. Also marked function static,
1253         since it's private to this file.
1254         (WebCore::RenderStyle::applyTransform): Use isPercentNotCalculated() instead of
1255         type() == Percent; no behavior change. Also use a modern for loop and auto& to avoid
1256         a really long type name.
1257
1258         * rendering/svg/RenderSVGRoot.cpp:
1259         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Use isPercentNotCalculated()
1260         before code that calls percent(), which won't work for a calculated length.
1261
1262         * platform/Length.h:
1263         (WebCore::Length::percent):
1264         (WebCore::Length::isPercentNotCalculated):
1265         (WebCore::Length::isPercent):
1266         (WebCore::Length::isSpecified):
1267         * platform/graphics/transforms/TranslateTransformOperation.h:
1268         (WebCore::TranslateTransformOperation::apply):
1269         * rendering/AutoTableLayout.cpp:
1270         (WebCore::AutoTableLayout::recalcColumn):
1271         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
1272         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1273         (WebCore::AutoTableLayout::layout):
1274         * rendering/FixedTableLayout.cpp:
1275         (WebCore::FixedTableLayout::layout):
1276         * rendering/RenderBoxModelObject.cpp:
1277         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
1278         * rendering/RenderTableSection.cpp:
1279         (WebCore::updateLogicalHeightForCell):
1280         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
1281         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
1282         * rendering/style/RenderStyle.cpp:
1283         (WebCore::requireTransformOrigin):
1284         (WebCore::RenderStyle::applyTransform):
1285         * rendering/svg/RenderSVGRoot.cpp:
1286         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
1287
1288 2014-04-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1289
1290         [GTK] Remove media controls dead code
1291         https://bugs.webkit.org/show_bug.cgi?id=131300
1292
1293         Reviewed by Eric Carlson.
1294
1295         MediaControlsGtk.cpp is no longer used so we can remove it from
1296         the repo.
1297
1298         No new tests needed.
1299
1300         * PlatformGTK.cmake: Remove html/shadow/MediaControlsGtk.cpp from
1301         compilation.
1302         * html/shadow/MediaControlsGtk.cpp: Removed.
1303
1304 2014-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
1305
1306         [CSSRegions] Fixed positioned elements in named flows have fragmented content
1307         https://bugs.webkit.org/show_bug.cgi?id=130595
1308
1309         Reviewed by Darin Adler.
1310
1311         Fixed positioned elements that have the named flow as parent are positioned
1312         and sized relative to the viewport. Because of that, when the named flow
1313         has an associated region chain, the fixed positioned elements should not
1314         be fragmented.
1315
1316         By making a fixed positioned element with a named flow parent unsplittable
1317         for fragmentation, we prevent this wrong behavior.
1318
1319         Test: fast/regions/fixed-pos-content-fragmented.html
1320
1321         * rendering/RenderBox.cpp:
1322         (WebCore::RenderBox::isUnsplittableForPagination):
1323
1324 2014-04-07  Chris Fleizach  <cfleizach@apple.com>
1325
1326         Regression: AX: image labels no longer exposed to AX API in SVG test case
1327         https://bugs.webkit.org/show_bug.cgi?id=131208
1328
1329         Reviewed by Daniel Bates.
1330
1331         accessibleNameForNode should work on any Element, not just HTML elements.
1332
1333         Test: accessibility/svg-labelledby.html
1334
1335         * accessibility/AccessibilityNodeObject.cpp:
1336         (WebCore::accessibleNameForNode):
1337
1338 2014-04-08  Andres Gomez  <agomez@igalia.com>
1339
1340         [GTK] [EFL] Build fails with GCC < 4.8.x
1341         https://bugs.webkit.org/show_bug.cgi?id=130585
1342
1343         Reviewed by Martin Robinson.
1344
1345         The behavior in lower versions of GCC seem to be related to
1346         http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2132.
1347
1348         Provided explicit casts for the failing ambiguous overloads.
1349
1350         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1351         (WebCore::AudioFileReader::createBus):
1352         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1353         (webKitMediaSrcChangeState):
1354         (webKitMediaVideoSrcNeedDataCb):
1355         (webKitMediaAudioSrcNeedDataCb):
1356         (webKitMediaVideoSrcEnoughDataCb):
1357         (webKitMediaAudioSrcEnoughDataCb):
1358         (webKitMediaVideoSrcSeekDataCb):
1359         (webKitMediaAudioSrcSeekDataCb):
1360         * platform/gtk/GtkDragAndDropHelper.cpp:
1361         (WebCore::GtkDragAndDropHelper::handleDragLeave):
1362         * platform/gtk/SharedTimerGtk.cpp:
1363         (WebCore::setSharedTimerFireInterval):
1364
1365 2014-04-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1366
1367         Change NavigatorContentUtils client ownership from port side to NavigatorContentUtils
1368         https://bugs.webkit.org/show_bug.cgi?id=131299
1369
1370         Reviewed by Darin Adler.
1371
1372         EFL and GTK ports have managed own client of NavigatorContentUtils though it is only passed to
1373         NavigatorContentUtils. The NavigatorContentUtils has used the client to call port functions. So,
1374         there is no reason port implementation needs to manage the ownership. To manage the client is
1375         unnecessary work in current implementation.
1376
1377         No new tests, no behavior changes.
1378
1379         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1380         (WebCore::NavigatorContentUtils::create):
1381         (WebCore::provideNavigatorContentUtilsTo):
1382         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
1383         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
1384
1385 2014-04-07  Zoltan Horvath  <zoltan@webkit.org>
1386
1387         [CSS Shapes] Simplify the parsing of width arguments for Inset shapes
1388         https://bugs.webkit.org/show_bug.cgi?id=131305
1389
1390         Reviewed by Andreas Kling.
1391
1392         This code introduces some helper functions for setting the size arguments of inset shapes. This change
1393         also modifies the code to be the same as in Blink, so it helps us to keep the shapes code similar.
1394
1395         No new tests, no behavior change.
1396
1397         * css/CSSBasicShapes.h:
1398         (WebCore::CSSBasicShapeInset::updateShapeSize4Values):
1399         (WebCore::CSSBasicShapeInset::updateShapeSize1Value):
1400         (WebCore::CSSBasicShapeInset::updateShapeSize2Values):
1401         (WebCore::CSSBasicShapeInset::updateShapeSize3Values):
1402         * css/CSSParser.cpp:
1403         (WebCore::CSSParser::parseBasicShapeInset):
1404
1405 2014-04-07  Martin Robinson  <mrobinson@igalia.com>
1406
1407         fast/css3-text/css3-text-decoration/text-decoration-thickness.html fails on GTK
1408         https://bugs.webkit.org/show_bug.cgi?id=129957
1409
1410         Reviewed by Dean Jackson.
1411
1412         Causes existing tests to pass.
1413
1414         * platform/graphics/cairo/GraphicsContextCG.cpp: Use the now-shared computeLineBoundsAndAntialiasingModeForText.
1415         * platform/graphics/cairo/GraphicsContextCairo.cpp: Align the Cairo version of text underline drawing with the CG version.
1416         * platform/graphics/GraphicsContext.h: Add computeLineBoundsAndAntialiasingModeForText.
1417         * platform/graphics/GraphicsContext.cpp: Ditto.
1418
1419 2014-04-07  Beth Dakin  <bdakin@apple.com>
1420
1421         REGRESSION (r163194-r163227): Garbage tiles in overflow of RTL page with 
1422         background image
1423         https://bugs.webkit.org/show_bug.cgi?id=131323
1424         -and corresponding-
1425         <rdar://problem/16402013>
1426
1427         Reviewed by Tim Horton.
1428
1429         Returning the TiledBacking::bounds() for the 
1430         FrameView::extendedBackgroundRectForPainting() in convenient for ltr pages, but it 
1431         is simply incorrect in rtl. There is no easy way to map the rect into the right 
1432         coordinate space, so this patch re-works the code to use computations in 
1433         RenderView to get the right rect.
1434
1435         Call RenderView::unextendedBackgroundRect() and expand and move it based on the 
1436         TiledBacking’s margins.
1437         * page/FrameView.cpp:
1438         (WebCore::FrameView::extendedBackgroundRectForPainting):
1439
1440         The logic that used to be in backgroundRect() has been moved to 
1441         unextendedBackgroundRect(). 
1442         * rendering/RenderView.cpp:
1443         (WebCore::RenderView::unextendedBackgroundRect):
1444         (WebCore::RenderView::backgroundRect):
1445         * rendering/RenderView.h:
1446
1447 2014-04-07  Zoltan Horvath  <zoltan@webkit.org>
1448
1449         [CSS Shapes] inset complex calc() args vanish in serialized computed style
1450         https://bugs.webkit.org/show_bug.cgi?id=129838
1451
1452         Reviewed by Bem Jones-Bey.
1453
1454         We didn't pass the style parameter when setting the width members of CSSBasicShapeInset,
1455         which lead to a 'should never reach asserttion' in CSSPrimitiveValue::init. This patch
1456         adds the missing parameters to the call sites.
1457
1458         Extended existing parsing test script.
1459
1460         * css/BasicShapeFunctions.cpp:
1461         (WebCore::valueForBasicShape):
1462
1463 2014-04-07  Eric Carlson  <eric.carlson@apple.com>
1464
1465         [iOS] MediaDocument should allow autoplay
1466         https://bugs.webkit.org/show_bug.cgi?id=131301
1467
1468         Reviewed by Jer Noble.
1469
1470         * html/HTMLMediaElement.cpp:
1471         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't add the RequireUserGestureForRateChange
1472             behavior restriction when in a MediaDocument.
1473
1474 2014-04-07  Hyowon Kim  <hw1008.kim@samsung.com>
1475
1476         Move to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platform/graphics.
1477         https://bugs.webkit.org/show_bug.cgi?id=131276
1478
1479         Reviewed by Darin Adler.
1480
1481         Replace uses of OwnPtr and PassOwnPtr in code under WebCore/platform/graphics/
1482         opengl, texmap, transforms and efl with std::unique_ptr.
1483
1484         * html/canvas/WebGLRenderingContext.cpp:
1485         (WebCore::WebGLRenderingContext::initializeNewContext):
1486         * platform/graphics/GraphicsContext3D.h:
1487         * platform/graphics/GraphicsContext3DPrivate.cpp:
1488         (WebCore::GraphicsContext3DPrivate::create): Deleted.
1489         * platform/graphics/GraphicsContext3DPrivate.h:
1490         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1491         (WebCore::GraphicsContext3D::GraphicsContext3D):
1492         (WebCore::GraphicsContext3D::setContextLostCallback):
1493         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1494         * platform/graphics/efl/EvasGLContext.h:
1495         * platform/graphics/efl/EvasGLSurface.h:
1496         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1497         (WebCore::GraphicsContext3D::setContextLostCallback):
1498         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1499         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1500         (WebCore::GraphicsContext3DPrivate::create):
1501         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
1502         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1503         * platform/graphics/mac/GraphicsContext3DMac.mm:
1504         (WebCore::GraphicsContext3D::GraphicsContext3D):
1505         (WebCore::GraphicsContext3D::setContextLostCallback):
1506         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1507         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
1508         (WebCore::Extensions3DOpenGLES::setEXTContextLostCallback):
1509         * platform/graphics/opengl/Extensions3DOpenGLES.h:
1510         * platform/graphics/opengl/GLPlatformContext.cpp:
1511         (WebCore::createOffScreenContext):
1512         (WebCore::GLPlatformContext::createContext):
1513         * platform/graphics/opengl/GLPlatformContext.h:
1514         * platform/graphics/opengl/GLPlatformSurface.cpp:
1515         (WebCore::GLPlatformSurface::createOffScreenSurface):
1516         * platform/graphics/opengl/GLPlatformSurface.h:
1517         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
1518         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1519         (WebCore::EGLOffScreenSurface::createOffScreenSurface):
1520         * platform/graphics/surfaces/egl/EGLSurface.h:
1521         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1522         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
1523         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1524         * platform/graphics/texmap/TextureMapper.cpp:
1525         (WebCore::TextureMapper::create):
1526         (WebCore::TextureMapper::TextureMapper):
1527         * platform/graphics/texmap/TextureMapper.h:
1528         (WebCore::TextureMapper::platformCreateAccelerated):
1529         * platform/graphics/texmap/TextureMapperGL.cpp:
1530         (WebCore::TextureMapper::platformCreateAccelerated):
1531         * platform/graphics/texmap/TextureMapperGL.h:
1532         (WebCore::TextureMapperGL::create): Deleted.
1533         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1534         (WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):
1535         (WebCore::TextureMapperImageBuffer::create): Deleted.
1536         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1537         (WebCore::CoordinatedGraphicsScene::purgeGLResources):
1538         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1539         * platform/graphics/transforms/TransformState.cpp:
1540         (WebCore::TransformState::operator=):
1541         (WebCore::TransformState::applyTransform):
1542         * platform/graphics/transforms/TransformState.h:
1543         * platform/graphics/win/GraphicsContext3DWin.cpp:
1544         (WebCore::GraphicsContext3D::GraphicsContext3D):
1545         (WebCore::GraphicsContext3D::setContextLostCallback):
1546         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1547
1548 2014-04-07  Tim Horton  <timothy_horton@apple.com>
1549
1550         [iOS WebKit2] Make back-buffers purgeable when possible
1551         https://bugs.webkit.org/show_bug.cgi?id=131213
1552         <rdar://problem/15373906>
1553
1554         Reviewed by Simon Fraser.
1555
1556         * WebCore.exp.in:
1557         * platform/graphics/cg/IOSurfacePool.cpp:
1558         (WebCore::IOSurfacePool::takeSurface):
1559         (WebCore::IOSurfacePool::markOlderSurfacesPurgeable):
1560         (WebCore::IOSurfacePool::showPoolStatistics):
1561         * platform/graphics/cocoa/IOSurface.h:
1562         * platform/graphics/cocoa/IOSurface.mm:
1563         (IOSurface::isVolatile):
1564         (IOSurface::setIsVolatile):
1565         Rename purgeability functions to match the system
1566         and reduce confusion between purgeable memory
1567         and volatile vs. non-volatile memory.
1568
1569 2014-04-07  Benjamin Poulain  <benjamin@webkit.org>
1570
1571         Split CSS Selectors pseudo class and pseudo elements
1572         https://bugs.webkit.org/show_bug.cgi?id=131295
1573
1574         Reviewed by Andreas Kling.
1575
1576         Split pseudo class and pseudo element to make it clearer what pseudo types
1577         are possible for a given match type.
1578
1579         Pseudo Element types are separated and Pseudo Class are left in place. The Pseudo Class
1580         will have to be renamed too but that will be done separately to make this change smaller.
1581
1582         * css/CSSGrammar.y.in:
1583         * css/CSSParser.cpp:
1584         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
1585         (WebCore::CSSParser::rewriteSpecifiers):
1586         Use a method isPseudoElementCueFunction() to abstract the #ifdef out of the parser.
1587
1588         * css/CSSParserValues.cpp:
1589         (WebCore::CSSParserSelector::parsePseudoElementSelector):
1590
1591         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
1592         Rename to specify this is for the pseudo element cue function, not the pseudo element cue.
1593
1594         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
1595         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.
1596         * css/CSSParserValues.h:
1597         (WebCore::CSSParserSelector::isPseudoElementCueFunction):
1598         * css/CSSSelector.cpp:
1599         (WebCore::CSSSelector::specificityForOneSelector):
1600         (WebCore::CSSSelector::pseudoId):
1601         (WebCore::CSSSelector::parsePseudoElementType):
1602         (WebCore::CSSSelector::operator==):
1603         * css/CSSSelector.h:
1604         (WebCore::CSSSelector::pseudoType):
1605         (WebCore::CSSSelector::setPseudoElementType):
1606         (WebCore::CSSSelector::pseudoElementType):
1607         (WebCore::CSSSelector::isUnknownPseudoElement):
1608         (WebCore::CSSSelector::isCustomPseudoElement):
1609         (WebCore::pseudoClassIsRelativeToSiblings):
1610         (WebCore::CSSSelector::isSiblingSelector):
1611         * css/RuleFeature.cpp:
1612         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
1613         * css/RuleSet.cpp:
1614         (WebCore::determinePropertyWhitelistType):
1615         (WebCore::RuleSet::findBestRuleSetAndAdd):
1616         * css/SelectorChecker.cpp:
1617         (WebCore::SelectorChecker::matchRecursively):
1618         (WebCore::SelectorChecker::checkOne):
1619         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
1620         (WebCore::SelectorChecker::determineLinkMatchType):
1621         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1622         * css/SelectorPseudoElementTypeMap.in:
1623         * css/SelectorPseudoTypeMap.h:
1624         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
1625         * css/makeSelectorPseudoElementsMap.py:
1626         (enumerablePseudoType):
1627         * page/DOMWindow.cpp:
1628         (WebCore::DOMWindow::getMatchedCSSRules):
1629
1630         * rendering/style/RenderStyleConstants.h:
1631         All the fullscreen pseudo types are pseudo class selectors. They should not have a pseudo ID.
1632
1633 2014-04-07  Brian J. Burg  <burg@cs.washington.edu>
1634
1635         Web Replay: detect possible replay divergence from unexpected DOM event dispatches
1636         https://bugs.webkit.org/show_bug.cgi?id=131193
1637
1638         Reviewed by Andreas Kling.
1639
1640         Add assertions to catch potential nondeterministic behavior.
1641
1642         The assertion added by this patch catches dispatched DOM events
1643         that are triggered by nondeterministic event loop cycles. If we
1644         did not capture an event loop input in the current event loop
1645         cycle nor are we manually simulating an event loop input during
1646         playback, then DOM events fired during the unordered cycle could
1647         run JavaScript and diverge the execution.
1648
1649         During playback, we can assert that EventLoopInputDispatcher is dispatching
1650         when a DOM event is be dispatched to a document that is being replayed.
1651
1652         During capturing, event loop inputs are captured rather than
1653         dispatched, so we add some accounting to track what caused a DOM
1654         event. To approximate the extent of computation triggered by an
1655         event loop input, we add RAII helpers to call sites where event
1656         loop inputs are captured.
1657
1658         The assertions are disabled by default until the most common
1659         sources of nondeterminism are handled and playback errors are
1660         gracefully surfaced to the user. <https://webkit.org/b/131279>
1661
1662         No new tests. This patch adds extra assertions for debugging purposes.
1663
1664         * WebCore.xcodeproj/project.pbxproj:
1665         * inspector/InspectorInstrumentation.cpp: Notify ReplayAgent of dispatched DOM event.
1666         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1667         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
1668         * inspector/InspectorReplayAgent.cpp: Forward dispatched DOM events to ReplayController.
1669         (WebCore::InspectorReplayAgent::willDispatchEvent): Added.
1670         * inspector/InspectorReplayAgent.h:
1671         * replay/CapturingInputCursor.cpp:
1672         (WebCore::CapturingInputCursor::CapturingInputCursor):
1673         (WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Added.
1674         * replay/CapturingInputCursor.h:
1675         * replay/EventLoopInput.cpp: Added.
1676         (WebCore::EventLoopInputExtent::EventLoopInputExtent): Added.
1677         (WebCore::EventLoopInputExtent::~EventLoopInputExtent): Added.
1678         * replay/EventLoopInput.h:
1679         * replay/EventLoopInputDispatcher.h:
1680         (WebCore::EventLoopInputDispatcher::isDispatching): Add a getter.
1681         * replay/ReplayController.cpp:
1682         (WebCore::logDispatchedDOMEvent): Added. This is useful for understanding script-visible events.
1683         (WebCore::ReplayController::willDispatchEvent): Added.
1684         * replay/ReplayController.h:
1685         * replay/UserInputBridge.cpp: Add extent helpers to call sites that capture inputs.
1686         (WebCore::UserInputBridge::handleMousePressEvent):
1687         (WebCore::UserInputBridge::handleMouseReleaseEvent):
1688         (WebCore::UserInputBridge::handleMouseMoveEvent):
1689         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
1690         (WebCore::UserInputBridge::handleKeyEvent):
1691         (WebCore::UserInputBridge::handleWheelEvent):
1692         (WebCore::UserInputBridge::scrollRecursively):
1693         (WebCore::UserInputBridge::logicalScrollRecursively):
1694
1695 2014-04-07  Timothy Hatcher  <timothy@apple.com>
1696
1697         Remove copy of combine-javascript-resources.pl that isn't used anymore
1698         https://bugs.webkit.org/show_bug.cgi?id=131307
1699
1700         Reviewed by Joseph Pecoraro.
1701
1702         * WebCore.xcodeproj/project.pbxproj:
1703         * inspector/combine-javascript-resources.pl: Removed.
1704
1705 2014-04-07  Zoltan Horvath  <zoltan@webkit.org>
1706
1707         [CSS Shapes] Clean up invalid FIXME
1708         https://bugs.webkit.org/show_bug.cgi?id=131304
1709
1710         Reviewed by Andreas Kling.
1711
1712         No new tests, no behavior change.
1713
1714         * page/animation/CSSPropertyAnimation.cpp:
1715         (WebCore::blendFunc):
1716
1717 2014-04-07  Ryuan Choi  <ryuan.choi@samsung.com>
1718
1719         [EFL] Turn on ENABLE_MEDIA_CONTROLS_SCRIPT
1720         https://bugs.webkit.org/show_bug.cgi?id=131257
1721
1722         Reviewed by Gyuyoung Kim.
1723
1724         no new tests. just rebased exisiting tests.
1725
1726         * PlatformEfl.cmake: Added the media controls script associated files.
1727         * css/mediaControlsEfl.css: Removed.
1728         * css/mediaControlsEflFullscreen.css: Removed.
1729         * platform/efl/DefaultTheme/CMakeLists.txt:
1730         * platform/efl/DefaultTheme/default.edc:
1731         * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png: Removed.
1732         * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png: Removed.
1733         * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc: Removed.
1734         * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc: Removed.
1735         * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mutebutton.png: Removed.
1736         * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/unmutebutton.png: Removed.
1737         * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/pausebutton.png: Removed.
1738         * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playbutton.png: Removed.
1739         * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc: Removed.
1740         * platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc: Removed.
1741         * platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png: Removed.
1742         * platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc: Removed.
1743         * platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png: Removed.
1744         * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption.png: Removed.
1745         * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/closedcaption_disabled.png: Removed.
1746         * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc: Removed.
1747         * platform/efl/RenderThemeEfl.cpp:
1748         (WebCore::toEdjeGroup):
1749         (WebCore::RenderThemeEfl::RenderThemeEfl):
1750         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
1751         (WebCore::RenderThemeEfl::mediaControlsStyleSheet): Modified to load bundle style sheet.
1752         (WebCore::RenderThemeEfl::mediaControlsScript): Added to load bundle scripts.
1753         (WebCore::RenderThemeEfl::emitMediaButtonSignal): Deleted.
1754         (WebCore::RenderThemeEfl::extraMediaControlsStyleSheet): Deleted.
1755         (WebCore::RenderThemeEfl::extraFullScreenStyleSheet): Deleted.
1756         (WebCore::RenderThemeEfl::formatMediaControlsCurrentTime): Deleted.
1757         (WebCore::RenderThemeEfl::hasOwnDisabledStateHandlingFor): Deleted.
1758         (WebCore::RenderThemeEfl::paintMediaFullscreenButton): Deleted.
1759         (WebCore::RenderThemeEfl::paintMediaMuteButton): Deleted.
1760         (WebCore::RenderThemeEfl::paintMediaPlayButton): Deleted.
1761         (WebCore::RenderThemeEfl::paintMediaSeekBackButton): Deleted.
1762         (WebCore::RenderThemeEfl::paintMediaSeekForwardButton): Deleted.
1763         (WebCore::RenderThemeEfl::paintMediaSliderTrack): Deleted.
1764         (WebCore::RenderThemeEfl::paintMediaSliderThumb): Deleted.
1765         (WebCore::RenderThemeEfl::paintMediaVolumeSliderContainer): Deleted.
1766         (WebCore::RenderThemeEfl::paintMediaVolumeSliderTrack): Deleted.
1767         (WebCore::RenderThemeEfl::paintMediaVolumeSliderThumb): Deleted.
1768         (WebCore::RenderThemeEfl::paintMediaCurrentTime): Deleted.
1769         (WebCore::RenderThemeEfl::supportsClosedCaptioning): Deleted.
1770         (WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton): Deleted.
1771         * platform/efl/RenderThemeEfl.h:
1772
1773 2014-04-07  Benjamin Poulain  <benjamin@webkit.org>
1774
1775         CSS JIT: change the node flags directly instead of using function calls when possible
1776         https://bugs.webkit.org/show_bug.cgi?id=131292
1777
1778         Reviewed by Andreas Kling.
1779
1780         For historical reasons, changing the node flags was always done with function calls.
1781         This patch changes those calls to modify the nodes directly.
1782
1783         * cssjit/SelectorCompiler.cpp:
1784         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
1785         (WebCore::SelectorCompiler::setNodeFlag):
1786         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
1787         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1788         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1789         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1790         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByLastChildRules): Deleted.
1791         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByFirstChildAndLastChildRules): Deleted.
1792         * dom/Element.cpp:
1793         (WebCore::Element::setChildrenAffectedByFirstChildRules): Deleted.
1794         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
1795         * dom/Element.h:
1796         * dom/Node.h:
1797         (WebCore::Node::flagChildrenAffectedByFirstChildRulesFlag):
1798         (WebCore::Node::flagChildrenAffectedByLastChildRulesFlag):
1799         (WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag):
1800
1801 2014-04-07  Krzysztof Czech  <k.czech@samsung.com>
1802
1803         Remove unused header from PlatformSpeechSynthesizer.h
1804         https://bugs.webkit.org/show_bug.cgi?id=131103
1805
1806         Reviewed by Anders Carlsson.
1807
1808         Since WebSpeech has switched to use std::unique_ptr, we do not need to include PassOwnPtr.
1809
1810         No new tests. No behaviour change, just quick fix.
1811
1812         * platform/PlatformSpeechSynthesizer.h:
1813
1814 2014-04-06  Mihnea Ovidenie  <mihnea@adobe.com>
1815
1816         [CSSRegions] Use RenderRegion::isValid() before using a region
1817         https://bugs.webkit.org/show_bug.cgi?id=131232
1818
1819         Reviewed by Andreas Kling.
1820
1821         RenderRegion method isValid() should be used to test whether a region
1822         is good to use instead of a mix between isValid() and flowThread().
1823         When the region is designed to fragment content from a parent flow thread,
1824         the m_flowThread is not nullified anymore, thus ensuring the same treatment for all invalid
1825         regions.
1826         Covered by existing regions tests.
1827
1828         * inspector/InspectorOverlay.cpp:
1829         (WebCore::buildObjectForElementInfo):
1830         * rendering/RenderBox.cpp:
1831         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1832         * rendering/RenderBoxModelObject.cpp:
1833         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1834         * rendering/RenderLayer.cpp:
1835         (WebCore::RenderLayer::updateLayerPositions):
1836         (WebCore::RenderLayer::paintLayer):
1837         (WebCore::RenderLayer::hitTestLayer):
1838         (WebCore::RenderLayer::calculateClipRects):
1839         * rendering/RenderNamedFlowFragment.cpp:
1840         (WebCore::RenderNamedFlowFragment::pageLogicalHeight):
1841         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
1842         * rendering/RenderNamedFlowThread.cpp:
1843         (WebCore::RenderNamedFlowThread::getRanges):
1844         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
1845         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
1846         * rendering/RenderRegion.cpp:
1847         (WebCore::RenderRegion::RenderRegion):
1848         (WebCore::RenderRegion::positionForPoint):
1849         (WebCore::RenderRegion::pageLogicalWidth):
1850         (WebCore::RenderRegion::pageLogicalHeight):
1851         (WebCore::RenderRegion::styleDidChange):
1852         (WebCore::RenderRegion::installFlowThread):
1853         (WebCore::RenderRegion::attachRegion):
1854         (WebCore::RenderRegion::detachRegion):
1855         (WebCore::RenderRegion::ensureOverflowForBox):
1856         (WebCore::RenderRegion::renderBoxRegionInfo):
1857
1858 2014-04-06  Benjamin Poulain  <benjamin@webkit.org>
1859
1860         Fix the debug bots after r166863
1861
1862         * css/PageRuleCollector.cpp:
1863         (WebCore::checkPageSelectorComponents): I forgot to update one call site for PagePseudoClass.
1864
1865 2014-04-06  Darin Adler  <darin@apple.com>
1866
1867         Make some bindings improvements, with smaller code size for error message generation
1868         https://bugs.webkit.org/show_bug.cgi?id=131285
1869
1870         Reviewed by Andreas Kling.
1871
1872         * WebCore.exp.in: Updated to remove old and add new functions, for use by the Internals
1873         JavaScript bindings.
1874
1875         * bindings/js/JSDOMBinding.cpp:
1876         (WebCore::makeDOMBindingsTypeErrorStringInternal): Deleted.
1877         (WebCore::throwTypeError): Added. Helper to avoid repeating throwVMError/createTypeError.
1878         (WebCore::appendArgumentMustBe): Added. Helper for building up argument error strings.
1879         (WebCore::reportDeprecatedGetterError): Added. For bindings to use.
1880         (WebCore::throwArgumentMustBeEnumError): Ditto.
1881         (WebCore::throwArgumentMustBeFunctionError): Ditto.
1882         (WebCore::throwArgumentTypeError): Ditto.
1883         (WebCore::throwArrayElementTypeError): Ditto.
1884         (WebCore::throwAttributeTypeError): Ditto.
1885         (WebCore::throwConstructorDocumentUnavailableError): Ditto.
1886         (WebCore::throwGetterTypeError): Ditto.
1887         (WebCore::throwSequenceTypeError): Ditto.
1888         (WebCore::throwSetterTypeError): Ditto.
1889         (WebCore::throwThisTypeError): Ditto.
1890
1891         * bindings/js/JSDOMBinding.h: Added declarations for new functions. Removed forward
1892         declarations for things not used in this file. Use nullptr instead of 0. Format
1893         templates consistently. Use a better for loop in the jsArray function. Removed
1894         unused HasMemoryCostMemberFunction, makeDOMBindingsTypeErrorString, and
1895         makeDOMBindingsTypeErrorStringInternal.
1896
1897         * bindings/js/JSNavigatorCustom.cpp: Fixed a hand-written binding that was using
1898         makeDOMBindingsTypeErrorString to make a string.
1899
1900         * bindings/js/ScriptController.h: Updated forward declarations.
1901
1902         * bindings/scripts/CodeGeneratorJS.pm:
1903         (GenerateImplementation): Cut down on use of UNUSED_PARAM. Use the new functions
1904         for errors, keeping the code in the generated file to a minimum.
1905         (GenerateParametersCheck): Ditto.
1906         (GenerateConstructorDefinition): Ditto.
1907
1908         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1909         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1910         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1911         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1912         * bindings/scripts/test/JS/JSTestException.cpp:
1913         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1914         * bindings/scripts/test/JS/JSTestInterface.cpp:
1915         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1916         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1917         * bindings/scripts/test/JS/JSTestNode.cpp:
1918         * bindings/scripts/test/JS/JSTestObj.cpp:
1919         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1920         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1921         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1922         * bindings/scripts/test/JS/JSattribute.cpp:
1923         * bindings/scripts/test/JS/JSreadonly.cpp:
1924         Updated expected results for changes above.
1925
1926 2014-04-06  Benjamin Poulain  <benjamin@webkit.org>
1927
1928         Move the PseudoPageClass types out of the pseudo element/class mix
1929         https://bugs.webkit.org/show_bug.cgi?id=131284
1930
1931         Reviewed by Darin Adler.
1932
1933         Some more cleanup of Selector's pseudo types. This patch moves the page pseudo
1934         class types into their own enumeration (PagePseudoClassType).
1935
1936         * css/CSSParserValues.cpp:
1937         (WebCore::CSSParserSelector::parsePagePseudoSelector):
1938         * css/CSSSelector.cpp:
1939         (WebCore::CSSSelector::specificityForPage):
1940         (WebCore::CSSSelector::pseudoId):
1941         (WebCore::CSSSelector::selectorText):
1942         * css/CSSSelector.h:
1943         (WebCore::CSSSelector::setPagePseudoType):
1944         (WebCore::CSSSelector::pagePseudoClassType):
1945         * css/PageRuleCollector.cpp:
1946         (WebCore::checkPageSelectorComponents):
1947         * cssjit/SelectorCompiler.cpp:
1948         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1949
1950 2014-04-06  Benjamin Poulain  <benjamin@webkit.org>
1951
1952         CSS JIT: add support for :last-child and :only-child
1953         https://bugs.webkit.org/show_bug.cgi?id=131283
1954
1955         Reviewed by Andreas Kling.
1956
1957         This is the straightforward implementation of :last-child and :only-child.
1958
1959         Both are extremely similar to :first-child. There are only minor differences:
1960         -:last-child has an additional check for the flag IsParsingChildrenFinished.
1961         -:only-child is like :first-child + :last-child but with combined marking.
1962
1963         * cssjit/SelectorCompiler.cpp:
1964         (WebCore::SelectorCompiler::addPseudoType):
1965         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToNextAdjacentElement):
1966         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1967         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
1968         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1969         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
1970         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByLastChildRules):
1971         (WebCore::SelectorCompiler::setLastChildState):
1972         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1973         (WebCore::SelectorCompiler::markElementWithSetChildrenAffectedByFirstChildAndLastChildRules):
1974         (WebCore::SelectorCompiler::setOnlyChildState):
1975         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1976         * dom/Node.h:
1977         (WebCore::Node::nextSiblingMemoryOffset):
1978         (WebCore::Node::flagIsParsingChildrenFinished):
1979         * rendering/style/RenderStyle.h:
1980         Removed the unused flags, I will add them back later as needed.
1981
1982 2014-04-06  Darin Adler  <darin@apple.com>
1983
1984         Rework CSS calc logic, fixing some reference count mistakes in Length
1985         https://bugs.webkit.org/show_bug.cgi?id=131280
1986         rdar://problem/16400823
1987
1988         Reviewed by Andreas Kling.
1989
1990         New unit test in TestWebKitAPI.
1991
1992         Changed the classes related to CSS "calc" to make the code a bit easier to read by
1993         moving code out of class definitions. Also used final some more, made more things private,
1994         used references instead of pointers, and other such changes. Biggest change, though, is to
1995         Length, which had a broken system for managing reference counted calculated objects.
1996         There were multiple bugs including a basic design mistake of not having a reference count
1997         and trying to use the reference count in the object itself. Fixed and covered by the unit
1998         test now; test found multiple problems in both the old and new implementations.
1999
2000         * WebCore.exp.in: Updated exports, including symbols to make the unit test practical.
2001
2002         * WebCore.xcodeproj/project.pbxproj: Made CalculationValue.h a Private file so it can
2003         be used in a unit test. Also let Xcode update the file type for a gperf file.
2004
2005         * css/CSSCalculationValue.cpp:
2006         (WebCore::CSSCalcValue::equals): Updated since m_expression is a Ref now.
2007         (WebCore::CSSCalcValue::clampToPermittedRange): Marked inline and updated for data member
2008         name change.
2009         (WebCore::isIntegerResult): Changed argument order to put the operator first and use
2010         references instead of pointers. Also marked inline.
2011         (WebCore::createBlendHalf): Added. Helper to make the other functions more readable.
2012         (WebCore::createExpressionNode): Made non-member function private to this file. Also made
2013         many small improvements.
2014         (WebCore::CSSCalcValue::create): Updated so both of these call the same constructor.
2015
2016         * css/CSSCalculationValue.h: Cut down CSSCalcValue class by making more things private
2017         and deleting unneeded things. Also use Ref instead of RefPtr.
2018
2019         * css/CSSComputedStyleDeclaration.cpp:
2020         (WebCore::getPositionOffsetValue): Use isFixed function instead of type function.
2021
2022         * css/CSSGradientValue.cpp:
2023         (WebCore::CSSGradientValue::addStops): Updated code since toCalcValue now returns PassRef
2024         instead of PassRefPtr. Unfortunately the new code is a bit more verbose.
2025         (WebCore::positionFromValue): Ditto.
2026
2027         * css/CSSParser.cpp:
2028         (WebCore::CSSParser::parseCalculation):
2029
2030         * css/CSSPrimitiveValue.cpp:
2031         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated to pass reference rather than pointer.
2032         (WebCore::CSSPrimitiveValue::init): Ditto.
2033
2034         * css/CSSToStyleMap.h: Removed unneeded include of LengthBox.h.
2035
2036         * css/DeprecatedStyleBuilder.cpp:
2037         (WebCore::ApplyPropertyLength::applyValue): Updated for function name change.
2038         (WebCore::ApplyPropertyBorderRadius::applyValue): Removed extra parentheses.
2039         (WebCore::ApplyPropertyFontSize::applyValue): Ditto. Also updated since toCalcValue returns Ref.
2040
2041         * css/LengthFunctions.cpp:
2042         (WebCore::floatValueForLength): Updated to call value instead of getFloatValue; both are the same.
2043
2044         * css/StyleResolver.cpp:
2045         (WebCore::addIntrinsicMargins): Updated for function name change.
2046         (WebCore::createGridTrackBreadth): Ditto.
2047
2048         * platform/CalculationValue.cpp:
2049         (WebCore::CalculationValue::create): Changed to return PassRef.
2050         (WebCore::CalcExpressionNumber::evaluate): Moved this function out of the header, since it's
2051         virtual and not really going to be inlined.
2052         (WebCore::CalcExpressionNumber::operator==): Ditto.
2053         (WebCore::CalculationValue::evaluate): Ditto.
2054         (WebCore::CalcExpressionBinaryOperation::operator==): Ditto.
2055         (WebCore::CalcExpressionLength::evaluate): Ditto.
2056         (WebCore::CalcExpressionLength::operator==): Ditto.
2057         (WebCore::CalcExpressionBlendLength::evaluate): Ditto.
2058         (WebCore::CalcExpressionBlendLength::operator==): Ditto.
2059
2060         * platform/CalculationValue.h: Moved most functions out of the class bodies so the classes are
2061         easier to see. Made all the == operator functions non-member ones except for the polymorphic
2062         one from the base class. Changed the casting functions to work on references instead of pointers.
2063         Tweaked name of some members.
2064
2065         * platform/Length.cpp: Reworked the CalculationValueMap (formerly CalculationValueHandleMap) to
2066         use unsigned instead of int, and store reference counts in the map rather than trying to share the
2067         reference count of the underlying CalculationValue object, which can lead to storage leaks where
2068         handles end up in the map permanently.
2069         (WebCore::calculationValues): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
2070         (WebCore::Length::Length): Updated some data member names.
2071         (WebCore::Length::calculationValue): Updated to return a reference instead of a PassRefPtr.
2072         (WebCore::Length::ref): Renamed and updated for new interface to the map.
2073         (WebCore::Length::deref): Ditto.
2074         (WebCore::Length::nonNanCalculatedValue): Updated to use a reference instead of a pointer.
2075         (WebCore::Length::isCalculatedEqual): Updated since this is now only called if both objects are
2076         known to be calculated values.
2077
2078         * platform/Length.h: Moved most functions out of the class definition to make the class definition
2079         easier to read. Reworked the constructors and assignment operators to handle the reference counting
2080         correctly. Added various FIXMEs and assertions. Removed some unused functions, made others private.
2081
2082         * platform/LengthBox.h: Renamed some one-letter arguments to use words instead.
2083
2084         * rendering/AutoTableLayout.cpp:
2085         (WebCore::AutoTableLayout::recalcColumn): Updated for change to Length::setValue.
2086         * rendering/FixedTableLayout.cpp:
2087         (WebCore::FixedTableLayout::calcWidthArray): Ditto.
2088
2089         * rendering/style/FillLayer.h:
2090         (WebCore::FillLayer::initialFillXPosition): Updated to not convert a double to a float at runtime.
2091         (WebCore::FillLayer::initialFillYPosition): Ditto.
2092
2093         * rendering/style/RenderStyle.cpp:
2094         (WebCore::RenderStyle::setWordSpacing): Removed a bogus FALLTHROUGH that was clearly wrong, but
2095         harmless. Updated for changes to Length.
2096
2097         * rendering/style/RenderStyle.h: Updated for name changes and to avoid converting doubles to floats
2098         at runtime.
2099
2100 2014-04-06  Brent Fulgham  <bfulgham@apple.com>
2101
2102         Honor System-Level User Preferences for Caption Display
2103         https://bugs.webkit.org/show_bug.cgi?id=131258
2104
2105         Reviewed by Eric Carlson.
2106
2107         * html/HTMLMediaElement.cpp:
2108         (WebCore::HTMLMediaElement::setSelectedTextTrack): Allow preferenced change to fully dispatch
2109         so we can properly deal with captions being turned off.
2110         (WebCore::HTMLMediaElement::captionPreferencesChanged): Use 'webkit' variant of the
2111         setWebKitClosedCaptionsVisible method so we properly adjust settings needed for the JS API call.
2112         * html/shadow/MediaControlElements.cpp:
2113         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): When captions are turned off, e.g.
2114         because the user turned off the preference, don't inadvertently turn them back on just bacause there
2115         was an existing track that was not in a 'hidden' state.
2116
2117 2014-04-06  Brian J. Burg  <burg@cs.washington.edu>
2118
2119         Web Replay: add methods to encode a frame's index based on its FrameTree position
2120         https://bugs.webkit.org/show_bug.cgi?id=131281
2121
2122         Reviewed by Timothy Hatcher.
2123
2124         Given a frame, its encoded index is computed by traversing the frame tree
2125         and saving how many nodes have been traversed to reach a given frame.
2126
2127         This is used to disambiguate frames when dispatching frame-specific event
2128         loop inputs during replay, such as timers and resource loaders.
2129
2130         * replay/SerializationMethods.cpp:
2131         (WebCore::frameIndexFromDocument): Added.
2132         (WebCore::frameIndexFromFrame): Added.
2133         (WebCore::documentFromFrameIndex): Added.
2134         (WebCore::frameFromFrameIndex): Added.
2135         * replay/SerializationMethods.h:
2136
2137 2014-04-06  Alexey Proskuryakov  <ap@apple.com>
2138
2139         iOS build fix.
2140
2141         * WebCore.exp.in: Move newly exported function to a right section of this file.
2142
2143 2014-04-06  Darin Adler  <darin@apple.com>
2144
2145         Refactor post-attach and HTMLObjectElement-related code
2146         https://bugs.webkit.org/show_bug.cgi?id=131282
2147
2148         Reviewed by Antti Koivisto.
2149
2150         * dom/ContainerNode.cpp: Moved the post-attach callback code from here to
2151         StyleResolveTree.h/cpp.
2152         * dom/ContainerNode.h: Ditto.
2153
2154         * dom/Document.cpp:
2155         (WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
2156         PostAttachCallbackDisabler.
2157
2158         * dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.
2159
2160         * html/HTMLEmbedElement.cpp:
2161         (WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
2162         it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
2163         code to trigger image loads.
2164
2165         * html/HTMLFormControlElement.cpp:
2166         (WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
2167         Style::queuePostResolutionCallback and use a lambda instead of a function.
2168         (WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
2169         of just using wishful thinking to keep the object alive.
2170         * html/HTMLFrameOwnerElement.cpp:
2171         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.
2172
2173         * html/HTMLObjectElement.cpp:
2174         (WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
2175         it into a 1-liner. Made dataAttr call setNeedsWidgetUpdate(true) unconditionally after
2176         checking carefully to see that's harmless if there is no renderer. Changed classidAttr
2177         to call setNeedsWidgetUpdate(true) unconditionally and not set m_classId.
2178         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
2179         instead of classId and descendantsOfType instead of getElementsByTagName.
2180         (WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
2181         (WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.
2182
2183         * html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
2184         attribute in a data member. Rearranged header, making more private, and fixing some typos,
2185         and doing a "using" instead of a function to disambiguate the inherited form functions.
2186
2187         * html/HTMLPlugInImageElement.cpp:
2188         (WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
2189         first child of the shadow root is guaranteed to be an element.
2190         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
2191         since m_needsDocumentActivationCallbacks can't be true if the old document was null.
2192         (WebCore::is100Percent): Added helper to make function below more readable.
2193         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
2194         bit. The part that attracted my attention was the local variable of type RenderBox, which
2195         was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
2196         is a renderer of type RenderEmbeddedObject, so depend on that.
2197
2198         * html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
2199         Marked more function members final. Made a protected imageLoader function so that
2200         m_imageLoader can be private eventually. Made m_imageLoader be std::unique_ptr.
2201
2202         * style/StyleResolveTree.cpp:
2203         (WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
2204         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
2205         (WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
2206         (WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
2207         (WebCore::Style::postResolutionCallbackQueue): Added.
2208         (WebCore::Style::queuePostResolutionCallback): Added.
2209         (WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
2210         PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
2211         of as a special case. It should not work for multiple documents across multiple pages instead of
2212         only the outermost one.
2213         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
2214         Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
2215         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
2216         (WebCore::Style::postResolutionCallbacksAreSuspended): Added.
2217
2218         * style/StyleResolveTree.h: Added queuePostResolutionCallback and
2219         postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
2220         eventually become a private implementation detail.
2221
2222 2014-04-04  Brian J. Burg  <burg@cs.washington.edu>
2223
2224         Enable WEB_REPLAY for PLATFORM(MAC)
2225         https://bugs.webkit.org/show_bug.cgi?id=130700
2226
2227         Reviewed by Timothy Hatcher.
2228
2229         Switch on WEB_REPLAY feature flag for non-production builds.
2230
2231         * Configurations/FeatureDefines.xcconfig:
2232         * replay/ReplayInputDispatchMethods.cpp: Fix the ENABLE(WEB_REPLAY) build.
2233         It was broken by the bool to enum refactoring in r166684.
2234         (WebCore::InitialNavigation::dispatch):
2235
2236 2014-04-05  Brian J. Burg  <burg@cs.washington.edu>
2237
2238         Web Inspector: remove unused test hook setInspectorResourcesDataSizeLimits
2239         https://bugs.webkit.org/show_bug.cgi?id=131268
2240
2241         Reviewed by Timothy Hatcher.
2242
2243         This was used in the old inspector frontend tests for the Network panel.
2244         It's no longer used by any tests or frontend code.
2245
2246         * WebCore.exp.in: Remove symbols.
2247         * inspector/InspectorController.cpp:
2248         (WebCore::InspectorController::setInspectorResourcesDataSizeLimits): Deleted.
2249         * inspector/InspectorController.h:
2250         * inspector/InspectorResourceAgent.cpp:
2251         (WebCore::InspectorResourceAgent::setResourcesDataSizeLimitsFromInternals): Deleted.
2252         * inspector/InspectorResourceAgent.h:
2253         * inspector/NetworkResourcesData.cpp:
2254         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits): Deleted.
2255         * inspector/NetworkResourcesData.h:
2256         * testing/Internals.cpp:
2257         (WebCore::Internals::setInspectorResourcesDataSizeLimits): Deleted.
2258         * testing/Internals.h:
2259         * testing/Internals.idl:
2260
2261 2014-04-05  Alexey Proskuryakov  <ap@apple.com>
2262
2263         REGRESSION (NetworkProcess): Subresources fail to load from AppCache
2264         https://bugs.webkit.org/show_bug.cgi?id=131262
2265         <rdar://problem/15370653>
2266
2267         Reviewed by Sam Weinig.
2268
2269         Exported ApplicationCacheHost::maybeLoadResource. Changed it to take a const
2270         reference to ResourceRequest, as appropriate for WebResourceLoadScheduler.
2271
2272         * WebCore.exp.in:
2273         * WebCore.xcodeproj/project.pbxproj:
2274         * loader/appcache/ApplicationCacheHost.cpp:
2275         (WebCore::ApplicationCacheHost::maybeLoadResource):
2276         * loader/appcache/ApplicationCacheHost.h:
2277
2278 2014-04-05  Brian J. Burg  <burg@cs.washington.edu>
2279
2280         Web Inspector: remove unused metrics and commands from the Timeline agent
2281         https://bugs.webkit.org/show_bug.cgi?id=131184
2282
2283         Reviewed by Timothy Hatcher.
2284
2285         This patch removes several instrumentation hooks that are not being
2286         used by the frontend in any way. Most of them are not hooked up to
2287         produce any data, so they just clutter up InspectorClient and the agent.
2288
2289         * WebCore.exp.in: Remove didBeginFrame/didCancelFrame.
2290         * inspector/InspectorClient.h: Remove client methods that are never overridden.
2291         (WebCore::InspectorClient::canMonitorMainThread): Deleted.
2292         (WebCore::InspectorClient::supportsFrameInstrumentation): Deleted.
2293         (WebCore::InspectorClient::getAllocatedObjects): Deleted.
2294         (WebCore::InspectorClient::dumpUncountedAllocatedObjects): Deleted.
2295
2296         * inspector/InspectorController.cpp: Remove unused instrumentation.
2297         (WebCore::InspectorController::didBeginFrame): Deleted.
2298         (WebCore::InspectorController::didCancelFrame): Deleted.
2299         (WebCore::InspectorController::didComposite): Deleted.
2300         (WebCore::InspectorController::wilComposite): Deleted.
2301         * inspector/InspectorController.h:
2302
2303         * inspector/InspectorTimelineAgent.cpp: Remove the backend's BeginFrame enum
2304         value, but keep it in the protocol for when it is reimplemented. Remove
2305         management of the current frame record, and simplify some code.
2306         (WebCore::toProtocol):
2307         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
2308         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2309         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2310         (WebCore::InspectorTimelineAgent::clearRecordStack):
2311         (WebCore::InspectorTimelineAgent::canMonitorMainThread): Deleted.
2312         (WebCore::InspectorTimelineAgent::supportsFrameInstrumentation): Deleted.
2313         (WebCore::InspectorTimelineAgent::didBeginFrame): Deleted.
2314         (WebCore::InspectorTimelineAgent::didCancelFrame): Deleted.
2315         (WebCore::InspectorTimelineAgent::didComposite): Deleted.
2316         (WebCore::InspectorTimelineAgent::wilComposite): Deleted.
2317         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): Deleted. Undo telescoping.
2318         (WebCore::usedHeapSize): Deleted.
2319         (WebCore::InspectorTimelineAgent::commitFrameRecord): Deleted.
2320         * inspector/InspectorTimelineAgent.h:
2321         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2322         * inspector/protocol/Timeline.json:
2323
2324         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Remove
2325         instrumentation hook for beginFrame. This is the only backend that implements it.
2326         (WebCore::CompositingCoordinator::syncDisplayState):
2327
2328         * testing/Internals.cpp: Remove crufty test methods that aren't used.
2329         (WebCore::Internals::emitInspectorDidBeginFrame): Deleted.
2330         (WebCore::Internals::emitInspectorDidCancelFrame): Deleted.
2331         * testing/Internals.h:
2332         * testing/Internals.idl:
2333
2334 2014-04-05  Alexey Proskuryakov  <ap@apple.com>
2335
2336         REGRESSION (r163914): Application cache cannot be used in main frame
2337         https://bugs.webkit.org/show_bug.cgi?id=131263
2338         <rdar://problem/16532063>
2339
2340         Reviewed by Sam Weinig.
2341
2342         * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
2343         Don't check main frame origin when loading into main frame, it's not a 3rd party
2344         subframe, and the URL is unrelated to the page we are loading now.
2345
2346         * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
2347         Removed the same incorrect check that was duplicated here. The only caller already
2348         checks isApplicationCacheBlockedForRequest().
2349
2350 2014-04-05  Dan Bernstein  <mitz@apple.com>
2351
2352         [Xcode] Clean up the platform/graphics group
2353         https://bugs.webkit.org/show_bug.cgi?id=131271
2354
2355         Reviewed by Eric Carlson.
2356
2357         * WebCore.xcodeproj/project.pbxproj: Created an opentype group and moved opentype file
2358         references into it. Removed duplicate file references.
2359
2360 2014-04-05  Andreas Kling  <akling@apple.com>
2361
2362         Remove unused type casting helpers for HTMLUnknownElement...
2363
2364         ...to fix the debug build.
2365
2366         * html/HTMLUnknownElement.h:
2367
2368 2014-04-05  Dirk Schulze  <krit@webkit.org>
2369
2370         Canvas strokeText and fillText with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
2371         https://bugs.webkit.org/show_bug.cgi?id=66766
2372
2373         Reviewed by Andreas Kling.
2374
2375         Use transparency layers to draw text with certain compositing modes on
2376         the canvas. This follows the Canvas specification and makes WebKit fully
2377         compatible with IE. It also makes it more compatible with Firefox, even though
2378         Firefox still has some bugs.
2379
2380         Test: fast/canvas/canvas-composite-text-alpha.html
2381
2382         * html/canvas/CanvasRenderingContext2D.cpp:
2383         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2384
2385 2014-04-05  Andreas Kling  <akling@apple.com>
2386
2387         Devirtualize isHTMLUnknownElement().
2388         <https://webkit.org/b/131269>
2389
2390         We were hitting isHTMLUnknownElement() pretty hard when marking
2391         out-of-document Nodes. (The check is part of isHTMLAudioElement()
2392         which is called by JSNodeOwner::isReachableFromOpaqueRoots().)
2393
2394         This patch uses a Node flag for the unknown element instead.
2395         I'm also adding HTMLUnknownElement.{h,idl} to the Xcode project
2396         since they were suspiciously missing.
2397
2398         Reviewed by Benjamin Poulain.
2399
2400         * WebCore.xcodeproj/project.pbxproj:
2401         * dom/Node.h:
2402         * html/HTMLElement.h:
2403         (WebCore::HTMLElement::isHTMLUnknownElement):
2404         * html/HTMLUnknownElement.h:
2405         (WebCore::toHTMLUnknownElement): Deleted.
2406
2407 2014-04-05  Dirk Schulze  <krit@webkit.org>
2408
2409         Canvas stroke and strokeRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors
2410         https://bugs.webkit.org/show_bug.cgi?id=66762
2411
2412         Reviewed by Andreas Kling.
2413
2414         For fill operations we create a new ImageBuffer to ensure that the results are composited
2415         correctly according to the Canvas spec. This patch creates a new transparency layer
2416         for stroking on certain compositing operators to archive the same. This makes WebKit's
2417         behavior interoperable with Firefox and IE as well. 
2418
2419         Test: fast/fast/canvas/canvas-composite-stroke-alpha.html
2420
2421         * html/canvas/CanvasRenderingContext2D.cpp:
2422         (WebCore::CanvasRenderingContext2D::strokeInternal):
2423         (WebCore::CanvasRenderingContext2D::strokeRect):
2424
2425 2014-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2426
2427         Use preallocated stack reference to store adjacentBacktrackingStart
2428         https://bugs.webkit.org/show_bug.cgi?id=131237
2429
2430         Reviewed by Benjamin Poulain.
2431
2432         * cssjit/SelectorCompiler.cpp:
2433         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2434         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
2435         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2436         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
2437         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
2438         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
2439         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent): Deleted.
2440         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures): Deleted.
2441         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail): Deleted.
2442         * cssjit/StackAllocator.h:
2443         (WebCore::StackAllocator::allocateUninitialized):
2444
2445 2014-04-05  Jeongeun Kim  <je_julie.kim@samsung.com>
2446
2447         bad values from HTMLImageElement x and y attributes (CSSOM-View)
2448         https://bugs.webkit.org/show_bug.cgi?id=130308
2449         
2450         Reviewed by Simon Fraser.
2451
2452         According to CSSOM-View, interface HTMLImageElement,
2453         The x attribute must return the x-coordinate.
2454         If style is not updated when x() is called, it can’t return anything.
2455         Style and layout should be done before getting value for x() and y(). 
2456
2457         Test: cssom/cssom-view-img-attributes-001.html
2458
2459         * html/HTMLImageElement.cpp:
2460         (WebCore::HTMLImageElement::x):
2461         (WebCore::HTMLImageElement::y):
2462
2463 2014-04-05  Zoltan Horvath  <zoltan@webkit.org>
2464
2465         [CSS Shapes] Remove CSSBoxType member from BasicShape and CSSBasicShape
2466         https://bugs.webkit.org/show_bug.cgi?id=129706
2467
2468         Reviewed by Andreas Kling.
2469
2470         The CSSBoxType has been moved up to ShapeValue and is no longer needed in the BasicShape classes.
2471
2472         No new tests, no behavior change.
2473
2474         * css/BasicShapeFunctions.cpp:
2475         (WebCore::valueForBasicShape):
2476         (WebCore::basicShapeForValue):
2477         * rendering/style/BasicShapes.cpp:
2478         (WebCore::BasicShape::canBlend):
2479         * rendering/style/BasicShapes.h:
2480         (WebCore::BasicShape::referenceBox): Deleted.
2481         (WebCore::BasicShape::setReferenceBox): Deleted.
2482         (WebCore::BasicShape::BasicShape): Deleted.
2483
2484 2014-04-05  Mark Rowe  <mrowe@apple.com>
2485
2486         Fix the 32-bit build after r166818.
2487
2488         * WebCore.exp.in:
2489
2490 2014-04-03  Brian J. Burg  <burg@cs.washington.edu>
2491
2492         Web Inspector: hook up probe samples to TimelineAgent's records
2493         https://bugs.webkit.org/show_bug.cgi?id=131127
2494
2495         Reviewed by Timothy Hatcher.
2496
2497         Hook up probe callbacks from ScriptDebugListener so that timeline records are
2498         created for probe samples. The record includes the probe identifier and hit count.
2499         The actual probe evaluation result is sent separately by DebuggerAgent, and
2500         can be looked up in frontend models using the identifier and hit count.
2501
2502         * inspector/InspectorTimelineAgent.cpp: Only listen to the debug server when recording.
2503         (WebCore::InspectorTimelineAgent::start):
2504         (WebCore::InspectorTimelineAgent::stop):
2505         (WebCore::InspectorTimelineAgent::breakpointActionProbe):
2506         (WebCore::toProtocol):
2507         * inspector/InspectorTimelineAgent.h:
2508         * inspector/TimelineRecordFactory.cpp:
2509         (WebCore::TimelineRecordFactory::createProbeSampleData):
2510         * inspector/TimelineRecordFactory.h:
2511         * inspector/protocol/Timeline.json: Add new enum value.
2512
2513 2014-04-04  Andreas Kling  <akling@apple.com>
2514
2515         Streamline cached wrapper lookup for Nodes in the normal world.
2516         <https://webkit.org/b/131249>
2517
2518         Inline the hot path for toJS(..., Node*) for cached wrapper lookups
2519         in the normal world. (Or really, out-of-line the cold path, since
2520         that was preventing the compiler from inlining this function.)
2521
2522         Also have JSDOMGlobalObject cache the "is normal world" flag from
2523         the DOMWrapperWorld so we can avoid the extra load.
2524
2525         Reviewed by Benjamin Poulain.
2526
2527         * WebCore.exp.in:
2528         * bindings/js/JSDOMGlobalObject.cpp:
2529         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2530         * bindings/js/JSDOMGlobalObject.h:
2531         (WebCore::JSDOMGlobalObject::worldIsNormal):
2532         * bindings/js/JSNodeCustom.cpp:
2533         (WebCore::getOutOfLineCachedWrapper):
2534         * bindings/js/JSNodeCustom.h:
2535         (WebCore::toJS):
2536
2537 2014-04-04  Brady Eidson  <beidson@apple.com>
2538
2539         Show DataDetector UI on scanned phone numbers.
2540         <rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131247
2541
2542         Reviewed by Tim Horton.
2543
2544         Gather the ranges of the scanned telephone numbers and send them up to WK2:
2545         * editing/Editor.cpp:
2546         (WebCore::Editor::respondToChangedSelection):
2547         (WebCore::Editor::scanSelectionForTelephoneNumbers):
2548         (WebCore::Editor::scanRangeForTelephoneNumbers):
2549         * editing/Editor.h:
2550
2551         Add client method to receive scanned telephone number ranges:
2552         * page/EditorClient.h:
2553         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
2554
2555         Remove unneeded placeholder UI:
2556         * rendering/InlineTextBox.cpp:
2557         (WebCore::InlineTextBox::paintDocumentMarkers):
2558         (WebCore::InlineTextBox::computeRectForReplacementMarker): Deleted.
2559         (WebCore::InlineTextBox::paintCompositionUnderline): Deleted.
2560         * rendering/InlineTextBox.h:
2561         (WebCore::InlineTextBox::expansionBehavior): Deleted.
2562
2563 2014-04-04  James Craig  <jcraig@apple.com>
2564
2565         AX: supportsARIAExpanded should always return true for a few roles: combobox, disclosure.
2566         https://bugs.webkit.org/show_bug.cgi?id=129787
2567
2568         Reviewed by Chris Fleizach.
2569
2570         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
2571
2572         * accessibility/AccessibilityObject.cpp:
2573         (WebCore::AccessibilityObject::supportsARIAExpanded):
2574
2575 2014-04-04  Andreas Kling  <akling@apple.com>
2576
2577         JSGenerateToNativeObject should use fast JSNode/JSElement casts.
2578         <https://webkit.org/b/131245>
2579
2580         Make JSGenerateToNativeObject spit out code using the fast new wrapper
2581         casts for JSNode and JSElement.
2582
2583         This avoids walking the ClassInfo chain in many core functions, e.g:
2584
2585             - Node.insertBefore()
2586             - Node.replaceChild()
2587             - Node.removeChild()
2588             - Node.appendChild()
2589             - window.getComputedStyle()
2590
2591         Reviewed by Geoff Garen.
2592
2593         * bindings/scripts/CodeGeneratorJS.pm:
2594         (GenerateImplementation):
2595
2596 2014-04-04  Zoltan Horvath  <zoltan@webkit.org>
2597
2598         [CSS Shapes] polygon y-value calc() args serialize incorrectly
2599         https://bugs.webkit.org/show_bug.cgi?id=129842
2600
2601         Reviewed by Bem Jones-Bey.
2602
2603         The code hit ASSERT(isCalculation(value)) in CSSParser::createPrimitiveNumbericValue, because
2604         CSSParser::validUnit had been called on both coordinates, which set the value for m_parsedCalculation,
2605         but only one of the coordinates was calculation value. I reordered calling valudUnit and
2606         createPrimitiveNumbericValue to be called in the correct order on the coordinates.
2607
2608         I added the new test case to parsing-test-utils.js.
2609
2610         * css/CSSParser.cpp:
2611         (WebCore::CSSParser::parseBasicShapePolygon):
2612
2613 2014-04-04  Brian J. Burg  <burg@cs.washington.edu>
2614
2615         Web Replay: capture and replay wheel events and scroll commands
2616         https://bugs.webkit.org/show_bug.cgi?id=129402
2617
2618         Reviewed by Timothy Hatcher and Simon Fraser.
2619
2620         To capture and replay scrolling, the scrolling coordinator will force synchronous 
2621         scrolling during capture and replay. If the page is capturing or replaying,
2622         ForceOnMainThread will be added to the coordinator's SynchronousScrollingReasons.
2623
2624         A callback was added to signal that replay session state have changed,
2625         and thus the synchronous scrolling reasons should be recomputed.
2626
2627         Automated replay reftests for scrolling are not included, because they will be
2628         too flaky until more nondeterminism is handled. Specifically, resource loading,
2629         initial focus/active state, and parsing are known blocking issues.
2630
2631         Test: ManualTests/inspector/replay-wheel-events.html
2632
2633         * page/scrolling/ScrollingCoordinator.cpp: Add a new callback for replay state
2634         session changes. Add ForceOnMainThread if the page's active input cursor is
2635         capturing or replaying.
2636
2637         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
2638         (WebCore::ScrollingCoordinator::replaySessionStateDidChange): Added.
2639         * page/scrolling/ScrollingCoordinator.h:
2640
2641         * platform/PlatformWheelEvent.h:
2642         * platform/ScrollTypes.h: Add explicit enum storage types so these enums can
2643         be forward-declared. This is necessary to generate enum encode/decode implementations.
2644
2645         * replay/ReplayController.cpp:
2646         (WebCore::ReplayController::setForceDeterministicSettings): If async scrolling
2647         support is available, tell the scrolling tree to behave deterministically.
2648
2649         * replay/ReplayInputDispatchMethods.cpp:
2650         (WebCore::HandleWheelEvent::dispatch): Added.
2651         (WebCore::LogicalScrollPage::dispatch): Added.
2652         (WebCore::ScrollPage::dispatch): Added.
2653         * replay/SerializationMethods.cpp: Introduce more specific macros for values
2654         deserialized to arbitraray lvalues, scalars, RefPtr, and unique_ptr. Fix existing
2655         uses of decode macros.
2656
2657         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue): Fix macro name.
2658         (JSC::EncodingTraits<KeypressCommand>::encodeValue): Fix macro name.
2659         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Fix macro name.
2660         (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Fix macro name.
2661         (JSC::PlatformWheelEventCocoa::PlatformWheelEventCocoa): Added. Encapsulate
2662         and initialize data members specific to PLATFORM(COCOA).
2663
2664         (JSC::EncodingTraits<PlatformWheelEvent>::encodeValue): Added.
2665         (JSC::EncodingTraits<PlatformWheelEvent>::decodeValue): Added.
2666         * replay/SerializationMethods.h:
2667         * replay/UserInputBridge.cpp: Fill in bridge methods to capture inputs.
2668         (WebCore::UserInputBridge::handleWheelEvent):
2669         (WebCore::UserInputBridge::scrollRecursively):
2670         (WebCore::UserInputBridge::logicalScrollRecursively):
2671         * replay/WebInputs.json: Add inputs and new enum types.
2672
2673 2014-04-04  Yusuke Suzuki  <utatane.tea@gmail.com>
2674
2675         Upgrade to SelectorFailsAllSiblings when Child selector is failed.
2676         https://bugs.webkit.org/show_bug.cgi?id=130961
2677
2678         Reviewed by Benjamin Poulain.
2679
2680         When Child selector fails, we should resume matching from the closest
2681         Descendant selector.
2682         So upgrading SelectorFailsLocally to SelectorFailsAllSibling at least
2683         to prevent unnecessary direct/indirect adjacent selectors matching.
2684
2685         * css/SelectorChecker.cpp:
2686         (WebCore::SelectorChecker::matchRecursively):
2687
2688 2014-04-04  Roger Fong  <roger_fong@apple.com>
2689
2690         Keep track of filtered active attribute/uniform indices per shader program.
2691         https://bugs.webkit.org/show_bug.cgi?id=131235.
2692
2693         Reviewed by Dean Jackson.
2694
2695         Tests: Covered by existing Khronos Conformance tests. 
2696         Will create a test to use multiple shader programs in a follow-up patch.
2697
2698         * html/canvas/WebGLProgram.cpp:
2699         (WebCore::WebGLProgram::cacheActiveAttribLocations): Use getActiveAttribImpl. We do not need to use the filtered list of attributes here.
2700         * html/canvas/WebGLRenderingContext.cpp:
2701         (WebCore::WebGLRenderingContext::getUniformLocation): Use filtered list of uniforms for uniform count.
2702         * platform/graphics/GraphicsContext3D.h: Create a map of shader programs to ActiveShaderSymbolCounts.
2703         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2704         (WebCore::GraphicsContext3D::attachShader): 
2705         When attaching or detaching a shader the shader program's active symbols list will change. Clear it so that it will be updated later.
2706         (WebCore::GraphicsContext3D::detachShader): Ditto.
2707         (WebCore::GraphicsContext3D::compileShader): No need to clear symbol counts here.
2708         (WebCore::GraphicsContext3D::getActiveAttrib): getActiveAttrib should only be able to query for attributes in the filtered list.
2709         (WebCore::GraphicsContext3D::getActiveUniform): getActiveUniform should only be able to query for uniforms in the filtered list.
2710         (WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount): Return the filtered symbol count for a shader program.
2711
2712 2014-04-04  Ion Rosca  <rosca@adobe.com>
2713
2714         [CSS Blending] Add compositing reason for isolation.
2715         https://bugs.webkit.org/show_bug.cgi?id=131153
2716
2717         Reviewed by Joseph Pecoraro.
2718
2719         There are 2 reasons involving blend modes for a layer to be composited:
2720         1) the layer has blend mode and has composited descendants: CompositingReasonBlendingWithCompositedDescendants.
2721         2) the layer has to isolate composited blending descendants: CompositingReasonIsolatesCompositedBlendingDescendants
2722
2723         Test: inspector-protocol/layers/layers-blending-compositing-reasons.html
2724
2725         * inspector/InspectorLayerTreeAgent.cpp:
2726         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2727         * inspector/protocol/LayerTree.json:
2728         * rendering/RenderLayerCompositor.cpp:
2729         (WebCore::RenderLayerCompositor::reasonsForCompositing):
2730         (WebCore::RenderLayerCompositor::logReasonsForCompositing):
2731         * rendering/RenderLayerCompositor.h: adding CompositingReasonIsolatesCompositedBlendingDescendants.
2732
2733 2014-04-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2734
2735         Use more const refs in ShapeOutsideInfo and some misc cleanup
2736         https://bugs.webkit.org/show_bug.cgi?id=131192
2737
2738         Reviewed by Dirk Schulze.
2739
2740         Use const refs for pretty much everything that can't be null. Also
2741         cleanup some code that got a bit messy when ShapeInfo was merged into
2742         ShapeOutsideInfo.
2743
2744         No new tests, no behavior change.
2745
2746         * rendering/shapes/ShapeOutsideInfo.cpp:
2747         (WebCore::ShapeOutsideInfo::shapeToRendererPoint):
2748         (WebCore::ShapeOutsideInfo::shapeToRendererSize):
2749         (WebCore::referenceBox):
2750         (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
2751         (WebCore::getShapeImageAndRect):
2752         (WebCore::ShapeOutsideInfo::computedShape):
2753         (WebCore::ShapeOutsideInfo::logicalTopOffset):
2754         (WebCore::ShapeOutsideInfo::logicalLeftOffset):
2755         * rendering/shapes/ShapeOutsideInfo.h:
2756
2757 2014-04-04  Alexey Proskuryakov  <ap@apple.com>
2758
2759         REGRESSION (r166615): Pressing return doesn’t submit search term at bing.com
2760         https://bugs.webkit.org/show_bug.cgi?id=131212
2761         <rdar://problem/16521788>
2762
2763         Reviewed by Dan Bernstein.
2764
2765         Test: fast/forms/submit-while-you-submit.html
2766
2767         Turns out that m_shouldSubmit can actually be modified in a code path where we can't
2768         directly return the result. I'm not sure if the current behavior is entirely correct
2769         (we have open bugs about submitting forms multiple times), but let's restore it to
2770         pre-r166615 state.
2771
2772         * html/HTMLFormElement.cpp:
2773         (WebCore::HTMLFormElement::HTMLFormElement):
2774         (WebCore::HTMLFormElement::prepareForSubmission):
2775         (WebCore::HTMLFormElement::submit):
2776         * html/HTMLFormElement.h:
2777
2778 2014-04-04  Martin Hock  <mhock@apple.com>
2779
2780         [Mac] Change operation queue width to NSOperationQueueDefaultMaxConcurrentOperationCount.
2781         https://bugs.webkit.org/show_bug.cgi?id=131231
2782
2783         <rdar://problem/13913483>
2784
2785         Reviewed by Brady Eidson.
2786
2787         No new tests, no behavior change.
2788
2789         * platform/network/mac/ResourceHandleMac.mm:
2790         (WebCore::operationQueueForAsyncClients):
2791
2792 2014-04-04  Hans Muller  <hmuller@adobe.com>
2793
2794         [CSS Shapes] Simplify Polygon implementation
2795         https://bugs.webkit.org/show_bug.cgi?id=130975
2796
2797         Reviewed by Andreas Kling.
2798
2799         Only floats can specify shape-outside. For polygon shape-outside values, the problem
2800         of finding the left and right exclusion edges reduces to finding the X axis
2801         limits of the polygon edges that overlap a particular layout line. This is a much
2802         simpler version of the problem that PolygonShape was originally designed for, and so
2803         the implementation can also be simplified. There's more about the new algorithm in
2804         http://hansmuller-webkit.blogspot.com/2014/03/a-simpler-algorithm-for-css-shapes.html.
2805
2806         No new tests, since functionality was only removed.
2807
2808         * platform/graphics/FloatRect.h:
2809         (WebCore::FloatRect::overlapsYRange):
2810         (WebCore::FloatRect::overlapsXRange):
2811         * rendering/shapes/PolygonShape.cpp:
2812         (WebCore::OffsetPolygonEdge::xIntercept):
2813         (WebCore::circleXIntercept):
2814         (WebCore::OffsetPolygonEdge::clippedEdgeXRange): X axis extent of the edge clipped to a vertical interval.
2815         (WebCore::clippedCircleXRange): X axis extent of a circle clipped to a vertical interval.
2816         (WebCore::PolygonShape::shapeMarginLogicalBoundingBox):
2817         (WebCore::PolygonShape::getExcludedIntervals):
2818         (WebCore::PolygonShape::buildDisplayPaths):
2819         * rendering/shapes/PolygonShape.h:
2820         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
2821         (WebCore::OffsetPolygonEdge::isWithinYRange):
2822         (WebCore::OffsetPolygonEdge::overlapsYRange):
2823         (WebCore::PolygonShape::PolygonShape):
2824         * rendering/shapes/ShapeInterval.h:
2825         (WebCore::ShapeInterval::isEmpty):
2826         (WebCore::ShapeInterval::unite):
2827
2828 2014-04-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2829
2830         [CSS Shapes] shape-margin in percentage units always computes to 0px
2831         https://bugs.webkit.org/show_bug.cgi?id=130369
2832
2833         Reviewed by Andreas Kling.
2834
2835         Make shape-margin parsing accept percentages and properly compute the
2836         length once the percentage is accepted.
2837
2838         Test: fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-percent.html
2839
2840         * css/CSSParser.cpp:
2841         (WebCore::CSSParser::parseValue):
2842         * rendering/shapes/Shape.cpp:
2843         (WebCore::Shape::createShape):
2844         (WebCore::Shape::createRasterShape):
2845         (WebCore::Shape::createBoxShape):
2846         * rendering/shapes/Shape.h:
2847         * rendering/shapes/ShapeOutsideInfo.cpp:
2848         (WebCore::ShapeOutsideInfo::computedShape):
2849
2850 2014-04-04  Zoltan Horvath  <zoltan@webkit.org>
2851
2852         [CSS Shapes] Remove outside-shape CSS value
2853         https://bugs.webkit.org/show_bug.cgi?id=131201
2854
2855         Reviewed by Bem Jones-Bey.
2856
2857         Outside-shape is not a valid CSS value anymore. This patch removes it.
2858
2859         No new tests, existing tests are removed.
2860
2861         * css/CSSComputedStyleDeclaration.cpp:
2862         (WebCore::shapePropertyValue):
2863         * css/CSSValueKeywords.in:
2864         * css/DeprecatedStyleBuilder.cpp:
2865         (WebCore::ApplyPropertyShape::applyValue):
2866         * rendering/shapes/ShapeOutsideInfo.cpp:
2867         (WebCore::ShapeOutsideInfo::computedShape):
2868         (WebCore::ShapeOutsideInfo::isEnabledFor):
2869         * rendering/style/ShapeValue.h:
2870         (WebCore::ShapeValue::createOutsideValue): Deleted.
2871
2872 2014-04-04  Dirk Schulze  <krit@webkit.org>
2873
2874         Gradient offsets are off if compositing operator != source-over
2875         https://bugs.webkit.org/show_bug.cgi?id=129791
2876
2877         Reviewed by Andreas Kling.
2878
2879         Instead of transforming the path before drawing it on the context,
2880         the whole context should be transformed. This will make the gradient
2881         map correctly to the context space.
2882
2883         Test: fast/canvas/canvas-gradient-on-compositing.html
2884
2885         * html/canvas/CanvasRenderingContext2D.cpp:
2886         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
2887
2888 2014-04-04  Zalan Bujtas  <zalan@apple.com>
2889
2890         Subpixel rendering: Move background images to device pixel boundaries.
2891         https://bugs.webkit.org/show_bug.cgi?id=131144
2892
2893         Reviewed by Simon Fraser.
2894
2895         Replace integral snapping with device pixel snapping.
2896         Background image geometry calculation uses LayoutUnits and we snap to device pixels right before painting.
2897
2898         Tests: fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html
2899                fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position.html
2900                fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position.html
2901                fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position.html
2902
2903         * platform/graphics/GraphicsLayer.h:
2904         (WebCore::GraphicsLayer::setContentsTilePhase):
2905         (WebCore::GraphicsLayer::contentsTilePhase):
2906         (WebCore::GraphicsLayer::setContentsTileSize):
2907         (WebCore::GraphicsLayer::contentsTileSize):
2908         * platform/graphics/texmap/TextureMapperLayer.cpp:
2909         (WebCore::TextureMapperLayer::setContentsTileSize):
2910         (WebCore::TextureMapperLayer::setContentsTilePhase):
2911         * platform/graphics/texmap/TextureMapperLayer.h:
2912         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2913         (WebCore::CoordinatedGraphicsLayer::setContentsTileSize):
2914         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
2915         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2916         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
2917         * rendering/RenderBox.cpp:
2918         (WebCore::RenderBox::repaintLayerRectsForImage):
2919         * rendering/RenderBoxModelObject.cpp:
2920         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2921         (WebCore::resolveWidthForRatio):
2922         (WebCore::resolveHeightForRatio):
2923         (WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio):
2924         (WebCore::resolveAgainstIntrinsicRatio):
2925         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
2926         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2927         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
2928         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
2929         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
2930         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip):
2931         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase):
2932         (WebCore::getSpace):
2933         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2934         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2935         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2936         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2937         (WebCore::applySubPixelHeuristicForTileSize): Deleted.
2938         * rendering/RenderBoxModelObject.h:
2939         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin):
2940         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin):
2941         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect):
2942         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect):
2943         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase):
2944         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase):
2945         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize):
2946         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize):
2947         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
2948         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
2949         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX):
2950         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY):
2951         * rendering/RenderLayerBacking.cpp:
2952         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2953         * rendering/shapes/ShapeOutsideInfo.cpp:
2954         (WebCore::getShapeImageAndRect):
2955
2956 2014-04-04  Brent Fulgham  <bfulgham@apple.com>
2957
2958         [Win] Unreviewed test fix (crash in debug build).
2959
2960         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2961         (WebCore::AVFWrapper::legibleOutputCallback): Correct assertion. This
2962         callback is scheduled for the caption queue, not the main queue.
2963
2964 2014-04-03  Brent Fulgham  <bfulgham@apple.com>
2965
2966         [Win] Load Media Controls js/css from bundle
2967         https://bugs.webkit.org/show_bug.cgi?id=131194
2968
2969         Reviewed by Dean Jackson.
2970
2971         * DerivedSources.cpp: Remove no-longer generated file.
2972         * DerivedSources.make: Don't generate unneeded files.
2973         * WebCore.vcxproj/WebCore.vcxproj: Don't compile unneeded files.
2974         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2975         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Copy css/js to resource
2976         * rendering/RenderThemeSafari.cpp:
2977         * rendering/RenderThemeSafari.h:
2978         * rendering/RenderThemeWin.cpp:
2979         * rendering/RenderThemeWin.h:
2980
2981 2014-04-04  Mihnea Ovidenie  <mihnea@adobe.com>
2982
2983         [CSSRegions] Region's behaviour not updated when becoming valid from invalid
2984         https://bugs.webkit.org/show_bug.cgi?id=131211
2985
2986         Reviewed by Andrei Bucur.
2987
2988         When a region becomes valid again from invalid, it was part of a dependency cycle and the dependency cycle was broken,
2989         it needs to behave like a valid region again: if it has autoheight then it should compute its height based on the
2990         named flow content, if it has region styling then it should apply the additional style to the flowed content.
2991
2992         Added a new method, updateRegionFlags, that is used to ensure that auto-height and region-styling flags
2993         are properly set in several situations. Checking the behaviour, autoheight or styling, is done only
2994         if the region is valid.
2995
2996         Tests: fast/regions/auto-size/autoheight-region-valid-from-invalid.html
2997                fast/regions/region-styling/region-withstyling-valid-from-invalid.html
2998
2999         * rendering/RenderNamedFlowFragment.cpp:
3000         (WebCore::RenderNamedFlowFragment::updateRegionFlags):
3001         (WebCore::RenderNamedFlowFragment::styleDidChange):
3002         (WebCore::RenderNamedFlowFragment::updateRegionHasAutoLogicalHeightFlag):
3003         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
3004         (WebCore::RenderNamedFlowFragment::attachRegion):
3005         (WebCore::RenderNamedFlowFragment::detachRegion):
3006         * rendering/RenderNamedFlowFragment.h:
3007         * rendering/RenderNamedFlowThread.cpp:
3008         (WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):
3009
3010 2014-04-04  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
3011
3012         [GTK][CMake] Remove FindXt.cmake.
3013         https://bugs.webkit.org/show_bug.cgi?id=131227
3014
3015         Reviewed by Anders Carlsson.
3016
3017         * PlatformGTK.cmake: Use FindX11.cmake's Xt variables instead of our own FindXt.cmake's ones.
3018
3019 2014-04-03  Andreas Kling  <akling@apple.com>
3020
3021         Fast-path for casting JS wrappers to JSElement.
3022         <https://webkit.org/b/131210>
3023
3024         Add an extended JSType for Element wrappers so we can avoid walking
3025         the ClassInfo chain in those bindings as well.
3026
3027         Generalized the code to select a casting helper in the bindings
3028         generator into a function (GetCastingHelperForThisObject.)
3029         Updated all the jsDynamicCast call sites to go through this, in case
3030         there's an optimized cast available for the desired type.
3031
3032         Reviewed by Benjamin Poulain.
3033
3034         * WebCore.xcodeproj/project.pbxproj:
3035         * bindings/js/JSDOMWrapper.h:
3036         * bindings/js/JSElementCustom.h: Added.
3037         (WebCore::jsElementCast):
3038         * bindings/js/JSNodeCustom.h:
3039         (WebCore::jsNodeCast):
3040         * bindings/scripts/CodeGeneratorJS.pm:
3041         (GenerateHeader):
3042         (GetCastingHelperForThisObject):
3043         (GenerateImplementation):
3044         * dom/Element.idl:
3045
3046 2014-04-03  Andreas Kling  <akling@apple.com>
3047
3048         Rebaseline a bindings test.
3049
3050         * bindings/scripts/test/JS/JSTestNode.h:
3051         (WebCore::JSTestNode::createStructure):
3052
3053 2014-04-03  Andreas Kling  <akling@apple.com>
3054
3055         Fast-path for casting JS wrappers to JSNode.
3056         <https://webkit.org/b/131196>
3057
3058         Add a way to quickly determine that a given JSObject is a JSNode.
3059         This lets us avoid walking the ClassInfo chain in the DOM bindings
3060         for WebCore::Node.
3061
3062         Reviewed by Mark Hahnenberg and Geoff Garen.
3063
3064         * bindings/js/JSDOMWrapper.h:
3065
3066             Added a JSNodeType constant that extends beyond JSC::JSType.
3067
3068         * bindings/js/JSNodeCustom.h:
3069         (WebCore::jsNodeCast):
3070
3071             Added. Fast cast from JSValue to JSNode.
3072
3073         * bindings/scripts/CodeGeneratorJS.pm:
3074         (GenerateHeader):
3075         (GenerateImplementation):
3076
3077             Generate code that uses jsNodeCast in Node interfaces.
3078
3079 2014-04-03  Bem Jones-Bey  <bjonesbe@adobe.com>
3080
3081         Merge ShapeInfo & ShapeOutsideInfo now that ShapeInsideInfo is no more
3082         https://bugs.webkit.org/show_bug.cgi?id=131180
3083
3084         Reviewed by Andreas Kling.
3085
3086         Now that ShapeInsideInfo is gone, having a class hiearachy and
3087         templates doesn't make any sense. As a first step to cleaning up the
3088         code, this remove ShapeInfo and puts all of its functionality into
3089         ShapeOutsideInfo.
3090
3091         No new tests, no behavior change.
3092
3093         * CMakeLists.txt:
3094         * WebCore.vcxproj/WebCore.vcxproj:
3095         * WebCore.vcxproj/WebCore.vcxproj.filters:
3096         * WebCore.xcodeproj/project.pbxproj:
3097         * rendering/shapes/ShapeInfo.cpp: Removed.
3098         * rendering/shapes/ShapeInfo.h: Removed.
3099         * rendering/shapes/ShapeOutsideInfo.cpp:
3100         (WebCore::ShapeOutsideInfo::computedShapePhysicalBoundingBox):
3101         (WebCore::ShapeOutsideInfo::shapeToRendererPoint):
3102         (WebCore::ShapeOutsideInfo::shapeToRendererSize):
3103         (WebCore::referenceBox):
3104         (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
3105         (WebCore::checkShapeImageOrigin):
3106         (WebCore::getShapeImageAndRect):
3107         (WebCore::getShapeImageMarginRect):
3108         (WebCore::ShapeOutsideInfo::computedShape):
3109         (WebCore::borderBeforeInWritingMode):
3110         (WebCore::borderAndPaddingBeforeInWritingMode):
3111         (WebCore::ShapeOutsideInfo::logicalTopOffset):
3112         (WebCore::borderStartWithStyleForWritingMode):
3113         (WebCore::borderAndPaddingStartWithStyleForWritingMode):
3114         (WebCore::ShapeOutsideInfo::logicalLeftOffset):
3115         (WebCore::ShapeOutsideInfo::computeSegmentsForLine):
3116         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
3117         (WebCore::ShapeOutsideInfo::shapeValue): Deleted.
3118         (WebCore::ShapeOutsideInfo::styleForWritingMode): Deleted.
3119         * rendering/shapes/ShapeOutsideInfo.h:
3120
3121 2014-04-03  Andreas Kling  <akling@apple.com>
3122
3123         Fix over-retain in SharedBufferCF's createCFData().
3124         <https://webkit.org/b/131139>
3125
3126         Constructing the return type (RetainPtr<CFDataRef>) will also retain
3127         the pointee, so this would end up leaking.
3128
3129         Reviewed by Anders Carlsson.
3130
3131         * platform/cf/SharedBufferCF.cpp:
3132         (WebCore::SharedBuffer::createCFData):
3133
3134 2014-04-03  Brent Fulgham  <bfulgham@apple.com>
3135
3136         [Win] Turn on ENABLE_CSS_GRID_LAYOUT
3137         https://bugs.webkit.org/show_bug.cgi?id=131147
3138
3139         Reviewed by Simon Fraser.
3140
3141         Covered by existing fast/css/getComputedStyle tests.
3142
3143         * css/CSSAllInOne.cpp: Add CSSGridLineNamesValue.cpp when building
3144         with ENABLE(CSS_GRID_LAYOUT)
3145
3146 2014-04-03  Simon Fraser  <simon.fraser@apple.com>
3147
3148         Pixelated WebView when display is changed from hiDPI to regularDPI
3149         https://bugs.webkit.org/show_bug.cgi?id=131185
3150
3151         Reviewed by Tim Horton.
3152
3153         r166309 added a short circuit in GraphicsLayerCA::updateContentsScale()
3154         when the scale didn't change. This broke layers which expected to
3155         unconditionally receive a setContentsScale(), namely the WebTiledBackingLayer
3156         which owns the TileController. WebTiledBackingLayer overrode -setContentsScale:
3157         to pass the scale down to the TileController; however, it didn't override
3158         -contentsScale, and it mucked with the scale passed in.
3159         
3160         Fix by having setting and fetching contentsScale on a WebTiledBackingLayer
3161         work as expected. Also rename the TileController functions to mirror the
3162         CALayer functions better.
3163
3164         * WebCore.exp.in:
3165         * platform/graphics/ca/GraphicsLayerCA.cpp:
3166         (WebCore::GraphicsLayerCA::updateContentsScale):
3167         * platform/graphics/ca/mac/TileController.h:
3168         * platform/graphics/ca/mac/TileController.mm:
3169         (WebCore::TileController::TileController):
3170         (WebCore::TileController::contentsScale):
3171         (WebCore::TileController::setContentsScale):
3172         (WebCore::TileController::scale): Deleted.
3173         (WebCore::TileController::setScale): Deleted.
3174         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
3175         (-[WebTiledBackingLayer setContentsScale:]):
3176         (-[WebTiledBackingLayer contentsScale]):
3177
3178 2014-04-03  Zoltan Horvath  <zoltan@webkit.org>
3179
3180         [CSS Shapes] LineSegment logicalLeft and logicalRight members should be floats
3181         https://bugs.webkit.org/show_bug.cgi?id=116160
3182
3183         Reviewed by Andreas Kling. 
3184
3185         LineSegment edges should not have been changed to LayoutUnit. These are
3186         used only as floats. I modified them back to floats. 
3187
3188         No new tests are needed, no behavior change.
3189
3190         * rendering/shapes/Shape.h:
3191
3192 2014-04-03  Dirk Schulze  <krit@webkit.org>
3193
3194         [CG] Canvas lineDashOffset does not handle negative numbers correctly
3195         https://bugs.webkit.org/show_bug.cgi?id=80560
3196
3197         Reviewed by Dean Jackson.
3198
3199         CG ignores negative dash array offsets. Check if we have a negative offset, if yes
3200         then calculate the length of the dash array and modulo the dash array offset with
3201         the dash array length.
3202
3203         Test: fast/canvas/canvas-negative-lineDashOffset.html
3204
3205         * platform/graphics/cg/GraphicsContextCG.cpp:
3206         (WebCore::GraphicsContext::setLineDash):
3207
3208 2014-04-03  David Hyatt  <hyatt@apple.com>
3209
3210         REGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html broken
3211         https://bugs.webkit.org/show_bug.cgi?id=131183
3212
3213         Reviewed by Simon Fraser.
3214
3215         Revert the loop to continue rather than breaking when an invalid block is encountered.
3216         This is what it used to do if it encountered a non-continuation block.
3217
3218         * rendering/RenderInline.cpp:
3219         (WebCore::updateStyleOfAnonymousBlockContinuations):
3220
3221 2014-04-02  Simon Fraser  <simon.fraser@apple.com>
3222
3223         Harden FilterOperation type casting
3224         https://bugs.webkit.org/show_bug.cgi?id=131142
3225
3226         Reviewed by Sam Weinig.
3227
3228         DefaultFilterOperation had an error-prone behavior where it set the base class
3229         OperationType to the type of some other filter class, but overrode isDefault(). 
3230         This made it very easy to write incorrect code that casted incorrectly based on type().
3231         
3232         Fix by making adding a DEFAULT filter operation type, and storing the represented
3233         type on DefaultFilterOperation().
3234         
3235         Also remove the OperationType argument for constructors of FilterOperations that
3236         can only be of one type, to avoid possible mistakes.
3237         
3238         Make the type cast macros a bit more normal, and use them in a few places.
3239         
3240         Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.
3241
3242         * WebCore.exp.in:
3243         * css/CSSComputedStyleDeclaration.cpp:
3244         (WebCore::ComputedStyleExtractor::valueForFilter):
3245         * css/StyleResolver.cpp:
3246         (WebCore::StyleResolver::createFilterOperations):
3247         * platform/graphics/ca/PlatformCAFilters.h:
3248         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
3249         (PlatformCAFilters::filterValueForOperation):
3250         (PlatformCAFilters::colorMatrixValueForFilter):
3251         * platform/graphics/filters/FilterOperation.cpp:
3252         (WebCore::DefaultFilterOperation::operator==):
3253         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
3254         (WebCore::ReferenceFilterOperation::operator==):
3255         (WebCore::BlurFilterOperation::operator==):
3256         (WebCore::BlurFilterOperation::blend):
3257         (WebCore::DropShadowFilterOperation::operator==):
3258         (WebCore::DropShadowFilterOperation::blend):
3259         * platform/graphics/filters/FilterOperation.h:
3260         (WebCore::FilterOperation::blend):
3261         (WebCore::FilterOperation::type):
3262         (WebCore::FilterOperation::isBasicColorMatrixFilterOperation):
3263         (WebCore::FilterOperation::isBasicComponentTransferFilterOperation):
3264         (WebCore::FilterOperation::isSameType):
3265         (WebCore::DefaultFilterOperation::create):
3266         (WebCore::DefaultFilterOperation::representedType):
3267         (WebCore::DefaultFilterOperation::DefaultFilterOperation):
3268         (WebCore::ReferenceFilterOperation::create):
3269         (WebCore::BlurFilterOperation::create):
3270         (WebCore::BlurFilterOperation::BlurFilterOperation):
3271         (WebCore::DropShadowFilterOperation::create):
3272         (WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
3273         (WebCore::FilterOperation::isDefault): Deleted.
3274         * platform/graphics/filters/FilterOperations.cpp:
3275         (WebCore::FilterOperations::outsets):
3276         * rendering/FilterEffectRenderer.cpp:
3277         (WebCore::FilterEffectRenderer::build):
3278         * rendering/RenderLayerFilterInfo.cpp:
3279         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
3280
3281 2014-04-03  Andreas Kling  <akling@apple.com>
3282
3283         Stop throwing away the Document's StyleResolver on a timer.
3284         <https://webkit.org/b/131168>
3285         <rdar://problem/15227045>
3286
3287         This was causing some unfortunate pauses when returning to idle pages
3288         after a long-ish time. There's already a mechanism in place that will
3289         throw these away if the system comes under memory pressure.
3290
3291         Reviewed by Sam Weinig.
3292
3293         * css/StyleResolver.cpp:
3294         (WebCore::StyleResolver::styleForElement):
3295         (WebCore::StyleResolver::styleForKeyframe):
3296         (WebCore::StyleResolver::pseudoStyleForElement):
3297         (WebCore::StyleResolver::styleForPage):
3298         * dom/Document.cpp:
3299         (WebCore::Document::Document):
3300         (WebCore::Document::didAccessStyleResolver): Deleted.
3301         (WebCore::Document::styleResolverThrowawayTimerFired): Deleted.
3302         * dom/Document.h:
3303
3304 2014-04-02  Simon Fraser  <simon.fraser@apple.com>
3305
3306         Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
3307         https://bugs.webkit.org/show_bug.cgi?id=131150
3308
3309         Reviewed by Beth Dakin.
3310
3311         When calling updateScrollCoordinatedLayer() under styleChanged, we haven't done
3312         layout yet so our composting layers haven't been hooked together. Don't try
3313         to add a zero nodeID to the map in this case.
3314
3315         * rendering/RenderLayerCompositor.cpp:
3316         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
3317
3318 2014-04-03  David Hyatt  <hyatt@apple.com>
3319
3320         Continuations casting issue.
3321         https://bugs.webkit.org/show_bug.cgi?id=130057
3322         <rdar://problem/16283406>
3323
3324         Reviewed by Simon Fraser.
3325
3326         The code to update relative positioned anonymous block continuations should not
3327         have assumed that all siblings were RenderBlocks. Make the code smarter and
3328         make it bail when it hits something that isn't part of the block continuation
3329         chain.
3330
3331         Added fast/block/continuation-crash.html
3332
3333         * rendering/RenderInline.cpp:
3334         (WebCore::updateStyleOfAnonymousBlockContinuations):
3335
3336 2014-04-03  Bem Jones-Bey  <bjonesbe@adobe.com>
3337
3338         [CSS Shapes] CRASH with calc() value args in inset round
3339         https://bugs.webkit.org/show_bug.cgi?id=129816
3340
3341         Reviewed by Andreas Kling.
3342
3343         The code to parse the inset rounded corners was adding the parser
3344         value arguments to a temporary CSSParserValueList. Unfortunately,
3345         CSSParserValueList expects to own the values it contains, and it frees
3346         the values it contains when the list is destroyed. This was a problem
3347         because the values are owned by the CSSParserValueList passed in to
3348         parseInsetRoundedCorners, and thus the calc's argument list would get
3349         double freed, resulting in a crash. This patch fixes this by using a
3350         Vector to hold the pointers instead.
3351
3352         Test: fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html
3353
3354         * css/CSSParser.cpp:
3355         (WebCore::CSSParser::parseInsetRoundedCorners):
3356
3357 2014-04-03  Jer Noble  <jer.noble@apple.com>
3358
3359         Leaving a streaming movie by going "Back" keeps playing the audio
3360         https://bugs.webkit.org/show_bug.cgi?id=131149
3361
3362         Reviewed by Eric Carlson.
3363
3364         When stopping a HTMLMediaElement, call userCancelledLoad() (which clears the
3365         MediaPlayer) only after calling setPausedInternal() (which pauses the MediaPlayer).
3366         Previously, and in the reverse order, the MediaPlayer would never get a chance to pause
3367         before being cleared. There is an underlying error with the QTKit media engine which
3368         is causing it to continue playing even after its last reference is released, but this
3369         does fix the symptom of playback continuing even after stopping.
3370
3371         * html/HTMLMediaElement.cpp:
3372         (WebCore::HTMLMediaElement::stop):
3373
3374 2014-04-03  Jer Noble  <jer.noble@apple.com>
3375
3376         [EME] Crash when passing a NULL initData to MediaKeys.createSession()
3377         https://bugs.webkit.org/show_bug.cgi?id=131156
3378
3379         Reviewed by Eric Carlson.
3380
3381         Update the checks at the start of createSession() to match the current spec, notably
3382         bailing early if the initData parameter is NULL or empty.
3383
3384         * Modules/encryptedmedia/MediaKeys.cpp:
3385         (WebCore::MediaKeys::createSession):
3386
3387 2014-04-03  Eric Carlson  <eric.carlson@apple.com>
3388
3389         [iOS] add missing QuickTime plug-in replacement API
3390         https://bugs.webkit.org/show_bug.cgi?id=131042
3391
3392         Reviewed by Dean Jackson.
3393
3394         Rename QuickTimePluginReplacement.cpp to QuickTimePluginReplacement.mm to make it possible
3395         to use the ObjC JSC API.
3396         * Modules/plugins/QuickTimePluginReplacement.cpp:
3397         * Modules/plugins/QuickTimePluginReplacement.h:
3398         (WebCore::QuickTimePluginReplacement::parentElement):
3399         * Modules/plugins/QuickTimePluginReplacement.idl:
3400
3401         * Modules/plugins/QuickTimePluginReplacement.js:
3402         (Replacement.prototype.timedMetadataUpdates): Implement.
3403         (Replacement.prototype.accessLog): Ditto.
3404         (Replacement.prototype.errorLog): Ditto.
3405
3406         Use the JSC ObjC API to create a JavaScript object from an array of AVMetadataItems. The
3407         JSC ObjC API supports basic NSTypes, but an AVMetadataItem can also contain NSData which 
3408         the existing plug-in returns as base-64 encoded data, so create wrappers for NSDictionary
3409         and NSArray.
3410         * Modules/plugins/QuickTimePluginReplacement.mm: Copied from Source/WebCore/Modules/plugins/QuickTimePluginReplacement.cpp.
3411         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): Disambiguate with "JSC::"
3412         (WebCore::QuickTimePluginReplacement::installReplacement): Ditto.
3413         (WebCore::jsValueWithDataInContext): Create JSValue* from NSData.
3414         (WebCore::jsValueWithArrayInContext): Create JSValue* from NSArray.
3415         (WebCore::jsValueWithDictionaryInContext): Create JSValue* from NSDictionary.
3416         (WebCore::jsValueWithValueInContext): Create JSValue* from basic NSTypes plus AVMetadataItem
3417             and NSData.
3418         (WebCore::jsValueWithAVMetadataItemInContext): Create JSValue* from AVMetadataItem.
3419         (WebCore::JSQuickTimePluginReplacement::timedMetaData): Script interface.
3420         (WebCore::JSQuickTimePluginReplacement::accessLog): Ditto.
3421         (WebCore::JSQuickTimePluginReplacement::errorLog): Ditto.
3422
3423         * WebCore.xcodeproj/project.pbxproj: QuickTimePluginReplacement.cpp -> QuickTimePluginReplacement.mm.
3424
3425         * platform/graphics/MediaPlayer.cpp:
3426         (WebCore::MediaPlayer::timedMetadata): iOS only accessor.
3427         (WebCore::MediaPlayer::accessLog): Ditto.
3428         (WebCore::MediaPlayer::errorLog): Ditto.
3429         * platform/graphics/MediaPlayer.h:
3430         * platform/graphics/MediaPlayerPrivate.h:
3431
3432         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3433         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3434         (WebCore::MediaPlayerPrivateAVFoundationObjC::timedMetadata):
3435         (WebCore::MediaPlayerPrivateAVFoundationObjC::accessLog):
3436         (WebCore::MediaPlayerPrivateAVFoundationObjC::errorLog):
3437         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
3438         (WebCore::itemKVOProperties):
3439         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3440
3441 2014-04-03  Andrei Bucur  <abucur@adobe.com>
3442
3443         [CSS Regions] Include region range information when printing the render tree