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