Source/WebCore: Convert position:fixed property to position:absolute upon copy
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-10  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         Convert position:fixed property to position:absolute upon copy
4         https://bugs.webkit.org/show_bug.cgi?id=128194
5
6         Reviewed by Simon Fraser.
7
8         This adds a Setting and Preference that allows clients to opt-in to this behavior.
9
10         This new behavior is only activated if the entire body is copied. If there is a position:fixed
11         element in the copied selection, it is replaced with position:absolute, and a containing
12         block (position:relative) is wrapped around the copied text.
13
14         This patch originally converted position:-webkit-sticky to position:relative. However, we
15         currently don't support copying and pasting of position:-webkit-sticky content (See below).
16         Therefore, this patch only deals with position:fixed.
17
18         Right now we don't copy position:-webkit-sticky. This is because:
19         1. When copying styled elements, we parse the style properties again
20         2. CSSParserContext has a flag which can disable parsing -webkit-sticky
21         3. There are two constructors to CSSParserContext: one that takes a document and sets up the
22         aforementioned flag, and a simple one that doesn't take a document and sets all the enableFoo
23         flags to false
24         4. At the relevant place within copy code, we are far removed from the Document object, so we
25         instead call the second constructor, thereby disabling parsing of -webkit-sticky
26
27         Test: editing/pasteboard/copy-paste-converts-sticky-and-fixed.html
28
29         * WebCore.exp.in: Export the Setting setter
30         * editing/EditingStyle.cpp:
31         (WebCore::EditingStyle::convertFixedAndStickyPosition): Converts a single style
32         * editing/EditingStyle.h:
33         * editing/markup.cpp:
34         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Remember if we found
35         an element which needs the position:relative containing block
36         (WebCore::StyledMarkupAccumulator::appendElement): Surround with the position:relative
37         containing block if necessary
38         (WebCore::createMarkupInternal):
39         * page/Settings.cpp:
40         (WebCore::Settings::Settings): New setting to opt-in to this new behavior
41         (WebCore::Settings::setConvertPositionStyleOnCopy):
42         * page/Settings.h:
43         (WebCore::Settings::convertPositionStyleOnCopy):
44         * testing/InternalSettings.cpp: Allow setting the setting from a Layout Test
45         (WebCore::InternalSettings::Backup::Backup):
46         (WebCore::InternalSettings::Backup::restoreTo):
47         (WebCore::InternalSettings::setConvertPositionStyleOnCopy):
48         * testing/InternalSettings.h:
49         * testing/InternalSettings.idl:
50
51 2014-02-11  Youenn Fablet  <youennf@gmail.com>
52
53         XMLHttpRequest should not send DNT header
54         https://bugs.webkit.org/show_bug.cgi?id=128533
55
56         Reviewed by Alexey Proskuryakov.
57
58         Added DNT (Do Not Track) header to the list of forbidden headers.
59         Updated http/tests/xmlhttprequest/set-dangerous-headers.html to test that header.
60
61         * xml/XMLHttpRequest.cpp:
62         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
63
64 2014-02-10  Jeffrey Pfau  <jpfau@apple.com>
65
66         Bring third-party app cache blocking behavior in line with private browsing app cache blocking behavior
67         https://bugs.webkit.org/show_bug.cgi?id=128557
68
69         Reviewed by Alexey Proskuryakov.
70
71         * loader/appcache/ApplicationCacheGroup.cpp:
72         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
73         (WebCore::ApplicationCacheGroup::selectCache):
74         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
75         (WebCore::ApplicationCacheGroup::update):
76         * loader/appcache/ApplicationCacheHost.cpp:
77         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
78         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
79         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
80         (WebCore::ApplicationCacheHost::maybeLoadResource):
81         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
82         (WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
83         * loader/appcache/ApplicationCacheHost.h:
84
85 2014-02-11  Brady Eidson  <beidson@apple.com>
86
87         IDB: The test after storage/indexeddb/mozilla/object-identity.html fails in cleanup code
88         <rdar://problem/16040663> and https://bugs.webkit.org/show_bug.cgi?id=128621
89
90         Reviewed by Alexey Proskuryakov.
91
92         Covered by storage/indexeddb/mozilla/object-identity.html.
93
94         * Modules/indexeddb/IDBTransactionBackend.cpp:
95         (WebCore::IDBTransactionBackend::abort): Clear the m_database pointer before calling the onAbort callback.
96         (WebCore::IDBTransactionBackend::commit): Don't run the abort code if there's no m_database pointer.
97
98 2014-02-10  Jer Noble  <jer.noble@apple.com>
99
100         [EME][Mac] Move the implementation of CDMPrivateAVFoundation back into MediaPlayerPrivateAVFoundationObjC.
101         https://bugs.webkit.org/show_bug.cgi?id=128559
102
103         Reviewed by Dean Jackson.
104
105         To prepare for multiple simultaneous CDMs with muliple MediaPlayer types, move the implementation for
106         CDMPrivateAVFoundation back into its media engine.
107
108         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
109         (WebCore::MediaKeyExceptionToErrorCode): Added.
110         (WebCore::CDMSessionAVFoundation::generateKeyRequest): Moved to MediaPlayerPrivateAVFoundationObjC.
111         (WebCore::CDMSessionAVFoundation::releaseKeys): Ditto.
112         (WebCore::CDMSessionAVFoundation::update): Ditto.
113         * platform/graphics/MediaPlayer.cpp:
114         (WebCore::MediaPlayer::generateKeyRequest): Added, pass through to MediaPlayerPrivate.
115         (WebCore::MediaPlayer::releaseKeys): Ditto.
116         (WebCore::MediaPlayer::update): Ditto.
117         * platform/graphics/MediaPlayer.h:
118         * platform/graphics/MediaPlayerPrivate.h:
119         (WebCore::MediaPlayerPrivateInterface::generateKeyRequest): Added.
120         (WebCore::MediaPlayerPrivateInterface::releaseKeys): Ditto.
121         (WebCore::MediaPlayerPrivateInterface::update): Ditto.
122         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
123         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
124         (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest): Moved from CDMSessionAVFoundation.
125         (WebCore::MediaPlayerPrivateAVFoundationObjC::releaseKeys): Ditto.
126         (WebCore::MediaPlayerPrivateAVFoundationObjC::update): Ditto.
127
128 2014-01-24  Jer Noble  <jer.noble@apple.com>
129
130         Run UserAgentScripts through jsmin rather than the css preprocessor
131         https://bugs.webkit.org/show_bug.cgi?id=127559
132
133         Reviewed by Tim Horton.
134
135         User Agent JavaScript files were being run through the c++ preprocessor to strip out
136         comments (and presumably to allow #if ENABLE macros, though that feature is entirely
137         unused). This had the side effect of removing important whitespace, namely newlines where
138         there would normally be an implicit semicolon.
139
140         Instead, .js files will now be run through the jsmin minifier, used by the inspector.
141         Jsmin will also strip comments and whitespace, but in a syntactically aware way which will
142         keep newlines when their presence adds an implied semicolon.
143
144         * DerivedSources.make:
145         * Scripts/make-js-file-arrays.py: Added.
146         (stringifyCodepoint):
147         (chunk):
148         (main):
149
150 2014-02-11  Andy Estes  <aestes@apple.com>
151
152         [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
153         https://bugs.webkit.org/show_bug.cgi?id=128583
154
155         Reviewed by Anders Carlsson.
156
157         The delegate method was removed in Snow Leopard.
158
159         * loader/ResourceLoader.cpp:
160         * loader/ResourceLoader.h:
161         * platform/network/ResourceHandleClient.h:
162         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
163         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
164
165 2014-02-10  Andy Estes  <aestes@apple.com>
166
167         [Content Filter] Check for NULL before calling dispatch_release()
168         https://bugs.webkit.org/show_bug.cgi?id=128576
169
170         Reviewed by Darin Adler.
171
172         m_neFilterSourceQueue will be NULL if NEFilterSource isn't enabled, and
173         passing NULL to dispatch_release() is undefined.
174
175         * platform/mac/ContentFilterMac.mm:
176         (WebCore::ContentFilter::~ContentFilter):
177
178 2014-01-24  Jer Noble  <jer.noble@apple.com>
179
180         [MediaControls] Allow the media controls script to be debuggable by giving it a generated sourceURL
181         https://bugs.webkit.org/show_bug.cgi?id=127560
182
183         Reviewed by Eric Carlson.
184
185         When evaluating a script through ScriptController, if that script does not have an
186         explicit sourceURL, it will not appear in the resources section of the Web Inspector.
187         For debug builds only, give the media controls script a generated (i.e. fake) sourceURL.
188
189         * html/HTMLMediaElement.cpp:
190         (WebCore::HTMLMediaElement::parseAttribute):
191
192 2014-02-11  Samuel White  <samuel_white@apple.com>
193
194         AX: Add text replacement activity support to NSAccessibilitySelectTextWithCriteriaParameterizedAttribute.
195         https://bugs.webkit.org/show_bug.cgi?id=128397
196
197         Reviewed by Chris Fleizach.
198
199         Added text replacement support for the AXSelectTextWithCriteria parameterized attribute.
200
201         No new test. Updated platform/mac/accessibility/select-text.html to test the added functionality.
202
203         * accessibility/AccessibilityObject.cpp:
204         (WebCore::AccessibilityObject::selectText):
205         * accessibility/AccessibilityObject.h:
206         (WebCore::AccessibilitySelectTextCriteria::AccessibilitySelectTextCriteria):
207         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
208         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
209
210 2014-02-11  Roger Fong  <roger_fong@apple.com>
211
212         [Windows] Unreviewed. Speculative test fix.
213
214         * platform/graphics/GraphicsContext.h:
215         (WebCore::GraphicsContext::pixelSnappingFactor):
216         * platform/graphics/cg/GraphicsContextCG.cpp:
217         (WebCore::GraphicsContext::platformInit):
218
219 2014-02-11  Dan Bernstein  <mitz@apple.com>
220
221         iOS build fix.
222
223         * platform/ios/TileGrid.mm:
224         (WebCore::TileGrid::dropTilesBetweenRects):
225         (WebCore::TileGrid::dropDistantTiles):
226         (WebCore::TileGrid::dropInvalidTiles):
227
228 2014-02-11  James Craig  <jcraig@apple.com>
229
230         Web Inspector: AX: Accessibility Node Inspection
231         https://bugs.webkit.org/show_bug.cgi?id=127447
232
233         Reviewed by Timothy Hatcher.
234
235         New methods supporting WebCore::AccessibilityObject::computedRoleString()
236         used for Accessibility section in WebInspector Node Inspector. Other updates 
237         support the JSON interface for the WebInspectorUI feature.
238
239         Test: accessibility/roles-computedRoleString.html
240
241         * accessibility/AccessibilityObject.cpp:
242         (WebCore::initializeRoleMap):
243         (WebCore::ariaRoleMap):
244         (WebCore::reverseAriaRoleMap):
245         (WebCore::AccessibilityObject::ariaRoleToWebCoreRole):
246         (WebCore::AccessibilityObject::computedRoleString):
247         * accessibility/AccessibilityObject.h:
248         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
249         (-[WebAccessibilityObjectWrapper computedRoleString]):
250         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
251         * inspector/InspectorDOMAgent.cpp:
252         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
253         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
254         * inspector/InspectorDOMAgent.h:
255         * inspector/protocol/DOM.json:
256
257 2014-02-10  Oliver Hunt  <oliver@apple.com>
258
259         Stop throwing when attempting to read instance properties directly from the prototype
260         https://bugs.webkit.org/show_bug.cgi?id=128568
261
262         Reviewed by Mark Lam.
263
264         A number of websites expect to be able to access instance properties
265         directly through the prototype.  This is broken behavior but if we
266         throw an exception the entire site breaks.  This patch simply makes us
267         return undefined when reading, and logs the error to the console.
268
269         * bindings/scripts/CodeGeneratorJS.pm:
270         (GenerateImplementation):
271         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
272         (WebCore::jsTestActiveDOMObjectExcitingAttr):
273         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
274         (WebCore::jsTestEventConstructorAttr1):
275         (WebCore::jsTestEventConstructorAttr2):
276         * bindings/scripts/test/JS/JSTestException.cpp:
277         (WebCore::jsTestExceptionName):
278         * bindings/scripts/test/JS/JSTestInterface.cpp:
279         (WebCore::jsTestInterfaceImplementsStr1):
280         (WebCore::jsTestInterfaceImplementsStr2):
281         (WebCore::jsTestInterfaceImplementsStr3):
282         (WebCore::jsTestInterfaceImplementsNode):
283         (WebCore::jsTestInterfaceSupplementalStr1):
284         (WebCore::jsTestInterfaceSupplementalStr2):
285         (WebCore::jsTestInterfaceSupplementalStr3):
286         (WebCore::jsTestInterfaceSupplementalNode):
287         * bindings/scripts/test/JS/JSTestObj.cpp:
288         (WebCore::jsTestObjReadOnlyLongAttr):
289         (WebCore::jsTestObjReadOnlyStringAttr):
290         (WebCore::jsTestObjReadOnlyTestObjAttr):
291         (WebCore::jsTestObjConstructorTestSubObj):
292         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
293         (WebCore::jsTestObjEnumAttr):
294         (WebCore::jsTestObjByteAttr):
295         (WebCore::jsTestObjOctetAttr):
296         (WebCore::jsTestObjShortAttr):
297         (WebCore::jsTestObjUnsignedShortAttr):
298         (WebCore::jsTestObjLongAttr):
299         (WebCore::jsTestObjLongLongAttr):
300         (WebCore::jsTestObjUnsignedLongLongAttr):
301         (WebCore::jsTestObjStringAttr):
302         (WebCore::jsTestObjTestObjAttr):
303         (WebCore::jsTestObjXMLObjAttr):
304         (WebCore::jsTestObjCreate):
305         (WebCore::jsTestObjReflectedStringAttr):
306         (WebCore::jsTestObjReflectedIntegralAttr):
307         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
308         (WebCore::jsTestObjReflectedBooleanAttr):
309         (WebCore::jsTestObjReflectedURLAttr):
310         (WebCore::jsTestObjReflectedCustomIntegralAttr):
311         (WebCore::jsTestObjReflectedCustomBooleanAttr):
312         (WebCore::jsTestObjReflectedCustomURLAttr):
313         (WebCore::jsTestObjTypedArrayAttr):
314         (WebCore::jsTestObjAttrWithGetterException):
315         (WebCore::jsTestObjAttrWithSetterException):
316         (WebCore::jsTestObjStringAttrWithGetterException):
317         (WebCore::jsTestObjStringAttrWithSetterException):
318         (WebCore::jsTestObjCustomAttr):
319         (WebCore::jsTestObjWithScriptStateAttribute):
320         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
321         (WebCore::jsTestObjWithScriptStateAttributeRaises):
322         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
323         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
324         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
325         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
326         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
327         (WebCore::jsTestObjConditionalAttr1):
328         (WebCore::jsTestObjConditionalAttr2):
329         (WebCore::jsTestObjConditionalAttr3):
330         (WebCore::jsTestObjConditionalAttr4Constructor):
331         (WebCore::jsTestObjConditionalAttr5Constructor):
332         (WebCore::jsTestObjConditionalAttr6Constructor):
333         (WebCore::jsTestObjCachedAttribute1):
334         (WebCore::jsTestObjCachedAttribute2):
335         (WebCore::jsTestObjAnyAttribute):
336         (WebCore::jsTestObjContentDocument):
337         (WebCore::jsTestObjMutablePoint):
338         (WebCore::jsTestObjImmutablePoint):
339         (WebCore::jsTestObjStrawberry):
340         (WebCore::jsTestObjStrictFloat):
341         (WebCore::jsTestObjDescription):
342         (WebCore::jsTestObjId):
343         (WebCore::jsTestObjHash):
344         (WebCore::jsTestObjReplaceableAttribute):
345         (WebCore::jsTestObjNullableDoubleAttribute):
346         (WebCore::jsTestObjNullableLongAttribute):
347         (WebCore::jsTestObjNullableBooleanAttribute):
348         (WebCore::jsTestObjNullableStringAttribute):
349         (WebCore::jsTestObjNullableLongSettableAttribute):
350         (WebCore::jsTestObjNullableStringValue):
351         (WebCore::jsTestObjAttribute):
352         (WebCore::jsTestObjAttributeWithReservedEnumType):
353         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
354         (WebCore::jsTestSerializedScriptValueInterfaceValue):
355         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
356         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
357         (WebCore::jsTestSerializedScriptValueInterfacePorts):
358         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
359         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
360         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
361         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
362         (WebCore::jsTestTypedefsConstructorTestSubObj):
363         (WebCore::jsTestTypedefsAttrWithGetterException):
364         (WebCore::jsTestTypedefsAttrWithSetterException):
365         (WebCore::jsTestTypedefsStringAttrWithGetterException):
366         (WebCore::jsTestTypedefsStringAttrWithSetterException):
367         * bindings/scripts/test/JS/JSattribute.cpp:
368         (WebCore::jsattributeReadonly):
369
370 2014-02-11  Sergio Villar Senin  <svillar@igalia.com>
371
372         [CSS Grid Layout] Support calc() breadth size type
373         https://bugs.webkit.org/show_bug.cgi?id=103761
374
375         Reviewed by Dean Jackson.
376
377         We now support using calc() in
378         -webkit-grid-template-{columns|rows}. This means that we now
379         match the specification and support all the possible ways to
380         specify the track breadths.
381
382         This includes a fix to CSSCalculationValue that was converting
383         Length values to CalcExpressionNumber and thus removing all the
384         info regarding length units (px, em, pt...). That's why things
385         like calc(10px + 20%) were shown as calc(10 + 20%) in
386         getComputedStyle() output.
387
388         * css/CSSCalculationValue.cpp:
389         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
390         * css/CSSComputedStyleDeclaration.cpp:
391         (WebCore::zoomAdjustedPixelValueForLength):
392         (WebCore::specifiedValueForGridTrackBreadth):
393         (WebCore::specifiedValueForGridTrackSize):
394         * css/StyleResolver.cpp:
395         (WebCore::createGridTrackBreadth):
396         * rendering/RenderGrid.cpp:
397         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
398         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
399         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
400
401 2014-02-11  Brent Fulgham  <bfulgham@apple.com>
402
403         Correct some uses of 'auto'
404         https://bugs.webkit.org/show_bug.cgi?id=128578
405
406         Reviewed by Anders Carlsson.
407
408         Correct the following instances of "for (auto ...)" to use reference or
409         const references to avoid copies.
410
411         * accessibility/AccessibilityObject.cpp:
412         (WebCore::AccessibilityObject::elementsFromAttribute):
413         * css/CSSGridTemplateValue.cpp:
414         (WebCore::stringForPosition):
415         * dom/Node.cpp:
416         (WebCore::NodeListsNodeData::invalidateCaches):
417         * inspector/PageInjectedScriptManager.cpp:
418         (WebCore::PageInjectedScriptManager::discardInjectedScriptsFor):
419         * page/WheelEventDeltaTracker.cpp:
420         (WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
421         * page/scrolling/ScrollingCoordinator.cpp:
422         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
423         * platform/graphics/mac/WebLayer.mm:
424         (WebCore::drawLayerContents):
425         * platform/ios/TileGrid.mm:
426         (WebCore::TileGrid::dropTilesBetweenRects):
427         (WebCore::TileGrid::dropDistantTiles):
428         (WebCore::TileGrid::dropInvalidTiles):
429         * rendering/InlineTextBox.cpp:
430         (WebCore::translateIntersectionPointsToSkipInkBoundaries):
431         * testing/InternalSettings.cpp:
432         (WebCore::InternalSettings::Backup::restoreTo):
433
434 2014-02-10  David Hyatt  <hyatt@apple.com>
435
436         [New Multicolumn] Make columns work with line grids
437         https://bugs.webkit.org/show_bug.cgi?id=128555
438
439         Reviewed by Antti Koivisto.
440
441         Added line-snap-into-columns.html and line-snap-inside-columns.html
442
443         * rendering/LayoutState.cpp:
444         (WebCore::LayoutState::LayoutState):
445         * rendering/LayoutState.h:
446         (WebCore::LayoutState::pageOffset):
447         (WebCore::LayoutState::setLineGridPaginationOrigin):
448         Change the LayoutState to call into the renderer to compute the line
449         grid pagination origin instead of doing it directly. Added the
450         appropriate getters and setters to enable the renderer to do this.
451
452         * rendering/RenderBlock.cpp:
453         (WebCore::RenderBlock::computeLineGridPaginationOrigin):
454          * rendering/RenderBlock.h:
455         An implementation for the old multi-column code. The logic is the
456         same with tweaks made now that the method is on the renderer instead.
457
458         * rendering/RenderBlockFlow.cpp:
459         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
460         Fix a bug with flow threads and pageLogicalTopForOffset. Normal CSS region-based
461         flow threads are never embedded in an enclosing pagination context, so they
462         didn't add in the firstPageLogicalTop (or subtract it when computing the region
463         hit). Multi-column flow threads do need to subtract out the firstPageLogicalTop,
464         since it can occur somewhere on the page.
465         
466         Ultimately regions will need to get smarter here too if they want to work with
467         line grids, but for now I just fixed multi-column.
468
469         * rendering/RenderBox.cpp:
470         (WebCore::RenderBox::isUnsplittableForPagination):
471         Undo this change, since it prevents the inheritance of line grids into the
472         multi-column layout.
473
474         * rendering/RenderMultiColumnFlowThread.cpp:
475         (WebCore::RenderMultiColumnFlowThread::computeLineGridPaginationOrigin):
476         * rendering/RenderMultiColumnFlowThread.h:
477         An implementation for the new multi-column code. The logic is the
478         same as the old code. Code duplication is ok, since the old multi-column method
479         in RenderBlock will just be deleted once the new code is turned on, and it's easier
480         not to intertwine them.
481
482 2014-02-11  Radu Stavila  <stavila@adobe.com>
483
484         [CSS Regions] Overflow above the first region is not properly painted for regions with padding
485         https://bugs.webkit.org/show_bug.cgi?id=128590
486
487         Reviewed by Andrei Bucur.
488
489         Painting is done using the layer of the region's container, so offsetting using the content box
490         of the region itself is incorrect. 
491
492         Test: fast/regions/region-padding-overflow-hidden.html
493
494         * rendering/RenderLayer.cpp:
495         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
496         * rendering/RenderRegion.cpp:
497         (WebCore::RenderRegion::regionContainer):
498         (WebCore::RenderRegion::regionContainerLayer):
499         * rendering/RenderRegion.h:
500
501 2014-02-11  Benjamin Poulain  <benjamin@webkit.org>
502
503         querySelector() does not use the compiler correctly
504         https://bugs.webkit.org/show_bug.cgi?id=128588
505
506         Reviewed by Andreas Kling.
507
508         * dom/SelectorQuery.cpp:
509         (WebCore::SelectorDataList::execute):
510         I messed up the refactoring when I landed SelectorQuery. The compiled
511         code was not used the first time through SelectorDataList::execute.
512
513 2014-02-11  Piotr Grad  <p.grad@samsung.com>
514
515         [GStreamer] High playback rate causes crash
516         https://bugs.webkit.org/show_bug.cgi?id=128453
517
518         Reviewed by Philippe Normand.
519
520         To high playback rate passed to GStreamer was causing crash.
521         Added guard in setRate method.
522
523         Test: media/video-extreme-playbackrate-crash.html
524
525         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
526         (WebCore::MediaPlayerPrivateGStreamer::setRate):
527
528 2014-02-10  Brady Eidson  <beidson@apple.com>
529
530         IndexedDB assertion at IDBTransactionBackend::~IDBTransactionBackend()
531         https://bugs.webkit.org/show_bug.cgi?id=128341
532
533         Reviewed by Maciej Stachowiak.
534
535         * Modules/indexeddb/IDBTransactionBackend.cpp:
536         (WebCore::IDBTransactionBackend::~IDBTransactionBackend): "Finished" is not the only
537           valid value here - In WK2, "Unused" is also valid. Update the ASSERT.
538
539 2014-02-10  Alexey Proskuryakov  <ap@apple.com>
540
541         Add hooks for wrapping CryptoKeys in SerializedScriptValue
542         https://bugs.webkit.org/show_bug.cgi?id=128567
543
544         Reviewed by Anders Carlsson.
545
546         * bindings/js/SerializedScriptValue.cpp: Changed SerializedScriptValue to serialize
547         wrapped keys. Added a version number to crypto key serialization.
548
549         * dom/Document.cpp:
550         (WebCore::Document::wrapCryptoKey):
551         (WebCore::Document::unwrapCryptoKey):
552         * dom/Document.h:
553         * dom/ScriptExecutionContext.h:
554         * page/ChromeClient.h:
555         (WebCore::ChromeClient::wrapCryptoKey):
556         (WebCore::ChromeClient::unwrapCryptoKey):
557         Hand wrapping/unwrapping over to client code.
558
559         * workers/WorkerGlobalScope.cpp:
560         (WebCore::WorkerGlobalScope::wrapCryptoKey):
561         (WebCore::WorkerGlobalScope::unwrapCryptoKey):
562         * workers/WorkerGlobalScope.h:
563         Not implemented in workers. SubtleCrypto is currently not exposed in workers. It used
564         to be possible in WebKit implementation to post a CryptoKey to a worker anyway,
565         but this doesn't work any more.
566
567 2014-02-10  ChangSeok Oh  <changseok.oh@collabora.com>
568
569         Support ANGLE_instanced_arrays for linux
570         https://bugs.webkit.org/show_bug.cgi?id=127465
571
572         Reviewed by Martin Robinson.
573
574         Support the instanced drawing WebGL extension, ANGLE_instanced_arrays for linux platform.
575         This is a following patch for r162565. Relevant opengl APIs are exposed
576         for WebGLRenderingContext to access them.
577
578         Covered by fast/canvas/webgl/angle-instanced-arrays.html
579
580         * html/canvas/ANGLEInstancedArrays.cpp:
581         (WebCore::ANGLEInstancedArrays::supported):
582         * platform/graphics/OpenGLShims.cpp:
583         (WebCore::initializeOpenGLShims):
584         * platform/graphics/OpenGLShims.h:
585         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
586         (WebCore::Extensions3DOpenGL::supportsExtension):
587         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
588         (WebCore::GraphicsContext3D::drawArraysInstanced):
589         (WebCore::GraphicsContext3D::drawElementsInstanced):
590         (WebCore::GraphicsContext3D::vertexAttribDivisor):
591
592 2014-02-10  Mark Lam  <mark.lam@apple.com>
593
594         Removing limitation on JSLock’s lockDropDepth.
595         <https://webkit.org/b/128570>
596
597         Reviewed by Geoffrey Garen.
598
599         No new tests.
600
601         * bindings/js/PageScriptDebugServer.cpp:
602         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
603         * platform/ios/wak/WebCoreThread.mm:
604         (SendDelegateMessage):
605         (WebThreadRunOnMainThread):
606         - No longer need to specify AlwaysDropLocks, because DropAllLocks is
607           now always unconditional.
608
609 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
610
611         Clean up MarkupAccumulator::appendCharactersReplacingEntities
612         https://bugs.webkit.org/show_bug.cgi?id=128440
613
614         Reviewed by Ryosuke Niwa.
615
616         Some cleanup:
617         -Remove the copied code for the loops. Instead, use a template with the loop
618          parametrized by the characters type.
619         -Move EntityDescription from the header to the implementation.
620         -Make the 5 substitution strings compile-time literals. Replacement is not hot enough
621          to justify the static here.
622
623         * editing/MarkupAccumulator.cpp:
624         (WebCore::appendCharactersReplacingEntitiesInternal):
625         (WebCore::MarkupAccumulator::appendCharactersReplacingEntities):
626         * editing/MarkupAccumulator.h:
627
628 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
629
630         Add a few pseudo type to the selector compiler through function calls
631         https://bugs.webkit.org/show_bug.cgi?id=128514
632
633         Reviewed by Dean Jackson.
634
635         Certain pseudo type checkers rely on virtual function calls. Since those types
636         are uncommon, and this code generator cannot currently make virtual function calls,
637         the checker are added by generating a function call to a wrapper function.
638
639         To avoid code duplication between SelectorChecker and the compiler, all the relevant checking
640         code has been moved to a common header, SelectorCheckerTestFunctions.h.
641         SelectorChecker still inline the functions, while the SelectorCompiler generate local static functions
642         and generate calls to them as needed.
643
644         * GNUmakefile.list.am:
645         * WebCore.vcxproj/WebCore.vcxproj:
646         * WebCore.vcxproj/WebCore.vcxproj.filters:
647         * WebCore.xcodeproj/project.pbxproj:
648         * css/SelectorChecker.cpp:
649         (WebCore::SelectorChecker::checkOne):
650         * css/SelectorCheckerTestFunctions.h: Added.
651         (WebCore::isAutofilled):
652         (WebCore::isDefaultButtonForForm):
653         (WebCore::isDisabled):
654         (WebCore::isEnabled):
655         (WebCore::isChecked):
656         (WebCore::isInvalid):
657         (WebCore::isOptionalFormControl):
658         (WebCore::isRequiredFormControl):
659         (WebCore::isValid):
660         (WebCore::matchesReadOnlyPseudoClass):
661         (WebCore::matchesReadWritePseudoClass):
662         (WebCore::shouldAppearIndeterminate):
663         (WebCore::matchesFullScreenPseudoClass):
664         (WebCore::matchesFutureCuePseudoClass):
665         (WebCore::matchesPastCuePseudoClass):
666         * cssjit/SelectorCompiler.cpp:
667         (WebCore::SelectorCompiler::addPseudoType):
668         (WebCore::SelectorCompiler::nonConstTestFunctionWrapper):
669         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
670         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
671         * dom/Element.h:
672         (WebCore::Element::isValidFormControlElement):
673         * dom/Node.h:
674         (WebCore::Node::toInputElement):
675         * html/HTMLFormControlElement.cpp:
676         (WebCore::HTMLFormControlElement::isValidFormControlElement):
677         * html/HTMLFormControlElement.h:
678
679 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
680
681         Add the basic infrastructure to compile attributes matching in selectors
682         https://bugs.webkit.org/show_bug.cgi?id=128484
683
684         Reviewed by Gavin Barraclough.
685
686         Tests: fast/selectors/querySelector-attribute-match-with-child-backtracking.html
687                fast/selectors/querySelector-long-attribute-match-with-child-backtracking.html
688                fast/selectors/querySelector-long-multiple-attribute-match-with-child-backtracking.html
689                fast/selectors/querySelector-multiple-attribute-match-with-child-backtracking.html
690
691         Add the infrastructure to match attributes. This only add basic support for the 'Set' match
692         type, the other match types will have to be built on top.
693
694         * cssjit/RegisterAllocator.h:
695         (WebCore::RegisterAllocator::availableRegisterCount):
696         (WebCore::RegisterAllocator::allocateRegister):
697         (WebCore::RegisterAllocator::deallocateRegister):
698         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
699         (WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
700         (WebCore::RegisterAllocator::allocatedRegisters):
701         (WebCore::RegisterAllocator::RegisterAllocator):
702         (WebCore::RegisterAllocator::~RegisterAllocator):
703         In the worst case, matching attributes can take up to 10 registers. On x86_64, we have
704         8 caller-saved registers. The extra 2 registers are simply added by taking callee-saved registers.
705
706         RegisterAllocator is modified to know support saving and restoring callee saved registers.
707         The list of available registers is changed from a vector to a HashSet because the registers
708         are removed from arbitrary locations in restoreCalleeSavedRegisters(). The m_allocatedRegisters
709         remain a vector since the allocation/release pattern remain ordered.
710
711         * cssjit/SelectorCompiler.cpp:
712         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
713
714         (WebCore::SelectorCompiler::minimumRegisterRequirements):
715         This new utility finds the minimum number of registers needed to compile the input. In most
716         cases we have plenty enough. In rare cases we need to saved a few registers to the stack.
717
718         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
719         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
720         (WebCore::SelectorCompiler::testIsHTMLFlagOnNode):
721         (WebCore::SelectorCompiler::canMatchStyleAttribute):
722
723         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
724         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
725         The style attribute and certain SVG attributes can be modified lazily. In those cases,
726         the element needs to be updated before querying the attributes.
727
728         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
729         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
730         Generate the attribute matching. For each CSSSelector matching an attribute, we generate
731         a loop over all the attributes of the element, maching the particular CSSSelector.
732         This makes no attempt at grouping related queries since those do not seem to happen a lot
733         in practice.
734
735         * dom/Attribute.h:
736         (WebCore::Attribute::nameMemoryOffset):
737         (WebCore::Attribute::nameMatchesFilter):
738         (WebCore::Attribute::matches):
739         * dom/ElementData.h:
740         (WebCore::ElementData::isUniqueFlag):
741         (WebCore::ElementData::arraySizeAndFlagsMemoryOffset):
742         (WebCore::ElementData::styleAttributeIsDirtyFlag):
743         (WebCore::ElementData::animatedSVGAttributesAreDirtyFlag):
744         (WebCore::ElementData::arraySizeOffset):
745         (WebCore::ShareableElementData::attributeArrayMemoryOffset):
746         (WebCore::UniqueElementData::attributeVectorMemoryOffset):
747         * dom/Node.h:
748         (WebCore::Node::flagIsHTML):
749         * dom/StyledElement.cpp:
750         (WebCore::StyledElement::synchronizeStyleAttributeInternal):
751         * dom/StyledElement.h:
752         (WebCore::StyledElement::synchronizeStyleAttributeInternal):
753         * svg/SVGElement.cpp:
754         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
755         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute):
756         * svg/SVGElement.h:
757
758 2014-02-10  Brady Eidson  <beidson@apple.com>
759
760         IDB: storage/indexeddb/mozilla/indexes.html fails
761         <rdar://problem/16031590> and https://bugs.webkit.org/show_bug.cgi?id=128563
762
763         Reviewed by Tim Horton.
764
765         Tested by storage/indexeddb/mozilla/indexes.html (and probably others)
766
767         * Modules/indexeddb/IDBGetResult.h:
768         (WebCore::IDBGetResult::IDBGetResult): Add a constructor that takes an IDBKeyData argument.
769
770         * Modules/indexeddb/IDBRequest.cpp:
771         (WebCore::IDBRequest::onSuccess): If there’s no keyPath then skip the injection step.
772
773 2014-02-10  Benjamin Poulain  <benjamin@webkit.org>
774
775         Speed up DatasetDOMStringMap::item() when the element has multiple attributes
776         https://bugs.webkit.org/show_bug.cgi?id=128058
777
778         Reviewed by Darin Adler.
779
780         Accessing data attributes by name through DatasetDOMStringMap involes the conversion
781         from JavaScript property name to attribute name (done with propertyNameMatchesAttributeName()).
782
783         When there is a single data attribute, that method is efficient. When there are several attributes,
784         comparing names character by character becomes a bottleneck.
785
786         This patch add an efficent path for this case: instead of converting the attribute name on the fly,
787         the JavaScript property name is converted to an attribute name so that it can compared by its
788         AtomicStringImpl pointer.
789
790         This method puts a lot more pressure on convertPropertyNameToAttributeName()'s speed. The method was
791         improved accordingly to compensate for its new caller.
792
793         When enumerating multiple attributes by name, this patch provides about 80% speedup.
794         I could not measure any slow down on the simple cases.
795
796         * dom/DatasetDOMStringMap.cpp:
797         (WebCore::convertPropertyNameToAttributeName):
798         (WebCore::DatasetDOMStringMap::item):
799         * dom/ElementData.h:
800         (WebCore::AttributeIteratorAccessor::attributeCount):
801
802 2014-02-10  Ryosuke Niwa  <rniwa@webkit.org>
803
804         Address the review comments for r163825.
805
806         * html/HTMLTextFormControlElement.cpp:
807         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
808         (WebCore::positionForIndex):
809
810 2014-02-10  Simon Fraser  <simon.fraser@apple.com>
811
812         Try to fix the 32-bit build.
813
814         * WebCore.exp.in:
815
816 2014-02-10  Filip Pizlo  <fpizlo@apple.com>
817
818         Rename Operations.h to JSCInlines.h
819         https://bugs.webkit.org/show_bug.cgi?id=128543
820
821         Rubber stamped by Geoffrey Garen.
822
823         No new tests because no change in behavior.
824
825         * ForwardingHeaders/runtime/JSCInlines.h: Added.
826         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
827         * bindings/js/JSCryptoKeySerializationJWK.cpp:
828         * bindings/js/JSCustomXPathNSResolver.h:
829         * bindings/js/JSDOMBinding.h:
830         * bindings/js/JSDOMGlobalObject.h:
831         * bindings/js/JSDictionary.h:
832         * bindings/js/JSMessagePortCustom.cpp:
833         * bindings/js/JSMessagePortCustom.h:
834         * bindings/js/JSNodeFilterCondition.h:
835         * bindings/js/SerializedScriptValue.cpp:
836         * bindings/js/WebCoreTypedArrayController.cpp:
837         * bridge/c/c_utility.h:
838         * bridge/jsc/BridgeJSC.h:
839         * dom/CustomEvent.cpp:
840         * dom/Node.cpp:
841         * html/HTMLCanvasElement.cpp:
842         * html/HTMLImageLoader.cpp:
843         * html/canvas/WebGLRenderingContext.cpp:
844         * inspector/InspectorDOMAgent.cpp:
845         * inspector/WebConsoleAgent.cpp:
846         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
847         * platform/graphics/filters/FEGaussianBlur.cpp:
848         * platform/graphics/filters/FilterEffect.cpp:
849         * testing/MockCDM.cpp:
850         * xml/XMLHttpRequest.cpp:
851
852 2014-02-09  Dean Jackson  <dino@apple.com>
853
854         Update aspect-ratio property to have constraining keywords
855         https://bugs.webkit.org/show_bug.cgi?id=128262
856
857         Reviewed by Simon Fraser.
858
859         Add support for "from-dimensions" and "from-intrinsic"
860         property values to "-webkit-aspect-ratio". I also changed
861         the default value from "none" to "auto", because "none" doesn't
862         make sense any more.
863
864         Covered by enhancing existing tests.
865
866         * css/CSSComputedStyleDeclaration.cpp:
867         (WebCore::ComputedStyleExtractor::propertyValue): New keywords.
868         * css/CSSParser.cpp:
869         (WebCore::CSSParser::parseAspectRatio): Support new keywords.
870         * css/CSSValueKeywords.in: Add from-dimensions and from-intrinsic.
871         * css/DeprecatedStyleBuilder.cpp: This now has to handle the new
872         values. I also changed "none" to "auto".
873         (WebCore::ApplyPropertyAspectRatio::applyInheritValue):
874         (WebCore::ApplyPropertyAspectRatio::applyInitialValue):
875         (WebCore::ApplyPropertyAspectRatio::applyValue):
876         * rendering/style/RenderStyle.h: hasAspectRatio is now aspectRatioType
877         and indicates one of the three keywords, or a specified number.
878         * rendering/style/RenderStyleConstants.h: New enum.
879         * rendering/style/StyleRareNonInheritedData.cpp:
880         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
881         (WebCore::StyleRareNonInheritedData::operator==):
882         * rendering/style/StyleRareNonInheritedData.h:
883
884 2014-02-10  Benjamin Poulain  <bpoulain@apple.com>
885
886         [WK2] Add support for image document viewport configuration
887         https://bugs.webkit.org/show_bug.cgi?id=128565
888
889         Reviewed by Simon Fraser.
890
891         Add proper default settings for displaying images.
892
893         * WebCore.exp.in:
894         * page/ViewportConfiguration.cpp:
895         (WebCore::ViewportConfiguration::imageDocumentParameters):
896         (WebCore::ViewportConfiguration::textDocumentParameters):
897         * page/ViewportConfiguration.h:
898
899 2014-02-10  Brendan Long  <b.long@cablelabs.com>
900
901         Unreviewed GTK build fix after r163816.
902
903         * GNUmakefile.list.am: Remove HTMLMediaSource.h and HTMLMediaSource.cpp
904
905 2014-02-10  Jinwoo Song  <jinwoo7.song@samsung.com>
906
907         Unreviewed EFL WebKit2 build fix after r163816.
908
909         * CMakeLists.txt: Remove HTMLMediaSource.cpp
910
911 2014-02-10  Ryosuke Niwa  <rniwa@webkit.org>
912
913         HTMLTextFormControlElement::setSelectionRange shouldn't use VisiblePosition
914         https://bugs.webkit.org/show_bug.cgi?id=128478
915
916         Reviewed by Darin Adler.
917
918         Added positionForIndex to compute Position given a selection index. This function doesn't
919         synchronously trigger like visiblePositionForIndex.
920
921         Also added assertions in visiblePositionForIndex and visiblePositionForIndex to make sure
922         they are inverse of one another.
923
924         * html/HTMLTextFormControlElement.cpp:
925         (WebCore::HTMLTextFormControlElement::setSelectionRange): Use positionForIndex. Also removed
926         the now tautological assertions since we would never create a position outside the inner text
927         element.
928
929         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Fixed the bug where this
930         function could return a selection index beyond innerTextElement in some types of input
931         elements such as search fields. fast/forms/search-disabled-readonly.html hits the newly
932         added assertion without this change. Note we can't use visiblePositionForIndex here as that
933         would result in a mutual recursion with the assertion in visiblePositionForIndex.
934
935         (WebCore::HTMLTextFormControlElement::visiblePositionForIndex): Added an assertion.
936
937         (WebCore::positionForIndex): Added. It's here with prototype at the beginning of the file
938         so that it's right next to HTMLTextFormControlElement::innerText() where we do a similar
939         DOM traversal to obtain the inner text value.
940
941 2014-02-07  Jeffrey Pfau  <jpfau@apple.com>
942
943         Disable access to application cache when in private browsing
944         https://bugs.webkit.org/show_bug.cgi?id=128426
945
946         Reviewed by Alexey Proskuryakov.
947
948         Tests: http/tests/security/appcache-in-private-browsing.html
949                http/tests/security/appcache-switching-private-browsing.html
950
951         * loader/appcache/ApplicationCacheGroup.cpp:
952         (WebCore::ApplicationCacheGroup::cacheForMainRequest):
953         (WebCore::ApplicationCacheGroup::selectCache):
954         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
955         (WebCore::ApplicationCacheGroup::update):
956         * loader/appcache/ApplicationCacheHost.cpp:
957         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
958
959 2014-02-10  Jer Noble  <jer.noble@apple.com>
960
961         [MSE] Fix layering violations in MediaSource
962         https://bugs.webkit.org/show_bug.cgi?id=128546
963
964         Reviewed by Eric Carlson.
965
966         Code in Modules should be considered part of html/ and should have the
967         same layering properties. Get rid of HTMLMediaSource (which was intended
968         to allow Modules/mediasource to be considered part of platform/) and add
969         a new client interface allowing communication from platform/ -> 
970         Modules/mediasource.
971
972         Replace HTMLMediaSource -> MediaSourcePrivateClient:
973         * html/HTMLMediaSource.cpp: Removed.
974         * html/HTMLMediaSource.h: Removed.
975         * platform/graphics/MediaSourcePrivateClient.h: Added.
976         (WebCore::MediaSourcePrivateClient::~MediaSourcePrivateClient):
977
978         Move registry support from HTMLMediaSource -> MediaSource.
979         * Modules/mediasource/MediaSource.cpp:
980         (WebCore::MediaSource::setRegistry): Moved from HTMLMediaSource.cpp.
981         * Modules/mediasource/MediaSource.h:
982         (WebCore::MediaSource::lookup): Ditto.
983
984         Update references to HTMLMediaSource -> MediaSource:
985         * Modules/mediasource/MediaSourceRegistry.cpp:
986         (WebCore::MediaSourceRegistry::MediaSourceRegistry): 
987         * WebCore.xcodeproj/project.pbxproj:
988         * html/HTMLMediaElement.cpp:
989         (WebCore::HTMLMediaElement::loadResource):
990         * html/HTMLMediaElement.h:
991
992         Update references to HTMLMediaSource -> MediaSourcePrivateClient:
993         * platform/graphics/MediaPlayer.cpp:
994         (WebCore::NullMediaPlayerPrivate::load):
995         (WebCore::MediaPlayer::load): Ditto.
996         (WebCore::MediaPlayer::loadWithNextMediaEngine):
997         * platform/graphics/MediaPlayer.h:
998         * platform/graphics/MediaPlayerPrivate.h:
999         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1000         (WebCore::MediaPlayerPrivateAVFoundation::load):
1001         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1002         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1003         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1004         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
1005         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1006         (WebCore::MediaPlayerPrivateGStreamer::load):
1007         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1008         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
1009         (WebCore::MediaSourceGStreamer::open):
1010         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
1011         * platform/graphics/ios/MediaPlayerPrivateIOS.h:
1012         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1013         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1014         (WebCore::MediaPlayerPrivateQTKit::load):
1015         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1016         (WebCore::MockMediaPlayerMediaSource::load):
1017         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1018
1019 2014-02-10  Alexey Proskuryakov  <ap@apple.com>
1020
1021         Remove some unused functions from SerializedScriptValue
1022         https://bugs.webkit.org/show_bug.cgi?id=128407
1023
1024         Reviewed by Oliver Hunt.
1025
1026         Removed functions that used Deprecated::ScriptValue
1027
1028         * Modules/indexeddb/IDBObjectStore.cpp:
1029         (WebCore::IDBObjectStore::put):
1030         * bindings/js/IDBBindingUtilities.cpp:
1031         (WebCore::deserializeIDBValue):
1032         (WebCore::deserializeIDBValueBuffer):
1033         * bindings/js/SerializedScriptValue.cpp:
1034         * bindings/js/SerializedScriptValue.h:
1035
1036 2014-02-10  Roger Fong  <roger_fong@apple.com>
1037
1038         [Windows] Unreviewed test fix.
1039
1040         * platform/graphics/cg/GraphicsContextCG.cpp: m_pixelSnappingFactor was not set to 1.
1041         (WebCore::GraphicsContext::platformInit):
1042
1043 2014-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1044
1045         [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
1046         https://bugs.webkit.org/show_bug.cgi?id=127554
1047
1048         Reviewed by Gustavo Noronha Silva.
1049
1050         Use GUniqueOutPtr instead of GOwnPtr.
1051
1052         * GNUmakefile.list.am:
1053         * PlatformEfl.cmake:
1054         * PlatformGTK.cmake:
1055         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1056         (WebCore::AudioDestinationGStreamer::handleMessage):
1057         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1058         (WebCore::AudioFileReader::handleMessage):
1059         * platform/glib/BatteryProviderUPower.cpp:
1060         (BatteryProviderUPower::startUpdating):
1061         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
1062         (WebCore::initializeGStreamer):
1063         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1064         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1065         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1066         (WebCore::TrackPrivateBaseGStreamer::getTag):
1067         * platform/graphics/gtk/ImageBufferGtk.cpp:
1068         (WebCore::encodeImage):
1069         (WebCore::ImageBuffer::toDataURL):
1070         * platform/graphics/gtk/ImageGtk.cpp:
1071         (WebCore::loadResourceSharedBuffer):
1072         * platform/gtk/DataObjectGtk.cpp:
1073         (WebCore::DataObjectGtk::setURIList):
1074         * platform/gtk/FileSystemGtk.cpp:
1075         (WebCore::readFromFile):
1076         * platform/gtk/GamepadsGtk.cpp:
1077         (WebCore::GamepadDeviceGtk::readCallback):
1078         * platform/gtk/GtkInputMethodFilter.cpp:
1079         (WebCore::GtkInputMethodFilter::handlePreeditChanged):
1080         * platform/gtk/PasteboardHelper.cpp:
1081         (WebCore::PasteboardHelper::fillDataObjectFromDropData):
1082         * platform/gtk/RenderThemeGtk.cpp:
1083         (WebCore::RenderThemeGtk::systemFont):
1084         * platform/gtk/SharedBufferGtk.cpp:
1085         (WebCore::SharedBuffer::createWithContentsOfFile):
1086         * platform/network/gtk/CredentialBackingStore.cpp:
1087         (WebCore::credentialForChallengeAsyncReadyCallback):
1088         * platform/network/soup/GOwnPtrSoup.cpp: Removed.
1089         * platform/network/soup/GOwnPtrSoup.h: Removed.
1090         * platform/network/soup/ResourceHandleSoup.cpp:
1091         (WebCore::redirectSkipCallback):
1092         (WebCore::nextMultipartResponsePartCallback):
1093         (WebCore::sendRequestCallback):
1094         (WebCore::addFileToSoupMessageBody):
1095         (WebCore::createSoupRequestAndMessageForHandle):
1096         (WebCore::readCallback):
1097         * platform/network/soup/SocketStreamHandleSoup.cpp:
1098         (WebCore::SocketStreamHandle::platformSend):
1099         (WebCore::SocketStreamHandle::platformClose):
1100         (WebCore::connectedCallback):
1101         (WebCore::readReadyCallback):
1102         * platform/network/soup/SoupNetworkSession.cpp:
1103         (WebCore::SoupNetworkSession::httpProxy):
1104
1105 2014-02-10  Darin Adler  <darin@apple.com>
1106
1107         Automatically generate isRendererOfType in RENDER_OBJECT_TYPE_CASTS
1108         https://bugs.webkit.org/show_bug.cgi?id=128520
1109
1110         Reviewed by Andreas Kling.
1111
1112         * rendering/RenderObject.h: Updated the RENDER_OBJECT_TYPE_CASTS macro so
1113         that it generates isRendererOfType specializations as well as type casts
1114         and also have the type casts use the isRendererOfType function. The macro
1115         also now uses an argument name of "renderer" and allows for a predicate
1116         that is more than just a single function call (see RenderTextFragment.h).
1117
1118         * rendering/RenderBlock.h:
1119         * rendering/RenderBlockFlow.h:
1120         * rendering/RenderBox.h:
1121         * rendering/RenderBoxModelObject.h:
1122         * rendering/RenderCounter.h:
1123         * rendering/RenderElement.h:
1124         * rendering/RenderFrameSet.h:
1125         * rendering/RenderLayerModelObject.h:
1126         * rendering/RenderMenuList.h:
1127         * rendering/RenderNamedFlowThread.h:
1128         * rendering/RenderRubyRun.h:
1129         * rendering/RenderTableSection.h:
1130         * rendering/RenderText.h:
1131         * rendering/mathml/RenderMathMLBlock.h:
1132         * rendering/mathml/RenderMathMLOperator.h:
1133         * rendering/mathml/RenderMathMLToken.h:
1134         * rendering/svg/RenderSVGRoot.h:
1135         * rendering/svg/RenderSVGText.h:
1136         Removed specialization of isRendererOfType, since the RENDER_OBJECT_TYPE_CASTS
1137         macro handles that now. Also removed some unneeded semicolons.
1138
1139         * rendering/RenderTextFragment.h: Use RENDER_OBJECT_TYPE_CASTS instead of
1140         hand written casts, now that it can handle a non-trivial predicate.
1141
1142         * rendering/RenderCombineText.h:
1143         * rendering/RenderDetailsMarker.h:
1144         * rendering/RenderListMarker.h:
1145         * rendering/RenderVideo.h:
1146         * rendering/RenderView.h:
1147         * rendering/mathml/RenderMathMLFraction.h:
1148         * rendering/mathml/RenderMathMLScripts.h:
1149         * rendering/mathml/RenderMathMLSpace.h:
1150         Removed unneeded semicolons.
1151
1152 2014-02-10  Darin Adler  <darin@apple.com>
1153
1154         Stop using String::deprecatedCharacters to call WTF::Collator
1155         https://bugs.webkit.org/show_bug.cgi?id=128517
1156
1157         Reviewed by Alexey Proskuryakov.
1158
1159         * xml/XSLTUnicodeSort.cpp:
1160         (WebCore::xsltUnicodeSortFunction): Create the collator in a single line using the
1161         new constructor that takes a shouldSortLowercaseFirst boolean. Use the new
1162         collateUTF8 function instead of upconverting UTF-8 strings to UTF-16 as the old code did.
1163
1164 2014-02-10  Changhun Kang  <temoochin@company100.net>
1165
1166         Remove unnecessary comment lines.
1167         https://bugs.webkit.org/show_bug.cgi?id=127894
1168
1169         Reviewed by Darin Adler.
1170
1171         No new tests. No change in behavior.
1172
1173         * Modules/websockets/WebSocketHandshake.cpp:
1174         (WebCore::WebSocketHandshake::clientHandshakeRequest):
1175
1176 2014-02-10  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1177
1178         Fix EFL build with INSPECTOR disabled
1179         https://bugs.webkit.org/show_bug.cgi?id=125064
1180
1181         Reviewed by Csaba Osztrogonác.
1182
1183         * bindings/js/PageScriptDebugServer.cpp:
1184         * bindings/js/PageScriptDebugServer.h:
1185         * bindings/js/WorkerScriptDebugServer.cpp:
1186         * bindings/js/WorkerScriptDebugServer.h:
1187         * inspector/PageInjectedScriptManager.h:
1188
1189 2014-02-10  Zan Dobersek  <zdobersek@igalia.com>
1190
1191         Fix a few mistakes that landed with r163749.
1192
1193         Rubber-stamped by Carlos Garcia Campos.
1194
1195         * platform/gtk/GtkTouchContextHelper.cpp:
1196         (WebCore::GtkTouchContextHelper::handleEvent): When handling GDK_TOUCH_BEGIN, the assertion
1197         should ensure that the sequence-to-event map doesn't yet contain pairs with the specific
1198         sequence as the key.
1199
1200 2014-02-10  David Kilzer  <ddkilzer@apple.com>
1201
1202         Add type-safe casts for ContentData subclasses
1203         <http://webkit.org/b/128510>
1204
1205         Reviewed by Darin Adler.
1206
1207         * css/CSSComputedStyleDeclaration.cpp:
1208         (WebCore::contentToCSSValue):
1209         * css/StyleResolver.cpp:
1210         (WebCore::StyleResolver::loadPendingImages):
1211         * rendering/RenderElement.cpp:
1212         (WebCore::RenderElement::createFor):
1213         * rendering/style/RenderStyle.cpp:
1214         (WebCore::RenderStyle::setContent):
1215         - Switch to toFooContentData() methods.
1216
1217         * rendering/style/ContentData.h:
1218         - Define toFooContentData() methods.
1219         - Extract FooContentData::equals() methods so that the
1220           toFooContentData() methods can be used.
1221
1222 2014-02-09  Dirk Schulze  <dschulze@chromium.org>
1223
1224         -webkit-clip-path should support fill, stroke, view-box keywords
1225         https://bugs.webkit.org/show_bug.cgi?id=128393
1226
1227         Reviewed by Dean Jackson.
1228
1229         CSS Masking uses the keywords fill, stroke and view-box for SVG shapes.
1230         This patch updates the parser, style resolver and SVG implementation of
1231         the prefixed clip-path property.
1232
1233         Remove the unexposed and obsolete keyword bounding-box.
1234
1235         Tests: svg/clip-path/clip-path-shape-fill-expected.svg
1236                svg/clip-path/clip-path-shape-fill.svg
1237                svg/clip-path/clip-path-shape-stroke-expected.svg
1238                svg/clip-path/clip-path-shape-stroke.svg
1239                svg/clip-path/clip-path-shape-view-box-expected.svg
1240                svg/clip-path/clip-path-shape-view-box.svg
1241
1242         * css/CSSParser.cpp: Parse fill, stroke, view-box. Remove bounding-box.
1243         (WebCore::isBoxValue):
1244         * css/CSSPrimitiveValueMappings.h:
1245         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1246         (WebCore::CSSPrimitiveValue::operator LayoutBox):
1247         * css/CSSValueKeywords.in:
1248         * css/DeprecatedStyleBuilder.cpp:
1249         (WebCore::ApplyPropertyClipPath::applyValue):
1250         * rendering/RenderLayer.cpp:
1251         (WebCore::computeReferenceBox):
1252         * rendering/shapes/ShapeInfo.h:
1253         (WebCore::ShapeInfo::setShapeSize):
1254         (WebCore::ShapeInfo::logicalTopOffset):
1255         (WebCore::ShapeInfo::logicalLeftOffset):
1256         * rendering/style/RenderStyleConstants.h:
1257         * rendering/svg/SVGRenderingContext.cpp: Use different reference boxes per keyword.
1258         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1259
1260 2014-02-09  Dean Jackson  <dino@apple.com>
1261
1262         [WebGL] Remove state restorer code
1263         https://bugs.webkit.org/show_bug.cgi?id=128516
1264
1265         Reviewed by Dirk Schulze.
1266
1267         I'm not sure what the point of the WebGLStateRestorer class was. It was
1268         always constructed with a false parameter, and then wasn't even retained
1269         in local scope (so wouldn't have worked anyway). Meanwhile there were
1270         also LOTS of calls to cleanupAfterGraphicsCall, the majority of which
1271         were a no-op. I replaced the handful of cleanupAfterGraphicsCall(true)
1272         with the call to markContextChanged().
1273
1274         * html/canvas/OESVertexArrayObject.cpp:
1275         (WebCore::OESVertexArrayObject::bindVertexArrayOES):
1276         * html/canvas/WebGLRenderingContext.cpp:
1277         (WebCore::WebGLRenderingContext::activeTexture):
1278         (WebCore::WebGLRenderingContext::attachShader):
1279         (WebCore::WebGLRenderingContext::bindAttribLocation):
1280         (WebCore::WebGLRenderingContext::bindBuffer):
1281         (WebCore::WebGLRenderingContext::bindFramebuffer):
1282         (WebCore::WebGLRenderingContext::bindRenderbuffer):
1283         (WebCore::WebGLRenderingContext::bindTexture):
1284         (WebCore::WebGLRenderingContext::blendColor):
1285         (WebCore::WebGLRenderingContext::blendEquation):
1286         (WebCore::WebGLRenderingContext::blendEquationSeparate):
1287         (WebCore::WebGLRenderingContext::blendFunc):
1288         (WebCore::WebGLRenderingContext::blendFuncSeparate):
1289         (WebCore::WebGLRenderingContext::bufferData):
1290         (WebCore::WebGLRenderingContext::bufferSubData):
1291         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
1292         (WebCore::WebGLRenderingContext::clear):
1293         (WebCore::WebGLRenderingContext::clearColor):
1294         (WebCore::WebGLRenderingContext::clearDepth):
1295         (WebCore::WebGLRenderingContext::clearStencil):
1296         (WebCore::WebGLRenderingContext::colorMask):
1297         (WebCore::WebGLRenderingContext::compileShader):
1298         (WebCore::WebGLRenderingContext::compressedTexImage2D):
1299         (WebCore::WebGLRenderingContext::compressedTexSubImage2D):
1300         (WebCore::WebGLRenderingContext::copyTexImage2D):
1301         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
1302         (WebCore::WebGLRenderingContext::cullFace):
1303         (WebCore::WebGLRenderingContext::depthFunc):
1304         (WebCore::WebGLRenderingContext::depthMask):
1305         (WebCore::WebGLRenderingContext::depthRange):
1306         (WebCore::WebGLRenderingContext::detachShader):
1307         (WebCore::WebGLRenderingContext::disable):
1308         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
1309         (WebCore::WebGLRenderingContext::validateDrawArrays):
1310         (WebCore::WebGLRenderingContext::drawArrays):
1311         (WebCore::WebGLRenderingContext::validateDrawElements):
1312         (WebCore::WebGLRenderingContext::drawElements):
1313         (WebCore::WebGLRenderingContext::enable):
1314         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
1315         (WebCore::WebGLRenderingContext::finish):
1316         (WebCore::WebGLRenderingContext::flush):
1317         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
1318         (WebCore::WebGLRenderingContext::framebufferTexture2D):
1319         (WebCore::WebGLRenderingContext::frontFace):
1320         (WebCore::WebGLRenderingContext::generateMipmap):
1321         (WebCore::WebGLRenderingContext::getBufferParameter):
1322         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
1323         (WebCore::WebGLRenderingContext::getParameter):
1324         (WebCore::WebGLRenderingContext::getProgramParameter):
1325         (WebCore::WebGLRenderingContext::getProgramInfoLog):
1326         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
1327         (WebCore::WebGLRenderingContext::getShaderParameter):
1328         (WebCore::WebGLRenderingContext::getShaderInfoLog):
1329         (WebCore::WebGLRenderingContext::getTexParameter):
1330         (WebCore::WebGLRenderingContext::getUniform):
1331         (WebCore::WebGLRenderingContext::getUniformLocation):
1332         (WebCore::WebGLRenderingContext::getVertexAttrib):
1333         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
1334         (WebCore::WebGLRenderingContext::hint):
1335         (WebCore::WebGLRenderingContext::lineWidth):
1336         (WebCore::WebGLRenderingContext::linkProgram):
1337         (WebCore::WebGLRenderingContext::pixelStorei):
1338         (WebCore::WebGLRenderingContext::polygonOffset):
1339         (WebCore::WebGLRenderingContext::readPixels):
1340         (WebCore::WebGLRenderingContext::releaseShaderCompiler):
1341         (WebCore::WebGLRenderingContext::renderbufferStorage):
1342         (WebCore::WebGLRenderingContext::sampleCoverage):
1343         (WebCore::WebGLRenderingContext::scissor):
1344         (WebCore::WebGLRenderingContext::shaderSource):
1345         (WebCore::WebGLRenderingContext::stencilFunc):
1346         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
1347         (WebCore::WebGLRenderingContext::stencilMask):
1348         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
1349         (WebCore::WebGLRenderingContext::stencilOp):
1350         (WebCore::WebGLRenderingContext::stencilOpSeparate):
1351         (WebCore::WebGLRenderingContext::texImage2DBase):
1352         (WebCore::WebGLRenderingContext::texImage2D):
1353         (WebCore::WebGLRenderingContext::texParameter):
1354         (WebCore::WebGLRenderingContext::texSubImage2DBase):
1355         (WebCore::WebGLRenderingContext::uniform1f):
1356         (WebCore::WebGLRenderingContext::uniform1fv):
1357         (WebCore::WebGLRenderingContext::uniform1i):
1358         (WebCore::WebGLRenderingContext::uniform1iv):
1359         (WebCore::WebGLRenderingContext::uniform2f):
1360         (WebCore::WebGLRenderingContext::uniform2fv):
1361         (WebCore::WebGLRenderingContext::uniform2i):
1362         (WebCore::WebGLRenderingContext::uniform2iv):
1363         (WebCore::WebGLRenderingContext::uniform3f):
1364         (WebCore::WebGLRenderingContext::uniform3fv):
1365         (WebCore::WebGLRenderingContext::uniform3i):
1366         (WebCore::WebGLRenderingContext::uniform3iv):
1367         (WebCore::WebGLRenderingContext::uniform4f):
1368         (WebCore::WebGLRenderingContext::uniform4fv):
1369         (WebCore::WebGLRenderingContext::uniform4i):
1370         (WebCore::WebGLRenderingContext::uniform4iv):
1371         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
1372         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
1373         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
1374         (WebCore::WebGLRenderingContext::useProgram):
1375         (WebCore::WebGLRenderingContext::validateProgram):
1376         (WebCore::WebGLRenderingContext::vertexAttribPointer):
1377         (WebCore::WebGLRenderingContext::viewport):
1378         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
1379         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
1380         (WebCore::WebGLRenderingContext::drawArraysInstanced):
1381         (WebCore::WebGLRenderingContext::drawElementsInstanced):
1382         * html/canvas/WebGLRenderingContext.h:
1383
1384 2014-02-09  Dean Jackson  <dino@apple.com>
1385
1386         Remove unused layer owner from WebGLLayer
1387         https://bugs.webkit.org/show_bug.cgi?id=128512
1388
1389         Reviewed by Dirk Schulze.
1390
1391         The m_layerOwner and ObjC category were not
1392         used anywhere.
1393
1394         * platform/graphics/mac/WebGLLayer.h:
1395         * platform/graphics/mac/WebGLLayer.mm:
1396         (-[WebGLLayer display]):
1397
1398 2014-02-09  Ryuan Choi  <ryuan.choi@samsung.com>
1399
1400         [EFL] Remove PageClientEfl
1401         https://bugs.webkit.org/show_bug.cgi?id=128508
1402
1403         Reviewed by Andreas Kling.
1404
1405         PageClientEfl was introduced for accelerated compositing of WebKit1, but
1406         it's bad idea because it's layer violation.
1407         Indeed, it has never been used since introduced.
1408
1409         * platform/Widget.h: Back to PlatformPageClient to Evas_Object.
1410         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1411         Removed empty method which use PageClientEfl.
1412         * platform/graphics/efl/GraphicsContext3DPrivate.h: Ditto.
1413
1414 2014-02-09  Tim Horton  <timothy_horton@apple.com>
1415
1416         [iOS][wk2] ASSERT(WebThreadIsCurrent()) in [WebDisplayLinkHandler handleDisplayLink:]
1417         https://bugs.webkit.org/show_bug.cgi?id=128490
1418
1419         Reviewed by Simon Fraser.
1420
1421         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
1422         (-[WebDisplayLinkHandler handleDisplayLink:]):
1423         [WebDisplayLinkHandler handleDisplayLink:] has an ASSERT(WebThreadIsCurrent()).
1424
1425         We don't use the Web Thread in WebKit2, but it looks like isMainThread()
1426         does the right thing (main thread if web thread is disabled, web thread
1427         otherwise), so use that instead.
1428
1429 2014-02-09  Anders Carlsson  <andersca@apple.com>
1430
1431         Add WTF_MAKE_FAST_ALLOCATED to more classes
1432         https://bugs.webkit.org/show_bug.cgi?id=128506
1433
1434         Reviewed by Andreas Kling.
1435
1436         * dom/Node.h:
1437         * dom/ScriptElement.h:
1438         * loader/ImageLoader.h:
1439         * loader/cache/CachedResourceClient.h:
1440         * platform/TreeShared.h:
1441         * platform/graphics/GlyphMetricsMap.h:
1442         * rendering/InlineBox.h:
1443         * rendering/RenderLayer.h:
1444         * rendering/RenderObject.h:
1445
1446 2014-02-09  Andreas Kling  <akling@apple.com>
1447
1448         Reduce ref churn in ChildNodesLazySnapshot iteration.
1449         <https://webkit.org/b/128492>
1450
1451         Add a missing release() in ChildNodesLazySnapshot::nextNode()
1452         so we don't have to churn the ref count.
1453
1454         Reviewed by Sam Weinig.
1455
1456         * dom/ContainerNode.h:
1457         (WebCore::ChildNodesLazySnapshot::nextNode):
1458
1459 2014-02-09  Andreas Kling  <akling@apple.com>
1460
1461         Reduce ref churn in ChildInsertionNotifier.
1462         <https://webkit.org/b/128494>
1463
1464         All callers of notifyNodeInsertedIntoDocument() already hold a strong
1465         reference on the Node, so there's no need to ref it again inside.
1466
1467         Reviewed by Anders Carlsson.
1468
1469         * dom/ContainerNodeAlgorithms.h:
1470         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1471
1472 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
1473
1474         Manage ShadowData through std::unique_ptr
1475         https://bugs.webkit.org/show_bug.cgi?id=128466
1476
1477         Reviewed by Andreas Kling.
1478
1479         Use std::unique_ptr instead of OwnPtr to manage ShadowData objects.
1480
1481         * css/SVGCSSStyleSelector.cpp:
1482         (WebCore::StyleResolver::applySVGProperty):
1483         * css/StyleResolver.cpp:
1484         (WebCore::StyleResolver::applyProperty):
1485         * page/animation/CSSPropertyAnimation.cpp:
1486         (WebCore::blendFunc):
1487         (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
1488         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
1489         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
1490         * rendering/style/RenderStyle.cpp:
1491         (WebCore::RenderStyle::setTextShadow):
1492         (WebCore::RenderStyle::setBoxShadow):
1493         * rendering/style/RenderStyle.h:
1494         * rendering/style/SVGRenderStyle.h:
1495         (WebCore::SVGRenderStyle::setShadow):
1496         * rendering/style/SVGRenderStyleDefs.cpp:
1497         (WebCore::StyleShadowSVGData::StyleShadowSVGData):
1498         * rendering/style/SVGRenderStyleDefs.h:
1499         * rendering/style/ShadowData.cpp:
1500         (WebCore::ShadowData::ShadowData):
1501         * rendering/style/ShadowData.h:
1502         (WebCore::ShadowData::setNext):
1503         * rendering/style/StyleRareInheritedData.cpp:
1504         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1505         * rendering/style/StyleRareInheritedData.h:
1506         * rendering/style/StyleRareNonInheritedData.cpp:
1507         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1508         * rendering/style/StyleRareNonInheritedData.h:
1509
1510 2014-02-09  Carlos Garnacho  <carlosg@gnome.org>
1511
1512         [GTK] Add touch-events related code to build
1513         https://bugs.webkit.org/show_bug.cgi?id=98931
1514
1515         Reviewed by Carlos Garcia Campos.
1516
1517         Tests in fast/events/touch have been enabled on GTK+ now that touch
1518         support is implemented, and thus all expected bits are there.
1519
1520         * platform/gtk/GtkTouchContextHelper.cpp:
1521         * platform/gtk/GtkTouchContextHelper.h: Add helper object to track all touchpoints, handy
1522         when creating WebTouchEvents.
1523         * GNUmakefile.list.am:
1524         * PlatformGTK.cmake:
1525         * bindings/gobject/GNUmakefile.am: Add touch related code and idls to build, those are
1526         necessary now that GTK+ implements touch events.
1527
1528 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
1529
1530         Switch the rest of CSS code from OwnPtr over to std::unique_ptr
1531         https://bugs.webkit.org/show_bug.cgi?id=128471
1532
1533         Reviewed by Andreas Kling.
1534
1535         Replace the remaining uses of OwnPtr in the CSS code with std::unique_ptr, covering
1536         the CSSParser, CSSParserSelector and CSSSelector classes and a few additional, closely related classes.
1537
1538         * css/CSSGrammar.y.in:
1539         * css/CSSParser.cpp:
1540         (WebCore::CSSParser::parseSheet):
1541         (WebCore::CSSParser::parseDeclaration):
1542         (WebCore::CSSParser::parseValue):
1543         (WebCore::CSSParser::markSupportsRuleHeaderStart):
1544         (WebCore::CSSParser::createKeyframesRule):
1545         (WebCore::CSSParser::createStyleRule):
1546         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
1547         (WebCore::CSSParser::rewriteSpecifiers):
1548         * css/CSSParser.h:
1549         * css/CSSParserValues.cpp:
1550         (WebCore::CSSParserSelector::CSSParserSelector):
1551         (WebCore::CSSParserSelector::~CSSParserSelector):
1552         (WebCore::CSSParserSelector::adoptSelectorVector):
1553         (WebCore::CSSParserSelector::insertTagHistory):
1554         (WebCore::CSSParserSelector::appendTagHistory):
1555         (WebCore::CSSParserSelector::prependTagSelector):
1556         * css/CSSParserValues.h:
1557         (WebCore::CSSParserSelector::releaseSelector):
1558         (WebCore::CSSParserSelector::setTagHistory):
1559         (WebCore::CSSParserSelector::clearTagHistory):
1560         * css/CSSSelector.cpp:
1561         (WebCore::CSSSelector::setSelectorList):
1562         * css/CSSSelector.h:
1563         * css/CSSSelectorList.cpp:
1564         (WebCore::CSSSelectorList::adoptSelectorVector):
1565         * css/CSSSelectorList.h:
1566         * css/CSSValueList.cpp:
1567         * css/StyleRule.cpp:
1568         (WebCore::StyleRuleRegion::StyleRuleRegion):
1569         * css/StyleRule.h:
1570         (WebCore::StyleRule::parserAdoptSelectorVector):
1571         (WebCore::StyleRulePage::parserAdoptSelectorVector):
1572         (WebCore::StyleRuleRegion::create):
1573
1574 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
1575
1576         Manage MutationObserverInterestGroup through std::unique_ptr
1577         https://bugs.webkit.org/show_bug.cgi?id=128468
1578
1579         Reviewed by Andreas Kling.
1580
1581         Use std::unique_ptr instead of OwnPtr for managing MutationObserverInterestGroup objects.
1582
1583         * css/PropertySetCSSStyleDeclaration.cpp:
1584         * dom/CharacterData.cpp:
1585         (WebCore::CharacterData::dispatchModifiedEvent):
1586         * dom/ChildListMutationScope.cpp:
1587         (WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator):
1588         * dom/ChildListMutationScope.h:
1589         (WebCore::ChildListMutationAccumulator::hasObservers):
1590         * dom/Element.cpp:
1591         (WebCore::Element::willModifyAttribute):
1592         * dom/MutationObserverInterestGroup.cpp:
1593         (WebCore::MutationObserverInterestGroup::createIfNeeded):
1594         * dom/MutationObserverInterestGroup.h:
1595         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
1596         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
1597         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
1598
1599 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
1600
1601         Manage MessagePort, MessagePortChannel and friends through std::unique_ptr
1602         https://bugs.webkit.org/show_bug.cgi?id=128467
1603
1604         Reviewed by Andreas Kling.
1605
1606         Use std::unique_ptr instead of OwnPtr to manage MessagePort, MessagePortArray, MessagePortChannel
1607         and MessagePortChannelArray objects.
1608
1609         * bindings/js/JSMessageEventCustom.cpp:
1610         (WebCore::handleInitMessageEvent):
1611         * dom/MessageEvent.cpp:
1612         (WebCore::MessageEvent::MessageEvent):
1613         (WebCore::MessageEvent::initMessageEvent):
1614         * dom/MessageEvent.h:
1615         (WebCore::MessageEvent::create):
1616         * dom/MessagePort.cpp:
1617         (WebCore::MessagePort::postMessage):
1618         (WebCore::MessagePort::disentangle):
1619         (WebCore::MessagePort::entangle):
1620         (WebCore::MessagePort::dispatchMessages):
1621         (WebCore::MessagePort::disentanglePorts):
1622         (WebCore::MessagePort::entanglePorts):
1623         * dom/MessagePort.h:
1624         * dom/MessagePortChannel.h:
1625         * dom/default/PlatformMessagePortChannel.cpp:
1626         (WebCore::PlatformMessagePortChannel::EventData::EventData):
1627         (WebCore::MessagePortChannel::createChannel):
1628         (WebCore::MessagePortChannel::postMessageToRemote):
1629         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
1630         * dom/default/PlatformMessagePortChannel.h:
1631         (WebCore::PlatformMessagePortChannel::EventData::channels):
1632         * page/DOMWindow.cpp:
1633         (WebCore::PostMessageTimer::PostMessageTimer):
1634         (WebCore::PostMessageTimer::event):
1635         (WebCore::DOMWindow::postMessage):
1636         * workers/DedicatedWorkerGlobalScope.cpp:
1637         (WebCore::DedicatedWorkerGlobalScope::postMessage):
1638         * workers/DefaultSharedWorkerRepository.cpp:
1639         (WebCore::SharedWorkerConnectTask::create):
1640         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1641         (WebCore::SharedWorkerConnectTask::performTask):
1642         (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
1643         (WebCore::SharedWorkerScriptLoader::notifyFinished):
1644         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
1645         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
1646         * workers/DefaultSharedWorkerRepository.h:
1647         * workers/SharedWorker.cpp:
1648         (WebCore::SharedWorker::create):
1649         * workers/SharedWorkerGlobalScope.cpp:
1650         (WebCore::createConnectEvent):
1651         * workers/SharedWorkerRepository.cpp:
1652         (WebCore::SharedWorkerRepository::connect):
1653         * workers/SharedWorkerRepository.h:
1654         * workers/Worker.cpp:
1655         (WebCore::Worker::postMessage):
1656         * workers/WorkerGlobalScopeProxy.h:
1657         * workers/WorkerMessagingProxy.cpp:
1658         (WebCore::MessageWorkerGlobalScopeTask::create):
1659         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask):
1660         (WebCore::MessageWorkerGlobalScopeTask::performTask):
1661         (WebCore::MessageWorkerTask::create):
1662         (WebCore::MessageWorkerTask::MessageWorkerTask):
1663         (WebCore::MessageWorkerTask::performTask):
1664         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1665         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
1666         * workers/WorkerMessagingProxy.h:
1667         * workers/WorkerObjectProxy.h:
1668
1669 2014-02-08  Ryosuke Niwa  <rniwa@webkit.org>
1670
1671         Cleanup the interface of FrameSelection
1672         https://bugs.webkit.org/show_bug.cgi?id=128481
1673
1674         Reviewed by Andreas Kling.
1675
1676         Removed FrameSelection::end() as intended in r163232, and the stale declaration of
1677         paintDragCaret() which was supposed to be removed when we extracted DragCaretController.
1678
1679         Renamed caretRenderer() to caretRendererWithoutUpdatingLayout() to clarify the contract
1680         as the only caller of this function is RenderBlock::paintCaret. Also renamed bounds()
1681         to selectionBounds() to make it more easily identifiable / grep'able.
1682
1683         In addition, made recomputeCaretRect() and invalidateCaretRect() private.
1684
1685         * WebCore.exp.in:
1686         * editing/FrameSelection.cpp:
1687         (WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
1688         (WebCore::FrameSelection::selectionBounds):
1689         (WebCore::FrameSelection::revealSelection):
1690         * editing/FrameSelection.h:
1691         (WebCore::FrameSelection::setCaretVisible):
1692         * page/DragController.cpp:
1693         (WebCore::dragLocForSelectionDrag):
1694         * page/FrameSnapshotting.cpp:
1695         (WebCore::snapshotSelection):
1696         * page/win/FrameWin.cpp:
1697         (WebCore::imageFromSelection):
1698         * rendering/RenderBlock.cpp:
1699         (WebCore::RenderBlock::paintCaret):
1700         * testing/Internals.cpp:
1701         (WebCore::Internals::selectionBounds):
1702
1703 2014-02-08  Dan Bernstein  <mitz@apple.com>
1704
1705         Reverted part of r163734, because the assertion it enabled still fails when running
1706         loader/load-defer-resume-crash.html
1707
1708         * loader/DocumentLoader.cpp:
1709         (WebCore::DocumentLoader::dataReceived):
1710
1711 2014-02-08  Ryosuke Niwa  <rniwa@webkit.org>
1712
1713         EFL build fix after r163729.
1714
1715         * Modules/indexeddb/IDBDatabase.cpp:
1716         (WebCore::IDBDatabase::version):
1717
1718 2014-02-08  Dan Bernstein  <mitz@apple.com>
1719
1720         Remove outdated workarounds in DocumentLoader::dataReceived
1721         https://bugs.webkit.org/show_bug.cgi?id=128465
1722
1723         Reviewed by Andreas Kling.
1724
1725         * loader/DocumentLoader.cpp:
1726         (WebCore::DocumentLoader::dataReceived):
1727
1728 2014-02-08  Alexey Proskuryakov  <ap@apple.com>
1729
1730         Remove some unused functions from SerializedScriptValue
1731         https://bugs.webkit.org/show_bug.cgi?id=128407
1732
1733         Reviewed by Oliver Hunt.
1734
1735         Removed more unused code, particularly in API helpers. Renamed one serialize()
1736         function to create(), because it does the same thing as other create() functions.
1737
1738         * Modules/indexeddb/IDBObjectStore.cpp:
1739         (WebCore::IDBObjectStore::put):
1740         * bindings/js/SerializedScriptValue.cpp:
1741         (WebCore::SerializedScriptValue::create):
1742         (WebCore::SerializedScriptValue::deserialize):
1743         * bindings/js/SerializedScriptValue.h:
1744
1745 2014-02-08  Brady Eidson  <beidson@apple.com>
1746
1747         IDB: storage/indexeddb/mozilla/versionchange-abort.html fails
1748         <rdar://problem/16018887> and https://bugs.webkit.org/show_bug.cgi?id=128442
1749
1750         Reviewed by Dan Bernstein.
1751
1752         Tested by storage/indexeddb/mozilla/versionchange-abort.html (and probably others)
1753
1754         * Modules/indexeddb/IDBDatabase.cpp:
1755         (WebCore::IDBDatabase::version): If the version is NoIntVersion, return DefaultIntVersion to script.
1756
1757 2014-02-08  Brady Eidson  <beidson@apple.com>
1758
1759         IDB: storage/indexeddb/mozilla/cursors.html fails
1760         <rdar://problem/16017998> and https://bugs.webkit.org/show_bug.cgi?id=128423
1761
1762         Reviewed by Dan Bernstein.
1763
1764         Tested by storage/indexeddb/mozilla/cursors.html (And probably others)
1765
1766         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1767         (WebCore::OpenCursorOperation::perform): Distinguish between an error while opening the cursor
1768           and opening a cursor that points to no records.
1769
1770 2014-02-08  Andreas Kling  <akling@apple.com>
1771
1772         Remove unused ChromeClient::layoutUpdated().
1773         <https://webkit.org/b/128470>
1774
1775         Nobody listens for this callback anymore so remove it.
1776
1777         Reviewed by Anders Carlsson.
1778
1779         * page/Chrome.cpp:
1780         * page/Chrome.h:
1781         * page/ChromeClient.h:
1782         * page/FrameView.cpp:
1783         (WebCore::FrameView::layout):
1784
1785 2014-02-08  Dan Bernstein  <mitz@apple.com>
1786
1787         Stop using PLATFORM(MAC) in WebCore except where it means “OS X but not iOS”
1788         https://bugs.webkit.org/show_bug.cgi?id=128464
1789
1790         Reviewed by Anders Carlsson.
1791
1792         * Modules/webaudio/AudioContext.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1793         (WebCore::AudioContext::constructCommon):
1794         * accessibility/AccessibilityNodeObject.cpp: Ditto.
1795         (WebCore::AccessibilityNodeObject::visibleText):
1796         * accessibility/AccessibilityObject.h: Ditto.
1797         * accessibility/AccessibilityRenderObject.cpp: Ditto.
1798         (WebCore::AccessibilityRenderObject::clickPoint):
1799         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
1800         (WebCore::AccessibilityRenderObject::addChildren):
1801         * accessibility/AccessibilityRenderObject.h: Ditto.
1802         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1803         (WebCore::JSInspectorFrontendHost::platform): Made it explicit that this function returns
1804         "mac" when built for iOS.
1805         * bindings/js/ScriptController.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1806         (WebCore::ScriptController::ScriptController):
1807         * bindings/js/ScriptController.h: Ditto.
1808         * crypto/CryptoKey.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
1809         !PLATFORM(GTK) when checking for whether to use CoreCrypto.
1810         * crypto/keys/CryptoKeyRSA.h: Ditto.
1811         * dom/Clipboard.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1812         * dom/Document.cpp: Ditto.
1813         (WebCore::Document::implicitClose):
1814         * dom/KeyboardEvent.h: Ditto.
1815         * editing/Editor.cpp: Ditto.
1816         (WebCore::Editor::cut):
1817         (WebCore::Editor::copy):
1818         (WebCore::Editor::copyImage):
1819         * editing/Editor.h: Ditto.
1820         * editing/FrameSelection.h: Ditto.
1821         * editing/TypingCommand.cpp: Ditto.
1822         (WebCore::TypingCommand::typingAddedToOpenCommand):
1823         * history/HistoryItem.h: Ditto.
1824         * html/HTMLMediaElement.cpp: Ditto.
1825         (WebCore::HTMLMediaElement::parseAttribute):
1826         * html/HTMLMediaElement.h: Ditto.
1827         * html/HTMLPlugInElement.cpp: Ditto.
1828         (WebCore::registeredPluginReplacements):
1829         * html/HTMLPlugInImageElement.cpp: Ditto.
1830         (WebCore::HTMLPlugInImageElement::setDisplayState):
1831         * html/HTMLSelectElement.cpp: Ditto.
1832         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1833         * html/shadow/MediaControlElements.cpp: Ditto.
1834         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
1835         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
1836         * html/shadow/MediaControlElements.h: Ditto.
1837         * inspector/InspectorIndexedDBAgent.cpp: Ditto.
1838         * loader/CookieJar.cpp: Ditto.
1839         * loader/DocumentLoader.cpp: Ditto.
1840         (WebCore::DocumentLoader::dataReceived):
1841         * loader/DocumentLoader.h: Ditto.
1842         (WebCore::DocumentLoader::didTellClientAboutLoad):
1843         * loader/EmptyClients.h: Ditto.
1844         * loader/FrameLoader.cpp:
1845         (WebCore::FrameLoader::loadArchive): Added !PLATFORM(IOS) around Mac-only workaround.
1846         (WebCore::FrameLoader::defaultObjectContentType): Changed PLATFORM(MAC) to PLATFORM(COCOA).
1847         (WebCore::FrameLoader::subresourceCachePolicy): Ditto.
1848         * loader/ResourceBuffer.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around functions that
1849         are implemented using Foundation.
1850         * loader/ResourceLoadScheduler.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1851         (WebCore::ResourceLoadScheduler::scheduleLoad):
1852         * loader/ResourceLoader.cpp: Ditto.
1853         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1854         * loader/ResourceLoader.h: Ditto.
1855         * loader/archive/cf/LegacyWebArchive.cpp: Ditto.
1856         * loader/cache/CachedResource.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION) around function
1857         that is implemented using other USE(FOUNDATION)-guarded code.
1858         * loader/cache/CachedResource.h: Ditto.
1859         * page/Chrome.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1860         * page/ChromeClient.h: Ditto.
1861         * page/ContextMenuClient.h: Ditto.
1862         * page/ContextMenuController.cpp: Ditto.
1863         (WebCore::ContextMenuController::contextMenuItemSelected):
1864         (WebCore::ContextMenuController::createAndAppendFontSubMenu):
1865         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
1866         (WebCore::ContextMenuController::populate):
1867         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1868         * page/DragClient.h: Ditto.
1869         * page/DragController.cpp: Ditto.
1870         (WebCore::dragLocForDHTMLDrag):
1871         (WebCore::dragLocForSelectionDrag):
1872         (WebCore::DragController::startDrag):
1873         (WebCore::DragController::doImageDrag):
1874         * page/EditorClient.h: Ditto.
1875         * page/EventHandler.cpp: Ditto.
1876         (WebCore::EventHandler::EventHandler):
1877         (WebCore::EventHandler::handleMouseDraggedEvent):
1878         (WebCore::EventHandler::logicalScrollRecursively):
1879         (WebCore::EventHandler::clearDragState):
1880         (WebCore::EventHandler::handleWheelEvent):
1881         (WebCore::EventHandler::defaultWheelEventHandler):
1882         (WebCore::EventHandler::keyEvent):
1883         (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
1884         * page/EventHandler.h: Ditto.
1885         * page/FrameView.cpp: Ditto.
1886         (WebCore::FrameView::layout):
1887         * page/Page.h: Ditto.
1888         * page/Settings.cpp: Ditto.
1889         * page/Settings.h: Ditto.
1890         * page/scrolling/ScrollingCoordinator.cpp: Ditto.
1891         * page/scrolling/ScrollingCoordinator.h: Ditto.
1892         * page/scrolling/ScrollingStateNode.h: Removed unused #include.
1893         * page/scrolling/ScrollingThread.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1894         (WebCore::ScrollingThread::createThreadIfNeeded):
1895         * page/scrolling/ScrollingThread.h: Ditto.
1896         * platform/network/cf/ResourceRequest.h: Added !PLATFORM(IOS) around
1897         applyWebArchiveHackForMail.
1898         * platform/network/cf/ResourceRequestCFNet.cpp:
1899         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
1900         * platform/network/mac/ResourceRequestMac.mm:
1901         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Ditto.
1902         * plugins/PluginViewNone.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
1903         * rendering/RenderBox.cpp: Ditto.
1904         (WebCore::RenderBox::logicalScroll):
1905         * rendering/RenderLayerBacking.cpp: Ditto.
1906         (WebCore::RenderLayerBacking::createGraphicsLayer):
1907         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1908         * rendering/RenderMenuList.h: Ditto.
1909         * rendering/RenderText.cpp: Ditto.
1910         (WebCore::RenderText::previousOffsetForBackwardDeletion):
1911         * rendering/break_lines.cpp: Removed unused #include.
1912         * testing/js/WebCoreTestSupport.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
1913         * xml/XSLStyleSheetLibxslt.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) &&
1914         !PLATFORM(GTK) around soft-linking libxslt.
1915         * xml/XSLTExtensions.cpp: Ditto.
1916         * xml/XSLTProcessorLibxslt.cpp: Ditto.
1917         * xml/XSLTUnicodeSort.cpp: Ditto.
1918
1919 2014-02-08  Andreas Kling  <akling@apple.com>
1920
1921         Remove unused ChromeClient::formStateDidChange().
1922         <https://webkit.org/b/128469>
1923
1924         Nobody listens for this callback anymore so remove it and stop
1925         spamming no-op virtual dispatches in forms code.
1926
1927         Reviewed by Anders Carlsson.
1928
1929         * html/FileInputType.cpp:
1930         (WebCore::FileInputType::setFiles):
1931         * html/HTMLFormControlElementWithState.cpp:
1932         * html/HTMLFormControlElementWithState.h:
1933         * html/HTMLInputElement.cpp:
1934         (WebCore::HTMLInputElement::updateType):
1935         (WebCore::HTMLInputElement::setValue):
1936         (WebCore::HTMLInputElement::setValueFromRenderer):
1937         * html/HTMLSelectElement.cpp:
1938         (WebCore::HTMLSelectElement::updateListBoxSelection):
1939         (WebCore::HTMLSelectElement::selectOption):
1940         * html/HTMLTextAreaElement.cpp:
1941         (WebCore::HTMLTextAreaElement::updateValue):
1942         (WebCore::HTMLTextAreaElement::setValueCommon):
1943         * loader/EmptyClients.h:
1944         * page/ChromeClient.h:
1945
1946 2014-02-08  Chris J. Shull  <chrisjshull@gmail.com>
1947
1948         Web Inspector: Find evaluates attributes in a case sensitive manner
1949         https://bugs.webkit.org/show_bug.cgi?id=128405
1950
1951         Reviewed by Timothy Hatcher.
1952
1953         Changed matchesAttribute to ignore case.
1954
1955         Updated existing test with additional cases: 
1956         inspector-protocol/dom/dom-search.html
1957
1958         * inspector/InspectorNodeFinder.cpp:
1959         (WebCore::InspectorNodeFinder::matchesAttribute):
1960
1961 2014-02-08  Andreas Kling  <akling@apple.com>
1962
1963         Remove unused FrameLoaderClient::dispatchWillOpenSocketStream().
1964         <https://webkit.org/b/128472>
1965
1966         Nobody listens for this callback anymore so remove it.
1967
1968         Reviewed by Anders Carlsson.
1969
1970         * Modules/websockets/WebSocketChannel.cpp:
1971         (WebCore::WebSocketChannel::willOpenSocketStream):
1972         * loader/FrameLoaderClient.h:
1973
1974 2014-02-08  Ryosuke Niwa  <rniwa@webkit.org>
1975
1976         Split UserTriggered into FireSelectEvent and RevealSelection for selection options
1977         https://bugs.webkit.org/show_bug.cgi?id=128441
1978
1979         Reviewed by Darin Adler.
1980
1981         Split UserTriggered by FireSelectEvent and RevealSelection for selection options.
1982
1983         Also added defaultSetSelectionOptions() to abstract away the default options.
1984
1985         * editing/AlternativeTextController.cpp:
1986         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1987         * editing/Editor.cpp:
1988         (WebCore::Editor::unappliedEditing):
1989         (WebCore::Editor::reappliedEditing):
1990         * editing/FrameSelection.cpp:
1991         (WebCore::FrameSelection::moveTo):
1992         (WebCore::FrameSelection::setSelectionByMouseIfDifferent): UserTriggered | DoNotRevealSelection
1993         is replaced by FireSelectEvent.
1994         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Check options & FireSelectEvent
1995         instead of options & UserTriggered.
1996         (WebCore::FrameSelection::setSelection): Check options & RevealSelection instead of
1997         options & UserTriggered && !(options & DoNotRevealSelection).
1998         (WebCore::FrameSelection::prepareForDestruction):
1999         (WebCore::FrameSelection::setBase):
2000         (WebCore::FrameSelection::setExtent):
2001         (WebCore::FrameSelection::selectAll):
2002         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
2003         * editing/FrameSelection.h:
2004         (WebCore::FrameSelection::defaultSetSelectionOptions): Added.
2005         * editing/SpellingCorrectionCommand.cpp:
2006         (WebCore::SpellingCorrectionCommand::doApply):
2007         * html/HTMLTextFormControlElement.cpp:
2008         (WebCore::HTMLTextFormControlElement::selectionChanged): Renamed the argument.
2009         * html/HTMLTextFormControlElement.h:
2010
2011 2014-02-08  Zan Dobersek  <zdobersek@igalia.com>
2012
2013         Move TreeScope, IdTargetObserverRegistry to std::unique_ptr
2014         https://bugs.webkit.org/show_bug.cgi?id=127276
2015
2016         Reviewed by Andreas Kling.
2017
2018         Replace uses of OwnPtr in the TreeScope and IdTargetObserverRegistry classes with std::unique_ptr.
2019
2020         * dom/IdTargetObserverRegistry.cpp:
2021         (WebCore::IdTargetObserverRegistry::addObserver):
2022         * dom/IdTargetObserverRegistry.h:
2023         (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
2024         * dom/TreeScope.cpp:
2025         (WebCore::TreeScope::TreeScope):
2026         (WebCore::TreeScope::destroyTreeScopeData):
2027         (WebCore::TreeScope::addElementById):
2028         (WebCore::TreeScope::addElementByName):
2029         (WebCore::TreeScope::addImageMap):
2030         (WebCore::TreeScope::labelElementForId):
2031         * dom/TreeScope.h:
2032         (WebCore::TreeScope::shouldCacheLabelsByForAttribute):
2033
2034 2014-02-08  Anders Carlsson  <andersca@apple.com>
2035
2036         Slight CTTE in PingLoader
2037         https://bugs.webkit.org/show_bug.cgi?id=128462
2038
2039         Reviewed by Dan Bernstein.
2040
2041         PingLoader always wants a non-null frame.
2042
2043         * html/HTMLAnchorElement.cpp:
2044         (WebCore::HTMLAnchorElement::sendPings):
2045         * html/parser/XSSAuditorDelegate.cpp:
2046         (WebCore::XSSAuditorDelegate::didBlockScript):
2047         * inspector/InspectorInstrumentation.h:
2048         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
2049         * loader/PingLoader.cpp:
2050         (WebCore::PingLoader::loadImage):
2051         (WebCore::PingLoader::sendPing):
2052         (WebCore::PingLoader::sendViolationReport):
2053         (WebCore::PingLoader::createPingLoader):
2054         (WebCore::PingLoader::PingLoader):
2055         * loader/PingLoader.h:
2056         * loader/cache/CachedResourceLoader.cpp:
2057         (WebCore::CachedResourceLoader::requestImage):
2058         * page/ContentSecurityPolicy.cpp:
2059         (WebCore::ContentSecurityPolicy::reportViolation):
2060
2061 2014-02-08  Dan Bernstein  <mitz@apple.com>
2062
2063         Remove client-drawn highlights (-webkit-highlight, WebHTMLHighlighter)
2064         https://bugs.webkit.org/show_bug.cgi?id=128456
2065
2066         Reviewed by Anders Carlsson.
2067
2068         Updated fast/css/getComputedStyle and svg/css results.
2069
2070         * css/CSSComputedStyleDeclaration.cpp:
2071         (WebCore::ComputedStyleExtractor::propertyValue): Removed CSSPropertyWebKitHighlight case.
2072         * css/CSSParser.cpp:
2073         (WebCore::CSSParser::parseValue): Ditto.
2074         * css/CSSPropertyNames.in: Removed -webkit-highlight.
2075         * css/DeprecatedStyleBuilder.cpp:
2076         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Removed
2077         CSSPropertyWebKitHighlight handler.
2078         * css/StyleResolver.cpp:
2079         (WebCore::StyleResolver::applyProperty): Removed CSSPropertyWebKitHighlight case.
2080         * page/Chrome.cpp: Removed customHighlightRect and paintCustomHighlight.
2081         * page/ChromeClient.h: Ditto.
2082         * rendering/InlineTextBox.cpp:
2083         (WebCore::InlineTextBox::paint): Removed painting custom highlight.
2084         * rendering/InlineTextBox.h:
2085         * rendering/RenderBlockLineLayout.cpp:
2086         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): Removed adding overflow for custom
2087         highlights.
2088         * rendering/RenderBox.cpp: Removed paintCustomHighlight.
2089         * rendering/RenderBox.h:
2090         * rendering/RenderImage.cpp:
2091         (WebCore::RenderImage::paintReplaced): Removed painting custom highlight.
2092         * rendering/RenderListMarker.cpp:
2093         (WebCore::RenderListMarker::paint): Ditto.
2094         * rendering/RenderSnapshottedPlugIn.cpp:
2095         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
2096         * rendering/RenderWidget.cpp:
2097         (WebCore::RenderWidget::paint): Ditto.
2098         * rendering/RootInlineBox.cpp:
2099         (WebCore::RootInlineBox::paint): Ditto.
2100         * rendering/RootInlineBox.h:
2101         * rendering/style/RenderStyle.cpp:
2102         (WebCore::RenderStyle::changeRequiresLayout): Removed highlight comparison.
2103         * rendering/style/RenderStyle.h:
2104         * rendering/style/StyleRareInheritedData.cpp:
2105         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Removed initializer.
2106         (WebCore::StyleRareInheritedData::operator==): Removed highlight comparison.
2107         * rendering/style/StyleRareInheritedData.h: Removed highlight member variable.
2108
2109 2014-02-08  Dan Bernstein  <mitz@apple.com>
2110
2111         One more build fix fix.
2112
2113         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2114         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
2115
2116 2014-02-08  Dan Bernstein  <mitz@apple.com>
2117
2118         More (and more correct) iOS build fix after r163712.
2119
2120         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2121         (AXAttributedStringAppendText):
2122         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
2123         * page/ios/FrameIOS.mm:
2124         (WebCore::Frame::wordsInCurrentParagraph):
2125
2126 2014-02-08  Dan Bernstein  <mitz@apple.com>
2127
2128         iOS build fix after r163712.
2129
2130         * page/ios/FrameIOS.mm:
2131         (WebCore::Frame::indexCountOfWordPrecedingSelection):
2132         (WebCore::Frame::wordsInCurrentParagraph):
2133
2134 2014-02-08  Darin Adler  <darin@apple.com>
2135
2136         Change TextIterator to use StringView, preparing to wean it from deprecatedCharacters
2137         https://bugs.webkit.org/show_bug.cgi?id=128233
2138
2139         Reviewed by Anders Carlsson.
2140
2141         * accessibility/AccessibilityNodeObject.cpp: Removed unneeded TextIterator.h include.
2142
2143         * accessibility/AccessibilityObject.cpp:
2144         (WebCore::AccessibilityObject::hasMisspelling): Updated to use StringView for checkSpelling.
2145
2146         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2147         (AXAttributeStringSetSpelling): Changed to take a StringView.
2148         (AXAttributedStringAppendText): Ditto.
2149         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Pass StringView.
2150
2151         * editing/Editor.cpp:
2152         (WebCore::Editor::misspelledWordAtCaretOrRange): Pass StringView.
2153         (WebCore::Editor::misspelledSelectionString): Ditto.
2154         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Ditto.
2155
2156         * editing/TextCheckingHelper.cpp:
2157         (WebCore::findGrammaticalErrors): Renamed this function. Changed to use StringView.
2158         (WebCore::findMisspellings): Use StringView.
2159         (WebCore::TextCheckingHelper::findFirstMisspelling): Ditto. Also separated out assertions
2160         that were asserting multiple things with &&.
2161         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Ditto.
2162         (WebCore::TextCheckingHelper::findFirstGrammarDetail): Ditto.
2163         (WebCore::TextCheckingHelper::findFirstBadGrammar): Ditto.
2164         (WebCore::TextCheckingHelper::isUngrammatical): Ditto.
2165         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange): Ditto.
2166         (WebCore::checkTextOfParagraph): Ditto.
2167
2168         * editing/TextCheckingHelper.h: Made TextCheckingParagraph::text public. Deleted
2169         TextCheckingParagraph::textDeprecatedCharacters. Added comments about additional
2170         TextCheckingParagraph refinements. Changed checkTextOfParagraph to take a client
2171         reference instead of pointer and StringView instead of characters pointer with length.
2172
2173         * editing/TextIterator.cpp:
2174         (WebCore::TextIterator::appendTextToStringBuilder): Use data members directly,
2175         rather than using functions, since we already checked m_textCharacters for null.
2176         (WebCore::CharacterIterator::string): Use text() instead of characters().
2177         (WebCore::WordAwareIterator::WordAwareIterator): Removed initialization of
2178         m_previousText now that it's a StringView rather than a pointer.
2179         (WebCore::WordAwareIterator::advance): Use TextIterator::text instead of
2180         TextIterator::characters. Also added a FIXME about a fundamental problem
2181         with the implementation of this class!
2182         (WebCore::WordAwareIterator::length): Updated for m_previousText change.
2183         (WebCore::WordAwareIterator::text): Replaced WordAwareIterator::characters with this.
2184         (WebCore::SearchBuffer::append): Changed to take a StringView.
2185         (WebCore::SearchBuffer::prependContext): Ditto.
2186         (WebCore::SearchBuffer::isWordStartMatch): Use StringView.
2187         (WebCore::SearchBuffer::search): Ditto.
2188         (WebCore::findPlainText): Ditto.
2189
2190         * editing/TextIterator.h: Added TextIterator::text that returns a StringView, and
2191         renamed TextIterator::characters to TextIterator::deprecatedTextIteratorCharacters
2192         (easy to search for in source code). Added SimplifiedBackwardsTextIterator::text
2193         and removed SimplifiedBackwardsTextIterator::characters. Added CharacterIterator::text,
2194         and removed CharacterIterator::characters. Added WordAwareIterator::text and removed
2195         WorkdAwareIterator::characters. Changed WordAwareIterator data members to use StringView.
2196
2197         * editing/VisibleSelection.cpp:
2198         (WebCore::VisibleSelection::appendTrailingWhitespace): Use TextIterator::text instead
2199         of TextIterator::characters.
2200
2201         * editing/VisibleUnits.cpp:
2202         (WebCore::previousBoundary): Updated to use StringView.
2203         (WebCore::nextBoundary): Ditto.
2204         (WebCore::startWordBoundary): Ditto.
2205         (WebCore::startOfWord): Ditto.
2206         (WebCore::endWordBoundary): Ditto.
2207         (WebCore::endOfWord): Fixed formatting.
2208         (WebCore::previousWordPositionBoundary): Updated to use StringView.
2209         (WebCore::previousWordPosition): Fixed formatting and got rid of local variable.
2210         (WebCore::nextWordPositionBoundary): Updated to use StringView.
2211         (WebCore::nextWordPosition): Fixed formatting and got rid of local variable.
2212         (WebCore::inSameLine): Fixed formatting.
2213         (WebCore::isStartOfLine): Ditto.
2214         (WebCore::isEndOfLine): Ditto.
2215         (WebCore::absoluteLineDirectionPointToLocalPointInBlock): Changed to take a reference.
2216         (WebCore::previousLinePosition): Fixed formatting chand changed to pass a reference.
2217         (WebCore::nextLinePosition): Ditto.
2218         (WebCore::startSentenceBoundary): Updated to use StringView and got rid of a local.
2219         (WebCore::startOfSentence): Fixed formatting.
2220         (WebCore::endSentenceBoundary): Updated to use StringView and got rid of a local.
2221         (WebCore::endOfSentence): Fixed formatting.
2222         (WebCore::previousSentencePositionBoundary): Updated to use StringView and got rid of
2223         a local.
2224         (WebCore::previousSentencePosition): Ditto.
2225         (WebCore::nextSentencePositionBoundary): Ditto.
2226         (WebCore::nextSentencePosition): Fixed formatting.
2227         (WebCore::endOfParagraph): Ditto.
2228         (WebCore::inSameParagraph): Ditto.
2229         (WebCore::isStartOfParagraph): Ditto.
2230         (WebCore::isEndOfParagraph): Ditto.
2231         (WebCore::inSameBlock): Ditto.
2232         (WebCore::isStartOfBlock): Ditto.
2233         (WebCore::isEndOfBlock): Ditto.
2234         (WebCore::startOfDocument): Ditto.
2235         (WebCore::endOfDocument): Ditto.
2236         (WebCore::inSameDocument): Ditto.
2237         (WebCore::isStartOfDocument): Ditto.
2238         (WebCore::isEndOfDocument): Ditto.
2239         (WebCore::isEndOfEditableOrNonEditableContent): Ditto.
2240
2241         * loader/EmptyClients.h: Use StringView.
2242
2243         * platform/mac/HTMLConverter.mm:
2244         (+[WebHTMLConverter editingAttributedStringFromRange:]): Use StringView.
2245
2246         * platform/text/TextBoundaries.cpp:
2247         (WebCore::endOfFirstWordBoundaryContext): Use StringView and unsigned.
2248         (WebCore::startOfLastWordBoundaryContext): Ditto.
2249
2250         * platform/text/TextBoundaries.h: Change interfaces to use StringView,
2251         and in some cases, unsigned instead of int. All call sites were better off
2252         with unsigned.
2253
2254         * platform/text/TextCheckerClient.h: Use StringView.
2255
2256         * platform/text/mac/TextBoundaries.mm: Changed conditionals to say
2257         USE(APPKIT) instead of PLATFORM(IOS), since that's the real issue.
2258         (WebCore::isSkipCharacter): Tweaked formatting.
2259         (WebCore::isWhitespaceCharacter): Ditto.
2260         (WebCore::isWordDelimitingCharacter): Ditto, also removed local variable.
2261         (WebCore::isSymbolCharacter): Ditto.
2262         (WebCore::tokenizerForString): Ditto.
2263         (WebCore::findSimpleWordBoundary): Use StringView. Also changed to mostly
2264         use unsigned instead of int.
2265         (WebCore::findComplexWordBoundary): Use StringView. Also restructured to
2266         be much more readable, with early returns and such.
2267         (WebCore::findWordBoundary): Use StringView and unsigned.
2268         (WebCore::findEndWordBoundary): Removed redudant copy of the findWordBoundary
2269         function and changed this to just call findWordBoundary. The reason this
2270         function exists is to optimize this case for some non-Mac, non-iOS platforms.
2271         We can always do that for Mac and/or iOS later if we like.
2272         (WebCore::findNextWordFromIndex): Use StringView. Also use wordBreakIterator
2273         instead of using UBreakIterator directly so we get a cached iterator instead
2274         of creating and destroying a new one each time this function is called.
2275
2276         * bindings/objc/DOMUIKitExtensions.mm: Removed unneeded includes.
2277         * dom/Element.cpp: Ditto.
2278         * dom/PositionIterator.cpp: Ditto.
2279         * editing/ApplyBlockElementCommand.cpp: Ditto.
2280         * editing/IndentOutdentCommand.cpp: Ditto.
2281         * editing/InsertListCommand.cpp: Ditto.
2282         * editing/markup.cpp: Ditto.
2283         * html/HTMLElement.cpp: Ditto.
2284         * html/HTMLTextAreaElement.cpp: Ditto.
2285         * page/Frame.cpp: Ditto.
2286         * rendering/RenderTextControl.cpp: Ditto.
2287
2288 2014-02-08  Andreas Kling  <akling@apple.com>
2289
2290         Remove two unused function declarations.
2291
2292         Scrub "highQualityRepaintTimerFired" declarations from RenderImage
2293         and RenderBoxModelObject since they're not actually defined.
2294
2295         * rendering/RenderBoxModelObject.h:
2296         * rendering/RenderImage.h:
2297
2298 2014-02-08  Andreas Kling  <akling@apple.com>
2299
2300         CTTE: SVGTRefTargetEventListener is always owned by SVGTRefElement.
2301         <https://webkit.org/b/128432>
2302
2303         Tighten up the relationship between SVGTRefElement and its internal
2304         event listener helper by storing the listener in a Ref, and making
2305         the listeners backpointer to the element be a reference.
2306
2307         Reviewed by Anders Carlsson.
2308
2309         * svg/SVGTRefElement.cpp:
2310         (WebCore::SVGTRefTargetEventListener::create):
2311         (WebCore::SVGTRefTargetEventListener::SVGTRefTargetEventListener):
2312         (WebCore::SVGTRefTargetEventListener::operator==):
2313         (WebCore::SVGTRefTargetEventListener::handleEvent):
2314         (WebCore::SVGTRefElement::SVGTRefElement):
2315         * svg/SVGTRefElement.h:
2316
2317 2014-02-07  Andreas Kling  <akling@apple.com>
2318
2319         Devirtualize RenderBlockFlowRareData.
2320         <https://webkit.org/b/128427>
2321
2322         This class had a virtual destructor for no reason. Removing it
2323         shrinks RenderBlockFlowRareData by 8 bytes.
2324
2325         Reviewed by Anders Carlsson.
2326
2327         * rendering/RenderBlockFlow.h:
2328         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::~RenderBlockFlowRareData):
2329
2330 2014-02-08  Andreas Kling  <akling@apple.com>
2331
2332         Use renderer iterators in two more places.
2333         <https://webkit.org/b/128371>
2334
2335         Reviewed by Antti Koivisto.
2336
2337         * dom/Position.cpp:
2338         (WebCore::Position::primaryDirection):
2339
2340             Use lineageOfType instead of walking the parent chain.
2341
2342         * rendering/RenderLayer.cpp:
2343         (WebCore::RenderLayer::insertOnlyThisLayer):
2344
2345             Use childrenOfType instead of walking the children.
2346
2347 2014-02-07  David Kilzer  <ddkilzer@apple.com>
2348
2349         [ASan] Use new/delete in PODFreeListArena
2350         <http://webkit.org/b/128437>
2351
2352         Reviewed by Oliver Hunt.
2353
2354         * platform/PODFreeListArena.h:
2355         (WebCore::PODFreeListArena::allocateObject): Use new when
2356         ADDRESS_SANITIZER is defined.
2357         (WebCore::PODFreeListArena::freeObject): Use delete when
2358         ADDRESS_SANITIZER is defined.
2359
2360 2014-02-07  Ryosuke Niwa  <rniwa@webkit.org>
2361
2362         Merge updateSelectionCachesIfSelectionIsInsideTextFormControl into setSelectionWithoutUpdatingAppearance
2363         https://bugs.webkit.org/show_bug.cgi?id=128439
2364
2365         Reviewed by Anders Carlsson.
2366
2367         FrameSelection::selectAll had a superfluous call to updateSelectionCachesIfSelectionIsInsideTextFormControl
2368         because it wasn't setting UserTriggered option to avoid revealing selection.
2369
2370         Call setSelection with UserTriggered and recently added DoNotRevealSelection option and merge
2371         updateSelectionCachesIfSelectionIsInsideTextFormControl into setSelectionWithoutUpdatingAppearance.
2372
2373         Also rename local variables in setSelectionWithoutUpdatingAppearance, newSelection to
2374         newSelectionPossiblyWithoutDirection and s to newSelection so that they're self explanatory.
2375
2376         In addition, we now update the input element's selection caches before calling
2377         selectFrameElementInParentIfFullySelected but this should be fine because selection cannot simultaneously
2378         select the entire document and be inside a text form control.
2379
2380         * editing/FrameSelection.cpp:
2381         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
2382         (WebCore::FrameSelection::selectAll):
2383
2384 2014-02-07  Ryosuke Niwa  <rniwa@webkit.org>
2385
2386         EFL build fix attempt after r163662.
2387
2388         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
2389         (WebCore::IDBLevelDBCoding::encodeIDBKey):
2390
2391 2014-02-07  Ryosuke Niwa  <rniwa@webkit.org>
2392
2393         FrameSelection's destructor shouldn't notify accessibility
2394         https://bugs.webkit.org/show_bug.cgi?id=128421
2395
2396         Reviewed by Benjamin Poulain.
2397
2398         Extracted setSelectionWithoutUpdatingAppearance out of setSelection and called it in prepareForDestruction
2399         instead of setting DoNotUpdateAppearance option. This new function doesn't reveal selection or notify
2400         accessibility code in addition to not updating appearance.
2401
2402         Note that all implementations of notifyAccessibilityForSelectionChange in FrameSelectionAtk.cpp and
2403         FrameSelectionMac.mm exit early when the selection type is not caret or either start or end is null,
2404         which is already the case inside FrameSelection's destructor. In addition, revealSelection is never called
2405         when selection change was not triggered by user so there should be no behavioral change from this patch.
2406
2407         * editing/FrameSelection.cpp:
2408         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
2409         (WebCore::FrameSelection::setSelection):
2410         (WebCore::FrameSelection::prepareForDestruction):
2411         * editing/FrameSelection.h:
2412         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Added the trivial implementation in the case
2413         accessibility is disabled to tidy up call sites.
2414
2415 2014-02-07  Martin Robinson  <mrobinson@igalia.com>
2416
2417         Build fix for the GTK+ CMake build
2418
2419         * PlatformGTK.cmake: VTTCue.idl was unintentionally added to the list of GObject DOM bindings
2420         output files. Remove it.
2421
2422 2014-02-07  Dirk Schulze  <krit@webkit.org>
2423
2424         Per CSSOM, computed rect() function values must be comma separated
2425         https://bugs.webkit.org/show_bug.cgi?id=128401
2426
2427         Reviewed by Simon Fraser.
2428
2429         Updated tests.
2430
2431         * css/Rect.h:
2432         (WebCore::Rect::generateCSSString):
2433
2434 2014-02-07  Gavin Barraclough  <barraclough@apple.com>
2435
2436         Remove isInitialState flag from Page::setViewState
2437         https://bugs.webkit.org/show_bug.cgi?id=128428
2438
2439         Reviewed by Sam Weinig.
2440
2441         * WebCore.exp.in:
2442             - removed isInitialState.
2443         * page/Page.cpp:
2444         (WebCore::Page::setViewState):
2445             - removed isInitialState.
2446         (WebCore::Page::setIsVisible):
2447             - removed isInitialState.
2448         (WebCore::Page::setIsVisibleInternal):
2449             - removed isInitialState.
2450         * page/Page.h:
2451             - removed isInitialState.
2452
2453 2014-02-07  Simon Fraser  <simon.fraser@apple.com>
2454
2455         Encode requestedScrollPosition on ScrollingStateScrollingNodes to send to the UI process
2456         https://bugs.webkit.org/show_bug.cgi?id=128416
2457
2458         Reviewed by Tim Horton.
2459         
2460         Change requestedScrollPosition() to be a FloatPoint, and export
2461         ScrollingStateScrollingNode::setRequestedScrollPosition(WebCore::FloatPoint const&, bool)
2462         for WK2.
2463
2464         * WebCore.exp.in:
2465         * page/scrolling/ScrollingStateScrollingNode.cpp:
2466         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
2467         * page/scrolling/ScrollingStateScrollingNode.h:
2468
2469 2014-02-07  Beth Dakin  <bdakin@apple.com>
2470
2471         Should get rid of TileController's CoverageForSlowScrolling mode
2472         https://bugs.webkit.org/show_bug.cgi?id=128339
2473
2474         Reviewed by Simon Fraser.
2475
2476         This patch gets rid of CoverageForSlowScrolling in the TileController. It also 
2477         makes sure that margin tiles are properly invalidated on pages with slow repaint 
2478         objects that cause slow scrolling. 
2479
2480         When we invalidate because of slow scrolling, don’t clip the update rect to the 
2481         layer bounds.
2482         * page/FrameView.cpp:
2483         (WebCore::FrameView::scrollContentsSlowPath):
2484
2485         Call new RenderObject paint function repaintSlowRepaintObject() instead of the 
2486         more-generic repaint().
2487         (WebCore::FrameView::repaintSlowRepaintObjects):
2488
2489         Remove CoverageForSlowScrolling.
2490         * platform/graphics/TiledBacking.h:
2491         * platform/graphics/ca/mac/TileController.h:
2492         * platform/graphics/ca/mac/TileController.mm:
2493         (WebCore::TileController::tilesWouldChangeForVisibleRect):
2494         (WebCore::TileController::computeTileCoverageRect):
2495         (WebCore::TileController::revalidateTiles):
2496         * rendering/RenderLayerBacking.cpp:
2497         (WebCore::computeTileCoverage):
2498
2499         Handle repainting a slow repaint object. Don’t clip when we shouldn’t, use the 
2500         RenderView’s backgroundRect as a repaintRect when this is the root background 
2501         since that will take the extended background rect into consideration.
2502         * rendering/RenderObject.cpp:
2503         (WebCore::RenderObject::repaintSlowRepaintObject):
2504         * rendering/RenderObject.h:
2505
2506 2014-02-06  Filip Pizlo  <fpizlo@apple.com>
2507
2508         More FTL build scaffolding
2509         https://bugs.webkit.org/show_bug.cgi?id=128330
2510
2511         Reviewed by Geoffrey Garen.
2512
2513         The FTL already has tests.
2514
2515         * Configurations/FeatureDefines.xcconfig:
2516
2517 2014-02-07  Alexey Proskuryakov  <ap@apple.com>
2518
2519         Remove some unused functions from SerializedScriptValue
2520         https://bugs.webkit.org/show_bug.cgi?id=128407
2521
2522         Reviewed by Anders Carlsson.
2523
2524         * bindings/js/SerializedScriptValue.cpp:
2525         (WebCore::SerializedScriptValue::undefinedValue):
2526         (WebCore::SerializedScriptValue::nullValue):
2527         * bindings/js/SerializedScriptValue.h:
2528
2529 2014-02-07  Brady Eidson  <beidson@apple.com>
2530
2531         IDB: Some Mozilla cursor mutation tests fail
2532         <rdar://problem/16011680> and https://bugs.webkit.org/show_bug.cgi?id=128374
2533
2534         Reviewed by Sam Weinig.
2535
2536         Tested by:
2537         storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html
2538         storage/indexeddb/mozilla/cursor-mutation.html
2539
2540         The previous comment about LevelDB was wrong.
2541         Apparently calling onSuccess() with a null SharedBuffer means the cursor reached the end.
2542         Update to distinguish between an error and reaching the end:
2543         * Modules/indexeddb/IDBCursorBackendOperations.cpp:
2544         (WebCore::CursorAdvanceOperation::perform):
2545         (WebCore::CursorIterationOperation::perform):
2546  
2547         Add a new IDBKey type - Maximum - To be used in comparisons between keys.
2548         This will allow the DatabaseProcess to operate on the range of all keys:
2549         * Modules/indexeddb/IDBKey.cpp:
2550         (WebCore::IDBKey::compare):
2551         * Modules/indexeddb/IDBKey.h:
2552
2553         * Modules/indexeddb/IDBKeyData.cpp:
2554         (WebCore::IDBKeyData::IDBKeyData):
2555         (WebCore::IDBKeyData::maybeCreateIDBKey):
2556         (WebCore::IDBKeyData::isolatedCopy):
2557         (WebCore::IDBKeyData::encode):
2558         (WebCore::IDBKeyData::decode):
2559         (WebCore::IDBKeyData::compare):
2560         (WebCore::IDBKeyData::loggingString):
2561         * Modules/indexeddb/IDBKeyData.h:
2562         (WebCore::IDBKeyData::minimum):
2563         (WebCore::IDBKeyData::maximum):
2564
2565         * bindings/js/IDBBindingUtilities.cpp:
2566         (WebCore::idbKeyToJSValue):
2567
2568         Remove an unused callback:
2569         * Modules/indexeddb/IDBCallbacks.h:
2570         * Modules/indexeddb/IDBRequest.h:
2571
2572 2014-02-07  Roger Fong  <roger_fong@apple.com>
2573
2574         CGContextGetUserSpaceToDeviceSpaceTransform returns the wrong value on Windows.
2575         https://bugs.webkit.org/show_bug.cgi?id=128395.
2576         
2577         Rubberstamped by Zalan Bujtas.
2578
2579         The call essentially returns 0 and causes an assertion failure when running many layout tests.
2580
2581         * platform/graphics/cg/GraphicsContextCG.cpp: Don't make the call on Windows. We default to 1.
2582         (WebCore::GraphicsContext::platformInit):
2583
2584 2014-02-07  Dan Bernstein  <mitz@apple.com>
2585
2586         iOS build fix.
2587
2588         * platform/PlatformKeyboardEvent.h: Fixed a typo.
2589
2590 2014-02-07  Dan Bernstein  <mitz@apple.com>
2591
2592         Stop using PLATFORM(MAC) in WebCore/platform except where it means “OS X but not iOS”
2593         https://bugs.webkit.org/show_bug.cgi?id=128404
2594
2595         Reviewed by Anders Carlsson.
2596
2597         * Configurations/WebCore.xcconfig: Removed KeyEventMac.mm from
2598         EXCLUDED_SOURCE_FILE_NAMES_iphoneos, because that file contains !PLATFORM(IOS) guards.
2599         Removed WheelEventMac.mm from the same definition, because that file no longer exists.
2600         * platform/ContentFilter.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2601         * platform/ContextMenu.h: Ditto.
2602         * platform/ContextMenuItem.h: Ditto.
2603         * platform/Cursor.cpp: Ditto.
2604         * platform/Cursor.h: Ditto.
2605         * platform/DragData.cpp: Ditto.
2606         * platform/DragImage.cpp: Ditto.
2607         * platform/Language.cpp:
2608         (WebCore::displayNameForLanguageLocale): Changed PLATFORM(MAC) to USE(CF) && !PLATFORM(WIN).
2609         * platform/LocalizedStrings.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2610         (WebCore::contextMenuItemTagSearchWeb):
2611         * platform/LocalizedStrings.h: Ditto.
2612         * platform/MIMETypeRegistry.cpp: Ditto.
2613         (WebCore::initializeSupportedImageMIMETypesForEncoding):
2614         * platform/PasteboardStrategy.h: Ditto.
2615         * platform/PlatformKeyboardEvent.h: Ditto.
2616         * platform/PlatformMenuDescription.h: Ditto.
2617         * platform/PlatformSpeechSynthesizer.h: Ditto.
2618         * platform/PlatformWheelEvent.h: Ditto.
2619         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2620         * platform/SchemeRegistry.cpp: Ditto.
2621         (WebCore::localURLSchemes):
2622         (WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal):
2623         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
2624         * platform/ScrollAnimator.cpp: Ditto.
2625         (WebCore::ScrollAnimator::handleWheelEvent):
2626         * platform/ScrollAnimator.h: Ditto.
2627         * platform/ScrollView.cpp: Ditto.
2628         * platform/ScrollView.h: Ditto.
2629         * platform/ScrollbarThemeComposite.h: Ditto.
2630         * platform/SharedBuffer.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around NSData-related
2631         code.
2632         * platform/URL.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around NSURL-related code.
2633         * platform/Widget.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2634         * platform/Widget.h: Ditto.
2635         * platform/audio/AudioSession.cpp: Changed !PLATFORM(MAC) && !PLATFORM(IOS) to
2636         !PLATFORM(COCOA).
2637         * platform/audio/HRTFElevation.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2638         * platform/audio/MediaSessionManager.cpp: Ditto.
2639         * platform/audio/mac/AudioSessionMac.cpp: Updated comment.
2640         * platform/audio/mac/MediaSessionManagerMac.cpp: Removed PLATFORM(MAC) from Cocoa-only file.
2641         * platform/cf/SharedBufferCF.cpp: Changed !PLATFORM(MAC) to !USE(FOUNDATION) and updated
2642         comment.
2643         * platform/cf/URLCF.cpp: Changed !PLATFORM(MAC) to !USE(FOUNDATION).
2644         * platform/graphics/BitmapImage.h: Changed one instance of PLATFORM(MAC) to
2645         USE(CG) || USE(APPKIT), and another to PLATFORM(COCOA).
2646         * platform/graphics/DisplayRefreshMonitor.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2647         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
2648         * platform/graphics/DisplayRefreshMonitor.h: Ditto.
2649         * platform/graphics/FloatPoint.h: Collapsed nested #ifs into a single #if.
2650         * platform/graphics/FloatRect.h: Ditto.
2651         * platform/graphics/FloatSize.h: Ditto.
2652         * platform/graphics/Font.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2653         * platform/graphics/Font.h: Ditto.
2654         * platform/graphics/FontCache.cpp: Ditto.
2655         (WebCore::FontCache::getFontData):
2656         * platform/graphics/FontCache.h: Ditto. Also removed redundant friend class declaration.
2657         * platform/graphics/FontGlyphs.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2658         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2659         * platform/graphics/GlyphPage.h: Ditto.
2660         * platform/graphics/GraphicsContext3D.h: Ditto.
2661         * platform/graphics/Image.h: Changed PLATFORM(MAC) to USE(APPKIT) around use of NSImage.
2662         Changed another PLATFORM(MAC) to PLATFORM(COCOA).
2663         * platform/graphics/IntRect.h: Collapsed nested #ifs into a single #if.
2664         * platform/graphics/IntSize.h: Ditto.
2665         * platform/graphics/MediaPlayer.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2666         (WebCore::installedMediaEngines):
2667         (WebCore::MediaPlayer::supportsType):
2668         * platform/graphics/SimpleFontData.cpp: Ditto.
2669         (WebCore::SimpleFontData::nonSyntheticItalicFontData):
2670         (WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
2671         * platform/graphics/SimpleFontData.h: Ditto.
2672         * platform/graphics/TiledBacking.h: Ditto.
2673         * platform/graphics/ca/GraphicsLayerCA.cpp: Ditto.
2674         (WebCore::GraphicsLayerCA::filtersCanBeComposited):
2675         (WebCore::GraphicsLayerCA::createPlatformCALayer):
2676         * platform/graphics/ca/LayerFlushScheduler.h: Ditto.
2677         * platform/graphics/ca/PlatformCAAnimation.h: Ditto.
2678         * platform/graphics/ca/PlatformCAFilters.h: Ditto.
2679         * platform/graphics/ca/PlatformCALayer.h: Ditto.
2680         * platform/graphics/cg/BitmapImageCG.cpp: Ditto.
2681         * platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
2682         (WebCore::GraphicsContext::setAllowsFontSmoothing):
2683         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Ditto.
2684         * platform/graphics/cg/ImageBufferCG.cpp: Ditto.
2685         * platform/graphics/cg/ImageBufferDataCG.h: Ditto.
2686         * platform/graphics/cg/ImageCG.cpp: Ditto.
2687         * platform/graphics/cg/ImageSourceCG.cpp: Ditto.
2688         (WebCore::ImageSource::setData):
2689         * platform/graphics/cg/ImageSourceCG.h: Ditto.
2690         * platform/graphics/cg/PathCG.cpp: Ditto.
2691         (WebCore::Path::platformAddPathForRoundedRect):
2692         * platform/graphics/cg/PatternCG.cpp: Ditto.
2693         * platform/graphics/gpu/DrawingBuffer.h: Ditto.
2694         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2695         (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Removed PLATFORM(MAC) guards, since
2696         this file is only used on Mac and iOS.
2697         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2698         (WebCore::Extensions3DOpenGL::supportsExtension): Changed the GL_EXT_draw_buffers check to
2699         match the implementation.
2700         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Changed PLATFORM(MAC) to
2701         PLATFORM(COCOA).
2702         * platform/mac/KeyEventMac.mm: Added !PLATFORM(IOS).
2703         * platform/mac/PlatformEventFactoryMac.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2704         * platform/mac/WebCoreSystemInterface.h: Ditto. Removed redundant check for PLATFORM(MAC).
2705         * platform/mac/WebCoreSystemInterface.mm: Removed redundant check for PLATFORM(MAC).
2706         * platform/network/Credential.h: Changed PLATFORM(IOS) || PLATFORM(MAC) to PLATFORM(COCOA).
2707         * platform/network/NetworkStateNotifier.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2708         * platform/network/NetworkStorageSession.h: Ditto.
2709         * platform/network/NetworkingContext.h: Ditto.
2710         * platform/network/ProtectionSpace.cpp: Ditto.
2711         (WebCore::ProtectionSpace::receivesCredentialSecurely):
2712         * platform/network/ResourceHandle.cpp: Ditto.
2713         (WebCore::ResourceHandle::clearAuthentication):
2714         (WebCore::ResourceHandle::shouldContentSniffURL):
2715         * platform/network/ResourceHandle.h: Ditto.
2716         * platform/network/ResourceHandleClient.cpp: Ditto.
2717         * platform/network/ResourceHandleClient.h: Ditto.
2718         * platform/network/ResourceHandleInternal.h: Ditto.
2719         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2720         * platform/network/ResourceRequestBase.cpp: Ditto.
2721         * platform/network/cf/AuthenticationCF.h: Ditto.
2722         * platform/network/cf/CookieStorageCFNet.cpp: Ditto.
2723         * platform/network/cf/CredentialStorageCFNet.cpp: Ditto.
2724         * platform/network/cf/FormDataStreamCFNet.cpp: Ditto.
2725         * platform/network/cf/NetworkStorageSessionCFNet.cpp: Ditto.
2726         (WebCore::NetworkStorageSession::switchToNewTestingSession):
2727         (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
2728         * platform/network/cf/ResourceError.h: Ditto.
2729         * platform/network/cf/ResourceHandleCFNet.cpp: Ditto.
2730         (WebCore::ResourceHandle::createCFURLConnection):
2731         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
2732         * platform/network/cf/ResourceRequest.h: Ditto.
2733         (WebCore::ResourceRequest::ResourceRequest):
2734         * platform/network/cf/ResourceRequestCFNet.cpp: Ditto.
2735         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2736         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2737         (WebCore::ResourceRequest::setStorageSession):
2738         * platform/network/cf/ResourceResponse.h: Ditto.
2739         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
2740         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
2741         * platform/network/mac/ResourceResponseMac.mm: Ditto.
2742         * platform/posix/FileSystemPOSIX.cpp: Changed PLATFORM(MAC) to OS(DARWIN) &&
2743         !PLATFORM(EFL) && !PLATFORM(GTK).
2744         * platform/text/TextBoundaries.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2745
2746 2014-02-07  Ryosuke Niwa  <rniwa@webkit.org>
2747
2748         Revert r154384 and r154674 as they broke selection rect computations for text with ligatures.
2749
2750         * platform/graphics/Font.cpp:
2751         (WebCore::Font::drawText):
2752         (WebCore::Font::drawEmphasisMarks):
2753         (WebCore::Font::selectionRectForText):
2754         (WebCore::Font::offsetForPosition):
2755         * platform/graphics/FontFastPath.cpp:
2756         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
2757         (WebCore::Font::selectionRectForSimpleText):
2758         (WebCore::Font::offsetForPositionForSimpleText):
2759         * platform/graphics/GlyphBuffer.h:
2760         * platform/graphics/WidthIterator.cpp:
2761         (WebCore::WidthIterator::WidthIterator):
2762         (WebCore::WidthIterator::advanceInternal):
2763         (WebCore::WidthIterator::advanceOneCharacter):
2764         * platform/graphics/WidthIterator.h:
2765
2766 2014-02-07  Benjamin Poulain  <bpoulain@apple.com>
2767
2768         [WK2] Add support for text document viewport configuration
2769         https://bugs.webkit.org/show_bug.cgi?id=128359
2770
2771         Reviewed by Simon Fraser.
2772
2773         Define a set of ViewportParameters suitable for displaying text documents.
2774         Add a documents class for text document to differentiate them from other type of documents.
2775
2776         * WebCore.exp.in:
2777         * dom/Document.h:
2778         (WebCore::Document::isTextDocument):
2779         * html/TextDocument.cpp:
2780         (WebCore::TextDocument::TextDocument):
2781         * page/ViewportConfiguration.cpp:
2782         (WebCore::ViewportConfiguration::ViewportConfiguration):
2783         (WebCore::ViewportConfiguration::webpageParameters):
2784         (WebCore::ViewportConfiguration::plainTextParameters):
2785         * page/ViewportConfiguration.h:
2786
2787 2014-02-07  Bem Jones-Bey  <bjonesbe@adobe.com>
2788
2789         FloatingObject::unsafeClone should not copy m_originatingLine
2790         https://bugs.webkit.org/show_bug.cgi?id=128381
2791
2792         Reviewed by Andreas Kling.
2793
2794         Copying the originatingLine allows to break the invariant that the
2795         floating object must only contain lines that are owned by the renderer
2796         it is attached to.
2797
2798         * rendering/FloatingObjects.cpp:
2799         (WebCore::FloatingObject::unsafeClone):
2800
2801 2014-02-07  Brendan Long  <b.long@cablelabs.com>
2802
2803         Update TextTrack API to current spec
2804         https://bugs.webkit.org/show_bug.cgi?id=122218
2805
2806         Refactoring VTTCue out of TextTrackCue.
2807
2808         Reviewed by Eric Carlson.
2809
2810         Test: media/track/track-vttcue.html
2811
2812         * CMakeLists.txt: Add VTTCue and rename RenderTextTrackCue to RenderVTTCue.
2813         * DerivedSources.cpp: Same.
2814         * DerivedSources.make: Same.
2815         * GNUmakefile.list.am: Same.
2816         * PlatformGTK.cmake:  Same.
2817         * WebCore.vcxproj/WebCore.vcxproj: Same.
2818         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
2819         * WebCore.xcodeproj/project.pbxproj: Same.
2820         * bindings/js/JSTextTrackCueCustom.cpp:
2821         (WebCore::toJS): Use VTTCue DOM wrapper for VTTCue and its subclasses.
2822         * html/HTMLMediaElement.cpp:
2823         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Convert to VTTCue as needed.
2824         (WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
2825         * html/HTMLMediaElement.h: Only print cue.text in debug output if the cue type has a .text attribute
2826         * html/shadow/MediaControlElements.cpp:
2827         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Convert to VTTCue as needed, and fix TextTrackCueBox to VTTCueBox.
2828         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Convert to VTTCue as needed.
2829         * html/track/InbandGenericTextTrack.cpp:
2830         (WebCore::InbandGenericTextTrack::addGenericCue): Use refactored VTTCue attributes.
2831         * html/track/InbandWebVTTTextTrack.cpp:
2832         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Use VTTCue's constructor instead of deprecated TextTrackCue constructor.
2833         * html/track/TextTrack.cpp:
2834         (WebCore::TextTrack::setMode): Convert to VTTCue as needed.
2835         (WebCore::TextTrack::hasCue): Make this function only accept VTTCues, since it's only used for them anyway, and convert existing cues to VTTCues as needed.
2836         * html/track/TextTrack.h: Same as hasCue above.
2837         * html/track/TextTrackCue.cpp: Refactor a lot of code out. Everything that was removed went to VTTCue.cpp.
2838         (WebCore::TextTrackCue::create): For backwards compatibility, just call VTTCue::create().
2839         (WebCore::TextTrackCue::TextTrackCue): Refactor a lot of code out.
2840         (WebCore::TextTrackCue::~TextTrackCue): Same.
2841         (WebCore::TextTrackCue::didChange): Same.
2842         (WebCore::TextTrackCue::setIsActive): Same.
2843         * html/track/TextTrackCue.h: Same.
2844         * html/track/TextTrackCue.idl: Remove VTTCue attributes and add custom toJS function.
2845         * html/track/TextTrackCueGeneric.cpp: Use VTTCue instead of TextTrackCue.
2846         * html/track/TextTrackCueGeneric.h: Same.
2847         * html/track/VTTCue.cpp: Copied from Source/WebCore/html/track/TextTrackCue.cpp.
2848         * html/track/VTTCue.h: Copied from Source/WebCore/html/track/TextTrackCue.h.
2849         * html/track/VTTCue.idl: Copied from Source/WebCore/html/track/TextTrackCue.idl.
2850         * loader/TextTrackLoader.cpp:
2851         (WebCore::TextTrackLoader::getNewCues): Use VTTCue instead of TextTrackCue.
2852         * page/CaptionUserPreferencesMediaAF.cpp:
2853         (WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride): Use VTTCueBox instead of TextTrackCueBox.
2854         * rendering/RenderVTTCue.cpp: Renamed from Source/WebCore/rendering/RenderTextTrackCue.cpp. Changed to use VTTCue instead of TextTrackCue.
2855         * rendering/RenderVTTCue.h: Renamed from Source/WebCore/rendering/RenderTextTrackCue.h. Changed to use VTTCue instead of TextTrackCue.
2856         * rendering/RenderingAllInOne.cpp: Rename RenderTextTrackCue to RenderVTTCue.
2857
2858 2014-02-07  Gavin Barraclough  <barraclough@apple.com>
2859
2860         Should report user input to PageThrottler
2861         https://bugs.webkit.org/show_bug.cgi?id=128398
2862
2863         Reviewed by Tim Horton.
2864
2865         Make sure we wake from AppNap if there is user interaction.
2866
2867         * page/PageThrottler.h:
2868         (WebCore::PageThrottler::didReceiveUserInput):
2869         (WebCore::PageThrottler::pluginDidEvaluate):
2870             - added, these call reportInterestingEvent()
2871
2872 2014-02-07  Jer Noble  <jer.noble@apple.com>
2873
2874         Unreviewed build fix for 32-bit iOS.
2875
2876         Use magic ? values to allow the exported symbol to be different on 32- and 64-bit builds.
2877
2878         * WebCore.exp.in:
2879
2880 2014-02-07  Anders Carlsson  <andersca@apple.com>
2881
2882         Convert ProgressTracker to std::chrono
2883         https://bugs.webkit.org/show_bug.cgi?id=128377
2884
2885         Reviewed by Andreas Kling.
2886
2887         * loader/ProgressTracker.cpp:
2888         (WebCore::ProgressTracker::ProgressTracker):
2889         (WebCore::ProgressTracker::reset):
2890         (WebCore::ProgressTracker::progressStarted):
2891         (WebCore::ProgressTracker::finalProgressComplete):
2892         (WebCore::ProgressTracker::incrementProgress):
2893         * loader/ProgressTracker.h:
2894
2895 2014-02-07  Alexey Proskuryakov  <ap@apple.com>
2896
2897         32-bit build fix.
2898
2899         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2900         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
2901
2902 2014-02-07  Mihai Tica  <mitica@adobe.com>
2903
2904         [CSS Background Blending] Unprefix the -webkit-background-blend-mode property
2905
2906         https://bugs.webkit.org/show_bug.cgi?id=128270
2907
2908         Reviewed by Dean Jackson.
2909
2910         This patch consist of unprefixing the -webkit-background-blend-mode.
2911         The property now changes to background-blend-mode.
2912
2913         * css/CSSComputedStyleDeclaration.cpp:
2914         (WebCore::ComputedStyleExtractor::propertyValue):
2915         * css/CSSParser.cpp:
2916         (WebCore::CSSParser::parseValue):
2917         (WebCore::CSSParser::parseFillProperty):
2918         * css/CSSPropertyNames.in:
2919         * css/DeprecatedStyleBuilder.cpp:
2920         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2921
2922 2014-02-07  Samuel White  <samuel_white@apple.com>
2923
2924         AX: Find and select text with respect to insertion point using accessibility API.
2925         https://bugs.webkit.org/show_bug.cgi?id=128026
2926
2927         Reviewed by Chris Fleizach.
2928
2929         Added facilities to support semi-ambiguous text selection through the accessibility API. All
2930         requests are handled with respect to the current selection. The requests are disambiguated in
2931         WebCore using passed parameters such as: SelectStringAfterSelection , ..Before.., ..ClosestTo...,
2932         etc. Callers can also supply an array of strings to select and the closest that matches the
2933         disambiguation criteria will be used.
2934
2935         Test: platform/mac/accessibility/select-text.html
2936
2937         * accessibility/AccessibilityObject.cpp:
2938         (WebCore::AccessibilityObject::rangeClosestToRange):
2939         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
2940         (WebCore::AccessibilityObject::selectionRange):
2941         (WebCore::AccessibilityObject::selectText):
2942         (WebCore::AccessibilityObject::frame):
2943         * accessibility/AccessibilityObject.h:
2944         (WebCore::AccessibilitySelectTextCriteria::AccessibilitySelectTextCriteria):
2945         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2946         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
2947         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2948         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2949         * dom/Position.cpp:
2950         (WebCore::Position::positionCountBetweenPositions):
2951         * dom/Position.h:
2952
2953 2014-02-07  Bem Jones-Bey  <bjonesbe@adobe.com>
2954
2955         FloatingObject m_paginationStrut should be LayoutUnit
2956         https://bugs.webkit.org/show_bug.cgi?id=119808
2957
2958         Reviewed by Andreas Kling.
2959
2960         Make the paginationStrut in FloatingObject have the same type as all
2961         of the other paginationStruts in the code.
2962
2963         * rendering/FloatingObjects.h:
2964         (WebCore::FloatingObject::paginationStrut):
2965         (WebCore::FloatingObject::setPaginationStrut):
2966         * rendering/RenderBlockLineLayout.cpp:
2967         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
2968
2969 2014-02-06  Brady Eidson  <beidson@apple.com>
2970
2971         IDB: storage/indexeddb/create-index-with-integer-keys.html fails
2972         <rdar://problem/16002857> and https://bugs.webkit.org/show_bug.cgi?id=128316
2973
2974         Reviewed by Geoff Garen.
2975
2976         Tested by storage/indexeddb/create-index-with-integer-keys.html (and probably some others)
2977
2978         * Modules/indexeddb/IDBCursor.cpp:
2979         (WebCore::IDBCursor::update): Update createIDBKeyFromScriptValueAndKeyPath usage.
2980         (WebCore::IDBCursor::setValueReady): Update createIDBKeyFromScriptValueAndKeyPath usage.
2981
2982         * Modules/indexeddb/IDBObjectStore.cpp:
2983         (WebCore::IDBObjectStore::put): Update usage of binding utilities.
2984
2985         * Modules/indexeddb/IDBRequest.cpp:
2986         (WebCore::IDBRequest::onSuccess): Update createIDBKeyFromScriptValueAndKeyPath usage.
2987
2988         * bindings/js/IDBBindingUtilities.cpp:
2989         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
2990         (WebCore::createIDBKeyFromScriptValueAndKeyPath): Changed to take an ExecState*.
2991         (WebCore::deserializeIDBValueBuffer): Added new version that starts with ExecState* and Vector<uint8_t>
2992           instead of RequestState and SharedBuffer.
2993         (WebCore::generateIndexKeysForValue): Moved from IDBObjectStore.cpp and changed to take an ExecState*
2994         * bindings/js/IDBBindingUtilities.h:
2995
2996         Added new blob fetcher that works with uint8_t buffers:
2997         * platform/sql/SQLiteStatement.cpp:
2998         (WebCore::SQLiteStatement::getColumnBlobAsVector):
2999         * platform/sql/SQLiteStatement.h:
3000
3001         * WebCore.exp.in:
3002
3003 2014-02-07  Frédéric Wang  <fred.wang@free.fr>
3004
3005         childShouldCreateRenderer should return false for the mspace element
3006         https://bugs.webkit.org/show_bug.cgi?id=128325
3007
3008         Reviewed by Chris Fleizach.
3009
3010         The mspace element can not have children so this makes its
3011         childShouldCreateRenderer always return false.
3012
3013         Test: mathml/presentation/mspace-children.html
3014
3015         * mathml/MathMLTextElement.cpp:
3016         (WebCore::MathMLTextElement::childShouldCreateRenderer):
3017
3018 2014-02-07  Javier Fernandez  <jfernandez@igalia.com>
3019
3020         [CSS Grid Layout] Rename grid-definition-{columns|rows} to match the new syntax
3021         https://bugs.webkit.org/show_bug.cgi?id=127989
3022
3023         Reviewed by Andreas Kling.
3024
3025         In the latest WD, grid-definition-{columns|rows} were renamed to grid-template-{columns|rows}.
3026
3027         * css/CSSComputedStyleDeclaration.cpp:
3028         (WebCore::isLayoutDependent):
3029         (WebCore::ComputedStyleExtractor::propertyValue):
3030         * css/CSSParser.cpp:
3031         (WebCore::CSSParser::parseValue):
3032         * css/CSSPropertyNames.in:
3033         * css/StyleResolver.cpp:
3034         (WebCore::StyleResolver::applyProperty):
3035
3036 2014-02-07  Andreas Kling  <akling@apple.com>
3037
3038         CTTE: DocumentThreadableLoader always has a Document.
3039         <https://webkit.org/b/128364>
3040
3041         DocumentThreadableLoader always has an "owner" Document, so store
3042         that as a reference instead of a pointer. Removed some unnecessary
3043         assertions exposed by this change.
3044
3045         Reviewed by Antti Koivisto.
3046
3047         * loader/DocumentThreadableLoader.cpp:
3048         (WebCore::DocumentThreadableLoader::loadResourceSynchronously):
3049         (WebCore::DocumentThreadableLoader::create):
3050         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
3051         (WebCore::DocumentThreadableLoader::didReceiveResponse):
3052         (WebCore::DocumentThreadableLoader::didReceiveData):
3053         (WebCore::DocumentThreadableLoader::didFinishLoading):
3054         (WebCore::DocumentThreadableLoader::didFail):
3055         (WebCore::DocumentThreadableLoader::preflightFailure):
3056         (WebCore::DocumentThreadableLoader::loadRequest):
3057         (WebCore::DocumentThreadableLoader::securityOrigin):
3058         * loader/DocumentThreadableLoader.h:
3059         * loader/ThreadableLoader.cpp:
3060         (WebCore::ThreadableLoader::create):
3061         (WebCore::ThreadableLoader::loadResourceSynchronously):
3062         * loader/WorkerThreadableLoader.cpp:
3063         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
3064
3065 2014-02-07  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3066
3067         Vector-effect updates require a re-layout
3068         https://bugs.webkit.org/show_bug.cgi?id=127553
3069
3070         Reviewed by Andreas Kling.
3071
3072         As noted in the stale SVGRenderStyle::diff() comment, now that layout() observes vector-effect
3073         we need to trigger a re-layout on attribute changes.
3074
3075         Merged from Blink: https://src.chromium.org/viewvc/blink?revision=152570&view=revision
3076
3077         Tests: svg/custom/non-scaling-stroke-update-expected.svg
3078                svg/custom/non-scaling-stroke-update.svg
3079
3080         * rendering/style/SVGRenderStyle.cpp:
3081         (WebCore::SVGRenderStyle::diff):
3082
3083 2014-02-07  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
3084
3085         Renaming isTableElement() to isRenderedTable() as per the FIXME comment
3086         https://bugs.webkit.org/show_bug.cgi?id=127769
3087
3088         Reviewed by Andreas Kling.
3089
3090         Rename method and use IsTable() instead of local type checking.
3091
3092         * dom/Position.cpp:
3093         (WebCore::Position::parentAnchoredEquivalent):
3094         (WebCore::Position::upstream):
3095         (WebCore::Position::downstream):
3096         (WebCore::Position::isCandidate):
3097         * dom/PositionIterator.cpp:
3098         (WebCore::PositionIterator::isCandidate):
3099         * editing/CompositeEditCommand.cpp:
3100         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
3101         (WebCore::CompositeEditCommand::moveParagraphWithClones):
3102         * editing/FrameSelection.cpp:
3103         (WebCore::caretRendersInsideNode):
3104         * editing/VisibleUnits.cpp:
3105         (WebCore::startOfParagraph):
3106         (WebCore::endOfParagraph):
3107         * editing/htmlediting.cpp:
3108         (WebCore::firstInSpecialElement):
3109         (WebCore::lastInSpecialElement):
3110         (WebCore::isRenderedTable):
3111         * editing/htmlediting.h:
3112         * rendering/RenderBox.cpp:
3113         (WebCore::RenderBox::localCaretRect):
3114
3115 2014-02-06  Brady Eidson  <beidson@apple.com>
3116
3117         IDB: Remove the entirely unnecessary "Value Key" concept
3118         https://bugs.webkit.org/show_bug.cgi?id=128360
3119
3120         Reviewed by Dan Bernstein.
3121
3122         No new tests (No change in behavior)
3123
3124         All cursor operations were set up to pass a value key parameter around, but it was:
3125         1 - Entirely unused
3126         2 - The same thing that the primary key is supposed to be
3127
3128         * Modules/indexeddb/IDBCallbacks.h:
3129
3130         * Modules/indexeddb/IDBCursorBackend.cpp:
3131         (WebCore::IDBCursorBackend::updateCursorData):
3132         (WebCore::IDBCursorBackend::clear):
3133         * Modules/indexeddb/IDBCursorBackend.h:
3134
3135         * Modules/indexeddb/IDBCursorBackendOperations.cpp:
3136         (WebCore::CursorAdvanceOperation::perform):
3137         (WebCore::CursorIterationOperation::perform):
3138
3139         * Modules/indexeddb/IDBRequest.cpp:
3140         (WebCore::IDBRequest::onSuccess):
3141         * Modules/indexeddb/IDBRequest.h:
3142
3143         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
3144         (WebCore::OpenCursorOperation::perform):
3145
3146         * Modules/indexeddb/IDBServerConnection.h:
3147         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3148         (WebCore::IDBServerConnectionLevelDB::openCursor):
3149         (WebCore::IDBServerConnectionLevelDB::cursorAdvance):
3150         (WebCore::IDBServerConnectionLevelDB::cursorIterate):
3151         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
3152
3153 2014-02-06  Jeremy Jones  <jeremyj@apple.com>
3154
3155         Add support for AVKit fullscreen to WebKit2
3156         https://bugs.webkit.org/show_bug.cgi?id=128143
3157
3158         Reviewed by Simon Fraser.
3159
3160         Rename overloaded functions to prevent ambiguous template parameter
3161         compile error in generated code.
3162
3163         Rename overloaded exitFullscreen to exitFullscreenWithCompletionHandler.
3164         Rename overloaded enterFullscreen to enterFullscreenWithCompletionHandler.
3165
3166         * WebCore.exp.in:
3167         * WebCore.xcodeproj/project.pbxproj:
3168         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3169         (-[WebVideoFullscreenController exitFullscreen]):
3170         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3171         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3172         (WebVideoFullscreenInterfaceAVKit::enterFullscreenWithCompletionHandler):
3173         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
3174         (WebVideoFullscreenInterfaceAVKit::exitFullscreenWithCompletionHandler):
3175         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
3176         * platform/ios/WebVideoFullscreenModelMediaElement.h:
3177
3178 2014-02-06  Jeffrey Pfau  <jpfau@apple.com>
3179
3180         loadSubframe can return null in SubframeLoader::loadOrRedirectSubframe
3181         https://bugs.webkit.org/show_bug.cgi?id=128344
3182
3183         Reviewed by Ryosuke Niwa.
3184
3185         * loader/SubframeLoader.cpp:
3186         (WebCore::SubframeLoader::loadOrRedirectSubframe):
3187
3188 2014-02-06  Andreas Kling  <akling@apple.com>
3189
3190         Use child iterator in HTMLDetailsElement::findMainSummary().
3191         <https://webkit.org/b/128335>
3192
3193         Reviewed by Antti Koivisto.
3194
3195         * html/HTMLDetailsElement.h:
3196         * html/HTMLDetailsElement.cpp:
3197         (WebCore::HTMLDetailsElement::findMainSummary):
3198
3199 2014-02-06  Antti Koivisto  <antti@apple.com>
3200
3201         Add missing &.
3202
3203         * css/StyleInvalidationAnalysis.cpp:
3204         (WebCore::shouldDirtyAllStyle):
3205
3206 2014-02-06  Antti Koivisto  <antti@apple.com>
3207
3208         Check selectors exactly when invalidating style
3209         https://bugs.webkit.org/show_bug.cgi?id=128321
3210
3211         Reviewed by Andreas Kling.
3212         
3213         Selectors are now really fast to match with the JIT. Take advantage of this by invalidating
3214         the document style exactly when a new stylesheet arrives (instead of using heuristics).
3215         
3216         This reduces need for large style recalculations in some common cases.
3217
3218         * css/ElementRuleCollector.cpp:
3219         (WebCore::ElementRuleCollector::clearMatchedRules):
3220         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3221         * css/ElementRuleCollector.h:
3222         (WebCore::ElementRuleCollector::hasMatchedRules):
3223         * css/RuleSet.h:
3224         (WebCore::RuleSet::hasShadowPseudoElementRules):
3225         * css/SelectorChecker.cpp:
3226         (WebCore::SelectorChecker::matchRecursively):
3227         * css/SelectorChecker.h:
3228         
3229             Add new mode where all pseudo elements match so we can invalidate their element.
3230
3231         * css/StyleInvalidationAnalysis.cpp:
3232         (WebCore::shouldDirtyAllStyle):
3233         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
3234         (WebCore::invalidateStyleRecursively):
3235         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
3236         
3237             Switch to real selector checker.
3238
3239         * css/StyleInvalidationAnalysis.h:
3240         * css/StyleResolver.cpp:
3241         (WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
3242         * css/StyleResolver.h:
3243         (WebCore::StyleResolver::mediaQueryEvaluator):
3244         * dom/DocumentStyleSheetCollection.cpp:
3245         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
3246
3247 2014-02-06  Gavin Barraclough  <barraclough@apple.com>
3248
3249         Remove ChildProcess::m_activeTasks
3250         https://bugs.webkit.org/show_bug.cgi?id=128342
3251
3252         Reviewed by Anders Carlson.
3253
3254         Currently we funnel a number of different user activities
3255         to a single UserActivity object, which requires a call down
3256         from WebCore to WebKit2. Split these out so we can track
3257         them separately.
3258
3259         * page/ChromeClient.h:
3260             - removed [inc|dec]rementActivePageCount
3261         * page/PageThrottler.cpp:
3262         (WebCore::PageThrottler::PageThrottler):
3263             - incrementActivePageCount -> beginActivity
3264         (WebCore::PageThrottler::~PageThrottler):
3265             - decrementActivePageCount -> endActivity
3266         (WebCore::PageThrottler::throttlePage):
3267             - decrementActivePageCount -> endActivity
3268         (WebCore::PageThrottler::unthrottlePage):
3269             - incrementActivePageCount -> beginActivity
3270         * page/PageThrottler.h:
3271             - Added m_pageActivity.
3272
3273 2014-02-06  Commit Queue  <commit-queue@webkit.org>
3274
3275         Unreviewed, rolling out r163558.
3276         http://trac.webkit.org/changeset/163558
3277         https://bugs.webkit.org/show_bug.cgi?id=128350
3278
3279         Breaks scrolling on certain websites (Requested by bfulgham on
3280         #webkit).
3281
3282         * page/EventHandler.cpp:
3283         (WebCore::EventHandler::handleWheelEvent):
3284         * page/WheelEventDeltaTracker.h:
3285
3286 2014-02-06  Chris Fleizach  <cfleizach@apple.com>
3287
3288         AX: Crash in WebCore::AXObjectCache::computedObjectAttributeCache
3289         https://bugs.webkit.org/show_bug.cgi?id=128310
3290
3291         Reviewed by Alexey Proskuryakov.
3292
3293         Be more careful about using axObjectCache() directly since it can return null.
3294         I audited the usage cases of this method and ensured the ptr was not null in cases
3295         where I thought we might get hit by this.
3296
3297         * accessibility/AccessibilityNodeObject.cpp:
3298         (WebCore::AccessibilityNodeObject::parentObject):
3299         (WebCore::AccessibilityNodeObject::menuForMenuButton):
3300         (WebCore::AccessibilityNodeObject::menuButtonForMenu):
3301         * accessibility/AccessibilityObject.cpp:
3302         (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
3303         (WebCore::AccessibilityObject::findMatchingObjects):
3304         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
3305         (WebCore::AccessibilityObject::axObjectCache):
3306         (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
3307         (WebCore::AccessibilityObject::accessibilityIsIgnored):
3308         * accessibility/AccessibilityRenderObject.cpp:
3309         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
3310         (WebCore::AccessibilityRenderObject::parentObject):
3311         (WebCore::AccessibilityRenderObject::anchorElement):
3312         (WebCore::AccessibilityRenderObject::isTabItemSelected):
3313         (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
3314         (WebCore::AccessibilityRenderObject::nodeIsTextControl):
3315         (WebCore::AccessibilityRenderObject::activeDescendant):
3316         (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
3317         (WebCore::AccessibilityRenderObject::observableObject):
3318         (WebCore::AccessibilityRenderObject::textChanged):
3319         * accessibility/AccessibilityScrollView.cpp:
3320         (WebCore::AccessibilityScrollView::addChildScrollbar):
3321         (WebCore::AccessibilityScrollView::webAreaObject):
3322         (WebCore::AccessibilityScrollView::parentObject):
3323         (WebCore::AccessibilityScrollView::parentObjectIfExists):
3324
3325 2014-02-06  Zoltan Horvath  <zoltan@webkit.org>
3326
3327         [CSS Shapes] Rounded Insets Let Content Overlap Shape
3328         https://bugs.webkit.org/show_bug.cgi?id=127852
3329
3330         Reviewed by Bem Jones-Bey.
3331
3332         Using LengthSize to FloatSize conversion from LengthSize.h lead to miscalculated
3333         inset border radius, when the border radius was defined by percentages. This patch
3334         fixes the behavior and removes the incorrect conversion.
3335
3336         Test: fast/shapes/shape-outside-floats/shape-outside-rounded-inset.html
3337
3338         * css/LengthFunctions.cpp:
3339         (WebCore::floatSizeForLengthSize): Add new helper function for LengthSize to FloatSize conversion.
3340         * css/LengthFunctions.h:
3341         * platform/LengthSize.h: Remove floatSize conversion.
3342         * rendering/shapes/Shape.cpp:
3343         (WebCore::Shape::createShape): Use new helper function to calculate the right with for the inset border radius.
3344
3345 2014-02-06  Joseph Pecoraro  <pecoraro@apple.com>
3346
3347         Regenerate JSTestObj now that ScriptArguments moved. Generator knows what to do.
3348
3349         Rubber-stamped by Zalan Bujtas.
3350
3351         * bindings/scripts/test/JS/JSTestObj.cpp:
3352         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
3353
3354 2014-02-04  Jeffrey Pfau  <jpfau@apple.com>
3355
3356         Make adoption agency use the task queue
3357         https://bugs.webkit.org/show_bug.cgi?id=109445
3358
3359         Reviewed by Ryosuke Niwa.
3360
3361         Tests: fast/parser/adoption-agency-crash-01.html
3362                fast/parser/adoption-agency-crash-02.html
3363                fast/parser/adoption-agency-crash-03.html
3364
3365         * html/parser/HTMLConstructionSite.cpp:
3366         (WebCore::insert):
3367         (WebCore::executeInsertTask):
3368         (WebCore::executeReparentTask):
3369         (WebCore::executeInsertAlreadyParsedChildTask):
3370         (WebCore::executeTakeAllChildrenTask):
3371         (WebCore::executeTask):
3372         (WebCore::HTMLConstructionSite::attachLater):
3373         (WebCore::HTMLConstructionSite::executeQueuedTasks):
3374         (WebCore::HTMLConstructionSite::insertTextNode):
3375         (WebCore::HTMLConstructionSite::reparent):
3376         (WebCore::HTMLConstructionSite::insertAlreadyParsedChild):
3377         (WebCore::HTMLConstructionSite::takeAllChildren):
3378         (WebCore::HTMLConstructionSite::fosterParent):
3379         * html/parser/HTMLConstructionSite.h:
3380         (WebCore::HTMLConstructionSiteTask::HTMLConstructionSiteTask):
3381         (WebCore::HTMLConstructionSiteTask::oldParent):
3382         * html/parser/HTMLTreeBuilder.cpp:
3383         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3384
3385 2014-02-06  Mark Hahnenberg  <mhahnenberg@apple.com>
3386
3387         Heap::writeBarrier shouldn't be static
3388         https://bugs.webkit.org/show_bug.cgi?id=127807
3389
3390         Reviewed by Geoffrey Garen.
3391
3392         Currently it looks up the Heap in which to fire the write barrier by using 
3393         the cell passed to it. Almost every call site already has a reference to the 
3394         VM or the Heap itself. It seems wasteful to look it up all over again.
3395
3396         * bindings/js/JSEventListener.cpp:
3397         (WebCore::JSEventListener::JSEventListener):
3398         * bindings/js/JSEventListener.h:
3399         (WebCore::JSEventListener::jsFunction):
3400
3401 2014-02-06  Jaehun Lim  <ljaehun.lim@samsung.com>
3402
3403         Unreviewed, fix build error on 64bit debug build
3404
3405         Apply static_cast<long long> to int64_t variable when '%lli' is used.
3406
3407         * Modules/indexeddb/IDBDatabaseBackend.cpp:
3408         (WebCore::IDBDatabaseBackend::clearObjectStore):
3409         * Modules/indexeddb/IDBTransaction.cpp:
3410         (WebCore::IDBTransaction::setActive):
3411
3412 2014-02-06  Joseph Pecoraro  <pecoraro@apple.com>
3413
3414         Web Inspector: Add Console support to JSContext Inspection
3415         https://bugs.webkit.org/show_bug.cgi?id=127941
3416
3417         Reviewed by Geoffrey Garen.
3418
3419           - Move InspectorConsoleAgent and dependencies to JavaScriptCore
3420             and into the Inspector namespace.
3421           - Update Console Message enum types to enum classes and update
3422             all users to the new, simpler names.
3423           - Since we are updating addConsoleMessage callsites anyways, add
3424             ASCIILiteral where appropriate.
3425           - Add WebConsoleAgent base of Page/Worker ConsoleAgent to implement
3426             what could not be pushed into JavaScriptCore.
3427
3428         * CMakeLists.txt:
3429         * DerivedSources.make:
3430         * ForwardingHeaders/inspector/ConsoleMessage.h: Added.
3431         * ForwardingHeaders/inspector/ConsoleTypes.h: Added.
3432         * ForwardingHeaders/inspector/IdentifiersFactory.h: Added.
3433         * ForwardingHeaders/inspector/ScriptArguments.h: Added.
3434         * ForwardingHeaders/inspector/ScriptCallFrame.h: Added.
3435         * ForwardingHeaders/inspector/ScriptCallStack.h: Added.
3436         * ForwardingHeaders/inspector/ScriptCallStackFactory.h: Added.
3437         * ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h: Added.
3438         * GNUmakefile.am:
3439         * GNUmakefile.list.am:
3440         Add / remove files from builds.
3441
3442         * inspector/WebConsoleAgent.h:
3443         * inspector/WebConsoleAgent.cpp: Added.
3444         (WebCore::WebConsoleAgent::WebConsoleAgent):
3445         (WebCore::WebConsoleAgent::setMonitoringXHREnabled):
3446         (WebCore::WebConsoleAgent::frameWindowDiscarded):
3447         (WebCore::WebConsoleAgent::didFinishXHRLoading):
3448         (WebCore::WebConsoleAgent::didReceiveResponse):
3449         (WebCore::WebConsoleAgent::didFailLoading):
3450         (WebCore::WebConsoleAgent::addInspectedHeapObject):
3451         Implement what could not be pushed down into JavaScriptCore.
3452
3453         * inspector/InstrumentingAgents.h:
3454         (WebCore::InstrumentingAgents::webConsoleAgent):
3455         (WebCore::InstrumentingAgents::setWebConsoleAgent):
3456         Hold a WebConsoleAgent instead of InspectorConsoleAgent.
3457
3458