a8c2fefa16c5c2bb8e8af113e7993992d0797c59
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-11  Ryuan Choi  <ryuan.choi@samsung.com>
2
3         Remove unused method from BatteryController
4         https://bugs.webkit.org/show_bug.cgi?id=130063
5
6         Reviewed by Darin Adler.
7
8         * Modules/battery/BatteryController.h: Removed client() which is not used.
9
10 2014-03-11  Krzysztof Czech  <k.czech@samsung.com>
11
12         [ATK] Expose aria-posinset and aria-setsize through object attributes
13         https://bugs.webkit.org/show_bug.cgi?id=130011
14
15         Reviewed by Chris Fleizach.
16
17         Based on http://www.w3.org/TR/2014/PR-wai-aria-implementation-20140206/
18         aria-poinset and aria-setsize can be exposed as object attributes.
19
20         Test: accessibility/aria-setsize-posinset.html
21
22         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
23         (webkitAccessibleGetAttributes):
24
25 2014-03-10  Frédéric Wang  <fred.wang@free.fr>
26
27         Improve renderer classes for MathML Token elements.
28         https://bugs.webkit.org/show_bug.cgi?id=124838
29
30         Reviewed by Chris Fleizach.
31
32         This patch continues the refactoring of token elements that has been
33         started in bug 44208. The <mo> element now derives from the
34         RenderMathMLToken class, which was already used for the <mi> element.
35         The behavior of anonymous <mo> elements created by the <mfenced> element
36         is now more consistent with the one of "standard" <mo> elements and the
37         spacing around them is now handled in RenderMathMLOperator. This is a
38         first step towards fixing bugs 115787 and 118843. The only visible
39         rendering change is how <mfenced> open/close attributes handle
40         whitespace and multiple characters and some tests are added for that.
41         Other features are already covered by other tests. Finally, this also
42         removes some code from AccessibilityRenderObject that was used to
43         workaround issues with <mo> elements.
44
45         * accessibility/AccessibilityRenderObject.cpp:
46         (WebCore::startOfContinuations):
47         (WebCore::AccessibilityRenderObject::textUnderElement):
48         (WebCore::AccessibilityRenderObject::isMathOperator):
49         (WebCore::AccessibilityRenderObject::isIgnoredElementWithinMathTree):
50         * mathml/MathMLTextElement.cpp:
51         (WebCore::MathMLTextElement::didAttachRenderers):
52         (WebCore::MathMLTextElement::childrenChanged):
53         * rendering/mathml/RenderMathMLBlock.cpp:
54         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
55         * rendering/mathml/RenderMathMLBlock.h:
56         * rendering/mathml/RenderMathMLFenced.cpp:
57         (WebCore::RenderMathMLFenced::RenderMathMLFenced):
58         (WebCore::RenderMathMLFenced::updateFromElement):
59         (WebCore::RenderMathMLFenced::createMathMLOperator):
60         (WebCore::RenderMathMLFenced::makeFences):
61         (WebCore::RenderMathMLFenced::addChild):
62         * rendering/mathml/RenderMathMLFenced.h:
63         * rendering/mathml/RenderMathMLOperator.cpp:
64         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
65         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
66         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
67         (WebCore::RenderMathMLOperator::SetOperatorProperties):
68         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
69         (WebCore::RenderMathMLOperator::rebuildTokenContent):
70         (WebCore::RenderMathMLOperator::updateTokenContent):
71         (WebCore::RenderMathMLOperator::updateStyle):
72         (WebCore::RenderMathMLOperator::firstLineBaseline):
73         (WebCore::RenderMathMLOperator::paint):
74         (WebCore::RenderMathMLOperator::paintChildren):
75         * rendering/mathml/RenderMathMLOperator.h:
76         * rendering/mathml/RenderMathMLToken.cpp:
77         (WebCore::RenderMathMLToken::createWrapperIfNeeded):
78
79 2014-03-10  James Craig  <jcraig@apple.com>
80
81         Web Inspector: AXI: Expose checked/disabled/expanded/pressed/readonly/selected
82         https://bugs.webkit.org/show_bug.cgi?id=129781
83
84         Reviewed by Joseph Pecoraro.
85
86         Enabling several more properties to be exposed in the Accessibility Node Inspector.
87
88         Updated Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
89
90         * accessibility/AccessibilityObject.cpp:
91         (WebCore::AccessibilityObject::supportsChecked):
92         * accessibility/AccessibilityObject.h:
93         * inspector/InspectorDOMAgent.cpp:
94         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
95         * inspector/protocol/DOM.json:
96
97 2014-03-10  Bem Jones-Bey  <bjonesbe@adobe.com>
98
99         [CSS Shapes] inset corner radii are not flipped for vertical writing modes
100         https://bugs.webkit.org/show_bug.cgi?id=129918
101
102         Reviewed by Dean Jackson.
103
104         When creating an inset shape, convert the radii to logical coordinates
105         as well as the box.
106
107         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-left.html
108                fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-different-writing-modes-right.html
109
110         * rendering/shapes/Shape.cpp:
111         (WebCore::Shape::createShape): Convert the radii to logical
112             coordinates.
113
114 2014-03-10  Joseph Pecoraro  <pecoraro@apple.com>
115
116         Web Inspector: Frontend loaded resources from cache are not hidden as expected
117         https://bugs.webkit.org/show_bug.cgi?id=130044
118
119         Reviewed by Timothy Hatcher.
120
121         * loader/FrameLoader.cpp:
122         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
123         Use the new request that was passed in. Assume it is filled in appropriately.
124
125         * loader/cache/CachedResourceLoader.h:
126         * loader/cache/CachedResourceLoader.cpp:
127         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
128         Carry over the hidden from inspector state if the passed in request had it,
129         and create the request that loadedResourceFromMemoryCache will use.
130
131         * xml/XMLHttpRequest.cpp:
132         (WebCore::XMLHttpRequest::createRequest):
133         Add missing ifdefs for INSPECTOR only function.
134
135 2014-03-10  Jinwoo Song  <jinwoo7.song@samsung.com>
136
137         Remove 'visibilitychange' attribute event listener from document
138         https://bugs.webkit.org/show_bug.cgi?id=129794
139
140         Reviewed by Simon Fraser.
141
142         Remove the unused attribute event listener which is not defined in Page Visibility API spec.
143         http://www.w3.org/TR/page-visibility/#sec-document-interface
144
145         * dom/Document.h:
146
147 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
148
149         [iOS][WebKit 2] Wire the unobscured rect in the WebProcess
150         https://bugs.webkit.org/show_bug.cgi?id=130058
151
152         Reviewed by Simon Fraser.
153
154         * WebCore.exp.in:
155         * platform/ScrollView.h:
156         * platform/ios/ScrollViewIOS.mm:
157         (WebCore::ScrollView::unobscuredContentRect):
158         (WebCore::ScrollView::setUnobscuredContentRect):
159
160 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
161
162         makeSelectorPseudoTypeMap.py should not be copied in the WebCore bundle
163
164         * WebCore.xcodeproj/project.pbxproj:
165
166 2014-03-10  Mario Sanchez Prada  <mario.prada@samsung.com>
167
168         [GTK] Add support for Geoclue2
169         https://bugs.webkit.org/show_bug.cgi?id=120185
170
171         Reviewed by Carlos Garcia Campos.
172
173         Patch by Anton Obzhirov <a.obzhirov@samsung.com> and Mario Sanchez Prada <mario.prada@samsung.com>
174
175         Implement a new geolocation provider based on Geoclue2, which will only
176         be used if a good enough version of Geoclue2 is found  at configure time.
177
178         * GNUmakefile.am: Generate C-API for accessing the D-Bus API
179         provided by Geoclue2, and place it in DerivedSources.
180         * GNUmakefile.list.am: Add GeolocationProviderGeoclue2.cpp, and
181         include the generated proxy files when using Geoclue2.
182         * PlatformGTK.cmake: Likewise, for CMake based builds.
183         * platform/geoclue/GeolocationProviderGeoclue.h: Modified to
184         accomodate the needs both for Geoclue and Geoclue2 providers.
185         * platform/geoclue/GeolocationProviderGeoclue1.cpp: Renamed from Source/WebCore/platform/geoclue/GeolocationProviderGeoclue.cpp.
186         (GeolocationProviderGeoclue::getPositionCallback):
187         (GeolocationProviderGeoclue::positionChangedCallback):
188         (GeolocationProviderGeoclue::createGeocluePositionCallback):
189         (GeolocationProviderGeoclue::geoclueClientSetRequirementsCallback):
190         (GeolocationProviderGeoclue::createGeoclueClientCallback):
191         (GeolocationProviderGeoclue::GeolocationProviderGeoclue):
192         (GeolocationProviderGeoclue::~GeolocationProviderGeoclue):
193         (GeolocationProviderGeoclue::startUpdating):
194         (GeolocationProviderGeoclue::stopUpdating):
195         (GeolocationProviderGeoclue::setEnableHighAccuracy):
196         (GeolocationProviderGeoclue::initializeGeoclueClient):
197         (GeolocationProviderGeoclue::initializeGeocluePosition):
198         (GeolocationProviderGeoclue::updateClientRequirements):
199         (GeolocationProviderGeoclue::positionChanged):
200         (GeolocationProviderGeoclue::errorOccurred):
201         * platform/geoclue/GeolocationProviderGeoclue2.cpp: Added.
202         (GeolocationProviderGeoclue::GeolocationProviderGeoclue):
203         (GeolocationProviderGeoclue::~GeolocationProviderGeoclue):
204         (GeolocationProviderGeoclue::startUpdating):
205         (GeolocationProviderGeoclue::stopUpdating):
206         (GeolocationProviderGeoclue::setEnableHighAccuracy):
207         (GeolocationProviderGeoclue::createGeoclueManagerProxyCallback):
208         (GeolocationProviderGeoclue::getGeoclueClientCallback):
209         (GeolocationProviderGeoclue::createGeoclueClientProxyCallback):
210         (GeolocationProviderGeoclue::startClientCallback):
211         (GeolocationProviderGeoclue::locationUpdatedCallback):
212         (GeolocationProviderGeoclue::createLocationProxyCallback):
213         (GeolocationProviderGeoclue::startGeoclueClient):
214         (GeolocationProviderGeoclue::updateLocation):
215         (GeolocationProviderGeoclue::errorOccurred):
216         (GeolocationProviderGeoclue::updateClientRequirements):
217
218 2014-03-10  Brent Fulgham  <bfulgham@apple.com>
219
220         Unreviewed Windows Build Fix.
221
222         * WebCore.vcxproj/WebCore.vcxproj: Don't build cURL files for Apple Windows port.
223         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
224         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
225         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerPaintContents): Correct
226         method signature to match base class.
227         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::loadInternal): Use proper character encoding.
228
229 2014-03-10  Simon Fraser  <simon.fraser@apple.com>
230
231         Fix three leaks
232         https://bugs.webkit.org/show_bug.cgi?id=130048
233
234         Reviewed by Anders Carlsson.
235
236         The NSDictionary was leaked.
237
238         * page/ios/UserAgentIOS.mm:
239         (WebCore::osMarketingVersion):
240
241 2014-03-10  Beth Dakin  <bdakin@apple.com>
242
243         Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
244         https://bugs.webkit.org/show_bug.cgi?id=129919
245
246         Reviewed by Benjamin Poulain.
247
248         WK2 needs to be able to ask for the pageExtendedBackgroundColor, so this patch 
249         adds a function to Page that will return it
250
251         * WebCore.exp.in:
252         * page/Page.cpp:
253         (WebCore::Page::pageExtendedBackgroundColor):
254         * page/Page.h:
255         * rendering/RenderLayerCompositor.h:
256         (WebCore::RenderLayerCompositor::rootExtendedBackgroundColor):
257
258 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
259
260         Generalize unobscured rect to all ports
261         https://bugs.webkit.org/show_bug.cgi?id=130036
262
263         Reviewed by Simon Fraser.
264
265         iOS differentiates visible content and unobscured content. This patch moves the concept to all
266         ports to remove the #ifdefs from the call sites.
267
268         On everything but iOS, unobscuredRect and visibleRect are the same.
269
270         * WebCore.exp.in:
271         * page/DOMWindow.cpp:
272         (WebCore::DOMWindow::innerHeight):
273         (WebCore::DOMWindow::innerWidth):
274         * page/SpatialNavigation.cpp:
275         (WebCore::canScrollInDirection):
276         * platform/ScrollView.cpp:
277         (WebCore::ScrollView::updateScrollbars):
278         (WebCore::ScrollView::paint):
279         * platform/ScrollView.h:
280         (WebCore::ScrollView::unobscuredContentRectIncludingScrollbars):
281         (WebCore::ScrollView::unobscuredContentRect):
282         * rendering/RenderView.cpp:
283         (WebCore::RenderView::viewportSize):
284
285 2014-03-10  Benjamin Poulain  <benjamin@webkit.org>
286
287         Start splitting CSS Selectors's pseudo types
288         https://bugs.webkit.org/show_bug.cgi?id=130003
289
290         Reviewed by Andreas Kling.
291
292         CSS Selectors pseudo types come in 3 flavors: page, pseudo class, pseudo elements.
293
294         The three types are mixed together in a single enum list named PseudoType. Only some combinations
295         of match type + pseudo type are valid, but this is implicitly defined from the code.
296
297         This patch is the beginning of a refactoring to add more clear boundaries between
298         valid and invalid combinations.
299
300         First, the handling of page pseudo types is completely split from the other values.
301         The parser use a different method for handling the value CSSParserSelector::parsePagePseudoSelector().
302
303         PagePseudo types no longer store their string in the CSSSelector either to reduce the redundancy
304         with m_pseudoType.
305         When we need to generate the string for those CSSSelector, we recreate the string as needed in
306         CSSSelector::selectorText().
307
308         The remaining two types are not yet split in this patch but this introduce the preliminary clean up
309         toward that goal.
310         The list of parsed pseudo types is now generated at compile time from the source in SelectorPseudoTypeMap.in.
311
312         * DerivedSources.make:
313         The mapping of strings to pseudo types is generated from SelectorPseudoTypeMap.in
314         by the new script makeSelectorPseudoTypeMap.py.
315
316         * WebCore.xcodeproj/project.pbxproj:
317         * css/CSSGrammar.y.in:
318         Split the parsing of Pseudo Types. Pseudo page get its own method. The others will need some work.
319
320         * css/CSSParserValues.cpp:
321         (WebCore::CSSParserSelector::parsePagePseudoSelector):
322         (WebCore::CSSParserSelector::setPseudoTypeValue):
323         * css/CSSParserValues.h:
324         * css/CSSSelector.cpp:
325         (WebCore::CSSSelector::specificityForPage):
326         This is an example of invalid combination that is hidden by the current code.
327         First, Left and Right could never appear in a pseudo class match.
328         (WebCore::CSSSelector::pseudoId):
329         (WebCore::CSSSelector::parsePseudoType):
330         (WebCore::appendPseudoTypeTailIfNecessary):
331         (WebCore::CSSSelector::selectorText):
332         * css/CSSSelector.h:
333         (WebCore::CSSSelector::pseudoType):
334         (WebCore::CSSSelector::matchesPseudoElement):
335         (WebCore::CSSSelector::setValue):
336         (WebCore::CSSSelector::CSSSelector):
337         * css/PageRuleCollector.cpp:
338         (WebCore::checkPageSelectorComponents):
339         * css/SelectorChecker.cpp:
340         (WebCore::SelectorChecker::checkOne):
341         * css/SelectorPseudoTypeMap.h: Added.
342         * css/SelectorPseudoTypeMap.in: Added.
343         * css/makeSelectorPseudoTypeMap.py: Added.
344         (enumerablePseudoType):
345         (expand_ifdef_condition):
346         * cssjit/SelectorCompiler.cpp:
347         (WebCore::SelectorCompiler::addPseudoType):
348
349 2014-03-10  Enrica Casucci  <enrica@apple.com>
350
351         iOS build fix after http://trac.webkit.org/changeset/165385
352
353         Unreviewed.
354
355         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
356         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
357
358 2014-03-10  Daniel Bates  <dabates@apple.com>
359
360         REGRESSION (r159218): FrameView::layout() should destroy TemporaryChange<LayoutPhase>
361         before destroying Ref<FrameView>
362         https://bugs.webkit.org/show_bug.cgi?id=130034
363         <rdar://problem/15664288>
364
365         Reviewed by Alexey Proskuryakov.
366
367         We should always destroy TemporaryChange<LayoutPhase> before destroying Ref<FrameView>
368         in FrameView::layout() so as to ensure that the FrameView exists when we restore the
369         original layout phase value.
370
371         The existing test fast/frames/crash-remove-iframe-during-object-beforeload.html covers
372         this change. Although you must run the test with Guard Malloc enabled (i.e. run-webkit-tests -r).
373
374         * page/FrameView.cpp:
375         (WebCore::FrameView::layout): Move construction of variable protect before the construction of
376         variable layoutPhaseRestorer. Additionally, add a period to the end of the comment associated
377         with variable protect.
378
379 2014-03-10  Zsolt Borbely  <borbezs@inf.u-szeged.hu>
380
381         ASSERTION FAILED: span >= 1
382         https://bugs.webkit.org/show_bug.cgi?id=129148
383
384         Reviewed by Andreas Kling.
385
386         Set the value of span to 1 if the given number is too big or zero.
387
388         Test: fast/table/incorrect-colgroup-span-values.html
389
390         * html/HTMLTableColElement.cpp:
391         (WebCore::HTMLTableColElement::parseAttribute):
392
393 2014-03-10  Brent Fulgham  <bfulgham@apple.com>
394
395         [Win] Pass environment to Pre-Build, Pre-Link, and Post-Build Stages.
396         https://bugs.webkit.org/show_bug.cgi?id=130023.
397
398         Reviewed by Dean Jackson.
399
400         * WebCore.vcxproj/WebCore.proj: Avoid trailing slashes in path values to
401         prevent escaping during later string substitution.
402
403 2014-03-10  Radu Stavila  <stavila@adobe.com>
404
405         [CSS Regions] Hit-testing is not working properly inside scrollable regions
406         https://bugs.webkit.org/show_bug.cgi?id=130015
407
408         Reviewed by Antti Koivisto.
409
410         When hit-testing inside the flow thread's layer, the scrolled offset
411         of the current region must be taken into consideration.
412
413         Test: fast/regions/scrollable-regions-hit-testing-inside.html
414
415         * rendering/RenderLayer.cpp:
416         (WebCore::RenderLayer::calculateClipRects):
417
418 >>>>>>> .r165392
419 2014-03-10  Hans Muller  <hmuller@adobe.com>
420
421         [CSS Shapes] SVG Image valued shape fails if root element's size is relative
422         https://bugs.webkit.org/show_bug.cgi?id=128983
423
424         Reviewed by Simon Fraser.
425
426         When creating a shape based on an Image, compute its dimensions using
427         RenderBoxModelObject::calculateImageIntrinsicDimensions(), then set the
428         ImageResource's containerSize, and then use imageForRenderer() to get the
429         image to be drawn. The first step resolves SVG Image relative sizes, the
430         second step creates and caches an SVGImageForContainer with the correct
431         containerSize, and the last step retrieves the SVGImageForContainer.
432
433         Test: fast/shapes/shape-outside-floats/shape-outside-relative-size-svg.html
434
435         * rendering/RenderBoxModelObject.h: Publicized calculateImageIntrinsicDimensions() and its enum.
436         * rendering/shapes/Shape.cpp:
437         (WebCore::Shape::createRasterShape):
438         * rendering/shapes/Shape.h:
439         * rendering/shapes/ShapeInfo.cpp:
440         (WebCore::getShapeImageAndRect):
441         (WebCore::ShapeInfo<RenderType>::computedShape):
442
443 2014-03-10  Darin Adler  <darin@apple.com>
444
445         TextIterator: Use StringView and references rather than pointers
446         https://bugs.webkit.org/show_bug.cgi?id=129975
447
448         Reviewed by Anders Carlsson.
449
450         TextIterator refinements:
451         - Use StringView instead of deprecatedCharacters to point to characters within strings.
452         - Added TextIteratorCopyableText, a safe way to copy the current text of a TextIterator,
453           for use by WordAwareIterator.
454         - Removed m_shouldStop; iterators stop by setting m_positionNode to null, and there is no
455           need for a separate boolean to do the same thing.
456         - Got rid of all the boolean data members set based on the text iterator behavior; instead
457           store the behavior in a data member and check it directly.
458         - Changed most functions to use references rather than pointers.
459         - Small micro-optimizations, such as using fastGetAttribute rather than getAttribute.
460         - Switched to nullptr instead of 0 where appropriate.
461         - Removed unused functions.
462         - Cut down on use of abbreviations instead of words.
463         - Renamed data members and argument names for clarity.
464         - Split up assertions that needlessly asserted more than one thing in a single expression.
465         - Treat CDATASection just like other Text, since its text will be visible.
466
467         * editing/Editor.cpp:
468         (WebCore::Editor::advanceToNextMisspelling): Pass reference rather than pointer.
469         (WebCore::Editor::rangeOfString): Ditto.
470         (WebCore::Editor::countMatchesForText): Ditto.
471         * editing/TextCheckingHelper.cpp:
472         (WebCore::TextCheckingHelper::findFirstMisspelling): Ditto.
473
474         * editing/TextIterator.cpp:
475         (WebCore::depthCrossingShadowBoundaries): Take a reference rather than a pointer.
476         (WebCore::nextInPreOrderCrossingShadowBoundaries): Ditto.
477         (WebCore::fullyClipsContents): Ditto.
478         (WebCore::ignoresContainerClip): Ditto.
479         (WebCore::pushFullyClippedState): Ditto.
480         (WebCore::setUpFullyClippedStack): Ditto.
481         (WebCore::isRendererReplacedElement): Use references rather than pointers in the
482         implementation. Also use fastGetAttribute instead of getAttribute.
483         (WebCore::TextIteratorCopyableText::reset): Added.
484         (WebCore::TextIteratorCopyableText::set): Added.
485         (WebCore::TextIteratorCopyableText::appendToStringBuilder): Added.
486         (WebCore::TextIterator::TextIterator): Use more initialization rather than assignment.
487         Got rid of some local variables.
488         (WebCore::TextIterator::advance): Removed the m_shouldStop boolean, uneeded.
489         Many other improvements. Use isTextNode instead of nodeType.
490         (WebCore::hasVisibleTextNode): Changed this into a file-private helper function
491         instead of a member function.
492         (WebCore::TextIterator::handleTextNode): Used references and cut down on type casts.
493         Gave local variables clearer names.
494         (WebCore::TextIterator::handleTextBox): More of the same.
495         (WebCore::TextIterator::handleTextNodeFirstLetter): Ditto.
496         (WebCore::TextIterator::handleReplacedElement): Ditto.
497         (WebCore::shouldEmitTabBeforeNode): Ditto.
498         (WebCore::hasHeaderTag): Added.
499         (WebCore::shouldEmitNewlinesBeforeAndAfterNode): More of the same.
500         (WebCore::shouldEmitNewlineAfterNode): Ditto.
501         (WebCore::shouldEmitNewlineBeforeNode): Ditto.
502         (WebCore::shouldEmitExtraNewlineForNode): Ditto.
503         (WebCore::collapsedSpaceLength): Use StringImpl directly instead of using the
504         deprecatedCharacters function.
505         (WebCore::TextIterator::shouldRepresentNodeOffsetZero): More like above.
506         (WebCore::TextIterator::shouldEmitSpaceBeforeAndAfterNode): Ditto.
507         (WebCore::TextIterator::representNodeOffsetZero): Ditto.
508         (WebCore::TextIterator::handleNonTextNode): Ditto.
509         (WebCore::TextIterator::exitNode): Ditto.
510         (WebCore::TextIterator::emitCharacter): Changed to use the new copyable text class
511         instead of managing the single character buffer directly here.
512         (WebCore::TextIterator::emitText): Changed to take a Text& and use the copyable text
513         class. Added a FIXME about a mistake I noticed.
514         (WebCore::TextIterator::range): Streamlined and simplified a bit. Updated data
515         member names to be a bit clearer. This function never returned null before, but there
516         was a code path that looked like it would; I removed that.
517         (WebCore::TextIterator::node): Removed unneeded null checks; the range function will
518         never return a range of null or one with null for a start container.
519         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): More
520         like above.
521         (WebCore::SimplifiedBackwardsTextIterator::advance): Reorganized a bit and removed
522         m_shouldStop.
523         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): More of the same.
524         (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): Ditto.
525         (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement): Ditto.
526         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Ditto.
527         (WebCore::SimplifiedBackwardsTextIterator::exitNode): Ditto.
528         (WebCore::SimplifiedBackwardsTextIterator::emitCharacter): Ditto.
529         (WebCore::SimplifiedBackwardsTextIterator::advanceRespectingRange): Ditto.
530         (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
531         (WebCore::CharacterIterator::CharacterIterator): Ditto.
532         (WebCore::CharacterIterator::range): Ditto. No need for ASSERT_NO_EXCEPTION.
533         (WebCore::CharacterIterator::advance): Ditto.
534         (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator): Ditto.
535         (WebCore::BackwardsCharacterIterator::range): Ditto.
536         (WebCore::BackwardsCharacterIterator::advance): Ditto.
537         (WebCore::WordAwareIterator::WordAwareIterator): Ditto.
538         (WebCore::WordAwareIterator::advance): Use copyableText for m_previousText, fixing
539         the FIXME that I wrote in here before.
540         (WebCore::WordAwareIterator::text): Ditto.
541         (WebCore::containsKanaLetters): Changed to quickly return false when the pattern
542         is all Latin-1 rather than expanding to 16-bit just to check.
543         (WebCore::SearchBuffer::SearchBuffer): Iterate the target using the string operator[]
544         instead of using deprecatedCharacters.
545         (WebCore::SearchBuffer::append): Do the folding of quote marks and hyphens one character
546         at a time as we move characters into the buffer instead of in a separate loop.
547         (WebCore::TextIterator::rangeLength): Updated for changes eslwehere.
548         (WebCore::TextIterator::subrange): Ditto.
549         (WebCore::isInsideReplacedElement): Ditto. Also streamlined and removed unneeded null check.
550         (WebCore::TextIterator::rangeFromLocationAndLength): Updated for changes elsewhere and
551         removed unneeded ASSERT_NO_EXCEPTION.
552         (WebCore::plainText): Ditto.
553         (WebCore::collapsedToBoundary): Ditto.
554         (WebCore::findPlainText): Ditto.
555
556         * editing/TextIterator.h: Changed many functions to take references instead of pointers.
557         Added TextIteratorCopyableText, to represent the current text in a TextIterator in a form
558         that can be safely copied and used after further iteration. Reorganized member functions so
559         they are in the same order in all the classes. Changed TextIterator to use
560         TextIteratorCopyableText. Removed many unused functions, including:
561         - TextIterator::length
562         - TextIterator::deprecatedTextIteratorCharacters
563         - TextIterator::characterAt
564         - SimplifiedBackwardsTextIterator::length
565         - CharacterIterator::length
566         - CharacterIterator::string
567         - WordAwareIterator::length
568         - WordAwareIterator::range
569
570         * editing/VisibleSelection.cpp:
571         (WebCore::VisibleSelection::appendTrailingWhitespace): Pass reference rather than pointer.
572         Use text().length() instead of length(). Check atEnd() before using CharacterIterator, since
573         iterator member functions don't work when at the end.
574         * editing/VisibleUnits.cpp:
575         (WebCore::previousBoundary): Ditto.
576         (WebCore::nextBoundary): Ditto.
577         * editing/htmlediting.cpp:
578         (WebCore::visiblePositionForIndexUsingCharacterIterator): Ditto.
579         * page/ios/FrameIOS.mm:
580         (WebCore::Frame::indexCountOfWordPrecedingSelection): Ditto.
581         (WebCore::Frame::wordsInCurrentParagraph): Ditto.
582
583 2014-03-10  Martin Robinson  <mrobinson@igalia.com>
584
585         [GTK] [CMake] Clean up library linking
586         https://bugs.webkit.org/show_bug.cgi?id=129782
587
588         Reviewed by Philippe Normand.
589
590         * PlatformGTK.cmake: Some files are duplicated on the source list of two convenience
591         libraries. Ensure that they are all compiled into WebCore instead of WebCorePlatformGTK.
592         Some simply need to be moved to WebCore from WebCorePlatformGTK. Don't try to link
593         WebCorePlatformGTK against WebCore -- convenience libraries should be able to save
594         their symbol resolution for the final linking step.
595
596 2014-03-10  Radu Stavila  <stavila@adobe.com>
597
598         [CSS Regions] Scrolling regions with the mouse wheel only works properly if hovering over the region's padding
599         https://bugs.webkit.org/show_bug.cgi?id=129485
600
601         Reviewed by Andrei Bucur.
602
603         When searching for the region under the mouse pointer (to identify which region to scroll), 
604         the localToAbsolute method must be called on the region container, not the region itself.
605         Also, when calling the offsetFromContainer method on a named flow fragment,
606         it must only take into consideration the border and padding of the fragment container,
607         not its scrolled offset.
608
609         Test: fast/regions/wheel-scrollable-single-region.html
610
611         * rendering/RenderBox.cpp:
612         (WebCore::RenderBox::scroll):
613         * rendering/RenderFlowThread.cpp:
614         * rendering/RenderFlowThread.h:
615         * rendering/RenderNamedFlowFragment.cpp:
616         (WebCore::RenderNamedFlowFragment::offsetFromContainer):
617         * rendering/RenderNamedFlowFragment.h:
618         * rendering/RenderNamedFlowThread.cpp:
619         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
620         * rendering/RenderNamedFlowThread.h:
621
622 2014-03-10  Jinwoo Song  <jinwoo7.song@samsung.com>
623
624         Remove unused dispatchStorageEvent() from StorageAreaSync
625         https://bugs.webkit.org/show_bug.cgi?id=129999
626
627         Reviewed by Andreas Kling.
628
629         dispatchStorageEvent() is not used anywhere.
630
631         * storage/StorageAreaSync.h: Remove dispatchStorageEvent().
632
633 2014-03-09  Alexey Proskuryakov  <ap@apple.com>
634
635         iOS build fix.
636
637         * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::KeyboardEvent):
638
639 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
640
641         [Mac] Don't perform a round-trip through WebProcess before interpreting key events
642         https://bugs.webkit.org/show_bug.cgi?id=129812
643
644         Reviewed by Darin Adler.
645
646         No significant behavior changes expected, except for Esc key processing, which now
647         dispatches a keypress before executing its default action.
648
649         * platform/KeypressCommand.h: Added.
650         (WebCore::KeypressCommand::KeypressCommand):
651         * GNUmakefile.list.am:
652         * WebCore.vcxproj/WebCore.vcxproj:
653         * WebCore.vcxproj/WebCore.vcxproj.filters:
654         * WebCore.xcodeproj/project.pbxproj:
655         Moved KeypressCommand from dom/KeyboardEvent.h to its own header, as it needed
656         in platform/ directory now.
657
658         * dom/KeyboardEvent.cpp:
659         (WebCore::KeyboardEvent::KeyboardEvent):
660         * dom/KeyboardEvent.h:
661         (WebCore::KeyboardEvent::handledByInputMethod):
662         (WebCore::KeyboardEvent::keypressCommands):
663         * platform/PlatformKeyboardEvent.h:
664         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
665         (WebCore::PlatformKeyboardEvent::handledByInputMethod):
666         (WebCore::PlatformKeyboardEvent::commands):
667         PlatformKeyboardEvent now carries results of interpreting the event by AppKit. This
668         is logically not much different from carrying charcode, and is similar to what Gtk
669         does for input methods.
670         KeyboardEvent already had keypress commands, which were added to it after construction.
671         It's still possible for WebKit1, while with WebKit2, they are provided at construction
672         time. The event now also has a boolean for whether IM handled it already.
673
674 2014-03-09  Zalan Bujtas  <zalan@apple.com>
675
676         Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
677         https://bugs.webkit.org/show_bug.cgi?id=129985
678
679         Reviewed by Simon Fraser.
680
681         This is in preparation to stop passing integral positioned boxes to transform animations.
682
683         No change in behavior.
684
685         * WebCore.exp.in:
686         * platform/graphics/GraphicsLayer.h:
687         (WebCore::GraphicsLayer::addAnimation):
688         * platform/graphics/ca/GraphicsLayerCA.cpp:
689         (WebCore::getTransformFunctionValue):
690         (WebCore::GraphicsLayerCA::addAnimation):
691         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
692         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
693         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
694         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
695         * platform/graphics/ca/GraphicsLayerCA.h:
696         * rendering/RenderLayerBacking.cpp:
697         (WebCore::RenderLayerBacking::startTransition):
698
699 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
700
701         [iOS Wk2] Can't scroll after going back to page in page cache
702         https://bugs.webkit.org/show_bug.cgi?id=129989
703         <rdar://problem/16217588>
704
705         Reviewed by Dan Bernstein.
706
707         iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
708         function that is called instead of FrameView::forceLayout(). This was unimplemented
709         for the WK2 FrameLoaderClient, so no layout was forced, with the result
710         that the contentSize was never updated and scrolling was broken.
711         
712         Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
713         and having it return a bool to say whether the default forceLayout()
714         should be done. WK1 can then continue to have its custom behavior,
715         and Wk2 will simply do a forceLayout().
716         
717         Also remove FrameLaoderClient::forceLayout(), which was never called.
718
719         * loader/EmptyClients.h:
720         * loader/FrameLoader.cpp:
721         (WebCore::FrameLoader::commitProvisionalLoad):
722         * loader/FrameLoaderClient.h:
723
724 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
725
726         [iOS WK2] Get position:fixed working slighlty better
727         https://bugs.webkit.org/show_bug.cgi?id=129988
728
729         Reviewed by Dan Bernstein.
730
731         On iOS we want to use the viewport-constrained visible rect, not
732         just the visible rect.
733
734         * page/scrolling/AsyncScrollingCoordinator.cpp:
735         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
736
737 2014-03-07  Simon Fraser  <simon.fraser@apple.com>
738
739         [iOS] Don't call scrollOffsetForFixedPosition a second time if we have no header and footer layers
740         https://bugs.webkit.org/show_bug.cgi?id=129912
741
742         Reviewed by Tim Horton.
743
744         Avoid extra work if we have no header or footer layers.
745
746         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
747         (WebCore::ScrollingTreeScrollingNodeIOS::setScrollLayerPosition):
748
749 2014-03-08  Zalan Bujtas  <zalan@apple.com>
750
751         RenderElement::valueForLength() callers misuse bool parameter.
752         https://bugs.webkit.org/show_bug.cgi?id=129982
753
754         Reviewed by Andreas Kling.
755
756         Remove bogus RenderView* parameter.
757
758         * rendering/RenderBox.cpp:
759         (WebCore::RenderBox::computePercentageLogicalHeight):
760         * rendering/RenderElement.cpp:
761         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
762
763 2014-03-08  Jeremy Jones  <jeremyj@apple.com>
764
765         Allow media element to supply the video layer after fullscreen transition has already begun.
766         https://bugs.webkit.org/show_bug.cgi?id=129870
767
768         Reviewed by Eric Carlson.
769
770         Instead of borrowing the videolayer from the HTMLMediaElement, WebVideoFullscreen now supplies a layer to HTMLMediaElement to fill in as needed and at the appropriate time.
771
772         This allows fullscreen even if the video layer hasn't yet been created. And in the future it allows MediaPlayer to supply other layers such as closed captions. 
773
774         * WebCore.exp.in:
775         Remove exports related to borrowing and lend the video layer.
776         Add exports for supplying a layer to fullscreen and keepying the frame and gravity properties in sync.
777
778         * html/HTMLMediaElement.cpp:
779         Remove the concept of borrowing the platform layer.
780         Add the concept of a supplied m_videoFullscreenLayer, into which the media player can add layers.
781         When the m_videoFullscreenFrame is supplied, don't show the video layer inline any more.
782         Stash video layer properties in case the media player is not yet created.
783
784         (WebCore::HTMLMediaElement::HTMLMediaElement):
785         Initialize gravity to the default. Remove m_platformLayerBorrowed.
786
787         (WebCore::HTMLMediaElement::platformLayer):
788         When we have a m_videoFullscreenLayer, don't show video inline.
789
790         (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
791         Pass along the m_videoFullscreenLayer to the MediaPlayer if available or just stash it for later.
792
793         (WebCore::HTMLMediaElement::createMediaPlayer):
794         Pass along video fullscreen properties that we may have accumulated before the MediaPlayer was created.
795
796         (WebCore::HTMLMediaElement::setVideoFullscreenGravity):
797         Stash the gravity property, pass it along to the media player if possible.
798
799         * html/HTMLMediaElement.h:
800         Remove concept of borrowing the video layer. Add properties for a supplied videoFullscreenLayer.
801
802         * platform/graphics/MediaPlayer.cpp:
803         (WebCore::MediaPlayer::setVideoFullscreenLayer):
804         Forward on to internal implementation.
805
806         (WebCore::MediaPlayer::setVideoFullscreenFrame):
807         Forward on to internal implementation.
808
809         (WebCore::MediaPlayer::setVideoFullscreenGravity):
810         Forward on to internal implementation.
811
812         * platform/graphics/MediaPlayer.h:
813         Add methods for video fullscreen Layer, Frame and Gravity.
814
815         * platform/graphics/MediaPlayerPrivate.h:
816         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenLayer):
817         Add default implementation.
818
819         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenFrame):
820         Add default implementation.
821         
822         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenGravity):
823         Add default implementation.
824         
825         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
826         Add support for fullscreen video layer, frame and gravity.
827
828         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
829         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
830         Init m_videoFullscreenGravity. 
831
832         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
833         Apply cached properties once video layer is created and add to the fullscreen layer.
834
835         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
836         Cache the property value. Add video layer right away available.
837
838         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
839         Cache the property value. Apply to video layer right away if available.
840
841         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity):
842         Cache the property value. Apply to video layer right away if available.
843
844         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
845         Supply a fullscreen video layer to the WebVideoFullscreenModel and to the WebVideoFullscreenInterface.
846
847         (-[WebVideoFullscreenController enterFullscreen:]):
848         Supply a fullscreen video layer to the WebVideoFullscreenModel and to the WebVideoFullscreenInterface.
849
850         (-[WebVideoFullscreenController didExitFullscreen]):
851         Clean up the videoFullscreenLayer.
852
853         * platform/ios/WebVideoFullscreenInterface.h:
854         Remove methods related to lending the video layer.
855
856         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
857         Rename WebAVPlayer layer to WebAVVideoLayer to match the AVKit name.
858         Remove functions related to lending the video layer.
859         Supply a layer directly to enterFullscreen.
860
861         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
862         (+[WebAVVideoLayer videoLayer]):
863         Rename WebAVPlayer layer to WebAVVideoLayer to match the AVKit name.
864
865         (-[WebAVVideoLayer setPlayerController:]):
866         Store the AVPlayerController to prevent AVKit's default behavior.
867
868         (-[WebAVVideoLayer setBounds:]):
869         Forward this onto the WebVideoFullscreenModel
870
871         (-[WebAVVideoLayer setVideoLayerGravity:]):
872         Forward this onto the WebVideoFullscreenModel
873
874         (-[WebAVVideoLayer videoLayerGravity]):
875         Forward this onto the WebVideoFullscreenModel
876
877         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
878         Supply a video layer directly instead of relying on one being previously loaned.
879
880         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
881         Clean-up now assumes there is a video layer.
882
883         * platform/ios/WebVideoFullscreenModel.h:
884         Remove methods for borrowing and returning video layers.
885         Add methods for keeping video layer state in sync.
886
887         * platform/ios/WebVideoFullscreenModelMediaElement.h:
888         Remove methods for borrowing and returning video layers.
889         Add method for supplying a video fullscreen layer.
890         Add methods for keeping video layer state in sync.
891
892         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
893         (WebVideoFullscreenModelMediaElement::setMediaElement):
894         Handle audio element case by setting hasVideo to false.
895
896         (WebVideoFullscreenModelMediaElement::setVideoFullscreenLayer):
897         Pass along the video fullscreen layer to the media element.
898
899         (WebVideoFullscreenModelMediaElement::setVideoLayerFrame):
900         Pass along the video layer frame to the media element.
901
902         (WebVideoFullscreenModelMediaElement::setVideoLayerGravity):
903         Pass along the video layer gravity to the media element.
904
905 2014-03-08  Jae Hyun Park  <jaepark@webkit.org>
906
907         Clean up PlatformLayer.h
908         https://bugs.webkit.org/show_bug.cgi?id=129967
909
910         Reviewed by Martin Robinson.
911
912         * platform/graphics/PlatformLayer.h:
913         Remove duplicated declaration of PlatformLayer when using TextureMapper.
914
915 2014-03-08  Zalan Bujtas  <zalan@apple.com>
916
917         Subpixel rendering: Simple compositing container layer (isSimpleContainerCompositingLayer) paints to wrong position.
918         https://bugs.webkit.org/show_bug.cgi?id=129861
919
920         Reviewed by Simon Fraser.
921
922         This patch ensures that both the simple and non-simple cases paint to the same position.
923         Simple compositing container layer codepath needs to take the fractional device pixel offset
924         into account when painting. Without the fractional value, the final paint rounding could push the
925         paint offset to a different position.
926         retina example:
927         compositing top-left: 0px 0px.
928         fractional offset: 0.3px 0.3px
929         painting coords without offseting: 0px 0px
930                            with offseting: 0.5px 0.5px
931
932         Tests: compositing/hidpi-simple-container-layer-on-device-pixel.html
933
934         * WebCore.exp.in:
935         * platform/graphics/GraphicsLayer.h:
936         (WebCore::GraphicsLayer::contentsRect):
937         (WebCore::GraphicsLayer::setContentsRect):
938         (WebCore::GraphicsLayer::contentsClippingRect):
939         (WebCore::GraphicsLayer::setContentsClippingRect):
940         * platform/graphics/ca/GraphicsLayerCA.cpp:
941         (WebCore::GraphicsLayerCA::setContentsRect):
942         (WebCore::GraphicsLayerCA::setContentsClippingRect):
943         (WebCore::GraphicsLayerCA::updateContentsRects):
944         * platform/graphics/ca/GraphicsLayerCA.h:
945         * rendering/RenderLayerBacking.cpp:
946         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
947         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
948         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
949         (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
950         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
951         * rendering/RenderLayerBacking.h:
952
953 2014-03-08  Oliver Hunt  <oliver@apple.com>
954
955         SerializedScriptValue may move Identifiers between worlds
956         https://bugs.webkit.org/show_bug.cgi?id=129979
957
958         Reviewed by Andreas Kling.
959
960         Test: fast/workers/worker-copy-shared-blob-url.html
961
962         Don't use Strings to store blob URLs as String's may be Identifiers
963         and they can only exist in one world/thread at a time.
964
965         * Modules/indexeddb/IDBObjectStore.cpp:
966         (WebCore::IDBObjectStore::put):
967         * bindings/js/SerializedScriptValue.cpp:
968         (WebCore::CloneDeserializer::deserializeString):
969         (WebCore::SerializedScriptValue::addBlobURL):
970         (WebCore::SerializedScriptValue::SerializedScriptValue):
971         * bindings/js/SerializedScriptValue.h:
972
973 2014-03-07  Timothy Hatcher  <timothy@apple.com>
974
975         Load source maps and their resources asynchronously.
976
977         https://bugs.webkit.org/show_bug.cgi?id=112071
978
979         Reviewed by Joseph Pecoraro.
980
981         * inspector/InspectorPageAgent.cpp:
982         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
983         Honor the hiddenFromInspector flag.
984
985         * inspector/InspectorResourceAgent.cpp:
986         (WebCore::InspectorResourceAgent::willSendRequest):
987         (WebCore::InspectorResourceAgent::markResourceAsCached):
988         (WebCore::InspectorResourceAgent::didReceiveResponse):
989         (WebCore::InspectorResourceAgent::didReceiveData):
990         (WebCore::InspectorResourceAgent::didFinishLoading):
991         (WebCore::InspectorResourceAgent::didFailLoading):
992         (WebCore::InspectorResourceAgent::replayXHR):
993         (WebCore::InspectorResourceAgent::loadResource):
994         * inspector/InspectorResourceAgent.h:
995         Honor the hiddenFromInspector flag by keeping track of
996         hidden identifiers in a HashSet.
997
998         * inspector/protocol/Network.json:
999         (Network.loadResource): Added.
1000
1001         * platform/network/ResourceRequestBase.h:
1002         (WebCore::ResourceRequestBase::hiddenFromInspector): Added.
1003         (WebCore::ResourceRequestBase::setHiddenFromInspector): Added.
1004         (WebCore::ResourceRequestBase::ResourceRequestBase):
1005         Add a flag to hide the request from the Inspector.
1006
1007         * xml/XMLHttpRequest.cpp:
1008         (WebCore::XMLHttpRequest::XMLHttpRequest):
1009         (WebCore::XMLHttpRequest::sendForInspector): Added.
1010         (WebCore::XMLHttpRequest::sendForInspectorXHRReplay): Renamed.
1011         (WebCore::XMLHttpRequest::createRequest):
1012         * xml/XMLHttpRequest.h:
1013         Make Inspector loads allow cross-origins and hide their request
1014         from the Inspector itself.
1015
1016 2014-03-07  Tim Horton  <timothy_horton@apple.com>
1017
1018         [WebKit2][iOS] PDF
1019         https://bugs.webkit.org/show_bug.cgi?id=129600
1020         <rdar://problem/15260216>
1021
1022         Reviewed by Anders Carlsson.
1023
1024         * WebCore.exp.in:
1025         * platform/MIMETypeRegistry.cpp:
1026         (WebCore::initializeSupportedImageMIMETypes):
1027         (WebCore::initializePDFMIMETypes):
1028         (WebCore::initializePostScriptMIMETypes):
1029         (WebCore::initializeMIMETypeRegistry):
1030         (WebCore::MIMETypeRegistry::getPDFMIMETypes):
1031         * platform/MIMETypeRegistry.h:
1032         Split PDF and PostScript MIME types, so WebKit2 can retrieve just the PDF ones
1033         without PostScript included.
1034
1035 2014-03-07  Myles C. Maxfield  <mmaxfield@apple.com>
1036
1037         Comment in RenderStyle is no longer accurate
1038         https://bugs.webkit.org/show_bug.cgi?id=129956
1039
1040         Reviewed by Simon Fraser.
1041
1042         RenderStyle::createStyleInheritingFromPseudoStyle was moved from RenderImage. Before it
1043         was moved, there was an image-specific comment in the function. However, that comment
1044         is both irrelevant to RenderStyle, and incorrect as the function is necessary for
1045         RenderQuotes as well.
1046
1047         No new tests are necessary because there is no behavior change.
1048
1049         * rendering/style/RenderStyle.cpp:
1050         (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
1051
1052 2014-03-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1053
1054         [WebRTC] Throw SYNTAX_ERROR when maxRetransmits and maxRetransmitTime are both set in RTCDataChannelInit
1055         https://bugs.webkit.org/show_bug.cgi?id=129894
1056
1057         Reviewed by Eric Carlson.
1058
1059         Existing test was updated.
1060
1061         * Modules/mediastream/RTCDataChannel.cpp:
1062         (WebCore::RTCDataChannel::create):
1063
1064 2014-03-07  Benjamin Poulain  <bpoulain@apple.com>
1065
1066         Fix the regression introduced by r165288
1067         https://bugs.webkit.org/show_bug.cgi?id=129934
1068
1069         Reviewed by Ryosuke Niwa.
1070
1071         * page/DOMWindow.cpp:
1072         (WebCore::DOMWindow::scrollX):
1073         (WebCore::DOMWindow::scrollY):
1074         We need to return the new value after layout, not the value from the dirty tree.
1075
1076 2014-03-07  Benjamin Poulain  <benjamin@webkit.org>
1077
1078         Traversal failure in a direct adjacent chain with tail backtracking lacks the path to clear the tail
1079         https://bugs.webkit.org/show_bug.cgi?id=129863
1080
1081         Reviewed by Gavin Barraclough.
1082
1083         Direct adjacent backtracking use the stack to push the backtracking entry point and recover from there.
1084         In case of traversal failure, their is no point in recovering from the indirect adjancent entry point and
1085         we should clear entry point from the stack (which is the purpose of the tail).
1086
1087         The adjancent tail was missing the part for clearing the stack in one case.
1088
1089         The case with adjancent backtracking inside descendant backtracing was doing everything right. This patch
1090         generalize this code and the correct tail is fully generated by generateAdjacentBacktrackingTail().
1091
1092         JumpToClearAdjacentDescendantTail becomes JumpToClearAdjacentTail, and this new backtracking state is added
1093         to the missing traversal action.
1094
1095         Test: fast/selectors/long-adjacent-backtracking.html
1096
1097         * cssjit/SelectorCompiler.cpp:
1098         (WebCore::SelectorCompiler::solveBacktrackingAction):
1099         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1100         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
1101         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
1102         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
1103
1104 2014-03-07  Andreas Kling  <akling@apple.com>
1105
1106         [Mac] Notify system malloc of fake memory pressure.
1107         <https://webkit.org/b/129908>
1108
1109         After fixing the leak in r165252, I was surprised to find that it didn't
1110         show up on memory test bots. It turns out that while the memory is now
1111         getting freed, the system malloc implementation doesn't actually release
1112         pages back to the OS until there is memory pressure.
1113
1114         Since we are just faking the memory pressure on bots, we have to let
1115         system malloc in on the fun, so we can get representative numbers.
1116         With this change, we should finally see the effect of not leaking the
1117         URLRequest object tree.
1118
1119         Reviewed by Anders Carlsson.
1120
1121         * platform/mac/MemoryPressureHandlerMac.mm:
1122         (WebCore::MemoryPressureHandler::install):
1123
1124             Tell system malloc that we are under fake memory pressure.
1125
1126 2014-03-07  Benjamin Poulain  <bpoulain@apple.com>
1127
1128         [iOS] WebKit1 scroll position is incorrect
1129         https://bugs.webkit.org/show_bug.cgi?id=129905
1130
1131         Reviewed by Simon Fraser.
1132
1133         * page/DOMWindow.cpp:
1134         (WebCore::DOMWindow::scrollX):
1135         (WebCore::DOMWindow::scrollY):
1136         A new optimization was avoiding layout if the position is zero. This was using the scrollX/Y instead
1137         of actualScrollX/Y which caused us to always bail out instead of returning the value to JavaScript.
1138
1139         * platform/ScrollView.h:
1140         (WebCore::ScrollView::actualScrollX):
1141         (WebCore::ScrollView::actualScrollY):
1142         (WebCore::ScrollView::actualScrollPosition):
1143         This was accidentally changed to the iOS compat document visible rect at some point.
1144
1145 2014-03-07  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1146
1147         Remove unused StdDeviation from Drop shadow effect
1148         https://bugs.webkit.org/show_bug.cgi?id=129891
1149
1150         Reviewed by Dirk Schulze.
1151
1152         No new tests, no change on behavior.
1153
1154         * platform/graphics/filters/FEDropShadow.h:
1155
1156 2014-03-07  Brent Fulgham  <bfulgham@apple.com>
1157
1158         Correct out-of-band track selection logic.
1159         https://bugs.webkit.org/show_bug.cgi?id=129900
1160
1161         Reviewed by Jer Noble.
1162
1163         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1164         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): Correct test to
1165         use inequality.
1166
1167 2014-03-07  Bear Travis  <betravis@adobe.com>
1168
1169         [CSS Shapes] Correctly serialize ellipse positions
1170         https://bugs.webkit.org/show_bug.cgi?id=129700
1171
1172         Reviewed by Dirk Schulze.
1173
1174         Updating ellipse serialization to be in line with
1175         the CSS Shapes spec. Positions should serialize as
1176         2 or 4-value positions, converting keywords to
1177         percentages where possible. This uses the same method
1178         as circle position serialization (bug 129404).
1179
1180         Updated existing parsing tests.
1181
1182         * css/CSSBasicShapes.cpp:
1183         (WebCore::CSSBasicShapeEllipse::cssText): Use the
1184         normalization / serialization helpers for shape position.
1185
1186 2014-03-07  Brian Burg  <bburg@apple.com>
1187
1188         Unreviewed, rebaseline run-binding-tests results after r165242.
1189
1190         * bindings/scripts/test/JS/JSTestObj.cpp:
1191         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1192         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1193         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
1194
1195 2014-03-07  Darin Adler  <darin@apple.com>
1196
1197         Remove non-working optimization that was attempted on iOS only
1198         https://bugs.webkit.org/show_bug.cgi?id=129595
1199         <rdar://problem/15798825>
1200
1201         Reviewed by Sam Weinig.
1202
1203         Code in GCController tried to optimize cases where the controller
1204         was used, but no JavaScript had been run in the current process.
1205         The code was never effective, and was iOS-only. Another way to fix
1206         the problem would be to change the code so it works, and if we do
1207         that we should do it for all platforms, not just iOS.
1208
1209         * bindings/js/GCController.cpp:
1210         (WebCore::GCController::garbageCollectNow): Remove check of
1211         JSDOMWindow::commonVMExists, since it's called just after a call
1212         to JSDOMWindow::commonVM, which will create it as a side effect.
1213         (WebCore::GCController::releaseExecutableMemory): Ditto.
1214
1215         * bindings/js/JSDOMWindowBase.cpp:
1216         (WebCore::JSDOMWindowBase::commonVM): Removed iOS-specific code
1217         that pulled the commonVM global out into another function so we
1218         can check for its existence without creating it as a side effect.
1219
1220         * bindings/js/JSDOMWindowBase.h: Ditto.
1221
1222 2014-03-07  Bem Jones-Bey  <bjonesbe@adobe.com>
1223
1224         [CSS Shapes] inset does not properly clamp large corner radii
1225         https://bugs.webkit.org/show_bug.cgi?id=129726
1226
1227         Reviewed by Dirk Schulze.
1228
1229         Make sure that radii that are larger than 50% of the associated shape
1230         dimension (height or width) are properly reduced the same way as
1231         border-radius radii are.
1232
1233         Test: fast/shapes/shape-outside-floats/shape-outside-floats-inset-rounded-large-radius.html
1234
1235         * rendering/shapes/Shape.cpp:
1236         (WebCore::ensureRadiiDoNotOverlap): Drive by style fix.
1237         (WebCore::Shape::createShape): Scale radii the same way as border
1238             radii are scaled.
1239         * platform/graphics/FloatRoundedRect.h:
1240         (WebCore::calcBorderRadiiConstraintScaleFor): Move border radii
1241             constraint calculation function out so that it can be shared by
1242             the shape code.
1243         * rendering/style/RenderStyle.cpp:
1244         (WebCore::RenderStyle::getRoundedBorderFor): Call renamed scale function.
1245
1246 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1247
1248         [GST] Set name to several timeout sources
1249         https://bugs.webkit.org/show_bug.cgi?id=129878
1250
1251         Reviewed by Philippe Normand.
1252
1253         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1254         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
1255         (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
1256         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
1257         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
1258         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1259         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
1260         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
1261
1262 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1263
1264         [GTK] Timeout sources not correctly removed
1265         https://bugs.webkit.org/show_bug.cgi?id=129877
1266
1267         Reviewed by Philippe Normand.
1268
1269         Set source ID variables to 0 after removing the sources from the
1270         context. Also give a name to the sources.
1271
1272         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1273         (WebCore::TrackPrivateBaseGStreamer::disconnect):
1274         (WebCore::TrackPrivateBaseGStreamer::activeChanged):
1275         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1276         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
1277
1278 2014-03-07  Gergo Balogh  <gbalogh.u-szeged@partner.samsung.com>
1279
1280         Remove FFTFrameMKL.
1281         https://bugs.webkit.org/show_bug.cgi?id=129866
1282
1283         Reviewed by Csaba Osztrogonác.
1284
1285         * platform/audio/FFTFrame.h:
1286         * platform/audio/FFTFrameStub.cpp:
1287         * platform/audio/mkl/FFTFrameMKL.cpp: Removed, it is never used.
1288
1289 2014-03-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1290
1291         [WebRTC] Adding getConfiguration method to RTCPeerConnection
1292         https://bugs.webkit.org/show_bug.cgi?id=129845
1293
1294         Reviewed by Eric Carlson.
1295
1296         Test: fast/mediastream/RTCPeerConnection-getConfiguration.html
1297
1298         * CMakeLists.txt:
1299         * DerivedSources.make:
1300         * GNUmakefile.list.am:
1301         * Modules/mediastream/RTCConfiguration.idl: Added.
1302         * Modules/mediastream/RTCIceServer.idl: Added.
1303         * Modules/mediastream/RTCPeerConnection.cpp:
1304         (WebCore::RTCPeerConnection::RTCPeerConnection):
1305         (WebCore::RTCPeerConnection::updateIce):
1306         (WebCore::RTCPeerConnection::getConfiguration):
1307         * Modules/mediastream/RTCPeerConnection.h:
1308         * Modules/mediastream/RTCPeerConnection.idl:
1309
1310 2014-03-07  Jinwoo Song  <jinwoo7.song@samsung.com>
1311
1312         Optimize collectionLast() and collectionTraverseBackward() in LiveNodeList
1313         https://bugs.webkit.org/show_bug.cgi?id=129775
1314
1315         Reviewed by Ryosuke Niwa.
1316
1317         Check the LiveNodeList type if it is HTMLTagNodeListType and ClassNodeListType then
1318         apply inlined matching methods for each type.
1319
1320         * dom/LiveNodeList.cpp:
1321         (WebCore::lastMatchingElement): Added.
1322         (WebCore::previousMatchingElement): Added.
1323         (WebCore::traverseMatchingElementsBackward): Added.
1324         (WebCore::LiveNodeList::collectionLast): Apply lastMatchingElement() with LiveNodeList type.
1325         (WebCore::LiveNodeList::collectionTraverseBackward): Apply traverseMatchingElementsBackward()
1326         with LiveNodeList type.
1327
1328 2014-03-06  Andreas Kling  <akling@apple.com>
1329
1330         WebCoreResourceHandleAsOperationQueueDelegate over-retains NSURLRequest.
1331         <https://webkit.org/b/129862>
1332
1333         Don't retain the pointer before assigning it to a RetainPtr, since that
1334         will cause the object to leak.
1335
1336         Reviewed by Alexey Proskuryakov.
1337
1338         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1339         (-[WebCoreResourceHandleAsOperationQueueDelegate continueWillSendRequest:]):
1340
1341 2014-03-06  Dan Bernstein  <mitz@apple.com>
1342
1343         Don’t copy WebInputs.json into the framework.
1344
1345         * WebCore.xcodeproj/project.pbxproj: Removed WebInputs.json from the Copy Bundle Resources
1346         build phase of the WebCore target.
1347
1348 2014-03-06  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1349
1350         [WebRTC] Updating RTCPeerConnection.idl
1351         https://bugs.webkit.org/show_bug.cgi?id=129804
1352
1353         Reviewed by Eric Carlson.
1354
1355         Some methods signatures were wrong, marking some arguments as optional when they are mandatory.
1356
1357         Existing tests were updated.
1358
1359         * Modules/mediastream/RTCPeerConnection.cpp:
1360         (WebCore::RTCPeerConnection::getStats):
1361         * Modules/mediastream/RTCPeerConnection.h:
1362         * Modules/mediastream/RTCPeerConnection.idl:
1363         * Modules/mediastream/RTCStatsRequestImpl.cpp:
1364         (WebCore::RTCStatsRequestImpl::create):
1365         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
1366         (WebCore::RTCStatsRequestImpl::requestFailed):
1367         * Modules/mediastream/RTCStatsRequestImpl.h:
1368         * platform/mediastream/RTCStatsRequest.h:
1369
1370 2014-03-06  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1371
1372         [WebRTC] Updating RTCIceServer to match spec
1373         https://bugs.webkit.org/show_bug.cgi?id=129844
1374
1375         Reviewed by Eric Carlson.
1376
1377         Move RTCIceServer from RTCConfiguration to its own file.
1378
1379         * Modules/mediastream/RTCPeerConnection.cpp:
1380         (WebCore::validateIceServerURL):
1381         (WebCore::processIceServer):
1382         * platform/mediastream/RTCConfiguration.h:
1383         (WebCore::RTCConfiguration::iceServers):
1384         * platform/mediastream/RTCIceServer.h: Added.
1385
1386 2014-03-06  Hyowon Kim  <hw1008.kim@samsung.com>
1387
1388         [EFL] Move EvasGL classes from WebKit to WebCore namespace.
1389         https://bugs.webkit.org/show_bug.cgi?id=129797
1390
1391         Reviewed by Gyuyoung Kim.
1392
1393         Though EvasGLContext and EvasGLSurface files were moved from WebKit2/UIProcess/API/efl/ 
1394         to WebCore/platform/graphics/efl/, they are still in WebKit namespace.
1395         Patch for namespace changes.
1396
1397         * platform/graphics/efl/EvasGLContext.cpp:
1398         * platform/graphics/efl/EvasGLContext.h:
1399         * platform/graphics/efl/EvasGLSurface.cpp:
1400         * platform/graphics/efl/EvasGLSurface.h:
1401
1402 2014-03-06  Brian Burg  <bburg@apple.com>
1403
1404         CodeGeneratorJS.pm doesn't need to add spaces between consecutive closing template brackets
1405         https://bugs.webkit.org/show_bug.cgi?id=129836
1406
1407         Reviewed by Andreas Kling.
1408
1409         * bindings/scripts/CodeGeneratorJS.pm:
1410         (GenerateParametersCheck):
1411         (GetNativeVectorInnerType):
1412         (GetSVGPropertyTypes):
1413
1414 2014-03-06  Jinwoo Song  <jinwoo7.song@samsung.com>
1415
1416         Remove unused method from BatteryController
1417         https://bugs.webkit.org/show_bug.cgi?id=129850
1418
1419         Reviewed by Gyuyoung Kim.
1420
1421         isActive() method is never called anywhere.
1422
1423         * Modules/battery/BatteryController.cpp:
1424         * Modules/battery/BatteryController.h:
1425
1426 2014-03-06  Pratik Solanki  <psolanki@apple.com>
1427
1428         [iOS] Crash on launch with website restrictions enabled
1429         https://bugs.webkit.org/show_bug.cgi?id=129854
1430         <rdar://problem/16207016>
1431
1432         Reviewed by Simon Fraser.
1433
1434         * platform/mac/ContentFilterMac.mm:
1435         (WebCore::ContentFilter::ContentFilter): Initialize m_neFilterSourceQueue so that we don't
1436         crash in the dtor due to garbage value in the field.
1437
1438 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1439
1440         Minor optimization in ScrollingTreeScrollingNodeMac
1441         https://bugs.webkit.org/show_bug.cgi?id=129848
1442
1443         Reviewed by Dean Jackson.
1444
1445         No need to call scrollOffsetForFixedPosition() again if we don't have header
1446         and footer layers.
1447
1448         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1449         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1450
1451 2014-03-06  Mark Lam  <mark.lam@apple.com>
1452
1453         XMLHttpRequest: status and statusText throw DOM Exception 11 when the state is UNSENT or OPENED.
1454         https://bugs.webkit.org/show_bug.cgi?id=45994
1455
1456         Not reviewed.
1457
1458         Re-landing r161051 (originally by Ryosuke Niwa, reviewed by Alexey Proskuryakov)
1459         since https://bugs.webkit.org/show_bug.cgi?id=126219 is no longer an issue.
1460
1461         * xml/XMLHttpRequest.cpp:
1462         (WebCore::XMLHttpRequest::status):
1463         (WebCore::XMLHttpRequest::statusText):
1464         * xml/XMLHttpRequest.h:
1465         * xml/XMLHttpRequest.idl:
1466
1467 2014-03-06  Brent Fulgham  <bfulgham@apple.com>
1468
1469         Revise Out-of-band VTT support for better integration with AVFoundation engine
1470         https://bugs.webkit.org/show_bug.cgi?id=129749
1471         <rdar://problem/16215701>
1472
1473         Reviewed by Eric Carlson.
1474
1475         Revise the platform handling of out-of-band text tracks so that we can keep AVFoundation
1476         informed of track selections we make. Use a dummy out-of-band child of the existing text
1477         track classes to avoid code duplication.
1478
1479         * WebCore.xcodeproj/project.pbxproj: Add new OutOfBandTextTrackPrivateAVF.h file.
1480         * html/HTMLMediaElement.cpp:
1481         (WebCore::HTMLMediaElement::parseAttribute): Notify player when OOB tracks change.
1482         (WebCore::HTMLMediaElement::outOfBandTrackSources): Also pass track mode to platform backend.
1483         * html/track/TextTrack.cpp:
1484         (WebCore::TextTrack::platformTextTrack): Also pass track mode to constructor.
1485         * html/track/TrackBase.cpp:
1486         (WebCore::TrackBase::TrackBase): Move ownership of track unique identifier to this base class.
1487         * html/track/TrackBase.h:
1488         (WebCore::TrackBase::uniqueId): Ditto.
1489         * platform/graphics/MediaPlayer.cpp:
1490         (WebCore::MediaPlayer::notifyTrackModeChanged): Added stub to pass message to platform player.
1491         * platform/graphics/MediaPlayer.h:
1492         * platform/graphics/MediaPlayerPrivate.h:
1493         (WebCore::MediaPlayerPrivateInterface::notifyTrackModeChanged): Stub for most platforms.
1494         * platform/graphics/PlatformTextTrack.h:
1495         (WebCore::PlatformTextTrack::create): Update for revised constructor (with 'mode' argument).
1496         (WebCore::PlatformTextTrack::createOutOfBand): Ditto.
1497         (WebCore::PlatformTextTrack::mode): Added.
1498         (WebCore::PlatformTextTrack::captionMenuOffItem): Use revised constructor arguments.
1499         (WebCore::PlatformTextTrack::captionMenuAutomaticItem): Ditto.
1500         (WebCore::PlatformTextTrack::PlatformTextTrack): Ditto.
1501         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Change predicate to return enum indicating the category
1502         of track (out-of-band, legacy closed caption, or in band).
1503         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1504         (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Added.
1505         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: Override predicate to return category enum.
1506         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise to use new category enum.
1507         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Override predicate to return category enum.
1508         that this is NOT an out-of-band track.
1509         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Ditto.
1510         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1511         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1512         (WebCore::MediaPlayerPrivateAVFoundationObjC::notifyTrackModeChanged): Added implementation.
1513         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Revise to handle out-of-band
1514         track placeholders.
1515         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Modify to inform AVFoundation about any
1516         out-of-band tracks we've selected.
1517         (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): Added.
1518         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: Added.
1519         (WebCore::OutOfBandTextTrackPrivateAVF::create):
1520         (WebCore::OutOfBandTextTrackPrivateAVF::processCue):
1521         (WebCore::OutOfBandTextTrackPrivateAVF::resetCueValues):
1522         (WebCore::OutOfBandTextTrackPrivateAVF::mediaSelectionOption):
1523         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
1524         (WebCore::OutOfBandTextTrackPrivateAVF::processCueAttributes):
1525         * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Override predicate to indicate
1526         that this is NOT an out-of-band track.
1527         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
1528         (WebCore::MediaPlayerPrivateIOS::setSelectedTextTrack): Correct typo in logging text.
1529
1530 2014-03-06  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1531
1532         [WebRTC] Updating createOffer and createAnswer methods to match WebRTC editor's draft of 01/27/2014
1533         https://bugs.webkit.org/show_bug.cgi?id=129484
1534
1535         Reviewed by Eric Carlson.
1536
1537         According to the spec, createOffer and createAnswer will no longer have MediaConstraints as an argument,
1538         instead they will have RTCOfferOptions and RTCOfferAnswerOptions, respectively.
1539
1540         Existing tests were updated.
1541
1542         * CMakeLists.txt:
1543         * GNUmakefile.list.am:
1544         * Modules/mediastream/RTCOfferAnswerOptions.cpp: Added.
1545         * Modules/mediastream/RTCOfferAnswerOptions.h: Added.
1546         * Modules/mediastream/RTCPeerConnection.cpp:
1547         (WebCore::RTCPeerConnection::createOffer):
1548         (WebCore::RTCPeerConnection::createAnswer):
1549         * Modules/mediastream/RTCPeerConnection.h:
1550         * Modules/mediastream/RTCPeerConnection.idl:
1551         * platform/mediastream/RTCPeerConnectionHandler.h:
1552         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1553         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
1554         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
1555         * platform/mock/RTCPeerConnectionHandlerMock.h:
1556
1557 2014-03-06  Brian Burg  <bburg@apple.com>
1558
1559         Web Replay: premature release() of PassRefPtr in InspectorReplayAgent
1560         https://bugs.webkit.org/show_bug.cgi?id=129827
1561
1562         Reviewed by Timothy Hatcher.
1563
1564         * inspector/InspectorReplayAgent.cpp:
1565         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
1566
1567 2014-03-06  Benjamin Poulain  <bpoulain@apple.com>
1568
1569         [iOS] Do not compile fake mouse event handling when iOS Touch Events are enabled
1570         https://bugs.webkit.org/show_bug.cgi?id=129725
1571
1572         Reviewed by Dan Bernstein.
1573
1574         Bug <rdar://problem/16218636>. The code is #ifdef'ed out to avoid setting up useless objects
1575         and to avoid future mistake.
1576
1577         * page/EventHandler.cpp:
1578         (WebCore::EventHandler::EventHandler):
1579         (WebCore::EventHandler::~EventHandler):
1580         (WebCore::EventHandler::clear):
1581         (WebCore::EventHandler::handleMousePressEvent):
1582         (WebCore::EventHandler::startAutoHideCursorTimer):
1583         (WebCore::EventHandler::handleMouseMoveEvent):
1584         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
1585         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoonInQuad):
1586         * page/EventHandler.h:
1587
1588 2014-03-06  Pratik Solanki  <psolanki@apple.com>
1589
1590         Unreviewed. iOS build fix after r165199.
1591
1592         * rendering/RootInlineBox.cpp:
1593
1594 2014-03-06  Benjamin Poulain  <bpoulain@apple.com>
1595
1596         [iOS] Rename the actualVisibleXXXRect to unobscuredContentRect for consistency
1597         https://bugs.webkit.org/show_bug.cgi?id=129773
1598
1599         Reviewed by Simon Fraser.
1600
1601         * dom/TreeScope.cpp:
1602         (WebCore::nodeFromPoint):
1603         * platform/ScrollView.cpp:
1604         (WebCore::ScrollView::visibleContentRectInternal):
1605         * platform/ScrollView.h:
1606         * platform/ios/ScrollViewIOS.mm:
1607         (WebCore::ScrollView::unoscuredContentRect):
1608         * platform/ios/wak/WAKScrollView.h:
1609         * platform/ios/wak/WAKScrollView.mm:
1610         (-[WAKScrollView unoscuredContentRect]):
1611         (-[WAKScrollView description]):
1612         * rendering/RenderLayer.cpp:
1613         (WebCore::RenderLayer::scrollRectToVisible):
1614
1615 2014-03-05  Oliver Hunt  <oliver@apple.com>
1616
1617         Support caching of custom setters
1618         https://bugs.webkit.org/show_bug.cgi?id=129519
1619
1620         Reviewed by Filip Pizlo.
1621
1622         Add forwarding header
1623
1624         Tests: js/regress/assign-custom-setter-polymorphic.html
1625                js/regress/assign-custom-setter.html
1626
1627         * ForwardingHeaders/jit/SpillRegistersMode.h: Added.
1628
1629 2014-03-05  Jon Honeycutt  <jhoneycutt@apple.com>
1630
1631         Invalid cast in WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients()
1632
1633         <https://bugs.webkit.org/show_bug.cgi?id=121887>
1634         <rdar://problem/15073043>
1635
1636         Clang appears to be optimizing out a branch in RenderObject::node()
1637         when compiling RenderLayer::FilterInfo::updateReferenceFilterClients().
1638         We'll work around this by factoring out the code in question into a
1639         separate member function marked NEVER_INLINE.
1640
1641         No test possible due to <https://bugs.webkit.org/show_bug.cgi?id=129757>.
1642
1643         Reviewed by David Kilzer.
1644
1645         * rendering/RenderLayerFilterInfo.cpp:
1646         (WebCore::RenderLayer::FilterInfo::layerElement):
1647         Code moved from updateReferenceFilterClients(). Returns the Element*
1648         for m_layer.
1649         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
1650         Use layerElement().
1651
1652         * rendering/RenderLayerFilterInfo.h:
1653         Declared layerElement().
1654
1655 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1656
1657         Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
1658         https://bugs.webkit.org/show_bug.cgi?id=127944
1659
1660         Reviewed by Geoffrey Garen.
1661
1662         Covered by existing tests.
1663
1664         * CMakeLists.txt:
1665         * DerivedSources.cpp:
1666         * DerivedSources.make:
1667         * ForwardingHeaders/runtime/ConsoleClient.h: Added.
1668         * ForwardingHeaders/runtime/ConsoleTypes.h: Renamed from Source/WebCore/ForwardingHeaders/inspector/ConsoleTypes.h.
1669         * GNUmakefile.list.am:
1670         * PlatformGTK.cmake:
1671         * WebCore.exp.in:
1672         * WebCore.vcxproj/WebCore.vcxproj:
1673         * WebCore.vcxproj/WebCore.vcxproj.filters:
1674         * WebCore.xcodeproj/project.pbxproj:
1675         * bindings/gobject/GNUmakefile.am:
1676         Update build systems.
1677
1678         * page/Console.cpp: Removed.
1679         * page/Console.h: Removed.
1680         * page/Console.idl: Removed.
1681         * page/DOMWindow.cpp:
1682         (WebCore::DOMWindow::~DOMWindow):
1683         (WebCore::DOMWindow::resetDOMWindowProperties):
1684         * page/DOMWindow.h:
1685         (WebCore::DOMWindow::defaultStatus):
1686         * page/DOMWindow.idl:
1687         Removed the old IDL generated Console object on window.
1688
1689         * page/PageConsole.cpp:
1690         (WebCore::PageConsole::shouldPrintExceptions):
1691         (WebCore::PageConsole::setShouldPrintExceptions):
1692         (WebCore::PageConsole::mute):
1693         (WebCore::PageConsole::unmute):
1694         (WebCore::PageConsole::messageWithTypeAndLevel):
1695         (WebCore::PageConsole::count):
1696         (WebCore::PageConsole::profile):
1697         (WebCore::PageConsole::profileEnd):
1698         (WebCore::PageConsole::time):
1699         (WebCore::PageConsole::timeEnd):
1700         (WebCore::PageConsole::timeStamp):
1701         (WebCore::PageConsole::group):
1702         (WebCore::PageConsole::groupCollapsed):
1703         (WebCore::PageConsole::groupEnd):
1704         (WebCore::PageConsole::clearProfiles):
1705         * page/PageConsole.h:
1706         Move the handling of Console object into PageConsole.
1707
1708         * bindings/js/ScriptCachedFrameData.cpp:
1709         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1710         (WebCore::ScriptCachedFrameData::restore):
1711         * bindings/js/ScriptController.cpp:
1712         (WebCore::ScriptController::clearWindowShell):
1713         (WebCore::ScriptController::initScript):
1714         Set the PageConsole as the ConsoleClient of the JSGlobalObject
1715         so that WebCore may handle console messages directly. For instance
1716         it may pass messages on to the ChromeClient.
1717
1718         * testing/Internals.cpp:
1719         (WebCore::Internals::consoleProfiles):
1720         To access profiles, go through PageConsole now instead of Console.
1721
1722         * bindings/js/JSDOMWindowBase.cpp:
1723         * bindings/objc/WebScriptObject.mm:
1724         * css/MediaList.cpp:
1725         * dom/ScriptExecutionContext.h:
1726         * dom/UIEvent.cpp:
1727         * dom/ViewportArguments.cpp:
1728         * html/parser/XSSAuditorDelegate.cpp:
1729         * inspector/CommandLineAPIHost.h:
1730         * inspector/InspectorInstrumentation.cpp:
1731         * inspector/InspectorInstrumentation.h:
1732         * inspector/InspectorProfilerAgent.cpp:
1733         * inspector/WebConsoleAgent.cpp:
1734         * loader/FrameLoader.cpp:
1735         * loader/MixedContentChecker.cpp:
1736         * loader/appcache/ApplicationCacheGroup.cpp:
1737         * loader/cache/CachedResourceLoader.cpp:
1738         * page/ChromeClient.h:
1739         * page/ContentSecurityPolicy.cpp:
1740         * page/Page.cpp:
1741         * page/Page.h:
1742         * svg/SVGDocumentExtensions.cpp:
1743         * workers/WorkerMessagingProxy.cpp:
1744         * workers/WorkerReportingProxy.h:
1745         Update includes.
1746
1747 2014-03-06  Zsolt Borbely  <borbezs@inf.u-szeged.hu>
1748
1749         Fix the !ENABLE(CSS_STICKY_POSITION) build
1750         https://bugs.webkit.org/show_bug.cgi?id=129793
1751
1752         Reviewed by Simon Fraser.
1753
1754         Add missing ENABLE(CSS_STICKY_POSITION) guard to EditingStyle::convertPositionStyle().
1755
1756         * editing/EditingStyle.cpp:
1757         (WebCore::EditingStyle::convertPositionStyle):
1758
1759 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1760
1761         [Mac] Leak: dispatch_semaphore leak allocated in MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
1762         https://bugs.webkit.org/show_bug.cgi?id=129792
1763
1764         Reviewed by Anders Carlsson.
1765
1766         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1767         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
1768
1769 2014-03-06  Brendan Long  <b.long@cablelabs.com>
1770
1771         Implement VideoTrackList.selectedIndex
1772         https://bugs.webkit.org/show_bug.cgi?id=129770
1773
1774         Reviewed by Eric Carlson.
1775
1776         Tests: media/track/video/video-track-mkv-theora-selected.html
1777
1778         * html/track/VideoTrackList.idl:
1779
1780 2014-03-06  Lorenzo Tilve  <ltilve@igalia.com>
1781
1782         [GTK][CMake] Fix the GTK+ CMake build
1783         https://bugs.webkit.org/show_bug.cgi?id=129801
1784
1785         Reviewed by Martin Robinson.
1786
1787         Include missing files for CMake build
1788
1789         * CMakeLists.txt: Add a missing references to DOMURLMediaStream
1790
1791 2014-03-06  Zalan Bujtas  <zalan@apple.com>
1792
1793         Subpixel rendering: Setting content to opaque on m_graphicsLayer depends on subpixel accumulation.
1794         https://bugs.webkit.org/show_bug.cgi?id=129776
1795
1796         Reviewed by Simon Fraser.
1797
1798         isEmpty() returns true when any of the dimensions is <= 0. Subpixel accumulation could happen
1799         in one direction only. Use isZero() instead().
1800
1801         * rendering/RenderLayerBacking.cpp:
1802         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1803
1804 2014-03-06  Gurpreet Kaur  <k.gurpreet@samsung.com>
1805
1806         REGRESSION (r158254): Rubber-banding at Bing image search causes the toolbar to move up and away
1807         https://bugs.webkit.org/show_bug.cgi?id=128873
1808
1809         Reviewed by Antonio Gomes.
1810
1811         This regression is caused by  http://trac.webkit.org/changeset/154614 
1812         and http://trac.webkit.org/changeset/156605. So reverting the changes
1813         to make it Web compatible as earlier.
1814
1815         * dom/Element.cpp:
1816         (WebCore::Element::scrollLeft):
1817         (WebCore::Element::scrollTop):
1818         (WebCore::Element::setScrollLeft):
1819         (WebCore::Element::setScrollTop):
1820         Reverting changes as it caused regression.
1821
1822 2014-03-06  Zan Dobersek  <zdobersek@igalia.com>
1823
1824         Move Source/WebCore/html/canvas/ code to std::unique_ptr
1825         https://bugs.webkit.org/show_bug.cgi?id=129668
1826
1827         Reviewed by Anders Carlsson.
1828
1829         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/canvas/ to std::unique_ptr.
1830
1831         * html/HTMLCanvasElement.cpp:
1832         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1833         (WebCore::HTMLCanvasElement::getContext):
1834         * html/HTMLCanvasElement.h:
1835         * html/canvas/ANGLEInstancedArrays.cpp:
1836         * html/canvas/ANGLEInstancedArrays.h:
1837         * html/canvas/CanvasRenderingContext2D.h:
1838         * html/canvas/EXTTextureFilterAnisotropic.cpp:
1839         * html/canvas/EXTTextureFilterAnisotropic.h:
1840         * html/canvas/OESElementIndexUint.cpp:
1841         * html/canvas/OESElementIndexUint.h:
1842         * html/canvas/OESStandardDerivatives.cpp:
1843         * html/canvas/OESStandardDerivatives.h:
1844         * html/canvas/OESTextureFloat.cpp:
1845         * html/canvas/OESTextureFloat.h:
1846         * html/canvas/OESTextureFloatLinear.cpp:
1847         * html/canvas/OESTextureFloatLinear.h:
1848         * html/canvas/OESTextureHalfFloat.cpp:
1849         * html/canvas/OESTextureHalfFloat.h:
1850         * html/canvas/OESTextureHalfFloatLinear.cpp:
1851         * html/canvas/OESTextureHalfFloatLinear.h:
1852         * html/canvas/OESVertexArrayObject.cpp:
1853         * html/canvas/OESVertexArrayObject.h:
1854         * html/canvas/WebGLCompressedTextureATC.cpp:
1855         * html/canvas/WebGLCompressedTextureATC.h:
1856         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
1857         * html/canvas/WebGLCompressedTexturePVRTC.h:
1858         * html/canvas/WebGLCompressedTextureS3TC.cpp:
1859         * html/canvas/WebGLCompressedTextureS3TC.h:
1860         * html/canvas/WebGLDebugRendererInfo.cpp:
1861         * html/canvas/WebGLDebugRendererInfo.h:
1862         * html/canvas/WebGLDebugShaders.cpp:
1863         * html/canvas/WebGLDebugShaders.h:
1864         * html/canvas/WebGLDepthTexture.cpp:
1865         * html/canvas/WebGLDepthTexture.h:
1866         * html/canvas/WebGLDrawBuffers.cpp:
1867         * html/canvas/WebGLDrawBuffers.h:
1868         * html/canvas/WebGLLoseContext.cpp:
1869         * html/canvas/WebGLLoseContext.h:
1870         * html/canvas/WebGLRenderingContext.cpp:
1871         (WebCore::WebGLRenderingContext::create):
1872         (WebCore::WebGLRenderingContext::getExtension):
1873         * html/canvas/WebGLRenderingContext.h:
1874
1875 2014-03-06  Zan Dobersek  <zdobersek@igalia.com>
1876
1877         Move Source/WebCore/editing/ code to std::unique_ptr
1878         https://bugs.webkit.org/show_bug.cgi?id=129665
1879
1880         Reviewed by Anders Carlsson.
1881
1882         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/editing/ with std::unique_ptr.
1883
1884         * editing/EditingStyle.cpp:
1885         (WebCore::htmlElementEquivalents):
1886         (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
1887         (WebCore::htmlAttributeEquivalents):
1888         (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
1889         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
1890         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
1891         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
1892         * editing/Editor.cpp:
1893         (WebCore::Editor::Editor):
1894         (WebCore::Editor::clear):
1895         * editing/Editor.h:
1896         * page/Frame.cpp:
1897         (WebCore::Frame::Frame):
1898         * page/Frame.h:
1899
1900 2014-03-06  Zan Dobersek  <zdobersek@igalia.com>
1901
1902         Move to using std::unique_ptr for KeyboardEvent, ScriptExecutionContext::PendingException
1903         https://bugs.webkit.org/show_bug.cgi?id=129061
1904
1905         Reviewed by Eric Carlson.
1906
1907         Replace uses of OwnPtr and PassOwnPtr for KeyboardEvent and ScriptExecutionContext::PendingException
1908         classes with std::unique_ptr. ScriptExecutionContext::Task objects are still handled through OwnPtr,
1909         but this will be addressed later.
1910
1911         * dom/KeyboardEvent.cpp:
1912         (WebCore::KeyboardEvent::KeyboardEvent):
1913         * dom/KeyboardEvent.h:
1914         * dom/ScriptExecutionContext.cpp:
1915         (WebCore::ScriptExecutionContext::reportException):
1916         * dom/ScriptExecutionContext.h:
1917         * dom/ScriptRunner.h: Remove an unnecessary PassOwnPtr header inclusion.
1918
1919 2014-03-06  Commit Queue  <commit-queue@webkit.org>
1920
1921         Unreviewed, rolling out r165175.
1922         http://trac.webkit.org/changeset/165175
1923         https://bugs.webkit.org/show_bug.cgi?id=129788
1924
1925         Linking failures on GTK, EFL due to missing gstreamer-tag-1.0
1926         dependency (Requested by zdobersek on #webkit).
1927
1928         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1929         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1930
1931 2014-03-05  Brendan Long  <b.long@cablelabs.com>
1932
1933         [GStreamer] human readable language code for tracks
1934         https://bugs.webkit.org/show_bug.cgi?id=124514
1935
1936         Reviewed by Philippe Normand.
1937
1938         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1939         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.
1940
1941 2014-03-05  Ryuan Choi  <ryuan.choi@samsung.com>
1942
1943         Remove unused method from Vibration
1944         https://bugs.webkit.org/show_bug.cgi?id=129732
1945
1946         Reviewed by Gyuyoung Kim.
1947
1948         * Modules/vibration/Vibration.cpp:
1949         Removed isActive(), which is never called since r152441.
1950         * Modules/vibration/Vibration.h: Ditto.
1951
1952 2014-03-05  Commit Queue  <commit-queue@webkit.org>
1953
1954         Unreviewed, rolling out r165141, r165157, and r165158.
1955         http://trac.webkit.org/changeset/165141
1956         http://trac.webkit.org/changeset/165157
1957         http://trac.webkit.org/changeset/165158
1958         https://bugs.webkit.org/show_bug.cgi?id=129772
1959
1960         "broke ftl" (Requested by olliej_ on #webkit).
1961
1962         * ForwardingHeaders/jit/SpillRegistersMode.h: Removed.
1963
1964 2014-03-05  Martin Robinson  <mrobinson@igalia.com>
1965
1966         [GTK][CMake] The GObject DOM bindings should always be built
1967         https://bugs.webkit.org/show_bug.cgi?id=127963
1968
1969         Reviewed by Ryosuke Niwa.
1970
1971         * PlatformGTK.cmake: Make compilation of the WebKitGTK+ GObject DOM bindings
1972         unconditional, instead of conditional on the WebKit2 build.
1973
1974 2014-03-05  Jer Noble  <jer.noble@apple.com>
1975
1976         [MSE] Crash in SourceBuffer::sourceBufferPrivateDidReceiveSample() - received samples after SourceBuffer was removed.
1977         https://bugs.webkit.org/show_bug.cgi?id=129761
1978
1979         Reviewed by Eric Carlson.
1980
1981         Guard against the possibility that SourceBufferPrivates will continue to generate samples even after
1982         a parse error. Bail out early from sourceBufferPrivateDidReceiveInitializationSegment and
1983         sourceBufferPrivateDidReceiveSample if the SourceBuffer has been removed.
1984
1985         * Modules/mediasource/SourceBuffer.cpp:
1986         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1987         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1988
1989 2014-03-05  Enrica Casucci  <enrica@apple.com>
1990
1991         Build fix, take 2.
1992
1993         * platform/mac/HTMLConverter.mm:
1994
1995 2014-03-05  Enrica Casucci  <enrica@apple.com>
1996
1997         Build fix.
1998
1999         * platform/mac/HTMLConverter.mm:
2000
2001 2014-03-05  Enrica Casucci  <enrica@apple.com>
2002
2003         Crash when copying content that contains <sup>.
2004         https://bugs.webkit.org/show_bug.cgi?id=129765
2005         <rdar://problem/16139498>
2006         
2007         Reviewed by Benjamin Poulain.
2008
2009         Adding static definition of NSAttributeSuperscriptName.
2010
2011         * platform/mac/HTMLConverter.mm:
2012
2013 2014-03-05  Gavin Barraclough  <barraclough@apple.com>
2014
2015         https://bugs.webkit.org/show_bug.cgi?id=128625
2016         Add fast mapping from StringImpl to JSString
2017
2018         Unreviewed roll-out.
2019
2020         Reverting r164347, r165054, r165066 - not clear the performance tradeoff was right.
2021
2022         * bindings/js/DOMWrapperWorld.cpp:
2023         (WebCore::DOMWrapperWorld::clearWrappers):
2024         * bindings/js/DOMWrapperWorld.h:
2025         * bindings/js/JSDOMBinding.h:
2026         (WebCore::jsStringWithCache):
2027         * bindings/js/JSDOMWindowBase.cpp:
2028         (WebCore::JSDOMWindowBase::commonVM):
2029         * bindings/scripts/StaticString.pm:
2030         (GenerateStrings):
2031
2032 2014-03-05  Daniel Bates  <dabates@apple.com>
2033             And Alexey Proskuryakov  <ap@apple.com>
2034
2035         ASSERT(newestManifest) fails in WebCore::ApplicationCacheGroup::didFinishLoadingManifest()
2036         https://bugs.webkit.org/show_bug.cgi?id=129753
2037         <rdar://problem/12069835>
2038
2039         Reviewed by Alexey Proskuryakov.
2040
2041         Fixes an issue where an assertion failure would occur when visiting a web site whose on-disk
2042         app cache doesn't contain a manifest resource.
2043
2044         For some reason an app cache for a web site may be partially written to disk. In particular, the
2045         app cache may only contain a CacheGroups entry. That is, the manifest resource and origin records
2046         may not be persisted to disk. From looking over the code, we're unclear how such a situation can occur
2047         and hence have been unable to create such an app cache. We were able to reproduce this issue using
2048         an app cache database file that was provided by a person that was affected by this issue.
2049
2050         No test included because it's not straightforward to write a test for this change.
2051
2052         * loader/appcache/ApplicationCacheGroup.cpp:
2053         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Assert that m_cacheBeingUpdated->manifestResource()
2054         is non-null. Currently we only document this assumption in a code comment. Also separated a single assertion
2055         expression into two assertion expressions to make it straightforward to identify the failing sub-expression
2056         on failure.
2057         * loader/appcache/ApplicationCacheStorage.cpp:
2058         (WebCore::ApplicationCacheStorage::store): Modified to call ApplicationCacheStorage::deleteCacheGroupRecord()
2059         to remove a cache group and associated cache records (if applicable) before inserting a cache group entry.
2060         This replacement approach will ultimately repair incomplete app cache data for people affected by this bug.
2061         (WebCore::ApplicationCacheStorage::loadCache): Log an error and return nullptr if the cache we loaded doesn't
2062         have a manifest resource.
2063         (WebCore::ApplicationCacheStorage::deleteCacheGroupRecord): Added.
2064         (WebCore::ApplicationCacheStorage::deleteCacheGroup): Extracted deletion logic for cache group record into
2065         ApplicationCacheStorage::deleteCacheGroupRecord().
2066         * loader/appcache/ApplicationCacheStorage.h:
2067
2068 2014-03-05  Oliver Hunt  <oliver@apple.com>
2069
2070         Support caching of custom setters
2071         https://bugs.webkit.org/show_bug.cgi?id=129519
2072
2073         Reviewed by Filip Pizlo.
2074
2075         Add forwarding header
2076
2077         Tests: js/regress/assign-custom-setter-polymorphic.html
2078                js/regress/assign-custom-setter.html
2079
2080         * ForwardingHeaders/jit/SpillRegistersMode.h: Added.
2081
2082 2014-03-05  David Kilzer  <ddkilzer@apple.com>
2083
2084         Fix crash in CompositeEditCommand::cloneParagraphUnderNewElement()
2085         <http://webkit.org/b/129751>
2086         <rdar://problem/16237965>
2087
2088         Reviewed by Jon Honeycutt.
2089
2090         Merged from Blink (patch by Yuta Kitamura):
2091         https://src.chromium.org/viewvc/blink?revision=168160&view=revision
2092         http://crbug.com/345005
2093
2094             The root cause is CompositeEditCommand::moveParagraphWithClones() passing
2095             two positions |start| and |end| which do not follow the document order,
2096             i.e. in some situations |start| is located after |end| because of
2097             the difference in affinity.
2098
2099             This patch fixes this crash by normalizing |end| to |start| in such situations.
2100             It also adds an ASSERT that checks the relationship between |start| and |end|.
2101
2102         Test: editing/execCommand/format-block-crash.html
2103
2104         * editing/CompositeEditCommand.cpp:
2105         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
2106         (WebCore::CompositeEditCommand::moveParagraphWithClones):
2107         * editing/CompositeEditCommand.h:
2108
2109 2014-03-05  Radu Stavila  <stavila@adobe.com>
2110
2111         [CSS Regions] Scrollable regions
2112         https://bugs.webkit.org/show_bug.cgi?id=129301
2113
2114         Reviewed by David Hyatt.
2115
2116         Named flow fragments do not inherit the overflow property from the fragment container.
2117         When asked if the flow thread content should be clipped, the named flow fragments
2118         will respond using the overflow property of the named flow fragment container.
2119
2120         When painting the flow thread layer inside the region, the scrolled content offset of
2121         the region must be used to offset the flow thread's layer.
2122
2123         Tests: fast/regions/scrollable-last-region.html
2124                fast/regions/scrollable-single-region-bt.html
2125                fast/regions/scrollable-single-region-lr.html
2126                fast/regions/scrollable-single-region-relative-element.html
2127                fast/regions/scrollable-single-region-rl.html
2128                fast/regions/scrollable-single-region.html
2129
2130         * rendering/RenderLayer.cpp:
2131         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
2132         (WebCore::RenderLayer::calculateClipRects):
2133         * rendering/RenderNamedFlowFragment.cpp:
2134         (WebCore::RenderNamedFlowFragment::createStyle):
2135         (WebCore::RenderNamedFlowFragment::shouldClipFlowThreadContent):
2136         * rendering/RenderNamedFlowFragment.h:
2137         * rendering/RenderNamedFlowThread.cpp:
2138         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
2139         * rendering/RenderRegion.cpp:
2140         (WebCore::RenderRegion::shouldClipFlowThreadContent):
2141         * rendering/RenderRegion.h:
2142
2143 2014-03-05  Zalan Bujtas  <zalan@apple.com>
2144
2145         Subpixel rendering: Device pixel round accumulated subpixel value when the RenderLayer with transform paints its content.
2146         https://bugs.webkit.org/show_bug.cgi?id=129079
2147
2148         Reviewed by Simon Fraser.
2149
2150         Snap the content to the device pixel position (as opposed to integral position) before
2151         applying the transform. Recalculate the remaining subpixels that need offsetting at painting time.
2152
2153         Test: compositing/hidpi-absolute-subpixel-positioned-transformed-elements.html
2154
2155         * platform/graphics/LayoutPoint.h:
2156         (WebCore::roundedForPainting):
2157         * rendering/RenderLayer.cpp:
2158         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2159
2160 2014-03-05  Eric Carlson  <eric.carlson@apple.com>
2161
2162         [iOS] Show external device name/type in placeholder
2163         https://bugs.webkit.org/show_bug.cgi?id=129723
2164
2165         Reviewed by Jer Noble.
2166
2167         Make the name and type of the external device available to the JS based controls.
2168         * Modules/mediacontrols/MediaControlsHost.cpp:
2169         (WebCore::MediaControlsHost::externalDeviceDisplayName):
2170         (WebCore::MediaControlsHost::externalDeviceType):
2171         * Modules/mediacontrols/MediaControlsHost.h:
2172         * Modules/mediacontrols/MediaControlsHost.idl:
2173
2174         * Modules/mediacontrols/mediaControlsiOS.js:
2175         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Display device type-specific infomation
2176             in the placeholder image.
2177
2178         * WebCore.exp.in: Export new WebKitSystemInterface functions.
2179
2180         * platform/graphics/MediaPlayer.cpp:
2181         (WebCore::MediaPlayer::wirelessPlaybackTargetName): Added.
2182         (WebCore::MediaPlayer::wirelessPlaybackTargetType): Ditto.
2183         * platform/graphics/MediaPlayer.h:
2184         * platform/graphics/MediaPlayerPrivate.h:
2185
2186         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2187         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2188         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType): Added.
2189         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName): Ditto.
2190
2191         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2192         * platform/mac/WebCoreSystemInterface.h:
2193         * platform/mac/WebCoreSystemInterface.mm:
2194
2195 2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
2196
2197         [iOS] Rename the various VisibleExtent variations to exposedContentRect
2198         https://bugs.webkit.org/show_bug.cgi?id=129728
2199
2200         Reviewed by Simon Fraser.
2201
2202         Rename DocumentVisibleExtent and VisibleExtentContentRect to ExposedContentRect in a desperate
2203         attempt to make things a tiny little bit less confusing.
2204
2205         The name is ExposedContentRect and not ExposedRect as that rect is exposed on ScrollView, while the
2206         rect is in document coordinates (which does not make any difference on WebKit1...).
2207
2208         * WebCore.exp.in:
2209         * platform/ScrollView.h:
2210         * platform/ios/ScrollViewIOS.mm:
2211         (WebCore::ScrollView::exposedContentRect):
2212         (WebCore::ScrollView::setExposedContentRect):
2213         * platform/ios/wak/WAKScrollView.h:
2214         * platform/ios/wak/WAKScrollView.mm:
2215         (-[WAKScrollView exposedContentRect]):
2216         * rendering/RenderLayerCompositor.cpp:
2217         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2218         (WebCore::RenderLayerCompositor::didChangeVisibleRect):
2219
2220 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
2221
2222         ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
2223         https://bugs.webkit.org/show_bug.cgi?id=129752
2224
2225         Reviewed by Enrica Casucci.
2226
2227         Add C functions for NSURL-related functionality required by WebKit2
2228
2229         * WebCore.exp.in:
2230         * platform/mac/WebCoreNSURLExtras.h:
2231         * platform/mac/WebCoreNSURLExtras.mm:
2232         (WebCore::URLByCanonicalizingURL):
2233         (WebCore::rangeOfURLScheme):
2234         (WebCore::looksLikeAbsoluteURL):
2235
2236 2014-03-05  Martin Hock  <mhock@apple.com>
2237
2238         Add support for sessions to MemoryCache.
2239         https://bugs.webkit.org/show_bug.cgi?id=127794
2240
2241         Reviewed by Sam Weinig.
2242
2243         * WebCore.exp.in:
2244         * editing/DeleteButtonController.cpp:
2245         (WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
2246         * html/DOMURL.cpp:
2247         (WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
2248         * inspector/InspectorPageAgent.cpp:
2249         (WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
2250         * inspector/InspectorResourceAgent.cpp:
2251         (WebCore::InspectorResourceAgent::replayXHR): Ditto.
2252         * loader/DocumentLoader.cpp:
2253         (WebCore::areAllLoadersPageCacheAcceptable): Ditto.
2254         * loader/FrameLoader.cpp:
2255         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
2256         * loader/ImageLoader.cpp:
2257         (WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
2258         * loader/archive/cf/LegacyWebArchive.cpp:
2259         (WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
2260         * loader/cache/CachedCSSStyleSheet.cpp:
2261         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
2262         * loader/cache/CachedCSSStyleSheet.h:
2263         * loader/cache/CachedFont.cpp: Ditto.
2264         (WebCore::CachedFont::CachedFont):
2265         * loader/cache/CachedFont.h:
2266         * loader/cache/CachedImage.cpp: Ditto.
2267         (WebCore::CachedImage::CachedImage):
2268         * loader/cache/CachedImage.h:
2269         * loader/cache/CachedRawResource.cpp: Ditto.
2270         (WebCore::CachedRawResource::CachedRawResource):
2271         * loader/cache/CachedRawResource.h:
2272         * loader/cache/CachedResource.cpp: Ditto.
2273         (WebCore::CachedResource::CachedResource):
2274         (WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
2275         * loader/cache/CachedResource.h:
2276         (WebCore::CachedResource::sessionID):
2277         * loader/cache/CachedResourceLoader.cpp:
2278         (WebCore::createResource): Constructors take sessionID.
2279         (WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
2280         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
2281         (WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
2282         (WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
2283         (WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
2284         * loader/cache/CachedResourceLoader.h:
2285         * loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
2286         (WebCore::CachedSVGDocument::CachedSVGDocument):
2287         * loader/cache/CachedSVGDocument.h:
2288         * loader/cache/CachedScript.cpp: Ditto.
2289         (WebCore::CachedScript::CachedScript):
2290         * loader/cache/CachedScript.h:
2291         * loader/cache/CachedTextTrack.cpp: Ditto.
2292         (WebCore::CachedTextTrack::CachedTextTrack):
2293         * loader/cache/CachedTextTrack.h:
2294         * loader/cache/CachedXSLStyleSheet.cpp: Ditto.
2295         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
2296         * loader/cache/CachedXSLStyleSheet.h:
2297         * loader/cache/MemoryCache.cpp:
2298         (WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
2299         (WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
2300         (WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
2301         (WebCore::MemoryCache::resourceForURL): Ditto.
2302         (WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
2303         (WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
2304         (WebCore::MemoryCache::addImageToCache): Use default sessionID.
2305         (WebCore::MemoryCache::removeImageFromCache): Ditto.
2306         (WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
2307         (WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
2308         (WebCore::MemoryCache::getOriginsWithCache): Ditto.
2309         (WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
2310         (WebCore::MemoryCache::removeRequestFromCache): Ditto.
2311         (WebCore::MemoryCache::removeRequestFromSessionCaches): Remove request from all CachedResourceMaps, with multithread support.
2312         (WebCore::MemoryCache::removeRequestFromCacheImpl): Add sessionID parameter.
2313         (WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Iterate through all CachedResourceMaps.
2314         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
2315         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Pass on request to removeRequestFromSessionCachesImpl.
2316         (WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
2317         (WebCore::MemoryCache::setDisabled): Ditto.
2318         * loader/cache/MemoryCache.h: Create another level for cache.
2319         * platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
2320         (WebCore::SessionID>::copy):
2321         * platform/CrossThreadCopier.h:
2322         * platform/network/cf/ResourceRequest.h:
2323         (WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
2324         * rendering/RenderSnapshottedPlugIn.cpp:
2325         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
2326         * testing/Internals.cpp:
2327         (WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.
2328
2329 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
2330
2331         [GTK][CMake] Generate documentation for the DOM bindings
2332         https://bugs.webkit.org/show_bug.cgi?id=126211
2333
2334         Reviewed by Carlos Garcia Campos.
2335
2336         * PlatformGTK.cmake: Add some files to the GObjectDOMBindings build, so that the
2337         doc generation succeeds. Have the GObjectDOMBindings_INSTALLED_HEADERS variable contain
2338         all installed headers and use another variable for GIR generation. Create the configuration
2339         file for the gtkdoc generation.
2340
2341 2014-03-05  Zalan Bujtas  <zalan@apple.com>
2342
2343         Subpixel rendering: Wrong cliprect on absolute positioned elements.
2344         https://bugs.webkit.org/show_bug.cgi?id=129656
2345
2346         Reviewed by Simon Fraser.
2347
2348         outlineBoundsForRepaint() is expected to return the outline repaint rect. Using enclosingIntRect()
2349         to calculate the outline boundaries breaks repaint logic in RenderElement::repaintAfterLayoutIfNeeded().
2350         Since enclosingIntRect() can return bigger rect than repaint rect, the old/new bounds' dimensions could end up
2351         being different which triggers the size change repaint code path.
2352
2353         Test: fast/repaint/hidpi-absolute-positioned-element-wrong-cliprect-after-move.html
2354
2355         * rendering/RenderBox.cpp:
2356         (WebCore::RenderBox::outlineBoundsForRepaint):
2357         * rendering/RenderElement.cpp:
2358         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
2359         * rendering/svg/RenderSVGModelObject.cpp:
2360         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
2361
2362 2014-03-05  Krzysztof Czech  <k.czech@samsung.com>
2363
2364         [ATK] Expose missing functionalities of AtkTableCell to AT.
2365         https://bugs.webkit.org/show_bug.cgi?id=129492
2366
2367         Reviewed by Mario Sanchez Prada.
2368
2369         Implemented missing API of AtkTableCell.
2370
2371         No new tests. Covered by existing ones.
2372
2373         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
2374         (webkitAccessibleTableCellGetColumnSpan):
2375         (webkitAccessibleTableCellGetRowSpan):
2376         (webkitAccessibleTableCellGetPosition):
2377         (webkitAccessibleTableCellGetTable):
2378         (webkitAccessibleTableCellInterfaceInit):
2379
2380 2014-03-05  Andres Gomez  <agomez@igalia.com>
2381
2382         [GStreamer] WebSource doesn't need the "iradio-mode" property
2383         https://bugs.webkit.org/show_bug.cgi?id=129685
2384
2385         Reviewed by Philippe Normand.
2386
2387         Removed the "iradio-mode" property from the WK source element
2388         since this was only available for its modification from
2389         playbin/uridecodebin and, as discussed in GStreamer bug #725383,
2390         it was not being set and now is going to be removed.
2391
2392         It is safe just to send always the "icy-metadata" header set and
2393         deal with returning "icy" headers as we were already doing.
2394
2395         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2396         (webKitWebSrcSetProperty):
2397         (webKitWebSrcGetProperty):
2398         (webKitWebSrcStart):
2399
2400 2014-03-05  Chang Shu  <cshu@webkit.org>
2401
2402         Copying wrapping text results in multiple spaces between wrapped lines stripped.
2403         https://bugs.webkit.org/show_bug.cgi?id=129609.
2404
2405         Reviewed by Ryosuke Niwa.
2406
2407         While checking the condition of restoring the missing space, the collapsed spaces
2408         may not be exactly one.
2409
2410         editing/pasteboard/copy-text-with-wrapped-tag.html is enhanced to test this case.
2411
2412         * editing/TextIterator.cpp:
2413         (WebCore::TextIterator::handleTextBox):
2414
2415 2014-03-05  Ryosuke Niwa  <rniwa@webkit.org>
2416
2417         appendChild shouldn't invalidate LiveNodeLists and HTMLCollections if they don't have valid caches
2418         https://bugs.webkit.org/show_bug.cgi?id=129727
2419
2420         Reviewed by Andreas Kling.
2421
2422         Before this patch, invalidateNodeListAndCollectionCachesInAncestors invalidated node lists and HTML
2423         collections on ancestors of a node whenever we're inserting or removing a child node. This patch
2424         makes HTMLCollections and LiveNodeLists register themselves with Document only when they have valid
2425         caches.
2426
2427         Each user of CollectionIndexCache now implements willValidateIndexCache member function that gets
2428         called when CollectionIndexCache caches any state and necessitates the registration with document.
2429
2430         * dom/ChildNodeList.h: Added an empty willValidateIndexCache since child node lists are never
2431         registered with document.
2432
2433         * dom/CollectionIndexCache.h:
2434         (WebCore::CollectionIndexCache::hasValidCache): Added.
2435         (WebCore::CollectionIndexCache::nodeCount): Calls willValidateIndexCache when caching node count.
2436         (WebCore::CollectionIndexCache::nodeAfterCached): Ditto. Also assert that hasValidCache() true in
2437         the cases where we're simply updating our caches or adding more caches.
2438         (WebCore::CollectionIndexCache::nodeAt): Ditto. Also added a code to set the length cache when
2439         we've reached the end of the list. This should be a slight speed up on some cases.
2440
2441         * dom/Document.cpp:
2442         (WebCore::Document::Document): Initializes a variable used by assertions.
2443         (WebCore::Document::unregisterNodeList): Added an early exit for when m_listsInvalidatedAtDocument
2444         is empty since invalidateNodeListAndCollectionCaches swaps out the list.
2445         (WebCore::Document::registerCollection): Removed the boolean hasIdNameMap since we now explicitly
2446         call collectionCachedIdNameMap in HTMLCollection.
2447         (WebCore::Document::unregisterCollection): Ditto. Exit early if m_collectionsInvalidatedAtDocument
2448         is empty since invalidateNodeListAndCollectionCaches swaps out the list.
2449         * dom/Document.h:
2450
2451         * dom/LiveNodeList.cpp:
2452         (WebCore::LiveNodeList::invalidateCache): Unregister the node list with document if we had caches.
2453         * dom/LiveNodeList.h:
2454         (WebCore::LiveNodeList::LiveNodeList):
2455         (WebCore::LiveNodeList::~LiveNodeList): Ditto.
2456         (WebCore::LiveNodeList::invalidateCache): Pass around document. This is necessary since document()
2457         had already moved to the new document inside NodeListsNodeData::invalidateCaches.
2458         (WebCore::LiveNodeList::willValidateIndexCache): Added. Registers itself with document.
2459
2460         * dom/Node.cpp:
2461         (WebCore::Document::invalidateNodeListAndCollectionCaches): Swap the lists since invalidateCache
2462         tries to unregister node lists and HTML collections with document. Since this is the only case in
2463         which node lists and HTML collections being removed may not be in the lists in unregisterNodeList
2464         and unregisterCollection, assert this condition via m_inInvalidateNodeListAndCollectionCaches.
2465         (WebCore::NodeListsNodeData::invalidateCaches):
2466
2467         * dom/NodeRareData.h:
2468         (WebCore::NodeListsNodeData::adoptDocument): Unregister node lists and HTML collections from old
2469         document via invalidateCache. We need to explicitly pass in oldDocument here since owner node's
2470         document had already been changed to newDocument at this point. Since we're invalidating caches,
2471         there is no need to register node lists and HTML collections with newDocument.
2472
2473         * html/HTMLCollection.cpp:
2474         (WebCore::HTMLCollection::HTMLCollection):
2475         (WebCore::HTMLCollection::~HTMLCollection): Unregister the node list with document if we had caches.
2476         (WebCore::HTMLCollection::invalidateCache): Ditto.
2477         (WebCore::HTMLCollection::invalidateNamedElementCache):
2478         * html/HTMLCollection.h:
2479         (WebCore::HTMLCollection::invalidateCache): Pass around document as done in LiveNodeList.
2480         (WebCore::HTMLCollection::willValidateIndexCache): Ditto.
2481
2482         * html/HTMLFormControlsCollection.cpp:
2483         (WebCore::HTMLFormControlsCollection::invalidateCache): Ditto.
2484         * html/HTMLFormControlsCollection.h:
2485
2486         * html/HTMLSelectElement.cpp:
2487         (WebCore::HTMLSelectElement::invalidateSelectedItems): Ditto.
2488         (WebCore::HTMLSelectElement::setRecalcListItems): Ditto.
2489
2490 2014-03-05  Jon Lee  <jonlee@apple.com>
2491
2492         Fix linker error after r165087
2493         https://bugs.webkit.org/show_bug.cgi?id=129730
2494
2495         Reviewed by Csaba Osztrogonác.
2496
2497         * WebCore.exp.in: Remove undefined symbol __ZN7WebCore32WebVideoFullscreenChangeObserverD2Ev.
2498
2499 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2500
2501         Enable device pixel repaint rect tracking.
2502         https://bugs.webkit.org/show_bug.cgi?id=129712
2503
2504         Reviewed by Simon Fraser.
2505
2506         Tracked repaint rects are device pixel snapped now to support hiDPI test cases.
2507
2508         Test: fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking.html
2509
2510         * WebCore.exp.in:
2511         * page/FrameView.cpp:
2512         (WebCore::FrameView::addTrackedRepaintRect):
2513         (WebCore::FrameView::trackedRepaintRectsAsText): Print them as LayoutUnits to get
2514         trailing zeros cut off.
2515         * page/FrameView.h:
2516         * rendering/RenderLayer.cpp:
2517         (WebCore::RenderLayer::calculateClipRects):
2518         * rendering/RenderLayer.h:
2519         * rendering/RenderLayerBacking.cpp:
2520         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
2521         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
2522         * rendering/RenderView.cpp:
2523         (WebCore::RenderView::repaintViewRectangle):
2524
2525 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2526
2527         Don't clamp scrolling node offsets when the offset is changed by delegated scrolling
2528         https://bugs.webkit.org/show_bug.cgi?id=129724
2529
2530         Reviewed by Sam Weinig.
2531         
2532         Call setScrollPositionWithoutContentEdgeConstraints() from
2533         ScrollingTree::scrollPositionChangedViaDelegatedScrolling() so that
2534         layers are not clamped during rubber-banding.
2535         
2536         This requires making setScrollPositionWithoutContentEdgeConstraints()
2537         a pure virtual function on the base class.
2538
2539         * page/scrolling/ScrollingTree.cpp:
2540         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
2541         * page/scrolling/ScrollingTreeScrollingNode.h:
2542         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
2543         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2544
2545 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
2546
2547         WebVideoFullscreen, should make the hand off of the video layer explicit.
2548         https://bugs.webkit.org/show_bug.cgi?id=128844
2549
2550         Reviewed by Simon Fraser.
2551
2552         This change introduces a more explicit hand-off of the video layer.
2553         This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
2554         WebVideoFullscreenModel <-> WebVideoFullscreenInterface
2555               enterFullScreen(*) ->
2556                                 <- borrowVideoLayer
2557               willLendVideoLayer ->
2558                didLendVideoLayer ->
2559                                 <- didEnterFullscreen
2560                                 ...
2561                                 <- requestExitFullscreen
2562                   exitFullscreen ->
2563                                 <- returnVideoLayer
2564                                 <- didExitFullscreen
2565         (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
2566
2567         * WebCore.exp.in:
2568         Export new functions in WebVideoFullscreenInterfaceAVKit, WebVideoFullscreenModelMediaElement, etc.
2569
2570         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2571         Add WebVideoFullscreenControllerChangeObserver to forward fullscreen callbacks to WebVideoFullscreenController
2572
2573         (WebVideoFullscreenControllerChangeObserver::setTarget):
2574         Sets obj-c target of fullscreen change callbacks.
2575
2576         (-[WebVideoFullscreenController init]):
2577         Point _changeObserver's target at self.
2578
2579         (-[WebVideoFullscreenController dealloc]):
2580         Clear _changeObserver's target.
2581
2582         (-[WebVideoFullscreenController enterFullscreen:]):
2583         Retain self to prevent dealloc during animation or while fullscreen.
2584         Connect _interface to _changeObserver.
2585
2586         (-[WebVideoFullscreenController exitFullscreen]):
2587         Remove use of completion move cleanup to -didExitFullscreen.
2588
2589         (-[WebVideoFullscreenController didEnterFullscreen]):
2590         Nothing to see here.
2591
2592         (-[WebVideoFullscreenController didExitFullscreen]):
2593         Move clean up code that was in a completion to here.
2594
2595         * platform/ios/WebVideoFullscreenInterface.h:
2596         Add delarations for more explicit hand-off of video layer.
2597
2598         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2599         Add WebVideoFullscreenChangeObserver to notify when fullscreen animations complete.
2600         Add declarations for more explicit hand-off of video layer.
2601         Add WebAVPlayerLayer now always wraps the m_videoLayer to prevent default behavior
2602         of AVPlayerLayer.
2603
2604         (WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
2605         Add empty virtual destructor.
2606
2607         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2608         Include AVKit headers instead of declaring everything locally.
2609         AVPlayerLayer protocol renamed to AVVideoLayer per AVKit.
2610
2611         (-[WebAVPlayerController dealloc]):
2612         Don't refer to self.
2613
2614         (-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
2615         Pause before requesting exit fullscreen.
2616
2617         (-[WebAVPlayerLayer setPlayerController:]):
2618         This is required by AVVideoLayer, but we don't need it.
2619
2620         (WebVideoFullscreenInterfaceAVKit::playerController):
2621         White space.
2622
2623         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenChangeObserver):
2624         Set observer to forward fullscreen changes to.
2625
2626         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
2627         Use more explicit video layer hand-off.
2628
2629         (WebVideoFullscreenInterfaceAVKit::doEnterFullscreen):
2630         Move enterFullscreen logic here.
2631         AVPlayerViewController now takes the video layer at init time.
2632         Always provide a video layer wrapped in a WebAVPlayerLayer.
2633
2634         (WebVideoFullscreenInterfaceAVKit::willLendVideoLayer):
2635         Use more explicit video layer hand-off.
2636
2637         (WebVideoFullscreenInterfaceAVKit::didLendVideoLayer):
2638         Use more explicit video layer hand-off.
2639
2640         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2641         Use more explicit video layer hand-off.
2642
2643         * platform/ios/WebVideoFullscreenModel.h:
2644         Add functions for more explicit video layer hand-off.
2645
2646         * platform/ios/WebVideoFullscreenModelMediaElement.h:
2647         Mark virtual functions as virtual.
2648         Add changes for WebVideoFullscreenModel.
2649
2650         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2651         Use more explicit video layer hand-off.
2652
2653         (WebVideoFullscreenModelMediaElement::setMediaElement):
2654         Don't push the video layer. Wait for a request for it.
2655
2656         (WebVideoFullscreenModelMediaElement::handleEvent):
2657         Make sure m_videoFullscreenInterface is valid.
2658
2659         (WebVideoFullscreenModelMediaElement::borrowVideoLayer):
2660         Use more explicit video layer hand-off.
2661         Lend videoLayer in request to a request to borrow the videoLayer.
2662         Make sure to retain the video layer before it is removed from the layer tree.
2663
2664         (WebVideoFullscreenModelMediaElement::returnVideoLayer):
2665         Use more explicit video layer hand-off.
2666
2667         (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
2668         Don't clear the mediaElement reference until completely exited from fullscreen.
2669
2670 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2671
2672         Get position:fixed working slightly better on iOS
2673         https://bugs.webkit.org/show_bug.cgi?id=129714
2674
2675         Reviewed by Benjamin Poulain.
2676
2677         Send the scroll position as a FloatPoint, rather than an IntPoint.
2678
2679         * WebCore.exp.in:
2680         * page/scrolling/ScrollingTree.cpp:
2681         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
2682         * page/scrolling/ScrollingTree.h:
2683
2684 2014-03-04  Alex Christensen  <achristensen@webkit.org>
2685
2686         Fixed Windows build without MEDIA_CONTROLS_SCRIPT enabled.
2687         https://bugs.webkit.org/show_bug.cgi?id=129701
2688
2689         Reviewed by Jer Noble.
2690
2691         * WebCore.vcxproj/WebCore.vcxproj:
2692         * DerivedSources.cpp:
2693         Moved UserAgentScriptsData.cpp to DerivedSources.cpp to only be built if MEDIA_CONTROLS_SCRIPT is enabled.
2694         * DerivedSources.make:
2695         Only generate UserAgentScripts.cpp/h when USER_AGENT_SCRIPTS is non-empty.
2696         * rendering/RenderThemeWin.cpp:
2697         Only include UserAgentScripts.h when MEDIA_CONTROLS_SCRIPT is enabled.
2698
2699 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2700
2701         Allow iOS DumpRenderTree crashes to show application-specific information
2702         https://bugs.webkit.org/show_bug.cgi?id=129705
2703
2704         Reviewed by David Kilzer.
2705
2706         Make the WKSI function SetCrashReportApplicationSpecificInformation available
2707         in iOS simulator builds.
2708
2709         * WebCore.exp.in:
2710         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2711         * platform/mac/WebCoreSystemInterface.h:
2712
2713 2014-03-04  Andreas Kling  <akling@apple.com>
2714
2715         Spam static branch prediction hints on JS bindings.
2716         <https://webkit.org/b/129703>
2717
2718         Add UNLIKELY hints to all !castedThis and exec->hadException() paths
2719         in the JS bindings since they are almost always going to get skipped.
2720
2721         Reviewed by Geoff Garen.
2722
2723         * bindings/scripts/CodeGeneratorJS.pm:
2724         (GenerateImplementation):
2725         (GenerateParametersCheck):
2726         (GenerateImplementationFunctionCall):
2727         (GenerateConstructorDefinition):
2728
2729 2014-03-04  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2730
2731         Remove unused StdDeviation from Gaussian Blur effect
2732         https://bugs.webkit.org/show_bug.cgi?id=129693
2733
2734         Reviewed by Simon Fraser.
2735
2736         No new tests, no change on behavior.
2737
2738         * platform/graphics/filters/FEGaussianBlur.cpp:
2739         * platform/graphics/filters/FEGaussianBlur.h:
2740
2741 2014-03-04  Andreas Kling  <akling@apple.com>
2742
2743         Add a Document::updateStyleIfNeededForNode(Node&).
2744         <https://webkit.org/b/129689>
2745
2746         Generalize the mechanism that computed style uses to avoid doing full
2747         style updates when the node we're interested in isn't actually dirty.
2748
2749         Reviewed by Antti Koivisto.
2750
2751         * css/CSSComputedStyleDeclaration.cpp:
2752         (WebCore::ComputedStyleExtractor::propertyValue):
2753         * dom/Document.cpp:
2754         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
2755         (WebCore::Document::updateStyleIfNeededForNode):
2756         * dom/Document.h:
2757         * editing/htmlediting.cpp:
2758         (WebCore::isEditablePosition):
2759         * html/HTMLInputElement.cpp:
2760         (WebCore::HTMLInputElement::defaultEventHandler):
2761
2762 2014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
2763
2764         Merge API shims and JSLock
2765         https://bugs.webkit.org/show_bug.cgi?id=129650
2766
2767         Reviewed by Mark Lam.
2768
2769         No new tests.
2770
2771         JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
2772         to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
2773
2774         * bindings/js/DOMRequestState.h:
2775         (WebCore::DOMRequestState::Scope::Scope):
2776         * bindings/js/JSDOMPromise.h:
2777         (WebCore::DeferredWrapper::resolve):
2778         (WebCore::DeferredWrapper::reject):
2779         (WebCore::DeferredWrapper::resolve<String>):
2780         (WebCore::DeferredWrapper::resolve<bool>):
2781         (WebCore::char>>):
2782         (WebCore::DeferredWrapper::reject<String>):
2783         * bindings/js/ScriptController.cpp:
2784         (WebCore::ScriptController::evaluateInWorld):
2785         * bindings/js/SerializedScriptValue.cpp:
2786         (WebCore::SerializedScriptValue::create):
2787         (WebCore::SerializedScriptValue::deserialize):
2788
2789 2014-03-04  Beth Dakin  <bdakin@apple.com>
2790
2791         REGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
2792         https://bugs.webkit.org/show_bug.cgi?id=129691
2793         -and corresponding-
2794         <rdar://problem/15666846>
2795
2796         Reviewed by Simon Fraser.
2797
2798         This regression started happening after we adopted the setPresentationValue 
2799         ScrollbarPainter API which allows us to update the position of the scrollbar knob 
2800         from our secondary scrolling thread. The bug occurs when the scrollbar grows while 
2801         it still thinks it is in presentation-value mode. Whenever the scrollbar grows, it 
2802         should be in non-presentation value mode.
2803
2804         If the wheel event has ended or been cancelled, we can switch out of presentation 
2805         value mode.
2806         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2807         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
2808
2809         Sometimes we will grow the scrollbar before we have received a wheel event with 
2810         the end or cancelled phase, and so automatically switch out of presentation-value 
2811         mode whenever we start one of these animations.
2812         * platform/mac/ScrollAnimatorMac.mm:
2813         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2814
2815 2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
2816
2817         Move Source/WebCore/html/track/ code to std::unique_ptr
2818         https://bugs.webkit.org/show_bug.cgi?id=129666
2819
2820         Reviewed by Eric Carlson.
2821
2822         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/track/ with std::unique_ptr.
2823
2824         * html/track/AudioTrack.h:
2825         * html/track/InbandWebVTTTextTrack.cpp:
2826         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):
2827         * html/track/InbandWebVTTTextTrack.h:
2828         * html/track/LoadableTextTrack.cpp:
2829         (WebCore::LoadableTextTrack::loadTimerFired):
2830         (WebCore::LoadableTextTrack::newCuesAvailable):
2831         (WebCore::LoadableTextTrack::cueLoadingCompleted):
2832         (WebCore::LoadableTextTrack::newRegionsAvailable):
2833         * html/track/LoadableTextTrack.h:
2834         * html/track/TextTrack.h:
2835         * html/track/TextTrackCue.h:
2836         * html/track/TextTrackRegion.h:
2837         * html/track/VTTCue.cpp:
2838         (WebCore::VTTCue::createWebVTTNodeTree):
2839         (WebCore::VTTCue::markFutureAndPastNodes):
2840         * html/track/VTTCue.h:
2841         * html/track/VideoTrack.h:
2842         * html/track/WebVTTParser.cpp:
2843         (WebCore::WebVTTParser::WebVTTParser):
2844         * html/track/WebVTTParser.h:
2845         * html/track/WebVTTTokenizer.h:
2846         * loader/TextTrackLoader.cpp:
2847         (WebCore::TextTrackLoader::processNewCueData):
2848         * loader/TextTrackLoader.h:
2849
2850 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2851
2852         Subpixel rendering: Make border-radius painting device pixel aware.
2853         https://bugs.webkit.org/show_bug.cgi?id=129558
2854
2855         Reviewed by Simon Fraser.
2856
2857         Snap rounded rects to device pixels right before passing them to GraphicsContext.
2858
2859         * rendering/RenderBoxModelObject.cpp:
2860         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
2861         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2862         (WebCore::RenderBoxModelObject::paintBorder):
2863         * rendering/RenderBoxModelObject.h:
2864         * rendering/RenderReplaced.cpp:
2865         (WebCore::RenderReplaced::paint):
2866         * rendering/RenderWidget.cpp:
2867         (WebCore::RenderWidget::paint):
2868
2869 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2870
2871         Crashes and assertions running iOS compositing tests
2872         https://bugs.webkit.org/show_bug.cgi?id=129688
2873
2874         Reviewed by Dean Jackson.
2875         
2876         When a layer is no longer composited, we need to unregister it
2877         from the scrolling coordinator, and remove it from m_scrollCoordinatedLayers.
2878
2879         Tested by compositing tests on iOS.
2880
2881         * rendering/RenderLayerCompositor.cpp:
2882         (WebCore::RenderLayerCompositor::updateBacking):
2883
2884 2014-03-04  Antti Koivisto  <antti@apple.com>
2885
2886         Update bindings test results after r165046.
2887
2888         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2889         (webkit_dom_test_obj_set_property):
2890         (webkit_dom_test_obj_set_reflected_string_attr):
2891         (webkit_dom_test_obj_set_reflected_url_attr):
2892         (webkit_dom_test_obj_set_reflected_custom_url_attr):
2893         * bindings/scripts/test/JS/JSTestObj.cpp:
2894         (WebCore::setJSTestObjReflectedStringAttr):
2895         (WebCore::setJSTestObjReflectedURLAttr):
2896         (WebCore::setJSTestObjReflectedCustomURLAttr):
2897         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2898         (-[DOMTestObj setReflectedStringAttr:]):
2899         (-[DOMTestObj setReflectedURLAttr:]):
2900         (-[DOMTestObj setReflectedCustomURLAttr:]):
2901
2902 2014-03-04  Martin Robinson  <mrobinson@igalia.com>
2903
2904         [GTK] Simplify the GObject DOM bindings API break check into one step
2905         https://bugs.webkit.org/show_bug.cgi?id=129571
2906
2907         Reviewed by Carlos Garcia Campos.
2908
2909         * bindings/gobject/GNUmakefile.am: We no longer generate the webkitdom.symbols file in the
2910         DerivedSources directory. All the logic is handled internally in the script now.
2911         * bindings/scripts/gobject-run-api-break-test: Removed.
2912
2913 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2914
2915         Build fix for iOS.
2916
2917         * rendering/RenderThemeIOS.mm:
2918         (WebCore::RenderThemeIOS::addRoundedBorderClip):
2919         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
2920
2921 2014-03-04  Zalan Bujtas  <zalan@apple.com>
2922
2923         Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
2924         https://bugs.webkit.org/show_bug.cgi?id=129557
2925
2926         Reviewed by Simon Fraser.
2927
2928         This is the preparation for snapping rounded rects to device pixel position. It enables
2929         device pixel aware border-radius painting.
2930
2931         No change in functionality.
2932
2933         * platform/efl/RenderThemeEfl.cpp:
2934         (WebCore::RenderThemeEfl::paintMediaSliderThumb):
2935         * platform/graphics/FloatRoundedRect.cpp:
2936         (WebCore::FloatRoundedRect::FloatRoundedRect):
2937         (WebCore::FloatRoundedRect::isRenderable):
2938         * platform/graphics/FloatRoundedRect.h:
2939         * platform/graphics/GraphicsContext.cpp:
2940         (WebCore::GraphicsContext::clipRoundedRect):
2941         (WebCore::GraphicsContext::clipOutRoundedRect):
2942         (WebCore::GraphicsContext::fillRoundedRect):
2943         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2944         * platform/graphics/GraphicsContext.h:
2945         * platform/graphics/Path.cpp:
2946         (WebCore::Path::addRoundedRect):
2947         * platform/graphics/Path.h:
2948         * platform/graphics/RoundedRect.cpp:
2949         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
2950         * platform/graphics/RoundedRect.h:
2951         * platform/graphics/ShadowBlur.cpp:
2952         (WebCore::ShadowBlur::drawRectShadow):
2953         (WebCore::ShadowBlur::drawInsetShadow):
2954         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2955         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2956         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2957         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2958         * platform/graphics/ShadowBlur.h:
2959         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2960         (WebCore::GraphicsContext::fillRect):
2961         (WebCore::GraphicsContext::platformFillRoundedRect):
2962         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2963         * platform/graphics/cg/GraphicsContextCG.cpp:
2964         (WebCore::GraphicsContext::fillRect):
2965         (WebCore::GraphicsContext::platformFillRoundedRect):
2966         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2967         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2968         (WebCore::GraphicsContext::fillRoundedRect):
2969         * platform/gtk/RenderThemeGtk.cpp:
2970         (WebCore::borderRadiiFromStyle):
2971         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
2972         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
2973         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
2974         * platform/win/DragImageWin.cpp:
2975         (WebCore::createDragImageForLink):
2976         * rendering/RenderBox.cpp:
2977         (WebCore::RenderBox::paintBoxDecorations):
2978         (WebCore::RenderBox::pushContentsClip):
2979         * rendering/RenderBoxModelObject.cpp:
2980         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
2981         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2982         (WebCore::RenderBoxModelObject::paintBorder):
2983         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2984         (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
2985         (WebCore::RenderBoxModelObject::paintBoxShadow):
2986         * rendering/RenderLayer.cpp:
2987         (WebCore::RenderLayer::clipToRect):
2988         * rendering/RenderThemeIOS.mm:
2989         (WebCore::RenderThemeIOS::paintRadioDecorations):
2990         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
2991         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
2992         (WebCore::RenderThemeIOS::paintSliderTrack):
2993         (WebCore::RenderThemeIOS::paintProgressBar):
2994         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
2995         * rendering/RenderThemeMac.mm:
2996         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2997         (WebCore::RenderThemeMac::paintSliderTrack):
2998         * rendering/RenderThemeSafari.cpp:
2999         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
3000         (WebCore::RenderThemeSafari::paintSliderTrack):
3001         * rendering/shapes/BoxShape.cpp:
3002         (WebCore::BoxShape::buildDisplayPaths):
3003         * rendering/style/BasicShapes.cpp:
3004         (WebCore::BasicShapeInset::path):
3005
3006 2014-03-04  Andreas Kling  <akling@apple.com>
3007
3008         Micro-optimize Strings in JS bindings.
3009         <https://webkit.org/b/129673>
3010
3011         Tweaked for new jsStringWithWeakOwner signature. This patch removes
3012         36 bytes of code from every wrapper getter that returns a DOMString.
3013
3014         Reviewed by Ryosuke Niwa.
3015
3016         * bindings/js/JSDOMBinding.h:
3017         (WebCore::jsStringWithCache):
3018
3019 2014-03-03  David Kilzer  <ddkilzer@apple.com>
3020
3021         SVGPropertyTearOffs should detachChildren before deleting its value.
3022         <http://webkit.org/b/129618>
3023         <rdar://problem/15661617>
3024
3025         Reviewed by Maciej Stachowiak.
3026
3027         Merged from Blink (patch by kouhei@chromium.org):
3028         https://src.chromium.org/viewvc/blink?revision=158563&view=revision
3029         http://crbug.com/296276
3030
3031         Test: svg/transforms/svg-matrix-tearoff-crash.html
3032
3033         NOTE: The test does not reproduce a crash on WebKit using
3034         JavaScriptCore.
3035
3036         * svg/properties/SVGPropertyTearOff.h:
3037         (WebCore::SVGPropertyTearOff::setValue):
3038         (WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):
3039         - Call detachChildren() if m_value is a copy.  The original
3040           Blink patch did not modify the destructor code path, although
3041           that seems obvious via code inspection.
3042
3043 2014-03-04  Zalan Bujtas  <zalan@apple.com>
3044
3045         Subpixel rendering: Incorrect repaint rect cuts off content's right edge after move.
3046         https://bugs.webkit.org/show_bug.cgi?id=129652
3047
3048         Reviewed by Simon Fraser.
3049
3050         When repaint rect is adjusted in order to take the distance from renderer into account,
3051         the accumulated fraction value need to be added too. This is always a positive value.
3052
3053         Test: fast/borders/hidpi-border-clipping-right-after-move.html
3054
3055         * rendering/RenderLayerBacking.cpp:
3056         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
3057
3058 2014-03-04  Ryuan Choi  <ryuan.choi@samsung.com>
3059
3060         Remove unused member variable of NetworkInfoController
3061         https://bugs.webkit.org/show_bug.cgi?id=129674
3062
3063         Reviewed by Gyuyoung Kim.
3064
3065         * Modules/networkinfo/NetworkInfoController.cpp:
3066         (WebCore::NetworkInfoController::NetworkInfoController):
3067         (WebCore::NetworkInfoController::create):
3068         (WebCore::provideNetworkInfoTo):
3069         * Modules/networkinfo/NetworkInfoController.h: Removed m_page which is not really used.
3070
3071 2014-02-07  Sergio Villar Senin  <svillar@igalia.com>
3072
3073         [CSS Grid Layout] Percentages of indefinite sizes should compute to auto
3074         https://bugs.webkit.org/show_bug.cgi?id=128173
3075
3076         Reviewed by Darin Adler.
3077
3078         We should treat percentages of indefinite sizes as auto as
3079         mandated by the spec. Otherwise we would end up calculating a
3080         percentage of -1, the value we use to represent infinite.
3081
3082         Added some test cases to the current tests.
3083
3084         * rendering/RenderGrid.cpp:
3085         (WebCore::RenderGrid::gridTrackSize):
3086         * rendering/style/GridTrackSize.h:
3087         (WebCore::GridTrackSize::isPercentage):
3088
3089 2014-03-04  Ryosuke Niwa  <rniwa@webkit.org>
3090
3091         Don't synchronize attributes in reflect setters when we don't need to
3092         https://bugs.webkit.org/show_bug.cgi?id=129662
3093
3094         Reviewed by Andreas Kling.
3095
3096         The vast majority of attributes don't need synchronization. Avoid calling synchronizeAttribute in setters
3097         for those content attributes generated by "Reflect" keyword in IDL.
3098
3099         * bindings/scripts/CodeGenerator.pm:
3100         (SetterExpression):
3101         * dom/Element.cpp:
3102         (WebCore::Element::setAttributeWithoutSynchronization): Added.
3103         * dom/Element.h:
3104
3105 2014-03-04  Andreas Kling  <akling@apple.com>
3106
3107         Remove Document::idAttributeName().
3108         <https://webkit.org/b/129663>
3109
3110         Reviewed by Ryosuke "DYEB" Niwa.
3111
3112         This abstraction is not actually used and causes unnecessary indirection
3113         in some pretty hot code paths.
3114
3115         Replace it with hard-coded HTMLNames::idAttr instead which is a compile
3116         time constant pointer. We can revisit this in the future if we wish to
3117         implement support for custom id attributes.
3118
3119         * dom/Attr.cpp:
3120         (WebCore::Attr::isId):
3121         * dom/Document.cpp:
3122         (WebCore::Document::Document):
3123         * dom/Document.h:
3124         * dom/Element.cpp:
3125         (WebCore::Element::attributeChanged):
3126         (WebCore::Element::willModifyAttribute):
3127         * dom/Element.h:
3128         (WebCore::Element::getIdAttribute):
3129         (WebCore::Element::getNameAttribute):
3130         (WebCore::Element::setIdAttribute):
3131         * html/HTMLElement.cpp:
3132         (WebCore::HTMLElement::parseAttribute):
3133         * html/HTMLFrameElementBase.cpp:
3134         (WebCore::HTMLFrameElementBase::parseAttribute):
3135         * html/HTMLMapElement.cpp:
3136         (WebCore::HTMLMapElement::parseAttribute):
3137         * svg/SVGElement.cpp:
3138         (WebCore::SVGElement::attributeChanged):
3139         (WebCore::SVGElement::isKnownAttribute):
3140         (WebCore::SVGElement::svgAttributeChanged):
3141
3142 2014-03-04  Ryosuke Niwa  <rniwa@webkit.org>
3143
3144         REGRESSION(r164856): Use after free in WebCore::QualifiedName::operator== / WebCore::StyledElement::attributeChanged
3145         https://bugs.webkit.org/show_bug.cgi?id=129550
3146
3147         Reviewed by Andreas Kling.
3148
3149         We can't store a reference to QualifiedName here because ensureUniqueElementData could delete QualifiedName inside Attribute.
3150
3151         Test: fast/dom/uniquing-attributes-via-setAttribute.html
3152
3153         * dom/Element.cpp:
3154         (WebCore::Element::setAttributeInternal):
3155
3156 2014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
3157
3158         Move EvasGLContext and EvasGLSurface files into the efl common directory.
3159         https://bugs.webkit.org/show_bug.cgi?id=129603
3160
3161         Reviewed by Gyuyoung Kim.
3162
3163         EFL port will use EvasGLContext and EvasGLSurface files in both WK1 and WK2.
3164
3165         No new tests, just refactorings.
3166
3167         * PlatformEfl.cmake:
3168         * platform/graphics/efl/EvasGLContext.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp.
3169         (WebKit::EvasGLContext::EvasGLContext):
3170         (WebKit::EvasGLContext::~EvasGLContext):
3171         * platform/graphics/efl/EvasGLContext.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.h.
3172         (WebKit::EvasGLContext::create):
3173         (WebKit::EvasGLContext::context):
3174         * platform/graphics/efl/EvasGLSurface.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp.
3175         (WebKit::EvasGLSurface::EvasGLSurface):
3176         (WebKit::EvasGLSurface::~EvasGLSurface):
3177         * platform/graphics/efl/EvasGLSurface.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h.
3178         (WebKit::EvasGLSurface::create):
3179         (WebKit::EvasGLSurface::surface):
3180
3181 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
3182
3183         Fix the GTK+ CMake build
3184
3185         * PlatformGTK.cmake: Add a missing file to the source list.
3186
3187 2014-03-03  Sanghyup Lee  <sh53.lee@samsung.com>
3188
3189         :active style is not cleared when its display property is set to none before mouse released.
3190         https://bugs.webkit.org/show_bug.cgi?id=129465
3191
3192         Reviewed by Antonio Gomes.
3193
3194         Source/WebCore:
3195
3196         We currently clearing the :active style when element has a renderer.
3197         This patch makes elements clear its active style regardless of renderer. 
3198
3199         * dom/Document.cpp:
3200         (WebCore::Document::updateHoverActiveState):
3201
3202         LayoutTests:
3203
3204         * fast/css/active-display-none-expected.txt: Added.
3205         * fast/css/active-display-none.html: Added.
3206
3207
3208 2014-03-03  Andreas Kling  <akling@apple.com>
3209
3210         Remove 2 unnecessary includes from JSDOMBinding.h
3211         <https://webkit.org/b/129619>
3212
3213         Reviewed by Antti Koivisto.
3214
3215         * bindings/js/JSDOMBinding.h:
3216
3217 2014-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
3218
3219         GraphicsContext::drawLineForText needs to be exported from WebCore.dylib for iOS builds
3220         https://bugs.webkit.org/show_bug.cgi?id=129647
3221
3222         Reviewed by NOBODY (This is a build fix).
3223
3224         Fixing after r165025 and r165016.
3225
3226         No new tests as this is a build fix.
3227
3228         * WebCore.exp.in:
3229
3230 2014-03-03  Jer Noble  <jer.noble@apple.com>
3231
3232         [iOS] Start playback button misplaced
3233         https://bugs.webkit.org/show_bug.cgi?id=129628
3234
3235         Reviewed by Simon Fraser.
3236
3237         On YouTube embeds, while the video is loading it is placed into the DOM with a 0x0 size.
3238         This causes the start playback button to be visible in the upper-left corner of the embed
3239         area. The button wasn't visible previously (in plugin mode) because the plugin clipped its
3240         drawing to its bounds, and so the <video> shadow should do the same.
3241
3242         * Modules/mediacontrols/mediaControlsiOS.css:
3243         (::-webkit-media-controls):
3244
3245 2014-03-03  Enrica Casucci  <enrica@apple.com>
3246
3247         Build fix for iOS simulator.
3248
3249         * WebCore.exp.in:
3250
3251 2014-03-03  Jeremy Jones  <jeremyj@apple.com>
3252
3253         Forward application suspend resume notifications to the web process.
3254         https://bugs.webkit.org/show_bug.cgi?id=129356
3255
3256         Reviewed by Eric Carlson.
3257
3258         * platform/audio/ios/MediaSessionManagerIOS.mm:
3259         (-[WebMediaSessionHelper initWithCallback:]):
3260         Observe UIApplicationDidBecomeActiveNotification,
3261         WebUIApplicationDidBecomeActiveNotification,
3262         WebUIApplicationWillEnterForegroundNotification, and
3263         WebUIApplicationWillResignActiveNotification
3264         
3265         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
3266         Resume session.
3267
3268 2014-03-03  Commit Queue  <commit-queue@webkit.org>
3269
3270         Unreviewed, rolling out r165013.
3271         http://trac.webkit.org/changeset/165013
3272         https://bugs.webkit.org/show_bug.cgi?id=129646
3273
3274         New code is not thread safe, asserting on a worker test
3275         (Requested by ap on #webkit).
3276
3277         * WebCore.exp.in:
3278         * editing/DeleteButtonController.cpp:
3279         (WebCore::DeleteButtonController::createDeletionUI):
3280         * html/DOMURL.cpp:
3281         (WebCore::DOMURL::revokeObjectURL):
3282         * inspector/InspectorPageAgent.cpp:
3283         (WebCore::InspectorPageAgent::cachedResource):
3284         * inspector/InspectorResourceAgent.cpp:
3285         (WebCore::InspectorResourceAgent::replayXHR):
3286         * loader/DocumentLoader.cpp:
3287         (WebCore::areAllLoadersPageCacheAcceptable):
3288         * loader/FrameLoader.cpp:
3289         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
3290         * loader/ImageLoader.cpp:
3291         (WebCore::ImageLoader::updateFromElement):
3292         * loader/archive/cf/LegacyWebArchive.cpp:
3293         (WebCore::LegacyWebArchive::create):
3294         * loader/cache/CachedCSSStyleSheet.cpp:
3295         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3296         * loader/cache/CachedCSSStyleSheet.h:
3297         * loader/cache/CachedFont.cpp:
3298         (WebCore::CachedFont::CachedFont):
3299         * loader/cache/CachedFont.h:
3300         * loader/cache/CachedImage.cpp:
3301         (WebCore::CachedImage::CachedImage):
3302         * loader/cache/CachedImage.h:
3303         * loader/cache/CachedRawResource.cpp:
3304         (WebCore::CachedRawResource::CachedRawResource):
3305         * loader/cache/CachedRawResource.h:
3306         * loader/cache/CachedResource.cpp:
3307         (WebCore::CachedResource::CachedResource):
3308         (WebCore::CachedResource::~CachedResource):
3309         * loader/cache/CachedResource.h:
3310         * loader/cache/CachedResourceLoader.cpp:
3311         (WebCore::createResource):
3312         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3313         (WebCore::CachedResourceLoader::requestResource):
3314         (WebCore::CachedResourceLoader::revalidateResource):
3315         (WebCore::CachedResourceLoader::loadResource):
3316         * loader/cache/CachedResourceLoader.h:
3317         * loader/cache/CachedSVGDocument.cpp:
3318         (WebCore::CachedSVGDocument::CachedSVGDocument):
3319         * loader/cache/CachedSVGDocument.h:
3320         * loader/cache/CachedScript.cpp:
3321         (WebCore::CachedScript::CachedScript):
3322         * loader/cache/CachedScript.h:
3323         * loader/cache/CachedTextTrack.cpp:
3324         (WebCore::CachedTextTrack::CachedTextTrack):
3325         * loader/cache/CachedTextTrack.h:
3326         * loader/cache/CachedXSLStyleSheet.cpp:
3327         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
3328         * loader/cache/CachedXSLStyleSheet.h:
3329         * loader/cache/MemoryCache.cpp:
3330         (WebCore::MemoryCache::add):
3331         (WebCore::MemoryCache::revalidationSucceeded):
3332         (WebCore::MemoryCache::resourceForURL):
3333         (WebCore::MemoryCache::resourceForRequest):
3334         (WebCore::MemoryCache::addImageToCache):
3335         (WebCore::MemoryCache::removeImageFromCache):
3336         (WebCore::MemoryCache::evict):
3337         (WebCore::MemoryCache::removeResourcesWithOrigin):
3338         (WebCore::MemoryCache::getOriginsWithCache):
3339         (WebCore::MemoryCache::removeUrlFromCache):
3340         (WebCore::MemoryCache::removeRequestFromCache):
3341         (WebCore::MemoryCache::removeRequestFromCacheImpl):
3342         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
3343         (WebCore::MemoryCache::getStatistics):
3344         (WebCore::MemoryCache::setDisabled):
3345         * loader/cache/MemoryCache.h:
3346         * platform/CrossThreadCopier.cpp:
3347         * platform/CrossThreadCopier.h:
3348         * platform/network/cf/ResourceRequest.h:
3349         (WebCore::ResourceRequest::ResourceRequest):
3350         * rendering/RenderSnapshottedPlugIn.cpp:
3351         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
3352         * testing/Internals.cpp:
3353         (WebCore::Internals::isLoadingFromMemoryCache):
3354
3355 2014-03-03  Sam Weinig  <sam@webkit.org>
3356
3357         Fix the iOS Simulator build.
3358
3359         * WebCore.exp.in:
3360
3361 2014-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
3362
3363         Space between double underlines does not scale with font size
3364         https://bugs.webkit.org/show_bug.cgi?id=129521
3365
3366         Reviewed by Simon Fraser.
3367
3368         This patch moves the logic about how far to draw the second underline (when text-decoration-style: double
3369         is specified) from InlineTextBox to GraphicsContext, because GraphicsContext is the authoritative source
3370         about how thick underlines should be. The space between the two underlines is set to the thickness of
3371         each of the underlines.
3372
3373         This patch also deletes some unused code in InlineTextBox that was never getting triggered, in addition
3374         to unifying drawLineForText with drawLinesForText. This didn't have any performance impact in my testing.
3375
3376         Test: fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html
3377
3378         * platform/graphics/GraphicsContext.h: drawLineForText takes a boolean for if we should draw double
3379         underlines.
3380         * platform/graphics/cg/GraphicsContextCG.cpp:
3381         (WebCore::GraphicsContext::drawLineForText):
3382         (WebCore::GraphicsContext::drawLinesForText):
3383         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3384         (WebCore::GraphicsContext::drawLineForText):
3385         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3386         (WebCore::GraphicsContext::drawLineForText):
3387         * rendering/InlineTextBox.cpp: Use new boolean argument
3388         (WebCore::drawSkipInkUnderline):
3389         (WebCore::InlineTextBox::paintDecoration):
3390
3391 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
3392
3393         AX: Support IOS Accessibility in WK2
3394         https://bugs.webkit.org/show_bug.cgi?id=129527
3395
3396         Reviewed by Sam Weinig.
3397
3398         Update the iOS wrapper so that it can convert points to screen space in WebKit2.
3399
3400         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3401         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
3402         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
3403
3404 2014-03-03  Martin Hock  <mhock@apple.com>
3405
3406         Add support for sessions to MemoryCache.
3407         https://bugs.webkit.org/show_bug.cgi?id=127794
3408
3409         Reviewed by Sam Weinig.
3410
3411         * WebCore.exp.in:
3412         * editing/DeleteButtonController.cpp:
3413         (WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
3414         * html/DOMURL.cpp:
3415         (WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
3416         * inspector/InspectorPageAgent.cpp:
3417         (WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
3418         * inspector/InspectorResourceAgent.cpp:
3419         (WebCore::InspectorResourceAgent::replayXHR): Ditto.
3420         * loader/DocumentLoader.cpp:
3421         (WebCore::areAllLoadersPageCacheAcceptable): Ditto.
3422         * loader/FrameLoader.cpp:
3423         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
3424         * loader/ImageLoader.cpp:
3425         (WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
3426         * loader/archive/cf/LegacyWebArchive.cpp:
3427         (WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
3428         * loader/cache/CachedCSSStyleSheet.cpp:
3429         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
3430         * loader/cache/CachedCSSStyleSheet.h:
3431         * loader/cache/CachedFont.cpp: Ditto.
3432         (WebCore::CachedFont::CachedFont):
3433         * loader/cache/CachedFont.h:
3434         * loader/cache/CachedImage.cpp: Ditto.
3435         (WebCore::CachedImage::CachedImage):
3436         * loader/cache/CachedImage.h:
3437         * loader/cache/CachedRawResource.cpp: Ditto.
3438         (WebCore::CachedRawResource::CachedRawResource):
3439         * loader/cache/CachedRawResource.h:
3440         * loader/cache/CachedResource.cpp: Ditto.
3441         (WebCore::CachedResource::CachedResource):
3442         (WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
3443         * loader/cache/CachedResource.h:
3444         (WebCore::CachedResource::sessionID):
3445         * loader/cache/CachedResourceLoader.cpp:
3446         (WebCore::createResource): Constructors take sessionID.
3447         (WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
3448         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
3449         (WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
3450         (WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
3451         (WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
3452         * loader/cache/CachedResourceLoader.h:
3453         * loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
3454         (WebCore::CachedSVGDocument::CachedSVGDocument):
3455         * loader/cache/CachedSVGDocument.h:
3456         * loader/cache/CachedScript.cpp: Ditto.
3457         (WebCore::CachedScript::CachedScript):
3458         * loader/cache/CachedScript.h:
3459         * loader/cache/CachedTextTrack.cpp: Ditto.
3460         (WebCore::CachedTextTrack::CachedTextTrack):
3461         * loader/cache/CachedTextTrack.h:
3462         * loader/cache/CachedXSLStyleSheet.cpp: Ditto.
3463         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
3464         * loader/cache/CachedXSLStyleSheet.h:
3465         * loader/cache/MemoryCache.cpp:
3466         (WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
3467         (WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
3468         (WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
3469         (WebCore::MemoryCache::resourceForURL): Ditto.
3470         (WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
3471         (WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
3472         (WebCore::MemoryCache::addImageToCache): Use default sessionID.
3473         (WebCore::MemoryCache::removeImageFromCache): Ditto.
3474         (WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
3475         (WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
3476         (WebCore::MemoryCache::getOriginsWithCache): Ditto.
3477         (WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
3478         (WebCore::MemoryCache::removeRequestFromCache): Ditto.
3479         (WebCore::MemoryCache::removeRequestFromCacheImpl): Ditto.
3480         (WebCore::MemoryCache::removeRequestFromSessionCaches): Iterate through all CachedResourceMaps.
3481         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
3482         (WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
3483         (WebCore::MemoryCache::setDisabled): Ditto.
3484         * loader/cache/MemoryCache.h: Create another level for cache.
3485         * platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
3486         (WebCore::SessionID>::copy):
3487         * platform/CrossThreadCopier.h:
3488         * platform/network/cf/ResourceRequest.h:
3489         (WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
3490         * rendering/RenderSnapshottedPlugIn.cpp:
3491         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
3492         * testing/Internals.cpp:
3493         (WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.
3494
3495 2014-03-03  Andreas Kling  <akling@apple.com>
3496
3497         Remove unused DataView code from JSDOMBinding.h
3498         <https://webkit.org/b/129616>
3499
3500         Reviewed by Antti Koivisto.
3501
3502         * bindings/js/JSDOMBinding.h:
3503
3504 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
3505
3506         Allow overflow-scroll to be one-finger scrolled until we hook up UIScrollViews
3507         https://bugs.webkit.org/show_bug.cgi?id=129621
3508
3509         Reviewed by Benjamin Poulain.
3510
3511         Temporary change to allow overflow:scroll to be scrolled in iOS WK2.
3512
3513         * rendering/RenderLayer.cpp:
3514         (WebCore::RenderLayer::hasAcceleratedTouchScrolling):
3515
3516 2014-03-03  Antti Koivisto  <antti@apple.com>
3517
3518         Find results on simple lines are not marked correctly
3519         https://bugs.webkit.org/show_bug.cgi?id=129586
3520
3521         Reviewed by Andreas Kling.
3522
3523         Tests: editing/text-iterator/count-mark-lineboxes.html
3524                editing/text-iterator/count-mark-simple-lines.html
3525                
3526         TextIterator operating on simple lines failed to take the end of the range into account.
3527         This also causes performance issues on long documents as range traversals would miss the end
3528         node and end up going through the entire document.
3529
3530         * editing/TextIterator.cpp:
3531         (WebCore::TextIterator::handleTextNode):
3532         
3533             Stop when hitting the range end on simple text nodes.
3534
3535         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
3536         
3537             Use hasRenderedText test instead of linebox-only firstTextBox.
3538
3539         * testing/Internals.cpp:
3540         (WebCore::Internals::countMatchesForText):
3541         * testing/Internals.h:
3542         * testing/Internals.idl:
3543         
3544             Add testing interface for counting and marking matches.
3545
3546 2014-03-03  Benjamin Poulain  <benjamin@webkit.org>
3547
3548         SelectorQuery failing RightMostWithIdMatch are compiling their selectors for each execution
3549         https://bugs.webkit.org/show_bug.cgi?id=129601
3550
3551         Reviewed by Andreas Kling.
3552
3553         This caused a regression after r164924 for documents in quirks mode. Since those always fail
3554         selectorForIdLookup(), they ended up compiling the selector every time they were called.
3555
3556         * dom/SelectorQuery.cpp:
3557         (WebCore::SelectorDataList::execute):
3558
3559 2014-03-01  Jer Noble  <jer.noble@apple.com>
3560
3561         [Mac] Crash in MediaPlayer::rateChanged()
3562         https://bugs.webkit.org/show_bug.cgi?id=129548
3563
3564         Reviewed by Darin Adler.
3565
3566         WTF::bind will automatically ref the parameters added to it. But MediaPlayerPrivate-
3567         AVFoundation and -MediaSOurceAVFObjC are not RefCounted, so by the time the bound
3568         function is called, the underlying objects may have been freed.
3569
3570         Replace or augment callOnMainThread arguments with lambdas and weakPtrs so that
3571         if the argument has been destroyed, its methods will not be called.
3572
3573         Make the MediaPlayerPrivateAVFoundation::Notification function type a std::function:
3574         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3575         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
3576         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
3577
3578         Make createWeakPtr() public so that it can be called from non-class methods:
3579         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3580         (WebCore::MediaPlayerPrivateAVFoundationObjC::createWeakPtr): 
3581         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3582         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr): 
3583
3584         Use a weakPtr to abort callOnMainThread() if the object has been destroyed:
3585         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3586         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3587         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3588         (WebCore::CMTimebaseEffectiveRateChangedCallback):
3589         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
3590         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
3591         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
3592
3593 2014-02-28  Jer Noble  <jer.noble@apple.com>
3594
3595         [MSE] YouTube videos fail to play
3596         https://bugs.webkit.org/show_bug.cgi?id=129525
3597
3598         Reviewed by Darin Adler.
3599
3600         Test: media/media-source/media-source-fudge-factor.html
3601
3602         Add a very simple playability metric to SourceBuffer. Track the number of seconds buffered
3603         and use that metric to determine whether the MediaSource has buffered enough data to play
3604         through.
3605
3606         * Modules/mediasource/MediaSource.cpp:
3607         (WebCore::MediaSource::currentTime): Added simple accessor.
3608         (WebCore::MediaSource::monitorSourceBuffers): Replace the functor-based iterators with lambdas.
3609         (WebCore::MediaSource::addSourceBuffer): Drive-by fix; only add new source buffers to the
3610             activeSourceBuffers list if those buffers are actually active.
3611         * Modules/mediasource/MediaSource.h:
3612         * Modules/mediasource/SourceBuffer.cpp:
3613         (WebCore::SourceBuffer::SourceBuffer): Initialize new ivars.
3614         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Measure the number of seconds buffered.
3615         (WebCore::SourceBuffer::monitorBufferingRate): Use a simple Exponential moving average to
3616             track the buffering rate.
3617         (WebCore::SourceBuffer::hasCurrentTime): Return true if the current time is within 1/24 s
3618             of a buffered range.
3619         (WebCore::SourceBuffer::hasFutureTime): Moved from MediaSource.
3620         (WebCore::SourceBuffer::canPlayThrough): Return true if the buffering rate is > 1s per
3621             second, or if the rate is sufficient to keep up over the remaining time.
3622         * Modules/mediasource/SourceBuffer.h:
3623
3624 2014-03-03  Bear Travis  <betravis@adobe.com>
3625
3626         [CSS Shapes] Serialize circle positions
3627         https://bugs.webkit.org/show_bug.cgi?id=129404
3628
3629         Reviewed by Dirk Schulze.
3630
3631         Circle positions should always be present when serialized, and should
3632         only have the 2 or 4-valued form. Keywords are converted to percentages
3633         and simplified where possible. This patch adds some additional processing
3634         that converts the parsed position into the serialized format, before
3635         converting it to text. See http://dev.w3.org/csswg/css-shapes/#basic-shape-serialization.
3636
3637         Updated existing parsing tests.
3638
3639         * css/CSSBasicShapes.cpp:
3640         (WebCore::serializePositionOffset): Convert a position offset to a serialized string.
3641         The offset must be a pair, as generated by buildSerializablePositionOffset.
3642         (WebCore::buildSerializablePositionOffset): Generates a keyword + offset pair for each
3643         position offset. The keywords may later be dropped during serialization.
3644         (WebCore::CSSBasicShapeCircle::cssText): Use the new serialization methods.
3645
3646 2014-03-03  Lorenzo Tilve  <ltilve@igalia.com>
3647
3648         Optimize StylePropertiesSet::findPropertyIndex() to improve CSS properties performance
3649         https://bugs.webkit.org/show_bug.cgi?id=129605
3650
3651         Reviewed by Andreas Kling.
3652
3653         Merged from Blink (patch by Mikhail Pozdnyakov):
3654         https://src.chromium.org/viewvc/blink?view=revision&revision=167325
3655
3656         Avoid checking whether 'StylePropertiesSet' is mutable and accesing directly to its
3657         data members to achieve performance improvements
3658
3659         Before the optimization applied:
3660             mean: 3064.8337171934063 runs/s
3661             median: 3097.5899379343855 runs/s
3662             stdev: 66.89274074044187 runs/s
3663             min: 2891.7479324362585 runs/s
3664             max: 3113.288683440125 runs/s
3665
3666         After the optimization applied:
3667             mean: 3343.8356114138105 runs/s
3668             median: 3356.25682957446 runs/s
3669             stdev: 36.297533087489036 runs/s
3670             min: 3238.5468032264243 runs/s
3671             max: 3368.664837531425 runs/s
3672
3673         Performance gain for the average value is approx. 9.1%, in the
3674         range of the 10% - 8.2% for the min and max measured
3675         values (Linux desktop x64).
3676
3677         * css/StyleProperties.cpp:
3678         (WebCore::ImmutableStyleProperties::findPropertyIndex):
3679         (WebCore::MutableStyleProperties::findPropertyIndex):
3680         * css/StyleProperties.h:
3681         (WebCore::toMutableStyleProperties):
3682         (WebCore::toImmutableStyleProperties):
3683         (WebCore::StyleProperties::findPropertyIndex):
3684
3685 2014-03-03  Brian Burg  <bburg@apple.com>
3686
3687         Unreviewed build fix for Windows after r164986.
3688
3689         * WebCore.vcxproj/build-generated-files.sh: Export WebReplayScripts
3690         so that the build system knows how to find CodeGeneratorReplayInputs.py.
3691
3692 2014-03-03  Andrei Bucur  <abucur@adobe.com>
3693
3694         [CSS Regions] Overset computation is incorrect in some cases
3695         https://bugs.webkit.org/show_bug.cgi?id=129032
3696
3697         Reviewed by Mihnea Ovidenie.
3698
3699         This patch reworks the way overset is computed for regions and named flows.
3700
3701         1. Regions overflow no longer trigger an overset changed event. This is because
3702         the overflow of a box is contained within the region range of the box. The content
3703         edge should be considered the logical bottom position of the content inside the
3704         flow thread.
3705
3706         2. The regions events logic was moved from RenderFlowThread to RenderNamedFlowThread
3707         and from RenderRegion to RenderNamedFlowFragment (including the regionOverset property).
3708
3709         3. The overset value of the named flow is no longer stored in the named flow. It is
3710         extracted from the overset of the last region in the chain.
3711
3712         4. The regions overset is not computed every time the flow thread is laid out which
3713         should improve performance for flows with many regions. With the patch, each region
3714         computes the overset value during its layout when the flow thread is in the overflow
3715         or the final layout phase.
3716
3717         5. The overset changed event is dispatched only at the end of the layout of the named flows,
3718         after all the region overset changes have been considered. This means that the overset
3719         event can't be dispatched in the middle of the auto-height processing algorithm that
3720         requires multiple layout passes for the flow threads.
3721
3722         However, the region layout update event dispatch timing was not changed, it is dispatched
3723         every time the flow thread has a layout. This preserves the current behavior of the event.
3724
3725         Tests: The old tests were modified to take into account the change.
3726
3727         * dom/Element.cpp:
3728         (WebCore::Element::webkitRegionOverset):
3729         * dom/WebKitNamedFlow.cpp:
3730         (WebCore::WebKitNamedFlow::overset):
3731         * inspector/InspectorCSSAgent.cpp:
3732         (WebCore::InspectorCSSAgent::buildArrayForRegions):
3733         * rendering/FlowThreadController.cpp:
3734         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
3735         * rendering/RenderBlock.cpp:
3736         (WebCore::RenderBlock::computeOverflow):
3737         * rendering/RenderFlowThread.cpp:
3738         (WebCore::RenderFlowThread::RenderFlowThread):
3739         (WebCore::RenderFlowThread::layout):
3740         * rendering/RenderFlowThread.h:
3741         * rendering/RenderNamedFlowFragment.cpp:
3742         (WebCore::RenderNamedFlowFragment::layoutBlock):
3743         (WebCore::RenderNamedFlowFragment::setRegionOversetState):
3744         (WebCore::RenderNamedFlowFragment::regionOversetState):
3745         (WebCore::RenderNamedFlowFragment::updateOversetState):
3746         * rendering/RenderNamedFlowFragment.h:
3747         * rendering/RenderNamedFlowThread.cpp:
3748         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3749         (WebCore::RenderNamedFlowThread::computeOverflow):
3750         (WebCore::RenderNamedFlowThread::layout):
3751         (WebCore::RenderNamedFlowThread::dispatchNamedFlowEvents):
3752         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEventIfNeeded):
3753         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
3754         * rendering/RenderNamedFlowThread.h:
3755         There's a new field called m_flowContentBottom that tracks the content bottom of the flow thread
3756         after layout. This value is used to compute the overset value of the regions because it's not
3757         affected by relative positioning or visual overflow such as shadows.
3758         * rendering/RenderRegion.cpp:
3759         * rendering/RenderRegion.h:
3760
3761 2014-03-03  Tomas Popela  <tpopela@redhat.com>
3762
3763         [GTK] CodeGeneratorGObject.pm remove usage of undefined variable
3764         https://bugs.webkit.org/show_bug.cgi?id=129602
3765
3766         Reviewed by Martin Robinson.
3767
3768         Remove usage of undefined variable hdrPropIncludes in CodeGeneratorGObject.pm
3769
3770         * bindings/scripts/CodeGeneratorGObject.pm:
3771         (WriteData):
3772
3773 2014-03-03  Brian Burg  <bburg@apple.com>
3774
3775         Web Replay: upstream input storage, capture/replay machinery, and inspector domain
3776         https://bugs.webkit.org/show_bug.cgi?id=128782
3777
3778         Reviewed by Timothy Hatcher, Joseph Pecoraro, and Andreas Kling.
3779
3780         No new tests yet, as they rely on infrastructure tracked in https://webkit.org/b/129190.
3781
3782         Replayable executions are organized into ReplaySessions, which can
3783         contain several ReplaySessionSegments that divide overall execution
3784         at main frame navigation boundaries. NondeterministicInput subclasses
3785         are stored in SegmentedInputStorage according to the input's InputQueue.
3786
3787         Capture and playback are controlled at the page granularity by the Page's
3788         ReplayController. The controller knows how to create new segments, replay to
3789         arbitrary positions in the ReplaySession, and track the active InputCursor.
3790
3791         The capturing and replaying input cursor subclasses encapsulate state for
3792         storing new inputs and loading/dispatching saved inputs, respectively.
3793
3794         The ReplayAgent and associated inspector protocol domain is the friendly
3795         public API for programmatically capturing and replaying sessions.
3796
3797         * DerivedSources.make: Add replay inputs code generation target. Add the
3798         replay domain specification to the list of inspector domains.
3799
3800         * ForwardingHeaders/replay/EncodedValue.h: Added.
3801         * WebCore.xcodeproj/project.pbxproj: Add many files, and export
3802         `WebReplayScripts` environment variable to DerivedSources.make.
3803
3804         * inspector/InspectorController.cpp: Add the replay agent.
3805         (WebCore::InspectorController::InspectorController):
3806
3807         * inspector/InspectorInstrumentation.cpp:
3808         Add events for segment lifecycle events, and loading/unloading of sessions
3809         and segments, and capture/replay progress events. The replay controller
3810         also needs to know about detached and committed frames.
3811
3812         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
3813         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3814         (WebCore::InspectorInstrumentation::sessionCreatedImpl):
3815         (WebCore::InspectorInstrumentation::sessionLoadedImpl):
3816         (WebCore::InspectorInstrumentation::sessionModifiedImpl):
3817         (WebCore::InspectorInstrumentation::segmentCreatedImpl):
3818         (WebCore::InspectorInstrumentation::segmentCompletedImpl):
3819         (WebCore::InspectorInstrumentation::segmentLoadedImpl):
3820         (WebCore::InspectorInstrumentation::segmentUnloadedImpl):
3821         (WebCore::InspectorInstrumentation::captureStartedImpl):
3822         (WebCore::InspectorInstrumentation::captureStoppedImpl):
3823         (WebCore::InspectorInstrumentation::playbackStartedImpl):
3824         (WebCore::InspectorInstrumentation::playbackPausedImpl):
3825         (WebCore::InspectorInstrumentation::playbackHitPositionImpl):
3826         (WebCore::InspectorInstrumentation::replayAgentEnabled):
3827         * inspector/InspectorInstrumentation.h:
3828         (WebCore::InspectorInstrumentation::replayAgentEnabled):
3829         (WebCore::InspectorInstrumentation::sessionCreated):
3830         (WebCore::InspectorInstrumentation::sessionLoaded):
3831         (WebCore::InspectorInstrumentation::sessionModified):
3832         (WebCore::InspectorInstrumentation::segmentCreated):
3833         (WebCore::InspectorInstrumentation::segmentCompleted):
3834         (WebCore::InspectorInstrumentation::segmentLoaded):
3835         (WebCore::InspectorInstrumentation::segmentUnloaded):
3836         (WebCore::InspectorInstrumentation::captureStarted):
3837         (WebCore::InspectorInstrumentation::captureStopped):
3838         (WebCore::InspectorInstrumentation::playbackStarted):
3839         (WebCore::InspectorInstrumentation::playbackPaused):
3840         (WebCore::InspectorInstrumentation::playbackHitPosition):
3841
3842         * inspector/InspectorReplayAgent.cpp: Added.
3843         (WebCore::buildInspectorObjectForPosition):
3844         (WebCore::buildInspectorObjectForInput):
3845         (WebCore::buildInspectorObjectForSession):
3846         (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
3847         (WebCore::SerializeInputToJSONFunctor::~SerializeInputToJSONFunctor):
3848         (WebCore::SerializeInputToJSONFunctor::operator()):
3849         (WebCore::SerializeInputToJSONFunctor::returnValue):
3850         (WebCore::buildInspectorObjectForSegment):
3851         (WebCore::InspectorReplayAgent::InspectorReplayAgent):
3852         (WebCore::InspectorReplayAgent::~InspectorReplayAgent):
3853         (WebCore::InspectorReplayAgent::sessionState):
3854         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
3855         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
3856         (WebCore::InspectorReplayAgent::frameNavigated):
3857         (WebCore::InspectorReplayAgent::frameDetached):
3858         (WebCore::InspectorReplayAgent::sessionCreated):
3859         (WebCore::InspectorReplayAgent::sessionModified):
3860         (WebCore::InspectorReplayAgent::sessionLoaded):
3861         (WebCore::InspectorReplayAgent::segmentCreated):
3862         (WebCore::InspectorReplayAgent::segmentCompleted):
3863         (WebCore::InspectorReplayAgent::segmentLoaded):
3864         (WebCore::InspectorReplayAgent::segmentUnloaded):
3865         (WebCore::InspectorReplayAgent::captureStarted):
3866         (WebCore::InspectorReplayAgent::captureStopped):
3867         (WebCore::InspectorReplayAgent::playbackStarted):
3868         (WebCore::InspectorReplayAgent::playbackPaused):
3869         (WebCore::InspectorReplayAgent::playbackHitPosition):
3870         (WebCore::InspectorReplayAgent::startCapturing):
3871         (WebCore::InspectorReplayAgent::stopCapturing):
3872         (WebCore::InspectorReplayAgent::replayToPosition):
3873         (WebCore::InspectorReplayAgent::replayToCompletion):
3874         (WebCore::InspectorReplayAgent::pausePlayback):
3875         (WebCore::InspectorReplayAgent::cancelPlayback):
3876         (WebCore::InspectorReplayAgent::switchSession):
3877         (WebCore::InspectorReplayAgent::insertSessionSegment):
3878         (WebCore::InspectorReplayAgent::removeSessionSegment):
3879         Provide a public API for modifying sessions. This is the backend support
3880         for user editing of replay sessions to add/remove specific segments.
3881
3882         (WebCore::InspectorReplayAgent::findSession):
3883         (WebCore::InspectorReplayAgent::findSegment):
3884         (WebCore::InspectorReplayAgent::getAvailableSessions):
3885         (WebCore::InspectorReplayAgent::getSerializedSession):
3886         (WebCore::InspectorReplayAgent::getSerializedSegment):
3887         Most of the replay protocol domain speaks in terms of sesssion and
3888         segment identifiers. These functions return the actual data associated
3889         with these identifiers.
3890
3891         * inspector/InspectorReplayAgent.h: Added.
3892         * inspector/InstrumentingAgents.cpp:
3893         (WebCore::InstrumentingAgents::InstrumentingAgents):
3894         (WebCore::InstrumentingAgents::reset):
3895         * inspector/InstrumentingAgents.h:
3896         (WebCore::InstrumentingAgents::inspectorReplayAgent): Added.
3897         (WebCore::InstrumentingAgents::setInspectorReplayAgent): Added.
3898         * inspector/protocol/Replay.json: Added.
3899
3900         * page/Page.cpp:
3901         (WebCore::Page::Page):
3902         * page/Page.h:
3903         (WebCore::Page::replayController): Added.
3904         * platform/Logging.h: Add WebReplay logging channel.
3905         * replay/AllReplayInputs.h: Added. Simplifies importing all input definitions.
3906
3907         * replay/CapturingInputCursor.cpp: Added.
3908         (WebCore::CapturingInputCursor::CapturingInputCursor):
3909         (WebCore::CapturingInputCursor::~CapturingInputCursor):
3910         (WebCore::CapturingInputCursor::create):
3911         (WebCore::CapturingInputCursor::storeInput):
3912         (WebCore::CapturingInputCursor::loadInput):
3913         (WebCore::CapturingInputCursor::uncheckedLoadInput):
3914         * replay/CapturingInputCursor.h: Added.
3915
3916         * replay/EventLoopInput.h:
3917         (WebCore::EventLoopInputBase::EventLoopInputBase):
3918         (WebCore::EventLoopInputBase::timestamp):
3919         (WebCore::EventLoopInputBase::setTimestamp): Support deserialization.
3920
3921         * replay/EventLoopInputDispatcher.cpp: Added. This class encapsulates the timers
3922         and measurements used to dispatch event loop inputs during replay.
3923
3924         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
3925         (WebCore::EventLoopInputDispatcher::run):
3926         (WebCore::EventLoopInputDispatcher::pause):
3927         (WebCore::EventLoopInputDispatcher::timerFired):
3928         (WebCore::EventLoopInputDispatcher::dispatchInputSoon):
3929         (WebCore::EventLoopInputDispatcher::dispatchInput):
3930         * replay/EventLoopInputDispatcher.h: Added.
3931         (WebCore::EventLoopInputDispatcherClient::EventLoopInputDispatcherClient):
3932         (WebCore::EventLoopInputDispatcherClient::~EventLoopInputDispatcherClient):
3933
3934         * replay/FunctorInputCursor.h: Added.
3935         (WebCore::FunctorInputCursor::~FunctorInputCursor):
3936         (WebCore::FunctorInputCursor::forEachInputInQueue):
3937         (WebCore::FunctorInputCursor::FunctorInputCursor):
3938         (WebCore::FunctorInputCursor::storeInput):
3939         (WebCore::FunctorInputCursor::loadInput):
3940         (WebCore::FunctorInputCursor::uncheckedLoadInput):
3941
3942         * replay/ReplayController.cpp: Added.
3943         (WebCore::ReplayController::ReplayController):
3944         (WebCore::ReplayController::switchSession):
3945         (WebCore::ReplayController::createSegment):
3946         (WebCore::ReplayController::completeSegment):
3947         (WebCore::ReplayController::loadSegment):
3948         (WebCore::ReplayController::unloadSegment):
3949         (WebCore::ReplayController::startCapturing):
3950         (WebCore::ReplayController::stopCapturing):
3951         (WebCore::ReplayController::startPlayback):
3952         (WebCore::ReplayController::pausePlayback):
3953         (WebCore::ReplayController::cancelPlayback):
3954         (WebCore::ReplayController::replayToPosition):
3955         (WebCore::ReplayController::frameDetached):
3956         (WebCore::ReplayController::frameNavigated):
3957         (WebCore::ReplayController::loadedSession):
3958         (WebCore::ReplayController::loadedSegment):
3959         (WebCore::ReplayController::activeInputCursor):
3960         (WebCore::ReplayController::dispatcher):
3961         (WebCore::ReplayController::willDispatchInput):
3962         (WebCore::ReplayController::didDispatchInput):
3963         (WebCore::ReplayController::didDispatchFinalInput):
3964         * replay/ReplayController.h: Added.
3965         (WebCore::ReplayPosition::ReplayPosition):
3966         (WebCore::ReplayPosition::operator<):
3967         (WebCore::ReplayPosition::operator==):
3968
3969         * replay/ReplayInputCreationMethods.cpp: Added.
3970         Static factory implementations for inputs belong here.
3971         (WebCore::InitialNavigation::createFromPage):
3972
3973         * replay/ReplayInputDispatchMethods.cpp: Added.
3974         All dispatch() implementations for generated replay inputs belong here.
3975         (WebCore::BeginSegmentSentinel::dispatch):
3976         (WebCore::EndSegmentSentinel::dispatch):
3977         (WebCore::InitialNavigation::dispatch):
3978
3979         * replay/ReplayInputTypes.cpp:
3980         (WebCore::ReplayInputTypes::ReplayInputTypes):
3981         * replay/ReplayInputTypes.h: Define strings for WebCore inputs.
3982
3983         * replay/ReplaySession.cpp: Added.
3984         (WebCore::ReplaySession::create):
3985         (WebCore::ReplaySession::ReplaySession):
3986         (WebCore::ReplaySession::~ReplaySession):
3987         (WebCore::ReplaySession::appendSegment):
3988         (WebCore::ReplaySession::insertSegment):
3989         (WebCore::ReplaySession::removeSegment):
3990         * replay/ReplaySession.h: Added.
3991         (WebCore::ReplaySession::identifier):
3992         (WebCore::ReplaySession::timestamp):
3993         (WebCore::ReplaySession::size):
3994         (WebCore::ReplaySession::at):
3995         (WebCore::ReplaySession::begin):
3996         (WebCore::ReplaySession::end):
3997
3998         * replay/ReplaySessionSegment.cpp: Added.
3999         (WebCore::ReplaySessionSegment::create):
4000         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
4001         (WebCore::ReplaySessionSegment::~ReplaySessionSegment):
4002         (WebCore::ReplaySessionSegment::createCapturingCursor):
4003         (WebCore::ReplaySessionSegment::createReplayingCursor):
4004         (WebCore::ReplaySessionSegment::createFunctorCursor):
4005         * replay/ReplaySessionSegment.h: Added.
4006         (WebCore::ReplaySessionSegment::identifier):
4007         (WebCore::ReplaySessionSegment::timestamp):
4008
4009         * replay/ReplayingInputCursor.cpp: Added.
4010         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
4011         (WebCore::ReplayingInputCursor::~ReplayingInputCursor):
4012         (WebCore::ReplayingInputCursor::create):
4013         (WebCore::ReplayingInputCursor::storeInput):
4014         (WebCore::ReplayingInputCursor::loadInput):
4015         (WebCore::ReplayingInputCursor::uncheckedLoadInput):
4016         * replay/ReplayingInputCursor.h: Added.
4017
4018         * replay/SegmentedInputStorage.cpp: Added.
4019         (WebCore::queueTypeToLogPrefix):
4020         (WebCore::jsonStringForInput):
4021         (WebCore::offsetForInputQueue):
4022         (WebCore::SegmentedInputStorage::SegmentedInputStorage):
4023         (WebCore::SegmentedInputStorage::~SegmentedInputStorage):
4024         (WebCore::SegmentedInputStorage::load):
4025         (WebCore::SegmentedInputStorage::store):
4026         (WebCore::SegmentedInputStorage::queueSize):
4027         * replay/SegmentedInputStorage.h: Added.
4028
4029         * replay/SerializationMethods.cpp: Added.
4030         Specializations of EncodingTraits for WebCore types belong here.
4031
4032         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
4033         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
4034         (JSC::EncodingTraits<SecurityOrigin>::encodeValue):
4035         (JSC::EncodingTraits<SecurityOrigin>::decodeValue):
4036         (JSC::EncodingTraits<URL>::encodeValue):
4037         (JSC::EncodingTraits<URL>::decodeValue):
4038         * replay/SerializationMethods.h: Added.
4039         * replay/WebInputs.json: Added.
4040         In this inital patch, we define BeginSegmentSentinel,
4041         EndSegmentSentinel, and InitialNavigation inputs.
4042
4043 2014-03-03  Antoine Quint  <graouts@webkit.org>
4044
4045         Respect SVG fragment identifiers in <img> src attribute
4046         https://bugs.webkit.org/show_bug.cgi?id=129387