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