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