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