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