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