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