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