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