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