2011-04-19 Roland Steiner <rolandsteiner@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-19  Roland Steiner  <rolandsteiner@chromium.org>
2
3         Reviewed by Dimitri Glazkov.
4
5         Bug 52963 - Enable O(1) access to root from any node in shadow DOM subtree
6         https://bugs.webkit.org/show_bug.cgi?id=52963
7
8         .) Change base class of ShadowRoot from DocumentFragment to TreeScope.
9         .) Re-enable tree scope handling in Node (had ASSERT_NOT_REACHED, etc.).
10         .) Merged setTreeScope() with setTreeScopeRecursively()
11         .) Call setTreeScopeRecursively in DOM manipulation functions where applicable.
12         .) Adapt JavaScript Node wrappers (temporary code - see https://bugs.webkit.org/show_bug.cgi?id=58704).
13
14         No new tests. (refactoring)
15
16         * bindings/js/JSNodeCustom.cpp:
17         (WebCore::createWrapperInline):
18         * bindings/v8/custom/V8NodeCustom.cpp:
19         (WebCore::toV8Slow):
20         * dom/ContainerNode.cpp:
21         (WebCore::ContainerNode::takeAllChildrenFrom):
22         (WebCore::ContainerNode::removeBetween):
23         (WebCore::ContainerNode::removeChildren):
24         (WebCore::ContainerNode::parserAddChild):
25         * dom/Document.cpp:
26         (WebCore::Document::Document):
27         (WebCore::Document::~Document):
28         (WebCore::Document::setDocType):
29         * dom/Element.h:
30         * dom/Node.cpp:
31         (WebCore::Node::treeScope):
32         (WebCore::Node::setTreeScopeRecursively):
33         * dom/Node.h:
34         (WebCore::Node::document):
35         * dom/ShadowRoot.cpp:
36         (WebCore::ShadowRoot::ShadowRoot):
37         (WebCore::ShadowRoot::~ShadowRoot):
38         (WebCore::ShadowRoot::nodeType):
39         (WebCore::ShadowRoot::cloneNode):
40         (WebCore::ShadowRoot::childTypeAllowed):
41         * dom/ShadowRoot.h:
42         (WebCore::toShadowRoot):
43         * dom/TreeScope.cpp:
44         (WebCore::TreeScope::TreeScope):
45         (WebCore::TreeScope::setParentTreeScope):
46         * dom/TreeScope.h:
47         * rendering/RenderSlider.cpp:
48
49 2011-04-20  Vsevolod Vlasov  <vsevik@chromium.org>
50
51         Reviewed by Pavel Feldman.
52
53         Web Inspector: Update front-end files list in WebCore.vcproj
54         https://bugs.webkit.org/show_bug.cgi?id=58896
55
56         * WebCore.vcproj/WebCore.vcproj:
57
58 2011-04-20  Dimitri Glazkov  <dglazkov@chromium.org>
59
60         Qt build fix after r84380.
61
62         * css/CSSPrimitiveValueMappings.h: Moved EBorderCollapse-related casts from under ENABLE(SVG) guard.
63
64 2011-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
65
66         Reviewed by Martin Robinson.
67
68         [GTK] Build libWebCore with the gtk sources too
69         https://bugs.webkit.org/show_bug.cgi?id=58968
70
71         In some cases webcore files are compiled twice, so it improves the
72         build time.
73
74         * GNUmakefile.am: Add webcore gtk sources to libWebCore sources.
75
76 2011-04-20  Luke Macpherson   <macpherson@chromium.org>
77
78         Reviewed by Dimitri Glazkov.
79
80         Allow casting between CSSPrimitiveValue and EBorderCollapse to remove special-case logic from CSSStyleSelector.
81         https://bugs.webkit.org/show_bug.cgi?id=58964
82
83         No new tests as no new functionality added.
84
85         * css/CSSPrimitiveValueMappings.h:
86         Support casting to/from EBorderCollapse.
87         * css/CSSStyleSelector.cpp:
88         Use new casting ability to simplify code.
89         * rendering/style/RenderStyle.h:
90         Use EBorderCollapse instead of a bool for representing border collapse member variable.
91         * rendering/style/RenderStyleConstants.h:
92         Added EBorderCollapse enum.
93
94 2011-04-19  Stephen White  <senorblanco@chromium.org>
95
96         Reviewed by Kenneth Russell.
97
98         Move and rename GLES2Canvas.
99         https://bugs.webkit.org/show_bug.cgi?id=58927
100
101         Move GLES2Canvas to platform/graphcs/gpu, where all the other
102         gpu-related files live, and rename it to GraphicsContextGPU to better
103         reflect its purpose.
104
105         Covered by existing tests.
106
107         * WebCore.gypi:
108         * platform/graphics/chromium/GLES2Canvas.cpp:
109         * platform/graphics/chromium/GLES2Canvas.h:
110         * platform/graphics/skia/GraphicsContextSkia.cpp:
111         (WebCore::GraphicsContext::fillPath):
112         (WebCore::GraphicsContext::setPlatformShadow):
113         * platform/graphics/skia/ImageBufferSkia.cpp:
114         * platform/graphics/skia/ImageSkia.cpp:
115         (WebCore::drawBitmapGLES2):
116         * platform/graphics/skia/PlatformContextSkia.cpp:
117         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
118         * platform/graphics/skia/PlatformContextSkia.h:
119         (WebCore::PlatformContextSkia::gpuCanvas):
120
121 2011-04-20  Benjamin Poulain  <benjamin.poulain@nokia.com>
122
123         Reviewed by Andreas Kling.
124
125         [Qt] Clean the style of our cookie methods
126         https://bugs.webkit.org/show_bug.cgi?id=58987
127
128         Got rid of the variables named "u" in favor just converting the url when needed.
129
130         * platform/qt/CookieJarQt.cpp:
131         (WebCore::setCookies): The variable p was unused.
132         The ::toAscii() depends on the default codec, use toLatin1() instead.
133         (WebCore::cookies): foreach() should use const reference.
134         (WebCore::cookieRequestHeaderFieldValue):
135
136 2011-04-19  Mihai Parparita  <mihaip@chromium.org>
137
138         Reviewed by Adam Barth.
139
140         ScriptController.h is included in too many places
141         https://bugs.webkit.org/show_bug.cgi?id=58963
142
143         Remove ScriptController.h #includes from a bunch of .cpp files where it
144         doesn't appear to be necessary.
145
146         * bindings/js/JSCustomPositionCallback.cpp:
147         * bindings/js/JSCustomPositionErrorCallback.cpp:
148         * bindings/js/JSCustomVoidCallback.cpp:
149         * bindings/js/JSCustomXPathNSResolver.cpp:
150         * bindings/js/JSDOMWindowBase.cpp:
151         * bindings/js/JSDOMWindowShell.cpp:
152         * bindings/js/JSDocumentCustom.cpp:
153         * bindings/js/ScriptDebugServer.cpp:
154         * bindings/v8/NPV8Object.cpp:
155         * bindings/v8/ScriptCachedFrameData.cpp:
156         * bindings/v8/V8DOMWindowShell.cpp:
157         * bindings/v8/V8DOMWrapper.cpp:
158         * bindings/v8/V8IsolatedContext.cpp:
159         * bindings/v8/V8Proxy.cpp:
160         * bindings/v8/custom/V8LocationCustom.cpp:
161         * dom/Node.cpp:
162         * dom/ScriptElement.cpp:
163         * dom/XMLDocumentParser.cpp:
164         * dom/XMLDocumentParserQt.cpp:
165         * html/HTMLEmbedElement.cpp:
166         * html/HTMLObjectElement.cpp:
167         * html/HTMLPlugInElement.cpp:
168         * html/parser/HTMLConstructionSite.cpp:
169         * html/parser/HTMLTreeBuilder.cpp:
170         * inspector/InspectorProfilerAgent.cpp:
171         * loader/icon/IconDatabase.cpp:
172         * page/Chrome.cpp:
173         * page/Navigator.cpp:
174         * page/Page.cpp:
175         * plugins/PluginView.cpp:
176         * plugins/gtk/PluginViewGtk.cpp:
177         * plugins/qt/PluginViewQt.cpp:
178         * plugins/symbian/PluginViewSymbian.cpp:
179         * plugins/win/PluginViewWin.cpp:
180         * svg/SVGDocumentExtensions.cpp:
181         * xml/XMLTreeViewer.cpp:
182
183 2011-04-20  Pavel Feldman  <pfeldman@google.com>
184
185         Reviewed by Yury Semikhatsky.
186
187         Web Inspector: add Save As to the Resources panel context menu.
188         https://bugs.webkit.org/show_bug.cgi?id=58983
189
190         * English.lproj/localizedStrings.js:
191         * inspector/front-end/ResourcesPanel.js:
192         (WebInspector.FrameResourceTreeElement.prototype.onattach):
193         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent.save):
194         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
195         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.save):
196         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent):
197
198 2011-04-20  Balazs Kelemen  <kbalazs@webkit.org>
199
200         Reviewed by Csaba Osztrogonác.
201
202         [Qt] Cleanup includepath adjustment for generated files
203         https://bugs.webkit.org/show_bug.cgi?id=58869
204
205         Build cleanup, no new tests.
206
207         * WebCore.pri: Add the directory of generated files to the include path
208         with absolute path to make it valid in the final build step. Remove
209         unnecessary logic.
210
211 2011-04-20  Mariusz Grzegorczyk  <mariusz.g@samsung.com>
212
213         Reviewed by Andreas Kling.
214
215         [EFL] Initializing m_window member field in PluginView.cpp for efl port
216         https://bugs.webkit.org/show_bug.cgi?id=58311
217
218         No new tests needed: only initializing class member.
219
220         * plugins/PluginView.cpp:
221         (WebCore::PluginView::PluginView):
222
223 2011-04-20  Pavel Feldman  <pfeldman@google.com>
224
225         Not reviewed: fix Leopard compile.
226
227         * inspector/InspectorFrontendClient.h:
228         * inspector/InspectorFrontendClientLocal.h:
229         (WebCore::InspectorFrontendClientLocal::saveAs):
230
231 2011-04-20  Pavel Feldman  <pfeldman@google.com>
232
233         Reviewed by Yury Semikhatsky.
234
235         Web Inspector: add saveAs into the InspectorFrontendHost binding.
236         https://bugs.webkit.org/show_bug.cgi?id=58979
237
238         * English.lproj/localizedStrings.js:
239         * inspector/InspectorFrontendClient.h:
240         (WebCore::InspectorFrontendClient::saveAs):
241         (WebCore::InspectorFrontendClient::saveSessionSetting):
242         (WebCore::InspectorFrontendClient::loadSessionSetting):
243         * inspector/InspectorFrontendHost.cpp:
244         (WebCore::InspectorFrontendHost::saveAs):
245         * inspector/InspectorFrontendHost.h:
246         * inspector/InspectorFrontendHost.idl:
247         * inspector/front-end/InspectorFrontendHostStub.js:
248         (.WebInspector.InspectorFrontendHostStub.prototype.saveAs.fr.onload):
249         (.WebInspector.InspectorFrontendHostStub.prototype.saveAs):
250         * inspector/front-end/NetworkPanel.js:
251         (WebInspector.NetworkPanel.prototype._contextMenu):
252         (WebInspector.NetworkPanel.prototype._copyAll):
253         (WebInspector.NetworkPanel.prototype._copyResource):
254         (WebInspector.NetworkPanel.prototype._exportAll):
255         (WebInspector.NetworkPanel.prototype._exportResource):
256         * inspector/front-end/Settings.js:
257         * inspector/front-end/utilities.js:
258         ():
259
260 2011-04-20  Yury Semikhatsky  <yurys@chromium.org>
261
262         Reviewed by Tony Gentilcore.
263
264         Error event in <script> element shouldn't bubble
265         https://bugs.webkit.org/show_bug.cgi?id=51040
266
267         Test: svg/dom/SVGScriptElement/script-onerror-bubbling.svg
268
269         * dom/ScriptElement.cpp:
270         (WebCore::ScriptElement::dispatchErrorEvent): the method now has same implementation for all script
271         elements, script load error event doesn' bubble.
272         * dom/ScriptElement.h:
273         * html/HTMLScriptElement.cpp:
274         * html/HTMLScriptElement.h:
275         * html/parser/HTMLScriptRunner.cpp:
276         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
277         * svg/SVGScriptElement.cpp:
278         (WebCore::SVGScriptElement::parseMappedAttribute): SVG script element now supports onerror
279         hanlder which behaves the same way as onerror in HTML script element: it's invoked when
280         script loading fails and the event doesn't bubble.
281         * svg/SVGScriptElement.h:
282
283 2011-04-20  Pavel Feldman  <pfeldman@google.com>
284
285         Reviewed by Yury Semikhatsky.
286
287         Web Inspector: minor protocol cleanups (refined types).
288         https://bugs.webkit.org/show_bug.cgi?id=58970
289
290         * inspector/InjectedScriptSource.js:
291         * inspector/Inspector.json:
292
293 2011-04-20  Leo Yang  <leo.yang@torchmobile.com.cn>
294
295         Reviewed by Eric Seidel.
296
297         Leaks beneath RenderSVGShadowTreeRootContainer::updateFromElement seen on SnowLeopard Intel Leaks
298         https://bugs.webkit.org/show_bug.cgi?id=56672
299
300         ~RenderSVGShadowTreeRootContainer() cleared shadow host only if
301         the shadow root is attached. This is wrong because it will
302         leak shadow root when the root is not attached. For example, it
303         leaks shadow root of <use> element which is pending on resource.
304
305         This patch is clearing shadow host if m_shadowRoot is valid to
306         prevent leaking.
307
308         Fixing leaking, no new tests.
309
310         * rendering/svg/RenderSVGShadowTreeRootContainer.cpp:
311         (WebCore::RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer):
312
313 2011-04-19  Maciej Stachowiak  <mjs@apple.com>
314
315         Reviewed by Antti Koivisto.
316
317         Reproducible crash two-finger zooming at multiple sites in WebCore::RenderLayer::isTransparent
318         https://bugs.webkit.org/show_bug.cgi?id=58868
319
320         I could not figure out how to make a test.
321
322         * rendering/RenderLayer.cpp:
323         (WebCore::RenderLayer::paintLayer): Check for existence of a
324         parent before calling a method on it.
325
326 2011-04-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
327
328         Reviewed by Daniel Bates.
329
330         [EFL] Add current time to media control panel.
331         https://bugs.webkit.org/show_bug.cgi?id=58866
332
333         Implement paintMediaCurrentTime() to show playing time of media content.
334
335         * platform/efl/RenderThemeEfl.cpp:
336         (WebCore::RenderThemeEfl::RenderThemeEfl):
337         (WebCore::RenderThemeEfl::formatMediaControlsCurrentTime):
338         (WebCore::RenderThemeEfl::paintMediaCurrentTime):
339         * platform/efl/RenderThemeEfl.h:
340
341 2011-04-19  Jungshik Shin  <jshin@chromium.org>
342
343         Reviewed by Adam Barth
344
345         Update the list of Unicode blocks to treat as complex scripts
346         per Unicode 6.0. Also, make [U+02E5..U+02E9] (IPA tone marks)
347         go through the complex script code path.
348
349         Test: fast/text/ipa-tone-letters.html
350
351         http://bugs.webkit.org/show_bug.cgi?id=39799
352
353         * platform/graphics/Font.cpp:
354         (WebCore::Font::codePath):
355
356 2011-04-19  Pratik Solanki  <psolanki@apple.com>
357
358         Reviewed by Simon Fraser.
359
360         Follow on fix for https://bugs.webkit.org/show_bug.cgi?id=58926
361
362         Move the assert from Image::drawPattern() to Image::drawTiled() so we don't hit it when
363         trying to paint GeneratedImages.
364
365         * platform/graphics/Image.cpp:
366         (WebCore::Image::drawTiled):
367         * platform/graphics/cg/ImageCG.cpp:
368         (WebCore::Image::drawPattern):
369
370 2011-04-19  Simon Fraser  <simon.fraser@apple.com>
371
372         Fix 32-bit builds.
373
374         * rendering/RenderBox.cpp:
375         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
376         * rendering/RenderBoxModelObject.cpp:
377         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
378
379 2011-04-19  Naoki Takano  <takano.naoki@gmail.com>
380
381         Reviewed by Kent Tamura.
382
383         [Chromium]UI polishes and tweaks to Autofill dropdown menu.
384         https://bugs.webkit.org/show_bug.cgi?id=58505
385         http://code.google.com/p/chromium/issues/detail?id=51077
386
387         No new tests. Because this is autofill looking problem in Chromium.
388         Add m_menuType as PopupMenuStyle to change popup style change.
389         Put kLinePaddingHeight at the top and bottom of each line if m_menuType is AutofillPopup.
390         Change separator color to #dcdcdc and remove sparatorPadding at the edge if m_menuType is AutofillPopup.
391         Change the line height of separator as only the piece if m_menuType is AutofillPopup.
392         Change the label font size 0.9 time smaller than regular font size if m_menuType is AutofillPopup.
393
394         * platform/PopupMenuStyle.h: Add enum PopupMenuType;
395         (WebCore::PopupMenuStyle::PopupMenuStyle): Add m_menuType.
396         (WebCore::PopupMenuStyle::menuType): Add to change the style according to the return value.
397         * platform/chromium/PopupMenuChromium.cpp:
398         (WebCore::PopupListBox::paintRow):Change the separator color to #dcdcdc.
399         Change the edge padding according to menuStyle().
400         (WebCore::PopupListBox::getRowHeight): Add kLineHeightMargin*2 for each line height.
401
402 2011-04-19  Simon Fraser  <simon.fraser@apple.com>
403
404         Reviewed by Dan Bernstein.
405
406         background color of elements with border-radius shows around outer edge of border at corners
407         https://bugs.webkit.org/show_bug.cgi?id=21819
408         
409         When drawing a background followed by a border with the same rounded
410         clip, some border color leaks out because of antialiasing.
411         
412         Fix this by using two different strategies depending on the colors.
413         If the border is opaque on all sides, we can inset the background by
414         a device pixel. If not, then we have to draw the unclipped background
415         and border into a transparency layer, and then clip that.
416         
417         A futher possible solution is mentioned in a comment in
418         determineBackgroundBleedAvoidance() but not yet implemented.
419         
420         Also don't try to paint shadows with zero offset, spread and blur.
421
422         Test: fast/backgrounds/background-leakage.html,
423               fast/backgrounds/background-leakage-transforms.html
424
425         * rendering/RenderBoxModelObject.h:
426         Add a BackgroundBleedAvoidance enum with a value for each
427         strategy.
428         * rendering/RenderBoxModelObject.cpp:
429         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
430         Pass BackgroundBleedAvoidance, bail early if the border rect is empty.
431         If using the transparency layer solution, don't bother to clip
432         to the rounded rect for the background. If the strategy is to
433         shrink the background, do that.
434         (WebCore::BorderEdge::BorderEdge):
435         (WebCore::BorderEdge::obscuresBackgroundEdge):
436         Helper method to determine if this border side will totally
437         obscured by the border edge, allowing us to inset it.
438         (WebCore::RenderBoxModelObject::paintOneBorderSide):
439         Pass BackgroundBleedAvoidance through.
440         (WebCore::RenderBoxModelObject::paintBorderSides):
441         Ditto.
442         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
443         Ditto.
444         (WebCore::RenderBoxModelObject::paintBorder):
445         Fill BorderEdges using getBorderEdgeInfo now.
446         Don't clip to the rounded border if we are using the
447         transparency layer solution.
448         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
449         Pass bleedAvoidance through, and use it for double borders.
450         (WebCore::RenderBoxModelObject::getBorderEdgeInfo):
451         Helper to fill in the BorderEdge array.
452         (WebCore::RenderBoxModelObject::borderObscuresBackgroundEdge):
453         Used to determine if we can use the background shrinkage solution.
454         (WebCore::RenderBoxModelObject::paintBoxShadow):
455         Don't paint shadows that should not be visible.
456
457         * rendering/RenderBox.h:
458         * rendering/RenderBox.cpp:
459         (WebCore::RenderBox::paintRootBoxFillLayers):
460         Pass BackgroundBleedNone for the root box.
461         
462         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
463         Determine which bleed strategy we can use.
464         
465         (WebCore::RenderBox::paintBoxDecorationsWithSize):
466         Based on the bleedAvoidance, make a transparency layer
467         which will be clipped to the rounded border outside edge,
468         and pass bleedAvoidance to the background and border-painting
469         methods.        
470         (WebCore::RenderBox::paintMaskImages):
471         Use BackgroundBleedNone.
472         (WebCore::RenderBox::paintFillLayers):
473         (WebCore::RenderBox::paintFillLayer):
474         Pass bleedAvoidance through.
475
476         * rendering/InlineFlowBox.cpp:
477         (WebCore::InlineFlowBox::paintFillLayer):
478         (WebCore::InlineFlowBox::paintBoxDecorations):
479         Pass BackgroundBleedNone. At some point we may want to do the right
480         thing for split inlines.
481
482         * rendering/RenderFieldset.cpp:
483         (WebCore::RenderFieldset::paintBoxDecorations):
484         * rendering/RenderTableCell.cpp:
485         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
486         Pass BackgroundBleedNone.
487
488 2011-04-19  Yuta Kitamura  <yutak@chromium.org>
489
490         Reviewed by Alexey Proskuryakov.
491
492         WebSocket: Add assertion for SocketStreamError::failingURL.
493         https://bugs.webkit.org/show_bug.cgi?id=58765
494
495         No new tests, because an existing test http/tests/inspector/console-websocket-error.html should cover this.
496
497         * websockets/WebSocketChannel.cpp:
498         (WebCore::WebSocketChannel::didFail): If error.failingURL() is provided, it must be the same as
499         m_handshake.url(). failingURL may be null if SocketStreamHandle has created a SocketStreamError
500         using zero- or one-argument constructor (which is old version but some ports are still using it).
501         In that case, m_handshake.url() is passed to addMessage().
502
503 2011-04-19  Eric Carlson  <eric.carlson@apple.com>
504
505         Reviewed by Dimitri Glazkov.
506
507         Media controls status display should not be hidden for live streams
508         https://bugs.webkit.org/show_bug.cgi?id=58952
509
510         Tested manually because we don't have any live streams to test in DRT.
511
512         * html/shadow/MediaControlElements.cpp:
513         (WebCore::MediaControlStatusDisplayElement::update): Set the status to "Loading" only until
514             there is something to display (readyState exceeds HAVE_METADATA).
515         * html/shadow/MediaControlRootElement.cpp:
516         (WebCore::MediaControlRootElement::loadedMetadata): Don't hide the status display for
517             live streams.
518
519 2011-04-19  Julien Chaffraix  <jchaffraix@codeaurora.org>
520
521         Reviewed by Alexey Proskuryakov.
522
523         https://bugs.webkit.org/show_bug.cgi?id=45425
524         HTMLLinkElement.disabled does not forward value to the Stylesheet's disabled attribute on setting
525
526         Test: fast/html/htmllink-disable.html
527         Test: fast/dom/HTMLLinkElement/disabled-attribute.html
528
529         Match the HTML5 specification by forwarding the 'disabled' attribute to our stylesheet.
530
531         Based on previous work by Bijan Amirzada <bijana@codeaurora.org>.
532
533         * html/HTMLLinkElement.cpp:
534         (WebCore::HTMLLinkElement::disabled): Return our stylesheet's 'disabled' value or
535         false if we don't have a stylesheet.
536         (WebCore::HTMLLinkElement::setDisabled): Set our stylesheet's 'disabled' value or
537         ignore the call if we don't have a stylesheet.
538         * html/HTMLLinkElement.h:
539         * html/HTMLLinkElement.idl: Remove 'Reflect' as it is not a reflected attribute anymore in HTML5.
540         This matches the way FF4, Opera and IE9 handle the attribute.
541
542 2011-04-19  Ryosuke Niwa  <rniwa@webkit.org>
543
544         Reviewed by Eric Seidel.
545
546         Remove calls to deprecatedOffset and deprecatedNode in TypingCommand
547         https://bugs.webkit.org/show_bug.cgi?id=58569
548
549         Removed all calls to deprecatedOffset and deprecatedNode.
550
551         * editing/TypingCommand.cpp:
552         (WebCore::TypingCommand::insertText):
553         (WebCore::TypingCommand::deleteKeyPressed):
554         (WebCore::TypingCommand::forwardDeleteKeyPressed):
555
556 2011-04-19  Adrienne Walker  <enne@google.com>
557
558         Reviewed by Kenneth Russell.
559
560         [chromium] Initialize depth mask to known value before getBooleanv call
561         https://bugs.webkit.org/show_bug.cgi?id=58948
562
563         This trips an assert in the GPU command buffer client code if the
564         pointed-to value is not initialized to 0 or -1.
565
566         * platform/graphics/gpu/DrawingBuffer.cpp:
567         (WebCore::DrawingBuffer::clearFramebuffer):
568
569 2011-04-19  Pratik Solanki  <psolanki@apple.com>
570
571         Reviewed by Simon Fraser.
572
573         BitmapImage::destroyMetadataAndNotify should clear m_checkedForSolidColor
574         https://bugs.webkit.org/show_bug.cgi?id=58926
575
576         * platform/graphics/BitmapImage.cpp:
577         (WebCore::BitmapImage::destroyMetadataAndNotify): Set m_checkedForSolidColor to false.
578         * platform/graphics/BitmapImage.h:
579         (WebCore::BitmapImage::assertNotSolidColor):
580         * platform/graphics/cg/ImageCG.cpp:
581         (WebCore::Image::drawPattern): Add assert to make sure this is not called for a 1x1 image.
582
583 2011-04-19  Ryosuke Niwa  <rniwa@webkit.org>
584
585         Reviewed by Ojan Vafai.
586
587         REGRESSION(r83967): Crash in selectionExtentRespectingEditingBoundary
588         https://bugs.webkit.org/show_bug.cgi?id=58910
589
590         The crash was caused by selectionExtentRespectingEditingBoundary's incorrectly assuming that
591         targetNode always have renderer when there selection has an editable root and the target node
592         is outside of the editable root.
593         
594         Fixed the bug by adding an early exit when the target node is null.
595
596         No new tests are added since we don't have a reduction for this crash.
597
598         * page/EventHandler.cpp:
599         (WebCore::selectionExtentRespectingEditingBoundary):
600
601 2011-04-19  Geoffrey Garen  <ggaren@apple.com>
602
603         Try to fix v8 build.
604
605         * bindings/scripts/CodeGeneratorV8.pm: This is a pretty bad system.
606
607 2011-04-19  Enrica Casucci  <enrica@apple.com>
608
609         Reviewed by Ryosuke Niwa.
610
611         REGRESSION(r55762): Highlight color can't be copied in gmail.
612         https://bugs.webkit.org/show_bug.cgi?id=58925
613         <rdar://problem/9253057>
614
615         Test: editing/pasteboard/copy-text-with-backgroundcolor.html
616
617         The changes of r55762 uncovered the underlying issue here. The markup fragment
618         placed in the pasteboard does not contain the background color style.
619         This occurs only if the selection is limited to a single text node, whereas if the
620         selection spans across multiple nodes, the style is preserved correctly.
621         The fix consists in changing the logic that decides whether we should include the wrapping
622         node in the markup. That logic is based on the code in highestAncestorToWrapMarkup which relies
623         on isElementPresentational to choose candidates to be the wrapping node.
624         I've extended it to accept nodes that have non fully transparent background colors.
625
626         * editing/Editor.cpp:
627         (WebCore::Editor::hasTransparentBackgroundColor): Now is a static method of the class.
628         * editing/Editor.h:
629         * editing/markup.cpp:
630         (WebCore::isElementPresentational): Modified to use hasTransparentBackgroundColor.
631
632 2011-04-19  Geoffrey Garen  <ggaren@apple.com>
633
634         Reviewed by Oliver Hunt.
635
636         Removed a use of markDOMObjectWrapper: NodeLists
637         https://bugs.webkit.org/show_bug.cgi?id=58939
638
639         * bindings/js/JSDocumentCustom.cpp:
640         (WebCore::JSDocument::markChildren): No need to mark node lists, because
641         now they use the opaque roots system to decide their lifetimes.
642
643         * bindings/js/JSNamedNodeMapCustom.cpp: Removed stray newline.
644
645         * bindings/js/JSNodeListCustom.cpp:
646         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
647         (WebCore::JSNodeListOwner::finalize):
648         (WebCore::wrapperOwner):
649         (WebCore::wrapperContext):
650         (WebCore::toJS): Use the opaque roots system to avoid relying on
651         markDOMObjectWrapper.
652
653         * dom/DynamicNodeList.cpp:
654         (WebCore::DynamicNodeList::isDynamicNodeList):
655         * dom/DynamicNodeList.h:
656         (WebCore::DynamicNodeList::rootNode): Added the ability to get the node
657         backing a NodeList, for use in the opaque roots system.
658
659         * dom/Node.cpp:
660         * dom/Node.h:
661         * dom/NodeList.h:
662         (WebCore::NodeList::isDynamicNodeList): Ditto. Removed cruft related
663         to the old way of marking NodeLists.
664
665         * dom/NodeList.idl: We need a custom toJS so we can specify a custom
666         WeakHandleOwner at construction time.
667
668 2011-04-19  Antoine Labour  <piman@chromium.org>
669
670         Reviewed by James Robinson.
671
672         For invisible iframes, propagate compositing to parent instead of setting self
673         as root.
674         https://bugs.webkit.org/show_bug.cgi?id=58414
675
676         Tests: compositing/iframes/invisible-iframe.html
677                compositing/iframes/invisible-nested-iframe-hide.html
678                compositing/iframes/invisible-nested-iframe-show.html
679                compositing/iframes/invisible-nested-iframe.html
680
681         * rendering/RenderLayerCompositor.cpp:
682         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
683         Propagate compositing to parent even if frame owner has no renderer.
684
685 2011-04-19  Dan Bernstein  <mitz@apple.com>
686
687         Reviewed by Beth Dakin.
688
689         <rdar://problem/9271848> Crash when the document element is removed
690
691         Test: fast/events/overflow-viewport-renderer-deleted.html
692
693         * page/FrameView.cpp:
694         (WebCore::FrameView::calculateScrollbarModesForLayout): Reset m_viewportRenderer, in case this
695         function takes a code path that doesn’t call applyOverflowToViewport().
696         (WebCore::FrameView::layout): Whitespace change.
697
698 2011-04-19  Beth Dakin  <bdakin@apple.com>
699
700         Reviewed by Maciej Stachowiak.
701
702         https://bugs.webkit.org/show_bug.cgi?id=57898
703         REGRESSION (r82185): Scroll position not restored on navigation back to a page in 
704         the page cache
705         -and corresponding-
706         <rdar://problem/9226652>
707
708         Setting the contentsSize of a ScrollView to (0, 0) necessarily causes the scroll 
709         position to be lost. (The scroll position is computed based on the 
710         visibleContentSize.) This patch provides a mechanism to cache the current scroll 
711         position, and then the HistoryController accesses only the cached position rather 
712         than calling scrollPosition() which does a computation based on the 
713         visibleContentSize. 
714
715         * loader/HistoryController.cpp:
716         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
717         * page/FrameView.cpp:
718         (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
719         * platform/ScrollView.h:
720         (WebCore::ScrollView::cacheCurrentScrollPosition):
721         (WebCore::ScrollView::cachedScrollPosition):
722
723 2011-04-19  Renata Hodovan  <reni@webkit.org>
724
725         Reviewed by Eric Seidel.
726
727         Move the alignment related macros in Vector.h to new Alignment.h.
728         https://bugs.webkit.org/show_bug.cgi?id=56000
729
730         Adding the new file to the forwarding headers of WebCore.
731
732         * ForwardingHeaders/wtf/Alignment.h: Added.
733
734 2011-04-19  Oliver Hunt  <oliver@apple.com>
735
736         Reviewed by Andreas Kling.
737
738         [Qt] QtInstance method cache ownership rules are unclear
739         https://bugs.webkit.org/show_bug.cgi?id=58820
740
741         Make the QtInstance method cache use WriteBarrier, and handle
742         ownership properly.
743
744         * bridge/qt/qt_class.cpp:
745         (JSC::Bindings::QtClass::fallbackObject):
746         (JSC::Bindings::QtClass::fieldNamed):
747         * bridge/qt/qt_instance.cpp:
748         (JSC::Bindings::QtInstance::~QtInstance):
749         (JSC::Bindings::QtInstance::removeCachedMethod):
750         (JSC::Bindings::QtInstance::newRuntimeObject):
751         (JSC::Bindings::QtInstance::markAggregate):
752         * bridge/qt/qt_instance.h:
753
754 2011-04-19  David Kilzer  <ddkilzer@apple.com>
755
756         <http://webkit.org/b/57867> Re-order enum ResourceLoadPriority to make Unresolved value less important
757
758         Reviewed by Antti Koivisto.
759
760         * platform/network/ResourceLoadPriority.h:
761         (enum ResourceLoadPriority): Moved Unresolved enum to the top of
762         the list and set to -1 to emphasize the fact that this is an
763         unresolved priority (rather than one higher than the highest
764         priority).  Removed whitespace from the end of all enum lines.
765
766 2011-04-19  Simon Fraser  <simon.fraser@apple.com>
767
768         Reviewed by David Hyatt.
769
770         Background radius is wrong for split inline
771         https://bugs.webkit.org/show_bug.cgi?id=58843
772         
773         When computing the radii for a segment of a split inline, we have to
774         constrain those radii for the current segment, while still drawing
775         using the entire logical width.
776
777         Tests: fast/backgrounds/border-radius-split-background-image.html
778                fast/backgrounds/border-radius-split-background.html
779
780         * rendering/InlineFlowBox.cpp:
781         (WebCore::InlineFlowBox::paintFillLayer):
782         Pass height and width for this box only to paintFillLayer()
783         
784         * rendering/RenderBox.cpp:
785         (WebCore::RenderBox::paintFillLayer):
786         Pass 0 for unused inlineBox height and width.
787
788         * rendering/RenderBoxModelObject.h:
789         * rendering/RenderBoxModelObject.cpp:
790         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
791         When computing the rounded background rect, we have to take the size of
792         this segment of the inline box into account for radius constraining.
793         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
794         Call getBackgroundRoundedRect() in two places.
795
796 2011-04-19  Simon Fraser  <simon.fraser@apple.com>
797
798         Build fix. For some reason RenderBoxModelObject.cpp
799         was missing from my last commit.
800
801         * rendering/RenderBoxModelObject.cpp:
802         (WebCore::borderWillArcInnerEdge):
803         (WebCore::edgeFlagForSide):
804         (WebCore::includesEdge):
805         (WebCore::BorderEdge::BorderEdge):
806         (WebCore::BorderEdge::hasVisibleColorAndStyle):
807         (WebCore::BorderEdge::shouldRender):
808         (WebCore::BorderEdge::presentButInvisible):
809         (WebCore::BorderEdge::usedWidth):
810         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
811         (WebCore::edgesShareColor):
812         (WebCore::styleRequiresClipPolygon):
813         (WebCore::borderStyleFillsBorderArea):
814         (WebCore::borderStyleHasInnerDetail):
815         (WebCore::borderStyleIsDottedOrDashed):
816         (WebCore::borderStyleHasUnmatchedColorsAtCorner):
817         (WebCore::colorsMatchAtCorner):
818         (WebCore::willBeOverdrawn):
819         (WebCore::borderStylesRequireMitre):
820         (WebCore::joinRequiresMitre):
821         (WebCore::RenderBoxModelObject::paintOneBorderSide):
822         (WebCore::RenderBoxModelObject::paintBorderSides):
823         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
824         (WebCore::RenderBoxModelObject::paintBorder):
825         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
826         (WebCore::findInnerVertex):
827         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
828         (WebCore::RenderBoxModelObject::paintBoxShadow):
829
830 2011-04-19  Stephen White  <senorblanco@chromium.org>
831
832         Reviewed by Kenneth Russell.
833
834         Refactor GLES2Canvas state application out into its own function.
835         https://bugs.webkit.org/show_bug.cgi?id=58906
836
837         Covered by existing tests in fast/canvas and canvas/philip.
838
839         * platform/graphics/chromium/GLES2Canvas.cpp:
840         (WebCore::GLES2Canvas::applyState):
841         New function to apply compositing and clipping state.
842         (WebCore::GLES2Canvas::fillPath):
843         (WebCore::GLES2Canvas::fillRect):
844         (WebCore::GLES2Canvas::beginShadowDraw):
845         (WebCore::GLES2Canvas::endShadowDraw):
846         Refactor calls to applyState().
847         * platform/graphics/chromium/GLES2Canvas.h:
848
849 2011-04-19  Simon Fraser  <simon.fraser@apple.com>
850
851         Reviewed by Dave Hyatt.
852
853         Fix multiple border rendering issues
854         https://bugs.webkit.org/show_bug.cgi?id=58761
855         
856         Fix various border-drawing bugs, and optimize some common cases.
857         Also refactors a lot of the border-drawing code to be more maintainable.
858         
859             Rounded border rendering with different border widths looks strange
860             https://bugs.webkit.org/show_bug.cgi?id=17468
861             
862             paintBorder in RenderObject paint two times the corners
863             https://bugs.webkit.org/show_bug.cgi?id=20495
864             
865             Overdraw at box corners when using RGBA colors with alpha
866             https://bugs.webkit.org/show_bug.cgi?id=21835
867             
868             Enable antialiasing for border drawing, when transformed
869             https://bugs.webkit.org/show_bug.cgi?id=22746
870             
871             Drawing border-radius from path sometimes fails to round outer border in the double style when it should
872             https://bugs.webkit.org/show_bug.cgi?id=41301
873             
874             Drawing border-radius from path doesn't appear to always match up border edges correctly
875             https://bugs.webkit.org/show_bug.cgi?id=41302
876             
877         Also fixes
878             Should be able to create Path from RoundedIntRect
879             https://bugs.webkit.org/show_bug.cgi?id=58809
880
881         Tests: fast/borders/border-radius-different-width-001.html
882                fast/borders/border-radius-inset-outset.html
883                fast/borders/table-borders.html
884
885         * platform/graphics/FloatPoint.h:
886         * platform/graphics/FloatPoint.cpp:
887         (WebCore::findSlope):
888         (WebCore::findIntersection):
889         New geometry helper functions (should eventually move into a new
890         GeometryUtilities file).
891         
892         * platform/graphics/Path.h:
893         * platform/graphics/Path.cpp:
894         (WebCore::Path::addRoundedRect):
895         Add an overload of addRoundedRect() that takes a RoundedIntRect.
896
897         * platform/graphics/GraphicsContext.cpp:
898         (WebCore::GraphicsContext::addRoundedRectClip):
899         (WebCore::GraphicsContext::clipOutRoundedRect):
900         (WebCore::GraphicsContext::fillRectWithRoundedHole):
901         Can now add a RoundedIntRect to a Path directly.
902         
903         * platform/graphics/IntRect.h:
904         (WebCore::IntRect::minXMinYCorner):
905         (WebCore::IntRect::maxXMinYCorner):
906         (WebCore::IntRect::minXMaxYCorner):
907         (WebCore::IntRect::maxXMaxYCorner):
908         Convenience functions to get the rect corners, in a writing-mode-
909         friendly way.
910
911         * platform/graphics/RoundedIntRect.h:
912         * platform/graphics/RoundedIntRect.cpp:
913         (WebCore::RoundedIntRect::isRenderable):
914         We need to know when Path::addRoundedRect() will fail because
915         the sum of the radii exceed the height or width. This method tells
916         us that.
917         
918         * platform/graphics/cg/GraphicsContextCG.cpp:
919         (WebCore::GraphicsContext::fillRectWithRoundedHole):
920         Can now add a RoundedIntRect to a Path directly.
921
922         * rendering/RenderBoxModelObject.h:
923         * rendering/RenderBoxModelObject.cpp:
924         (WebCore::borderWillArcInnerEdge):
925         This can just to see if there are inner radii now.
926         
927         (WebCore::edgeFlagForSide):
928         (WebCore::includesEdge):
929         Convenience functions for the BorderEdgeFlags bitmask.
930         
931         (WebCore::BorderEdge::BorderEdge):
932         (WebCore::BorderEdge::hasVisibleColorAndStyle):
933         (WebCore::BorderEdge::shouldRender):
934         (WebCore::BorderEdge::presentButInvisible):
935         (WebCore::BorderEdge::usedWidth):
936         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
937         Convenience class to hold data about how a single edge
938         is drawn, and to contain some commonly used width-related methods.
939         
940         (WebCore::edgesShareColor):
941         (WebCore::styleRequiresClipPolygon):
942         (WebCore::borderStyleFillsBorderArea):
943         (WebCore::borderStyleHasInnerDetail):
944         (WebCore::borderStyleIsDottedOrDashed):
945         (WebCore::borderStyleHasUnmatchedColorsAtCorner):
946         (WebCore::colorsMatchAtCorner):
947         (WebCore::willBeOverdrawn):
948         (WebCore::borderStylesRequireMitre):
949         (WebCore::joinRequiresMitre):
950         Functions used to make the border drawing code more readable,
951         which are used to determine when corners need a mitre, and
952         need antialiasing.
953         
954         (WebCore::RenderBoxModelObject::paintOneBorderSide):
955         Code to paint one side of a border, either via the path, or
956         using rects/polygons, the appropriate mitres and antialiasing
957         at the corners. includeLogicalLeftEdge and includeLogicalRightEdge need
958         to be passed all the way down here so that when we recompute the
959         path for double and ridge/groove borders, we correctly handle split box
960         borders.
961         
962         (WebCore::RenderBoxModelObject::paintBorderSides):
963         Paints the 4 border sides (if present).
964         
965         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
966         Called when one or more of the borders has a non-opaque color,
967         and uses a transparency layer for each set of same-colored
968         sides to avoid overdraw at the corners.
969         
970         (WebCore::RenderBoxModelObject::paintBorder):
971         Builds an array of BorderEdge so we can iterate over them to 
972         detect different border compbinations, and optimizations. Has
973         a fast path for all-solid borders.
974         
975         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
976         Moved from RenderObject, since all callers are in RenderBoxModelObject.
977         Has the following changes:
978           * Don't attempt to draw dashes if there is only space for a few,
979             since it looks bad.
980           * Handle double and groove borders on split inlines correctly,
981             making use of includeLogicalLeftEdge, includeLogicalRightEdge
982
983         (WebCore::findInnerVertex):
984         For borders with a radiused inner edge, the per-side clip polygon
985         has to project inside the padding box to avoid clipping the inner edge.
986         This function computes a reasonable inner corner for the clipping
987         polygon.
988         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
989         Have the corner joins pass through the corners of the inner and outer
990         border rectangles, ensure we don't clip the inside if necessary,
991         and handle antialiasing on the two mitres.
992         
993         (WebCore::RenderBoxModelObject::paintBoxShadow):
994         Use RenderStyle::getRoundedInnerBorderFor() rather than computeBorderInnerRect()
995         etc.
996
997         * rendering/RenderObject.h:
998         * rendering/RenderObject.cpp:
999         (WebCore::RenderObject::drawLineForBoxSide):
1000         Moved to RenderBoxModelObject.
1001         
1002         * rendering/style/RenderStyle.h:
1003         * rendering/style/RenderStyle.cpp:
1004         (WebCore::RenderStyle::getRoundedBorderFor):
1005         (WebCore::RenderStyle::getRoundedInnerBorderFor):
1006         There was some very clumsy code that computed a rounded rect
1007         given the border rect and side widths. Cleaned this up by moving
1008         some code into RenderStyle. The overloaded getRoundedInnerBorderFor()
1009         which takes the border widths is used by the double and groove drawing
1010         code.
1011
1012 2011-04-19  Ryosuke Niwa  <rniwa@webkit.org>
1013
1014         Reviewed by Dimitri Glazkov.
1015
1016         REGRESSION(r74228-75294): removing nodes is 200+ times slower when selection is inside a shadow DOM
1017         https://bugs.webkit.org/show_bug.cgi?id=57061
1018
1019         The bug was caused by Range::compareNode's incorrectly returning NODE_INSIDE when the selection is inside
1020         a shadow DOM and the node is outside of the shadow DOM. This caused respondToNodeModification to call
1021         RenderView::clearSelection every time a node is removed when selection is in a shadow DOM and resulted in
1022         a significant performance regression.
1023
1024         Fixed Ranged::compareNode by making Range::compareBoundaryPoints throw a WRONG_DOCUMENT_ERR when there are
1025         no common ancestors between containerA and containerB. This will force compareNode to also throw an exception
1026         and prevents respondToNodeModification from clearing selection.
1027
1028         No new tests because this is a performance improvement and the fix in Range cannot be tested since shadow DOM
1029         isn't exposed to JavaScript.
1030
1031         * dom/Range.cpp:
1032         (WebCore::Range::setStart): Calls compareBoundaryPoints; since we ensures that the root container noes of
1033         start and end nodes are same, we should never get an exception from compareBoundaryPoints.
1034         (WebCore::Range::setEnd): Ditto.
1035         (WebCore::Range::isPointInRange): Calls compareBoundaryPoints; returns false when compareBoundaryPoints
1036         throws an exception.
1037         (WebCore::Range::comparePoint): Calls compareBoundaryPoints; exit early when an exception is thrown by
1038         compareBoundaryPoints.
1039         (WebCore::Range::compareBoundaryPoints): Throws an exception when two containers do not have a common ancestor.
1040         (WebCore::Range::boundaryPointsValid): Calls compareBoundaryPoints and checks that it didn't throw an exception.
1041         * dom/Range.h:
1042         * editing/SelectionController.cpp:
1043         (WebCore::SelectionController::respondToNodeModification):
1044         * editing/htmlediting.cpp:
1045         (WebCore::comparePositions): Calls compareBoundaryPoints.
1046         * editing/markup.cpp:
1047         (WebCore::createMarkup): Calls compareBoundaryPoints; since startNode and pastEnd are both in the same document
1048         and neither are in a shadow DOM, it should never throw an exception.
1049         * page/DOMSelection.cpp:
1050         (WebCore::DOMSelection::containsNode): Calls compareBoundaryPoints; node is fully selected only if no exception
1051         was thrown.
1052
1053 2011-04-19  Jungshik Shin  <jshin@chromium.org>
1054
1055         Reviewed by David Levin
1056
1057         Make U+FEFF be treated as a zero-width character in both
1058         simple script and complex script code paths. In Chromium
1059         Windows, UniscribeHelper needs a rather extensive changes
1060         summarized below.  Other ports need minor changes.
1061
1062         https://bugs.webkit.org/show_bug.cgi?id=48860
1063
1064         Test: fast/text/zero-width-characters-complex-script.html
1065
1066         * platform/graphics/Font.h:
1067         (WebCore::Font::treatAsZeroWidthSpace): U+FEFF is added to the list
1068         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Added. Same as the above except that ZWNJ and ZWJ are excluded.
1069         * platform/graphics/GlyphPageTreeNode.cpp:
1070         (WebCore::GlyphPageTreeNode::initializePage): U+FEFF is made to have zero-width characters in simple script (fast) code path.
1071         * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
1072         (WebCore::FontMap::getSpaceGlyph): Added to get the gid for space glyph to use in adjustSpaceAdvance when zero-width glyph character has a non-zero width and potentially 'visible' glyph.
1073         (WebCore::FontMap::FontData::FontData): spaceGlyph member added.
1074         (WebCore::getDerivedFontData): spaceGlyph is retrieved as well.
1075         * platform/graphics/chromium/FontUtilsChromiumWin.h:
1076         * platform/graphics/chromium/UniscribeHelper.cpp:
1077         (WebCore::UniscribeHelper::UniscribeHelper): m_spaceGlyph added.
1078         (WebCore::UniscribeHelper::shape): spaceGlyph is obtained stored for a font tried for each item.
1079         (WebCore::UniscribeHelper::adjustSpaceAdvances): For zero-width complex script characters, set the advance width to zero and replace a non-zero-width/visible glyph with a space glyph.
1080         (WebCore::UniscribeHelper::applySpacing):
1081         (WebCore::UniscribeHelper::containsMissingGlyphs): turned to a member function because it cannot work on glyphs alone any more but need to take into account a character corresponding to a glyph
1082         * platform/graphics/chromium/UniscribeHelper.h: 
1083         (WebCore::UniscribeHelper::Shaping::Shaping): m_spaceGlyph is added
1084         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
1085         (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun): When calling UniscriberHelper, add a new argument for spaceGlyph.
1086
1087 2011-04-19  Brent Fulgham  <bfulgham@webkit.org>
1088
1089         Reviewed by Adam Roben.
1090
1091         Extend the DIBPixelData class with the facility for writing the
1092         bitmap representation to disk for debugging purposes.
1093         https://bugs.webkit.org/show_bug.cgi?id=58862.
1094
1095         * platform/graphics/win/DIBPixelData.cpp:
1096         (WebCore::DIBPixelData::writeToFile): New function.
1097         * platform/graphics/win/DIBPixelData.h:
1098
1099 2011-04-19  Vsevolod Vlasov  <vsevik@chromium.org>
1100
1101         Reviewed by Pavel Feldman.
1102
1103         Web Inspector: Rename lengthReceived to encodedDataLength/dataLength
1104         https://bugs.webkit.org/show_bug.cgi?id=58883
1105
1106         * fileapi/FileReaderLoader.cpp:
1107         (WebCore::FileReaderLoader::didReceiveData):
1108         * inspector/InspectorInstrumentation.cpp:
1109         (WebCore::InspectorInstrumentation::didReceiveContentLengthImpl):
1110         * inspector/InspectorInstrumentation.h:
1111         (WebCore::InspectorInstrumentation::didReceiveContentLength):
1112         * inspector/InspectorResourceAgent.cpp:
1113         (WebCore::InspectorResourceAgent::didReceiveContentLength):
1114         * inspector/InspectorResourceAgent.h:
1115         * inspector/front-end/NetworkManager.js:
1116         (WebInspector.NetworkDispatcher.prototype.dataReceived):
1117         * loader/DocumentThreadableLoader.cpp:
1118         (WebCore::DocumentThreadableLoader::didReceiveData):
1119         (WebCore::DocumentThreadableLoader::didReceiveCachedMetadata):
1120         * loader/DocumentThreadableLoader.h:
1121         * loader/FrameLoaderClient.h:
1122         * loader/MainResourceLoader.cpp:
1123         (WebCore::MainResourceLoader::didReceiveData):
1124         * loader/MainResourceLoader.h:
1125         * loader/NetscapePlugInStreamLoader.cpp:
1126         (WebCore::NetscapePlugInStreamLoader::didReceiveData):
1127         * loader/NetscapePlugInStreamLoader.h:
1128         * loader/ResourceLoadNotifier.cpp:
1129         (WebCore::ResourceLoadNotifier::didReceiveData):
1130         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
1131         (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
1132         * loader/ResourceLoadNotifier.h:
1133         * loader/ResourceLoader.cpp:
1134         (WebCore::ResourceLoader::didReceiveData):
1135         * loader/ResourceLoader.h:
1136         * loader/SubresourceLoader.cpp:
1137         (WebCore::SubresourceLoader::didReceiveData):
1138         * loader/SubresourceLoader.h:
1139         * loader/SubresourceLoaderClient.h:
1140         (WebCore::SubresourceLoaderClient::didReceiveData):
1141         (WebCore::SubresourceLoaderClient::didReceiveCachedMetadata):
1142         * loader/WorkerThreadableLoader.cpp:
1143         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
1144         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveCachedMetadata):
1145         * loader/appcache/ApplicationCacheGroup.cpp:
1146         (WebCore::ApplicationCacheGroup::didReceiveData):
1147         * loader/appcache/ApplicationCacheGroup.h:
1148         * loader/appcache/ApplicationCacheHost.h:
1149         * notifications/Notification.cpp:
1150         (WebCore::Notification::didReceiveData):
1151         * notifications/Notification.h:
1152         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1153         (StreamingClient::didReceiveData):
1154         * platform/network/BlobResourceHandle.cpp:
1155         * platform/network/ResourceHandleClient.h:
1156         (WebCore::ResourceHandleClient::didReceiveData):
1157         * platform/network/android/ResourceHandleAndroid.cpp:
1158         (WebCore::SyncLoader::didReceiveData):
1159         * platform/network/cf/ResourceHandleCFNet.cpp:
1160         (WebCore::WebCoreSynchronousLoaderClient::didReceiveData):
1161         * platform/network/curl/ResourceHandleCurl.cpp:
1162         * platform/network/mac/ResourceHandleMac.mm:
1163         (WebCoreSynchronousLoaderClient::didReceiveData):
1164         * platform/network/soup/ResourceHandleSoup.cpp:
1165         * platform/network/win/ResourceHandleWin.cpp:
1166         * workers/WorkerScriptLoader.h:
1167         * xml/XMLHttpRequest.h:
1168
1169 2011-04-19  Stephen White  <senorblanco@chromium.org>
1170
1171         Reviewed by Eric Seidel.
1172
1173         Pull framebuffer clearing out into its own function.
1174         https://bugs.webkit.org/show_bug.cgi?id=58897
1175
1176         Covered by fast/canvas and canvas/philip tests.
1177
1178         * platform/graphics/gpu/DrawingBuffer.cpp:
1179         (WebCore::DrawingBuffer::clearFramebuffer):
1180         (WebCore::DrawingBuffer::reset):
1181         * platform/graphics/gpu/DrawingBuffer.h:
1182
1183 2011-04-19 Brian Salomon <bsalomon@google.com>
1184
1185         Reviewed by Eric Seidel.
1186
1187         When flushing GrContext in ~PlatformContextSkia be sure correct GL context is set
1188         https://bugs.webkit.org/show_bug.cgi?id=58788
1189
1190         Chromium browser test will be added that loads canvas page and then an 
1191         acclerated-composited page. Test must trigger ~PlatformContextSkia() 
1192         followed by invocation of GL compositor.
1193
1194         * platform/graphics/skia/PlatformContextSkia.cpp:
1195         (WebCore::PlatformContextSkia::~PlatformContextSkia):
1196
1197 2011-04-19  Csaba Osztrogonác  <ossy@webkit.org>
1198
1199         [Qt] REGRESSION(84176): http/tests/xmlhttprequest/event-listener-gc.html fails
1200         https://bugs.webkit.org/show_bug.cgi?id=58871
1201
1202         Unreviewed, rolling out r84176, r84178, r84186, r84212 and r84231.
1203         http://trac.webkit.org/changeset/84176 (original patch)
1204         http://trac.webkit.org/changeset/84178 (original patch - part 2)
1205         http://trac.webkit.org/changeset/84186 (build fix)
1206         http://trac.webkit.org/changeset/84212
1207         http://trac.webkit.org/changeset/84231 (skip failing test)
1208
1209         original bugs:
1210          - https://bugs.webkit.org/show_bug.cgi?id=58718
1211          - https://bugs.webkit.org/show_bug.cgi?id=58853
1212
1213         * bridge/qt/qt_class.cpp:
1214         (JSC::Bindings::QtClass::fallbackObject):
1215         * bridge/qt/qt_instance.cpp:
1216         (JSC::Bindings::QtInstance::removeCachedMethod):
1217         (JSC::Bindings::QtInstance::markAggregate):
1218         * bridge/qt/qt_instance.h:
1219
1220 2011-04-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1221
1222         Unreviewed, rolling out r84050.
1223         http://trac.webkit.org/changeset/84050
1224         https://bugs.webkit.org/show_bug.cgi?id=58892
1225
1226         fast/dom/HTMLKeygenElement/keygen.html is crashing on Chromium
1227         (Requested by jknotten on #webkit).
1228
1229         * dom/ContainerNode.cpp:
1230         (WebCore::ContainerNode::takeAllChildrenFrom):
1231         (WebCore::ContainerNode::removeBetween):
1232         (WebCore::ContainerNode::removeChildren):
1233         (WebCore::ContainerNode::parserAddChild):
1234         * dom/Document.cpp:
1235         (WebCore::Document::Document):
1236         (WebCore::Document::~Document):
1237         (WebCore::Document::setDocType):
1238         * dom/Element.h:
1239         * dom/Node.cpp:
1240         (WebCore::Node::treeScope):
1241         (WebCore::Node::setTreeScope):
1242         (WebCore::Node::setTreeScopeRecursively):
1243         * dom/Node.h:
1244         (WebCore::Node::document):
1245         * dom/ShadowRoot.cpp:
1246         (WebCore::ShadowRoot::ShadowRoot):
1247         * dom/ShadowRoot.h:
1248         * dom/TreeScope.cpp:
1249         (WebCore::TreeScope::TreeScope):
1250         (WebCore::TreeScope::setParentTreeScope):
1251         * dom/TreeScope.h:
1252         * rendering/RenderSlider.cpp:
1253
1254 2011-04-19  Kinuko Yasuda  <kinuko@chromium.org>
1255
1256         Not reviewed; windows build fix attempt.
1257
1258         * storage/StorageInfo.cpp:
1259         (WebCore::StorageInfo::~StorageInfo):
1260         * storage/StorageInfo.h:
1261
1262 2011-04-19  Kinuko Yasuda  <kinuko@chromium.org>
1263
1264         Reviewed by David Levin.
1265
1266         [Chromium] Enable QUOTA API at runtime if enable-quota flag is given
1267         https://bugs.webkit.org/show_bug.cgi?id=58784
1268
1269         No new tests as this does not change any functionality.
1270
1271         * bindings/generic/RuntimeEnabledFeatures.cpp:
1272         * bindings/generic/RuntimeEnabledFeatures.h:
1273         (WebCore::RuntimeEnabledFeatures::quotaEnabled):
1274         (WebCore::RuntimeEnabledFeatures::setQuotaEnabled):
1275         * page/DOMWindow.idl:
1276
1277 2011-04-19  John Gregg  <johnnyg@google.com>
1278
1279         Reviewed by Darin Fisher.
1280
1281         Enable folder drag-n-drop when using a "webkitdirectory" file input
1282         https://bugs.webkit.org/show_bug.cgi?id=58401
1283
1284         This uses a new ChromeClient API to enumerate the directory and 
1285         return all the files, as if the user had selected that directory
1286         by clicking the control in the normal way.
1287
1288         * loader/EmptyClients.h:
1289         (WebCore::EmptyChromeClient::enumerateChosenDirectory):
1290         * page/Chrome.cpp:
1291         (WebCore::Chrome::enumerateChosenDirectory):
1292         * page/Chrome.h:
1293         * page/ChromeClient.h:
1294         * platform/network/FormData.cpp:
1295         (WebCore::FormData::appendKeyValuePairItems):
1296         * rendering/RenderFileUploadControl.cpp:
1297         (WebCore::RenderFileUploadControl::receiveDropForDirectoryUpload):
1298         (WebCore::RenderFileUploadControl::receiveDroppedFiles):
1299         * rendering/RenderFileUploadControl.h:
1300
1301 2011-04-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1302
1303         Unreviewed, rolling out r84150.
1304         http://trac.webkit.org/changeset/84150
1305         https://bugs.webkit.org/show_bug.cgi?id=58875
1306
1307         Broken backspace in Search box of Web Inspector (Requested by
1308         apavlov on #webkit).
1309
1310         * inspector/front-end/inspector.js:
1311         (WebInspector.documentKeyDown):
1312
1313 2011-04-19  Andrey Adaikin  <aandrey@google.com>
1314
1315         Reviewed by Pavel Feldman.
1316
1317         Web Inspector: NPE in TextEditorModel
1318         https://bugs.webkit.org/show_bug.cgi?id=58870
1319
1320         * inspector/front-end/ResourcesPanel.js:
1321         (WebInspector.ResourcesPanel.prototype._frameAdded):
1322         * inspector/front-end/TextEditorModel.js:
1323         (WebInspector.TextEditorModel.prototype.setText):
1324
1325 2011-04-19  Hans Wennborg  <hans@chromium.org>
1326
1327         Reviewed by Tony Gentilcore.
1328
1329         IndexedDB: Remove accidental header include directive from LevelDB backend.
1330         https://bugs.webkit.org/show_bug.cgi?id=58872
1331
1332         No new functionality, no new tests.
1333
1334         * storage/IDBLevelDBBackingStore.cpp:
1335
1336 2011-04-19  Herczeg Zoltan  <zherczeg@webkit.org>
1337
1338         Build fix.
1339
1340         LEFilter change doesn't compile on ARM neon targets
1341         https://bugs.webkit.org/show_bug.cgi?id=58671
1342
1343         Thanks for Charlie Lee to fixing this.
1344
1345         * WebCore.gypi:
1346
1347 2011-04-19  Daniel Bates  <dbates@webkit.org>
1348
1349         Attempt to fix the Qt Linux Release Minimal build after changeset 84225
1350         <http://trac.webkit.org/changeset/84225> (https://bugs.webkit.org/show_bug.cgi?id=52788).
1351
1352         * dom/EventDispatcher.cpp:
1353         (WebCore::EventDispatcher::ensureEventAncestors): Add ENABLE(SVG) guards around call
1354         to Node::svgShadowHost() since this method is only defined when building with SVG enabled.
1355
1356 2011-04-18  Dominic Cooney  <dominicc@chromium.org>
1357
1358         Reviewed by Dimitri Glazkov.
1359
1360         Makes SVG shadow roots and DOM shadow roots distinct.
1361         https://bugs.webkit.org/show_bug.cgi?id=52788
1362
1363         Not a functional change. Covered by existing SVG tests.
1364
1365         * dom/EventDispatcher.cpp:
1366         (WebCore::findElementInstance):
1367         (WebCore::EventDispatcher::adjustToShadowBoundaries):
1368         (WebCore::EventDispatcher::adjustRelatedTarget):
1369         (WebCore::EventDispatcher::ensureEventAncestors):
1370         * dom/Node.cpp:
1371         (WebCore::Node::setShadowHost):
1372         (WebCore::Node::svgShadowHost):
1373         (WebCore::Node::shadowTreeRootNode):
1374         * dom/Node.h:
1375         (WebCore::Node::isSVGShadowRoot):
1376         (WebCore::Node::parentNode):
1377         (WebCore::Node::parentNodeGuaranteedHostFree):
1378         * rendering/svg/RenderSVGShadowTreeRootContainer.cpp:
1379         (WebCore::RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer):
1380         (WebCore::RenderSVGShadowTreeRootContainer::updateFromElement):
1381         * rendering/svg/SVGShadowTreeElements.cpp:
1382         (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement):
1383         (WebCore::SVGShadowTreeRootElement::create):
1384         (WebCore::SVGShadowTreeRootElement::attachElement):
1385         (WebCore::SVGShadowTreeRootElement::clearSVGShadowHost):
1386         * rendering/svg/SVGShadowTreeElements.h:
1387         (WebCore::SVGShadowTreeRootElement::isSVGShadowRoot):
1388         * svg/SVGStyledElement.cpp:
1389         (WebCore::SVGStyledElement::title):
1390
1391 2011-04-18  Taiju TSUIKI  <develop@tzik.jp>
1392
1393         Reviewed by Darin Fisher.
1394
1395         Vendor-prefix requestFileSystem in FileSystem API
1396         https://bugs.webkit.org/show_bug.cgi?id=58517
1397
1398         Prefix from:
1399         - window.requestFileSystem to window.webkitRequestFileSystem
1400         - window.resolveLocalFileSystemURL to window.webkitResolveLocalFileSystemURL
1401         - window.Flags to window.WebKitFlags
1402         - WorkerContext.requestFileSystem to WorkerContext.webkitRequestFileSystem
1403         - WorkerContext.resolveLocalFileSystemURL to WorkerContext.webkitResolveLocalFileSystemURL
1404         - WorkerContext.Flags to WorkerContext.WebKitFlags
1405
1406         * CMakeLists.txt:
1407         * CodeGenerators.pri:
1408         * DerivedSources.cpp:
1409         * DerivedSources.make:
1410         * GNUmakefile.list.am:
1411         * WebCore.gypi:
1412         * WebCore.pro:
1413         * WebCore.vcproj/WebCore.vcproj:
1414         * WebCore.xcodeproj/project.pbxproj:
1415         * bindings/js/JSDirectoryEntryCustom.cpp:
1416         (WebCore::JSDirectoryEntry::getFile):
1417         (WebCore::JSDirectoryEntry::getDirectory):
1418         * bindings/js/JSDirectoryEntrySyncCustom.cpp:
1419         (WebCore::getFlags):
1420         (WebCore::JSDirectoryEntrySync::getFile):
1421         (WebCore::JSDirectoryEntrySync::getDirectory):
1422         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
1423         (WebCore::V8DirectoryEntry::getDirectoryCallback):
1424         (WebCore::V8DirectoryEntry::getFileCallback):
1425         * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
1426         (WebCore::getFlags):
1427         (WebCore::V8DirectoryEntrySync::getDirectoryCallback):
1428         (WebCore::V8DirectoryEntrySync::getFileCallback):
1429         * fileapi/DOMFileSystemBase.cpp:
1430         (WebCore::DOMFileSystemBase::getFile):
1431         (WebCore::DOMFileSystemBase::getDirectory):
1432         * fileapi/DOMFileSystemBase.h:
1433         * fileapi/DirectoryEntry.cpp:
1434         (WebCore::DirectoryEntry::getFile):
1435         (WebCore::DirectoryEntry::getDirectory):
1436         * fileapi/DirectoryEntry.h:
1437         * fileapi/DirectoryEntry.idl:
1438         * fileapi/DirectoryEntrySync.cpp:
1439         (WebCore::DirectoryEntrySync::getFile):
1440         (WebCore::DirectoryEntrySync::getDirectory):
1441         * fileapi/DirectoryEntrySync.h:
1442         * fileapi/DirectoryEntrySync.idl:
1443         * fileapi/WebKitFlags.h: Renamed from Source/WebCore/fileapi/Flags.h.
1444         (WebCore::WebKitFlags::create):
1445         (WebCore::WebKitFlags::isCreate):
1446         (WebCore::WebKitFlags::setCreate):
1447         (WebCore::WebKitFlags::isExclusive):
1448         (WebCore::WebKitFlags::setExclusive):
1449         (WebCore::WebKitFlags::WebKitFlags):
1450         * fileapi/WebKitFlags.idl: Renamed from Source/WebCore/fileapi/Flags.idl.
1451         * page/DOMWindow.cpp:
1452         (WebCore::DOMWindow::webkitRequestFileSystem):
1453         (WebCore::DOMWindow::webkitResolveLocalFileSystemURL):
1454         * page/DOMWindow.h:
1455         * page/DOMWindow.idl:
1456         * workers/WorkerContext.cpp:
1457         (WebCore::WorkerContext::webkitRequestFileSystem):
1458         (WebCore::WorkerContext::webkitRequestFileSystemSync):
1459         (WebCore::WorkerContext::webkitResolveLocalFileSystemURL):
1460         (WebCore::WorkerContext::webkitResolveLocalFileSystemSyncURL):
1461         * workers/WorkerContext.h:
1462         * workers/WorkerContext.idl:
1463
1464 2011-04-18  Steve Lacey  <sjl@chromium.org>
1465
1466         Reviewed by Dimitri Glazkov.
1467
1468         Decouple media controls usage from implementation.
1469         This allows each port to implement thier own controls in a different
1470         manner to the default webkit implementation.
1471
1472         Convert media controls hooks to a client interface
1473         https://bugs.webkit.org/show_bug.cgi?id=58346
1474
1475         No new tests as there is no functional change.
1476
1477         * Android.mk:
1478         * CMakeLists.txt:
1479         * GNUmakefile.list.am:
1480         * WebCore.gypi:
1481         * WebCore.pro:
1482         * WebCore.vcproj/WebCore.vcproj:
1483         * WebCore.xcodeproj/project.pbxproj:
1484         * html/HTMLMediaElement.cpp:
1485         (WebCore::HTMLMediaElement::mediaControls):
1486         (WebCore::HTMLMediaElement::ensureMediaControls):
1487         (WebCore::HTMLMediaElement::preDispatchEventHandler):
1488         * html/HTMLMediaElement.h:
1489         * html/shadow/MediaControlElements.cpp:
1490         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement):
1491         (WebCore::MediaControlPanelMuteButtonElement::create):
1492         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
1493         (WebCore::MediaControlTimelineElement::create):
1494         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
1495         (WebCore::MediaControlFullscreenButtonElement::create):
1496         * html/shadow/MediaControlElements.h:
1497         * html/shadow/MediaControlRootElement.cpp:
1498         (WebCore::MediaControlRootElement::MediaControlRootElement):
1499         (WebCore::MediaControls::create):
1500         * html/shadow/MediaControlRootElement.h:
1501         * html/shadow/MediaControls.cpp: Added.
1502         (WebCore::MediaControls::MediaControls):
1503         * html/shadow/MediaControls.h: Added.
1504         (WebCore::MediaControls::~MediaControls):
1505
1506 2011-04-18  Pascal Massimino  <pascal.massimino@gmail.com>
1507
1508         Reviewed by Adam Barth.
1509
1510         Add incremental decoding to WebP decoder
1511         https://bugs.webkit.org/show_bug.cgi?id=58851
1512
1513         No new tests, as it's not possible for the layout test framework to
1514         force the decoders to decode incrementally.
1515
1516         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1517         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
1518         (WebCore::WEBPImageDecoder::decode):
1519         * platform/image-decoders/webp/WEBPImageDecoder.h:
1520
1521 2011-04-18  Daniel Bates  <dbates@rim.com>
1522
1523         Reviewed by Adam Roben.
1524
1525         With PAN_SCROLLING, mousedown events for a mouse button aren't dispatched while
1526         pressing-and-holding another mouse button
1527         https://bugs.webkit.org/show_bug.cgi?id=58700
1528
1529         Fixes an issue where mousedown events weren't dispatched when pressing a mouse button A
1530         while pressing and holding a mouse button B, where A != B. This issue only affects builds
1531         that enable PAN_SCROLLING.
1532
1533         On mouse press with autoscroll in progress (m_autoscrollInProgress == true) we stopped
1534         the autoscroll timer, invalidated the click, and swallowed the mouse press. Instead, we
1535         should only stop the autoscroll timer.
1536
1537         Test: fast/events/fire-mousedown-while-pressing-mouse-button.html
1538
1539         * page/EventHandler.cpp:
1540         (WebCore::EventHandler::handleMousePressEvent):
1541
1542 2011-04-18  Jon Lee  <jonlee@apple.com>
1543
1544         Reviewed by Maciej Stachowiak.
1545
1546         With overlay scrollbars, textarea resize corner gains borders when the textarea becomes scrollable
1547         https://bugs.webkit.org/show_bug.cgi?id=58617
1548         <rdar://problem/9048012>
1549
1550         * rendering/RenderLayer.cpp:
1551         (WebCore::RenderLayer::paintResizer): Check for overlay scrollbars first, and then if the bars were created, before displaying the borders
1552
1553 2011-04-18  Jon Lee  <jonlee@apple.com>
1554
1555         Reviewed by Maciej Stachowiak.
1556
1557         Selected item background in list box gets rendered on top of overlay scrollbar knob (58824)
1558         https://bugs.webkit.org/show_bug.cgi?id=58824
1559         <rdar://problem/9292680>
1560
1561         * rendering/RenderListBox.cpp:
1562         (WebCore::RenderListBox::paintObject): Moving the stage of painting the scrollbars to the foreground if using overlay scrollbars
1563
1564 2011-04-18  John Bauman  <jbauman@chromium.org>
1565
1566         Reviewed by Kenneth Russell.
1567
1568         Don't cast BitmapImageSingleFrameSkia to BitmapImage
1569         https://bugs.webkit.org/show_bug.cgi?id=58821
1570
1571         BitmapImageSingleFrameSkia has isBitmap return true, but
1572         can't be cast to a BitmapImage. Instead of using BitmapImage,
1573         use isOpaque from SkBitmap to determine if the image has alpha.
1574
1575         No new tests.
1576
1577         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
1578         (WebCore::GraphicsContext3D::getImageData):
1579
1580 2011-04-18  Jessie Berlin  <jberlin@apple.com>
1581
1582         Reviewed by Steve Falkenburg.
1583
1584         If deleting the StorageTracker.db file fails, local storage is left in a strange state.
1585         https://bugs.webkit.org/show_bug.cgi?id=58805
1586
1587         * storage/StorageTracker.cpp:
1588         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
1589         When cleaning up the StorageTracker.db file, is not enough to call syncDeleteOrigin.
1590         deleteOrigin itself must be called to update the data structures that syncDeleteOrigin
1591         depends on and to prevent clashes between a theoretical web page editing local storage
1592         at the same time this method is called.
1593         (WebCore::StorageTracker::syncDeleteAllOrigins):
1594         If it is not possible to delete the StorageTracker.db file, empty it.
1595         (WebCore::StorageTracker::deleteOriginOnMainThread):
1596         Wrapper for deleteOrigin.
1597         * storage/StorageTracker.h:
1598
1599 2011-04-18  Geoffrey Garen  <ggaren@apple.com>
1600
1601         Build fix.
1602
1603         Added back missing #include.
1604
1605         * bindings/js/DOMWrapperWorld.cpp:
1606
1607 2011-04-18  Enrica Casucci  <enrica@apple.com>
1608
1609         Reviewed by Maciej Stachowiak.
1610
1611         Dropping a file in a WKView (WebKit2) doesn't load the file.
1612         https://bugs.webkit.org/show_bug.cgi?id=58842
1613         <rdar://problem/8514409>
1614         
1615         The URL string for the file contains an extra %00 at the end
1616         that causes the network framework to fail to load the file.
1617         
1618         * platform/win/ClipboardUtilitiesWin.cpp:
1619         (WebCore::getURL):
1620
1621 2011-04-18  Geoffrey Garen  <ggaren@apple.com>
1622
1623         Discovered and rubber-stamped by Stephanie Lewis.
1624
1625         Restored some code I accidentally deleted in <http://trac.webkit.org/changeset/83990>
1626
1627         * bindings/js/DOMWrapperWorld.cpp:
1628         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
1629         (WebCore::DOMWrapperWorld::clearWrappers): Do clear / destroy all our
1630         window shells when clearing / destroying ourselves. r83990 removed this
1631         behavior for documents since there are no per-document maps anymore,
1632         but removing this behavior for window shells too was a typo.
1633
1634 2011-04-18  Geoffrey Garen  <ggaren@apple.com>
1635
1636         Reviewed by Oliver Hunt.
1637
1638         Made DOM handle ownership customizable, and customized it for Nodes and NamedAttrMaps
1639         https://bugs.webkit.org/show_bug.cgi?id=58828
1640
1641         * WebCore.exp.in: Blah.
1642
1643         * bindings/js/DOMWrapperWorld.cpp: Moved code related to JSNode ownership
1644         to JSNodeCustom, where other custom JSNode-related code goes.
1645
1646         (WebCore::JSDOMWrapperOwner::finalize):
1647         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
1648         * bindings/js/DOMWrapperWorld.h:
1649         (WebCore::JSDOMWrapperOwner::JSDOMWrapperOwner):
1650         (WebCore::DOMWrapperWorld::defaultWrapperOwner): Renamed DOMObjectHandleOwner
1651         to JSDOMWrapperOwner, to match the name of JSDOMWrapper.
1652
1653         * bindings/js/JSArrayBufferViewHelper.h:
1654         (WebCore::toJSArrayBufferView):
1655         * bindings/js/JSCSSRuleCustom.cpp:
1656         (WebCore::toJS):
1657         * bindings/js/JSCSSValueCustom.cpp:
1658         (WebCore::toJS):
1659         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1660         (WebCore::toJS): Removed "DOMObject" and "Node" from the names of wrapper-
1661         related functions, since there is no meaningful distinction between the
1662         two anymore -- they both use the same extensible interface.
1663         
1664         * bindings/js/JSDOMBinding.cpp: Removed some now-unused functions.
1665
1666         * bindings/js/JSDOMBinding.h:
1667         (WebCore::getInlineCachedWrapper):
1668         (WebCore::setInlineCachedWrapper):
1669         (WebCore::clearInlineCachedWrapper):
1670         (WebCore::wrapperOwner):
1671         (WebCore::wrapperContext):
1672         (WebCore::getCachedWrapper):
1673         (WebCore::cacheWrapper):
1674         (WebCore::uncacheWrapper):
1675         (WebCore::createWrapper):
1676         (WebCore::wrap): Created a generic, extensible mechanism for creating,
1677         caching, retrieving, marking, and destroying DOM wrappers. This eliminates
1678         the difference between DOM object wrappers and DOM node wrappers, and
1679         lays the groundwork for getting rid of MarkStack::deprecatedAppend usage
1680         for marking the remainder of our DOM objects.
1681         
1682         * bindings/js/JSDOMWindowCustom.cpp:
1683         (WebCore::JSDOMWindow::history):
1684         (WebCore::JSDOMWindow::location):
1685         * bindings/js/JSDataViewCustom.cpp:
1686         (WebCore::toJS):
1687         * bindings/js/JSDocumentCustom.cpp:
1688         (WebCore::JSDocument::location):
1689         (WebCore::toJS):
1690         * bindings/js/JSElementCustom.cpp:
1691         (WebCore::toJSNewlyCreated):
1692         * bindings/js/JSEventCustom.cpp:
1693         (WebCore::toJS):
1694         * bindings/js/JSHTMLCollectionCustom.cpp:
1695         (WebCore::toJS):
1696         * bindings/js/JSImageDataCustom.cpp:
1697         (WebCore::toJS): Updated for renames mentioned above.
1698
1699         * bindings/js/JSNamedNodeMapCustom.cpp:
1700         (WebCore::JSNamedNodeMapOwner::isReachableFromOpaqueRoots):
1701         (WebCore::JSNamedNodeMapOwner::finalize):
1702         (WebCore::wrapperOwner):
1703         (WebCore::wrapperContext):
1704         (WebCore::JSNamedNodeMap::markChildren):
1705         (WebCore::toJS): Updated to use our new interface for customizing wrapper
1706         lifetime management through function overloading without using
1707         MarkStack::deprecatedAppend.
1708
1709         * bindings/js/JSNodeCustom.cpp:
1710         (WebCore::isObservable):
1711         (WebCore::isReachableFromDOM):
1712         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
1713         (WebCore::JSNodeOwner::finalize):
1714         (WebCore::createWrapperInline): Moved node-related code from JSDOMBinding
1715         to here. Removed special case marking code for JSNamedNodeMap because
1716         JSNamedNodeMap now knows how to maintain its own lifetime invariants.
1717
1718         * bindings/js/JSNodeCustom.h:
1719         (WebCore::wrapperOwner):
1720         (WebCore::wrapperContext):
1721         (WebCore::getInlineCachedWrapper):
1722         (WebCore::setInlineCachedWrapper):
1723         (WebCore::clearInlineCachedWrapper):
1724         (WebCore::toJS): Updated to use our new interface for customizing wrapper
1725         lifetime management through function overloading without using
1726         MarkStack::deprecatedAppend or special-case code for nodes.
1727         
1728         * bindings/js/JSSVGPathSegCustom.cpp:
1729         (WebCore::toJS):
1730         * bindings/js/JSStyleSheetCustom.cpp:
1731         (WebCore::toJS): Updated for renames mentioned above.
1732
1733         * bindings/scripts/CodeGeneratorJS.pm: Fixed up newlines. Updated for
1734         renames mentioned above.
1735
1736         * dom/NamedNodeMap.idl: NamedNodeMap needs a custom toJS function now
1737         because it needs to provide a custom WeakHandleOwner at wrapper creation time.
1738
1739 2011-04-18  Jessie Berlin  <jberlin@apple.com>
1740
1741         Rubber-stamped by Sam Weinig.
1742
1743         REGRESSION (r84094): Many tests failing assertions in WebCore::localizedString on Windows.
1744         https://bugs.webkit.org/show_bug.cgi?id=58747
1745
1746         Copy the WebCore Localizable.strings file into the output directory.
1747
1748         * WebCore.vcproj/WebCoreGenerated.vcproj:
1749         * WebCore.vcproj/WebCoreGeneratedCairo.vsprops:
1750         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops:
1751         * WebCore.vcproj/copyInspectorFiles.cmd: Removed.
1752         * WebCore.vcproj/copyWebCoreResourceFiles.cmd: Copied from Source/WebCore/WebCore.vcproj/copyInspectorFiles.cmd.
1753
1754 2011-04-18  Robert Hogan  <robert@webkit.org>
1755
1756         Reviewed by Andreas Kling.
1757
1758         [Qt] PluginViewQt needs to update geometry of plugin widget before scheduling a repaint
1759
1760         When scheduling a repaint for the plugin's widget, PluginViewQt
1761         needs to make sure the widget's geometry is up to date. Otherwise
1762         the paint event happens on the widget's old location.
1763
1764         https://bugs.webkit.org/show_bug.cgi?id=57179
1765
1766         Added a manual test. 
1767
1768         * manual-tests/qt/plugin-painting.html: Added.
1769         * plugins/qt/PluginViewQt.cpp:
1770         (WebCore::PluginView::updatePluginWidget):
1771         (WebCore::PluginView::invalidateRect):
1772
1773 2011-04-18  Oliver Hunt  <oliver@apple.com>
1774
1775         Fix Qt build
1776
1777         * bridge/qt/qt_class.cpp:
1778         (JSC::Bindings::QtClass::fallbackObject):
1779         * bridge/qt/qt_instance.cpp:
1780         (JSC::Bindings::QtInstance::removeCachedMethod):
1781         * bridge/qt/qt_instance.h:
1782
1783 2011-04-18  Oliver Hunt  <oliver@apple.com>
1784
1785         Reviewed by Gavin Barraclough.
1786
1787         Remove DeprecatedPtr
1788         https://bugs.webkit.org/show_bug.cgi?id=58718
1789
1790         Replace use of DeprecatedPtr<> with Global<> as ownership rules
1791         aren't obvious, have filed bug #58820 on seeing if this is safe.
1792
1793         * bridge/qt/qt_class.cpp:
1794         (JSC::Bindings::QtClass::fallbackObject):
1795         * bridge/qt/qt_instance.cpp:
1796         (JSC::Bindings::QtInstance::removeCachedMethod):
1797         (JSC::Bindings::QtInstance::markAggregate):
1798         * bridge/qt/qt_instance.h:
1799
1800 2011-04-14  Matthew Delaney  <mdelaney@apple.com>
1801
1802         Reviewed by Simon Fraser.
1803
1804         [CG] Use vImage (un)premultiplyImageData functions for get/putImageData with IOSurfaces
1805         https://bugs.webkit.org/show_bug.cgi?id=58088
1806
1807         * platform/graphics/cg/ImageBufferDataCG.cpp:
1808         (WebCore::convertScanline): un/premultiplies and converts a scanline of image data from/to BGRA to/from RGBA
1809         (WebCore::unpremultitplyScanline):
1810         (WebCore::premultitplyScanline):
1811         (WebCore::ImageBufferData::getData):
1812         (WebCore::ImageBufferData::putData):
1813
1814 2011-04-18  Jeff Miller  <jeffm@apple.com>
1815
1816         Reviewed by Dan Bernstein.
1817
1818         Allow all log channels to be initialized from WebCoreLogLevel Windows environment variable
1819         https://bugs.webkit.org/show_bug.cgi?id=58811
1820
1821         * platform/win/LoggingWin.cpp:
1822         (WebCore::InitializeLoggingChannelsIfNecessary): Support initializing LogResourceLoading, LogProgress, and LogFileAPI from WebCoreLogLevel Windows environment variable.
1823
1824 2011-04-18  Andrew Scherkus  <scherkus@chromium.org>
1825
1826         Reviewed by Eric Seidel.
1827
1828         Reset fullscreen element reference when leaving fullscreen mode and some other cleanup.
1829
1830         https://bugs.webkit.org/show_bug.cgi?id=58719
1831
1832         Test: fullscreen/full-screen-cancel.html
1833
1834         * dom/Document.cpp:
1835         (WebCore::Document::Document): Remove m_isFullscreen.
1836         (WebCore::Document::webkitWillEnterFullScreenForElement):
1837         (WebCore::Document::webkitWillExitFullScreenForElement): Remove duplicate call to setAnimating().
1838         (WebCore::Document::webkitDidExitFullScreenForElement): Reset m_fullScreenElement reference.
1839         * dom/Document.h:
1840         (WebCore::Document::webkitIsFullScreen): Use m_fullScreenElement instead of m_isFullscreen.
1841         (WebCore::Document::webkitFullScreenKeyboardInputAllowed): Ditto.
1842
1843 2011-04-18  Dan Bernstein  <mitz@apple.com>
1844
1845         Reviewed by Eric Seidel.
1846
1847         <rdar://problem/9282486> REGRESSION (r81992): Facebook photo tags can get cut off when moving the mouse.
1848         https://bugs.webkit.org/show_bug.cgi?id=58500
1849
1850         Test: fast/repaint/text-in-relative-positioned-inline.html
1851
1852         * rendering/RenderText.cpp:
1853         (WebCore::RenderText::clippedOverflowRectForRepaint): Use the container’s repaint rect, not
1854         the containing block’s. This matters when the containing block is outside the RenderText’s
1855         enclosing layer, as is the case here.
1856
1857 2011-04-15  Stephen White  <senorblanco@chromium.org>
1858
1859         Reviewed by Kenneth Russell.
1860
1861         Speed up DrawingBuffer::reset().
1862         https://bugs.webkit.org/show_bug.cgi?id=58706
1863
1864         When DrawingBuffer::reset() is called, it should not reallocate
1865         the FBOs if the size has not changed.  It should just do a glClear().
1866
1867         Covered by tests in fast/canvas and canvas/philip.
1868
1869         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1870         (WebCore::DrawingBuffer::DrawingBuffer):
1871         Initialize the size to -1, -1, so the size change check will work on
1872         first reset.
1873         * platform/graphics/gpu/DrawingBuffer.cpp:
1874         (WebCore::DrawingBuffer::reset):
1875         If the size hasn't changed, don't resize the FBOs.  Just clear the
1876         relevant buffers.
1877
1878 2011-04-18  Pavel Feldman  <pfeldman@google.com>
1879
1880         Reviewed by Yury Semikhatsky.
1881
1882         Web Inspector: group resources by type in the resources panel.
1883         https://bugs.webkit.org/show_bug.cgi?id=58796
1884
1885         * inspector/front-end/ResourcesPanel.js:
1886         (WebInspector.ResourcesPanel.prototype._frameAdded):
1887         (WebInspector.ResourcesPanel.prototype._resourceAdded):
1888         (WebInspector.BaseStorageTreeElement):
1889         (WebInspector.BaseStorageTreeElement.prototype.onattach):
1890         (WebInspector.StorageCategoryTreeElement):
1891         (WebInspector.FrameTreeElement):
1892         (WebInspector.FrameTreeElement.prototype.setTitles):
1893         (WebInspector.FrameTreeElement.prototype.set hovered):
1894         (WebInspector.FrameTreeElement.prototype.appendResource):
1895         (WebInspector.FrameTreeElement.prototype.appendChild):
1896         (WebInspector.FrameTreeElement.prototype._insertInPresentationOrder):
1897         (WebInspector.FrameTreeElement.prototype._insertInPresentationOrder.compare):
1898
1899 2011-04-18  Timothy Hatcher  <timothy@apple.com>
1900
1901         Make update-webkit-localizable-strings put WebKit/win strings in WebCore
1902         now that all localized strings in WebKit/win use WEB_UI_STRING.
1903
1904         https://webkit.org/b/58747
1905
1906         Reviewed by Dan Bernstein.
1907
1908         * English.lproj/Localizable.strings: Updated with strings from WebKit/win.
1909
1910 2011-04-15  MORITA Hajime  <morrita@google.com>
1911
1912         Reviewed by Adam Barth.
1913
1914         REGRESSION: <progress> doesn't animate if it doesn't have value
1915         https://bugs.webkit.org/show_bug.cgi?id=58693
1916
1917         The initial value of RenderProgress::m_position is accidentally same as
1918         the indeterminate value, that makes update code on updateFromElement() skipped.
1919         This change set unique invalid value for the initial value of m_position.
1920         
1921         No new tests. Testing animated bar is not possible with DRT.
1922
1923         * html/HTMLProgressElement.cpp:
1924         (WebCore::HTMLProgressElement::position):
1925         * html/HTMLProgressElement.h:
1926         * rendering/RenderProgress.cpp:
1927         (WebCore::RenderProgress::RenderProgress):
1928         (WebCore::RenderProgress::isDeterminate):
1929
1930 2011-04-18  MORITA Hajime  <morrita@google.com>
1931
1932         Reviewed by Eric Seidel.
1933
1934         REGRESSION: [Chromium Win] details-add-summary-1.html start crashing after r84039
1935         https://bugs.webkit.org/show_bug.cgi?id=58791
1936         
1937         On refreshMainSummary(), findMainSummary() possibly releases oldSummary.
1938         We should guard it again RefPtr.
1939
1940         * html/HTMLDetailsElement.cpp:
1941         (WebCore::HTMLDetailsElement::refreshMainSummary):
1942
1943 2011-04-18  Antti Koivisto  <antti@apple.com>
1944
1945         Reviewed by Simon Fraser.
1946
1947         CSSSelector double frees
1948         https://bugs.webkit.org/show_bug.cgi?id=56124
1949         <rdar://problem/9119036>
1950
1951         In all stacks this is occuring when the document is kept alive by the guard ref only
1952         and the node holding it is deleted.
1953
1954         As a speculative fix, clear the document stylesheets when it turns into a guard ref zombie.
1955         This has a pretty good chance of fixing the actual bug. At minimum it will move the
1956         crash to an earlier, more easily traceble point.
1957
1958         No tests, crash stacks only, no idea how to reproduce.
1959
1960         * dom/Document.cpp:
1961         (WebCore::Document::removedLastRef):
1962
1963 2011-04-18  Alexander Pavlov  <apavlov@chromium.org>
1964
1965         Reviewed by Yury Semikhatsky.
1966
1967         Web Inspector: Backspace in the Console is broken
1968         https://bugs.webkit.org/show_bug.cgi?id=58764
1969
1970         * inspector/front-end/inspector.js:
1971         (WebInspector.documentKeyDown):
1972
1973 2011-04-18  Hans Wennborg  <hans@chromium.org>
1974
1975         Reviewed by Steve Block.
1976
1977         LevelDB backend for IndexedDB
1978         https://bugs.webkit.org/show_bug.cgi?id=57372
1979
1980         Only available behind a run-time flag. Covered by existing layout
1981         tests.
1982
1983         * Android.mk:
1984         * CMakeLists.txt:
1985         * GNUmakefile.am:
1986         * GNUmakefile.list.am:
1987         * WebCore.gyp/WebCore.gyp:
1988         * WebCore.gypi:
1989         * WebCore.pri:
1990         * WebCore.pro:
1991         * WebCore.xcodeproj/project.pbxproj:
1992         * platform/leveldb/LevelDBComparator.h: Added.
1993         (WebCore::LevelDBComparator::~LevelDBComparator):
1994         * platform/leveldb/LevelDBDatabase.cpp: Added.
1995         (WebCore::makeSlice):
1996         (WebCore::makeLevelDBSlice):
1997         (WebCore::makeVector):
1998         (WebCore::LevelDBDatabase::LevelDBDatabase):
1999         (WebCore::LevelDBDatabase::~LevelDBDatabase):
2000         (WebCore::LevelDBDatabase::open):
2001         (WebCore::LevelDBDatabase::put):
2002         (WebCore::LevelDBDatabase::remove):
2003         (WebCore::LevelDBDatabase::get):
2004         (WebCore::LevelDBDatabase::newIterator):
2005         * platform/leveldb/LevelDBDatabase.h: Added.
2006         * platform/leveldb/LevelDBIterator.cpp: Added.
2007         (WebCore::LevelDBIterator::~LevelDBIterator):
2008         (WebCore::LevelDBIterator::LevelDBIterator):
2009         (WebCore::makeSlice):
2010         (WebCore::makeLevelDBSlice):
2011         (WebCore::LevelDBIterator::isValid):
2012         (WebCore::LevelDBIterator::seekToLast):
2013         (WebCore::LevelDBIterator::seek):
2014         (WebCore::LevelDBIterator::next):
2015         (WebCore::LevelDBIterator::prev):
2016         (WebCore::LevelDBIterator::key):
2017         (WebCore::LevelDBIterator::value):
2018         * platform/leveldb/LevelDBIterator.h: Added.
2019         * platform/leveldb/LevelDBSlice.h: Added.
2020         (WebCore::LevelDBSlice::LevelDBSlice):
2021         (WebCore::LevelDBSlice::~LevelDBSlice):
2022         (WebCore::LevelDBSlice::begin):
2023         (WebCore::LevelDBSlice::end):
2024         * storage/IDBLevelDBBackingStore.cpp:
2025         (WebCore::encodeByte):
2026         (WebCore::maxIDBKey):
2027         (WebCore::minIDBKey):
2028         (WebCore::encodeInt):
2029         (WebCore::decodeInt):
2030         (WebCore::encodeVarInt):
2031         (WebCore::decodeVarInt):
2032         (WebCore::encodeString):
2033         (WebCore::decodeString):
2034         (WebCore::encodeStringWithLength):
2035         (WebCore::decodeStringWithLength):
2036         (WebCore::encodeDouble):
2037         (WebCore::decodeDouble):
2038         (WebCore::encodeIDBKey):
2039         (WebCore::decodeIDBKey):
2040         (WebCore::extractEncodedIDBKey):
2041         (WebCore::compareEncodedIDBKeys):
2042         (WebCore::getInt):
2043         (WebCore::putInt):
2044         (WebCore::getString):
2045         (WebCore::putString):
2046         (WebCore::KeyPrefix::SchemaVersionKey::encode):
2047         (WebCore::KeyPrefix::MaxDatabaseIdKey::encode):
2048         (WebCore::KeyPrefix::DatabaseFreeListKey::DatabaseFreeListKey):
2049         (WebCore::KeyPrefix::DatabaseFreeListKey::decode):
2050         (WebCore::KeyPrefix::DatabaseFreeListKey::encode):
2051         (WebCore::KeyPrefix::DatabaseFreeListKey::databaseId):
2052         (WebCore::KeyPrefix::DatabaseFreeListKey::compare):
2053         (WebCore::KeyPrefix::DatabaseNameKey::decode):
2054         (WebCore::KeyPrefix::DatabaseNameKey::encode):
2055         (WebCore::KeyPrefix::DatabaseNameKey::origin):
2056         (WebCore::KeyPrefix::DatabaseNameKey::databaseName):
2057         (WebCore::KeyPrefix::DatabaseNameKey::compare):
2058         (WebCore::KeyPrefix::DatabaseMetaDataKey::encode):
2059         (WebCore::KeyPrefix::ObjectStoreMetaDataKey::ObjectStoreMetaDataKey):
2060         (WebCore::KeyPrefix::ObjectStoreMetaDataKey::decode):
2061         (WebCore::KeyPrefix::ObjectStoreMetaDataKey::encode):
2062         (WebCore::KeyPrefix::ObjectStoreMetaDataKey::objectStoreId):
2063         (WebCore::KeyPrefix::ObjectStoreMetaDataKey::metaDataType):
2064         (WebCore::KeyPrefix::ObjectStoreMetaDataKey::compare):
2065         (WebCore::KeyPrefix::IndexMetaDataKey::IndexMetaDataKey):
2066         (WebCore::KeyPrefix::IndexMetaDataKey::decode):
2067         (WebCore::KeyPrefix::IndexMetaDataKey::encode):
2068         (WebCore::KeyPrefix::IndexMetaDataKey::compare):
2069         (WebCore::KeyPrefix::IndexMetaDataKey::indexId):
2070         (WebCore::KeyPrefix::IndexMetaDataKey::metaDataType):
2071         (WebCore::KeyPrefix::ObjectStoreFreeListKey::ObjectStoreFreeListKey):
2072         (WebCore::KeyPrefix::ObjectStoreFreeListKey::decode):
2073         (WebCore::KeyPrefix::ObjectStoreFreeListKey::encode):
2074         (WebCore::KeyPrefix::ObjectStoreFreeListKey::objectStoreId):
2075         (WebCore::KeyPrefix::ObjectStoreFreeListKey::compare):
2076         (WebCore::KeyPrefix::IndexFreeListKey::IndexFreeListKey):
2077         (WebCore::KeyPrefix::IndexFreeListKey::decode):
2078         (WebCore::KeyPrefix::IndexFreeListKey::encode):
2079         (WebCore::KeyPrefix::IndexFreeListKey::compare):
2080         (WebCore::KeyPrefix::IndexFreeListKey::objectStoreId):
2081         (WebCore::KeyPrefix::IndexFreeListKey::indexId):
2082         (WebCore::KeyPrefix::ObjectStoreNamesKey::decode):
2083         (WebCore::KeyPrefix::ObjectStoreNamesKey::encode):
2084         (WebCore::KeyPrefix::ObjectStoreNamesKey::compare):
2085         (WebCore::KeyPrefix::ObjectStoreNamesKey::objectStoreName):
2086         (WebCore::KeyPrefix::IndexNamesKey::IndexNamesKey):
2087         (WebCore::KeyPrefix::IndexNamesKey::decode):
2088         (WebCore::KeyPrefix::IndexNamesKey::encode):
2089         (WebCore::KeyPrefix::IndexNamesKey::compare):
2090         (WebCore::KeyPrefix::IndexNamesKey::indexName):
2091         (WebCore::KeyPrefix::ObjectStoreDataKey::decode):
2092         (WebCore::KeyPrefix::ObjectStoreDataKey::encode):
2093         (WebCore::KeyPrefix::ObjectStoreDataKey::compare):
2094         (WebCore::KeyPrefix::ObjectStoreDataKey::userKey):
2095         (WebCore::KeyPrefix::ExistsEntryKey::decode):
2096         (WebCore::KeyPrefix::ExistsEntryKey::encode):
2097         (WebCore::KeyPrefix::ExistsEntryKey::compare):
2098         (WebCore::KeyPrefix::ExistsEntryKey::userKey):
2099         (WebCore::KeyPrefix::IndexDataKey::IndexDataKey):
2100         (WebCore::KeyPrefix::IndexDataKey::decode):
2101         (WebCore::KeyPrefix::IndexDataKey::encode):
2102         (WebCore::KeyPrefix::IndexDataKey::encodeMaxKey):
2103         (WebCore::KeyPrefix::IndexDataKey::compare):
2104         (WebCore::KeyPrefix::IndexDataKey::databaseId):
2105         (WebCore::KeyPrefix::IndexDataKey::objectStoreId):
2106         (WebCore::KeyPrefix::IndexDataKey::indexId):
2107         (WebCore::KeyPrefix::IndexDataKey::userKey):
2108         (WebCore::KeyPrefix::realCompare):
2109         (WebCore::KeyPrefix::compareKeys):
2110         (WebCore::KeyPrefix::compareIndexKeys):
2111         (WebCore::KeyPrefix::Comparator::compare):
2112         (WebCore::KeyPrefix::Comparator::name):
2113         (WebCore::setUpMetadata):
2114         (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore):
2115         (WebCore::IDBLevelDBBackingStore::open):
2116         (WebCore::IDBLevelDBBackingStore::extractIDBDatabaseMetaData):
2117         (WebCore::getNewDatabaseId):
2118         (WebCore::IDBLevelDBBackingStore::setIDBDatabaseMetaData):
2119         (WebCore::IDBLevelDBBackingStore::getObjectStores):
2120         (WebCore::getNewObjectStoreId):
2121         (WebCore::IDBLevelDBBackingStore::createObjectStore):
2122         (WebCore::deleteRange):
2123         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
2124         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
2125         (WebCore::getNewVersionNumber):
2126         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
2127         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
2128         (WebCore::IDBLevelDBBackingStore::createInvalidRecordIdentifier):
2129         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
2130         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
2131         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
2132         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
2133         (WebCore::IDBLevelDBBackingStore::getIndexes):
2134         (WebCore::getNewIndexId):
2135         (WebCore::IDBLevelDBBackingStore::createIndex):
2136         (WebCore::IDBLevelDBBackingStore::deleteIndex):
2137         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
2138         (WebCore::findGreatestKeyLessThan):
2139         (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
2140         (WebCore::IDBLevelDBBackingStore::getObjectViaIndex):
2141         (WebCore::versionExists):
2142         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
2143         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
2144         (WebCore::findLastIndexKeyEqualTo):
2145         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
2146         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
2147         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
2148         (WebCore::IDBLevelDBBackingStore::createTransaction):
2149         * storage/IDBLevelDBBackingStore.h:
2150
2151 2011-04-18  Pavel Feldman  <pfeldman@google.com>
2152
2153         Reviewed by Yury Semikhatsky.
2154
2155         Web Inspector: add test for CSS-resource binding.
2156         https://bugs.webkit.org/show_bug.cgi?id=58786
2157
2158         Test: inspector/styles/styles-history.html
2159
2160         * inspector/InspectorCSSAgent.cpp:
2161         (WebCore::InspectorCSSAgent::setPropertyText):
2162         (WebCore::InspectorCSSAgent::toggleProperty):
2163         * inspector/InspectorStyleSheet.cpp:
2164         (WebCore::InspectorStyle::setPropertyText):
2165         (WebCore::InspectorStyle::toggleProperty):
2166         (WebCore::InspectorStyleSheet::setPropertyText):
2167         (WebCore::InspectorStyleSheet::toggleProperty):
2168         * inspector/InspectorStyleSheet.h:
2169         * inspector/front-end/CSSStyleModel.js:
2170         (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.if):
2171         (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.mycallback):
2172         (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
2173         (WebInspector.CSSStyleModel.prototype.setStyleSheetText):
2174         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
2175         (WebInspector.CSSProperty.prototype.setText.callback):
2176         (WebInspector.CSSProperty.prototype.setText):
2177
2178 2011-04-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2179
2180         Unreviewed, rolling out r83996.
2181         http://trac.webkit.org/changeset/83996
2182         https://bugs.webkit.org/show_bug.cgi?id=58790
2183
2184         layout test editing/selection/move-by-word-visually.html is
2185         failing (Requested by jknotten on #webkit).
2186
2187         * editing/visible_units.cpp:
2188         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
2189         (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
2190         (WebCore::previousWordBreakInBox):
2191         (WebCore::leftWordBoundary):
2192         (WebCore::rightWordBoundary):
2193         (WebCore::leftWordPosition):
2194         (WebCore::rightWordPosition):
2195
2196 2011-04-18  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2197
2198         Reviewed by Daniel Bates.
2199
2200         Modify make_names.pl to not include conditional includes unconditionally
2201         https://bugs.webkit.org/show_bug.cgi?id=53672
2202
2203         Fixed conditional includes being unconditionally included.
2204
2205         No new tests (no change in functionality)
2206
2207         * dom/make_names.pl:
2208             - Modified printJSElementIncludes() to only print unconditional element includes.
2209             - Modified printElementIncludes() to only print unconditional element includes.
2210             - Added printConditionalElementIncludes() which takes care of printing conditional element includes.
2211
2212 2011-04-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2213
2214         Unreviewed, rolling out r83803.
2215         http://trac.webkit.org/changeset/83803
2216         https://bugs.webkit.org/show_bug.cgi?id=58782
2217
2218         Caused focus rings to appear in youtube videos (Requested by
2219         inferno-sec on #webkit).
2220
2221         * rendering/RenderWidget.cpp:
2222         (WebCore::RenderWidget::paint):
2223
2224 2011-04-18  Alexander Pavlov  <apavlov@chromium.org>
2225
2226         Reviewed by Pavel Feldman.
2227
2228         Web Inspector: Need a workaround for bug 58422
2229         https://bugs.webkit.org/show_bug.cgi?id=58780
2230
2231         Instead of the A:before content, the link text is displayed as the A tag content.
2232
2233         * inspector/front-end/StylesSidebarPane.js:
2234         (WebInspector.StylePropertiesSection.linkifyUncopyable):
2235         (WebInspector.StylePropertiesSection):
2236         * inspector/front-end/inspector.css:
2237
2238 2011-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2239
2240         Unreviewed. Fix WebKit2 GTK build after 82465.
2241
2242         * platform/gtk/LocalizedStringsGtk.cpp:
2243         (WebCore::localizedString):
2244
2245 2011-04-18  Andrey Adaikin  <aandrey@google.com>
2246
2247         Reviewed by Yury Semikhatsky.
2248
2249         Web Inspector: TAB should not move focus from the text editor while live editing
2250         https://bugs.webkit.org/show_bug.cgi?id=58537
2251
2252         * inspector/front-end/TextViewer.js:
2253         (WebInspector.TextViewer.prototype._registerShortcuts):
2254         (WebInspector.TextViewer.prototype._cancelEditing):
2255         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
2256         (WebInspector.TextEditorMainPanel.prototype.handleTabKeyPress):
2257         (WebInspector.TextEditorMainPanel.prototype._setCaretLocation):
2258         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
2259         (WebInspector.TextEditorMainPanel.prototype._setText):
2260
2261 2011-04-18  Alexander Pavlov  <apavlov@chromium.org>
2262
2263         Reviewed by Yury Semikhatsky.
2264
2265         Web Inspector: Incorrect content area dimensions in Metrics pane for box-sizing: border-box
2266         https://bugs.webkit.org/show_bug.cgi?id=58551
2267
2268         Test: inspector/styles/metrics-box-sizing.html
2269
2270         * inspector/front-end/MetricsSidebarPane.js:
2271         (WebInspector.MetricsSidebarPane.prototype._getPropertyValueAsPx):
2272         (WebInspector.MetricsSidebarPane.prototype._getBox):
2273         (WebInspector.MetricsSidebarPane.prototype._update.getContentAreaWidthPx):
2274         (WebInspector.MetricsSidebarPane.prototype._update.getContentAreaHeightPx):
2275         (WebInspector.MetricsSidebarPane.prototype._update):
2276         (WebInspector.MetricsSidebarPane.prototype.startEditing):
2277         (WebInspector.MetricsSidebarPane.prototype.editingCommitted.setEnabledValueCallback):
2278         (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
2279
2280 2011-04-18  Ilya Tikhonovsky  <loislo@chromium.org>
2281
2282         Reviewed by Yury Semikhatsky.
2283
2284         Web Inspector: Database agent stops to propagate it's events after navigation.
2285         https://bugs.webkit.org/show_bug.cgi?id=58776
2286
2287         * inspector/InspectorAgent.cpp:
2288         (WebCore::InspectorAgent::InspectorAgent):
2289         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
2290         * inspector/InspectorDatabaseAgent.cpp:
2291         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
2292         (WebCore::InspectorDatabaseAgent::clearFrontend):
2293         (WebCore::InspectorDatabaseAgent::enable):
2294         (WebCore::InspectorDatabaseAgent::disable):
2295         (WebCore::InspectorDatabaseAgent::restore):
2296         * inspector/InspectorDatabaseAgent.h:
2297         (WebCore::InspectorDatabaseAgent::create):
2298
2299 2011-04-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2300
2301         Unreviewed, rolling out r83968.
2302         http://trac.webkit.org/changeset/83968
2303         https://bugs.webkit.org/show_bug.cgi?id=58769
2304
2305         Breaks Backspace in Web Inspector console (Requested by
2306         apavlov on #webkit).
2307
2308         * inspector/front-end/inspector.js:
2309         (WebInspector.documentKeyDown):
2310
2311 2011-04-15  Yury Semikhatsky  <yurys@chromium.org>
2312
2313         Reviewed by Pavel Feldman.
2314
2315         Web Inspector: introduce WorkerInspectorController
2316         https://bugs.webkit.org/show_bug.cgi?id=58668
2317
2318         WorkerInspectorController will be owned by WorkerContext and will hold all inspector
2319         agents and will also manage connection to the inspector frontend.
2320
2321         * CMakeLists.txt:
2322         * GNUmakefile.list.am:
2323         * WebCore.gypi:
2324         * WebCore.pro:
2325         * WebCore.vcproj/WebCore.vcproj:
2326         * WebCore.xcodeproj/project.pbxproj:
2327         * bindings/js/ScriptState.cpp:
2328         (WebCore::scriptStateFromWorkerContext):
2329         * bindings/js/ScriptState.h:
2330         * bindings/v8/ScriptState.cpp:
2331         (WebCore::scriptStateFromWorkerContext):
2332         * bindings/v8/ScriptState.h:
2333         * inspector/InspectorState.cpp:
2334         (WebCore::InspectorState::updateCookie):
2335         * inspector/WorkerInspectorController.cpp: Added.
2336         (WebCore::WorkerInspectorController::WorkerInspectorController):
2337         (WebCore::WorkerInspectorController::~WorkerInspectorController):
2338         (WebCore::WorkerInspectorController::connectFrontend):
2339         (WebCore::WorkerInspectorController::disconnectFrontend):
2340         (WebCore::WorkerInspectorController::dispatchMessageFromFrontend):
2341         * inspector/WorkerInspectorController.h: Copied from Source/WebCore/bindings/js/ScriptState.h.
2342         * workers/WorkerContext.cpp:
2343         (WebCore::WorkerContext::WorkerContext):
2344         * workers/WorkerContext.h:
2345         (WebCore::WorkerContext::workerInspectorController):
2346
2347 2011-04-17  Thierry Reding  <thierry.reding@avionic-design.de>
2348
2349         Reviewed by Adam Barth.
2350
2351         Fix build with GCC 4.6.
2352
2353         * dom/make_names.pl: Execute preprocessor without the -P option. The
2354         preprocessor in GCC 4.6 eats empty lines, effectively breaking the
2355         parsing performed by this script. Dropping the -P option when invoking
2356         the preprocessor keeps the empty lines but as a side-effect also adds
2357         additional linemarkers.
2358
2359         From the cpp manpage:
2360
2361           -P  Inhibit generation of linemarkers in the output from the
2362               preprocessor. This might be useful when running the preprocessor
2363               on something that is not C code, and will be sent to a program
2364               which might be confused by the linemarkers.
2365
2366         The linemarkers are not problematic, however, because the script
2367         properly handles them by ignoring all lines starting with a #.
2368
2369 2011-04-17  David Kilzer  <ddkilzer@apple.com>
2370
2371         <http://webkit.org/b/58463> Switch HTTP pipelining from user default to private setting
2372         <rdar://problem/9268729>
2373
2374         Reviewed by Dan Bernstein.
2375
2376         This replaces support for the WebKitEnableHTTPPipelining user
2377         default with methods on the WebCore::ResourceRequest class in
2378         WebCore, the WebView class in WebKit1, and the WebContext class
2379         in WebKit2.  It also removes support for the
2380         WebKitForceHTTPPipeliningPriorityHigh user default which was not
2381         needed.
2382
2383         Run these commands if you set the user defaults previously,
2384         replacing "BUNDLE.ID" with your application's bundle ID:
2385
2386             defaults delete BUNDLE.ID WebKitEnableHTTPPipelining
2387             defaults delete BUNDLE.ID WebKitForceHTTPPipeliningPriorityHigh
2388
2389         * WebCore.exp.in: Export ResourceRequest::httpPipeliningEnabled()
2390         and ResourceRequest::setHTTPPipeliningEnabled().
2391
2392         * platform/network/ResourceRequestBase.h:
2393         (WebCore::isHTTPPipeliningEnabled): Removed declaration.
2394         (WebCore::shouldForceHTTPPipeliningPriorityHigh): Removed declaration.
2395
2396         * platform/network/cf/ResourceRequest.h:
2397         (WebCore::ResourceRequest::httpPipeliningEnabled): Added declaration.
2398         (WebCore::ResourceRequest::setHTTPPipeliningEnabled): Added declaration.
2399         (WebCore::ResourceRequest::s_httpPipeliningEnabled): Added declaration.
2400
2401         * platform/network/cf/ResourceRequestCFNet.cpp:
2402         (WebCore::ResourceRequest::s_httpPipeliningEnabled): Added.
2403         (WebCore::ResourceRequest::httpPipeliningEnabled): Added.
2404         (WebCore::ResourceRequest::setHTTPPipeliningEnabled): Added.
2405         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Switched
2406         to use ResourceRequest::httpPipeliningEnabled().
2407         (WebCore::readBooleanPreference): Removed.
2408         (WebCore::isHTTPPipeliningEnabled): Removed.
2409         (WebCore::shouldForceHTTPPipeliningPriorityHigh): Removed.
2410
2411         * platform/network/mac/ResourceRequestMac.mm:
2412         (WebCore::ResourceRequest::doUpdateResourceRequest): Switched to
2413         use ResourceRequest::httpPipeliningEnabled().  Removed check for
2414         shouldForceHTTPPipeliningPriorityHigh().
2415         (WebCore::ResourceRequest::doUpdatePlatformRequest): Ditto.
2416
2417 2011-04-17  Dan Bernstein  <mitz@apple.com>
2418
2419         Reviewed by Maciej Stachowiak.
2420
2421         REGRESSION (r84096): <br> moved to the right in fast/block/float/032.html
2422         https://bugs.webkit.org/show_bug.cgi?id=58736
2423
2424         * rendering/RenderBlockLineLayout.cpp:
2425         (WebCore::RenderBlock::appendFloatingObjectToLastLine): It is enough to extend the float so
2426         that it touches the bottom of the previous line, since RenderBlock::markLinesDirtyInBlockRange()
2427         always dirties the line after the last one in the range.
2428
2429 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
2430
2431         Unreviewed. Add missing include to fix build without precompiled header.
2432
2433         * rendering/RenderMediaControls.cpp:
2434
2435 2011-04-17  Daniel Bates  <dbates@webkit.org>
2436
2437         Attempt to fix the Chromium build after changeset 84110 <http://trac.webkit.org/changeset/84110>
2438         (https://bugs.webkit.org/show_bug.cgi?id=57842).
2439
2440         * loader/cache/CachedResourceLoader.cpp:
2441         (WebCore::CachedResourceLoader::canRequest): Rename CachedResource::LinkPrefetch to CachedResource::LinkResource.
2442
2443 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
2444
2445         Reviewed by Eric Seidel.
2446
2447         Remove pthread dependency of GCController
2448         https://bugs.webkit.org/show_bug.cgi?id=54833
2449
2450         * bindings/js/GCController.cpp:
2451         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
2452
2453 2011-04-17  Gavin Peters  <gavinp@chromium.org>
2454
2455         Reviewed by Adam Barth.
2456
2457         Add support for link rel type "subresource"
2458         https://bugs.webkit.org/show_bug.cgi?id=57842
2459
2460         Link rel=prefetch is great for cache warming for resources on
2461         subsequent pages, but it launches requests at too low a priority
2462         to use for subresources of the current page.
2463
2464         Particularly after https://bugs.webkit.org/show_bug.cgi?id=51940
2465         is implemented, a rel type that launches requests at an higher
2466         priority is going to be very useful.  This rel type is in the
2467         HTML5 spec at http://wiki.whatwg.org/wiki/RelExtensions .  An
2468         expected use case will be for servers to provide subresource hints
2469         in link headers, which will allow servers to help make the web
2470         faster.
2471
2472         This feature continues my implementation of the Link header, which
2473         we've talked about in WebKit-dev in
2474         https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html.
2475
2476         Tests: fast/dom/HTMLLinkElement/subresource.html
2477                http/tests/misc/link-rel-prefetch-and-subresource.html
2478
2479         * html/HTMLLinkElement.cpp:
2480         (WebCore::HTMLLinkElement::~HTMLLinkElement):
2481         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2482         (WebCore::HTMLLinkElement::process):
2483         (WebCore::HTMLLinkElement::onloadTimerFired):
2484         (WebCore::HTMLLinkElement::notifyFinished):
2485         * html/HTMLLinkElement.h:
2486         (WebCore::HTMLLinkElement::RelAttribute::RelAttribute):
2487         * loader/cache/CachedResource.cpp:
2488         (WebCore::defaultPriorityForResourceType):
2489         * loader/cache/CachedResource.h:
2490         (WebCore::CachedResource::isLinkResource):
2491         * loader/cache/CachedResourceLoader.cpp:
2492         (WebCore::createResource):
2493         (WebCore::CachedResourceLoader::requestLinkResource):
2494         (WebCore::CachedResourceLoader::canRequest):
2495         (WebCore::CachedResourceLoader::incrementRequestCount):
2496         (WebCore::CachedResourceLoader::decrementRequestCount):
2497         * loader/cache/CachedResourceLoader.h:
2498         * loader/cache/CachedResourceRequest.cpp:
2499         (WebCore::cachedResourceTypeToTargetType):
2500         (WebCore::CachedResourceRequest::load):
2501
2502 2011-04-17  Dan Bernstein  <mitz@apple.com>
2503
2504         Reviewed by Joseph Pecoraro.
2505
2506         <rdar://problem/9296211> REGRESSION (r83514): Failing fast/repaint/trailing-floats-root-line-box-overflow.html
2507         https://bugs.webkit.org/show_bug.cgi?id=58745
2508
2509         This is really a regression from r82611, but it went unnoticed due to a mistake in r73385,
2510         which was fixed in r83514.
2511
2512         * rendering/RenderBlockLineLayout.cpp:
2513         (WebCore::RenderBlock::layoutInlineChildren): Actually assign the bottom visual overflow to the
2514         variable so named, not the top layout overflow.
2515
2516 2011-04-17  Geoffrey Garen  <ggaren@apple.com>
2517
2518         Strongly suggested, but not necessarily reviewed, by
2519         Sam Weinig and Maciej Stachowiak.
2520
2521         Renamed DOMObject* => JSDOMWrapper*.
2522
2523         * bindings/js/DOMWrapperWorld.cpp:
2524         (WebCore::isObservable):
2525         (WebCore::DOMObjectHandleOwner::finalize):
2526         * bindings/js/DOMWrapperWorld.h:
2527         * bindings/js/JSArrayBufferViewHelper.h:
2528         (WebCore::toJSArrayBufferView):
2529         * bindings/js/JSCSSRuleCustom.cpp:
2530         (WebCore::toJS):
2531         * bindings/js/JSCSSValueCustom.cpp:
2532         (WebCore::toJS):
2533         * bindings/js/JSDOMBinding.h:
2534         (WebCore::JSDOMWrapperWithGlobalPointer::globalObject):
2535         (WebCore::JSDOMWrapperWithGlobalPointer::JSDOMWrapperWithGlobalPointer):
2536         (WebCore::DOMConstructorObject::DOMConstructorObject):
2537         (WebCore::createDOMObjectWrapper):
2538         (WebCore::getDOMObjectWrapper):
2539         * bindings/js/JSDOMWrapper.cpp:
2540         (WebCore::JSDOMWrapper::~JSDOMWrapper):
2541         * bindings/js/JSDOMWrapper.h:
2542         (WebCore::JSDOMWrapper::JSDOMWrapper):
2543         * bindings/js/JSDocumentCustom.cpp:
2544         (WebCore::JSDocument::location):
2545         (WebCore::toJS):
2546         * bindings/js/JSEventCustom.cpp:
2547         (WebCore::toJS):
2548         * bindings/js/JSHTMLCollectionCustom.cpp:
2549         (WebCore::toJS):
2550         * bindings/js/JSImageDataCustom.cpp:
2551         (WebCore::toJS):
2552         * bindings/js/JSSVGPathSegCustom.cpp:
2553         (WebCore::toJS):
2554         * bindings/js/JSStyleSheetCustom.cpp:
2555         (WebCore::toJS):
2556         * bindings/js/ScriptWrappable.h:
2557         (WebCore::ScriptWrappable::wrapper):
2558         (WebCore::ScriptWrappable::setWrapper):
2559         * bindings/scripts/CodeGeneratorJS.pm:
2560
2561 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
2562
2563         Reviewed by Adam Barth.
2564
2565         Rename PLATFORM(CA) to USE(CA)
2566         https://bugs.webkit.org/show_bug.cgi?id=58742
2567
2568         * config.h:
2569         * platform/graphics/ca/TransformationMatrixCA.cpp:
2570         * platform/graphics/cg/ImageBufferDataCG.h:
2571         * platform/graphics/transforms/TransformationMatrix.h:
2572         * platform/mac/WebCoreSystemInterface.h:
2573         * rendering/RenderLayerBacking.cpp:
2574         (WebCore::RenderLayerBacking::containsPaintedContent):
2575         * rendering/RenderLayerCompositor.cpp:
2576         (WebCore::RenderLayerCompositor::updateBacking):
2577
2578 2011-04-17  Young Han Lee  <joybro@company100.net>
2579
2580         Reviewed by Benjamin Poulain.
2581
2582         [Texmap] [Qt] Improve readability by using gInVertexAttributeIndex instead of 0.
2583         https://bugs.webkit.org/show_bug.cgi?id=58739
2584
2585         gInVertexAttributeIndex is a constant variable to point the location of
2586         "InVertex" attribute of the vertex shaders.
2587
2588         * platform/graphics/opengl/TextureMapperGL.cpp:
2589         (WebCore::TextureMapperGL::drawTexture):
2590         (WebCore::TextureMapperGL::paintToTarget):
2591
2592 2011-04-17  Kinuko Yasuda  <kinuko@chromium.org>
2593
2594         Not reviewed: Fix copyright (I had submitted the file with wrong
2595         copyright line).
2596
2597         * storage/StorageInfo.idl:
2598
2599 2011-04-17  Patrick Gansterer  <paroga@webkit.org>
2600
2601         Reviewed by Adam Barth.
2602
2603         Rename PLATFORM(CG) to USE(CG)
2604         https://bugs.webkit.org/show_bug.cgi?id=58729
2605
2606         * config.h:
2607         * html/HTMLCanvasElement.cpp:
2608         (WebCore::HTMLCanvasElement::toDataURL):
2609         * html/HTMLCanvasElement.h:
2610         * html/canvas/CanvasRenderingContext2D.cpp:
2611         (WebCore::CanvasRenderingContext2D::setShadow):
2612         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2613         * html/canvas/CanvasRenderingContext2D.h:
2614         * html/canvas/CanvasStyle.cpp:
2615         (WebCore::CanvasStyle::applyStrokeColor):
2616         (WebCore::CanvasStyle::applyFillColor):
2617         * loader/cache/CachedFont.cpp:
2618         * loader/cache/CachedImage.cpp:
2619         (WebCore::CachedImage::createImage):
2620         * platform/FloatConversion.h:
2621         * platform/MIMETypeRegistry.cpp:
2622         (WebCore::initializeSupportedImageMIMETypes):
2623         (WebCore::initializeSupportedImageMIMETypesForEncoding):
2624         * platform/graphics/BitmapImage.h:
2625         * platform/graphics/Color.h:
2626         * platform/graphics/DashArray.h:
2627         * platform/graphics/FloatPoint.h:
2628         * platform/graphics/FloatRect.h:
2629         * platform/graphics/FloatSize.h:
2630         * platform/graphics/FontPlatformData.h:
2631         (WebCore::FontPlatformData::FontPlatformData):
2632         (WebCore::FontPlatformData::hash):
2633         * platform/graphics/GlyphBuffer.h:
2634         (WebCore::GlyphBuffer::advanceAt):
2635         (WebCore::GlyphBuffer::add):
2636         (WebCore::GlyphBuffer::expandLastAdvance):
2637         * platform/graphics/Gradient.h:
2638         * platform/graphics/GraphicsContext.cpp:
2639         (WebCore::GraphicsContext::setLegacyShadow):
2640         * platform/graphics/GraphicsContext.h:
2641         (WebCore::GraphicsContextState::GraphicsContextState):
2642         * platform/graphics/GraphicsContext3D.h:
2643         * platform/graphics/Image.cpp:
2644         * platform/graphics/Image.h:
2645         * platform/graphics/ImageBuffer.cpp:
2646         * platform/graphics/ImageBuffer.h:
2647         * platform/graphics/ImageBufferData.h:
2648         * platform/graphics/ImageSource.h:
2649         * platform/graphics/IntPoint.h:
2650         * platform/graphics/IntRect.h:
2651         * platform/graphics/IntSize.h:
2652         * platform/graphics/Path.h:
2653         * platform/graphics/Pattern.h:
2654         * platform/graphics/SimpleFontData.h:
2655         * platform/graphics/cg/ColorCG.cpp:
2656         * platform/graphics/cg/FloatPointCG.cpp:
2657         * platform/graphics/cg/FloatRectCG.cpp:
2658         * platform/graphics/cg/FloatSizeCG.cpp:
2659         * platform/graphics/cg/ImageCG.cpp:
2660         * platform/graphics/cg/ImageSourceCG.cpp:
2661         * platform/graphics/cg/IntPointCG.cpp:
2662         * platform/graphics/cg/IntRectCG.cpp:
2663         * platform/graphics/cg/IntSizeCG.cpp:
2664         * platform/graphics/cg/PDFDocumentImage.cpp:
2665         * platform/graphics/cg/PDFDocumentImage.h:
2666         * platform/graphics/cg/PathCG.cpp:
2667         * platform/graphics/cg/TransformationMatrixCG.cpp:
2668         * platform/graphics/chromium/ImageLayerChromium.h:
2669         * platform/graphics/chromium/LayerRendererChromium.cpp:
2670         * platform/graphics/chromium/LayerRendererChromium.h:
2671         * platform/graphics/chromium/PlatformCanvas.cpp:
2672         (WebCore::PlatformCanvas::resize):
2673         (WebCore::PlatformCanvas::AutoLocker::AutoLocker):
2674         (WebCore::PlatformCanvas::Painter::Painter):
2675         * platform/graphics/chromium/PlatformCanvas.h:
2676         * platform/graphics/chromium/PlatformImage.cpp:
2677         (WebCore::PlatformImage::updateFromImage):
2678         * platform/graphics/opentype/OpenTypeUtilities.cpp:
2679         * platform/graphics/transforms/AffineTransform.h:
2680         * platform/graphics/transforms/TransformationMatrix.h:
2681         * platform/graphics/win/DIBPixelData.h:
2682         * platform/graphics/win/FontCacheWin.cpp:
2683         (WebCore::FontCache::platformInit):
2684         (WebCore::createGDIFont):
2685         (WebCore::FontCache::createFontPlatformData):
2686         * platform/graphics/win/FontPlatformDataWin.cpp:
2687         (WebCore::FontPlatformData::FontPlatformData):
2688         * platform/graphics/win/GraphicsContextWin.cpp:
2689         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2690         * platform/graphics/win/SimpleFontDataWin.cpp:
2691         * platform/image-decoders/ImageDecoder.cpp:
2692         * platform/image-decoders/ImageDecoder.h:
2693         * rendering/RenderObject.h:
2694         * rendering/svg/RenderSVGResourceFilter.cpp:
2695         (WebCore::RenderSVGResourceFilter::postApplyResource):
2696         * rendering/svg/RenderSVGResourceGradient.cpp:
2697         (WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
2698         (WebCore::RenderSVGResourceGradient::applyResource):
2699         * rendering/svg/RenderSVGResourceGradient.h:
2700         * rendering/svg/RenderSVGResourceMasker.cpp:
2701         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2702         * rendering/svg/RenderSVGResourcePattern.cpp:
2703         (WebCore::RenderSVGResourcePattern::applyResource):
2704
2705 2011-04-16  Adam Barth  <abarth@webkit.org>
2706
2707         Reviewed by Sam Weinig.
2708
2709         about:blank documents in new tabs can XHR anywhere
2710         https://bugs.webkit.org/show_bug.cgi?id=58712
2711
2712         Empty security origins have supposed to be low-privilege, we should
2713         mark them as having a unique origin.
2714
2715         * manual-tests/about-blank-xhr.html: Added.
2716         * page/SecurityOrigin.cpp:
2717         (WebCore::SecurityOrigin::SecurityOrigin):
2718         * page/SecurityOrigin.h:
2719
2720 2011-04-16  Dan Bernstein  <mitz@apple.com>
2721
2722         Reviewed by Simon Fraser.
2723
2724         <rdar://problem/9190108> Crash when hiding a float
2725
2726         Test: fast/block/float/overhanging-tall-block.html
2727
2728         * rendering/RenderBlock.cpp:
2729         (WebCore::RenderBlock::addOverhangingFloats): Moved the call to childLogicalTop() out of the loop.
2730         Capped the logical bottom so that we get the correct maximum.
2731         * rendering/RenderBlock.h: Decleared appendFloatingObjectToLastLine().
2732         * rendering/RenderBlockLineLayout.cpp:
2733         (WebCore::RenderBlock::appendFloatingObjectToLastLine): Added. Ensures correct bookkeeping by
2734         extending the float if needed so that it touches the line.
2735         (WebCore::RenderBlock::layoutInlineChildren): Changed to call appendFloatingObjectToLastLine().
2736         (WebCore::RenderBlock::checkFloatsInCleanLine): Capped the float height so the we mark the right
2737         range of lines as dirty.
2738         * rendering/RootInlineBox.h:
2739         (WebCore::RootInlineBox::appendFloat): Replaced the floats() accessor with this function, which
2740         allows the creation of the vector to be combined with appending the first float.
2741
2742 2011-04-16  Sam Weinig  <sam@webkit.org>
2743
2744         Reviewed by Simon Fraser.
2745
2746         Pages in the PageCache don't have the correct visited link coloring after being restored
2747         https://bugs.webkit.org/show_bug.cgi?id=58721
2748
2749         * WebCore.exp.in:
2750         Add export of markPagesForVistedLinkStyleRecalc for use by WebKit2.
2751
2752         * history/CachedPage.cpp:
2753         (WebCore::CachedPage::CachedPage):
2754         (WebCore::CachedPage::restore):
2755         (WebCore::CachedPage::clear):
2756         * history/CachedPage.h:
2757         (WebCore::CachedPage::markForVistedLinkStyleRecalc):
2758         Add bit, set by calling markForVistedLinkStyleRecalc, which forces a visited link
2759         style recalc when being restored.
2760
2761         * history/PageCache.h:
2762         * history/PageCache.cpp:
2763         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
2764         Mark all pages in the page cache as requiring visited link style recalc.
2765
2766         * page/PageGroup.cpp:
2767         (WebCore::PageGroup::addVisitedLink):
2768         (WebCore::PageGroup::removeVisitedLinks):
2769         (WebCore::PageGroup::removeAllVisitedLinks):
2770         Set dirty bit when changing any visited link information.
2771         
2772
2773 2011-04-16  Leo Yang  <leoyang.webkit@gmail.com>
2774
2775         Reviewed by Nikolas Zimmermann.
2776
2777         ASSERT failure when svg <use> element changes href
2778         https://bugs.webkit.org/show_bug.cgi?id=58726
2779
2780         m_resourceId was not empty after the pending resource
2781         becomes available. This will trigger the assertion at
2782         line 509 of SVGUseElement.cpp when the <use> element's
2783         href becomes empty or invalid.
2784
2785         This patch makes m_resourceId be empty after the pending
2786         resource becomes available to avoid assertion failure.
2787
2788         Test: svg/custom/use-crash-when-href-change.svg
2789
2790         * svg/SVGUseElement.cpp:
2791         (WebCore::SVGUseElement::buildPendingResource):
2792
2793 2011-04-16  Patrick Gansterer  <paroga@webkit.org>
2794
2795         Reviewed by Eric Seidel.
2796
2797         Rename PLATFORM(CAIRO) to USE(CAIRO)
2798         https://bugs.webkit.org/show_bug.cgi?id=55192
2799
2800         * CMakeListsEfl.txt:
2801         * config.h:
2802         * platform/MIMETypeRegistry.cpp:
2803         (WebCore::initializeSupportedImageMIMETypesForEncoding):
2804         * platform/graphics/ContextShadow.h:
2805         * platform/graphics/DashArray.h:
2806         * platform/graphics/FloatRect.h:
2807         * platform/graphics/FontPlatformData.h:
2808         (WebCore::FontPlatformData::FontPlatformData):
2809         (WebCore::FontPlatformData::hash):
2810         (WebCore::FontPlatformData::isHashTableDeletedValue):
2811         * platform/graphics/GlyphBuffer.h:
2812         (WebCore::GlyphBuffer::glyphAt):
2813         (WebCore::GlyphBuffer::add):
2814         * platform/graphics/Gradient.cpp:
2815         * platform/graphics/Gradient.h:
2816         * platform/graphics/GraphicsContext.cpp:
2817         * platform/graphics/GraphicsContext.h:
2818         (WebCore::GraphicsContextState::GraphicsContextState):
2819         * platform/graphics/GraphicsContext3D.h:
2820         * platform/graphics/ImageBufferData.h:
2821         * platform/graphics/ImageSource.h:
2822         * platform/graphics/Path.h:
2823         * platform/graphics/Pattern.h:
2824         * platform/graphics/SimpleFontData.h:
2825         * platform/graphics/cairo/DrawErrorUnderline.h:
2826         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2827         * platform/graphics/cairo/ImageCairo.cpp:
2828         * platform/graphics/gstreamer/ImageGStreamer.h:
2829         * platform/graphics/transforms/AffineTransform.h:
2830         * platform/graphics/transforms/TransformationMatrix.h:
2831         * platform/graphics/win/FontCacheWin.cpp:
2832         (WebCore::createGDIFont):
2833         (WebCore::FontCache::createFontPlatformData):
2834         * platform/graphics/win/FontPlatformDataWin.cpp:
2835         (WebCore::FontPlatformData::FontPlatformData):
2836         * platform/graphics/win/GraphicsContextWin.cpp:
2837         * plugins/win/PluginViewWin.cpp:
2838         (WebCore::PluginView::paintWindowedPluginIntoContext):
2839         * rendering/RenderObject.h:
2840
2841 2011-04-16  Patrick Gansterer  <paroga@webkit.org>
2842
2843         Unreviewed WinCE build fix for r84033.
2844
2845         * platform/win/LocalizedStringsWin.cpp:
2846         (WebCore::localizedString):
2847
2848 2011-04-16  Abhishek Arya  <inferno@chromium.org>
2849
2850         Reviewed by Nikolas Zimmermann.
2851
2852         Only allow inline child for SVG text since we cannot
2853         handle block childs.
2854         https://bugs.webkit.org/show_bug.cgi?id=58678
2855
2856         Test: svg/text/text-block-child-crash.xhtml
2857
2858         * rendering/svg/RenderSVGText.cpp:
2859         (WebCore::RenderSVGText::isChildAllowed):
2860         * rendering/svg/RenderSVGText.h:
2861
2862 2011-04-15  Ilya Tikhonovsky  <loislo@chromium.org>
2863
2864         Reviewed by Pavel Feldman.
2865
2866         Web Inspector: The list of Database entries is empty if the page opens a database just before Web Inspector.
2867         https://bugs.webkit.org/show_bug.cgi?id=57833
2868
2869         * inspector/Inspector.json:
2870         * inspector/InspectorDatabaseAgent.cpp:
2871         (WebCore::InspectorDatabaseAgent::didOpenDatabase):
2872         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
2873         (WebCore::InspectorDatabaseAgent::setFrontend):
2874         (WebCore::InspectorDatabaseAgent::clearFrontend):
2875         (WebCore::InspectorDatabaseAgent::enable):
2876         (WebCore::InspectorDatabaseAgent::disable):
2877         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
2878         (WebCore::InspectorDatabaseAgent::executeSQL):
2879         * inspector/InspectorDatabaseAgent.h:
2880         * inspector/front-end/inspector.js:
2881
2882 2011-04-15  Adam Barth  <abarth@webkit.org>
2883
2884         Reviewed by Eric Seidel.
2885
2886         CSP media-src is missing
2887         https://bugs.webkit.org/show_bug.cgi?id=58642
2888
2889         Yay HTMLMediaElement for having the exact hook we need!
2890
2891         Tests: http/tests/security/contentSecurityPolicy/media-src-allowed.html
2892                http/tests/security/contentSecurityPolicy/media-src-blocked.html
2893
2894         * html/HTMLMediaElement.cpp:
2895         (WebCore::HTMLMediaElement::isSafeToLoadURL):
2896             - Although it's tempting to add this branch to the previous
2897               if-block, that results in the wrong error message being logged to
2898               the console (covered by the "blocked" test).
2899         * page/ContentSecurityPolicy.cpp:
2900         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
2901         (WebCore::ContentSecurityPolicy::addDirective):
2902         * page/ContentSecurityPolicy.h:
2903             - These changes are routine.
2904
2905 2011-04-15  Adam Barth  <abarth@webkit.org>
2906
2907         Reviewed by Eric Seidel.
2908
2909         CSP should block string arguments to setTimeout and setInterval unless options eval-script
2910         https://bugs.webkit.org/show_bug.cgi?id=58610
2911
2912         It's somewhat sadness that the JSC and V8 code for setTimeout and
2913         setInterval are so different.  I struggled for a while with how to
2914         handle the worker case, but I decided to punt on it for now.
2915
2916         Tests: http/tests/security/contentSecurityPolicy/eval-scripts-setInterval-allowed.html
2917                http/tests/security/contentSecurityPolicy/eval-scripts-setInterval-blocked.html
2918                http/tests/security/contentSecurityPolicy/eval-scripts-setTimeout-allowed.html
2919                http/tests/security/contentSecurityPolicy/eval-scripts-setTimeout-blocked.html
2920
2921         * bindings/js/JSDOMWindowCustom.cpp:
2922         (WebCore::JSDOMWindow::setTimeout):
2923         (WebCore::JSDOMWindow::setInterval):
2924         * bindings/js/JSWorkerContextCustom.cpp:
2925         (WebCore::JSWorkerContext::setTimeout):
2926         (WebCore::JSWorkerContext::setInterval):
2927         * bindings/js/ScheduledAction.cpp:
2928         (WebCore::ScheduledAction::create):
2929         * bindings/js/ScheduledAction.h:
2930         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2931         (WebCore::WindowSetTimeoutImpl):
2932         * page/ContentSecurityPolicy.cpp:
2933         (WebCore::ContentSecurityPolicy::allowEval):
2934         * page/ContentSecurityPolicy.h:
2935
2936 2011-04-15  Shishir Agrawal  <shishir@chromium.org>
2937
2938         Reviewed by James Robinson.
2939
2940         Add a flag to guard Page Visibility API changes.
2941         https://bugs.webkit.org/show_bug.cgi?id=58464
2942
2943         * Configurations/FeatureDefines.xcconfig:
2944
2945 2011-04-15  Fridrich Strba  <fridrich.strba@bluewin.ch>
2946
2947         Reviewed by Martin Robinson.
2948
2949         Make plugins compile during WebKit GTK Windows build.
2950         Ifdef properly relevant parts so that the PluginViewGtk compiles on Windows.
2951         https://bugs.webkit.org/show_bug.cgi?id=58580
2952
2953         * plugins/PluginView.cpp:
2954         (WebCore::PluginView::stop):
2955         * plugins/PluginView.h:
2956         * plugins/gtk/PluginViewGtk.cpp:
2957         (WebCore::PluginView::platformGetValue):
2958         (WebCore::PluginView::platformStart):
2959
2960 2011-04-15  MORITA Hajime  <morrita@google.com>
2961
2962         Reviewed by Simon Fraser.
2963
2964         Calls to WebCore::Document::mayCauseFlashOfUnstyledContent make frequently-run drawing methods slower
2965         https://bugs.webkit.org/show_bug.cgi?id=58512
2966         
2967         Manually rolled out r72367 at which mayCauseFlashOfUnstyledContent() was introduced.
2968         This change keeps an small refactoring on
2969         FrameView::shouldUpdate(), which doesn't affect on the behavior.
2970
2971         * dom/Document.cpp:
2972         * dom/Document.h:
2973         * page/FrameView.cpp:
2974         (WebCore::FrameView::invalidateRect):
2975         (WebCore::FrameView::shouldUpdate):
2976         * rendering/RenderBlock.cpp:
2977         (WebCore::RenderBlock::paintContents):
2978         * rendering/RenderLayer.cpp:
2979         (WebCore::RenderLayer::paintLayer):
2980
2981 2011-04-15  Chris Rogers  <crogers@google.com>
2982
2983         Reviewed by Kenneth Russell.
2984
2985         Reduce default kernel size of SincResampler to favor better speed over quality
2986         https://bugs.webkit.org/show_bug.cgi?id=58710
2987
2988         No new tests since audio API is not yet implemented.
2989
2990         * platform/audio/SincResampler.h:
2991
2992 2011-04-15  Fridrich Strba  <fridrich.strba@bluewin.ch>
2993
2994         Reviewed by Martin Robinson.
2995
2996         Expand the ntohs, ntohl, htons and htonl defines for OS(WINDOWS)
2997         These have to be defined for Windows in general, since win32 API
2998         does not provide them.
2999         https://bugs.webkit.org/show_bug.cgi?id=58582
3000
3001         * platform/graphics/WOFFFileFormat.cpp:
3002
3003 2011-04-15  Vsevolod Vlasov  <vsevik@chromium.org>
3004
3005         Reviewed by Adam Barth.
3006
3007         Show a console message when X-Frame-Options blocks a load
3008         https://bugs.webkit.org/show_bug.cgi?id=39087
3009
3010         Added console message when X-Frame-Options headers block resource loading
3011
3012         * loader/MainResourceLoader.cpp:
3013         (WebCore::MainResourceLoader::didReceiveResponse):
3014
3015 2011-04-15  Fridrich Strba  <fridrich.strba@bluewin.ch>
3016
3017         Reviewed by Martin Robinson.
3018
3019         Evaluate PLATFORM(GTK) before the all-encompassing OS(WINDOWS)
3020         test. This allows Windows build of WebKit GTK to chose the right
3021         path.
3022         https://bugs.webkit.org/show_bug.cgi?id=58576
3023
3024         * platform/FileSystem.h:
3025
3026 2011-04-08  Luiz Agostini  <luiz.agostini@openbossa.org>
3027
3028         Reviewed by Kenneth Rohde Christiansen.
3029
3030         [Qt] QWebPage MIME type handling inconsistency with other web browsers
3031         https://bugs.webkit.org/show_bug.cgi?id=46968
3032
3033         Implementing mime type sniffing based on
3034         http://tools.ietf.org/html/draft-abarth-mime-sniff-06.
3035
3036         * WebCore.pro:
3037         * platform/network/MIMESniffing.cpp: Added.
3038         (MagicNumbers::dataSizeNeededForImageSniffing):
3039         (MagicNumbers::maskedCompare):
3040         (MagicNumbers::checkSpaceOrBracket):
3041         (MagicNumbers::compare):
3042         (MagicNumbers::findMIMEType):
3043         (MagicNumbers::findSimpleMIMEType):
3044         (MagicNumbers::textOrBinaryTypeSniffingProcedure):
3045         (MagicNumbers::unknownTypeSniffingProcedure):
3046         (MagicNumbers::imageTypeSniffingProcedure):
3047         (MagicNumbers::checkText):
3048         (MagicNumbers::checkRDF):
3049         (MagicNumbers::skipTag):
3050         (MagicNumbers::feedTypeSniffingProcedure):
3051         (MIMESniffer::MIMESniffer):
3052         * platform/network/MIMESniffing.h: Added.
3053         (MIMESniffer::dataSize):
3054         (MIMESniffer::sniff):
3055         (MIMESniffer::isValid):
3056         * platform/network/NetworkingContext.h:
3057         * platform/network/qt/QNetworkReplyHandler.cpp:
3058         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
3059         (WebCore::QNetworkReplyWrapper::release):
3060         (WebCore::QNetworkReplyWrapper::receiveMetaData):
3061         (WebCore::QNetworkReplyWrapper::receiveSniffedMIMEType):
3062         (WebCore::QNetworkReplyWrapper::emitMetaDataChanged):
3063         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3064         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
3065         (WebCore::QNetworkReplyHandler::start):
3066         * platform/network/qt/QNetworkReplyHandler.h:
3067         (WebCore::QNetworkReplyWrapper::advertisedMIMEType):
3068         (WebCore::QNetworkReplyWrapper::mimeType):
3069         * platform/network/qt/QtMIMETypeSniffer.cpp: Added.
3070         (QtMIMETypeSniffer::QtMIMETypeSniffer):
3071         (QtMIMETypeSniffer::sniff):
3072         (QtMIMETypeSniffer::trySniffing):
3073         * platform/network/qt/QtMIMETypeSniffer.h: Added.
3074         (QtMIMETypeSniffer::mimeType):
3075         (QtMIMETypeSniffer::isFinished):
3076
3077 2011-04-15  Emil A Eklund  <eae@chromium.org>
3078
3079         Reviewed by Dimitri Glazkov.
3080
3081         input field with focus makes appendChild operation ~42x slower
3082         https://bugs.webkit.org/show_bug.cgi?id=57059
3083
3084         Change ContainerNode::cloneChildNodes to only disable the
3085         deleteButtonController if the container itself (or any of its children)
3086         is being edited. Thus avoiding a reflow in cases where it's not.
3087
3088         Test: perf/clone-with-focus.html
3089
3090         * dom/ContainerNode.cpp:
3091         (WebCore::ContainerNode::cloneChildNodes):
3092
3093 2011-04-15  Kinuko Yasuda  <kinuko@chromium.org>
3094
3095         Reviewed by David Levin.
3096
3097         Expose unified Quota API if QUOTA build flag is enabled
3098         https://bugs.webkit.org/show_bug.cgi?id=58648
3099
3100         Test: storage/storageinfo-query-usage.html
3101
3102         * CMakeLists.txt: Added new file entries.
3103         * DerivedSources.cpp: Added new file entries.
3104         * DerivedSources.make: Added new file entries.
3105         * GNUmakefile.am: Added new file entries.
3106         * WebCore.gypi: Added new file entries.
3107         * WebCore.vcproj/WebCore.vcproj: Added new file entries.
3108         * WebCore.xcodeproj/project.pbxproj: Added new file entries.
3109         * page/DOMWindow.cpp:
3110         (WebCore::DOMWindow::webkitStorageInfo): Added.
3111         * page/DOMWindow.h:
3112         * page/DOMWindow.idl:
3113         * storage/StorageInfo.h: Added storage type enum.
3114         * storage/StorageInfo.idl: Added.
3115         * storage/StorageInfoErrorCallback.idl: Added.
3116         * storage/StorageInfoUsageCallback.idl: Added.
3117
3118 2011-04-15  Oliver Hunt  <oliver@apple.com>
3119
3120         GC allocate Structure
3121         https://bugs.webkit.org/show_bug.cgi?id=58483
3122
3123         Rolling r83894 r83827 r83810 r83809 r83808 back in with
3124         a workaround for the gcc bug seen by the gtk bots
3125
3126         * WebCore.exp.in:
3127         * bindings/js/JSAudioConstructor.h:
3128         (WebCore::JSAudioConstructor::createStructure):
3129         * bindings/js/JSDOMBinding.cpp:
3130         (WebCore::cacheDOMStructure):
3131         * bindings/js/JSDOMBinding.h:
3132         (WebCore::DOMObjectWithGlobalPointer::createStructure):
3133         (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
3134         (WebCore::DOMConstructorObject::createStructure):
3135         (WebCore::DOMConstructorObject::DOMConstructorObject):
3136         (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
3137         * bindings/js/JSDOMGlobalObject.cpp:
3138         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
3139         (WebCore::JSDOMGlobalObject::markChildren):
3140         * bindings/js/JSDOMGlobalObject.h:
3141         (WebCore::JSDOMGlobalObject::createStructure):
3142         * bindings/js/JSDOMWindowBase.cpp:
3143         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3144         * bindings/js/JSDOMWindowBase.h:
3145         (WebCore::JSDOMWindowBase::createStructure):
3146         * bindings/js/JSDOMWindowShell.cpp:
3147         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
3148         (WebCore::JSDOMWindowShell::setWindow):
3149         * bindings/js/JSDOMWindowShell.h:
3150         (WebCore::JSDOMWindowShell::createStructure):
3151         * bindings/js/JSDOMWrapper.h:
3152         (WebCore::DOMObject::DOMObject):
3153         * bindings/js/JSEventListener.cpp:
3154         (WebCore::JSEventListener::JSEventListener):
3155         * bindings/js/JSImageConstructor.h:
3156         (WebCore::JSImageConstructor::createStructure):
3157         * bindings/js/JSImageDataCustom.cpp:
3158         (WebCore::toJS):
3159         * bindings/js/JSOptionConstructor.h:
3160         (WebCore::JSOptionConstructor::createStructure):
3161         * bindings/js/JSWorkerContextBase.cpp:
3162         (WebCore::JSWorkerContextBase::JSWorkerContextBase):
3163         * bindings/js/JSWorkerContextBase.h:
3164         (WebCore::JSWorkerContextBase::createStructure):
3165         * bindings/js/ScriptCachedFrameData.h:
3166         * bindings/js/SerializedScriptValue.h:
3167         * bindings/js/WorkerScriptController.cpp:
3168         (WebCore::WorkerScriptController::~WorkerScriptController):
3169         (WebCore::WorkerScriptController::initScript):
3170         * bindings/scripts/CodeGeneratorJS.pm:
3171         * bridge/c/CRuntimeObject.h:
3172         (JSC::Bindings::CRuntimeObject::createStructure):
3173         * bridge/c/c_instance.cpp:
3174         (JSC::Bindings::CRuntimeMethod::createStructure):
3175         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3176         (JavaRuntimeMethod::createStructure):
3177         * bridge/jni/jsc/JavaRuntimeObject.h:
3178         (JSC::Bindings::JavaRuntimeObject::createStructure):
3179         * bridge/objc/ObjCRuntimeObject.h:
3180         (JSC::Bindings::ObjCRuntimeObject::createStructure):
3181         * bridge/objc/objc_instance.mm:
3182         (ObjCRuntimeMethod::createStructure):
3183         * bridge/objc/objc_runtime.h:
3184         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
3185         * bridge/qt/qt_instance.cpp:
3186         (JSC::Bindings::QtRuntimeObject::createStructure):
3187         * bridge/qt/qt_pixmapruntime.cpp:
3188         (JSC::Bindings::QtPixmapRuntimeObject::createStructure):
3189         * bridge/qt/qt_runtime.h:
3190         (JSC::Bindings::QtRuntimeMethod::createStructure):
3191         * bridge/runtime_array.cpp:
3192         (JSC::RuntimeArray::RuntimeArray):
3193         * bridge/runtime_array.h:
3194         (JSC::RuntimeArray::createStructure):
3195         * bridge/runtime_method.cpp:
3196         (JSC::RuntimeMethod::RuntimeMethod):
3197         * bridge/runtime_method.h:
3198         (JSC::RuntimeMethod::createStructure):
3199         * bridge/runtime_object.cpp:
3200         (JSC::Bindings::RuntimeObject::RuntimeObject):
3201         * bridge/runtime_object.h:
3202         (JSC::Bindings::RuntimeObject::createStructure):
3203         * history/HistoryItem.h:
3204
3205 2011-04-15  Jessie Berlin  <jberlin@apple.com>
3206
3207         Reviewed by Brian Weinstein.
3208
3209         Hang underneath ApplicationCacheStorage::writeDataToUniqueFileInDirectory when loading
3210         http://www.webkit.org/demos/calendar.
3211         https://bugs.webkit.org/show_bug.cgi?id=58698
3212
3213         * platform/win/FileSystemWin.cpp:
3214         (WebCore::openFile):
3215         Add breaks to the case statement.
3216         (WebCore::directoryName):
3217         Remove any trailing slash in directoryName. After closer inspection of all callers, it
3218         appears the that callers do not need the trailing slash, and those that use the length do
3219         so only to change the direction of the slashes throughout the length of the path.
3220
3221 2011-04-15  Roland Steiner  <rolandsteiner@chromium.org>
3222
3223         Reviewed by Dimitri Glazkov.
3224
3225         Bug 52963 - Enable O(1) access to root from any node in shadow DOM subtree
3226         https://bugs.webkit.org/show_bug.cgi?id=52963
3227
3228         .) Change base class of ShadowRoot from DocumentFragment to TreeScope.
3229         .) Re-enable tree scope handling in Node (had ASSERT_NOT_REACHED, etc.).
3230         .) Merged setTreeScope() with setTreeScopeRecursively()
3231         .) Call setTreeScopeRecursively in DOM manipulation functions where applicable.
3232
3233         No new tests. (refactoring)
3234
3235         * dom/ContainerNode.cpp:
3236         (WebCore::ContainerNode::takeAllChildrenFrom):
3237         (WebCore::ContainerNode::removeBetween):
3238         (WebCore::ContainerNode::removeChildren):
3239         (WebCore::ContainerNode::parserAddChild):
3240         * dom/Document.cpp:
3241         (WebCore::Document::Document):
3242         (WebCore::Document::~Document):
3243         (WebCore::Document::setDocType):
3244         * dom/Element.h:
3245         * dom/Node.cpp:
3246         (WebCore::Node::treeScope):
3247         (WebCore::Node::setTreeScopeRecursively):
3248         * dom/Node.h:
3249         (WebCore::Node::document):
3250         * dom/ShadowRoot.cpp:
3251         (WebCore::ShadowRoot::ShadowRoot):
3252         (WebCore::ShadowRoot::~ShadowRoot):
3253         (WebCore::ShadowRoot::nodeType):
3254         (WebCore::ShadowRoot::cloneNode):
3255         (WebCore::ShadowRoot::childTypeAllowed):
3256         * dom/ShadowRoot.h:
3257         (WebCore::toShadowRoot):
3258         * dom/TreeScope.cpp:
3259         (WebCore::TreeScope::TreeScope):
3260         (WebCore::TreeScope::setParentTreeScope):
3261         * dom/TreeScope.h:
3262         * rendering/RenderSlider.cpp:
3263
3264 2011-04-15  Geoffrey Garen  <ggaren@apple.com>
3265
3266         Reviewed by Oliver Hunt.
3267
3268         DOM object handles are never removed from cache
3269         https://bugs.webkit.org/show_bug.cgi?id=58707
3270
3271         We were trying to remove hash table items by value instead of by key.
3272
3273         * bindings/js/DOMWrapperWorld.cpp:
3274         (WebCore::JSNodeHandleOwner::finalize): Changed to work more like
3275         DOMObjectHandleOwner::finalize because I'm going to merge them.
3276
3277         (WebCore::DOMObjectHandleOwner::finalize): Remove hash table items
3278         by key, not value. (Oops!) Use a helper function to make sure we get
3279         this right.
3280
3281         * bindings/js/JSDOMBinding.cpp:
3282         (WebCore::cacheDOMObjectWrapper): Store the hash table key as our weak
3283         handle context, so we can use it at destruction time.
3284
3285         * bindings/js/JSDOMBinding.h: Removed unnecessary include.
3286
3287         * bindings/js/JSNodeCustom.h:
3288         (WebCore::cacheDOMNodeWrapper): Store the hash table key as our weak
3289         handle context, so we can use it at destruction time.
3290
3291         * bindings/js/ScriptWrappable.h:
3292         (WebCore::ScriptWrappable::setWrapper): Forward context parameter, to
3293         support the above.
3294
3295 2011-04-15  Kenneth Russell  <kbr@google.com>
3296
3297         Unreviewed. Chromium Linux Release build fix due to unused variables.
3298
3299         * platform/audio/mkl/FFTFrameMKL.cpp:
3300         (WebCore::FFTFrame::doFFT):
3301         (WebCore::FFTFrame::doInverseFFT):
3302         (WebCore::FFTFrame::cleanup):
3303
3304 2011-04-15  Brent Fulgham  <bfulgham@webkit.org>
3305
3306         Unreviewed build change after r83945.
3307
3308         New 'PlatformPathCairo.cpp' was not added to the WinCairo build.
3309
3310         * WebCore.vcproj/WebCore.vcproj: Add missing file to WinCairo
3311           build.  Exclude for standard Apple build.
3312
3313 2011-04-15  Anders Carlsson  <andersca@apple.com>
3314
3315         Reviewed by Dan Bernstein.
3316
3317         Fade the find page overlay
3318         https://bugs.webkit.org/show_bug.cgi?id=58697
3319
3320         Add a symbol that WebKit2 needs.
3321
3322         * WebCore.exp.in:
3323
3324 2011-04-15  MORITA Hajime  <morrita@google.com>
3325
3326         Reviewed by Dimitri Glazkov.
3327
3328         RenderDetailsMarker should belong to shadow element.
3329         https://bugs.webkit.org/show_bug.cgi?id=58591
3330
3331         - Introduced DetailsMarkerControl element, which is a shadow element of <summary>, creates RenderDetailsMarker.
3332         - Removed custom layout code from RenderDetails, RenderDetailsMarker, which is now done by usual CSS layout.
3333           Note that marker size is given via style for -webkit-details-marker pseudo class.
3334         - Converted default summary implementation from pure-renderer style to shadow of HTMLDetailsElement.
3335           Now RenderDetails knows nothing about default summary.
3336         - Moved event handling code from HTMLDetailsElement to HTMLSummaryElement because now the marker is always child of 
3337           <summary>, and the clickable area is now <summary> itself.
3338
3339         - Note that the rendering result is changed due to the conversion from custom layout code to usual CSS styling.
3340
3341         * Android.mk:
3342         * CMakeLists.txt:
3343         * GNUmakefile.list.am:
3344         * WebCore.gypi:
3345         * WebCore.pro:
3346         * WebCore.vcproj/WebCore.vcproj:
3347         * WebCore.xcodeproj/project.pbxproj:
3348         * css/html.css:
3349         (summary::-webkit-details-marker):
3350         * dom/Element.cpp:
3351         (WebCore::Element::attach):
3352         * dom/Node.cpp:
3353         (WebCore::shouldCreateRendererFor):
3354         * dom/Node.h:
3355         (WebCore::Node::canHaveLightChildRendererWithShadow):
3356         * html/HTMLDetailsElement.cpp:
3357         (WebCore::HTMLDetailsElement::findSummaryFor):
3358         (WebCore::HTMLDetailsElement::findMainSummary):
3359         (WebCore::HTMLDetailsElement::refreshMainSummary):
3360         (WebCore::HTMLDetailsElement::createShadowSubtree):
3361         (WebCore::HTMLDetailsElement::childrenChanged):
3362         (WebCore::HTMLDetailsElement::finishParsingChildren):
3363         (WebCore::HTMLDetailsElement::toggleOpen):
3364         * html/HTMLDetailsElement.h:
3365         (WebCore::HTMLDetailsElement::canHaveLightChildRendererWithShadow):
3366         * html/HTMLSummaryElement.cpp:
3367         (WebCore::HTMLSummaryElement::create):
3368         (WebCore::HTMLSummaryElement::createShadowSubtree):
3369         (WebCore::HTMLSummaryElement::detailsElement):
3370         (WebCore::HTMLSummaryElement::isMainSummary):
3371         (WebCore::HTMLSummaryElement::defaultEventHandler):
3372         * html/HTMLSummaryElement.h:
3373         (WebCore::HTMLSummaryElement::canHaveLightChildRendererWithShadow):
3374         * html/shadow/DetailsMarkerControl.cpp: Added.
3375         (WebCore::DetailsMarkerControl::DetailsMarkerControl):
3376         (WebCore::DetailsMarkerControl::createRenderer):
3377         (WebCore::DetailsMarkerControl::rendererIsNeeded):
3378         (WebCore::DetailsMarkerControl::shadowPseudoId):
3379         (WebCore::DetailsMarkerControl::summaryElement):
3380         * html/shadow/DetailsMarkerControl.h: Added.
3381         (WebCore::DetailsMarkerControl::create):
3382         * rendering/RenderDetails.cpp:
3383         (WebCore::RenderDetails::RenderDetails):
3384         (WebCore::RenderDetails::styleDidChange):
3385         (WebCore::RenderDetails::moveSummaryToContents):
3386         (WebCore::RenderDetails::checkMainSummary):
3387         (WebCore::RenderDetails::layout):
3388         * rendering/RenderDetails.h:
3389         * rendering/RenderDetailsMarker.cpp:
3390         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
3391         (WebCore::RenderDetailsMarker::isOpen):
3392         (WebCore::RenderDetailsMarker::getPath):
3393         (WebCore::RenderDetailsMarker::paint):
3394         (WebCore::RenderDetailsMarker::details):
3395         * rendering/RenderDetailsMarker.h:
3396
3397 2011-04-15  Sam Weinig  <sam@webkit.org>
3398
3399         Reviewed by Adam Roben.
3400
3401         Implement localize strings for windows WebKit2
3402         https://bugs.webkit.org/show_bug.cgi?id=58688
3403
3404         * platform/win/LocalizedStringsWin.cpp:
3405         (WebCore::createWebKitBundle):
3406         (WebCore::webKitBundle):
3407         (WebCore::localizedString):
3408         Add implementation of localizedString for Windows.
3409
3410 2011-04-15  Geoffrey Garen  <ggaren@apple.com>
3411
3412         Reviewed by Oliver Hunt.
3413
3414         Some mechanical DOM wrapper cleanup
3415         https://bugs.webkit.org/show_bug.cgi?id=58689
3416
3417         * WebCore.exp.in: Export!
3418
3419         * bindings/js/DOMWrapperWorld.cpp:
3420         (WebCore::isReachableFromDOM): Inverted the inDocument test to make the
3421         relationship of the special cases to the normal case clearer.
3422
3423         * bindings/js/JSArrayBufferViewHelper.h:
3424         (WebCore::toJSArrayBufferView):
3425         * bindings/js/JSCSSRuleCustom.cpp:
3426         (WebCore::toJS):
3427         * bindings/js/JSCSSValueCustom.cpp:
3428         (WebCore::toJS):
3429         * bindings/js/JSDOMBinding.cpp:
3430         (WebCore::getCachedDOMObjectWrapper):
3431         (WebCore::cacheDOMObjectWrapper):
3432         * bindings/js/JSDOMBinding.h:
3433         (WebCore::createDOMObjectWrapper):
3434         (WebCore::getDOMObjectWrapper):
3435         (WebCore::createDOMNodeWrapper):
3436         (WebCore::getDOMNodeWrapper): Changed DOM wrapper functions to operate
3437         in terms of DOMWrapperWorlds instead of ExecStates. This is clearer,
3438         and ever-so-slightly faster.
3439         
3440         Removed hasCachedXXX functions, now that they're unused.
3441
3442         * bindings/js/JSDOMWindowCustom.cpp:
3443         (WebCore::JSDOMWindow::history):
3444         (WebCore::JSDOMWindow::location):
3445         * bindings/js/JSDocumentCustom.cpp:
3446         (WebCore::JSDocument::location):
3447         (WebCore::toJS):
3448         * bindings/js/JSElementCustom.cpp:
3449         (WebCore::toJSNewlyCreated):
3450         * bindings/js/JSEventCustom.cpp:
3451         (WebCore::toJS):
3452         * bindings/js/JSHTMLCollectionCustom.cpp:
3453         (WebCore::toJS):
3454         * bindings/js/JSImageDataCustom.cpp:
3455         (WebCore::toJS):
3456         * bindings/js/JSNodeCustom.cpp:
3457         (WebCore::createWrapperInline):
3458         * bindings/js/JSNodeCustom.h:
3459         (WebCore::getCachedDOMNodeWrapper):
3460         (WebCore::cacheDOMNodeWrapper):
3461         (WebCore::toJS):
3462         * bindings/js/JSSVGPathSegCustom.cpp:
3463         (WebCore::toJS):
3464         * bindings/js/JSStyleSheetCustom.cpp:
3465         (WebCore::toJS): Updated for changes above.
3466
3467         * xml/XMLHttpRequest.cpp:
3468         (WebCore::XMLHttpRequest::dropProtection): Removed use of hasCachedDOMObjectWrapper
3469         because XHR is almost always created and used by JavaScript, so it's
3470         simpler to just always report extra cost.
3471
3472 2011-04-15  Andreas Kling  <kling@webkit.org>
3473
3474         Rolling out accidental part of r84010.
3475
3476         * platform/qt/RenderThemeQt.cpp:
3477         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
3478         (WebCore::RenderThemeQt::setButtonPadding):
3479
3480 2011-04-15  Oliver Hunt  <oliver@apple.com>
3481
3482         Forgot windows build fix.
3483
3484         * bindings/js/JSNodeFilterCondition.cpp:
3485         (WebCore::JSNodeFilterCondition::WeakOwner::isReachableFromOpaqueRoots):
3486
3487 2011-04-15  Joseph Pecoraro  <joepeck@webkit.org>
3488
3489         Reviewed by Yury Semikhatsky.
3490
3491         Frontend Part of Web Inspector: Remote Web Inspector - Cross Platform InspectorServer
3492         https://bugs.webkit.org/show_bug.cgi?id=51364
3493
3494         The front end should not use a transparent background when