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