6536e4823fbb26af90530b3e8ab4d4194b3481a8
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-07-11  Bear Travis  <betravis@adobe.com>
2
3         [Feature Queries] Feature Query CSS Grammar Productions Should Return a Value
4         https://bugs.webkit.org/show_bug.cgi?id=134810
5
6         Reviewed by Antti Koivisto.
7
8         The parsing return values are used to determine if a feature query is valid. Two
9         grammar productions have been updated to correctly return a value.
10
11         Tests exist for this feature but will not be run until the feature is turned on.
12         See https://bugs.webkit.org/show_bug.cgi?id=134404.
13
14         * css/CSSGrammar.y.in: Adding return values for two valid feature query productions.
15
16 2014-07-10  Brent Fulgham  <bfulgham@apple.com>
17
18         Use a separate backdrop element to allow cues to have highlight and background color
19         https://bugs.webkit.org/show_bug.cgi?id=134821
20         <rdar://problem/15999721>
21
22         Reviewed by Eric Carlson.
23
24         Add a new <div> element wrapping the existing cue <span>. This allows
25         us to have a highlight on the cue (in the <span> background), as well
26         as an overall background color.
27
28         * Modules/mediacontrols/mediaControlsApple.css:
29         (video::-webkit-media-text-track-display-backdrop): New markup for
30         the backdrop element of the caption.
31         * html/track/VTTCue.cpp:
32         (WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
33         allow user customization of the cue backdrop.
34         (WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
35         "m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
36         (WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
37         (WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
38         of the new m_cueBackdropBox element, and add m_cueBackdropBox to
39         the display tree.
40         * html/track/VTTCue.h:
41         (WebCore::VTTCue::element):
42         * page/CaptionUserPreferencesMediaAF.cpp:
43         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
44         Fix for missing caption style updates. Even if we are already
45         listening for caption changes, we still want to update the new
46         instance's style sheet to match.
47         (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
48         * rendering/RenderVTTCue.cpp:
49         (WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
50         <div> into consideration when looking for the Cue text element.
51
52 2014-07-11  Zalan Bujtas  <zalan@apple.com>
53
54         Subpixel layout: return integral results for offset*, client*, scroll* by default.
55         https://bugs.webkit.org/show_bug.cgi?id=134651
56
57         Reviewed by Simon Fraser.
58
59         Revert to returning integral values for Element.offset* client* scroll* by default.
60         Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
61
62         Since snapped dimension depends on both the original point and the width/height of the box,
63         we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
64
65         Covered by existing tests
66  
67         * dom/Element.cpp:
68         (WebCore::subpixelMetricsEnabled):
69         (WebCore::convertToNonSubpixelValueIfNeeded):
70         (WebCore::Element::offsetLeft):
71         (WebCore::Element::offsetTop):
72         (WebCore::Element::offsetWidth):
73         (WebCore::Element::offsetHeight):
74         (WebCore::Element::clientLeft):
75         (WebCore::Element::clientTop):
76         (WebCore::Element::clientWidth):
77         (WebCore::Element::clientHeight):
78         * page/Settings.in:
79
80 2014-07-11  Zalan Bujtas  <zalan@apple.com>
81
82         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
83         https://bugs.webkit.org/show_bug.cgi?id=134824
84         <rdar://problem/17612729>
85
86         Reviewed by Simon Fraser.
87
88         Transparent layer clipping needs device pixel offset adjusting.
89
90         Test: fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html
91
92         * rendering/RenderLayer.cpp:
93         (WebCore::RenderLayer::beginTransparencyLayers):
94         (WebCore::RenderLayer::paintLayer):
95         (WebCore::RenderLayer::paintLayerContents):
96         (WebCore::RenderLayer::paintBackgroundForFragments):
97         (WebCore::RenderLayer::paintForegroundForFragments):
98         * rendering/RenderLayer.h:
99
100 2014-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
101
102         Unreviewed. Remove unused file.
103
104         * html/shadow/MediaControlsGtk.h: Removed.
105
106 2014-07-11  Manuel Rego Casasnovas  <rego@igalia.com>
107
108         [CSS Grid Layout] Update grid-auto-flow to the new syntax
109         https://bugs.webkit.org/show_bug.cgi?id=134057
110
111         Reviewed by Sergio Villar Senin.
112
113         In last versions of the spec grid-auto-flow syntax has changed. New
114         syntax is:
115         [ row | column ] && dense? | stack && [ row | column ]?
116
117         Implemented parsing for new syntax and added/modified test cases in
118         current layout tests.
119
120         For the moment, the implementation keeps working in the same way, but
121         using "stack" value for grid-auto-flow property instead of "none". This
122         should be fixed in a follow-up patch once "stack" is properly
123         implemented.
124
125         Also "dense" needs to be reviewed. Right now auto-placement algorithm is
126         always "dense" and never "sparse".
127
128         No new tests, update current tests to add new cases.
129
130         * css/CSSComputedStyleDeclaration.cpp:
131         (WebCore::ComputedStyleExtractor::propertyValue): Adapt to new syntax.
132         * css/CSSParser.cpp:
133         (WebCore::isValidKeywordPropertyAndValue): Removed grid-auto-flow as it
134         is not a keyword anymore.
135         (WebCore::isKeywordPropertyID): Ditto.
136         (WebCore::CSSParser::parseValue): Add specific method for parsing
137         grid-auto-flow.
138         (WebCore::CSSParser::parseGridShorthand): Adapt parsing for
139         grid-auto-flow property inside the shorthand.
140         (WebCore::isValidGridAutoFlowId): Helper method to check if the CSSValue
141         id is a valid keyword for grid-auto-flow property.
142         (WebCore::CSSParser::parseGridAutoFlow): Implement new parsing for
143         grid-auto-flow.
144         * css/CSSParser.h: Method header for grid-auto-flow parsing.
145         * css/CSSPrimitiveValueMappings.h:
146         (WebCore::CSSPrimitiveValue::operator GridAutoFlow): Deleted.
147         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
148         * css/CSSValueKeywords.in: Add new keywords required by grid-auto-flow:
149         "dense" and "stack".
150         * css/DeprecatedStyleBuilder.cpp:
151         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Remove
152         default handler as grid-auto-flow is not a keyword now.
153         * css/StyleResolver.cpp:
154         (WebCore::StyleResolver::applyProperty): Implement particular handler
155         for new grid-auto-flow syntax.
156         * rendering/RenderGrid.cpp:
157         (WebCore::RenderGrid::placeItemsOnGrid): Keep old "none" behavior as
158         "stack" behavior for the moment.
159         (WebCore::RenderGrid::autoPlacementMajorAxisDirection): Use the new
160         helper methods in RenderStyle.
161         (WebCore::RenderGrid::autoPlacementMinorAxisDirection): Ditto.
162         * rendering/style/GridResolvedPosition.cpp:
163         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle): Again
164         keep old "none" behavior for "stack".
165         * rendering/style/RenderStyle.h: Add new helper methods to know the
166         direction and algorithm of grid-auto-flow property.
167         * rendering/style/RenderStyleConstants.h: Redefine GridAutoFlow enum
168         using flags for algorithm and direction.
169         * rendering/style/StyleGridData.h: Change m_gridAutoFlow type to
170         unsigned.
171
172 2014-07-10  Myles C. Maxfield  <mmaxfield@apple.com>
173
174         [iOS] Pasting rich content does not perform a two-step paste
175         https://bugs.webkit.org/show_bug.cgi?id=134795
176
177         Reviewed by Benjamin Poulain.
178
179         UIKit requires writing something (anything!) to a particular pasteboard
180         during copy in order to flag the content as rich. When a paste occurs,
181         UIKit will read this flag and perform a two-step paste.
182
183         Test: platform/ios-sim/editing/pasteboard/two-step-paste.html
184
185         * platform/ios/PlatformPasteboardIOS.mm:
186         (WebCore::PlatformPasteboard::write):
187
188 2014-07-09  Andy Estes  <aestes@apple.com>
189
190         [iOS] Some QuickLook documents are not displayed as previews
191         https://bugs.webkit.org/show_bug.cgi?id=134788
192         <rdar://problem/17278194>
193
194         Reviewed by Pratik Solanki.
195
196         ResourceRequest::isMainResourceRequest() is not reliable (e.g. ResourceRequests reconstituted from an
197         NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
198         isMainResourceRequest() to check if a QuickLookHandle should be created when the Network Process is in use,
199         just check if the current ResourceLoader is the same as the DocumentLoader's ResourceLoader.
200
201         No new tests. QuickLook is not testable from WebKit.
202
203         * platform/network/ios/QuickLook.mm:
204         (WebCore::QuickLookHandle::create):
205
206 2014-07-10  Andreas Kling  <akling@apple.com>
207
208         [iOS WebKit2] Don't uninstall the memory pressure listener after first signal.
209         <https://webkit.org/b/134814>
210
211         The call to uninstall() should not be made on iOS since iOS doesn't use the
212         hold-off mechanism in MemoryPressureHandler.
213
214         Reviewed by Benjamin Poulain.
215
216         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
217         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
218
219 2014-07-10  Jer Noble  <jer.noble@apple.com>
220
221         [MSE] Overlapping appended ranges must cause the decoder to flush and re-enqueue.
222         https://bugs.webkit.org/show_bug.cgi?id=134805
223
224         Reviewed by Eric Carlson.
225
226         When appending a range of media data which overlaps with an existing range, SourceBuffer
227         must cause the decoder to flush and re-enqueue samples. Those samples removed by appending
228         the overlapping range may have already been enqueued for display, and unless the decode
229         queue is flushed, corruption or decode errors may occur as the new samples are enqueued for
230         display.
231
232         Add a boolean flag onto TrackBuffer to indicate whether the decoder needs to be flushed and
233         re-enqueued the next time an append operation completes. Set this flag whenever samples are
234         removed due to overlapping or an explicit call to removeCodedFrames(). Move the contents of
235         sourceBufferPrivateSeekToTime() (which previously did flushing and re-enqueueing) into a new
236         function, reenqueueMediaForTime(), which can be called from sourceBufferPrivateAppendComplete().
237
238         Drive-by fix: findSyncSampleAfterDecodeIterator() would return the passed in iterator if that
239         sample is a sync-sample. Fix this to correctly return the next sync sample.
240
241         Drive-by fix: Use a SampleMap, rather than a DecodeOrderSampleMap, to track erased samples
242         so that the erasedSamples are correctly accounted for in both presentation and decode orders.
243
244         * Modules/mediasource/SampleMap.cpp:
245         (WebCore::SampleMap::empty): Add convenience method.
246         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Drive-by fix.
247         * Modules/mediasource/SampleMap.h:
248         (WebCore::SampleMap::decodeOrder): Added const accessor.
249         (WebCore::SampleMap::presentationOrder): Ditto.
250         (WebCore::SampleMap::addRange): Added.
251         * Modules/mediasource/SourceBuffer.cpp:
252         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): Add needsReenqueeing flag.
253         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Move contents into reenqueueMediaForTime().
254         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueMediaForTime() if necessary.
255         (WebCore::SourceBuffer::removeCodedFrames): Set needsReenqueing.
256         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
257         (WebCore::SourceBuffer::provideMediaData): Drive-by fix.
258         (WebCore::SourceBuffer::reenqueueMediaForTime): Moved from sourceBufferPrivateSeekToTime().
259         * Modules/mediasource/SourceBuffer.h:
260
261 2014-07-10  Pratik Solanki  <psolanki@apple.com>
262
263         ASSERT in SharedBuffer::maybeAppendDataArray() on MobileSafari launch
264         https://bugs.webkit.org/show_bug.cgi?id=134812
265         <rdar://problem/17628434>
266
267         Reviewed by Joseph Pecoraro.
268
269         Fix bug in my fix in r170930. Initialize the badly named m_shouldUsePurgeableMemory field to
270         false. This field indicates when it is okay to use purgeable memory and is set to true once
271         the resource is finished loading. By setting it to true in the constructor we were creating
272         purgeable memory while the resource was still being loaded and this triggered the assert.
273
274         No new tests. Should be covered by existing tests.
275
276         * platform/cf/SharedBufferCF.cpp:
277         (WebCore::SharedBuffer::SharedBuffer):
278
279 2014-07-10  Andreas Kling  <akling@apple.com>
280
281         [iOS WebKit2] Some memory pressure relief tweaks.
282         <https://webkit.org/b/134811>
283
284         Split memory pressure relief into critical and non-critical sections.
285         Non-critical relief is for clearing out things that are really not
286         essential, e.g unused font data, text measurement caches, etc.
287
288         On iOS, only flip the "WebKit is under memory pressure" flag when we
289         are under *critical* memroy pressure, rather than doing it early on
290         and gimping ourselves because other processes are too big.
291
292         Also added logging for when we transition in/out of system pressure.
293
294         Reviewed by Geoffrey Garen.
295
296         * platform/MemoryPressureHandler.cpp:
297         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
298         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
299         (WebCore::MemoryPressureHandler::releaseMemory):
300         * platform/MemoryPressureHandler.h:
301         (WebCore::MemoryPressureHandler::ReliefLogger::loggingEnabled):
302         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
303         (WebCore::MemoryPressureHandler::install):
304
305 2014-07-10  Beth Dakin  <bdakin@apple.com>
306
307         Need Setting/WKPreference that allows clients to prevent scrollbars from drawing 
308         on a secondary thread
309         https://bugs.webkit.org/show_bug.cgi?id=134778
310         -and corresponding-
311         <rdar://problem/17595333>
312
313         Reviewed by Tim Horton.
314
315         This is a requirement for some types of performance tests. The patch adds a new 
316         virtual function to ScrollableArea that forces subclasses to indicate the value of 
317         the Setting. This is required because Scrollbar and ScrollableArea can’t get to 
318         Settings on their own.
319
320         * page/FrameView.cpp:
321         (WebCore::FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
322         * page/FrameView.h:
323         * page/Settings.in:
324         * platform/ScrollableArea.h:
325         * platform/Scrollbar.cpp:
326         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
327         * platform/win/PopupMenuWin.h:
328         * rendering/RenderLayer.cpp:
329         (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
330         * rendering/RenderLayer.h:
331         * rendering/RenderListBox.cpp:
332         (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
333         * rendering/RenderListBox.h:
334
335 2014-07-10  Brady Eidson  <beidson@apple.com>
336
337         Phone number highlights should always be visible if the mouse hovers over.
338         <rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
339
340         Reviewed by Tim Horton.
341
342         * WebCore.exp.in:
343
344 2014-07-10  Timothy Horton  <timothy_horton@apple.com>
345
346         Assertions or crashes under _takeViewSnapshot when restoring windows
347         https://bugs.webkit.org/show_bug.cgi?id=134792
348
349         Reviewed by Simon Fraser.
350
351         * platform/graphics/cocoa/IOSurface.mm:
352         (IOSurface::createFromImage):
353
354 2014-07-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
355
356         [XHR] overrideMimeType() should be able to change encoding in HEADERS RECEIVED state
357         https://bugs.webkit.org/show_bug.cgi?id=128968
358
359         Reviewed by Alexey Proskuryakov.
360
361         Moved response encoding computation from didReceiveResponse to didReceiveData, just before the decoder is instantiated.
362         This allows overrideMimeType to be changed within readystatechange event callback and have an impact on selected encoding.
363
364         Test: http/tests/xmlhttprequest/overridemimetype-headers-received-state-force-shiftjis.html
365
366         * xml/XMLHttpRequest.cpp:
367         (WebCore::XMLHttpRequest::didReceiveResponse): Removed m_responseEncoding computation from response and mimeTypeOverride.
368         (WebCore::XMLHttpRequest::didReceiveData): Added m_responseEncoding computation from response and mimeTypeOverride.
369
370 2014-07-09  Brady Eidson  <beidson@apple.com>
371
372         Fire connected/disconnected events for Gamepads.
373         https://bugs.webkit.org/show_bug.cgi?id=134386
374
375         Reviewed by Dean Jackson.
376
377         No new tests (No effect in a currently tested config)
378
379         * Modules/gamepad/GamepadManager.cpp:
380         (WebCore::navigatorGamepadFromDOMWindow): Handling converting a possibly-null Navigator into
381             a possibly null NavigatorGamepad.
382         (WebCore::GamepadManager::platformGamepadConnected): Notify blind Navigator/DOMWindows of all
383             previously attached Gamepads, then notify everybody of this new gamepad.
384         (WebCore::GamepadManager::platformGamepadDisconnected): Handle dispatching the disconnected
385             event to all registered DOMWindows.
386         (WebCore::GamepadManager::platformGamepadInputActivity): Notify blind Navigator/DOMWindows of all
387             attached Gamepads.
388         (WebCore::GamepadManager::makeGamepadVisible): Handles notifying setting up a new gamepads
389             with all NavigatorGamepads as well as dispatching the connected even to DOMWindows.
390         (WebCore::GamepadManager::registerDOMWindow):
391         (WebCore::GamepadManager::unregisterDOMWindow):
392         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Deleted.
393         * Modules/gamepad/GamepadManager.h:
394
395         * Modules/gamepad/NavigatorGamepad.cpp:
396         (WebCore::NavigatorGamepad::gamepadAtIndex):
397         * Modules/gamepad/NavigatorGamepad.h:
398
399 2014-07-09  Benjamin Poulain  <bpoulain@apple.com>
400
401         [iOS][WK2] Disable text quantization while actively changing the page's scale factor
402         https://bugs.webkit.org/show_bug.cgi?id=134781
403
404         Reviewed by Tim Horton and Myles C. Maxfield.
405
406         Query the chrome client to setup quantization on each layers.
407
408         * page/ChromeClient.h:
409         (WebCore::ChromeClient::hasStablePageScaleFactor):
410         * platform/graphics/mac/FontMac.mm:
411         (WebCore::Font::drawGlyphs):
412         * rendering/RenderLayer.cpp:
413         (WebCore::RenderLayer::setupFontSubpixelQuantization):
414
415 2014-07-09  peavo@outlook.com  <peavo@outlook.com>
416
417         [Curl] Cache entry invalidated too early.
418         https://bugs.webkit.org/show_bug.cgi?id=134681
419
420         Reviewed by Alex Christensen.
421
422         When a cache entry has expired, it is invalidated when a request for the corresponding url is started.
423         This is too early, since the resource is possibly not modified (even though it has expired),
424         and the server might respond with a 304 (not modified) response.
425         When we then receive a 304 response, the cache entry is deleted, and we have no cached response/data to provide.
426         This can be solved by not invalidating the entry when a request for that url is started,
427         but instead invalidate when a 200 OK response is received (which means the resource has been modified).
428
429         * platform/network/curl/CurlCacheManager.cpp:
430         (WebCore::CurlCacheManager::isCached): Avoid invalidating cache entry when it has expired, wait until we know the server response.
431         * platform/network/curl/CurlCacheManager.h: Added const modifier.
432
433 2014-07-09  Myles C. Maxfield  <mmaxfield@apple.com>
434
435         Revert r170413 and r170390
436         https://bugs.webkit.org/show_bug.cgi?id=134741
437
438         Reviewed by Benjamin Poulain.
439
440         These patches caused a variety of failures. I'm going to break them up into
441         smaller chunks and commit them separately at some point in the future.
442
443         Requesting a review from Ben Poulain because there were some conflicts with
444         r170561 in InlineTextBox.cpp and InlineTextBox.h.
445
446         * WebCore.exp.in:
447         * platform/graphics/Font.cpp:
448         (WebCore::Font::drawText):
449         (WebCore::Font::drawEmphasisMarks):
450         (WebCore::Font::adjustSelectionRectForText):
451         (WebCore::computeUnderlineType):
452         * platform/graphics/Font.h:
453         * platform/graphics/FontFastPath.cpp:
454         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
455         (WebCore::Font::drawSimpleText):
456         (WebCore::Font::drawEmphasisMarksForSimpleText):
457         (WebCore::Font::drawGlyphBuffer):
458         (WebCore::Font::drawEmphasisMarks):
459         (WebCore::Font::adjustSelectionRectForSimpleText):
460         * platform/graphics/GlyphBuffer.h:
461         (WebCore::GlyphBuffer::size):
462         (WebCore::GlyphBuffer::glyphs):
463         (WebCore::GlyphBuffer::advances):
464         (WebCore::GlyphBuffer::fontDataAt):
465         (WebCore::GlyphBuffer::advanceAt):
466         (WebCore::GlyphBuffer::offsetAt):
467         (WebCore::GlyphBuffer::reverse):
468         (WebCore::GlyphBuffer::offsetInString):
469         (WebCore::GlyphBuffer::swap):
470         * platform/graphics/GraphicsContext.cpp:
471         * platform/graphics/Latin1TextIterator.h:
472         (WebCore::Latin1TextIterator::Latin1TextIterator):
473         (WebCore::Latin1TextIterator::currentCharacter):
474         * platform/graphics/SimpleFontData.h:
475         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
476         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
477         * platform/graphics/SurrogatePairAwareTextIterator.h:
478         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
479         * platform/graphics/TextRun.h:
480         (WebCore::TextRun::length):
481         (WebCore::TextRun::charactersLength):
482         * platform/graphics/WidthIterator.cpp:
483         (WebCore::WidthIterator::glyphDataForCharacter):
484         (WebCore::applyFontTransforms):
485         (WebCore::WidthIterator::advanceInternal):
486         (WebCore::WidthIterator::advance):
487         (WebCore::WidthIterator::advanceOneCharacter):
488         * platform/graphics/WidthIterator.h:
489         * platform/graphics/cairo/FontCairo.cpp:
490         (WebCore::Font::drawGlyphs):
491         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
492         (WebCore::Font::drawComplexText):
493         (WebCore::Font::drawEmphasisMarksForComplexText):
494         (WebCore::Font::adjustSelectionRectForComplexText):
495         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
496         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
497         * platform/graphics/mac/FontComplexTextMac.cpp:
498         (WebCore::Font::adjustSelectionRectForComplexText):
499         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
500         (WebCore::Font::drawComplexText):
501         (WebCore::Font::drawEmphasisMarksForComplexText):
502         * platform/graphics/mac/FontMac.mm:
503         (WebCore::Font::drawGlyphs):
504         * platform/graphics/win/FontCGWin.cpp:
505         (WebCore::Font::drawGlyphs):
506         * platform/graphics/win/FontWin.cpp:
507         (WebCore::Font::adjustSelectionRectForComplexText):
508         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
509         (WebCore::Font::drawComplexText):
510         (WebCore::Font::drawEmphasisMarksForComplexText):
511         * platform/graphics/wince/FontWinCE.cpp:
512         (WebCore::Font::drawGlyphs):
513         (WebCore::Font::drawComplexText):
514         (WebCore::Font::drawEmphasisMarksForComplexText):
515         (WebCore::Font::selectionRectForComplexText):
516         * rendering/InlineTextBox.cpp:
517         (WebCore::InlineTextBox::isSelected):
518         (WebCore::InlineTextBox::selectionState):
519         (WebCore::InlineTextBox::localSelectionRect):
520         (WebCore::InlineTextBox::paint):
521         (WebCore::InlineTextBox::selectionStartEnd):
522         (WebCore::InlineTextBox::paintSelection):
523         (WebCore::InlineTextBox::paintCompositionBackground):
524         (WebCore::InlineTextBox::paintDocumentMarker):
525         (WebCore::InlineTextBox::paintTextMatchMarker):
526         (WebCore::InlineTextBox::computeRectForReplacementMarker):
527         (WebCore::InlineTextBox::paintCompositionUnderline):
528         (WebCore::InlineTextBox::positionForOffset):
529         (WebCore::InlineTextBox::constructTextRun):
530         * rendering/InlineTextBox.h:
531         (WebCore::InlineTextBox::truncation):
532         * rendering/RenderCombineText.cpp:
533         (WebCore::RenderCombineText::getStringToRender):
534         * rendering/RenderCombineText.h:
535         * rendering/RenderTextLineBoxes.cpp:
536         (WebCore::ellipsisRectForBox):
537         * rendering/svg/SVGInlineFlowBox.cpp:
538         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
539         * rendering/svg/SVGInlineTextBox.cpp:
540         (WebCore::SVGInlineTextBox::positionForOffset):
541         (WebCore::SVGInlineTextBox::localSelectionRect):
542         (WebCore::SVGInlineTextBox::paintSelectionBackground):
543         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
544         (WebCore::SVGInlineTextBox::paintText):
545         * rendering/svg/SVGInlineTextBox.h:
546         * rendering/svg/SVGTextMetricsBuilder.cpp:
547         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
548         (WebCore::SVGTextMetricsBuilder::advance):
549         * rendering/svg/SVGTextQuery.cpp:
550         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
551         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
552         (WebCore::SVGTextQuery::subStringLengthCallback):
553         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
554         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
555         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
556         (WebCore::SVGTextQuery::extentOfCharacterCallback):
557         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
558         * rendering/svg/SVGTextQuery.h:
559         * rendering/svg/SVGTextRunRenderingContext.cpp:
560         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
561         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
562         * rendering/svg/SVGTextRunRenderingContext.h:
563         * svg/SVGFontData.cpp:
564         (WebCore::SVGFontData::applySVGGlyphSelection):
565         * svg/SVGFontData.h:
566
567 2014-07-08  Jeffrey Pfau  <jpfau@apple.com>
568
569         Fix flaky loading tests
570         https://bugs.webkit.org/show_bug.cgi?id=133696
571
572         Reviewed by Ryosuke Niwa.
573
574         In some cases, the Frame may be destroyed while the loader is
575         initializing. Make sure we don't delete it too early.
576
577         * loader/FrameLoader.cpp:
578         (WebCore::FrameLoader::init):
579
580 2014-07-09  Simon Fraser  <simon.fraser@apple.com>
581
582         Make IndirectCompositingReason an enum class
583         https://bugs.webkit.org/show_bug.cgi?id=134789
584
585         Reviewed by Tim Horton.
586
587         Make RenderLayer::IndirectCompositingReason an enum class, and change some code
588         in RenderLayerCompositor::reasonsForCompositing() to use a switch.
589
590         * rendering/RenderLayer.cpp:
591         (WebCore::RenderLayer::RenderLayer):
592         * rendering/RenderLayer.h:
593         * rendering/RenderLayerCompositor.cpp:
594         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
595         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
596         (WebCore::RenderLayerCompositor::reasonsForCompositing):
597         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
598
599 2014-07-09  Pratik Solanki  <psolanki@apple.com>
600
601         Make SharedBuffer::append(SharedBuffer*) be smarter about CFData and data arrays
602         https://bugs.webkit.org/show_bug.cgi?id=134731
603
604         Reviewed by Antti Koivisto.
605
606         If the target SharedBuffer has a CFDataRef or a data array then we can simply retain that
607         CFDataRef or data array elements in the SharedBuffer being appended to. This avoids
608         unnecessary copying.
609
610         No new tests because no functional changes.
611
612         * platform/SharedBuffer.cpp:
613         (WebCore::SharedBuffer::append):
614         (WebCore::SharedBuffer::maybeAppendPlatformData):
615         * platform/SharedBuffer.h:
616         * platform/cf/SharedBufferCF.cpp:
617         (WebCore::SharedBuffer::maybeAppendPlatformData):
618         (WebCore::SharedBuffer::maybeAppendDataArray):
619         * platform/soup/SharedBufferSoup.cpp:
620         (WebCore::SharedBuffer::maybeAppendPlatformData):
621
622 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
623
624         [Win] Remove uses of 'bash' in build system
625         https://bugs.webkit.org/show_bug.cgi?id=134782
626         <rdar://problem/17615533>
627
628         Reviewed by Dean Jackson.
629
630         Remove uses of 'bash' by replacing Windows-specific bash scripts
631         with Perl equivalents.
632
633         * WebCore.vcxproj/WebCoreGenerated.make:
634         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
635         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters:
636         * WebCore.vcxproj/WebCorePreBuild.cmd:
637         * WebCore.vcxproj/build-generated-files.pl: Copied from Source/WebCore/WebCore.vcxproj/build-generated-files.sh.
638         * WebCore.vcxproj/build-generated-files.sh: Removed.
639         * WebCore.vcxproj/migrate-scripts.pl: Copied from Source/WebCore/WebCore.vcxproj/migrate-scripts.sh.
640         * WebCore.vcxproj/migrate-scripts.sh: Removed.
641
642 2014-07-09  Anders Carlsson  <andersca@apple.com>
643
644         Support transparent WKWebViews
645         https://bugs.webkit.org/show_bug.cgi?id=134779
646         <rdar://problem/17351058>
647
648         Reviewed by Tim Horton.
649
650         Schedule rebuilding the compositing layers if a FrameView's transparency changes.
651
652         * page/FrameView.cpp:
653         (WebCore::FrameView::setTransparent):
654
655 2014-07-09  Javier Fernandez  <jfernandez@igalia.com>
656         CSS canvas color parsing accepts invalid color identifiers
657         https://bugs.webkit.org/show_bug.cgi?id=134661
658
659         Reviewed by Benjamin Poulain.
660
661         Current implementation of the CSSParser::parseSystemColor assumes
662         that if a valid cssValueKeywordID is got then it has to be a valid
663         color. Such assumption is wrong and lead to many bugs and layout
664         test failures.
665
666         The parseSystemFunction determines now whether the parsed color is
667         valid or not.
668
669         Addtionally, a new method has been added to share the logic of
670         determining whether a CSSValueID is a valid primitive values for
671         colors or not. Generally, we should avoid passing invalid color
672         identifiers to the theming API.
673
674         No new tests, but added additional cases to the
675         canvas-color-serialization.html, test-setting-canvas-color and
676         rgb-color-parse test.
677
678         * css/CSSParser.cpp:
679         (WebCore::validPrimitiveValueColor): Added.
680         (WebCore::parseColorValue):
681         (WebCore::CSSParser::parseSystemColor):
682
683 2014-06-28  Jer Noble  <jer.noble@apple.com>
684
685         [MSE] http/tests/media/media-source/mediasource-remove.html is failing
686         https://bugs.webkit.org/show_bug.cgi?id=134768
687
688         Reviewed by Eric Carlson.
689
690         Fix multiple bugs causing mediasource-remove.html to fail:
691
692         Separate out setDuration() into setDurationInternal() so that steps which require
693         us to run the "duration change algorithm" don't bail out if the SoureBuffer is
694         inside updating().
695
696         * Modules/mediasource/MediaSource.cpp:
697         (WebCore::MediaSource::setDuration):
698         (WebCore::MediaSource::setDurationInternal):
699         * Modules/mediasource/MediaSource.h:
700         * Modules/mediasource/SourceBuffer.cpp:
701         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
702         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
703
704         When removing coded frames, do so starting from the first sample in the range in
705         decode order, so that frames dependant on removed frames are themselves removed. Add
706         a convenience method in SampleMap findSampleWithPresentationTime(), and rename
707         findSampleAfterPresentationTime() to findSampleOnOrAfterPresentationTime() to correctly
708         reflect what the method does, and simplify its implementation by searching the map's keys
709         directly.
710
711         * Modules/mediasource/SampleMap.cpp:
712         (WebCore::PresentationOrderSampleMap::findSampleWithPresentationTime):
713         (WebCore::PresentationOrderSampleMap::findSampleOnOrAfterPresentationTime):
714         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime):
715         (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Deleted.
716         * Modules/mediasource/SampleMap.h:
717         * Modules/mediasource/SourceBuffer.cpp:
718         (WebCore::decodeTimeComparator):
719         (WebCore::SourceBuffer::removeCodedFrames):
720
721         Throw the correct exception (INVALID_STATE_ERR) from SourceBuffer::remove().
722
723         * Modules/mediasource/SourceBuffer.cpp:
724         (WebCore::SourceBuffer::remove):
725
726 2014-07-09  Pratik Solanki  <psolanki@apple.com>
727
728         Add SharedBuffer::wrapCFDataArray() and use it
729         https://bugs.webkit.org/show_bug.cgi?id=134733
730
731         Reviewed by Antti Koivisto.
732
733         No new tests. Should be covered by existing tests.
734
735         * platform/SharedBuffer.h:
736         * platform/cf/SharedBufferCF.cpp:
737         (WebCore::SharedBuffer::wrapCFDataArray):
738         (WebCore::SharedBuffer::SharedBuffer):
739         * platform/network/ResourceHandle.h:
740         * platform/network/cf/ResourceHandleCFNet.cpp:
741         (WebCore::ResourceHandle::handleDataArray): Deleted.
742         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
743         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
744         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
745         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
746         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
747         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
748         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
749         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]):
750
751 2014-07-09  Pratik Solanki  <psolanki@apple.com>
752
753         Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
754         https://bugs.webkit.org/show_bug.cgi?id=134732
755
756         Reviewed by Darin Adler.
757
758         No new tests because no functional changes.
759
760         * WebCore.exp.in:
761
762 2014-07-09  Tim Horton  <timothy_horton@apple.com>
763
764         Fix the !USE(IOSURFACE) build.
765
766         * WebCore.exp.in:
767
768 2014-07-09  Tim Horton  <timothy_horton@apple.com>
769
770         Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
771         https://bugs.webkit.org/show_bug.cgi?id=134773
772
773         Reviewed by Anders Carlsson.
774
775         * WebCore.exp.in:
776         * platform/graphics/cocoa/IOSurface.h:
777         * platform/graphics/cocoa/IOSurface.mm:
778         (IOSurface::createFromImage):
779         Move make-an-IOSurface-from-a-CGImageRef into WebCore::IOSurface.
780
781 2014-07-09  Enrica Casucci  <enrica@apple.com>
782
783         Implement Editor::fontAttributesForSelectionStart() or iOS.
784         https://bugs.webkit.org/show_bug.cgi?id=134771
785         <rdar://problem/16167838>
786
787         Reviewed by Ryosuke Niwa.
788
789         Implement for iOS the equivalent function we have for OS X.
790
791         * editing/ios/EditorIOS.mm:
792         (WebCore::Editor::fontAttributesForSelectionStart):
793
794 2014-07-09  Brent Fulgham  <bfulgham@apple.com>
795
796         [Win] Remove use of 'grep' in build steps
797         https://bugs.webkit.org/show_bug.cgi?id=134770
798         <rdar://problem/17608783>
799
800         Reviewed by Tim Horton.
801
802         Replace uses of the grep command in Windows builds with the equivalent
803         Perl program.
804
805         * WebCore.vcxproj/WebCoreGenerated.make:
806         * WebCore.vcxproj/WebCorePreBuild.cmd:
807         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
808         (WebCore::WebCoreAVCFResourceLoader::notifyFinished):
809
810 2014-07-09  Alex Christensen  <achristensen@webkit.org>
811
812         Added css jit profiler, disabled by default.
813         https://bugs.webkit.org/show_bug.cgi?id=134695
814
815         Reviewed by Benjamin Poulain.
816
817         * css/ElementRuleCollector.cpp:
818         (WebCore::ElementRuleCollector::ruleMatches):
819         Tell the RuleData when its compiled selector is used.
820         * css/RuleSet.cpp:
821         (WebCore::RuleData::RuleData):
822         Initialize the compiled selector use count to 0.
823         * css/RuleSet.h:
824         (WebCore::RuleData::~RuleData):
825         (WebCore::RuleData::compiledSelectorUsed):
826         Count and log the number of times a compiled selector is used.
827         * cssjit/SelectorCompiler.h:
828         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
829         * dom/SelectorQuery.cpp:
830         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
831         (WebCore::SelectorDataList::execute):
832         Tell the SelectorData when its compiled selector is used.
833         * dom/SelectorQuery.h:
834         (WebCore::SelectorDataList::SelectorData::SelectorData):
835         (WebCore::SelectorDataList::SelectorData::~SelectorData):
836         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
837         Count and log the number of times a compiled selector is used.
838
839 2014-07-09  Eric Carlson  <eric.carlson@apple.com>
840
841         [iOS] caption size is sometimes incorrect in fullscreen
842         https://bugs.webkit.org/show_bug.cgi?id=134740
843
844         Reviewed by Jer Noble.
845
846         Captions on iOS are displayed in fullscreen with a TextTrackRepresentation object. Because
847         the fullscreen video presentation is controlled by code in the UI process running on the
848         UI thread, WebCore is notified of changes to fullscreen state asynchronously. This resulted
849         in the TextTrackRepresentation object being created and/or destroyed too late some of the 
850         time, which caused us to sometimes display captions incorrectly. Fix this by setting up and
851         tearing down the TextTrackRepresentation object when WebCore's 'webkitfullscreenchange'
852         event fires.
853
854         * Modules/mediacontrols/MediaControlsHost.cpp:
855         (WebCore::MediaControlsHost::enteredFullscreen): Notify text track container.
856         (WebCore::MediaControlsHost::exitedFullscreen): Ditto.
857         * Modules/mediacontrols/MediaControlsHost.h:
858         * Modules/mediacontrols/MediaControlsHost.idl:
859
860         * Modules/mediacontrols/mediaControlsApple.js:
861         (Controller.prototype.handleFullscreenChange): Notify host of fullscreen change.
862
863         * html/HTMLMediaElement.cpp:
864         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): Only return true when in
865             fullscreen.
866         (WebCore::HTMLMediaElement::setVideoFullscreenLayer): Call updateTextTrackDisplay.
867
868         * html/shadow/MediaControlElements.cpp:
869         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
870             m_updateTextTrackRepresentationStyle to false.
871         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Move logic for creating
872             TextTrackRepresentation to updateTextTrackRepresentation.
873         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize): New, split out of updateTimerFired.
874         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Move code to force immediate
875             font size change to updateActiveCuesFontSize.
876         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): New, update
877             text track representation, creating first if necessary.
878         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Add an early
879             return if we don't have a text track representation.
880         (WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation): Early
881             return if there is nothing to be done.
882         (WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): Force a caption update
883             if there are visible captions.
884         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set m_updateTextTrackRepresentationStyle
885             to true.
886         (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):  Force a 
887             caption update if there are visible captions.
888         * html/shadow/MediaControlElements.h:
889
890 2014-07-09  Jer Noble  <jer.noble@apple.com>
891
892         [MSE] http/tests/media/media-source/mediasource-endofstream-invaliderror.html is failing.
893         https://bugs.webkit.org/show_bug.cgi?id=134413
894
895         Reviewed by Eric Carlson.
896
897         Update MediaSource.endOfStream() to take an optional enum instead of an optional String.
898
899         * Modules/mediasource/MediaSource.cpp:
900         (WebCore::MediaSource::endOfStream):
901         * Modules/mediasource/MediaSource.h:
902         * Modules/mediasource/MediaSource.idl:
903
904 2014-07-08  Brady Eidson  <beidson@apple.com>
905
906         DOMWindows should register themselves with the GamepadManager when they have event listeners
907         https://bugs.webkit.org/show_bug.cgi?id=134669
908
909         Reviewed by Dean Jackson.
910
911         No new tests (No effect in a currently tested config)
912
913         By having DOMWindows register with the GamepadManager when they have/don’t have gamepad event
914         listeners, we accomplish two things:
915         1 - It’s simple for GamepadManager to dispatch gamepad events directly to the DOMWindows interested.
916         2 - We know when to start monitoring for gamepad connections.
917
918         * Modules/gamepad/GamepadManager.cpp:
919         (WebCore::GamepadManager::GamepadManager):
920         (WebCore::GamepadManager::registerNavigator):
921         (WebCore::GamepadManager::unregisterNavigator):
922         (WebCore::GamepadManager::registerDOMWindow):
923         (WebCore::GamepadManager::unregisterDOMWindow):
924         (WebCore::GamepadManager::maybeStartMonitoringGamepads): Start monitoring gamepads if there are any
925           registered DOMWindows or NavigatorGamepads, and we aren’t already monitoring them.
926         (WebCore::GamepadManager::maybeStopMonitoringGamepads): Stop monitoring gamepads if there aren’t any
927           registered DOMWindows or NavigatorGameads, and we have been monitoring them before now.
928         * Modules/gamepad/GamepadManager.h:
929
930         * dom/EventNames.h:
931         (WebCore::EventNames::isGamepadEventType):
932
933         * page/DOMWindow.cpp:
934         (WebCore::DOMWindow::DOMWindow):
935         (WebCore::DOMWindow::~DOMWindow): If registered for gamepad events, unregister now.
936         (WebCore::DOMWindow::incrementGamepadEventListenerCount): If this is the first gamepad event
937           listener, register with the GamepadManager now.
938         (WebCore::DOMWindow::decrementGamepadEventListenerCount): If this was the last gamepad event
939           listener, unregister from the GamepadManager now.
940         (WebCore::DOMWindow::addEventListener):
941         (WebCore::DOMWindow::removeEventListener):
942         * page/DOMWindow.h:
943
944 2014-07-08  Sun-woo Nam  <sunny.nam@samsung.com>
945
946         [EFL] Fix the build break when ENABLE_ENCRYPTED_MEDIA_V2 is turned on.
947         https://bugs.webkit.org/show_bug.cgi?id=134750
948
949         Reviewed by Gyuyoung Kim.
950
951         When turning ENABLE_ENCRYPTED_MEDIA_V2 on, build break occurs.
952         Some source files need to be included in CMakeLists.txt file for build.
953         And wrap the included header file which is built only on mac and wince.
954
955         * CMakeLists.txt:
956         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
957
958 2014-07-08  Eric Carlson  <eric.carlson@apple.com>
959
960         [iOS] user caption preferences not applied
961         https://bugs.webkit.org/show_bug.cgi?id=134599
962
963         Reviewed by Sam Weinig.
964
965         * page/CaptionUserPreferences.cpp:
966         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): All Pages in a PageGroup
967         do not necessarily use the same PageUserContentController, so apply and remove caption user
968         the style sheet directly to each page rather than to the page group.
969
970 2014-07-08  Commit Queue  <commit-queue@webkit.org>
971
972         Unreviewed, rolling out r170894.
973         https://bugs.webkit.org/show_bug.cgi?id=134749
974
975         "It broke the build on mountainlion release 32bit" (Requested
976         by mmirman on #webkit).
977
978         Reverted changeset:
979
980         "Added css jit profiler, disabled by default."
981         https://bugs.webkit.org/show_bug.cgi?id=134695
982         http://trac.webkit.org/changeset/170894
983
984 2014-07-08  Jeremy Jones  <jeremyj@apple.com>
985
986         WebVideoFullscreenInterfaceAVKit should lazily create m_playerController.
987         https://bugs.webkit.org/show_bug.cgi?id=134706
988
989         Reviewed by Simon Fraser.
990
991         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
992         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
993         Don't set the delegate if m_playerController isn't created.
994
995 2014-07-08  Bem Jones-Bey  <bjonesbe@adobe.com>
996
997         Ensure we compute the height of replaced elements to 'auto' when appropriate.
998         https://bugs.webkit.org/show_bug.cgi?id=134700
999
1000         Reviewed by David Hyatt.
1001
1002         This fixes two issues:
1003
1004         1) If a replaced element has a percentage height specified then its
1005         height should compute to 'auto' when its containing block does not
1006         have a height 'specified explicitly'. We were taking this to mean when
1007         its containing block's specified height value is 'auto' - in fact it
1008         means when the containing block's computed height is auto.
1009
1010         2) Top and bottom on the containing block should only affect the
1011         height of the block if that block has absolute or fixed position.
1012
1013         This brings us into line with IE, Firefox, and Chrome.
1014
1015         This is a port of Blink patches by Rob Hogan and David Vest.
1016
1017         Tests: css2.1/20110323/height-percentage-005.htm
1018                fast/css/replaced-element-ignore-top-bottom.html
1019
1020         * rendering/RenderBoxModelObject.cpp:
1021         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
1022
1023 2014-07-08  Alex Christensen  <achristensen@webkit.org>
1024
1025         Added css jit profiler, disabled by default.
1026         https://bugs.webkit.org/show_bug.cgi?id=134695
1027
1028         Reviewed by Benjamin Poulain.
1029
1030         * css/ElementRuleCollector.cpp:
1031         (WebCore::ElementRuleCollector::ruleMatches):
1032         Tell the RuleData when its compiled selector is used.
1033         * css/RuleSet.cpp:
1034         (WebCore::RuleData::RuleData):
1035         Initialize the compiled selector use count to 0.
1036         * css/RuleSet.h:
1037         (WebCore::RuleData::~RuleData):
1038         (WebCore::RuleData::compiledSelectorUsed):
1039         Count and log the number of times a compiled selector is used.
1040         * cssjit/SelectorCompiler.h:
1041         Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
1042         * dom/SelectorQuery.cpp:
1043         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
1044         (WebCore::SelectorDataList::execute):
1045         Tell the SelectorData when its compiled selector is used.
1046         * dom/SelectorQuery.h:
1047         (WebCore::SelectorDataList::SelectorData::SelectorData):
1048         (WebCore::SelectorDataList::SelectorData::~SelectorData):
1049         (WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
1050         Count and log the number of times a compiled selector is used.
1051
1052 2014-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1053
1054         Unreviewed. Fix GObject DOM bindings API breaks test after r170700.
1055
1056         Add missing WebKitDOMXPathNSResolver.symbols that I forgot to add
1057         in r170700.
1058
1059         * bindings/gobject/WebKitDOMXPathNSResolver.symbols: Added.
1060
1061 2014-07-07  Pratik Solanki  <psolanki@apple.com>
1062
1063         Unreviewed. iOS build fix after r170871.
1064
1065         * rendering/RenderThemeIOS.mm:
1066         (WebCore::adjustInputElementButtonStyle):
1067
1068 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1069
1070         Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
1071         https://bugs.webkit.org/show_bug.cgi?id=134710
1072         <rdar://problem/17545291>
1073
1074         Reviewed by Simon Fraser.
1075
1076         Transparent layer clipping needs device pixel snapping.
1077
1078         Test: fast/layers/wrong-clipping-semi-transparent-layer-on-subpixel-position.html
1079
1080         * rendering/RenderLayer.cpp:
1081         (WebCore::RenderLayer::beginTransparencyLayers):
1082
1083 2014-07-07  Benjamin Poulain  <benjamin@webkit.org>
1084
1085         LinkBuffer should not keep a reference to the MacroAssembler
1086         https://bugs.webkit.org/show_bug.cgi?id=134668
1087
1088         Reviewed by Geoffrey Garen.
1089
1090         * cssjit/SelectorCompiler.cpp:
1091         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1092
1093 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1094
1095         Subpixel rendering: Inline box decoration rounds to integral.
1096         https://bugs.webkit.org/show_bug.cgi?id=134523
1097         <rdar://problem/17530298>
1098
1099         Reviewed by Darin Adler.
1100
1101         This patch removes 2 integral roundings from InlineFlowBox:
1102         1. Border and padding sizes are implicitly integral truncated by the 'int' return type
1103            of borderLogicalLeft/Right()/paddingLogicalLeft/Right(). It results in losing
1104            fractional border/padding values.
1105         2. Painting rectangle is explicitly rounded which pushes border and
1106            other decoration elements to odd device pixel positions on retina displays.
1107         These values get pixel snapped right before calling in to GraphicsContext::*.
1108
1109         Test: fast/inline/hidpi-inline-text-decoration-with-subpixel-value.html
1110
1111         * rendering/InlineBox.h:
1112         (WebCore::InlineBox::frameRect):
1113         * rendering/InlineFlowBox.cpp:
1114         (WebCore::InlineFlowBox::nodeAtPoint):
1115         (WebCore::InlineFlowBox::paintBoxDecorations):
1116         (WebCore::InlineFlowBox::paintMask):
1117         (WebCore::InlineFlowBox::roundedFrameRect): Deleted.
1118         * rendering/InlineFlowBox.h:
1119         (WebCore::InlineFlowBox::borderLogicalLeft):
1120         (WebCore::InlineFlowBox::borderLogicalRight):
1121         (WebCore::InlineFlowBox::paddingLogicalLeft):
1122         (WebCore::InlineFlowBox::paddingLogicalRight):
1123
1124 2014-07-07  Zalan Bujtas  <zalan@apple.com>
1125
1126         Pass RenderLayer reference instead of pointer to RenderLayer::paintingExtent().
1127         https://bugs.webkit.org/show_bug.cgi?id=134714
1128
1129         Reviewed by Simon Fraser.
1130
1131         No change in functionality. 
1132
1133         * rendering/RenderLayer.cpp: * -> &
1134         (WebCore::expandClipRectForRegionAndReflection):
1135         (WebCore::expandClipRectForDescendantsAndReflection):
1136         (WebCore::transparencyClipBox):
1137         (WebCore::paintingExtent):
1138         (WebCore::RenderLayer::beginTransparencyLayers):
1139         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1140         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
1141         (WebCore::RenderLayer::paintingExtent): Deleted.
1142         * rendering/RenderLayer.h:
1143
1144 2014-07-07  Myles C. Maxfield  <mmaxfield@apple.com>
1145
1146         Remove misleadingly-named Font::isSVGFont()
1147         https://bugs.webkit.org/show_bug.cgi?id=134697
1148
1149         Reviewed by Dean Jackson.
1150
1151         Being a SVG font is a property of the FontData object, not
1152         the Font object. Providing an isSVGFont() function on the
1153         Font class will likely lead to incorrect code and non-obvious
1154         bugs.
1155
1156         No new tests because there is no behavior change.
1157
1158         * platform/graphics/Font.h:
1159         (WebCore::Font::isSVGFont): Deleted.
1160         * platform/graphics/mac/FontMac.mm:
1161         (WebCore::Font::primaryFontDataIsSystemFont):
1162         * rendering/InlineTextBox.cpp:
1163         (WebCore::InlineTextBox::constructTextRun):
1164         * rendering/RenderBlock.cpp:
1165         (WebCore::constructTextRunInternal):
1166         * rendering/SimpleLineLayout.cpp:
1167         (WebCore::SimpleLineLayout::canUseFor):
1168         * rendering/svg/SVGInlineTextBox.cpp:
1169         (WebCore::SVGInlineTextBox::constructTextRun):
1170         * rendering/svg/SVGTextMetrics.cpp:
1171         (WebCore::SVGTextMetrics::constructTextRun):
1172         (WebCore::SVGTextMetrics::SVGTextMetrics):
1173
1174 2014-07-07  Brady Eidson  <beidson@apple.com>
1175
1176         Move Gamepad index down into PlatformGamepad.
1177         https://bugs.webkit.org/show_bug.cgi?id=134670
1178
1179         Reviewed by Darin Adler.
1180
1181         PlatformGamepads always have an inherent index anyways.
1182         This will make things easier in all upcoming work.
1183
1184         * Modules/gamepad/Gamepad.cpp:
1185         (WebCore::Gamepad::Gamepad):
1186         * Modules/gamepad/Gamepad.h:
1187
1188         * Modules/gamepad/GamepadManager.cpp:
1189         (WebCore::GamepadManager::platformGamepadConnected):
1190         (WebCore::GamepadManager::platformGamepadDisconnected):
1191         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators):
1192         * Modules/gamepad/GamepadManager.h:
1193
1194         * Modules/gamepad/NavigatorGamepad.cpp:
1195         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
1196         (WebCore::NavigatorGamepad::gamepadConnected):
1197         (WebCore::NavigatorGamepad::gamepadDisconnected):
1198         * Modules/gamepad/NavigatorGamepad.h:
1199
1200         * platform/GamepadProviderClient.h:
1201
1202         * platform/PlatformGamepad.h:
1203         (WebCore::PlatformGamepad::index):
1204         (WebCore::PlatformGamepad::PlatformGamepad):
1205
1206         * platform/mac/HIDGamepad.cpp:
1207         (WebCore::HIDGamepad::HIDGamepad):
1208         * platform/mac/HIDGamepad.h:
1209
1210         * platform/mac/HIDGamepadProvider.cpp:
1211         (WebCore::HIDGamepadProvider::deviceAdded):
1212         (WebCore::HIDGamepadProvider::deviceRemoved):
1213         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
1214         * platform/mac/HIDGamepadProvider.h:
1215
1216 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
1217
1218         [UI-side compositing] Support reflections on custom layers like video
1219         https://bugs.webkit.org/show_bug.cgi?id=134701
1220
1221         Reviewed by Tim Horton.
1222
1223         Add a LayerTypeWebGLLayer layer type, and support casting to PlatformCALayerRemoteCustom.
1224
1225         * WebCore.exp.in: Export PlatformCALayerMac::layerTypeForPlatformLayer(CALayer*), and sort.
1226         * platform/graphics/ca/PlatformCALayer.h:
1227         (WebCore::PlatformCALayer::isPlatformCALayerRemoteCustom):
1228         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1229         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1230         (PlatformCALayerMac::layerTypeForPlatformLayer):
1231         (PlatformCALayerMac::PlatformCALayerMac):
1232         (PlatformCALayerMac::commonInit):
1233
1234 2014-07-07  Simon Fraser  <simon.fraser@apple.com>
1235
1236         [UI-side compositing] Crash when starting a filter transition on a reflected layer
1237         https://bugs.webkit.org/show_bug.cgi?id=134694
1238
1239         Reviewed by Tim Horton.
1240
1241         Don't call the owner if we failed to find the animation key (which actually
1242         isn't used by PlatformCALayerMac anyway).
1243
1244         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1245         (-[WebAnimationDelegate animationDidStart:]):
1246
1247 2014-07-07  Alex Christensen  <achristensen@webkit.org>
1248
1249         [iOS WebGL] Fix crash with too many nested glsl functions.
1250         https://bugs.webkit.org/show_bug.cgi?id=134683
1251         <rdar://problem/17541529>
1252
1253         Reviewed by Geoffrey Garen.
1254
1255         This fixes the Khronos WebGL 1.0.3 test nested-functions-should-not-crash.html.
1256
1257         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1258         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1259         Add SH_LIMIT_CALL_STACK_DEPTH to extraCompileOptions.
1260
1261 2014-07-07  Ion Rosca  <rosca@adobe.com>
1262
1263         [CSS Blending]The background images set on the root element will blend on an initial white backdrop.
1264         https://bugs.webkit.org/show_bug.cgi?id=134342
1265
1266         Reviewed by Dean Jackson.
1267
1268         Tests: css3/blending/background-blend-mode-body-image.html
1269                css3/blending/background-blend-mode-body-transparent-color-and-image.html
1270                css3/blending/background-blend-mode-body-transparent-image.html
1271
1272         * rendering/RenderBox.cpp:
1273         (WebCore::RenderBox::paintFillLayers):
1274         If the background layers have blend modes, we paint the base background color first,
1275         before starting a new transparency layer. After creating the transparency layer,
1276         the base background will be skipped, and the background layers will blend on top of
1277         a transparent backdrop.
1278         (WebCore::RenderBox::paintFillLayer):
1279         * rendering/RenderBox.h:
1280         * rendering/RenderBoxModelObject.cpp:
1281         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1282         This method is able to paint only the base background color (BaseBackgroundColorOnly), 
1283         skipping the background-color and background-images. This option is available only
1284         on bottom layer of the root renderer and only if the background color is not opaque,
1285         otherwise the method will return early.
1286         Another option is to paint the root background without using the base background color
1287         (BaseBackgroundColorSkip).
1288         * rendering/RenderBoxModelObject.h:
1289         Adding the BaseBackgroundColorUsage enum.
1290
1291 2014-07-06  Yoav Weiss  <yoav@yoav.ws>
1292
1293         Turn on img@sizes compile flag
1294         https://bugs.webkit.org/show_bug.cgi?id=134634
1295
1296         Reviewed by Benjamin Poulain.
1297
1298         * Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.
1299
1300 2014-07-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1301
1302         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
1303         https://bugs.webkit.org/show_bug.cgi?id=134647
1304
1305         Reviewed by Andreas Kling.
1306
1307         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
1308
1309         No new tests, no behavior change.
1310
1311         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
1312         file so that functions from that file can use the Element|Node classes and other things defined in this file.
1313         * mathml/MathMLMencloseElement.h:
1314         (WebCore::toMathMLMencloseElement): Deleted.
1315         * mathml/mathtags.in:
1316
1317 2014-07-06  Yusuke Suzuki  <utatane.tea@gmail.com>
1318
1319         CSS JIT: Ensure resolvingMode size is 1 byte
1320         https://bugs.webkit.org/show_bug.cgi?id=134662
1321
1322         Reviewed by Benjamin Poulain.
1323
1324         Since selector compiler uses MacroAssembler::branch8 for SelectorChecker::Mode,
1325         we should ensure sizeof(SelectorChecker::Mode) == 1.
1326         Old implementation works only in little endianness environments.
1327
1328         * css/ElementRuleCollector.cpp:
1329         (WebCore::ElementRuleCollector::matchedResult):
1330         (WebCore::ElementRuleCollector::matchedRuleList):
1331         (WebCore::ElementRuleCollector::collectMatchingRules):
1332         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1333         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
1334         * css/ElementRuleCollector.h:
1335         (WebCore::ElementRuleCollector::ElementRuleCollector):
1336         * css/SelectorChecker.cpp:
1337         (WebCore::SelectorChecker::match):
1338         (WebCore::SelectorChecker::matchRecursively):
1339         (WebCore::SelectorChecker::checkOne):
1340         * css/SelectorChecker.h:
1341         * css/StyleInvalidationAnalysis.cpp:
1342         (WebCore::invalidateStyleRecursively):
1343         * css/StyleResolver.cpp:
1344         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1345         * css/StyleResolver.h:
1346         (WebCore::checkRegionSelector):
1347         * cssjit/SelectorCompiler.cpp:
1348         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
1349         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
1350         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
1351         * dom/SelectorQuery.cpp:
1352         (WebCore::SelectorDataList::selectorMatches):
1353
1354 2014-07-06  Antti Koivisto  <antti@apple.com>
1355
1356         Don't throttle layer flushes when the main resource is a GIF
1357         https://bugs.webkit.org/show_bug.cgi?id=134650
1358         <rdar://problem/17490712>
1359
1360         Reviewed by Simon Fraser.
1361         
1362         Avoid throttling big image animations.
1363
1364         * page/FrameView.cpp:
1365         (WebCore::determineLayerFlushThrottleState):
1366         
1367             Disable for image documents.
1368
1369         (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
1370         (WebCore::FrameView::updateLayerFlushThrottling):
1371         
1372             Refactor a bit.
1373
1374         * page/LayerFlushThrottleState.h:
1375         
1376             Rename the flag.
1377
1378 2014-07-06  Andreas Kling  <akling@apple.com>
1379
1380         Inline NodeListsNodeData helpers more aggressively.
1381         <https://webkit.org/b/134654>
1382
1383         Get rid of call overhead costs when retrieving NodeLists and
1384         HTMLCollections from Document. These functions have very few clients,
1385         so there's no real reason to keep them out of line.
1386
1387         Reviewed by Antti Koivisto.
1388
1389         * dom/NodeRareData.h:
1390         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1391         (WebCore::NodeListsNodeData::addCacheWithName):
1392
1393 2014-07-06  Andreas Kling  <akling@apple.com>
1394
1395         Inline Node's rare data getters.
1396         <https://webkit.org/b/134652>
1397
1398         There was a fair bit of overhead when calling Node::ensureRareData()
1399         from Document's collection getters. This patch inlines the case where
1400         we've already materialized the rare data.
1401
1402         Reviewed by Antti Koivisto.
1403
1404         * dom/Node.cpp:
1405         (WebCore::Node::materializeRareData):
1406         (WebCore::Node::rareData): Deleted.
1407         (WebCore::Node::ensureRareData): Deleted.
1408         * dom/Node.h:
1409         * dom/NodeRareData.h:
1410         (WebCore::Node::rareData):
1411         (WebCore::Node::ensureRareData):
1412
1413 2014-07-05  Dean Jackson  <dino@apple.com>
1414
1415         [iOS] MediaDocument should set a viewport
1416         https://bugs.webkit.org/show_bug.cgi?id=134658
1417         <rdar://problem/17552339>
1418
1419         Reviewed by Zalan Bujtas.
1420
1421         A MediaDocument should fill the viewport, so set its
1422         initial-scale to 1 and make it non-zoomable.
1423
1424         * html/MediaDocument.cpp:
1425         (WebCore::MediaDocumentParser::createDocumentStructure): Create
1426         a <head> element and a <meta> element with a 1:1 viewport.
1427
1428 2014-07-05  Commit Queue  <commit-queue@webkit.org>
1429
1430         Unreviewed, rolling out r170825.
1431         https://bugs.webkit.org/show_bug.cgi?id=134653
1432
1433         broke debug builds (Requested by kling on #webkit).
1434
1435         Reverted changeset:
1436
1437         "Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS
1438         macro and generateTypeHelpers"
1439         https://bugs.webkit.org/show_bug.cgi?id=134647
1440         http://trac.webkit.org/changeset/170825
1441
1442 2014-07-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1443
1444         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
1445         https://bugs.webkit.org/show_bug.cgi?id=134647
1446
1447         Reviewed by Andreas Kling.
1448
1449         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
1450
1451         No new tests, no behavior change.
1452
1453         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
1454         file so that functions from that file can use the Element|Node classes and other things defined in this file.
1455         (WebCore::isMathMLElement): Deleted.
1456         * mathml/MathMLMencloseElement.h:
1457         (WebCore::toMathMLMencloseElement): Deleted.
1458         * mathml/mathtags.in:
1459
1460 2014-07-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1461
1462         [EFL] Support Geolocation
1463         https://bugs.webkit.org/show_bug.cgi?id=134439
1464
1465         Reviewed by Antonio Gomes.
1466
1467         Add geoclue files in order to enable geolocation for EFL port.
1468
1469         * PlatformEfl.cmake:
1470
1471 2014-07-04  Benjamin Poulain  <benjamin@webkit.org>
1472
1473         CSS JIT: compile :in-range and :out-of-range
1474         https://bugs.webkit.org/show_bug.cgi?id=134639
1475
1476         Reviewed by Andreas Kling.
1477
1478         The pseudo class :in-range and :out-of-range are trivial non-inlined selectors.
1479
1480         * css/SelectorChecker.cpp:
1481         (WebCore::SelectorChecker::checkOne):
1482         * css/SelectorCheckerTestFunctions.h:
1483         (WebCore::isInRange):
1484         (WebCore::isOutOfRange):
1485         * cssjit/SelectorCompiler.cpp:
1486         (WebCore::SelectorCompiler::addPseudoClassType):
1487
1488 2014-07-04  Andreas Kling  <akling@apple.com>
1489
1490         Fast path for jsStringWithCache() when asked for the same string repeatedly.
1491         <https://webkit.org/b/134635>
1492
1493         Reviewed by Darin Adler.
1494
1495         * WebCore.exp.in:
1496         * bindings/js/JSDOMBinding.cpp:
1497         (WebCore::jsStringWithCache): Deleted.
1498         * bindings/js/JSDOMBinding.h:
1499         (WebCore::JSValueTraits<String>::arrayJSValue):
1500         (WebCore::jsStringWithCache): Deleted.
1501         * bridge/c/c_utility.cpp:
1502         (JSC::Bindings::convertNPVariantToValue):
1503         * loader/cache/CachedResourceHandle.h:
1504
1505 2014-07-04  Zalan Bujtas  <zalan@apple.com>
1506
1507         Subpixel rendering: ebay.com rotating billboard on the main page has cut off buttons.
1508         https://bugs.webkit.org/show_bug.cgi?id=134636
1509         <rdar://problem/17529112>
1510
1511         Reviewed by Darin Adler.
1512
1513         Missing pixel snapping when clipping the transparency layer for BackgroundBleedUseTransparencyLayer.
1514         Clipping needs to take the same snapping strategy as the rest of the painting code.
1515
1516         Test: fast/borders/border-radius-on-subpixel-position-non-hidpi.html
1517
1518         * rendering/RenderBox.cpp:
1519         (WebCore::RenderBox::paintBoxDecorations):
1520
1521 2014-05-10  Andreas Kling  <akling@apple.com>
1522
1523         QualifiedName should use RefPtr<QualifiedNameImpl> internally.
1524         <https://webkit.org/b/132796>
1525
1526         We were not inlining ~QualifiedName() and it was showing up in some
1527         profiles (over 1% on dom-attr.html.)
1528
1529         This patch modernizes QualifiedName a bit by using RefPtr to store
1530         the QualifiedNameImpl instead of doing manual ref() and deref()
1531         in out-of-line functions.
1532
1533         Reviewed by Darin Adler.
1534
1535         * WebCore.exp.in:
1536         * dom/QualifiedName.cpp:
1537         (WebCore::QNameComponentsTranslator::translate):
1538         (WebCore::QualifiedName::QualifiedName):
1539         (WebCore::QualifiedName::~QualifiedName): Deleted.
1540         (WebCore::QualifiedName::deref): Deleted.
1541         * dom/QualifiedName.h:
1542         (WebCore::QualifiedName::QualifiedNameImpl::create):
1543         (WebCore::QualifiedName::QualifiedName):
1544         (WebCore::QualifiedName::isHashTableDeletedValue):
1545         (WebCore::QualifiedName::~QualifiedName):
1546         (WebCore::QualifiedName::operator=):
1547         (WebCore::QualifiedName::impl):
1548         (WebCore::QualifiedName::ref): Deleted.
1549
1550 2014-07-04  Dean Jackson  <dino@apple.com>
1551
1552         [iOS] [Media] Prevent page zoom if it started in the video element
1553         https://bugs.webkit.org/show_bug.cgi?id=134640
1554         <rdar://problem/16630794>
1555
1556         Reviewed by Sam Weinig.
1557
1558         In r170572 I attempted to prevent the page zoom from happening
1559         when the user was attempting to fullscreen the video. That fix was
1560         not complete, because it relied on the touchstart event being
1561         sent before a gesture event. It turns out this doesn't always happen,
1562         so we need to apply the same check in the gesture event - if the
1563         gesture began with two fingers on the media, don't do a page zoom.
1564         The exception is zooming out, if you've managed to make the video
1565         cover the entire screen (also, the pinch-out-of-fullscreen gesture
1566         does not get handled by WebKit).
1567
1568         * Modules/mediacontrols/mediaControlsiOS.js:
1569         (ControllerIOS.prototype.handleBaseGestureChange): Add a check to
1570         make sure our pinch didn't start in the video element.
1571
1572 2014-07-04  Hunseop Jeong  <hs85.jeong@samsung.com>
1573
1574         [CoordinatedGraphics] Use the C++11 syntax to clean-up for loops 
1575         https://bugs.webkit.org/show_bug.cgi?id=134594
1576
1577         Reviewed by Darin Adler.
1578
1579         Convert a couple of loops to range-based for 
1580
1581         No change in functionality, no new tests.
1582
1583         * platform/graphics/TiledBackingStore.cpp:
1584         (WebCore::TiledBackingStore::updateTileBuffers):
1585         (WebCore::TiledBackingStore::resizeEdgeTiles):
1586         (WebCore::TiledBackingStore::setKeepRect):
1587         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1588         (WebCore::CompositingCoordinator::~CompositingCoordinator):
1589         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
1590         (WebCore::CompositingCoordinator::setVisibleContentsRect):
1591         (WebCore::CompositingCoordinator::purgeBackingStores):
1592         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1593         (WebCore::CoordinatedBackingStore::removeAllTiles):
1594         (WebCore::CoordinatedBackingStore::paintToTextureMapper):
1595         (WebCore::CoordinatedBackingStore::drawBorder):
1596         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
1597         (WebCore::CoordinatedBackingStore::commitTileOperations):
1598         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1599         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
1600         (WebCore::CoordinatedGraphicsScene::commitPendingBackingStoreOperations):
1601
1602 2014-07-04  Andreas Kling  <akling@apple.com>
1603
1604         CTTE: ScriptElement always has a HTTPScriptElement or SVGScriptElement.
1605         <https://webkit.org/b/134637>
1606
1607         Have ScriptElement store the pointer to the more specific subclass
1608         element as a reference. Also made the constructor protected since
1609         nobody should instantiate ScriptElement directly.
1610
1611         Reviewed by Antti Koivisto.
1612
1613         * dom/ScriptElement.cpp:
1614         (WebCore::ScriptElement::ScriptElement):
1615         (WebCore::ScriptElement::childrenChanged):
1616         (WebCore::ScriptElement::dispatchErrorEvent):
1617         (WebCore::ScriptElement::prepareScript):
1618         (WebCore::ScriptElement::requestScript):
1619         (WebCore::ScriptElement::executeScript):
1620         (WebCore::ScriptElement::notifyFinished):
1621         (WebCore::ScriptElement::ignoresLoadRequest):
1622         (WebCore::ScriptElement::scriptContent):
1623         * dom/ScriptElement.h:
1624         (WebCore::ScriptElement::element):
1625         * dom/ScriptRunner.cpp:
1626         (WebCore::ScriptRunner::queueScriptForExecution):
1627         * html/HTMLScriptElement.cpp:
1628         (WebCore::HTMLScriptElement::HTMLScriptElement):
1629         * svg/SVGScriptElement.cpp:
1630         (WebCore::SVGScriptElement::SVGScriptElement):
1631
1632 2014-07-04  Julien Quint  <pom@graougraou.com>
1633
1634         input type=range element should only fire change events after committing a  value
1635         https://bugs.webkit.org/show_bug.cgi?id=134545
1636
1637         Reviewed by Dean Jackson.
1638
1639         A "change" event was fired every time the slider thumb element was dragged
1640         by the user. The "change" event is now fired only after the thumb
1641         element has stopped moving; previously, both "input" and "change" events
1642         where dispatched while changes were being made. This new behavior is
1643         consistent with the specification (cf.
1644         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#event-input-change),
1645         as well as other implementations such as Firefox and Chrome.
1646
1647         * Modules/mediacontrols/mediaControlsApple.js:
1648         (Controller.prototype.createControls): Listen to the "input" event
1649         rather than the "change" event for the timeline control in order to
1650         keep track of value changes when the user is dragging the thumb.
1651         * accessibility/AccessibilitySlider.cpp:
1652         (WebCore::AccessibilitySlider::setValue): Dispatch "change" event while
1653         setting the new value rather than dispatching later, since setting the
1654         value now clears the change flag.
1655         * html/RangeInputType.cpp:
1656         (WebCore::RangeInputType::setValue): Update the text value of the
1657         control in the case when no event is to be dispatched, so that this
1658         value can be checked the next time a "change" event dispatch is
1659         requested.
1660         * html/shadow/SliderThumbElement.cpp:
1661         (WebCore::SliderThumbElement::setPositionFromPoint): Removed the
1662         dispatch of the "change" event, and no longer track the text value of
1663         the element as a result of dispatching a "change" event.
1664         (WebCore::SliderThumbElement::stopDragging): Dispatch the "change" event
1665         on completing the drag.
1666
1667 2014-07-04  Andreas Kling  <akling@apple.com>
1668
1669         CTTE: ApplicationCacheHost always has a DocumentLoader.
1670         <https://webkit.org/b/b/128435>
1671
1672         Have ApplicationCacheHost store the backpointer to its owning
1673         DocumentLoader as a reference.
1674
1675         Reviewed by Sam Weinig.
1676
1677         * loader/DocumentLoader.cpp:
1678         (WebCore::DocumentLoader::DocumentLoader):
1679         (WebCore::DocumentLoader::startLoadingMainResource):
1680         * loader/appcache/ApplicationCacheHost.cpp:
1681         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
1682         (WebCore::ApplicationCacheHost::~ApplicationCacheHost):
1683         (WebCore::ApplicationCacheHost::selectCacheWithoutManifest):
1684         (WebCore::ApplicationCacheHost::selectCacheWithManifest):
1685         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
1686         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
1687         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
1688         (WebCore::ApplicationCacheHost::failedLoadingMainResource):
1689         (WebCore::ApplicationCacheHost::finishedLoadingMainResource):
1690         (WebCore::ApplicationCacheHost::maybeLoadResource):
1691         (WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
1692         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1693         (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
1694         (WebCore::ApplicationCacheHost::stopDeferringEvents):
1695         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
1696         (WebCore::ApplicationCacheHost::update):
1697         (WebCore::ApplicationCacheHost::swapCache):
1698         (WebCore::ApplicationCacheHost::abort):
1699         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
1700         * loader/appcache/ApplicationCacheHost.h:
1701         (WebCore::ApplicationCacheHost::documentLoader): Deleted.
1702
1703 2014-07-04  Antti Koivisto  <antti@apple.com>
1704
1705         REGRESSION(r159345): Lines are clipped between pages when printing web content from Safari
1706         https://bugs.webkit.org/show_bug.cgi?id=134633
1707         <rdar://problem/17088936>
1708
1709         Reviewed by Zalan Bujtas.
1710
1711         Test: printing/simple-lines-break.html
1712
1713         * rendering/SimpleLineLayout.cpp:
1714         (WebCore::SimpleLineLayout::canUseFor):
1715         
1716             Disable simple lines if global pagination is enabled.
1717             Printing does not currently use flow threads which we already test for.
1718
1719 2014-07-04  Zan Dobersek  <zdobersek@igalia.com>
1720
1721         Unreviewed. Fixing the build after r170795.
1722
1723         Mac didn't like that change as it seems to properly typedef long long to int64_t.
1724         That's not the case on 64-bit Linux (for some reason), so I'm changing the type of
1725         the two long long variables in FormDataElement to int64_t to avoid any further trouble.
1726
1727         * platform/network/FormData.h:
1728
1729 2014-07-03  Brady Eidson  <beidson@apple.com>
1730
1731         When showing the selection menu, include menu options for all selected phone numbers.
1732         <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
1733
1734         Reviewed by Tim Horton.
1735
1736         * English.lproj/Localizable.strings:
1737
1738         * dom/Range.cpp:
1739         (WebCore::rangesOverlap): Fix reversed arguments that caused some types of overlaps to not be detected.
1740
1741 2014-07-03  Daniel Bates  <dabates@apple.com>
1742
1743         Add WTF::move()
1744         https://bugs.webkit.org/show_bug.cgi?id=134500
1745
1746         Rubber-stamped by Anders Carlsson.
1747
1748         Substitute WTF::move() for std::move().
1749
1750         * Modules/battery/NavigatorBattery.cpp:
1751         * Modules/encryptedmedia/MediaKeys.cpp:
1752         * Modules/gamepad/NavigatorGamepad.cpp:
1753         * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
1754         * Modules/geolocation/NavigatorGeolocation.cpp:
1755         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1756         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1757         * Modules/indexeddb/IDBDatabaseBackend.h:
1758         [...]
1759
1760 2014-07-03  Benjamin Poulain  <bpoulain@apple.com>
1761
1762         [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
1763         https://bugs.webkit.org/show_bug.cgi?id=134582
1764
1765         Reviewed by Tim Horton.
1766
1767         * WebCore.exp.in:
1768         * platform/ScrollView.h:
1769         (WebCore::ScrollView::unobscuredContentSize):
1770         * platform/ios/ScrollViewIOS.mm:
1771         (WebCore::ScrollView::unobscuredContentRect):
1772         (WebCore::ScrollView::setUnobscuredContentSize):
1773
1774 2014-07-02  Brent Fulgham  <bfulgham@apple.com>
1775
1776         [Mac] WebKit1 WebView iframe not responding to scroll gestures
1777         https://bugs.webkit.org/show_bug.cgi?id=134569
1778         <rdar://problem/17309008>
1779
1780         Reviewed by Simon Fraser.
1781
1782         New test: platform/mac/fast/scrolling/scroll-iframe-fragment.html
1783
1784         WK1 scrollable areas are implemented on top of PlatformWidget (i.e., NSView) objects. They only
1785         perform a scroll operation if the EventHandler::handleWheelEvent method returns 'false', indicating
1786         that the Cocoa layer should do scrolling work. This is in contrast to WK2, where the scrolling is
1787         handled separately and we return 'true' from EventHandler::handleWheelEvent to indicate that the
1788         scroll event has been handled and that no other work is needed. This mismatch in the meaning of
1789         EventHandler::handleWheelEvent means that WK1 views do not properly handle scroll wheel events.
1790
1791         To correct this, we need to see if we are acting on an Element backed by a PlatformWidget. When we
1792         are (the WK1 case) we want to return 'false' to instruct the Cocoa object to do the scroll operation.
1793         To implement proper latching behavior in WK1, we must return 'true' in the case where we are latched
1794         to a PlatformWidget, and that PlatformWidget did not start the scroll gesture at the edge of
1795         the region in the dominant scroll direction.
1796
1797         Finally, additional logic was needed to determine whether the PlatformWidget is scrolled to the
1798         edge in the dominant scroll direction.
1799
1800         * page/EventHandler.cpp:
1801         (WebCore::EventHandler::platformCompleteWheelEvent): Added stub.
1802         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added stub.
1803         (WebCore::EventHandler::handleWheelEvent): Call new platformCompletePlatformWidgetWheelEvent if the
1804         event was handled for a PlatformWidget.
1805         * page/EventHandler.h:
1806         * page/mac/EventHandlerMac.mm:
1807         (WebCore::widgetForEventTarget): Added helper function.
1808         (WebCore::scrollViewForEventTarget): Added helper function.
1809         (WebCore::eventTargetIsPlatformWidget): Added helper function.
1810         (WebCore::EventHandler::platformPrepareForWheelEvents): Check whether we are at a scrolled edge
1811         for the NSView (PlatformWidget) case.
1812         (WebCore::EventHandler::platformCompleteWheelEvent): Return 'false' when handling WK1-style scrolls.
1813         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added. We generally want to
1814         return false so the PlatformWidget handles scrolling, except in the case where we are latched to
1815         a PlatformWidget, which has already performed its scroll, and we want to avoid propegating a
1816         scroll event to an enclosing region.
1817
1818 2014-07-03  Pratik Solanki  <psolanki@apple.com>
1819
1820         Preserve old behavior of creating an NSURLRequest of the exact same type as passed to us
1821         https://bugs.webkit.org/show_bug.cgi?id=134605
1822         <rdar://problem/17544641>
1823
1824         Reviewed by Andreas Kling.
1825
1826         We have client code that passes us a subclass of NSURLRequest to load resource. Later when
1827         we call willSendRequest, they test to make sure they get an object of the same type. My
1828         optimization in r170642 broke this path when I cleared out the NSURLRequest object. We
1829         already had code in updateNSURLRequest() that was taking this quirk into account but I broke
1830         that. Fix it by reverting to old behavior for such clients.
1831
1832         No new tests though we need one. I will add it later.
1833
1834         * platform/network/cf/ResourceRequest.h:
1835         * platform/network/cf/ResourceRequestCFNet.cpp:
1836         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1837         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1838         (WebCore::ResourceRequest::setStorageSession):
1839         * platform/network/ios/ResourceRequestIOS.mm:
1840         (WebCore::ResourceRequest::updateNSURLRequest):
1841         (WebCore::ResourceRequest::clearOrUpdateNSURLRequest):
1842
1843 2014-07-02  Anders Carlsson  <andersca@apple.com>
1844
1845         Stop using EncoderAdapter/DecoderAdapter for FormData
1846         https://bugs.webkit.org/show_bug.cgi?id=134571
1847
1848         Reviewed by Andreas Kling.
1849
1850         * WebCore.exp.in:
1851         * platform/network/FormData.cpp:
1852         (WebCore::encodeElement): Deleted.
1853         (WebCore::decodeElement): Deleted.
1854         (WebCore::FormData::encode): Deleted.
1855         (WebCore::FormData::decode): Deleted.
1856         * platform/network/FormData.h:
1857         (WebCore::FormDataElement::encode):
1858         (WebCore::FormDataElement::decode):
1859         (WebCore::FormData::encode):
1860         (WebCore::FormData::decode):
1861
1862 2014-07-03  Brady Eidson  <beidson@apple.com>
1863
1864         Selection rects sent to ServicesOverlayController are wrong.
1865         <rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568
1866
1867         Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).
1868
1869         * WebCore.exp.in:
1870
1871         Update the gatherer to keep GapRects separate from LayoutRects:
1872         * editing/SelectionRectGatherer.cpp:
1873         (WebCore::SelectionRectGatherer::addRects):
1874         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
1875         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
1876         * editing/SelectionRectGatherer.h:
1877
1878         * page/EditorClient.h:
1879         (WebCore::EditorClient::selectionRectsDidChange): Updated to take LayoutRects and GapRects separately.
1880
1881         Change RenderSelectionInfo to also hang on to the individual rects that formed the final bounding rect:
1882         * rendering/RenderSelectionInfo.h:
1883         (WebCore::RenderSelectionInfo::RenderSelectionInfo): If the RenderObject is a RenderText, then call
1884           collectSelectionRectsForLineBoxes instead of selectionRectForRepaint.
1885         (WebCore::RenderSelectionInfo::rects):
1886
1887         * rendering/RenderText.cpp:
1888         (WebCore::RenderText::collectSelectionRectsForLineBoxes): Added
1889         (WebCore::RenderText::selectionRectForRepaint):
1890         * rendering/RenderText.h:
1891
1892         * rendering/RenderTextLineBoxes.cpp:
1893         (WebCore::RenderTextLineBoxes::collectSelectionRectsForRange): Added
1894         * rendering/RenderTextLineBoxes.h:
1895
1896         * rendering/RenderView.cpp:
1897         (WebCore::RenderView::setSubtreeSelection): Add the list of rects to the gatherer instead of just 
1898           the bounding rect.
1899
1900 2014-07-03  Brady Eidson  <beidson@apple.com>
1901
1902         Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
1903         <rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517
1904
1905         Reviewed by Eric Carlson.
1906
1907         Since WebCore::IconDatabase is not RefCounted there’s no obvious way to keep it alive until it is
1908         truly no longer needed.
1909
1910         This isn’t generally a problem because they are usually a singleton that lasts the lifetime of the process.
1911
1912         In the WebKit2 case, WebCore::IconDatabases can come and go as their owning WebIconDatabases come and go.
1913
1914         So we can rely on WebIconDatabase to handle the lifetime appropriately. 
1915
1916         * loader/icon/IconDatabase.cpp:
1917         (WebCore::IconDatabase::close): If the database is actually closed, notify the client.
1918         (WebCore::IconDatabase::IconDatabase):
1919         (WebCore::IconDatabase::isOpen): Take into account whether there’s any main thread callbacks, plus what
1920           is covered by isOpenBesidesMainThreadCallbacks.
1921         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks): Take into account whether the sync thread
1922           is still running and whether or not the database file is still open.
1923         (WebCore::IconDatabase::checkClosedAfterMainThreadCallback): Checks to see if the database has just
1924           become 100% closed and - if so - notify the client.
1925         (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread): Updated to increment the main thread
1926           callback count and to call checkClosedAfterMainThreadCallback when done.
1927         (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread): Ditto.
1928         (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread): Ditto.
1929         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread): Ditto.
1930         * loader/icon/IconDatabase.h:
1931
1932         * loader/icon/IconDatabaseClient.h:
1933         (WebCore::IconDatabaseClient::didClose): Added. For the IconDatabase to tell its client it is 100% closed.
1934
1935 2014-07-03  Chris Fleizach  <cfleizach@apple.com>
1936
1937         AX: VoiceOver does not read aria-expanded attribute on controls in Safari
1938         https://bugs.webkit.org/show_bug.cgi?id=134527
1939
1940         Reviewed by Mario Sanchez Prada.
1941
1942         Expose whether the ARIA expanded property is present or not.
1943
1944         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1945         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
1946
1947 2014-07-02  Jon Honeycutt  <jhoneycutt@apple.com>
1948
1949         Removing an element with CSS -webkit-overflow-scrolling: touch breaks
1950         subsequent touch events
1951
1952         <https://bugs.webkit.org/show_bug.cgi?id=134584>
1953         <rdar://problem/17202021>
1954
1955         This issue is caused by the order of teardown for RenderLayers.
1956
1957         RenderLayer clears its m_backing in its destructor, calling the
1958         RenderLayerBacking destructor. The RenderLayerBacking destructor calls
1959         RenderLayerCompositor::willRemoveScrollingLayer(), which tries to
1960         access the RenderLayer's backing that has already been cleared. This
1961         causes us to skip the call to ChromeClient::removeScrollingLayer(),
1962         resulting in a stale view that can block touch events.
1963
1964         Reviewed by Simon Fraser.
1965
1966         * rendering/RenderLayerBacking.cpp:
1967         (WebCore::RenderLayerBacking::updateScrollingLayers):
1968         When calling willRemoveScrollingLayerWithBacking(), pass both the layer
1969         and the RenderLayerBacking.
1970
1971         * rendering/RenderLayerCompositor.cpp:
1972         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1973         Renamed. Use the passed RenderLayerBacking, as the RenderLayer's
1974         backing might have already been cleared.
1975         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer): Deleted.
1976
1977         * rendering/RenderLayerCompositor.h:
1978         Renamed willRemoveScrollingLayer() to
1979         willRemoveScrollingLayerWithBacking() and added a parameter.
1980
1981 2014-07-01  Mark Rowe  <mrowe@apple.com>
1982
1983         Ensure that the WebKit bundle version in the user agent string continues to match the current format.
1984         <https://webkit.org/b/134524> / <rdar://problem/17447771>
1985
1986         Reviewed by Simon Fraser.
1987
1988         * page/cocoa/UserAgent.h:
1989         * page/cocoa/UserAgent.mm:
1990         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Updated to take an NSString now that it's internal
1991         to the file.
1992         (WebCore::userAgentBundleVersionFromFullVersionString): Limit the bundle version included in the user agent
1993         string to three components.
1994         * page/ios/UserAgentIOS.mm:
1995         (WebCore::standardUserAgentWithApplicationName): Update to call userAgentBundleVersionFromFullVersionString.
1996         * page/mac/UserAgentMac.mm:
1997         (WebCore::standardUserAgentWithApplicationName): Ditto.
1998
1999 2014-07-01  Mark Rowe  <mrowe@apple.com>
2000
2001         <https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS
2002
2003         Reviewed by Simon Fraser.
2004
2005         * page/cocoa/UserAgent.h:
2006         * page/cocoa/UserAgent.mm:
2007         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Moved from WebKit2.
2008         * page/ios/UserAgentIOS.mm:
2009         (WebCore::standardUserAgentWithApplicationName): Pass the WebKit bundle version through userVisibleWebKitBundleVersionFromFullVersion
2010         before including it in the user agent string.
2011         * page/mac/UserAgentMac.mm:
2012         (WebCore::standardUserAgentWithApplicationName): Ditto.
2013
2014 2014-07-02  Mark Rowe  <mrowe@apple.com>
2015
2016         <https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version
2017
2018         Reviewed by Simon Fraser.
2019
2020         * WebCore.xcodeproj/project.pbxproj: Add the new files, and sort the groups they're in.
2021         * page/cocoa/UserAgent.h: Copied from Source/WebCore/page/mac/UserAgent.h.
2022         * page/cocoa/UserAgent.mm: Renamed from Source/WebCore/page/mac/UserAgent.h.
2023         Move systemMarketingVersionForUserAgentString to a location where it can be shared between
2024         Mac and iOS.
2025         * page/ios/UserAgentIOS.mm:
2026         (WebCore::standardUserAgentWithApplicationName): Switch to systemMarketingVersionForUserAgentString.
2027         * page/mac/UserAgentMac.mm:
2028         * platform/cocoa/SystemVersion.h: Renamed from Source/WebCore/platform/mac/SystemVersionMac.h.
2029         * platform/cocoa/SystemVersion.mm: Renamed from Source/WebCore/platform/mac/SystemVersionMac.mm.
2030         Move to a location that makes it clear this is shared between Mac and iOS. Enable the modern Mac
2031         codepath for iOS as well.
2032
2033 2014-07-02  Anders Carlsson  <andersca@apple.com>
2034
2035         Remove keyed coding from FormData
2036         https://bugs.webkit.org/show_bug.cgi?id=134565
2037
2038         Reviewed by Tim Horton.
2039
2040         * platform/network/FormData.cpp:
2041         (WebCore::encodeElement): Deleted.
2042         (WebCore::decodeElement): Deleted.
2043         (WebCore::FormData::encode): Deleted.
2044         (WebCore::FormData::decode): Deleted.
2045         * platform/network/FormData.h:
2046
2047 2014-07-02  Anders Carlsson  <andersca@apple.com>
2048
2049         Get rid of the HistoryItem encoding/decoding in WebCore
2050         https://bugs.webkit.org/show_bug.cgi?id=134564
2051
2052         Reviewed by Beth Dakin.
2053
2054         * WebCore.exp.in:
2055         * history/HistoryItem.cpp:
2056         (WebCore::HistoryItem::encodeBackForwardTree): Deleted.
2057         (WebCore::encodeRect): Deleted.
2058         (WebCore::encodeSize): Deleted.
2059         (WebCore::HistoryItem::encodeBackForwardTreeNode): Deleted.
2060         (WebCore::DecodeRecursionStackElement::DecodeRecursionStackElement): Deleted.
2061         (WebCore::decodeRect): Deleted.
2062         (WebCore::decodeSize): Deleted.
2063         (WebCore::HistoryItem::decodeBackForwardTree): Deleted.
2064         * history/HistoryItem.h:
2065
2066 2014-07-02  Alex Christensen  <achristensen@webkit.org>
2067
2068         [WebGL] Fix crash when glsl expressions are too complex.
2069         https://bugs.webkit.org/show_bug.cgi?id=134554
2070         <rdar://problem/17540462>
2071
2072         Reviewed by Dean Jackson.
2073         
2074         This fixes the Khronos test conformance/glsl/bugs/long-expressions-should-not-crash.html.
2075
2076         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2077         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2078         Add SH_LIMIT_EXPRESSION_COMPLEXITY to the ANGLE compile options.
2079
2080 2014-07-02  Benjamin Poulain  <benjamin@webkit.org>
2081
2082         WebCore JIT: rename registerCount to something less generic and add new types for lists of registers and lists of stack references
2083         https://bugs.webkit.org/show_bug.cgi?id=134552
2084
2085         Reviewed by Alex Christensen.
2086
2087         Little cleanup:
2088         -The name registerCount was a little too generic. Rename that to "maximumRegisterCount" to avoid confusion.
2089         -Add a new type RegisterVector for any vector holding registers. This is just to avoid repeating the inline
2090          size everywhere, no functional change.
2091         -Same idea for the stack: welcome StackReferenceVector!
2092
2093         * cssjit/FunctionCall.h:
2094         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
2095         Remove the appendVector here. It was unnecessarily cautious, StackAllocator already protect us
2096         from mistakes.
2097
2098         * cssjit/RegisterAllocator.h:
2099         (WebCore::RegisterAllocator::allocatedRegisters):
2100         * cssjit/SelectorCompiler.cpp:
2101         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2102         Changing from the count of "calleeSavedRegisterCount" to "maximumRegisterCount" will cause
2103         calleeSavedRegisterStackReferences to always overallocate.
2104         The code generator is never on the heap, so that should not change anything.
2105
2106         * cssjit/StackAllocator.h:
2107         (WebCore::StackAllocator::push):
2108         (WebCore::StackAllocator::pop):
2109
2110 2014-07-02  Dan Bernstein  <mitz@apple.com>
2111
2112         Remove some code only needed for versions of Safari that are no longer supported
2113         https://bugs.webkit.org/show_bug.cgi?id=134537
2114
2115         Reviewed by Anders Carlsson.
2116
2117         * bindings/objc/DOMHTML.mm:
2118         (-[DOMHTMLInputElement _rectOnScreen]): Deleted.
2119         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Deleted.
2120         (-[DOMHTMLInputElement _selectedRange]): Deleted.
2121         * bindings/objc/DOMPrivate.h:
2122         * editing/EditorCommand.cpp:
2123         (WebCore::createCommandMap):
2124
2125 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2126
2127         [GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enabled and using GSTREAMER_MPEGTS
2128         https://bugs.webkit.org/show_bug.cgi?id=134548
2129
2130         Reviewed by Philippe Normand.
2131
2132         Include AtomicStringHash.h when ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
2133         since it's used by HashMap<AtomicString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>>
2134
2135         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2136
2137 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2138
2139         [GTK] Unstable headers should include webkitdomdefines-unstable.h
2140         https://bugs.webkit.org/show_bug.cgi?id=134540
2141
2142         Reviewed by Martin Robinson.
2143
2144         Instead of the class header that can only be included from webkitdom.h.
2145
2146         * bindings/scripts/CodeGeneratorGObject.pm:
2147         (WriteData):
2148
2149 2014-07-02  Mario Sanchez Prada  <mario.prada@samsung.com>
2150
2151         REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
2152         https://bugs.webkit.org/show_bug.cgi?id=134399
2153
2154         Reviewed by Chris Fleizach.
2155
2156         Check that the value of optionIndex passed as a parameter is valid
2157         before calling didUpdateActiveOption() over the item of the menu
2158         list, to prevent crashes in platforms where renderers (and therefore
2159         accessibility objects) might not be created for items at the time
2160         of calling AccessibilityMenuList::didUpdateActiveOption().
2161
2162         * accessibility/AccessibilityMenuList.cpp:
2163         (WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.
2164
2165 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2166
2167         [GTK] Do not add forward declaration of class struct for interfaces
2168         https://bugs.webkit.org/show_bug.cgi?id=134297
2169
2170         Reviewed by Martin Robinson.
2171
2172         * PlatformGTK.cmake: Make files generated by
2173         gobject-generate-headers.pl script depend on it.
2174         * bindings/gobject/WebKitDOMEventTarget.h: Remove forward declaration.
2175         * bindings/gobject/WebKitDOMNodeFilter.h: Ditto
2176         * bindings/gobject/WebKitDOMXPathNSResolver.h: Ditto.
2177         * bindings/scripts/gobject-generate-headers.pl: Use Iface instead
2178         of Class suffix for interfaces.
2179
2180 2014-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2181
2182         [GTK] XPathNSResolver should be exposed as an interface instead of as a class
2183         https://bugs.webkit.org/show_bug.cgi?id=134028
2184
2185         Reviewed by Gustavo Noronha Silva.
2186
2187         Add custom implementation of WebKitDOMXPathNSResolver to expose it
2188         as an interface instead of a class. It also includes an internal
2189         default implementation of the interface to support methods that
2190         create a XPathNSResolver using the native implementation.
2191
2192         * PlatformGTK.cmake: Add new files to compilation.
2193         * bindings/gobject/GObjectXPathNSResolver.cpp: Added.
2194         (WebCore::GObjectXPathNSResolver::~GObjectXPathNSResolver):
2195         (WebCore::GObjectXPathNSResolver::lookupNamespaceURI): Call
2196         webkit_dom_xpath_ns_resolver_lookup_namespace_uri().
2197         * bindings/gobject/GObjectXPathNSResolver.h: Added.
2198         (WebCore::GObjectXPathNSResolver::create):
2199         (WebCore::GObjectXPathNSResolver::GObjectXPathNSResolver): Create
2200         a new GObjectXPathNSResolver for the given WebKitDOMXPathNSResolver.
2201         * bindings/gobject/WebKitDOMXPathNSResolver.cpp: Added.
2202         (webkit_dom_xpath_ns_resolver_default_init):
2203         (webkit_dom_xpath_ns_resolver_lookup_namespace_uri):
2204         (webkitDOMNativeXPathNSResolverFinalize):
2205         (webkitDOMNativeXPathNSResolverConstructor):
2206         (webkit_dom_native_xpath_ns_resolver_init):
2207         (webkit_dom_native_xpath_ns_resolver_class_init):
2208         (webkitDOMNativeXPathNSResolverLookupNamespaceURI):
2209         (webkitDOMXPathNSResolverIfaceInit):
2210         (WebKit::core): Return the native XPathNSResolver when using the
2211         internal implementation or create a custom XPathNSResolver when
2212         using a user provided WebKitDOMXPathNSResolver.
2213         (WebKit::kit):
2214         * bindings/gobject/WebKitDOMXPathNSResolver.h: Added.
2215         * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h: Added.
2216         * bindings/scripts/CodeGeneratorGObject.pm:
2217         (GenerateFunction): Add exceptions for XPathNSResolver since
2218         the core method returns a PassRefPtr.
2219
2220 2014-07-01  Frédéric Wang  <fred.wang@free.fr>
2221
2222         The OpenType MATH table is not read on Mac
2223         https://bugs.webkit.org/show_bug.cgi?id=133569
2224
2225         Reviewed by Chris Fleizach.
2226
2227         An incorrect tag format is used to load the OpenType MATH table on Mac.
2228         This commit makes the format consistent with what is used for other tables on Mac.
2229         This will allow to load the MATH table and to use it for the MathML rendering.
2230
2231         No new tests. platform/graphics/opentype already contains tests for the OpenType MATH support.
2232
2233         * platform/graphics/opentype/OpenTypeMathData.cpp:
2234
2235 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2236
2237         [Win64] Unreviewed build fix.
2238
2239         * WebCore.vcxproj/WebCore.vcxproj:
2240         Exclude CA files from 32 and 64 bit WinCairo builds.
2241         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2242         Don't use a precompiled header in 32 or 63 bit builds of MockCDM.cpp.
2243
2244 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2245
2246         Reduce dynamic memory allocation in css jit.
2247         https://bugs.webkit.org/show_bug.cgi?id=134416
2248
2249         Reviewed by Benjamin Poulain.
2250
2251         * cssjit/FunctionCall.h:
2252         (WebCore::FunctionCall::saveAllocatedRegisters):
2253         * cssjit/RegisterAllocator.h:
2254         * cssjit/SelectorCompiler.cpp:
2255         (WebCore::SelectorCompiler::addPseudoClassType):
2256         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2257         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2258         * cssjit/StackAllocator.h:
2259         (WebCore::StackAllocator::push):
2260         (WebCore::StackAllocator::pop):
2261         Use inlineCapacity template parameter to reduce malloc calls.
2262         I use 32 as the inline capacity for non-register related vectors because that
2263         is probably big enough for the selector compiler, and if it is not then a malloc
2264         call will not be significant because the selector is very complex.
2265
2266 2014-07-01  Eric Carlson  <eric.carlson@apple.com>
2267
2268         WebVTT percentage value can be a float
2269         https://bugs.webkit.org/show_bug.cgi?id=134511
2270
2271         Reviewed by Brent Fulgham.
2272
2273         No new tests, existing tests modified.
2274
2275         * html/track/TextTrackCueGeneric.cpp:
2276         (WebCore::TextTrackCueGeneric::setLine): int -> double.
2277         (WebCore::TextTrackCueGeneric::setPosition): Ditto.
2278         * html/track/TextTrackCueGeneric.h:
2279
2280         * html/track/VTTCue.cpp:
2281         (WebCore::VTTCue::setLine): Ditto.
2282         (WebCore::VTTCue::setPosition):  Ditto.
2283         (WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size.
2284         (WebCore::scanPercentage): Deleted.
2285         * html/track/VTTCue.h:
2286
2287         * html/track/VTTScanner.cpp:
2288         (WebCore::VTTScanner::scanFloat): Support negative values.
2289         * html/track/VTTScanner.h:
2290
2291         * html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds.
2292         * html/track/WebVTTParser.h:
2293
2294         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2295         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue
2296             reference rather than a pointer.
2297         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto.
2298         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that
2299             we are asking the client to delete the cue because the client will have already deleted
2300             it when status when to GenericCueData::Complete.
2301         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2302
2303 2014-07-01  Simon Fraser  <simon.fraser@apple.com>
2304
2305         Improve behavior of position:sticky on zoomed pages
2306         https://bugs.webkit.org/show_bug.cgi?id=134535
2307         <rdar://problem/12898829>
2308
2309         Reviewed by Dean Jackson.
2310
2311         Despite r138036, position:sticky still had incorrect behavior in zoomed pages.
2312         
2313         Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
2314         since all the other math happens in unscaled coordinates.
2315
2316         * rendering/RenderBoxModelObject.cpp:
2317         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
2318
2319 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2320
2321         [WebGL] Fix PVRTC extension.
2322         https://bugs.webkit.org/show_bug.cgi?id=134525
2323
2324         Reviewed by Dean Jackson.
2325
2326         * html/canvas/WebGLRenderingContext.cpp:
2327         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
2328         Remove the return false which I mistakenly committed in r170128
2329         and make the gl error match the S3TC error and the khronos test.
2330
2331 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
2332
2333         AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
2334         https://bugs.webkit.org/show_bug.cgi?id=133875
2335
2336         Reviewed by Enrica Casucci.
2337
2338         Support the toggle button type in iOS.
2339
2340         Test: platform/ios-sim/accessibility/toggle-button.html
2341
2342         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2343         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2344         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2345         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2346
2347 2014-07-01  Dean Jackson  <dino@apple.com>
2348
2349         [iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
2350         https://bugs.webkit.org/show_bug.cgi?id=134513
2351         <rdar://problem/12078860>
2352         <rdar://problem/16745393>
2353
2354         Reviewed by Tim Horton.
2355
2356         Subsampled images (e.g. JPEG) were not consistently using
2357         their original dimensions and subsampled dimensions. This caused
2358         things like texImage2D to pack the pixels incorrectly, or drawImage
2359         to squish the rendering.
2360
2361         Renamed m_scale to m_subsamplingScale on FrameData.
2362
2363         Tests: fast/canvas/image-potential-subsample.html
2364                fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html
2365
2366         * platform/graphics/BitmapImage.cpp:
2367         (WebCore::BitmapImage::cacheFrame): Rename to m_subsamplingScale.
2368         (WebCore::BitmapImage::frameAtIndex): Ditto.
2369         * platform/graphics/BitmapImage.h:
2370         (WebCore::FrameData::FrameData): Ditto.
2371         * platform/graphics/cg/BitmapImageCG.cpp:
2372         (WebCore::FrameData::clear): Ditto.
2373         (WebCore::BitmapImage::BitmapImage): Ditto.
2374         (WebCore::BitmapImage::draw): Use a scaledSrcRect that reflects the subsampled size,
2375         rather than assuming the srcRect accurately reflects how many pixels we have
2376         in the Bitmap.
2377         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
2378         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2379         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Similar fix, although this
2380         time we just ask the image decoder to take into account the subsampled size
2381         when it is "generating" a frame, causing it to use the bitmap data it has already
2382         decoded.
2383
2384 2014-07-01  Joseph Pecoraro  <pecoraro@apple.com>
2385
2386         Web Inspector: Selected DOM element highlights invisible near bottom of the viewport (topContentInset?)
2387         https://bugs.webkit.org/show_bug.cgi?id=133818
2388
2389         Reviewed by Beth Dakin.
2390
2391         * inspector/InspectorOverlay.cpp:
2392         (WebCore::InspectorOverlay::update):
2393         Take the topContentInset into account when sizing the InspectorOverlay's FrameView.
2394
2395 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
2396
2397         AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
2398         https://bugs.webkit.org/show_bug.cgi?id=134492
2399
2400         Reviewed by Andreas Kling.
2401
2402         Support the indeterminate attribute in AX code.
2403
2404         Test: Update existing test: accessibility/aria-checked-mixed-value
2405
2406         * accessibility/AccessibilityObject.cpp:
2407         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2408
2409 2014-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
2410
2411         Typing an automatic text replacement phrase after a br in contenteditable is not rendered as expected
2412         https://bugs.webkit.org/show_bug.cgi?id=133883
2413
2414         Reviewed by Enrica Casucci.
2415
2416         enclosingDeletableElement() makes sure that the element's container is editable, but not
2417         that it is capable of having content inside it (like how a <br> can't).
2418
2419         No new tests. I don't think this is testable because it requires setting some state in System Preferences.
2420
2421         * editing/DeleteButtonController.cpp:
2422         (WebCore::enclosingDeletableElement):
2423
2424 2014-07-01  Alex Christensen  <achristensen@webkit.org>
2425
2426         [iOS] Unreviewed build fix after r170640.
2427
2428         * page/EditorClient.h:
2429         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
2430         Add ifdefs to make everything compile and link.
2431
2432 2014-07-01  Daniel Bates  <dabates@apple.com>
2433
2434         Remove unnecessary calls to std::move()
2435         https://bugs.webkit.org/show_bug.cgi?id=134493
2436
2437         Reviewed by Anders Carlsson.
2438
2439         * Modules/encryptedmedia/CDM.cpp:
2440         (WebCore::CDM::CDM):
2441         * css/CSSGrammar.y.in:
2442         * css/CSSPrimitiveValue.cpp:
2443         (WebCore::CSSPrimitiveValue::formatNumberValue):
2444         * css/MediaQuery.cpp:
2445         (WebCore::MediaQuery::MediaQuery):
2446         * platform/graphics/mac/FontMac.mm:
2447         (WebCore::Font::dashesForIntersectionsWithRect):
2448
2449 2014-07-01  Zalan Bujtas  <zalan@apple.com>
2450
2451         Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
2452         https://bugs.webkit.org/show_bug.cgi?id=134491
2453
2454         Reviewed by Simon Fraser.
2455
2456         Do not early round geometry values, while computing background image position. It changes the final
2457         subpixel values and that could lead to wrong snap positions.
2458         pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.
2459
2460         Test: fast/backgrounds/background-image-size-double-rounding.html
2461
2462         * rendering/RenderBoxModelObject.cpp:
2463         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2464
2465 2014-07-01  Pratik Solanki  <psolanki@apple.com>
2466
2467         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
2468         https://bugs.webkit.org/show_bug.cgi?id=134441
2469
2470         Reviewed by Andreas Kling.
2471
2472         No new tests. Should be covered by existing tests.
2473
2474         * platform/network/cf/ResourceRequest.h:
2475         (WebCore::ResourceRequest::ResourceRequest):
2476         (WebCore::ResourceRequest::encodingRequiresPlatformData):
2477         * platform/network/cf/ResourceRequestCFNet.cpp:
2478         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2479         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2480         (WebCore::ResourceRequest::setStorageSession):
2481         * platform/network/cocoa/ResourceRequestCocoa.mm:
2482         (WebCore::ResourceRequest::nsURLRequest):
2483
2484 2014-07-01  Brady Eidson  <beidson@apple.com>
2485
2486         Combine the Telephone and Selection overlay controllers, updating UI behavior.
2487         https://bugs.webkit.org/show_bug.cgi?id=134461
2488
2489         Reviewed by Tim Horton.
2490
2491         * WebCore.exp.in:
2492
2493         * dom/Range.cpp:
2494         (WebCore::Range::contains): Returns true if the Range completely contains the passed-in Range.
2495         * dom/Range.h:
2496
2497 2014-07-01  Antti Koivisto  <antti@apple.com>
2498
2499         REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
2500         https://bugs.webkit.org/show_bug.cgi?id=134489
2501
2502         Reviewed by Zalan Bujtas.
2503
2504         Test: fullscreen/full-screen-plugin.html
2505
2506         It is difficult to restore the render tree correctly in all cases after removing a full screen
2507         renderer from the tree. r160908 avoided dealing with this by simply always reconstructing the subtree.
2508         Unfortunately plugin lifetime is currently tied to its renderer so this would cause the plugin to restart.
2509         
2510         With this patch we avoid reconstruction in normal cases and only force it if the render tree is complicated.
2511
2512         * dom/Document.cpp:
2513         (WebCore::unwrapFullScreenRenderer):
2514         
2515             Force reconstruction conditionally.
2516
2517         (WebCore::Document::webkitWillEnterFullScreenForElement):
2518         (WebCore::Document::webkitDidExitFullScreenForElement):
2519         * rendering/RenderFullScreen.cpp:
2520         (WebCore::RenderFullScreen::wrapRenderer):
2521         (WebCore::RenderFullScreen::unwrapRenderer):
2522         
2523             Deal with the simple case of single child, possibly in anonymous wrapper.
2524             In other cases request reconstruction.
2525             This is covered by the existing fullscreen tests.
2526
2527         * rendering/RenderFullScreen.h:
2528
2529 2014-07-01  Zan Dobersek  <zdobersek@igalia.com>
2530
2531         Remove remaining Vector<> copies in WebCore accessibility code
2532         https://bugs.webkit.org/show_bug.cgi?id=133263
2533
2534         Reviewed by Darin Adler.
2535
2536         * accessibility/AXObjectCache.cpp:
2537         (WebCore::AXObjectCache::notificationPostTimerFired): Don't copy the Vector member and
2538         then clear it -- move it into the local variable instead.
2539         * accessibility/AccessibilityNodeObject.cpp:
2540         (WebCore::AccessibilityNodeObject::ariaLabeledByText): Move the axElements Vector into
2541         the AccessibilityText constructor.
2542         (WebCore::AccessibilityNodeObject::stringValue): Create a const reference to the Vector of
2543         HTMLSelectElement's list items instead of copying it.
2544         * accessibility/AccessibilityObject.h:
2545         (WebCore::AccessibilityText::AccessibilityText): Take the Vector parameter by non-const
2546         value and move it into the member variable.
2547         * accessibility/AccessibilityRenderObject.cpp: 
2548         (WebCore::AccessibilityRenderObject::stringValue): Create a const reference to the Vector
2549         of HTMLSelectElement's list items instead of copying it.
2550         (WebCore::AccessibilityRenderObject::ariaSelectedRows): Wrap the AccessibilityChildrenVector
2551         iteration in a lambda. Use it to iterate over either the newly-constructed Vector (in case
2552         the object has the tree role) or the reference to the vector returned by
2553         AccessibilityTable::rows() (in case the object is an AccessibilityTable instance).
2554
2555 2014-06-30  Commit Queue  <commit-queue@webkit.org>
2556
2557         Unreviewed, rolling out r170605.
2558         https://bugs.webkit.org/show_bug.cgi?id=134484
2559
2560         The changes cause crashes on ARM64 (Requested by benjaminp on
2561         #webkit).
2562
2563         Reverted changeset:
2564
2565         "Reduce dynamic memory allocation in css jit."
2566         https://bugs.webkit.org/show_bug.cgi?id=134416
2567         http://trac.webkit.org/changeset/170605
2568
2569 2014-06-30  Anders Carlsson  <andersca@apple.com>
2570
2571         Change the AddBackForwardItem message to take a page state object
2572         https://bugs.webkit.org/show_bug.cgi?id=134475
2573
2574         Reviewed by Andreas Kling.
2575
2576         * WebCore.exp.in:
2577
2578 2014-06-30  Benjamin Poulain  <benjamin@webkit.org>
2579
2580         [iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
2581         https://bugs.webkit.org/show_bug.cgi?id=134471
2582         <rdar://problem/17513542>
2583
2584         Reviewed by Enrica Casucci.
2585
2586         UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
2587         since the page has no way of overriding that behavior.
2588
2589         This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
2590         by default for those object, and enabled for images that are in a link.
2591
2592         * css/html.css:
2593         (applet, embed, object, img):
2594         (:-webkit-any-link img):
2595
2596 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
2597
2598         All Indic text is rendered as boxes on iOS
2599         https://bugs.webkit.org/show_bug.cgi?id=134464
2600
2601         Reviewed by Simon Fraser.
2602
2603         I made a typo in r170207.
2604
2605         Test: fast/text/indic.html
2606
2607         * platform/graphics/ios/FontCacheIOS.mm:
2608         (WebCore::languageSpecificFallbackFont):
2609
2610 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
2611
2612         [iOS] languageSpecificFallbackFont() is not consistent
2613         https://bugs.webkit.org/show_bug.cgi?id=134473
2614
2615         Reviewed by Darin Adler.
2616
2617         It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.
2618
2619         No tests because there is no behavior change.
2620
2621         * platform/graphics/ios/FontCacheIOS.mm:
2622         (WebCore::languageSpecificFallbackFont):
2623
2624 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
2625
2626         [Win] Unreviewed gardening.
2627
2628         * WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
2629         and JSFileReaderSync multiple times.
2630
2631 2014-06-30  Daniel Bates  <dabates@apple.com>
2632
2633         Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
2634         https://bugs.webkit.org/show_bug.cgi?id=134470
2635
2636         Reviewed by Anders Carlsson.
2637
2638         Currently we always copy construct the captured std::function object when calling callOnMainThread()
2639         in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
2640         const in a lambda expression's body by default. That is, the std::function object is captured as const.
2641         Instead, we should mark this lambda expression as mutable so the captured std::function object is
2642         non-const and hence we can use move semantics when passing it to callOnMainThread().
2643
2644         * page/scrolling/ScrollingThread.cpp:
2645         (WebCore::ScrollingThread::dispatchBarrier):
2646
2647 2014-06-30  Anders Carlsson  <andersca@apple.com>
2648
2649         Adopt the legacy session decoding inside WebPage::restoreSession for now
2650         https://bugs.webkit.org/show_bug.cgi?id=134465
2651
2652         Reviewed by Sam Weinig.
2653
2654         * WebCore.exp.in:
2655
2656 2014-06-30  Commit Queue  <commit-queue@webkit.org>
2657
2658         Unreviewed, rolling out r170578.
2659         https://bugs.webkit.org/show_bug.cgi?id=134462
2660
2661         causes assertions loading nytimes.com on iOS (Requested by
2662         smfr on #webkit).
2663
2664         Reverted changeset:
2665
2666         "Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
2667         https://bugs.webkit.org/show_bug.cgi?id=134441
2668         http://trac.webkit.org/changeset/170578
2669
2670 2014-06-30  Alex Christensen  <achristensen@webkit.org>
2671
2672         Reduce dynamic memory allocation in css jit.
2673         https://bugs.webkit.org/show_bug.cgi?id=134416
2674
2675         Reviewed by Benjamin Poulain.
2676
2677         * cssjit/FunctionCall.h:
2678         (WebCore::FunctionCall::FunctionCall):
2679         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
2680         * cssjit/RegisterAllocator.h:
2681         * cssjit/SelectorCompiler.cpp:
2682         (WebCore::SelectorCompiler::addPseudoClassType):
2683         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2684         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2685         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2686         Use inlineCapacity template parameter to reduce malloc calls.
2687         I use 16 and 32 as the inline capacity for non-register related vectors because that
2688         is probably big enough for the selector compiler, and if it is not then a malloc
2689         call will not be significant because the selector is very complex.
2690         * cssjit/StackAllocator.h:
2691         (WebCore::StackAllocator::push):
2692         Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.
2693
2694 2014-06-30  Alex Christensen  <achristensen@webkit.org>
2695
2696         Use non-thumb registers in armv7 css jit.
2697         https://bugs.webkit.org/show_bug.cgi?id=134450
2698
2699         Reviewed by Geoff Garen.
2700
2701         * cssjit/RegisterAllocator.h:
2702         (WebCore::RegisterAllocator::isValidRegister):
2703         (WebCore::RegisterAllocator::isCallerSavedRegister):
2704         Use additional general purpose registers.
2705         * cssjit/SelectorCompiler.cpp:
2706         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2707         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2708         Always succeed when compiling css selectors.
2709
2710 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
2711
2712         Tiles on bottom of screen are not always allocated when necessary
2713         https://bugs.webkit.org/show_bug.cgi?id=134272
2714
2715         Reviewed by Simon Fraser.
2716
2717         The initial visibleRect is in the coordinate of the root layer, so its origin
2718         is at the top left of the view. The initial rect we were using doesn't
2719         include the contents inset, so it was too short, which was causing tiles near
2720         the bottom of the screen to not always be allocated if the tile threshold was
2721         close to the bottom of the view. Instead, we want to include the contents
2722         inset size so the visible rect includes the entire view.
2723         GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
2724         the visible rect into the tiled layer's coordinate system, at which point it
2725         is used for visible tile logic.
2726
2727         Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
2728
2729         * platform/graphics/ca/TileCoverageMap.cpp:
2730         (WebCore::TileCoverageMap::update):
2731         * rendering/RenderLayerCompositor.cpp:
2732         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2733
2734 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
2735
2736         [Win] Unreviewed project gardening.
2737
2738         * WebCore.vcxproj/WebCore.vcxproj: Clean up path information so
2739         files appear in appropriate places in project view.
2740         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2741
2742 2014-06-30  Zalan Bujtas  <zalan@apple.com>
2743
2744         Remove redundant repaintCompositedLayers() parameter and its dependencies.
2745         https://bugs.webkit.org/show_bug.cgi?id=134431
2746
2747         Reviewed by Darin Adler.
2748
2749         No change in functionality.
2750
2751         * rendering/RenderLayer.cpp:
2752         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords): Deleted.
2753         (WebCore::RenderLayer::convertToLayerCoords): Deleted.
2754         * rendering/RenderLayer.h:
2755         * rendering/RenderLayerCompositor.cpp:
2756         (WebCore::RenderLayerCompositor::repaintCompositedLayers):
2757         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
2758         * rendering/RenderLayerCompositor.h:
2759
2760 2014-06-30  Alex Christensen  <achristensen@webkit.org>
2761
2762         Remove webkit prefix from pointer lock.
2763         https://bugs.webkit.org/show_bug.cgi?id=134312
2764
2765         Reviewed by Dean Jackson.
2766
2767         * dom/Document.cpp:
2768         (WebCore::Document::exitPointerLock):
2769         (WebCore::Document::pointerLockElement):
2770         (WebCore::Document::webkitExitPointerLock): Deleted.
2771         (WebCore::Document::webkitPointerLockElement): Deleted.
2772         * dom/Document.h:
2773         * dom/Document.idl:
2774         * dom/Element.cpp:
2775         (WebCore::Element::requestPointerLock):
2776         (WebCore::Element::webkitRequestPointerLock): Deleted.
2777         * dom/Element.h:
2778         * dom/Element.idl:
2779         * dom/EventNames.h:
2780         * dom/MouseEvent.idl:
2781         * dom/MouseRelatedEvent.h:
2782         (WebCore::MouseRelatedEvent::movementX):
2783         (WebCore::MouseRelatedEvent::movementY):
2784         (WebCore::MouseRelatedEvent::webkitMovementX): Deleted.
2785         (WebCore::MouseRelatedEvent::webkitMovementY): Deleted.
2786         * page/PointerLockController.cpp:
2787         (WebCore::PointerLockController::PointerLockController):
2788         Initialize all data members.
2789         (WebCore::PointerLockController::requestPointerLock):
2790         (WebCore::PointerLockController::didAcquirePointerLock):
2791         (WebCore::PointerLockController::didNotAcquirePointerLock):
2792         (WebCore::PointerLockController::didLosePointerLock):
2793
2794 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
2795
2796         U16_IS_SURROGATE should not be called with a UChar32
2797         https://bugs.webkit.org/show_bug.cgi?id=134440
2798
2799         Reviewed by Darin Adler.
2800
2801         No new tests because there is no behavior change.
2802
2803         * platform/graphics/mac/ComplexTextController.cpp:
2804         (WebCore::advanceByCombiningCharacterSequence):
2805
2806 2014-06-30  Ryuan Choi  <ryuan.choi@samsung.com>
2807
2808         [EFL] Remove m_evasObject from Widget
2809         https://bugs.webkit.org/show_bug.cgi?id=134442
2810
2811         Reviewed by Gyuyoung Kim.
2812
2813         Since WebKit1/EFL was dropped, we don't need to keep the m_evasObject
2814         in the Widget.cpp because it's not used for WebKit2/Efl.
2815
2816         * platform/Widget.h:
2817         (WebCore::Widget::evasObject): Deleted.
2818         * platform/efl/ScrollbarEfl.cpp:
2819         Removed WebKit1/Efl specific code which uses m_evasObject.
2820         It will be a dummy until WebKit2/Efl support proper scrollbar implementation.
2821         (WebCore::ScrollbarEfl::ScrollbarEfl):
2822         (WebCore::ScrollbarEfl::~ScrollbarEfl):
2823         (WebCore::ScrollbarEfl::setParent):
2824         (WebCore::ScrollbarEfl::frameRectsChanged):
2825         (WebCore::ScrollbarEfl::invalidate):
2826         (ScrollbarEfl::ScrollbarEfl): Deleted.
2827         (ScrollbarEfl::~ScrollbarEfl): Deleted.
2828         (scrollbarEflEdjeMessage): Deleted.
2829         (ScrollbarEfl::setParent): Deleted.
2830         (ScrollbarEfl::updateThumbPosition): Deleted.
2831         (ScrollbarEfl::updateThumbProportion): Deleted.
2832         (ScrollbarEfl::updateThumbPositionAndProportion): Deleted.
2833         (ScrollbarEfl::frameRectsChanged): Deleted.
2834         (ScrollbarEfl::invalidate): Deleted.
2835         * platform/efl/ScrollbarEfl.h:
2836         Removed unnecessary methods. In addition, applied final, override keyword.
2837         (WebCore::ScrollbarEfl::handleMouseMoveEvent): Deleted.
2838         (WebCore::ScrollbarEfl::handleMouseOutEvent): Deleted.
2839         (WebCore::ScrollbarEfl::handleMousePressEvent): Deleted.
2840         (WebCore::ScrollbarEfl::handleMouseReleaseEvent): Deleted.
2841         * platform/efl/WidgetEfl.cpp:
2842         (WebCore::Widget::Widget):
2843         (WebCore::Widget::setEvasObject): Deleted.
2844
2845 2014-06-30  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2846
2847         Fix deprecated warning with bison 3
2848         https://bugs.webkit.org/show_bug.cgi?id=133791
2849
2850         Reviewed by Csaba Osztrogonác.
2851
2852         No new tests because no functional changes.
2853
2854         * css/CSSGrammar.y.in:
2855         * xml/XPathGrammar.y:
2856
2857 2014-06-30  Jaehun Lim  <ljaehun.lim@samsung.com>
2858
2859         Remove HarfBuzzShaper::setDrawRange()
2860         https://bugs.webkit.org/show_bug.cgi?id=134243
2861
2862         Reviewed by Gyuyoung Kim.
2863
2864         setDrawRange() is not used anywhere. Remove it.
2865         And m_fromIndex and m_toIndex are changed by only setDrawRange().
2866         So remove them too and use the default values instead of them.
2867
2868         No new tests, no behavior changes.
2869
2870         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2871         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
2872         (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
2873             currentCharacterIndex is unsigned, always greater than 0. Clean up if statements.
2874         (WebCore::HarfBuzzShaper::setDrawRange): Deleted.
2875         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
2876
2877 2014-06-29  Pratik Solanki  <psolanki@apple.com>
2878
2879         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
2880         https://bugs.webkit.org/show_bug.cgi?id=134441
2881
2882         Reviewed by Sam Weinig.
2883
2884         No new tests. Should be covered by exsting tests.
2885
2886         * platform/network/cf/ResourceRequest.h:
2887         (WebCore::ResourceRequest::ResourceRequest):
2888         * platform/network/cf/ResourceRequestCFNet.cpp:
2889         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2890         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2891         (WebCore::ResourceRequest::setStorageSession):
2892         * platform/network/cocoa/ResourceRequestCocoa.mm:
2893         (WebCore::ResourceRequest::nsURLRequest):
2894
2895 2014-06-29  Ryuan Choi  <ryuan.choi@samsung.com>
2896
2897         [EFL] Remove netscape plugin implementation from WebCore
2898         https://bugs.webkit.org/show_bug.cgi?id=134438
2899
2900         Reviewed by Gyuyoung Kim.
2901
2902         Because WebKit1/Efl was dropped, PluginPackageEfl.cpp and PluginViewEfl.cpp are not necessary.
2903
2904         * PlatformEfl.cmake:
2905         * plugins/efl/PluginPackageEfl.cpp: Removed.
2906         * plugins/efl/PluginViewEfl.cpp: Removed.
2907         * plugins/x11/PluginViewX11.cpp: Removed.
2908         This file is to share common code between WebKit1/Efl and WebKit1/GTk.
2909         Now, both ports are dropped WebKit1 support and the GTK port already removed the related files at r167016.
2910
2911 2014-06-29  Yoav Weiss  <yoav@yoav.ws>
2912
2913         Add support for HTMLImageElement's sizes attribute
2914         https://bugs.webkit.org/show_bug.cgi?id=133620
2915
2916         Reviewed by Dean Jackson.
2917
2918         Tests: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
2919                fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
2920                fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html
2921                fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html
2922                http/tests/loading/sizes/preload-image-sizes-2x.html
2923                http/tests/loading/sizes/preload-image-sizes.html
2924
2925         This patch adds support for HTMLImageElement's sizes attribute and the
2926         related srcset extended syntax as defined in
2927         http://picture.responsiveimages.org/.
2928         This sizes attribute syntax is added to the CSSGrammar and parsed by
2929         the CSSParser.
2930         The SourceSizeList class is generated by the parser, and used to get
2931         the final source size.
2932         HTMLImageElement and HTMLPreloadScanner send this value to
2933         HTMLSrcsetParser.
2934         HTMLSrcsetParser uses this value in order to pick the right resource.
2935
2936         * CMakeLists.txt: Added css/SourceSizeList.cpp.
2937         * Configurations/FeatureDefines.xcconfig: Added the PICTURE_SIZES flag.
2938         * WebCore.vcxproj/WebCore.vcxproj: Added css/SourceSizeList.*.
2939         * WebCore.vcxproj/WebCore.vcxproj.filters: Added css/SourceSizeList.*.
2940         * WebCore.xcodeproj/project.pbxproj: Added css/SourceSizeList.*.
2941         * css/CSSGrammar.y.in: Added 4 grammar rules that define a Media condition,
2942         Source size list, Source size length and source size.
2943         * css/CSSParser.cpp:
2944         (WebCore::CSSParser::parseSizesAttribute): Parse the sizes attribute.
2945         (WebCore::CSSParser::detectAtToken): Set the token to SIZESATTR.
2946         * css/CSSParser.h:
2947         * css/SourceSizeList.cpp: Added. Defined the SourceSize and SourceSizeList classes.
2948         (WebCore::SourceSize::match):
2949         (WebCore::computeLength):
2950         (WebCore::defaultValue):
2951         (WebCore::SourceSize::length):
2952         (WebCore::SourceSizeList::parseSizesAttribute):
2953         (WebCore::SourceSizeList::getEffectiveSize):
2954         * css/SourceSizeList.h: Added.
2955         (WebCore::SourceSize::SourceSize):
2956         (WebCore::SourceSizeList::append):
2957         * html/HTMLImageElement.cpp: Integrated sizes attribute parsing and added currentSrc.
2958         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
2959         (WebCore::HTMLImageElement::parseAttribute):
2960         (WebCore::HTMLImageElement::currentSrc):
2961         * html/HTMLImageElement.h:
2962         * html/HTMLImageElement.idl:
2963         * html/parser/HTMLDocumentParser.cpp: Added information required for sizes parsing to
2964         HTMLPreloadScanner calls.
2965         (WebCore::HTMLDocumentParser::pumpTokenizer):
2966         (WebCore::HTMLDocumentParser::insert):
2967         (WebCore::HTMLDocumentParser::append):
2968         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
2969         * html/parser/HTMLPreloadScanner.cpp: Integrated sizes attribute parsing.
2970         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2971         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2972         (WebCore::TokenPreloadScanner::scan):
2973         (WebCore::HTMLPreloadScanner::scan):
2974         * html/parser/HTMLPreloadScanner.h:
2975         * html/parser/HTMLSrcsetParser.cpp: Added 'w' descriptor parsing sizes based normalization.
2976         (WebCore::parseDescriptors):
2977         (WebCore::pickBestImageCandidate):
2978         (WebCore::bestFitSourceForImageAttributes):
2979         * html/parser/HTMLSrcsetParser.h:
2980
2981 2014-06-29  Andreas Kling  <akling@apple.com>
2982
2983         No need to lazily initialize ResourceResponse internals when accessing timing data.
2984         <https://webkit.org/b/134437>
2985         <rdar://problem/17499876>
2986
2987         When building with ENABLE(WEB_TIMING), the last thing that would happen when
2988         serializing a ResourceResponse in the network process is that we'd retrieve
2989         the ResourceLoadTiming to encode it as part of the response. Doing so would
2990         trigger the lazy instantiation of ResourceResponse's internal data structures.
2991
2992         Since timing data is not actually lazily instantiated, we can just not do that.
2993
2994         This shaves off ~550ms of network process main thread time on PLT, reducing
2995         response latency by not doing unnecessary stuff before letting the web process
2996         look at the downloaded data.
2997
2998         Reviewed by Gavin Barraclough.
2999
3000         * WebCore.exp.in:
3001         * platform/network/ResourceResponseBase.cpp:
3002         (WebCore::ResourceResponseBase::adopt):
3003         (WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
3004         (WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
3005         * platform/network/ResourceResponseBase.h:
3006         (WebCore::ResourceResponseBase::resourceLoadTiming):
3007
3008 2014-06-29  Pratik Solanki  <pratik.solanki@gmail.com>
3009
3010         Refactor ResourceRequest into Cocoa and iOS specific files
3011         https://bugs.webkit.org/show_bug.cgi?id=134430
3012
3013         Reviewed by Andreas Kling.
3014
3015         No new tests because no functional changes.
3016
3017         * WebCore.xcodeproj/project.pbxproj:
3018         * platform/network/cf/ResourceRequestCFNet.cpp:
3019         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
3020         * platform/network/cocoa/ResourceRequestCocoa.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
3021         (WebCore::ResourceRequest::nsURLRequest):
3022         (WebCore::ResourceRequest::cfURLRequest):
3023         (WebCore::ResourceRequest::doUpdateResourceRequest):
3024         (WebCore::ResourceRequest::doUpdateResourceHTTPBody):
3025         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3026         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3027         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
3028         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
3029         (WebCore::ResourceRequest::setStorageSession):
3030         * platform/network/ios/ResourceRequestIOS.mm: Added.
3031         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
3032         (WebCore::ResourceRequest::ResourceRequest):
3033         (WebCore::ResourceRequest::updateNSURLRequest):
3034         * platform/network/mac/ResourceRequestMac.mm:
3035         (WebCore::initQuickLookResourceCachingQuirks):
3036         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
3037         (WebCore::ResourceRequest::ResourceRequest):
3038         (WebCore::ResourceRequest::updateNSURLRequest):
3039         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
3040         (WebCore::ResourceRequest::nsURLRequest): Deleted.
3041         (WebCore::ResourceRequest::cfURLRequest): Deleted.
3042         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
3043         (WebCore::ResourceRequest::doUpdateResourceHTTPBody): Deleted.
3044         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
3045         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): Deleted.
3046         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
3047         (WebCore::ResourceRequest::setStorageSession): Deleted.
3048
3049 2014-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3050
3051         TextCodecICU::encode turns the whole string as yen signs if there is any backslash in it
3052         https://bugs.webkit.org/show_bug.cgi?id=133678
3053
3054         Reviewed by Alexey Proskuryakov.
3055
3056         Test: fast/encoding/backslash-encoding-jp.html
3057
3058         * platform/text/TextCodecICU.cpp:
3059         (WebCore::TextCodecICU::encode): fixed the copy of characters other than backslash.
3060
3061 2014-06-28  Dean Jackson  <dino@apple.com>
3062
3063         [iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
3064         https://bugs.webkit.org/show_bug.cgi?id=134433
3065         <rdar://problem/16630794>
3066
3067         Reviewed by Eric Carlson.
3068
3069         Detect the number of target touches (those directly on the
3070         video element) and disable the page zoom if it looks
3071         like the user is trying to trigger fullscreen.
3072
3073         * Modules/mediacontrols/mediaControlsiOS.js:
3074         (ControllerIOS.prototype.handleBaseGestureStart): If we are seeing
3075         two touches in this video element, don't trigger fullscreen. The
3076         exception is if we haven't yet started playback.
3077         (ControllerIOS.prototype.handleBaseGestureChange): Don't allow fullscreen
3078         if we haven't started playback (iOS 7 behaviour).
3079         (ControllerIOS.prototype.handleWrapperTouchStart): Keep track of the
3080         number of targetted touches.
3081
3082 2014-06-27  Simon Fraser  <simon.fraser@apple.com>
3083
3084         [iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
3085         https://bugs.webkit.org/show_bug.cgi?id=134426
3086         <rdar://problem/17474523>
3087
3088         Reviewed by Tim Horton.
3089
3090         After committing a new layer tree (with possibly stale position:fixed layer
3091         positions), we need the scrolling tree to update those positions based on
3092         the current scroll offset.
3093         
3094         Give ScrollingTreeScrollingNode an implementation of updateLayersAfterAncestorChange()
3095         which is required to update fixed/sticky child nodes.
3096
3097         * WebCore.exp.in:
3098         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3099         (WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
3100         * page/scrolling/ScrollingTreeScrollingNode.h:
3101
3102 2014-06-28  Juan A. Suarez Romero  <jasuarez@igalia.com>  and  Carlos Garcia Campos  <cgarcia@igalia.com>
3103
3104         [GTK] Use public getter/setter in GObject DOM bindings properties implementation.
3105         https://bugs.webkit.org/show_bug.cgi?id=134390.
3106
3107         Reviewed by Carlos Garcia Campos.
3108
3109         The current GObject DOM bindings generator is duplicating code when
3110         implementing the get/set_property methods and the public
3111         getters/setters, instead of making one invoking the other.
3112         
3113         This commit changes this behaviour so the code is not duplicated,
3114         making it easier to maintain.
3115
3116         No new tests needed.
3117
3118         * bindings/scripts/CodeGeneratorGObject.pm:
3119         (GenerateProperty):
3120         (GenerateProperties):
3121         (WriteData):
3122         (GetCoreObject): Deleted.
3123         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
3124         (webkit_dom_test_active_dom_object_get_property):
3125         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
3126         (webkit_dom_test_event_constructor_get_property):
3127         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
3128         (webkit_dom_test_exception_get_property):
3129         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
3130         (webkit_dom_test_interface_set_property):
3131         (webkit_dom_test_interface_get_property):
3132         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
3133         (webkit_dom_test_nondeterministic_set_property):
3134         (webkit_dom_test_nondeterministic_get_property):
3135         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3136         (webkit_dom_test_obj_set_property):
3137         (webkit_dom_test_obj_get_property):
3138         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
3139         (webkit_dom_test_serialized_script_value_interface_get_property):
3140         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
3141         (webkit_dom_test_typedefs_set_property):
3142         (webkit_dom_test_typedefs_get_property):
3143         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
3144         (webkit_dom_test_exception_get_property):
3145         (webkit_dom_attribute_get_property):
3146
3147 2014-06-28  Radu Stavila  <stavila@adobe.com>
3148
3149         [New Multicolumn] Elements with rounded corners and overflow:hidden do not properly clip their content
3150         https://bugs.webkit.org/show_bug.cgi?id=133941
3151
3152         Reviewed by Darin Adler.
3153
3154         When having a multicol element inside an element with overflow:hidden and border-radius,
3155         the fragments representing the columns need to have the border radius set also, to ensure
3156         proper clipping.
3157
3158         Test: fast/multicol/newmulticol/multicol-clip-rounded-corners.html
3159
3160         * rendering/RenderLayer.cpp:
3161         (WebCore::RenderLayer::collectFragments):
3162
3163 2014-06-27  Zalan Bujtas  <zalan@apple.com>
3164
3165         Subpixel rendering: Background clipping with subpixel behaves differently when composited.
3166         https://bugs.webkit.org/show_bug.cgi?id=134422
3167
3168         Reviewed by Simon Fraser.
3169
3170         Adjust cliprect with the subpixel offset from the graphics layer the same way we do it for painting.
3171         It ensures that cliprect starts from the right position when graphics layer is not on the same
3172         coordinates as the associated render layer.
3173
3174         Test: compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html
3175
3176         * rendering/RenderLayer.cpp:
3177         (WebCore::RenderLayer::clipToRect):
3178         (WebCore::RenderLayer::paintLayer):
3179         (WebCore::RenderLayer::applyFilters):
3180         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
3181         (WebCore::RenderLayer::paintBackgroundForFragments):
3182         (WebCore::RenderLayer::paintForegroundForFragments):
3183         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
3184         (WebCore::RenderLayer::paintOutlineForFragments):
3185         (WebCore::RenderLayer::paintMaskForFragments):
3186         (WebCore::RenderLayer::paintOverflowControlsForFragments):
3187         (WebCore::RenderLayer::calculateClipRects):
3188         * rendering/RenderLayer.h:
3189
3190 2014-06-27  Brent Fulgham  <bfulgham@apple.com>
3191
3192         [Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
3193         https://bugs.webkit.org/show_bug.cgi?id=134418
3194
3195         Reviewed by Eric Carlson.
3196
3197         Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
3198         Windows.
3199
3200         * DerivedSources.cpp: Add new IDL files
3201         * DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
3202         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
3203         Objective C.)
3204         * WebCore.vcxproj/WebCore.vcxproj: Update for new files.
3205         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3206         * WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
3207         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
3208         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
3209         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3210         (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
3211         Moved from MediaPlayerPrivateAVFoundationObjC.
3212         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3213         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
3214         Update for new API calls.
3215         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
3216         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
3217         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3218         Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
3219         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3220         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
3221         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
3222         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3223         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3224         Remove method that was moved to base class.
3225
3226 2014-06-27  Benjamin Poulain  <benjamin@webkit.org>
3227
3228         Remove BufferForAppendingHyphen
3229         https://bugs.webkit.org/show_bug.cgi?id=134376
3230
3231         Reviewed by Darin Adler.
3232
3233         It is legacy, from a time when that code was using a Vector.
3234
3235         The problem is that StringBuilder's memory was also implicitly used to keep
3236         the string alive for the lifespan of the TextRun. That seems quite dangerous
3237         as changes in StringBuilder could have changed that.
3238
3239         To fix the lifetime issue, my first idea was to make it explicit by passing
3240         a String reference to hold the memory alive, and a boolean to say if the text
3241         need an hyphen. The problem with that is this code is very hot and I made things
3242         worse.
3243
3244         The solution with this patch is to just pass a pointer to a String to do both
3245         the buffer reference, and the decision to add the hyphen. Having a single
3246         argument with 2 meanings is not pretty but that's not worse than the old buffer.
3247
3248         * editing/TextIterator.cpp:
3249         * rendering/InlineTextBox.cpp:
3250         (WebCore::InlineTextBox::localSelectionRect):
3251         (WebCore::InlineTextBox::paint):
3252         (WebCore::InlineTextBox::paintSelection):
3253         (WebCore::InlineTextBox::constructTextRun):
3254         (WebCore::adjustCharactersAndLengthForHyphen): Deleted.
3255         * rendering/InlineTextBox.h:
3256         (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): Deleted.
3257         * rendering/RenderText.cpp:
3258
3259 2014-06-27  Jeremy Jones  <jeremyj@apple.com>
3260
3261         Lazily link frameworks in WebVideoFullscreenInterfaceAVKit.
3262         https://bugs.webkit.org/show_bug.cgi?id=134407
3263
3264         Reviewed by Eric Carlson.
3265
3266         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3267         (-[WebAVPlayerController init]):
3268         Load AVPlayerController on use.
3269         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
3270         Remove loading on construction.
3271         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): Load AVValueTiming on use.
3272         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Load several classes on use.
3273         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Load UIColor on use.
3274
3275 2014-06-27  Alex Christensen  <achristensen@webkit.org>
3276
3277         Remove extra operations from 64-bit or on armv7.
3278         https://bugs.webkit.org/show_bug.cgi?id=134408
3279
3280         Reviewed by Geoffrey Garen.
3281
3282         * cssjit/SelectorCompiler.cpp:
3283         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
3284         Only do or operations if it would change values.
3285         Often we're only setting one flag, so half the operations are not necessary.
3286
3287 2014-06-27  Beth Dakin  <bdakin@apple.com>
3288
3289         ScrollView::rootViewToTotalContents() needs to take topContentInset into account
3290         https://bugs.webkit.org/show_bug.cgi?id=134415
3291         -and corresponding-
3292         <rdar://problem/17473633>
3293
3294         Reviewed by Simon Fraser.
3295
3296         This affects hit testing in headers aka PageBanners.
3297
3298         The root view will be anchored above the start of the total contents if there is a 
3299         topContentInset, so the inset value should be subtracted to get into the right 
3300         coordinate space here.
3301         * platform/ScrollView.cpp:
3302         (WebCore::ScrollView::rootViewToTotalContents):
3303
3304 2014-06-27  Antti Koivisto  <antti@apple.com>
3305
3306         Flush throttling with remote layers
3307         https://bugs.webkit.org/show_bug.cgi?id=134398
3308
3309         Reviewed by Darin Adler.
3310
3311         With remote layer trees the flush scheduling lives in the WebKit2 layer. The throttling code
3312         needs to live there as well.
3313         
3314         Add the required callbacks and disable the existing throttling code in RenderLayerCompositor
3315         when remote layers are in use. Later we can get rid of the RenderLayerCompositor throttling code.
3316
3317         * WebCore.xcodeproj/project.pbxproj:
3318         * loader/FrameLoader.cpp:
3319         (WebCore::FrameLoader::loadProgressingStatusChanged):
3320         * page/ChromeClient.h:
3321         (WebCore::ChromeClient::adjustLayerFlushThrottling):
3322         * page/FrameView.cpp:
3323         (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
3324         (WebCore::FrameView::loadProgressingStatusChanged):
3325         
3326             Factor the progress status change activities to a function.
3327
3328         (WebCore::FrameView::updateLayerFlushThrottling):
3329         (WebCore::FrameView::setExposedRect):
3330         
3331             Move the call to adjustTiledBackingCoverage from WebKit to here.
3332
3333         (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames): Deleted.
3334         * page/FrameView.h:
3335         * page/LayerFlushThrottleState.h: Added.
3336         * rendering/RenderLayerCompositor.cpp:
3337         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
3338
3339 2014-06-27  Brady Eidson  <beidson@apple.com>
3340
3341         The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads.
3342         https://bugs.webkit.org/show_bug.cgi?id=134375
3343
3344         Reviewed by Darin Adler.
3345
3346         No new tests (Not yet a tested config)
3347
3348         * Modules/gamepad/GamepadManager.cpp:
3349         (WebCore::GamepadManager::platformGamepadConnected): Also call to makeGamepadsVisibileToBlindNavigators.
3350         (WebCore::GamepadManager::platformGamepadDisconnected):
3351         (WebCore::GamepadManager::platformGamepadInputActivity): Call makeGamepadsVisibileToBlindNavigators.
3352         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Walk through each blind navigator
3353           notifying it of each connected Gamepad.
3354         (WebCore::GamepadManager::registerNavigator): Also add to the blind navigator set.
3355         (WebCore::GamepadManager::unregisterNavigator): Also remove from the blind navigator set.
3356         * Modules/gamepad/GamepadManager.h:
3357
3358         * platform/GamepadProviderClient.h: Added platformGamepadInputActivity.
3359
3360         * platform/mac/HIDGamepadProvider.cpp:
3361         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
3362         (WebCore::HIDGamepadProvider::valuesChanged): Set the input notification timer which will notify the clients
3363           that a button was pressed.
3364         (WebCore::HIDGamepadProvider::inputNotificationTimerFired): Perform that notification.
3365         * platform/mac/HIDGamepadProvider.h:
3366
3367 2014-06-27  Brady Eidson  <beidson@apple.com>
3368
3369         HIDGamepads should populate themselves with initial input values
3370         https://bugs.webkit.org/show_bug.cgi?id=134381
3371
3372         Reviewed by Darin Adler.
3373
3374         No new tests (Not yet a tested config)
3375
3376         * platform/mac/HIDGamepad.cpp:
3377         (WebCore::HIDGamepad::getCurrentValueForElement):
3378         (WebCore::HIDGamepad::initElements):  Loop through all the saved elements to get current values.
3379         (WebCore::HIDGamepad::maybeAddButton):
3380         (WebCore::HIDGamepad::maybeAddAxis):
3381         * platform/mac/HIDGamepad.h:
3382         (WebCore::HIDGamepadElement::HIDGamepadElement):
3383         (WebCore::HIDGamepadButton::HIDGamepadButton):
3384         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
3385
3386 2014-06-27  Peyton Randolph  <prandolph@apple.com>
3387
3388         Add feature flag for link long-press gesture.
3389         https://bugs.webkit.org/show_bug.cgi?id=134262
3390
3391         Reviewed by Enrica Casucci.
3392
3393         * Configurations/FeatureDefines.xcconfig:
3394         Add ENABLE_LINK_LONG_PRESS.
3395
3396 2014-06-26  Brady Eidson  <beidson@apple.com>
3397
3398         HIDGamepadProvider should only be active when someone is interested in Gamepads.
3399         https://bugs.webkit.org/show_bug.cgi?id=134374
3400
3401         Reviewed by Darin Adler.
3402
3403         No new tests (Not yet a tested config)
3404
3405         * Modules/gamepad/GamepadManager.cpp:
3406         (WebCore::GamepadManager::registerNavigator): Add some logging.
3407         (WebCore::GamepadManager::unregisterNavigator): Ditto.
3408
3409         * platform/mac/HIDGamepadProvider.cpp:
3410         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
3411         (WebCore::HIDGamepadProvider::connectionDelayTimerFired): Stop suppressing connection callbacks
3412         (WebCore::HIDGamepadProvider::openAndScheduleManager):
3413         (WebCore::HIDGamepadProvider::closeAndUnscheduleManager): Stop listening for gamepad events, and clear
3414           all current gamepads.
3415         (WebCore::HIDGamepadProvider::startMonitoringGamepads): If the first client, call openAndScheduleManager
3416         (WebCore::HIDGamepadProvider::stopMonitoringGamepads): If the last client, call closeAndUnscheduleManager
3417         (WebCore::HIDGamepadProvider::deviceAdded): If this callback came while we were suppressing connection
3418           callbacks, it is a startup event for already-connected gamepads. Stop suppressing callbacks in a later
3419           spin of the runloop.
3420         (WebCore::HIDGamepadProvider::deviceRemoved):
3421         * platform/mac/HIDGamepadProvider.h:
3422         (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks): Deleted.
3423
3424 2014-06-27  Alex Christensen  <achristensen@webkit.org>
3425
3426         Prevent unnecessary register saving in css jit.
3427         https://bugs.webkit.org/show_bug.cgi?id=133955
3428
3429         Reviewed by Geoff Garen.
3430
3431         * cssjit/FunctionCall.h:
3432         (WebCore::FunctionCall::prepareAndCall):
3433         (WebCore::FunctionCall::cleanupPostCall):
3434         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
3435         (WebCore::FunctionCall::restoreAllocatedCallerSavedRegisters):
3436         (WebCore::FunctionCall::saveAllocatedRegisters): Renamed to saveAllocatedCallerSavedRegisters.
3437         (WebCore::FunctionCall::restoreAllocatedRegisters): Renamed to restoreAllocatedCallerSavedRegisters.
3438         Only push caller saved registers before function calls.
3439         * cssjit/RegisterAllocator.h:
3440         (WebCore::RegisterAllocator::isValidRegister):
3441         Corrected register ranges.
3442         (WebCore::RegisterAllocator::isCallerSavedRegister): Added.
3443
3444 2014-06-27  Beth Dakin  <bdakin@apple.com>
3445
3446         Custom scrollbars should not create ScrollbarPainters on Mac
3447         https://bugs.webkit.org/show_bug.cgi?id=134406
3448         -and corresponding-
3449         <rdar://problem/16178301>
3450
3451         Reviewed by Tim Horton.
3452
3453         The solution here is to return early in ScrollbarThemeMac::registerScrollbar() if 
3454         the scrollbar is custom. However, since this function is called during the 
3455         RenderScrollbar and Scrollbar constructor, we need to re-implement 
3456         Scrollbar::isCustomScrollbar() to return a member variable that is passed into the 
3457         constructor. Otherwise, we will get Scrollbar’s implementation is 
3458         isCustomScrollbar() wrongfully returning false since instead of the derived
3459         class’s implementation. 
3460
3461         Scrollbar constructor now has an option parameter isCustomScrollbar that defaults 
3462         to false. That value is returned by isCustomScrollbar()
3463         * platform/Scrollbar.cpp:
3464         (WebCore::Scrollbar::Scrollbar):
3465         * platform/Scrollbar.h:
3466
3467         Return early if this is a custom scrollbar since the rest of the function deals 
3468         with creating a native scrollbar and getting it in the right state.
3469         * platform/mac/ScrollbarThemeMac.mm:
3470         (WebCore::ScrollbarThemeMac::registerScrollbar):
3471
3472         Send true to the Scrollbar constructor to indicate that this is a custom 
3473         scrollbar.
3474         * rendering/RenderScrollbar.cpp:
3475         (WebCore::RenderScrollbar::RenderScrollbar):
3476         * rendering/RenderScrollbar.h:
3477
3478 2014-06-27  Eric Carlson  <eric.carlson@apple.com>
3479
3480         [Mac] AVMetadataKeySpaceISOUserData not defined on 10.8
3481         https://bugs.webkit.org/show_bug.cgi?id=134401
3482
3483         Reviewed by Jer Noble.
3484
3485         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3486         (WebCore::metadataType): Use SOFT_LINK_POINTER_OPTIONAL for AVMetadataKeySpaceISOUserData
3487             so we don't have problems on OS versions where it isn't defined.
3488
3489 2014-06-27  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3490
3491         REGRESSION (r168685): css calc() expression fails 
3492         https://bugs.webkit.org/show_bug.cgi?id=134059
3493
3494         The expression 'calc((100% - 20px) / 3' did not work properly after r168685,
3495         because primitiveType() function in CSSCalculationValue.cpp has handled
3496         CalcPercentLength and CalcPercentNumber categories as if they were angles.
3497         The patch fixes this incorrect behavior.
3498
3499         Reviewed by Simon Fraser.
3500
3501         Test: fast/css/calc-percentage-pixel.html
3502
3503         * css/CSSCalculationValue.cpp:
3504
3505 2014-06-27  Jer Noble  <jer.noble@apple.com>
3506
3507         [MSE] http/tests/media/media-source/mediasource-append-buffer.html is failing
3508         https://bugs.webkit.org/show_bug.cgi?id=134389
3509
3510         Reviewed by Eric Carlson.
3511
3512         Two subtests in mediasource-append-buffer.html are failing. Bring setDuration() up to spec
3513         by throwing an exception if the duration is called while any SourceBuffer is updating. Do
3514         not cancel pending events when a SourceBuffer is removed from its MediaSource. And mark the
3515         SourceBuffer as having pending activity if there are pending events to be fired.
3516
3517         * Modules/mediasource/MediaSource.cpp:
3518         (WebCore::MediaSource::setDuration):
3519         * Modules/mediasource/SourceBuffer.cpp:
3520         (WebCore::SourceBuffer::removedFromMediaSource):
3521         (WebCore::SourceBuffer::hasPendingActivity):
3522
3523 2014-06-26  Simon Fraser  <simon.fraser@apple.com>
3524
3525         [iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and RTL scrolling
3526         https://bugs.webkit.org/show_bug.cgi?id=134377
3527         <rdar://problem/16762224>
3528
3529         Reviewed by Tim Horton.
3530         
3531         Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
3532         has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
3533         contexts.
3534         
3535         An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
3536         and needs to truncate the scrolled content on the left side. To pass the
3537         correct geometry to the UI process, we need to introduce the concept of
3538         "reachable" size as well as total content size; normally these are the same,
3539         but will differ when scrolling is only allowed on one axis but there is overflow
3540         on both axes.
3541         
3542         To get the reachable size, add RenderLayer::scrollableContentsSize().
3543         
3544         RenderLayer::visibleSize() was wrong; the function should return the size of the 
3545         scrollable portion, but used layer size which includes borders. Fix to use pixelSnappedClientWidth()/Height(),
3546         which is what we use for scrollbar computations.
3547
3548         * WebCore.exp.in:
3549         * page/scrolling/AsyncScrollingCoordinator.cpp:
3550         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
3551         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
3552         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
3553         * page/scrolling/ScrollingCoordinator.h:
3554         * page/scrolling/ScrollingStateScrollingNode.cpp:
3555         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3556         (WebCore::ScrollingStateScrollingNode::setReachableContentsSize):
3557         * page/scrolling/ScrollingStateScrollingNode.h:
3558         (WebCore::ScrollingStateScrollingNode::reachableContentsSize):
3559         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3560         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
3561         * page/scrolling/ScrollingTreeScrollingNode.h:
3562         (WebCore::ScrollingTreeScrollingNode::reachableContentsSize):
3563         * rendering/RenderLayer.cpp:
3564         (WebCore::RenderLayer::visibleSize):
3565         (WebCore::RenderLayer::scrollableContentsSize):
3566         * rendering/RenderLayer.h:
3567         * rendering/RenderLayerCompositor.cpp:
3568         (WebCore::updateScrollingLayerWithClient):
3569         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
3570
3571 2014-06-27  Bear Travis  <betravis@adobe.com>
3572
3573         [Feature Queries] Fix feature queries build on Mac
3574         https://bugs.webkit.org/show_bug.cgi?id=134359
3575
3576         Reviewed by Antti Koivisto.
3577
3578         Update the XCode project and Feature Queries code to build on Mac.
3579
3580         There are existing tests for supports in the LayoutTests/css3 directory.
3581
3582         * WebCore.xcodeproj/project.pbxproj: Add the Feature Queries files
3583         to the XCode project.
3584         * css/CSSGrammar.y.in: Update CSSParserExpression to CSSParserValueList.
3585         * css/DOMWindowCSS.idl: Add ImplementationLacksVTable metadata.
3586
3587 2014-06-27  Jer Noble  <jer.noble@apple.com>
3588
3589         [MSE] media/media-source/media-source-tracks.html is crashy
3590         https://bugs.webkit.org/show_bug.cgi?id=134385
3591
3592         Reviewed by Eric Carlson.
3593
3594         Fix the refactoring error (self assignment) introduced by r170488.
3595
3596         * Modules/mediasource/SourceBuffer.cpp:
3597         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
3598
3599 2014-06-27  Mark Hahnenberg  <mhahnenberg@apple.com>
3600
3601         XHR should keep attributes on instance
3602         https://bugs.webkit.org/show_bug.cgi?id=134363
3603
3604         Reviewed by Sam Weinig.
3605
3606         Test: js/dom/xhr-prototype-define-property.html
3607
3608         Having them on the prototype broke some sites due to the fact that these DOM attributes are currently 
3609         not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.
3610
3611         * bindings/scripts/CodeGeneratorJS.pm:
3612         (InterfaceRequiresAttributesOnInstanceForCompatibility):
3613
3614 2014-06-27  Jeremy Jones  <jeremyj@apple.com>
3615
3616         removeCodedFrames should modify ref to TrackBuffer no a copy.
3617         https://bugs.webkit.org/show_bug.cgi?id=134380
3618
3619         Reviewed by Daniel Bates.
3620
3621         * Modules/mediasource/SourceBuffer.cpp:
3622         (WebCore::SourceBuffer::removeCodedFrames):
3623         Iterate with a reference.
3624
3625 2014-06-27  Zalan Bujtas  <zalan@apple.com>
3626
3627         Set cliprect radius unconditionally in RenderLayer.
3628         https://bugs.webkit.org/show_bug.cgi?id=134396
3629
3630         Reviewed by Simon Fraser.
3631
3632         No change in functionality.
3633
3634         * rendering/RenderLayer.cpp:
3635         (WebCore::RenderLayer::calculateClipRects):
3636
3637 2014-06-27  Manuel Rego Casasnovas  <rego@igalia.com>
3638
3639         [CSS Grid Layout] Interaction between auto-placement and column / row spanning
3640         https://bugs.webkit.org/show_bug.cgi?id=110633
3641
3642         Reviewed by Sergio Villar Senin.
3643
3644         Modify auto-placement algorithm in order to support span in both
3645         definite and automatic positions.
3646
3647         This patch fixes examples like:
3648         grid-row: auto;
3649         grid-column: 2 / span 3;
3650
3651         And also:
3652         grid-row: auto;
3653         grid-column: span 3;
3654
3655         Tests: fast/css-grid-layout/grid-item-auto-placement-automatic-span.html
3656                fast/css-grid-layout/grid-item-auto-placement-definite-span.html
3657
3658         * rendering/RenderGrid.cpp:
3659         (WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): New method that
3660         checks if a grid area is or not empty.
3661         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Updated method
3662         that now receives two arguments with the span value in both directions.
3663         (WebCore::RenderGrid::ensureGridSize): Renamed from gridRow(). Adapted
3664         method to grow in both directions at the same time if needed. It ensures
3665         that the grid is big enough to insert a new item.
3666         (WebCore::RenderGrid::insertItemIntoGrid): Only leave the method that
3667         receives a GridCoordinate. It uses ensureGridSize() before inserting the
3668         item in the grid.
3669         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ensure that
3670         the grid is big enough to place the largest span for auto-positioned
3671         items.
3672         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
3673         New method that returns a GridCoordinate outside current grid with the
3674         requested dimensions.
3675         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Adapted
3676         method to calculate the item's span and use the new version of
3677         nextEmptyGridArea(). If an empty area is not found it uses
3678         createEmptyGridAreaAtSpecifiedPositionsOutsideGrid() to place the item.
3679         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
3680         (WebCore::RenderGrid::growGrid): Renamed to ensureGridSize().
3681         * rendering/RenderGrid.h: Modify methods headers and add new method
3682         signature.
3683         * rendering/style/GridCoordinate.h:
3684         (WebCore::GridSpan::integerSpan): Add new simple method to return the
3685         span value of a position.
3686         * rendering/style/GridResolvedPosition.cpp:
3687         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
3688         Implement method to take into account span in auto-placement algorithm.
3689         (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Add new
3690         checks related with named grid line spans in auto-positioned items,
3691         which is not allowed according to the spec.
3692         * rendering/style/GridResolvedPosition.h: Update method header.
3693
3694 2014-06-27  Mahesh Kulkarni  <mahesh.kk@samsung.com>
3695
3696         [XHR] open method must uppercase only standard method types
3697         https://bugs.webkit.org/show_bug.cgi?id=134264
3698
3699         Reviewed by Darin Adler.
3700
3701         As per step-5 of http://xhr.spec.whatwg.org/#the-open()-method only
3702         DELETE, PUT, GET, POST, OPTIONS, HEAD are standard. Use other methods as is without case change.
3703         All tests from w3c-test suite pass http://w3c-test.org/XMLHttpRequest/open-method-case-sensitive.htm.
3704         This merges blink changes from r176592.
3705
3706         Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
3707                http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html
3708
3709         * xml/XMLHttpRequest.cpp:
3710         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
3711
3712 2014-06-27  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
3713
3714         Increase priority on SharedTimer source.
3715         http://bugs.webkit.org/show_bug.cgi?id=134109
3716
3717         While running webkit on a Debian virtual machine I stumbled upon an issue where JS
3718         setTimeout callbacks were not being properly invoked due to machine limitations and the
3719         usage of a low priority on setTimeout timers.
3720
3721         This patch increases the SharedTimer source priority to use the default glib priority which
3722         fixes the issue, making setTimeout JS calls work properly on the test environment.
3723
3724         Reviewed by Gustavo Noronha Silva.
3725
3726         * platform/gtk/SharedTimerGtk.cpp:
3727         (WebCore::setSharedTimerFireInterval):
3728
3729 2014-06-27  Zalan Bujtas  <zalan@apple.com>
3730
3731         Remove redundant offsetFromAncestor() call from RenderLayer::localClipRect().
3732         https://bugs.webkit.org/show_bug.cgi?id=134378
3733
3734         Reviewed by Simon Fraser.
3735
3736         No change in functionality.
3737
3738         * rendering/RenderLayer.cpp:
3739         (WebCore::RenderLayer::calculateClipRects):
3740
3741 2014-06-27  Philippe Normand  <pnormand@igalia.com>
3742
3743         [GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol source plugin" (GStreamer?)
3744         https://bugs.webkit.org/show_bug.cgi?id=133605
3745
3746         Reviewed by Carlos Garcia Campos.
3747
3748         Don't attempt to load blank URLs with the GStreamer media
3749         player. Those URLs trigger the codec installer which is useless in
3750         this scenario. This patch also renames some of the variables of
3751         the ::load method, as suggested by Carlos.
3752
3753         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3754         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
3755         Check video-sink validity before disconnecting its signal handlers.
3756         (WebCore::MediaPlayerPrivateGStreamer::load): Don't load blank
3757         URLs (about:blank).
3758         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3759         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
3760         Disconnect repaint handler only if it's valid.
3761
3762 2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3763
3764         [GTK] Expose getter and setter functions for attributes named type
3765         https://bugs.webkit.org/show_bug.cgi?id=134300
3766
3767         Reviewed by Martin Robinson.
3768
3769         We skip those because the getter conflicts with the get_type()
3770         function of all GObjects. We should use a different name for them. As
3771         a general rule we use the last word of the class name, something like:
3772
3773           webkit_dom_blob_get_type() -> webkit_dom_blob_get_blob_type()
3774           webkit_dom_event_get_type() -> webkit_dom_event_get_event_type()
3775
3776         It's consistent with other existing DOM methods like
3777         webkit_dom_xpath_result_get_result_type() or webkit_dom_css_value_get_css_value_type().
3778         This patch also adds some exceptions for particular cases.
3779
3780         * bindings/gobject/webkitdom.symbols: Add new public symbols.
3781         * bindings/scripts/CodeGeneratorGObject.pm:
3782         (GetFunctionSigName): Helper function to return the function name
3783         that takes into account all exceptions when generating getters and
3784         setters of attributes named type. Otherwise the name is returned unmodified.
3785         (GenerateFunction): Use GetFunctionSigName().
3786         (GenerateFunctions): Do not skip functions for type attributes.
3787
3788 2014-06-27  Sungmann Cho  <sungmann.cho@navercorp.com>
3789
3790         Remove unnecessary #include in HistoryController
3791         https://bugs.webkit.org/show_bug.cgi?id=134369
3792
3793         Reviewed by Daniel Bates.
3794
3795         After the landing of https://webkit.org/b/130099, HistoryController doesn't need
3796         WebCore::Settings class. So we can remove the related header.
3797
3798         * loader/HistoryController.cpp:
3799
3800 2014-06-26  Jeongeun Kim  <je_julie.kim@samsung.com>
3801
3802         REGRESSION (r170287): SVGDocumentExtensions::rebuildElements() called on removed element
3803         https://bugs.webkit.org/show_bug.cgi?id=134304
3804
3805         Reviewed by Daniel Bates.
3806
3807         Roll out <http://trac.webkit.org/170287> (https://bugs.webkit.org/show_bug.cgi?id=134186)
3808         as it led to SVGDocumentExtensions::rebuildElements() being called on an element(s) that
3809         may no longer be in the document.
3810
3811         * dom/ContainerNode.cpp:
3812         (WebCore::ContainerNode::removeChild):
3813         (WebCore::ContainerNode::removeChildren):
3814         * dom/Document.cpp:
3815         (WebCore::Document::commonTeardown):
3816         (WebCore::Document::implicitClose):
3817         * history/CachedFrame.cpp:
3818         (WebCore::CachedFrameBase::restore):
3819         * svg/SVGDocumentExtensions.cpp:
3820         (WebCore::SVGDocumentExtensions::startAnimations):
3821         (WebCore::SVGDocumentExtensions::pauseAnimations):
3822         (WebCore::SVGDocumentExtensions::unpauseAnimations):
3823         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
3824         (WebCore::SVGDocumentExtensions::rebuildElements):
3825         * svg/SVGDocumentExtensions.h:
3826
3827 2014-06-26  Tim Horton  <timothy_horton@apple.com>
3828
3829         [WK2] Pinch-zoom shadows can overlap headers and footers
3830         https://bugs.webkit.org/show_bug.cgi?id=134372
3831         <rdar://problem/16004095>
3832
3833         Reviewed by Simon Fraser.
3834
3835         * WebCore.exp.in:
3836         * rendering/RenderLayerCompositor.cpp:
3837         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3838         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3839         Put header/footer layers in front of the root content layer instead of behind.
3840         Ideally nothing would ever overlap them, but this will give them precedence regardless.
3841
3842 2014-06-26  David Kilzer  <ddkilzer@apple.com>
3843
3844         [Win] Always NULL-terminate the string in createUTF8String()
3845         <http://webkit.org/b/134353>
3846         <rdar://problem/17471783>
3847
3848         Reviewed by Brent Fulgham.
3849
3850         * plugins/PluginView.cpp:
3851         (WebCore::createUTF8String): Pull out CString length into local
3852         variable.  Switch to use memcpy.  Always NULL-terminate the
3853         string.
3854
3855 2014-06-26  Jer Noble  <jer.noble@apple.com>
3856
3857         [MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
3858         https://bugs.webkit.org/show_bug.cgi?id=134367
3859
3860         Reviewed by Darin Adler.
3861
3862         Add a couple of null-checks to protect against methods being called in the brief time
3863         between when the object is created and when it's asked to load.
3864
3865         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3866         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
3867         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
3868
3869 2014-06-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3870
3871         Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme()
3872         https://bugs.webkit.org/show_bug.cgi?id=134289
3873
3874         Reviewed by Darin Adler.
3875
3876         If we do early return when there is invalid protocol, we're able to avoid unnecessary call flow.
3877
3878         No new tests, covered by existing tests.
3879
3880         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3881         (WebCore::verifyProtocolHandlerScheme):
3882
3883 2014-06-26  Benjamin Poulain  <bpoulain@apple.com>
3884
3885         [WK1] Use native touch event's timestamp for DOM touch event
3886         https://bugs.webkit.org/show_bug.cgi?id=134326
3887
3888         Reviewed by Enrica Casucci.
3889
3890         * platform/ios/PlatformEventFactoryIOS.mm:
3891         (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
3892         Use device event timestamp to get more accurate timing information. This also removes
3893         the variance introduced by WebKit when computing velocity/acceleration/etc.
3894
3895 2014-06-26  Balazs Kelemen  <b.kelemen@samsung.com>
3896
3897         Memcache migth not be pruned when it should for https pages
3898         https://bugs.webkit.org/show_bug.cgi?id=134361
3899
3900         Reviewed by Geoffrey Garen.
3901
3902         There is no reason we should not try to prune in case of a https resource.
3903
3904         No observable change in behavior, no tests.
3905
3906         * loader/cache/CachedResource.cpp:
3907         (WebCore::CachedResource::removeClient):
3908         Call prune unconditionally and remove an unnecessary branch.
3909
3910 2014-06-26  Alexey Proskuryakov  <ap@apple.com>
3911
3912         REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
3913         https://bugs.webkit.org/show_bug.cgi?id=133882
3914         <rdar://problem/17271965>
3915
3916         Reviewed by Brady Eidson.
3917
3918         This goes to pre-r161796 behavior on 10.8 and 10.9. We schedule the requests internally,
3919         and only give 6 of them to CFNetwork at a time. Except for synchronous requests,
3920         which still use the improved approach, and don't count against 6 connections.
3921
3922         * loader/ResourceLoadScheduler.cpp:
3923         (WebCore::ResourceLoadScheduler::scheduleLoad):
3924         * platform/network/cf/ResourceRequest.h:
3925         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
3926         * platform/network/cf/ResourceRequestCFNet.cpp:
3927         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3928         (WebCore::ResourceRequest::doUpdateResourceRequest):
3929         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Deleted.
3930         * platform/network/mac/ResourceRequestMac.mm:
3931         (WebCore::ResourceRequest::doUpdateResourceRequest):
3932         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3933
3934 2014-06-26  Brady Eidson  <beidson@apple.com>
3935
3936         Remove use of PlatformStrategies for Gamepad API.
3937         https://bugs.webkit.org/show_bug.cgi?id=134348
3938
3939         Reviewed by Dean Jackson.
3940
3941         No new tests (Not yet a tested config)
3942
3943         Introduce a virtual GamepadProvider with a process-global shared provider.
3944         The base implementation of the GamepadProvider does nothing.
3945         * platform/GamepadProvider.cpp: Renamed from Source/WebKit/mac/WebCoreSupport/WebHIDGamepadController.h.
3946         (WebCore::GamepadProvider::shared):
3947         (WebCore::GamepadProvider::setSharedProvider):
3948         (WebCore::GamepadProvider::startMonitoringGamepads):
3949         (WebCore::GamepadProvider::stopMonitoringGamepads):
3950         (WebCore::GamepadProvider::platformGamepads):
3951         * platform/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadStrategy.h.
3952         (WebCore::GamepadProvider::~GamepadProvider):
3953
3954         * platform/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadStrategyClient.h.
3955         (WebCore::GamepadProviderClient::~GamepadProviderClient):
3956
3957         GamepadManager is now a GamepadProviderClient:
3958         * Modules/gamepad/GamepadManager.cpp:
3959         (WebCore::GamepadManager::GamepadManager):
3960         (WebCore::GamepadManager::registerNavigator):
3961         (WebCore::GamepadManager::unregisterNavigator):
3962         * Modules/gamepad/GamepadManager.h:
3963
3964         Remove the GamepadStrategy altogether:
3965         * platform/PlatformStrategies.h:
3966         (WebCore::PlatformStrategies::PlatformStrategies):
3967         (WebCore::PlatformStrategies::gamepadStrategy): Deleted.
3968
3969         Call to the shared GamepadProvider instead of the strategy:
3970         * Modules/gamepad/NavigatorGamepad.cpp:
3971         (WebCore::NavigatorGamepad::gamepads):
3972         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
3973         (WebCore::NavigatorGamepad::gamepadConnected):
3974
3975         HIDGamepadListener is now a subclass of GamepadProvider that implements the HID based management.
3976         LegacyWebKit on Mac will install the shared HIDGamepadProvider instead of the default GamepadProvider:
3977         * platform/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.cpp.
3978         (WebCore::deviceMatchingDictionary):
3979         (WebCore::deviceAddedCallback):
3980         (WebCore::deviceRemovedCallback):
3981         (WebCore::deviceValuesChangedCallback):
3982         (WebCore::HIDGamepadProvider::shared):
3983         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
3984         (WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
3985         (WebCore::HIDGamepadProvider::startMonitoringGamepads):
3986         (WebCore::HIDGamepadProvider::stopMonitoringGamepads):
3987         (WebCore::HIDGamepadProvider::deviceAdded):
3988         (WebCore::HIDGamepadProvider::deviceRemoved):
3989         (WebCore::HIDGamepadProvider::valuesChanged):
3990         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
3991         * platform/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.h.
3992         (WebCore::HIDGamepadProvider::platformGamepads):
3993         (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks):
3994
3995         * WebCore.exp.in:
3996         * WebCore.xcodeproj/project.pbxproj:
3997
3998         * platform/mac/HIDGamepad.h: Fix incorrect comment
3999
4000 2014-06-26  Andreas Kling  <akling@apple.com>
4001
4002         Skip memcmp()ing fully downloaded resources after they become mmap()able.
4003         <https://webkit.org/b/134362>
4004
4005         When we receive word that a downloaded resource is now available for mmap()ing
4006         from the file system, we don't need to compare against the buffered data,
4007         since even if there were a mismatch, the cached version should be the canonical one.
4008
4009         This was added as belt-and-suspenders while the supporting mechanism was being
4010         developed in CFNetwork, and there's no evidence of a race today. This change
4011         turns the runtime checks into debug-only assertions.
4012
4013         Saves ~300ms of main thread time on PLT.
4014
4015         Reviewed by Geoff Garen.
4016
4017         * loader/cache/CachedResource.cpp:
4018         (WebCore::CachedResource::tryReplaceEncodedData):
4019
4020 2014-06-26  Jer Noble  <jer.noble@apple.com>
4021
4022         [MSE] Refactoring: Use C++11 for-loops in SourceBuffer.
4023         https://bugs.webkit.org/show_bug.cgi?id=134352
4024
4025         Reviewed by Darin Adler.
4026
4027         Use C++11 style for-loops where appropriate in SourceBuffer now that the
4028         SampleMap ordered objects support them.
4029
4030         * Modules/mediasource/SourceBuffer.cpp:
4031         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
4032         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
4033         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
4034         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
4035         (WebCore::SourceBuffer::validateInitializationSegment):
4036         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
4037
4038 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
4039  
4040         [iOS]: Tapping <button> outside of a form is no longer working
4041         https://bugs.webkit.org/show_bug.cgi?id=134319
4042         <rdar://problem/17213346>
4043
4044         Reviewed by Daniel Bates.
4045
4046         Restore behavior of&nb