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