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