Commit the right fix.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-09  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Commit the right fix.
4
5         * css/CSSPrimitiveValue.cpp:
6         (WebCore::CSSPrimitiveValue::formatNumberValue):
7
8 2014-06-09  Ryosuke Niwa  <rniwa@webkit.org>
9
10         Debug build fix after r169731.
11
12         * css/CSSPrimitiveValue.cpp:
13         (WebCore::CSSPrimitiveValue::formatNumberValue):
14
15 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
16
17         Work towards having frames in the scrolling tree
18         https://bugs.webkit.org/show_bug.cgi?id=133665
19
20         Reviewed by Tim Horton.
21         
22         Optionally (based on Setting) create nodes in the scrolling tree for frames which
23         contain async-scrollable content. This will be used on iOS/WK2 to support accelerated
24         overflow-scroll in iframes. The setting allows for testing on OS X.
25         
26         The change breaks an assumption in ScrollingCoordinator/AsyncScrollingCoordinator
27         that we're always dealing with the main frame, and changes logic in RenderLayerCompositor
28         so that we can connect the scrolling tree across frame boundaries. RenderLayerCompositor
29         maintains a m_subframeScrollLayersNeedReattach flag that gets set whenever we add or remove
30         scroll-coordinated layers in the current frame. When set, after updating compositing
31         layers we walk child frames, and, if they have scrolling nodes, re-attach them to the
32         scrolling tree (which will find the new ancestor node).
33
34         Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html
35                platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html
36
37         * WebCore.exp.in:
38         * page/FrameView.cpp:
39         (WebCore::FrameView::scrollLayerID): Use the new "for role" way of getting the node ID.
40         * page/Settings.cpp:
41         * page/Settings.in: Add scrollingTreeIncludesFrames.
42         * page/scrolling/AsyncScrollingCoordinator.cpp:
43         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
44         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Only set
45         the region for the main frame.
46         (WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode): updateScrollPositionAfterAsyncScroll()
47         needs to know which FrameView a given nodeID is hosted in; doing a walk of the frame tree for
48         non-main frames seems to be the safest way.
49         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
50         (WebCore::AsyncScrollingCoordinator::syncChildPositions):
51         * page/scrolling/AsyncScrollingCoordinator.h:
52         * page/scrolling/ScrollingCoordinator.cpp:
53         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): Consult the new setting.
54         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
55         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
56         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
57         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
58         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
59         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
60         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
61         (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
62         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
63         * page/scrolling/ScrollingCoordinator.h:
64         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously): Deleted.
65         * rendering/RenderLayerBacking.h: Rather than separate functions to get the two scrolling
66         node IDs, having one scrollingNodeIDForRole() makes calling code cleaner.
67         * rendering/RenderLayerCompositor.cpp:
68         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
69         (WebCore::RenderLayerCompositor::updateCompositingLayers):  call reattachSubframeScrollLayers()
70         after a compositing tree update.
71         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer): Deals with the various configurations
72         in which we can do async scrolling of sticky elements.
73         (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer):
74         (WebCore::useCoordinatedScrollingForLayer):
75         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
76         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): Moved.
77         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This is a bug fix;
78         we only need to notify child frames, not all descendant frames.
79         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
80         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
81         (WebCore::enclosingScrollingNodeID):
82         (WebCore::scrollCoordinatedAncestorInParentOfFrame):
83         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
84         (WebCore::RenderLayerCompositor::attachScrollingNode):
85         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
86         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
87         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
88         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
89         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
90         (WebCore::isStickyInAcceleratedScrollingLayerOrViewport): Deleted.
91         (WebCore::isViewportConstrainedFixedOrStickyLayer): Deleted.
92         (WebCore::isMainFrameScrollingOrOverflowScrolling): Deleted.
93         (WebCore::nearestScrollCoordinatedAncestor): Deleted.
94         * rendering/RenderLayerCompositor.h:
95         * rendering/RenderView.cpp:
96         (WebCore::RenderView::setSelection): Added comment.
97         * testing/InternalSettings.cpp:
98         (WebCore::InternalSettings::setScrollingTreeIncludesFrames):
99         * testing/InternalSettings.h: Removed some useless parameter names.
100         * testing/InternalSettings.idl: Added setScrollingTreeIncludesFrames() setting.
101
102 2014-06-09  Benjamin Poulain  <bpoulain@apple.com>
103
104         Improve CSSPrimitiveValue::customCSSText for ARMv7
105         https://bugs.webkit.org/show_bug.cgi?id=133597
106
107         Reviewed by Andreas Kling.
108
109         On imgur, some script is updating some layout on timers and on scroll.
110
111         It looks like CSSPrimitiveValue::customCSSText() is a little constrained
112         by the instruction cache on ARMv7. This patch improve the situation a bit.
113
114         First, the creation of the string itself is changed to go from two allocation to one.
115         Previously, we would allocate a StringBuffer and adopt it. Now we allocate a StringImpl
116         directly with the inline buffer.
117
118         The second issue is that the compiler was generating a real copy constructor for every
119         assignment of the "text" variable (likely because the variable span is so large).
120         This was solved by moving the string creating into a separate function (to fix the span)
121         and being careful with passing PassRef<StringImpl> around.
122
123         Then there was the problem that the compiler was a little too aggressive with inlining
124         which caused each "case" to repeat the same prologue and epilogue before formatValue().
125         This was solved by adding formatNumberValue() with NEVER_INLINE to have the prologue/epilogue
126         in a single place.
127
128         On older device, that's about 3% improvement on style access. On modern ARM64/x86_64
129         there is no noticeable difference.
130
131         * css/CSSPrimitiveValue.cpp:
132         (WebCore::CSSPrimitiveValue::formatNumberValue):
133         (WebCore::CSSPrimitiveValue::formatNumberForcustomCSSText):
134         (WebCore::CSSPrimitiveValue::customCSSText):
135         (WebCore::formatNumber): Deleted.
136         * css/CSSPrimitiveValue.h:
137
138 2014-06-09  Alex Christensen  <achristensen@webkit.org>
139
140         [iOS WebGL] Fix EXT_shader_texture_lod.
141         https://bugs.webkit.org/show_bug.cgi?id=133633
142
143         Reviewed by Brady Eidson.
144
145         Covered by the Khronos test (and in LayoutTests):
146         conformance/extensions/ext-shader-texture-lod.html
147
148         * html/canvas/WebGLRenderingContext.cpp:
149         (WebCore::WebGLRenderingContext::getExtension):
150         (WebCore::WebGLRenderingContext::getSupportedExtensions):
151         Added shader texture lod name to match value from glGetString(GL_EXTENSIONS) on iOS.
152
153 2014-06-09  Benjamin Poulain  <bpoulain@apple.com>
154
155         Document::updateStyleIfNeededForNode can get very expensive
156         https://bugs.webkit.org/show_bug.cgi?id=133599
157
158         Reviewed by Andreas Kling.
159
160         When pages are querying their style, we first run through
161         Document::updateStyleIfNeededForNode() to find if that particular node needs style recalc.
162
163         The problem was that updateStyleIfNeededForNode() could get really expensive. For each node,
164         it needs to check the whole parent chain to find if any needs style recalc.
165         When web pages get a bunch of nodes and querying their style, we ended up going over a lot
166         of nodes just to find there is nothing to do.
167
168         This patch adds two tweaks to reduce the problem:
169         First, before querying nodeOrItsAncestorNeedsStyleRecalc() we check if the Document is dirty at all.
170         The other part is making nodeOrItsAncestorNeedsStyleRecalc() faster by removing useless elements check.
171
172         * dom/Document.cpp:
173         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
174         (WebCore::Document::updateStyleIfNeededForNode):
175
176 2014-06-09  Enrica Casucci  <enrica@apple.com>
177
178         iOS WebKit: Crash in charactersAroundPosition.
179         https://bugs.webkit.org/show_bug.cgi?id=133659
180         <rdar://problem/17220870>
181
182         Reviewed by Benjamin Poulain.
183
184         Ensure that we stay within the vector boundaries
185         when returning the characters around the position.
186
187         * editing/VisibleUnits.cpp:
188         (WebCore::charactersAroundPosition):
189
190 2014-06-09  Alexey Proskuryakov  <ap@apple.com>
191
192         Properly reset UStringSearch object in SearchBuffer constructor.
193         https://bugs.webkit.org/show_bug.cgi?id=133662
194         <rdar://problem/17240136>
195
196         Reviewed by Tim Horton.
197
198         * editing/TextIterator.cpp: (WebCore::SearchBuffer::~SearchBuffer):
199
200 2014-06-09  Eric Carlson  <eric.carlson@apple.com>
201
202         Automatic text track selection can select more than one track
203         https://bugs.webkit.org/show_bug.cgi?id=133590
204
205         Reviewed by Brent Fulgham.
206
207         Test: media/video-trackmenu-selection.html
208
209         * html/HTMLMediaElement.cpp:
210         (WebCore::HTMLMediaElement::configureTextTrack): Consider the currently selected
211             track, if any.
212
213         * page/CaptionUserPreferencesMediaAF.cpp:
214         (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Drive-by change
215             to make sure no non-visible text tracks are included in the track menu.
216
217 2014-06-09  Jer Noble  <jer.noble@apple.com>
218
219         [Mac] Hang when painting media before compositing mode activated
220         https://bugs.webkit.org/show_bug.cgi?id=133655
221
222         Reviewed by Eric Carlson.
223
224         When asked to paint(), MediaPlayerPrivateAVFoundationObjC should not create an image generator
225         or a video output. These operations are synchronous, and will block the drawing thread and cause
226         a spin. paint() as opposed to paintImageInContext() is only called when painting the layer tree
227         and MediaPlayerPrivateAVFoundationObjC will paint by creating a AVPlayerLayer, not by painting
228         frames directly into the tree.
229
230         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
231         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
232
233 2014-06-09  Jer Noble  <jer.noble@apple.com>
234
235         [Mac][MSE] Exception thrown from ~MediaPlayerPrivateMediaSourceAVFObjC().
236         https://bugs.webkit.org/show_bug.cgi?id=133656
237
238         Reviewed by Eric Carlson.
239
240         AVSampleBufferRenderSynchronizer can't handle being passed a NULL observer, so only attempt
241         to remove the time jumped or duration observer if one was actually created.
242
243         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
244         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
245
246 2014-06-09  Zalan Bujtas  <zalan@apple.com>
247
248         Subpixel rendering: Pixelsnapping empty rounded rect results in NaN radii width/height.
249         https://bugs.webkit.org/show_bug.cgi?id=133654
250
251         Reviewed by Simon Fraser.
252
253         Empty rounded rects don't need snapping.
254
255         Not testable.
256
257         * platform/graphics/RoundedRect.cpp:
258         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
259
260 2014-05-21  Myles C. Maxfield  <mmaxfield@apple.com>
261
262         REGRESSION: missing underline under CJK text
263         https://bugs.webkit.org/show_bug.cgi?id=128145
264
265         Reviewed by Darin Adler.
266
267         This patch refactors the GlyphToPathTranslator which is used to find intersections of
268         glyphs and underlines. It was modified to allow for querying these pieces of
269         information:
270         1) The extents of the glyph. This can be used to make the underlines skip an entire
271         glyph, wholesale
272         2) What kind of skipping behavior should be used
273         3) The Path which represents the glyph
274         There are three skipping behaviors:
275         1) (SkipDescenders) The previous behavior
276         2) (SkipGlyph) Make the underline skip over the entire glyph, using the extents() function
277         3) (DrawOverGlyph) Make the underline plow through the glyph, ignoring any descenders
278
279         Calculating which underlining behavior to use depends on what the base codepoint that
280         originated that glyph is. This means that we have to map from glyphs to characters,
281         something which is nontrivial to do. In order to solve this problem, this patch adds
282         an optional vector to GlyphBuffer which represents the location in the original string
283         from which a particular glyph originated. Then, when our WidthIterator code adds
284         glyphs to the GlyphBuffer, we can include the extra information about where we are
285         in the input string. Once this data is available, the GlyphPathTranslator can look up
286         the base codepoint from which this glyph originates, and can run ICU functions on that
287         codepoint.
288
289         We can use the ICU ublock_getCode() function to find which Unicode block a particular
290         codepoint comes from. If the codepoint comes from a CJK block, we will use
291         DrawOverGlyph; otherwise, we will use SkipDescenders.
292
293         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-cjk.html
294
295         * platform/graphics/Font.cpp:
296         (WebCore::sharedUnderlineType): Look up the base codepoint from which this glyph
297         originates, call ublock_getCode to get its Unicode block, then return
298         a GlyphUnderlineType accordingly. This code is shared between SVG and non-SVG.
299         * platform/graphics/Font.h: New virtual functions in GlyphToPathTranslator, as well as
300         function signatures for the above two functions.
301         * platform/graphics/GlyphBuffer.h: Add an optional instance member for the location
302         from within the original string from which a particular glyph originates.
303         (WebCore::GlyphBuffer::clear): Updated for new member.
304         (WebCore::GlyphBuffer::add): Ditto.
305         (WebCore::GlyphBuffer::saveOffsetsInString): Opt-in to using the new variable
306         (WebCore::GlyphBuffer::offsetInString): New variable accessor.
307         * platform/graphics/TextRun.h: SVG needs the TextRun to use sharedUnderlineType.
308         * platform/graphics/WidthIterator.cpp:
309         (WebCore::WidthIterator::advanceInternal): Use GlyphBuffer's new variable (if present).
310         * platform/graphics/mac/ComplexTextController.cpp:
311         (WebCore::ComplexTextController::advance): Use GlyphBuffer's new variable (if present).
312         * platform/graphics/mac/FontMac.mm: Implement new GlyphToPathTranslator functions.
313         (WebCore::MacGlyphToPathTranslator::path):
314         (WebCore::MacGlyphToPathTranslator::extents):
315         (WebCore::MacGlyphToPathTranslator::underlineType): Calls sharedUnderlineType().
316         (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
317         (WebCore::MacGlyphToPathTranslator::increment):
318         (WebCore::Font::dashesForIntersectionsWithRect): Ask the translator what kind of underline
319         behavior should be used. React accordingly.
320         (WebCore::MacGlyphToPathTranslator::nextPath): Deleted.
321         (WebCore::MacGlyphToPathTranslator::incrementIndex): Deleted.
322         * platform/graphics/win/UniscribeController.cpp:
323         (WebCore::UniscribeController::shapeAndPlaceItem): Update to new signature of GlyphBuffer::add()
324         * rendering/svg/SVGTextRunRenderingContext.cpp: Implement new GlyphToPathTranslator functions.
325         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
326         (WebCore::SVGGlyphToPathTranslator::getCurrentTransform):
327         (WebCore::SVGGlyphToPathTranslator::path):
328         (WebCore::SVGGlyphToPathTranslator::extents):
329         (WebCore::MacGlyphToPathTranslator::underlineType): Calls sharedUnderlineType().
330         (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
331         (WebCore::SVGGlyphToPathTranslator::increment):
332         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
333         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
334         (WebCore::SVGGlyphToPathTranslator::nextPath): Deleted.
335         (WebCore::SVGGlyphToPathTranslator::incrementIndex): Deleted.
336         * rendering/svg/SVGTextRunRenderingContext.h: SVG needs the TextRun to use sharedUnderlineType.
337
338 2014-06-09  Alex Christensen  <achristensen@webkit.org>
339
340         [iOS WebGL] Implement OES_vertex_array_object for iOS.
341         https://bugs.webkit.org/show_bug.cgi?id=133629
342
343         Reviewed by Brady Eidson.
344
345         Covered by the Khronos test (and in LayoutTests):
346         conformance/extensions/oes-vertex-array-object.html
347
348         * platform/graphics/ios/GraphicsContext3DIOS.h:
349         Added OpenGL vertex array function renaming for iOS adding the OES suffix.
350         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
351         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
352         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
353         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
354         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
355         Added isVertexArrayObjectSupported and support for iOS.
356         (WebCore::Extensions3DOpenGL::supportsExtension):
357         Added iOS name for GL_OES_vertex_array_object extension.
358         * platform/graphics/opengl/Extensions3DOpenGL.h:
359         Added isVertexArrayObjectSupported for iOS.        
360
361 2014-06-09  Eric Carlson  <eric.carlson@apple.com>
362
363         [Mac] caption size is not update immediately when system preferences change
364         https://bugs.webkit.org/show_bug.cgi?id=133598
365
366         Reviewed by Brent Fulgham.
367
368         * Modules/mediacontrols/MediaControlsHost.cpp:
369         (WebCore::MediaControlsHost::updateCaptionDisplaySizes): New.
370         * Modules/mediacontrols/MediaControlsHost.h:
371
372         * html/HTMLMediaElement.cpp:
373         (WebCore::HTMLMediaElement::captionPreferencesChanged): Tell the controls host to update sizes.
374
375 2014-06-09  Daniel Bates  <dabates@apple.com>
376
377         [iOS] Amazon app: Cannot interact with product page after tapping on product image
378         https://bugs.webkit.org/show_bug.cgi?id=133559
379         <rdar://problem/16332749>
380
381         Reviewed by Oliver Hunt.
382
383         As a workaround for issues in the Amazon app, mark the attribute navigator.geolocation as
384         replaceable so that we don't throw a JavaScript type error when assigning to an instance
385         attribute that shadows it. At the time of writing the first such assignment to is ignored.
386         See <https://bugs.webkit.org/show_bug.cgi?id=133648> for more details.
387
388         When loading a product page in the Amazon app it overwrites the readonly property geolocation
389         on an object that extends the Navigator object. In strict mode, this operation is not honored
390         and is treated as a JavaScript type error, which stops JavaScript execution. Therefore, the
391         product page does not behave as intended. In contrast, this operation would not be honored in
392         non-strict mode and would not be treated as a JavaScript type error.
393
394         Test: js/dom/shadow-navigator-geolocation-in-strict-mode-does-not-throw.html
395
396         * Modules/geolocation/NavigatorGeolocation.idl:
397
398 2014-06-09  Andreas Kling  <akling@apple.com>
399
400         HTML*ListElement wrappers have custom getOwnPropertySlot()s for no good reason.
401         <https://webkit.org/b/133653>
402
403         The JavaScript bindings generator was a bit overzealous in forcing every
404         interface with "List" in the name to have its attributes on the instance.
405         This caused some elements (HTMLUListElement, etc.) to automatically opt out
406         of eager prototype attribute reification.
407
408         Reviewed by Mark Hahnenberg.
409
410         * bindings/scripts/CodeGeneratorJS.pm:
411         (InterfaceRequiresAttributesOnInstance):
412
413 2014-06-09  Jer Noble  <jer.noble@apple.com>
414
415         ASSERT(!m_inRemovedLastRefFunction) in Element::addShadowRoot while destroying a document
416         https://bugs.webkit.org/show_bug.cgi?id=133450
417
418         Reviewed by Eric Carlson.
419
420         ensureUserAgentShadowRoot() is being called when a media element is removed from its document
421         in HTMLMediaElement::removedFrom() because Node::removedFrom() has not yet run and removed the
422         InDocument flag from the node.  Rather than calling configureMediaControls() at this point
423         just expilictly remove the media controls if present.
424
425         * html/HTMLMediaElement.cpp:
426         (WebCore::HTMLMediaElement::parseAttribute):
427
428 2014-06-09  Mark Hahnenberg  <mhahnenberg@apple.com>
429
430         Rebaseline bindings tests after r169703
431
432         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
433         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
434         (WebCore::JSTestActiveDOMObjectPrototype::getOwnPropertySlot): Deleted.
435         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
436         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
437         (WebCore::JSTestCustomNamedGetterPrototype::finishCreation):
438         (WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertySlot): Deleted.
439         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
440         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
441         (WebCore::JSTestEventConstructorPrototype::finishCreation):
442         (WebCore::JSTestEventConstructorPrototype::getOwnPropertySlot): Deleted.
443         (WebCore::JSTestEventConstructor::getOwnPropertySlot): Deleted.
444         * bindings/scripts/test/JS/JSTestEventConstructor.h:
445         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
446         (WebCore::JSTestEventTargetPrototype::finishCreation):
447         (WebCore::JSTestEventTargetPrototype::getOwnPropertySlot): Deleted.
448         * bindings/scripts/test/JS/JSTestEventTarget.h:
449         * bindings/scripts/test/JS/JSTestException.cpp:
450         (WebCore::JSTestExceptionPrototype::finishCreation):
451         (WebCore::JSTestExceptionPrototype::getOwnPropertySlot): Deleted.
452         * bindings/scripts/test/JS/JSTestException.h:
453         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
454         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
455         (WebCore::JSTestGenerateIsReachablePrototype::getOwnPropertySlot): Deleted.
456         (WebCore::JSTestGenerateIsReachable::getOwnPropertySlot): Deleted.
457         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
458         * bindings/scripts/test/JS/JSTestInterface.cpp:
459         (WebCore::JSTestInterfacePrototype::finishCreation):
460         (WebCore::JSTestInterfacePrototype::getOwnPropertySlot): Deleted.
461         * bindings/scripts/test/JS/JSTestInterface.h:
462         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
463         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
464         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot): Deleted.
465         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot): Deleted.
466         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
467         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
468         (WebCore::JSTestNamedConstructorPrototype::finishCreation):
469         (WebCore::JSTestNamedConstructorPrototype::getOwnPropertySlot): Deleted.
470         (WebCore::JSTestNamedConstructor::getOwnPropertySlot): Deleted.
471         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
472         * bindings/scripts/test/JS/JSTestNode.cpp:
473         (WebCore::JSTestNodePrototype::finishCreation):
474         (WebCore::JSTestNodePrototype::getOwnPropertySlot): Deleted.
475         (WebCore::JSTestNode::getOwnPropertySlot): Deleted.
476         * bindings/scripts/test/JS/JSTestNode.h:
477         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
478         (WebCore::JSTestNondeterministicPrototype::finishCreation):
479         (WebCore::JSTestNondeterministicPrototype::getOwnPropertySlot): Deleted.
480         (WebCore::JSTestNondeterministic::getOwnPropertySlot): Deleted.
481         * bindings/scripts/test/JS/JSTestNondeterministic.h:
482         * bindings/scripts/test/JS/JSTestObj.cpp:
483         (WebCore::JSTestObjPrototype::finishCreation):
484         (WebCore::JSTestObjPrototype::getOwnPropertySlot): Deleted.
485         * bindings/scripts/test/JS/JSTestObj.h:
486         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
487         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
488         (WebCore::JSTestOverloadedConstructorsPrototype::getOwnPropertySlot): Deleted.
489         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot): Deleted.
490         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
491         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
492         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
493         (WebCore::JSTestSerializedScriptValueInterfacePrototype::getOwnPropertySlot): Deleted.
494         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot): Deleted.
495         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
496         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
497         (WebCore::JSTestTypedefsPrototype::finishCreation):
498         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot): Deleted.
499         * bindings/scripts/test/JS/JSTestTypedefs.h:
500         * bindings/scripts/test/JS/JSattribute.cpp:
501         (WebCore::JSattributePrototype::finishCreation):
502         (WebCore::JSattributePrototype::getOwnPropertySlot): Deleted.
503         (WebCore::JSattribute::getOwnPropertySlot): Deleted.
504         * bindings/scripts/test/JS/JSattribute.h:
505         * bindings/scripts/test/JS/JSreadonly.cpp:
506         (WebCore::JSreadonlyPrototype::finishCreation):
507         (WebCore::JSreadonlyPrototype::getOwnPropertySlot): Deleted.
508         (WebCore::JSreadonly::getOwnPropertySlot): Deleted.
509         * bindings/scripts/test/JS/JSreadonly.h:
510
511 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
512
513         Group the methods in InternalSettings.idl
514         https://bugs.webkit.org/show_bug.cgi?id=133652
515
516         Reviewed by Tim Horton.
517
518         Group methods by topic.
519
520         * testing/InternalSettings.idl:
521
522 2014-06-05  Mark Hahnenberg  <mhahnenberg@apple.com>
523
524         Eagerly reify DOM prototype attributes
525         https://bugs.webkit.org/show_bug.cgi?id=133558
526
527         Reviewed by Oliver Hunt.
528
529         No new tests.
530
531         This allows us to get rid of a lot of the additional overhead of pushing DOM attributes up into the prototype. 
532         By eagerly reifying the custom getters and setters into the actual JSObject we avoid having to override 
533         getOwnPropertySlot for all of the DOM prototypes, which is a lot of the overhead of doing property lookups on 
534         DOM wrappers.
535
536         * bindings/scripts/CodeGeneratorJS.pm:
537         (prototypeHashTableAccessor): Changed to pass along the VM.
538         (AttributeShouldBeOnInstanceForCompatibility): We were being overly conservative in regard to touch events. 
539         This caused us to store the touch event handler getters and setters on the JSElement instance, which caused
540         us to override getOwnPropertySlot for every JSElement subclass.
541         (InstanceOverridesGetOwnPropertySlot): This was being overly paranoid about generate a getOwnPropertySlot if
542         there was going to be a "constructor" property, even though we handled this in another place already.
543         (GenerateHeader): Generate a finishCreation for prototypes unless it's the JSDOMWindow. We can't correctly 
544         handle the DOMWindow in this version of the patch because reifying the static properties requires a global object,
545         which hasn't been created yet when the prototype for the window object is being created.
546         (GenerateImplementation): Generate the finishCreation calls to reifyStaticProperties.
547
548 2014-06-09  Alexey Proskuryakov  <ap@apple.com>
549
550         REGRESSION (r169681): Three tests are broken
551         https://bugs.webkit.org/show_bug.cgi?id=133646
552
553         Reviewed by Tim Horton.
554
555         r169681 removed platformFocusRingMaxWidth() override, which returned either 0 or 9
556         on Mac. But the cross-platform default is 3, so this changed Mac behavior.
557
558         I'm not entirely sure why the cross-platform default is 3 (it was also added in r168397),
559         but restoring the override to return 0 fixes test cases.
560
561         While at it, also added final/override, and removed some functions that were only
562         needed by subclasses, which we now have none.
563
564         * rendering/RenderThemeMac.h:
565         (WebCore::RenderThemeMac::supportsControlTints): Deleted.
566         (WebCore::RenderThemeMac::scrollbarControlSizeForPart): Deleted.
567         (WebCore::RenderThemeMac::supportsSelectionForegroundColors): Deleted.
568         (WebCore::RenderThemeMac::supportsClosedCaptioning): Deleted.
569         (WebCore::RenderThemeMac::updateActiveState): Deleted.
570         * rendering/RenderThemeMac.mm:
571         (WebCore::RenderThemeMac::platformFocusRingMaxWidth):
572         (WebCore::RenderThemeMac::setPopupButtonCellState):
573         (WebCore::RenderThemeMac::paintSliderThumb):
574         (WebCore::RenderThemeMac::setSearchCellState):
575         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
576         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
577         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
578
579 2014-06-09  Bem Jones-Bey  <bjonesbe@adobe.com>
580
581         [CSS Shapes] Bound RasterShapeInterval size to int
582         https://bugs.webkit.org/show_bug.cgi?id=133576
583
584         Reviewed by Simon Fraser.
585
586         Everything in the code assumes that the interval size will always fit
587         in an int. However, to make sure there are no negatives, the
588         RasterShapeInterval constructor takes an unsigned. This clamps that
589         value to make sure we can't overflow an int later.
590
591         * rendering/shapes/RasterShape.h:
592         (WebCore::RasterShapeIntervals::RasterShapeIntervals):
593
594 2014-06-09  Zalan Bujtas  <zalan@apple.com>
595
596         [iOS] Gaps below and to the right of the video controls on devour.com
597         https://bugs.webkit.org/show_bug.cgi?id=133607
598
599         Reviewed by Simon Fraser.
600
601         Non-toplevel compositing layers are device pixel aligned. In order to render the content
602         to the same position as if the layer was not aligned, the graphics layer needs to be translated.
603         CALayer::bounds is set to compensate for the shifted layer. However, we should not change the layer's
604         size as that stretches the content and results in overlaps/gaps/extra fuzziness.
605
606         Test: compositing/contents-scale/hidpi-compositing-layer-positioned-on-scaled-context.html
607
608         * platform/graphics/ca/GraphicsLayerCA.cpp:
609         (WebCore::GraphicsLayerCA::updateGeometry):
610         (WebCore::GraphicsLayerCA::computePixelAlignment): remove old epsilon adjustment code.
611         * platform/graphics/ca/GraphicsLayerCA.h:
612
613 2014-06-09  Zalan Bujtas  <zalan@apple.com>
614
615         [SVG] Subpixel rendering: Mask with transformed text does not render.
616         https://bugs.webkit.org/show_bug.cgi?id=133626
617         <rdar://problem/17123070>
618
619         Reviewed by Simon Fraser.
620
621         Replace IntRect::infiniteRect() with Layout::infiniteRect(). A transformed IntRect::infiniteRect()
622         overflows and produces invalid repaint rect. -also remove IntRect::infiniteRect() as no one calls
623         it anymore.
624
625         Tests: svg/masking/mask-transformed-text-missing-expected.svg
626                svg/masking/mask-transformed-text-missing.svg
627
628         * platform/graphics/IntRect.h:
629         (WebCore::IntRect::infiniteRect): Deleted.
630         * rendering/svg/SVGRenderingContext.cpp:
631         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
632
633 2014-06-08  Dean Jackson  <dino@apple.com>
634
635         [Mac] checkboxes and radio buttons animate incorrectly
636         https://bugs.webkit.org/show_bug.cgi?id=133619
637         <rdar://problem/16478676>
638
639         Reviewed by Sam Weinig.
640
641         As many people have noticed, the new checkboxes and radio
642         buttons jump around during their animation. To fix this
643         I've added yet another magic set of numbers to our
644         native form positioning - this time the placement
645         of the controls when rendering on the animated path.
646         This is quite annoying, since there doesn't appear
647         to be any pattern to the offsets (or margins) given
648         a control size, and this case also needed a sub-pixel
649         offset to display correctly on retina machines.
650
651         * platform/mac/ThemeMac.mm:
652         (WebCore::checkboxMargins): Add comment so I know what the values mean.
653         (WebCore::checkboxOffsets): Add the magic translation values for animated states.
654         (WebCore::radioMargins): Ditto.
655         (WebCore::radioOffsets):
656         (WebCore::paintToggleButton): Paint with these new offsets.
657
658 2014-06-07  Dean Jackson  <dino@apple.com>
659
660         Regression r168397 - Form layout is incorrect on OS X Yosemite
661         https://bugs.webkit.org/show_bug.cgi?id=133612
662         <rdar://problem/16850492>
663         <rdar://problem/17016914>
664
665         Reviewed by Anders Carlson.
666
667         Revision 168397 introduced a new animated style of form controls. Part of
668         it included extending the margins for the controls to take into account the
669         focus ring that animates in from a large radius to a small radius. This
670         caused two problems:
671
672         - the incorrect margins broke many layouts
673         - despite increased margins, there were still some areas
674           that did not repaint correctly.
675
676         Restore the old margins and (temporarily) turn off focus ring animation.
677         Bad layout is much worse than a missing animation. Another benefit
678         of this is that we will use less memory.
679
680         * platform/graphics/mac/GraphicsContextMac.mm:
681         (WebCore::drawFocusRingToContextAtTime): Pass in a time far far far in the future to
682         get the static rendering.
683         * platform/mac/ThemeMac.mm:
684         (WebCore::checkboxMargins): Restore correct margins.
685         (WebCore::radioMargins): Ditto.
686         (WebCore::drawCellFocusRing): New method that calls WKSI with a future time.
687         (WebCore::paintToggleButton): Call the new wrapper.
688         (WebCore::buttonMargins): Restore correct margins.
689         (WebCore::paintButton): Call the new wrapper.
690         * rendering/RenderThemeMac.h:
691         * rendering/RenderThemeMac.mm:
692         (WebCore::RenderThemeMac::paintMenuList): Use a future time.
693         (WebCore::RenderThemeMac::platformFocusRingMaxWidth): Deleted. Use old outline value.
694
695 2014-05-29  Anders Carlsson  <andersca@apple.com>
696
697         HTTPHeaderMap should not derive from HashMap
698         https://bugs.webkit.org/show_bug.cgi?id=133392
699
700         Reviewed by Darin Adler.
701
702         Use a HashMap member variable instead.
703
704         * WebCore.exp.in:
705         * loader/DocumentLoader.cpp:
706         (WebCore::DocumentLoader::responseReceived):
707         * platform/network/HTTPHeaderMap.cpp:
708         (WebCore::HTTPHeaderMap::copyData):
709         (WebCore::HTTPHeaderMap::adopt):
710         (WebCore::HTTPHeaderMap::get):
711         (WebCore::HTTPHeaderMap::set):
712         (WebCore::HTTPHeaderMap::add):
713         (WebCore::HTTPHeaderMap::contains):
714         (WebCore::HTTPHeaderMap::find):
715         (WebCore::HTTPHeaderMap::remove):
716         (WebCore::HTTPHeaderMap::keys):
717         * platform/network/HTTPHeaderMap.h:
718         (WebCore::HTTPHeaderMap::isEmpty):
719         (WebCore::HTTPHeaderMap::size):
720         (WebCore::HTTPHeaderMap::clear):
721         (WebCore::HTTPHeaderMap::begin):
722         (WebCore::HTTPHeaderMap::end):
723         (WebCore::HTTPHeaderMap::operator==):
724         (WebCore::HTTPHeaderMap::operator!=):
725         * platform/network/ResourceRequestBase.cpp:
726         (WebCore::ResourceRequestBase::adopt):
727         * platform/network/ResourceRequestBase.h:
728         * platform/network/ResourceResponseBase.cpp:
729         (WebCore::ResourceResponseBase::adopt):
730         * platform/network/ResourceResponseBase.h:
731         * xml/XMLHttpRequest.cpp:
732         (WebCore::XMLHttpRequest::createRequest):
733
734 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
735
736         Use C++11 lambdas to construct FileThread::Task objects
737         https://bugs.webkit.org/show_bug.cgi?id=133079
738
739         Reviewed by Darin Adler.
740
741         Have FileThread::Task constructor take in a std::function<void ()>-like object
742         as the second parameter. Much like with ScriptExecutionContext::Task, the idea here
743         is to use inlined C++11 lambdas in FileThread::postTask() calls. Because FileThread::Task
744         also requires an instance pointer, a brace-init list is passed to these calls, passing
745         in the instance pointer as the first parameter and the C++11 lambda as the second.
746
747         FileThread::postTask() now takes in a FileThread::Task rvalue and moves it onto the heap
748         and into the queue.
749
750         In AsyncFileStream.cpp, calls to FileThread::postTask() are updated to use C++11 lambdas.
751         Uses of MainThreadTask are also replaced by C++11 lambdas. This modernizes the code and
752         removes a lot of helper functions.
753
754         FileThread::Task doesn't use CrossThreadCopier anymore. Instead, we manually produce
755         thread-safe copies as necessary. At the moment this approach produces another copy when
756         passing the freshly-copied object into the lambda, but this will be avoidable once we
757         make C++14 and the lambda capture expression support mandatory.
758
759         * fileapi/AsyncFileStream.cpp:
760         (WebCore::AsyncFileStream::create):
761         (WebCore::AsyncFileStream::stop):
762         (WebCore::AsyncFileStream::getSize):
763         (WebCore::AsyncFileStream::openForRead):
764         (WebCore::AsyncFileStream::openForWrite):
765         (WebCore::AsyncFileStream::close):
766         (WebCore::AsyncFileStream::read):
767         (WebCore::AsyncFileStream::write):
768         (WebCore::AsyncFileStream::truncate):
769         (WebCore::didStart): Deleted.
770         (WebCore::AsyncFileStream::startOnFileThread): Deleted.
771         (WebCore::derefProxyOnMainThread): Deleted.
772         (WebCore::AsyncFileStream::stopOnFileThread): Deleted.
773         (WebCore::didGetSize): Deleted.
774         (WebCore::AsyncFileStream::getSizeOnFileThread): Deleted.
775         (WebCore::didOpen): Deleted.
776         (WebCore::AsyncFileStream::openForReadOnFileThread): Deleted.
777         (WebCore::AsyncFileStream::openForWriteOnFileThread): Deleted.
778         (WebCore::AsyncFileStream::closeOnFileThread): Deleted.
779         (WebCore::didRead): Deleted.
780         (WebCore::AsyncFileStream::readOnFileThread): Deleted.
781         (WebCore::didWrite): Deleted.
782         (WebCore::AsyncFileStream::writeOnFileThread): Deleted.
783         (WebCore::didTruncate): Deleted.
784         (WebCore::AsyncFileStream::truncateOnFileThread): Deleted.
785         * fileapi/AsyncFileStream.h:
786         * fileapi/FileThread.cpp:
787         (WebCore::FileThread::postTask):
788         * fileapi/FileThread.h:
789         (WebCore::FileThread::Task::Task):
790
791 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
792
793         Pass C++11 lambdas to callOnMainThread() calls in IconDatabase
794         https://bugs.webkit.org/show_bug.cgi?id=133374
795
796         Reviewed by Darin Adler.
797
798         Use C++11 lambads to inline the main thread tasks into the calling code,
799         modernizing the look of the code and removing a few static methods and
800         classes that were used as helpers.
801
802         * loader/icon/IconDatabase.cpp:
803         (WebCore::IconDatabase::scheduleOrDeferSyncTimer):
804         (WebCore::IconDatabase::performURLImport):
805         (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread):
806         (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread):
807         (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread):
808         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread):
809         (WebCore::IconDatabase::notifyPendingLoadDecisionsOnMainThread): Deleted.
810         (WebCore::IconDatabase::performScheduleOrDeferSyncTimer): Deleted.
811         (WebCore::IconDatabase::performScheduleOrDeferSyncTimerOnMainThread): Deleted.
812         (WebCore::ClientWorkItem::ClientWorkItem): Deleted.
813         (WebCore::ClientWorkItem::~ClientWorkItem): Deleted.
814         (WebCore::ImportedIconURLForPageURLWorkItem::ImportedIconURLForPageURLWorkItem): Deleted.
815         (WebCore::ImportedIconURLForPageURLWorkItem::~ImportedIconURLForPageURLWorkItem): Deleted.
816         (WebCore::ImportedIconURLForPageURLWorkItem::performWork): Deleted.
817         (WebCore::ImportedIconDataForPageURLWorkItem::ImportedIconDataForPageURLWorkItem): Deleted.
818         (WebCore::ImportedIconDataForPageURLWorkItem::~ImportedIconDataForPageURLWorkItem): Deleted.
819         (WebCore::ImportedIconDataForPageURLWorkItem::performWork): Deleted.
820         (WebCore::RemovedAllIconsWorkItem::RemovedAllIconsWorkItem): Deleted.
821         (WebCore::RemovedAllIconsWorkItem::performWork): Deleted.
822         (WebCore::FinishedURLImport::FinishedURLImport): Deleted.
823         (WebCore::FinishedURLImport::performWork): Deleted.
824         (WebCore::performWorkItem): Deleted.
825         * loader/icon/IconDatabase.h:
826
827 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
828
829         Replace uses of CrossThreadTask in DefaultSharedWorkerRepository, WorkerMessagingProxy with C++11 lambdas
830         https://bugs.webkit.org/show_bug.cgi?id=133375
831
832         Reviewed by Darin Adler.
833
834         Uses of CrossThreadTask in the two classes are replaced with C++11 lambdas.
835         The necessary cross-thread copies are created manually and passed into the
836         lambdas by value, removing the need for CrossThreadTask and its use of CrossThreadCopier.
837
838         Remove the explicit use of this pointer in some lambdas -- it is captured automatically when
839         capturing by value, so enforcing its capturing through explicit use is not necessary.
840
841         * workers/DefaultSharedWorkerRepository.cpp:
842         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
843         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
844         (WebCore::postExceptionTask): Deleted.
845         (WebCore::postConsoleMessageTask): Deleted.
846         * workers/WorkerMessagingProxy.cpp:
847         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
848         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
849         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
850         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
851         (WebCore::WorkerMessagingProxy::connectToInspector):
852         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
853         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
854         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
855         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
856         (WebCore::WorkerMessagingProxy::reportPendingActivity):
857         (WebCore::postConsoleMessageTask): Deleted.
858         (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal): Deleted.
859         (WebCore::connectToWorkerGlobalScopeInspectorTask): Deleted.
860         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask): Deleted.
861         (WebCore::dispatchOnInspectorBackendTask): Deleted.
862         * workers/WorkerMessagingProxy.h:
863
864 2014-06-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
865
866         Scheme of content utils should be compared in an ASCII case-insensitive manner
867         https://bugs.webkit.org/show_bug.cgi?id=133502
868
869         Reviewed by Darin Adler.
870
871         According to spec, scheme must be compared in an ASCII case-insensitive manner by user agents.
872
873         Covered by existing tests.
874
875         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
876         (WebCore::isProtocolWhitelisted):
877
878 2014-06-06  Andreas Kling  <akling@apple.com>
879
880         Indexed getters should return values directly on the PropertySlot.
881         <https://webkit.org/b/133586>
882
883         Make indexed getters more efficient by using PropertySlot::setValue()
884         to pass the value directly back through the slot, instead of giving it
885         a function pointer that JSC would then immediately call back through
886         to retrieve the value.
887
888         The function pointer approach would make sense if we did inline caching
889         of indexed getters but since we currently don't, this is pure overhead.
890
891         Reviewed by Darin Adler.
892
893         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
894         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
895         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): Deleted.
896         (WebCore::cssPropertyGetterCallback): Deleted.
897         * bindings/js/JSDOMWindowCustom.cpp:
898         (WebCore::JSDOMWindow::getOwnPropertySlot):
899         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
900         (WebCore::indexGetter): Deleted.
901         * bindings/scripts/CodeGeneratorJS.pm:
902         (GenerateGetOwnPropertySlotBody):
903         (GenerateHeader):
904         (GetIndexedGetterExpression):
905         (GenerateImplementation):
906         * bridge/runtime_array.cpp:
907         (JSC::RuntimeArray::getOwnPropertySlot):
908         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
909         (JSC::RuntimeArray::indexGetter): Deleted.
910         * bridge/runtime_array.h:
911
912 2014-06-06  Brent Fulgham  <bfulgham@apple.com>
913
914         GenericCueData elements prematurely removed
915         https://bugs.webkit.org/show_bug.cgi?id=133588
916
917         Reviewed by Eric Carlson.
918
919         Add a 'removeCompletedCues' method instead of using the 'resetCueValues' method
920         after processing new cues. We do not want to reset cue state if we have pending
921         cues that are being extended by future updates (such as paint-on cues).
922
923         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
924         (WebCore::InbandTextTrackPrivateAVF::processCue):  Call new 'removeCompletedCues' method.
925         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Added.
926         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
927
928 2014-06-06  Brady Eidson  <beidson@apple.com>
929
930         Initialize a char* that needs to be initialized.
931         <rdar://problem/15840022> and https://bugs.webkit.org/show_bug.cgi?id=133585
932
933         Reviewed by Mark Rowe.
934
935         r152134 (erroneously) removed this initialization.
936
937         * platform/sql/SQLiteStatement.cpp:
938         (WebCore::SQLiteStatement::prepare): tail should start out initialized to 0.
939
940 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
941
942         [iOS] Support pasting HTML
943         https://bugs.webkit.org/show_bug.cgi?id=133581
944         <rdar://problem/17070305>
945
946         Reviewed by Enrica Casucci.
947
948         We can probably share a lot of code between Mac and iOS here, but for now, just
949         implement the unimplemented functions.
950
951         * editing/ios/EditorIOS.mm: (WebCore::Editor::WebContentReader::readHTML):
952         Implemented based on WebArchive reading code above, and on Mac version of readHTML.
953         Unlike on Mac, we don't need to support Microsoft CF_HTML format, as nothing
954         generates it.
955
956         * platform/ios/PasteboardIOS.mm:
957         (WebCore::Pasteboard::read):
958         (WebCore::Pasteboard::supportedPasteboardTypes):
959         Added HTML support, as the second preferred format after WebArchive.
960
961 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
962
963         Try to fix the build after http://trac.webkit.org/changeset/169655
964
965         Unfortunately, the fix is very fragile, and will likely not work for some SDKs
966         or possibly local headers - all OS versions have multiple SecBsse.h headers with
967         different definitions for SecIdentityRef.
968
969         We'll see.
970
971         * WebCore.exp.in:
972
973 2014-06-06  Dan Bernstein  <mitz@apple.com>
974
975         WebCore part of <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
976         https://bugs.webkit.org/show_bug.cgi?id=133527
977
978         Reviewed by Darin Adler.
979
980         * WebCore.exp.in: Exported some Credential member functions.
981
982 2014-06-06  Dean Jackson  <dino@apple.com>
983
984         [iOS WebGL] Float texture extension has a slightly different name
985         https://bugs.webkit.org/show_bug.cgi?id=133580
986         <rdar://problem/17113451>
987
988         Reviewed by Brady Eidson.
989
990         Floating point textures were not available on iOS, because we were
991         looking for the wrong extension.
992
993         Covered by the Khronos test (and in LayoutTests):
994         conformance/extensions/oes-texture-float.html
995
996         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
997         (WebCore::Extensions3DOpenGL::supportsExtension): Look for GL_OES_texture_float
998         as well as GL_ARB_texture_float.
999         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1000         (WebCore::GraphicsContext3D::texImage2D): Increase the set of things skipped
1001         on PLATFORM(IOS) since they are supported natively there.
1002
1003 2014-06-05  David Hyatt  <hyatt@apple.com>
1004
1005         REGRESSION: Hit testing of composited elements is broken in new multicolumn layout.
1006         https://bugs.webkit.org/show_bug.cgi?id=133522 (<rdar://problem/17060556>)
1007         
1008         Reviewed by Simon Fraser.
1009
1010         Hit testing for the new columns doesn't care about compositing but does still
1011         need a pagination layer set to work. The old column code didn't care about this
1012         because it was top down (and wrong). The new code lets each layer paint and hit
1013         test its own fragments, so having a pagination layer set suddenly becomes relevant
1014         for composited layers.
1015     
1016         The solution is to cache whether or not the pagination layer crosses a compositing
1017         boundary, and then to force call sites of enclosingPaginationLayer to pass an argument
1018         indicating whether compositing layers should be included. Typically painting wants to
1019         exclude them but hit testing wants to include them.
1020
1021         * page/FrameView.cpp:
1022         (WebCore::updateLayerPositionFlags):
1023         * rendering/RenderLayer.cpp:
1024         (WebCore::RenderLayer::RenderLayer):
1025         (WebCore::RenderLayer::updateLayerPositions):
1026         (WebCore::RenderLayer::updatePagination):
1027         (WebCore::transparencyClipBox):
1028         (WebCore::RenderLayer::paintLayer):
1029         (WebCore::RenderLayer::paintLayerContents):
1030         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
1031         (WebCore::RenderLayer::collectFragments):
1032         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1033         (WebCore::RenderLayer::hitTestLayer):
1034         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
1035         (WebCore::RenderLayer::calculateClipRects):
1036         * rendering/RenderLayer.h:
1037         * rendering/RenderLayerCompositor.cpp:
1038         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1039
1040 2014-06-06  Kiran  <kiran.guduru@samsung.com>
1041
1042         [MediaStream] 'get' prefix is missing for capabilities and constraints.
1043         https://bugs.webkit.org/show_bug.cgi?id=133573
1044
1045         Reviewed by Eric Carlson.
1046
1047         Modified the existing MediaStreamTrack.html to test the changes.
1048
1049         As per the Media Capture and Streams spec method names constreaints and
1050         capabilities should be prefixed by 'get'. So updated the method names.
1051
1052         * Modules/mediastream/MediaStreamTrack.cpp:
1053         (WebCore::MediaStreamTrack::getConstraints):
1054         (WebCore::MediaStreamTrack::getCapabilities):
1055         (WebCore::MediaStreamTrack::constraints): Deleted.
1056         (WebCore::MediaStreamTrack::capabilities): Deleted.
1057         * Modules/mediastream/MediaStreamTrack.h:
1058         * Modules/mediastream/MediaStreamTrack.idl:
1059
1060 2014-06-05  Brent Fulgham  <bfulgham@apple.com>
1061
1062         REGRESSION(169440): Repro crash when playing a video with captions
1063         https://bugs.webkit.org/show_bug.cgi?id=133459
1064         <rdar://problem/17079081>
1065
1066         Reviewed by Eric Carlson.
1067
1068         The change I made in r169440 introduced a crash for paint-on captions. This
1069         resolves the problem as follows:
1070         1. No longer attempt to modify the start/endTime in the TextTrack implementation.
1071         2. Check for extensions to existing cues when we are about to add new arriving
1072            cues. If they extend a current pending cue, don't set an end-time for the
1073            pending cue, and throw away the new duplicate. Otherwise set the end time
1074            as previously and continue.
1075
1076         * html/track/TextTrack.cpp:
1077         (WebCore::TextTrack::hasCue): Remove 'doesExtendCue' case since this is
1078         no longer possible.
1079         * platform/graphics/InbandTextTrackPrivateClient.h:
1080         (WebCore::GenericCueData::doesExtendCueData): Added.
1081         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1082         (WebCore::InbandTextTrackPrivateAVF::processCue): Check for cues extending
1083         other cues and handle appropriately.
1084
1085 2014-06-06  Brent Fulgham  <bfulgham@apple.com>
1086
1087         ROLLOUT: r169630: Caused a retain cycle.
1088         https://bugs.webkit.org/show_bug.cgi?id=133463
1089         <rdar://problem/17098100>
1090
1091         Rolling out this change as it introduced a retain cycle.
1092
1093         * Modules/mediacontrols/MediaControlsHost.cpp:
1094         (WebCore::MediaControlsHost::setControllerJSObject): Deleted.
1095         * Modules/mediacontrols/MediaControlsHost.h:
1096         (WebCore::MediaControlsHost::controllerJSValue):
1097         (WebCore::MediaControlsHost::setControllerJSValue):
1098         (WebCore::MediaControlsHost::controllerJSObject): Deleted.
1099         * html/HTMLMediaElement.cpp:
1100         (WebCore::HTMLMediaElement::parseAttribute):
1101
1102 2014-06-05  Dean Jackson  <dino@apple.com>
1103
1104         StyleResolver doesn't compile without CSS_GRID_LAYOUT enabled
1105         https://bugs.webkit.org/show_bug.cgi?id=133568
1106
1107         Reviewed by Tim Horton.
1108
1109         * css/StyleResolver.cpp:
1110         (WebCore::isDisplayGridBox): Add UNUSED_PARAM.
1111
1112 2014-06-05  Mihnea Ovidenie  <mihnea@adobe.com>
1113
1114         [CSSRegions] Region box incorrectly overlaps floating box
1115         https://bugs.webkit.org/show_bug.cgi?id=133545
1116
1117         Reviewed by David Hyatt.
1118
1119         A region box creates a BFC and it should not overlap a floating box in the same formatting context: http://www.w3.org/TR/CSS21/visuren.html#bfc-next-to-float
1120
1121         Test: fast/regions/region-as-bfc-avoids-float.html
1122
1123         * rendering/RenderBlock.cpp:
1124         (WebCore::RenderBlock::avoidsFloats):
1125
1126 2014-06-05  Yoav Weiss  <yoav@yoav.ws>
1127
1128         Align srcset parser with recent spec changes
1129         https://bugs.webkit.org/show_bug.cgi?id=133504
1130
1131         Reviewed by Darin Adler.
1132
1133         New tests were added to fast/hidpi/image-srcset-invalid-descriptor.html
1134
1135         The srcset parser changes align it with the spec:
1136         http://picture.responsiveimages.org/#parse-srcset-attr.
1137         The spec changes are meant to give the parser better future
1138         compatibility, and enable it to work well with the 'w' descriptor, the
1139         soon to be added 'h' descriptor and function descriptors (e.g.
1140         future-descriptor(a, b, c) ).
1141
1142         * CMakeLists.txt:
1143         * WebCore.vcxproj/WebCore.vcxproj:
1144         * WebCore.vcxproj/WebCore.vcxproj.filters:
1145         * WebCore.xcodeproj/project.pbxproj:
1146         * html/HTMLImageElement.cpp:
1147         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
1148         (WebCore::HTMLImageElement::parseAttribute):
1149         * html/HTMLImageElement.h:
1150         * html/parser/HTMLParserIdioms.h:
1151         (WebCore::isHTMLSpace):
1152         (WebCore::isComma):
1153         (WebCore::isHTMLSpaceOrComma):
1154         * html/parser/HTMLPreloadScanner.cpp:
1155         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1156         * html/parser/HTMLSrcsetParser.cpp:
1157         (WebCore::compareByDensity):
1158         (WebCore::appendDescriptorAndReset):
1159         (WebCore::appendCharacter):
1160         (WebCore::isEOF):
1161         (WebCore::tokenizeDescriptors):
1162         (WebCore::stringViewToFloat):
1163         (WebCore::stringViewToInt):
1164         (WebCore::parseDescriptors):
1165         (WebCore::parseImageCandidatesFromSrcsetAttribute):
1166         (WebCore::pickBestImageCandidate):
1167         (WebCore::bestFitSourceForImageAttributes):
1168         (WebCore::compareByScaleFactor): Deleted.
1169         (WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
1170         * html/parser/HTMLSrcsetParser.h:
1171         (WebCore::DescriptorParsingResult::DescriptorParsingResult):
1172         (WebCore::DescriptorParsingResult::hasDensity):
1173         (WebCore::DescriptorParsingResult::hasWidth):
1174         (WebCore::DescriptorParsingResult::hasHeight):
1175         (WebCore::DescriptorParsingResult::density):
1176         (WebCore::DescriptorParsingResult::resourceWidth):
1177         (WebCore::DescriptorParsingResult::resourceHeight):
1178         (WebCore::DescriptorParsingResult::setResourceWidth):
1179         (WebCore::DescriptorParsingResult::setResourceHeight):
1180         (WebCore::DescriptorParsingResult::setDensity):
1181         (WebCore::ImageCandidate::ImageCandidate):
1182         (WebCore::ImageCandidate::toString):
1183         (WebCore::ImageCandidate::url):
1184         (WebCore::ImageCandidate::setDensity):
1185         (WebCore::ImageCandidate::density):
1186         (WebCore::ImageCandidate::resourceWidth):
1187         (WebCore::ImageCandidate::srcOrigin):
1188         (WebCore::ImageCandidate::isEmpty):
1189         (WebCore::ImageWithScale::ImageWithScale): Deleted.
1190         (WebCore::ImageWithScale::imageURL): Deleted.
1191         (WebCore::ImageWithScale::scaleFactor): Deleted.
1192         * html/parser/ParsingUtilities.h: Renamed from Source/WebCore/html/track/ParsingUtilities.h.
1193         (skipExactly):
1194         (skipUntil):
1195         (skipWhile):
1196         (reverseSkipWhile):
1197
1198 2014-06-05 Wenson Hsieh  <wenson_hsieh@apple.com>
1199
1200         Current media controls look different from previous media controls. Adjusted CSS to make media elements more similar by adding padding, adjusting hues/svg, resizing elements, etc.
1201
1202         https://bugs.webkit.org/show_bug.cgi?id=133521
1203
1204         Reviewed by Eric Carlson.
1205
1206         The main issues:
1207         - The widths between elements of both audio and video players are incorrect.
1208         - The hues of audio player elements are incorrect.
1209         - The hues of video player elements are content dependent (refer to full-screen mode), and this cannot be exactly replicated using just css. This patch only attempts to make them more similar.
1210         - The height of the audio player is incorrect.
1211
1212         Test: platform/ios-sim/media/audio-width.html
1213
1214         * Modules/mediacontrols/mediaControlsiOS.css: Updated style elements for audio/video elements.
1215         (::-webkit-media-controls): Enforce a minimum width on audio/video controls.
1216         (audio): Enforce a minimum width on audio elements.
1217         (audio::-webkit-media-controls): see below
1218         (audio::-webkit-media-controls-wireless-playback-picker-button): modified SVG, hue and width/height.
1219         (audio::-webkit-media-controls-panel): adjusted hue, added left/right padding.
1220         (audio::-webkit-media-controls-fullscreen-button): removed. There's no fullscreen for audio anyways.
1221         (audio::-webkit-media-controls-current-time-display): adjusted font size, added left padding.
1222         (audio::-webkit-media-controls-time-remaining-display): adjusted font size, added right padding.
1223
1224         (video::-webkit-media-controls-panel): adjusted hue, added left/right padding.
1225         (video::-webkit-media-controls-current-time-display): added left padding.
1226         (video::-webkit-media-controls-time-remaining-display): added right padding.
1227         (video::-webkit-media-controls-wireless-playback-picker-button): modified SVG, hue, opacity and width/height.
1228         (video::-webkit-media-controls-fullscreen-button): modified SVG, hue, opacity, and width/height. In particular, made the svg seem sharper.
1229         (video::-webkit-media-controls-play-button): modified SVG, hue, opacity, and width/height.
1230
1231 2014-06-05  Commit Queue  <commit-queue@webkit.org>
1232
1233         Unreviewed, rolling out r169570.
1234         https://bugs.webkit.org/show_bug.cgi?id=133565
1235
1236         It breaks Baidu (Requested by benjaminp on #webkit).
1237
1238         Reverted changeset:
1239
1240         "[iOS] Start ignoring common bogus viewport parameters"
1241         https://bugs.webkit.org/show_bug.cgi?id=133466
1242         http://trac.webkit.org/changeset/169570
1243
1244 2014-06-05  Michael Timbrook  <timbrook@apple.com>
1245
1246         AX: Add support for ARIA 1.1 'none' role
1247         https://bugs.webkit.org/show_bug.cgi?id=133367
1248
1249         Reviewed by Chris Fleizach.
1250
1251         Added support for the 'none' role by added a lookup for it to go to PresentationalRole
1252         Test: accessibility/aria-none-role.html
1253
1254         * accessibility/AccessibilityObject.cpp:
1255         (WebCore::initializeRoleMap):
1256
1257 2014-06-05  Joanmarie Diggs  <jdiggs@igalia.com>
1258
1259         AX: [ATK] Children of tables and lists with role='presentation' should each be exposed as if they were div elements
1260         https://bugs.webkit.org/show_bug.cgi?id=133133
1261
1262         Reviewed by Chris Fleizach.
1263
1264         When a table or list has role='presentation', accessibility is "ignored"
1265         for that element, but not for the required children. The default roles
1266         for the children (CellRole and ListItemRole) do not make sense without
1267         the parent, therefore map them to DivRole in ATK if they inherit the
1268         presentational role.
1269
1270         Test: accessibility/aria-inherits-presentational.html
1271
1272         * accessibility/AccessibilityObject.h:
1273         (WebCore::AccessibilityObject::inheritsPresentationalRole):
1274         * accessibility/AccessibilityRenderObject.cpp:
1275         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
1276         * accessibility/AccessibilityRenderObject.h:
1277         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1278         (atkRole):
1279
1280 2014-06-05  Brent Fulgham  <bfulgham@apple.com>
1281
1282         REGRESSION (r167962): Out of bounds read in JSC::StructureIDTable::get() 
1283         https://bugs.webkit.org/show_bug.cgi?id=133463
1284         <rdar://problem/17098100>
1285
1286         Reviewed by Dean Jackson.
1287
1288         Revise MediaControllerHost implementation so that it holds a Strong
1289         reference to the JavaScript 'Controller' object it mirrors. The
1290         MediaControllerHost is constructed when we create an HTMLMediaElement,
1291         and is the logical place to retain ownership of the JS object so that
1292         it does not get garbage collected as long as HTMLMediaElement exists.
1293
1294         * Modules/mediacontrols/MediaControlsHost.cpp:
1295         (WebCore::MediaControlsHost::setControllerJSObject): Create a strong
1296         reference to the JavaScript Controller object.
1297         * Modules/mediacontrols/MediaControlsHost.h: Use JSC::Strong to hold a
1298         JSObject, rather than a bare JSValue.
1299         (WebCore::MediaControlsHost::controllerJSObject): Change name to reflect
1300         that we are working with JSObjects, not JSValues.
1301         (WebCore::MediaControlsHost::controllerJSValue): Deleted.
1302         (WebCore::MediaControlsHost::setControllerJSValue): Deleted.
1303         * html/HTMLMediaElement.cpp:
1304         (WebCore::HTMLMediaElement::parseAttribute): Revise for changed method
1305         signature.
1306
1307 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
1308
1309         [iOS][WK2] Add device orientation
1310         https://bugs.webkit.org/show_bug.cgi?id=133530
1311
1312         Reviewed by Tim Horton.
1313
1314         Previously, WebCore was getting the orientation directly from the WebKit layer.
1315         This had to be done during the frame creation and was very fragile.
1316
1317         Frame is changed to pull the value from the chrome client. That way we avoid races
1318         and we can maintain a single value for all frames.
1319
1320         Sending the values to all the subframes is aslo done here so that we do not have to repeat
1321         it in both WebKit layers.
1322
1323         * WebCore.exp.in:
1324         * loader/EmptyClients.h:
1325         * page/ChromeClient.h:
1326         * page/Frame.cpp:
1327         (WebCore::Frame::Frame):
1328         (WebCore::Frame::orientationChanged):
1329         (WebCore::Frame::orientation):
1330         (WebCore::Frame::sendOrientationChangeEvent): Deleted.
1331         * page/Frame.h:
1332         (WebCore::Frame::orientation): Deleted.
1333
1334 2014-06-05  Timothy Horton  <timothy_horton@apple.com>
1335
1336         Fix the !CACHE_SUBIMAGES build
1337
1338         * platform/graphics/cg/GraphicsContextCG.cpp:
1339         (WebCore::GraphicsContext::drawNativeImage):
1340
1341 2014-06-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1342
1343         CSS JIT: Clean up StackAllocator
1344         https://bugs.webkit.org/show_bug.cgi?id=133506
1345
1346         Reviewed by Benjamin Poulain.
1347
1348         Cleaning up CSS JIt StackAllocator code. Sharing push / pop code and
1349         using information provided by MacroAssembler more aggressively
1350         to drop ifdefs.
1351
1352         * cssjit/StackAllocator.h:
1353         (WebCore::StackAllocator::allocateUninitialized):
1354         (WebCore::StackAllocator::push):
1355         (WebCore::StackAllocator::pop):
1356         (WebCore::StackAllocator::popAndDiscard):
1357         (WebCore::StackAllocator::popAndDiscardUpTo):
1358         (WebCore::StackAllocator::alignStackPreFunctionCall):
1359         (WebCore::StackAllocator::unalignStackPostFunctionCall):
1360         (WebCore::StackAllocator::stackUnitInBytes):
1361
1362 2014-06-05  Zalan Bujtas  <zalan@apple.com>
1363
1364         Subpixel rendering: border-radius painting falls back to rectangle when the snapped rounded rect becomes non-renderable.
1365         https://bugs.webkit.org/show_bug.cgi?id=133491
1366
1367         Reviewed by Simon Fraser.
1368
1369         Pixel snapping can change the rectangle's size when it is on a certain subpixel position. (usually it does not)
1370         This patch ensures that the snapped rect is still renderable by adjusting the radii as well.
1371
1372         Test: fast/borders/hidpi-border-radius-with-subpixel-margin-not-renderable.html
1373
1374         * platform/graphics/RoundedRect.cpp:
1375         (WebCore::RoundedRect::Radii::scale):
1376         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
1377         * platform/graphics/RoundedRect.h:
1378
1379 2014-06-05  Commit Queue  <commit-queue@webkit.org>
1380
1381         Unreviewed, rolling out r169587.
1382         https://bugs.webkit.org/show_bug.cgi?id=133552
1383
1384         Calls a pure virtual method, crashes (Requested by ap on
1385         #webkit).
1386
1387         Reverted changeset:
1388
1389         "WebKit should adopt journal_mode=wal for all SQLite
1390         databases."
1391         https://bugs.webkit.org/show_bug.cgi?id=133496
1392         http://trac.webkit.org/changeset/169587
1393
1394 2014-06-05  Frédéric Wang  <fred.wang@free.fr>
1395
1396         Apply Character-level mirroring to stretchy operators in RTL mode.
1397         https://bugs.webkit.org/show_bug.cgi?id=130839
1398
1399         Reviewed by Chris Fleizach.
1400
1401         We add support for character-level mirroring for stretchy MathML operators in RTL mode.
1402         Glyph-level mirroring (via the rtlm OpenType feature) will be handled in bug 130840.
1403
1404         Test: mathml/presentation/stretchy-rtl.html
1405
1406         * rendering/mathml/RenderMathMLOperator.cpp: reorganize the Unicode stretchyCharacters table to make mirroring easy.
1407         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): pass the right boolean to glyphDataForCharacter.
1408         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): ditto
1409         (WebCore::RenderMathMLOperator::findStretchyData): ditto and change the index for the stretchyCharacters fallback.
1410         (WebCore::RenderMathMLOperator::updateStyle): pass the right boolean to glyphDataForCharacter.
1411         (WebCore::RenderMathMLOperator::paint): remove the FIXME comment.
1412         (WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): switch the leading/trailing space in RTL mode.
1413
1414 2014-06-05  Zalan Bujtas  <zalan@apple.com>
1415
1416         Subpixel rendering: Buttons in default media controls shift vertically when controls fade in or out.
1417         https://bugs.webkit.org/show_bug.cgi?id=133488
1418
1419         Reviewed by Simon Fraser.
1420
1421         Filter effects are not subpixel aware yet. They paint to integrally sized image buffers.
1422         In order to ensure that the content is rendered to the the same position on the filter 
1423         source context as if there was no filter, the repaint rects need to be adjusted to match with
1424         the internal filter snapping (enclosingIntRect).
1425         This is a temporary change until after filter effects get subpixelized.
1426
1427         However, this changeset regresses RenderNameFlow clipping when the content is on subpixel position
1428         and filter effect is present. Instead of adding the failing test cases to TestExpectations, I removed
1429         the video controls from the <video> to make the tests pass, when possible (they just happen to have <video>)
1430         and filed webkit.org/b/133523 to track the regression.
1431
1432         Test: css3/filters/filter-is-on-subpixel-position.html
1433
1434         * rendering/RenderLayer.cpp:
1435         (WebCore::RenderLayer::setupFilters):
1436
1437 2014-06-05  Kiran  <kiran.guduru@samsung.com>
1438
1439         [MediaStream] MediaStream.addTrack should not check for tracks ended state.
1440         https://bugs.webkit.org/show_bug.cgi?id=133510
1441
1442         Reviewed by Eric Carlson.
1443
1444         Adding and removing of tracks to a MediaStream should not have dependency
1445         on tracks state. So the check for MediaStreamTrack's ended state has been
1446         removed while adding a track in MediaStreamPrivate.cpp.
1447
1448         Test: fast/mediastream/MediaStream-add-ended-tracks.html
1449
1450         * platform/mediastream/MediaStreamPrivate.cpp:
1451         (WebCore::MediaStreamPrivate::addTrack):
1452
1453 2014-06-05  Gwang Yoon Hwang  <yoon@igalia.com>
1454
1455         [GTK] Remove ScrollViewGtk.cpp
1456         https://bugs.webkit.org/show_bug.cgi?id=133535
1457
1458         Reviewed by Carlos Garcia Campos.
1459
1460         Because GTK+ WK1 was removed, we don't have to consider special cases
1461         handled in ScrollViewGtk.cpp.
1462
1463         No new tests are necessary because there is no behavior change.
1464
1465         * PlatformGTK.cmake:
1466         * platform/ScrollView.cpp:
1467         (WebCore::ScrollView::setScrollbarModes):
1468         (WebCore::ScrollView::visibleContentRectInternal):
1469         * platform/gtk/ScrollViewGtk.cpp: Removed.
1470
1471 2014-06-05  Frédéric Wang  <fred.wang@free.fr>
1472
1473         MathML operators not stretched horizontally
1474         https://bugs.webkit.org/show_bug.cgi?id=72828
1475
1476         Reviewed by Chris Fleizach.
1477
1478         This patch adds basic horizontal stretching rules for operators inside
1479         an <munder>, <mover> or <munderover> elements. The stretchy operators
1480         in such an element stretch to cover the size of the non-stretchy
1481         operators. This only works when fonts that have an OpenType MATH table
1482         are used.
1483
1484         Tests: mathml/opentype/horizontal-LatinModern.html
1485                mathml/opentype/opentype-stretchy-horizontal.html
1486                mathml/opentype/horizontal-LatinModern-munderover.html
1487
1488         * rendering/mathml/RenderMathMLOperator.cpp:
1489         (WebCore::MathMLOperatorDictionary::ExtractKeyHorizontal): We add an ordered list of operators that have horizontal stretch direction.
1490         (WebCore::RenderMathMLOperator::RenderMathMLOperator): init m_Vertical
1491         (WebCore::RenderMathMLOperator::SetOperatorProperties): set m_Vertical by checking whether the operator is in the horizontalOperators list.
1492         (WebCore::RenderMathMLOperator::stretchTo): We do not stretch vertically
1493         if the operator has horizontal direction.
1494         We also add a new version stretchTo(LayoutUnit width) for horizontal stretching only.
1495         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Handle horizontal stretching: the maximumGlyphWidth is the maximum of
1496         the base size or of the stretch size.
1497         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): Add an ASSERT to ensure that this function is only called for vertical stretching.
1498         (WebCore::RenderMathMLOperator::findStretchyData): Add an ASSERT to ensure that this function is not called to get the maximum width of a horizontal stretchy operator.
1499         We take into account m_isVertical when calling getMathVariants or computing sizes.
1500         There is not any Unicode-only construction for horizontal stretching, so a MATH table is required for horizontal stretching.
1501         (WebCore::RenderMathMLOperator::updateStyle): Ignore some code paths specific to vertical stretching and take into account the m_Vertical parameters.
1502         For horizontal stretching, the m_stretch*Baseline parameters are now updated to match the metrics of the size variant or of the maximum of the parts in the glyph assembly.
1503         (WebCore::RenderMathMLOperator::computeLogicalHeight): logicalHeight is now explicitely the sum of m_stretchHeightAboveBaseline and m_stretchDepthBelowBaseline, since it can be different from the stretchSize() in horizontal stretching.
1504         (WebCore::RenderMathMLOperator::paintGlyph): handle trimming for horizontal stretching.
1505         (WebCore::RenderMathMLOperator::fillWithVerticalExtensionGlyph): rename the function and ensure it is only call for m_isVertical.
1506         (WebCore::RenderMathMLOperator::fillWithHorizontalExtensionGlyph): same as fillWithVerticalExtensionGlyph, but for horizontal stretching.
1507         (WebCore::RenderMathMLOperator::paint): For glyph assembly, choose between paintVerticalGlyphAssembly or paintHorizontalGlyphAssembly.
1508         (WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): rename the function and ensure it is only call for m_isVertical.
1509         (WebCore::RenderMathMLOperator::paintHorizontalGlyphAssembly): same as paintVerticalGlyphAssembly but for horizontal stretching.
1510         * rendering/mathml/RenderMathMLOperator.h: we add a m_isVertical member to indicate the stretch direction and a m_stretchWidth to indicate the width of the stretchy character.
1511         We define the horizontal counterparts of fillWith*ExtensionGlyph, paint*GlyphAssembly, GlyphPaintTrimming  StretchyData.
1512         Finally stretchSize() takes into account the stretch direction.
1513         * rendering/mathml/RenderMathMLUnderOver.cpp: We override the layout() function to stretch munderover children horizontally.
1514         (WebCore::RenderMathMLUnderOver::layout):
1515         * rendering/mathml/RenderMathMLUnderOver.h: we declare layout().
1516
1517 2014-06-04  Bem Jones-Bey  <bjonesbe@adobe.com>
1518
1519         [CSS Shapes] Image lifetime is not properly handled for gradient shapes
1520         https://bugs.webkit.org/show_bug.cgi?id=133414
1521
1522         Reviewed by Simon Fraser.
1523
1524         Refactor computedShape() and it's helpers to be able to properly
1525         manage the lifetime of the image returned from StyleImage.
1526
1527         This is a port of a Blink patch by Hans Muller.
1528
1529         Test: fast/shapes/shape-outside-floats/shape-outside-uncached-gradient.html
1530
1531         * rendering/shapes/ShapeOutsideInfo.cpp:
1532         (WebCore::ShapeOutsideInfo::createShapeForImage): Properly handle the
1533             lifetime of the image. Changed to use StyleImage::image() to get
1534             the image in all cases there's no need to special case cached
1535             images.
1536         (WebCore::ShapeOutsideInfo::computedShape): Call createShapeForImage.
1537         (WebCore::getShapeImageAndRect): Deleted.
1538         * rendering/shapes/ShapeOutsideInfo.h:
1539
1540 2014-06-04  Bem Jones-Bey  <bjonesbe@adobe.com>
1541
1542         [CSS Shapes] Fix off by one in creating a RasterShape
1543         https://bugs.webkit.org/show_bug.cgi?id=133499
1544
1545         Reviewed by Darin Adler.
1546
1547         Test: fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-crash.html
1548
1549         * rendering/shapes/RasterShape.cpp:
1550         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
1551             marginY1 is supposed to be an inclusive endpoint, however, maxY()
1552             is an exclusive endpoint. This simply changes marginY1 into an
1553             exclusive endpoint.
1554
1555 2014-06-04  Benjamin Poulain  <bpoulain@apple.com>
1556
1557         [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
1558         https://bugs.webkit.org/show_bug.cgi?id=133490
1559
1560         Reviewed by Tim Horton.
1561
1562         Expose the WebKit1 parameter "ScaleIsInitial". It is used for a similar concept in WebKit2 (userHasChangedPageScaleFactor).
1563
1564         Add "exposedContentPosition", which is the scroll position of the exposed rect.
1565
1566         * history/HistoryItem.h:
1567         (WebCore::HistoryItem::exposedContentPosition):
1568         (WebCore::HistoryItem::setExposedContentPosition):
1569         (WebCore::HistoryItem::setScaleIsInitial):
1570         * loader/HistoryController.cpp:
1571         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1572
1573 2014-06-04  Alex Christensen  <achristensen@webkit.org>
1574
1575         Enable WebGL on Windows.
1576         https://bugs.webkit.org/show_bug.cgi?id=133503
1577
1578         Reviewed by Brent Fulgham.
1579
1580         No new tests, but we should enable the webgl tests soon.
1581
1582         * html/canvas/WebGLRenderingContext.cpp:
1583         (WebCore::WebGLRenderingContext::markContextChanged):
1584         Check if the context and RenderBox are accelerated to use accelerated code path.
1585         * html/canvas/WebGLRenderingContext.h:
1586         Disable accelerated compositing on WebGL canvases until that works.
1587         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1588         (WebCore::GraphicsContext3D::reshapeFBOs):
1589         Compile fix after r166563.
1590
1591 2014-06-04  Benjamin Poulain  <benjamin@webkit.org>
1592
1593         Regression(r169547): Crash in WebCore::styleForFirstLetter() while loading http://thenextweb.com/apple/2014/02/21/apple-confirms-acquired-testflight-creator-burstly/
1594         https://bugs.webkit.org/show_bug.cgi?id=133500
1595
1596         Reviewed by Antti Koivisto.
1597
1598         Unlike the other tree marking optimization, adding HasPseudoStyle() on an element style
1599         during style resolution must be conservative and not set the flag unless every other filter
1600         matched first.
1601
1602         After r169547, the SelectorChecker was setting flags on HasPseudoStyle() during the pseudo
1603         element matching. If that passed but the remaining filter did not match, the element style
1604         could have the flag "FIRST_LETTER" while not being able to resolve a style for "FIRST_LETTER".
1605
1606         When the layout code was creating the renderer, it would find the FIRST_LETTER flag on the main style
1607         and try to get the specific style for FIRST_LETTER. Since no rule would resolve for FIRST_LETTER,
1608         the style would be null and the code would be crashing when accessing its parameters.
1609
1610         This patch fixes the issue by moving the style marking for pseudo element at the end of the matching.
1611
1612         Test: fast/css/first-letter-on-non-matching-selectors.html
1613
1614         * css/SelectorChecker.cpp:
1615         (WebCore::SelectorChecker::match):
1616         (WebCore::SelectorChecker::matchRecursively):
1617         * css/SelectorChecker.h:
1618         (WebCore::SelectorChecker::match): Deleted.
1619
1620 2014-06-04  Eric Carlson  <eric.carlson@apple.com>
1621
1622         [iOS] allow UA to specify network interface
1623         https://bugs.webkit.org/show_bug.cgi?id=133396
1624
1625         Reviewed by Jer Noble.
1626
1627         * html/HTMLMediaElement.cpp:
1628         (WebCore::HTMLMediaElement::mediaPlayerInterfaceName): Return settings->networkInterfaceName.
1629         * html/HTMLMediaElement.h:
1630
1631         * platform/graphics/MediaPlayer.cpp:
1632         (WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName): Pass through the media element.
1633         * platform/graphics/MediaPlayer.h:
1634         (WebCore::MediaPlayerClient::mediaPlayerNetworkInterfaceName):
1635
1636         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1637         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): If the media player
1638             wants to use a specific netork interface name, pass it to the AVAsset allocator.
1639
1640 2014-06-03  Jon Honeycutt  <jhoneycutt@apple.com>
1641
1642         Pasting multiple photos on iOS only pastes one photo
1643
1644         <https://bugs.webkit.org/show_bug.cgi?id=133495>
1645         <rdar://problem/16138616>
1646
1647         Reviewed by Alexey Proskuryakov.
1648
1649         * editing/ios/EditorIOS.mm:
1650         (WebCore::Editor::pasteWithPasteboard):
1651         Create a WebContentReader. For each pasteboard item, get the document
1652         fragment for that item, and add it to the reader. If we fail to get
1653         the fragment from the delegate, fall back to using
1654         webContentFromPasteboard() as before.
1655
1656 2014-06-04  Myles C. Maxfield  <litherum@gmail.com>
1657
1658         Use references instead of pointers for non-optional arguments during text layout
1659         https://bugs.webkit.org/show_bug.cgi?id=133501
1660
1661         Reviewed by Tim Horton.
1662
1663         This patch applies some cleanup to InlineBox layout functions to take
1664         references instead of pointers where appropriate.
1665
1666         No new tests are necessary because there is no behavior change.
1667
1668         * rendering/InlineFlowBox.cpp:
1669         (WebCore::InlineFlowBox::computeLogicalBoxHeights): Make the function take a
1670         reference to the RootInlineBox instead of a pointer. This function does some
1671         rounding.
1672         (WebCore::InlineFlowBox::addTextBoxVisualOverflow): Make the function take a
1673         reference to the InlineTextBox instead of a pointer.
1674         (WebCore::InlineFlowBox::computeOverflow): Update call to addTextBoxVisualOverflow
1675         to pass a reference instead of a pointer.
1676         * rendering/RootInlineBox.cpp:
1677         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Update call to
1678         computeLogicalBoxHeights to pass a reference instead of a pointer.
1679         (WebCore::RootInlineBox::ascentAndDescentForBox): Make the function take a
1680         reference to the InlineBox instead of a pointer.
1681         (WebCore::RootInlineBox::includeLeadingForBox): Make the function take a reference
1682         instead of a pointer.
1683         (WebCore::RootInlineBox::includeFontForBox): Ditto.
1684         (WebCore::RootInlineBox::includeGlyphsForBox): Ditto.
1685         (WebCore::RootInlineBox::includeMarginForBox): Ditto.
1686         * rendering/RootInlineBox.h: Move functions that are not externally called into
1687         a private: section. In addition, update function signatures to take references
1688         instead of pointers.
1689
1690 2014-05-27  Myles C. Maxfield  <mmaxfield@apple.com>
1691
1692         Lists styled with SVG fonts are not rendered as expected
1693         https://bugs.webkit.org/show_bug.cgi?id=133198
1694
1695         Reviewed by Simon Fraser.
1696
1697         There were a couple places in RenderListMarker and RenderMenuList that were
1698         implicitly creating TextRuns by passing a String to a function which
1699         expected a TextRun. Because TextRun has a constructor which takes a single
1700         String and isn't marked explicit, TextRuns were being created without
1701         any of the associated code that initializes the TextRun (such as creating
1702         a RenderingContext if necessary).
1703
1704         There is currently one more client of this code that needs to be fixed.
1705         This is in RenderThemeIOS::adjustMenuListButtonStyle(). However, fixing
1706         this will be a somewhat large change, and is out of scope for this patch.
1707         I will submit a follow-up patch that fixes this permanently. Once this is
1708         fixed, I can mark TextRun's constructors as explicit.
1709
1710         Test: svg/custom/list-items-with-svg-font-family.html
1711
1712         * platform/graphics/TextRun.h:
1713         (WebCore::TextRun::TextRun): Mark constructors as explicit.
1714         * rendering/RenderListMarker.cpp:
1715         (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
1716         RenderBlock::constructTextRun.
1717         (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
1718         * rendering/RenderMenuList.cpp:
1719         (RenderMenuList::updateOptionsWidth): Ditto.
1720         * rendering/RenderThemeIOS.mm:
1721         (WebCore::adjustInputElementButtonStyle): Instead of crashing, mark
1722         form controls rendered with SVG fonts as having 0 width. This isn't
1723         perfect, but fixing this is out of scope for this patch.
1724
1725 2014-06-04  Andreas Kling  <akling@apple.com>
1726
1727         WebKit should adopt journal_mode=wal for all SQLite databases.
1728         <https://webkit.org/b/133496>
1729         <rdar://problem/15600186>
1730
1731         We already had code to enable write-ahead logging, but it didn't work
1732         since calling SQLiteStatement::step() without first calling prepare()
1733         is a no-op.
1734
1735         Converted it to use into a simple executeCommand() instead.
1736
1737         Reviewed by Brady Eidson.
1738
1739         * platform/sql/SQLiteDatabase.cpp:
1740         (WebCore::SQLiteDatabase::open):
1741
1742 2014-06-04  Radu Stavila  <stavila@adobe.com>
1743
1744         REGRESSION: [CSS Regions] Regions with overflow:auto generate scrollbars even if the content flows into the following regions and as such, should not be scrolled
1745         https://bugs.webkit.org/show_bug.cgi?id=133481
1746
1747         Reviewed by Antti Koivisto.
1748
1749         When enlarging the layout overflow of a scrollable region, the portion of the content that flows
1750         in the region must be taken into consideration. If the content continues to flow into the next
1751         region, the layout overflow of the current region must not be enlarged.
1752
1753         Test: fast/regions/scrollable-first-region.html
1754
1755         * rendering/RenderFlowThread.cpp:
1756         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1757
1758 2014-06-03  Benjamin Poulain  <benjamin@webkit.org>
1759
1760         Fix some corner cases of :hover and :active in quirks mode
1761         https://bugs.webkit.org/show_bug.cgi?id=133493
1762
1763         Reviewed by Andreas Kling.
1764
1765         Previously, the quirks mode of :hover and :active were evaluated from the SelectorFragment
1766         in fragmentOnlyMatchesLinksInQuirksMode(). There were two problems with that approach:
1767         1) The FragmentGenerator optimizes out some filter when they always match or can never match.
1768            Those fragment should still qualify :hover and :active, but they were lost
1769            for fragmentOnlyMatchesLinksInQuirksMode().
1770         2) Explicitely listing every attribute of SelectorFragment in fragmentOnlyMatchesLinksInQuirksMode()
1771            was extremly fragile. When :not() and :-webkit-any() were added, we forgot to update the quirks
1772            exceptions.
1773
1774         This patch moves the quirks mode exception code from the code generator to the Fragment generator.
1775         The useless filters are no longer ignored for the quirks, and we don't need to update the quirks mode detection
1776         with every change of SelectorFragment.
1777
1778         It is inefficient and ugly, but that is how that quirks is defined. It is only a problem for compilation,
1779         execution time remains unchanged.
1780
1781         * cssjit/SelectorCompiler.cpp:
1782         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
1783         (WebCore::SelectorCompiler::addPseudoClassType):
1784         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1785         (WebCore::SelectorCompiler::pseudoClassOnlyMatchesLinksInQuirksMode):
1786         (WebCore::SelectorCompiler::constructFragments):
1787         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
1788         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode): Deleted.
1789
1790 2014-06-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1791
1792         Need to check invalid scheme in navigator content utils 
1793         https://bugs.webkit.org/show_bug.cgi?id=133296
1794
1795         Reviewed by Darin Adler.
1796
1797         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1798         (WebCore::verifyProtocolHandlerScheme): Just fix a wrong typo.
1799
1800 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
1801
1802         WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
1803         https://bugs.webkit.org/show_bug.cgi?id=133472
1804         <rdar://problem/15686848>
1805
1806         Reviewed by Simon Fraser.
1807
1808         * WebCore.exp.in:
1809
1810 2014-06-03  Yoav Weiss  <yoav@yoav.ws>
1811
1812         Refactor the srcset parser into its own file
1813         https://bugs.webkit.org/show_bug.cgi?id=133480
1814
1815         Reviewed by Andreas Kling.
1816
1817         No new tests, since this patch doesn't change the parser's behavior.
1818
1819         This patch moves the srcset parser into its own file,
1820         in order to prepare the code for alignment with recent spec changes.
1821
1822         * CMakeLists.txt:
1823         * html/HTMLImageElement.cpp:
1824         * html/parser/HTMLParserIdioms.cpp:
1825         (WebCore::compareByScaleFactor): Deleted.
1826         (WebCore::parseDescriptors): Deleted.
1827         (WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
1828         (WebCore::bestFitSourceForImageAttributes): Deleted.
1829         * html/parser/HTMLParserIdioms.h:
1830         (WebCore::ImageWithScale::ImageWithScale): Deleted.
1831         (WebCore::ImageWithScale::imageURL): Deleted.
1832         (WebCore::ImageWithScale::scaleFactor): Deleted.
1833         * html/parser/HTMLPreloadScanner.cpp:
1834         * html/parser/HTMLSrcsetParser.cpp: Added.
1835         (WebCore::compareByScaleFactor):
1836         (WebCore::parseDescriptors):
1837         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
1838         (WebCore::bestFitSourceForImageAttributes):
1839         * html/parser/HTMLSrcsetParser.h: Added.
1840         (WebCore::ImageWithScale::ImageWithScale):
1841         (WebCore::ImageWithScale::imageURL):
1842         (WebCore::ImageWithScale::scaleFactor):
1843
1844 2014-06-03  Mario Sanchez Prada  <mario.prada@samsung.com>
1845
1846         [ATK] accessibility/textarea-selected-text-range.html is failing
1847         https://bugs.webkit.org/show_bug.cgi?id=133479
1848
1849         Reviewed by Chris Fleizach.
1850
1851         Implement atk_text_set_caret_offset() in terms of
1852         atk_text_set_selection() for zero-length selections.
1853
1854         No new tests needed, the following test should just start
1855         passing again now: accessibility/textarea-selected-text-range.html.
1856
1857         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1858         (webkitAccessibleTextSetCaretOffset): Reimplemented this function
1859         in terms of webkitAccessibleTextSetSelection().
1860
1861 2014-06-03  Alex Christensen  <achristensen@webkit.org>
1862
1863         Corrected arm64 assertion in css jit.
1864
1865         Rubber stamped by Benjamin Poulain.
1866
1867         * cssjit/StackAllocator.h:
1868         (WebCore::StackAllocator::pop):
1869         Changed assertion from incorrectly matching x86_64 to using the correct minimum offset,
1870         taking into account that a stackUnitInBytes is used for two registers on arm64
1871         except the last stack unit, which could only be used for one register if there are
1872         an odd number of registers.
1873
1874 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
1875
1876         [iOS] Start ignoring common bogus viewport parameters
1877         https://bugs.webkit.org/show_bug.cgi?id=133466
1878         <rdar://problem/16203396>
1879
1880         Reviewed by Sam Weinig.
1881
1882         Incorrect viewports are spreading really quickly lately. We have to start ignoring
1883         some combinations of arguments as they are almost always used incorrectly, causing
1884         a poor user experience on those websites.
1885
1886         * dom/ViewportArguments.cpp:
1887         (WebCore::finalizeViewportArguments):
1888
1889 2014-06-03  Yusuke Suzuki  <utatane.tea@gmail.com>
1890
1891         CSS JIT: add support for the "any" pseudo class
1892         https://bugs.webkit.org/show_bug.cgi?id=133473
1893
1894         Reviewed by Benjamin Poulain.
1895
1896         Add support for the :any pseudo class.
1897
1898         Test: fast/selectors/pseudo-class-any.html
1899
1900         * cssjit/SelectorCompiler.cpp:
1901         (WebCore::SelectorCompiler::addPseudoClassType):
1902         (WebCore::SelectorCompiler::minimumRegisterRequirements):
1903         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1904         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesAnyPseudoClass):
1905
1906 2014-06-02  Jer Noble  <jer.noble@apple.com>
1907
1908         Update PlatformTimeRanges to use MediaTime rather than doubles for time values.
1909         https://bugs.webkit.org/show_bug.cgi?id=133454
1910
1911         Reviewed by Eric Carlson.
1912
1913         PlatformTimeRanges will now use MediaTime, so operations at the platform level won't
1914         lose precision when converting to and from doubles and rational time values like CMTime.
1915
1916         * Modules/mediasource/SourceBuffer.cpp:
1917         (WebCore::currentTimeFudgeFactor):
1918         (WebCore::SourceBuffer::hasCurrentTime):
1919         (WebCore::SourceBuffer::hasFutureTime):
1920         (WebCore::SourceBuffer::canPlayThrough):
1921         * html/HTMLMediaElement.cpp:
1922         (WebCore::HTMLMediaElement::parseAttribute):
1923         * html/TimeRanges.cpp:
1924         (WebCore::TimeRanges::TimeRanges):
1925         (WebCore::TimeRanges::start):
1926         (WebCore::TimeRanges::end):
1927         (WebCore::TimeRanges::add):
1928         (WebCore::TimeRanges::contain):
1929         (WebCore::TimeRanges::find):
1930         (WebCore::TimeRanges::nearest):
1931         (WebCore::TimeRanges::totalDuration):
1932         * platform/graphics/MediaPlayerPrivate.h:
1933         (WebCore::MediaPlayerPrivateInterface::seekable):
1934         * platform/graphics/PlatformTimeRanges.cpp:
1935         (WebCore::PlatformTimeRanges::create):
1936         (WebCore::PlatformTimeRanges::PlatformTimeRanges):
1937         (WebCore::PlatformTimeRanges::invert):
1938         (WebCore::PlatformTimeRanges::start):
1939         (WebCore::PlatformTimeRanges::end):
1940         (WebCore::PlatformTimeRanges::add):
1941         (WebCore::PlatformTimeRanges::contain):
1942         (WebCore::PlatformTimeRanges::find):
1943         (WebCore::PlatformTimeRanges::nearest):
1944         (WebCore::PlatformTimeRanges::totalDuration):
1945         * platform/graphics/PlatformTimeRanges.h:
1946         (WebCore::PlatformTimeRanges::Range::Range):
1947         (WebCore::PlatformTimeRanges::Range::isPointInRange):
1948         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1949         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
1950         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1951         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
1952         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1953         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
1954         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1955         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
1956         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Deleted.
1957         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1958         (WebCore::MediaPlayerPrivateQTKit::buffered):
1959         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1960         (WebCore::MediaPlayerPrivateGStreamer::buffered):
1961         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1962         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
1963
1964 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
1965
1966         [iOS][WK2] Align the highlight rects with device pixels
1967         https://bugs.webkit.org/show_bug.cgi?id=133464
1968
1969         Reviewed by Enrica Casucci.
1970
1971         Add utility functions to pixel align points and rects.
1972
1973         * WebCore.exp.in:
1974         * platform/graphics/FloatPoint.h:
1975         (WebCore::flooredToDevicePixels):
1976         (WebCore::ceiledToDevicePixels):
1977         * platform/graphics/FloatRect.cpp:
1978         (WebCore::enclosingRectExtendedToDevicePixels):
1979         * platform/graphics/FloatRect.h:
1980
1981 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
1982
1983         Prepopulated tiles may never be unparented from TileGrids with aggressive tile retention on
1984         https://bugs.webkit.org/show_bug.cgi?id=133471
1985
1986         Reviewed by Simon Fraser.
1987
1988         * platform/graphics/ca/mac/TileController.h:
1989         * platform/graphics/ca/mac/TileGrid.h:
1990         (WebCore::TileGrid::TileCohortInfo::TileCohortInfo):
1991         * platform/graphics/ca/mac/TileGrid.mm:
1992         (WebCore::TileGrid::TileCohortInfo::timeUntilExpiration):
1993         (WebCore::TileGrid::cohortRemovalTimerFired):
1994         Factor timeUntilExpiration() out of cohortRemovalTimerFired().
1995
1996         (WebCore::TileGrid::revalidateTiles):
1997         Ensure that secondary tiles that never touch the primary coverage rect
1998         are still unparented eventually (after 2 seconds, the same lifetime we use
1999         for cohorts in non-aggressive retention).
2000         Schedule another revalidateTiles if we left parented secondary tiles behind.
2001
2002 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
2003
2004         TileGrid::prepopulateRect populates the wrong tiles if scale != 1
2005         https://bugs.webkit.org/show_bug.cgi?id=133470
2006
2007         Reviewed by Simon Fraser.
2008
2009         * page/FrameView.cpp:
2010         (WebCore::FrameView::requestScrollPositionUpdate):
2011         * platform/graphics/ca/mac/TileGrid.mm:
2012         (WebCore::TileGrid::prepopulateRect):
2013         (WebCore::TileGrid::revalidateTiles):
2014         prepopulateRect takes rects in "content" coordinates, but when later passed to
2015         ensureTilesForRect, they're expected to be in the same coordinate space as the layer's
2016         visible rect, and are scaled up. So, apply the inverse scale to counter that.
2017
2018 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
2019
2020         Minor TileCoverageMap refinements
2021         https://bugs.webkit.org/show_bug.cgi?id=133468
2022
2023         Reviewed by Simon Fraser.
2024
2025         * platform/graphics/ca/mac/TileController.mm:
2026         (WebCore::TileController::setContentsScale):
2027         * platform/graphics/ca/mac/TileCoverageMap.h:
2028         * platform/graphics/ca/mac/TileCoverageMap.mm:
2029         (WebCore::TileCoverageMap::TileCoverageMap):
2030         (WebCore::TileCoverageMap::setDeviceScaleFactor):
2031         Keep the TileCoverageMap's contentsScale at the device scale factor, so that it
2032         looks sharp on non-1x displays.
2033
2034         (WebCore::TileCoverageMap::update):
2035         Decrease the height available for the TileCoverageMap by the topContentInset;
2036         it's already being vertically offset by the topContentInset, but the height was
2037         not adjusted, so it would run off the bottom of the window.
2038
2039         * platform/graphics/ca/mac/TileGrid.mm:
2040         (WebCore::TileGrid::drawTileMapContents):
2041         If using aggressive tile retention (and thus not coloring tiles based on age),
2042         dim tiles that aren't in the visible cohort.
2043
2044 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
2045
2046         Fix a typo, TileGrid::updateTilerLayerProperties
2047         https://bugs.webkit.org/show_bug.cgi?id=133474
2048
2049         Reviewed by Anders Carlsson.
2050
2051         * platform/graphics/ca/mac/TileController.mm:
2052         (WebCore::TileController::setAcceleratesDrawing):
2053         (WebCore::TileController::setTilesOpaque):
2054         (WebCore::TileController::setTileDebugBorderWidth):
2055         (WebCore::TileController::setTileDebugBorderColor):
2056         * platform/graphics/ca/mac/TileGrid.h:
2057         * platform/graphics/ca/mac/TileGrid.mm:
2058         (WebCore::TileGrid::updateTileLayerProperties):
2059         (WebCore::TileGrid::updateTilerLayerProperties):
2060         s/updateTilerLayerProperties/updateTileLayerProperties/g
2061
2062 2014-06-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2063
2064         [SOUP] ResourceLoadTiming.responseStart is always 0
2065         https://bugs.webkit.org/show_bug.cgi?id=133469
2066
2067         Reviewed by Sergio Villar Senin.
2068
2069         * platform/network/soup/ResourceHandleSoup.cpp:
2070         (WebCore::sendRequestCallback): Record the responseStart time.
2071
2072 2014-06-02  David Kilzer  <ddkilzer@apple.com>
2073
2074         [iOS] WebCore fails to build: platform/network/mac/ResourceHandleMac.mm:729:62: error: use of undeclared identifier '_CFURLConnectionCopyTimingData'
2075         <http://webkit.org/b/133445>
2076         <rdar://problem/17090035>
2077
2078         Reviewed by Alexey Proskuryakov.
2079
2080         * platform/network/mac/ResourceHandleMac.mm: Attempt to fix the
2081         build by including a private header and local declaration.
2082
2083 2014-05-31  Anders Carlsson  <andersca@apple.com>
2084
2085         Change DeferrableOneShotTimer to use std::function instead of being a class template
2086         https://bugs.webkit.org/show_bug.cgi?id=133423
2087
2088         Reviewed by Antti Koivisto.
2089
2090         Also, add a new constructor to DeferrableOneShotTimer that takes an std::function. Change the callback
2091         to not pass a DeferrableOneShotTimer& anymore. Change the delay parameter to use std::chrono::milliseconds.
2092
2093         * css/CSSImageGeneratorValue.cpp:
2094         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
2095         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
2096         * css/CSSImageGeneratorValue.h:
2097         * html/HTMLPlugInImageElement.cpp:
2098         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
2099         * html/HTMLPlugInImageElement.h:
2100         * loader/cache/CachedResource.cpp:
2101         (WebCore::deadDecodedDataDeletionIntervalForResourceType):
2102         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
2103         (WebCore::CachedResource::decodedDataDeletionTimerFired):
2104         * loader/cache/CachedResource.h:
2105         * loader/cache/MemoryCache.cpp:
2106         (WebCore::MemoryCache::MemoryCache):
2107         * loader/cache/MemoryCache.h:
2108         (WebCore::MemoryCache::setDeadDecodedDataDeletionInterval):
2109         (WebCore::MemoryCache::deadDecodedDataDeletionInterval):
2110         * platform/Timer.h:
2111         (WebCore::Timer::Timer):
2112         (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
2113         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
2114         (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
2115         * platform/graphics/cg/SubimageCacheWithTimer.h:
2116
2117 2014-06-02  Benjamin Poulain  <benjamin@webkit.org>
2118
2119         Make pseudo element matching for style resolution more JIT friendly
2120         https://bugs.webkit.org/show_bug.cgi?id=133441
2121
2122         Reviewed by Antti Koivisto.
2123
2124         Sharing pseudo elements is a complicated mess shared between the SelectorChecker
2125         and the RuleCollector.
2126
2127         For compiling pseudo element matching, it would be best if all the complexity could
2128         be moved to compile time instead of runtime. It is also preferable to keep the compiler
2129         independant of the RuleCollector implementation's detail.
2130
2131         This patch is a first step toward that goal. The main objective here is to make
2132         "dynamicPseudo" completely internal to the SelectorChecker.
2133         This is mostly a mechanical change, it is likely PseudoElement matching could be simplified
2134         further but that is not attempted here.
2135
2136         Test: fast/css/style-sharing-empty-rule-modification.html
2137
2138         * css/ElementRuleCollector.cpp:
2139         (WebCore::ElementRuleCollector::ruleMatches):
2140         The condition regarding pseudo element matching has been moved into SelectorChecker::match().
2141
2142         This creates an extra cost for querySelector(), but that should be fine since the vast majority
2143         of selectors are JIT compiled and never use SelectorChecker in the first place.
2144
2145         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2146         The loop is changed such that the tree marking (Style::setHasPseudoStyle) could be moved
2147         to SelectorChecker.
2148
2149         The conditions about the security origin for getMatchedCSSRules() and the empty style rules
2150         are moved prior to the call to ElementRuleCollector::ruleMatches(). This ensure we keep the same
2151         behavior of not adding the pseudo style for empty rules (this could also help with tree marking
2152         in general but empty rules are probably uncommon).
2153
2154         There is one behavior change from making this loop simpler: the SharingRules and StyleInvalidation
2155         modes now update their ruleRange. It is useless but it is simpler.
2156
2157         * css/ElementRuleCollector.h:
2158         * css/SelectorChecker.cpp:
2159         (WebCore::SelectorChecker::matchRecursively):
2160         The tree marking has been moved here.
2161
2162         * css/SelectorChecker.h:
2163         (WebCore::SelectorChecker::match):
2164         The pseudo element matching has been moved here.
2165
2166         * css/StyleResolver.h:
2167         (WebCore::checkRegionSelector):
2168         * dom/SelectorQuery.cpp:
2169         (WebCore::SelectorDataList::selectorMatches):
2170
2171 2014-06-02  Jeremy Jones  <jeremyj@apple.com>
2172
2173         Send external playback properties to fullscreen.
2174         https://bugs.webkit.org/show_bug.cgi?id=133366
2175
2176         Reviewed by Simon Fraser.
2177
2178         Refactor property updates in WebVideoFullscreenModelMediaElement and update
2179         setExternalPlayback on webkitcurrentplaybacktargetiswirelesschangedEvent.
2180
2181         * WebCore.exp.in: Add export for setExternalPlayback.
2182         * platform/ios/WebVideoFullscreenInterface.h: add setExternalPlayback
2183         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: add setExternalPlayback
2184         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2185         (-[WebAVPlayerController isPlayingOnExternalScreen]): added
2186         (+[WebAVPlayerController keyPathsForValuesAffectingPlayingOnExternalScreen]): added
2187         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): added
2188         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): added
2189         * platform/ios/WebVideoFullscreenModelMediaElement.h: add updateForEventName
2190         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2191         (WebVideoFullscreenModelMediaElement::setMediaElement): refactor property changes into updateForEventName()
2192         (WebVideoFullscreenModelMediaElement::handleEvent): refactor property changes into updateForEventName()
2193         (WebVideoFullscreenModelMediaElement::updateForEventName): remove duplicate code, implement for setExternalPlayback
2194
2195 2014-06-02  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
2196
2197         WebCore build fix for webreplay
2198         https://bugs.webkit.org/show_bug.cgi?id=133401
2199
2200         Reviewed by Darin Adler.
2201
2202         * replay/MemoizedDOMResult.cpp:
2203         (WebCore::MemoizedDOMResultBase::createFromEncodedResult):
2204         Add a default nullptr return in order to avoid a gcc warning.
2205         The warning is because of a non-void method that has a case which doesn't return.
2206         * replay/ReplayController.cpp:
2207         (WebCore::ReplayController::setForceDeterministicSettings):
2208         Guard the ScrollingCoordinator with the appropriate #ifdef.
2209         * replay/SerializationMethods.cpp:
2210         Guard the KeypressCommand with COCOA as it is only present there.
2211
2212 2014-06-02  Jer Noble  <jer.noble@apple.com>
2213
2214         Further unreviewed GTK build fix after r169536.
2215
2216         Update the m_duration contructor in MediaSourceGStreamer.
2217
2218         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
2219         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
2220
2221 2014-06-02  Jer Noble  <jer.noble@apple.com>
2222
2223         Unreviewed GTK build fix after r169536.
2224
2225         Update MediaSourceGStreamer to match new duration parameters.
2226
2227         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
2228         (WebCore::MediaSourceGStreamer::setDuration): Ditto.
2229         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
2230         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2231
2232 2014-06-02  Jer Noble  <jer.noble@apple.com>
2233
2234         [MSE][Mac] Media does not generate 'ended' event when playing to duration.
2235         https://bugs.webkit.org/show_bug.cgi?id=133452
2236
2237         Reviewed by Eric Carlson.
2238
2239         Add a boundaryTimeObserver to the AVSampleBufferRenderSynchronizer to detect when
2240         playback crosses the duration boundary, and pause in that event. Also refuse to begin
2241         playback if the currentTime is beyond the duration. Also, pause playback if duration
2242         becomes less than currentTime.
2243
2244         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2245         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2246         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
2247         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
2248         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
2249         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
2250         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
2251
2252         Update MediaSource::duration() and ::setDuration() to take and give MediaTimes rather than doubles:
2253         * Modules/mediasource/MediaSource.cpp:
2254         (WebCore::MediaSource::duration): double -> MediaTime.
2255         (WebCore::MediaSource::setDuration): Ditto.
2256         (WebCore::MediaSource::streamEndedWithError): Ditto.
2257         * platform/graphics/MediaSourcePrivate.h: Ditto.
2258         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
2259         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2260         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Ditto.
2261         (WebCore::MediaSourcePrivateAVFObjC::duration): Ditto.
2262         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Ditto.
2263         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2264         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Ditto.
2265         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Ditto.
2266         (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
2267         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
2268         (WebCore::MockMediaPlayerMediaSource::updateDuration): Ditto.
2269         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2270         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2271         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Ditto.
2272         (WebCore::MockMediaSourcePrivate::duration): Ditto.
2273         (WebCore::MockMediaSourcePrivate::setDuration): Ditto.
2274         * platform/mock/mediasource/MockMediaSourcePrivate.h:
2275
2276 2014-06-02  Zalan Bujtas  <zalan@apple.com>
2277
2278         Rename ImagePaintingContext to ImagePaintingOptions.
2279         https://bugs.webkit.org/show_bug.cgi?id=133451
2280
2281         Reviewed by Simon Fraser.
2282
2283         No change in functionality.
2284
2285         * WebCore.exp.in:
2286         * html/HTMLCanvasElement.cpp:
2287         (WebCore::HTMLCanvasElement::paint):
2288         * html/canvas/CanvasRenderingContext2D.cpp:
2289         (WebCore::CanvasRenderingContext2D::drawImage):
2290         * platform/graphics/GraphicsContext.cpp:
2291         (WebCore::GraphicsContext::drawImage):
2292         (WebCore::GraphicsContext::drawTiledImage):
2293         (WebCore::GraphicsContext::drawImageBuffer):
2294         * platform/graphics/GraphicsContext.h:
2295         (WebCore::ImagePaintingOptions::ImagePaintingOptions):
2296         (WebCore::ImagePaintingContext::ImagePaintingContext): Deleted.
2297         * rendering/RenderBoxModelObject.cpp:
2298         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2299         * rendering/RenderEmbeddedObject.cpp:
2300         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2301         * rendering/RenderImage.cpp:
2302         (WebCore::RenderImage::paintIntoRect):
2303         * rendering/RenderSnapshottedPlugIn.cpp:
2304         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2305
2306 2014-05-31  Brent Fulgham  <bfulgham@apple.com>
2307
2308         REGRESSION (r154622): Borders disappear when hovering over cells in table
2309         https://bugs.webkit.org/show_bug.cgi?id=133057
2310         <rdar://problem/15922359>
2311
2312         Reviewed by Tim Horton.
2313
2314         * rendering/RenderTableCell.cpp:
2315         (WebCore::RenderTableCell::paintCollapsedBorders): Revert recent
2316         non-edge collapsed border optimization due to drawing
2317         regressions.
2318
2319 2014-06-02  Zalan Bujtas  <zalan@apple.com>
2320
2321         Provide better encapsulation for image related painting properties.
2322         https://bugs.webkit.org/show_bug.cgi?id=133434
2323
2324         Reviewed by Darin Adler.
2325
2326         Image related drawing property list keeps growing for the functions below and results in
2327         multiple overloadings with seemingly random default parameters.
2328         
2329         GraphicsContext::drawImage()
2330         GraphicsContext::drawTiledImage()
2331         GraphicsContext::drawImageBuffer()
2332         
2333         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
2334         introducing a new property does not result in yet another overloaded function.
2335
2336         No change in functionality.
2337
2338         * WebCore.exp.in:
2339         * html/HTMLCanvasElement.cpp:
2340         (WebCore::HTMLCanvasElement::paint):
2341         * html/canvas/CanvasRenderingContext2D.cpp:
2342         (WebCore::CanvasRenderingContext2D::drawImage):
2343         (WebCore::CanvasRenderingContext2D::compositeBuffer):
2344         * platform/graphics/GraphicsContext.cpp:
2345         (WebCore::GraphicsContext::drawImage):
2346         (WebCore::GraphicsContext::drawTiledImage):
2347         (WebCore::GraphicsContext::drawImageBuffer):
2348         * platform/graphics/GraphicsContext.h:
2349         (WebCore::ImagePaintingContext::ImagePaintingContext):
2350         * platform/graphics/ShadowBlur.cpp:
2351         (WebCore::ShadowBlur::endShadowLayer):
2352         * platform/graphics/cairo/ImageBufferCairo.cpp:
2353         (WebCore::ImageBuffer::draw):
2354         * platform/graphics/filters/FEComposite.cpp:
2355         (WebCore::FEComposite::platformApplySoftware):
2356         * rendering/FilterEffectRenderer.cpp:
2357         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
2358         * rendering/RenderBoxModelObject.cpp:
2359         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2360         * rendering/RenderEmbeddedObject.cpp:
2361         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2362         * rendering/RenderImage.cpp:
2363         (WebCore::RenderImage::paintReplaced):
2364         (WebCore::RenderImage::paintIntoRect):
2365         * rendering/RenderSnapshottedPlugIn.cpp:
2366         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2367
2368 2014-06-02  Commit Queue  <commit-queue@webkit.org>
2369
2370         Unreviewed, rolling out r169529.
2371         https://bugs.webkit.org/show_bug.cgi?id=133447
2372
2373         caused assert in drawImage() (Requested by zalan on #webkit).
2374
2375         Reverted changeset:
2376
2377         "Provide better encapsulation for image related painting
2378         properties."
2379         https://bugs.webkit.org/show_bug.cgi?id=133434
2380         http://trac.webkit.org/changeset/169529
2381
2382 2014-06-02  Zalan Bujtas  <zalan@apple.com>
2383
2384         Provide better encapsulation for image related painting properties.
2385         https://bugs.webkit.org/show_bug.cgi?id=133434
2386
2387         Reviewed by Darin Adler.
2388
2389         Image related drawing property list keeps growing for the functions below and results in
2390         multiple overloadings with seemingly random default parameters.
2391         
2392         GraphicsContext::drawImage()
2393         GraphicsContext::drawTiledImage()
2394         GraphicsContext::drawImageBuffer()
2395         
2396         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
2397         introducing a new property does not result in yet another overloaded function.
2398
2399         No change in functionality.
2400
2401         * WebCore.exp.in:
2402         * html/HTMLCanvasElement.cpp:
2403         (WebCore::HTMLCanvasElement::paint):
2404         * html/canvas/CanvasRenderingContext2D.cpp:
2405         (WebCore::CanvasRenderingContext2D::drawImage):
2406         (WebCore::CanvasRenderingContext2D::compositeBuffer):
2407         * platform/graphics/GraphicsContext.cpp:
2408         (WebCore::GraphicsContext::drawImage):
2409         (WebCore::GraphicsContext::drawTiledImage):
2410         (WebCore::GraphicsContext::drawImageBuffer):
2411         * platform/graphics/GraphicsContext.h:
2412         (WebCore::ImagePaintingContext::ImagePaintingContext):
2413         * platform/graphics/ShadowBlur.cpp:
2414         (WebCore::ShadowBlur::endShadowLayer):
2415         * platform/graphics/cairo/ImageBufferCairo.cpp:
2416         (WebCore::ImageBuffer::draw):
2417         * platform/graphics/filters/FEComposite.cpp:
2418         (WebCore::FEComposite::platformApplySoftware):
2419         * rendering/FilterEffectRenderer.cpp:
2420         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
2421         * rendering/RenderBoxModelObject.cpp:
2422         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2423         * rendering/RenderEmbeddedObject.cpp:
2424         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
2425         * rendering/RenderImage.cpp:
2426         (WebCore::RenderImage::paintReplaced):
2427         (WebCore::RenderImage::paintIntoRect):
2428         * rendering/RenderSnapshottedPlugIn.cpp:
2429         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2430
2431 2014-06-02  Kiran  <kiran.guduru@samsung.com>
2432
2433         Add mock DTMFSender support.
2434         https://bugs.webkit.org/show_bug.cgi?id=133298
2435
2436         Reviewed by Eric Carlson.
2437
2438         Implemented mock implementation for RTCPeerConnectionHandler. Now creating
2439         RTCDTMFSenderHandlerMock and returning while creating DTMFSender instead of
2440         returning null.
2441        
2442         Test: fast/mediastream/RTCPeerConnection-dtmf.html.
2443
2444         * CMakeLists.txt:
2445         * platform/mock/RTCDTMFSenderHandlerMock.cpp: Added.
2446         (WebCore::RTCDTMFSenderHandlerMock::RTCDTMFSenderHandlerMock):
2447         (WebCore::RTCDTMFSenderHandlerMock::setClient):
2448         (WebCore::RTCDTMFSenderHandlerMock::insertDTMF):
2449         * platform/mock/RTCDTMFSenderHandlerMock.h: Added.
2450         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2451         (WebCore::RTCPeerConnectionHandlerMock::createDTMFSender):
2452
2453 2014-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2454
2455         [GTK] media controls should prevent 'click' events from reaching the page
2456         https://bugs.webkit.org/show_bug.cgi?id=133402
2457
2458         Reviewed by Eric Carlson.
2459
2460         When handling events, we events we need to return true in order
2461         that the superclass gets the value and prevents the execution of
2462         the default event handler in the page.
2463
2464         Test: media/media-controls-cancel-events.html
2465
2466         * Modules/mediacontrols/mediaControlsGtk.js:
2467         (ControllerGtk.prototype.handleMuteButtonMouseOver):
2468         (ControllerGtk.prototype.handleVolumeBoxMouseOut):
2469         (ControllerGtk.prototype.handleCaptionButtonClicked):
2470         (ControllerGtk.prototype.handleCaptionButtonMouseOver):
2471         (ControllerGtk.prototype.handleCaptionButtonShowMenu):
2472         (ControllerGtk.prototype.handleCaptionButtonMouseOut):
2473         (ControllerGtk.prototype.handleCaptionMouseOut): Return true to
2474         prevent forwarding the event execution.
2475
2476 2014-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>
2477
2478         CSS JIT: add support for the "not" pseudo class
2479         https://bugs.webkit.org/show_bug.cgi?id=133314
2480
2481         Reviewed by Benjamin Poulain.
2482
2483         Add :not pseudo class support to CSS JIT. Current implementation
2484         doesn't support visitedMatchType. So when link pseudo class appears in
2485         :not sub fragment, fallback to the non-JIT implementation.
2486
2487         Tests: fast/selectors/not-active-hover-quirks.html
2488                fast/selectors/not-active-hover-strict.html
2489                fast/selectors/pseudo-class-not.html
2490
2491         * cssjit/SelectorCompiler.cpp:
2492         (WebCore::SelectorCompiler::addPseudoClassType):
2493         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2494         (WebCore::SelectorCompiler::constructFragments):
2495         (WebCore::SelectorCompiler::minimumRegisterRequirements):
2496         (WebCore::SelectorCompiler::computeBacktrackingInformation):
2497         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2498         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
2499         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2500         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
2501         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2502         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
2503         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation): Deleted.
2504
2505 2014-06-01  Jer Noble  <jer.noble@apple.com>
2506
2507         [MSE] Appends of overlapping sample data do not clear existing samples properly.
2508         https://bugs.webkit.org/show_bug.cgi?id=133435
2509
2510         Reviewed by Darin Adler.
2511
2512         Test: media/media-source/media-source-overlapping-append.html
2513
2514         The MSE spec has a spec error in how it removes overlapping frames. The intention seems to be
2515         to check for overlapping samples only when the incoming sample increases the highest presentation time
2516         field. But due to a mismatch in the range of a sample, defined as [start, end), and the check, which 
2517         treats the end as inclusive, the overlapping check is almost never run.
2518
2519         Add the sample comparison logic to match [start, end) ranges, and rename the existing check to differentiate
2520         it from the new one:
2521         * Modules/mediasource/SampleMap.cpp:
2522         (WebCore::SamplePresentationTimeIsInsideRangeComparator::operator()):
2523         (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
2524         (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
2525         (WebCore::SampleMap::findSamplesWithinPresentationRange):
2526         * Modules/mediasource/SampleMap.h:
2527
2528         Update the overlapping check to occur whenever the highest presentation time increases, and update the
2529         logic within that check to catch all overlapping frames.
2530         * Modules/mediasource/SourceBuffer.cpp:
2531         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2532         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2533         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
2534         * Modules/mediasource/SourceBuffer.h:
2535         * WebCore.exp.in:
2536
2537         Add a dump method to MediaSample so that samples can be easily converted to a string for testing.
2538         * platform/MediaSample.h:
2539         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2540         (WebCore::MediaSampleAVFObjC::presentationSize):
2541         (WebCore::MediaSampleAVFObjC::dump):
2542
2543         Update the Mock MSE implementation to pass along a "generation" field, to aid in testing.
2544         * platform/mock/mediasource/MockBox.cpp:
2545         (WebCore::MockSampleBox::MockSampleBox):
2546         * platform/mock/mediasource/MockBox.h:
2547         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2548         (WebCore::MockMediaSample::dump):
2549
2550         Add a method to internals to dump the buffered samples to string.
2551         * Modules/mediasource/SourceBuffer.cpp:
2552         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
2553         * Modules/mediasource/SourceBuffer.h:
2554         * testing/Internals.cpp:
2555         (WebCore::Internals::bufferedSamplesForTrackID):
2556         * testing/Internals.h:
2557         * testing/Internals.idl:
2558
2559 2014-06-01  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
2560
2561         getBBox() returns (0,0) when width or height is zero.
2562         https://bugs.webkit.org/show_bug.cgi?id=93290
2563
2564         Reviewed by Philip Rogers.
2565
2566         The SVG spec states that a width or height of zero for  rects, circles and
2567         ellipses is valid but disables rendering of that shape.
2568         In this case, getBBox() should return the actual bounding box of the element.
2569         Previously, WebKit always returned (0,0,0,0) rather than the
2570         correct bounding box. This patch fixes that. 
2571
2572         Rects and ellipses both now follow the same behaviour where
2573         the fall-back code path is only used when the shape will render (e.g. not
2574         when a dimension <= 0).
2575   
2576         This necessitates calling calculateRadiiAndCenter for ellipses even
2577         when the calculated values will be discarded in the fall back code path.
2578         But calculateRadiiAndCenter is cheap and this avoids making changes 
2579         elsewhere to stop CG drawing a zero width (or height) ellipse.  
2580
2581         Tests: svg/custom/getBBox-js-circle-zerodimension.html
2582                svg/custom/getBBox-js-ellipse-zerodimension.html
2583                svg/custom/getBBox-js-rect-zerodimension.html
2584
2585         * rendering/svg/RenderSVGEllipse.cpp:
2586         (WebCore::RenderSVGEllipse::updateShapeFromElement):
2587         Only follow fall-back code path when shape renders. 
2588         width||height==0 is not an error case so calculate bounding box.        
2589
2590         * rendering/svg/RenderSVGRect.cpp:
2591         (WebCore::RenderSVGRect::updateShapeFromElement):
2592         Only follow fall-back code path when shape renders. 
2593         rx||ry==0 is not an error case so calculate bounding box.        
2594
2595 2014-06-01  Simon Fraser  <simon.fraser@apple.com>
2596
2597         Don't scroll to non-integral scroll offsets
2598         https://bugs.webkit.org/show_bug.cgi?id=133436
2599         <rdar://problem/17088336>
2600
2601         Reviewed by Darin Adler.
2602
2603         With the gradual migration of scroll offsets to floating point, we ended
2604         up with a fully floating point code path been event scroll deltas and
2605         setting scroll positions in the scrolling tree.
2606         
2607         With some input devices (e.g. Logitech scrollwheel mice), the scroll deltas
2608         come in with non-integral values, and that caused the scroll offset to be non-integral,
2609         resulting in fuzzy layer contents. So round the scroll position.
2610
2611         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2612         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
2613
2614 2014-05-31  Anders Carlsson  <andersca@apple.com>
2615
2616         Add a LazyNeverDestroyed class template and use it
2617         https://bugs.webkit.org/show_bug.cgi?id=133425
2618
2619         Reviewed by Darin Adler.
2620
2621         * Modules/webdatabase/DatabaseBackendBase.cpp:
2622         (WebCore::guidMutex):
2623         * crypto/CryptoAlgorithmRegistry.cpp:
2624         (WebCore::registryMutex):
2625         * inspector/WorkerDebuggerAgent.cpp:
2626         * loader/CrossOriginAccessControl.cpp:
2627         (WebCore::isOnAccessControlResponseHeaderWhitelist):
2628         * platform/network/NetworkStateNotifier.cpp:
2629         (WebCore::networkStateNotifier):
2630         * workers/DefaultSharedWorkerRepository.cpp:
2631         (WebCore::DefaultSharedWorkerRepository::instance):
2632         * workers/DefaultSharedWorkerRepository.h:
2633         * workers/WorkerThread.cpp:
2634         (WebCore::threadSetMutex):
2635         * xml/XMLHttpRequest.cpp:
2636         (WebCore::staticData):
2637
2638 2014-06-01  Zalan Bujtas  <zalan@apple.com>
2639
2640         Subpixel rendering: Selection gap produces a pixel line overlap on inline boxes.
2641         https://bugs.webkit.org/show_bug.cgi?id=133429
2642
2643         Reviewed by Simon Fraser.
2644
2645         Do not floor logical right/left values when selection gap is calculated for RenderBlocks.
2646         It produces overlapping line/gap because the floored value is intersecting/too far from the
2647         non-floored content selection rect.
2648
2649         Tests: fast/inline/hidpi-selection-gap-and-inline-selection-have-gap-rtl.html
2650                fast/inline/hidpi-selection-gap-overlaps-inline-selection.html
2651
2652         * rendering/RenderBlock.cpp:
2653         (WebCore::RenderBlock::logicalLeftSelectionGap):
2654         (WebCore::RenderBlock::logicalRightSelectionGap):
2655
2656 2014-05-31  Timothy Horton  <timothy_horton@apple.com>
2657
2658         REGRESSION (r169412): Garbage pixels when vertical rubber-banding on http://yvoschaap.com/pmarca/
2659         https://bugs.webkit.org/show_bug.cgi?id=133418
2660         <rdar://problem/17065494>
2661
2662         Reviewed by Sam Weinig.
2663
2664         * WebCore.exp.in:
2665         * platform/graphics/FloatPoint.h:
2666         (WebCore::toFloatPoint):
2667         * platform/graphics/Image.cpp:
2668         (WebCore::Image::drawTiled):
2669         The manual tiling code previously adjusted the initial
2670         tiling source rect so that if the pattern was out of phase,
2671         the first row and column would paint only the necessary part
2672         of the tile. However, it did not also adjust the destination rect,
2673         so the tile was painted in entirely the wrong place.
2674         Additional testing (by enabling manual tiling mode for all patterned
2675         images and running all of the layout tests) exposed another bug
2676         where the last row and column would paint too much, which
2677         was resolved by clipping to the outer image's destination rect.
2678
2679 2014-05-31  Benjamin Poulain  <benjamin@webkit.org>
2680
2681         CSS JIT cleanup: move two utility functions out of the properties-matcher section
2682         https://bugs.webkit.org/show_bug.cgi?id=133427
2683
2684         Reviewed by Andreas Kling.
2685
2686         Just move the code, no other modification.
2687
2688         * cssjit/SelectorCompiler.cpp:
2689         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
2690         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
2691
2692 2014-05-31  Darin Adler  <darin@apple.com>
2693
2694         Viewport percentage tests that resize the viewport are flaky
2695         https://bugs.webkit.org/show_bug.cgi?id=133351
2696
2697         Reviewed by Anders Carlsson.
2698
2699         * page/FrameView.cpp:
2700         (WebCore::FrameView::setFrameRect): Removed code that explicitly sends a resize event here.
2701         The resize event will be sent as a side effect of layout instead.
2702         (WebCore::FrameView::sendResizeEventIfNeeded): Don't send a resize event until layout is done,
2703         since this is what propagates the new geometry in so the JavaScript code can detect it. Also
2704         simplified the logic and streamlined a little, and added a FIXME about the bad idea here where
2705         the code enqueues an event for an unknown time in the future. Removed the unneeded code that
2706         passes in the DOM window as the target to dispatchWindowEvent, since that gets filled in as the
2707         target by default.
2708
2709 2014-05-31  Anders Carlsson  <andersca@apple.com>
2710
2711         Don't use std::mutex::try_lock to check if we own a mutex
2712         https://bugs.webkit.org/show_bug.cgi?id=133421
2713
2714         Reviewed by Dan Bernstein.
2715
2716         According the C++ standard, calling try_lock on a mutex that's already owned by the current thread
2717         is undefined behavior, so don't do that.
2718
2719         * Modules/webdatabase/DatabaseBackendBase.cpp:
2720         (WebCore::guidToVersionMap):
2721         (WebCore::updateGuidVersionMap):
2722         (WebCore::guidToDatabaseMap):
2723         (WebCore::guidForOriginAndName):
2724
2725 2014-05-30  Enrica Casucci  <enrica@apple.com>
2726
2727         REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
2728         https://bugs.webkit.org/show_bug.cgi?id=133413
2729         <rdar://problem/16948333>
2730
2731         Reviewed by Benjamin Poulain.
2732
2733         Adding utility functions and their exports.
2734
2735         * WebCore.exp.in:
2736         * editing/TextIterator.cpp:
2737         (WebCore::plainTextReplacingNoBreakSpace):
2738         * editing/TextIterator.h:
2739         * editing/VisibleUnits.cpp:
2740         (WebCore::charactersAroundPosition):
2741         (WebCore::characterBeforePosition): Deleted.
2742         * editing/VisibleUnits.h:
2743
2744 2014-05-30  Zalan Bujtas  <zalan@apple.com>
2745
2746         Cleanup temporary setting of image interpolation quality in GraphicsContext::drawImage*
2747         https://bugs.webkit.org/show_bug.cgi?id=133407
2748
2749         Reviewed by Darin Adler.
2750
2751         Add helper class to set/reset image interpolation quality value.
2752
2753         No change in functionality.
2754
2755         * platform/graphics/GraphicsContext.cpp:
2756         (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
2757         (WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer):
2758         (WebCore::GraphicsContext::drawImage):
2759         (WebCore::GraphicsContext::drawTiledImage):
2760         (WebCore::GraphicsContext::drawImageBuffer):
2761
2762 2014-05-30  Myles C. Maxfield  <mmaxfield@apple.com>
2763
2764         Support -apple-system-font on OS X
2765         https://bugs.webkit.org/show_bug.cgi?id=133382
2766
2767         Addressing post-review comments.
2768
2769         * platform/mac/WebFontCache.mm:
2770         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2771
2772 2014-05-30  Prashant Hiremath  <hiremathprashants@gmail.com>
2773
2774         Remove repetitive header in HTMLInputElement.cpp
2775         https://bugs.webkit.org/show_bug.cgi?id=133376
2776
2777         Reviewed by Anders Carlsson.
2778
2779         It is just removal repeative headers hence no test needed.
2780
2781         * html/HTMLInputElement.cpp:
2782
2783 2014-05-30  Zalan Bujtas  <zalan@apple.com>
2784
2785         Remove redundant GraphicsContext::drawImage() function.
2786         https://bugs.webkit.org/show_bug.cgi?id=133347
2787
2788         Reviewed by Simon Fraser.
2789
2790         There are 2 GraphicsContext::drawImage functions with very similar parameter list. This looks
2791         to be a source of confusion and results in passing unneeded parameters.
2792
2793         No change in functionality.
2794
2795         * html/canvas/CanvasRenderingContext2D.cpp:
2796         (WebCore::CanvasRenderingContext2D::drawImage):
2797         (WebCore::drawImageToContext):
2798         * platform/graphics/GraphicsContext.cpp:
2799         (WebCore::GraphicsContext::drawImage):
2800         * platform/graphics/GraphicsContext.h:
2801         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2802         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2803         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2804         (WebCore::BitmapTextureImageBuffer::updateContents):
2805         * rendering/RenderBoxModelObject.cpp:
2806         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2807
2808 2014-05-29  Alex Christensen  <achristensen@webkit.org>
2809
2810         Prepare css jit for arm64 and other architectures.
2811         https://bugs.webkit.org/show_bug.cgi?id=133394
2812
2813         Reviewed by Benjamin Poulain.
2814
2815         * cssjit/FunctionCall.h:
2816         (WebCore::FunctionCall::swapArguments):
2817         * cssjit/RegisterAllocator.h:
2818         Use a designated temporary register on arm64 to prevent using a deallocated argument register to swap argument registers in.
2819         * cssjit/SelectorCompiler.cpp:
2820         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2821         Added assertion to make sure there are enough registers.
2822
2823 2014-05-29  Benjamin Poulain  <benjamin@webkit.org>
2824
2825         CSS JIT: add support for the pseudo classes :hover and :active
2826         https://bugs.webkit.org/show_bug.cgi?id=133295
2827
2828         Reviewed by Andreas Kling.
2829
2830         This patch adds compilation support for :hover and :active. The code generation of both of them is trivial,
2831         most of the patch is improving the infrastructure and safety.
2832
2833         The document compatibility mode is moved to its own typed enum. This ensure the values are exclusives and
2834         the native type is known (unsigned char here). The values are changes to binary flags to take advantage of
2835         test-and-branch on ARM64 (not used explicitely, it is automatically generated by the MacroAssembler).
2836
2837         The other important refactoring is the code updating the flags on RenderStyle::NonInheritedFlags.
2838         The code was duplicated in some places so it is move into its own function addFlagToElementStyleFromContext().
2839
2840         The generators themself are very simple. First we check the quirks-mode exceptions, that is generally excluded
2841         at compile time because the conditions are almost never met, even in strict mode.
2842         Then we have two cases: style resolution and query selector. Almost everything is just function calls.
2843
2844         * cssjit/SelectorCompiler.cpp:
2845         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2846         (WebCore::SelectorCompiler::addPseudoClassType):
2847         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagToElementStyleFromContext):
2848         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
2849         (WebCore::SelectorCompiler::getDocument):
2850         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
2851         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2852         (WebCore::SelectorCompiler::elementIsActive):
2853         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
2854         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
2855         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
2856         (WebCore::SelectorCompiler::elementIsHovered):
2857         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
2858         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
2859         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
2860         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
2861         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2862         * dom/Document.cpp:
2863         (WebCore::Document::Document):
2864         (WebCore::Document::setCompatibilityMode):
2865         (WebCore::Document::implicitOpen):
2866         (WebCore::Document::cloneDataFromDocument):
2867         * dom/Document.h:
2868         (WebCore::Document::compatibilityModeMemoryOffset):
2869         (WebCore::Document::inQuirksMode):
2870         (WebCore::Document::inLimitedQuirksMode):
2871         (WebCore::Document::inNoQuirksMode):
2872         (WebCore::Document::compatibilityMode): Deleted.
2873         * html/ImageDocument.cpp:
2874         (WebCore::ImageDocument::ImageDocument):
2875         * html/MediaDocument.cpp:
2876         (WebCore::MediaDocument::MediaDocument):
2877         * html/PluginDocument.cpp:
2878         (WebCore::PluginDocument::PluginDocument):
2879         * html/TextDocument.cpp:
2880         (WebCore::TextDocument::TextDocument):
2881         * html/parser/HTMLConstructionSite.cpp:
2882         (WebCore::HTMLConstructionSite::setDefaultCompatibilityMode):
2883         (WebCore::HTMLConstructionSite::setCompatibilityMode):
2884         (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype):
2885         (WebCore::HTMLConstructionSite::insertDoctype):
2886         * html/parser/HTMLConstructionSite.h:
2887         * loader/DocumentWriter.cpp:
2888         (WebCore::DocumentWriter::replaceDocument):
2889         * loader/SinkDocument.cpp:
2890         (WebCore::SinkDocument::SinkDocument):
2891         * page/ios/FrameIOS.mm:
2892         (WebCore::Frame::initWithSimpleHTMLDocument):
2893         * rendering/style/RenderStyle.h:
2894
2895 2014-05-28  Jon Honeycutt  <jhoneycutt@apple.com>
2896
2897         Roll r168668 back in.
2898
2899         <https://bugs.webkit.org/show_bug.cgi?id=132621>
2900
2901         Reviewed by Brent Fulgham.
2902
2903         Tests: fast/events/beforeload-assertion.html
2904                fast/events/beforeload-iframe-crash.html
2905                fast/events/beforeload-input-time-crash.html
2906
2907         * WebCore.exp.in:
2908         * dom/Document.cpp:
2909         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
2910         * dom/Document.h:
2911         * html/HTMLAppletElement.cpp:
2912         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
2913         * html/HTMLEmbedElement.cpp:
2914         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
2915         * html/HTMLObjectElement.cpp:
2916         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
2917         * page/FrameView.cpp:
2918         (WebCore::FrameView::FrameView):
2919         (WebCore::FrameView::reset):
2920         (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
2921         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
2922         (WebCore::FrameView::performPostLayoutTasks):
2923         * page/FrameView.h:
2924         * testing/Internals.cpp:
2925         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
2926         * testing/Internals.h:
2927         * testing/Internals.idl:
2928
2929 2014-05-29  Myles C. Maxfield  <mmaxfield@apple.com>
2930
2931         Support -apple-system-font on OS X
2932         https://bugs.webkit.org/show_bug.cgi?id=133382
2933
2934         Reviewed by Simon Fraser.
2935
2936         Guard on both family names: "-apple-system-font" and "-webkit-system-font"
2937
2938         Test: platform/mac/fast/text/systemFont.html
2939
2940         * platform/mac/WebFontCache.mm:
2941         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2942
2943 2014-05-29  Alexey Proskuryakov  <ap@apple.com>
2944
2945         Loading <object> from WebArchive crashes
2946         https://bugs.webkit.org/show_bug.cgi?id=133386
2947         <rdar://problem/13345509>
2948
2949         Reviewed by Brady Eidson.
2950
2951         Test: webarchive/loading/object.html
2952
2953         This (a) fixes the crash, and (b) avoids the crash.
2954
2955         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::continueAfterContentPolicy):
2956         Some types of substitute data - such as WebArchive - don't contain HTTP result codes,
2957         so let's not drop to <object> fallback content when status is 0.
2958         And if the load somehow failed anyway, don't crash by trying to deliver substitute data
2959         to a finished loader.
2960
2961 2014-05-29  Alex Christensen  <achristensen@webkit.org>
2962
2963         [iOS WebGL] Fix depth buffer clearing issue.
2964         https://bugs.webkit.org/show_bug.cgi?id=133388
2965
2966         Reviewed by Dean Jackson.
2967
2968         No new tests, but this fixes webgl/1.0.1/conformance/canvas/buffer-preserve-test.html.
2969
2970         * platform/graphics/mac/WebGLLayer.mm:
2971         (-[WebGLLayer display]):
2972         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2973         (WebCore::GraphicsContext3D::prepareTexture):
2974         Moved marking the layer as composited from the mac-only prepareTexture to
2975         the end of [WebGLLayer display] which is called by mac and iOS.
2976
2977 2014-05-29  Jeremy Jones  <jeremyj@apple.com>
2978
2979         Perserve caption selection in fullscreen.
2980         https://bugs.webkit.org/show_bug.cgi?id=133350
2981
2982         Reviewed by Eric Carlson.
2983
2984         Use the logic from the inline player to calculate the selected caption index.
2985
2986         * html/HTMLMediaElement.h:
2987         (WebCore::HTMLMediaElement::mediaControlsHost):
2988         Expose mediaControlsHost() for use by WebVideoFullscreenModelMediaElement.
2989
2990         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2991         (WebVideoFullscreenModelMediaElement::updateLegibleOptions):
2992         Use logic from buildCaptionsMenu from mediaControlsApple.js.
2993
2994 2014-05-29  Jeremy Jones  <jeremyj@apple.com>
2995
2996         Use correct version of requiresFullscreenForVideoPlayback().
2997         https://bugs.webkit.org/show_bug.cgi?id=133331
2998
2999         Reviewed by Eric Carlson.
3000
3001         Test: media/video-fullscreeen-only-controls.html
3002
3003         Update the last place not yet using m_mediaSession->requiresFullscreenForVideoPlayback.
3004
3005         * html/HTMLMediaElement.cpp:
3006         (WebCore::HTMLMediaElement::parseAttribute):
3007         switch to media session version for requriesFullscreenForVideoPlayback.
3008
3009 2014-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3010
3011         [GTK] Add support for HiDPI icons
3012         https://bugs.webkit.org/show_bug.cgi?id=133377
3013
3014         Reviewed by Martin Robinson.
3015
3016         Use the GTK+ missing icon at 16 or 32 size depending on the device
3017         scale factor.
3018
3019         * platform/graphics/gtk/ImageGtk.cpp:
3020         (WebCore::loadMissingImageIconFromTheme):
3021         (WebCore::Image::loadPlatformResource):
3022
3023 2014-05-29  Owen Taylor  <otaylor@redhat.com>
3024
3025         [GTK] Add HighDPI support for non-accelerated compositing contents
3026         https://bugs.webkit.org/show_bug.cgi?id=131562
3027
3028         Reviewed by Anders Carlsson.
3029
3030         No new tests. This will be tested once we have the proper dependencies in the WebKit testing
3031         JHBuild.
3032
3033         * platform/cairo/WidgetBackingStore.h:
3034         (WebCore::WidgetBackingStore::WidgetBackingStore): Accept a device scale argument.
3035         * platform/cairo/WidgetBackingStoreCairo.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
3036         * platform/cairo/WidgetBackingStoreCairo.h: Accept a device scale argument.
3037         * platform/graphics/cairo/CairoUtilities.cpp: Add a new helper to set the device scale if Cairo built against is new enough.
3038         * platform/graphics/cairo/CairoUtilities.h:
3039         * platform/gtk/GtkVersioning.h: Add the HAVE_GTK_SCALE_FACTOR macro.
3040         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
3041         * platform/gtk/WidgetBackingStoreGtkX11.h: Accept a device scale argument.
3042
3043 2014-05-28  Brent Fulgham  <bfulgham@apple.com>
3044
3045         Captions during HLS playback flash/are difficult to readily
3046         https://bugs.webkit.org/show_bug.cgi?id=133365
3047         <rdar://problem/16584132>
3048
3049         Reviewed by Eric Carlson.
3050
3051         Correct two problems:
3052         1. Add new logic to handle cues that are identical to existing cues, except
3053            that they cover a slightly later moment in playback. For example, a cue
3054            encoding device might emit a cue at 24 fps, with many of the cues containing
3055            the same content but covering only 1/24th of a second.
3056            
3057            Rather than hiding and displaying our cues at the cue encoding rate, we should
3058            simply continue to display the same cue as long as the content is unchanged.
3059         2. The cue "isEqual" logic for TextTrackCueGeneric improperly short-circuited the
3060            VTTCue isEqual logic. This was done to avoid a false failure due to the cue
3061            type being 'generic' rather than 'vtt', but incorrectly treated cues with
3062            non-matching text as equal.
3063
3064         * html/track/DataCue.cpp:
3065         (WebCore::DataCue::cueContentsMatch): Move cue comparison code to new method that
3066         doesn't check that the 'type' of the cue is identical.
3067         (WebCore::DataCue::isEqual): Modified to use new 'cueContentsMatch' method.
3068         (WebCore::DataCue::isStartOfCue): Confirms cues match except for start and end times.
3069         * html/track/DataCue.h:
3070         * html/track/TextTrack.cpp:
3071         (WebCore::TextTrack::hasCue): Modify to check if a new cue is simply a continuation
3072         of an existing cue.
3073         * html/track/TextTrackCue.cpp:
3074         (WebCore::TextTrackCue::cueContentsMatch): New method containing the equality code
3075         that used to live in 'isEqual'.
3076         (WebCore::TextTrackCue::isEqual): Modified to use new 'cueContentsMatch' method.
3077         (WebCore::TextTrackCue::isStartOfCue): Confirms cues match except for start and
3078         end times.
3079         * html/track/TextTrackCue.h:
3080         * html/track/TextTrackCueGeneric.cpp:
3081         (WebCore::TextTrackCueGeneric::cueContentsMatch): New method containing the equality
3082         code that used to live in 'isEqual'.
3083         (WebCore::TextTrackCueGeneric::isEqual): Modified to use new 'cueContentsMatch' method.
3084         (WebCore::TextTrackCueGeneric::isStartOfCue): Confirms cues match except for start and
3085         end times.
3086         * html/track/TextTrackCueGeneric.h:
3087         * html/track/VTTCue.cpp:
3088         (WebCore::VTTCue::cueContentsMatch): New method containing the equality code that
3089         used to live in 'isEqual'.
3090         (WebCore::VTTCue::isEqual): Modified to use new 'cueContentsMatch' method.
3091         (WebCore::VTTCue::isStartOfCue): Confirms cues match except for start and end times.
3092         * html/track/VTTCue.h:
3093
3094 2014-05-28  Oliver Hunt  <oliver@apple.com>
3095
3096         Whoops, update bindings tests results.
3097
3098 2014-05-28  Oliver Hunt  <oliver@apple.com>
3099
3100         Make DOM properties exposed as instance properties use the base object instead of |this|
3101         https://bugs.webkit.org/show_bug.cgi?id=133353
3102
3103         Reviewed by Geoffrey Garen.
3104
3105         Make the bindings generator emit code that uses the base object for
3106         a property, rather than the this object. This means that attributes
3107         that we need to be treated as instance properties will match their old
3108         instance-based behaviour.
3109
3110         * bindings/scripts/CodeGeneratorJS.pm:
3111         (InterfaceRequiresAttributesOnInstanceForCompatibility):
3112         (InterfaceRequiresAttributesOnInstance):
3113         (GetCastingHelperForBaseObject):
3114         (GenerateImplementation):
3115         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3116         (WebCore::jsTestActiveDOMObjectExcitingAttr):
3117         * bindings/scripts/test/JS/JSTestException.cpp:
3118         (WebCore::jsTestExceptionName):
3119         * bindings/scripts/test/JS/JSTestInterface.cpp:
3120         (WebCore::jsTestInterfaceImplementsStr3):
3121         (WebCore::jsTestInterfaceSupplementalStr3):
3122         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
3123         (WebCore::setJSTestInterfaceImplementsStr2):
3124         (WebCore::setJSTestInterfaceImplementsStr3):
3125         (WebCore::setJSTestInterfaceImplementsNode):
3126         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3127         (WebCore::setJSTestInterfaceSupplementalStr2):
3128         (WebCore::setJSTestInterfaceSupplementalStr3):
3129         (WebCore::setJSTestInterfaceSupplementalNode):
3130         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3131         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
3132         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
3133         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
3134         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
3135         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
3136         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3137         (WebCore::jsTestTypedefsConstructorTestSubObj):
3138         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
3139         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
3140         (WebCore::setJSTestTypedefsAttrWithGetterException):
3141         (WebCore::setJSTestTypedefsAttrWithSetterException):
3142         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
3143         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
3144
3145 2014-05-28  Simon Fraser  <simon.fraser@apple.com>
3146
3147         [iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
3148         https://bugs.webkit.org/show_bug.cgi?id=133352
3149
3150         Reviewed by Tim Horton.
3151
3152         When adjusting layers inside accelerated overflow-scroll, pass a delta
3153         down to descendant nodes. Fix behavior of sticky nodes inside fixed nodes
3154         inside overflow scroll (sticky should only be affected if the parent node
3155         is a scrolling node).
3156
3157         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3158         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange): Just remove
3159         some .get()
3160         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3161         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange): Remove .get()s.
3162         We never care about the cumulative delta here, because sticky nodes only respond to
3163         changes in their direct scrolling ancestors. Only adjust the layer if the parent
3164         is a scrolling node.
3165
3166 2014-05-27  Chris Fleizach  <cfleizach@apple.com>
3167
3168         AX: WebKit does not recognize ARIA 1.1 tables
3169         https://bugs.webkit.org/show_bug.cgi?id=133163
3170
3171         Reviewed by Darin Adler.
3172
3173         The AXObjectCache code that determines which object to create based on the role needs to be token fallback aware.
3174
3175         Test: accessibility/table-fallback-roles-expose-element-attributes.html
3176
3177         * accessibility/AXObjectCache.cpp:
3178         (WebCore::nodeHasRole):
3179
3180 2014-05-28  Radu Stavila  <stavila@adobe.com>
3181
3182         REGRESSION (r168046): Invalid layout in multicol
3183         https://bugs.webkit.org/show_bug.cgi?id=133322
3184
3185         Reviewed by Antti Koivisto.
3186
3187         In some situations, deleting the line boxes of a multicol element causes the line to region
3188         link to become invalid.
3189
3190         Test: fast/multicol/newmulticol/multicol-inside-multicol.html
3191
3192         * rendering/RenderFlowThread.cpp:
3193         (WebCore::RenderFlowThread::clearLinesToRegionMap):
3194         (WebCore::RenderFlowThread::deleteLines):
3195         (WebCore::RenderFlowThread::willBeDestroyed):
3196         * rendering/RenderFlowThread.h:
3197
3198 2014-05-28  Ryuan Choi  <ryuan.choi@samsung.com>
3199
3200         Remove DocumentThreadableLoaderClient.h
3201         https://bugs.webkit.org/show_bug.cgi?id=133341
3202
3203         Reviewed by Gyuyoung Kim.
3204
3205         DocumentThreadableLoaderClient is not used anymore.
3206
3207         * WebCore.order:
3208         * loader/DocumentThreadableLoader.cpp:
3209         (WebCore::DocumentThreadableLoader::redirectReceived):
3210         * loader/DocumentThreadableLoaderClient.h: Removed.
3211         * loader/ThreadableLoaderClient.h:
3212         (WebCore::ThreadableLoaderClient::isDocumentThreadableLoaderClient): Deleted.
3213
3214 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3215
3216         Unreviewed. Update GObject DOM bindings symbols file after r169017.
3217
3218         * bindings/gobject/webkitdom.symbols: Add webkit_dom_navigator_get_hardware_concurrency.
3219
3220 2014-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3221
3222         REGRESSION(r168868): [GTK] Element.offset* client* scroll* API changed
3223         https://bugs.webkit.org/show_bug.cgi?id=133313
3224
3225         Reviewed by Philippe Normand.
3226
3227         Keep old API that uses long also for GObject bindings.
3228
3229         * dom/Element.idl:
3230
3231 2014-05-27  Commit Queue  <commit-queue@webkit.org>
3232
3233         Unreviewed, rolling out r169400.
3234         https://bugs.webkit.org/show_bug.cgi?id=133338
3235
3236         Broke the iOS build in
3237         LocalizedDateCache::calculateMaximumWidth() (Requested by smfr
3238         on #webkit).
3239
3240         Reverted changeset:
3241
3242         "SVG TextRuns do not always get RenderingContexts"
3243         https://bugs.webkit.org/show_bug.cgi?id=133198
3244         http://trac.webkit.org/changeset/169400
3245
3246 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
3247
3248         REGRESSION (Margin tiles): Background gradient on dom.spec.whatwg.org is very slow to render
3249         https://bugs.webkit.org/show_bug.cgi?id=133335
3250         <rdar://problem/17011392>
3251
3252         Reviewed by Simon Fraser.
3253
3254         * platform/graphics/Image.cpp:
3255         (WebCore::Image::drawTiled):
3256         Make cross-platform and use some iOS code which avoids patterned drawing when the pattern buffer
3257         would be very large. Instead, it calls draw() repeatedly over the pattern space, avoiding the allocation
3258         of a huge (in the case of bug 133335, nearly 2GB) buffer.
3259
3260 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
3261
3262         [iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
3263         https://bugs.webkit.org/show_bug.cgi?id=133334
3264         <rdar://problem/16462535>
3265
3266         Reviewed by Tim Horton.
3267
3268         When the scroll position changes in an accelerated overflow-scroll element, we have
3269         to update child nodes in the scrolling tree for position:sticky. That requires a
3270         more generic ability to update the scrolling tree after some arbitrary zoom or
3271         scroll. To do this, we need to know the current fixed position rect, rather than
3272         having it passed in.
3273         
3274         So make the fixed position rect available from ScrollingTree, and make it possible
3275         to get the current scrollPosition() from any ScrollingTreeScrollingNode.
3276         
3277         Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
3278         and have it update descendant layers.
3279         
3280         Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
3281         constraints math, using the scroll position of the parent node if appropriate.
3282
3283         * page/scrolling/ScrollingTree.h:
3284         * page/scrolling/ScrollingTreeScrollingNode.h:
3285         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
3286         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
3287         * page/scrolling/ios/ScrollingTreeIOS.cpp:
3288         (WebCore::ScrollingTreeIOS::fixedPositionRect):
3289         * page/scrolling/ios/ScrollingTreeIOS.h:
3290         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3291         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
3292
3293 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
3294
3295         Do some renaming in the scrolling tree
3296         https://bugs.webkit.org/show_bug.cgi?id=133333
3297
3298         Reviewed by Tim Horton.
3299
3300         Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
3301         since this goes deep and to indicate that it's about layer updating.
3302         
3303         Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
3304         this is the custom fixed-position rect that changes on zooming.
3305
3306         * page/scrolling/ScrollingTree.cpp:
3307         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
3308         * page/scrolling/ScrollingTree.h:
3309         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
3310         * page/scrolling/ScrollingTreeNode.h:
3311         * page/scrolling/ScrollingTreeScrollingNode.h:
3312         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
3313         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
3314         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterViewportChange):
3315         (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll):
3316         * page/scrolling/mac/ScrollingTreeFixedNode.h:
3317         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3318         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
3319         (WebCore::ScrollingTreeFixedNode::parentScrollPositionDidChange): Deleted.
3320         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3321         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3322         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
3323         * page/scrolling/mac/ScrollingTreeStickyNode.h:
3324         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3325         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
3326         (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange): Deleted.
3327
3328 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
3329
3330         Instantiate a ScrollingTreeMac on Mac
3331         https://bugs.webkit.org/show_bug.cgi?id=133332
3332
3333         Reviewed by Tim Horton.
3334
3335         Mac previously instantiated a ThreadedScrollingTree, but this has no platform
3336         knowledge. To support future expansion, create a ScrollingTreeMac subclass and
3337         instantiate that on Mac.
3338         
3339         Also protect ScrollingCoordinatorMac in PLATFORM(MAC) #ifdefs and remove it from the
3340         EXCLUDED_SOURCE_FILE_NAMES list in the xcconfig file, following general trends.
3341
3342         * Configurations/WebCore.xcconfig:
3343         * WebCore.xcodeproj/project.pbxproj:
3344         * page/scrolling/ThreadedScrollingTree.cpp:
3345         (WebCore::ThreadedScrollingTree::create): Deleted.
3346         * page/scrolling/ThreadedScrollingTree.h:
3347         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3348         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3349         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
3350         * page/scrolling/mac/ScrollingTreeMac.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
3351         (ScrollingTreeMac::create):
3352         (ScrollingTreeMac::ScrollingTreeMac):
3353         * page/scrolling/mac/ScrollingTreeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
3354
3355 2014-05-27  Simon Fraser  <simon.fraser@apple.com>
3356
3357         Prepare for position:sticky support inside accelerated overflow-scroll with WK2
3358         https://bugs.webkit.org/show_bug.cgi?id=133329
3359
3360         Reviewed by Tim Horton.
3361
3362         RenderLayerCompositor::computeStickyViewportConstraints() was always using
3363         the viewport rect as the constraining rect for sticky position. This is not
3364         correct when inside overflow:scroll.
3365         
3366         Refactor code in RenderBoxModelObject to make getting the rect easy, and use
3367         it to compute the constraints.
3368
3369         * rendering/RenderBoxModelObject.cpp:
3370         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
3371         (WebCore::RenderBoxModelObject::stickyPositionOffset):
3372         * rendering/RenderBoxModelObject.h:
3373         * rendering/RenderLayerCompositor.cpp:
3374         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
3375
3376 2014-05-27  Bem Jones-Bey  <bjonesbe@adobe.com>
3377
3378         vw/vh units used as font/line-height values don't scale with the viewport
3379         https://bugs.webkit.org/show_bug.cgi?id=87846
3380
3381         Reviewed by Darin Adler.
3382
3383         This patch moves the resolution of viewport units to style recalc
3384         time. Currently viewport units are left unresolved during style
3385         recalcs, which leads to many problems with viewport units. Moving the
3386         resolution will fix these problems, as well as reduce the plumbing
3387         that goes on.
3388
3389         This patch touches a lot of files since the valueForLength functions
3390         no longer need a RenderView. The interesting changes are in:
3391
3392         - CSSToLengthConversionData -> CSSPrimitiveValue: for moving
3393             resolution to style recalc time.
3394         - Length / LengthFunctions: no longer needs to know about viewport
3395             units.
3396         - FrameView -> Document -> StyleResolver: for scheduling style recalcs
3397             upon resize
3398
3399         Note that getComputedStyle will now return pixel values when viewport
3400         units are used. This behavior matches Firefox and the css3-cascade
3401         spec.
3402
3403         This is based on a Blink patch by timloh@chromium.org.
3404
3405         Tests: css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html
3406                css3/viewport-percentage-lengths/viewport-percentage-lengths-calc.html
3407                css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html
3408                css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html
3409                css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html
3410
3411         * WebCore.exp.in: Remove RenderView argument to floatValueForLength.
3412         * accessibility/atk/WebKitAccessibleInterfaceText.cpp: 
3413         (getAttributeSetForAccessibilityObject): Remove RenderView argument.
3414         * css/BasicShapeFunctions.cpp:
3415         (WebCore::convertToLength): Ditto.
3416         (WebCore::floatValueForCenterCoordinate): Ditto.
3417         * css/BasicShapeFunctions.h: Ditto.
3418         * css/CSSCalculationValue.cpp:
3419         (WebCore::unitCategory): Remove special handling for viewport units,
3420             as they get resolved to pixels.
3421         (WebCore::createCSS): Ditto.
3422         * css/CSSComputedStyleDeclaration.cpp:
3423         (WebCore::positionOffsetValue): Remove RendewView argument.
3424         (WebCore::getBorderRadiusCornerValues): Remove handling of viewport
3425             units, as they are already resolve to pixels here.
3426         (WebCore::getBorderRadiusCornerValue): Remove RenderView argument.
3427         (WebCore::getBorderRadiusShorthandValue): Ditto.
3428         (WebCore::specifiedValueForGridTrackBreadth): Remove handling of
3429             viewport units, as they are already resolved to pixels here.
3430         (WebCore::specifiedValueForGridTrackSize): Remove RenderView argument.
3431         (WebCore::valueForGridTrackList): Ditto.
3432         (WebCore::lineHeightFromStyle): Ditto.
3433         (WebCore::ComputedStyleExtractor::propertyValue): Ditto.
3434         * css/CSSGradientValue.cpp:
3435         (WebCore::CSSLinearGradientValue::createGradient): Pass RenderView to
3436             CSSToLengthConversionData constructor.
3437         (WebCore::CSSRadialGradientValue::createGradient): Ditto.
3438         * css/CSSPrimitiveValue.cpp:
3439         (WebCore::CSSPrimitiveValue::unitCategory): Remove handling of
3440             viewport units, as they get resolved to pixels.
3441         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
3442         (WebCore::CSSPrimitiveValue::init): Ditto.
3443         (WebCore::CSSPrimitiveValue::computeLengthDouble): Resolve viewport
3444             units to pixels.
3445         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Remove
3446         handling of viewport units, since they get resolved to pixels.
3447         (WebCore::CSSPrimitiveValue::viewportPercentageLength): Deleted.
3448         * css/CSSPrimitiveValue.h:
3449         (WebCore::CSSPrimitiveValue::isLength): Remove special handling of
3450             viewport units, since they get resolved to pixels.
3451         * css/CSSPrimitiveValueMappings.h:
3452         (WebCore::CSSPrimitiveValue::convertToLength): Ditto.
3453         * css/CSSToLengthConversionData.cpp:
3454         (WebCore::CSSToLengthConversionData::viewportWidthFactor): Caclulate
3455             conversion factor for viewport units to pixels. Note this does not
3456             set hasViewportUnits on the RenderStyle if computing the font
3457             size, because in the font size case, the RenderStyle is the
3458             parent's style, not the current renderer's style.
3459         (WebCore::CSSToLengthConversionData::viewportHeightFactor): Ditto.
3460         (WebCore::CSSToLengthConversionData::viewportMinFactor): Ditto.
3461         (WebCore::CSSToLengthConversionData::viewportMaxFactor): Ditto.
3462         * css/CSSToLengthConversionData.h:
3463         (WebCore::CSSToLengthConversionData::CSSToLengthConversionData): Add
3464             RenderView parameter, and make RenderStyle non-const so that
3465             hasViewportUnits can be set on the Style..
3466         (WebCore::CSSToLengthConversionData::style): style is now non-const.
3467         (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom): Handle
3468             RenderView argument.
3469         * css/CSSToStyleMap.cpp:
3470         (WebCore::CSSToStyleMap::mapFillXPosition): Remove handling of
3471             viewport units, as they are already resolved to pixels here.
3472         (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
3473         * css/DeprecatedStyleBuilder.cpp:
3474         (WebCore::ApplyPropertyLength::applyValue): Ditto.
3475         (WebCore::ApplyPropertyBorderRadius::applyValue): Ditto.
3476         (WebCore::ApplyPropertyComputeLength::applyValue): Ditto.
3477         (WebCore::ApplyPropertyFontSize::applyValue): Ditto.
3478         (WebCore::ApplyPropertyLineHeight::applyValue): Ditto.
3479         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Ditto.
3480         (WebCore::ApplyPropertyWordSpacing::applyValue): Ditto.
3481         (WebCore::ApplyPropertyVerticalAlign::applyValue): Ditto.
3482         (WebCore::ApplyPropertyTextIndent::applyValue): Ditto.
3483         * css/LengthFunctions.cpp:
3484         (WebCore::minimumIntValueForLength): Remove RenderView argument.
3485         (WebCore::intValueForLength): Remove RenderView argument and
3486             roundPecentages.
3487         (WebCore::minimumValueForLength): Remove RenderView argument, and
3488             special handling of viewport units.
3489         (WebCore::valueForLength): Ditto.
3490         (WebCore::floatValueForLength): Ditto.
3491         (WebCore::floatSizeForLengthSize): Remove RenderView argument.
3492         * css/LengthFunctions.h: Ditto.
3493         * css/MediaQueryEvaluator.cpp:
3494         (WebCore::MediaQueryEvaluator::eval): Add RenderView argument for
3495             CSSToLengthConversionData constuctor.
3496         * css/StyleResolver.cpp:
3497         (WebCore::StyleResolver::State::clear): Change to 0 arg constructor
3498             for CSSToLengthConversionData.
3499         (WebCore::StyleResolver::State::updateConversionData): In order to get
3500             the RenderView, we need to have a valid Element set on the state.
3501             Since this means that we need to set the conversion data in more
3502             places, move the contruction of conversion data into this helper
3503             method.
3504         (WebCore::StyleResolver::State::initElement): Make sure conversion
3505             data is up to date.
3506         (WebCore::StyleResolver::State::initForStyleResolve): Ditto.
3507         (WebCore::StyleResolver::State::setStyle): When the style is set, we
3508             need to make sure to update the conversion data.
3509         (WebCore::StyleResolver::styleForElement): If the style has viewport
3510             units, flage the document so that we can make sure to recalc the
3511             viewport unit values when the viewport is resized.
3512         (WebCore::StyleResolver::pseudoStyleForElement): Ditto.
3513         (WebCore::StyleResolver::updateFont): Make sure the font having
3514             viewport units updates the style.
3515         (WebCore::StyleResolver::convertToIntLength): Remove handling of
3516         viewport units, as they are resolved to pixels.
3517         (WebCore::StyleResolver::convertToFloatLength): Ditto.
3518         (WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
3519             Invalidate the matched properties cache for styles with viewport
3520             units when the viewport is resized.
3521         (WebCore::createGridTrackBreadth): Remove handling of viewport units,
3522             as they are resolved to pixels.
3523         (WebCore::StyleResolver::applyProperty): Ditto.
3524         (WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange):
3525             Rename to be less confusing, since it has nothing to do with
3526             viewport units.
3527         (WebCore::StyleResolver::createFilterOperations): Remove handling of
3528             viewport units, as they are resolved to pixels.
3529         (WebCore::StyleResolver::affectedByViewportChange): Deleted.
3530         (WebCore::StyleResolver::viewportPercentageValue): Deleted.
3531         * css/StyleResolver.h:
3532         (WebCore::StyleResolver::State::State): C++11 cleanup: 0 -> nullptr.
3533         (WebCore::StyleResolver::State::setFontSizeHasViewportUnits): Set if
3534             the font size is specified in viewport units.
3535         (WebCore::StyleResolver::State::fontSizeHasViewportUnits): Ditto.
3536         (WebCore::StyleResolver::State::setStyle): Deleted.
3537         * css/TransformFunctions.cpp:
3538         (WebCore::convertToFloatLength): Remove handling of viewport units,
3539             since they are resolved to pixels.
3540         * dom/Document.cpp:
3541         (WebCore::Document::Document): Add flag to determine if some style in
3542             the document has viewport units.
3543         (WebCore::Document::pageSizeAndMarginsInPixels): Remove RenderView
3544             argument.
3545         (WebCore::Document::updateViewportUnitsOnResize): Mark elements with
3546             viewport units for style recalc when the viewport size has
3547             changed.
3548         * dom/Document.h:
3549         (WebCore::Document::setHasStyleWithViewportUnits): Flag to determine
3550             if some style in the document has viewport units.
3551         (WebCore::Document::hasStyleWithViewportUnits): Ditto.
3552         * html/HTMLAreaElement.cpp:
3553         (WebCore::HTMLAreaElement::getRegion): Remove RenderView argument.
3554         * page/FrameView.cpp:
3555         (WebCore::FrameView::layout): When the viewport is resized, call
3556             updateViewportUnitsOnResize on the document.
3557         * platform/Length.h:
3558         (WebCore::Length::isSpecified): Remove handling of viewport units,
3559             since they are now resolved to pixels.
3560         (WebCore::Length::viewportPercentageLength): Deleted.
3561         (WebCore::Length::isViewportPercentage): Deleted.
3562         * rendering/ClipPathOperation.h:
3563         (WebCore::ShapeClipPathOperation::pathForReferenceRect): Remove
3564             RenderView argument.
3565         (WebCore::BoxClipPathOperation::pathForReferenceRect): Ditto.
3566         * rendering/RenderBlock.cpp:
3567         (WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout): Remove
3568             handling of viewport units, since they get updated by
3569             updateViewportUnitsOnResize when the viewport is resized.
3570         (WebCore::RenderBlock::nodeAtPoint): Remove RenderView argument.
3571         (WebCore::RenderBlock::lineHeight): Ditto.
3572         * rendering/RenderBox.cpp:
3573         (WebCore::RenderBox::paintBoxDecorations): Remove RenderView argument.
3574         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
3575             Remove handling of viewport units, as they are resolved to pixels.
3576         (WebCore::RenderBox::computePercentageLogicalHeight): Ditto.
3577         (WebCore::RenderBox::computeReplacedLogicalWidthUsing): Ditto.
3578         (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Ditto.
3579         (WebCore::RenderBox::hasViewportPercentageLogicalHeight): Deleted.
3580         * rendering/RenderBox.h:
3581         * rendering/RenderBoxModelObject.cpp:
3582         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect): Remove
3583             RenderView argument.
3584         (WebCore::RenderBoxModelObject::calculateFillTileSize): Remove
3585             handling of viewport units, as they are resolved to pixels.
3586         (WebCore::computeBorderImageSide): Remove RenderView argument.
3587         (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
3588         (WebCore::RenderBoxModelObject::paintBorder): Ditto.
3589         (WebCore::RenderBoxModelObject::paintBoxShadow): Ditto.
3590         * rendering/RenderElement.cpp:
3591         (WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.
3592         * rendering/RenderElement.h:
3593         (WebCore::RenderElement::valueForLength): Remove unused
3594             roundPercentages argument.
3595         (WebCore::RenderElement::minimumValueForLength): Remove unused
3596             RoundPercentages and RenderView arguments.
3597         * rendering/RenderGrid.cpp:
3598         (WebCore::RenderGrid::layoutGridItems): Remove handling of viewport
3599             units as they are resolved to pixels.
3600         * rendering/RenderInline.cpp:
3601         (WebCore::computeMargin): Ditto.
3602         (WebCore::RenderInline::lineHeight): Remove RenderView argument.
3603         * rendering/RenderLayer.cpp:
3604         (WebCore::RenderLayer::setupClipPath): Ditto.
3605         * rendering/RenderLineBreak.cpp:
3606         (WebCore::RenderLineBreak::lineHeight): Ditto.
3607         * rendering/RenderScrollbarPart.cpp:
3608         (WebCore::calcScrollbarThicknessUsing): Ditto.
3609         (WebCore::RenderScrollbarPart::computeScrollbarWidth): Ditto.
3610         (WebCore::RenderScrollbarPart::computeScrollbarHeight): Ditto.
3611         * rendering/RenderTable.cpp:
3612         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3613             Remove handling of viewport units, since they are resolved to
3614             pixels.
3615         (WebCore::RenderTable::computePreferredLogicalWidths): Now that
3616             viewport unit values are resolved to pixels at style recalc time,
3617             no special checking is needed to handle them, so update the
3618             comment to reflect that.
3619         * rendering/RenderThemeIOS.mm:
3620         (WebCore::applyCommonButtonPaddingToStyle): Add RenderView argument to
3621             CSSToLengthConversionData constructor.
3622         (WebCore::RenderThemeIOS::adjustButtonStyle): Ditto.
3623         * rendering/RenderThemeMac.mm:
3624         (WebCore::RenderThemeMac::paintMenuListButtonGradients): Remove
3625             RenderView argument.
3626         * rendering/RenderView.cpp:
3627         (WebCore::RenderView::layout): Remove handling of viewport units,
3628             since they are resolved to pixels.
3629         * rendering/RootInlineBox.cpp:
3630         (WebCore::RootInlineBox::ascentAndDescentForBox): Remove RenderView
3631             argument.
3632         * rendering/shapes/Shape.cpp:
3633         (WebCore::Shape::createShape): Remove RenderView argument.
3634         * rendering/shapes/Shape.h:
3635         * rendering/shapes/ShapeOutsideInfo.cpp:
3636         (WebCore::ShapeOutsideInfo::computedShape): Ditto.
3637         * rendering/style/BasicShapes.cpp:
3638         (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Ditto.
3639         (WebCore::BasicShapeCircle::path): Ditto.
3640         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Ditto.
3641         (WebCore::BasicShapeEllipse::path): Ditto.
3642         (WebCore::BasicShapePolygon::path): Ditto.
3643         (WebCore::floatSizeForLengthSize): Ditto.
3644         (WebCore::BasicShapeInset::path): Ditto.
3645         * rendering/style/BasicShapes.h:
3646         * rendering/style/RenderStyle.cpp:
3647         (WebCore::calcRadiiFor): Ditto.
3648         (WebCore::RenderStyle::getRoundedBorderFor): Ditto.
3649         (WebCore::RenderStyle::computedLineHeight): Remove handling of
3650             viewport units since they are resolved to pixels.
3651         * rendering/style/RenderStyle.h:
3652         (WebCore::RenderStyle::setHasViewportUnits): Set if this style has
3653         a property set with viewport units.
3654         (WebCore::RenderStyle::hasViewportUnits): Ditto.
3655         * rendering/svg/RenderSVGRoot.cpp:
3656         (WebCore::resolveLengthAttributeForSVG): Remove RenderView argument.
3657         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Ditto.
3658         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
3659         * rendering/svg/SVGRenderingContext.cpp:
3660         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): Ditto.
3661
3662 2014-05-27  Zoltan Horvath  <zoltan@webkit.org>
3663
3664         [CSS Shapes] serialization of the computed value should omit the default radii
3665         https://bugs.webkit.org/show_bug.cgi?id=132747
3666
3667         Reviewed by Darin Adler.
3668
3669         We should omit closest-side value, whereever is possible. Specification:
3670         http://www.w3.org/TR/2014/CR-css-shapes-1-20140320/#basic-shape-computed-values 
3671         This change aligns the behavior to the specification.
3672
3673         Added new test cases for the shape-outside parsing tests.
3674
3675         * css/CSSBasicShapes.cpp:
3676         (WebCore::buildCircleString):
3677         (WebCore::CSSBasicShapeCircle::cssText):
3678         (WebCore::CSSBasicShapeEllipse::cssText):
3679
3680 2014-05-27  Commit Queue  <commit-queue@webkit.org>
3681
3682         Unreviewed, rolling out r169399.
3683         https://bugs.webkit.org/show_bug.cgi?id=133326
3684
3685         Causes assertion failures in tests.  See
3686         http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK1%20(Tests)/r169399%20(5622)/results.html
3687         (Requested by mlam on #webkit).
3688
3689         Reverted changeset:
3690
3691         "Caret's screen position does not update during an overflow
3692         scroll"
3693         https://bugs.webkit.org/show_bug.cgi?id=133256
3694         http://trac.webkit.org/changeset/169399
3695
3696 2014-05-27  Myles C. Maxfield  <mmaxfield@apple.com>
3697
3698         Lists styled with SVG fonts are not rendered as expected
3699         https://bugs.webkit.org/show_bug.cgi?id=133198
3700
3701         Reviewed by Simon Fraser.
3702
3703         There were a couple places in RenderListMarker and RenderMenuList that were
3704         implicitly creating TextRuns by passing a String to a function which
3705         expected a TextRun. Because TextRun has a constructor which takes a single
3706         String and isn't marked explicit, TextRuns were being created without
3707         any of the associated code that initializes the TextRun (such as creating
3708         a RenderingContext if necessary).
3709
3710         This patch marks the aforementioned constructor as "explicit" to discourage
3711         such behavior in the future.
3712
3713         Test: svg/custom/list-items-with-svg-font-family.html
3714
3715         * platform/graphics/TextRun.h:
3716         (WebCore::TextRun::TextRun): Mark constructors as explicit.
3717         * rendering/RenderListMarker.cpp:
3718         (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
3719         RenderBlock::constructTextRun.
3720         (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
3721         * rendering/RenderMenuList.cpp:
3722         (RenderMenuList::updateOptionsWidth): Ditto.
3723
3724 2014-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
3725
3726         Caret's screen position does not update during an overflow scroll
3727         https://bugs.webkit.org/show_bug.cgi?id=133256
3728
3729         Reviewed by Simon Fraser.
3730
3731         During a scroll, we set a flag which caret position is gated on, but we never
3732         actually invalidate the caret's position. This patch does so.
3733
3734         Test: editing/input/caret-position-during-scroll.html
3735
3736         * editing/FrameSelection.h:
3737         * rendering/RenderLayer.cpp:
3738         (WebCore::RenderLayer::scrollTo):
3739
3740 2014-05-27  Timothy Horton  <timothy_horton@apple.com>
3741
3742         Turn on the LayerPool for iOS
3743         https://bugs.webkit.org/show_bug.cgi?id=133299
3744
3745         Reviewed by Antti Koivisto.
3746
3747         * Configurations/WebCore.xcconfig:
3748         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3749         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3750         * platform/graphics/ca/mac/TileController.mm:
3751         (WebCore::TileController::createTileLayer):
3752         * platform/graphics/ca/mac/TileGrid.mm:
3753         (WebCore::TileGrid::removeTiles):
3754         Turn on the LayerPool for iOS.
3755         We've used this on Mac for a long time, and the WebKit1
3756         ("legacy") iOS TileCache also had a similar pool.
3757         This helps a good bit with flashiness while scrolling.
3758
3759 2014-05-27  David Hyatt  <hyatt@apple.com>
3760
3761         REGRESSION: Audio volume scrubber does not show volume level thumb
3762         <rdar://problem/16902004>
3763         https://bugs.webkit.org/show_bug.cgi?id=133310
3764
3765         Reviewed by Dean Jackson.
3766
3767         This was just a silly mistake on my part with the setting of the pagination
3768         layers. Layers inside transforms are supposed to clear out their pagination
3769         status based off their ancestor containing block layers, and not off the
3770         enclosing pagination layer.
3771         
3772         Added fast/multicol/pagination/nested-transforms.html
3773
3774         * rendering/RenderLayer.cpp:
3775         (WebCore::RenderLayer::updatePagination):
3776
3777 2014-05-27  Eric Carlson  <eric.carlson@apple.com>
3778
3779         [Mac] media controls should prevent 'click' events from reaching the page
3780         https://bugs.webkit.org/show_bug.cgi?id=133268
3781
3782         Reviewed by Jer Noble.
3783
3784         Test: media/media-controls-cancel-events.html
3785
3786         * Modules/mediacontrols/mediaControlsApple.js:
3787         (Controller.prototype.handleEvent): Allow event handler to cancel event default action.
3788         (Controller.prototype.handleRewindButtonClicked): Cancel event default.
3789         (Controller.prototype.handlePlayButtonClicked): Ditto.
3790         (Controller.prototype.handleMuteButtonClicked): Ditto.
3791         (Controller.prototype.handleMinButtonClicked): Ditto.
3792         (Controller.prototype.handleCaptionButtonClicked): Ditto.
3793         (Controller.prototype.handleFullscreenButtonClicked): Ditto.
3794         * Modules/mediacontrols/mediaControlsiOS.js:
3795         (ControllerIOS.prototype.handlePlayButtonTouchEnd): Ditto.
3796         (ControllerIOS.prototype.handlePlayButtonTouchCancel): Ditto.
3797         (ControllerIOS.prototype.handleFullscreenTouchEnd): Ditto.
3798         (ControllerIOS.prototype.handleFullscreenTouchCancel): Ditto.
3799         (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
3800         (ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): Ditto.
3801         (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto.
3802
3803 2014-05-27  Jon Lee  <jonlee@apple.com>
3804
3805         Fix Mavericks bots from r169383.
3806         https://bugs.webkit.org/show_bug.cgi?id=133311
3807
3808         Reviewed by Eric Carlson.
3809
3810         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Update #ifdef to check for ENABLE(MEDIA_SOURCE).
3811         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: Ditto.
3812
3813 2014-05-27  Radu Stavila  <stavila@adobe.com>
3814
3815         REGRESSION (r168046): Incorrect handling of multicol spanner
3816         https://bugs.webkit.org/show_bug.cgi?id=133249
3817
3818         Reviewed by David Hyatt.
3819
3820         When removing the child of an object, the removeChild method should return the next element
3821         following the one being deleted. This will ensure that proper iteration and destruction of
3822         an object's children is possible.
3823
3824         No new tests added. This is because the test that triggers this issue also triggers
3825         another assertion, in RenderMultiColumnSet::requiresBalancing(). However, that is a totally
3826         separate problem and will be handled in a separate bug: https://bugs.webkit.org/show_bug.cgi?id=133309
3827
3828         * rendering/RenderBlock.cpp:
3829         (WebCore::RenderBlock::removeChild):
3830         * rendering/RenderBlock.h:
3831         * rendering/RenderBlockFlow.cpp:
3832         (WebCore::RenderBlockFlow::removeChild):
3833         * rendering/RenderBlockFlow.h:
3834         * rendering/RenderButton.cpp:
3835         (WebCore::RenderButton::removeChild):
3836         * rendering/RenderButton.h:
3837         * rendering/RenderElement.cpp:
3838         (WebCore::RenderElement::removeChild):
3839         (WebCore::RenderElement::removeChildInternal):
3840         * rendering/RenderElement.h:
3841         * rendering/RenderMenuList.cpp:
3842         (RenderMenuList::removeChild):
3843         * rendering/RenderMenuList.h:
3844         * rendering/RenderMultiColumnFlowThread.cpp:
3845         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3846         * rendering/RenderRuby.cpp:
3847         (WebCore::RenderRubyAsInline::removeChild):
3848         (WebCore::RenderRubyAsBlock::removeChild):
3849         * rendering/RenderRuby.h:
3850         * rendering/RenderRubyRun.cpp:
3851         (WebCore::RenderRubyRun::removeChild):
3852         * rendering/RenderRubyRun.h:
3853         * rendering/mathml/RenderMathMLScripts.cpp:
3854         (WebCore::RenderMathMLScripts::removeChildInternal):
3855         (WebCore::RenderMathMLScripts::removeChild):
3856         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
3857         (WebCore::RenderMathMLScriptsWrapper::removeChild):
3858         * rendering/mathml/RenderMathMLScripts.h:
3859         * rendering/svg/RenderSVGContainer.cpp:
3860         (WebCore::RenderSVGContainer::removeChild):
3861         * rendering/svg/RenderSVGContainer.h:
3862         * rendering/svg/RenderSVGInline.cpp:
3863         (WebCore::RenderSVGInline::removeChild):
3864         * rendering/svg/RenderSVGInline.h:
3865         * rendering/svg/RenderSVGRoot.cpp:
3866         (WebCore::RenderSVGRoot::removeChild):
3867         * rendering/svg/RenderSVGRoot.h:
3868         * rendering/svg/RenderSVGText.cpp:
3869         (WebCore::RenderSVGText::removeChild):
3870         * rendering/svg/RenderSVGText.h:
3871
3872 2014-05-27  Jon Lee  <jonlee@apple.com>
3873
3874         Update ENABLE(MEDIA_SOURCE) on Mac
3875         https://bugs.webkit.org/show_bug.cgi?id=133141
3876
3877         Reviewed by Darin Adler.
3878
3879         * Configurations/FeatureDefines.xcconfig:
3880
3881 2014-05-27  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3882
3883         Remove BLOB guards
3884         https://bugs.webkit.org/show_bug.cgi?id=132863
3885
3886         Reviewed by Csaba Osztrogonác.
3887
3888         * Configurations/FeatureDefines.xcconfig:
3889         * Modules/websockets/WebSocketChannel.cpp:
3890         (WebCore::WebSocketChannel::WebSocketChannel):
3891         (WebCore::WebSocketChannel::didFail):
3892         (WebCore::WebSocketChannel::processOutgoingFrameQueue):
3893         (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
3894         * Modules/websockets/WebSocketChannel.h:
3895         * WebCore.exp.in:
3896         * WebCore.vcxproj/WebCore.vcxproj:
3897         * bindings/js/JSBlobCustom.cpp:
3898         (WebCore::JSBlobConstructor::constructJSBlob):
3899         * bindings/js/JSFileReaderCustom.cpp:
3900         * dom/DOMExceptions.in:
3901         * dom/EventTargetFactory.in:
3902         * dom/ScriptExecutionContext.cpp:
3903         (WebCore::ScriptExecutionContext::publicURLManager):
3904         * dom/ScriptExecutionContext.h:
3905         * fileapi/AsyncFileStream.cpp:
3906         * fileapi/AsyncFileStream.h:
3907         * fileapi/Blob.cpp:
3908         (WebCore::Blob::Blob):
3909         * fileapi/Blob.h:
3910         (WebCore::Blob::slice):
3911         * fileapi/Blob.idl:
3912         * fileapi/FileError.h:
3913         * fileapi/FileError.idl:
3914         * fileapi/FileException.cpp:
3915         * fileapi/FileException.h:
3916         * fileapi/FileException.idl:
3917         * fileapi/FileReader.cpp:
3918         * fileapi/FileReader.h:
3919         * fileapi/FileReader.idl:
3920         * fileapi/FileReaderLoader.cpp:
3921         * fileapi/FileReaderLoader.h:
3922         * fileapi/FileReaderLoaderClient.h:
3923         * fileapi/FileReaderSync.cpp:
3924         * fileapi/FileReaderSync.h:
3925         * fileapi/FileReaderSync.idl:
3926         * fileapi/FileThread.cpp:
3927         * fileapi/FileThread.h:
3928         * fileapi/ThreadableBlobRegistry.cpp:
3929         (WebCore::ThreadableBlobRegistry::registerFileBlobURL): Deleted.
3930         (WebCore::ThreadableBlobRegistry::registerBlobURL): Deleted.
3931         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice): Deleted.
3932         (WebCore::ThreadableBlobRegistry::unregisterBlobURL): Deleted.
3933         (WebCore::ThreadableBlobRegistry::blobSize): Deleted.
3934         (WebCore::ThreadableBlobRegistry::getCachedOrigin): Deleted.
3935         * fileapi/WebKitBlobBuilder.cpp:
3936         (WebCore::BlobBuilder::append):
3937         * fileapi/WebKitBlobBuilder.h: