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