[GTK] [CMake] Add support for building WebKit2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
2
3         [GTK] [CMake] Add support for building WebKit2
4         https://bugs.webkit.org/show_bug.cgi?id=116372
5
6         Reviewed by Gustavo Noronha Silva.
7
8         * PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.
9
10 2013-05-21  Jer Noble  <jer.noble@apple.com>
11
12         REGRESSION(r101810): Media controls status text missing for live-stream videos.
13         https://bugs.webkit.org/show_bug.cgi?id=116547
14
15         Reviewed by Eric Carlson.
16
17         Un-reverse the logic in loadedMetadata() so that the status text isn't
18         hidden (when it should be shown) for live-stream videos.
19
20         * html/shadow/MediaControlsApple.cpp:
21         (WebCore::MediaControlsApple::loadedMetadata):
22
23 2013-05-21  Jer Noble  <jer.noble@apple.com>
24
25         Implement overlap-avoidance for in-band text track cues.
26         https://bugs.webkit.org/show_bug.cgi?id=116540
27
28         Reviewed by Eric Carlson.
29
30         In-band (or Generic) cues need special casing for certain features
31         present in in-band tracks, like paint-on and roll-up modes. To avoid
32         the problem of overlap avoidance forcing a caption meant to appear
33         below a cue to appear above it when a larger font size is selected,
34         impose an additional sort ordering for "generic cues". Instead of
35         cues being ordered by the order they appear in the track, "generic
36         cues" further sorted by their position within the video area, such
37         that cues at the bottom of the video area appear first, and later
38         cues are pushed up to avoid them, preserving the desired apparent
39         ordering.
40
41         * html/HTMLMediaElement.cpp:
42         (WebCore::compareCueInterval): Added; wrapper around
43             TextTrackCue::isOrderedBefore.
44         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
45             After creating the list of current cues, sort them.
46         * html/track/TextTrackCue.cpp:
47         (WebCore::TextTrackCue::isOrderedBefore): Added; implementation moved
48             from TextTrackCueList::add().
49         * html/track/TextTrackCue.h:
50         * html/track/TextTrackCueGeneric.cpp:
51         (WebCore::TextTrackCueGeneric::isOrderedBefore): Added override;
52             impose additional oredring on generic cues.
53         * html/track/TextTrackCueGeneric.h:
54         * html/track/TextTrackCueList.cpp:
55         (WebCore::TextTrackCueList::add): Moved ordering test into
56             isOrderedBefore().
57         * rendering/RenderTextTrackCue.cpp:
58         (WebCore::RenderTextTrackCue::repositionGenericCue):
59             Call repositionCueSnapToLinesNotSet() after positioning the cue.
60
61 2013-05-20  Jer Noble  <jer.noble@apple.com>
62
63         Implement overlap avoidance for cues with snap-to-lines flag not set
64         https://bugs.webkit.org/show_bug.cgi?id=84296
65
66         Reviewed by Eric Carlson.
67
68         Test: media/track/track-cue-overlap-snap-to-lines-not-set.html
69
70         Support overlap avoidance for the non-snap-to-lines part of the WebVTT spec.
71
72         * rendering/RenderTextTrackCue.cpp:
73         (WebCore::RenderTextTrackCue::isOutside): Split implementation into rectIsWithinContainer().
74         (WebCore::RenderTextTrackCue::rectIsWithinContainer): Ditto.
75         (WebCore::RenderTextTrackCue::isOverlapping): Split into overlappingObject() and overlappingObjectForRect().
76         (WebCore::RenderTextTrackCue::overlappingObject): Ditto.
77         (WebCore::RenderTextTrackCue::overlappingObjectForRect): Ditto.
78         (WebCore::RenderTextTrackCue::moveIfNecessaryToKeepWithinContainer): Added.
79         (WebCore::RenderTextTrackCue::findNonOverlappingPosition): When an overlapping object is found, move the
80             cue to just above or below that object and try again.
81         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Move implementation into moveIfNecessaryToKeepWithinContainer().
82         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Add implementanton based on above.
83         * rendering/RenderTextTrackCue.h:
84
85 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
86
87         Remove GraphicsLayerClient::contentsVisible()
88         https://bugs.webkit.org/show_bug.cgi?id=116523
89
90         Reviewed by Darin Adler.
91
92         This is dead code from the BlackBerry port.
93
94         * platform/graphics/GraphicsLayerClient.h:
95         * rendering/RenderLayerBacking.cpp:
96
97 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
98
99         PLATFORM(*) macros used in Source/WebCore/loader/archive/ArchiveFactory.cpp
100         https://bugs.webkit.org/show_bug.cgi?id=116453
101
102         Reviewed by Alexey Proskuryakov.
103
104         * loader/archive/ArchiveFactory.cpp: Remove a redundant PLATFORM(QT) macro when checking whether
105         to include the LegacyWebArchive.h header that's specific to the WebArchive support. The Qt port
106         does not enable the WebArchive feature at all (which is enabled only on AppleMac, AppleWin and iOS
107         platforms) so there's no reason to additionally condition the header include with building on
108         non-Qt platforms.
109
110 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
111
112         Add BlackBerry definition of NativeImagePtr
113         https://bugs.webkit.org/show_bug.cgi?id=116526
114
115         Reviewed by Darin Adler.
116
117         * platform/graphics/NativeImagePtr.h:
118         (Graphics):
119         (WebCore):
120
121 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
122
123         [BlackBerry] FontCache::getFontDataForCharacters() returns nullptr
124         https://bugs.webkit.org/show_bug.cgi?id=116529
125
126         Reviewed by Andreas Kling.
127
128         This cannot be converted to a PassRefPtr and breaks the build.
129
130         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
131         (WebCore::FontCache::getFontDataForCharacters):
132
133 2013-05-21  Iago Toral Quiroga  <itoral@igalia.com>
134
135         [GTK] Always use EGL to create the GL context when running on Wayland
136         https://bugs.webkit.org/show_bug.cgi?id=115721
137
138         Reviewed by Martin Robinson.
139
140         * platform/graphics/cairo/GLContext.cpp:
141         (WebCore::GLContext::createContextForWindow):
142         (WebCore::GLContext::createOffscreenContext): Always use EGL to create the GL context
143         instead of GLX when running on Wayland and make createOffScreenContext reuse the code
144         in createContextWindow.
145
146 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
147
148         Add FloatRect::normalized() for BlackBerry
149         https://bugs.webkit.org/show_bug.cgi?id=116531
150
151         Reviewed by Carlos Garcia Campos.
152
153         This was added to FloatRectBlackBerry.cpp in r111072 when the
154         graphics platform code was upstreamed, but this change was
155         missing.
156
157         * platform/graphics/FloatRect.h:
158         (FloatRect):
159
160 2013-05-21  Balazs Kelemen  <kbalazs@webkit.org>
161
162         [GStreamer] cleanup duration query
163         https://bugs.webkit.org/show_bug.cgi?id=116228
164
165         Reviewed by Philippe Normand.
166
167         Covered by existing tests.
168
169         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
170         (WebCore::MediaPlayerPrivateGStreamer::duration):
171         We can also cache the duration here if the query succeeds.
172         (MediaPlayerPrivateGStreamer::updateStates):
173         Don't query when we are in GST_STATE_READY state because it never succeeds.
174         Do it instead when we reached a stable state.
175         (MediaPlayerPrivateGStreamer::cacheDuration): Return early if it is already
176         cached. Recaching is not necessary and now we call it a lot of times.
177         Only look into the state if the query failed.
178         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
179         (MediaPlayerPrivateGStreamer): Made m_mediaDuration mutable to be
180         able to cache it in duration(). Internal cached values is one of
181         the sensible uses of mutable.
182
183 2013-05-21  Patrick Gansterer  <paroga@webkit.org>
184
185         Build fix for !USE(ACCELERATED_COMPOSITING) after r150307.
186
187         * rendering/RenderLayerCompositor.h: Added missing #if USE(ACCELERATED_COMPOSITING).
188
189 2013-05-20  Antti Koivisto  <antti@apple.com>
190
191         Simplify Shadow DOM distribution code
192         https://bugs.webkit.org/show_bug.cgi?id=116454
193
194         Reviewed by Andreas Kling.
195         
196         Remove code supporting nested insertion points and distributing to multiple insertion points.
197     
198         * html/HTMLDetailsElement.cpp:
199         (DetailsContentElement):
200         
201             Make distribution to <details> and <summary> mutually exclusive.
202
203         * html/shadow/ContentDistributor.cpp:
204         (WebCore):
205         (WebCore::ContentDistributor::distribute):
206         (WebCore::ContentDistributor::invalidate):
207         (WebCore::ContentDistributor::distributeSelectionsTo):
208         * html/shadow/ContentDistributor.h:
209         * html/shadow/InsertionPoint.cpp:
210         (WebCore::resolveReprojection):
211
212 2013-05-21  Mihnea Ovidenie  <mihnea@adobe.com>
213
214         [CSSRegions] Constrain auto-height region computation in a different way
215         https://bugs.webkit.org/show_bug.cgi?id=116310
216
217         Reviewed by Alexandru Chiculita.
218
219         After https://bugs.webkit.org/show_bug.cgi?id=74132, the region is a render block. We can use RenderBox::constrainContentBoxLogicalHeightByMinMax
220         instead of RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight to better reflect the fact that the region is not a replaced element.
221         Covered by existing regions tests, since when replaced-based the region had an intrinsic height of 0 and now, block-based, it does not have any children.
222
223         * rendering/RenderFlowThread.cpp:
224         (WebCore::RenderFlowThread::addForcedRegionBreak):
225
226 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
227
228         REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
229         https://bugs.webkit.org/show_bug.cgi?id=116516
230
231         Reviewed by Antti Koivisto.
232
233         The bug was caused by DRT not resetting various auto correction states.
234         Do that in Internals::resetToConsistentState.
235
236         * testing/Internals.cpp:
237         (WebCore::Internals::resetToConsistentState):
238
239 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
240
241         [GTK] Fix concatenations of string literals that are not C++11-compliant
242         https://bugs.webkit.org/show_bug.cgi?id=116449
243
244         Reviewed by Martin Robinson.
245
246         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
247         is simply a matter of separating the string and the string literal that are being concatenated with a space.
248
249         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
250         * platform/gtk/FileSystemGtk.cpp:
251         (WebCore::sharedResourcesPath):
252
253 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
254
255         [GTK] Support application/x-mimearchive mimetype for MHTML archives instead of message/rfc822
256         https://bugs.webkit.org/show_bug.cgi?id=116442
257
258         Reviewed by Martin Robinson.
259
260         * loader/archive/ArchiveFactory.cpp:
261         (WebCore::archiveMIMETypes): Like EFL and Qt, register the application/x-mimearchive mime type as a MHTML archive type
262         and stop propagating the message/rfc822 mime type as such. This also removes a couple of PLATFORM ifdefs.
263
264 2013-05-20  Benjamin Poulain  <bpoulain@apple.com>
265
266         Minor String fixes in CSS
267         https://bugs.webkit.org/show_bug.cgi?id=116291
268
269         Reviewed by Darin Adler.
270
271         Some trival changes to make up for a bad day :)
272
273         * css/CSSImageSetValue.cpp:
274         (WebCore::CSSImageSetValue::customCssText):
275         * css/CSSImageValue.cpp:
276         (WebCore::CSSImageValue::customCssText):
277         * css/CSSImportRule.cpp:
278         (WebCore::CSSImportRule::cssText):
279         * css/CSSInheritedValue.cpp:
280         (WebCore::CSSInheritedValue::customCssText):
281         * css/CSSInitialValue.cpp:
282         (WebCore::CSSInitialValue::customCssText):
283         * css/CSSPrimitiveValue.cpp:
284         (WebCore::CSSPrimitiveValue::customCssText):
285         * css/CSSPropertySourceData.cpp:
286         (WebCore::CSSPropertySourceData::toString):
287         * css/CSSSelector.cpp:
288         (WebCore::CSSSelector::selectorText):
289         * css/CSSStyleRule.cpp:
290         (WebCore::CSSStyleRule::generateSelectorText):
291         * css/CSSStyleSheet.h:
292         (WebCore::CSSStyleSheet::type):
293         * css/CSSTimingFunctionValue.cpp:
294         (WebCore::CSSLinearTimingFunctionValue::customCssText):
295         (WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
296         * css/CSSValueList.cpp:
297         (WebCore::CSSValueList::customCssText):
298         (WebCore::CSSValueList::customSerializeResolvingVariables):
299         * css/MediaQueryExp.cpp:
300         (WebCore::MediaQueryExp::serialize):
301         * css/WebKitCSSFilterValue.cpp:
302         (WebCore::WebKitCSSFilterValue::customCssText):
303         * css/WebKitCSSKeyframesRule.cpp:
304         (WebCore::StyleRuleKeyframes::findKeyframeIndex):
305         (WebCore::WebKitCSSKeyframesRule::cssText):
306         * css/WebKitCSSMatFunctionValue.cpp:
307         (WebCore::WebKitCSSMatFunctionValue::customCssText):
308         * css/WebKitCSSMixFunctionValue.cpp:
309         (WebCore::WebKitCSSMixFunctionValue::customCssText):
310
311 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
312
313         Null pointer deference in WebCore::AppendNodeCommand::create
314         https://bugs.webkit.org/show_bug.cgi?id=116479
315
316         Reviewed by Andreas Kling.
317         
318         Merge https://chromium.googlesource.com/chromium/blink/+/5cb43002a44f67a60ecf5a7ed76de2d0bcf89eb2
319
320         DeleteSelection::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss() make style and link elements
321         to be the direct children of the editable root. However, these style and link elements are not necessary editable
322         and WebKit crashes when they are not.
323
324         Test: editing/deleting/delete-uneditable-style.html
325
326         * editing/DeleteSelectionCommand.cpp:
327         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
328
329 2013-05-20  Beth Dakin  <bdakin@apple.com>
330
331         Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations() 
332         is set
333         https://bugs.webkit.org/show_bug.cgi?id=116493
334         -and corresponding-
335         <rdar://problem/13912871>
336
337         Reviewed by Dean Jackson.
338
339         We need to be more aggressive with our approach since AppKit may still ask the 
340         scrollbars to paint here.
341
342         scrollbarAnimationsAreSuppressed() will allow us to find out if the setting has 
343         been set.
344         * page/FrameView.cpp:
345         (WebCore::FrameView::scrollbarAnimationsAreSuppressed):
346         * page/FrameView.h:
347         * platform/ScrollableArea.h:
348         (WebCore::ScrollableArea::scrollbarAnimationsAreSuppressed):
349         * rendering/RenderLayer.cpp:
350         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
351         * rendering/RenderLayer.h:
352         (RenderLayer):
353         * rendering/RenderListBox.cpp:
354         (WebCore::RenderListBox::scrollbarAnimationsAreSuppressed):
355         * rendering/RenderListBox.h:
356
357         Don’t allow animations if scrollbars are suppressed.
358         * platform/mac/ScrollAnimatorMac.mm:
359         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
360
361         Call cancelAnimations() to prevent a just-started animation from continuing.
362         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
363
364 2013-05-20  Andreas Kling  <akling@apple.com>
365
366         Avoid caret repaints if we're not showing carets anyway.
367         <http://webkit.org/b/116489>
368
369         Reviewed by Simon Fraser.
370
371         When moving the selection, check if we're inside a contenteditable element (or in caret browsing mode)
372         before repainting the caret's previous location.
373
374         * editing/FrameSelection.cpp:
375         (WebCore::FrameSelection::recomputeCaretRect):
376
377 2013-05-20  Simon Fraser  <simon.fraser@apple.com>
378
379         position:sticky should stick for the enclosing overflow ancestor
380         https://bugs.webkit.org/show_bug.cgi?id=100054
381
382         Reviewed by Beth Dakin.
383         
384         Make position: -webkit-sticky be constrained by an enclosing ancestor
385         with non-visible overflow if there is one, rather than being constained
386         always by the viewport.
387
388         Test: fast/css/sticky/sticky-top-overflow.html
389
390         * rendering/RenderBoxModelObject.cpp:
391         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints): Rename
392         viewportRect to constrainingRect, since it isn't just about the viewport any more.
393         Fix an issue where just adding stickyLocation to absContainerFrame.location() was
394         incorrect when the container is scrolled; we also have to take the scroll offset
395         into account, and that offset is stored in the layer tree.
396         (WebCore::RenderBoxModelObject::stickyPositionOffset):
397         Look for an enclosing layer with overflow clipping, and, if found, use it to
398         compute the sticky constraint rect.
399         * rendering/RenderLayer.h: Add a helpful IncludeSelfOrNot, and fix several member functions
400         to use it place of hard-to-read boolean arguments.
401         Add enclosingOverflowClipLayer(IncludeSelfOrNot).
402         (WebCore::RenderLayer::ancestorCompositingLayer):
403         * rendering/RenderLayer.cpp:
404         (WebCore::RenderLayer::enclosingOverflowClipLayer): New function, finds the enclosing
405         layer with overflow clip.
406         (WebCore::RenderLayer::enclosingCompositingLayer): Use IncludeSelfOrNot.
407         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint): Ditto.
408         (WebCore::RenderLayer::enclosingFilterLayer): Ditto.
409         * rendering/RenderLayerCompositor.cpp:
410         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor): Use IncludeSelfOrNot.
411         (WebCore::isViewportConstrainedFixedOrStickyLayer): Renamed from isRootmostFixedOrStickyLayer
412         and moved up so we can use it in requiresCompositingForPosition().
413         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Only make sticky composited if
414         it's viewport-constrained.
415         (WebCore::RenderLayerCompositor::updateViewportConstraintStatus):
416         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Declare StickyPositionViewportConstraints
417         one line down to just before it gets used.
418
419 2013-05-20  Jeff Rogers  <jrogers@blackberry.com>
420
421         Remove DISABLE_ROUNDED_CORNER_CLIPPING
422         https://bugs.webkit.org/show_bug.cgi?id=115531
423
424         Reviewed by Andreas Kling.
425
426         BlackBerry port is no longer using this.
427
428         * rendering/RenderLayer.cpp:
429         (WebCore::inContainingBlockChain):
430         (WebCore::RenderLayer::clipToRect):
431
432 2013-05-20  Tim Horton  <timothy_horton@apple.com>
433
434         Clients should have a way to extend rendering suppression
435         https://bugs.webkit.org/show_bug.cgi?id=116463
436         <rdar://problem/13738496>
437
438         Reviewed by Andy Estes.
439
440         * WebCore.exp.in:
441         Export FrameView::setVisualUpdatesAllowedByClient.
442
443         * dom/Document.cpp:
444         (WebCore::Document::setVisualUpdatesAllowed):
445         Move rendering-suppression watchdog into setVisualUpdatesAllowed(bool).
446         setVisualUpdatesAllowed(ReadyState) should not re-enable visual updates
447         if the client is itself disabling visual updates.
448
449         (WebCore::Document::visualUpdatesSuppressionTimerFired):
450         If the watchdog fires and the client is still disabling visual
451         updates, we should not re-enable visual updates, but instead
452         wait for the client.
453
454         (WebCore::Document::setVisualUpdatesAllowedByClient):
455         Actually re-enable visual updates if we deferred the re-enabling above
456         (when the page finishes loading, but the client had them disabled).
457
458         * dom/Document.h:
459         (Document): Add setVisualUpdatesAllowedByClient.
460         * page/FrameView.cpp:
461         (WebCore::FrameView::FrameView): Visual updates are allowed by default.
462         (WebCore::FrameView::setVisualUpdatesAllowedByClient):
463         Forward through to the document, but we also need to persist the state
464         here in FrameView so that it survives through navigation.
465
466         * page/FrameView.h:
467         (WebCore::FrameView::setVisualUpdatesAllowedByClient): Added.
468         (WebCore::FrameView::visualUpdatesAllowedByClient): Added.
469         Added storage for m_visualUpdatesAllowedByClient.
470
471 2013-05-20  Hans Muller  <hmuller@adobe.com>
472
473         [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values
474         https://bugs.webkit.org/show_bug.cgi?id=116349
475
476         Reviewed by Alexandru Chiculita.
477
478         Add support for parsing image URI values for the shape-inside and shape-outside CSS properties.
479         Extended the ExclusionShapeValue class to support tracking the property's StyleImage value.
480
481         The ExclusionShapeValue::type enums were changed from all upper case to "Intercase" by order
482         of the style bot.
483
484         The existing CSS parsing tests were extended to check URI values.
485
486         * css/CSSComputedStyleDeclaration.cpp:
487         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
488         * css/CSSParser.cpp:
489         (WebCore::CSSParser::parseValue):
490         * css/DeprecatedStyleBuilder.cpp:
491         (WebCore::ApplyPropertyExclusionShape::applyValue):
492         * css/StyleResolver.cpp:
493         (WebCore::StyleResolver::loadPendingImages):
494         * rendering/style/ExclusionShapeValue.h:
495         (WebCore::ExclusionShapeValue::createImageValue):
496         (ExclusionShapeValue):
497         (WebCore::ExclusionShapeValue::image):
498         (WebCore::ExclusionShapeValue::setImage):
499         (WebCore::ExclusionShapeValue::ExclusionShapeValue):
500
501 2013-05-20  Radu Stavila  <stavila@adobe.com>
502
503         [CSSRegions] Fix offsetLeft / offsetTop for elements inside named flow
504         https://bugs.webkit.org/show_bug.cgi?id=115899
505
506         Reviewed by David Hyatt.
507
508         Elements in named flows that have the body as their offsetParent, need to compute their
509         offsetLeft and offsetTop values relative to the body.
510
511         Tests: fast/regions/offsetLeft-offsetTop-in-multiple-regions.html
512                fast/regions/offsetLeft-offsetTop-in-region-absolute-sticky-fixed.html
513                fast/regions/offsetLeft-offsetTop-in-region-float-vert-rl.html
514                fast/regions/offsetLeft-offsetTop-in-region-float.html
515                fast/regions/offsetLeft-offsetTop-inlines-region-in-element.html
516
517         * rendering/RenderBoxModelObject.cpp:
518         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
519         * rendering/RenderFlowThread.cpp:
520         (WebCore):
521         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
522         * rendering/RenderFlowThread.h:
523
524 2013-05-20  Zoltan Horvath  <zoltan@webkit.org>
525
526         [CSS Regions][CSS Exclusions] shape-inside on regions should respect positioned shapes and overflow
527         https://bugs.webkit.org/show_bug.cgi?id=116252
528
529         Reviewed by David Hyatt.
530
531         Regions should respect shape-inside properties which have specified top offset. Since the content which overflows from the
532         shape should be pushed after the content box (for details check out r148975), I implemented  overflowthe behavior for simple
533         cases when you have only one region. I'm going to implement it for additional regions in a follow up patch.
534
535         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-basic-overflow-shape-top-offset.html
536                fast/regions/shape-inside/shape-inside-on-regions-inline-content-basic-overflow-shape-top-offset.html
537
538         * rendering/RenderBlockLineLayout.cpp:
539         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Handle the flow thread case, push the overflowing content after the
540         content box. Respect existing shape-inside on region tests.
541         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Set the correct logical top position for the shape-inside in
542         the case of regions. Respect the region's margins and paddings.
543
544 2013-05-20  Darin Adler  <darin@apple.com>
545
546         Remove custom binding for the Clipboard clearData function
547         https://bugs.webkit.org/show_bug.cgi?id=116421
548
549         Reviewed by Andreas Kling.
550
551         * bindings/js/JSClipboardCustom.cpp: Removed the clearData binding.
552
553         * dom/Clipboard.idl: Removed [Custom].
554
555         * dom/Clipboard.cpp:
556         (WebCore::Clipboard::clearData): Renamed from clearAllData.
557         * dom/Clipboard.h: Rename clearAllData to clearData so we just use
558         overloading for the one with and without a MIME type.
559         * platform/ios/ClipboardIOS.h: Rename clearAllData to clearData.
560         * platform/ios/ClipboardIOS.mm:
561         (WebCore::ClipboardIOS::clearData): Ditto.
562         * platform/qt/ClipboardQt.cpp:
563         (WebCore::ClipboardQt::clearData). Ditto.
564         * platform/qt/ClipboardQt.h: Ditto.
565         * platform/win/ClipboardWin.cpp:
566         (WebCore::ClipboardWin::clearData): Ditto.
567         * platform/win/ClipboardWin.h: Ditto.
568
569 2013-05-20  Eric Carlson  <eric.carlson@apple.com>
570
571         [iOS] media/event-queue-crash.html ASSERTs in notifyChildInserted
572         https://bugs.webkit.org/show_bug.cgi?id=116444
573
574         Reviewed by Jer Noble.
575
576         No new tests, covered by existing tests.
577
578         * html/HTMLMediaElement.cpp:
579         (WebCore::HTMLMediaElement::configureMediaControls): Only create media controls when the
580             element is in a Document.
581
582 2013-05-20  Antoine Quint  <graouts@apple.com>
583
584         [Mac] captions menu should behave more like a menu
585         https://bugs.webkit.org/show_bug.cgi?id=116436
586
587         Reviewed by Eric Carlson.
588
589         Let the captions menu behave more like a native Mac menu by hiding it when
590         clicking anywhere on the page and preventing the page from scrolling when
591         attempting to scroll the captions menu when it cannot scroll in the requested
592         direction.
593
594         Test: media/video-controls-captions-trackmenu-hide-on-click-outside.html
595
596         * dom/EventListener.h:
597         Add the new MediaControlsAppleEventListenerType.
598
599         * html/shadow/MediaControlsApple.cpp:
600         (WebCore::MediaControlsApple::defaultEventHandler):
601         (WebCore::MediaControlsApple::hide):
602         (WebCore::MediaControlsApple::makeTransparent):
603         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility):
604         (WebCore::MediaControlsApple::reportedError):
605         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList):
606         Use the hideClosedCaptionTrackList() and showClosedCaptionTrackList()
607         methods to hide and show the captions menu instead of calling hide()
608         and show() directly on m_closedCaptionsContainer.
609
610         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
611         Show the m_closedCaptionsContainer and register a "mousewheel" event
612         listener on it as well as a "click" event listener on the entire document.
613
614         (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
615         Hide the m_closedCaptionsContainer and remove the "mousewheel" event
616         listener on it as well as the "click" event listener on the entire document.
617
618         (WebCore::MediaControlsApple::shouldClosedCaptionsContainerPreventPageScrolling):
619         New private utility to determine whether the m_closedCaptionsContainer can scroll
620         in the provided scroll direction.
621
622         (WebCore::MediaControlsApple::eventListener):
623         Obtain the event listener used for "mousewheel" and "click" event handlers.
624
625         (WebCore::MediaControlsAppleEventListener::handleEvent):
626         Event handler for the "mousewheel" and "click" events. If we get a "click" event, we
627         toggle the captions menu visibility and if we get a "mousewheel" event, we call into
628         shouldClosedCaptionsContainerPreventPageScrolling() to see if we can scroll in the
629         current scroll direction, and if not prevent the event from resulting in a scroll by
630         calling preventDefault().
631
632         (WebCore::MediaControlsAppleEventListener::operator==):
633         Required for the successful subclassing of EventListener.
634
635         * html/shadow/MediaControlsApple.h:
636         (MediaControlsAppleEventListener):
637         (WebCore::MediaControlsAppleEventListener::create):
638         (WebCore::MediaControlsAppleEventListener::cast):
639         (WebCore::MediaControlsAppleEventListener::MediaControlsAppleEventListener):
640         New subclass of EventListener required to provide a custom event listener for the
641         "mousewheel" and "click" events registered in showClosedCaptionTrackList() and
642         hideClosedCaptionTrackList().
643
644 2013-05-18  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
645
646         [Cairo] Canvas-shadow behavior is not being as expected
647         https://bugs.webkit.org/show_bug.cgi?id=108897
648
649         Reviewed by Martin Robinson.
650
651         ShadowBlur::endShadowLayer copies the image from shadowContext to cairoContext.
652         CairoContext-path should be empty for doing this copy. Otherwise, the 
653         original-image area will also get filled with the shadow.
654
655         Test: fast/canvas/canvas-image-shadow.html
656
657         * platform/graphics/cairo/GraphicsContextCairo.cpp:
658         (WebCore::drawPathShadow):
659
660 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
661
662         -webkit-text-underline-position should not be inherited
663         https://bugs.webkit.org/show_bug.cgi?id=116363
664
665         Reviewed by Dean Jackson.
666
667         Specification says text-underline-position should not be inherited.
668
669         No new tests, this updates existing tests.
670
671         * css/CSSProperty.cpp:
672         (WebCore::CSSProperty::isInheritedProperty): Make
673         CSSPropertyWebkitTextUnderlinePosition return false.
674         * rendering/style/RenderStyle.h: Treat TextUnderlinePosition as
675         non-inherited.
676         * rendering/style/StyleRareInheritedData.cpp:
677         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
678         (WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.
679         * rendering/style/StyleRareInheritedData.h:
680         (StyleRareInheritedData):
681         * rendering/style/StyleRareNonInheritedData.cpp:
682         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
683         (WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.
684         * rendering/style/StyleRareNonInheritedData.h:
685         (StyleRareNonInheritedData):
686
687 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
688
689         Add compile asserts for the size of RootInlineBox and InlineTextbox
690         https://bugs.webkit.org/show_bug.cgi?id=116337
691
692         Reviewed by Darin Adler.
693
694         Add compile asserts to ensure RootInlineBox and InlineTextbox stay small.
695
696         * rendering/InlineTextBox.cpp:
697         (SameSizeAsInlineTextBox):
698         (WebCore):
699         * rendering/RootInlineBox.cpp:
700         (SameSizeAsRootInlineBox):
701         (WebCore):
702
703 2013-05-20  Xan Lopez  <xlopez@igalia.com>
704
705         [BlackBerry] LocalizedStringsBlackBerry: add dummy text track strings
706         https://bugs.webkit.org/show_bug.cgi?id=116300
707
708         Reviewed by Rob Buis.
709
710         These are dummy implementations necessary to make WebKit link.
711
712         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
713         (WebCore::weekFormatInLDML):
714         (WebCore):
715         (WebCore::textTrackClosedCaptionsText):
716         (WebCore::textTrackSubtitlesText):
717         (WebCore::textTrackOffText):
718         (WebCore::textTrackNoLabelText):
719
720 2013-05-19  Darin Adler  <darin@apple.com>
721
722         [Mac] Improve string use in PasteboardMac
723         https://bugs.webkit.org/show_bug.cgi?id=116418
724
725         Reviewed by Sam Weinig.
726
727         Did a Ben Poulain all over this file.
728
729         * platform/mac/PasteboardMac.mm:
730         (WebCore::Pasteboard::plainText): Add the newline separately to the string builder.
731         Prepending it to the string first just does more allocations for no good reason.
732         (WebCore::Pasteboard::documentFragment): Use emptyString() instead of "" and use
733         ASCIILiteral where appropriate.
734         (WebCore::cocoaTypeFromHTMLClipboardType): More ASCIILiteral.
735         (WebCore::Pasteboard::clear): Use early return instead of a nested if here.
736         Use emptyString() instead of "".
737         (WebCore::addHTMLClipboardTypesForCocoaType): More ASCIILiteral.
738
739 2013-05-19  Anders Carlsson  <andersca@apple.com>
740
741         Remove link prerendering code
742         https://bugs.webkit.org/show_bug.cgi?id=116415
743
744         Reviewed by Darin Adler.
745
746         * Configurations/FeatureDefines.xcconfig:
747         * GNUmakefile.list.am:
748         * Target.pri:
749         * WebCore.vcproj/WebCore.vcproj:
750         * WebCore.vcxproj/WebCore.vcxproj:
751         * WebCore.vcxproj/WebCore.vcxproj.filters:
752         * WebCore.xcodeproj/project.pbxproj:
753         * dom/Document.cpp:
754         (WebCore::Document::Document):
755         * dom/Document.h:
756         (WebCore):
757         (Document):
758         * dom/EventNames.h:
759         (WebCore):
760         * html/HTMLLinkElement.cpp:
761         * html/HTMLLinkElement.h:
762         * html/LinkRelAttribute.cpp:
763         (WebCore::LinkRelAttribute::LinkRelAttribute):
764         * html/LinkRelAttribute.h:
765         (LinkRelAttribute):
766         * loader/LinkLoader.cpp:
767         (WebCore::LinkLoader::~LinkLoader):
768         (WebCore::LinkLoader::loadLink):
769         (WebCore::LinkLoader::released):
770         * loader/LinkLoader.h:
771         (WebCore):
772         (LinkLoader):
773         * loader/LinkLoaderClient.h:
774         (LinkLoaderClient):
775         * loader/Prerenderer.cpp: Removed.
776         * loader/Prerenderer.h: Removed.
777         * loader/PrerendererClient.cpp: Removed.
778         * loader/PrerendererClient.h: Removed.
779         * platform/PrerenderClient.h: Removed.
780         * platform/PrerenderHandle.h: Removed.
781
782 2013-05-19  Simon Fraser  <simon.fraser@apple.com>
783
784         Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot"
785         https://bugs.webkit.org/show_bug.cgi?id=116417
786
787         Reviewed by Sam Weinig.
788         
789         PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when
790         FrameView::setNodeToDraw() has been called and is used to restrict painting to
791         some part of the subtree, but it could easily be misinterpreted, and confused with
792         the "rootLayer" used by RenderLayer (which is usually not the layer associated with
793         the paintingRoot).
794         
795         Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the
796         purpose of this variable more obvious.
797
798         No behavior change.
799
800         * page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should
801         be called setSubtreePaintRoot() or something. Not done in this patch to avoid
802         risk; this function is exported from WebCore.
803         * rendering/InlineFlowBox.cpp:
804         (WebCore::InlineFlowBox::paint):
805         * rendering/PaintInfo.h:
806         (WebCore::PaintInfo::PaintInfo):
807         (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
808         (WebCore::PaintInfo::shouldPaintWithinRoot):
809         * rendering/RenderBlock.cpp:
810         (WebCore::RenderBlock::paintContents):
811         * rendering/RenderBox.cpp:
812         (WebCore::RenderBox::paint):
813         * rendering/RenderLayer.cpp:
814         (WebCore::RenderLayer::paint):
815         (WebCore::RenderLayer::paintOverlayScrollbars):
816         (WebCore::RenderLayer::paintLayerContents):
817         (WebCore::RenderLayer::paintLayerByApplyingTransform):
818         (WebCore::RenderLayer::paintBackgroundForFragments):
819         (WebCore::RenderLayer::paintForegroundForFragments):
820         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
821         (WebCore::RenderLayer::paintOutlineForFragments):
822         (WebCore::RenderLayer::paintMaskForFragments):
823         * rendering/RenderLayer.h:
824         (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
825         * rendering/RenderObject.cpp: Add a comment to recommend changing the name of
826         paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid
827         risk; this function is exported from WebCore.
828         * rendering/RenderSnapshottedPlugIn.cpp:
829         (WebCore::RenderSnapshottedPlugIn::paint):
830         * rendering/RenderTable.cpp:
831         (WebCore::RenderTable::paintObject):
832         * rendering/svg/RenderSVGContainer.cpp:
833         (WebCore::RenderSVGContainer::paint):
834
835 2013-05-19  Darin Adler  <darin@apple.com>
836
837         Use Element instead of Node in DragState, also redo DragState struct
838         https://bugs.webkit.org/show_bug.cgi?id=116411
839
840         Reviewed by Sam Weinig.
841
842         The drag source is an element, so use RefPtr<Element> instead of RefPtr<Node>.
843
844         Also, the entire drag state is about dragging, so no need for the word "drag" in the
845         name of its members. Also, it's a struct, so the members don't need m_ prefixes.
846
847         * page/DragController.cpp: Removed unneeded include of Node.h since it's included by
848         Element.h, which is also included.
849         (WebCore::DragController::draggableElement): Renamed from Node to Element and changed
850         the types and names of arguments accordingly. Also made this function handle a
851         startElement of 0 so callers don't need to. Also updated for changes to DragState members.
852         (WebCore::DragController::startDrag): Updated for changes to DragState members.
853         Since dragSource can only be an element, was able to get rid of isElementNode checks.
854
855         * page/DragController.h: Fixed style of forward declarations of structs. Updated for
856         change of draggableNode to draggableElement. Also removed declarations of nonexistent
857         selectionDraggingRect and doDrag functions.
858
859         * page/DragState.h: Rewrote practically this whole header. Added an include of Element
860         instead of Node since that's what we use now. Removed includes that are redundant.
861         There's no problem copying a DragState, so removed WTF_MAKE_NONCOPYABLE. There's no need
862         to allocate a DragState on the heap, so removed WTF_MAKE_FAST_ALLOCATED. The event dispatch
863         boolean is never set to a constant, so there's no need for a policy enum; it can just be
864         a boolean. Removed the "m_" prefixes from the struct members, since this is a struct with
865         public members and we don't use the prefix in those cases. Removed the word "drag" from the
866         struct member names since this entire struct is about dragging and has drag in its name.
867         Left the comments mostly intact, even though I'm not certain of their value.
868
869         * page/EventHandler.cpp:
870         (WebCore::EventHandler::handleMousePressEvent): Updated for changes to DragState.
871         (WebCore::EventHandler::eventMayStartDrag):
872         Use innerElement instead of innerNode to call draggableElement instead of draggableNode.
873         (WebCore::EventHandler::updateDragAndDrop): Updated for changes to DragState.
874         (WebCore::EventHandler::cancelDragAndDrop): Ditto.
875         (WebCore::EventHandler::handleWheelEvent): Added FIXME.
876         (WebCore::EventHandler::dragHysteresisExceeded): Updated for changes to DragState.
877         (WebCore::EventHandler::freeClipboard): Updated for changes to DragState. Also re-added
878         code to release the clipboard object, which is needed here to avoid keeping it around in
879         memory until the next drag.
880         (WebCore::EventHandler::dragSourceEndedAt): Updated for changes to DragState.
881         (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Ditto.
882         (WebCore::EventHandler::dispatchDragSrcEvent): Ditto.
883         (WebCore::EventHandler::handleDrag): Updated for changes to DragState. Use innerElement
884         instead of innerNode to call draggableElement instead of draggableNode. No longer need to
885         null check innerElement because draggableElement does that. Removed unneeded else that was
886         setting m_dragSrc to zero since it's guaranteed to already be zero.
887
888 2013-05-19  Anders Carlsson  <andersca@apple.com>
889
890         Remove ChromeClient::webView()
891         https://bugs.webkit.org/show_bug.cgi?id=116054
892
893         Reviewed by Darin Adler.
894
895         This blatantly horrible layer violation was only used to know if a ChromeClient is an empty
896         client or not. We already have a (slightly less horrible) way to do that.
897
898         * loader/EmptyClients.h:
899         * page/ChromeClient.h:
900         (ChromeClient):
901
902 2013-05-19  Darin Adler  <darin@apple.com>
903
904         Eliminate the Editor::newGeneralClipboard function
905         https://bugs.webkit.org/show_bug.cgi?id=116410
906
907         Reviewed by Andreas Kling.
908
909         This is one of the clean-ups made possible by the changes to the DOM clipboard class.
910         I had been waiting until all the platforms were moved over to it, but it turns out to be
911         easy to do this now, just with #ifdefs.
912
913         * PlatformBlackBerry.cmake: Deleted EditorBlackBerry.cpp.
914
915         * editing/Editor.cpp:
916         (WebCore::Editor::dispatchCPPEvent): Call Clipboard::createForCopyAndPaste directly when
917         using the new version of the Clipboard class. Also some small style cleanup nearby.
918
919         * editing/blackberry/EditorBlackBerry.cpp: Removed. The only function in this file was
920         newGeneralClipboard.
921
922         * editing/mac/EditorMac.mm: Deleted newGeneralClipboard.
923         * platform/efl/ClipboardEfl.cpp: Ditto.
924         * platform/gtk/ClipboardGtk.cpp: Ditto.
925
926 2013-05-19  Martin Robinson  <mrobinson@igalia.com>
927
928         GtkSelectionData length is off by one
929         https://bugs.webkit.org/show_bug.cgi?id=113962
930
931         Reviewed by Anders Carlsson.
932
933         No new tests. Since drag data is interpreted as a null-terminated string
934         this is difficult to test with a C program and we have no infrastructure
935         built for using GIR tests.
936
937         * platform/gtk/PasteboardHelper.cpp:
938         (WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
939         character in the paste data length, just include the string. This matches the behavior
940         of Firefox.
941
942 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
943
944         Hoist several chunks of code at the top of RenderLayer::paintLayerContents() onto new functions
945         https://bugs.webkit.org/show_bug.cgi?id=116406
946
947         Reviewed by Andreas Kling.
948         
949         RenderLayer::paintLayerContents() was getting polluted with code related to filters,
950         clipping and font subpixel quantization, and hard to follow.
951         
952         Move three hunks of code into new functions:
953         setupFontSubpixelQuantization() now contains the code related to whether we disable
954         font subpixel quantization on the context.
955         setupClipPath() now contains code related to clipping to shapes and references.
956         setupFilters() and applyFilters() contain code related to CSS filters.
957         
958         As part of this, the interaction with FilterEffectRendererHelper was simplified.
959         It was convenient for setupFilters() to return a FilterEffectRendererHelper object
960         if successful, so we use an OwnPtr<FilterEffectRendererHelper> now. In addition,
961         the GraphicsContext swapping was moved from FilterEffectRendererHelper code into RenderLayer
962         to make it easier to follow. FilterEffectRendererHelper no longer holds on to
963         the old GraphicsContext.
964
965         No behavior change.
966
967         * rendering/FilterEffectRenderer.cpp:
968         (WebCore::FilterEffectRendererHelper::filterContext):
969         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
970         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
971         * rendering/FilterEffectRenderer.h:
972         (WebCore::FilterEffectRendererHelper::FilterEffectRendererHelper):
973         (WebCore::FilterEffectRendererHelper::hasStartedFilterEffect):
974         (FilterEffectRendererHelper):
975         * rendering/RenderLayer.cpp:
976         (WebCore::RenderLayer::setupFontSubpixelQuantization):
977         (WebCore::RenderLayer::setupClipPath):
978         (WebCore::RenderLayer::setupFilters):
979         (WebCore::RenderLayer::applyFilters):
980         (WebCore::RenderLayer::paintLayerContents):
981         * rendering/RenderLayer.h:
982
983 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
984
985         Refactor RenderStyle::diff()
986         https://bugs.webkit.org/show_bug.cgi?id=116397
987
988         Reviewed by Andreas Kling.
989         
990         RenderStyle::diff() was prone to being changed incorrectly, since there was
991         a poorly documented ordering requirement: style changes that cause layout
992         have to be detected before those that cause only repainting.
993         
994         In addition, the existing code made it impossible to separately ask whether
995         a given style change requires a repaint, if we've already detected that it
996         requires a positioned-movement-only layout.
997         
998         Fix by factoring the code into member functions that check for each type
999         of style change.
1000         
1001         No behavior change.
1002
1003         * rendering/style/RenderStyle.cpp:
1004         (WebCore::positionChangeIsMovementOnly):
1005         (WebCore::RenderStyle::changeRequiresLayout):
1006         (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
1007         (WebCore::RenderStyle::changeRequiresLayerRepaint):
1008         (WebCore::RenderStyle::changeRequiresRepaint):
1009         (WebCore::RenderStyle::changeRequiresRepaintIfText):
1010         (WebCore::RenderStyle::changeRequiresRecompositeLayer):
1011         (WebCore::RenderStyle::diff):
1012         * rendering/style/RenderStyle.h:
1013
1014 2013-05-18  Anders Carlsson  <andersca@apple.com>
1015
1016         Simplify the StorageArea setter functions
1017         https://bugs.webkit.org/show_bug.cgi?id=116402
1018
1019         Reviewed by Sam Weinig.
1020
1021         Move more security checking code to Storage so more code can be shared between WebKit1 and WebKit2.
1022
1023         * inspector/InspectorDOMStorageAgent.cpp:
1024         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
1025         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
1026         * storage/Storage.cpp:
1027         (WebCore::Storage::setItem):
1028         (WebCore::Storage::removeItem):
1029         (WebCore::Storage::clear):
1030         * storage/StorageArea.h:
1031         (StorageArea):
1032         * storage/StorageAreaImpl.cpp:
1033         (WebCore::StorageAreaImpl::setItem):
1034         (WebCore::StorageAreaImpl::removeItem):
1035         (WebCore::StorageAreaImpl::clear):
1036         * storage/StorageAreaImpl.h:
1037         (StorageAreaImpl):
1038
1039 2013-05-18  Anders Carlsson  <andersca@apple.com>
1040
1041         Simplify StorageArea getter functions
1042         https://bugs.webkit.org/show_bug.cgi?id=116399
1043
1044         Reviewed by Sam Weinig.
1045
1046         Move the security and private browsing checks from StorageArea to Storage so we can share
1047         more code between WebKit1 and WebKit2.
1048
1049         * inspector/InspectorDOMStorageAgent.cpp:
1050         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
1051         Update to new StorageArea interface. The security checks are unnecessary here anyway because
1052         InspectorDOMStorageAgent::findStorageArea will only return a StorageArea that can be accessed
1053         by the frame's security origin.
1054         
1055         * storage/Storage.cpp:
1056         (WebCore::Storage::key):
1057         (WebCore::Storage::getItem):
1058         (WebCore::Storage::contains):
1059         * storage/StorageArea.h:
1060         (StorageArea):
1061         * storage/StorageAreaImpl.cpp:
1062         (WebCore::StorageAreaImpl::key):
1063         (WebCore::StorageAreaImpl::item):
1064         (WebCore::StorageAreaImpl::contains):
1065         * storage/StorageAreaImpl.h:
1066         (StorageAreaImpl):
1067
1068 2013-05-17  Simon Fraser  <simon.fraser@apple.com>
1069
1070         Garbage on page background while http://canberraballoons.com.au is loading
1071         https://bugs.webkit.org/show_bug.cgi?id=116384
1072         <rdar://problem/13930328>
1073
1074         Reviewed by Dan Bernstein.
1075
1076         This page loads a large JPEG image as the body background.
1077         ImageSource::frameHasAlphaAtIndex() always claims that JPEG images
1078         are opaque, but this isn't true if the frame is only partially loaded.
1079         However, this would cause FillLayer::hasOpaqueImage() to report that the
1080         background image is opaque, so we'd skip painting the background color.
1081         Unpainted content in an opaque layer results in garbage.
1082         
1083         Fix by having ImageSource::frameHasAlphaAtIndex() always return true
1084         for frames that are not complete. When the image load completes, we
1085         recompute metadata and correctly determine that the frame is opaque.
1086
1087         * platform/graphics/cg/ImageSourceCG.cpp:
1088         (WebCore::ImageSource::frameHasAlphaAtIndex):
1089
1090 2013-05-18  Timothy Hatcher  <timothy@apple.com>
1091
1092         Simplify EventLoop::cycle() on Mac.
1093
1094         https://webkit.org/b/116392
1095
1096         Reviewed by Anders Carlsson.
1097
1098         * platform/mac/EventLoopMac.mm:
1099         (WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
1100
1101 2013-05-18  Andreas Kling  <akling@apple.com>
1102
1103         Use CSSParserSelector::appendTagHistory() from CSS grammar.
1104         <http://webkit.org/b/116382>
1105
1106         Reviewed by Antti Koivisto.
1107
1108         CSSParserSelector already knows how to append another component to itself,
1109         no need to duplicate that logic in the grammar.
1110
1111         * css/CSSGrammar.y.in:
1112
1113 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
1114
1115         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
1116         https://bugs.webkit.org/show_bug.cgi?id=114554
1117
1118         Reviewed by Gyuyoung Kim.
1119
1120         Using variables as target names is very uncommon in CMake.
1121         The usual way to specify the name of the resulting binary
1122         is to set the OUTPUT_NAME target property.
1123
1124         * CMakeLists.txt:
1125
1126 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1127
1128         [GTK] Move GTK port off legacy clipboard
1129         https://bugs.webkit.org/show_bug.cgi?id=116221
1130
1131         Reviewed by Martin Robinson.
1132
1133         Merge clipboard methods into PasteboardGtk that now wraps a
1134         DataObjectGtk.
1135
1136         * GNUmakefile.list.am: Remove ClipboardGtk.h.
1137         * dom/Clipboard.h: Remove GTK from the list of ports using legacy
1138         clipboard.
1139         * page/gtk/EventHandlerGtk.cpp:
1140         (WebCore::EventHandler::createDraggingClipboard): Use
1141         Clipboard::createForDragAndDrop().
1142         * platform/Pasteboard.h:
1143         (Pasteboard):
1144         * platform/gtk/ClipboardGtk.cpp:
1145         (WebCore::Editor::newGeneralClipboard): Use
1146         Clipboard::createForCopyAndPaste().
1147         (WebCore::Clipboard::createDragImage):
1148         (WebCore::Clipboard::declareAndWriteDragImage):
1149         * platform/gtk/ClipboardGtk.h: Removed.
1150         * platform/gtk/DragDataGtk.cpp:
1151         * platform/gtk/PasteboardGtk.cpp:
1152         (WebCore::Pasteboard::create): Create a new Pasteboard for a given
1153         GtkClipboard or DataObjectGtk.
1154         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard
1155         for the GDK_SELECTION_CLIPBOARD clipboard.
1156         (WebCore::Pasteboard::createPrivate): Create a Pasteboard without
1157         a GtkClipboard associated.
1158         (WebCore::Pasteboard::createForDragAndDrop): Create a Pasteboard
1159         for drag and drop operations.
1160         (WebCore::selectionClipboard): Return a static Pasteboard for the
1161         GDK_SELECTION_CLIPBOARD clipboard.
1162         (WebCore::primaryClipboard): Return a static Pasteboard for the
1163         GDK_SELECTION_PRIMARY clipboard.
1164         (WebCore::Pasteboard::generalPasteboard): Return
1165         selectionClipboard() or primaryClipboard() depending on whether
1166         primary selection clipboard is the active one or not.
1167         (WebCore::Pasteboard::Pasteboard):
1168         (WebCore::Pasteboard::~Pasteboard):
1169         (WebCore::Pasteboard::dataObject): Return the wrapped DataObjectGtk.
1170         (WebCore::dataObjectTypeFromHTMLClipboardType): Copied from
1171         ClipboardGtk.cpp.
1172         (WebCore::Pasteboard::writeString): Adapted to upate the wrapped
1173         DataObjectGtk and the GtkClipboard if needed.
1174         (WebCore::Pasteboard::writeSelection): Ditto.
1175         (WebCore::Pasteboard::writePlainText): Ditto.
1176         (WebCore::Pasteboard::writeURL): Ditto.
1177         (WebCore::Pasteboard::writeImage): Ditto.
1178         (WebCore::Pasteboard::writePasteboard): Copy the wrapped
1179         DataObjectGtk from the DataObjectGtk of the given Pasteboard and
1180         upsate the GtkClipboard if needed.
1181         (WebCore::Pasteboard::clear): Copied from ClipboardGtk.cpp.
1182         (WebCore::Pasteboard::canSmartReplace): Check if current
1183         GtkClipboard supports smart replace.
1184         (WebCore::Pasteboard::setDragImage):
1185         (WebCore::Pasteboard::documentFragment): Adapted to use the
1186         wrapped DataObjectGtk reading from the current GtkClipboard if
1187         present.
1188         (WebCore::Pasteboard::plainText): Ditto.
1189         (WebCore::Pasteboard::hasData): Copied from ClipboardGtk.cpp.
1190         (WebCore::Pasteboard::types): Ditto.
1191         (WebCore::Pasteboard::readString): Ditto.
1192         (WebCore::Pasteboard::readFilenames): Ditto.
1193
1194 2013-05-18  Alberto Garcia  <agarcia@igalia.com>
1195
1196         [GTK] Parallel build fails if gtk-doc is enabled
1197         https://bugs.webkit.org/show_bug.cgi?id=116227
1198
1199         Reviewed by Martin Robinson.
1200
1201         * GNUmakefile.am:
1202         Don't overwrite noinst_DATA, modify its existing value instead.
1203
1204 2013-05-17  Michelangelo De Simone  <michelangelo@webkit.org>
1205
1206         CSSParser parsing of CSSPropertyFontStretch falls into CSSPropertyGeometry
1207         https://bugs.webkit.org/show_bug.cgi?id=116370
1208
1209         CSSPropertyFontStretch mistakenly fell through the shader parsing logic.
1210
1211         Reviewed by Alexandru Chiculita.
1212
1213         No new test possible, the feature is not implemented nor exposed.
1214
1215         * css/CSSParser.cpp:
1216         (WebCore::CSSParser::parseValue):
1217
1218 2013-05-17  Timothy Hatcher  <timothy@apple.com>
1219
1220         Force the script debug server to continue when disabling the debugger.
1221
1222         There might be some cases where the debugger will stay in the nested run loop
1223         which cause weird issues.
1224
1225         Speculative fix for: https://webkit.org/b/111438
1226
1227         Reviewed by Joseph Pecoraro.
1228
1229         * inspector/InspectorDebuggerAgent.cpp:
1230         (WebCore::InspectorDebuggerAgent::disable):
1231
1232 2013-05-16  Darin Adler  <darin@apple.com>
1233
1234         [BlackBerry] Get BlackBerry port off legacy clipboard
1235         https://bugs.webkit.org/show_bug.cgi?id=116287
1236
1237         Reviewed by Rob Buis.
1238
1239         * PlatformBlackBerry.cmake: Removed ClipboardBlackBerry.cpp.
1240
1241         * dom/Clipboard.h: Removed BLACKBERRY from the list of platforms that
1242         use the legacy clipboard.
1243
1244         * editing/blackberry/EditorBlackBerry.cpp:
1245         (WebCore::Editor::newGeneralClipboard): Changed to just create a copy
1246         and paste clipboard.
1247
1248         * page/blackberry/EventHandlerBlackBerry.cpp: Removed a drag-related
1249         function that wasn't doing any good.
1250
1251         * platform/blackberry/ClipboardBlackBerry.cpp: Removed.
1252         * platform/blackberry/ClipboardBlackBerry.h: Removed.
1253
1254         * platform/blackberry/PasteboardBlackBerry.cpp:
1255         (WebCore::Pasteboard::createForCopyAndPaste): Added.
1256         (WebCore::Pasteboard::createPrivate): Added.
1257         (WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardBlackBerry.cpp.
1258         (WebCore::Pasteboard::clear): Ditto.
1259         (WebCore::Pasteboard::readString): Ditto.
1260         (WebCore::Pasteboard::writeString): Ditto.
1261         (WebCore::Pasteboard::types): Ditto.
1262         (WebCore::Pasteboard::readFilenames): Ditto.
1263
1264 2013-05-17  Andreas Kling  <akling@apple.com>
1265
1266         Ads on theverge.com cause repaints when hovered, even though content doesn't visibly change.
1267         <http://webkit.org/b/116344>
1268
1269         Reviewed by Darin Adler.
1270
1271         Teach RenderStyle::diff() to ignore differences in the outline value if both styles have non-visible outlines.
1272
1273         * rendering/style/RenderStyle.cpp:
1274         (WebCore::RenderStyle::diff):
1275         * rendering/style/StyleBackgroundData.cpp:
1276         (WebCore::StyleBackgroundData::isEquivalentForPainting):
1277         * rendering/style/StyleBackgroundData.h:
1278         (StyleBackgroundData):
1279
1280 2013-05-17  Andreas Kling  <akling@apple.com>
1281
1282         Plug leak in CSSSelectorList::deleteSelectors().
1283         <http://webkit.org/b/116371>
1284         <rdar://problem/13930698>
1285
1286         Reviewed by Ryosuke Niwa.
1287
1288         Don't forget to destroy the very last selector in the list.
1289
1290         * css/CSSSelectorList.cpp:
1291         (WebCore::CSSSelectorList::deleteSelectors):
1292
1293 2013-05-17  Anders Carlsson  <andersca@apple.com>
1294
1295         Share code between WebKit1 and WebKit2 StorageArea subclasses
1296         https://bugs.webkit.org/show_bug.cgi?id=116367
1297
1298         Reviewed by Andreas Kling.
1299
1300         * inspector/InspectorDOMStorageAgent.cpp:
1301         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
1302         Remove ec parameter.
1303
1304         * inspector/InspectorDOMStorageAgent.h:
1305         Add forward declaration.
1306
1307         * page/DOMWindow.cpp:
1308         (WebCore::DOMWindow::sessionStorage):
1309         (WebCore::DOMWindow::localStorage):
1310         Storage::StorageArea returns a reference now.
1311
1312         * storage/Storage.cpp:
1313         (WebCore::Storage::length):
1314         Check that the storage area can be accessed by the frame, and that it's not disabled by private browsing.
1315         Then call down to the (now simplified) StorageArea::length().
1316
1317         (WebCore::Storage::isDisabledByPrivateBrowsing):
1318         New helper function that's based on StorageAreaImpl::disabledByPrivateBrowsingInFrame, but reordered
1319         to make it easier to follow.
1320
1321         * storage/Storage.h:
1322         (WebCore::Storage::area):
1323         Return a reference.
1324
1325         * storage/StorageAreaImpl.cpp:
1326         (WebCore::StorageAreaImpl::storageType):
1327         Add this new virtual member funciton that's needed by Storage::isDisabledByPrivateBrowsing.
1328
1329         (WebCore::StorageAreaImpl::length):
1330         Remove unneeded code.
1331
1332 2013-05-17  Commit Queue  <commit-queue@webkit.org>
1333
1334         Unreviewed, rolling out r150294.
1335         http://trac.webkit.org/changeset/150294
1336         https://bugs.webkit.org/show_bug.cgi?id=116369
1337
1338         Caused 31 tests to fail (Requested by rniwa on #webkit).
1339
1340         * WebCore.exp.in:
1341         * rendering/InlineFlowBox.h:
1342         * rendering/InlineTextBox.h:
1343         (InlineTextBox):
1344         * rendering/RenderApplet.h:
1345         * rendering/RenderBR.h:
1346         * rendering/RenderBlock.h:
1347         (RenderBlock):
1348         (WebCore::RenderBlock::virtualContinuation):
1349         * rendering/RenderBox.h:
1350         (WebCore::RenderBox::borderBoundingBox):
1351         (RenderBox):
1352         (WebCore::RenderBox::marginLogicalLeft):
1353         (WebCore::RenderBox::marginLogicalRight):
1354         * rendering/RenderBoxModelObject.h:
1355         (WebCore::RenderBoxModelObject::isBoxModelObject):
1356         * rendering/RenderButton.h:
1357         * rendering/RenderCombineText.h:
1358         * rendering/RenderCounter.h:
1359         * rendering/RenderDeprecatedFlexibleBox.h:
1360         * rendering/RenderDetailsMarker.h:
1361         * rendering/RenderEmbeddedObject.h:
1362         (RenderEmbeddedObject):
1363         (WebCore::RenderEmbeddedObject::isEmbeddedObject):
1364         (WebCore::RenderEmbeddedObject::virtualChildren):
1365         * rendering/RenderFieldset.h:
1366         * rendering/RenderFileUploadControl.h:
1367         * rendering/RenderFlexibleBox.h:
1368         * rendering/RenderFlowThread.h:
1369         * rendering/RenderFrame.h:
1370         * rendering/RenderFrameSet.h:
1371         * rendering/RenderFullScreen.cpp:
1372         * rendering/RenderFullScreen.h:
1373         * rendering/RenderGrid.h:
1374         * rendering/RenderHTMLCanvas.h:
1375         * rendering/RenderIFrame.h:
1376         * rendering/RenderImage.h:
1377         (RenderImage):
1378         (WebCore::RenderImage::isRenderImage):
1379         * rendering/RenderInline.h:
1380         (RenderInline):
1381         (WebCore::RenderInline::virtualContinuation):
1382         (WebCore::RenderInline::virtualChildren):
1383         (WebCore::RenderInline::isRenderInline):
1384         (WebCore::RenderInline::layout):
1385         (WebCore::RenderInline::requiresLayer):
1386         (WebCore::RenderInline::offsetWidth):
1387         (WebCore::RenderInline::offsetHeight):
1388         (WebCore::RenderInline::borderBoundingBox):
1389         (WebCore::RenderInline::dirtyLinesFromChangedChild):
1390         * rendering/RenderLayerModelObject.h:
1391         * rendering/RenderListBox.h:
1392         * rendering/RenderListItem.h:
1393         * rendering/RenderListMarker.h:
1394         * rendering/RenderMedia.h:
1395         (WebCore::RenderMedia::virtualChildren):
1396         (WebCore::RenderMedia::canHaveChildren):
1397         (WebCore::RenderMedia::isMedia):
1398         (WebCore::RenderMedia::isImage):
1399         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
1400         * rendering/RenderMediaControlElements.h:
1401         * rendering/RenderMenuList.h:
1402         * rendering/RenderMeter.h:
1403         * rendering/RenderMultiColumnBlock.h:
1404         * rendering/RenderMultiColumnFlowThread.h:
1405         * rendering/RenderMultiColumnSet.h:
1406         * rendering/RenderNamedFlowThread.h:
1407         * rendering/RenderPart.h:
1408         (RenderPart):
1409         (WebCore::RenderPart::isRenderPart):
1410         (WebCore::RenderPart::renderName):
1411         * rendering/RenderProgress.h:
1412         * rendering/RenderRegion.h:
1413         (WebCore::RenderRegion::isRenderRegion):
1414         * rendering/RenderRegionSet.h:
1415         * rendering/RenderReplaced.h:
1416         (RenderReplaced):
1417         (WebCore::RenderReplaced::renderName):
1418         * rendering/RenderReplica.h:
1419         * rendering/RenderRuby.h:
1420         * rendering/RenderRubyBase.h:
1421         * rendering/RenderRubyRun.h:
1422         * rendering/RenderRubyText.h:
1423         * rendering/RenderScrollbarPart.h:
1424         * rendering/RenderSearchField.h:
1425         * rendering/RenderSlider.h:
1426         * rendering/RenderSnapshottedPlugIn.h:
1427         (RenderSnapshottedPlugIn):
1428         * rendering/RenderTable.h:
1429         (RenderTable):
1430         (WebCore::RenderTable::renderName):
1431         (WebCore::RenderTable::isTable):
1432         (WebCore::RenderTable::avoidsFloats):
1433         * rendering/RenderTableCaption.h:
1434         * rendering/RenderTableCell.h:
1435         * rendering/RenderTableCol.h:
1436         * rendering/RenderTableRow.h:
1437         * rendering/RenderTableSection.h:
1438         * rendering/RenderText.h:
1439         (RenderText):
1440         (WebCore::RenderText::marginLeft):
1441         (WebCore::RenderText::marginRight):
1442         (WebCore::RenderText::styleWillChange):
1443         (WebCore::RenderText::length):
1444         (WebCore::RenderText::paint):
1445         (WebCore::RenderText::layout):
1446         * rendering/RenderTextControl.h:
1447         (RenderTextControl):
1448         (WebCore::RenderTextControl::renderName):
1449         (WebCore::RenderTextControl::isTextControl):
1450         (WebCore::RenderTextControl::avoidsFloats):
1451         * rendering/RenderTextControlMultiLine.h:
1452         * rendering/RenderTextControlSingleLine.h:
1453         (RenderTextControlSingleLine):
1454         (WebCore::RenderTextControlSingleLine::isTextField):
1455         * rendering/RenderTextFragment.h:
1456         * rendering/RenderTextTrackCue.h:
1457         * rendering/RenderVideo.h:
1458         * rendering/RenderView.h:
1459         * rendering/RenderWidget.h:
1460         (RenderWidget):
1461         (WebCore::RenderWidget::isWidget):
1462         * rendering/RenderWordBreak.h:
1463         * rendering/RootInlineBox.h:
1464         (RootInlineBox):
1465         * rendering/mathml/RenderMathMLBlock.h:
1466         * rendering/svg/RenderSVGBlock.h:
1467         (RenderSVGBlock):
1468         * rendering/svg/RenderSVGContainer.h:
1469         (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
1470         (WebCore::RenderSVGContainer::virtualChildren):
1471         (WebCore::RenderSVGContainer::isSVGContainer):
1472         (WebCore::RenderSVGContainer::renderName):
1473         (RenderSVGContainer):
1474         (WebCore::RenderSVGContainer::objectBoundingBox):
1475         (WebCore::RenderSVGContainer::strokeBoundingBox):
1476         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
1477         * rendering/svg/RenderSVGEllipse.h:
1478         * rendering/svg/RenderSVGForeignObject.h:
1479         * rendering/svg/RenderSVGGradientStop.h:
1480         * rendering/svg/RenderSVGHiddenContainer.h:
1481         (WebCore::RenderSVGHiddenContainer::renderName):
1482         (RenderSVGHiddenContainer):
1483         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
1484         * rendering/svg/RenderSVGImage.h:
1485         * rendering/svg/RenderSVGInline.h:
1486         (WebCore::RenderSVGInline::renderName):
1487         (WebCore::RenderSVGInline::requiresLayer):
1488         (WebCore::RenderSVGInline::isSVGInline):
1489         (RenderSVGInline):
1490         * rendering/svg/RenderSVGInlineText.h:
1491         * rendering/svg/RenderSVGModelObject.h:
1492         (WebCore::RenderSVGModelObject::requiresLayer):
1493         (RenderSVGModelObject):
1494         * rendering/svg/RenderSVGPath.h:
1495         * rendering/svg/RenderSVGRect.h:
1496         * rendering/svg/RenderSVGResourceClipper.h:
1497         * rendering/svg/RenderSVGResourceContainer.h:
1498         (RenderSVGResourceContainer):
1499         (WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
1500         (WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
1501         * rendering/svg/RenderSVGResourceFilter.h:
1502         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
1503         * rendering/svg/RenderSVGResourceGradient.h:
1504         (RenderSVGResourceGradient):
1505         (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
1506         * rendering/svg/RenderSVGResourceLinearGradient.h:
1507         * rendering/svg/RenderSVGResourceMarker.h:
1508         * rendering/svg/RenderSVGResourceMasker.h:
1509         * rendering/svg/RenderSVGResourcePattern.h:
1510         * rendering/svg/RenderSVGResourceRadialGradient.h:
1511         * rendering/svg/RenderSVGRoot.h:
1512         * rendering/svg/RenderSVGShape.h:
1513         (WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
1514         (WebCore::RenderSVGShape::setNeedsTransformUpdate):
1515         (WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
1516         (WebCore::RenderSVGShape::localToParentTransform):
1517         (WebCore::RenderSVGShape::localTransform):
1518         (WebCore::RenderSVGShape::isSVGShape):
1519         (RenderSVGShape):
1520         (WebCore::RenderSVGShape::objectBoundingBox):
1521         (WebCore::RenderSVGShape::strokeBoundingBox):
1522         * rendering/svg/RenderSVGTSpan.h:
1523         * rendering/svg/RenderSVGText.h:
1524         * rendering/svg/RenderSVGTextPath.h:
1525         * rendering/svg/RenderSVGTransformableContainer.h:
1526         * rendering/svg/RenderSVGViewportContainer.h:
1527
1528 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1529
1530         Get rid of Custom code for Audio global constructor
1531         https://bugs.webkit.org/show_bug.cgi?id=116343
1532
1533         Reviewed by Geoffrey Garen.
1534
1535         Remove custom code for Audio global constructor. It is no longer needed
1536         now that the the bindings generator no longer require custom code for
1537         named constructors and now that [EnabledAtRuntime] extended attribute is
1538         supported for global constructors.
1539
1540         HTMLAudioElement global constructors are now automatically generated.
1541
1542         No new tests, no behavior change for layout tests.
1543
1544         * bindings/js/JSDOMWindowCustom.cpp:
1545         * html/HTMLAudioElement.idl:
1546         * page/DOMWindow.idl:
1547
1548 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1549
1550         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
1551         https://bugs.webkit.org/show_bug.cgi?id=116359
1552
1553         Reviewed by Anders Carlsson.
1554
1555         This feature was already RuntimeEnabled. Call through layers to get the answer from
1556         a platform strategy.
1557
1558         * workers/DefaultSharedWorkerRepository.cpp:
1559         (WebCore::DefaultSharedWorkerRepository::isAvailable):
1560         * workers/DefaultSharedWorkerRepository.h:
1561         * workers/SharedWorkerRepository.cpp:
1562         (WebCore::SharedWorkerRepository::isAvailable):
1563         * workers/SharedWorkerStrategy.h:
1564         (WebCore::SharedWorkerStrategy::isAvailable):
1565
1566 2013-05-17  Anders Carlsson  <andersca@apple.com>
1567
1568         Move Storage member functions out of line
1569         https://bugs.webkit.org/show_bug.cgi?id=116364
1570
1571         Reviewed by Andreas Kling.
1572
1573         This is preparation for sharing more code between the WebKit1 and WebKit2 storage area subclasses.
1574         Also remove unnecessary null checks and make m_storageArea const.
1575
1576         * storage/Storage.cpp:
1577         (WebCore::Storage::length):
1578         (WebCore::Storage::key):
1579         (WebCore::Storage::getItem):
1580         (WebCore::Storage::setItem):
1581         (WebCore::Storage::removeItem):
1582         (WebCore::Storage::clear):
1583         (WebCore::Storage::contains):
1584         * storage/Storage.h:
1585         (WebCore::Storage::area):
1586
1587 2013-05-17  Beth Dakin  <bdakin@apple.com>
1588
1589         Headers and footers will sometimes disappear and re-appear during page loads
1590         https://bugs.webkit.org/show_bug.cgi?id=116336
1591         -and corresponding-
1592         <rdar://problem/13886753>
1593
1594         Reviewed by Simon Fraser.
1595
1596         This patch changes the WebCore-level API that WebKit uses to create a banner. 
1597         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
1598         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
1599         layer has been created, it will call back into WK2 via ChromeClient. This will 
1600         allow WebCore to re-create the header/footer layers as needed whenever the 
1601         FrameView/RenderLayerCompositor have been destroyed and recreated.
1602
1603         Remove references to old FrameView functions. Add references to new Page 
1604         functions.
1605         * WebCore.exp.in:
1606
1607         New ChromeClient functions will pass the new layers up to WK2.
1608         * page/ChromeClient.h:
1609         (WebCore::ChromeClient::didAddHeaderLayer):
1610         (WebCore::ChromeClient::didAddFooterLayer):
1611         (ChromeClient):
1612
1613         Remove setWantsLayerForHeader/Footer.
1614         * page/FrameView.cpp:
1615         * page/FrameView.h:
1616         (FrameView):
1617
1618         Page now caches the header and footer height. When the FrameView/RLC have been 
1619         destroyed, and the cached layer/height information on those classes has been lost, 
1620         this data on Page will persist so that we can build the layers back up.
1621         * page/Page.cpp:
1622         (WebCore::Page::Page):
1623         (WebCore::Page::addHeaderWithHeight):
1624         (WebCore::Page::addFooterWithHeight):
1625         * page/Page.h:
1626         (WebCore::Page::headerHeight):
1627         (WebCore::Page::footerHeight):
1628
1629         As soon as the root gets a backing, recreate the header and footer layers if 
1630         needed.
1631         * rendering/RenderLayerCompositor.cpp:
1632         (WebCore::RenderLayerCompositor::updateBacking):
1633
1634         Call into ChromeClient.
1635         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1636         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1637
1638 2013-05-18  Claudio Saavedra  <csaavedra@igalia.com>
1639
1640         [CSS] Minor cleanups in CSS variables handling
1641         https://bugs.webkit.org/show_bug.cgi?id=116318
1642
1643         Reviewed by Ryosuke Niwa.
1644
1645         No new tests, only a cleanup.
1646
1647         * css/CSSParser.cpp:
1648         (WebCore::CSSParserString::substring): Optimize.
1649         (WebCore::CSSParser::createPrimitiveVariableNameValue):
1650         Remove intermediate variable.
1651
1652 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1653
1654         [Mac] Add DOMWindowConstructors.idl to Xcode project file
1655         https://bugs.webkit.org/show_bug.cgi?id=116351
1656
1657         Reviewed by Anders Carlsson.
1658
1659         * WebCore.xcodeproj/project.pbxproj: Added the file, so that Xcode includes it
1660         in searches.
1661
1662 2013-05-17  Ryosuke Niwa  <rniwa@webkit.org>
1663
1664         Remove the declaration of Element::detachAttrNodeAtIndex erroneously added in r150072.
1665
1666         * dom/Element.h:
1667         (Element):
1668
1669 2013-05-17  Anders Carlsson  <andersca@apple.com>
1670
1671         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
1672         https://bugs.webkit.org/show_bug.cgi?id=116346
1673         <rdar://problem/13852829>
1674
1675         Reviewed by Andreas Kling.
1676
1677         Export the UTF8Encoding symbol.
1678
1679         * WebCore.exp.in:
1680
1681 2013-05-17  Andreas Kling  <akling@apple.com>
1682
1683         Apply FINAL to the RenderObject hierarchy.
1684         <http://webkit.org/b/115977>
1685
1686         Mostly from Blink r148795 by <cevans@chromium.org>
1687         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
1688
1689         Re-landing without devirtualization tweaks.
1690
1691         * rendering/: Beat things with the FINAL stick.
1692         * WebCore.exp.in: Export a now-needed symbol.
1693
1694 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1695
1696         Build fix.
1697
1698         * loader/FrameLoader.cpp: (WebCore::FrameLoader::willTransitionToCommitted):
1699         Frame:editor() now returns a reference.
1700
1701 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1702
1703         Get rid of [ConstructorParameters] extended attributes
1704         https://bugs.webkit.org/show_bug.cgi?id=116308
1705
1706         Reviewed by Kentaro Hara.
1707
1708         Get rid of WebKit-specific [ConstructorParameters] IDL extended attribute. Instead,
1709         [CustomConstructor] arguments are now explicitly specified, similarly to [Constructor]
1710         arguments and the constructor object's "length" property is now automatically
1711         computed for custom constructors as well.
1712
1713         This is less error-prone as the value is not hardcoded, more consistent with
1714         [Constructor] extended attribute and gives more information about the custom constructor
1715         in the IDL file. We also get rid of a WebKit-specific IDL attribute which is always
1716         nice.
1717
1718         No new tests, already covered by fast/js/constructor-length.html.
1719
1720         * Modules/mediastream/MediaStream.idl:
1721         * Modules/webaudio/AudioContext.idl:
1722         * Modules/websockets/WebSocket.idl:
1723         * bindings/scripts/CodeGeneratorJS.pm:
1724         (GenerateConstructorHelperMethods):
1725         * bindings/scripts/IDLAttributes.txt:
1726         * bindings/scripts/IDLParser.pm:
1727         (applyTypedefs):
1728         (parseAttributeRest):
1729         (copyExtendedAttributes):
1730         (parseExtendedAttributeRest):
1731         (applyExtendedAttributeList):
1732         * bindings/scripts/test/JS/JSFloat64Array.cpp:
1733         (WebCore::JSFloat64ArrayConstructor::finishCreation):
1734         * bindings/scripts/test/TestTypedArray.idl:
1735         * dom/MutationObserver.idl:
1736         * fileapi/Blob.idl:
1737         * html/DOMFormData.idl:
1738         * html/canvas/ArrayBuffer.idl:
1739         * html/canvas/DataView.idl:
1740         * page/WebKitPoint.idl:
1741         * workers/SharedWorker.idl:
1742         * workers/Worker.idl:
1743
1744 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
1745
1746         Text input is largely broken when there are subframes loading
1747         http://bugs.webkit.org/show_bug.cgi?id=59121
1748         <rdar://problem/9320468>
1749
1750         Reviewed by Darin Adler.
1751
1752         This addresses text input being abandoned when another frame in a page is navigated.
1753
1754         There are still many opportunities for improvement:
1755         - Track other cases where WebCore interferes may want to cancel input without
1756         direct user action (e.g. deleting the whole editable element on a timer).
1757         - Fix how dictionary panel and autocorrection are dismissed (they still have the
1758         same issue, and get dismissed with any frame navigation).
1759
1760         Test: platform/mac/editing/input/unconfirmed-text-navigation-with-page-cache.html
1761
1762         * loader/FrameLoader.h:
1763         * loader/FrameLoader.cpp:
1764         (WebCore::FrameLoader::willTransitionToCommitted): Make sure that we
1765         do not keep an inline session in a frame that's no longer active, as WebKit2 no
1766         longer takes care of this case (and more of the logic should be in WebCore anyway).
1767         (WebCore::FrameLoader::commitProvisionalLoad): Added a hook that gets invoked right
1768         before transitioning to committed state starts. We may want to move more code here
1769         eventually, e.g. from Frame::setView.
1770
1771 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1772
1773         Get rid of [CustomGetter] for global named constructors
1774         https://bugs.webkit.org/show_bug.cgi?id=116116
1775
1776         Reviewed by Geoffrey Garen.
1777
1778         Improve the JSC bindings generator so that global named constructors no longer
1779         require a [CustomGetter] IDL extended attribute. As a consequence, attributes
1780         on the global window object can now be automatically generated for interfaces
1781         that have a [NamedConstructor], namely HTMLOptionElement.
1782
1783         The HTMLAudioElement global constructors are still manually defined because it
1784         requires custom code at the moment to check if the media player is available.
1785
1786         No new tests, no behavior change.
1787
1788         * bindings/js/JSDOMWindowCustom.cpp:
1789         * bindings/scripts/CodeGeneratorJS.pm:
1790         * bindings/scripts/preprocess-idls.pl:
1791         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1792         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1793         * html/HTMLOptionElement.idl:
1794         * page/DOMWindow.idl:
1795
1796 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
1797
1798         Web Inspector: SyntaxError evaluating "1+1; //@ sourceURL=test" in console
1799         https://bugs.webkit.org/show_bug.cgi?id=116292
1800
1801         Add a newline after the expression so a single line comment doesn't
1802         erroneously comment out the closing brace of the with block.
1803
1804         Reviewed by Timothy Hatcher.
1805
1806         Test: inspector/console/console-eval-comment.html
1807
1808         * inspector/InjectedScriptSource.js:
1809
1810 2013-05-17  David Hyatt  <hyatt@apple.com>
1811
1812         fast/flexbox/auto-height-with-flex.html failing only on release builds.
1813         https://bugs.webkit.org/show_bug.cgi?id=116240
1814
1815         Reviewed by Darin Adler.
1816
1817         Fix the mainAxisContentExtent method so no overflow occurs, since it
1818         doesn't work right on release builds.
1819
1820         * rendering/RenderFlexibleBox.cpp:
1821         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
1822
1823 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1824
1825         Add [EnabledAtRuntime] extended attribute support for global constructors
1826         https://bugs.webkit.org/show_bug.cgi?id=116147
1827
1828         Reviewed by Geoffrey Garen.
1829
1830         Add [EnabledAtRuntime] extended attribute support for global constructors.
1831         This patch adds [EnabledAtRuntime] extended attribute to SharedWorker and
1832         WebSocket IDL interfaces so that their global constructors on the global
1833         Window object can now be automatically generated.
1834
1835         The behavior on JavaScript side is unchanged. We simply leverage
1836         RuntimeEnabledFeatures class and the new [EnabledAtRuntime] IDL extended
1837         attribute to generate the code for global constructors getters instead
1838         of using custom code.
1839
1840         No new tests, no behavior change for layout tests.
1841
1842         * GNUmakefile.list.am:
1843         * Modules/websockets/WebSocket.cpp: Enable WebSockets at runtime by default.
1844         * Modules/websockets/WebSocket.idl:
1845         * Target.pri:
1846         * UseJSC.cmake:
1847         * WebCore.vcproj/WebCore.vcproj:
1848         * WebCore.vcxproj/WebCore.vcxproj:
1849         * WebCore.vcxproj/WebCore.vcxproj.filters:
1850         * WebCore.xcodeproj/project.pbxproj:
1851         * bindings/js/JSBindingsAllInOne.cpp:
1852         * bindings/js/JSDOMWindowCustom.cpp:
1853         (WebCore):
1854         * bindings/js/JSDOMWindowWebSocketCustom.cpp: Removed.
1855         * bindings/scripts/CodeGeneratorJS.pm:
1856         (ToMethodName):
1857         (GetRuntimeEnableFunctionName):
1858         (GenerateImplementation):
1859         * bindings/scripts/IDLAttributes.txt:
1860         * page/DOMWindow.idl:
1861         * workers/SharedWorker.idl:
1862
1863 2013-05-17  Darin Adler  <darin@apple.com>
1864
1865         [EFL] Move EFL port off legacy clipboard
1866         https://bugs.webkit.org/show_bug.cgi?id=116181
1867
1868         Reviewed by Anders Carlsson.
1869
1870         * dom/Clipboard.h: Switched EFL away from "legacy" mode for Clipboard.
1871
1872         * page/efl/EventHandlerEfl.cpp:
1873         (WebCore::EventHandler::createDraggingClipboard): Changed to call Clipboard member function.
1874
1875         * platform/efl/ClipboardEfl.cpp: Deleted most of the functions.
1876         (WebCore::Editor::newGeneralClipboard): Changed to call Clipboard member function.
1877         (WebCore::Clipboard::createDragImage): Moved from ClipboardEfl to Clipboard.
1878         (WebCore::Clipboard::declareAndWriteDragImage): Moved from ClipboardEfl to Clipboard.
1879         (WebCore::Clipboard::items): Ditto.
1880
1881         * platform/efl/PasteboardEfl.cpp: A lot of copyright notices for a file that
1882         has no code in it other than notImplemented lines! I didn't add a new one.
1883         (WebCore::Pasteboard::createForCopyAndPaste): Added.
1884         (WebCore::Pasteboard::createPrivate): Added.
1885         (WebCore::Pasteboard::createForDragAndDrop): Added.
1886         (WebCore::Pasteboard::hasData): Added.
1887         (WebCore::Pasteboard::readString): Added.
1888         (WebCore::Pasteboard::writeString): Added.
1889         (WebCore::Pasteboard::types): Added.
1890         (WebCore::Pasteboard::readFilenames): Added.
1891         (WebCore::Pasteboard::setDragImage): Added.
1892         (WebCore::Pasteboard::writePasteboard): Added.
1893
1894 2013-05-17  Frédéric Wang  <fred.wang@free.fr>
1895
1896         Bad spacing inside MathML formulas when text-indent is specified
1897         https://bugs.webkit.org/show_bug.cgi?id=106600
1898
1899         Reviewed by Martin Robinson.
1900
1901         When MathML is used in a HTML page that modifies the CSS text-indent,
1902         large gaps appear inside the mathematical expressions. Resetting it to
1903         0 on the math root (as Gecko does) fixes the issue.
1904
1905         Tests: mathml/presentation/text-indent.html
1906                mathml/presentation/text-indent-expected.html
1907
1908         * css/mathml.css:
1909         (math): reset text-indent to its default value.
1910
1911 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
1912
1913         Fix code that expects Page::chrome() to return a pointer
1914         https://bugs.webkit.org/show_bug.cgi?id=116313
1915
1916         Reviewed by Darin Adler.
1917
1918         Page::chrome() returns a reference after r150214.
1919
1920         * platform/network/blackberry/NetworkManager.cpp:
1921         (WebCore::NetworkManager::startJob):
1922         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
1923         (WebCore::SocketStreamHandle::SocketStreamHandle):
1924         * testing/Internals.cpp:
1925         (WebCore::Internals::resetToConsistentState):
1926         (WebCore::Internals::setEnableMockPagePopup):
1927
1928 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
1929
1930         [BlackBerry] ImageBlackBerry: add missing BlendMode parameter
1931         https://bugs.webkit.org/show_bug.cgi?id=116316
1932
1933         Reviewed by Carlos Garcia Campos.
1934
1935         When the new BitmapImage::draw() method was added in r147110 it
1936         didn't include the BlendMode parameter, which has been there since
1937         r137011.
1938
1939         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1940         (WebCore::BitmapImage::draw):
1941
1942 2013-05-16  Jer Noble  <jer.noble@apple.com>
1943
1944         Some media/track tests fail or assert on Mac
1945         https://bugs.webkit.org/show_bug.cgi?id=97132
1946
1947         Reviewed by Simon Fraser.
1948
1949         Rationalize the font and padding behavior of cues and cue boxes; ::cue pseudo elements cannot have padding
1950         values applied via CSS (due to padding not being included in the whitelist of applicable CSS properties).
1951         Also, the font values were being applied to the box at one level and the cue at another, leading to incorrect
1952         layout in the snapToLines case. Padding has been removed from the cue, and the font settings are now applied
1953         to the box exclusively.
1954
1955         Additionally, a few drive-by changes were made in TextTrackCue to the return values of displayTreeInternal() &
1956         element(), which previously returned a PassRefPtr<> instead of a plain pointer.
1957
1958         * css/mediaControls.css:
1959         (video::-webkit-media-text-track-container): Move the font size to the display selector.
1960         (video::cue): Remove the display:inline and padding:2px declarations.
1961         (video::-webkit-media-text-track-display): Remove the -webkit-line-content now that the ::cue has no padding.
1962         * html/track/TextTrackCue.cpp:
1963         (WebCore::TextTrackCue::TextTrackCue): The background box is now a span, rather than a forced-inline div.
1964         (WebCore::TextTrackCue::displayTreeInternal): Return a plain pointer.
1965         (WebCore::TextTrackCue::getDisplayTree): Ditto.
1966         (WebCore::TextTrackCue::setFontSize): Set the font on the box, not the cue.
1967         * html/track/TextTrackCue.h:
1968         (WebCore::TextTrackCue::element): Return a plain pointer.
1969         * html/track/TextTrackCueGeneric.cpp:
1970         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): The cue element is now a span, not a div.
1971         * page/CaptionUserPreferencesMac.mm:
1972         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Whitespace.
1973         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Do not set padding on the cue.
1974
1975 2013-05-16  Andreas Kling  <akling@apple.com>
1976
1977         Changes in text-only properties shouldn't cause repaints unless there is actually text.
1978         <http://webkit.org/b/116250>
1979
1980         Reviewed by Antti Koivisto.
1981
1982         Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
1983         This result means that the renderer only needs to repaint if one of its immediate children contains text.
1984
1985         This lets us avoid repainting the same pixels when hovering over constructs like:
1986
1987             <style>
1988                 a { text-decoration: none; }
1989                 a:hover { text-decoration: underline; }
1990             </style>
1991             <a href="http://is.gd/andersca">
1992                 <img src="cool-hat.jpg">
1993             </a>
1994
1995         Since the change in text-decoration has no effect on the rendering of the <img> element,
1996         we'll now be smart enough to avoid repainting it.
1997
1998         * rendering/style/RenderStyleConstants.h:
1999         * rendering/style/RenderStyle.cpp:
2000         (WebCore::RenderStyle::diff):
2001
2002             Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
2003             in case a difference is found, giving precedence to StyleDifferenceRepaint.
2004
2005         * rendering/RenderObject.h:
2006         * rendering/RenderObject.cpp:
2007         (WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
2008
2009             Helper to check if a RenderObject has at least one RenderText child containing more than just
2010             collapsible whitespace.
2011
2012         (WebCore::RenderObject::shouldRepaintForStyleDifference):
2013
2014             Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
2015             has an immediate text child.
2016
2017         (WebCore::RenderObject::styleWillChange):
2018         (WebCore::RenderObject::setStyle):
2019
2020             Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
2021
2022         * rendering/RenderBox.cpp:
2023         (WebCore::RenderBox::styleDidChange):
2024         * rendering/svg/SVGResourcesCache.cpp:
2025         (WebCore::SVGResourcesCache::clientStyleChanged):
2026
2027             Tweak for new StyleDifference enum value.
2028
2029         * rendering/RenderText.h:
2030         * rendering/RenderText.cpp:
2031         (WebCore::RenderText::isAllCollapsibleWhitespace):
2032
2033             Made this const.
2034
2035 2013-05-17  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
2036
2037         Improve -webkit-text-underline-position memory usage.
2038         https://bugs.webkit.org/show_bug.cgi?id=116108
2039
2040         Reviewed by Benjamin Poulain.
2041
2042         Remove m_maxLogicalTop private variable from RootInlineBox to reduce
2043         the overall memory used to render RootInlineBoxes (eight bytes per RootInlineBox
2044         instance in a 64-bit machine). RootInline::maxLogicalTop() now computes
2045         the maxLogicalTop value everytime it is called. In a typical page
2046         computeMaxLogicalTop is called less than 10 times for each
2047         InlineTextBox that uses -webkit-text-underline-position. That is a small
2048         price users of -webkit-text-underline-position will pay so that
2049         everybody can benefit from the memory reduction in RootInlineBox.
2050
2051         No new tests, no change in behavior.
2052
2053         * rendering/InlineFlowBox.cpp:
2054         (WebCore::InlineFlowBox::computeMaxLogicalTop): Make it const.
2055         * rendering/InlineFlowBox.h:
2056         * rendering/RootInlineBox.cpp:
2057         (WebCore::RootInlineBox::RootInlineBox): Remove m_maxLogicalTop.
2058         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Remove
2059         computeMaxLogicalTop call and obsolete comment.
2060         (WebCore):
2061         (WebCore::RootInlineBox::maxLogicalTop): Compute maxLogicalTop before
2062         returning its value.
2063         * rendering/RootInlineBox.h:
2064         (RootInlineBox):
2065
2066 2013-05-17  Alexis Menard  <alexis@webkit.org>
2067
2068         Make sure to call release() on our smart pointers when we should.
2069         https://bugs.webkit.org/show_bug.cgi?id=116307
2070
2071         Reviewed by Andreas Kling.
2072
2073         Call release() when we should call it. There is probably more occurence
2074         of this problem on the codebase but this is a first bunch of fixes.
2075
2076         No new tests : existing ones should cover.
2077
2078         * css/CSSComputedStyleDeclaration.cpp:
2079         (WebCore::valueForNinePieceImage):
2080         (WebCore::getBorderRadiusShorthandValue):
2081         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2082         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2083         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
2084         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
2085         * css/CSSParser.cpp:
2086         (WebCore::CSSParser::parseBorderImage):
2087         * html/HTMLBodyElement.cpp:
2088         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
2089
2090 2013-05-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2091
2092         Make PNGImageDecoder::rowAvailable auto-vectorizable
2093         https://bugs.webkit.org/show_bug.cgi?id=116151
2094
2095         Reviewed by Benjamin Poulain.
2096
2097         Changed the main loops under PNGImageDecoder::rowAvailable so that they
2098         avoid branches and non-sequential table look ups.
2099
2100         Together with automatic vectorization by the compiler this provides around
2101         4x speed-up with AVX or 2x speed-up on generic x64. Shaving off 12-40% on
2102         PNG decoding in general.
2103
2104         * platform/graphics/Color.cpp:
2105         (WebCore::premultipliedARGBFromColor):
2106         * platform/graphics/Color.h:
2107         (WebCore::fastDivideBy255):
2108         * platform/graphics/filters/FEBlend.cpp:
2109         * platform/image-decoders/png/PNGImageDecoder.cpp:
2110         (WebCore::setPixelRGB):
2111         (WebCore::setPixelRGBA):
2112         (WebCore::setPixelRGBA_Premultiplied):
2113         (WebCore::PNGImageDecoder::rowAvailable):
2114
2115 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
2116
2117         Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
2118         https://bugs.webkit.org/show_bug.cgi?id=116290
2119
2120         Follow an update to the spec and support the new and old syntax.
2121
2122         Reviewed by Timothy Hatcher.
2123
2124         * inspector/ContentSearchUtils.cpp:
2125         (WebCore::ContentSearchUtils::scriptCommentPattern):
2126         (WebCore::ContentSearchUtils::stylesheetCommentPattern):
2127         * inspector/front-end/SASSSourceMapping.js:
2128         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
2129
2130 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2131
2132         Remove custom code for MessageEvent.ports getter
2133         https://bugs.webkit.org/show_bug.cgi?id=116304
2134
2135         Reviewed by Kentaro Hara.
2136
2137         Remove Custom code for the "ports" attribute getter in MessageEvent
2138         IDL interface. The JSC bindings generator already supports attributes
2139         of type MessagePortArray.
2140
2141         No new tests, already covered by existing layout tests and bindings
2142         tests.
2143
2144         * bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
2145         * bindings/scripts/CodeGeneratorJS.pm:
2146         (NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
2147         returns NULL and avoid crashing in this case.
2148         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
2149         to bindings generator tweak.
2150         * dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
2151         and switch to MessagePortArray type.
2152
2153 2013-05-16  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2154
2155         Add stubs for ContextMenu and ContextMenuItem
2156         https://bugs.webkit.org/show_bug.cgi?id=116235
2157
2158         Reviewed by Antonio Gomes.
2159
2160         No new tests needed, only a refactor.
2161
2162         Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
2163         so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
2164         need to replicate these stubs.
2165
2166         * PlatformEfl.cmake:
2167         * Target.pri:
2168         * platform/ContextMenuNone.cpp: Added.
2169         (WebCore):
2170         (WebCore::ContextMenu::ContextMenu):
2171         (WebCore::ContextMenu::getContextMenuItems):
2172         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
2173         (WebCore::ContextMenu::platformContextMenu):
2174         * platform/ContextMenuItemNone.cpp: Added.
2175         (WebCore):
2176         (WebCore::ContextMenuItem::platformContextMenuItem):
2177         * platform/efl/ContextMenuEfl.cpp: Removed.
2178         * platform/efl/ContextMenuItemEfl.cpp: Removed.
2179         * platform/qt/ContextMenuQt.cpp: Removed.
2180         * platform/qt/ContextMenuItemQt.cpp: Removed.
2181
2182 2013-05-16  Alexis Menard  <alexis@webkit.org>
2183
2184         Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
2185         https://bugs.webkit.org/show_bug.cgi?id=115656
2186
2187         Reviewed by Darin Adler.
2188
2189         If we create a prefixed event to dispatch it (in the case we have only
2190         prefixed event listeners in client's code) then we need to make sure to
2191         keep it in sync with the original unprefixed event after it has been
2192         dispatched. While being dispatched the event can be modified by
2193         client's code and when propagated back to outer elements, attributes were
2194         not updated. This patch changes the old design of creating a separate event
2195         for the prefixed case and now change the type of the event (so the name) before
2196         dispatching it, keeping the attributes if changed and then rename it
2197         back to unprefixed when the dispatching is finished.
2198
2199         Tests: transitions/transition-end-event-prefixed-01.html
2200                transitions/transition-end-event-prefixed-02.html
2201                transitions/transition-end-event-prefixed-03.html
2202
2203         * dom/Event.h:
2204         (WebCore::Event::setType):
2205         * dom/EventTarget.cpp:
2206         (WebCore::EventTarget::fireEventListeners):
2207
2208 2013-05-16  Mike Fenton  <mifenton@rim.com>
2209
2210         [BlackBerry] Strip invoke URLs when writing to the clipboard.
2211         https://bugs.webkit.org/show_bug.cgi?id=116226
2212
2213         Reviewed by Rob Buis.
2214
2215         PR 333516.
2216
2217         Invoke URLs should not be included in the paste data.
2218
2219         Internally Reviewed by Gen Mak.
2220
2221         * platform/blackberry/PasteboardBlackBerry.cpp:
2222         (WebCore::Pasteboard::writeSelection):
2223
2224 2013-05-16  Eduardo Lima Mitev  <elima@igalia.com>
2225
2226         Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
2227         https://bugs.webkit.org/show_bug.cgi?id=116230
2228
2229         Reviewed by Chris Fleizach.
2230
2231         No new functionality, no new tests.
2232
2233         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2234         (webkitAccessibleTextGetTextForOffset): List textPosition argument as
2235         unused parameter for all platforms except GTK.
2236
2237 2013-05-16  Jaehun Lim  <ljaehun.lim@samsung.com>
2238
2239         Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
2240         https://bugs.webkit.org/show_bug.cgi?id=115884
2241         
2242         Reviewed by Antonio Gomes.
2243
2244         Frame flattening should be applied when the frame owner is frame or iframe. But when
2245         the frame owner is object element, frame flattening prevents it from having scrollbars.
2246         In this situation, we can't scroll the html document in object element.
2247
2248         This patch adds two helper functions to verify flattening conditions.
2249         
2250         Test: fast/frames/flattening/scrolling-in-object.html
2251
2252         * page/FrameView.cpp:
2253         (WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
2254         (WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
2255         (WebCore::FrameView::avoidScrollbarCreation):
2256         (WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
2257         (WebCore::FrameView::layout): Use frameFlatteningEnabled().
2258         (WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
2259
2260 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
2261
2262         Port functions for pathhandling to Windows CE in FileSystemWin
2263         https://bugs.webkit.org/show_bug.cgi?id=116208
2264
2265         Reviewed by Darin Adler.
2266
2267         This will allow us to remove FileSystemWinCE in a next step.
2268
2269         * platform/win/FileSystemWin.cpp:
2270         (WebCore::pathByAppendingComponent):
2271         (WebCore::pathGetFileName):
2272
2273 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2274
2275         PDFPlugins don't load when plugins are disabled, but they should
2276         https://bugs.webkit.org/show_bug.cgi?id=75790
2277         <rdar://problem/11650197>
2278
2279         Reviewed by Anders Carlsson.
2280
2281         Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
2282         say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
2283         functionality which happens to use the plug-in infrastructure, and which also doesn't
2284         unexpectedly disappear for users with plug-ins off.
2285
2286         * WebCore.exp.in:
2287         Export SubframeLoader::allowPlugins().
2288         Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
2289
2290         * dom/DOMImplementation.cpp:
2291         (WebCore::DOMImplementation::createDocument):
2292         Load PluginData even if plug-ins are disabled, but if that is the case, only
2293         create a PluginDocument for application plug-ins.
2294
2295         * html/PluginDocument.cpp:
2296         (WebCore::PluginDocumentParser::appendBytes):
2297         Don't bail if plug-ins are disabled, because we could still be a PluginDocument
2298         for an application plug-in.
2299
2300         * page/Page.cpp:
2301         (WebCore::Page::pluginData):
2302         Allow PluginData to be constructed even if plug-ins are disabled, as there might
2303         be application plug-ins that we want to load anyway.
2304
2305         * platform/mac/MIMETypeRegistryMac.mm:
2306         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
2307         On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
2308
2309         * plugins/PluginData.cpp:
2310         (WebCore::PluginData::supportsMimeType):
2311         Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
2312         whether they are looking for any plug-in, or are looking only for application plug-ins.
2313
2314         * plugins/PluginData.h:
2315         (PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
2316         (PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
2317
2318 2013-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2319
2320         [BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
2321         https://bugs.webkit.org/show_bug.cgi?id=114944
2322
2323         Reviewed by Rob Buis.
2324
2325         It crashes in network platform code when trying to save an
2326         invalid URL in the disk cache. That test contains references to
2327         empty URLs like http://. Those empty URLs, are parsed as http:/ by
2328         KURL and considered valid. BlackBerry network platform uses GURL
2329         which considers those URLs invalid. We needed to check that the
2330         URLs are valid for our platform before starting the network
2331         operation.
2332
2333         Fixes a crash running test
2334         editing/execCommand/indent-paragraphs.html.
2335
2336         * platform/network/blackberry/NetworkManager.cpp:
2337         (WebCore::NetworkManager::startJob): Check if the request URL is
2338         valid from the platform point of view right after creating the
2339         platform network request and return early if the URL is invalid
2340         with StatusErrorInvalidUrl error.
2341
2342 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
2343
2344         Remove unused function safeCreateFile() from WebCore
2345         https://bugs.webkit.org/show_bug.cgi?id=116211
2346
2347         Reviewed by Anders Carlsson.
2348
2349         * platform/FileSystem.h:
2350         * platform/win/FileSystemWin.cpp:
2351
2352 2013-05-16  Peter Gal  <galpeter@inf.u-szeged.hu>
2353
2354         [curl] MIME type should be in lowercase
2355         https://bugs.webkit.org/show_bug.cgi?id=116218
2356
2357         Reviewed by Benjamin Poulain.
2358
2359         Existing testcase: http/tests/mime/uppercase-mime-type.html
2360
2361         * platform/network/curl/ResourceHandleManager.cpp:
2362         (WebCore::headerCallback): Convert the MIME type to lowercase.
2363
2364 2013-05-16  Seokju Kwon  <seokju.kwon@gmail.com>
2365
2366         Web Inspector: Fix optional value of promptText in Inspector.json
2367         https://bugs.webkit.org/show_bug.cgi?id=116203
2368
2369         Reviewed by Joseph Pecoraro.
2370
2371         Merge from https://chromiumcodereview.appspot.com/14672031.
2372
2373         No new tests needed.
2374
2375         * inspector/Inspector.json:
2376
2377 2013-05-16  Mary Wu  <mary.wu@torchmobile.com.cn>
2378
2379         [BlackBerry] Unable to download blob resource
2380         https://bugs.webkit.org/show_bug.cgi?id=115888
2381
2382         Reviewed by Benjamin Poulain.
2383
2384         Add BlobStream to handle over blob data from BlobResourceHandle to download stream.
2385         RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
2386
2387         * PlatformBlackBerry.cmake:
2388         * platform/network/blackberry/BlobStream.cpp: Added.
2389         (WebCore):
2390         (WebCore::BlobStream::BlobStream):
2391         (WebCore::BlobStream::~BlobStream):
2392         (WebCore::BlobStream::didReceiveData):
2393         (WebCore::BlobStream::didFinishLoading):
2394         (WebCore::BlobStream::didFail):
2395         (WebCore::BlobStream::url):
2396         (WebCore::BlobStream::mimeType):
2397         * platform/network/blackberry/BlobStream.h: Added.
2398         (WebCore):
2399         (BlobStream):
2400
2401 2013-05-16  Anders Carlsson  <andersca@apple.com>
2402
2403         Remove SystemTime header and implementations
2404         https://bugs.webkit.org/show_bug.cgi?id=116200
2405
2406         Reviewed by Alexey Proskuryakov.
2407
2408         SystemTim just had a single function that's not called anymore. Remove it.
2409
2410         * GNUmakefile.list.am:
2411         * PlatformBlackBerry.cmake:
2412         * PlatformEfl.cmake:
2413         * PlatformWinCE.cmake:
2414         * Target.pri:
2415         * WebCore.vcproj/WebCore.vcproj:
2416         * WebCore.vcxproj/WebCore.vcxproj:
2417         * WebCore.vcxproj/WebCore.vcxproj.filters:
2418         * WebCore.xcodeproj/project.pbxproj:
2419         * history/PageCache.cpp:
2420         * platform/SystemTime.h: Removed.
2421         * platform/blackberry/SystemTimeBlackBerry.cpp: Removed.
2422         * platform/efl/SystemTimeEfl.cpp: Removed.
2423         * platform/graphics/ca/GraphicsLayerCA.cpp:
2424         * platform/mac/SystemTimeMac.cpp: Removed.
2425         * platform/qt/TemporaryLinkStubsQt.cpp:
2426         * platform/win/SystemTimeWin.cpp: Removed.
2427
2428 2013-05-16  Glenn Adams  <glenn@skynav.com>
2429
2430         [Inspector] Don't filter syntax error caused by asterisk in CSS Property name.
2431         https://bugs.webkit.org/show_bug.cgi?id=116196
2432
2433         Reviewed by Benjamin Poulain.
2434
2435         * inspector/InspectorConsoleAgent.cpp:
2436         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2437             - Remove questionable IE7 related error filtering
2438
2439 2013-05-16  Andreas Kling  <akling@apple.com>
2440
2441         Page::chrome() should return a reference.
2442         <http://webkit.org/b/116185>
2443
2444         Reviewed by Anders Carlsson.
2445
2446         A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
2447         Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
2448
2449 2013-05-16  Simon Fraser  <simon.fraser@apple.com>
2450
2451         Content disappears when scrolling http://www.childrenscancer.org/zach/
2452         https://bugs.webkit.org/show_bug.cgi?id=116206
2453
2454         Reviewed by Darin Adler.
2455         
2456         When a RenderLayerBacking gains or loses a foregroundLayer or backgroundLayer,
2457         we need to repaint the primary layer, since what paints into that primary
2458         layer will change.
2459         
2460         On the page in question, we gained/lost a foreground layer when scrolling because
2461         the page popped an element into position:fixed.
2462
2463         Test: compositing/repaint/foreground-layer-change.html
2464
2465         * rendering/RenderLayerBacking.cpp:
2466         (WebCore::RenderLayerBacking::updateForegroundLayer):
2467         (WebCore::RenderLayerBacking::updateBackgroundLayer):
2468
2469 2013-05-16  Andy Estes  <aestes@apple.com>
2470
2471         Do not indefinitely cache resources from blob URLs.
2472
2473         Reviewed by Alexey Proskuryakov.
2474
2475         Alexey pointed out after I landed r150169 that blob URLs backed by
2476         files should return an error if the file changed after the URL was
2477         created. By indefinitely caching them in memory, we don't give the
2478         loader a chance to check for modification. Remove "blob" from the list
2479         of schemes that should be indefinitely cached.
2480
2481         * platform/SchemeRegistry.cpp:
2482         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
2483
2484 2013-05-16  Claudio Saavedra  <csaavedra@igalia.com>
2485
2486         [CSS] CSS Variables are case-sensitive
2487         https://bugs.webkit.org/show_bug.cgi?id=116239
2488
2489         Reviewed by Ryosuke Niwa.
2490
2491         The CSS Variables specification states that variables are
2492         case-sensitive, unlike other CSS properties.
2493
2494         Test: fast/css/variables/case-sensitive.html
2495
2496         * css/CSSParser.cpp:
2497         (WebCore::CSSParserString::substring): Replace
2498         the now unnecessary lowerSubstring() with this method.
2499         Also, since the method is only used by the CSS variables
2500         implementation, #ifdef it.
2501         (WebCore::CSSParser::createPrimitiveVariableNameValue):
2502         (WebCore::CSSParser::storeVariableDeclaration):
2503         Do not normalize variable declarations to lowercase.
2504         * css/CSSParserValues.h:
2505         (CSSParserString): Replace the lowerSubstring() declaration
2506         and wrap with #if/#endif.
2507
2508 2013-05-16  Brady Eidson  <beidson@apple.com>
2509
2510         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
2511         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
2512
2513         Reviewed by Sam Weinig.
2514
2515         Give WebKit2 the ability to not mis-cast.
2516
2517         * loader/FrameLoaderClient.h:
2518         (WebCore::FrameLoaderClient::isEmptyFrameLoaderClient): Defaults to false, and include a FIXME
2519           to remove it once https://bugs.webkit.org/show_bug.cgi?id=116233 is resolved.
2520
2521         * loader/EmptyClients.h: Make isEmptyFrameLoaderClient() return true, and add a FIXME to remove it.
2522
2523 2013-05-14  Martin Robinson  <mrobinson@igalia.com>
2524
2525         [GTK] Add support for building WebCore to the cmake build
2526         https://bugs.webkit.org/show_bug.cgi?id=116128
2527
2528         Reviewed by Gustavo Noronha Silva.
2529
2530         * PlatformGTK.cmake: Added.
2531         * platform/gtk/GtkVersioning.c: Include "config.h" because we removed
2532         the autotoolsconfig.h include from the header.
2533         * platform/gtk/GtkVersioning.h: Remove autotoolsconfig.h include to support for
2534         non-autotools build systems.
2535
2536 2013-05-15  Ryosuke Niwa  <rniwa@webkit.org>
2537
2538         DocumentOrderedMap doesn't need to have two HashMaps
2539         https://bugs.webkit.org/show_bug.cgi?id=116167
2540
2541         Reviewed by Geoffrey Garen.
2542
2543         Previously, we had two hash maps: m_map and m_duplicateCounts in DocumentOrderedMap to keep track
2544         of the first element and the number of duplicates for a given name. This patch simplifies this structure
2545         by having a single hash map that contains both the pointer and the number of duplicates.
2546
2547         In addition, this patch fixes a regression introduced in r149652 that window and document name maps
2548         were not updated for some elements inside a SVG use element, and makes use of the newly added list of
2549         the matching elements in SelectorQuery.
2550
2551         * dom/DocumentOrderedMap.cpp:
2552         (WebCore::DocumentOrderedMap::clear): Updated to use the new hash map.
2553         (WebCore::DocumentOrderedMap::add): Ditto.
2554         (WebCore::DocumentOrderedMap::remove): Ditto.
2555         (WebCore::DocumentOrderedMap::get): Ditto.
2556         (WebCore::DocumentOrderedMap::getAllElementsById): Added.
2557
2558         * dom/DocumentOrderedMap.h:
2559
2560         (WebCore::DocumentOrderedMap::MapEntry::MapEntry): Added.
2561         (WebCore::DocumentOrderedMap::containsSingle): Updated to use new hash map.
2562         (WebCore::DocumentOrderedMap::contains): Ditto.
2563         (WebCore::DocumentOrderedMap::containsMultiple): Ditto.
2564
2565         * dom/Element.cpp:
2566         (WebCore::Element::insertedInto): This function didn't add this element to window and document's name maps
2567         if the element had already been inserted into a tree scope, and the current call was inserting an ancestor
2568         of the tree scope into the document. We were exiting early per scope != treeScope().
2569
2570         Fixed the bug by splitting updateId into two functions updateIdForTreeScope and updateIdForDocument.
2571         The former is called when this element is inserted into a new tree scope, and the latter is called when
2572         this element is inserted into a HTML document even if it had already been inside some tree scope.
2573
2574         (WebCore::Element::removedFrom): This function didn't remove this element from tree scope's id maps if
2575         the tree scope wasn't a document. Fixed the bug by simply checking that the removal happens beneath the
2576         current tree scope.
2577         (WebCore::Element::updateName):
2578         (WebCore::Element::updateNameForTreeScope): Renamed from updateName.
2579         (WebCore::Element::updateNameForDocument): Extracted from updateName.
2580         (WebCore::Element::updateId):
2581         (WebCore::Element::updateIdForTreeScope): Renamed from updateId.
2582         (WebCore::Element::updateIdForDocument): Extracted from updateId.
2583
2584         * dom/Element.h:
2585
2586         * dom/SelectorQuery.cpp:
2587         (WebCore::SelectorDataList::canUseIdLookup): Refactored to return the id subselector instead of checking if
2588         the first subselector happens to be matching an id.
2589         (WebCore::SelectorDataList::execute): Use the subselector canUseIdLookup returned. Also make use of newly
2590         added getAllElementsById when there are multiple matching elements for a given id.
2591
2592         * dom/SelectorQuery.h:
2593
2594         * dom/TreeScope.cpp:
2595         (WebCore::TreeScope::getAllElementsById): Added.
2596
2597         * dom/TreeScope.h:
2598
2599 2013-05-15  Darin Adler  <darin@apple.com>
2600
2601         [Mac] Make Clipboard::create functions for Mac platform independent by moving Pasteboard creation to Pasteboard functions
2602         https://bugs.webkit.org/show_bug.cgi?id=116179
2603
2604         Reviewed by Andreas Kling.
2605
2606         * dom/Clipboard.cpp:
2607         (WebCore::Clipboard::createForCopyAndPaste): Moved the function here from
2608         ClipboardMac, and have it use Pasteboard functions that are not Mac-specific.
2609         (WebCore::Clipboard::create): Ditto.
2610         (WebCore::Clipboard::createForDragAndDrop): Ditto.
2611
2612         * platform/DragData.h:
2613         (WebCore::DragData::pasteboardName): Made this const.
2614
2615         * platform/Pasteboard.h: Added new create functions, used by the clipboard
2616         create functions above.
2617
2618         * platform/mac/ClipboardMac.mm: Removed the functions that were moved to the
2619         Clipboard.cpp file.
2620
2621         * platform/mac/PasteboardMac.mm:
2622         (WebCore::Pasteboard::createForCopyAndPaste): Added.
2623         (WebCore::Pasteboard::createPrivate): Added.
2624         (WebCore::Pasteboard::createForDragAndDrop): Added.
2625
2626 2013-05-15  Anders Carlsson  <andersca@apple.com>
2627
2628         Fix a thinko.
2629
2630         We want to invalidate the file icon loader if it exists, not create it!
2631
2632         * html/FileInputType.cpp:
2633         (WebCore::FileInputType::requestIcon):
2634
2635 2013-05-15  Darin Adler  <darin@apple.com>
2636
2637         Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
2638         https://bugs.webkit.org/show_bug.cgi?id=116176
2639
2640         Reviewed by Andreas Kling.
2641
2642         * dom/Clipboard.cpp:
2643         (WebCore::Clipboard::writeRange):
2644         (WebCore::Clipboard::writePlainText):
2645         (WebCore::Clipboard::writeURL):
2646         Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
2647         not make it obvious, these are here only for use by dragging code. Later we may
2648         refactor them away entirely, but for now it's good not to compile them in on any
2649         platform that does not support dragging.
2650
2651 2013-05-15  Andy Estes  <aestes@apple.com>
2652
2653         Resources from non-HTTP schemes should not be cached indefinitely
2654         https://bugs.webkit.org/show_bug.cgi?id=113626
2655
2656         Reviewed by Ryosuke Niwa.
2657
2658         With the exception of schemes that we know will always return the same
2659         result for a given URL, we should not indefinitely cache non-HTTP
2660         resources when their freshness cannot be verified.
2661
2662         Writing a test for this is blocked on https://webkit.org/b/116199.
2663
2664         The following two existing tests of memory cache behavior were
2665         converted to HTTP tests so that they continue to function as expected:
2666
2667         Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
2668                http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html
2669
2670         * loader/cache/CachedResource.cpp:
2671         (WebCore::CachedResource::freshnessLifetime): Returned a freshness
2672         lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
2673         * platform/SchemeRegistry.cpp:
2674         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
2675         Checked whether the scheme is blob:, data:, or applewebdata:.
2676         * platform/SchemeRegistry.h:
2677
2678 2013-05-15  Tim Horton  <timothy_horton@apple.com>
2679
2680         makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
2681         https://bugs.webkit.org/show_bug.cgi?id=116198
2682         <rdar://problem/13904395>
2683
2684         Reviewed by Simon Fraser.
2685
2686         Block Objective-C exceptions in makeRGBAFromNSColor.
2687         Remove a comment saying that they're impossible.
2688
2689         Convert the incoming color to the DeviceRGB colorspace to match
2690         existing color sources. Some rare cases (attributed strings that come
2691         from PDFKit) can have DeviceGrayscale color spaces, which would
2692         previously throw an exception here.
2693
2694         * platform/graphics/mac/ColorMac.mm:
2695         (WebCore::makeRGBAFromNSColor):
2696
2697 2013-05-15  David Kilzer  <ddkilzer@apple.com>
2698
2699         BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
2700
2701         * platform/ios/ClipboardIOS.mm:
2702         (WebCore::ClipboardIOS::ClipboardIOS):
2703         (WebCore::ClipboardIOS::hasData):
2704         (WebCore::ClipboardIOS::clearData):
2705         (WebCore::ClipboardIOS::clearAllData):
2706         (WebCore::ClipboardIOS::getData):
2707         (WebCore::ClipboardIOS::setData):
2708         (WebCore::ClipboardIOS::types):
2709         (WebCore::ClipboardIOS::writeRange):
2710         * platform/ios/PasteboardIOS.mm:
2711         (WebCore::Pasteboard::getStringSelection):
2712         (WebCore::Pasteboard::writeSelection):
2713         (WebCore::Pasteboard::writePlainText):
2714         (WebCore::Pasteboard::writeImage):
2715         (WebCore::Pasteboard::plainText):
2716         (WebCore::documentFragmentWithRTF):
2717         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
2718         (WebCore::Pasteboard::documentFragment):
2719
2720 2013-05-15  Anders Carlsson  <andersca@apple.com>
2721
2722         Stop using the factory pattern in FileIconLoaderClient
2723         https://bugs.webkit.org/show_bug.cgi?id=116197
2724
2725         Reviewed by Andreas Kling.
2726
2727         Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.
2728
2729         * html/FileInputType.cpp:
2730         (WebCore::FileInputType::~FileInputType):
2731         (WebCore::FileInputType::requestIcon):
2732         * html/FileInputType.h:
2733         (FileInputType):
2734         * platform/FileIconLoader.cpp:
2735         (WebCore::FileIconLoader::invalidate):
2736         * platform/FileIconLoader.h:
2737         (WebCore::FileIconLoaderClient::~FileIconLoaderClient):
2738         (FileIconLoader):
2739
2740 2013-05-15  Anders Carlsson  <andersca@apple.com>
2741
2742         Fix FileChooserClient design
2743         https://bugs.webkit.org/show_bug.cgi?id=116195
2744
2745         Reviewed by Andreas Kling.
2746
2747         FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
2748         Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).
2749
2750         Fix this by making it an abstract class, and moving FileChooser into FileInputType.
2751
2752         * html/FileInputType.cpp:
2753         (WebCore::FileInputType::~FileInputType):
2754         Invalidate the file chooser.
2755
2756         (WebCore::FileInputType::handleDOMActivateEvent):
2757         Apply the file chooser settings.
2758
2759         (WebCore::FileInputType::applyFileChooserSettings):
2760         Recreate the file chooser with new settings.
2761
2762         (WebCore::FileInputType::receiveDropForDirectoryUpload):
2763         Apply the settings.
2764
2765         * platform/FileChooser.cpp:
2766         (WebCore::FileChooser::invalidate):
2767         Set m_client to null.
2768
2769         (WebCore::FileChooser::chooseFiles):
2770         Early return.
2771
2772         * platform/FileChooser.h:
2773
2774 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
2775
2776         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
2777         https://bugs.webkit.org/show_bug.cgi?id=116193
2778
2779         Reviewed by Darin Adler
2780
2781         * dom/ScriptedAnimationController.cpp:
2782         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
2783         (WebCore::ScriptedAnimationController::setThrottled):
2784         (WebCore::ScriptedAnimationController::scheduleAnimation):
2785         * dom/ScriptedAnimationController.h:
2786         (ScriptedAnimationController):
2787             - Fixes for review comments.
2788
2789 2013-05-15  Anders Carlsson  <andersca@apple.com>
2790
2791         Move HTTPRequest class to WebKit2
2792         https://bugs.webkit.org/show_bug.cgi?id=116192
2793
2794         Reviewed by Darin Adler.
2795
2796         HTTPRequest is only used by the "remote inspector" feature in WebKit2,
2797         so there's no need to have it in WebCore.
2798
2799         * CMakeLists.txt:
2800         * GNUmakefile.list.am:
2801         * Target.pri:
2802         * WebCore.vcproj/WebCore.vcproj:
2803         * WebCore.vcxproj/WebCore.vcxproj:
2804         * WebCore.vcxproj/WebCore.vcxproj.filters:
2805         * WebCore.xcodeproj/project.pbxproj:
2806
2807 2013-05-15  Oliver Hunt  <oliver@apple.com>
2808
2809         RefCountedArray needs to use vector initialisers for its backing store
2810         https://bugs.webkit.org/show_bug.cgi?id=116194
2811
2812         Reviewed by Gavin Barraclough.
2813
2814         Update to use new functions for operating on the exception stack.
2815
2816         * bindings/js/ScriptCallStackFactory.cpp:
2817         (WebCore::createScriptCallStackFromException):
2818
2819 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
2820
2821         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
2822         https://bugs.webkit.org/show_bug.cgi?id=116193
2823
2824         Reviewed by Simon Fraser.
2825
2826         * dom/ScriptedAnimationController.cpp:
2827         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
2828             - initialize m_throttled
2829         (WebCore::ScriptedAnimationController::setThrottled):
2830             - sets m_throttled, reschedule when this changes.
2831         (WebCore::ScriptedAnimationController::scheduleAnimation):
2832             - if throtled don't use a display link, and extend the timeout.
2833         * dom/ScriptedAnimationController.h:
2834         (ScriptedAnimationController):
2835             - Added m_throttled
2836
2837 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
2838
2839         Process suppression should throttle scripted animations
2840         https://bugs.webkit.org/show_bug.cgi?id=115812
2841
2842         Reviewed by Simon Fraser.
2843
2844         <rdar://problem/13799726>
2845
2846         * WebCore.exp.in:
2847             - Expose Page::setThrottled
2848         * dom/Document.cpp:
2849         (WebCore::Document::scriptedAnimationControllerSetThrottled):
2850         (WebCore):
2851         * dom/Document.h:
2852         (Document):
2853             - Forwards to ScriptedAnimationController::setThrottled
2854         * dom/ScriptedAnimationController.cpp:
2855         (WebCore::ScriptedAnimationController::setThrottled):
2856         (WebCore):
2857         * dom/ScriptedAnimationController.h:
2858             - Force use of a timer.
2859         (ScriptedAnimationController):
2860         * page/Page.cpp:
2861         (WebCore::Page::setThrottled):
2862         (WebCore):
2863         * page/Page.h:
2864         (Page):
2865             - When under throttling force the ScriptedAnimationController to use a timer.
2866
2867 2013-05-15  Igor Oliveira  <igor.o@sisa.samsung.com>
2868
2869         Implement run-in remove child cases.
2870         https://bugs.webkit.org/show_bug.cgi?id=86520
2871
2872         Move runin to original position when sibling element is destroyed.
2873
2874         Reviewed by David Hyatt.
2875
2876         Tests: fast/runin/runin-remove-child-simple.html
2877                fast/runin/runin-sibling-inline.html
2878
2879         * rendering/RenderBlock.cpp:
2880         (WebCore::RenderBlock::willBeDestroyed):
2881         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
2882             If moveRunInUnderSiblingBlockIfNeeded is called when the sibling run-in block
2883             is being destroyed, it means that the run-in is moving to original position and
2884             we do not need to do nothing.
2885
2886 2013-05-15  Anders Carlsson  <andersca@apple.com>
2887
2888         Remove WebSocketHandshakeResponse class
2889         https://bugs.webkit.org/show_bug.cgi?id=116190
2890
2891         Reviewed by Andreas Kling.
2892
2893         Just use ResourceResponse instead of WebSocketHandshakeResponse.
2894
2895         * CMakeLists.txt:
2896         * GNUmakefile.list.am:
2897         * Modules/websockets/WebSocketHandshake.cpp:
2898         (WebCore::WebSocketHandshake::readServerHandshake):
2899         (WebCore::WebSocketHandshake::serverWebSocketProtocol):
2900         (WebCore::WebSocketHandshake::serverSetCookie):
2901         (WebCore::WebSocketHandshake::serverSetCookie2):
2902         (WebCore::WebSocketHandshake::serverUpgrade):
2903         (WebCore::WebSocketHandshake::serverConnection):
2904         (WebCore::WebSocketHandshake::serverWebSocketAccept):
2905         (WebCore::WebSocketHandshake::serverHandshakeResponse):
2906         (WebCore::WebSocketHandshake::readHTTPHeaders):
2907         * Modules/websockets/WebSocketHandshake.h:
2908         * Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
2909         * Modules/websockets/WebSocketHandshakeResponse.h: Removed.
2910         * Target.pri:
2911         * WebCore.vcproj/WebCore.vcproj:
2912         * WebCore.vcxproj/WebCore.vcxproj:
2913         * WebCore.vcxproj/WebCore.vcxproj.filters:
2914         * WebCore.xcodeproj/project.pbxproj:
2915         * inspector/InspectorInstrumentation.cpp:
2916         (WebCore):
2917         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
2918         * inspector/InspectorInstrumentation.h:
2919         (InspectorInstrumentation):
2920         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
2921         * inspector/InspectorResourceAgent.cpp:
2922         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
2923         * inspector/InspectorResourceAgent.h:
2924         (WebCore):
2925         (InspectorResourceAgent):
2926
2927 2013-05-15  Eric Carlson  <eric.carlson@apple.com>
2928
2929         [Mac] media engine may deliver NULL in-band "cue"
2930         https://bugs.webkit.org/show_bug.cgi?id=116180
2931
2932         Reviewed by Jer Noble.
2933
2934         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2935         (WebCore::InbandTextTrackPrivateAVF::processCue): NULL check before logging cue count.
2936
2937 2013-05-15  Darin Adler  <darin@apple.com>
2938
2939         List platforms that still use the legacy clipboard instead of just saying "not Mac"
2940         https://bugs.webkit.org/show_bug.cgi?id=116177
2941
2942         Reviewed by Andreas Kling.
2943
2944         * dom/Clipboard.h: Replaced the "!MAC || IOS" with a list of platforms still on the
2945         legacy model.
2946
2947 2013-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>
2948
2949         We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
2950         https://bugs.webkit.org/show_bug.cgi?id=116119
2951
2952         Reviewed by Oliver Hunt.
2953
2954         MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
2955         to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
2956         cleared when we cancel the loader.
2957
2958         No new tests needed.
2959
2960         * loader/DocumentLoader.cpp:
2961         (WebCore::DocumentLoader::~DocumentLoader):
2962         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
2963         (WebCore::DocumentLoader::cancelMainResourceLoad):
2964         (WebCore::DocumentLoader::clearMainResource):
2965         (WebCore):
2966         * loader/DocumentLoader.h: add helper method clearMainResource()
2967         (DocumentLoader):
2968
2969 2013-05-15  Joe Mason  <jmason@blackberry.com>
2970
2971         [BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
2972         https://bugs.webkit.org/show_bug.cgi?id=116164
2973
2974         Reviewed by Rob Buis.
2975
2976         Internal PR: 338490
2977         Internally Reviewed By: Lyon Chen
2978
2979         When there are multiple HTTP requests in flight with the same bad credentials (common with
2980         proxy auth if the user mistyped their password), the first 407 that's received will cause
2981         the credentials to be purged and the password dialog to open for new credentials. This means
2982         that all 407's received after this should only purge the credentials if they have not
2983         already been updated from the dialog; otherwise they will be wiping out credentials that
2984         haven't failed yet.
2985
2986         * platform/network/blackberry/NetworkJob.cpp:
2987         (WebCore::NetworkJob::sendRequestWithCredentials):
2988         (WebCore::NetworkJob::purgeCredentials):
2989
2990 2013-05-15  Chris Fleizach  <cfleizach@apple.com>
2991
2992         AX: Use caching when requesting children object on iOS
2993         https://bugs.webkit.org/show_bug.cgi?id=116112
2994
2995         Reviewed by David Kilzer.
2996
2997         Building up the children list in the AX hierarchy can be time consuming. On iOS, this
2998         is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).
2999
3000         We can speed everything up if we just cache the isIgnored() attribute while building up children.
3001
3002         * accessibility/AXObjectCache.cpp:
3003         (WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler):
3004         (WebCore):
3005         (WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler):
3006         * accessibility/AXObjectCache.h:
3007         (AXAttributeCacheEnabler):
3008         (WebCore):
3009         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3010         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
3011         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
3012         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
3013         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
3014         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
3015
3016 2013-05-15  Anders Carlsson  <andersca@apple.com>
3017
3018         Remove WebSocketHandshakeRequest class
3019         https://bugs.webkit.org/show_bug.cgi?id=116178
3020
3021         Reviewed by Andreas Kling.
3022
3023         Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason 
3024         why we can't just use a ResourceRequest instead.
3025
3026         * CMakeLists.txt:
3027         * GNUmakefile.list.am:
3028         * Modules/websockets/WebSocketChannel.cpp:
3029         (WebCore::WebSocketChannel::didOpenSocketStream):
3030         * Modules/websockets/WebSocketHandshake.cpp:
3031         (WebCore::WebSocketHandshake::clientHandshakeRequest):
3032         * Modules/websockets/WebSocketHandshake.h:
3033         (WebCore):
3034         * Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
3035         * Modules/websockets/WebSocketHandshakeRequest.h: Removed.
3036         * Target.pri:
3037         * WebCore.vcproj/WebCore.vcproj:
3038         * WebCore.vcxproj/WebCore.vcxproj:
3039         * WebCore.vcxproj/WebCore.vcxproj.filters:
3040         * WebCore.xcodeproj/project.pbxproj:
3041         * inspector/InspectorInstrumentation.cpp:
3042         (WebCore):
3043         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
3044         * inspector/InspectorInstrumentation.h:
3045         (InspectorInstrumentation):
3046         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
3047         * inspector/InspectorResourceAgent.cpp:
3048         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3049         * inspector/InspectorResourceAgent.h:
3050         (WebCore):
3051         (InspectorResourceAgent):
3052         * platform/network/HTTPRequest.cpp:
3053         (WebCore):
3054
3055 2013-05-15  Darin Adler  <darin@apple.com>
3056
3057         Try to fix iOS build.
3058
3059         * platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
3060         on iOS.
3061
3062 2013-05-13  Anders Carlsson  <andersca@apple.com>
3063
3064         Frame::editor() should return a reference
3065         https://bugs.webkit.org/show_bug.cgi?id=116037
3066
3067         Reviewed by Darin Adler.
3068
3069         A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
3070         Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.
3071
3072         * accessibility/AccessibilityObject.cpp:
3073         (WebCore::AccessibilityObject::hasMisspelling):
3074         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3075         (AXAttributeStringSetSpelling):
3076         * dom/ContainerNode.cpp:
3077         (WebCore::ContainerNode::cloneChildNodes):
3078         * dom/Document.cpp:
3079         (WebCore::acceptsEditingFocus):
3080         (WebCore::Document::setFocusedNode):
3081         (WebCore::command):
3082         * editing/AlternativeTextController.cpp:
3083         (WebCore::AlternativeTextController::timerFired):
3084         (WebCore::AlternativeTextController::applyDictationAlternative):
3085         * editing/CompositeEditCommand.cpp:
3086         (WebCore::EditCommandComposition::unapply):
3087         (WebCore::EditCommandComposition::reapply):
3088         (WebCore::CompositeEditCommand::apply):
3089         (WebCore::CompositeEditCommand::moveParagraphs):
3090         * editing/DeleteButton.cpp:
3091         (WebCore::DeleteButton::defaultEventHandler):
3092         * editing/DeleteButtonController.cpp:
3093         (WebCore::DeleteButtonController::show):
3094         * editing/DeleteButtonController.h:
3095         (WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
3096         (WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
3097         * editing/DeleteSelectionCommand.cpp:
3098         (WebCore::DeleteSelectionCommand::mergeParagraphs):
3099         (WebCore::DeleteSelectionCommand::doApply):
3100         * editing/EditCommand.cpp:
3101         (WebCore::EditCommand::EditCommand):
3102         * editing/EditingStyle.cpp:
3103         (WebCore::StyleChange::StyleChange):
3104         * editing/Editor.cpp:
3105         (WebCore::Editor::markMisspellingsAfterTypingToWord):
3106         * editing/EditorCommand.cpp:
3107         (WebCore::applyCommandToFrame):
3108         (WebCore::executeToggleStyle):
3109         (WebCore::executeApplyParagraphStyle):
3110         (WebCore::expandSelectionToGranularity):
3111         (WebCore::stateStyle):
3112         (WebCore::valueStyle):
3113         (WebCore::executeCopy):
3114         (WebCore::executeCut):
3115         (WebCore::executeDefaultParagraphSeparator):
3116         (WebCore::executeDelete):
3117         (WebCore::executeDeleteBackward):
3118         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter):
3119         (WebCore::executeDeleteForward):
3120         (WebCore::executeDeleteToBeginningOfLine):
3121         (WebCore::executeDeleteToBeginningOfParagraph):
3122         (WebCore::executeDeleteToEndOfLine):
3123         (WebCore::executeDeleteToEndOfParagraph):
3124         (WebCore::executeDeleteToMark):
3125         (WebCore::executeDeleteWordBackward):
3126         (WebCore::executeDeleteWordForward):
3127         (WebCore::executeFindString):
3128         (WebCore::executeForwardDelete):
3129         (WebCore::executeIgnoreSpelling):
3130         (WebCore::executeInsertNewline):
3131         (WebCore::executeMakeTextWritingDirectionLeftToRight):
3132         (WebCore::executeMakeTextWritingDirectionNatural):
3133         (WebCore::executeMakeTextWritingDirectionRightToLeft):
3134         (WebCore::executeToggleOverwrite):
3135         (WebCore::executePaste):
3136         (WebCore::executePasteGlobalSelection):
3137         (WebCore::executePasteAndMatchStyle):
3138         (WebCore::executePasteAsPlainText):
3139         (WebCore::executeRedo):
3140         (WebCore::executeRemoveFormat):
3141         (WebCore::executeSelectToMark):
3142         (WebCore::executeSetMark):
3143         (WebCore::executeStyleWithCSS):
3144         (WebCore::executeUseCSS):
3145         (WebCore::executeSwapWithMark):
3146         (WebCore::executeTakeFindStringFromSelection):
3147         (WebCore::executeTranspose):
3148         (WebCore::executeUndo):
3149         (WebCore::executeYank):
3150         (WebCore::executeYankAndSelect):
3151         (WebCore::supportedCopyCut):
3152         (WebCore::supportedPaste):
3153         (WebCore::enabledVisibleSelection):
3154         (WebCore::enabledVisibleSelectionAndMark):
3155         (WebCore::enableCaretInEditableText):
3156         (WebCore::enabledCopy):
3157         (WebCore::enabledCut):
3158         (WebCore::enabledInEditableText):
3159         (WebCore::enabledDelete):
3160         (WebCore::enabledPaste):
3161         (WebCore::enabledRedo):
3162         (WebCore::enabledTakeFindStringFromSelection):
3163         (WebCore::enabledUndo):
3164         (WebCore::stateOrderedList):
3165         (WebCore::stateStyleWithCSS):
3166         (WebCore::stateUnorderedList):
3167         (WebCore::valueDefaultParagraphSeparator):
3168         * editing/FrameSelection.cpp:
3169         (WebCore::shouldAlwaysUseDirectionalSelection):
3170         (WebCore::FrameSelection::setSelection):
3171         (WebCore::FrameSelection::nextWordPositionForPlatform):
3172         (WebCore::FrameSelection::modifyMovingRight):
3173         (WebCore::FrameSelection::modifyMovingLeft):
3174         (WebCore::FrameSelection::modify):
3175         (WebCore::shouldStopBlinkingDueToTypingCommand):
3176         (WebCore::FrameSelection::shouldDeleteSelection):
3177         (WebCore::FrameSelection::shouldChangeSelection):
3178         * editing/InsertTextCommand.cpp:
3179         (WebCore::InsertTextCommand::doApply):
3180         * editing/SpellChecker.cpp:
3181         (WebCore::SpellChecker::didCheck):
3182         * editing/SpellingCorrectionCommand.cpp:
3183         * editing/TypingCommand.cpp:
3184         (WebCore::TypingCommand::insertText):
3185         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
3186         (WebCore::TypingCommand::markMisspellingsAfterTyping):
3187         (WebCore::TypingCommand::typingAddedToOpenCommand):
3188         (WebCore::TypingCommand::deleteKeyPressed):
3189         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3190         * editing/htmlediting.cpp:
3191         (WebCore::createDefaultParagraphElement):
3192         * editing/mac/EditorMac.mm:
3193         (WebCore::Editor::pasteWithPasteboard):
3194         * editing/markup.cpp:
3195         (WebCore::createMarkup):
3196         * html/HTMLInputElement.cpp:
3197         (WebCore::HTMLInputElement::endEditing):
3198         * html/HTMLTextAreaElement.cpp:
3199         (WebCore::HTMLTextAreaElement::subtreeHasChanged):
3200         * html/TextFieldInputType.cpp:
3201         (WebCore::TextFieldInputType::handleKeydownEvent):
3202         (WebCore::TextFieldInputType::didSetValueByUserEdit):
3203         * loader/FrameLoader.cpp:
3204         (WebCore::FrameLoader::closeURL):
3205         (WebCore::FrameLoader::didOpenURL):
3206         (WebCore::FrameLoader::clear):
3207         * page/ContextMenuController.cpp:
3208         (WebCore::insertUnicodeCharacter):
3209         (WebCore::ContextMenuController::contextMenuItemSelected):
3210         (WebCore::ContextMenuController::populate):
3211         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
3212         * page/DOMWindow.cpp:
3213         (WebCore::DOMWindow::find):
3214         * page/DragController.cpp:
3215         (WebCore::DragController::dispatchTextInputEventFor):
3216         (WebCore::DragController::concludeEditDrag):
3217         (WebCore::DragController::startDrag):
3218         * page/EventHandler.cpp:
3219         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
3220         (WebCore::EventHandler::handleMousePressEventSingleClick):
3221         (WebCore::EventHandler::handlePasteGlobalSelection):
3222         (WebCore::EventHandler::sendContextMenuEvent):
3223         (WebCore::EventHandler::sendContextMenuEventForKey):
3224         (WebCore::EventHandler::keyEvent):
3225         (WebCore::EventHandler::defaultKeyboardEventHandler):
3226         (WebCore::EventHandler::defaultTextInputEventHandler):
3227         (WebCore::EventHandler::defaultBackspaceEventHandler):
3228         * page/FocusController.cpp:
3229         (WebCore::relinquishesEditingFocus):
3230         * page/Frame.cpp:
3231         (WebCore::Frame::rangeForPoint):
3232         * page/Frame.h:
3233         (Frame):
3234         (WebCore::Frame::editor):
3235         * page/Page.cpp:
3236         (WebCore::Page::findString):
3237         (WebCore::Page::findStringMatchingRanges):
3238         (WebCore::Page::rangeOfString):
3239         (WebCore::Page::markAllMatchesForText):
3240         (WebCore::Page::setDeviceScaleFactor):
3241         * platform/mac/ClipboardMac.mm:
3242         (WebCore::ClipboardMac::writeRange):
3243         * platform/mac/DragDataMac.mm:
3244         (WebCore::DragData::asURL):
3245         * platform/mac/PasteboardMac.mm:
3246         (WebCore::Pasteboard::getStringSelection):
3247         (WebCore::Pasteboard::getDataSelection):
3248         (WebCore::Pasteboard::writeSelectionForTypes):
3249         (WebCore::writeURLForTypes):
3250         (WebCore::Pasteboard::plainText):
3251         (WebCore::documentFragmentWithRTF):
3252         (WebCore::Pasteboard::documentFragment):
3253         * rendering/HitTestResult.cpp:
3254         (WebCore::HitTestResult::dictationAlternatives):
3255         * rendering/InlineTextBox.cpp:
3256         (WebCore::InlineTextBox::paint):
3257         (WebCore::InlineTextBox::paintTextMatchMarker):
3258         * rendering/RenderBlock.cpp:
3259         (WebCore::RenderBlock::positionForPointWithInlineChildren):
3260         * testing/Internals.cpp:
3261         (WebCore::spellchecker):
3262         (WebCore::Internals::resetToConsistentState):
3263         (WebCore::Internals::hasSpellingMarker):
3264         (WebCore::Internals::hasAutocorrectedMarker):
3265         (WebCore::Internals::setContinuousSpellCheckingEnabled):
3266         (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
3267         (WebCore::Internals::setAutomaticLinkDetectionEnabled):
3268         (WebCore::Internals::setAutomaticDashSubstitutionEnabled):
3269         (WebCore::Internals::setAutomaticTextReplacementEnabled):
3270         (WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
3271         (WebCore::Internals::isOverwriteModeEnabled):
3272         (WebCore::Internals::toggleOverwriteModeEnabled):
3273         (WebCore::Internals::hasGrammarMarker):
3274
3275 2013-05-15  Darin Adler  <darin@apple.com>
3276
3277         [Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
3278         https://bugs.webkit.org/show_bug.cgi?id=116166
3279
3280         Reviewed by Anders Carlsson.
3281
3282         * WebCore.exp.in: Add ~Clipboard since it's no longer a virtual function, but to the
3283         non-iOS section, since iOS is still using the legacy version of Clipboard.
3284
3285         * dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.
3286
3287 2013-05-15  Dongseong Hwang  <dongseong.hwang@intel.com>
3288
3289         Remove an overloaded strokeRect in <canvas>
3290         https://bugs.webkit.org/show_bug.cgi?id=116017
3291
3292         Reviewed by Benjamin Poulain.
3293
3294         The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
3295         remains only strokeRect with 4 arguments.
3296
3297         [1] http://www.w3.org/TR/2dcontext2/
3298
3299         Covered by existing tests: canvas/philip/tests/2d.missingargs.html
3300
3301         * html/canvas/CanvasRenderingContext2D.cpp:
3302         (WebCore::CanvasRenderingContext2D::strokeRect):
3303         * html/canvas/CanvasRenderingContext2D.h:
3304         (CanvasRenderingContext2D):
3305         * html/canvas/CanvasRenderingContext2D.idl:
3306
3307 2013-05-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3308
3309         [css3-text] text-decoration-line now accepts "blink" as valid value
3310         https://bugs.webkit.org/show_bug.cgi?id=116104
3311
3312         Reviewed by Andreas Kling.
3313
3314         As of November 13th 2012, the W3C specification has been updated to
3315         accept "blink" as a valid property value in text-decoration-line. Though
3316         accepting the value as valid, it is ignored as CSS Level 1
3317         text-decoration property currently does.
3318
3319         Updated related layout tests to reflect changes in specification.
3320
3321         * css/CSSParser.cpp:
3322         (WebCore::CSSParser::parseValue):
3323         (WebCore::CSSParser::parseTextDecoration):
3324
3325 2013-05-14  Simon Fraser  <simon.fraser@apple.com>
3326
3327         Revert http://trac.webkit.org/changeset/150047
3328         
3329         It introduced unwanted behavioral differences between
3330         Retina and non-Retina Mac hardware.
3331
3332         * platform/graphics/ca/GraphicsLayerCA.cpp:
3333         (WebCore::GraphicsLayerCA::requiresTiledLayer):
3334         (WebCore::GraphicsLayerCA::computePixelAlignment):
3335
3336 2013-05-15  Darin Adler  <darin@apple.com>
3337
3338         [Mac] Remove the ClipboardMac class and header file
3339         https://bugs.webkit.org/show_bug.cgi?id=116165
3340
3341         Reviewed by Anders Carlsson.
3342
3343         * WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
3344         * editing/mac/EditorMac.mm: Import Clipboard.h rather than ClipboardMac.h.
3345         * page/mac/EventHandlerMac.mm: Ditto.
3346         * platform/mac/ClipboardMac.h: Removed.
3347
3348         * platform/mac/ClipboardMac.mm: Import Clipboard.h rather than ClipboardMac.h.
3349         Deleted ClipboardMac constructor.
3350
3351 2013-05-15  Darin Adler  <darin@apple.com>
3352
3353         [Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
3354         https://bugs.webkit.org/show_bug.cgi?id=116163
3355
3356         Reviewed by Anders Carlsson.
3357
3358         * dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.
3359
3360         * platform/mac/ClipboardMac.mm: Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
3361         and it's not helpful to have the conditionals in here. It's helpful in cross-platform
3362         source files.
3363         (WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
3364         Later could refactor to have the Pasteboard creation be platform-specific, and make these
3365         functions platform-independent.
3366         (WebCore::Clipboard::createForDragAndDrop): Ditto.
3367         (WebCore::Clipboard::createForCopyAndPaste): Ditto.
3368
3369 2013-05-15  Darin Adler  <darin@apple.com>
3370
3371         [Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
3372         https://bugs.webkit.org/show_bug.cgi?id=116162
3373
3374         Reviewed by Andreas Kling.
3375
3376         * dom/Clipboard.h: Add createForCopyAndPaste function.
3377
3378         * editing/mac/EditorMac.mm:
3379         (WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.
3380
3381         * platform/mac/ClipboardMac.mm:
3382         (WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
3383         Editor::newGeneralClipboard.
3384
3385 2013-05-15  Darin Adler  <darin@apple.com>
3386
3387         [Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
3388         https://bugs.webkit.org/show_bug.cgi?id=116161
3389
3390         Reviewed by Andreas Kling.
3391
3392         * dom/Clipboard.h: Added createForDragAndDrop function.
3393
3394         * page/mac/EventHandlerMac.mm:
3395         (WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
3396         instead of ClipboardMac::create.
3397
3398         * platform/mac/ClipboardMac.mm:
3399         (WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
3400         EventHandler::createDraggingClipboard function did, soon to be refactored better.
3401
3402 2013-05-15  Darin Adler  <darin@apple.com>
3403
3404         [Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
3405         https://bugs.webkit.org/show_bug.cgi?id=116159
3406
3407         Reviewed by Andreas Kling.
3408
3409         * dom/Clipboard.h:
3410         (WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
3411         object and need to get to the Pasteboard platform abstraction.
3412
3413         * editing/Editor.cpp:
3414         (WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
3415         Our long term plan is to delete writeClipboard.
3416
3417         * platform/Pasteboard.h: Added writePasteboard function.
3418         (WebCore::Pasteboard::name): Made this const.
3419
3420         * platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
3421         Deleted all the data members and the virtual destructor.
3422
3423         * platform/mac/ClipboardMac.mm: Deleted the many includes that are no longer needed.
3424         Deleted the destructor, since it's now automatically generated. Deleted the comment
3425         on an #endif since it's only a few source lines away from the #if.
3426         (WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
3427         since they are no longer used.
3428
3429         * platform/mac/PasteboardMac.mm: Changed include to Clipboard.h instead of ClipboardMac.h.
3430         (WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.
3431
3432 2013-05-15  Seokju Kwon  <seokju.kwon@gmail.com>
3433
3434         Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
3435         https://bugs.webkit.org/show_bug.cgi?id=116144
3436
3437         Reviewed by Timothy Hatcher.
3438
3439         No new tests, no behavior change.
3440
3441         * inspector/Inspector.json:
3442
3443 2013-05-15  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3444
3445         [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
3446         https://bugs.webkit.org/show_bug.cgi?id=116035
3447
3448         Reviewed by Allan Sandfeld Jensen.
3449
3450         The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
3451         which expects its QNetworkAccessManager to still be alive.
3452
3453         Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
3454         instead. The QNetworkReply doesn't need to be aborted in this case anyway.
3455
3456         * platform/network/qt/QNetworkReplyHandler.cpp:
3457         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
3458         (WebCore::QNetworkReplyWrapper::release):
3459         (WebCore::QNetworkReplyWrapper::stopForwarding):
3460           Rename resetConnections to stopForwarding since not all connections are related
3461           to data forwarding to the client anymore.
3462         (WebCore::QNetworkReplyWrapper::receiveMetaData):
3463         (WebCore::QNetworkReplyWrapper::replyDestroyed):
3464         (WebCore::QNetworkReplyWrapper::didReceiveFinished):
3465         * platform/network/qt/QNetworkReplyHandler.h:
3466         (QNetworkReplyWrapper):
3467
3468 2013-05-15  Darin Adler  <darin@apple.com>
3469
3470         [Mac] Make Clipboard::declareAndWriteDragImage non-virtual
3471         https://bugs.webkit.org/show_bug.cgi?id=116156
3472
3473         Reviewed by Anders Carlsson.
3474
3475         * dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
3476