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