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