Incorrect UA style when printing a simple document
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-06-01  Dan Bernstein  <mitz@apple.com>
2
3         Reviewed by Anders Carlsson.
4
5         Incorrect UA style when printing a simple document
6         https://bugs.webkit.org/show_bug.cgi?id=61900
7
8         This is not testable in run-webkit-tests because unless the test is the first to run in an instance
9         of DumpRenderTree, it is not guaranteed that the full default style sheet has not been initialized.
10
11         * css/CSSStyleSelector.cpp:
12         (WebCore::loadFullDefaultStyle): Replace the simple default print style, which is now equal to the
13         simple default style, with a new RuleSet before adding the style rules from the full default sheet.
14         (WebCore::loadSimpleDefaultStyle): Set defaultPrintStyle to point to the default style. They are
15         equal in the simple case.
16
17 2011-06-01  Kent Tamura  <tkent@chromium.org>
18
19         Reviewed by Dimitri Glazkov.
20
21         Remove outer-spin-button
22         https://bugs.webkit.org/show_bug.cgi?id=61845
23
24         Remove outer-spin-button, and render steppers as inner-spin-button.
25         Outer-spin-button have never worked well with padding and border of
26         <input>, and the layout code is very tricky and very hard to maintain it.
27
28         * css/CSSPrimitiveValueMappings.h:
29         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
30         * css/CSSValueKeywords.in:
31         * css/html.css:
32         * html/HTMLInputElement.cpp:
33         (WebCore::HTMLInputElement::innerSpinButtonElement):
34         * html/HTMLInputElement.h:
35         * html/InputType.h:
36         * html/TextFieldInputType.cpp:
37         (WebCore::TextFieldInputType::TextFieldInputType):
38         (WebCore::TextFieldInputType::createShadowSubtree):
39         (WebCore::TextFieldInputType::destroyShadowSubtree):
40         * html/TextFieldInputType.h:
41         * html/shadow/TextControlInnerElements.cpp:
42         (WebCore::SpinButtonElement::SpinButtonElement):
43         (WebCore::SpinButtonElement::create):
44         (WebCore::SpinButtonElement::shadowPseudoId):
45         * html/shadow/TextControlInnerElements.h:
46         * platform/ThemeTypes.h:
47         * platform/chromium/ThemeChromiumMac.mm:
48         (WebCore::paintStepper):
49          Center the stepper drawing area because the specified area can be
50          larger than the NSStepper sizes.
51         (WebCore::ThemeChromiumMac::controlSize):
52         (WebCore::ThemeChromiumMac::minimumControlSize):
53         (WebCore::ThemeChromiumMac::inflateControlPaintRect):
54         (WebCore::ThemeChromiumMac::paint):
55         * platform/mac/ThemeMac.mm:
56         (WebCore::paintStepper):
57          Center the stepper drawing area because the specified area can be
58          larger than the NSStepper sizes.
59         (WebCore::ThemeMac::controlSize):
60         (WebCore::ThemeMac::minimumControlSize):
61         (WebCore::ThemeMac::inflateControlPaintRect):
62         (WebCore::ThemeMac::paint):
63         * rendering/RenderBox.cpp:
64         (WebCore::RenderBox::paintBoxDecorations):
65         * rendering/RenderBox.h:
66         * rendering/RenderTextControlSingleLine.cpp:
67         (WebCore::RenderTextControlSingleLine::layout):
68         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
69         (WebCore::RenderTextControlSingleLine::textBlockWidth):
70         * rendering/RenderTextControlSingleLine.h:
71         * rendering/RenderTheme.cpp:
72         (WebCore::RenderTheme::adjustStyle):
73         (WebCore::RenderTheme::paint):
74         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
75         * rendering/RenderTheme.h:
76         * rendering/RenderThemeMac.mm:
77         (WebCore::RenderThemeMac::adjustRepaintRect):
78
79 2011-06-01  Emil A Eklund  <eae@chromium.org>
80
81         Reviewed by Eric Seidel.
82
83         Switch RenderLayer::convertToLayerCoords to use IntPoint
84         https://bugs.webkit.org/show_bug.cgi?id=61818
85
86         Covered by existing tests.
87
88         * platform/graphics/FloatPoint.h:
89         (WebCore::flooredIntSize):
90         * rendering/RenderLayer.cpp:
91         (WebCore::RenderLayer::updateLayerPositions):
92         (WebCore::expandClipRectForDescendantsAndReflection):
93         (WebCore::transparencyClipBox):
94         (WebCore::RenderLayer::convertToLayerCoords):
95         (WebCore::RenderLayer::paintLayer):
96         (WebCore::RenderLayer::paintChildLayerIntoColumns):
97         (WebCore::RenderLayer::createLocalTransformState):
98         (WebCore::RenderLayer::hitTestChildLayerColumns):
99         (WebCore::RenderLayer::calculateClipRects):
100         (WebCore::RenderLayer::calculateRects):
101         (WebCore::RenderLayer::boundingBox):
102         (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
103         * rendering/RenderLayer.h:
104         * rendering/RenderLayerBacking.cpp:
105         (WebCore::RenderLayerBacking::updateCompositedBounds):
106         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
107         * rendering/RenderLayerCompositor.cpp:
108         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
109         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
110         (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
111
112 2011-06-01  Roland Steiner  <rolandsteiner@chromium.org>
113
114         Reviewed by Kent Tamura.
115
116         Remove superfluous renderer() test
117         https://bugs.webkit.org/show_bug.cgi?id=61907
118
119         No new tests. (trivial)
120
121         * dom/Document.cpp:
122         (WebCore::Document::recalcStyle):
123
124 2011-06-01  Levi Weintraub  <leviw@chromium.org>
125
126         Reviewed by Hajime Morita.
127
128         Add IntPoint + IntPoint operator
129         https://bugs.webkit.org/show_bug.cgi?id=61876
130
131         Adding an operator+ convenience method to IntPoint that sums two points
132         and returns the result as an IntPoint. Changing doImageDrag to use it
133         as a proof of concept.
134
135         No new tests since there is no change in behavior.
136
137         * page/DragController.cpp:
138         (WebCore::DragController::doImageDrag):
139         * platform/graphics/IntPoint.h:
140         (WebCore::operator+):
141
142 2011-06-01  Jaehun Lim  <ljaehun.lim@samsung.com>
143
144         Reviewed by Eric Seidel.
145
146         [EFL] Add adjustMenuListButtonStyle and paintMenuListButton functions
147         https://bugs.webkit.org/show_bug.cgi?id=61836
148
149         Add functions for rendering drop-down list when style attributes are applied.
150
151         * platform/efl/RenderThemeEfl.cpp:
152         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
153         (WebCore::RenderThemeEfl::paintMenuListButton):
154         * platform/efl/RenderThemeEfl.h:
155
156 2011-06-01  Yuta Kitamura  <yutak@chromium.org>
157
158         Reviewed by Kent Tamura.
159
160         WebSocket: WebSocketChannel::fail() should close the connection immediately
161         https://bugs.webkit.org/show_bug.cgi?id=61851
162
163         The effect of this change is almost unobservable. The difference between m_handle->close() and
164         m_handle->disconnect() is that the former does not close the connection if the handle has
165         unsent data while the latter immediately closes the connection regardless of unsent data.
166         Usually a socket stream handle does not have unsent data, and even if it has any, it is hard
167         for user scripts to observe the difference between close() and disconnect() (it should take some time
168         for onclose() to be called if there are any unsent data, but there ought to be no other difference
169         in user scripts' perspective).
170
171         No new tests are added, because writing a test for this issue is not feasible due to the above reason.
172
173         * websockets/WebSocketChannel.cpp:
174         (WebCore::WebSocketChannel::fail): Use m_handle->disconnect() instead of m_handle->close().
175
176 2011-06-01  Abhishek Arya  <inferno@chromium.org>
177
178         Unreviewed.
179
180         Coding style nit. Move ec=0 initialization, change
181         recommended by Alexey in bug.
182         https://bugs.webkit.org/show_bug.cgi?id=60831
183
184         * dom/Document.cpp:
185         (WebCore::Document::setBody):
186
187 2011-06-01  Hayato Ito  <hayato@chromium.org>
188
189         Reviewed by Kent Tamura.
190
191         Move {Next,Previous}FocusableNode functions from Document to FocusController.
192         https://bugs.webkit.org/show_bug.cgi?id=61839
193
194         There are some member functions in Document which use 'this'
195         pointer, but we should use TreeScope instead of Document in some
196         places to handle focus issues nicely. We have to move these
197         functions out of Document class so that we can give the TreeScope
198         as a parameter.
199
200         No new tests since no functionality was changed.
201
202         * dom/Document.cpp:
203         * dom/Document.h:
204         * page/FocusController.cpp:
205         (WebCore::FocusController::deepFocusableNode):
206         (WebCore::FocusController::advanceFocusInDocumentOrder):
207         (WebCore::nextNodeWithExactTabIndex):
208         (WebCore::previousNodeWithExactTabIndex):
209         (WebCore::nextNodeWithGreaterTabIndex):
210         (WebCore::previousNodeWithLowerTabIndex):
211         (WebCore::FocusController::nextFocusableNode):
212         (WebCore::FocusController::previousFocusableNode):
213         * page/FocusController.h:
214
215 2011-06-01  Adrienne Walker  <enne@google.com>
216
217         Reviewed by James Robinson.
218
219         [chromium] Fix syncing of removed mask and replica layers
220         https://bugs.webkit.org/show_bug.cgi?id=61895
221
222         * platform/graphics/chromium/TreeSynchronizer.cpp:
223         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
224
225 2011-06-01  Julien Chaffraix  <jchaffraix@codeaurora.org>
226
227         Reviewed by Simon Fraser.
228
229         CSSStyleSheet#insertRule doesn't work well with imported stylesheets
230         https://bugs.webkit.org/show_bug.cgi?id=56981
231
232         Test: fast/css/import-and-insert-rule-no-update.html
233
234         The bug arises from the fact that <link> element did not know about a programmatically
235         loading sheet (using insertRule and @import) and would thus never call removePendingSheet.
236         This is needed to make sure our style selector contains an up-to-date list of stylesheets.
237
238         The gist of the patch adds a way for style sheet owner element to know if we are
239         programmatically loading a style sheet. This is needed as <link> keeps the information
240         about that last loaded stylesheet.
241
242         * css/CSSImportRule.cpp:
243         (WebCore::CSSImportRule::insertedIntoParent): Call startLoadingDynamicSheet
244         on our parent style sheet instead of directly adding a pending style sheet.
245
246         * css/CSSStyleSheet.cpp:
247         (WebCore::CSSStyleSheet::startLoadingDynamicSheet): Call startLoadingDynamicSheet
248         on our owner element if we have one.
249
250         * css/CSSStyleSheet.h:
251         * dom/Node.h:
252         (WebCore::Node::startLoadingDynamicSheet): Added common implementation of
253         startLoadingDynamicSheet, which should never be called.
254
255         * dom/StyleElement.cpp:
256         (WebCore::StyleElement::startLoadingDynamicSheet):
257         * dom/StyleElement.h:
258         Common implementation of startLoadingDynamicSheet for style elements.
259
260         * html/HTMLLinkElement.cpp:
261         (WebCore::HTMLLinkElement::startLoadingDynamicSheet):
262         * html/HTMLLinkElement.h:
263         Use the HTMLLinkElement plumbing to make sure we call addRemovePendingSheet.
264
265         * html/HTMLStyleElement.h:
266         (WebCore::HTMLStyleElement::startLoadingDynamicSheet):
267         * svg/SVGStyleElement.h:
268         (WebCore::SVGStyleElement::startLoadingDynamicSheet):
269         Forward the call to StyleElement.
270
271 2011-06-01  Levi Weintraub  <leviw@chromium.org>
272
273         Reviewed by Eric Seidel.
274
275         Switch paintCustomHighlight to use IntPoint
276         https://bugs.webkit.org/show_bug.cgi?id=61562
277
278         Switching paintCustomHighlight to use an IntPoint for
279         its paint offset instead of a pair of ints.
280
281         No new tests since this is refactoring.
282
283         * rendering/InlineTextBox.cpp:
284         (WebCore::InlineTextBox::paint):
285         (WebCore::InlineTextBox::paintCustomHighlight):
286         * rendering/InlineTextBox.h:
287         * rendering/RenderBox.cpp:
288         (WebCore::RenderBox::paintCustomHighlight):
289         * rendering/RenderBox.h:
290         * rendering/RenderImage.cpp:
291         (WebCore::RenderImage::paintReplaced):
292         * rendering/RenderListMarker.cpp:
293         (WebCore::RenderListMarker::paint):
294         * rendering/RenderWidget.cpp:
295         (WebCore::RenderWidget::paint):
296         * rendering/RootInlineBox.cpp:
297         (WebCore::RootInlineBox::paintCustomHighlight):
298         (WebCore::RootInlineBox::paint):
299         * rendering/RootInlineBox.h:
300
301 2011-06-01  Emil A Eklund  <eae@chromium.org>
302
303         Reviewed by Eric Seidel.
304
305         Switch MouseRelatedEvent to use IntPoint
306         https://bugs.webkit.org/show_bug.cgi?id=61574
307
308         Covered by existing tests.
309
310         * dom/MouseEvent.cpp:
311         (WebCore::MouseEvent::MouseEvent):
312         (WebCore::MouseEvent::initMouseEvent):
313         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
314         * dom/MouseRelatedEvent.cpp:
315         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
316         (WebCore::contentsScrollOffset):
317         (WebCore::MouseRelatedEvent::initCoordinates):
318         (WebCore::MouseRelatedEvent::computeRelativePosition):
319         (WebCore::MouseRelatedEvent::layerX):
320         (WebCore::MouseRelatedEvent::layerY):
321         (WebCore::MouseRelatedEvent::offsetX):
322         (WebCore::MouseRelatedEvent::offsetY):
323         (WebCore::MouseRelatedEvent::pageX):
324         (WebCore::MouseRelatedEvent::pageY):
325         (WebCore::MouseRelatedEvent::pageLocation):
326         (WebCore::MouseRelatedEvent::x):
327         (WebCore::MouseRelatedEvent::y):
328         * dom/MouseRelatedEvent.h:
329         (WebCore::MouseRelatedEvent::screenX):
330         (WebCore::MouseRelatedEvent::screenY):
331         (WebCore::MouseRelatedEvent::screenLocation):
332         (WebCore::MouseRelatedEvent::clientX):
333         (WebCore::MouseRelatedEvent::clientY):
334         (WebCore::MouseRelatedEvent::clientLocation):
335         (WebCore::MouseRelatedEvent::absoluteLocation):
336         * dom/TouchEvent.cpp:
337         (WebCore::TouchEvent::TouchEvent):
338         (WebCore::TouchEvent::initTouchEvent):
339         * dom/WheelEvent.cpp:
340         (WebCore::WheelEvent::WheelEvent):
341         (WebCore::WheelEvent::initWheelEvent):
342         (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
343         * dom/WheelEvent.h:
344         (WebCore::WheelEvent::create):
345         (WebCore::WheelEvent::wheelDelta):
346         (WebCore::WheelEvent::wheelDeltaX):
347         (WebCore::WheelEvent::wheelDeltaY):
348         (WebCore::WheelEvent::rawDeltaX):
349         (WebCore::WheelEvent::rawDeltaY):
350         (WebCore::WheelEvent::isHorizontal):
351         * platform/graphics/IntPoint.h:
352         (WebCore::IntPoint::scale):
353
354 2011-06-01  Levi Weintraub  <leviw@chromium.org>
355
356         Reviewed by Eric Seidel.
357
358         Switch paintOverflowControls to use IntPoint
359         https://bugs.webkit.org/show_bug.cgi?id=61884
360
361         Switching paintOverflowControls to use an IntPoint instead of a pair of ints.
362
363         No new tests since this is simple refactoring.
364
365         * rendering/RenderBlock.cpp:
366         (WebCore::RenderBlock::paint):
367         * rendering/RenderLayer.cpp:
368         (WebCore::RenderLayer::paintOverflowControls):
369         (WebCore::RenderLayer::paintLayer):
370         * rendering/RenderLayer.h:
371         * rendering/RenderLayerBacking.cpp:
372         (WebCore::RenderLayerBacking::paintIntoLayer):
373
374 2011-06-01  Abhishek Arya  <inferno@chromium.org>
375
376         Reviewed by Alexey Proskuryakov.
377
378         Fix setting of document.body
379         https://bugs.webkit.org/show_bug.cgi?id=60831
380
381         1. Only allowing setting to an element if it has a body tag.
382         2. If element is from another document, import it.
383
384         Test: fast/dom/document-set-body.html
385
386         * dom/Document.cpp:
387         (WebCore::Document::setBody):
388
389 2011-06-01  Chris Fleizach  <cfleizach@apple.com>
390
391         Reviewed by Darin Adler.
392
393         Safari always crashes on http://bbc.co.uk when VoiceOver enabled
394         https://bugs.webkit.org/show_bug.cgi?id=61886
395
396         This crash can happen on webpages that remove an element from the DOM when the element receives focus.
397         When AppKit goes to post a notification to inform VoiceOver the focus has changed, it asks for the AXFocusedUIElement.
398         However by posting that notification, a render tree update is performed. This causes the element to disappear, but
399         AppKit still has a handle to it and continues to try to reference it. When the autorelease pool pops, the reference goes bad.
400
401         To fix, the root element, the AccessibilityScrollView, needs to implement updateBackingStore(), otherwise this method 
402         will not be called in time.
403
404         No test could be created because to cause it depends on an internal AppKit mechanism
405         that is only triggered remotely through the accessibility runtime.
406
407         * accessibility/AccessibilityObject.cpp:
408         (WebCore::AccessibilityObject::updateBackingStore):
409         * accessibility/AccessibilityObject.h:
410         * accessibility/AccessibilityRenderObject.cpp:
411         * accessibility/AccessibilityRenderObject.h:
412
413 2011-06-01  David Carson  <dacarson@apple.com>
414
415         Reviewed by Antti Koivisto.
416
417         https://bugs.webkit.org/show_bug.cgi?id=61831
418         If width and height of an iframe is fixed and should not be visible, then
419         it shouldn't be flattened.
420
421         Test: fast/frames/flattening/iframe-flattening-fixed-width-and-height-zero-size.html
422
423         * rendering/RenderIFrame.cpp:
424         (WebCore::RenderIFrame::flattenFrame): add a check for a zero width or height
425
426 2011-06-01  Daniel Cheng  <dcheng@chromium.org>
427
428         Reviewed by Tony Chang.
429
430         [chromium] Use correct file name for dragging out images.
431         https://bugs.webkit.org/show_bug.cgi?id=24887
432
433         We try to guess an appropriate filename when dragging out images. In order, we try to use:
434         - The filename suggested in the HTTP header.
435         - The last path component of the source URL.
436         - The alt text.
437         This matches the behavior of the other WebKit ports.
438
439         Test: fast/events/drag-image-filename.html
440
441         * platform/chromium/ClipboardChromium.cpp:
442         (WebCore::writeImageToDataObject):
443         * platform/chromium/ClipboardChromiumMac.cpp:
444         (WebCore::isInvalidFileCharacter):
445         (WebCore::ClipboardChromium::validateFileName):
446
447 2011-06-01  Levi Weintraub  <leviw@chromium.org>
448
449         Reviewed by Eric Seidel.
450
451         Text is scaled in a stair-step pattern
452         https://bugs.webkit.org/show_bug.cgi?id=60317
453
454         Stop scaling the specified font to the actual on-screen value when font-rendering: 
455         geometricPrecision is specified, but instead scale the graphics context. This allows
456         us to scale text up and down smoothly.
457
458         Test: svg/text/scaling-font-with-geometric-precision.html
459
460         * rendering/svg/RenderSVGInlineText.cpp:
461         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
462
463 2011-06-01  Levi Weintraub  <leviw@chromium.org>
464
465         Reviewed by Eric Seidel.
466
467         Switch paintResizer to use IntPoint
468         https://bugs.webkit.org/show_bug.cgi?id=61883
469
470         Switch paintResizer to take an IntPoint instead of a pair of ints.
471
472         No new tests as this is simple refactoring.
473
474         * rendering/RenderLayer.cpp:
475         (WebCore::RenderLayer::paintOverflowControls):
476         (WebCore::RenderLayer::paintResizer):
477         * rendering/RenderLayer.h:
478         * rendering/RenderLayerBacking.cpp:
479         (WebCore::RenderLayerBacking::paintContents):
480
481 2011-06-01  Jer Noble  <jer.noble@apple.com>
482
483         Reviewed by Darin Adler.
484
485         Page layout messed up after exiting full screen at Apple trailers page
486         https://bugs.webkit.org/show_bug.cgi?id=61755
487         <rdar://problem/9525277>
488
489         Test: fullscreen/full-screen-zIndex-after.html
490
491         Fix the incomplete implementation of r87660. Make parameters to
492         setContainsFullScreenElementRecursively() in webkitWillExitFullScreenForElement() match those
493         in webkitWillEnterFullScreenForElement(), so the ancestors' flags do not become
494         inconsistent..
495
496         * dom/Document.cpp:
497         (WebCore::Document::webkitWillExitFullScreenForElement):
498
499 2011-06-01  Levi Weintraub  <leviw@chromium.org>
500
501         Reviewed by Eric Seidel.
502
503         Switch paintScrollCorner to use IntPoint
504         https://bugs.webkit.org/show_bug.cgi?id=61874
505
506         Changing paintScrollCorner to take an IntPoint representing the paint
507         offset instead of a pair of ints.
508
509         No new tests as this is simple refactoring.
510
511         * rendering/RenderLayer.cpp:
512         (WebCore::RenderLayer::paintOverflowControls):
513         (WebCore::RenderLayer::paintScrollCorner):
514         * rendering/RenderLayer.h:
515         * rendering/RenderLayerBacking.cpp:
516         (WebCore::RenderLayerBacking::paintContents):
517
518 2011-06-01  Kenneth Russell  <kbr@google.com>
519
520         Reviewed by Nate Chapin.
521
522         [V8] Optimize fetches of indexed properties in custom bindings
523         https://bugs.webkit.org/show_bug.cgi?id=61821
524
525         Avoid allocating garbage in affected custom bindings. This speeds
526         up one test case by at least a factor of two. No new tests;
527         covered by existing layout tests (typed array and otherwise).
528
529         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
530         (WebCore::constructWebGLArray):
531         (WebCore::setWebGLArrayHelper):
532         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
533         (WebCore::V8InspectorFrontendHost::showContextMenuCallback):
534         * bindings/v8/custom/V8MessagePortCustom.cpp:
535         (WebCore::getMessagePortArray):
536         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
537         (WebCore::jsArrayToFloatArray):
538         (WebCore::jsArrayToIntArray):
539
540 2011-06-01  Andras Becsi  <abecsi@webkit.org>
541
542         Reviewed by Csaba Osztrogon√°c.
543
544         [Qt] Fix the Phonon build when logging is disabled
545         https://bugs.webkit.org/show_bug.cgi?id=61869
546
547         No new tests needed.
548
549         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Add missing guards.
550         (WebCore::MediaPlayerPrivatePhonon::networkState):
551         (WebCore::MediaPlayerPrivatePhonon::readyState):
552         (WebCore::MediaPlayerPrivatePhonon::updateStates):
553         (WebCore::MediaPlayerPrivatePhonon::stateChanged):
554
555 2011-06-01  Abhishek Arya  <inferno@chromium.org>
556
557         Reviewed by Antti Koivisto.
558
559         Do not use the pushed style selector if it is not equal to the
560         parent document's style selector. It usually means that it is
561         in a bad state, e.g. already cleared.
562         https://bugs.webkit.org/show_bug.cgi?id=61737
563
564         * dom/Element.cpp:
565         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
566
567 2011-06-01  Levi Weintraub  <leviw@chromium.org>
568
569         Reviewed by Eric Seidel.
570
571         Switch RenderLineBoxList intersection functions to use IntPoint
572         https://bugs.webkit.org/show_bug.cgi?id=61794
573
574         Switching rangeIntersectsRect, anyLineIntersectsRect, and lineIntersectsDirtyRect
575         to take IntPoint instead of a tx/ty to represent the offset to be applied match
576         the rect and lines' coordinates.
577
578         No new tests since this is merely refactoring.
579
580         * rendering/RenderLineBoxList.cpp:
581         (WebCore::RenderLineBoxList::rangeIntersectsRect):
582         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
583         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
584         (WebCore::RenderLineBoxList::paint):
585         (WebCore::RenderLineBoxList::hitTest):
586         * rendering/RenderLineBoxList.h:
587
588 2011-05-19  Adrienne Walker  <enne@google.com>
589
590         Reviewed by James Robinson.
591
592         [chromium] Don't split long, narrow layers into multiple tiles.
593         https://bugs.webkit.org/show_bug.cgi?id=60821
594
595         This changes the heuristic for when we tile layers to be less bad
596         about wasting texture space.  Long, narrow layers that are tiled with
597         a large tile size waste texture space.  Now layers are only tiled if
598         they are above 512px in one dimension and extend into a second tile in
599         the other.  If they are not tiled, their layer texture will exactly
600         fit their layer bounds.  In particular, this will help scrollbars.
601
602         * platform/graphics/chromium/ContentLayerChromium.cpp:
603         (WebCore::ContentLayerChromium::updateLayerSize):
604         * platform/graphics/chromium/LayerRendererChromium.h:
605         (WebCore::LayerRendererChromium::maxTextureSize):
606
607 2011-06-01  Cary Clark  <caryclark@google.com>
608
609         Reviewed by Eric Seidel.
610
611         Ready Chromium port for Skia on Mac
612         https://bugs.webkit.org/show_bug.cgi?id=61800
613
614         Skia on Mac is not enabled. The executing
615         code is unchanged, so there are no new tests.
616
617         * platform/chromium/DragImageRef.h:
618         Use Skia for DragImageRef instead of CG.
619
620         * platform/chromium/ScrollbarThemeChromiumMac.mm:
621         (WebCore::ScrollbarThemeChromiumMac::paint):
622         Get the total matrix from Skia for the scrollbar.
623         Convert the SkCanvas into a CGContext to draw.
624
625         * platform/chromium/ThemeChromiumMac.mm:
626         (WebCore::paintStepper):
627         Ditto.
628
629 2011-06-01  Yury Semikhatsky  <yurys@chromium.org>
630
631         Reviewed by Pavel Feldman.
632
633         Web Inspector: allow opening inspector for existing workers
634         https://bugs.webkit.org/show_bug.cgi?id=61853
635
636         Added sidebar pane with a list of all workers. Each worker has a check box
637         that allows opening inspector for the worker.
638
639         * inspector/Inspector.json:
640         * inspector/InspectorInstrumentation.cpp:
641         (WebCore::InspectorInstrumentation::didStartWorkerContextImpl):
642         * inspector/InspectorInstrumentation.h:
643         (WebCore::InspectorInstrumentation::didStartWorkerContext):
644         * inspector/InspectorWorkerAgent.cpp:
645         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
646         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
647         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerContext):
648         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerContext):
649         (WebCore::InspectorWorkerAgent::clearFrontend):
650         (WebCore::InspectorWorkerAgent::connectToWorker):
651         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
652         (WebCore::InspectorWorkerAgent::didStartWorkerContext):
653         * inspector/InspectorWorkerAgent.h:
654         * inspector/front-end/ScriptsPanel.js:
655         (WebInspector.ScriptsPanel):
656         * inspector/front-end/Settings.js:
657         * inspector/front-end/WorkerManager.js:
658         (WebInspector.WorkerManager):
659         (WebInspector.WorkerManager.prototype._workerCreated):
660         (WebInspector.WorkerManager.prototype._sendMessageToWorkerInspector):
661         (WebInspector.WorkerManager.prototype.openWorkerInspector):
662         (WebInspector.WorkerManager.prototype.closeWorkerInspector):
663         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
664         (WebInspector.WorkerMessageForwarder):
665         (WebInspector.WorkerMessageForwarder.prototype.workerCreated):
666         (WebInspector.WorkerMessageForwarder.prototype.dispatchMessageFromWorker):
667         * inspector/front-end/WorkersSidebarPane.js:
668         (WebInspector.WorkersSidebarPane):
669         (WebInspector.WorkersSidebarPane.prototype.addWorker):
670         (WebInspector.WorkerListSidebarPane):
671         (WebInspector.WorkerListSidebarPane.prototype._workerAdded):
672         (WebInspector.WorkerListSidebarPane.prototype._workerRemoved):
673         (WebInspector.WorkerListSidebarPane.prototype._workerInspectorClosed):
674         (WebInspector.WorkerListSidebarPane.prototype._addWorker):
675         (WebInspector.WorkerListSidebarPane.prototype._createCheckbox):
676         (WebInspector.WorkerListSidebarPane.prototype._workerItemClicked):
677         * workers/Worker.cpp:
678         (WebCore::Worker::notifyFinished):
679
680 2011-06-01  Shishir Agrawal  <shishir@chromium.org>
681
682         Reviewed by Tony Gentilcore.
683
684         Renaming the Page Visibility attributes as per the modified spec draft.
685         https://bugs.webkit.org/show_bug.cgi?id=61825
686
687         Spec draft:
688         http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html
689
690         - Event needs to be webkitVisibilityChange from webkitVisibilityStateChange
691         - The attribute webkitIsVisible needs to change to webkitHidden
692
693         * dom/Document.cpp:
694         (WebCore::Document::webkitHidden):
695         (WebCore::Document::dispatchVisibilityStateChangeEvent):
696         * dom/Document.h:
697         * dom/Document.idl:
698         * dom/EventNames.h:
699
700 2011-06-01  Nikolas Zimmermann  <nzimmermann@rim.com>
701
702         Reviewed by Rob Buis.
703
704         Remove duplicated code in various computeReplacedLogical*() functions
705         https://bugs.webkit.org/show_bug.cgi?id=61860
706
707         Centralize this calculation in RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth:
708         int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth());
709         int maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth());
710         return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth));
711
712         Centralize this calculation in RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight:
713         int minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight());
714         int maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight());
715         return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight));
716
717         Use the new helper methods where possible, deduplicating lots of code.
718
719         * rendering/RenderBox.cpp:
720         (WebCore::RenderBox::computeReplacedLogicalWidth):
721         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
722         (WebCore::RenderBox::computeReplacedLogicalHeight):
723         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
724         * rendering/RenderBox.h:
725         * rendering/RenderImage.cpp:
726         (WebCore::RenderImage::computeReplacedLogicalWidth):
727         (WebCore::RenderImage::computeReplacedLogicalHeight):
728         * rendering/RenderPart.cpp:
729         (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
730         (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
731         (WebCore::RenderPart::computeReplacedLogicalWidth):
732         (WebCore::RenderPart::computeReplacedLogicalHeight):
733         * rendering/RenderPart.h:
734         * rendering/RenderReplaced.cpp:
735         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
736         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
737         * rendering/svg/RenderSVGRoot.cpp:
738         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
739         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
740
741 2011-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
742
743         Unreviewed, rolling out r87788.
744         http://trac.webkit.org/changeset/87788
745         https://bugs.webkit.org/show_bug.cgi?id=61856
746
747         breaks windows chromium canary (Requested by jknotten on
748         #webkit).
749
750         * loader/archive/mhtml/MHTMLArchive.cpp:
751         * loader/archive/mhtml/MHTMLArchive.h:
752         * page/PageSerializer.cpp:
753         (WebCore::PageSerializer::serializeFrame):
754         (WebCore::PageSerializer::serializeCSSStyleSheet):
755         * platform/SharedBuffer.cpp:
756         * platform/SharedBuffer.h:
757
758 2011-06-01  Joseph Pecoraro  <joepeck@webkit.org>
759
760         Reviewed by Pavel Feldman.
761
762         Web Inspector: [JSC] JSLock ASSERTs Seen Under eventListenerHandlerBody
763         https://bugs.webkit.org/show_bug.cgi?id=61835
764
765         Add a JSLock call before possible allocations in jsFunction and toString.
766
767         * bindings/js/ScriptEventListener.cpp:
768         (WebCore::eventListenerHandlerBody):
769
770 2011-06-01  Jay Civelli  <jcivelli@chromium.org>
771
772         Reviewed by Adam Barth.
773
774         Adding MHTML generation support to MHTMLArchive.
775         https://bugs.webkit.org/show_bug.cgi?id=7169
776
777         * loader/archive/mhtml/MHTMLArchive.cpp:
778         (WebCore::generateRandomBoundary):
779         (WebCore::replaceNonPrintableCharacters):
780         (WebCore::MHTMLArchive::generateMHTMLData):
781         * loader/archive/mhtml/MHTMLArchive.h:
782         * page/PageSerializer.cpp:
783         (WebCore::PageSerializer::serializeFrame):
784         (WebCore::PageSerializer::serializeCSSStyleSheet):
785         * platform/SharedBuffer.cpp:
786         (WebCore::SharedBuffer::append):
787         * platform/SharedBuffer.h:
788
789 2011-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
790
791         Reviewed by Kent Tamura.
792
793         Remove ShadowElement and compact remaining used bits into RenderFileUploadControl.
794         https://bugs.webkit.org/show_bug.cgi?id=61816
795
796         This is a near-mechanical move-and-rename of ShadowElement, which is now only
797         used by input[type=file]. Next step -- switch it over to new shadow DOM.
798
799         Refactoring, no change in behavior.
800
801         * CMakeLists.txt: Removed ShadowElement.cpp and ShadowElement.h.
802         * GNUmakefile.list.am: Ditto.
803         * WebCore.gypi: Ditto.
804         * WebCore.pro: Ditto.
805         * WebCore/WebCore.vcproj/WebCore.vcproj: Ditto.
806         * WebCore.xcodeproj/project.pbxproj: Ditto.
807         * WebCore/rendering/RenderingAllInOne.cpp: Ditto.
808         * rendering/RenderFileUploadControl.cpp:
809         (WebCore::UploadButton::create): Moved from ShadowElement, renamed as UploadButton.
810         (WebCore::UploadButton::detach): Ditto.
811         (WebCore::UploadButton::UploadButton): Ditto.
812         (WebCore::RenderFileUploadControl::updateFromElement): Changed to use UploadButton.
813         * rendering/RenderMeter.cpp: Removed ShadowElement.h include, which is no longer used.
814         * rendering/RenderProgress.cpp: Ditto.
815         * rendering/ShadowElement.cpp: Removed.
816         * rendering/ShadowElement.h: Removed.
817
818 2011-06-01  Nikolas Zimmermann  <nzimmermann@rim.com>
819
820         Reviewed by Rob Buis.
821
822         SVG fails all 3 of Hixie's CSS intrinsic sizing tests
823         https://bugs.webkit.org/show_bug.cgi?id=15473
824
825         Hixies CSS intrinsic sizing tests cover percentage sizes specified on the target SVG document as width/height attributes
826         and using width: auto / height: auto on the <object> that hosts the SVG document. Take percentage sizes of the outermost
827         SVGs width/height attributes into account when determining the intrinsic size of the <object>.
828
829         Added several other testcases demonstrating several scenarios. All tests work exactly the same in WebKit and Firefox now.
830         The *on-target-svg-absolute.xhtml tests look equal to WebKit/FF but Opera fails them, likely a relict of the different
831         interpretation of the intrinsic size of a SVG document in SVG Tiny 1.2.
832
833         Tests: svg/custom/object-sizing-height-50p-on-target-svg-absolute.xhtml
834                svg/custom/object-sizing-height-50p-on-target-svg.xhtml
835                svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml
836                svg/custom/object-sizing-width-50p-height-50p-on-target-svg.xhtml
837                svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml
838                svg/custom/object-sizing-width-50p-height-75p-on-target-svg.xhtml
839                svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml
840                svg/custom/object-sizing-width-50p-on-target-svg.xhtml
841                svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml
842                svg/custom/object-sizing-width-75p-height-50p-on-target-svg.xhtml
843                svg/hixie/intrinsic/001.html
844                svg/hixie/intrinsic/002.html
845                svg/hixie/intrinsic/003.html
846
847         * rendering/RenderPart.cpp:
848         (WebCore::RenderPart::computeReplacedLogicalWidth):
849         (WebCore::RenderPart::computeReplacedLogicalHeight):
850         * rendering/svg/RenderSVGRoot.cpp:
851         (WebCore::RenderSVGRoot::computeIntrinsicRatio):
852         * rendering/svg/RenderSVGRoot.h:
853
854 2011-05-31  Tonis Tiigi  <tonistiigi@gmail.com>
855
856         Reviewed by Pavel Feldman.
857
858         Web Inspector: Timeline panel improvements for managing current selection
859         https://bugs.webkit.org/show_bug.cgi?id=61468
860
861         Enables X-axis dragging of the selected area.
862         Double click zoom-out.
863         Fixes slightly wrong selection area position.
864
865         * inspector/front-end/TimelineOverviewPane.js:
866         (WebInspector.TimelineOverviewPane):
867         (WebInspector.TimelineOverviewPane.prototype._dragWindow):
868         (WebInspector.TimelineOverviewPane.prototype._endWindowSelectorDragging):
869         (WebInspector.TimelineOverviewPane.prototype._resizeWindowRight):
870         (WebInspector.TimelineOverviewPane.prototype._resizeWindowMaximum):
871         (WebInspector.TimelineOverviewPane.prototype.scrollWindow):
872         (WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox):
873         * inspector/front-end/TimelinePanel.js:
874         (WebInspector.TimelinePanel):
875
876 2011-05-31  Keishi Hattori  <keishi@webkit.org>
877
878         Reviewed by Kent Tamura.
879
880         Fix to enable page scroll of select element
881         https://bugs.webkit.org/show_bug.cgi?id=53628
882
883         Manual test: select-page-scroll.html
884
885         * manual-tests/select-page-scroll.html: Added.
886         * rendering/RenderListBox.cpp:
887         (WebCore::RenderListBox::computeLogicalHeight): Fix min to max.
888
889 2011-05-31  Yong Li  <yoli@rim.com>
890
891         Reviewed by Eric Seidel.
892
893         https://bugs.webkit.org/show_bug.cgi?id=54807
894         We have been assuming plain bitfields (like "int a : 31") are always signed integers.
895         However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
896         bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
897         http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
898         Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
899         always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
900         rule we should have in order to make our code independent from compilers and compiler flags.
901
902         No new test added because this change is not known to fix any issue.
903
904         * css/CSSPrimitiveValue.h:
905         * css/CSSProperty.h:
906         * rendering/InlineBox.h:
907         * rendering/RenderBlock.h:
908
909 2011-05-31  Hironori Bono  <hbono@chromium.org>
910
911         Reviewed by Eric Seidel.
912
913         Send an input event when we change the text direction.
914         https://bugs.webkit.org/show_bug.cgi?id=50952
915
916         Both Safari and Chrome call Editor::setBaseWritingDirection() to change
917         the text direction of an editable element with their UIs. This change
918         calls dispatchInputEvent() to send an input event when the function
919         actually changes the "dir" attribute so we can send an input event as
920         written in the HTML5 spec.
921
922         Test: fast/html/set-text-direction.html
923
924         * editing/Editor.cpp:
925         (WebCore::Editor::setBaseWritingDirection):
926
927 2011-05-31  Jer Noble  <jer.noble@apple.com>
928
929         Reviewed by Darin Adler.
930
931         Flash of black at the end of full screen transition at apple.com product videos
932         https://bugs.webkit.org/show_bug.cgi?id=61756
933
934         Added two new entries to the WebCore exports list.
935
936         * WebCore.exp.in:
937
938 2011-05-31  Rafael Brandao  <rafael.lobo@openbossa.org>
939
940         Reviewed by Andreas Kling.
941
942         [Qt] tst_QWebFrame::render() failing
943         https://bugs.webkit.org/show_bug.cgi?id=60893
944
945         Due a problem on QPicture (http://bugreports.qt.nokia.com/browse/QTBUG-19496),
946         this test was calculating the final geometry incorrectly. As the order between
947         a translate and a draw operation could be relevant for it, but not for the
948         final rendered result, they were changed on ScrollbarThemeQt::paint.
949
950         * platform/qt/ScrollbarThemeQt.cpp:
951         (WebCore::ScrollbarThemeQt::paint):
952
953 2011-05-27  Adrienne Walker  <enne@google.com>
954
955         Reviewed by James Robinson.
956
957         [chromium] Fix crash from empty reflections with masks
958         https://bugs.webkit.org/show_bug.cgi?id=61654
959
960         Change the iteration for updateCompositorResources to match that being
961         done in the paint and draw steps.  This mismatch of iteration style
962         was causing layers with replica masks to correctly get skipped while
963         painting but not get skipped during texture upload.
964
965         Test: compositing/reflections/empty-reflection-with-mask.html
966
967         * platform/graphics/chromium/LayerRendererChromium.cpp:
968         (WebCore::LayerRendererChromium::updateLayers):
969         (WebCore::LayerRendererChromium::updateCompositorResources):
970         * platform/graphics/chromium/LayerRendererChromium.h:
971
972 2011-05-31  B.J. Wever  <skylined@chromium.org>
973
974         Reviewed by Adam Barth.
975
976         requestFileSystem and resolveLocalFileSystemURI are not checking if
977         errorCallback is NULL before scheduling a callback on error.
978         https://bugs.webkit.org/show_bug.cgi?id=49539
979
980         Test: fast/filesystem/filesystem-no-callback-null-ptr-crash.html
981
982         * fileapi/DOMFileSystem.cpp:
983         (WebCore::DOMFileSystem::scheduleCallback): Only call callback if
984           one is supplied.
985
986 2011-05-31  Brady Eidson  <beidson@apple.com>
987
988         Reviewed by Darin Adler.
989
990         Another swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494
991         
992         Re-land http://trac.webkit.org/changeset/87566 with invalid ASSERTs removed.
993
994         No new tests. No change in behavior.
995
996         Instead of storing the DocumentLoader at construction and never changing it,
997         always calculate it based on the FrameLoader's current DocumentLoader:
998         * dom/Document.cpp:
999         (WebCore::Document::Document):
1000         (WebCore::Document::suggestedMIMEType):
1001         (WebCore::Document::lastModified):
1002         (WebCore::Document::initSecurityContext):
1003         (WebCore::Document::updateURLForPushOrReplaceState):
1004         (WebCore::Document::loader):
1005         * dom/Document.h:
1006
1007         Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
1008         * bindings/ScriptControllerBase.cpp:
1009         (WebCore::ScriptController::executeIfJavaScriptURL):
1010         * html/MediaDocument.cpp:
1011         (WebCore::MediaDocument::replaceMediaElementTimerFired):
1012         * html/PluginDocument.cpp:
1013         (WebCore::PluginDocumentParser::createDocumentStructure):
1014         * platform/mac/HTMLConverter.mm:
1015         (fileWrapperForElement):
1016
1017         * WebCore.exp.in:
1018
1019 2011-05-31  Levi Weintraub  <leviw@chromium.org>
1020
1021         Reviewed by Simon Fraser.
1022
1023         Change InlineBox::paint and its overloaded variants to use IntPoint
1024         https://bugs.webkit.org/show_bug.cgi?id=61804
1025
1026         Changing InlineBox::paint, its 7 overloaded variants, and RootInlineBox::paintEllipsisBox
1027         to use IntPoint for their paint offset instead of a pair of ints.
1028
1029         No new tests since this is just a refactoring.
1030
1031         * rendering/EllipsisBox.cpp:
1032         (WebCore::EllipsisBox::paint):
1033         * rendering/EllipsisBox.h:
1034         * rendering/InlineBox.cpp:
1035         (WebCore::InlineBox::paint):
1036         * rendering/InlineBox.h:
1037         * rendering/InlineFlowBox.cpp:
1038         (WebCore::InlineFlowBox::paint):
1039         * rendering/InlineFlowBox.h:
1040         * rendering/InlineTextBox.cpp:
1041         (WebCore::InlineTextBox::paint):
1042         * rendering/InlineTextBox.h:
1043         * rendering/RenderBlock.cpp:
1044         (WebCore::RenderBlock::paintEllipsisBoxes):
1045         * rendering/RenderBoxModelObject.cpp:
1046         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1047         * rendering/RenderLineBoxList.cpp:
1048         (WebCore::RenderLineBoxList::paint):
1049         * rendering/RootInlineBox.cpp:
1050         (WebCore::RootInlineBox::paintEllipsisBox):
1051         (WebCore::RootInlineBox::paint):
1052         * rendering/RootInlineBox.h:
1053         * rendering/svg/SVGInlineFlowBox.cpp:
1054         (WebCore::SVGInlineFlowBox::paint):
1055         * rendering/svg/SVGInlineFlowBox.h:
1056         * rendering/svg/SVGInlineTextBox.cpp:
1057         (WebCore::SVGInlineTextBox::paint):
1058         * rendering/svg/SVGInlineTextBox.h:
1059         * rendering/svg/SVGRootInlineBox.cpp:
1060         (WebCore::SVGRootInlineBox::paint):
1061         * rendering/svg/SVGRootInlineBox.h:
1062
1063 2011-05-31  James Robinson  <jamesr@chromium.org>
1064
1065         Reviewed by Kenneth Russell.
1066
1067         [chromium] Clear out LayerChromium's m_ccLayerImpl ptr on CCLayerImpl destruction
1068         https://bugs.webkit.org/show_bug.cgi?id=61593
1069
1070         Whenever a CCLayerImpl is being destroyed, clear out its owner's m_ccLayerImpl pointer.
1071         This is extremely defensive and not strictly necessary, but not harmful either.
1072
1073         * platform/graphics/chromium/LayerChromium.h:
1074         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1075         (WebCore::CCLayerImpl::~CCLayerImpl):
1076
1077 2011-05-31  Stephen White  <senorblanco@chromium.org>
1078
1079         Unreviewed; build fix.
1080
1081         Silence some warnings on the Safari/Mac release build.
1082
1083         * platform/graphics/gpu/TilingData.h:
1084         (WebCore::TilingData::assertTile):
1085
1086 2011-05-31  Justin Novosad  <junov@chromium.org>
1087
1088         Reviewed by Stephen White.
1089
1090         [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
1091         https://bugs.webkit.org/show_bug.cgi?id=61790
1092         Changing the build guards in these two files that are required
1093         by the accelerated compositing feature.
1094
1095         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
1096         * platform/graphics/gpu/TilingData.cpp:
1097
1098 2011-05-31  Justin Novosad  <junov@chromium.org>
1099
1100         Reviewed by Stephen White.
1101
1102         [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled
1103         https://bugs.webkit.org/show_bug.cgi?id=61790
1104         Changing the build guards in these two files that are required
1105         by the accelerated compositing feature.
1106
1107         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
1108         * platform/graphics/gpu/TilingData.cpp:
1109
1110 2011-05-31  Rob Buis  <rbuis@rim.com>
1111
1112         Reviewed by Dirk Schulze.
1113
1114         https://bugs.webkit.org/show_bug.cgi?id=34301
1115         Creating <animateMotion> elements via javascript do not execute
1116
1117         https://bugs.webkit.org/show_bug.cgi?id=17043
1118         SVG missing some .idl files
1119
1120         Add missing idl files.
1121
1122         Test: svg/animations/animate-mpath-insert.html
1123
1124         * CMakeLists.txt:
1125         * CodeGenerators.pri:
1126         * WebCore.gypi:
1127         * WebCore.xcodeproj/project.pbxproj:
1128         * svg/SVGAnimateMotionElement.idl: Added.
1129         * svg/SVGMPathElement.idl: Added.
1130
1131 2011-05-31  Robin Dunn  <robin@alldunn.com>
1132
1133         Reviewed by Kevin Ollivier.
1134
1135         [wx] Implement printing support for wxWidgets 2.9.x and above.
1136         
1137         https://bugs.webkit.org/show_bug.cgi?id=61796
1138
1139         * platform/graphics/GraphicsContext.h:
1140         * platform/graphics/wx/FontWx.cpp:
1141         (WebCore::Font::drawGlyphs):
1142         * platform/graphics/wx/GraphicsContextWx.cpp:
1143         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1144         (WebCore::GraphicsContext::drawRect):
1145         (WebCore::GraphicsContext::drawLine):
1146         (WebCore::GraphicsContext::drawEllipse):
1147         (WebCore::GraphicsContext::strokeArc):
1148         (WebCore::GraphicsContext::drawConvexPolygon):
1149         (WebCore::GraphicsContext::fillRect):
1150         (WebCore::GraphicsContext::drawLineForText):
1151         (WebCore::GraphicsContext::scale):
1152         (WebCore::GraphicsContext::currentScale):
1153         * platform/wx/wxcode/win/non-kerned-drawing.cpp:
1154         (WebCore::drawTextWithSpacing):
1155
1156 2011-05-31  Joseph Pecoraro  <joepeck@webkit.org>
1157
1158         Reviewed by Pavel Feldman.
1159
1160         Web Inspector: Missing InspectorFrontendHost.saveSessionSetting function
1161         https://bugs.webkit.org/show_bug.cgi?id=61751
1162
1163         Add missing stub function causing an error on load.
1164
1165         * inspector/front-end/InspectorFrontendHostStub.js:
1166         (.WebInspector.InspectorFrontendHostStub.prototype.saveSessionSetting):
1167
1168 2011-05-31  Abhishek Arya  <inferno@chromium.org>
1169
1170         Reviewed by Dimitri Glazkov.
1171
1172         Improve hasMediaControls logic to check that node has
1173         media controls. This can be false when cloning nodes.
1174         https://bugs.webkit.org/show_bug.cgi?id=61765
1175
1176         Test: media/media-controls-clone-crash.html
1177
1178         * dom/Node.h:
1179         (WebCore::Node::isMediaControls):
1180         * html/HTMLMediaElement.cpp:
1181         (WebCore::HTMLMediaElement::mediaControls):
1182         (WebCore::HTMLMediaElement::hasMediaControls):
1183         * html/shadow/MediaControls.h:
1184         (WebCore::MediaControls::isMediaControls):
1185         (WebCore::toMediaControls):
1186
1187 2011-05-31  Xan Lopez  <xlopez@igalia.com>
1188
1189         Reviewed by Martin Robinson.
1190
1191         [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
1192         https://bugs.webkit.org/show_bug.cgi?id=61791
1193
1194         * bindings/gobject/GNUmakefile.am: add new files.
1195         * bindings/gobject/WebKitDOMCustom.cpp: Added.
1196         (webkit_dom_html_text_area_element_is_edited):
1197         (webkit_dom_html_input_element_is_edited):
1198         * bindings/gobject/WebKitDOMCustom.h: Added.
1199
1200 2011-05-31  Noam Rosenthal  <noam.rosenthal@nokia.com>
1201
1202         Unreviewed build fix for Symbian.
1203         Opt-out Symbian for TextureMapper.
1204
1205         No new tests: build fix.
1206
1207         * WebCore.pri:
1208
1209 2011-05-31  Levi Weintraub  <leviw@chromium.org>
1210
1211         Reviewed by Eric Seidel.
1212
1213         Switch paintFocusRing to IntPoint
1214         https://bugs.webkit.org/show_bug.cgi?id=61580
1215
1216         Switching paintFocusRing to take an IntPoint representing the paint offset
1217         instead of a pair of ints.
1218
1219         No new tests as this is just refactoring.
1220
1221         * rendering/RenderInline.cpp:
1222         (WebCore::RenderInline::paintOutline):
1223         * rendering/RenderObject.cpp:
1224         (WebCore::RenderObject::paintFocusRing):
1225         (WebCore::RenderObject::paintOutline):
1226         * rendering/RenderObject.h:
1227
1228 2011-05-31  Abhishek Arya  <inferno@chromium.org>
1229
1230         Reviewed by Dimitri Glazkov.
1231
1232         Convert raw ptr to RefPtr for documentElement.
1233         https://bugs.webkit.org/show_bug.cgi?id=61688
1234
1235         Test: fast/dom/xml-parser-error-message-crash.svg
1236
1237         * dom/XMLDocumentParser.cpp:
1238         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
1239
1240 2011-05-31  Andreas Kling  <kling@webkit.org>
1241
1242         Reviewed by Antti Koivisto.
1243
1244         Canvas/JSC: Auto-generate overloads for setShadow()
1245         https://bugs.webkit.org/show_bug.cgi?id=61786
1246
1247         Move CanvasRenderingContext2D.setShadow() to auto-generated JSC bindings.
1248
1249         There is a subtle difference to the previous behavior: invalid numbers of
1250         arguments now raise TypeError instead of SyntaxError. This is in accordance
1251         with Web IDL, and matches the existing V8 bindings.
1252
1253         Test: fast/canvas/canvas-overloads-setShadow.html
1254
1255         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1256         * html/canvas/CanvasRenderingContext2D.idl:
1257
1258 2011-05-31  Andreas Kling  <kling@webkit.org>
1259
1260         Reviewed by Antti Koivisto.
1261
1262         Canvas/JSC: Auto-generate overloads for drawImageFromRect()
1263         https://bugs.webkit.org/show_bug.cgi?id=61709
1264
1265         Move CanvasRenderingContext2D.drawImageFromRect() to auto-generated JSC bindings.
1266         Make it [RequiresAllArguments=Raise] to match the old behavior.
1267         Side effect: calling drawImageFromRect() with zero arguments will now raise
1268         SyntaxError instead of TypeError.
1269
1270         Test: fast/canvas/canvas-overloads-drawImageFromRect.html
1271
1272         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1273         * html/canvas/CanvasRenderingContext2D.h:
1274         * html/canvas/CanvasRenderingContext2D.idl:
1275
1276 2011-05-31  Andreas Kling  <kling@webkit.org>
1277
1278         Reviewed by Antti Koivisto.
1279
1280         Canvas/JSC: Auto-generate overloads for drawImage()
1281         https://bugs.webkit.org/show_bug.cgi?id=61703
1282
1283         Move CanvasRenderingContext2D.drawImage() to auto-generated JSC bindings.
1284
1285         There is a subtle difference to the previous behavior: invalid numbers of
1286         arguments now raise TypeError instead of SyntaxError. This is in accordance
1287         with Web IDL, and matches the existing V8 bindings.
1288
1289         Test: fast/canvas/canvas-overloads-drawImage.html
1290
1291         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1292         * html/canvas/CanvasRenderingContext2D.idl:
1293
1294 2011-05-31  Andreas Kling  <kling@webkit.org>
1295
1296         Reviewed by Antti Koivisto.
1297
1298         Canvas/JSC: Auto-generate overloads for strokeRect()
1299         https://bugs.webkit.org/show_bug.cgi?id=61641
1300
1301         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
1302
1303         No behavioral change.
1304
1305         Test: fast/canvas/canvas-overloads-strokeRect.html
1306
1307         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1308         * html/canvas/CanvasRenderingContext2D.idl:
1309
1310 2011-05-31  Andreas Kling  <kling@webkit.org>
1311
1312         Reviewed by Antti Koivisto.
1313
1314         Canvas/JSC: Auto-generate overloads for setFillColor()
1315         https://bugs.webkit.org/show_bug.cgi?id=61635
1316
1317         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
1318
1319         There is a subtle difference to the previous behavior: invalid numbers of
1320         arguments now raise TypeError instead of SyntaxError. This is in accordance
1321         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
1322
1323         Test: fast/canvas/canvas-overloads-setFillColor.html
1324
1325         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1326         * html/canvas/CanvasRenderingContext2D.idl:
1327
1328 2011-05-31  Andreas Kling  <kling@webkit.org>
1329
1330         Reviewed by Antti Koivisto.
1331
1332         Canvas/JSC: Auto-generate overloads for setStrokeColor()
1333         https://bugs.webkit.org/show_bug.cgi?id=61629
1334
1335         Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings.
1336
1337         There is a subtle difference to the previous behavior: invalid numbers of
1338         arguments now raise TypeError instead of SyntaxError. This is in accordance
1339         with Web IDL, but doesn't matter much anyway since this method is WebKit-only.
1340
1341         Test: fast/canvas/canvas-overloads-setStrokeColor.html
1342
1343         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1344         * html/canvas/CanvasRenderingContext2D.idl:
1345
1346 2011-05-31  Andreas Kling  <kling@webkit.org>
1347
1348         Reviewed by Antti Koivisto.
1349
1350         Canvas/JSC: Auto-generate overloads for strokeText()
1351         https://bugs.webkit.org/show_bug.cgi?id=61626
1352
1353         Move CanvasRenderingContext2D.strokeText() to auto-generated JSC bindings.
1354         Make it [RequiresAllArguments=Raise] to match the old behavior.
1355         This has the side-effect of aligning the behaviors of JSC and V8.
1356
1357         Test: fast/canvas/canvas-overloads-strokeText.html
1358
1359         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1360         * html/canvas/CanvasRenderingContext2D.idl:
1361
1362 2011-05-31  Andreas Kling  <kling@webkit.org>
1363
1364         Reviewed by Antti Koivisto.
1365
1366         Canvas/JSC: Auto-generate overloads for fillText()
1367         https://bugs.webkit.org/show_bug.cgi?id=61623
1368
1369         Move CanvasRenderingContext2D.fillText() to auto-generated JSC bindings.
1370         Make it [RequiresAllArguments=Raise] to match the old behavior.
1371         This has the side-effect of aligning the behaviors of JSC and V8.
1372
1373         Test: fast/canvas/canvas-overloads-fillText.html
1374
1375         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1376         * html/canvas/CanvasRenderingContext2D.idl:
1377
1378 2011-05-31  Yael Aharon  <yael.aharon@nokia.com>
1379
1380         Reviewed by Kenneth Rohde Christiansen.
1381
1382         Frame flattening is broken with nested frames
1383         https://bugs.webkit.org/show_bug.cgi?id=61491
1384
1385         After r77988, when frame flattening is enabled, performPostLayoutTasks() is called on a timer for iframes.
1386         This causes layout of nested iframes to sometimes happen asynchronously, but WebCore expects layout to always finish synchronously.
1387         Added a call to updateWidgetPosition() for cases that performPostLayoutTasks() is now happening asynchronously.
1388
1389         Test: fast/frames/flattening/iframe-flattening-nested.html
1390
1391         * page/FrameView.cpp:
1392         (WebCore::FrameView::layout):
1393
1394 2011-05-31  Tommy Widenflycht  <tommyw@google.com>
1395
1396         Reviewed by Tony Gentilcore.
1397
1398         Fix getUserMedia callback bindings for JSC.
1399         https://bugs.webkit.org/show_bug.cgi?id=60174
1400
1401         This patch initializes the exception code variable to 0.
1402
1403         Test: fast/dom/MediaStream/argument-types.html
1404
1405         * bindings/js/JSNavigatorCustom.cpp:
1406         (WebCore::JSNavigator::webkitGetUserMedia):
1407
1408 2011-05-31  Oleg Romashin  <oleg.romashin@nokia.com>
1409
1410         Reviewed by Benjamin Poulain.
1411
1412         Fix compilation with debug enabled, m_lightSource.type is not valid anymore
1413         https://bugs.webkit.org/show_bug.cgi?id=61719
1414
1415         * platform/graphics/filters/arm/FELightingNEON.h:
1416         (WebCore::FELighting::platformApplyNeon):
1417
1418 2011-05-31  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
1419
1420         Reviewed by Nikolas Zimmermann.
1421
1422         Invalid color handling is broken for SVG
1423         https://bugs.webkit.org/show_bug.cgi?id=58531
1424
1425         Fix invalid color fallback handling. If the fill/stroke attributes computed
1426         value leads to a an invalid color, inherit the desired color from the parent
1427         style instead. Matches Opera/FF and SVG 1.1 Second Edition (http://www.w3.org/TR/SVG/).
1428
1429         Tests: svg/custom/invalid-stroke-hex.svg
1430                svg/custom/invalid-uri-stroke.svg
1431
1432         * rendering/svg/RenderSVGResource.cpp:
1433         (WebCore::inheritColorFromParentStyleIfNeeded):
1434         (WebCore::requestPaintingResource):
1435
1436 2011-05-31  Vangelis Kokkevis  <vangelis@chromium.org>
1437
1438         Reviewed by Kent Tamura.
1439
1440         [chromium] Avoid double deletion of DrawingBuffer's color buffer
1441         texture.
1442         https://bugs.webkit.org/show_bug.cgi?id=61761
1443
1444         Test: Verified that the DCHECK in GraphicsContext3D implementation
1445         doesn't trigger.
1446
1447         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1448         (WebCore::DrawingBuffer::~DrawingBuffer):
1449
1450 2011-05-30  Hayato Ito  <hayato@chromium.org>
1451
1452         Reviewed by Ryosuke Niwa.
1453
1454         Add a utility function for dumping a tree for the Node, including a document of a frame.
1455         https://bugs.webkit.org/show_bug.cgi?id=61727
1456
1457         No new tests since added functions are only available in debug builds.
1458
1459         * dom/Node.cpp:
1460         (WebCore::parentOrHostOrFrameOwner):
1461         (WebCore::traverseNextNodeAcrossFrame):
1462         (WebCore::Node::showTreeForThisAcrossFrame):
1463         * dom/Node.h:
1464
1465 2011-05-30  James Kozianski  <koz@chromium.org>
1466
1467         Reviewed by Kent Tamura.
1468
1469         [Chromium] Make isValidProtocol() accept protocols with '+'.
1470         https://bugs.webkit.org/show_bug.cgi?id=61759
1471
1472         Also, detect syntax errors before security errors; some syntax errors
1473         will also trigger a security error, but it's more helpful to the
1474         programmer to know if they have a syntax error, which are well-defined
1475         in the spec, rather than a security error, which aren't.
1476
1477         * page/Navigator.cpp:
1478         (WebCore::Navigator::registerProtocolHandler):
1479         Detect syntax errors before security errors.
1480         * platform/KURLGoogle.cpp:
1481         (WebCore::isSchemeChar):
1482         Include '+' in the list of valid characters.
1483
1484 >>>>>>> .r87778
1485 2011-05-30  Andrey Petrov  <andrey.petrov@gmail.com>
1486
1487         Reviewed by Hajime Morita.
1488
1489         Using jQuery to show/hide IMG elements crashes WebKit
1490         https://bugs.webkit.org/show_bug.cgi?id=31721
1491
1492         For platform code, do not assert nodes always have renderer at
1493         the time context menu action is invoked.
1494         Renderer can actually be empty for a given node if it was hidden
1495         or removed from domtree by some non-user generated event (e.g timeout) 
1496         after the popup menu had been created.
1497
1498         Changing Chromium, Gtk, Mac, Qt, Win and WinCE.
1499
1500         Test: editing/pasteboard/copy-standalone-image-crash.html
1501
1502         * platform/chromium/PasteboardChromium.cpp:
1503         (WebCore::Pasteboard::writeImage):
1504         * platform/gtk/PasteboardGtk.cpp:
1505         (WebCore::Pasteboard::writeImage):
1506         * platform/mac/PasteboardMac.mm:
1507         (WebCore::Pasteboard::writeImage):
1508         * platform/qt/PasteboardQt.cpp:
1509         (WebCore::Pasteboard::writeImage):
1510         * platform/win/PasteboardWin.cpp:
1511         (WebCore::Pasteboard::writeImage):
1512         * platform/wince/PasteboardWinCE.cpp:
1513         (WebCore::Pasteboard::writeImage):
1514
1515 2011-05-30  Daniel Bates  <dbates@webkit.org>
1516
1517         Reviewed by Adam Barth.
1518
1519         Rename XSSFilter to XSSAuditor
1520         https://bugs.webkit.org/show_bug.cgi?id=61718
1521
1522         Currently we use the names XSSFilter and XSSAuditor throughout the project.
1523         Instead, we should choose one name for consistency.
1524
1525         No functionality was changed. So, no new tests.
1526
1527         * CMakeLists.txt:
1528         * GNUmakefile.list.am:
1529         * WebCore.gypi:
1530         * WebCore.pro:
1531         * WebCore.vcproj/WebCore.vcproj:
1532         * WebCore.xcodeproj/project.pbxproj:
1533         * html/parser/HTMLDocumentParser.cpp:
1534         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
1535         (WebCore::HTMLDocumentParser::pumpTokenizer):
1536         * html/parser/HTMLDocumentParser.h:
1537         * html/parser/XSSAuditor.cpp: Copied from Source/WebCore/html/parser/XSSFilter.cpp.
1538         (WebCore::XSSAuditor::XSSAuditor):
1539         (WebCore::XSSAuditor::init):
1540         (WebCore::XSSAuditor::filterToken):
1541         (WebCore::XSSAuditor::filterTokenInitial):
1542         (WebCore::XSSAuditor::filterTokenAfterScriptStartTag):
1543         (WebCore::XSSAuditor::filterScriptToken):
1544         (WebCore::XSSAuditor::filterObjectToken):
1545         (WebCore::XSSAuditor::filterParamToken):
1546         (WebCore::XSSAuditor::filterEmbedToken):
1547         (WebCore::XSSAuditor::filterAppletToken):
1548         (WebCore::XSSAuditor::filterIframeToken):
1549         (WebCore::XSSAuditor::filterMetaToken):
1550         (WebCore::XSSAuditor::filterBaseToken):
1551         (WebCore::XSSAuditor::filterFormToken):
1552         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
1553         (WebCore::XSSAuditor::eraseAttributeIfInjected):
1554         (WebCore::XSSAuditor::snippetForRange):
1555         (WebCore::XSSAuditor::snippetForAttribute):
1556         (WebCore::XSSAuditor::isContainedInRequest):
1557         (WebCore::XSSAuditor::isSameOriginResource):
1558         * html/parser/XSSAuditor.h: Copied from Source/WebCore/html/parser/XSSFilter.h.
1559         * html/parser/XSSFilter.cpp: Removed.
1560         * html/parser/XSSFilter.h: Removed.
1561
1562 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
1563
1564         Reviewed by Simon Hausmann.
1565
1566         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
1567         https://bugs.webkit.org/show_bug.cgi?id=61694
1568
1569         Expose a public clearAll() function to reset WebCore::Animation.
1570
1571         No new functionality, so no new tests.
1572
1573         * platform/animation/Animation.h:
1574         (WebCore::Animation::clearAll):
1575
1576 2011-05-30  Eric Carlson  <eric.carlson@apple.com>
1577
1578         Reviewed by Alexey Proskuryakov.
1579
1580         Audio and video files saved to the Application Cache should preserve the original file extension
1581         https://bugs.webkit.org/show_bug.cgi?id=61750
1582         <rdar://9524922>
1583
1584         No new tests, it isn't possible to check the name of the file in the cache from within
1585         DRT. Changes verified manually.
1586
1587         * loader/appcache/ApplicationCacheStorage.cpp:
1588         (WebCore::ApplicationCacheStorage::store): Append the original file extension to the cache
1589             file name.
1590         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Add extension parameter.
1591         * loader/appcache/ApplicationCacheStorage.h:
1592
1593 2011-05-30  Jer Noble  <jer.noble@apple.com>
1594
1595         Reviewed by Dan Bernstein.
1596
1597         Play/Pause button in wrong state when entering full screen on Vimeo
1598         https://bugs.webkit.org/show_bug.cgi?id=61754
1599
1600         Update the play/pause button inside reset().  This ensures the button is in
1601         the correct state when the controls are created after playback has already
1602         started.
1603
1604         * html/shadow/MediaControlRootElement.cpp:
1605         (WebCore::MediaControlRootElement::reset):
1606
1607 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
1608
1609         Reviewed by Simon Hausmann.
1610
1611         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
1612         https://bugs.webkit.org/show_bug.cgi?id=61694
1613
1614         Added a public TimingFunction::type() method.
1615
1616         No new functionality, so no new tests.
1617
1618         * platform/animation/TimingFunction.h:
1619         (WebCore::TimingFunction::type):
1620
1621 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
1622
1623         BUILD FIX for r87697 on Windows/Symbian
1624
1625         For now enabling TextureMapper for Mac/Linux only.
1626
1627         * WebCore.pri:
1628
1629 2011-05-30  David Kilzer  <ddkilzer@apple.com>
1630
1631         BUILD FIX for r87692 with !ENABLE(FULLSCREEN_API)
1632
1633         * dom/EventDispatcher.cpp:
1634         (WebCore::EventDispatcher::determineDispatchBehavior): Mark
1635         shadowRoot as an unused parameter with !ENABLE(FULLSCREEN_API).
1636
1637 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
1638
1639         Reviewed by Andreas Kling.
1640
1641         [Texmap][Qt] Enable TextureMapper by default
1642         https://bugs.webkit.org/show_bug.cgi?id=61740
1643
1644         Make CONFIG+=texmap an opt-out instead of an opt-in.
1645
1646         No new functionality so no new tests.
1647
1648         * WebCore.pri:
1649
1650 2011-05-30  Martin Robinson  <mrobinson@igalia.com>
1651
1652         Reviewed by Xan Lopez.
1653
1654         [GTK] fast/css/font-face-zero-hash-key.html is crashing on the bots
1655         https://bugs.webkit.org/show_bug.cgi?id=61693
1656
1657         Do not try to read the FT_Face from m_scaledFont if it m_scaledFont is
1658         null. A recent change fixing 0-pixel-size fonts means that m_scaledFont
1659         may now be null.
1660
1661         No new tests. This change should cause fast/css/font-face-zero-hash-key.html
1662         to stop crashing.
1663
1664         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1665         (WebCore::FontPlatformData::FontPlatformData): Do a null check before accessing
1666         m_scaledFont.
1667
1668 2011-05-30  Noam Rosenthal  <noam.rosenthal@nokia.com>
1669
1670         Reviewed by Kenneth Rohde Christiansen.
1671
1672         [Texmap][Qt] Disable accelerated plugins/media until they're working.
1673         https://bugs.webkit.org/show_bug.cgi?id=61687
1674
1675         Until this works properly, we should indicate that our media implementation
1676         in texture mapper doesn't support accelerated compositing.
1677
1678         This makes LayoutTests/compositing/video/* work again.
1679
1680         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1681         (WebCore::MediaPlayerPrivateQt::supportsAcceleratedRendering):
1682         (WebCore::MediaPlayerPrivateQt::platformLayer):
1683
1684 2011-05-30  Mikhail Naganov  <mnaganov@chromium.org>
1685
1686         Reviewed by Adam Barth.
1687
1688         [Chromium] Fix regression after r87628.
1689         https://bugs.webkit.org/show_bug.cgi?id=61733
1690
1691         Having r87628 in place, Chrome reliability bot crashes in
1692         WebCore::HTMLLinkElement::onloadTimerFired.
1693
1694         This is because the change makes WebCore::CachedResource::setRequest to
1695         call checkNotify on request reset.  HTMLLinkElement registers itself as
1696         CachedResource client via m_cachedSheet, which can happen even if
1697         m_cachedLinkResource wasn't set.  As a result,
1698         WebCore::HTMLLinkElement::notifyFinished is got called with unset
1699         m_cachedLinkResource, which causes a crash in
1700         HTMLLinkElement::onloadTimerFired
1701
1702         * html/HTMLLinkElement.cpp:
1703         (WebCore::HTMLLinkElement::notifyFinished):
1704
1705 2011-05-30  Jer Noble  <jer.noble@apple.com>
1706
1707         Reviewed by Darin Adler and Simon Fraser.
1708
1709         REGRESSION (r87622): Scrubbing a Vimeo movie when in fullscreen stops playback; no way to make it start again
1710         https://bugs.webkit.org/show_bug.cgi?id=61717
1711         rdar://problem/9522272
1712
1713         May be some good way to test this later. No immediate idea about the best way.
1714
1715         When a media element is taken into full-screen mode, stop events from propagating
1716         outside the media element's shadow DOM, EventDispatcher::determineDispatchBehavior()
1717         has been changed to take a shadow root node. In our full screen media element check,
1718         we check to see if the passed shadow root is the shadow root of the full screen media
1719         element, and if so, specify events should StayInsideShadowDOM. The end result is that
1720         inside EventDispatcher::ensureEventAncestors, an ancestor chain is built up all the
1721         way from the SliderThumb to the video element's shadow root, but no further.
1722
1723         * dom/EventDispatcher.cpp:
1724         (WebCore::EventDispatcher::determineDispatchBehavior): Restrict events to the
1725         shadow DOM when showing a full screen video.
1726
1727         * html/HTMLMediaElement.cpp:
1728         (WebCore::HTMLMediaElement::HTMLMediaElement): Removed code to manage full screen controls.
1729         The events telling us about activity in the shadow DOM no longer bubble out so we need to
1730         handle this inside the shadow DOM on the root element.
1731         (WebCore::HTMLMediaElement::play): Ditto.
1732         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
1733         (WebCore::HTMLMediaElement::defaultEventHandler): Ditto.
1734         (WebCore::HTMLMediaElement::enterFullscreen): Ditto.
1735         (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
1736         * html/HTMLMediaElement.h: Added isPlaying function, removed things moved to the root element.
1737
1738         * html/shadow/MediaControlElements.cpp:
1739         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Rolled out
1740         changes that tried to make special rules for events using preDispatchEventHandler and such.
1741         This rolls out both r87622 and r87655.
1742         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Ditto.
1743         (WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler): Ditto.
1744         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Ditto.
1745         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
1746         (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
1747         (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
1748         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): Ditto.
1749         (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
1750         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto.
1751         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Ditto.
1752         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto.
1753         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto.
1754         * html/shadow/MediaControlElements.h: Ditto.
1755
1756         * html/shadow/MediaControlRootElement.cpp:
1757         (WebCore::MediaControlRootElement::MediaControlRootElement): Initialize new data members.
1758         (WebCore::MediaControlRootElement::playbackStarted): Start the timer so we will consider
1759         hiding the controls later.
1760         (WebCore::MediaControlRootElement::playbackProgressed): Hide the controls if the mouse
1761         is no longer over the controls.
1762         (WebCore::MediaControlRootElement::playbackStopped): Stop the timer since we only hide
1763         automatically if we're playing.
1764         (WebCore::MediaControlRootElement::enteredFullscreen): Start the timer.
1765         (WebCore::MediaControlRootElement::exitedFullscreen): Stop the timer since we only care
1766         if we are full screen.
1767         (WebCore::MediaControlRootElement::containsRelatedTarget): Added. Helper for next function.
1768         (WebCore::MediaControlRootElement::defaultEventHandler): Do the hide/show and timer functions
1769         as the mouse is moved in and out.
1770         (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): Start the timer if
1771         needed.
1772         (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide if the conditions
1773         are met.
1774         (WebCore::MediaControlRootElement::stopHideFullscreenControlsTimer): Stop the timer.
1775
1776         * html/shadow/MediaControlRootElement.h: Added new functions and data members.
1777
1778
1779 2011-05-30  Gavin Peters  <gavinp@chromium.org>
1780
1781         Reviewed by Adam Barth.
1782
1783         prevent HTMLLinkElement from watching multiple CachedResources
1784         https://bugs.webkit.org/show_bug.cgi?id=61686
1785
1786         If we modify an existing link element, stop listening to the previous
1787         cached resource, to prevent double notifications (which crash).
1788
1789         Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
1790
1791         * html/HTMLLinkElement.cpp:
1792         (WebCore::HTMLLinkElement::process):
1793
1794 2011-05-30  Peter Varga  <pvarga@webkit.org>
1795
1796         Unreviewed build fix.
1797
1798         [Qt][V8] Fix debug build.
1799
1800         No new tests needed.
1801
1802         * css/CSSStyleDeclaration.cpp: Add missing header.
1803         * dom/Text.cpp: Ditto.
1804         * rendering/InlineTextBox.cpp: Ditto.
1805
1806 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1807
1808         Unreviewed, rolling out r87683.
1809         http://trac.webkit.org/changeset/87683
1810         https://bugs.webkit.org/show_bug.cgi?id=61729
1811
1812         Breaks inspector tests on Chromium (Requested by apavlov on
1813         #webkit).
1814
1815         * inspector/front-end/StylesSidebarPane.js:
1816         (WebInspector.StylesSidebarPane.prototype.update):
1817
1818 2011-05-25  Alexander Pavlov  <apavlov@chromium.org>
1819
1820         Reviewed by Yury Semikhatsky.
1821
1822         Web Inspector: node selection is slow in the Elements panel.
1823         https://bugs.webkit.org/show_bug.cgi?id=60813
1824
1825         Schedule full style updates rather than request all node styles from the backend up front.
1826
1827         * inspector/front-end/StylesSidebarPane.js:
1828         (WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles):
1829         (WebInspector.StylesSidebarPane.prototype.update):
1830
1831 2011-05-30  Andrey Kosyakov  <caseq@chromium.org>
1832
1833         Reviewed by Pavel Feldman.
1834
1835         Web Inspector: do not issue frontendReused for reload or navigation.
1836         https://bugs.webkit.org/show_bug.cgi?id=61192
1837
1838        - only issue frontendReused when inspector is attached after main resource committed load
1839        - upon committing loading main resource, reset agents before sending FrameNavigated to page agent
1840        - Ensure main resource is set early so that abbreviations of URLs in resource tree are consistent after reload
1841        - do not enable agents explicitly in frontendReused (this is done by backend when resotring state from cookie)
1842
1843         * inspector/InspectorAgent.cpp:
1844         (WebCore::InspectorAgent::InspectorAgent):
1845         (WebCore::InspectorAgent::restore):
1846         (WebCore::InspectorAgent::clearFrontend):
1847         (WebCore::InspectorAgent::didCommitLoad):
1848         * inspector/InspectorAgent.h:
1849         * inspector/InspectorInstrumentation.cpp:
1850         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1851         * inspector/front-end/NetworkManager.js:
1852         * inspector/front-end/ResourceTreeModel.js:
1853         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
1854         (WebInspector.ResourceTreeModel.prototype._frameNavigated):
1855         (WebInspector.ResourceTreeModel.prototype._cleanupFramesAfterNavigation):
1856         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
1857         * inspector/front-end/ResourcesPanel.js:
1858         (WebInspector.ResourcesPanel.prototype.reset):
1859         (WebInspector.ResourcesPanel.prototype._resetResourcesTree):
1860         (WebInspector.DatabaseTreeElement.prototype.onpopulate):
1861         (WebInspector.SearchResultsTreeElementsTraverser.prototype._lastTreeElement):
1862         * inspector/front-end/inspector.js:
1863         (WebInspector.reset):
1864         (WebInspector.frontendReused):
1865
1866 2011-05-30  Ryan Sleevi  <rsleevi@chromium.org>
1867
1868         Reviewed by Darin Adler.
1869
1870         FEConvolveMatrix::getPixelValue() fails to properly check if y is within bounds, causing it to fail to correctly apply the kernel and edge mode to the first targetY pixels
1871         https://bugs.webkit.org/show_bug.cgi?id=61603
1872
1873         Test: svg/filters/feConvolveFilter-y-bounds.svg
1874
1875         * platform/graphics/filters/FEConvolveMatrix.cpp:
1876         (WebCore::FEConvolveMatrix::getPixelValue):
1877
1878 2011-05-30  Nate Chapin  <japhet@chromium.org>
1879
1880         Reviewed by Antti Koivisto.
1881
1882         Refactor the CachedResourceLoader -> CachedResource -> CachedResourceRequest
1883         flow so it's a little less circular.
1884         https://bugs.webkit.org/show_bug.cgi?id=61666
1885
1886         * loader/cache/CachedFont.cpp:
1887         (WebCore::CachedFont::beginLoadIfNeeded):
1888         * loader/cache/CachedResource.cpp:
1889         (WebCore::CachedResource::load):
1890         * loader/cache/CachedResourceLoader.cpp:
1891         (WebCore::CachedResourceLoader::requestImage):
1892         (WebCore::CachedResourceLoader::setAutoLoadImages):
1893         (WebCore::CachedResourceLoader::loadStarted):
1894         * loader/cache/CachedResourceLoader.h:
1895         * loader/cache/CachedResourceRequest.cpp:
1896         (WebCore::CachedResourceRequest::load):
1897
1898 2011-05-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1899
1900         Unreviewed, rolling out r87618.
1901         http://trac.webkit.org/changeset/87618
1902         https://bugs.webkit.org/show_bug.cgi?id=61720
1903
1904         Causes BrowserFocusTest.FocusOnReload to fail (Requested by
1905         abarth|gardener on #webkit).
1906
1907         * html/HTMLLinkElement.cpp:
1908         (WebCore::HTMLLinkElement::process):
1909
1910 2011-05-29  Yuta Kitamura  <yutak@chromium.org>
1911
1912         Reviewed by Kent Tamura.
1913
1914         WebSocket closing handshake
1915         https://bugs.webkit.org/show_bug.cgi?id=35721
1916
1917         Implement WebSocket closing handshake based on Ian Hickson's
1918         WebSocket protocol draft 76.
1919
1920         Tests: http/tests/websocket/tests/client-close.html
1921                http/tests/websocket/tests/server-close.html
1922
1923         * platform/network/SocketStreamHandleBase.cpp:
1924         (WebCore::SocketStreamHandleBase::send):
1925         Do not send a message if we are in Closing state.
1926         (WebCore::SocketStreamHandleBase::close):
1927         Do not disconnect if we have pending data which have not been sent yet.
1928         In this case, the actual disconnection will happen in sendPendingData().
1929         (WebCore::SocketStreamHandleBase::disconnect):
1930         Renamed from close(). Disconnect the connection immediately.
1931         (WebCore::SocketStreamHandleBase::sendPendingData):
1932         * platform/network/SocketStreamHandleBase.h:
1933         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1934         Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
1935         to didClose().
1936         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
1937         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1938         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
1939         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
1940         * websockets/ThreadableWebSocketChannelClientWrapper.h:
1941         * websockets/WebSocket.cpp:
1942         (WebCore::WebSocket::send):
1943         (WebCore::WebSocket::close):
1944         Fail if close() is attempted before the connection is established.
1945         Otherwise, set the state to CLOSING and start the closing handshake.
1946         (WebCore::WebSocket::bufferedAmount):
1947         If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
1948         (WebCore::WebSocket::didConnect):
1949         (WebCore::WebSocket::didReceiveMessage):
1950         We need to invoke message event in CLOSING state as well as OPEN state.
1951         (WebCore::WebSocket::didReceiveMessageError):
1952         (WebCore::WebSocket::didStartClosingHandshake):
1953         (WebCore::WebSocket::didClose):
1954         * websockets/WebSocket.h:
1955         * websockets/WebSocketChannel.cpp:
1956         (WebCore::WebSocketChannel::WebSocketChannel):
1957         (WebCore::WebSocketChannel::close):
1958         Start the closing handshake.
1959         (WebCore::WebSocketChannel::disconnect):
1960         Disconnect the socket stream, instead of close.
1961         (WebCore::WebSocketChannel::didClose):
1962         (WebCore::WebSocketChannel::didReceiveData): Ditto.
1963         (WebCore::WebSocketChannel::didFail): Ditto.
1964         (WebCore::WebSocketChannel::processBuffer):
1965         Ditto.
1966         Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
1967         (WebCore::WebSocketChannel::startClosingHandshake):
1968         Send 0xFF 0x00 byte sequence.
1969         (WebCore::WebSocketChannel::closingTimerFired):
1970         Disconnect the socket stream if the closing handshake has timed out.
1971         * websockets/WebSocketChannel.h:
1972         m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
1973         specification).
1974         * websockets/WebSocketChannelClient.h:
1975         (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
1976         (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
1977         * websockets/WorkerThreadableWebSocketChannel.cpp:
1978         Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
1979         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
1980         (WebCore::workerContextDidStartClosingHandshake):
1981         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
1982         (WebCore::workerContextDidClose):
1983         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
1984         * websockets/WorkerThreadableWebSocketChannel.h:
1985
1986 2011-05-29  Adam Barth  <abarth@webkit.org>
1987
1988         Attempt to fix build by implementing pure virtual function.
1989
1990         * html/shadow/MediaControlRootElementChromium.cpp:
1991         (WebCore::MediaControlRootElementChromium::shouldHideControls):
1992         * html/shadow/MediaControlRootElementChromium.h:
1993
1994 2011-05-29  Brian Weinstein  <bweinstein@apple.com>
1995
1996         Reviewed by Darin Adler.
1997
1998         Controls never hide in full screen after user stops moving mouse
1999         https://bugs.webkit.org/show_bug.cgi?id=61715
2000         <rdar://problem/9522182>
2001         
2002         When we get a mouse move event in HTMLMediaElement::defaultEventHandler, and we are in full screen,
2003         show the media controls, and then start a timer.
2004         
2005         The timer fires 3 seconds after the user's last mouse movement (timer is restarted on every mouse
2006         move), and hides the controls.
2007
2008         * html/HTMLMediaElement.cpp:
2009         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize our new timer.
2010         (WebCore::HTMLMediaElement::play): If we are in full screen mode, start our timer to hide the full screen
2011             controls. We don't want the user to have to move the mouse to hide them when they use the spacebar
2012             to play.
2013         (WebCore::HTMLMediaElement::startHideFullscreenControlsTimer): Starts a oneshot timer 3 seconds in the future
2014             if we are in full screen.
2015         (WebCore::HTMLMediaElement::hideFullscreenControlsTimerFired): Make sure that we are currently playing, and
2016             we are in full screen, and hide the controls. We don't want to hide the controls if we are paused.
2017         (WebCore::HTMLMediaElement::stopHideFullscreenControlsTimer): Stops the timer.
2018         (WebCore::HTMLMediaElement::defaultEventHandler): If we get a mouse move event and are in full screen, show the
2019             controls and start a timer to hide them.
2020         (WebCore::HTMLMediaElement::enterFullscreen): Start a timer to hide the full screen controls. The user shouldn't
2021             have the move the mouse once they enter full screen to hide the controls.
2022         (WebCore::HTMLMediaElement::exitFullscreen): Stop the timer to hide the full screen controls.
2023         * html/HTMLMediaElement.h:
2024         * html/shadow/MediaControls.h: Added pure virtual shouldHideControls() method.
2025         * html/shadow/MediaControlRootElement.cpp:
2026         (WebCore::MediaControlRootElement::playbackStopped): Stop the timer to hide the full screen controls.
2027         (WebCore::MediaControlRootElement::shouldHideControls): Added, only report that
2028             the caller should hide the controls if the panel is not hovered.
2029         * html/shadow/MediaControlRootElement.h:
2030
2031 2011-05-29  Jer Noble  <jer.noble@apple.com>
2032
2033         Reviewed by Simon Fraser.
2034
2035         Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page
2036         https://bugs.webkit.org/show_bug.cgi?id=61712
2037
2038         Tests: fullscreen/full-screen-iframe-zIndex.html
2039
2040         Walk up the ancestor chain for the full-screen element, marking them as full-screen
2041         ancestors. Then, we apply a pseudo-class to those elements, which disable all their
2042         stacking-context-creating styles.  Set the z-index of all full-screen elements (and
2043         the iframes which contain them) to a large value, ensuring they appear above other
2044         sibling elements.
2045
2046         This new behavior replaces the previous "-webkit-full-screen-media-document" behavior
2047         and pesudo-class, so remove it and replace it with the new pseudo-class.
2048
2049         * css/CSSSelector.cpp:
2050         (WebCore::nameToPseudoTypeMap): Add -webkit-full-screen-ancestor and remove
2051             -webkit-full-screen-media-document.
2052         (WebCore::CSSSelector::pseudoId): Add PseudoFullScreenAncestor and remove
2053             PseudoFullScreenMediaDocument
2054         (WebCore::CSSSelector::extractPseudoType): Ditto.
2055         * css/CSSSelector.h: Ditto.
2056         * css/CSSStyleSelector.cpp:
2057         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Remove the
2058             PseudoFullScreenMediaDocument implementation and replace it with
2059             PseudoFullScreenAncestor.
2060         * css/fullscreen.css:
2061         (:-webkit-full-screen): Add a z-index property.
2062         (:-webkit-full-screen-ancestor:not(iframe)): Added.  Reset the z-index to
2063             auto, and reset other stacking-context creating properties.
2064         * dom/Document.cpp:
2065         (WebCore::Document::setContainsFullScreenElementRecursively): Recurse up every element
2066             instead of just the iframe elements.
2067         (WebCore::Document::webkitWillEnterFullScreenForElement): Ditto.
2068         * dom/Element.cpp:
2069         (WebCore::Element::willRemove): Reset our parent's containsFullScreenElement property.
2070         (WebCore::Element::insertedIntoTree): Ditto.
2071         (WebCore::Element::containsFullScreenElement): Moved here from HTMLElementBase.
2072         (WebCore::Element::setContainsFullScreenElement): Ditto.
2073         * dom/Element.h:
2074         * dom/ElementRareData.h:
2075         (WebCore::ElementRareData::ElementRareData): Added ivar and initializer for 
2076             m_containsFullScreenElement.
2077         * html/HTMLFrameElementBase.cpp:
2078         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed ivar and initializer.
2079         (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Moved into Element.
2080         * html/HTMLFrameElementBase.h:
2081         * rendering/style/RenderStyleConstants.h:
2082
2083 2011-05-29  Dan Bernstein  <mitz@apple.com>
2084
2085         Reviewed by Darin Adler.
2086
2087         <rdar://problem/9515650> 30 second rewind button obscured in fullscreen controller when video uses custom inline controls
2088         https://bugs.webkit.org/show_bug.cgi?id=61714
2089
2090         * dom/Document.cpp:
2091         (WebCore::Document::webkitDidEnterFullScreenForElement): Call didBecomeFullscreenElement() on the
2092         new full screen element.
2093         (WebCore::Document::webkitWillExitFullScreenForElement): Call willStopBeingFullscreenElement() on
2094         the full screen element.
2095         * dom/Element.h:
2096         (WebCore::Element::didBecomeFullscreenElement): Added with a default implementation that does nothing.
2097         (WebCore::Element::willStopBeingFullscreenElement): Ditto.
2098         * html/HTMLMediaElement.cpp:
2099         (WebCore::HTMLMediaElement::didBecomeFullscreenElement): Added this override, which calls
2100         MediaControls::enteredFullscreen().
2101         (WebCore::HTMLMediaElement::willStopBeingFullscreenElement): Added this override, which calls
2102         MediaControls::exitedFullscreen().
2103         * html/HTMLMediaElement.h:
2104         * html/shadow/MediaControlElements.cpp:
2105         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Removed calls to
2106         enteredFullscreen() and exitedFullscreen() from here, since they are now called in response to
2107         changes to the fullscreen-ness of the element.
2108
2109 2011-05-29  Darin Adler  <darin@apple.com>
2110
2111         Reviewed by Kevin Decker.
2112
2113         REGRESSION (r87622): In media documents, clicking the full screen button and the play button pauses the video
2114         https://bugs.webkit.org/show_bug.cgi?id=61713
2115
2116         We need to come up with a way to regression-test these changes. Nothing at the moment.
2117
2118         The bug is that we removed calls to preventDefault, but we still do need to prevent
2119         default handling of this event.
2120
2121         * html/shadow/MediaControlElements.cpp:
2122         (WebCore::MediaControlElement::preDispatchEventHandler): Add back the preventDefault
2123         that was in here before r87622 as well as the stopPropagation that was added in r87622.
2124         (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
2125         (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
2126         (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
2127         (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
2128         (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
2129         (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
2130         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
2131         (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
2132         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
2133
2134 2011-05-29  Andreas Kling  <kling@webkit.org>
2135
2136         Reviewed by Kenneth Rohde Christiansen.
2137
2138         Element: Micro-cleanup of scroll methods.
2139         https://bugs.webkit.org/show_bug.cgi?id=61705
2140
2141         Do an early return without calculating element boundaries when asked
2142         to scroll an element without a renderer().
2143
2144         * dom/Element.cpp:
2145         (WebCore::Element::scrollIntoView):
2146         (WebCore::Element::scrollIntoViewIfNeeded):
2147         (WebCore::Element::scrollByUnits):
2148
2149 2011-05-29  Darin Adler  <darin@apple.com>
2150
2151         Reviewed by Dan Bernstein.
2152
2153         Fix assertion seen when entering full screen mode for standalone video
2154         https://bugs.webkit.org/show_bug.cgi?id=61708
2155
2156         We don't currently have a way to make a regression test for this.
2157
2158         * dom/Document.cpp:
2159         (WebCore::Document::setAnimatingFullScreen): Call scheduleForcedStyleRecalc,
2160         because scheduleStyleRecalc is intended to only be called when the style
2161         system itself detects recalc is needed.
2162
2163 2011-05-27  Andreas Kling  <kling@webkit.org>
2164
2165         Reviewed by James Robinson.
2166
2167         [Qt] Add area check to ImageBufferData::getImageData()
2168         https://bugs.webkit.org/show_bug.cgi?id=61375
2169
2170         No change in behavior, just a sanity check.
2171
2172         * platform/graphics/qt/ImageBufferQt.cpp:
2173         (WebCore::getImageData):
2174
2175 2011-05-29  Beth Dakin  <bdakin@apple.com>
2176
2177         Reviewed by Darin Adler.
2178
2179         https://bugs.webkit.org/show_bug.cgi?id=61700
2180         Need WebKit2 API to get the size of the render tree
2181         -and corresponding-
2182         <rdar://problem/9512733>
2183
2184         New member variable on RenderArena keeps track of the current amount of memory 
2185         allocated in the arena. The new client function sends this piece of data to 
2186         WebKit.
2187         * page/ChromeClient.h:
2188         (WebCore::ChromeClient::setRenderTreeSize):
2189         * page/FrameView.cpp:
2190         (WebCore::FrameView::performPostLayoutTasks):
2191         * rendering/RenderArena.cpp:
2192         (WebCore::RenderArena::RenderArena):
2193         (WebCore::RenderArena::allocate):
2194         (WebCore::RenderArena::free):
2195         * rendering/RenderArena.h:
2196         (WebCore::RenderArena::totalRenderArenaSize):
2197
2198 2011-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2199
2200         Unreviewed, rolling out r87566.
2201         http://trac.webkit.org/changeset/87566
2202         https://bugs.webkit.org/show_bug.cgi?id=61702
2203
2204         It made all tests assert on Qt in debug mode (Requested by
2205         Ossy_weekend on #webkit).
2206
2207         * WebCore.exp.in:
2208         * bindings/ScriptControllerBase.cpp:
2209         (WebCore::ScriptController::executeIfJavaScriptURL):
2210         * dom/Document.cpp:
2211         (WebCore::Document::Document):
2212         (WebCore::Document::suggestedMIMEType):
2213         (WebCore::Document::lastModified):
2214         (WebCore::Document::initSecurityContext):
2215         (WebCore::Document::updateURLForPushOrReplaceState):
2216         * dom/Document.h:
2217         (WebCore::Document::setDocumentLoader):
2218         (WebCore::Document::loader):
2219         * html/MediaDocument.cpp:
2220         (WebCore::MediaDocument::replaceMediaElementTimerFired):
2221         * html/PluginDocument.cpp:
2222         (WebCore::PluginDocumentParser::createDocumentStructure):
2223         * platform/mac/HTMLConverter.mm:
2224         (fileWrapperForElement):
2225
2226 2011-05-28  Steve Falkenburg  <sfalken@apple.com>
2227
2228         Reviewed by Dan Bernstein.
2229
2230         Don't add sub-frames to global history when navigating via back/forward
2231         https://bugs.webkit.org/show_bug.cgi?id=61701
2232         <rdar://problem/9521222>
2233
2234         Instead of just checking whether the load is the first in the frame, we also need to
2235         check to make sure we're loading in the main frame.
2236
2237         Not testable due to lack of global history infrastructure in DRT.
2238
2239         * loader/FrameLoader.cpp:
2240         (WebCore::FrameLoader::transitionToCommitted):
2241
2242 2011-05-28  Alexey Proskuryakov  <ap@apple.com>
2243
2244         Suggested by Simon Fraser.
2245
2246         REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
2247         https://bugs.webkit.org/show_bug.cgi?id=61692
2248         <rdar://problem/9488628>
2249
2250         * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): There was no need to use
2251         ASSERT_UNUSED here.
2252
2253 2011-05-28  Alexey Proskuryakov  <ap@apple.com>
2254
2255         Reviewed by Geoff Garen.
2256
2257         REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL
2258         https://bugs.webkit.org/show_bug.cgi?id=61692
2259         <rdar://problem/9488628>
2260
2261         Test: fast/dom/gc-image-element-2.html
2262
2263         Manually verified that tests from bug 59604 and from bug 40926 still pass.
2264
2265         The problem here was that HTMLImageElement::hasPendingActivity() could return false when
2266         a load (or error) event was still expected to fire.
2267
2268         * loader/cache/CachedResource.cpp:
2269         (WebCore::CachedResource::setRequest):
2270         * loader/cache/CachedResource.h:
2271         (WebCore::CachedResource::wasCanceled):
2272         (WebCore::CachedResource::errorOccurred):
2273         Track whether the load was canceled. We want to always notify clients of load outcome,
2274         as that's the only way they could make intelligent decisions.
2275
2276         * dom/ScriptElement.cpp: (WebCore::ScriptElement::execute): Cached resource clients now
2277         get a notifyFinished call on cancellation. Handle this case, where we don't need the
2278         execute the script, but also don't need to fire an error event.
2279
2280         * html/HTMLImageElement.cpp: Moved hasPendingActivity() to header, since it's just a single
2281         function call now.
2282
2283         * html/HTMLImageElement.h: (WebCore::HTMLImageElement::hasPendingActivity): There is a large
2284         window between when CachedResource::isLoading() becomes false and events are queued.
2285         ImageLoader::haveFiredLoadEvent() is a much better indication of whether we are expecting
2286         an event to fire.
2287
2288         * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::onloadTimerFired): Again, don't do
2289         anything on cancellation.
2290
2291         * loader/ImageLoader.cpp:
2292         (WebCore::ImageEventSender::hasPendingEvents): Made it debug-only again, and fixed to
2293         give an accurate result while looping over the list of events to dispatch.
2294         (WebCore::ImageLoader::notifyFinished): Don't do anything when cancelled. We don't want to
2295         switch to a broken image icon, or to dispatch events.
2296         (WebCore::ImageEventSender::dispatchPendingEvents): Clear the current loader from dispatching
2297         list, as the event is no longer pending when it's being dispatched.
2298
2299         * loader/ImageLoader.h: Removed unnecessary hasPendingLoadEvent(). We don't care whether one
2300         is already pending, we only care if one is expected at some time in the future, and
2301         !haveFiredLoadEvent() is our best idea of that.
2302
2303         * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::notifyFinished): Another place to
2304         handle cancellation.
2305
2306 2011-05-28  Adam Barth  <abarth@webkit.org>
2307
2308         Reviewed by Alexey Proskuryakov.
2309
2310         Audit all uses of KURL::prettyURL
2311         https://bugs.webkit.org/show_bug.cgi?id=61201
2312
2313         As far as I can tell, all the callers of this API are confused.  There
2314         seems to be a cargo cult of using the "pretty" version of a URL, but in
2315         reality folks just want the URL itself.  The only case I'm unsure about
2316         is location.href, which could have some compatibility constraints.
2317         I've renamed prettyURL to deprecatedString to discourage folks from
2318         further cargo-culting.
2319
2320         * WebCore.exp.in:
2321         * page/Location.cpp:
2322         (WebCore::Location::href):
2323         (WebCore::Location::toString):
2324         * platform/KURL.cpp:
2325         (WebCore::KURL::deprecatedString):
2326         * platform/KURL.h:
2327         * platform/KURLGoogle.cpp:
2328         (WebCore::KURL::deprecatedString):
2329         * platform/network/soup/ResourceHandleSoup.cpp:
2330         (WebCore::ResourceHandle::prepareForURL):
2331         * workers/WorkerLocation.cpp:
2332         (WebCore::WorkerLocation::href):
2333         (WebCore::WorkerLocation::toString):
2334
2335 2011-05-28  Jer Noble  <jer.noble@apple.com>
2336
2337         Reviewed by Maciej Stachowiak.
2338
2339         Mouse clicks propagate outside full-screen media controls.
2340         https://bugs.webkit.org/show_bug.cgi?id=61689
2341
2342         Mouse click events are propagating out of the media controls, so mouse click
2343         listeners registered on the video element are getting fired when the user
2344         clicks on media controller buttons.  By default, block propagation of click 
2345         events from MediaControlElements by overriding preDispatchEventHandler, and
2346         convert all instances of defaultEventHandler -> preDispatchEventHandler.  Change
2347         all calls of event->setDefaultHandled() to event->stopPropagation().
2348
2349         * html/shadow/MediaControlElements.cpp:
2350         (WebCore::MediaControlElement::preDispatchEventHandler): Added.  Block 
2351             propagation of all mouse click events.
2352         (WebCore::MediaControlVolumeSliderContainerElement::preDispatchEventHandler):
2353             Renamed from setDefaultHandled.
2354         (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
2355         (WebCore::MediaControlPanelMuteButtonElement::preDispatchEventHandler): Ditto.
2356         (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
2357         (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
2358         (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
2359         (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
2360         (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
2361         (WebCore::MediaControlTimelineElement::preDispatchEventHandler): Ditto.
2362         (WebCore::MediaControlVolumeSliderElement::preDispatchEventHandler): Ditto.
2363         (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
2364         (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
2365         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
2366         * html/shadow/MediaControlElements.h:
2367
2368 2011-05-28  Gavin Peters  <gavinp@chromium.org>
2369
2370         Reviewed by Adam Barth.
2371
2372         prevent HTMLLinkElement from watching multiple CachedResources
2373         https://bugs.webkit.org/show_bug.cgi?id=61686
2374
2375         If we modify an existing link element, stop listening to the previous
2376         cached resource, to prevent double notifications (which crash).
2377
2378         Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
2379
2380         * html/HTMLLinkElement.cpp:
2381         (WebCore::HTMLLinkElement::process):
2382
2383 2011-05-28  Tonis Tiigi  <tonistiigi@gmail.com>
2384
2385         Reviewed by Pavel Feldman.
2386
2387         Web Inspector: there is a problem with computed style properties with wrong values
2388         https://bugs.webkit.org/show_bug.cgi?id=60535
2389
2390         * inspector/front-end/StylesSidebarPane.js:
2391         (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
2392         (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
2393
2394 2011-05-26  Antonio Gomes  <agomes@rim.com>
2395
2396         Reviewed by Andreas Kling.
2397
2398         Logic error in WebCore/Page/SpatialNavigation.cpp::areRectsPartiallyAligned
2399         https://bugs.webkit.org/show_bug.cgi?id=61606
2400
2401         Removed duplicated statement within if condition.
2402
2403         No new tests. Obvious clean up patch.
2404
2405         * page/SpatialNavigation.cpp:
2406         (WebCore::areRectsPartiallyAligned):
2407
2408 2011-05-27  Simon Fraser  <simon.fraser@apple.com>
2409
2410         Reviewed by Dan Bernstein.
2411
2412         CG BitmapImage needs to check for valid CGImage in a couple of places
2413         https://bugs.webkit.org/show_bug.cgi?id=61684
2414         <rdar://problem/9519348>
2415
2416         BitmapImage::getCGImageArray() can throw an exception if frameAtIndex()
2417         returns null, which it may do if the image is corrupted or still
2418         loading. Protect against that here and in getFirstCGImageRefOfSize().
2419
2420         * platform/graphics/cg/ImageCG.cpp:
2421         (WebCore::BitmapImage::getFirstCGImageRefOfSize):
2422         (WebCore::BitmapImage::getCGImageArray):
2423
2424 2011-05-27  Jochen Eisinger  <jochen@chromium.org>
2425
2426         Reviewed by Adam Barth.
2427
2428         Add Frame parameter to all StorageArea methods. The chromium
2429         embedder uses the Frame as context to decide whether or not
2430         to allow usage of the storage API.
2431         https://bugs.webkit.org/show_bug.cgi?id=61581
2432
2433         Test: platform/chromium/permissionclient/storage-permission.html
2434
2435         * storage/Storage.cpp:
2436         (WebCore::Storage::length):
2437         (WebCore::Storage::key):
2438         (WebCore::Storage::getItem):
2439         (WebCore::Storage::contains):
2440         * storage/StorageArea.h:
2441         * storage/StorageAreaImpl.cpp:
2442         (WebCore::StorageAreaImpl::length):
2443         (WebCore::StorageAreaImpl::key):
2444         (WebCore::StorageAreaImpl::getItem):
2445         (WebCore::StorageAreaImpl::contains):
2446         * storage/StorageAreaImpl.h:
2447
2448 2011-05-27  Nate Chapin  <japhet@chromium.org>
2449
2450         Reviewed by Jian Li.
2451
2452         Keep a reference to BlobResourceHandle before calling doNotifyFinish()
2453         asynchronously to ensure it's still safe in the main thread.
2454
2455         https://bugs.webkit.org/show_bug.cgi?id=61669
2456
2457         I triggered this crash in fast/files/file-reader-abort.html during a
2458         refactor that changed timings slightly.
2459
2460         * platform/network/BlobResourceHandle.cpp:
2461         (WebCore::doNotifyFinish):
2462         (WebCore::BlobResourceHandle::notifyFinish):
2463         * platform/network/BlobResourceHandle.h:
2464         (WebCore::BlobResourceHandle::aborted):
2465
2466 2011-05-27  Stephanie Lewis  <slewis@apple.com>
2467
2468         Unreviewed.
2469
2470         Fix a typo in the order_file flag.
2471
2472         * Configurations/Base.xcconfig:
2473
2474 2011-05-27  Anders Carlsson  <andersca@apple.com>
2475
2476         Reviewed by Sam Weinig.
2477
2478         Always use the default localization strategy
2479         https://bugs.webkit.org/show_bug.cgi?id=61670
2480         <rdar://problem/9516130>
2481
2482         Always use the default localization strategy when there's no platform strategy.
2483
2484         * platform/DefaultLocalizationStrategy.cpp:
2485         (WebCore::DefaultLocalizationStrategy::shared):
2486         * platform/DefaultLocalizationStrategy.h:
2487         * platform/LocalizedStrings.cpp:
2488         (WebCore::inputElementAltText):
2489         (WebCore::resetButtonDefaultLabel):
2490         (WebCore::searchableIndexIntroduction):
2491         (WebCore::submitButtonDefaultLabel):
2492         (WebCore::fileButtonChooseFileLabel):
2493         (WebCore::fileButtonNoFileSelectedLabel):
2494         (WebCore::defaultDetailsSummaryText):
2495         (WebCore::copyImageUnknownFileLabel):
2496         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
2497         (WebCore::contextMenuItemTagDownloadLinkToDisk):
2498         (WebCore::contextMenuItemTagCopyLinkToClipboard):
2499         (WebCore::contextMenuItemTagOpenImageInNewWindow):
2500         (WebCore::contextMenuItemTagDownloadImageToDisk):
2501         (WebCore::contextMenuItemTagCopyImageToClipboard):
2502         (WebCore::contextMenuItemTagCopyImageUrlToClipboard):
2503         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
2504         (WebCore::contextMenuItemTagCopy):
2505         (WebCore::contextMenuItemTagGoBack):
2506         (WebCore::contextMenuItemTagGoForward):
2507         (WebCore::contextMenuItemTagStop):
2508         (WebCore::contextMenuItemTagReload):
2509         (WebCore::contextMenuItemTagCut):
2510         (WebCore::contextMenuItemTagPaste):
2511         (WebCore::contextMenuItemTagSelectAll):
2512         (WebCore::contextMenuItemTagNoGuessesFound):
2513         (WebCore::contextMenuItemTagIgnoreSpelling):
2514         (WebCore::contextMenuItemTagLearnSpelling):
2515         (WebCore::contextMenuItemTagSearchInSpotlight):
2516         (WebCore::contextMenuItemTagSearchWeb):
2517         (WebCore::contextMenuItemTagLookUpInDictionary):
2518         (WebCore::contextMenuItemTagOpenLink):
2519         (WebCore::contextMenuItemTagIgnoreGrammar):
2520         (WebCore::contextMenuItemTagSpellingMenu):
2521         (WebCore::contextMenuItemTagShowSpellingPanel):
2522         (WebCore::contextMenuItemTagCheckSpelling):
2523         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
2524         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
2525         (WebCore::contextMenuItemTagFontMenu):
2526         (WebCore::contextMenuItemTagShowFonts):
2527         (WebCore::contextMenuItemTagBold):
2528         (WebCore::contextMenuItemTagItalic):
2529         (WebCore::contextMenuItemTagUnderline):
2530         (WebCore::contextMenuItemTagOutline):
2531         (WebCore::contextMenuItemTagStyles):
2532         (WebCore::contextMenuItemTagShowColors):
2533         (WebCore::contextMenuItemTagSpeechMenu):
2534         (WebCore::contextMenuItemTagStartSpeaking):
2535         (WebCore::contextMenuItemTagStopSpeaking):
2536         (WebCore::contextMenuItemTagWritingDirectionMenu):
2537         (WebCore::contextMenuItemTagTextDirectionMenu):
2538         (WebCore::contextMenuItemTagDefaultDirection):
2539         (WebCore::contextMenuItemTagLeftToRight):
2540         (WebCore::contextMenuItemTagRightToLeft):
2541         (WebCore::contextMenuItemTagCorrectSpellingAutomatically):
2542         (WebCore::contextMenuItemTagSubstitutionsMenu):
2543         (WebCore::contextMenuItemTagShowSubstitutions):
2544         (WebCore::contextMenuItemTagSmartCopyPaste):
2545         (WebCore::contextMenuItemTagSmartQuotes):
2546         (WebCore::contextMenuItemTagSmartDashes):
2547         (WebCore::contextMenuItemTagSmartLinks):
2548         (WebCore::contextMenuItemTagTextReplacement):
2549         (WebCore::contextMenuItemTagTransformationsMenu):
2550         (WebCore::contextMenuItemTagMakeUpperCase):
2551         (WebCore::contextMenuItemTagMakeLowerCase):
2552         (WebCore::contextMenuItemTagCapitalize):
2553         (WebCore::contextMenuItemTagChangeBack):
2554         (WebCore::contextMenuItemTagOpenVideoInNewWindow):
2555         (WebCore::contextMenuItemTagOpenAudioInNewWindow):
2556         (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
2557         (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
2558         (WebCore::contextMenuItemTagToggleMediaControls):
2559         (WebCore::contextMenuItemTagToggleMediaLoop):
2560         (WebCore::contextMenuItemTagEnterVideoFullscreen):
2561         (WebCore::contextMenuItemTagMediaPlay):
2562         (WebCore::contextMenuItemTagMediaPause):
2563         (WebCore::contextMenuItemTagMediaMute):
2564         (WebCore::contextMenuItemTagInspectElement):
2565         (WebCore::searchMenuNoRecentSearchesText):
2566         (WebCore::searchMenuRecentSearchesText):
2567         (WebCore::searchMenuClearRecentSearchesText):
2568         (WebCore::AXWebAreaText):
2569         (WebCore::AXLinkText):
2570         (WebCore::AXListMarkerText):
2571         (WebCore::AXImageMapText):
2572         (WebCore::AXHeadingText):
2573         (WebCore::AXDefinitionListTermText):
2574         (WebCore::AXDefinitionListDefinitionText):
2575         (WebCore::AXARIAContentGroupText):
2576         (WebCore::AXButtonActionVerb):
2577         (WebCore::AXRadioButtonActionVerb):
2578         (WebCore::AXTextFieldActionVerb):
2579         (WebCore::AXCheckedCheckBoxActionVerb):
2580         (WebCore::AXUncheckedCheckBoxActionVerb):
2581         (WebCore::AXLinkActionVerb):
2582         (WebCore::AXMenuListPopupActionVerb):
2583         (WebCore::AXMenuListActionVerb):
2584         (WebCore::missingPluginText):
2585         (WebCore::crashedPluginText):
2586         (WebCore::multipleFileUploadText):
2587         (WebCore::unknownFileSizeText):
2588         (WebCore::uploadFileText):
2589         (WebCore::allFilesText):
2590         (WebCore::keygenMenuItem512):
2591         (WebCore::keygenMenuItem1024):
2592         (WebCore::keygenMenuItem2048):
2593         (WebCore::keygenKeychainItemName):
2594         (WebCore::imageTitle):
2595         (WebCore::mediaElementLoadingStateText):
2596         (WebCore::mediaElementLiveBroadcastStateText):
2597         (WebCore::localizedMediaControlElementString):
2598         (WebCore::localizedMediaControlElementHelpText):
2599         (WebCore::localizedMediaTimeDescription):
2600         (WebCore::validationMessageValueMissingText):
2601         (WebCore::validationMessageValueMissingForCheckboxText):
2602         (WebCore::validationMessageValueMissingForFileText):
2603         (WebCore::validationMessageValueMissingForMultipleFileText):
2604         (WebCore::validationMessageValueMissingForRadioText):
2605         (WebCore::validationMessageValueMissingForSelectText):
2606         (WebCore::validationMessageTypeMismatchText):
2607         (WebCore::validationMessageTypeMismatchForEmailText):
2608         (WebCore::validationMessageTypeMismatchForMultipleEmailText):
2609         (WebCore::validationMessageTypeMismatchForURLText):
2610         (WebCore::validationMessagePatternMismatchText):
2611         (WebCore::validationMessageTooLongText):
2612         (WebCore::validationMessageRangeUnderflowText):
2613         (WebCore::validationMessageRangeOverflowText):
2614         (WebCore::validationMessageStepMismatchText):
2615
2616 2011-05-27  Brady Eidson  <beidson@apple.com>
2617
2618         Reviewed by Darin Adler.
2619
2620         First swipe at resolving <rdar://problem/9125145> and https://bugs.webkit.org/show_bug.cgi?id=61494
2621         
2622         Make the Document be intelligent about returning its DocumentLoader, including the possibility that
2623         the DocumentLoader will be null.
2624
2625         No new tests. No change in behavior.
2626
2627         Instead of storing the DocumentLoader at construction and never changing it,
2628         always calculate it based on the FrameLoader's current DocumentLoader:
2629         * dom/Document.cpp:
2630         (WebCore::Document::Document):
2631         (WebCore::Document::suggestedMIMEType):
2632         (WebCore::Document::lastModified):
2633         (WebCore::Document::initSecurityContext):
2634         (WebCore::Document::updateURLForPushOrReplaceState):
2635         (WebCore::Document::loader):
2636         * dom/Document.h:
2637
2638         Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario:
2639         * bindings/ScriptControllerBase.cpp:
2640         (WebCore::ScriptController::executeIfJavaScriptURL):
2641         * html/MediaDocument.cpp:
2642         (WebCore::MediaDocument::replaceMediaElementTimerFired):
2643         * html/PluginDocument.cpp:
2644         (WebCore::PluginDocumentParser::createDocumentStructure):
2645         * platform/mac/HTMLConverter.mm:
2646         (fileWrapperForElement):
2647
2648         * WebCore.exp.in:
2649
2650 2011-05-27  Jer Noble  <jer.noble@apple.com>
2651
2652         Reviewed by Maciej Stachowiak.
2653
2654         30 second rewind button obscured in fullscreen controller
2655         https://bugs.webkit.org/show_bug.cgi?id=61663
2656
2657         If reset() is called while in full-screen mode, make sure to show and hide
2658         the correct controls for that mode.
2659
2660         * html/shadow/MediaControlRootElement.cpp:
2661         (WebCore::MediaControlRootElement::reset):
2662
2663 2011-05-27  James Robinson  <jamesr@chromium.org>
2664
2665         Reviewed by Simon Fraser.
2666
2667         GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree
2668         https://bugs.webkit.org/show_bug.cgi?id=61590
2669
2670         Adds overflow control layers to the compositor tree for layers without clipping layers regardless of whether the
2671         backing is parented.  This ensures that the scroll corner layer for an iframe without a clipping layer ends up
2672         in the final layer tree.  We don't currently render resizers for iframes, but we will soon and this keeps the
2673         graphics layer tree consistent.
2674
2675         Test: compositing/iframes/resizer.html
2676
2677         * rendering/RenderLayerCompositor.cpp:
2678         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2679
2680 2011-05-27  Adam Barth  <abarth@webkit.org>
2681
2682         Reviewed by Eric Seidel.
2683
2684         HTMLVideoElement::currentSrc() should return a KURL
2685         https://bugs.webkit.org/show_bug.cgi?id=61578
2686
2687         I suspect we got into this mess because the author of this code didn't
2688         know about the URL attribute in WebKit IDL, which is super useful!
2689
2690         Bad news: The line of code in question seems to have another bug, which
2691         I've documented in a FIXME.  Let the yak shaving continue!
2692
2693         * html/HTMLMediaElement.cpp:
2694         (WebCore::urlForLogging):
2695         (WebCore::HTMLMediaElement::loadResource):
2696         (WebCore::HTMLMediaElement::isSafeToLoadURL):
2697         (WebCore::HTMLMediaElement::selectNextSourceChild):
2698         (WebCore::HTMLMediaElement::getPluginProxyParams):
2699         * html/HTMLMediaElement.h:
2700         (WebCore::HTMLMediaElement::currentSrc):
2701         (WebCore::HTMLMediaElement::currentURL):
2702         * html/canvas/CanvasRenderingContext.cpp:
2703         (WebCore::CanvasRenderingContext::checkOrigin):
2704         * rendering/HitTestResult.cpp:
2705         (WebCore::HitTestResult::absoluteMediaURL):
2706             - This complete URL call was unnecessary because currentSrc is
2707               already absolute.
2708
2709 2011-05-27  Mikhail Naganov  <mnaganov@chromium.org>
2710
2711         Reviewed by Pavel Feldman.
2712
2713         Web Inspector: [Chromium] Add support for showing URL of DOMWindow in heap profiles.
2714         https://bugs.webkit.org/show_bug.cgi?id=61177
2715
2716         * inspector/front-end/HeapSnapshot.js:
2717         (WebInspector.HeapSnapshotNode.prototype.get className):
2718
2719 2011-05-27  Nikolas Zimmermann  <nzimmermann@rim.com>
2720
2721         Rubber-stamped by Rob Buis.
2722
2723         embedded SVG object doesn't scale right
2724         https://bugs.webkit.org/show_bug.cgi?id=10526
2725
2726         Fixes crash in svg/custom/immutable-properties.html, seen on the bots.
2727
2728         * svg/SVGLength.cpp:
2729         (WebCore::SVGLength::determineViewport): Oops forgot to merge-in a null check before landing.
2730
2731 2011-05-27  Nikolas Zimmermann  <nzimmermann@rim.com>
2732
2733         Reviewed by Rob Buis.
2734
2735         embedded SVG object doesn't scale right
2736         https://bugs.webkit.org/show_bug.cgi?id=10526
2737
2738         <object> tags should treat width/height on a referenced SVG as intrinsic width/height
2739         https://bugs.webkit.org/show_bug.cgi?id=11976
2740
2741         Incorrect handling of percentage values for width/height on embedded elements
2742         https://bugs.webkit.org/show_bug.cgi?id=14793
2743
2744         WebKit fails some WICD 1.0 core test cases
2745         https://bugs.webkit.org/show_bug.cgi?id=15836 (partially fixed, all 'rightsizing' tests are fixed)
2746
2747         CSS 2.1: Support replaced elements with relative intrinsic sizes
2748         https://bugs.webkit.org/show_bug.cgai?id=15849 (partially fixed)
2749
2750         SVG embedded as <object> doesn't respect width/height attributes
2751         https://bugs.webkit.org/show_bug.cgi?id=34972
2752
2753         Explicit size of object tag ignored
2754         https://bugs.webkit.org/show_bug.cgi?id=37086
2755
2756         Add partial support of CSS 2.1 replaced elements with intrinsic size. The feature itself is complete but has only
2757         been implemented for RenderPart, to support SVG content document size negotiation. It serves as starting point for a generalization, in future.
2758         The changes in RenderPart are a 1:1 transliteration of the spec (http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width/height, see code).
2759
2760         SVG 1.1 says:
2761         The 'width' attribute on the outermost svg element establishes the viewport's width, unless the following conditions are met:
2762         ...
2763         and there are CSS-compatible positioning properties ([CSS2], section 9.3) specified on the referencing element (e.g., the 'object' element)
2764         or on the containing document's outermost svg element that are sufficient to establish the width of the viewport. Under these conditions,
2765         the positioning properties establish the viewport's width.
2766
2767         If an <object> carries width/height attributes, these specify the viewport size of the embedded SVG, instead of its own
2768         width/height or viewBox properties. If an <object> has no width/height information, its intrinsic size needs to be calculated depending
2769         on the intrinsic ratio (viewBox width divided by height ratio) and the width/height properties on the outermost referenced <svg> element.
2770         This requires a negotiation between the host document and the embedded document.
2771         (There are several more factors that need to be considered, the CSS spec covers this and the RenderPart::computeReplaced* code covers this.)
2772
2773         Fixes dozens of long-standing bug reports. The number one integration issue when using SVG through <object> is resolved: "right sizing".
2774
2775         Tests: http/tests/misc/object-embedding-svg-delayed-size-negotiation.xhtml
2776                svg/custom/object-no-size-attributes.xhtml (bug 11976, from Eric Seidel)
2777                svg/custom/object-sizing-explicit-height.xhtml (bug 10526, from Ryan Cannon)
2778                svg/custom/object-sizing-explicit-width-height.xhtml
2779                svg/custom/object-sizing-explicit-width.xhtml (bug 14793, from Oliver Hunt)
2780                svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml
2781                svg/custom/object-sizing-no-width-height.xhtml
2782                svg/custom/object-sizing.xhtml (bug 37086, from Jeff Schiller)
2783                svg/wicd/rightsizing-grid.xhtml (bug 15836, WICD rightsizing test now works)
2784                svg/wicd/test-rightsizing-a.xhtml (ditto)
2785                svg/wicd/test-rightsizing-b.xhtml (ditto)
2786                svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml
2787                svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml
2788                svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml
2789                svg/zoom/page/zoom-svg-through-object-with-override-size.html (bug 34972, from Andreas Kling)
2790                svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml
2791                svg/zoom/page/zoom-svg-through-object-with-text.xhtml
2792
2793         * platform/Length.h:
2794         (WebCore::Length::isSpecified):
2795         * rendering/RenderPart.cpp:
2796         (WebCore::RenderPart::embeddedSVGContentRenderer):
2797         (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth):
2798         (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight):
2799         (WebCore::RenderPart::computeReplacedLogicalWidth):
2800         (WebCore::RenderPart::computeReplacedLogicalHeight):
2801         (WebCore::RenderPart::layout):
2802         * rendering/RenderPart.h:
2803         * rendering/RenderReplaced.cpp:
2804         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2805         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2806         * rendering/svg/RenderSVGRoot.cpp:
2807         (WebCore::RenderSVGRoot::RenderSVGRoot):
2808         (WebCore::RenderSVGRoot::computeIntrinsicRatio):
2809         (WebCore::RenderSVGRoot::computeIntrinsicWidth):
2810         (WebCore::RenderSVGRoot::computeIntrinsicHeight):
2811         (WebCore::RenderSVGRoot::negotiateSizeWithHostDocumentIfNeeded):
2812         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2813         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2814         (WebCore::RenderSVGRoot::layout):
2815         * rendering/svg/RenderSVGRoot.h:
2816         * svg/SVGLength.cpp:
2817         (WebCore::SVGLength::determineViewport):
2818         * svg/SVGSVGElement.cpp:
2819         (WebCore::SVGSVGElement::currentScale):
2820         (WebCore::SVGSVGElement::setCurrentScale):
2821         (WebCore::SVGSVGElement::currentViewBoxRect):
2822         (WebCore::SVGSVGElement::viewBoxToViewTransform):
2823         * svg/SVGSVGElement.h:
2824
2825 2011-05-27  Michael Saboff  <msaboff@apple.com>
2826
2827         Reviewed by David Hyatt.
2828
2829         https://bugs.webkit.org/show_bug.cgi?id=61646
2830         Duplicate Fonts Put in Font Cache on Mac Due to Duplicate CGFontRefs for Same Font
2831
2832         Change the platformIsEqual to just compare the m_font members if
2833         either is not null.
2834
2835         No tests added - functionality unchanged, fixing memory abandonment.
2836
2837         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2838         (WebCore::FontPlatformData::platformIsEqual):
2839
2840 2011-05-25  Martin Robinson  <mrobinson@igalia.com>
2841
2842         Reviewed by Dirk Schulze.
2843
2844         [GTK][Cairo] Twitter rendering breaks
2845         https://bugs.webkit.org/show_bug.cgi?id=60917
2846
2847         When instantiating a cairo_scaled_font_t font would put the font in an error state,
2848         leave the m_scaledFont member of platform data as null. Rendering with scaled fonts
2849         in the error state can later lead to corrupted rendering.
2850
2851         Due to this change, we must always null check cairo_scaled_font_t and the platform
2852         data now carries the cairo_font_face_t object with it, so that it can be accessed later
2853         if there is no cairo_scaled_font_t.
2854
2855         Test: platform/gtk/fonts/zero-pixel-sized-fonts.html
2856
2857         * platform/graphics/cairo/FontCairo.cpp:
2858         (WebCore::Font::drawGlyphs): If the scaled font is null, do not render.
2859         * platform/graphics/freetype/FontPlatformData.h: Now include the cairo_font_face_t.
2860         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2861         (WebCore::FontPlatformData::FontPlatformData): Initialize the new member.
2862         (WebCore::FontPlatformData::operator=): Carry over the new member.
2863         (WebCore::FontPlatformData::operator==): Check equality with the new member.
2864         (WebCore::FontPlatformData::initializeWithFontFace): If the initialization of m_scaledFont
2865         put the font into an error state, then just free it and return.
2866         (WebCore::FontPlatformData::hasCompatibleCharmap): The font always has a compatible charmap
2867         when the scaled font is null, because rendering is always a no-op and the font data never
2868         needs to be read.
2869         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
2870         (WebCore::GlyphPage::fill): Don't read font data when the scaled font is null.
2871         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2872         (WebCore::SimpleFontData::platformInit): Return early when there's no scaled font.
2873         (WebCore::SimpleFontData::scaledFontData): Use the new m_font member.
2874         (WebCore::SimpleFontData::containsCharacters): Return early when there's no scaled font.
2875         (WebCore::SimpleFontData::platformWidthForGlyph): Ditto.
2876
2877 2011-05-27  David Levin  <levin@chromium.org>
2878
2879         Reviewed by Darin Fisher.
2880
2881         Need a callback for when the preferred rendered size may have changed.
2882         https://bugs.webkit.org/show_bug.cgi?id=61309
2883
2884         No new tests needed since no new functionality is exposed.
2885
2886         * page/Chrome.cpp:
2887         (WebCore::Chrome::layoutUpdated): Plumbed through the call.
2888         * page/Chrome.h: Added the new method.
2889         * page/ChromeClient.h:
2890         (WebCore::ChromeClient::layoutUpdated): Ditto.
2891         * page/FrameView.cpp:
2892         (WebCore::FrameView::layout): Added a callback for whem a layout has finished.
2893
2894 2011-05-27  Stephanie Lewis  <slewis@apple.com>
2895
2896         Rubber Stamped by Adam Roben.
2897
2898         Update Order Files.  Use -order_file flag since it can order more of the binary.
2899
2900         * Configurations/Base.xcconfig:
2901         * WebCore.order:
2902
2903 2011-05-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2904
2905         Unreviewed, rolling out r87464.
2906         http://trac.webkit.org/changeset/87464
2907         https://bugs.webkit.org/show_bug.cgi?id=61643
2908
2909         client-close/server-close tests are flaky on Chromium Mac and
2910         Windows (Requested by aklein on #webkit).
2911
2912         * platform/network/SocketStreamHandleBase.cpp:
2913         (WebCore::SocketStreamHandleBase::send):
2914         (WebCore::SocketStreamHandleBase::close):
2915         (WebCore::SocketStreamHandleBase::sendPendingData):
2916         * platform/network/SocketStreamHandleBase.h:
2917         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2918         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
2919         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
2920         * websockets/ThreadableWebSocketChannelClientWrapper.h:
2921         * websockets/WebSocket.cpp:
2922         (WebCore::WebSocket::send):
2923         (WebCore::WebSocket::close):
2924         (WebCore::WebSocket::bufferedAmount):
2925         (WebCore::WebSocket::didConnect):
2926         (WebCore::WebSocket::didReceiveMessage):
2927         (WebCore::WebSocket::didReceiveMessageError):
2928         (WebCore::WebSocket::didClose):
2929         * websockets/WebSocket.h:
2930         * websockets/WebSocketChannel.cpp:
2931         (WebCore::WebSocketChannel::WebSocketChannel):
2932         (WebCore::WebSocketChannel::close):
2933         (WebCore::WebSocketChannel::disconnect):
2934         (WebCore::WebSocketChannel::didClose):
2935         (WebCore::WebSocketChannel::didReceiveData):
2936         (WebCore::WebSocketChannel::didFail):
2937         (WebCore::WebSocketChannel::processBuffer):
2938         * websockets/WebSocketChannel.h:
2939         * websockets/WebSocketChannelClient.h:
2940         (WebCore::WebSocketChannelClient::didClose):
2941         * websockets/WorkerThreadableWebSocketChannel.cpp:
2942         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
2943         (WebCore::workerContextDidClose):
2944         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2945         * websockets/WorkerThreadableWebSocketChannel.h:
2946
2947 2011-05-27  Rob Buis  <rbuis@rim.com>
2948
2949         Reviewed by Nikolas Zimmermann.
2950
2951         https://bugs.webkit.org/show_bug.cgi?id=19995
2952         hixie.ch : anchor Link fails with fragment identifiers inside SVG fragments.
2953
2954         Only allow links to animation elements within the document.
2955
2956         Test: svg/hixie/links/003.xml
2957
2958         * svg/SVGAElement.cpp:
2959         (WebCore::SVGAElement::defaultEventHandler):
2960
2961 2011-05-27  Andreas Kling  <kling@webkit.org>
2962
2963         Reviewed by Benjamin Poulain.
2964
2965         Update RGBA color serialization to match HTML5.
2966         https://bugs.webkit.org/show_bug.cgi?id=61449
2967
2968         HTML5 now specifies that fully transparent colors should have their alpha value
2969         serialized to "0" rather than "0.0" (followed by any number of extra zeroes.)
2970
2971         The number of decimals for alpha values between 0 and 1 is not specified,
2972         so match Gecko and Presto by returning the lowest number of decimals needed
2973         to represent the number. (No more trailing zeroes.)
2974
2975         * platform/graphics/Color.cpp:
2976         (WebCore::Color::serialized):
2977
2978 2011-05-27  Hans Wennborg  <hans@chromium.org>
2979
2980         Reviewed by Tony Gentilcore.
2981
2982         IndexedDB: Support mutating cursors on top of LevelDB
2983         https://bugs.webkit.org/show_bug.cgi?id=61615
2984
2985         We need to support the case where a new node is added to the tree in a
2986         transaction after the TreeIterator has covered the whole tree.
2987
2988         Since this is done lazily, i.e. we set a flag that the tree might have
2989         changed, and act upon it later, some members need to be mutable,
2990         because we might need to re-seek the tree iterator in a const function.
2991
2992         Test: storage/indexeddb/mutating-cursor.html
2993               storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html (existing)
2994
2995         * platform/leveldb/LevelDBTransaction.cpp:
2996         (WebCore::LevelDBTransaction::set):
2997         (WebCore::LevelDBTransaction::TreeIterator::reset):
2998         (WebCore::LevelDBTransaction::TreeIterator::~TreeIterator):
2999         (WebCore::LevelDBTransaction::TreeIterator::TreeIterator):
3000         (WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator):
3001         (WebCore::LevelDBTransaction::TransactionIterator::~TransactionIterator):
3002         (WebCore::LevelDBTransaction::TransactionIterator::next):
3003         (WebCore::LevelDBTransaction::TransactionIterator::prev):
3004         (WebCore::LevelDBTransaction::TransactionIterator::key):
3005         (WebCore::LevelDBTransaction::TransactionIterator::value):
3006         (WebCore::LevelDBTransaction::TransactionIterator::treeChanged):
3007         (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator):
3008         (WebCore::LevelDBTransaction::registerIterator):
3009         (WebCore::LevelDBTransaction::unregisterIterator):
3010         (WebCore::LevelDBTransaction::notifyIteratorsOfTreeChange):
3011         * platform/leveldb/LevelDBTransaction.h:
3012         * storage/IDBFactoryBackendImpl.cpp:
3013         (WebCore::IDBFactoryBackendImpl::open):
3014         * storage/IDBLevelDBBackingStore.cpp:
3015         (WebCore::IDBLevelDBBackingStore::open):
3016
3017 2011-05-27  Sujin Park  <sujjin.park@gmail.com>
3018
3019         Unreviewed, buildfix if --no-javascript-debugger.
3020
3021         Regression(R84125): Broke GTK build
3022         https://bugs.webkit.org/show_bug.cgi?id=60698
3023
3024         No new tests since this doesn't change any behavior.
3025
3026         * inspector/WorkerInspectorController.h:
3027
3028 2011-05-26  Yael Aharon  <yael.aharon@nokia.com>
3029
3030         Reviewed by Tony Chang.
3031
3032         webkit should implement the dropzone attribute
3033         https://bugs.webkit.org/show_bug.cgi?id=58210
3034
3035         Add support for dropzone attribute.
3036         http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute
3037         If a drag event was not canceled by JavaScript, look for an element with a dropzone attribute.
3038         If there is such an element, and it matches the drag data store, set the action defined by that
3039         element and continue processing the drag and drop operation.
3040
3041         Tests: fast/events/dropzone-001.html
3042                fast/events/dropzone-002.html
3043                fast/events/dropzone-003.html
3044                fast/events/dropzone-004.html
3045
3046         * dom/Clipboard.cpp:
3047         (WebCore::Clipboard::hasFileOfType):
3048         (WebCore::Clipboard::hasStringOfType):
3049         (WebCore::convertDropZoneOperationToDragOperation):
3050         (WebCore::convertDragOperationToDropZoneOperation):
3051         (WebCore::Clipboard::processDropZoneKeyword):
3052         * dom/Clipboard.h:
3053         * html/HTMLAttributeNames.in:
3054         * html/HTMLElement.idl:
3055         * page/EventHandler.cpp:
3056         (WebCore::EventHandler::findDropZone):
3057         (WebCore::EventHandler::updateDragAndDrop):
3058         * page/EventHandler.h:
3059
3060 2011-05-27  Patrick Gansterer  <paroga@webkit.org>
3061
3062         Unreviewed WinCE build fix for r87467.
3063
3064         * page/wince/FrameWinCE.cpp:
3065
3066 2011-05-26  Hans Wennborg  <hans@chromium.org>
3067
3068         Reviewed by Tony Gentilcore.
3069
3070         IndexedDB: Support NO_DUPLICATE cursors on LevelDB back-end
3071         https://bugs.webkit.org/show_bug.cgi?id=61517
3072
3073         Support cursors where the direction is set to NEXT_NO_DUPLICATE,
3074         or PREV_NO_DUPLICATE, as specified here:
3075         http://www.w3.org/TR/IndexedDB/#widl-IDBCursor-NEXT_NO_DUPLICATE
3076
3077         This is tested by storage/indexeddb/mozilla/indexes.html
3078
3079         * storage/IDBLevelDBBackingStore.cpp:
3080         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
3081         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
3082         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
3083
3084 2011-05-26  Hans Wennborg  <hans@chromium.org>
3085
3086         Reviewed by Tony Gentilcore.
3087
3088         LevelDB: turn on paranoid checks and verify checksums, log errors
3089         https://bugs.webkit.org/show_bug.cgi?id=61516
3090
3091         This allows for detection of corrupted databases.
3092         Even if we can't recover from a corrupted database, discovering the
3093         problem is a step in the right direction.
3094
3095         No new functionality, no new tests.
3096
3097         * platform/leveldb/LevelDBDatabase.cpp:
3098         (WebCore::LevelDBDatabase::open):
3099         (WebCore::LevelDBDatabase::put):
3100         (WebCore::LevelDBDatabase::remove):
3101         (WebCore::LevelDBDatabase::get):
3102         (WebCore::LevelDBDatabase::write):
3103         (WebCore::IteratorImpl::checkStatus):
3104         (WebCore::IteratorImpl::seekToLast):
3105         (WebCore::IteratorImpl::seek):
3106         (WebCore::IteratorImpl::next):
3107         (WebCore::IteratorImpl::prev):
3108         (WebCore::LevelDBDatabase::createIterator):
3109
3110 2011-05-27  James Robinson  <jamesr@chromium.org>
3111
3112         Reviewed by Adam Barth.
3113
3114         CachedResourceLoader stores data: urls in validated URL set
3115         https://bugs.webkit.org/show_bug.cgi?id=61604
3116
3117         CachedResourceLoader maintains a set of URLs that have been validated to avoid validating the same resource
3118         multiple times for loads within the same document.  This doesn't make sense for data: URLs and just wastes
3119         memory.
3120
3121         * loader/cache/CachedResourceLoader.cpp:
3122         (WebCore::CachedResourceLoader::revalidateResource):
3123         (WebCore::CachedResourceLoader::loadResource):
3124
3125 2011-05-23  MORITA Hajime  <morrita@google.com>
3126
3127         Reviewed by Tony Chang.
3128
3129         [Refactoring] DocumentMarker should be carried around as a pointer, not value.
3130         https://bugs.webkit.org/show_bug.cgi?id=61262
3131
3132         - Changed return value of markersInRange() from Vector<DocumentMarker> to Vector<DocumentMarker*>.
3133         - Introduced markersFor() that returns Vector<DocumentMarker*>
3134         - Removed DocumentMarkerController::setRenderedRectForMarker() which now can be replaced by
3135           RenderedDocumentMarker::setRenderedRect().
3136         - This change didn't remove markersForNode() beucase there is patches on review which depends
3137           markersForNode(). I'll remove its call after these patches are landed.
3138         
3139         No new tests. No behavior change.
3140
3141         * WebCore.exp.in:
3142         * dom/DocumentMarkerController.cpp:
3143         (WebCore::DocumentMarkerController::addTextMatchMarker):
3144         (WebCore::DocumentMarkerController::markersFor):
3145         (WebCore::DocumentMarkerController::markersInRange):
3146         (WebCore::DocumentMarkerController::hasMarkers):
3147         * dom/DocumentMarkerController.h:
3148         * dom/RenderedDocumentMarker.h:
3149         (WebCore::toRenderedDocumentMarker):
3150         * editing/CompositeEditCommand.cpp:
3151         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
3152         * editing/DeleteSelectionCommand.cpp:
3153         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
3154         * editing/Editor.cpp:
3155         (WebCore::Editor::selectionStartHasMarkerFor):
3156         * editing/SpellingCorrectionController.cpp:
3157         (WebCore::markersHaveIdenticalDescription):
3158         (WebCore::SpellingCorrectionController::respondToChangedSelection):
3159         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
3160         (WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
3161         * editing/SpellingCorrectionController.h:
3162         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
3163         * rendering/InlineTextBox.cpp:
3164         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3165         (WebCore::InlineTextBox::paintTextMatchMarker):
3166         (WebCore::InlineTextBox::computeRectForReplacementMarker):
3167         (WebCore::InlineTextBox::paintDocumentMarkers):
3168         * rendering/InlineTextBox.h:
3169         * rendering/svg/SVGInlineFlowBox.cpp:
3170         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
3171
3172 2011-05-26  MORITA Hajime  <morrita@google.com>
3173
3174         Reviewed by Kent Tamura.
3175
3176         WebCore::HTMLSummaryElement::isMainSummary ReadAV@NULL
3177         https://bugs.webkit.org/show_bug.cgi?id=61511
3178
3179         Removed Unnecessary wrong cast to Elmement, which can be non-Element.
3180
3181         Test: fast/html/details-summary-document-child.html
3182
3183         * html/HTMLSummaryElement.cpp:
3184         (WebCore::HTMLSummaryElement::detailsElement):
3185
3186 2011-05-26  Adam Barth  <abarth@webkit.org>
3187
3188         Reviewed by Ryosuke Niwa.
3189
3190         FrameLoader cannot be null
3191         https://bugs.webkit.org/show_bug.cgi?id=61609
3192
3193         This code has a bunch of cargo-cult null checking.
3194
3195         * html/HTMLMediaElement.cpp:
3196         (WebCore::HTMLMediaElement::createRenderer):
3197         (WebCore::HTMLMediaElement::attach):
3198         (WebCore::HTMLMediaElement::loadResource):
3199         (WebCore::HTMLMediaElement::getPluginProxyParams):
3200         (WebCore::HTMLMediaElement::createMediaPlayerProxy):
3201         (WebCore::HTMLMediaElement::updateWidget):
3202
3203 2011-05-26  Shane Stephens  <shanestephens@google.com>
3204
3205         Reviewed by James Robinson.
3206
3207         REGRESSION (r81992): layout triggered by position update fails to apply when transform is updated at same time
3208         https://bugs.webkit.org/show_bug.cgi?id=60689
3209
3210         When a transform is modified in a style, we were upgrading our understanding
3211         of the difference from PositionedMovementOnly to SimplifiedLayout.  However,
3212         if the position of the style is independently changed at the same time, both
3213         PositionedMovement and SimplifiedLayout passes are required.
3214
3215         Test: transforms/2d/set-transform-and-top.html
3216
3217         * rendering/RenderObject.cpp:
3218         Added checks for SimplifiedLayoutAndPositionedMovement - when encountered,
3219         set both PositionedMovement and SimplifiedLayout update flasgs. 
3220         * rendering/style/RenderStyleConstants.h:
3221         Added a new StyleDifference enum value (SimplifiedLayoutAndPositionedMovement) for 
3222         cases when both PositionedMovement and SimplifiedLayout are required.
3223
3224 2011-05-26  Luke Macpherson   <macpherson@chromium.org>
3225
3226         Reviewed by Eric Seidel.
3227
3228         Implement webkit margin collapse CSS properties in CSSStyleApplyProperty
3229         https://bugs.webkit.org/show_bug.cgi?id=61589
3230
3231         No new tests as no new functionality added.
3232
3233         * css/CSSStyleApplyProperty.cpp:
3234         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3235         Add handlers for:
3236           CSSPropertyWebkitMarginBeforeCollapse
3237           CSSPropertyWebkitMarginAfterCollapse
3238           CSSPropertyWebkitMarginTopCollapse
3239           CSSPropertyWebkitMarginBottomCollapse
3240           CSSPropertyWebkitMarginCollapse
3241         * css/CSSStyleSelector.cpp:
3242         (WebCore::CSSStyleSelector::applyProperty):
3243         Remove cases that are no longer required.
3244
3245 2011-05-26  Adam Barth  <abarth@webkit.org>
3246
3247         Reviewed by Eric Seidel.
3248
3249         Support cross-origin property for images
3250         https://bugs.webkit.org/show_bug.cgi?id=61015
3251
3252         This patch add support for the crossorigin attribute of images and
3253         teaches 2D canvas to respect that flag and not taint a canvas if the
3254         image drawn on the canvas is allowed by CORS.
3255
3256         While I was editing this code, I couldn't resist a couple touch-up
3257         changes.
3258
3259         Tests: http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials.html
3260                http/tests/security/canvas-remote-read-remote-image-allowed.html
3261                http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin.html
3262
3263         * html/HTMLAttributeNames.in:
3264         * html/HTMLCanvasElement.cpp:
3265         (WebCore::HTMLCanvasElement::securityOrigin):
3266         * html/HTMLCanvasElement.h:
3267         * html/HTMLImageElement.idl:
3268         * html/canvas/CanvasRenderingContext.cpp:
3269         (WebCore::CanvasRenderingContext::checkOrigin):
3270         * html/canvas/CanvasRenderingContext2D.cpp:
3271         (WebCore::CanvasRenderingContext2D::createPattern):
3272         * loader/ImageLoader.cpp:
3273         (WebCore::ImageLoader::updateFromElement):
3274         * loader/cache/CachedResource.cpp:
3275         (WebCore::CachedResource::passesAccessControlCheck):
3276         * loader/cache/CachedResource.h:
3277
3278 2011-05-26  Mihai Parparita  <mihaip@chromium.org>
3279
3280         Reviewed by Adam Barth.
3281
3282         Fix worldID and destinationDomain argument names
3283         https://bugs.webkit.org/show_bug.cgi?id=61571
3284
3285         As part of working on r87423, I noticed a couple of inconsistencies in
3286         argument names:
3287         - We would use worldId in .h files but worldID in .cpp files.
3288           Standardize on the latter
3289         - SecurityOrigin::addOriginAccessWhitelistEntry would take a
3290           destinationDomains argument, even though the actual parameter was for
3291           a single domain (renamed to be singular).
3292
3293         * bindings/v8/ScriptController.h:
3294         * bindings/v8/V8Proxy.h:
3295         * page/SecurityOrigin.cpp:
3296         (WebCore::SecurityOrigin::addOriginAccessWhitelistEntry):
3297         (WebCore::SecurityOrigin::removeOriginAccessWhitelistEntry):
3298         * page/SecurityOrigin.h:
3299
3300 2011-05-26  Emil A Eklund  <eae@chromium.org>
3301
3302         Reviewed by Eric Seidel.
3303
3304         Replace RenderLayer::x/y/width/height with location/size
3305         https://bugs.webkit.org/show_bug.cgi?id=61414
3306
3307         Covered by existing tests.
3308
3309         * dom/MouseRelatedEvent.cpp:
3310         (WebCore::MouseRelatedEvent::computeRelativePosition):
3311         * rendering/RenderBox.cpp:
3312         (WebCore::RenderBox::computeRectForRepaint):
3313         * rendering/RenderBox.h:
3314         (WebCore::RenderBox::maxLayoutOverflow):
3315         * rendering/RenderInline.cpp:
3316         (WebCore::RenderInline::clippedOverflowRectForRepaint):
3317         (WebCore::RenderInline::computeRectForRepaint):
3318         * rendering/RenderLayer.cpp:
3319         (WebCore::RenderLayer::updateLayerPosition):
3320         (WebCore::RenderLayer::convertToLayerCoords):
3321         (WebCore::RenderLayer::offsetFromResizeCorner):
3322         (WebCore::RenderLayer::calculateRects):
3323         * rendering/RenderLayer.h:
3324         (WebCore::RenderLayer::location):
3325         (WebCore::RenderLayer::setSize):
3326         * rendering/RenderObject.cpp:
3327         (WebCore::RenderObject::computeRectForRepaint):
3328         * rendering/RenderTreeAsText.cpp:
3329         (WebCore::write):
3330         (WebCore::writeLayers):
3331         (WebCore::externalRepresentation):
3332         * rendering/RenderView.cpp:
3333         (WebCore::RenderView::absoluteRects):
3334         (WebCore::RenderView::absoluteQuads):
3335
3336 2011-05-26  Annie Sullivan  <sullivan@chromium.org>
3337
3338         Reviewed by Ryosuke Niwa.
3339
3340         Delete table in contentEditable/designMode produces odd contents
3341         https://bugs.webkit.org/show_bug.cgi?id=57148
3342
3343         Removes border-collapse, -webkit-border-horizontal-spacing, and
3344         -webkit-border-vertical-spacing from the list of properties which
3345         should be preserved during edit operations. Also renames this
3346         list to editingInheritableProperties to be more clear about what
3347         the list is for.
3348
3349         Test: editing/deleting/delete-last-char-in-table.html
3350
3351         * editing/EditingStyle.cpp: Removes border vertical/horizontal
3352         spacing from editingStyleProperties.
3353         * editing/EditingStyle.h: Renames OnlyInheritableProperties to
3354         OnlyEditingInheritableProperties.
3355         * editing/markup.cpp: Renames InheritablePropertiesAndBackgroundColorInEffect.
3356
3357 2011-05-26  Yuta Kitamura  <yutak@chromium.org>
3358
3359         Reviewed by Kent Tamura.
3360
3361         WebSocket closing handshake
3362         https://bugs.webkit.org/show_bug.cgi?id=35721
3363
3364         Implement WebSocket closing handshake based on Ian Hickson's
3365         WebSocket protocol draft 76.
3366
3367         Tests: http/tests/websocket/tests/client-close.html
3368                http/tests/websocket/tests/server-close.html
3369
3370         * platform/network/SocketStreamHandleBase.cpp:
3371         (WebCore::SocketStreamHandleBase::send):
3372         Do not send a message if we are in Closing state.
3373         (WebCore::SocketStreamHandleBase::close):
3374         Do not disconnect if we have pending data which have not been sent yet.
3375         In this case, the actual disconnection will happen in sendPendingData().
3376         (WebCore::SocketStreamHandleBase::disconnect):
3377         Renamed from close(). Disconnect the connection immediately.
3378         (WebCore::SocketStreamHandleBase::sendPendingData):
3379         * platform/network/SocketStreamHandleBase.h:
3380         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3381         Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus)
3382         to didClose().
3383         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3384         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3385         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
3386         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
3387         * websockets/ThreadableWebSocketChannelClientWrapper.h:
3388         * websockets/WebSocket.cpp:
3389         (WebCore::WebSocket::send):
3390         (WebCore::WebSocket::close):
3391         Fail if close() is attempted before the connection is established.
3392         Otherwise, set the state to CLOSING and start the closing handshake.
3393         (WebCore::WebSocket::bufferedAmount):
3394         If the state is CLOSING, we need to consider buffered data in m_channel and sent after close().
3395         (WebCore::WebSocket::didConnect):
3396         (WebCore::WebSocket::didReceiveMessage):
3397         We need to invoke message event in CLOSING state as well as OPEN state.
3398         (WebCore::WebSocket::didReceiveMessageError):
3399         (WebCore::WebSocket::didStartClosingHandshake):
3400         (WebCore::WebSocket::didClose):
3401         * websockets/WebSocket.h:
3402         * websockets/WebSocketChannel.cpp:
3403         (WebCore::WebSocketChannel::WebSocketChannel):
3404         (WebCore::WebSocketChannel::close):
3405         Start the closing handshake.
3406         (WebCore::WebSocketChannel::disconnect):
3407         Disconnect the socket stream, instead of close.
3408         (WebCore::WebSocketChannel::didClose):
3409         (WebCore::WebSocketChannel::didReceiveData): Ditto.
3410         (WebCore::WebSocketChannel::didFail): Ditto.
3411         (WebCore::WebSocketChannel::processBuffer):
3412         Ditto.
3413         Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started.
3414         (WebCore::WebSocketChannel::startClosingHandshake):
3415         Send 0xFF 0x00 byte sequence.
3416         (WebCore::WebSocketChannel::closingTimerFired):
3417         Disconnect the socket stream if the closing handshake has timed out.
3418         * websockets/WebSocketChannel.h:
3419         m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol
3420         specification).
3421         * websockets/WebSocketChannelClient.h:
3422         (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added.
3423         (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter.
3424         * websockets/WorkerThreadableWebSocketChannel.cpp:
3425         Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake().
3426         (WebCore::WorkerThreadableWebSocketChannel::Peer::close):
3427         (WebCore::workerContextDidStartClosingHandshake):
3428         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
3429         (WebCore::workerContextDidClose):
3430         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
3431         * websockets/WorkerThreadableWebSocketChannel.h:
3432
3433 2011-05-26  David Levin  <levin@chromium.org>
3434
3435         Reviewed by Dmitry Titov.
3436
3437         WebKit's font notification has problems when the WebKit main thread != UI thread.
3438         https://bugs.webkit.org/show_bug.cgi?id=61391
3439
3440         This doesn't happen in DumpRenderTree, so it needs a unit test which is taking me
3441         some time to write correctly. In the meantime, this issues happens to be causing
3442         some crashes in Chrome so here's the fix alone for the time being.
3443
3444         * platform/graphics/mac/FontCacheMac.mm:
3445         (WebCore::invalidateFontCache): Ensure that FontCache::invalidate is only called on WebKit's main thread.
3446         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Call common function for font cache invalidation.
3447          Note that the call to fontCache() is fine since the singleton is initialized well before calling this function. Theoretically,
3448          there could be a problem due to a lack of a memory barrier but that is highly unlikely and this is debug only code.
3449         (WebCore::fontCacheATSNotificationCallback): Ditto.
3450
3451 2011-05-26  Stephanie Lewis  <slewis@apple.com>
3452
3453         Reviewed by Geoff Garen.
3454
3455         https://bugs.webkit.org/show_bug.cgi?id=61345
3456         part of <rdar://problem/8675177>
3457         Roll back in now that the Crashes are fixed.  ResourceResponseBase and ResourceResponse had two different definitions
3458         for m_isNull.  ResourceResponse treats m_isNull as meaning there isn't any platform ResourceResponse. 
3459         ResourceResponseBase treats m_isNull as meaning no fields have been initialized.  Consolidate calls into ResourceResponseBase meaning. 
3460
3461         Don't initialize ResourceResponse.m_suggestedFilename until we want to use it.  Initializing it requires reading in and parsing a plist.  
3462         Add new initialization state CommonAndUncommonFields to ResourceResponse.  This will be for all the header fields.
3463         Move suggestedFilename initialization to AllFields so it is never initialized unless we ask for it. 
3464         Add "Content-Type" to common headers since it is looked for by every CSS sheet load.
3465
3466         No new functionality so no new tests.
3467
3468         * platform/network/ResourceResponseBase.cpp:
3469         (WebCore::ResourceResponseBase::adopt):
3470         (WebCore::ResourceResponseBase::suggestedFilename):
3471         (WebCore::ResourceResponseBase::setSuggestedFilename):
3472         (WebCore::ResourceResponseBase::httpStatusText):
3473         (WebCore::ResourceResponseBase::setHTTPStatusText):
3474         (WebCore::ResourceResponseBase::httpHeaderField):
3475         (WebCore::ResourceResponseBase::setHTTPHeaderField):
3476    &nb