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