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