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