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