2011-04-11 Chris Marrin <cmarrin@apple.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-11  Chris Marrin  <cmarrin@apple.com>
2
3         Rubberstamped by Dan Bernstein.
4
5         xhr.responseType = 'arraybuffer' works on Mac but not on Windows
6         https://bugs.webkit.org/show_bug.cgi?id=50334
7
8         Got rid of guards around arraybuffer logic in XHR. ArrayBuffer and friends
9         are always turned on now, so there's not need for the guard. I reenabled the
10         test that was Skipped on Windows and it works now.
11
12         * bindings/js/JSXMLHttpRequestCustom.cpp:
13         (WebCore::JSXMLHttpRequest::markChildren):
14         (WebCore::JSXMLHttpRequest::send):
15         (WebCore::JSXMLHttpRequest::response):
16         * xml/XMLHttpRequest.cpp:
17         (WebCore::XMLHttpRequest::responseArrayBuffer):
18         (WebCore::XMLHttpRequest::setResponseType):
19         (WebCore::XMLHttpRequest::send):
20         (WebCore::XMLHttpRequest::clearResponseBuffers):
21         (WebCore::XMLHttpRequest::didReceiveData):
22         * xml/XMLHttpRequest.h:
23         (WebCore::XMLHttpRequest::optionalResponseArrayBuffer):
24
25 2011-04-11  Anna Cavender  <annacc@chromium.org>
26
27         Reviewed by Eric Carlson.
28
29         Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
30         https://bugs.webkit.org/show_bug.cgi?id=53556
31
32         No new tests. No real functionality added just yet.
33
34         * CMakeLists.txt:
35         * CodeGenerators.pri:
36         * Configurations/FeatureDefines.xcconfig:
37         * DerivedSources.make:
38         * GNUmakefile.am:
39         * GNUmakefile.list.am:
40         * WebCore.gypi:
41         * WebCore.xcodeproj/project.pbxproj:
42         * features.pri:
43         * html/HTMLAttributeNames.in:
44         * html/HTMLTagNames.in:
45         * html/HTMLTrackElement.cpp: Added.
46         (WebCore::HTMLTrackElement::HTMLTrackElement):
47         (WebCore::HTMLTrackElement::create):
48         (WebCore::HTMLTrackElement::insertedIntoTree):
49         (WebCore::HTMLTrackElement::willRemove):
50         (WebCore::HTMLTrackElement::src):
51         (WebCore::HTMLTrackElement::setSrc):
52         (WebCore::HTMLTrackElement::kind):
53         (WebCore::HTMLTrackElement::setKind):
54         (WebCore::HTMLTrackElement::srclang):
55         (WebCore::HTMLTrackElement::setSrclang):
56         (WebCore::HTMLTrackElement::label):
57         (WebCore::HTMLTrackElement::setLabel):
58         (WebCore::HTMLTrackElement::isDefault):
59         (WebCore::HTMLTrackElement::setIsDefault):
60         (WebCore::HTMLTrackElement::isURLAttribute):
61         * html/HTMLTrackElement.h: Added.
62         * html/HTMLTrackElement.idl: Added.
63
64 2011-04-11  Ben Taylor  <bentaylor.solx86@gmail.com>
65
66         Reviewed by David Levin.
67
68         https://bugs.webkit.org/show_bug.cgi?id=57535
69
70         Better compile fix for Solaris 10/Sun Studio 12 CC 
71         needing <sys/time.h>
72
73         * loader/icon/IconRecord.h:
74         * page/Page.h:
75         * platform/network/ResourceResponseBase.h:
76
77 2011-04-11  Alexey Proskuryakov  <ap@apple.com>
78
79         Reviewed by Maciej Stachowiak.
80
81         WebKit2: Cannot use Ctrl-Delete as a custom keyboard shortcut
82         https://bugs.webkit.org/show_bug.cgi?id=58265
83         <rdar://problem/9221468>
84
85         * page/EventHandler.cpp:
86         (WebCore::EventHandler::defaultKeyboardEventHandler): Handle Backspace.
87         (WebCore::EventHandler::defaultSpaceEventHandler): Enabled this on Mac, and added checks for
88         other modifiers - no one wants to scroll on Ctrl+Alt+Space and such.
89         (WebCore::EventHandler::defaultBackspaceEventHandler): Backspace goes back, Shift-backspace
90         goes forward. All browsers do it.
91         (WebCore::EventHandler::defaultArrowEventHandler): Assert that this function was called
92         for a correct event.
93         (WebCore::EventHandler::defaultTabEventHandler): Ditto.
94
95         * page/EventHandler.h: Added defaultBackspaceEventHandler.
96
97 2011-04-11  Matthew Delaney  <mdelaney@apple.com>
98
99         Reviewed by Dan Bernstein.
100
101         [CG] drawImage with a subimage bleeds pixel data at borders
102         https://bugs.webkit.org/show_bug.cgi?id=58267
103
104         Test: fast/canvas/DrawImageSinglePixelStretch.html
105
106         * platform/graphics/cg/ImageCG.cpp:
107         (WebCore::BitmapImage::draw): Any interpolation quality other than 'none' will graft out the subimage first now.
108
109 2011-04-11  Chris Marrin  <cmarrin@apple.com>
110
111         Reviewed by Simon Fraser.
112
113         iframe/compositing propagation should also work for <object> and framesets
114         https://bugs.webkit.org/show_bug.cgi?id=39037
115
116         Generalized the code that handles the parenting of composited <iframe> elements
117         to include <frame> and <object> elements. This includes forcing the parent
118         element to be composited and constructing the layer tree in the child document
119         and properly parenting it. Much of the change is giving the function calls more
120         generic names (from ...IFrame... to ...Frame...)
121         
122         Compositing tests that were done in RenderIFrame have been moved to RenderPart
123         since this is the highest base class common to all 3 elements.
124         
125         I also renamed several ...IFrame... functions to
126         ...Frame... and changed them so they work on a RenderPart for determining
127         if the renderer is composited. One other detail is that <iframe> and 
128         <object> never share style since they might be composited. I had to add
129         <frame> to that list.
130
131         Tests: compositing/framesets/composited-frame-alignment.html
132                compositing/objects/composited-object-alignment.html
133
134         * css/CSSStyleSelector.cpp: Add <frame> to list of element types that should never share style since it might be composited.
135         (WebCore::CSSStyleSelector::canShareStyleWithElement):
136         * page/FrameView.cpp:
137         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
138         (WebCore::FrameView::setIsOverlapped):
139         * rendering/RenderIFrame.cpp: Moved methods to RenderPart
140         * rendering/RenderIFrame.h:
141         * rendering/RenderLayerBacking.cpp:
142         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
143         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
144         (WebCore::RenderLayerBacking::paintingGoesToWindow):
145         * rendering/RenderLayerCompositor.cpp:
146         (WebCore::RenderLayerCompositor::updateBacking):
147         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
148         (WebCore::RenderLayerCompositor::frameContentsCompositor):
149         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
150         (WebCore::RenderLayerCompositor::didMoveOnscreen):
151         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames):
152         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
153         (WebCore::RenderLayerCompositor::enclosingFrameElement):
154         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
155         (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
156         (WebCore::RenderLayerCompositor::requiresScrollLayer):
157         (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
158         (WebCore::RenderLayerCompositor::attachRootPlatformLayer):
159         (WebCore::RenderLayerCompositor::detachRootPlatformLayer):
160         * rendering/RenderLayerCompositor.h:
161         * rendering/RenderPart.cpp: Functions moved from RenderIFrame
162         (WebCore::RenderPart::requiresLayer):
163         (WebCore::RenderPart::requiresAcceleratedCompositing):
164         * rendering/RenderPart.h:
165
166 2011-04-11  Yael Aharon  <yael.aharon@nokia.com>
167
168         Reviewed by Eric Seidel.
169
170         InlineBox::prevOnline and InlineBox::prevOnlineExists() are confusing and should be renamed
171         https://bugs.webkit.org/show_bug.cgi?id=57178
172
173         Remove prevOnLineExists() and nextOnLineExists() as they are not used anymore.
174         No new tests needed because this is cleanup only.
175
176         * rendering/InlineBox.cpp:
177         * rendering/InlineBox.h:
178         (WebCore::InlineBox::InlineBox):
179         (WebCore::InlineBox::setPrevOnLine):
180
181 2011-04-11  David Hyatt  <hyatt@apple.com>
182
183         Reviewed by Dan Bernstein.
184
185         https://bugs.webkit.org/show_bug.cgi?id=58261
186
187         Fix for layout regression on marketwatch.com. When I converted TrailingFloatsRootInlineBox over
188         to the new overflow model, I messed up the math and passed a bottom value where I should have
189         passed a height value. This patch fixes the code to be logically equivalent to the way it
190         was prior to my changes.
191
192         Added fast/overflow/trailing-float-linebox.html.
193
194         * rendering/RenderBlockLineLayout.cpp:
195         (WebCore::RenderBlock::layoutInlineChildren):
196
197 2011-04-11  Adrienne Walker  <enne@google.com>
198
199         Unreviewed, rolling out r83500.
200         http://trac.webkit.org/changeset/83500
201         https://bugs.webkit.org/show_bug.cgi?id=57113
202
203         Regresses huge-layer-rotated test
204
205         * platform/graphics/chromium/ContentLayerChromium.cpp:
206         (WebCore::ContentLayerChromium::ContentLayerChromium):
207         (WebCore::ContentLayerChromium::~ContentLayerChromium):
208         (WebCore::ContentLayerChromium::cleanupResources):
209         (WebCore::ContentLayerChromium::requiresClippedUpdateRect):
210         (WebCore::ContentLayerChromium::paintContentsIfDirty):
211         (WebCore::ContentLayerChromium::resizeUploadBuffer):
212         (WebCore::ContentLayerChromium::updateTextureIfNeeded):
213         (WebCore::ContentLayerChromium::updateTexture):
214         (WebCore::ContentLayerChromium::draw):
215         (WebCore::ContentLayerChromium::updateCompositorResources):
216         (WebCore::ContentLayerChromium::unreserveContentsTexture):
217         (WebCore::ContentLayerChromium::bindContentsTexture):
218         (WebCore::ContentLayerChromium::dumpLayerProperties):
219         * platform/graphics/chromium/ContentLayerChromium.h:
220         (WebCore::ContentLayerChromium::drawsContent):
221         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
222         (WebCore::GraphicsLayerChromium::setMaskLayer):
223         * platform/graphics/chromium/ImageLayerChromium.cpp:
224         (WebCore::ImageLayerChromium::paintContentsIfDirty):
225         (WebCore::ImageLayerChromium::updateTextureIfNeeded):
226         * platform/graphics/chromium/ImageLayerChromium.h:
227         * platform/graphics/chromium/LayerChromium.h:
228         (WebCore::LayerChromium::draw):
229         * platform/graphics/chromium/LayerRendererChromium.cpp:
230         (WebCore::LayerRendererChromium::drawRootLayer):
231         (WebCore::LayerRendererChromium::drawLayers):
232         (WebCore::LayerRendererChromium::paintContentsRecursive):
233         (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay):
234         (WebCore::LayerRendererChromium::drawLayer):
235         (WebCore::LayerRendererChromium::initializeSharedObjects):
236         (WebCore::LayerRendererChromium::cleanupSharedObjects):
237         * platform/graphics/chromium/LayerRendererChromium.h:
238         (WebCore::LayerRendererChromium::contentLayerProgram):
239         * platform/graphics/chromium/LayerTilerChromium.cpp:
240         (WebCore::LayerTilerChromium::invalidateRect):
241         (WebCore::LayerTilerChromium::update):
242         (WebCore::LayerTilerChromium::updateFromPixels):
243         (WebCore::LayerTilerChromium::draw):
244         * platform/graphics/chromium/LayerTilerChromium.h:
245         * platform/graphics/chromium/PlatformCanvas.cpp:
246         (WebCore::PlatformCanvas::AutoLocker::AutoLocker):
247         (WebCore::PlatformCanvas::Painter::Painter):
248         * platform/graphics/chromium/PlatformCanvas.h:
249         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
250         (WebCore::RenderSurfaceChromium::draw):
251         * platform/graphics/chromium/RenderSurfaceChromium.h:
252         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
253         (WebCore::CCCanvasLayerImpl::draw):
254         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
255         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
256         (WebCore::CCHeadsUpDisplay::draw):
257         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
258         (WebCore::CCLayerImpl::draw):
259         * platform/graphics/chromium/cc/CCLayerImpl.h:
260         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
261         (WebCore::CCPluginLayerImpl::draw):
262         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
263         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
264         (WebCore::CCVideoLayerImpl::draw):
265         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
266
267 2011-04-11  Jon Honeycutt  <jhoneycutt@apple.com>
268
269         <rdar://problem/9267042> Assertion failure on launch in
270         LayerChangesFlusher::setHook().
271
272         https://bugs.webkit.org/show_bug.cgi?id=58270
273
274         Reviewed by Adam Roben.
275
276         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
277         (WebCore::LayerChangesFlusher::setHook):
278         MSDN says that the HINSTANCE passed in must be null if the thread ID
279         passed is a thread created by this process and the hook procedure is
280         within this process.
281
282 2011-04-11  MORITA Hajime  <morrita@google.com>
283
284         Unreviewed build fix.
285
286         Changeset 83492 broke Leopard build.
287         https://bugs.webkit.org/show_bug.cgi?id=58268
288
289         * editing/Editor.cpp:
290         (WebCore::Editor::markMisspellingsAfterTypingToWord):
291
292 2011-03-25  Adrienne Walker  <enne@google.com>
293
294         Reviewed by James Robinson.
295
296         [chromium] Tile content and image layers
297         https://bugs.webkit.org/show_bug.cgi?id=57113
298
299         Layers tile by default if any dimension is larger than 512.  Smaller
300         layers are contained within a single texture but still use the tiler
301         infrastructure so that there's only one code path.
302
303         Remove large layer support from content layers.  Content layers no
304         longer own a platform canvas--they own a tiler.  Refactor tiler to
305         allow for better separation of update/upload/paint.  Add rect
306         parameter to update and draw functions on layers for the layer-space
307         rect of interest.  This is necessary to know which tiles need to be
308         drawn.
309
310         * platform/graphics/chromium/ContentLayerChromium.cpp:
311         (WebCore::ContentLayerChromium::ContentLayerChromium):
312         (WebCore::ContentLayerChromium::~ContentLayerChromium):
313         (WebCore::ContentLayerPainter::ContentLayerPainter):
314         (WebCore::ContentLayerPainter::paint):
315         (WebCore::ContentLayerChromium::paintContentsIfDirty):
316         (WebCore::ContentLayerChromium::setLayerRenderer):
317         (WebCore::ContentLayerChromium::tilingTransform):
318         (WebCore::ContentLayerChromium::visibleLayerRect):
319         (WebCore::ContentLayerChromium::layerBounds):
320         (WebCore::ContentLayerChromium::updateLayerSize):
321         (WebCore::ContentLayerChromium::draw):
322         (WebCore::ContentLayerChromium::createTilerIfNeeded):
323         (WebCore::ContentLayerChromium::updateCompositorResources):
324         (WebCore::ContentLayerChromium::setTilingOption):
325         (WebCore::ContentLayerChromium::bindContentsTexture):
326         (WebCore::ContentLayerChromium::unreserveContentsTexture):
327         (WebCore::ContentLayerChromium::setIsMask):
328         (WebCore::ContentLayerChromium::dumpLayerProperties):
329         * platform/graphics/chromium/ContentLayerChromium.h:
330         (WebCore::ContentLayerChromium::drawsContent):
331         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
332         (WebCore::GraphicsLayerChromium::setMaskLayer):
333         * platform/graphics/chromium/ImageLayerChromium.cpp:
334         (WebCore::ImageLayerChromium::paintContentsIfDirty):
335         (WebCore::ImageLayerChromium::updateCompositorResources):
336         (WebCore::ImageLayerChromium::layerBounds):
337         (WebCore::ImageLayerChromium::tilingTransform):
338         * platform/graphics/chromium/ImageLayerChromium.h:
339         * platform/graphics/chromium/LayerChromium.h:
340         (WebCore::LayerChromium::invalidateRect):
341         (WebCore::LayerChromium::paintContentsIfDirty):
342         (WebCore::LayerChromium::setIsMask):
343         (WebCore::LayerChromium::draw):
344         * platform/graphics/chromium/LayerRendererChromium.cpp:
345         (WebCore::LayerRendererChromium::drawRootLayer):
346         (WebCore::LayerRendererChromium::drawLayers):
347         (WebCore::LayerRendererChromium::paintContentsRecursive):
348         (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay):
349         (WebCore::LayerRendererChromium::drawLayer):
350         (WebCore::LayerRendererChromium::initializeSharedObjects):
351         (WebCore::LayerRendererChromium::cleanupSharedObjects):
352         * platform/graphics/chromium/LayerRendererChromium.h:
353         * platform/graphics/chromium/LayerTilerChromium.cpp:
354         (WebCore::LayerTilerChromium::getSingleTexture):
355         (WebCore::LayerTilerChromium::invalidateRect):
356         (WebCore::LayerTilerChromium::update):
357         (WebCore::LayerTilerChromium::uploadCanvas):
358         (WebCore::LayerTilerChromium::updateFromPixels):
359         (WebCore::LayerTilerChromium::draw):
360         (WebCore::LayerTilerChromium::unreserveTextures):
361         * platform/graphics/chromium/LayerTilerChromium.h:
362         (WebCore::LayerTilerChromium::setLayerRenderer):
363         (WebCore::LayerTilerChromium::skipsDraw):
364         * platform/graphics/chromium/PlatformCanvas.cpp:
365         (WebCore::PlatformCanvas::AutoLocker::AutoLocker):
366         (WebCore::PlatformCanvas::Painter::Painter):
367         * platform/graphics/chromium/PlatformCanvas.h:
368         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
369         (WebCore::RenderSurfaceChromium::draw):
370         * platform/graphics/chromium/RenderSurfaceChromium.h:
371         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
372         (WebCore::CCCanvasLayerImpl::draw):
373         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
374         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
375         (WebCore::CCHeadsUpDisplay::draw):
376         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
377         (WebCore::CCLayerImpl::draw):
378         * platform/graphics/chromium/cc/CCLayerImpl.h:
379         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
380         (WebCore::CCPluginLayerImpl::draw):
381         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
382         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
383         (WebCore::CCVideoLayerImpl::draw):
384         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
385
386 2011-04-11  Eric Carlson  <eric.carlson@apple.com>
387
388         Reviewed by Simon Fraser.
389
390         Ignore context change callbacks when not on the main thread
391         https://bugs.webkit.org/show_bug.cgi?id=58256
392         <rdar://problem/9266090>
393
394         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
395         (WebCore::WKCACFViewLayerTreeHost::contextDidChange): Do nothing when not called
396             on the main thread. This should only happen when no changes have actually 
397             been committed to the context, eg. when a video frame has been added to an image
398             queue, so return without triggering animations etc.
399
400 2011-04-11  Daniel Cheng  <dcheng@chromium.org>
401
402         Reviewed by Dmitry Titov.
403
404         [chromium] Implement image/png support in DataTransferItems
405         https://bugs.webkit.org/show_bug.cgi?id=58106
406
407         This patch implements DataTransferItem::getAsFile() using Blobs. In
408         addition, plumbing for image/png has been added so image paste will be
409         supported as long as the renderer makes that data available.
410
411         Tests: editing/pasteboard/data-transfer-items-image-png.html
412
413         * dom/DataTransferItem.h:
414         * dom/DataTransferItem.idl:
415         * platform/chromium/ClipboardMimeTypes.cpp:
416         * platform/chromium/ClipboardMimeTypes.h:
417         * platform/chromium/DataTransferItemChromium.cpp:
418         (WebCore::DataTransferItemChromium::getAsString):
419         (WebCore::DataTransferItemChromium::getAsFile):
420         * platform/chromium/DataTransferItemChromium.h:
421         * platform/chromium/PlatformBridge.h:
422
423 2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
424
425         Reviewed by Chris Fleizach.
426
427         [Gtk] Implement support for Embedded Objects
428         https://bugs.webkit.org/show_bug.cgi?id=52148
429
430         Expose special OBJECT character for replaced elements, implementing
431         AtkText and AtkHyperlink when required.
432
433         * accessibility/AccessibilityRenderObject.cpp:
434         (WebCore::textIteratorBehaviorForTextRange): New helper function,
435         to return the right behavior, depending on the platform, so it
436         ensures that object replacement characters get emitted for GTK.
437         (WebCore::AccessibilityRenderObject::textUnderElement): Use the
438         new helper function textIteratorBehaviorForTextRange.
439         (WebCore::AccessibilityRenderObject::stringValue): Ditto.
440         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
441         Consider replaced elements when calculating range length in GTK.
442
443         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
444         (textForRenderer): Ouput the 'object replacement character' for
445         replaced objects.
446         (getSelectionOffsetsForObject): Consider replaced elements when
447         calculating range length in GTK.
448         (webkitAccessibleHypertextGetLink): Remove wrong extra check that
449         were causing only links to be considered.
450         (webkitAccessibleHypertextGetNLinks): Replace wrong 'isLink()'
451         check with the right one, by checking that the right ATK interface
452         is being implemented by the AtkObject.
453         (getInterfaceMaskFromObject): Implement the Hyperlink interface
454         both for links and replaced objects.
455         (objectAndOffsetUnignored): Consider replaced elements when
456         calculating range length in GTK.
457
458         * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
459         (getRangeLengthForObject): Ensure spaces are used for replaced
460         elements when calling to TextIterator::rangeLength().
461
462         * editing/TextIterator.h: New value in the TextIteratorBehavior
463         enumeration (TextIteratorEmitsObjectReplacementCharacters) and new
464         private variable to consider that new option internally.
465         * editing/TextIterator.cpp:
466         (WebCore::TextIterator::TextIterator): Initialize the new private
467         attribute m_emitsObjectReplacementCharacters in constructors.
468         (WebCore::TextIterator::handleReplacedElement): Emit the 'object
469         replacement character' when m_emitsObjectReplacementCharacters.
470
471 2011-04-11  Jia Pu  <jpu@apple.com>
472
473         Reviewed by Adele Peterson.
474
475         Shouldn't carry out autocorrection when start typing a new word
476         https://bugs.webkit.org/show_bug.cgi?id=58241
477         <rdar://problem/9264736>
478
479         Tests: platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1.html
480                platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2.html
481
482         In TypingCommand::markMisspellingsAfterTyping(), we want to call Editor::markMisspellingsAfterTypingToWord()
483         only when the typing command is an insertion command, and preceding word contains at least one non-whitespace
484         character.
485
486         * editing/Editor.cpp:
487         (WebCore::Editor::markMisspellingsAfterTypingToWord):
488         * editing/Editor.h:
489         * editing/TypingCommand.cpp:
490         (WebCore::TypingCommand::markMisspellingsAfterTyping):
491
492 2011-04-11  Vsevolod Vlasov  <vsevik@chromium.org>
493
494         Reviewed by Pavel Feldman.
495
496         PerformanceTiming returns inconsistent values when timing is null.
497         https://bugs.webkit.org/show_bug.cgi?id=58143
498
499         Made PerformanceTiming returned values consistent when there is no timing object.
500
501         * page/PerformanceTiming.cpp:
502         (WebCore::PerformanceTiming::domainLookupStart):
503         (WebCore::PerformanceTiming::domainLookupEnd):
504         (WebCore::PerformanceTiming::connectStart):
505         (WebCore::PerformanceTiming::connectEnd):
506         (WebCore::PerformanceTiming::requestStart):
507         (WebCore::PerformanceTiming::responseStart):
508         (WebCore::PerformanceTiming::domLoading):
509
510 2011-04-05  Stephen White  <senorblanco@chromium.org>
511
512         Fix for jittering when animating a rotated image.
513         https://bugs.webkit.org/show_bug.cgi?id=50775
514
515         Make GraphicsContext::roundToDevicePixels a no-op on Chrome/Mac.
516
517         * platform/graphics/cg/GraphicsContextCG.cpp:
518         (WebCore::GraphicsContext::roundToDevicePixels):
519
520 2011-04-06  Xiaomei Ji  <xji@chromium.org>
521
522         Reviewed by Ryosuke Niwa.
523
524         Continue experiment with moving caret by word in visual order.
525         https://bugs.webkit.org/show_bug.cgi?id=57806
526
527         This is the 2nd patch, which adds implementation when caret is inside box
528         (not at boundaries). If the word break is inside the same box and not at the boundaries
529         either, the word break will be returned. If need to search the adjacent boxes for word
530         breaks, then, only the cases implemented in bug 57336 work.
531
532         * editing/visible_units.cpp:
533         (WebCore::leftmostPositionInRTLBoxInLTRBlock):
534         (WebCore::rightmostPositionInLTRBoxInRTLBlock):
535         (WebCore::lastWordBreakInBox):
536         (WebCore::positionIsVisuallyOrderedInBoxInBlockWithDifferentDirectionality):
537         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
538         (WebCore::WordBoundaryEntry::WordBoundaryEntry):
539         (WebCore::collectWordBreaksInBoxInsideBlockWithSameDirectionality):
540         (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
541         (WebCore::greatestValueUnder):
542         (WebCore::smallestOffsetAbove):
543         (WebCore::positionIsInsideBox):
544         (WebCore::positionBeforeNextWord):
545         (WebCore::positionAfterPreviousWord):
546         (WebCore::leftWordPosition):
547         (WebCore::rightWordPosition):
548
549 2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
550
551         Reviewed by Chris Fleizach.
552
553         [GTK] Unskip accessibility/input-slider.html and accessibility/media-element.html
554         https://bugs.webkit.org/show_bug.cgi?id=58040
555
556         Don't expose objects of role SliderThumbRoles in GTK.
557
558         * accessibility/AccessibilitySlider.cpp:
559         (WebCore::AccessibilitySlider::addChildren): Allow the platform
560         make a final decision before including children in the hierarchy.
561         (WebCore::AccessibilitySliderThumb::accessibilityIsIgnored):
562         Implemented by relying on accessibilityPlatformIncludesObject().
563
564         * accessibility/gtk/AccessibilityObjectAtk.cpp:
565         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
566         Ignore accessibility objects with role SliderThumbRole.
567
568 2011-04-11  Simon Fraser  <simon.fraser@apple.com>
569
570         Reviewed by Dan Bernstein.
571
572         Divide by zero in calcColumnWidth
573         https://bugs.webkit.org/show_bug.cgi?id=58230
574
575         Test: fast/multicol/huge-column-count.html
576         
577         Make sure we have at least one column, to avoid divide by zero.
578
579         * rendering/RenderBlock.cpp:
580         (WebCore::RenderBlock::calcColumnWidth):
581
582 2011-04-09  Gavin Barraclough  <barraclough@apple.com>
583
584         Reviewed by Sam Weinig.
585
586         Bug 58198 - Clean up JSValue implementation for JSVALUE64
587
588         JSNumberCell.h has been deprecated.
589
590         * ForwardingHeaders/runtime/JSNumberCell.h: Removed.
591         * bindings/scripts/CodeGeneratorJS.pm:
592         * bridge/c/c_instance.cpp:
593
594 2011-04-11  Dan Bernstein  <mitz@apple.com>
595
596         Build fix.
597
598         * html/canvas/CanvasRenderingContext2D.cpp:
599         (WebCore::CanvasRenderingContext2D::State::State):
600
601 2011-04-11  Antti Koivisto  <antti@apple.com>
602
603         Reviewed by Tony Gentilcore.
604
605         Document source preload scanned repeatedly
606         https://bugs.webkit.org/show_bug.cgi?id=58123
607         
608         Don't clear the preload scanner after execution resumes. This would lose the current
609         scanning point and lead to rescanning when the preload scanner would get reconstructed
610         due to main parser blocking again.
611
612         Instead clear the scanner only in the specific case of receiving new data while the main
613         parser has already reached the end of the current input.
614
615         Also switched to using isWaitingForScripts() instead of m_treeBuilder->isPaused() for consistency.
616
617         The case the clearing in resumeParsingAfterScriptExecution() was added for is covered by 
618         http/tests/loading/preload-slow-loading.php.
619
620         * html/parser/HTMLDocumentParser.cpp:
621         (WebCore::HTMLDocumentParser::insert):
622         (WebCore::HTMLDocumentParser::append):
623         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
624
625 2011-04-11  Dan Bernstein  <mitz@apple.com>
626
627         Build fix.
628
629         * html/canvas/CanvasRenderingContext2D.cpp:
630         (WebCore::CanvasRenderingContext2D::State::State):
631
632 2011-04-11  Dan Bernstein  <mitz@apple.com>
633
634         Reviewed by Alexey Proskuryakov.
635
636         Assertion failure in CanvasRenderingContext2D::State::fontsNeedUpdate when invalidating the font cache after opening canvas/philip/tests/initial.reset.2dstate.html (occurs on Qt debug test bot)
637         https://bugs.webkit.org/show_bug.cgi?id=58229
638
639         * html/canvas/CanvasRenderingContext2D.cpp:
640         (WebCore::CanvasRenderingContext2D::State::State): Added copy constructor, to register the copy with
641         the font selector if needed.
642         (WebCore::CanvasRenderingContext2D::State::operator=): Added assignment constructor, to handle
643         registration with the font selector as needed.
644         * html/canvas/CanvasRenderingContext2D.h:
645
646 2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
647
648         Reviewed by Chris Fleizach.
649
650         [GTK] ARIA tables not exposing cells as HTML tables do
651         https://bugs.webkit.org/show_bug.cgi?id=57463
652
653         Expose cells for ARIA grids consistently with HTML tables in GTK,
654         keeping the same behaviour for the other platforms.
655
656         * accessibility/AccessibilityARIAGrid.cpp:
657         (WebCore::AccessibilityARIAGrid::addChild): Add the row's children
658         to the accessibility hierarchy when accessibility objects for rows
659         are ignoring accessibility, otherwise add the row.
660         (WebCore::AccessibilityARIAGrid::addChildren): Do not check at
661         this point whether every child of the table ignores or not
662         accessibility, letting addChild() make the proper decision later.
663
664         * accessibility/AccessibilityARIAGridCell.cpp:
665         (WebCore::AccessibilityARIAGridCell::parentTable): Consider that
666         rows could be ignoring accessibility, hence the parent could be
667         retrieved in the first call to parentObjectUnignored().
668         (WebCore::AccessibilityARIAGridCell::rowIndexRange): Ditto.
669         (WebCore::AccessibilityARIAGridCell::columnIndexRange): Ditto..
670
671         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
672         (atkRole): Map ColumnHeader and RowHeader to ATK_ROLE_TABLE_CELL.
673
674 2011-04-11  Sergio Villar Senin  <svillar@igalia.com>
675
676         Reviewed by Martin Robinson.
677
678         [GTK] Fix make distcheck
679         https://bugs.webkit.org/show_bug.cgi?id=58224
680
681         Removed a file that is no longer in the source tree.
682
683         * GNUmakefile.list.am:
684
685 2011-04-11  Dimitri Glazkov  <dglazkov@chromium.org>
686
687         Reviewed by Martin Robinson.
688
689         REGRESSION(r83397): Most GTK media controls are hidden when no valid source is specified
690         https://bugs.webkit.org/show_bug.cgi?id=58204
691
692         Covered by existing tests.
693
694         * platform/gtk/RenderThemeGtk.h:
695         (WebCore::RenderThemeGtk::hasOwnDisabledStateHandlingFor): Let GTK handle
696             the the state of media controls.
697
698 2011-04-11  Dimitri Glazkov  <dglazkov@chromium.org>
699
700         Remove obsolete comment, which was mistakenly landed in r83397.
701
702         Though potentially a work of art, the comment lost its functional meaning a long time ago.
703
704         * html/shadow/MediaControls.cpp:
705         (WebCore::MediaControls::create): Removed comment.
706
707 2011-04-05  Hans Wennborg  <hans@chromium.org>
708
709         Reviewed by Steve Block.
710
711         IndexedDB: Introduce skeleton for LevelDB backend
712         https://bugs.webkit.org/show_bug.cgi?id=57827
713
714         No new tests: no new functionality (yet).
715
716         * WebCore.gyp/WebCore.gyp:
717             Add dependency on leveldb when ENABLE_LEVELDB=1 in feature_defines.
718         * WebCore.gypi:
719             Add new files.
720         * storage/IDBBackingStore.h:
721         (WebCore::IDBBackingStore::ObjectStoreRecordIdentifier::~ObjectStoreRecordIdentifier):
722             Introduce abstract type ObjectStoreRecordIdentifier. The SQLite
723             backend uses integers to refer to a specific row in a table, but
724             the LevelDB backend will use something else.
725         * storage/IDBDatabaseBackendImpl.cpp:
726         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
727         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
728         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
729         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
730             Change functions to pass along the database id for operations that
731             concern object stores. We want to be able to group object stores
732             ids per database.
733         * storage/IDBFactoryBackendImpl.cpp:
734         (WebCore::IDBFactoryBackendImpl::open):
735             Decide which backend to use based on the backingStoreType
736             parameter.
737         * storage/IDBIndexBackendImpl.cpp:
738         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
739         (WebCore::IDBIndexBackendImpl::openCursorInternal):
740         (WebCore::IDBIndexBackendImpl::getInternal):
741         (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
742         * storage/IDBIndexBackendImpl.h:
743         (WebCore::IDBIndexBackendImpl::create):
744             Pass database and object store id to backend functions concerning
745             indexes.
746         * storage/IDBLevelDBBackingStore.cpp: Added.
747         (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore):
748         (WebCore::IDBLevelDBBackingStore::~IDBLevelDBBackingStore):
749         (WebCore::IDBLevelDBBackingStore::open):
750         (WebCore::IDBLevelDBBackingStore::extractIDBDatabaseMetaData):
751         (WebCore::IDBLevelDBBackingStore::setIDBDatabaseMetaData):
752         (WebCore::IDBLevelDBBackingStore::getObjectStores):
753         (WebCore::IDBLevelDBBackingStore::createObjectStore):
754         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
755         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
756         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
757         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
758         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
759         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
760         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
761         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
762         (WebCore::IDBLevelDBBackingStore::getIndexes):
763         (WebCore::IDBLevelDBBackingStore::createIndex):
764         (WebCore::IDBLevelDBBackingStore::deleteIndex):
765         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
766         (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
767         (WebCore::IDBLevelDBBackingStore::getObjectViaIndex):
768         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
769         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
770         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
771         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
772         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
773         (WebCore::IDBLevelDBBackingStore::createTransaction):
774         * storage/IDBLevelDBBackingStore.h: Added.
775             Add an empty implementation of the LevelDB backend.
776         * storage/IDBObjectStoreBackendImpl.cpp:
777             Keep track of database id, use the new RecordIdentifier.
778         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
779         (WebCore::IDBObjectStoreBackendImpl::getInternal):
780         (WebCore::IDBObjectStoreBackendImpl::putInternal):
781         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
782         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
783         (WebCore::populateIndex):
784         (WebCore::IDBObjectStoreBackendImpl::createIndex):
785         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
786         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
787         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
788         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
789         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
790         * storage/IDBObjectStoreBackendImpl.h:
791         (WebCore::IDBObjectStoreBackendImpl::create):
792         (WebCore::IDBObjectStoreBackendImpl::databaseId):
793         * storage/IDBSQLiteBackingStore.cpp:
794         (WebCore::IDBSQLiteBackingStore::open):
795         (WebCore::IDBSQLiteBackingStore::createObjectStore):
796         (WebCore::IDBSQLiteBackingStore::deleteObjectStore):
797         (WebCore::IDBSQLiteBackingStore::getObjectStoreRecord):
798         (WebCore::IDBSQLiteBackingStore::putObjectStoreRecord):
799         (WebCore::IDBSQLiteBackingStore::clearObjectStore):
800         (WebCore::IDBSQLiteBackingStore::deleteObjectStoreRecord):
801         (WebCore::IDBSQLiteBackingStore::nextAutoIncrementNumber):
802         (WebCore::IDBSQLiteBackingStore::keyExistsInObjectStore):
803         (WebCore::IDBSQLiteBackingStore::forEachObjectStoreRecord):
804         (WebCore::IDBSQLiteBackingStore::getIndexes):
805         (WebCore::IDBSQLiteBackingStore::createIndex):
806         (WebCore::IDBSQLiteBackingStore::deleteIndex):
807         (WebCore::IDBSQLiteBackingStore::putIndexDataForRecord):
808         (WebCore::IDBSQLiteBackingStore::deleteIndexDataForRecord):
809         (WebCore::IDBSQLiteBackingStore::getObjectViaIndex):
810         (WebCore::IDBSQLiteBackingStore::getPrimaryKeyViaIndex):
811         (WebCore::IDBSQLiteBackingStore::keyExistsInIndex):
812         (WebCore::IDBSQLiteBackingStore::openObjectStoreCursor):
813         (WebCore::IDBSQLiteBackingStore::openIndexKeyCursor):
814         (WebCore::IDBSQLiteBackingStore::openIndexCursor):
815         * storage/IDBSQLiteBackingStore.h:
816
817 2011-04-11  Alexander Pavlov  <apavlov@chromium.org>
818
819         Reviewed by Yury Semikhatsky.
820
821         Web Inspector: Duplicate CSS properties are reported for non-lowercase property names in the Styles sidebar
822         https://bugs.webkit.org/show_bug.cgi?id=58226
823
824         * inspector/InspectorStyleSheet.cpp:
825         (WebCore::InspectorStyle::populateAllProperties):
826
827 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
828
829         Reviewed by Pavel Feldman.
830
831         Web Inspector: get rid of source frame delegates for resources panel.
832         https://bugs.webkit.org/show_bug.cgi?id=58041
833
834         Use TextViewer configured with a domain-specific delegate to show/edit resource contents in resources panel.
835
836         * inspector/front-end/ResourceView.js:
837         (WebInspector.ResourceView.createResourceView):
838         (WebInspector.ResourceView.resourceViewTypeMatchesResource):
839         (WebInspector.ResourceSourceFrame):
840         (WebInspector.ResourceSourceFrame.prototype.get resource):
841         (WebInspector.ResourceSourceFrame.prototype.contentEditable):
842         (WebInspector.ResourceSourceFrame.prototype._requestContent):
843         (WebInspector.CSSSourceFrame):
844         (WebInspector.CSSSourceFrame.prototype.contentEditable):
845         (WebInspector.CSSSourceFrame.prototype._editContent):
846         (WebInspector.CSSSourceFrame.prototype._editContent.handleInfos):
847         (WebInspector.CSSSourceFrame.prototype._saveStyleSheet):
848         * inspector/front-end/SourceFrame.js:
849         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
850         (WebInspector.SourceFrame.prototype._requestContent):
851         (WebInspector.SourceFrame.prototype._handleSave):
852         (WebInspector.SourceFrame.prototype._editContent):
853
854 2011-04-11  Alexis Menard  <alexis.menard@openbossa.org>
855
856         Reviewed by Andreas Kling.
857
858         [Qt] Regression : r83051 Oxygen's lineedits are not rendered properly
859         https://bugs.webkit.org/show_bug.cgi?id=58076
860
861         State_Sunken is more generic than pressed. It is used by items such as frames or
862         line edits because they are "sunken" frames (e.g. QLineEdit). It can be required
863         by some style like Oxygen. Therefore only in the mobile theme we check if the object
864         is pressed.
865
866         * platform/qt/RenderThemeQt.cpp:
867         (WebCore::RenderThemeQt::paintTextField):
868
869 2011-04-11  Pavel Feldman  <pfeldman@chromium.org>
870
871         Reviewed by Yury Semikhatsky.
872
873         Web Inspector: add support for optional output parameters.
874         https://bugs.webkit.org/show_bug.cgi?id=58207
875
876         Output parameters such as "redirectResponse" are optional, but
877         do not allow specifying them as such.
878
879         * inspector/CodeGeneratorInspector.pm:
880         * inspector/Inspector.json:
881         * inspector/InspectorResourceAgent.cpp:
882         (WebCore::buildObjectForResourceResponse):
883         (WebCore::buildObjectForCachedResource):
884         * inspector/front-end/NetworkManager.js:
885         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
886         * inspector/generate-inspector-idl:
887
888 2011-04-11  Pavel Feldman  <pfeldman@chromium.org>
889
890         Reviewed by Yury Semikhatsky.
891
892         Web Inspector: refactor / document call frames in debugger domain.
893         https://bugs.webkit.org/show_bug.cgi?id=58187
894
895         Note that we are not special casing with(element) and with(document) anymore
896         and do not tell user that it is "Event target" and "Event document". Strictly speaking,
897         we should not have done it for with(element) not necessarily being related to an event.
898
899         * English.lproj/localizedStrings.js:
900         * inspector/InjectedScriptSource.js:
901         * inspector/Inspector.json:
902         * inspector/front-end/ScopeChainSidebarPane.js:
903         (WebInspector.ScopeChainSidebarPane.prototype.update):
904
905 2011-04-10  ChangSeok Oh  <shivamidow@gmail.com>
906
907         Reviewed by Eric Seidel.
908
909         Make correspondence of file name related with event to other port.
910         https://bugs.webkit.org/show_bug.cgi?id=57416
911
912         Some file names are changed to make correspondence naming rule.
913         Keyboard, mouse and wheel event file names for GTK port have been different from other ports.
914         This has made user hard to find a specific file related with event for GTK port. 
915
916         No test required. This patch just changes some file names.
917
918         * GNUmakefile.list.am:
919         * platform/gtk/KeyEventGtk.cpp: Removed.
920         * platform/gtk/MouseEventGtk.cpp: Removed.
921         * platform/gtk/PlatformKeyboardEventGtk.cpp: Added.
922         * platform/gtk/PlatformMouseEventGtk.cpp: Added.
923         * platform/gtk/PlatformWheelEventGtk.cpp: Added.
924         * platform/gtk/WheelEventGtk.cpp: Removed.
925
926 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
927
928         Revert the FloatRect.cpp part of r83422, since
929         clampToInteger() is broken for some inputs. I filed
930         https://bugs.webkit.org/show_bug.cgi?id=58216
931
932         * platform/graphics/FloatRect.cpp:
933         (WebCore::safeFloatToInt):
934         (WebCore::enclosingIntRect):
935
936 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
937
938         Reviewed by Maciej Stachowiak.
939
940         Car model dropdowns at audiusa.com lay out incorrectly with compositing enabled
941         https://bugs.webkit.org/show_bug.cgi?id=56660
942         
943         When overflow on an element changes, we need to inform compositing
944         layers which create and position an "ancestor clipping" layer based
945         on that overflow. Do this by triggering a rebuild of compositing layers
946         when overflow changes on a layer whose stacking context has compositing
947         descendants. (We can't just check whether the layer itself has compositing
948         descendants, because overflow follows the render tree, but compositing
949         follows the z-order tree.)
950
951         Test: compositing/geometry/ancestor-overflow-change.html
952
953         * rendering/RenderLayer.cpp:
954         (WebCore::RenderLayer::styleChanged):
955         * rendering/RenderLayer.h:
956         * rendering/RenderLayerBacking.cpp:
957         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
958
959 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
960
961         Reviewed by Ariya Hidayat.
962
963         Allow ShadowBlur to re-use the last buffer if it already contains the correct shadow
964         https://bugs.webkit.org/show_bug.cgi?id=58161
965         
966         ShadowBlur already has a singleton scratch buffer that is re-used
967         between shadows. Enhance use of this scratch buffer to avoid drawing
968         and blurring the shadow if the results will match what is already
969         in the buffer.
970         
971         Cleaned up ShadowBlur code to remove beginShadowLayer() and endShadowLayer(),
972         which ended up with little reusable code after adding the re-use logic.
973
974         * platform/graphics/FloatRect.cpp:
975         (WebCore::enclosingIntRect): Replace safeFloatToInt() with the existing
976         clampToInteger() from MathExtras.h
977         
978         * platform/graphics/FloatSize.h:
979         (WebCore::expandedIntSize): New method to safely ceil() the size.
980         
981         * platform/graphics/RoundedIntRect.h:
982         Add operator== for Radii and RoundedIntRect.
983
984         * platform/graphics/ShadowBlur.cpp:
985         (WebCore::ScratchBuffer::ScratchBuffer):
986         (WebCore::ScratchBuffer::setLastShadowValues):
987         (WebCore::ScratchBuffer::setLastInsetShadowValues):
988         (WebCore::ScratchBuffer::matchesLastShadow):
989         (WebCore::ScratchBuffer::matchesLastInsetShadow):
990         (WebCore::ScratchBuffer::clearScratchBuffer):
991         Have the scratch buffer remember what shadow parameters were used
992         to render the buffer contents.
993         
994         (WebCore::ShadowBlur::drawShadowBuffer):
995         Renamed from endShadowLayer(), and only contains the drawing
996         logic now.
997         
998         (WebCore::ShadowBlur::drawRectShadow):
999         Promote some code from beginShadowLayer().
1000         
1001         (WebCore::ShadowBlur::drawInsetShadow):
1002         Promote some code from beginShadowLayer().
1003
1004         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
1005         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
1006         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
1007         (WebCore::ShadowBlur::drawRectShadowWithTiling):
1008         These methods now check to see if the buffer already matches
1009         their required parameters, and avoid work if it does.
1010         
1011         (WebCore::ShadowBlur::blurShadowBuffer):
1012         Factored some code into this new method.
1013         
1014         (WebCore::ShadowBlur::blurAndColorShadowBuffer):
1015         Minor refactoring.
1016
1017         * platform/graphics/ShadowBlur.h:
1018
1019 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
1020
1021         Build fix: Updated for file move.
1022
1023         * bindings/js/GCController.cpp:
1024         * bindings/js/ScriptGCEvent.cpp:
1025
1026 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
1027
1028         Rubber-stamped by Beth Dakin.
1029
1030         Moved Heap.h and Heap.cpp to the heap folder, because anything less 
1031         would be uncivilized.
1032
1033         * ForwardingHeaders/heap/Heap.h: Copied from WebCore/ForwardingHeaders/runtime/Heap.h.
1034         * ForwardingHeaders/runtime/Heap.h: Removed.
1035
1036 2011-04-10  Luke Macpherson   <macpherson@chromium.org>
1037
1038         Reviewed by Simon Fraser.
1039
1040         Rename CSSStyleApplyProperty::inherit,initial,value applyInheritValue,applyInitialValue,applyValue
1041         https://bugs.webkit.org/show_bug.cgi?id=58212
1042
1043         No new tests - function renaming only / no functionality changes.
1044
1045         * css/CSSStyleApplyProperty.cpp:
1046         Rename all instances of inherit, initial and value.
1047         * css/CSSStyleApplyProperty.h:
1048         Rename all instances of inherit, initial and value.
1049         * css/CSSStyleSelector.cpp:
1050         Rename all instances of inherit, initial and value.
1051
1052 2011-04-10  Mike Lawther  <mikelawther@chromium.org>
1053
1054         Reviewed by Ojan Vafai.
1055
1056         flex/bison tokens and grammar for CSS calc
1057         https://bugs.webkit.org/show_bug.cgi?id=54412
1058
1059         Tests: css3/calc/calc-errors.html
1060                css3/calc/lexer-regression-57581-2.html
1061                css3/calc/lexer-regression-57581-3.html
1062                css3/calc/lexer-regression-57581.html
1063                css3/calc/minmax-errors.html
1064                css3/calc/nested-rounded-corners.html
1065                css3/calc/simple-calcs.html
1066                css3/calc/simple-minmax.html
1067
1068         * css/CSSGrammar.y:
1069         * css/CSSParserValues.cpp:
1070         (WebCore::CSSParserValueList::insertValueAt):
1071         (WebCore::CSSParserValueList::extend):
1072         * css/CSSParserValues.h:
1073         * css/tokenizer.flex:
1074
1075 2011-04-10  Alice Boxhall  <aboxhall@chromium.org>
1076
1077         Reviewed by Ryosuke Niwa.
1078
1079         Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult only.
1080         https://bugs.webkit.org/show_bug.cgi?id=57923
1081
1082         Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult
1083         rather than a Node* and an IntPoint&, as the selection may actually not
1084         extend into the Node found by the HitTest.
1085
1086         No new tests. Refactoring only.
1087
1088         * page/EventHandler.cpp:
1089         (WebCore::EventHandler::handleMouseDraggedEvent):
1090         (WebCore::EventHandler::updateSelectionForMouseDrag):
1091         * page/EventHandler.h:
1092
1093 2011-04-10  Kent Tamura  <tkent@chromium.org>
1094
1095         Unreviewed, rolling out r83353.
1096         http://trac.webkit.org/changeset/83353
1097         https://bugs.webkit.org/show_bug.cgi?id=58106
1098
1099         The new test doesn't pass on all Chromium platforms.
1100
1101         * dom/DataTransferItem.h:
1102         * dom/DataTransferItem.idl:
1103         * platform/chromium/ClipboardMimeTypes.cpp:
1104         * platform/chromium/ClipboardMimeTypes.h:
1105         * platform/chromium/DataTransferItemChromium.cpp:
1106         (WebCore::DataTransferItemChromium::getAsString):
1107         * platform/chromium/DataTransferItemChromium.h:
1108         * platform/chromium/PlatformBridge.h:
1109
1110 2011-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1111
1112         Reviewed by Eric Carlson.
1113
1114         [EFL] Add seek forward / backward buttons to MediaControl UI.
1115         https://bugs.webkit.org/show_bug.cgi?id=56810
1116
1117         Add seek forward / backward buttons to media control. And, change formType name
1118         for media control.
1119
1120         * platform/efl/RenderThemeEfl.cpp:
1121         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
1122         (WebCore::RenderThemeEfl::emitMediaButtonSignal):
1123         (WebCore::RenderThemeEfl::paintMediaMuteButton):
1124         (WebCore::RenderThemeEfl::paintMediaPlayButton):
1125         (WebCore::RenderThemeEfl::paintMediaSeekBackButton):
1126         (WebCore::RenderThemeEfl::paintMediaSeekForwardButton):
1127         * platform/efl/RenderThemeEfl.h:
1128
1129 2011-04-10  Chris Guillory  <chris.guillory@google.com>
1130
1131         Reviewed by Eric Seidel.
1132
1133         Remove unused function declaration in PlatformContextSkia.h.
1134         https://bugs.webkit.org/show_bug.cgi?id=55983
1135
1136         * platform/graphics/skia/PlatformContextSkia.h:
1137
1138 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
1139
1140         Unreviewed build fix for !ENABLE(XSLT) after r82562.
1141
1142         * dom/XMLDocumentParserLibxml2.cpp:
1143         (WebCore::XMLDocumentParser::doEnd):
1144
1145 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
1146
1147         Unreviewed build fix for !ENABLE(XSLT) after r82562.
1148
1149         * xml/XMLTreeViewer.cpp: Readded #if ENABLE(XSLT).
1150
1151 2011-04-10  Dimitri Glazkov  <dglazkov@chromium.org>
1152
1153         Reviewed by Anders Carlsson.
1154
1155         REGRESSION(r83256): Text-decoration bleeds into shadow DOM
1156         https://bugs.webkit.org/show_bug.cgi?id=58205
1157
1158         Now that the shadow root is a never-styled element, we need to walk to
1159         parent to find out if we're inside of a shadow DOM subtree.
1160
1161         Test: media/controls-styling.html
1162
1163         * css/CSSStyleSelector.cpp:
1164         (WebCore::isAtShadowBoundary): Added helper function.
1165         (WebCore::CSSStyleSelector::adjustRenderStyle): Changed to use the helper.
1166
1167 2011-04-07  Dimitri Glazkov  <dglazkov@chromium.org>
1168
1169         Reviewed by Eric Carlson.
1170
1171         [Meta] Convert HTMLMediaElement to use the new shadow DOM
1172         https://bugs.webkit.org/show_bug.cgi?id=53020
1173
1174         This conversion is non-trivial, for several reasons:
1175
1176         1) Since HTMLMediaElement now hosts the shadow DOM for controls, hiding
1177         and showing controls does not result in destroying and re-creating the
1178         shadow DOM tree. Instead, the tree is created as needed and shown/hidden
1179         using inline styles.
1180         
1181         2) Instead of detaching/attaching on each style change, the control parts
1182         are now using a set of higher fidelity callbacks that notify MediaControls
1183         about changes to which it should react. Each reaction results in hiding,
1184         showing, or changing the state of the control parts using inline styles
1185         and DOM APIs.
1186
1187         3) Hiding and showing controls is accomplished using inline styles, rather
1188         than wiring rendererIsNeeded, because renderers are now re-created less
1189         frequently.
1190
1191         4) Instead of constantly querying RenderTheme about visibility of a particular
1192         control part, we let the theme determine which parts are supported and
1193         which parts are visible in certain conditions.
1194
1195         5) Custom hit-testing, event forwarding, and style updates are completely
1196         removed, since they are now unnecessary.
1197
1198         6) Fading controls in/out is now done as CSS animation, since shadow DOM
1199         supports it.
1200
1201         Test: manual-tests/media-controls.html
1202
1203 2011-04-09  Dan Bernstein  <mitz@apple.com>
1204
1205         Reviewed by Beth Dakin.
1206
1207         <rdar://problem/9215280> Detached canvas draws with incorrect font
1208
1209         Test: fast/canvas/font-update.html
1210
1211         The existing mechanism for updating the font in a canvas 2D context was lacking in at least
1212         two ways: it neglected to update fonts in all but the topmost state in the stack, and since it
1213         was based on HTMLCanvasElemen's attach() and recalcStyle(), it did not work when the element
1214         was not attached.
1215
1216         This change takes the responsibility for font updates away from the canvas element and gives it
1217         to the canvas context and its graphics state.
1218
1219         * css/CSSFontSelector.cpp:
1220         (WebCore::CSSFontSelector::registerForInvalidationCallbacks): Added. Adds to the set of registered
1221         font selector clients.
1222         (WebCore::CSSFontSelector::unregisterForInvalidationCallbacks): Added. Removes from the set of
1223         registered font selector clients.
1224         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks): Calls fontsNeedUpdate() on all registered
1225         clients and forces a style recalc on the document.
1226         (WebCore::CSSFontSelector::fontLoaded): Changed to call dispatchInvalidationCallbacks().
1227         (WebCore::CSSFontSelector::fontCacheInvalidated): Ditto.
1228         * css/CSSFontSelector.h:
1229         * html/HTMLCanvasElement.cpp: Removed overrides of attach() and recalcStyle().
1230         * html/HTMLCanvasElement.h:
1231         * html/canvas/CanvasRenderingContext2D.cpp:
1232         (WebCore::CanvasRenderingContext2D::State::~State): Added. Unregisters with the font selector.
1233         (WebCore::CanvasRenderingContext2D::State::fontsNeedUpdate): Added. Called by the font selector
1234         when its fonts need to be updated. Updates the font.
1235         (WebCore::CanvasRenderingContext2D::setFont): Registers the state with the font selector.
1236         * html/canvas/CanvasRenderingContext2D.h:
1237         * platform/graphics/FontSelector.h:
1238         (WebCore::FontSelectorClient::~FontSelectorClient):
1239
1240 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
1241
1242         Not reviewed.
1243
1244         Try recommitting some things svn left out of my last commit.
1245
1246         * bridge/qt/qt_runtime.h:
1247
1248 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
1249
1250         Not reviewed.
1251
1252         Try recommitting some things svn left out of my last commit.
1253
1254         * ForwardingHeaders/collector: Removed.
1255         * ForwardingHeaders/collector/handles: Removed.
1256         * ForwardingHeaders/collector/handles/Global.h: Removed.
1257
1258 2011-04-08  Dimitri Glazkov  <dglazkov@chromium.org>
1259
1260         Reviewed by Ojan Vafai.
1261
1262         Implement proper handling of mouseover/mouseout events in regard to shadow DOM boundaries.
1263         https://bugs.webkit.org/show_bug.cgi?id=55515
1264
1265         This implements XBL 2.0's specified handling of mouseover/mouseout events:
1266         http://dev.w3.org/2006/xbl2/Overview.html#the-mouseover-and-mouseout-events
1267
1268         To do this, we:
1269         1) calculate lowest common ancestor between relatedTarget and target, and
1270            the nearest boundaries around them: the outer (common) boundary, and the
1271            inner (specific to relatedTarget) boundary. Then, we
1272         2) ensure that events only propagate up to the common boundary (or
1273            all the way if boundary is not found), while
1274         3) updating relatedTarget be the inner boundary.
1275
1276         We also detect the most common case when no common boundary could exist
1277         and provide a fast path to short-circuit most of the boundary detection
1278         logic.
1279
1280         Test: fast/events/shadow-boundary-crossing.html
1281
1282         * dom/EventDispatcher.cpp:
1283         (WebCore::EventDispatcher::adjustToShadowBoundaries): Added a helper to determine lowest
1284             common ancestor, the boundaries around it, and compute adjustments
1285             to relatedTarget and event target ancestor chain.
1286         (WebCore::ancestorsCrossShadowBoundaries): Added.
1287         (WebCore::EventDispatcher::adjustRelatedTarget): Changed to calculate
1288             inner/outer shadow DOM boundaries and adjust ancestors chain accordingly.
1289         (WebCore::EventDispatcher::EventDispatcher): Added flag initializer
1290         (WebCore::EventDispatcher::ensureEventAncestors): Renamed from getEventAncestors,
1291             converted to use initialization flag, rather than testing for empty.
1292         * dom/EventDispatcher.h: Adjusted decls.
1293         * dom/MouseEvent.cpp:
1294         (WebCore::MouseEventDispatchMediator::dispatchEvent): Changed to send event
1295             to adjustRelatedTarget.
1296
1297 2011-04-08  Geoffrey Garen  <ggaren@apple.com>
1298
1299         Reviewed by Oliver Hunt.
1300
1301         A few heap-related renames and file moves.
1302         
1303         WeakGCPtr<T> => Weak<T>
1304         Global<T> => Strong<T>
1305         collector/ => heap/
1306         collector/* => heap/*
1307         runtime/WeakGCPtr.h => heap/Weak.h
1308         
1309         (Eventually, even more files should move into the heap directory. Like
1310         Heap.h and Heap.cpp, for example.)
1311
1312         * CMakeLists.txt:
1313         * ForwardingHeaders/collector: Removed.
1314         * ForwardingHeaders/heap: Copied from ForwardingHeaders/collector.
1315         * ForwardingHeaders/heap/Strong.h: Copied from ForwardingHeaders/collector/handles/Global.h.
1316         * ForwardingHeaders/heap/Weak.h: Copied from ForwardingHeaders/runtime/WeakGCPtr.h.
1317         * ForwardingHeaders/runtime/WeakGCPtr.h: Removed.
1318         * WebCore.vcproj/WebCore.vcproj:
1319         * WebCore.vcproj/copyForwardingHeaders.cmd:
1320         * bindings/js/JSCallbackData.h:
1321         * bindings/js/JSCustomVoidCallback.h:
1322         * bindings/js/JSDOMWindowBase.h:
1323         * bindings/js/JSDOMWindowShell.cpp:
1324         (WebCore::JSDOMWindowShell::setWindow):
1325         * bindings/js/JSDataGridDataSource.h:
1326         * bindings/js/JSEventListener.h:
1327         * bindings/js/ScheduledAction.cpp:
1328         (WebCore::ScheduledAction::ScheduledAction):
1329         * bindings/js/ScheduledAction.h:
1330         * bindings/js/ScriptCachedFrameData.cpp:
1331         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1332         * bindings/js/ScriptCachedFrameData.h:
1333         * bindings/js/ScriptController.cpp:
1334         (WebCore::ScriptController::createWindowShell):
1335         * bindings/js/ScriptController.h:
1336         * bindings/js/ScriptObject.h:
1337         * bindings/js/ScriptState.h:
1338         * bindings/js/ScriptValue.cpp:
1339         * bindings/js/ScriptValue.h:
1340         * bindings/js/ScriptWrappable.h:
1341         * bindings/js/WorkerScriptController.cpp:
1342         (WebCore::WorkerScriptController::initScript):
1343         * bindings/js/WorkerScriptController.h:
1344         * bridge/jsc/BridgeJSC.h:
1345         * bridge/qt/qt_runtime.h:
1346         * bridge/runtime_root.h:
1347         * xml/XMLHttpRequest.cpp:
1348
1349 2011-04-09  Keith Kyzivat  <keith.kyzivat@nokia.com>
1350
1351         Reviewed by Laszlo Gombos.
1352
1353         [Qt] Don't link against fontconfig or X11 if embedded
1354         https://bugs.webkit.org/show_bug.cgi?id=58104
1355
1356         No functional change so no new tests.
1357
1358         * WebCore.pri: qpa=>embedded should be done very early so all cases of embedded are uniform.
1359
1360 2011-04-09  Csaba Osztrogon√°c  <ossy@webkit.org>
1361
1362         [Qt] Unreviewed trivial fix after r83344.
1363
1364         * WebCore.pro: Update HEADERS list.
1365
1366 2011-04-09  Jon Lee  <jonlee@apple.com>
1367
1368         Reviewed by Beth Dakin.
1369
1370         Overlay scrollbar flashes in scrollable <textarea> with each keystroke (58180)
1371         https://bugs.webkit.org/show_bug.cgi?id=58180
1372         <rdar://problem/9047984>
1373
1374         * platform/mac/ScrollAnimatorMac.mm:
1375         (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Check that there is a change before submitting
1376         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
1377         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
1378
1379 2011-04-09  Sreeram Ramachandran  <sreeram@google.com>
1380
1381         Reviewed by Ryosuke Niwa.
1382
1383         Gather data on modal dialogs shown during unload events
1384         https://bugs.webkit.org/show_bug.cgi?id=58115
1385
1386         Add a new method to the ChromeClient API to allow clients to receive
1387         notifications of modal dialogs dispatched during page dismissal events.
1388         The new method has a default empty definition; only chromium overrides
1389         it to keep track of histograms.
1390
1391         No tests because this is a no-op for all ports except chromium (and it's
1392         not clear how to test chromium histograms from webkit).
1393
1394         * page/Chrome.cpp:
1395         (WebCore::isDuringPageDismissal):
1396         (WebCore::willRunModalDialog):
1397         (WebCore::Chrome::runJavaScriptAlert):
1398         (WebCore::Chrome::runJavaScriptConfirm):
1399         (WebCore::Chrome::runJavaScriptPrompt):
1400         (WebCore::Chrome::willRunModalHTMLDialog):
1401         * page/Chrome.h:
1402         * page/ChromeClient.h:
1403         (WebCore::ChromeClient::willRunModalDialogDuringPageDismissal):
1404         * page/DOMWindow.cpp:
1405         (WebCore::DOMWindow::showModalDialog):
1406
1407 2011-04-08  David Humphrey  <david.humphrey@senecac.on.ca>
1408
1409         Reviewed by Eric Carlson.
1410
1411         Fix call order of media element muted and play(), such that setting muted before play() works.
1412         https://bugs.webkit.org/show_bug.cgi?id=57673
1413         https://code.google.com/p/chromium/issues/detail?id=70777
1414
1415         Manual test added: manual-tests/media-muted.html
1416
1417         * html/HTMLMediaElement.cpp:
1418         (WebCore::HTMLMediaElement::updatePlayState):
1419         * manual-tests/media-muted.html: Added.
1420
1421 2011-04-08  Nat Duca  <nduca@chromium.org>
1422
1423         Reviewed by David Levin.
1424
1425         [chromium] Fix windows assertion on ~CCThread
1426         https://bugs.webkit.org/show_bug.cgi?id=58153
1427
1428         Because ~CCThread uses waitForThreadCompletion,
1429         calling detachThread is not necessary.
1430
1431         * platform/graphics/chromium/cc/CCThread.cpp:
1432         (WebCore::CCThread::runLoop):
1433
1434 2011-04-08  Jian Li  <jianli@chromium.org>
1435
1436         Unreviewed, rolling out r83348.
1437         http://trac.webkit.org/changeset/83348
1438         https://bugs.webkit.org/show_bug.cgi?id=49508
1439
1440         Breaks layout tests in QT, Win7 and Chromium.
1441
1442         * rendering/RenderText.cpp:
1443         (WebCore::RenderText::localCaretRect):
1444
1445 2011-04-08  MORITA Hajime  <morrita@google.com>
1446
1447         Reviewed by Simon Fraser.
1448
1449         Negative spread should not make a sharp corner rounded
1450         https://bugs.webkit.org/show_bug.cgi?id=58162
1451
1452         Handled inset shadow path for rounded and non-rounded rect
1453         differently as normal shadow path is doing.
1454         
1455         * rendering/RenderBoxModelObject.cpp:
1456         (WebCore::RenderBoxModelObject::paintBoxShadow):
1457
1458 2011-04-07  Simon Fraser  <simon.fraser@apple.com>
1459
1460         Reviewed by Martin Robinson.
1461
1462         REGRESSION (r77034-r77220): CSS box-shadow no longer renders on PowerPC
1463         https://bugs.webkit.org/show_bug.cgi?id=55180
1464
1465         The endianness #ifdef in ShadowBlur was unnecessary and harmful. The
1466         data we get back from ImageBuffer::getImageData() do not vary in
1467         endianness.
1468
1469         * platform/graphics/ShadowBlur.cpp:
1470         (WebCore::ShadowBlur::blurLayerImage):
1471
1472 2011-04-08  Erik Arvidsson  <arv@chromium.org>
1473
1474         Reviewed by Dimitri Glazkov.
1475
1476         IFrame is getting the focus even though it is hidden
1477         https://bugs.webkit.org/show_bug.cgi?id=55861
1478
1479         Test: fast/dom/hidden-iframe-no-focus.html
1480
1481         * html/HTMLFrameOwnerElement.cpp:
1482         (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable):
1483         * html/HTMLFrameOwnerElement.h:
1484
1485 2011-04-08  Jeff Timanus  <twiz@chromium.org>
1486
1487         Reviewed by Kenneth Russell.
1488
1489         Fall back to software rendering for Canvas2D when requesting a DrawingBuffer larger than supported by the GL environment.
1490         https://bugs.webkit.org/show_bug.cgi?id=57768
1491
1492         * html/canvas/CanvasRenderingContext2D.cpp:
1493         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1494         (WebCore::CanvasRenderingContext2D::reset):
1495         * platform/graphics/gpu/DrawingBuffer.cpp:
1496         (WebCore::DrawingBuffer::reset):
1497         * platform/graphics/gpu/DrawingBuffer.h:
1498
1499 2011-04-08  Daniel Cheng  <dcheng@chromium.org>
1500
1501         Reviewed by Dmitry Titov.
1502
1503         [chromium] Implement image/png support in DataTransferItems
1504         https://bugs.webkit.org/show_bug.cgi?id=58106
1505
1506         This patch implements DataTransferItem::getAsFile() using Blobs. In
1507         addition, plumbing for image/png has been added so image paste will be
1508         supported as long as the renderer makes that data available.
1509
1510         Tests: editing/pasteboard/data-transfer-items-image-png.html
1511
1512         * dom/DataTransferItem.h:
1513         * dom/DataTransferItem.idl:
1514         * platform/chromium/ClipboardMimeTypes.cpp:
1515         * platform/chromium/ClipboardMimeTypes.h:
1516         * platform/chromium/DataTransferItemChromium.cpp:
1517         (WebCore::DataTransferItemChromium::getAsString):
1518         (WebCore::DataTransferItemChromium::getAsFile):
1519         * platform/chromium/DataTransferItemChromium.h:
1520         * platform/chromium/PlatformBridge.h:
1521
1522 2011-04-08 MORITA Hajime  <morrita@google.com>
1523
1524         Unreviewed windows build fix.
1525         
1526         * editing/SpellingCorrectionController.h:
1527         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
1528
1529 2011-04-08  Enrica Casucci  <enrica@apple.com>
1530
1531         Reviewed by Maciej Stachowiak.
1532
1533         Improve lifetime management of nodes in ReplaceNodeWithSpanCommand.
1534         https://bugs.webkit.org/show_bug.cgi?id=57595
1535         <rdar://problem/9222122>
1536
1537         Test: editing/style/bold-with-dom-changes.html
1538
1539         * editing/ReplaceNodeWithSpanCommand.cpp:
1540         (WebCore::swapInNodePreservingAttributesAndChildren):
1541
1542 2011-04-07  Roland Steiner  <rolandsteiner@chromium.org>
1543
1544         Reviewed by Dimitri Glazkov.
1545
1546         Bug 58060 - Prepare access to TreeScope from Node, using NodeRareData
1547         https://bugs.webkit.org/show_bug.cgi?id=58060
1548
1549         Add a TreeScope pointer to NodeRareData to allow direct access to the containing tree scope.
1550         However, in case the containing scope is the document, this is not set, and the
1551         document pointer within Node is used instead.
1552
1553         In an object derived from TreeScope (currently Document), the tree scope pointer
1554         points to itself. Such objects also contain a parent tree scope pointer that
1555         points to the containing scope. For Document, this is 0.
1556
1557         Add new functions setTreeScope[Recursively] that replace setDocument[Recursively]
1558         in public usage. setDocument[Recursively] are now only used internally and are
1559         thererfore protected.
1560
1561         No new tests. (no new functionality)
1562
1563         * dom/ContainerNode.cpp: change DOM manipulation methods to update scope of inserted nodes
1564         (WebCore::ContainerNode::insertBefore):
1565         (WebCore::ContainerNode::replaceChild):
1566         (WebCore::ContainerNode::appendChild):
1567         * dom/Document.cpp:
1568         (WebCore::Document::~Document):
1569         (WebCore::Document::setDocType): Ditto
1570         (WebCore::Document::adoptNode): Ditto
1571         * dom/Document.h:
1572         * dom/Node.cpp:
1573         (WebCore::Node::treeScope): use NodeRareData to check if a non-Document scope is set
1574         (WebCore::Node::setTreeScope): update NodeRareData depending on whether scope is a document
1575         (WebCore::Node::setTreeScopeRecursively):
1576         (WebCore::Node::setDocumentRecursively):
1577         * dom/Node.h:
1578         * dom/NodeRareData.h: add scope pointer
1579         (WebCore::NodeRareData::NodeRareData):
1580         (WebCore::NodeRareData::treeScope):
1581         (WebCore::NodeRareData::setTreeScope):
1582         * dom/TreeScope.cpp: add parentTreeScope pointer
1583         (WebCore::TreeScope::TreeScope):
1584         (WebCore::TreeScope::setParentTreeScope):
1585         * dom/TreeScope.h:
1586         (WebCore::TreeScope::parentTreeScope):
1587
1588 2011-04-08  Xiaomei Ji  <xji@chromium.org>
1589
1590         Reviewed by David Hyatt.
1591
1592         Local caret rectangle calculation should be relative to its containing block.
1593         https://bugs.webkit.org/show_bug.cgi?id=49508.
1594
1595         InlineBox and caret rectangle are positioned relative to its containing block.
1596         So its left and right edge value should be relative to its containing block as well. 
1597
1598         Test: fast/forms/cursor-at-editable-content-boundary.html
1599
1600         * rendering/RenderText.cpp:
1601         (WebCore::RenderText::localCaretRect):
1602
1603 2011-04-08  MORITA Hajime  <morrita@google.com>
1604
1605         Unreviewed build fix.
1606
1607         * editing/Editor.cpp:
1608         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1609
1610 2011-04-08  David Hyatt  <hyatt@apple.com>
1611
1612         Reviewed by Simon Fraser.
1613
1614         https://bugs.webkit.org/show_bug.cgi?id=57971
1615         
1616         Rework visited/unvisited links for before/after content. Propagate the bits earlier so that we don't lose
1617         them when we throw away the visited style. Don't throw away the visited link style for pseudo elements
1618         either, so that the styles are consistent.
1619
1620         Added fast/history/visited-generated-content-test.html
1621
1622         * css/CSSStyleSelector.cpp:
1623         (WebCore::CSSStyleSelector::styleForElement):
1624         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1625
1626 2011-04-06  MORITA Hajime  <morrita@google.com>
1627
1628         Reviewed by Darin Adler.
1629
1630         [Refactoring] Auto correction panel should be handled by its own class.
1631         https://bugs.webkit.org/show_bug.cgi?id=55571
1632
1633         Extracted code inside SUPPORT_AUTOCORRECTION_PANEL into
1634         SpellingCorrectionController class.
1635         This change also remove some SUPPORT_AUTOCORRECTION_PANEL guard if
1636         code paths inside the never reached without autocorrection support.
1637         Removing guards reduces unintentional build breakage.
1638
1639         No new tests, no behavior chagne.
1640
1641         * CMakeLists.txt:
1642         * GNUmakefile.am:
1643         * WebCore.gypi:
1644         * WebCore.pro:
1645         * WebCore.vcproj/WebCore.vcproj:
1646         * WebCore.xcodeproj/project.pbxproj:
1647         * editing/CorrectionPanelInfo.h: Removed.
1648         * editing/EditingAllInOne.cpp:
1649         * editing/Editor.cpp:
1650         (WebCore::Editor::respondToChangedSelection):
1651         (WebCore::Editor::respondToChangedContents):
1652         (WebCore::Editor::appliedEditing):
1653         (WebCore::Editor::Editor):
1654         (WebCore::Editor::~Editor):
1655         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1656         (WebCore::Editor::insertLineBreak):
1657         (WebCore::Editor::insertParagraphSeparator):
1658         (WebCore::Editor::cut):
1659         (WebCore::Editor::paste):
1660         (WebCore::Editor::pasteAsPlainText):
1661         (WebCore::Editor::isAutomaticSpellingCorrectionEnabled):
1662         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1663         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1664         (WebCore::Editor::changeBackToReplacedString):
1665         (WebCore::Editor::unappliedSpellCorrection):
1666         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1667         (WebCore::Editor::startCorrectionPanelTimer):
1668         (WebCore::Editor::handleCorrectionPanelResult):
1669         (WebCore::Editor::dismissCorrectionPanelAsIgnored):
1670         * editing/Editor.h:
1671         * editing/SpellingCorrectionCommand.cpp:
1672         * editing/SpellingCorrectionController.cpp: Added.
1673         (WebCore::markerTypesForAutocorrection):
1674         (WebCore::markerTypesForReplacement):
1675         (WebCore::markersHaveIdenticalDescription):
1676         (WebCore::SpellingCorrectionController::SpellingCorrectionController):
1677         (WebCore::SpellingCorrectionController::~SpellingCorrectionController):
1678         (WebCore::SpellingCorrectionController::startCorrectionPanelTimer):
1679         (WebCore::SpellingCorrectionController::stopCorrectionPanelTimer):
1680         (WebCore::SpellingCorrectionController::stopPendingCorrection):
1681         (WebCore::SpellingCorrectionController::applyPendingCorrection):
1682         (WebCore::SpellingCorrectionController::hasPendingCorrection):
1683         (WebCore::SpellingCorrectionController::isSpellingMarkerAllowed):
1684         (WebCore::SpellingCorrectionController::show):
1685         (WebCore::SpellingCorrectionController::handleCancelOperation):
1686         (WebCore::SpellingCorrectionController::dismiss):
1687         (WebCore::SpellingCorrectionController::dismissSoon):
1688         (WebCore::SpellingCorrectionController::applyCorrectionPanelInfo):
1689         (WebCore::SpellingCorrectionController::applyAutocorrectionBeforeTypingIfAppropriate):
1690         (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
1691         (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
1692         (WebCore::SpellingCorrectionController::handleCorrectionPanelResult):
1693         (WebCore::SpellingCorrectionController::isAutomaticSpellingCorrectionEnabled):
1694         (WebCore::SpellingCorrectionController::windowRectForRange):
1695         (WebCore::SpellingCorrectionController::respondToChangedSelection):
1696         (WebCore::SpellingCorrectionController::respondToAppliedEditing):
1697         (WebCore::SpellingCorrectionController::client):
1698         (WebCore::SpellingCorrectionController::textChecker):
1699         (WebCore::SpellingCorrectionController::recordAutocorrectionResponseReversed):
1700         (WebCore::SpellingCorrectionController::markReversed):
1701         (WebCore::SpellingCorrectionController::markCorrection):
1702         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
1703         * editing/SpellingCorrectionController.h: Added.
1704         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
1705         (WebCore::SpellingCorrectionController::shouldStartTimeFor):
1706         (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):        
1707         * editing/TypingCommand.cpp:
1708         (WebCore::TypingCommand::insertText):
1709         (WebCore::TypingCommand::markMisspellingsAfterTyping):
1710         (WebCore::TypingCommand::deleteKeyPressed):
1711         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1712         * editing/htmlediting.h:
1713         (WebCore::isAmbiguousBoundaryCharacter):
1714         * page/EditorClient.h:
1715         * page/Frame.cpp:
1716         (WebCore::Frame::setPageAndTextZoomFactors):
1717
1718 2011-04-08  Alpha Lam  <hclam@chromium.org>
1719
1720         Unreviewed, rolling out r83335.
1721         http://trac.webkit.org/changeset/83335
1722         https://bugs.webkit.org/show_bug.cgi?id=53556
1723
1724         GTK and QT bots are broken
1725
1726         * CMakeLists.txt:
1727         * Configurations/FeatureDefines.xcconfig:
1728         * DerivedSources.make:
1729         * GNUmakefile.am:
1730         * WebCore.gypi:
1731         * WebCore.xcodeproj/project.pbxproj:
1732         * features.pri:
1733         * html/HTMLAttributeNames.in:
1734         * html/HTMLTagNames.in:
1735         * html/HTMLTrackElement.cpp: Removed.
1736         * html/HTMLTrackElement.h: Removed.
1737         * html/HTMLTrackElement.idl: Removed.
1738
1739 2011-04-08  Brady Eidson  <beidson@apple.com>
1740
1741         Reviewed by Adam Roben.
1742
1743         https://bugs.webkit.org/show_bug.cgi?id=58155 and part of <rdar://problem/9251767>
1744         BitmapImage::getFirstCGImageRefOfSize fails if the frameCount hasn't been initialized from the image source.
1745
1746         * platform/graphics/cg/ImageCG.cpp:
1747         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Call frameCount() instead of accessing m_frames.size() to
1748           make sure the frames are properly tallied first.
1749
1750 2011-04-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
1751
1752         Reviewed by Andreas Kling.
1753
1754         [Qt] Dragging and dropping an image in edit mode does not work
1755         https://bugs.webkit.org/show_bug.cgi?id=19385
1756
1757         When adding an image to the clipboard, we should also include the HTML code of that image so
1758         it can be used for internal drag and drop.
1759
1760         This HTML is expected by all clients of drop events so a fragment can be moved from one browser to
1761         another, or inside the same browser.
1762
1763         * platform/qt/ClipboardQt.cpp:
1764         (WebCore::ClipboardQt::declareAndWriteDragImage):
1765
1766 2011-04-07  Anna Cavender  <annacc@chromium.org>
1767
1768         Reviewed by Eric Carlson.
1769
1770         Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
1771         https://bugs.webkit.org/show_bug.cgi?id=53556
1772
1773         No new tests. No real functionality added just yet.
1774
1775         * CMakeLists.txt:
1776         * Configurations/FeatureDefines.xcconfig:
1777         * DerivedSources.make:
1778         * GNUmakefile.am:
1779         * WebCore.gypi:
1780         * WebCore.xcodeproj/project.pbxproj:
1781         * features.pri:
1782         * html/HTMLAttributeNames.in:
1783         * html/HTMLTagNames.in:
1784         * html/HTMLTrackElement.cpp: Added.
1785         (WebCore::HTMLTrackElement::HTMLTrackElement):
1786         (WebCore::HTMLTrackElement::create):
1787         (WebCore::HTMLTrackElement::insertedIntoTree):
1788         (WebCore::HTMLTrackElement::willRemove):
1789         (WebCore::HTMLTrackElement::src):
1790         (WebCore::HTMLTrackElement::setSrc):
1791         (WebCore::HTMLTrackElement::kind):
1792         (WebCore::HTMLTrackElement::setKind):
1793         (WebCore::HTMLTrackElement::srclang):
1794         (WebCore::HTMLTrackElement::setSrclang):
1795         (WebCore::HTMLTrackElement::label):
1796         (WebCore::HTMLTrackElement::setLabel):
1797         (WebCore::HTMLTrackElement::isDefault):
1798         (WebCore::HTMLTrackElement::setIsDefault):
1799         (WebCore::HTMLTrackElement::isURLAttribute):
1800         * html/HTMLTrackElement.h: Added.
1801         * html/HTMLTrackElement.idl: Added.
1802
1803 2011-04-07  Jer Noble  <jer.noble@apple.com>
1804
1805         Reviewed by Eric Carlson.
1806
1807         Logic error in HTMLMediaElement::exitFullscreen()
1808         https://bugs.webkit.org/show_bug.cgi?id=58085
1809
1810         The new full screen API case could fall through to the legacy API case
1811         unintentionally if a script calls exitFullscreen on an element which is
1812         not the current full screen element.
1813
1814         * html/HTMLMediaElement.cpp:
1815         (WebCore::HTMLMediaElement::enterFullscreen):
1816         (WebCore::HTMLMediaElement::exitFullscreen):
1817
1818 2011-04-08  Mike Reed  <reed@google.com>
1819
1820         Reviewed by Eric Seidel.
1821
1822         Replace SKIA_TEXT with isNativeFontRenderingAllowed() for print-preview to work
1823         https://bugs.webkit.org/show_bug.cgi?id=57782
1824
1825         No new tests. This change only affects print-preview and build option SKIA_GPU 
1826
1827         * platform/graphics/skia/SkiaFontWin.cpp:
1828         (WebCore::paintSkiaText):
1829
1830 2011-04-08  Ryosuke Niwa  <rniwa@webkit.org>
1831
1832         Reviewed by Tony Chang, Darin Adler, and Enrica Casucci.
1833
1834         REGRESSION(r81887): Crash in SplitElement
1835         https://bugs.webkit.org/show_bug.cgi?id=57743
1836
1837         The crash was caused by ReplaceSelectionCommand::doApply's calling splitElement with computeNodeAfterPosition
1838         even when the position was after the last node in it container. Since all we are doing here is to splitting tree
1839         up until the highest ancestor with isInlineNodeWithStyle, replaced the while loop by calls to splitTreeToNode
1840         and highestEnclosingNodeOfType.
1841
1842         Also fixed a bug in splitTreeToNode not to check the difference in visible position when splitting the ancestor,
1843         which would have introduced unnecessary nodes when splitting tree and a bug in highestEnclosingNodeOfType that
1844         it incorrectly called deprecatedNode instead of containerNode.
1845
1846         Test: editing/inserting/insert-images-in-pre-x-crash.html
1847
1848         * editing/CompositeEditCommand.cpp:
1849         (WebCore::CompositeEditCommand::splitTreeToNode):
1850         * editing/ReplaceSelectionCommand.cpp:
1851         (WebCore::ReplaceSelectionCommand::doApply):
1852         * editing/htmlediting.cpp:
1853         (WebCore::highestEnclosingNodeOfType):
1854
1855 2011-04-08  Antti Koivisto  <antti@apple.com>
1856
1857         Reviewed by Tony Gentilcore.
1858
1859         Incoming source should be preload scanned when the parser is blocked 
1860         https://bugs.webkit.org/show_bug.cgi?id=58117
1861
1862         Scan the appended source if parser is blocked.
1863
1864         Test: http/tests/loading/preload-append-scan.php
1865
1866         * html/parser/HTMLDocumentParser.cpp:
1867         (WebCore::HTMLDocumentParser::append):
1868
1869 2011-04-08  Martin Robinson  <mrobinson@igalia.com>
1870
1871         Reviewed by Xan Lopez.
1872
1873         [GTK] Fix the WebKit2 build for older versions of GTK+
1874         https://bugs.webkit.org/show_bug.cgi?id=58095
1875
1876         No new tests. This is just a build fix.
1877
1878         * platform/gtk/GtkVersioning.c:
1879         (gdk_window_create_similar_surface): Reimplement this method for older versions of GDK.
1880         * platform/gtk/GtkVersioning.h: Add the new method to the header.
1881
1882 2011-04-08  Misha Tyutyunik  <michael.tyutyunik@nokia.com>
1883
1884         Reviewed by Laszlo Gombos.
1885
1886         [Qt] Plugin is not scrolled together with page content or jumping 
1887         when content is rendered using cache (backing store).
1888         https://bugs.webkit.org/show_bug.cgi?id=56130
1889         
1890         This is a Symbian portion of the fix. For Linux it looks like
1891         it's enough to call set geometry which should be addressed in
1892         https://bugs.webkit.org/show_bug.cgi?id=57179
1893
1894         No new tests required. This can be tested with manual tests from 
1895         WebCore/manual-tests/qt and WebCore/manual-tests/plugins
1896
1897         * plugins/symbian/PluginViewSymbian.cpp:
1898         (WebCore::PluginView::updatePluginWidget):
1899
1900 2011-04-08  Abhishek Arya  <inferno@chromium.org>
1901
1902         Unreviewed. Remove accidental printf added in r83306.
1903
1904         * page/EventHandler.cpp:
1905         (WebCore::EventHandler::sendContextMenuEvent):
1906
1907 2011-04-08  Enrica Casucci  <enrica@apple.com>
1908
1909         Reviewed by Darin Adler.
1910
1911         Dragging text in a WebKit2 window results in a copy instead of a move.
1912         https://bugs.webkit.org/show_bug.cgi?id=56772
1913         <rdar://problem/9165140>
1914
1915         cleanupAfterSystemDrag cannot call dragEnd in WebKit2, since
1916         the call to startDrag is asynchronous.
1917         
1918         * page/mac/DragControllerMac.mm:
1919         (WebCore::DragController::cleanupAfterSystemDrag):
1920
1921 2011-04-05  Dimitri Glazkov  <dglazkov@chromium.org>
1922
1923         Reviewed by Darin Adler.
1924
1925         Move WheelEvent-dispatching logic into WheelEventDispatchMediator.
1926         https://bugs.webkit.org/show_bug.cgi?id=57642
1927
1928         Covered by existing tests, no functional change.
1929
1930         * dom/Event.cpp:
1931         * dom/Event.h:
1932         (WebCore::EventDispatchMediator::EventDispatchMediator): Added default
1933             constructor.
1934         (WebCore::EventDispatchMediator::event): Inlined.
1935         (WebCore::EventDispatchMediator::setEvent): Added.
1936         * dom/EventDispatcher.cpp: Removed dispatchWheelEvent.
1937         * dom/EventDispatcher.h: Updated decls.
1938         * dom/Node.cpp:
1939         (WebCore::Node::dispatchWheelEvent): Changed to use the mediator and
1940             return a bool, like other dispatch event functions.
1941         * dom/Node.h: Changed decl.
1942         * dom/WheelEvent.cpp:
1943         (WebCore::granularity): Moved from EventDispatcher.
1944         (WebCore::WheelEventDispatchMediator::WheelEventDisatchMediator): Added.
1945         (WebCore::WheelEventDispatchMediator::event): Added.
1946         (WebCore::WheelEventDispatchMediator::dispatchEvent): Added.
1947         * dom/WheelEvent.h: Updated decls.
1948         * page/EventHandler.cpp:
1949         (WebCore::EventHandler::handleWheelEvent): Changed to receive and react
1950             to the return value.
1951
1952 2011-04-08  Jessie Berlin  <jberlin@apple.com>
1953
1954         Windows build warning fix.
1955
1956         * WebCore.vcproj/WebCore.vcproj:
1957         Since ShadowRoot.cpp is included in the DOMAllInOne.cpp file, it should be excluded from
1958         the build.
1959
1960 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1961
1962         Reviewed by Pavel Feldman.
1963
1964         Web Inspector: update breakpoints according to source frame decorations after live edit.
1965         https://bugs.webkit.org/show_bug.cgi?id=58029
1966
1967         * inspector/front-end/DebuggerPresentationModel.js:
1968         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
1969         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
1970         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent.didEditScriptSource):
1971         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent):
1972         * inspector/front-end/SourceFile.js:
1973         (WebInspector.SourceFile.prototype.set content):
1974         * inspector/front-end/SourceFrame.js:
1975         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
1976         (WebInspector.SourceFrame.prototype._handleSave):
1977
1978 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
1979
1980         Reviewed by Pavel Feldman.
1981
1982         Web Inspector: fix scripts concatenation in scripts panel.
1983         https://bugs.webkit.org/show_bug.cgi?id=58138
1984
1985         When there is just one script starting at 0:0 it should not be surrounded by <script> framing.
1986
1987         * inspector/front-end/SourceFile.js:
1988         (WebInspector.SourceFile.prototype._loadResourceContent):
1989         (WebInspector.SourceFile.prototype._loadAndConcatenateScriptsContent):
1990
1991 2011-04-08  Pavel Feldman  <pfeldman@chromium.org>
1992
1993         Reviewed by Yury Semikhatsky.
1994
1995         Web Inspector: use "locations" for debugger scripts, "lineNumbers" for the UI elements.
1996         https://bugs.webkit.org/show_bug.cgi?id=58118
1997
1998         This change reuses location for call frames in the protocol + structures script
1999         location <-> source lines interaction better. When we need UI columns, we will add
2000         them, but we should distinguish between script and UI terms on the type level, not naming.
2001
2002         * English.lproj/localizedStrings.js:
2003         * bindings/v8/DebuggerScript.js:
2004         * inspector/InjectedScriptSource.js:
2005         * inspector/Inspector.json:
2006         * inspector/front-end/CallStackSidebarPane.js:
2007         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine):
2008         (WebInspector.CallStackSidebarPane.prototype.update):
2009         * inspector/front-end/DebuggerPresentationModel.js:
2010         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestSourceMapping):
2011         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
2012         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
2013         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
2014         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
2015         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
2016         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2017         (WebInspector.PresenationCallFrame):
2018         (WebInspector.PresenationCallFrame.prototype.sourceLine.didRequestSourceMapping):
2019         (WebInspector.PresenationCallFrame.prototype.sourceLine):
2020         * inspector/front-end/ScriptFormatter.js:
2021         (WebInspector.ScriptFormatter.locationToPosition):
2022         (WebInspector.ScriptFormatter.lineToPosition):
2023         * inspector/front-end/ScriptsPanel.js:
2024         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
2025         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
2026         (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
2027         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
2028         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
2029         * inspector/front-end/SourceFile.js:
2030         (WebInspector.SourceMapping.prototype.scriptLocationToSourceLine):
2031         (WebInspector.SourceMapping.prototype.sourceLineToScriptLocation):
2032         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
2033         (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
2034
2035 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
2036
2037         Reviewed by Pavel Feldman.
2038
2039         Web Inspector: distinguish breakpoints set on de-obfuscated sources from breakponts set on original sources.
2040         https://bugs.webkit.org/show_bug.cgi?id=58133
2041
2042         * inspector/front-end/DebuggerPresentationModel.js:
2043         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
2044         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2045         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
2046         (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
2047         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
2048         (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
2049         (WebInspector.DebuggerPresentationModel.prototype._reset):
2050
2051 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
2052
2053         Reviewed by Pavel Feldman.
2054
2055         Web Inspector: make SourceFrame TextViewer's delegate for editing operations.
2056         https://bugs.webkit.org/show_bug.cgi?id=58026
2057
2058         This is the first step of decoupling TextViewer from SourceFrame.
2059
2060         * inspector/front-end/SourceFrame.js:
2061         (WebInspector.SourceFrame):
2062         (WebInspector.SourceFrame.prototype.show):
2063         (WebInspector.SourceFrame.prototype.hide):
2064         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
2065         (WebInspector.SourceFrame.prototype.contentEditable):
2066         (WebInspector.SourceFrame.prototype.startEditing):
2067         (WebInspector.SourceFrame.prototype.endEditing):
2068         (WebInspector.SourceFrame.prototype._createTextViewer):
2069         (WebInspector.SourceFrame.prototype._handleSave):
2070         (WebInspector.SourceFrame.prototype._handleRevertEditing):
2071         * inspector/front-end/TextViewer.js:
2072         (WebInspector.TextViewer.prototype._enterInternalTextChangeMode):
2073         (WebInspector.TextViewer.prototype._exitInternalTextChangeMode):
2074         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
2075         (WebInspector.TextViewer.prototype._doubleClick):
2076         (WebInspector.TextViewerDelegate):
2077         (WebInspector.TextViewerDelegate.prototype.contentEditable):
2078         (WebInspector.TextViewerDelegate.prototype.startEditing):
2079         (WebInspector.TextViewerDelegate.prototype.endEditing):
2080         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
2081         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
2082         * inspector/front-end/inspector.html:
2083
2084 2011-04-08  Leandro Gracia Gil  <leandrogracia@chromium.org>
2085
2086         Reviewed by Steve Block.
2087
2088         Media Stream API: add the getUserMedia method and the Javascript bindings.
2089         https://bugs.webkit.org/show_bug.cgi?id=56586
2090
2091         Add the getUserMedia method to the navigator and its new Javascript types.
2092         Current specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#video-conferencing-and-peer-to-peer-communication
2093
2094         Tests: fast/dom/MediaStream/argument-types.html
2095                fast/dom/MediaStream/enabled.html
2096                fast/dom/MediaStream/no-interface-object.html
2097
2098         * Android.derived.jscbindings.mk:
2099         * Android.derived.v8bindings.mk:
2100         * Android.v8bindings.mk:
2101         * CMakeLists.txt:
2102         * CodeGenerators.pri:
2103         * DerivedSources.cpp:
2104         * DerivedSources.make:
2105         * GNUmakefile.list.am:
2106         * WebCore.gypi:
2107         * WebCore.pro:
2108         * WebCore.vcproj/WebCore.vcproj:
2109         * WebCore.xcodeproj/project.pbxproj:
2110         * bindings/js/JSNavigatorCustom.cpp:
2111         (WebCore::JSNavigator::webkitGetUserMedia):
2112         * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
2113         (WebCore::V8Navigator::webkitGetUserMediaCallback):
2114         * page/Navigator.cpp:
2115         (WebCore::Navigator::webkitGetUserMedia):
2116         * page/Navigator.h:
2117         * page/Navigator.idl:
2118         * page/NavigatorUserMediaError.h: Added.
2119         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
2120         (WebCore::NavigatorUserMediaError::~NavigatorUserMediaError):
2121         (WebCore::NavigatorUserMediaError::code):
2122         * page/NavigatorUserMediaError.idl: Added.
2123         * page/NavigatorUserMediaErrorCallback.h: Added.
2124         (WebCore::NavigatorUserMediaErrorCallback::~NavigatorUserMediaErrorCallback):
2125         * page/NavigatorUserMediaErrorCallback.idl: Added.
2126         * page/NavigatorUserMediaSuccessCallback.h: Added.
2127         (WebCore::NavigatorUserMediaSuccessCallback::~NavigatorUserMediaSuccessCallback):
2128         * page/NavigatorUserMediaSuccessCallback.idl: Added.
2129
2130 2011-04-08  Mikhail Naganov  <mnaganov@chromium.org>
2131
2132         Reviewed by Pavel Feldman.
2133
2134         Web Inspector: [Chromium] Add more tests for detailed heap snapshots UI.
2135         https://bugs.webkit.org/show_bug.cgi?id=58010
2136         https://bugs.webkit.org/show_bug.cgi?id=58011
2137
2138         Added tests for "Containment" view. Minor refactorings, bugs fixed.
2139         Split one large tests into smaller ones to avoid timing out in debug mode.
2140
2141         Tests: inspector/profiler/detailed-heapshots-containment-expansion-preserved-when-sorting.html
2142                inspector/profiler/detailed-heapshots-containment-show-all.html
2143                inspector/profiler/detailed-heapshots-containment-show-next.html
2144                inspector/profiler/detailed-heapshots-containment-sorting.html
2145                inspector/profiler/detailed-heapshots-summary-expansion-preserved-when-sorting.html
2146                inspector/profiler/detailed-heapshots-summary-show-all.html
2147                inspector/profiler/detailed-heapshots-summary-show-next.html
2148                inspector/profiler/detailed-heapshots-summary-sorting.html
2149
2150         * inspector/front-end/DetailedHeapshotGridNodes.js:
2151         (WebInspector.HeapSnapshotGridNode):
2152         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
2153         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
2154         (WebInspector.HeapSnapshotGridNode.prototype.sort):
2155         (WebInspector.HeapSnapshotGenericObjectNode):
2156         (WebInspector.HeapSnapshotObjectNode):
2157         (WebInspector.HeapSnapshotInstanceNode):
2158         (WebInspector.HeapSnapshotConstructorNode):
2159         (WebInspector.HeapSnapshotDiffNode):
2160         (WebInspector.HeapSnapshotDominatorObjectNode):
2161         * inspector/front-end/DetailedHeapshotView.js:
2162         (WebInspector.HeapSnapshotContainmentDataGrid):
2163         (WebInspector.HeapSnapshotDominatorsDataGrid):
2164
2165 2011-04-08  Andrey Adaikin  <aandrey@google.com>
2166
2167         Reviewed by Pavel Feldman.
2168
2169         Web Inspector: Bugs in some corner cases in the text editor
2170         https://bugs.webkit.org/show_bug.cgi?id=58025
2171
2172         This solves the following bugs:
2173         1) The very last _empty_ line would not be deleted if you hit a Backspace on it, or the selection text to be deleted is extended to the very bottom of the editor.
2174         2) An odd corner case: delete all source code from the editor, hit backspace on the only empty line, then add a character. In this case the browser will insert a TEXT node instead of a DIV node for a lineRow.
2175
2176         * inspector/front-end/TextViewer.js:
2177         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
2178         (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf):
2179         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
2180         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
2181         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDiv):
2182
2183 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
2184
2185         Reviewed by Pavel Feldman.
2186
2187         Web Inspector: add test for script formatter worker.
2188         https://bugs.webkit.org/show_bug.cgi?id=57447
2189
2190         Test: inspector/debugger/script-formatter.html
2191
2192         * GNUmakefile.am:
2193         * WebCore.xcodeproj/project.pbxproj:
2194         * gyp/streamline-inspector-source.sh:
2195         * inspector/front-end/DebuggerPresentationModel.js:
2196         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2197         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2198         (WebInspector.DebuggerPresentationModel.prototype._formatter):
2199         * inspector/front-end/ScriptFormatterWorker.js:
2200
2201 2011-04-08  Andrey Adaikin  <aandrey@google.com>
2202
2203         Reviewed by Pavel Feldman.
2204
2205         Web Inspector: Tweak dynamically constants for the async highlighting in text editor
2206         https://bugs.webkit.org/show_bug.cgi?id=58035
2207
2208         * inspector/front-end/TextViewer.js:
2209         (WebInspector.TextEditorMainPanel.prototype._expandChunks):
2210         (WebInspector.TextEditorMainPanel.prototype._schedulePaintLines):
2211         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
2212         (WebInspector.TextEditorMainPanel.prototype._restorePaintLinesOperationsCredit):
2213         (WebInspector.TextEditorMainPanel.prototype._adjustPaintLinesOperationsRefreshValue):
2214
2215 2011-04-08  Andrey Kosyakov  <caseq@chromium.org>
2216
2217         Reviewed by Yury Semikhatsky.
2218
2219         Web Inspector: HAR compliance fixes
2220         https://bugs.webkit.org/show_bug.cgi?id=58124
2221
2222         - Always provide some values for queryString and cookies, even though arrays may be empty
2223         - Always provide an empty cache object
2224         - Added entire HARLog to test
2225         - Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms)
2226
2227         * inspector/front-end/HAREntry.js:
2228         (WebInspector.HAREntry.prototype.build):
2229         (WebInspector.HAREntry.prototype._buildRequest):
2230         (WebInspector.HAREntry.prototype._buildResponse):
2231
2232 2011-04-08  Adam Barth  <abarth@webkit.org>
2233
2234         Attempt to fix the Qt build.
2235
2236         * css/CSSStyleApplyProperty.cpp:
2237
2238 2011-04-07  Adam Barth  <abarth@webkit.org>
2239
2240         Reviewed by Eric Seidel.
2241
2242         Refactor WebCore/GNUMakefile.am to separate list of files
2243         https://bugs.webkit.org/show_bug.cgi?id=58116
2244
2245         This change is similar to the cooresponding to change to
2246         JavaScriptCore.  We hope to generate GNUmakefile.list.am automatically
2247         using GYP.
2248
2249         * GNUmakefile.am:
2250         * GNUmakefile.list.am: Added.
2251
2252 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
2253
2254         Not reviewed.
2255
2256         Rolled out some accidentally-committed changes in my last commit.
2257
2258         * dom/EventTarget.cpp:
2259         (WebCore::EventTarget::addEventListener):
2260         (WebCore::EventTarget::removeEventListener):
2261         * dom/EventTarget.h:
2262
2263 2011-04-07  Julien Chaffraix  <jchaffraix@codeaurora.org>
2264
2265         Reviewed by Alexey Proskuryakov.
2266
2267         EventSource should only accept UTF-8 charset
2268         https://bugs.webkit.org/show_bug.cgi?id=56942
2269
2270         Following the discussion on bug 45372, this change implements the recommended
2271         way of handling "charset". We only accept UTF-8 but no other encoding. This matches
2272         the encoding of the EventSource and also may fix TomCat that automatically send this
2273         charset.
2274
2275         * page/EventSource.cpp:
2276         (WebCore::EventSource::didReceiveResponse): We now check the charset attribute and if it is
2277         not UTF-8, abort the connection and log the error to the console. Also we log if the MIME type
2278         is wrong to the console to help debugging (only in the case of an HTTP 200 response though).
2279
2280 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
2281
2282         Reviewed by Maciej Stachowiak.
2283
2284         Some Handle<T> cleanup
2285         https://bugs.webkit.org/show_bug.cgi?id=58109
2286
2287         * bindings/js/ScriptValue.h:
2288         (WebCore::ScriptValue::ScriptValue): Updated for new null constructor.
2289         (WebCore::ScriptValue::hasNoValue): Updated for removal of isEmpty().
2290
2291 2011-04-07  Dominic Cooney  <dominicc@google.com>
2292
2293         Reviewed by Dimitri Glazkov.
2294
2295         Let shadow DOM have a list of nodes at the top level of a shadow.
2296         https://bugs.webkit.org/show_bug.cgi?id=57813
2297
2298         Adds ShadowRoot, a list of nodes, to be a parent for top-level
2299         shadow children. Forwards rendering through the root and into the
2300         host's renderer.
2301
2302         Covered by existing tests of elements that use this style of shadow.
2303
2304         * Android.mk: add ShadowRoot.h/cpp
2305         * CMakeLists.txt:
2306         * GNUmakefile.am:
2307         * WebCore.exp.in:
2308         * WebCore.gypi:
2309         * WebCore.pro:
2310         * WebCore.vcproj/WebCore.vcproj:
2311         * WebCore.xcodeproj/project.pbxproj:
2312         * css/CSSStyleSelector.cpp:
2313         (WebCore::CSSStyleSelector::initForStyleResolve): proxy style to host
2314         * dom/ContainerNode.cpp: parent nodes that are shadow roots are alive
2315         (WebCore::ContainerNode::insertBefore):
2316         (WebCore::ContainerNode::replaceChild):
2317         (WebCore::ContainerNode::removeChild):
2318         (WebCore::ContainerNode::appendChild):
2319         * dom/DocumentFragment.cpp:
2320         (WebCore::DocumentFragment::DocumentFragment):
2321         * dom/DocumentFragment.h:
2322         * dom/Element.cpp:
2323         (WebCore::Element::recalcStyle): look through ShadowRoots for host's style
2324         (WebCore::Element::shadowRoot): should be const
2325         (WebCore::Element::ensureShadowRoot): simpler than setShadowRoot
2326         * dom/Element.h:
2327         * dom/ElementRareData.h:
2328         * dom/Node.cpp:
2329         (WebCore::Node::parentNodeForRenderingAndStyle): indirection so
2330           ShadowRoot can forward to the host's renderer
2331         (WebCore::Node::createRendererAndStyle):
2332         (WebCore::Node::createRendererIfNeeded):
2333         * dom/Node.h:
2334         (WebCore::Node::isShadowBoundary): temporary, to differentiate
2335           old- and new-style, until all roots are ShadowRoot instances
2336         * dom/ShadowRoot.cpp: Added.
2337         (WebCore::ShadowRoot::ShadowRoot):
2338         (WebCore::ShadowRoot::recalcStyle): forward recalc to children
2339         * dom/ShadowRoot.h: Added.
2340         (WebCore::ShadowRoot::isShadowBoundary):
2341         (WebCore::ShadowRoot::create):
2342         * html/HTMLKeygenElement.cpp: use ensureShadowRoot
2343         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2344         (WebCore::HTMLKeygenElement::parseMappedAttribute):
2345         (WebCore::HTMLKeygenElement::appendFormData):
2346         (WebCore::HTMLKeygenElement::reset):
2347         (WebCore::HTMLKeygenElement::shadowSelect):
2348         * html/HTMLKeygenElement.h:
2349         * html/HTMLMeterElement.cpp: use ensureShadowRoot
2350         (WebCore::HTMLMeterElement::createShadowSubtree):
2351         * html/HTMLProgressElement.cpp: use ensureShadowRoot
2352         (WebCore::HTMLProgressElement::createShadowSubtree):
2353         * html/InputType.cpp: use ensureShadowRoot
2354         (WebCore::InputType::destroyShadowSubtree):
2355         * html/RangeInputType.cpp: use ensureShadowRoot
2356         (WebCore::RangeInputType::handleMouseDownEvent):
2357         (WebCore::RangeInputType::createShadowSubtree):
2358         (WebCore::RangeInputType::valueChanged):
2359         (WebCore::RangeInputType::shadowSliderThumb):
2360         * html/RangeInputType.h:
2361         * html/ValidationMessage.cpp: use ensureShadowRoot
2362         (WebCore::ValidationMessage::buildBubbleTree):
2363         (WebCore::ValidationMessage::deleteBubbleTree):
2364         * html/shadow/SliderThumbElement.cpp:
2365         (WebCore::SliderThumbElement::setPositionFromPoint):
2366         (WebCore::SliderThumbElement::hostInput):
2367         * html/shadow/SliderThumbElement.h:
2368         * rendering/MediaControlElements.cpp: use ensureShadowRoot
2369         (WebCore::MediaControlInputElement::attach):
2370         (WebCore::MediaControlInputElement::updateStyle):
2371         * rendering/RenderSlider.cpp: use ensureShadowRoot
2372         (WebCore::RenderSlider::thumbRect):
2373         (WebCore::RenderSlider::layout):
2374         (WebCore::RenderSlider::shadowSliderThumb):
2375         (WebCore::RenderSlider::inDragMode):
2376         * rendering/RenderSlider.h:
2377
2378 2011-04-07  Maciej Stachowiak  <mjs@apple.com>
2379
2380         Reviewed by Simon Fraser.
2381
2382         REGRESSION (r80871): Crash when visiting http://broadband.biglobe.ne.jp/
2383         https://bugs.webkit.org/show_bug.cgi?id=56297
2384         <rdar://problem/9131597>
2385
2386         Test: fast/css-generated-content/table-row-after-no-crash.html
2387
2388         * rendering/RenderTableRow.cpp:
2389         (WebCore::RenderTableRow::styleDidChange): Factor out generation of before/after
2390         content, and only do it if the row already has a parent. For construction of
2391         anonymous cells to work correctly, the row needs to already have a parent, so
2392         in that case wait a bit.
2393         (WebCore::RenderTableRow::updateBeforeAndAfterContent): Factored out to here.
2394         * rendering/RenderTableRow.h:
2395         * rendering/RenderTableSection.cpp:
2396         (WebCore::RenderTableSection::addChild): When adding a row, update its
2397         before/after content, in case it had any.
2398
2399 2011-04-07  Beth Dakin  <bdakin@apple.com>
2400
2401         Reviewed by Simon Fraser.
2402
2403         Probable fix for <rdar://problem/9251443>  Crashing on exception: -
2404         [ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]: unrecognized 
2405         selector sent to instance ADDRESS.
2406
2407        Need to implement new delegate method.
2408         * platform/mac/ScrollAnimatorMac.mm:
2409         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
2410
2411 2011-04-07  Ian Henderson  <ianh@apple.com>
2412
2413         Reviewed by Simon Fraser.
2414
2415         Optimize filling rounded rects that are actually ellipses
2416         https://bugs.webkit.org/show_bug.cgi?id=58098
2417
2418         In CG, drawing an ellipse directly is faster than constructing and
2419         filling a rounded rect path.  Detect when the given rounded rect is
2420         actually an ellipse and draw it directly in this case.
2421
2422         * platform/graphics/cg/GraphicsContextCG.cpp:
2423         (WebCore::GraphicsContext::fillRoundedRect):
2424
2425 2011-04-07  Ned Holbrook  <nholbrook@apple.com>
2426
2427         Reviewed by Dan Bernstein.
2428
2429         CTLine objects should outlive their CTRuns
2430         https://bugs.webkit.org/show_bug.cgi?id=58063
2431
2432         * platform/graphics/mac/ComplexTextController.h: Add m_coreTextLines, to be destroyed after m_complexTextRuns.
2433         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
2434         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moot m_coreTextRun.
2435         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Append line to m_coreTextLines.
2436
2437 2011-04-07  Nat Duca  <nduca@chromium.org>
2438
2439         Reviewed by David Levin.
2440
2441         [chromium] Compositor thread infrastructure
2442         https://bugs.webkit.org/show_bug.cgi?id=56131
2443
2444         Introduce chrome compositor thread and related
2445         infrastructure.
2446
2447         * WebCore.gypi:
2448         * platform/graphics/chromium/cc/CCMainThread.cpp: Added.
2449         (WebCore::CCMainThread::performTask):
2450         (WebCore::CCMainThread::postTask):
2451         * platform/graphics/chromium/cc/CCMainThread.h: Added.
2452         (WebCore::CCMainThread::Task::~Task):
2453         (WebCore::CCMainThread::Task::instance):
2454         (WebCore::CCMainThread::Task::Task):
2455         * platform/graphics/chromium/cc/CCMainThreadTask.h: Added.
2456         (WebCore::MainThreadTask0::create):
2457         (WebCore::MainThreadTask0::MainThreadTask0):
2458         (WebCore::MainThreadTask0::performTask):
2459         (WebCore::MainThreadTask1::create):
2460         (WebCore::MainThreadTask1::MainThreadTask1):
2461         (WebCore::MainThreadTask1::performTask):
2462         (WebCore::MainThreadTask2::create):
2463         (WebCore::MainThreadTask2::MainThreadTask2):
2464         (WebCore::MainThreadTask2::performTask):
2465         (WebCore::MainThreadTask3::create):
2466         (WebCore::MainThreadTask3::MainThreadTask3):
2467         (WebCore::MainThreadTask3::performTask):
2468         (WebCore::createMainThreadTask):
2469         * platform/graphics/chromium/cc/CCThread.cpp: Added.
2470         (WebCore::CCThread::create):
2471         (WebCore::CCThread::CCThread):
2472         (WebCore::CCThread::~CCThread):
2473         (WebCore::CCThread::postTask):
2474         (WebCore::CCThread::compositorThreadStart):
2475         (WebCore::CCThread::runLoop):
2476         * platform/graphics/chromium/cc/CCThread.h: Added.
2477         (WebCore::CCThread::Task::~Task):
2478         (WebCore::CCThread::Task::instance):
2479         (WebCore::CCThread::Task::Task):
2480         (WebCore::CCThread::threadID):
2481         (WebCore::CCCompletionEvent::CCCompletionEvent):
2482         (WebCore::CCCompletionEvent::~CCCompletionEvent):
2483         (WebCore::CCCompletionEvent::wait):
2484         (WebCore::CCCompletionEvent::signal):
2485         * platform/graphics/chromium/cc/CCThreadTask.h: Added.
2486         (WebCore::CCThreadTask0::create):
2487         (WebCore::CCThreadTask0::CCThreadTask0):
2488         (WebCore::CCThreadTask0::performTask):
2489         (WebCore::CCThreadTask1::create):
2490         (WebCore::CCThreadTask1::CCThreadTask1):
2491         (WebCore::CCThreadTask1::performTask):
2492         (WebCore::CCThreadTask2::create):
2493         (WebCore::CCThreadTask2::CCThreadTask2):
2494         (WebCore::CCThreadTask2::performTask):
2495         (WebCore::CCThreadTask3::create):
2496         (WebCore::CCThreadTask3::CCThreadTask3):
2497         (WebCore::CCThreadTask3::performTask):
2498         (WebCore::createCCThreadTask):
2499
2500 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
2501
2502         Reviewed by Eric Seidel.
2503
2504         REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
2505         https://bugs.webkit.org/show_bug.cgi?id=57872
2506
2507         r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
2508         because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
2509
2510         r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
2511         avoiding the tab span.
2512
2513         Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
2514         Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
2515         we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
2516         before moving the nodes.
2517
2518         Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
2519                editing/inserting/insert-paragraph-separator-tab-span.html
2520
2521         * editing/DeleteSelectionCommand.cpp:
2522         (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
2523         no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
2524         * editing/EditingStyle.cpp:
2525         (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
2526         * editing/InsertParagraphSeparatorCommand.cpp:
2527         (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
2528         separator into a paragraph separator.
2529         * editing/htmlediting.cpp:
2530         (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
2531         node after the tab span if the position was at the end of the tab span.
2532         * editing/htmlediting.h:
2533
2534 2011-04-07  Jia Pu  <jpu@apple.com>
2535
2536         Reviewed by Darin Adler.
2537
2538         [Mac] Editor::setComposition() should not trigger correction panel timer.
2539         https://bugs.webkit.org/show_bug.cgi?id=58049
2540          <rdar://problem/9226305>
2541
2542         On Mac OS X that supports autocorrection panel, typing unconfirmed composition (i.e. unconfirmed Japanese or Chinese input)
2543         should not start autocorrection timer. We added a member variable, m_shouldPreventSpellChecking, to TypingCommand. 
2544         When this value is true, markMisspellingsAfterTyping() will not be called in TypingCommand::typingAddedToOpenCommand().
2545         m_shouldPreventSpellChecking is set to true in the TypingCommand objects created by Editor::setComposition().
2546
2547         No new tests. No deterministically reproducible test case. Patch is based on static code analysis. Testing this also requires firing
2548         autocorrection panel timer, which can not be easily done in automated fashion.
2549
2550         * editing/Editor.cpp:
2551         (WebCore::Editor::deleteWithDirection):
2552         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2553         (WebCore::Editor::confirmComposition):
2554         (WebCore::Editor::setComposition):
2555         * editing/EditorCommand.cpp:
2556         (WebCore::executeDelete):
2557         * editing/TypingCommand.cpp:
2558         (WebCore::TypingCommand::TypingCommand):
2559         (WebCore::TypingCommand::deleteSelection):
2560         (WebCore::TypingCommand::deleteKeyPressed):
2561         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2562         (WebCore::TypingCommand::insertText):
2563         (WebCore::TypingCommand::insertLineBreak):
2564         (WebCore::TypingCommand::insertParagraphSeparator):
2565         (WebCore::TypingCommand::typingAddedToOpenCommand):
2566         * editing/TypingCommand.h:
2567         (WebCore::TypingCommand::create):
2568         (WebCore::TypingCommand::setShouldPreventSpellChecking):
2569
2570 2011-04-07  John Bauman  <jbauman@chromium.org>
2571
2572         Reviewed by Kenneth Russell.
2573
2574         clearIfComposited call is really slow
2575         https://bugs.webkit.org/show_bug.cgi?id=57999
2576
2577         Move getContextAttributes call after the if, so it isn't called nearly as often.
2578
2579         No new tests.
2580
2581         * html/canvas/WebGLRenderingContext.cpp:
2582         (WebCore::WebGLRenderingContext::clearIfComposited):
2583
2584 2011-04-07  Luke Macpherson   <macpherson@chromium.org>
2585
2586         Reviewed by Dimitri Glazkov.
2587
2588         Implement Backgroun and Mask properties in CSSStyleApplyProperty
2589         https://bugs.webkit.org/show_bug.cgi?id=57922
2590
2591         No tests added as no behavioral changes.
2592
2593         * css/CSSStyleApplyProperty.cpp:
2594         Added ApplyPropertyFillLayer test to handle Background and Mask CSS Properties.
2595         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2596         Added constructor calls to set up:
2597           CSSPropertyBackgroundAttachment
2598           CSSPropertyBackgroundClip
2599           CSSPropertyWebkitBackgroundClip
2600           CSSPropertyWebkitBackgroundComposite
2601           CSSPropertyBackgroundOrigin
2602           CSSPropertyWebkitBackgroundOrigin
2603           CSSPropertyBackgroundSize
2604           CSSPropertyWebkitBackgroundSize
2605           CSSPropertyWebkitMaskAttachment
2606           CSSPropertyWebkitMaskClip
2607           CSSPropertyWebkitMaskComposite
2608           CSSPropertyWebkitMaskOrigin
2609           CSSPropertyWebkitMaskSize
2610         * css/CSSStyleApplyProperty.h:
2611         (WebCore::CSSStyleApplyProperty::setPropertyValue):
2612         Add function to specify an equivalent property value in the lookup table.
2613         * css/CSSStyleSelector.cpp:
2614         (WebCore::CSSStyleSelector::applyProperty):
2615         Remove sections now implemented by CSSStyleApplyProperty.
2616         * css/CSSStyleSelector.h:
2617         Make CSSStyleApplyProperty a friend class so that the mapFill* functions are accessible.
2618
2619 2011-04-04  Eric Seidel  <eric@webkit.org>
2620
2621         Reviewed by Ryosuke Niwa.
2622
2623         Split run storage out from BidiResolver into a new BidiRunList class
2624         https://bugs.webkit.org/show_bug.cgi?id=57764
2625
2626         Part of what makes BidiResolver and InlineIterator so difficult to understand
2627         (and bug 50912 so difficult to fix) is that BidiResolver is both a state machine
2628         for the Unicode Bidi Algorithm (UBA) as well as storage for the resulting
2629         BidiRuns from the algorithm.  This patch breaks the storage aspect off
2630         into its own class BidiRunList.
2631
2632         This patch is only a start.  It does not actually fix the problematic ownership
2633         relationship, but it does make it possible to fix such in a second patch.
2634
2635         The run pointers and addRun/prependRun, etc. were already a tightly coupled
2636         logical subset of the BidiResolver class, so moving them into their own class
2637         was both obvious and easy.  The only piece of logic I had to move was that
2638         deleteRuns() had a side-effect of setting the m_emptyRun bit on the resolver.
2639
2640         I believe this deleteRuns side-effect was only ever used for one place
2641         (right after findNextLineBreak) and that it's only needed because
2642         findNextLineBreak can sometimes create bidi runs.  Run creation appears to be
2643         an unintentional side-effect of how InlineIterator calls through to BidiResolver
2644         as part of bidiNext and not a desired effect of the code.  I have added the call
2645         to markCurrentRunEmpty to both places deleteRuns was called (where the resolver
2646         could get re-used) as a safety precaution.  We could replace both with ASSERTs
2647         in a later patch.
2648
2649         I suspect there may be a small performance win from further refactoring so that
2650         findNextLineBreak does not need to create BidiRuns.
2651
2652         As I commented in the code, callers should own their own BidiRunList which they
2653         pass to BidiResolver::createBidiRunsForLine.  I attempted to implement that in
2654         an earlier version of this patch, but it was too complicated with the current
2655         twisted dependencies between InlineIterator/bidiNext and InlineBidiResolver.
2656         raise/lowerExplicitEmbeddingLevel are called unconditionally
2657         from commitExplicitEmbedding (which is called by bidiNext) and expect to have
2658         access to a runs list even in cases where we don't want any runs (findNextLineBreak).
2659
2660         I also cleaned up some of the callers to pass around BidiRunList objects instead
2661         of InlineBidiResolvers now that they're separate objects.
2662
2663         * GNUmakefile.am:
2664         * WebCore.gypi:
2665         * WebCore.pro:
2666         * WebCore.vcproj/WebCore.vcproj:
2667         * WebCore.xcodeproj/project.pbxproj:
2668         * platform/graphics/GraphicsContext.cpp:
2669         (WebCore::GraphicsContext::drawBidiText):
2670         * platform/text/BidiResolver.h:
2671         (WebCore::BidiResolver::BidiResolver):
2672         (WebCore::BidiResolver::runs):
2673         (WebCore::BidiResolver::markCurrentRunEmpty):
2674         (WebCore::::appendRun):
2675         (WebCore::::lowerExplicitEmbeddingLevel):
2676         (WebCore::::raiseExplicitEmbeddingLevel):
2677         (WebCore::::reorderRunsFromLevels):
2678         (WebCore::::createBidiRunsForLine):
2679         * rendering/InlineIterator.h:
2680         (WebCore::InlineBidiResolver::appendRun):
2681         * rendering/RenderBlock.h:
2682         * rendering/RenderBlockLineLayout.cpp:
2683         (WebCore::createRun):
2684         (WebCore::RenderBlock::appendRunsForObject):
2685         (WebCore::reachedEndOfTextRenderer):
2686         (WebCore::RenderBlock::handleTrailingSpaces):
2687         (WebCore::RenderBlock::layoutInlineChildren):
2688
2689 2011-04-07  Naoki Takano  <takano.naoki@gmail.com>
2690
2691         Reviewed by Adam Barth.
2692
2693         [Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
2694         https://bugs.webkit.org/show_bug.cgi?id=57911
2695         http://code.google.com/p/chromium/issues/detail?id=78073
2696
2697         Manual test added: manual-tests/autofill-popup-location.html
2698
2699         Originally only height is checked so that it introduces the bug.
2700         So I changed it to check both width and height as size.
2701
2702         * manual-tests/autofill-popup-location.html: Added.
2703         * platform/chromium/PopupMenuChromium.cpp:
2704         (WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().
2705
2706 2011-04-07  Adam Barth  <abarth@webkit.org>
2707
2708         Reviewed by Eric Seidel.
2709
2710         Implement img-src style-src and font-src
2711         https://bugs.webkit.org/show_bug.cgi?id=58018
2712
2713         These are pretty straight forward given the rest of the infrastructure
2714         we've built so far.
2715
2716         Tests: http/tests/security/contentSecurityPolicy/image-allowed.html
2717                http/tests/security/contentSecurityPolicy/image-blocked.html
2718                http/tests/security/contentSecurityPolicy/style-allowed.html
2719                http/tests/security/contentSecurityPolicy/style-blocked.html
2720                http/tests/security/contentSecurityPolicy/xsl-allowed.php
2721                http/tests/security/contentSecurityPolicy/xsl-blocked.php
2722
2723         * loader/cache/CachedResourceLoader.cpp:
2724         (WebCore::CachedResourceLoader::canRequest):
2725         * page/ContentSecurityPolicy.cpp:
2726         (WebCore::ContentSecurityPolicy::allowImageFromSource):
2727         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2728         (WebCore::ContentSecurityPolicy::allowFontFromSource):
2729         (WebCore::ContentSecurityPolicy::addDirective):
2730         * page/ContentSecurityPolicy.h:
2731
2732 2011-04-07  David Levin  <levin@chromium.org>
2733
2734         Reviewed by Darin Adler.
2735
2736         Make IconSnapshot and PageURLRecord member variables private.
2737         https://bugs.webkit.org/show_bug.cgi?id=58080
2738
2739         No change in functionality so no new tests.
2740
2741         * loader/icon/IconDatabase.cpp:
2742         (WebCore::IconDatabase::writeToDatabase): Changed to used the accessor functions.
2743         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): Ditto.
2744         * loader/icon/IconRecord.h:
2745         (WebCore::IconSnapshot::IconSnapshot): Changed to use the new member variable names.
2746         (WebCore::IconSnapshot::iconURL): Expose the property.
2747         (WebCore::IconSnapshot::timestamp): Ditto.
2748         (WebCore::IconSnapshot::data): Ditto.
2749         * loader/icon/PageURLRecord.h:
2750         (WebCore::PageURLSnapshot::PageURLSnapshot): Changed to use the new member variable names.
2751         (WebCore::PageURLSnapshot::pageURL): Expose the property.
2752         (WebCore::PageURLSnapshot::iconURL): Ditto.
2753
2754 2011-04-07  Dan Bernstein  <mitz@apple.com>
2755
2756         Build fix.
2757
2758         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2759         (WebCore::GraphicsContext::roundToDevicePixels):
2760
2761 2011-04-07  Eric Seidel  <eric@webkit.org>
2762
2763         Reviewed by Adam Barth.
2764
2765         Add stub support for generating Gtk build system from gyp
2766         https://bugs.webkit.org/show_bug.cgi?id=58086
2767
2768         This does not produce a buildable WebCore, but it
2769         does allow running gyp/configure --port=gtk and having
2770         it generate a gtk.Makefile which we can use for testing
2771         the rest of the plumbing.
2772
2773         * gyp/gtk.gyp: Added.
2774
2775 2011-04-07  David Hyatt  <hyatt@apple.com>
2776
2777         Reviewed by Dan Bernstein.
2778
2779         https://bugs.webkit.org/show_bug.cgi?id=57736
2780         
2781         Crash on openstreetmap.org while using the map. Fix a bad interaction between the positioned movement layout
2782         optimization and the simplified layout optimization that could lead to blocks remaining marked as dirty when
2783         layout finished. This would eventually lead to an inability to properly determine the correct layout root and
2784         would cause a deleted root to be used later on.
2785
2786         Added fast/block/positioning/complex-positioned-movement.html.
2787
2788         * page/FrameView.cpp:
2789         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2790         Add asserts to catch cases in the future where a layout root is set that has a dirty containing block.
2791     
2792         * rendering/RenderBlock.cpp:
2793         (WebCore::RenderBlock::simplifiedLayout):
2794         Change simplified layout so that the positioned movement optimization no longer clears the other layout
2795         flags. This will ensure that we still lay out our descendants if they need it.
2796         
2797         (WebCore::RenderBlock::layoutPositionedObjects):
2798         Changed to clear our layout flags now if the positioned movement is successful, since tryLayoutDoingPositionedMovementOnly
2799         no longer does the clear.
2800     
2801         * rendering/RenderBox.h:
2802         (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
2803         tryLayoutDoingPositionedMovementOnly now returns a boolean indicating success or failure.  On success it no longer
2804         does setNeedsLayout(false), but instead will let the caller take care of it. This way the caller can still look at
2805         the other flags in case other kinds of layout are still needed.
2806     
2807         * rendering/RenderObject.h:
2808         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2809         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2810         Changed these methods to only set their respective flags and not to try to be clever about avoiding propagation.
2811
2812 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
2813
2814         Revert ENABLE_TRACK patch due to compile failures.
2815
2816         * CMakeLists.txt:
2817         * Configurations/FeatureDefines.xcconfig:
2818         * DerivedSources.make:
2819         * GNUmakefile.am:
2820         * WebCore.gypi:
2821         * WebCore.xcodeproj/project.pbxproj:
2822         * features.pri:
2823         * html/HTMLAttributeNames.in:
2824         * html/HTMLTagNames.in:
2825         * html/HTMLTrackElement.cpp: Removed.
2826         * html/HTMLTrackElement.h: Removed.
2827         * html/HTMLTrackElement.idl: Removed.
2828
2829 2011-04-07  Dan Bernstein  <mitz@apple.com>
2830
2831         Reviewed by Simon Fraser.
2832
2833         <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor
2834         https://bugs.webkit.org/show_bug.cgi?id=58083
2835
2836         Test: fast/text/decorations-transformed.html
2837
2838         * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
2839         is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
2840         gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
2841         the width and the height. In this new mode, translating a rectangle in user space never changes
2842         its dimensions in device pixels.
2843         * platform/graphics/cg/GraphicsContextCG.cpp:
2844         (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
2845         (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
2846         all underlines have the same thickness in device pixels.
2847         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2848         (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
2849         * platform/graphics/qt/GraphicsContextQt.cpp:
2850         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2851         * platform/graphics/skia/GraphicsContextSkia.cpp:
2852         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2853         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2854         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2855         * platform/graphics/wx/GraphicsContextWx.cpp:
2856         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2857         * rendering/InlineTextBox.cpp:
2858         (WebCore::InlineTextBox::paintDecoration):
2859
2860 2011-04-06  Vitaly Repeshko  <vitalyr@chromium.org>
2861
2862         Reviewed by Nate Chapin.
2863
2864         [V8] Remove custom DOMImplementation getter on Document.
2865         https://bugs.webkit.org/show_bug.cgi?id=57991
2866
2867         The custom getter is no longer required because DOMImplementation
2868         objects are now created per document.
2869
2870         Test: fast/dom/DOMImplementation/implementation-identity.html
2871
2872         * bindings/scripts/CodeGeneratorV8.pm:
2873         * bindings/v8/custom/V8DocumentCustom.cpp:
2874         * dom/Document.idl:
2875
2876 2011-04-07  Sergey Glazunov  <serg.glazunov@gmail.com>
2877
2878         Reviewed by Dimitri Glazkov.
2879
2880         setHasID() is only called for styled elements
2881         https://bugs.webkit.org/show_bug.cgi?id=57267
2882
2883         Test: fast/dom/non-styled-element-id-crash.html
2884
2885         * dom/Element.cpp:
2886         (WebCore::Element::attributeChanged):
2887         (WebCore::Element::idAttributeChanged):
2888         * dom/Element.h:
2889         * dom/StyledElement.cpp:
2890         (WebCore::StyledElement::parseMappedAttribute):
2891
2892 2011-04-07  Jer Noble  <jer.noble@apple.com>
2893
2894         Reviewed by Eric Carlson.
2895
2896         HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
2897         https://bugs.webkit.org/show_bug.cgi?id=58070
2898
2899         Make the HTMLMediaElement full screen functions call into the new Full Screen API when
2900         FULLSCREEN_API is enabled.
2901
2902         * html/HTMLMediaElement.cpp:
2903         (WebCore::HTMLMediaElement::enterFullscreen):
2904         (WebCore::HTMLMediaElement::exitFullscreen):
2905
2906 2011-04-07  Adam Barth  <abarth@webkit.org>
2907
2908         Reviewed by Eric Seidel.
2909
2910         Implement CSP's options directive
2911         https://bugs.webkit.org/show_bug.cgi?id=58014
2912
2913         This patch contains the full options parser, but we only have enough of
2914         CSP implemented to see the effects of disable-xss-protection.  Will
2915         need to do some more work before we can see eval-script in action.
2916
2917         Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
2918                http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
2919
2920         * page/ContentSecurityPolicy.cpp:
2921         (WebCore::CSPOptions::CSPOptions):
2922         (WebCore::CSPOptions::disableXSSProtection):
2923         (WebCore::CSPOptions::evalScript):
2924         (WebCore::CSPOptions::parse):
2925         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2926         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2927         (WebCore::ContentSecurityPolicy::allowInlineScript):
2928         (WebCore::ContentSecurityPolicy::addDirective):
2929         * page/ContentSecurityPolicy.h:
2930
2931 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
2932
2933         Reviewed by Anders Carlsson.
2934
2935         REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
2936         https://bugs.webkit.org/show_bug.cgi?id=58066
2937         <rdar://problem/8965302>
2938
2939         * platform/mac/HTMLConverter.h:
2940         * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
2941         Changed editingAttributedStringFromRange: to use WebCore::Range instead of DOMRange, since
2942         it's now used in WebKit2.
2943
2944 2011-04-07  Andy Estes  <aestes@apple.com>
2945
2946         Reviewed by Darin Adler.
2947
2948         REGRESSION (r64712): Microsoft Outlook 2011: original message contents
2949         not included when replying to an email.
2950         https://bugs.webkit.org/show_bug.cgi?id=57794
2951         
2952         * WebCore.exp.in:
2953         * loader/FrameLoader.cpp:
2954         (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
2955         before checking if the FrameLoader is parsing the initial empty document.
2956         This allows user scripts to be injected at the end of document parsing
2957         (if the setting is enabled).
2958         * page/Frame.cpp:
2959         (WebCore::Frame::injectUserScripts): Do not inject scripts if this
2960         feature is disabled on the initial empty document.
2961         * page/Settings.cpp:
2962         (WebCore::Settings::Settings):
2963         * page/Settings.h: Add a setting for injecting user scripts into the
2964         initial empty document (defaults to false).
2965         (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
2966         (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
2967         * platform/mac/RuntimeApplicationChecks.h:
2968         * platform/mac/RuntimeApplicationChecks.mm:
2969         (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
2970         application is Microsoft Outlook.
2971
2972 2011-04-06  Jer Noble  <jer.noble@apple.com>
2973
2974         Reviewed by Maciej Stachowiak.
2975
2976         AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
2977         https://bugs.webkit.org/show_bug.cgi?id=57962
2978
2979         Add support for a new AVPlayerItem API which will notify clients when their
2980         seek completes.  This requires a new Notification type to be passed to the main
2981         thread in MediaPlayerPrivateAVFoundation.
2982
2983         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2984         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
2985         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
2986             overloaded functions which take a Notification; and a Notification::Type and boolean.
2987         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted 
2988             Notification type.
2989         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2990         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
2991         (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
2992         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2993         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
2994         (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
2995
2996 2011-04-07  Nancy Piedra  <nancy.piedra@nokia.com>
2997
2998         Reviewed by Eric Carlson.
2999
3000         Parse quotes from content type parameters
3001         https://bugs.webkit.org/show_bug.cgi?id=53275
3002
3003         This functionality is tested in video-can-play-type.html layout test
3004         where I've added codecs parameter with good and bad formatting.
3005
3006         * platform/ContentType.cpp:
3007         (WebCore::ContentType::parameter):
3008
3009 2011-04-07  Pavel Feldman  <pfeldman@google.com>
3010
3011         Reviewed by Yury Semikhatsky.
3012
3013         Web Inspector: remove "enabled" from the setBreakpoint protocol.
3014         https://bugs.webkit.org/show_bug.cgi?id=58047
3015
3016         * bindings/js/ScriptDebugServer.cpp:
3017         (WebCore::ScriptDebugServer::hasBreakpoint):
3018         * bindings/v8/DebuggerScript.js:
3019         ():
3020         * bindings/v8/ScriptDebugServer.cpp:
3021         (WebCore::ScriptDebugServer::setBreakpoint):
3022         * inspector/Inspector.json:
3023         * inspector/InspectorDebuggerAgent.cpp:
3024         (WebCore::buildObjectForBreakpointCookie):
3025         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3026         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3027         (WebCore::InspectorDebuggerAgent::continueToLocation):
3028         (WebCore::InspectorDebuggerAgent::didParseSource):
3029         * inspector/InspectorDebuggerAgent.h:
3030         * inspector/ScriptBreakpoint.h:
3031         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
3032         * inspector/front-end/DebuggerModel.js:
3033         (WebInspector.DebuggerModel.prototype.setBreakpoint):
3034         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
3035         * inspector/front-end/DebuggerPresentationModel.js:
3036         (WebInspector.DebuggerPresentationModel):
3037         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3038         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
3039         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
3040         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
3041         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
3042         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
3043         (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
3044         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
3045         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
3046         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
3047         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
3048         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
3049         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
3050         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
3051         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
3052         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
3053         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
3054         (WebInspector.DebuggerPresentationModel.prototype._reset):
3055         (WebInspector.PresentationBreakpoint):
3056
3057 2011-04-07  Dan Bernstein  <mitz@apple.com>
3058
3059         Reviewed by Adam Roben.
3060
3061         Removed a redundant line of code.
3062
3063         * rendering/RenderInline.cpp:
3064         (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
3065         this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
3066
3067 2011-04-07  Liang Qi  <liang.qi@nokia.com>
3068
3069         Reviewed by Laszlo Gombos.
3070
3071         [Qt][Symbian] Enable webkit build with GCCE on Symbian.
3072         https://bugs.webkit.org/show_bug.cgi?id=57841
3073
3074         * WebCore.pri: Thanks for Norbert Leser  <norbert.leser@nokia.com> who checked RVCT part.
3075         --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
3076         to 0x1000000 together. They need to be updated in the future when WebKit grows.
3077
3078 2011-04-06  Pavel Feldman  <pfeldman@google.com>
3079
3080         Reviewed by Yury Semikhatsky.
3081
3082         Web Inspector: get rid of Breakpoint.js.
3083         https://bugs.webkit.org/show_bug.cgi?id=57949
3084
3085         * WebCore.gypi:
3086         * WebCore.vcproj/WebCore.vcproj:
3087         * inspector/front-end/Breakpoint.js: Removed.
3088         * inspector/front-end/BreakpointsSidebarPane.js:
3089         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
3090         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
3091         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
3092         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
3093         * inspector/front-end/DebuggerModel.js:
3094         (WebInspector.DebuggerModel):
3095         (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
3096         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
3097         (WebInspector.DebuggerModel.prototype.setBreakpoint):
3098         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
3099         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
3100         (WebInspector.DebuggerModel.prototype._breakpointResolved):
3101         (WebInspector.DebuggerModel.prototype.reset):
3102         * inspector/front-end/DebuggerPresentationModel.js:
3103         (WebInspector.DebuggerPresentationModel):
3104         (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
3105         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
3106         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
3107         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
3108         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
3109         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
3110         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
3111         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
3112         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
3113         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
3114         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
3115         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
3116         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
3117         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
3118         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
3119         (WebInspector.DebuggerPresentationModel.prototype._reset):
3120         (WebInspector.PresentationBreakpoint):
3121         (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
3122         (WebInspector.PresentationBreakpoint.prototype.get url):
3123         (WebInspector.PresentationBreakpoint.prototype.get resolved):
3124         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
3125         * inspector/front-end/ResourceTreeModel.js:
3126         (WebInspector.ResourceTreeModel):
3127         (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
3128         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
3129         * inspector/front-end/ScriptsPanel.js:
3130         (WebInspector.ScriptsPanel):
3131         (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
3132         (WebInspector.ScriptsPanel.prototype.reset):
3133         * inspector/front-end/WebKit.qrc:
3134         * inspector/front-end/inspector.html:
3135
3136 2011-04-07  Yury Semikhatsky  <yurys@chromium.org>
3137
3138         Reviewed by Pavel Feldman.
3139
3140         Web Inspector: console messages names should adhere to the common naming style
3141         https://bugs.webkit.org/show_bug.cgi?id=58042
3142
3143         * inspector/ConsoleMessage.cpp:
3144         (WebCore::ConsoleMessage::addToFrontend):
3145         (WebCore::ConsoleMessage::updateRepeatCountInConsole):
3146         * inspector/Inspector.json:
3147         * inspector/InspectorConsoleAgent.cpp:
3148         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
3149         * inspector/front-end/ConsoleView.js:
3150         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
3151         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
3152         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
3153         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
3154
3155 2011-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
3156
3157         Reviewed by Yury Semikhatsky.
3158
3159         Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
3160         https://bugs.webkit.org/show_bug.cgi?id=57957
3161
3162         There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
3163         Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
3164         It was decided that we will use it.
3165
3166         the list of renames:
3167         1) type-> /dev/null
3168         2) domain + '.' + event => method // for events
3169         3) domain + '.' + command => method // for requests
3170         4) requestId => id // for responses
3171         5) arguments => params // for requests
3172         6) data => params // for events
3173         7) body => result // for responses
3174
3175         protocolErrors and error properties will be converted to JSON-RPC error format.
3176         The order of properties in messages also will be adjusted.
3177         The only thing that looks unnecessary is jsonrpc property.
3178
3179         * inspector/CodeGeneratorInspector.pm:
3180
3181 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
3182
3183         Reviewed by Eric Seidel.
3184
3185         Add functions to update left and right offsets to LineOffsets
3186         https://bugs.webkit.org/show_bug.cgi?id=58028
3187
3188         Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
3189         which are used to update m_left and m_right. Also added m_block and m_isFirstLine
3190         member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
3191
3192         * rendering/RenderBlock.h:
3193         * rendering/RenderBlockLineLayout.cpp:
3194         (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
3195         (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
3196         (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
3197         (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
3198         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
3199         (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
3200         no longer passes firstLine around.
3201
3202 2011-04-06  Pavel Feldman  <pfeldman@google.com>
3203
3204         Reviewed by Yury Semikhatsky.
3205
3206         Web Inspector: migrate debugger domain to the unified breakpoint location notion.
3207         https://bugs.webkit.org/show_bug.cgi?id=57928
3208
3209         * inspector/Inspector.json:
3210         * inspector/InspectorDebuggerAgent.cpp:
3211         (WebCore::buildObjectForBreakpointCookie):
3212         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3213         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3214         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3215         (WebCore::InspectorDebuggerAgent::didParseSource):
3216         * inspector/InspectorDebuggerAgent.h:
3217         * inspector/front-end/Breakpoint.js:
3218         (WebInspector.Breakpoint):
3219         * inspector/front-end/DebuggerModel.js:
3220         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
3221         (WebInspector.DebuggerModel.prototype._breakpointResolved):
3222
3223 2011-04-07  Andreas Kling  <andreas.kling@nokia.com>
3224
3225         Reviewed by Benjamin Poulain.
3226
3227         [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
3228
3229         When initializing a QStyleOptionSlider from a widget, the State_Horizontal
3230         hint may get set depending on how that widget is laid out in its parent.
3231         If this happens when drawing a vertical scrollbar, the hint is never
3232         cleared and we end up painting a vertical scrollbar with horizontal arrows.
3233
3234         Covered by pixel tests which should no longer paint silly scrollbars.
3235
3236         * platform/qt/ScrollbarThemeQt.cpp:
3237         (WebCore::styleOptionSlider):
3238
3239 2011-04-07  Adam Barth  <abarth@webkit.org>
3240
3241         Reviewed by Eric Seidel.
3242
3243         script-src should block inline script
3244         https://bugs.webkit.org/show_bug.cgi?id=58012
3245
3246         Block inline scripts at the ScriptElement layer.  This should catch
3247         exactly the scripts we want to catch.
3248
3249         Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
3250
3251         * dom/Document.cpp:
3252         (WebCore::Document::processHttpEquiv):
3253             - This patch also adds the ability to supply a CSP policy via a
3254               <meta> tag.  We'll update the name of the header once we've
3255               finished implementing the spec.
3256         * dom/ScriptElement.cpp:
3257         (WebCore::ScriptElement::executeScript):
3258         * page/ContentSecurityPolicy.cpp:
3259         (WebCore::ContentSecurityPolicy::allowInlineScript):
3260         * page/ContentSecurityPolicy.h:
3261
3262 2011-04-07  Alice Boxhall  <aboxhall@chromium.org>
3263
3264         Reviewed by Ryosuke Niwa.
3265
3266         Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
3267         https://bugs.webkit.org/show_bug.cgi?id=57921
3268
3269         Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
3270         that the same logic can be used for a HitTestResult.
3271
3272         No visible changes, just cleanup, so no tests.
3273
3274         * page/EventHandler.cpp:
3275         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
3276         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
3277         (WebCore::EventHandler::handleMousePressEventTripleClick):
3278         (WebCore::EventHandler::handleMousePressEventSingleClick):
3279         (WebCore::EventHandler::handleMousePressEvent):
3280         (WebCore::EventHandler::handleMouseDraggedEvent):
3281         (WebCore::EventHandler::handleMouseReleaseEvent):
3282         (WebCore::EventHandler::subframeForHitTestResult):
3283         Made public static member, so that it can access targetNode(), and be accessed by
3284         webkitwebview in gtk.
3285         (WebCore::EventHandler::selectCursor):
3286         (WebCore::EventHandler::targetNode):
3287         (WebCore::EventHandler::handleMouseDoubleClickEvent):
3288         (WebCore::EventHandler::handleMouseMoveEvent):
3289         (WebCore::EventHandler::updateDragAndDrop):
3290         (WebCore::EventHandler::sendContextMenuEvent):
3291         * page/EventHandler.h:
3292         * page/MouseEventWithHitTestResults.cpp:
3293         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
3294         * page/MouseEventWithHitTestResults.h:
3295         * page/android/EventHandlerAndroid.cpp:
3296         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3297         * page/brew/EventHandlerBrew.cpp:
3298         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3299         * page/chromium/EventHandlerChromium.cpp:
3300         (WebCore::EventHandler::passMousePressEventToSubframe):
3301         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3302         * page/efl/EventHandlerEfl.cpp:
3303         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3304         * page/gtk/EventHandlerGtk.cpp:
3305         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3306         * page/haiku/EventHandlerHaiku.cpp:
3307         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3308         * page/mac/EventHandlerMac.mm:
3309         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3310         (WebCore::EventHandler::passSubframeEventToSubframe):
3311         * page/wx/EventHandlerWx.cpp:
3312         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3313
3314 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
3315
3316         Reviewed by Pavel Feldman.
3317
3318         Web Inspector: build mapping for formatted scripts based on keywords positions.
3319         https://bugs.webkit.org/show_bug.cgi?id=57936
3320
3321         Mapping based on [\$\.\w]+ was not accurate because string literals representation
3322         may be different in original and formatted scripts.
3323
3324         * inspector/front-end/ScriptFormatterWorker.js:
3325         (buildMapping.regexp.b):
3326         (buildMapping):
3327
3328 2011-04-07  Kent Tamura  <tkent@chromium.org>
3329
3330         Reviewed by Dimitri Glazkov.
3331
3332         Spinbuttons become unclickable if right padding is large.
3333         https://bugs.webkit.org/show_bug.cgi?id=56298
3334
3335         An inner-spin-button is put on the right border and ignores right
3336         padding in RenderTextControlSingleLine::layout(), but forwardEvent()
3337         checks if a point is in an area just right of an internal text block.
3338         This inconsistency caused a bug that an inner-spin-button with large
3339         padding didn't receive mouse events.
3340
3341         To fix this bug, we render spin buttons as layers, and remove manual
3342         event forwarding code.
3343
3344         Test: fast/forms/input-number-large-padding.html
3345
3346         * css/html.css: Add "position:relative" to make a spin-button a layer.
3347         (input::-webkit-inner-spin-button):
3348         (input::-webkit-outer-spin-button):
3349         * rendering/RenderTextControlSingleLine.cpp:
3350         (WebCore::RenderTextControlSingleLine::forwardEvent):
3351           Remove manual event forwarding code.
3352
3353 2011-04-06  Adam Barth  <abarth@webkit.org>
3354
3355         Reviewed by Eric Seidel.
3356
3357         CSP object-src should block plugin loads
3358         https://bugs.webkit.org/show_bug.cgi?id=57283
3359
3360         This change is pretty straight-forward.  It's slighly unclear to me
3361         whether this patch is correct w.r.t. the code in DocumentWriter.  I've
3362         added a FIXME comment, and I'll investigate that case more in the future.
3363
3364         Test: http/tests/security/contentSecurityPolicy/object-src-none.html
3365
3366         * loader/DocumentWriter.cpp:
3367         (WebCore::DocumentWriter::begin):
3368         * loader/SubframeLoader.cpp:
3369         (WebCore::SubframeLoader::requestPlugin):
3370         * page/ContentSecurityPolicy.cpp:
3371         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
3372         (WebCore::ContentSecurityPolicy::addDirective):
3373         * page/ContentSecurityPolicy.h:
3374
3375 2011-04-06  Beth Dakin  <bdakin@apple.com>
3376
3377         Reviewed by Dan Bernstein.
3378
3379         https://bugs.webkit.org/show_bug.cgi?id=58009
3380         Frame::scalePage() results in visual artifacts with scale factors less than 1
3381         -and corresponding-
3382         <rdar://problem/8683230>
3383
3384         Fall into the case where we fill with a background base color when there is a page 
3385         scale factor that is less than 1.
3386         * rendering/RenderView.cpp:
3387         (WebCore::RenderView::paintBoxDecorations):
3388
3389 2011-04-06  Jer Noble  <jer.noble@apple.com>
3390
3391         Reviewed by Darin Adler.
3392
3393         AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
3394         https://bugs.webkit.org/show_bug.cgi?id=57982
3395
3396         Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
3397
3398         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
3399         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
3400
3401 2011-04-06  Jer Noble  <jer.noble@apple.com>
3402
3403         Reviewed by Eric Carlson.
3404
3405         MediaPlayerPrivateAVFoundation does not change rate due to setRate().
3406         https://bugs.webkit.org/show_bug.cgi?id=57919
3407
3408         Test: media/video-set-rate-from-pause.html
3409
3410         The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
3411         of the media; instead a subclass must do that work.  So when setRate() is called, 
3412         inform a subclass through a new pure virtual updateRate() function that there's 
3413         work to be done.
3414
3415         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3416         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
3417         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3418         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
3419         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
3420         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
3421
3422 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
3423
3424         Reviewed by David Levin.
3425
3426         Add QUOTA build flag for unified quota API
3427         https://bugs.webkit.org/show_bug.cgi?id=57918
3428
3429         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
3430         * GNUmakefile.am: Added QUOTA build flag
3431         * WebCore.pri: Added QUOTA build flag
3432
3433 2011-04-06  Stephanie Lewis  <slewis@apple.com>
3434
3435         Reviewed by Darin Adler.
3436
3437         https://bugs.webkit.org/show_bug.cgi?id=57997
3438         <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
3439         Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
3440         Cancel all enqueued events when detaching the Document the events cannot keep the Document
3441         alive.
3442
3443         No change in functionality so no new tests.  
3444
3445         * dom/Document.cpp:
3446         (WebCore::Document::detach):
3447         * dom/EventQueue.cpp:
3448         (WebCore::EventQueue::cancelQueuedEvents):
3449         * dom/EventQueue.h:
3450
3451 2011-04-06  Dan Bernstein  <mitz@apple.com>
3452
3453         Reviewed by Darin Adler.
3454
3455         <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specifi