a20d0c2ef47fc117154330d6f5fe27b0ed999bc0
[WebKit-https.git] / WebCore / ChangeLog
1 2010-05-22  Martin Robinson  <mrobinson@igalia.com>
2
3         Reviewed by Xan Lopez.
4
5         [GTK] webkit_web_view_drag_end should call EventHandler::dragSourceEndedAt
6         https://bugs.webkit.org/show_bug.cgi?id=39465
7
8         Added a helper function for converting a GDK action bitmask into a DragOperation bitmask.
9
10         No new tests as behavior has not changed.
11
12         * platform/gtk/ClipboardUtilitiesGtk.cpp:
13         (WebCore::gdkDragActionToDragOperation): Added.
14         * platform/gtk/ClipboardUtilitiesGtk.h:
15
16 2010-05-22  Patrick Gansterer  <paroga@paroga.com>
17
18         Reviewed by Eric Seidel.
19
20         [Qt] Cleanup SharedBuffer::createWithContentsOfFile
21         https://bugs.webkit.org/show_bug.cgi?id=38917
22
23         * platform/qt/SharedBufferQt.cpp:
24         (WebCore::SharedBuffer::createWithContentsOfFile):
25
26 2010-05-22  Martin Robinson  <mrobinson@igalia.com>
27
28         Reviewed by Xan Lopez.
29
30         [GTK] WebKit/gtk/WebCoreSupport/DragClientGtk::startDrag should use the Clipboard::sourceOperation
31         https://bugs.webkit.org/show_bug.cgi?id=39459
32
33         Add ClipboardUtilitiesGtk, a container for GTK+/WebCore clipboard utility functions.
34         Initially add a function which converts a WebCore::DragOperation to a bitmask of
35         GdkDragActions.
36
37         No new tests, because behavior has not changed.
38
39         * GNUmakefile.am:
40         * platform/gtk/ClipboardUtilitiesGtk.cpp: Added.
41         (WebCore::dragOperationToGdkDragActions): Added.
42         * platform/gtk/ClipboardUtilitiesGtk.h: Added.
43
44 2010-05-21  Adam Barth  <abarth@webkit.org>
45
46         Reviewed by Eric Seidel.
47
48         Parse attributes with HTML5 lexer
49         https://bugs.webkit.org/show_bug.cgi?id=39520
50
51         This patch lets the HTML5 lexer parse attributes, as in
52         <div attr="foo"></div>.  This patch is on the critical path to running
53         the html5lib tests.
54
55         * html/HTML5Lexer.cpp:
56         (WebCore::HTML5Lexer::nextToken):
57         * html/HTML5Lexer.h:
58         * html/HTML5Token.h:
59         (WebCore::HTML5Token::beginStartTag):
60         (WebCore::HTML5Token::beginEndTag):
61         (WebCore::HTML5Token::addNewAttribute):
62         (WebCore::HTML5Token::appendToAttributeName):
63         (WebCore::HTML5Token::appendToAttributeValue):
64         (WebCore::HTML5Token::attributes):
65         * html/HTML5Tokenizer.cpp:
66         (WebCore::convertToOldStyle):
67
68 2010-05-21  Mark Rowe  <mrowe@apple.com>
69
70         60,000!
71
72         * ChangeLog: Point out revision 60,000.
73
74 2010-05-21  David Hyatt  <hyatt@apple.com>
75
76         Reviewed by Dan Bernstein.
77
78         Preparation for support of column-span, which will be implemented using continuations.  When a block splits an inline, a
79         continuation chain is created of the form inline -> anonymous block -> inline.  The middle block is always anonymous.  When a column-span
80         splits the blocks in a multi-column block, it will create a similar chain: block -> anonymous block -> block. Enclosing split elements
81         directly connect to their continuations, so their chains will look like inline -> inline or block -> block.
82         
83         This patch changes the member variable in RenderBlock, m_inlineContinuation, to simply be m_continuation and loosens up the type on it
84         to RenderBoxModelObject.  This reflects the fact that the continuation of the block can now be another block and isn't always simply an inline.
85         
86         Some renames have been done for cleanup:
87             isInlineContinuation -> isInlineElementContinuation to emphasize that this is a split non-anonymous element.
88             inlineContinuation -> inlineElementContinuation, again to emphasize that the inline is not anonymous.
89             
90         Some new methods have been added:
91             isBlockElementContinuation - just like isInlineElementContinuation but for split block elements.
92             blockElementContinuation - just like inlineElementContinuation but for split block elements.
93             virtualContinuation - A way to just walk an entire continuation chain of mixed types (blocks and inlines) using their common base class.
94             isAnonymousBlockContinuation - A method for asking if a RenderBlock is an anonymous block in the continuation chain (the guy in the middle).
95             
96         Code that was specific to the anonymous blocks in a continuation chain has been patched to ask isAnonymousBlockContinuation, so that it won't
97         incorrectly apply to non-anonymous blocks in the future.  Where possible, code that really didn't care about being an inline vs. a block has
98         been broadened so that it will work with block continuations as well.
99
100         * accessibility/AccessibilityRenderObject.cpp:
101         (WebCore::lastChildConsideringContinuation):
102         (WebCore::startOfContinuations):
103         (WebCore::endOfContinuations):
104         (WebCore::childBeforeConsideringContinuations):
105         (WebCore::firstChildIsInlineContinuation):
106         (WebCore::AccessibilityRenderObject::nextSibling):
107         (WebCore::AccessibilityRenderObject::anchorElement):
108         * rendering/InlineFlowBox.cpp:
109         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
110         (WebCore::InlineFlowBox::paint):
111         * rendering/RenderBlock.cpp:
112         (WebCore::RenderBlock::RenderBlock):
113         (WebCore::RenderBlock::destroy):
114         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
115         (WebCore::RenderBlock::removeChild):
116         (WebCore::RenderBlock::paintObject):
117         (WebCore::RenderBlock::inlineElementContinuation):
118         (WebCore::RenderBlock::blockElementContinuation):
119         (WebCore::RenderBlock::addContinuationWithOutline):
120         (WebCore::RenderBlock::absoluteRects):
121         (WebCore::RenderBlock::absoluteQuads):
122         (WebCore::RenderBlock::rectWithOutlineForRepaint):
123         (WebCore::RenderBlock::hoverAncestor):
124         (WebCore::RenderBlock::updateDragState):
125         (WebCore::RenderBlock::outlineStyleForRepaint):
126         (WebCore::RenderBlock::updateHitTestResult):
127         (WebCore::RenderBlock::addFocusRingRects):
128         * rendering/RenderBlock.h:
129         (WebCore::RenderBlock::continuation):
130         (WebCore::RenderBlock::setContinuation):
131         (WebCore::RenderBlock::virtualContinuation):
132         (WebCore::RenderBlock::isAnonymousBlockContinuation):
133         * rendering/RenderInline.cpp:
134         (WebCore::RenderInline::inlineElementContinuation):
135         (WebCore::RenderInline::styleDidChange):
136         (WebCore::nextContinuation):
137         (WebCore::RenderInline::splitInlines):
138         (WebCore::RenderInline::positionForPoint):
139         (WebCore::RenderInline::updateHitTestResult):
140         * rendering/RenderInline.h:
141         (WebCore::RenderInline::setContinuation):
142         (WebCore::RenderInline::virtualContinuation):
143         * rendering/RenderObject.cpp:
144         (WebCore::RenderObject::getTextDecorationColors):
145         * rendering/RenderObject.h:
146         (WebCore::RenderObject::isElementContinuation):
147         (WebCore::RenderObject::isInlineElementContinuation):
148         (WebCore::RenderObject::isBlockElementContinuation):
149         (WebCore::RenderObject::virtualContinuation):
150         * rendering/RenderObjectChildList.cpp:
151         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
152         * rendering/RenderRubyBase.cpp:
153         (WebCore::RenderRubyBase::moveBlockChildren):
154
155 2010-05-21  Mark Rowe  <mrowe@apple.com>
156
157         Reviewed by Oliver Hunt.
158
159         Teach WebKit2 to build in the Production configuration.
160
161         * Configurations/WebCore.xcconfig: Pass -allowable_client to the linker in all configurations.
162
163 2010-05-21  Chris Marrin  <cmarrin@apple.com>
164
165         Reviewed by Simon Fraser.
166
167         Implement tiled compositing layers on Windows
168         https://bugs.webkit.org/show_bug.cgi?id=39461
169         
170         This adds a tiling implementation similar (from a GraphicsLayer standpoint)
171         to the one for Mac. But where Mac uses the existing CATiledLayer, I've had
172         to implement one. If a layer is greater then 2k x 2k, I split it into an
173         array of 512 x 512 tiles. These tiles are positioned in the correct place 
174         for the TiledLayer's content. When setNeedsDisplay is called on the TiledLayer
175         the tiles' setNeedDisplay methods are called. Each tile clips and positions the
176         CGContext appropriately and then renders the layer.
177         
178         I also got rid of all frame()/setFrame() API to reduce the number of calls to
179         override for tiling.
180         
181         Much optimization is possible. Most significantly right now all tiles are
182         rendered whether visible or not. We need to only render tiles that are 
183         currently visible.
184
185         Tests: compositing/huge-layer-add-remove-child.html
186                compositing/huge-layer-resize.html
187                compositing/huge-layer-with-layer-children-resize.html
188                compositing/huge-layer-with-layer-children.html
189                compositing/huge-layer.html
190
191         * WebCore.vcproj/WebCore.vcproj:
192         * platform/graphics/win/GraphicsLayerCACF.cpp: Added tiling code similar to GraphicsLayerCA
193         (WebCore::GraphicsLayerCACF::requiresTiledLayer):
194         (WebCore::GraphicsLayerCACF::swapFromOrToTiledLayer):
195         (WebCore::GraphicsLayerCACF::updateLayerSize):
196         (WebCore::GraphicsLayerCACF::updateLayerDrawsContent):
197         * platform/graphics/win/GraphicsLayerCACF.h:
198         * platform/graphics/win/WKCACFLayer.cpp: Made some methods virtual so WebTiledLayer can override.
199                                                  Also added sublayer setting and manipulation methods needed for tiling
200         (WebCore::WKCACFLayer::addSublayer):
201         (WebCore::WKCACFLayer::internalInsertSublayer):
202         (WebCore::WKCACFLayer::insertSublayerAboveLayer):
203         (WebCore::WKCACFLayer::insertSublayerBelowLayer):
204         (WebCore::WKCACFLayer::replaceSublayer):
205         (WebCore::WKCACFLayer::internalSublayerCount):
206         (WebCore::WKCACFLayer::adoptSublayers):
207         (WebCore::WKCACFLayer::internalSublayerAtIndex):
208         (WebCore::WKCACFLayer::internalIndexOfSublayer):
209         (WebCore::WKCACFLayer::internalRemoveAllSublayers):
210         (WebCore::WKCACFLayer::internalSetSublayers):
211         (WebCore::WKCACFLayer::internalSetNeedsDisplay):
212         (WebCore::WKCACFLayer::printLayer):
213         * platform/graphics/win/WKCACFLayer.h:
214         (WebCore::WKCACFLayer::setNeedsDisplay):
215         (WebCore::WKCACFLayer::removeAllSublayers):
216         (WebCore::WKCACFLayer::setSublayers):
217         (WebCore::WKCACFLayer::insertSublayer):
218         (WebCore::WKCACFLayer::sublayerCount):
219         * platform/graphics/win/WKCACFLayerRenderer.cpp: Fix a crash exposed when tiling code is active
220         (WebCore::WKCACFLayerRenderer::createRenderer):
221         (WebCore::WKCACFLayerRenderer::destroyRenderer):
222         (WebCore::WKCACFLayerRenderer::resize):
223         * platform/graphics/win/WebLayer.cpp: Added. Split this out from GraphicsLayerCACF so it could be subclassed by WebTiledLayer
224         (WebCore::WebLayer::internalSetNeedsDisplay):
225         (WebCore::WebLayer::drawInContext):
226         * platform/graphics/win/WebLayer.h: Added.
227         (WebCore::WebLayer::create):
228         (WebCore::WebLayer::WebLayer):
229         * platform/graphics/win/WebTiledLayer.cpp: Added. Where all the tile construction and rendering is done
230         (WebCore::WebTiledLayer::tileDisplayCallback):
231         (WebCore::WebTiledLayer::create):
232         (WebCore::WebTiledLayer::WebTiledLayer):
233         (WebCore::WebTiledLayer::~WebTiledLayer):
234         (WebCore::WebTiledLayer::setBounds):
235         (WebCore::WebTiledLayer::internalSetNeedsDisplay):
236         (WebCore::WebTiledLayer::internalSublayerCount):
237         (WebCore::WebTiledLayer::internalRemoveAllSublayers):
238         (WebCore::WebTiledLayer::internalSetSublayers):
239         (WebCore::WebTiledLayer::internalInsertSublayer):
240         (WebCore::WebTiledLayer::internalSublayerAtIndex):
241         (WebCore::WebTiledLayer::internalIndexOfSublayer):
242         (WebCore::WebTiledLayer::addTile):
243         (WebCore::WebTiledLayer::removeTile):
244         (WebCore::WebTiledLayer::tileAtIndex):
245         (WebCore::WebTiledLayer::tileCount):
246         (WebCore::WebTiledLayer::updateTiles):
247         (WebCore::WebTiledLayer::drawTile):
248         * platform/graphics/win/WebTiledLayer.h: Added.
249
250 2010-05-21  Geoffrey Garen  <ggaren@apple.com>
251
252         Reviewed by Darin Adler.
253
254         Fixed a typo in my last commit: Reset m_inEvaluateInWorld to
255         wasInEvaluateInWorld, rather than false, to avoid stomping the old value
256         when it's true.
257         https://bugs.webkit.org/show_bug.cgi?id=39518
258
259         * bindings/js/ScriptController.cpp:
260         (WebCore::ScriptController::evaluateInWorld):
261
262 2010-05-21  David Hyatt  <hyatt@apple.com>
263
264         Reviewed by Dan Bernstein.
265
266         https://bugs.webkit.org/show_bug.cgi?id=39516, back end support for column-span property.
267
268         * css/CSSComputedStyleDeclaration.cpp:
269         (WebCore::):
270         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
271         * css/CSSParser.cpp:
272         (WebCore::CSSParser::parseValue):
273         * css/CSSPropertyNames.in:
274         * css/CSSStyleSelector.cpp:
275         (WebCore::CSSStyleSelector::applyProperty):
276         * rendering/style/RenderStyle.h:
277         (WebCore::InheritedFlags::columnSpan):
278         (WebCore::InheritedFlags::setColumnSpan):
279         (WebCore::InheritedFlags::initialColumnSpan):
280         * rendering/style/StyleMultiColData.cpp:
281         (WebCore::StyleMultiColData::StyleMultiColData):
282         (WebCore::StyleMultiColData::operator==):
283         * rendering/style/StyleMultiColData.h:
284
285 2010-05-21  Jer Noble  <jer.noble@apple.com>
286
287         Reviewed by Anders Carlsson.
288
289         Disable full-screen video on Windows
290         https://bugs.webkit.org/show_bug.cgi?id=39506
291         rdar://problem/8012516
292         
293         Disable full-screen video through MediaPlayerPrivateVisualContext since
294         we no longer use GWorlds and QuickTime's built in full-screen support.
295         
296         Media layout tests updated with new expected results.        
297         
298         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
299         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen):
300
301 2010-05-21  Simon Fraser  <simon.fraser@apple.com>
302
303         Reviewed by Dan Bernstein.
304
305         Avoid creating huge tiled layers with accelerated compositing
306         https://bugs.webkit.org/show_bug.cgi?id=39515
307         
308         Constrain the size of huge composited layers, to avoid bad behavior. We only
309         need to do this if we detect that we need a tiled layer, since we'll make tiled
310         layers for elements over a certain size that need to draw already.
311         
312         Constrain the size by attempting to shrink the longer dimension first.
313
314         Test: compositing/geometry/huge-layer.html
315
316         * platform/graphics/mac/GraphicsLayerCA.h:
317         * platform/graphics/mac/GraphicsLayerCA.mm:
318         (WebCore::GraphicsLayerCA::updateLayerPosition):
319         (WebCore::GraphicsLayerCA::updateLayerSize):
320         (WebCore::GraphicsLayerCA::constrainedSize):
321
322 2010-05-21  David Hyatt  <hyatt@apple.com>
323
324         Reviewed by Dan Bernstein.
325
326         https://bugs.webkit.org/show_bug.cgi?id=39420, :visited not working with background-color.
327
328         Make the RenderStyle color accessors private.  This forces callers to use visitedDependentColor
329         instead (or to make the decision to become friends of the RenderStyle class in order to get access
330         to the real style information).
331
332         Modified history/self-is-visited.html to also test background colors.
333
334         * WebCore.base.exp:
335         * accessibility/AccessibilityTable.cpp:
336         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
337         * accessibility/mac/AccessibilityObjectWrapper.mm:
338         (AXAttributeStringSetStyle):
339         * css/CSSComputedStyleDeclaration.cpp:
340         (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
341         * css/CSSComputedStyleDeclaration.h:
342         * css/SVGCSSStyleSelector.cpp:
343         (WebCore::colorFromSVGColorCSSValue):
344         * editing/ApplyStyleCommand.cpp:
345         (WebCore::ApplyStyleCommand::editingStyleAtPosition):
346         (WebCore::prepareEditingStyleToApplyAt):
347         (WebCore::removeStylesAddedByNode):
348         (WebCore::fontColorChangesComputedStyle):
349         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
350         * editing/ApplyStyleCommand.h:
351         (WebCore::):
352         * editing/CompositeEditCommand.cpp:
353         (WebCore::CompositeEditCommand::moveParagraphs):
354         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
355         * editing/DeleteButtonController.cpp:
356         (WebCore::isDeletableElement):
357         * editing/DeleteSelectionCommand.cpp:
358         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
359         * editing/InsertParagraphSeparatorCommand.cpp:
360         (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
361         * editing/RemoveFormatCommand.cpp:
362         (WebCore::RemoveFormatCommand::doApply):
363         * editing/ReplaceSelectionCommand.cpp:
364         (WebCore::handleStyleSpansBeforeInsertion):
365         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
366         (WebCore::ReplaceSelectionCommand::doApply):
367         * editing/SelectionController.cpp:
368         (WebCore::SelectionController::paintCaret):
369         * editing/markup.cpp:
370         (WebCore::createMarkup):
371         * page/animation/AnimationBase.cpp:
372         (WebCore::AnimationBase::ensurePropertyMap):
373         * page/animation/AnimationBase.h:
374         * page/mac/FrameMac.mm:
375         (WebCore::Frame::fontAttributesForSelectionStart):
376         * rendering/EllipsisBox.cpp:
377         (WebCore::EllipsisBox::paint):
378         (WebCore::EllipsisBox::paintSelection):
379         * rendering/InlineTextBox.cpp:
380         (WebCore::InlineTextBox::paint):
381         * rendering/RenderBox.cpp:
382         (WebCore::RenderBox::styleDidChange):
383         (WebCore::RenderBox::paintRootBoxDecorations):
384         (WebCore::RenderBox::paintBoxDecorationsWithSize):
385         * rendering/RenderBoxModelObject.cpp:
386         (WebCore::RenderBoxModelObject::paintBoxShadow):
387         * rendering/RenderFieldset.cpp:
388         (WebCore::RenderFieldset::paintBoxDecorations):
389         * rendering/RenderFileUploadControl.cpp:
390         (WebCore::RenderFileUploadControl::paintObject):
391         * rendering/RenderFrameSet.cpp:
392         (WebCore::RenderFrameSet::paintColumnBorder):
393         (WebCore::RenderFrameSet::paintRowBorder):
394         * rendering/RenderImage.cpp:
395         (WebCore::RenderImage::paintReplaced):
396         * rendering/RenderLayerBacking.cpp:
397         (WebCore::RenderLayerBacking::rendererBackgroundColor):
398         * rendering/RenderLayerBacking.h:
399         * rendering/RenderListBox.cpp:
400         (WebCore::RenderListBox::paintItemForeground):
401         (WebCore::RenderListBox::paintItemBackground):
402         * rendering/RenderListMarker.cpp:
403         (WebCore::RenderListMarker::paint):
404         * rendering/RenderMenuList.cpp:
405         (WebCore::RenderMenuList::itemStyle):
406         (WebCore::RenderMenuList::itemBackgroundColor):
407         (WebCore::RenderMenuList::menuStyle):
408         * rendering/RenderObject.cpp:
409         (WebCore::RenderObject::selectionBackgroundColor):
410         (WebCore::RenderObject::selectionForegroundColor):
411         * rendering/RenderSVGResource.cpp:
412         (WebCore::RenderSVGResource::adjustColorForPseudoRules):
413         (WebCore::RenderSVGResource::fillPaintingResource):
414         (WebCore::RenderSVGResource::strokePaintingResource):
415         * rendering/RenderSVGResource.h:
416         * rendering/RenderTable.cpp:
417         (WebCore::RenderTable::paintBoxDecorations):
418         * rendering/RenderTable.h:
419         (WebCore::RenderTable::bgColor):
420         * rendering/RenderTableCell.cpp:
421         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
422         * rendering/RenderTextControl.cpp:
423         (WebCore::RenderTextControl::adjustInnerTextStyle):
424         * rendering/RenderTextControlSingleLine.cpp:
425         (WebCore::RenderTextControlSingleLine::menuStyle):
426         * rendering/RenderTheme.cpp:
427         (WebCore::RenderTheme::isControlStyled):
428         * rendering/RenderThemeMac.mm:
429         (WebCore::RenderThemeMac::paintMenuListButton):
430         * rendering/RenderTreeAsText.cpp:
431         (WebCore::RenderTreeAsText::writeRenderObject):
432         (WebCore::write):
433         * rendering/RenderTreeAsText.h:
434         * rendering/SVGInlineTextBox.cpp:
435         (WebCore::SVGInlineTextBox::paintSelection):
436         * rendering/SVGRenderTreeAsText.cpp:
437         (WebCore::writeRenderSVGTextBox):
438         * rendering/style/RenderStyle.cpp:
439         (WebCore::RenderStyle::colorIncludingFallback):
440         (WebCore::RenderStyle::visitedDependentColor):
441         * rendering/style/RenderStyle.h:
442         (WebCore::):
443         (WebCore::InheritedFlags::hasBackground):
444         (WebCore::InheritedFlags::borderLeftStyle):
445         (WebCore::InheritedFlags::borderRightStyle):
446         (WebCore::InheritedFlags::borderTopStyle):
447         (WebCore::InheritedFlags::borderBottomStyle):
448         (WebCore::InheritedFlags::textShadow):
449         (WebCore::InheritedFlags::textStrokeWidth):
450         (WebCore::InheritedFlags::hasNormalColumnGap):
451         (WebCore::InheritedFlags::borderLeftColor):
452         (WebCore::InheritedFlags::borderRightColor):
453         (WebCore::InheritedFlags::borderTopColor):
454         (WebCore::InheritedFlags::borderBottomColor):
455         (WebCore::InheritedFlags::backgroundColor):
456         (WebCore::InheritedFlags::color):
457         (WebCore::InheritedFlags::columnRuleColor):
458         (WebCore::InheritedFlags::outlineColor):
459         (WebCore::InheritedFlags::textFillColor):
460         (WebCore::InheritedFlags::textStrokeColor):
461         * svg/SVGAnimationElement.cpp:
462         (WebCore::adjustForCurrentColor):
463
464 2010-05-21  Beth Dakin  <bdakin@apple.com>
465
466         Reviewed by Darin Adler.
467
468         Fix for <rdar://problem/8009118> Crash in WebCore::toAlphabetic() 
469         while running MangleMe
470         -and corresponding-
471         https://bugs.webkit.org/show_bug.cgi?id=39508
472
473         The math was slightly off here, and we wound up trying to access an 
474         array at index -1 in some cases. We need to decrement numberShadow 
475         rather than subtracting one from the result of the modulo 
476         operation.
477
478         * rendering/RenderListMarker.cpp:
479         (WebCore::toAlphabeticOrNumeric):
480
481 2010-05-21  Oliver Hunt  <oliver@apple.com>
482
483         Qt buildfix #2
484
485         * bridge/qt/qt_runtime.cpp:
486         (JSC::Bindings::convertQVariantToValue):
487         (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
488
489 2010-05-21  Oliver Hunt  <oliver@apple.com>
490
491         Qt buildfix #1
492
493         * bridge/qt/qt_instance.cpp:
494         (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
495         (JSC::Bindings::QtInstance::newRuntimeObject):
496         (JSC::Bindings::QtInstance::getMethod):
497         * bridge/qt/qt_pixmapruntime.cpp:
498         (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
499         (JSC::Bindings::QtPixmapInstance::getMethod):
500         (JSC::Bindings::QtPixmapInstance::createRuntimeObject):
501
502 2010-05-21  Geoffrey Garen  <ggaren@apple.com>
503
504         Reviewed by Oliver Hunt.
505
506         Fixed failure seen on buildbot (due to flaky test).
507         
508         Don't report an exception in a nested script evaluation -- just pass the
509         exception on to our caller. Our caller can decide to report the exception,
510         if it fully propagates -- but we don't want to report an exception that's
511         going to get caught.
512
513         * bindings/js/ScriptController.cpp:
514         (WebCore::ScriptController::ScriptController):
515         (WebCore::ScriptController::evaluateInWorld):
516         * bindings/js/ScriptController.h:
517
518 2010-05-21  Oliver Hunt  <oliver@apple.com>
519
520         Reviewed by Geoffrey Garen.
521
522         All callable objects should have a global object reference
523         https://bugs.webkit.org/show_bug.cgi?id=39495
524
525         Update the bindings generator to give prototype objects a
526         global object.  Update all the manually written JSObject
527         subclasses to pass a global object.
528
529         * ForwardingHeaders/runtime/JSObjectWithGlobalObject.h: Added.
530         * WebCore.PluginHostProcess.exp:
531         * bindings/js/JSDOMBinding.cpp:
532         (WebCore::objectToStringFunctionGetter):
533         * bindings/js/JSDOMWindowCustom.cpp:
534         (WebCore::nonCachingStaticFunctionGetter):
535         * bindings/js/JSDOMWindowShell.cpp:
536         (WebCore::JSDOMWindowShell::setWindow):
537         * bindings/js/JSHistoryCustom.cpp:
538         (WebCore::nonCachingStaticBackFunctionGetter):
539         (WebCore::nonCachingStaticForwardFunctionGetter):
540         (WebCore::nonCachingStaticGoFunctionGetter):
541         * bindings/js/JSLocationCustom.cpp:
542         (WebCore::nonCachingStaticReplaceFunctionGetter):
543         (WebCore::nonCachingStaticReloadFunctionGetter):
544         (WebCore::nonCachingStaticAssignFunctionGetter):
545         * bindings/js/WorkerScriptController.cpp:
546         (WebCore::WorkerScriptController::initScript):
547         * bindings/scripts/CodeGeneratorJS.pm:
548         * bridge/c/CRuntimeObject.cpp:
549         (JSC::Bindings::CRuntimeObject::CRuntimeObject):
550         * bridge/c/CRuntimeObject.h:
551         * bridge/c/c_instance.cpp:
552         (JSC::Bindings::CInstance::newRuntimeObject):
553         (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
554         (JSC::Bindings::CInstance::getMethod):
555         * bridge/jni/jsc/JavaInstanceJSC.cpp:
556         (JavaInstance::newRuntimeObject):
557         (JavaRuntimeMethod::JavaRuntimeMethod):
558         (JavaInstance::getMethod):
559         * bridge/jni/jsc/JavaRuntimeObject.cpp:
560         (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
561         * bridge/jni/jsc/JavaRuntimeObject.h:
562         * bridge/jsc/BridgeJSC.cpp:
563         (JSC::Bindings::Instance::newRuntimeObject):
564         * bridge/objc/ObjCRuntimeObject.h:
565         * bridge/objc/ObjCRuntimeObject.mm:
566         (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
567         * bridge/objc/objc_class.mm:
568         (JSC::Bindings::ObjcClass::fallbackObject):
569         * bridge/objc/objc_instance.mm:
570         (ObjcInstance::newRuntimeObject):
571         (ObjCRuntimeMethod::ObjCRuntimeMethod):
572         (ObjcInstance::getMethod):
573         * bridge/objc/objc_runtime.h:
574         * bridge/objc/objc_runtime.mm:
575         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
576         * bridge/runtime_method.cpp:
577         (JSC::RuntimeMethod::RuntimeMethod):
578         * bridge/runtime_method.h:
579         * bridge/runtime_object.cpp:
580         (JSC::Bindings::RuntimeObject::RuntimeObject):
581         * bridge/runtime_object.h:
582
583 2010-05-21  Steve Block  <steveblock@google.com>
584
585         Reviewed by Jeremy Orlow.
586
587         Add DeviceOrientation and DeviceOrientationClient
588         https://bugs.webkit.org/show_bug.cgi?id=39479
589
590         The page owns a DeviceOrientation object, which has a pointer to a
591         DeviceOrientationClient object provided by the embedder. The
592         DeviceOrientation object forwards requests to start listening to
593         orientation to the client, and when updates are available, fires a
594         DeviceOrientationEvent on the window object.
595
596         No new tests are possible at this time as the implementation is
597         incomplete. Future patches will add LayoutTestController methods
598         to provide mock orientation events to test this.
599
600         * Android.mk:
601         * CMakeLists.txt:
602         * GNUmakefile.am:
603         * WebCore.base.exp:
604         * WebCore.gypi:
605         * WebCore.pro:
606         * WebCore.vcproj/WebCore.vcproj
607         * WebCore.xcodeproj/project.pbxproj:
608         * dom/DeviceOrientation.cpp: Added.
609         (WebCore::DeviceOrientation::DeviceOrientation):
610         (WebCore::DeviceOrientation::onDeviceOrientationChange):
611         * dom/DeviceOrientation.h: Added.
612         * dom/DeviceOrientationClient.h: Added.
613         (WebCore::DeviceOrientationClient::~DeviceOrientationClient):
614         * page/Page.cpp:
615         (WebCore::Page::Page):
616         * page/Page.h:
617         (WebCore::Page::deviceOrientation):
618         * svg/graphics/SVGImage.cpp:
619         (WebCore::SVGImage::dataChanged):
620
621 2010-05-21  Tasuku Suzuki  <tasuku.suzuki@nokia.com>
622
623         Reviewed by Simon Hausmann.
624
625         [Qt] Fix compilation with QT_NO_GRAPHICSEFFECT
626         https://bugs.webkit.org/show_bug.cgi?id=38324
627
628         * platform/graphics/qt/GraphicsLayerQt.cpp:
629         (WebCore::GraphicsLayerQtImpl::flushChanges):
630
631 2010-05-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
632
633         Reviewed by Darin Fisher.
634
635         Fix the HistoryController::pushState.
636
637         It should be possible to call the pushState method from
638         the first page in a window.
639
640         history.pushState doesn't work for the first page in a window.
641         https://bugs.webkit.org/show_bug.cgi?id=39418
642
643         * loader/HistoryController.cpp:
644         (WebCore::HistoryController::pushState):
645
646 2010-05-21  Victoria Kirst  <vrk@google.com>
647
648         Reviewed by David Levin.
649
650         [chromium] Fix slider status when buffering
651         https://bugs.webkit.org/show_bug.cgi?id=39370
652         Adjusts the buffering bar to be aligned with the slider thumb.
653
654         No new tests. (Covered by existing layout tests.)
655
656         * rendering/RenderMediaControlsChromium.cpp:
657         (WebCore::paintMediaSlider):
658         Added logic to align the buffering bar with the thumb. Half of the
659         thumb image is transparent, so the buffer bar is adjusted to fill in
660         this gap.
661
662 2010-05-21  Jesus Sanchez-Palencia  <jesus@webkit.org>
663
664         Reviewed by Eric Seidel.
665
666         Extra processesArguments() calls in Document::processViewport
667         https://bugs.webkit.org/show_bug.cgi?id=39358
668
669         The viewport arguments are only needed when there is a frame->page(),
670         therefore we don't need to always call processArguments().
671
672         * dom/Document.cpp:
673         (WebCore::Document::processViewport):
674
675 2010-05-17  Philippe Normand  <pnormand@igalia.com>
676
677         Reviewed by Eric Carlson.
678
679         [GStreamer] video painting support on mac port
680         https://bugs.webkit.org/show_bug.cgi?id=39206
681
682         ImageGStreamer support for mac port. A CG Image is created using
683         the GstBuffer data. It can then be painted by the gstreamer player.
684
685         * platform/graphics/gstreamer/ImageGStreamer.h:
686         * platform/graphics/gstreamer/ImageGStreamerCG.mm: Added.
687         (ImageGStreamer::createImage):
688         (ImageGStreamer::ImageGStreamer):
689         (ImageGStreamer::~ImageGStreamer):
690
691 2010-05-21  Robin Cao  <robin.cao@torchmobile.com.cn>
692
693         Reviewed by Eric Seidel.
694
695         animateTransform does not work on gradientTransform
696         https://bugs.webkit.org/show_bug.cgi?id=38115
697
698         Tests: svg/animations/animate-gradient-transform.html
699
700         * svg/SVGAnimateTransformElement.cpp:
701         (WebCore::SVGAnimateTransformElement::hasValidTarget): Check if the target element is gradient.
702         (WebCore::transformListFor): Ditto.
703         (WebCore::SVGAnimateTransformElement::resetToBaseValue): Ditto.
704         (WebCore::SVGAnimateTransformElement::applyResultsToTarget): Ditto.
705
706 2010-05-21  Young Han Lee  <joybro@company100.net>
707
708         Reviewed by Eric Seidel.
709
710         Fix guard around DatabaseSync
711         https://bugs.webkit.org/show_bug.cgi?id=38897
712
713         * storage/DatabaseSync.cpp:
714
715 2010-05-21  Simon Hausmann  <simon.hausmann@nokia.com>
716
717         [Qt] Prospective Qt/Mac build fix
718
719         My cpp is paranoid and doesn't like #if Q_WS_MAC:
720         error: #if with no expression
721
722         * page/qt/EventHandlerQt.cpp:
723
724 2010-05-21  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
725
726         Reviewed by Eric Seidel.
727
728         [EFL] Update Localized Strings. Remove markers from strings
729         since we are not using them and they are only polluting output.
730         https://bugs.webkit.org/show_bug.cgi?id=39371
731
732         No new tests required.
733
734         * platform/efl/LocalizedStringsEfl.cpp:
735         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
736         (WebCore::contextMenuItemTagDownloadLinkToDisk):
737         (WebCore::contextMenuItemTagCopyLinkToClipboard):
738         (WebCore::contextMenuItemTagOpenImageInNewWindow):
739         (WebCore::contextMenuItemTagDownloadImageToDisk):
740         (WebCore::contextMenuItemTagCopyImageToClipboard):
741         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
742         (WebCore::contextMenuItemTagSelectAll):
743         (WebCore::contextMenuItemTagUnicode):
744         (WebCore::contextMenuItemTagInputMethods):
745         (WebCore::contextMenuItemTagGoBack):
746         (WebCore::contextMenuItemTagGoForward):
747         (WebCore::contextMenuItemTagReload):
748         (WebCore::contextMenuItemTagIgnoreSpelling):
749         (WebCore::contextMenuItemTagLearnSpelling):
750         (WebCore::contextMenuItemTagSearchWeb):
751         (WebCore::contextMenuItemTagLookUpInDictionary):
752         (WebCore::contextMenuItemTagOpenLink):
753         (WebCore::contextMenuItemTagIgnoreGrammar):
754         (WebCore::contextMenuItemTagSpellingMenu):
755         (WebCore::contextMenuItemTagCheckSpelling):
756         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
757         (WebCore::contextMenuItemTagFontMenu):
758         (WebCore::contextMenuItemTagOutline):
759         (WebCore::contextMenuItemTagInspectElement):
760         (WebCore::searchMenuClearRecentSearchesText):
761         (WebCore::missingPluginText): Add missing message.
762         (WebCore::multipleFileUploadText):
763         (WebCore::crashedPluginText):
764
765 2010-05-21  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
766
767         Reviewed by Eric Seidel.
768
769         [EF] Fix support for focus ring.
770         https://bugs.webkit.org/show_bug.cgi?id=39387
771
772         No new tests required.
773
774         * html/HTMLAnchorElement.cpp: Add EFL to #ifdef
775         (WebCore::HTMLAnchorElement::isMouseFocusable):
776
777 2010-05-21  Kwang Yul Seo  <skyul@company100.net>
778
779         Reviewed by Eric Seidel.
780
781         [BREWMP] Add missing localized string symbols.
782         https://bugs.webkit.org/show_bug.cgi?id=39394
783
784         Add missingPluginText and crashedPluginText.
785
786         * platform/brew/LocalizedStringsBrew.cpp:
787         (WebCore::missingPluginText):
788         (WebCore::crashedPluginText):
789
790 2010-05-21  Steve Block  <steveblock@google.com>
791
792         Reviewed by Alexey Proskuryakov.
793
794         Calls to CallJNIMethodIDA() in JavaInstance::invokeMethod() are required on Android
795         https://bugs.webkit.org/show_bug.cgi?id=39426
796
797         This code path has always been used by Android, but was guarded with
798         BUILDING_ON_TIGER in http://trac.webkit.org/changeset/55054, thus
799         breaking the Android build.
800
801         No new tests, build fix only.
802
803         * bridge/jni/jsc/JavaInstanceJSC.cpp:
804         (JavaInstance::invokeMethod):
805
806 2010-05-20  Tony Chang  <tony@chromium.org>
807
808         Reviewed by Kent Tamura.
809
810         escape link text when copying or dragging links on win or chromium
811         https://bugs.webkit.org/show_bug.cgi?id=39413
812
813         * editing/markup.cpp:
814         (WebCore::urlToMarkup):
815         * editing/markup.h:
816         * platform/chromium/ClipboardUtilitiesChromium.cpp:
817         * platform/chromium/ClipboardUtilitiesChromium.h:
818         * platform/win/ClipboardUtilitiesWin.cpp:
819         * platform/win/ClipboardUtilitiesWin.h:
820
821 2010-05-18  Philippe Normand  <pnormand@igalia.com>
822
823         Reviewed by Eric Carlson.
824
825         [GStreamer] PlatformMedia support
826         https://bugs.webkit.org/show_bug.cgi?id=39300
827
828         Basic support for PlatformMedia in the gst player. The
829         PlatformMedia object contains a GStreamerGWorld object. That
830         object is empty for now. XOverlay features will be added later
831         on for easy review sake.
832
833         * GNUmakefile.am:
834         * platform/graphics/MediaPlayer.h:
835         (WebCore::PlatformMedia::):
836         * platform/graphics/gstreamer/GStreamerGWorld.cpp: Added.
837         (WebCore::GStreamerGWorld::createGWorld):
838         (WebCore::GStreamerGWorld::GStreamerGWorld):
839         (WebCore::GStreamerGWorld::~GStreamerGWorld):
840         * platform/graphics/gstreamer/GStreamerGWorld.h: Added.
841         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
842         (WebCore::MediaPlayerPrivateGStreamer::platformMedia):
843         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
844         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
845
846 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
847
848         Reviewed by Eric Seidel.
849
850         [BREWMP] Add dummy SSLKeyGenerator
851         https://bugs.webkit.org/show_bug.cgi?id=39403
852
853         Add dummy implementation of SSLKeyGenerator.
854
855         * platform/brew/SSLKeyGeneratorBrew.cpp: Added.
856         (WebCore::WebCore::getSupportedKeySizes):
857         (WebCore::WebCore::signedPublicKeyAndChallengeString):
858
859 2010-05-20  Mark Rowe  <mrowe@apple.com>
860
861         Rubber-stamped by Dan Bernstein.
862
863         <rdar://problem/7848154> Remove the dependency on Foundation's private __COCOA_FORMAL_PROTOCOLS_2__ define.
864
865         * platform/mac/EmptyProtocolDefinitions.h:
866
867 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
868
869         Reviewed by Eric Seidel.
870
871         [BREWMP] Add Editor
872         https://bugs.webkit.org/show_bug.cgi?id=39404
873
874         Implement Editor::newGeneralClipboard.
875
876         * editing/brew/EditorBrew.cpp: Added.
877         (WebCore::Editor::newGeneralClipboard):
878
879 2010-05-20  Simon Fraser  <simon.fraser@apple.com>
880
881         Reviewed by Adam Roben.
882
883         Avoid flushing CA layers when a layout is pending
884         https://bugs.webkit.org/show_bug.cgi?id=39463
885         <rdar://problem/7999463>
886
887         Avoid rendering the compositing layers to the screen if there's a layout pending,
888         since the layer tree not in a state that should be presented to the user.
889         
890         This fixes flashes in some types of content that dynamically add and remove layers.
891
892         Do this by adding a WKCACFLayerRendererClient for WKCACFLayerRenderer, which it can
893         call through to ask whether now is a good time to render. If not, it schedules
894         another render soon.
895         
896         * platform/graphics/win/WKCACFLayerRenderer.h:
897         (WebCore::WKCACFLayerRendererClient::~WKCACFLayerRendererClient):
898         * platform/graphics/win/WKCACFLayerRenderer.cpp:
899         (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
900         (WebCore::WKCACFLayerRenderer::create):
901         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
902         (WebCore::WKCACFLayerRenderer::render):
903
904 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
905
906         Reviewed by Eric Seidel.
907
908         [BREWMP] Don't include CoreFoundation.h when building for BREW MP
909         https://bugs.webkit.org/show_bug.cgi?id=39405
910
911         Add !defined(BUILDING_BREWMP__) guard for CoreFoundation.h.
912
913         * WebCorePrefix.h:
914
915 2010-05-20  Kwang Yul Seo  <skyul@company100.net>
916
917         Reviewed by Eric Seidel.
918
919         [BREWMP] Add ScrollTheme
920         https://bugs.webkit.org/show_bug.cgi?id=39406
921
922         As BREW MP always uses frame flattening, there is no need to render scorllbars.
923         Use the default scrollbar theme with thickness 0.
924
925         * platform/brew/ScrollbarThemeBrew.cpp: Added.
926         (WebCore::ScrollbarTheme::nativeTheme):
927         (WebCore::ScrollbarThemeBrew::~ScrollbarThemeBrew):
928         * platform/brew/ScrollbarThemeBrew.h: Added.
929
930 2010-05-20  Jon Honeycutt  <jhoneycutt@apple.com>
931
932         REGRESSION(r53637): DivX plug-in fails to start until window is resized
933         https://bugs.webkit.org/show_bug.cgi?id=39457
934         <rdar://problem/8006102>
935
936         Before r53637, we called Widget::move() (which caused us to call
937         NPP_SetWindow) before painting a plug-in. r53637 removed the call to
938         Widget::move(), and we end up never calling NPP_SetWindow for plug-ins
939         with the "DeferFirstSetWindowCall" quirk, including the DivX plug-in.
940
941         Reviewed by Simon Fraser.
942
943         * manual-tests/divx-plugin-fails-to-draw.html: Added.
944
945         * plugins/PluginView.cpp:
946         (WebCore::PluginView::PluginView):
947         Initialize new member to false.
948
949         * plugins/PluginView.h:
950         Added new member.
951
952         * plugins/win/PluginViewWin.cpp:
953         (WebCore::PluginView::paint):
954         Call setNPWindowRect() before painting to ensure that NPP_SetWindow gets
955         called.
956         (WebCore::PluginView::setNPWindowRect):
957         Set m_haveCalledSetWindow.
958
959 2010-05-20  Fumitoshi Ukai  <ukai@chromium.org>
960
961         Reviewed by Alexey Proskuryakov.
962
963         WebSocket handshake incompatible change in draft-hixie-thewebsocketprotocol-76
964         https://bugs.webkit.org/show_bug.cgi?id=35572
965
966         WebSocket opening handshake is changed.  New protocol draft could be found at http://www.whatwg.org/specs/web-socket-protocol/
967         It requires https://bugs.webkit.org/show_bug.cgi?id=38034 to pass websocket tests.
968
969         * websockets/WebSocketHandshake.cpp:
970         (WebCore::extractResponseCode):
971         add lineLength parameter to return length of status line.
972         (WebCore::hostName): Added.
973         (WebCore::generateSecWebSocketKey): Added.
974         (WebCore::generateKey3): Added.
975         (WebCore::setChallengeNumber): Added.
976         (WebCore::generateChallengeResponseExpected): Added.
977         (WebCore::WebSocketHandshake::WebSocketHandshake):
978          generate challenge response key and expected data.
979         (WebCore::WebSocketHandshake::clientLocation):
980          use hostName.
981         (WebCore::WebSocketHandshake::clientHandshakeMessage):
982          changed for draft 76 spec.
983         (WebCore::WebSocketHandshake::clientHandshakeRequest):
984         (WebCore::WebSocketHandshake::readServerHandshake):
985          changed for draft 76 spec.
986          m_mode is managed in this method.
987         (WebCore::WebSocketHandshake::readHTTPHeaders):
988          change error log messages.
989         (WebCore::WebSocketHandshake::processHeaders):
990          chagned for draft 76 spec.
991         (WebCore::WebSocketHandshake::checkResponseHeaders):
992          return boolean whether response header is ok or not and not change m_mode in it.
993         * websockets/WebSocketHandshake.h:
994
995 2010-05-20  Adam Roben  <aroben@apple.com>
996
997         Stop leaking all CACFContexts
998
999         Fixes <http://webkit.org/b/39466> <rdar://problem/8007141>.
1000
1001         Reviewed by Simon Fraser.
1002
1003         * platform/graphics/win/WKCACFContextFlusher.cpp:
1004         (WebCore::WKCACFContextFlusher::addContext): Only retain the context
1005         when we first add it to the m_contexts set. Otherwise we'll retain the
1006         same context multiple times, causing it to leak.
1007
1008 2010-05-20  Young Han Lee  <joybro@company100.net>
1009
1010         Reviewed by Darin Adler.
1011
1012         Create filenameFromString for all ports except GTK and EFL.
1013         https://bugs.webkit.org/show_bug.cgi?id=39348
1014
1015         * platform/FileSystem.cpp: Added.
1016         (WebCore::filenameFromString):
1017         * platform/FileSystem.h:
1018
1019 2010-05-20  Young Han Lee  <joybro@company100.net>
1020
1021         Reviewed by Darin Adler.
1022
1023         Port SharedBuffer to POSIX.
1024         https://bugs.webkit.org/show_bug.cgi?id=39283
1025
1026         * platform/posix/SharedBufferPOSIX.cpp: Added.
1027         (WebCore::SharedBuffer::createWithContentsOfFile):
1028
1029 2010-05-20  Zhenyao Mo  <zmo@google.com>
1030
1031         Reviewed by Dimitri Glazkov.
1032
1033         Map RGBA4/RGB5_A1 to RGBA and RGB565 to RGB in RenderbufferStorage
1034         https://bugs.webkit.org/show_bug.cgi?id=39077
1035
1036         * platform/graphics/mac/GraphicsContext3DMac.cpp:
1037         (WebCore::GraphicsContext3D::renderbufferStorage): Mapping the enums.
1038
1039 2010-05-20  Dan Bernstein  <mitz@apple.com>
1040
1041         Reviewed by Dave Hyatt.
1042
1043         <rdar://problem/8007953> Textarea using custom font appears blank
1044
1045         Test: fast/css/font-face-in-shadow-DOM.html
1046
1047         When a remote font is loaded, CSSFontSelector forces a style recalc, which replaces all
1048         RenderSyles that have FontFallbackLists referencing the placeholder font with fresh
1049         RenderStyles. However, it does not descend into shadow DOM trees, so those may end up with
1050         styles that still reference the placeholder font.
1051
1052         The fix is to add RenderObject::requiresForcedStyleRecalcPropagation() and have it return
1053         true from renderers that maintain shadow DOM trees or otherwise keep their own RenderStyles.
1054
1055         * dom/Element.cpp:
1056         (WebCore::Element::recalcStyle): Check if forced style recalc needs to propagated.
1057         * rendering/RenderButton.h:
1058         (WebCore::RenderButton::requiresForcedStyleRecalcPropagation):
1059         * rendering/RenderDataGrid.h:
1060         (WebCore::RenderDataGrid::requiresForcedStyleRecalcPropagation):
1061         * rendering/RenderFileUploadControl.h:
1062         (WebCore::RenderFileUploadControl::requiresForcedStyleRecalcPropagation):
1063         * rendering/RenderListItem.h:
1064         (WebCore::RenderListItem::requiresForcedStyleRecalcPropagation):
1065         * rendering/RenderMedia.h:
1066         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
1067         * rendering/RenderMenuList.h:
1068         (WebCore::RenderMenuList::RenderMenuList::requiresForcedStyleRecalcPropagation):
1069         * rendering/RenderObject.h:
1070         (WebCore::RenderObject::requiresForcedStyleRecalcPropagation):
1071         * rendering/RenderProgress.h:
1072         (WebCore::RenderProgress::requiresForcedStyleRecalcPropagation):
1073         * rendering/RenderSlider.h:
1074         (WebCore::RenderSlider::requiresForcedStyleRecalcPropagation):
1075         * rendering/RenderTextControl.h:
1076         (WebCore::RenderTextControl::requiresForcedStyleRecalcPropagation):
1077
1078 2010-05-20  Jer Noble  <jer.noble@apple.com>
1079
1080         No review; build fix only.
1081
1082         When WTF_USE_ACCELERATED_COMPOSITING is turned off, MediaPlayerPrivateQuickTimeVisualContext.cpp
1083         must include CoreGraphics/CGContext.h.
1084
1085         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1086
1087 2010-05-20  Jer Noble  <jer.noble@apple.com>
1088
1089         Reviewed by Sam Weinig.
1090
1091         Video elements show no video on Windows machines that do not support accelerated compositing
1092         https://bugs.webkit.org/show_bug.cgi?id=39446
1093         rdar://problem/7999794
1094
1095         Implement the paint() method in MediaPlayerPrivateQuickTimeVisualContext.  The visual context should
1096         be set up in load() and torn down in the destructor (as opposed to setUpVideoRendering and 
1097         tearDownVideoRendering, which won't get called in a non-accelerated compositing case).
1098         
1099         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1100         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::~MediaPlayerPrivateQuickTimeVisualContext):
1101         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
1102         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::paint):
1103         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::visualContextTimerFired):
1104         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
1105         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpVideoRendering):
1106         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::tearDownVideoRendering):
1107
1108 2010-05-20  Abhishek Arya  <inferno@chromium.org>
1109
1110         Reviewed by Adam Barth.
1111
1112         Added a method to check if the security origin can access
1113         password manager.
1114         https://bugs.webkit.org/show_bug.cgi?id=38916
1115
1116         * page/SecurityOrigin.h:
1117         (WebCore::SecurityOrigin::canAccessPasswordManager):
1118
1119 2010-05-20  Darin Adler  <darin@apple.com>
1120
1121         Reviewed by Eric Seidel.
1122
1123         Fix warnings seen on the buildbots today
1124         https://bugs.webkit.org/show_bug.cgi?id=39368
1125
1126         * loader/icon/IconDatabase.cpp:
1127         (WebCore::IconDatabase::pruneUnretainedIcons): Use the type "long long" for
1128         things being printed with "%lli". There is no guaranteed that int64_t is the
1129         same thing as long long.
1130
1131         * page/EventHandler.cpp:
1132         (WebCore::EventHandler::handleMousePressEvent): Added parentheses as suggested
1133         by warnings in newer versions of GCC.
1134
1135         * platform/ContextMenu.cpp: Fix #if around the functions to match the #if
1136         around the call sites to avoid unused function warning.
1137
1138         * platform/graphics/gtk/ImageGtk.cpp:
1139         (WebCore::Image::loadPlatformResource): Use NULL to end a variable argument list
1140         rather than 0. This is a case where the WebKit "use 0 instead of NULL" guideline
1141         is incorrect and won't work properly.
1142
1143         * platform/win/SystemTimeWin.cpp:
1144         (WebCore::userIdleTime): Removed unnecessary initialization of LASTINPUTINFO.
1145
1146         * platform/win/WebCoreInstanceHandle.h: Added property svn:eol-style.
1147         Made functions inline instead of static. It's not correct to have functions with
1148         internal linkage in a header file. Marking them inline makes more sense.
1149
1150         * plugins/win/PluginMessageThrottlerWin.cpp:
1151         (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin): Reordered the
1152         initializers to match the order of the data members from the class definition.
1153
1154         * plugins/win/PluginViewWin.cpp:
1155         (WebCore::PluginView::paintIntoTransformedContext): Initialized all the fields
1156         of WINDOWPOS. I know this goes against the traditions of Windows programming,
1157         but it's correct and silences the warning. Also removed the unneeded separate
1158         code path for non-WinCE platforms that translates only the corner of the window
1159         rectangle; the WinCE version is correct for normal Windows as well. Not sure
1160         why this wasn't caught when the code was originally checked in.
1161
1162 2010-05-20  Justin Schuh  <jschuh@chromium.org>
1163
1164         Reviewed by Adam Barth.
1165
1166         Moving frame.src checks out of the bindings
1167         https://bugs.webkit.org/show_bug.cgi?id=37815
1168
1169         Moved JavaScript frame.src checks out of bindings and into
1170         HTMLFrameElementBase. Added main thread state stack to JavaScriptCore
1171         so ExecState is available inside core DOM. Updated affected bindings
1172         (except for GObject, which will need to be updated to avoid origin
1173         failures inside native code).
1174
1175         * Android.jscbindings.mk:
1176         * CMakeLists.txt:
1177         * GNUmakefile.am:
1178         * WebCore.gypi:
1179         * WebCore.pro:
1180         * WebCore.vcproj/WebCore.vcproj:
1181         * WebCore.xcodeproj/project.pbxproj:
1182         * bindings/js/JSBindingsAllInOne.cpp:
1183         * bindings/js/JSCallbackData.cpp:
1184         (WebCore::JSCallbackData::invokeCallback):
1185         * bindings/js/JSEventListener.cpp:
1186         (WebCore::JSEventListener::handleEvent):
1187         * bindings/js/JSInjectedScriptHostCustom.cpp:
1188         (WebCore::InjectedScriptHost::createInjectedScript):
1189         * bindings/js/JSMainThreadExecState.cpp: Added.
1190         * bindings/js/JSMainThreadExecState.h: Added.
1191         (WebCore::JSMainThreadExecState::currentState):
1192         (WebCore::JSMainThreadExecState::call):
1193         (WebCore::JSMainThreadExecState::evaluate):
1194         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
1195         (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
1196         (WebCore::JSMainThreadNullState::JSMainThreadNullState):
1197         * bindings/js/ScheduledAction.cpp:
1198         (WebCore::ScheduledAction::executeFunctionInContext):
1199         (WebCore::ScheduledAction::execute):
1200         * bindings/js/ScheduledAction.h:
1201         * bindings/js/ScriptController.cpp:
1202         (WebCore::ScriptController::evaluateInWorld):
1203         (WebCore::ScriptController::canAccessFromCurrentOrigin):
1204         * bindings/js/ScriptController.h:
1205         * bindings/js/ScriptFunctionCall.cpp:
1206         (WebCore::ScriptFunctionCall::call):
1207         * bindings/objc/ObjCEventListener.mm:
1208         * bindings/objc/WebScriptObject.mm:
1209         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1210         (-[WebScriptObject evaluateWebScript:]):
1211         * bindings/scripts/CodeGeneratorObjC.pm:
1212         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1213         (-[DOMTestCallback callbackWithClass1Param:]):
1214         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
1215         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
1216         (-[DOMTestCallback customCallback:class6Param:]):
1217         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1218         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1219         (-[DOMTestObj readOnlyIntAttr]):
1220         (-[DOMTestObj readOnlyStringAttr]):
1221         (-[DOMTestObj readOnlyTestObjAttr]):
1222         (-[DOMTestObj intAttr]):
1223         (-[DOMTestObj setIntAttr:]):
1224         (-[DOMTestObj longLongAttr]):
1225         (-[DOMTestObj setLongLongAttr:]):
1226         (-[DOMTestObj unsignedLongLongAttr]):
1227         (-[DOMTestObj setUnsignedLongLongAttr:]):
1228         (-[DOMTestObj stringAttr]):
1229         (-[DOMTestObj setStringAttr:]):
1230         (-[DOMTestObj testObjAttr]):
1231         (-[DOMTestObj setTestObjAttr:]):
1232         (-[DOMTestObj attrWithException]):
1233         (-[DOMTestObj setAttrWithException:]):
1234         (-[DOMTestObj attrWithSetterException]):
1235         (-[DOMTestObj setAttrWithSetterException:]):
1236         (-[DOMTestObj attrWithGetterException]):
1237         (-[DOMTestObj setAttrWithGetterException:]):
1238         (-[DOMTestObj customAttr]):
1239         (-[DOMTestObj setCustomAttr:]):
1240         (-[DOMTestObj scriptStringAttr]):
1241         (-[DOMTestObj voidMethod]):
1242         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1243         (-[DOMTestObj intMethod]):
1244         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
1245         (-[DOMTestObj objMethod]):
1246         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1247         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
1248         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
1249         (-[DOMTestObj serializedValue:]):
1250         (-[DOMTestObj methodWithException]):
1251         (-[DOMTestObj customMethod]):
1252         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1253         (-[DOMTestObj customArgsAndException:]):
1254         (-[DOMTestObj addEventListener:listener:useCapture:]):
1255         (-[DOMTestObj removeEventListener:listener:useCapture:]):
1256         (-[DOMTestObj withDynamicFrame]):
1257         (-[DOMTestObj withDynamicFrameAndArg:]):
1258         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
1259         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
1260         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
1261         (-[DOMTestObj withScriptStateVoid]):
1262         (-[DOMTestObj withScriptStateObj]):
1263         (-[DOMTestObj withScriptStateVoidException]):
1264         (-[DOMTestObj withScriptStateObjException]):
1265         (-[DOMTestObj methodWithOptionalArg:]):
1266         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
1267         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
1268         * bindings/v8/ScriptController.cpp:
1269         (WebCore::ScriptController::canAccessFromCurrentOrigin):
1270         * bindings/v8/ScriptController.h:
1271         * html/HTMLFrameElementBase.cpp:
1272         (WebCore::HTMLFrameElementBase::isURLAllowed):
1273
1274 2010-05-20  Adam Roben  <aroben@apple.com>
1275
1276         Fix an HRGN leak in WKCACFLayerRenderer
1277
1278         Fixes <http://webkit.org/b/39312> <rdar://problem/7998728> REGRESSION
1279         (r53686-r55990): Graphics corruption when watching video (affects
1280         youtube.com)
1281
1282         Reviewed by Darin Adler.
1283
1284         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1285         (WebCore::getDirtyRects): Use an OwnPtr to hold the HRGN we allocate.
1286         That way we don't have to remember to destroy it (as we were
1287         forgetting to do) when we bail out of this function early.
1288
1289 2010-05-20  Darin Fisher  <darin@chromium.org>
1290
1291         Reviewed by Nate Chapin.
1292
1293         [chromium] Provide a way to catch exceptions thrown while interacting
1294         with a NPObject via WebBindings methods.
1295         https://bugs.webkit.org/show_bug.cgi?id=39378
1296
1297         This change also includes a small bit of cleanup in V8NPObject and
1298         friends.  I moved code into the WebCore namespace where appropriate.
1299         
1300         In _NPN_Invoke, I also moved the call to _NPN_Evaluate outside of the
1301         context scope.  I did this to avoid having nested ExceptionCatcher
1302         objects, which is not strictly necessary, but it seemed cleaner.
1303         _NPN_Evaluate already takes care of creating a context scope.
1304
1305         * bindings/v8/NPV8Object.cpp:
1306         (WebCore::v8ObjectToNPObject):
1307         (WebCore::npCreateV8ScriptObject):
1308         (_NPN_Invoke):
1309         (_NPN_InvokeDefault):
1310         (_NPN_Evaluate):
1311         (_NPN_EvaluateHelper):
1312         (_NPN_GetProperty):
1313         (_NPN_SetProperty):
1314         (_NPN_RemoveProperty):
1315         (_NPN_HasProperty):
1316         (_NPN_HasMethod):
1317         (_NPN_SetException):
1318         (_NPN_Enumerate):
1319         (_NPN_Construct):
1320         * bindings/v8/NPV8Object.h:
1321         * bindings/v8/V8NPObject.cpp:
1322         * bindings/v8/V8NPObject.h:
1323         * bindings/v8/V8NPUtils.cpp:
1324         (WebCore::convertV8ObjectToNPVariant):
1325         (WebCore::pushExceptionHandler):
1326         (WebCore::popExceptionHandler):
1327         (WebCore::ExceptionCatcher::ExceptionCatcher):
1328         (WebCore::ExceptionCatcher::~ExceptionCatcher):
1329         * bindings/v8/V8NPUtils.h:
1330         * bindings/v8/npruntime.cpp:
1331
1332 2010-05-20  Marcus Bulach  <bulach@chromium.org>
1333
1334         Reviewed by Steve Block.
1335
1336         Ensure timers are stopped on Geolocation::disconnectFrame()
1337         https://bugs.webkit.org/show_bug.cgi?id=39388
1338
1339         fast/dom/Geolocation/notimer-after-unload.html, plus it should be possible to re-enable Gtk LayoutTests.
1340
1341         * page/Geolocation.cpp:
1342         (WebCore::Geolocation::disconnectFrame):
1343
1344 2010-05-20  James Robinson  <jamesr@chromium.org>
1345
1346         Reviewed by Eric Seidel.
1347
1348         Ensures styles are up-to-date before determining selection
1349         https://bugs.webkit.org/show_bug.cgi?id=39389
1350
1351         This adds a call to document::updateStyleIfNeeded() to
1352         Frame::notifyRendererOfSelectionChange(). Without this call, if there
1353         is a pending style update that will detach part of the DOM and the
1354         the selection is within that part of the DOM when
1355         notifyRendererOfSeletionChange is called, the rootEditableElement
1356         algorithm ends up walking through detached parts of the render tree.
1357
1358         Test: editing/selection/focus-and-display-none.html
1359
1360         * page/Frame.cpp:
1361         (WebCore::Frame::notifyRendererOfSelectionChange):
1362
1363 2010-05-20  Adam Roben  <aroben@apple.com>
1364
1365         Remove code that fetched, but did nothing useful with, a CFDictionary
1366         in MediaPlayerPrivateQuickTimeVisualContext
1367
1368         I also removed the code in QTPixelBuffer that vended the dictionary.
1369
1370         Fixes <http://webkit.org/b/39435> <rdar://problem/8009278>
1371         QTPixelBuffer passes CFDictionaries across the DLL boundary, which can
1372         lead to crashes
1373
1374         Reviewed by Darin Adler.
1375
1376         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1377         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
1378         Deleted code that fetched the attachments dictionary, which was never
1379         used other than to pass it to CFRetain/CFRelease, which could be
1380         enough to cause a crash due to incompatible copies of
1381         CoreFoundation.dll.
1382
1383         * platform/graphics/win/QTMovieVisualContext.h: Added a now-needed
1384         forward declaration.
1385
1386         * platform/graphics/win/QTPixelBuffer.cpp:
1387         * platform/graphics/win/QTPixelBuffer.h:
1388         Removed the now-unused attachments function.
1389
1390 2010-05-20  Adam Roben  <aroben@apple.com>
1391
1392         Fix a CFData leak in MediaPlayerPrivateQuickTimeVisualContext
1393
1394         Fixes <http://webkit.org/b/39432> <rdar://problem/8008992>
1395
1396         Reviewed by Ada Chan
1397
1398         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1399         (WebCore::QTCFDictionaryCreateWithDataCallback): Use a RetainPtr to
1400         hold the CFData we allocate so it will get released when this function
1401         is exited. Also pass kCFAllocatorNull as the bytes deallocator to
1402         CFDataCreateWithBytesNoCopy so that CF doesn't try to deallocate the
1403         bytes we pass to it.
1404
1405 2010-05-20  Jian Li  <jianli@chromium.org>
1406
1407         Reviewed by David Levin.
1408
1409         Rename GenericTask* to CrossThreadTask* in CrossThreadTask.h.
1410         https://bugs.webkit.org/show_bug.cgi?id=39437
1411
1412         * dom/CrossThreadTask.h:
1413         (WebCore::):
1414         (WebCore::CrossThreadTask1::create):
1415         (WebCore::CrossThreadTask1::CrossThreadTask1):
1416         (WebCore::CrossThreadTask2::create):
1417         (WebCore::CrossThreadTask2::CrossThreadTask2):
1418         (WebCore::CrossThreadTask3::create):
1419         (WebCore::CrossThreadTask3::CrossThreadTask3):
1420         (WebCore::CrossThreadTask4::create):
1421         (WebCore::CrossThreadTask4::CrossThreadTask4):
1422         (WebCore::CrossThreadTask5::create):
1423         (WebCore::CrossThreadTask5::CrossThreadTask5):
1424         (WebCore::CrossThreadTask6::create):
1425         (WebCore::CrossThreadTask6::CrossThreadTask6):
1426         (WebCore::CrossThreadTask7::create):
1427         (WebCore::CrossThreadTask7::CrossThreadTask7):
1428         (WebCore::CrossThreadTask8::create):
1429         (WebCore::CrossThreadTask8::CrossThreadTask8):
1430         (WebCore::createCallbackTask):
1431
1432 2010-05-20  Jian Li  <jianli@chromium.org>
1433
1434         Reviewed by David Levin.
1435
1436         Rename GenericWorkerTask.h to CrossThreadTask.h and move it to dom directory.
1437         https://bugs.webkit.org/show_bug.cgi?id=39135
1438
1439         * GNUmakefile.am:
1440         * WebCore.gypi:
1441         * WebCore.vcproj/WebCore.vcproj:
1442         * WebCore.xcodeproj/project.pbxproj:
1443         * dom/CrossThreadTask.h: Renamed from WebCore/workers/GenericWorkerTask.h.
1444         * html/FileStreamProxy.cpp:
1445         * loader/WorkerThreadableLoader.cpp:
1446         * websockets/WorkerThreadableWebSocketChannel.cpp:
1447         * workers/DefaultSharedWorkerRepository.cpp:
1448         * workers/WorkerMessagingProxy.cpp:
1449         * workers/WorkerScriptLoader.cpp:
1450
1451 2010-05-20  Adele Peterson  <adele@apple.com>
1452
1453         Reviewed by Mark Rowe.
1454
1455         Remove the Safari welcome page site-specific quirk, since its no longer needed.
1456
1457         * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::cssRules):
1458
1459 2010-05-20  Steve Block  <steveblock@google.com>
1460
1461         Reviewed by Jeremy Orlow.
1462
1463         Provide bindings for DeviceOrientation
1464         https://bugs.webkit.org/show_bug.cgi?id=39210
1465
1466         Tests: fast/dom/DeviceOrientation/window-property.html
1467                fast/dom/Window/window-properties-on-device-orientation.html
1468
1469         Adds bindings for DeviceOrientation as defined in
1470         http://dev.w3.org/geo/api/spec-source-orientation.html
1471         This is guarded by ENABLE(DEVICE_ORIENTATION) which is currently disabled on
1472         all platforms but Android.
1473
1474         * Android.derived.jscbindings.mk:
1475         * Android.derived.v8bindings.mk:
1476         * Android.mk:
1477         * Configurations/FeatureDefines.xcconfig:
1478         * DerivedSources.cpp:
1479         * DerivedSources.make:
1480         * GNUmakefile.am:
1481         * WebCore.gypi:
1482         * WebCore.pri:
1483         * WebCore.pro:
1484         * WebCore.xcodeproj/project.pbxproj:
1485         * bindings/js/JSEventCustom.cpp:
1486         (WebCore::toJS):
1487         * bindings/v8/custom/V8EventCustom.cpp:
1488         (WebCore::toV8):
1489         * dom/DeviceOrientationEvent.cpp: Added.
1490         (WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
1491         (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
1492         * dom/DeviceOrientationEvent.h: Added.
1493         (WebCore::DeviceOrientationEvent::create):
1494         (WebCore::DeviceOrientationEvent::alpha):
1495         (WebCore::DeviceOrientationEvent::beta):
1496         (WebCore::DeviceOrientationEvent::gamma):
1497         (WebCore::DeviceOrientationEvent::isDeviceOrientationEvent):
1498         * dom/DeviceOrientationEvent.idl: Added.
1499         * dom/Event.cpp:
1500         (WebCore::Event::isDeviceOrientationEvent):
1501         * dom/Event.h:
1502         * dom/EventNames.h:
1503         * page/DOMWindow.h:
1504         * page/DOMWindow.idl:
1505
1506 2010-05-20  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1507
1508         Rubberstamped by Antti Koivisto.
1509
1510         Use 0.15 as text drag delay when Q_WS_MAC is defined, which is
1511         consistent with the Mac OS X platform.
1512
1513         * page/qt/EventHandlerQt.cpp:
1514
1515 2010-05-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1516
1517         Reviewed by Simon Hausmann.
1518
1519         Fix painting when using clipToImageBuffer()
1520
1521         When we apply the transform of the parent painter to the painter of
1522         the transparency layer, we adopt its coordinate system, thus offset
1523         should not be in page coordinates, but in the coordinate system of
1524         the parent painter.
1525
1526         * platform/graphics/qt/GraphicsContextQt.cpp:
1527         (WebCore::TransparencyLayer::TransparencyLayer):
1528
1529 2010-05-20  Adam Langley  <agl@chromium.org>
1530
1531         Reviewed by David Levin.
1532
1533         [chromium] Avoid crash when msttcorefonts aren't provided
1534
1535         https://bugs.webkit.org/show_bug.cgi?id=39015
1536         http://code.google.com/p/chromium/issues/detail?id=43831
1537
1538         * platform/graphics/chromium/FontCacheLinux.cpp:
1539         (WebCore::FontCache::createFontPlatformData):
1540
1541 2010-05-20  Zoltan Herczeg  <zherczeg@webkit.org>
1542
1543         Reviewed by Dirk Schulze.
1544
1545         Fix a crash caused by feLigthing::apply()
1546         https://bugs.webkit.org/show_bug.cgi?id=39004
1547
1548         Make FELighting::apply() similar to other filters' applies
1549         to avoid an assertion fail in putUnmultipliedImageData(),
1550         when effectDrawingRect has negative location (x or y is less than 0).
1551
1552         Test: svg/filters/feLighting-crash.svg
1553
1554         * svg/graphics/filters/SVGFELighting.cpp:
1555         (WebCore::FELighting::apply):
1556
1557 2010-05-20  Chris Jerdonek  <cjerdonek@webkit.org>
1558
1559         Reviewed by Eric Seidel.
1560
1561         Modified FrameLoader::urlSelected() to accept a KURL instead of a
1562         ResourceRequest.
1563
1564         https://bugs.webkit.org/show_bug.cgi?id=39320
1565
1566         Since ResourceRequest has non-explicit single-parameter constructors for
1567         String and KURL, urlSelected() previously accepted any of String, KURL,
1568         and ResourceRequest.  This revision changes urlSelected() to accept only
1569         a KURL to make the API tighter and easier to refactor.
1570
1571         No new functionality, so no new tests.
1572
1573         * loader/FrameLoader.cpp:
1574         (WebCore::FrameLoader::urlSelected):
1575           - Changed the public overload to accept a KURL instead of a ResourceRequest.
1576         * loader/FrameLoader.h:
1577           - Changed the public overload to accept a KURL instead of a ResourceRequest.
1578         * wml/WMLAElement.cpp:
1579         (WebCore::WMLAElement::defaultEventHandler):
1580           - Updated the call to urlSelected().
1581
1582 2010-05-20  MORITA Hajime  <morrita@google.com>
1583
1584         Reviewed by Kent Tamura.
1585
1586         2x execCommand ReadAV@NULL
1587         https://bugs.webkit.org/show_bug.cgi?id=35791
1588
1589         In applyBlockStyle(), a node which is referred from
1590         nextParagraphStart sometimes removed from the document and goes
1591         orphan, and that causes an assertion failed. This is because
1592         moveParagraphs() replaces the node with a new one with some new
1593         styles applied. So we re-compute nextParagraphStart in that case.
1594
1595         Test: editing/execCommand/35791.html
1596
1597         * dom/Position.h:
1598         (WebCore::Position::isOrphan):
1599         * editing/ApplyStyleCommand.cpp:
1600         (WebCore::ApplyStyleCommand::applyBlockStyle):
1601         * editing/VisiblePosition.h:
1602         (WebCore::VisiblePosition::isOrphan):
1603
1604 2010-05-20  Steve Block  <steveblock@google.com>
1605
1606         Reviewed by Eric Seidel.
1607
1608         PluginView contains JSC-specific code
1609         https://bugs.webkit.org/show_bug.cgi?id=38907
1610
1611         Build fix only, no new tests.
1612
1613         * plugins/PluginView.cpp:
1614         (WebCore::PluginView::start):
1615         (WebCore::PluginView::stop):
1616         (WebCore::PluginView::performRequest):
1617         * plugins/PluginView.h:
1618
1619 2010-05-17  Philippe Normand  <pnormand@igalia.com>
1620
1621         Reviewed by Eric Seidel.
1622
1623         [GStreamer] enable gst support if USE_GSTREAMER macro is defined
1624         https://bugs.webkit.org/show_bug.cgi?id=39205
1625
1626         Include gstreamer private player in the build when the
1627         USE_GSTREAMER macro is enabled.
1628
1629         * platform/graphics/MediaPlayer.cpp:
1630         (WebCore::installedMediaEngines):
1631
1632 2010-05-19  Vangelis Kokkevis  <vangelis@chromium.org>
1633
1634         Reviewed by Darin Fisher.
1635
1636         Implementing hardware accelerated compositing of layers for Chromium.
1637         Completely removed the existing software compositing path to replace
1638         it with code implemented using OpenGL.
1639         https://bugs.webkit.org/show_bug.cgi?id=38783
1640
1641         Tests: Covered by existing compositing tests.
1642
1643         * WebCore.gyp/WebCore.gyp:
1644         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1645         (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium):
1646         (WebCore::GraphicsLayerChromium::updateLayerDrawsContent):
1647         (WebCore::GraphicsLayerChromium::updateContentsRect):
1648         * platform/graphics/chromium/LayerChromium.cpp:
1649         (WebCore::LayerChromium::LayerChromium):
1650         (WebCore::LayerChromium::~LayerChromium):
1651         (WebCore::LayerChromium::updateGraphicsContext):
1652         (WebCore::LayerChromium::drawsContentUpdated):
1653         (WebCore::LayerChromium::updateContents):
1654         (WebCore::LayerChromium::setContents):
1655         (WebCore::LayerChromium::setBackingStoreSize):
1656         (WebCore::LayerChromium::setBounds):
1657         (WebCore::LayerChromium::setNeedsDisplay):
1658         * platform/graphics/chromium/LayerChromium.h:
1659         (WebCore::LayerChromium::contentsDirty):
1660         (WebCore::LayerChromium::drawsContent):
1661         * platform/graphics/chromium/LayerRendererChromium.cpp:
1662         (WebCore::):
1663         (WebCore::checkGLError):
1664         (WebCore::loadShader):
1665         (WebCore::loadShaderProgram):
1666         (WebCore::toGLMatrix):
1667         (WebCore::orthoMatrix):
1668         (WebCore::createLayerTexture):
1669         (WebCore::LayerRendererChromium::create):
1670         (WebCore::LayerRendererChromium::LayerRendererChromium):
1671         (WebCore::LayerRendererChromium::~LayerRendererChromium):
1672         (WebCore::LayerRendererChromium::drawTexturedQuad):
1673         (WebCore::LayerRendererChromium::drawLayers):
1674         (WebCore::LayerRendererChromium::getTextureId):
1675         (WebCore::LayerRendererChromium::assignTextureForLayer):
1676         (WebCore::LayerRendererChromium::freeLayerTexture):
1677         (WebCore::LayerRendererChromium::drawDebugBorder):
1678         (WebCore::LayerRendererChromium::isLayerVisible):
1679         (WebCore::LayerRendererChromium::compositeLayersRecursive):
1680         (WebCore::LayerRendererChromium::makeContextCurrent):
1681         (WebCore::LayerRendererChromium::initGL):
1682         (WebCore::LayerRendererChromium::bindCommonAttribLocation):
1683         (WebCore::LayerRendererChromium::initializeSharedGLObjects):
1684         * platform/graphics/chromium/LayerRendererChromium.h:
1685         (WebCore::LayerRendererChromium::):
1686
1687 2010-05-19  Andrey Kosyakov  <caseq@chromium.org>
1688
1689         Reviewed by Timothy Hatcher.
1690
1691         Maintain focus on help screen while it's active.
1692         https://bugs.webkit.org/show_bug.cgi?id=39237
1693
1694         * inspector/front-end/HelpScreen.js:
1695         (WebInspector.HelpScreen):
1696         (WebInspector.HelpScreen.prototype.show):
1697         (WebInspector.HelpScreen.prototype._hide):
1698         (WebInspector.HelpScreen.prototype._onBlur):
1699
1700 2010-05-19  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1701
1702         Reviewed by Kenneth Rohde Christiansen.
1703
1704         Crash fix in the HistoryController.
1705
1706         The problem was casued by a documented feature of the QWebFrame::setHtml().
1707         The method doesn't affect a browsing history (doesn't create a HistoryItem instance), so
1708         m_currentItem and m_previousItem are not set.
1709
1710         A null check was added.
1711
1712         [Qt] The QWebPage crashes on history.pushState().
1713         https://bugs.webkit.org/show_bug.cgi?id=38840
1714
1715         * loader/HistoryController.cpp:
1716         (WebCore::HistoryController::pushState):
1717         (WebCore::HistoryController::replaceState):
1718
1719 2010-05-19  Darin Fisher  <darin@chromium.org>
1720
1721         Revert r59790 due to failing Chromium npruntime tests.
1722
1723         * bindings/v8/NPV8Object.cpp:
1724         (v8ObjectToNPObject):
1725         (npCreateV8ScriptObject):
1726         (_NPN_Invoke):
1727         (_NPN_InvokeDefault):
1728         (_NPN_Evaluate):
1729         (_NPN_EvaluateHelper):
1730         (_NPN_GetProperty):
1731         (_NPN_SetProperty):
1732         (_NPN_RemoveProperty):
1733         (_NPN_HasProperty):
1734         (_NPN_HasMethod):
1735         (_NPN_SetException):
1736         (_NPN_Enumerate):
1737         (_NPN_Construct):
1738         * bindings/v8/NPV8Object.h:
1739         * bindings/v8/V8NPObject.cpp:
1740         (forgetV8ObjectForNPObject):
1741         * bindings/v8/V8NPObject.h:
1742         * bindings/v8/V8NPUtils.cpp:
1743         (convertV8ObjectToNPVariant):
1744         (getStringIdentifier):
1745         * bindings/v8/V8NPUtils.h:
1746         * bindings/v8/npruntime.cpp:
1747
1748 2010-05-19  Gavin Barraclough  <barraclough@apple.com>
1749
1750         Rubber Stamped by Sam Weinig.
1751
1752         JSFunctions are no longer a subclass of InternalFunction.
1753
1754         * bindings/js/ScriptCallStack.cpp:
1755         (WebCore::ScriptCallStack::ScriptCallStack):
1756         (WebCore::ScriptCallStack::initialize):
1757         * bindings/js/ScriptCallStack.h:
1758
1759 2010-05-19  Jian Li  <jianli@chromium.org>
1760
1761         Reviewed by Alexey Proskuryakov.
1762
1763         Refactor text encoding detection logic in FileReader.
1764         https://bugs.webkit.org/show_bug.cgi?id=39131
1765
1766         Changed FileReader::convertToText to call TextResourceDecoder::decode to
1767         detect the encoding from BOM and decode the text. Though the File API
1768         spec says that the supplied encoding should be used if it is valid, we
1769         choose to ignore this requirement in order to be consistent with how
1770         WebKit decodes the web content: always has the BOM override the provided
1771         encoding.
1772
1773         * html/FileReader.cpp:
1774         (WebCore::FileReader::convertToText):
1775         * html/FileReader.h:
1776
1777 2010-05-19  Abhishek Arya  <inferno@chromium.org>
1778
1779         Reviewed by David Hyatt.
1780
1781         Check that the node is a text node before doing a static cast
1782         to a Text class pointer.
1783         https://bugs.webkit.org/show_bug.cgi?id=38626    
1784
1785         Test: fast/text/text-transform-nontext-node-crash.xhtml
1786
1787         * rendering/RenderText.cpp:
1788         (WebCore::RenderText::originalText):
1789         * rendering/RenderTextFragment.cpp:
1790         (WebCore::RenderTextFragment::originalText):
1791         (WebCore::RenderTextFragment::previousCharacter):
1792
1793 2010-05-19  Yaar Schnitman  <yaar@chromium.org>
1794
1795         Reviewed by Eric Seidel.
1796
1797         Fixed warnings by JSC overloads changes. Also updated the binding reference files for JSC.
1798         https://bugs.webkit.org/show_bug.cgi?id=39390
1799
1800         * bindings/scripts/CodeGeneratorJS.pm:
1801         * bindings/scripts/test/JS/JSTestInterface.cpp:
1802         (WebCore::):
1803         * bindings/scripts/test/JS/JSTestObj.cpp:
1804         (WebCore::):
1805
1806 2010-05-19  Darin Fisher  <darin@chromium.org>
1807
1808         Reviewed by Nate Chapin.
1809
1810         [chromium] Provide a way to catch exceptions thrown while interacting
1811         with a NPObject via WebBindings methods.
1812         https://bugs.webkit.org/show_bug.cgi?id=39378
1813
1814         This change also includes a small bit of cleanup in V8NPObject and
1815         friends.  I moved code into the WebCore namespace where appropriate.
1816         
1817         In _NPN_Invoke, I also moved the call to _NPN_Evaluate outside of the
1818         context scope.  I did this to avoid having nested ExceptionCatcher
1819         objects, which is not strictly necessary, but it seemed cleaner.
1820         _NPN_Evaluate already takes care of creating a context scope.
1821
1822         * bindings/v8/NPV8Object.cpp:
1823         (WebCore::v8ObjectToNPObject):
1824         (WebCore::npCreateV8ScriptObject):
1825         (_NPN_Invoke):
1826         (_NPN_InvokeDefault):
1827         (_NPN_Evaluate):
1828         (_NPN_EvaluateHelper):
1829         (_NPN_GetProperty):
1830         (_NPN_SetProperty):
1831         (_NPN_RemoveProperty):
1832         (_NPN_HasProperty):
1833         (_NPN_HasMethod):
1834         (_NPN_SetException):
1835         (_NPN_Enumerate):
1836         (_NPN_Construct):
1837         * bindings/v8/NPV8Object.h:
1838         * bindings/v8/V8NPObject.cpp:
1839         * bindings/v8/V8NPObject.h:
1840         * bindings/v8/V8NPUtils.cpp:
1841         (WebCore::convertV8ObjectToNPVariant):
1842         (WebCore::pushExceptionHandler):
1843         (WebCore::popExceptionHandler):
1844         (WebCore::ExceptionCatcher::~ExceptionCatcher):
1845         * bindings/v8/V8NPUtils.h:
1846         * bindings/v8/npruntime.cpp:
1847
1848 2010-05-19  Yaar Schnitman  <yaar@chromium.org>
1849
1850         Unreviewed, rolling out r59769.
1851         http://trac.webkit.org/changeset/59769
1852         https://bugs.webkit.org/show_bug.cgi?id=37815
1853
1854         Broke GTK again
1855
1856         * Android.jscbindings.mk:
1857         * CMakeLists.txt:
1858         * GNUmakefile.am:
1859         * WebCore.gypi:
1860         * WebCore.pro:
1861         * WebCore.vcproj/WebCore.vcproj:
1862         * WebCore.xcodeproj/project.pbxproj:
1863         * bindings/js/JSBindingsAllInOne.cpp:
1864         * bindings/js/JSCallbackData.cpp:
1865         (WebCore::JSCallbackData::invokeCallback):
1866         * bindings/js/JSEventListener.cpp:
1867         (WebCore::JSEventListener::handleEvent):
1868         * bindings/js/JSInjectedScriptHostCustom.cpp:
1869         (WebCore::InjectedScriptHost::createInjectedScript):
1870         * bindings/js/JSMainThreadExecState.cpp: Removed.
1871         * bindings/js/JSMainThreadExecState.h: Removed.
1872         * bindings/js/ScheduledAction.cpp:
1873         (WebCore::ScheduledAction::executeFunctionInContext):
1874         (WebCore::ScheduledAction::execute):
1875         * bindings/js/ScheduledAction.h:
1876         * bindings/js/ScriptController.cpp:
1877         (WebCore::ScriptController::evaluateInWorld):
1878         * bindings/js/ScriptController.h:
1879         * bindings/js/ScriptFunctionCall.cpp:
1880         (WebCore::ScriptFunctionCall::call):
1881         * bindings/objc/ObjCEventListener.mm:
1882         * bindings/objc/WebScriptObject.mm:
1883         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1884         (-[WebScriptObject evaluateWebScript:]):
1885         * bindings/scripts/CodeGeneratorObjC.pm:
1886         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1887         (-[DOMTestCallback callbackWithClass1Param:]):
1888         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
1889         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
1890         (-[DOMTestCallback customCallback:class6Param:]):
1891         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1892         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1893         (-[DOMTestObj readOnlyIntAttr]):
1894         (-[DOMTestObj readOnlyStringAttr]):
1895         (-[DOMTestObj readOnlyTestObjAttr]):
1896         (-[DOMTestObj intAttr]):
1897         (-[DOMTestObj setIntAttr:]):
1898         (-[DOMTestObj longLongAttr]):
1899         (-[DOMTestObj setLongLongAttr:]):
1900         (-[DOMTestObj unsignedLongLongAttr]):
1901         (-[DOMTestObj setUnsignedLongLongAttr:]):
1902         (-[DOMTestObj stringAttr]):
1903         (-[DOMTestObj setStringAttr:]):
1904         (-[DOMTestObj testObjAttr]):
1905         (-[DOMTestObj setTestObjAttr:]):
1906         (-[DOMTestObj attrWithException]):
1907         (-[DOMTestObj setAttrWithException:]):
1908         (-[DOMTestObj attrWithSetterException]):
1909         (-[DOMTestObj setAttrWithSetterException:]):
1910         (-[DOMTestObj attrWithGetterException]):
1911         (-[DOMTestObj setAttrWithGetterException:]):
1912         (-[DOMTestObj customAttr]):
1913         (-[DOMTestObj setCustomAttr:]):
1914         (-[DOMTestObj scriptStringAttr]):
1915         (-[DOMTestObj voidMethod]):
1916         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1917         (-[DOMTestObj intMethod]):
1918         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
1919         (-[DOMTestObj objMethod]):
1920         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1921         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
1922         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
1923         (-[DOMTestObj serializedValue:]):
1924         (-[DOMTestObj methodWithException]):
1925         (-[DOMTestObj customMethod]):
1926         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1927         (-[DOMTestObj customArgsAndException:]):
1928         (-[DOMTestObj addEventListener:listener:useCapture:]):
1929         (-[DOMTestObj removeEventListener:listener:useCapture:]):
1930         (-[DOMTestObj withDynamicFrame]):
1931         (-[DOMTestObj withDynamicFrameAndArg:]):
1932         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
1933         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
1934         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
1935         (-[DOMTestObj withScriptStateVoid]):
1936         (-[DOMTestObj withScriptStateObj]):
1937         (-[DOMTestObj withScriptStateVoidException]):
1938         (-[DOMTestObj withScriptStateObjException]):
1939         (-[DOMTestObj methodWithOptionalArg:]):
1940         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
1941         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
1942         * bindings/v8/ScriptController.cpp:
1943         * bindings/v8/ScriptController.h:
1944         * html/HTMLFrameElementBase.cpp:
1945         (WebCore::HTMLFrameElementBase::isURLAllowed):
1946
1947 2010-05-19  Dirk Pranke  <dpranke@chromium.org>
1948
1949         Try again to roll out r58675.
1950
1951         * notifications/Notification.h:
1952         * notifications/Notification.idl:
1953
1954 2010-05-19  Enrica Casucci  <enrica@apple.com>
1955
1956         Reviewed by Dave Hyatt.
1957
1958         REGRESSION (r59385) crash destroying inline renderers
1959         https://bugs.webkit.org/show_bug.cgi?id=39143
1960         <rdar://problem/8003662>
1961         
1962         The goal of r59385 was to make sure that the layout of block after all its children had been removed produced the identical result
1963         as the one of a newly created empty block. In order to do so, we had to make sure that the m_inlineChildren flag was reset to true when
1964         the block had no children (as it is upon creation).
1965         I discovered that, by doing that for anonymous blocks it leads removeChild to conclude that the anonymous children can be removed,
1966         without considering that the anonymous block could be part of a continuation chain. For this reason, when RenderInline::destroy()
1967         tries to remove the continuations we are effectively deleting a renderer that had been deleted already.
1968         
1969         Test: fast/inline-block/anonymous-block-crash.html
1970
1971         * rendering/RenderBlock.cpp:
1972         (WebCore::RenderBlock::layoutBlock): resetting the flag m_inlineChildren only for non anonymous blocks otherwise we incurr in
1973         a double deletion of the renderer that causes the crash.
1974
1975 2010-05-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1976
1977         Unreviewed, rolling out r59782.
1978         http://trac.webkit.org/changeset/59782
1979         https://bugs.webkit.org/show_bug.cgi?id=39379
1980
1981         broke DRT build (Requested by dpranke on #webkit).
1982
1983         * notifications/Notification.h:
1984         (WebCore::Notification::dir):
1985         (WebCore::Notification::setDir):
1986         (WebCore::Notification::replaceId):
1987         (WebCore::Notification::setReplaceId):
1988         * notifications/Notification.idl:
1989
1990 2010-05-18  David Hyatt  <hyatt@apple.com>
1991
1992         Reviewed by Oliver Hunt.
1993
1994         https://bugs.webkit.org/show_bug.cgi?id=21049, opacity and position:relative fail in multi-column layouts.
1995         
1996         Make layers split painting across columns just as normal flow content does.  This is actually very
1997         challenging, since intermediate multicol layers can exist between a child that has to be split and
1998         its enclosing stacking context.
1999         
2000         In order to properly paginate layers, a bit is set on all pagination roots, i.e., layers that will get
2001         split and thus split any descendant layers that they are also responsible for painting.  For a paginated
2002         root, we walk up the layer hierarchy and collect all intermediate multicol blocks between the child
2003         and the enclosing stacking context.
2004         
2005         We then recur from the outside in, applying clipping and translation as we break up the layer into strips.
2006         
2007         Composited layers remain unsplittable and have a hacked offset still in order to be placed in the right
2008         column.
2009         
2010         Painting and hit testing of columns has been simplified in all of the functions to use the x position of
2011         the column rect instead of trying to increment an x offset by adding in widths and column gaps.  This
2012         makes those functions directionality-independent (and the LTR/RTL code paths are now the same).
2013         
2014         Fix repainting of columns as well to make sure rects are split across columns only after relative position
2015         and transforms have been applied.
2016         
2017         Added fast/multicol/layers-split-across-columns.html
2018
2019         * rendering/RenderBlock.cpp:
2020         (WebCore::RenderBlock::paintColumnContents):
2021         (WebCore::RenderBlock::adjustRectForColumns):
2022         (WebCore::RenderBlock::adjustForColumns):
2023         * rendering/RenderBlock.h:
2024         * rendering/RenderBox.cpp:
2025         (WebCore::RenderBox::computeRectForRepaint):
2026         * rendering/RenderLayer.cpp:
2027         (WebCore::RenderLayer::RenderLayer):
2028         (WebCore::RenderLayer::updateLayerPositions):
2029         (WebCore::RenderLayer::updatePagination):
2030         (WebCore::RenderLayer::updateLayerPosition):
2031         (WebCore::RenderLayer::paintLayer):
2032         (WebCore::RenderLayer::paintList):
2033         (WebCore::RenderLayer::paintPaginatedChildLayer):
2034         (WebCore::RenderLayer::paintChildLayerIntoColumns):
2035         (WebCore::RenderLayer::hitTestLayer):
2036         (WebCore::RenderLayer::hitTestList):
2037         (WebCore::RenderLayer::hitTestPaginatedChildLayer):
2038         (WebCore::RenderLayer::hitTestChildLayerColumns):
2039         * rendering/RenderLayer.h:
2040         (WebCore::RenderLayer::):
2041         (WebCore::RenderLayer::isPaginated):
2042
2043 2010-05-18  Dirk Pranke  <dpranke@chromium.org>
2044
2045         Reviewed by Dimitri Glazkov.
2046
2047         Attempt to revert r58765 to see if it was causing a performance
2048         regression.
2049
2050         https://bugs.webkit.org/show_bug.cgi?id=39328
2051
2052         * notifications/Notification.h:
2053         * notifications/Notification.idl:
2054
2055 2010-05-19  Kevin Watters  <kevinwatters@gmail.com>
2056
2057         Reviewed by Kevin Ollivier.
2058
2059         [wx] Ensure m_nsFont is initialized properly, and tweak fallback font handling
2060         to handle more cases.
2061         https://bugs.webkit.org/show_bug.cgi?id=39365
2062         
2063         * platform/graphics/wx/FontCacheWx.cpp:
2064         (WebCore::FontCache::getFontDataForCharacters):
2065         (WebCore::FontCache::getSimilarFontPlatformData):
2066         (WebCore::FontCache::getLastResortFallbackFont):
2067         * platform/graphics/wx/FontPlatformDataWx.cpp:
2068         (WebCore::FontPlatformData::FontPlatformData):
2069
2070 2010-05-19  Marcus Bulach  <bulach@chromium.org>
2071
2072         Reviewed by Eric Seidel.
2073
2074         Fixes Windows Qt Release post r59772.
2075         https://bugs.webkit.org/show_bug.cgi?id=39369
2076
2077         * platform/GeolocationService.cpp:
2078
2079 2010-05-19  Eric Seidel  <eric@webkit.org>
2080
2081         Reviewed by Adam Barth.
2082
2083         Add support for handling basic <script> tags in the HTML5 Parser
2084         https://bugs.webkit.org/show_bug.cgi?id=39350
2085
2086         WebKit currently executes scripts from HTMLTokenizer in one giagantic
2087         hack.  HTML 5 requires that we execute scripts from the tree-builders/parser.
2088
2089         It will take me a while to re-factor enough of HTMLTokenizer to be able to
2090         move the script execution logic without breaking things.  In the interest
2091         of allowing Adam to continue improving the HTML 5 lexer I've added this
2092         very basic (and very incomplete) <script> support to the HTML 5 parser code
2093         path so the he can run the HTML5 parser test suite.
2094
2095         <script> support is tested by most of the layout tests.
2096
2097         * dom/ScriptElement.cpp:
2098         (WebCore::useHTML5Parser):
2099         (WebCore::ScriptElement::finishParsingChildren):
2100
2101 2010-05-19  Anders Carlsson  <andersca@apple.com>
2102
2103         Reviewed by Sam Weinig.
2104
2105         Move member variables from NamedMappedAttrMap to its base class NamedNodeMap
2106         https://bugs.webkit.org/show_bug.cgi?id=39367
2107         <rdar://problem/8003304>
2108
2109         This lets us get rid of the vtable pointer in NamedNodeMap which saves 8 bytes, and also allows us to
2110         fit the m_mappedAttributeCount unsigned int in the RefCounted padding (in 64-bit).
2111         
2112         The net result is that we shrink the NamedMappedAttrMap size by 16 bytes, while keeping the size of NamedNodeMap the same.
2113
2114         * dom/Element.cpp:
2115         (WebCore::Element::createAttributeMap):
2116         * dom/Element.h:
2117         * dom/NamedMappedAttrMap.cpp:
2118         * dom/NamedMappedAttrMap.h:
2119         (WebCore::NamedMappedAttrMap::NamedMappedAttrMap):
2120         * dom/NamedNodeMap.cpp:
2121         (WebCore::NamedNodeMap::clearAttributes):
2122         * dom/NamedNodeMap.h:
2123         (WebCore::NamedNodeMap::NamedNodeMap):
2124         * dom/Node.cpp:
2125         (WebCore::Node::dumpStatistics):
2126         * dom/StyledElement.cpp:
2127         * dom/StyledElement.h:
2128
2129 2010-05-19  Sam Weinig  <sam@webkit.org>
2130
2131         Reviewed by Anders Carlsson.
2132
2133         Use ASSERT_UNUSED instead of UNUSED_PARAM.
2134
2135         * dom/Attribute.cpp:
2136         (WebCore::Attribute::unbindAttr):
2137
2138 2010-05-19  Sam Weinig  <sam@webkit.org>
2139
2140         Rubber-stamped by Anders Carlsson.
2141
2142         Complete the merge of MappedAttribute and Attribute.
2143
2144         Files elided for brevity.
2145
2146 2010-05-19  Marcus Bulach  <bulach@chromium.org>
2147
2148         Reviewed by Steve Block.
2149
2150         [chromium] Adds supports for layout tests using GeolocationServiceMock.
2151         https://bugs.webkit.org/show_bug.cgi?id=39081
2152
2153         Allows injection of GeolocationServiceMock factory.
2154
2155         Tests: existing fast/dom/Geolocation/*
2156
2157         * platform/GeolocationService.cpp:
2158         (WebCore::GeolocationService::useMock):
2159         (WebCore::GeolocationService::useMockFactory):
2160         * platform/GeolocationService.h:
2161         * platform/chromium/GeolocationServiceChromium.cpp:
2162         (WebCore::GeolocationServiceChromium::GeolocationServiceChromium):
2163
2164 2010-05-19  Justin Schuh  <jschuh@chromium.org>
2165
2166         Reviewed by Adam Barth.
2167
2168         Moving frame.src checks out of the bindings
2169         https://bugs.webkit.org/show_bug.cgi?id=37815
2170
2171         Moved JavaScript frame.src checks out of bindings and into
2172         HTMLFrameElementBase. Added main thread state stack to JavaScriptCore
2173         so ExecState is available inside core DOM. Updated affected bindings
2174         (except for GObject, which will need to be updated to avoid origin
2175         failures inside native code).
2176
2177         * Android.jscbindings.mk:
2178         * CMakeLists.txt:
2179         * GNUmakefile.am:
2180         * WebCore.gypi:
2181         * WebCore.pro:
2182         * WebCore.vcproj/WebCore.vcproj:
2183         * WebCore.xcodeproj/project.pbxproj:
2184         * bindings/js/JSBindingsAllInOne.cpp:
2185         * bindings/js/JSCallbackData.cpp:
2186         (WebCore::JSCallbackData::invokeCallback):
2187         * bindings/js/JSEventListener.cpp:
2188         (WebCore::JSEventListener::handleEvent):
2189         * bindings/js/JSInjectedScriptHostCustom.cpp:
2190         (WebCore::InjectedScriptHost::createInjectedScript):
2191         * bindings/js/JSMainThreadExecState.cpp: Added.
2192         * bindings/js/JSMainThreadExecState.h: Added.
2193         (WebCore::JSMainThreadExecState::currentState):
2194         (WebCore::JSMainThreadExecState::call):
2195         (WebCore::JSMainThreadExecState::evaluate):
2196         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
2197         (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
2198         (WebCore::JSMainThreadNullState::JSMainThreadNullState):
2199         * bindings/js/ScheduledAction.cpp:
2200         (WebCore::ScheduledAction::executeFunctionInContext):
2201         (WebCore::ScheduledAction::execute):
2202         * bindings/js/ScheduledAction.h:
2203         * bindings/js/ScriptController.cpp:
2204         (WebCore::ScriptController::evaluateInWorld):
2205         (WebCore::ScriptController::canAccessFromCurrentOrigin):
2206         * bindings/js/ScriptController.h:
2207         * bindings/js/ScriptFunctionCall.cpp:
2208         (WebCore::ScriptFunctionCall::call):
2209         * bindings/objc/ObjCEventListener.mm:
2210         * bindings/objc/WebScriptObject.mm:
2211         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2212         (-[WebScriptObject evaluateWebScript:]):
2213         * bindings/scripts/CodeGeneratorObjC.pm:
2214         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2215         (-[DOMTestCallback callbackWithClass1Param:]):
2216         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
2217         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
2218         (-[DOMTestCallback customCallback:class6Param:]):
2219         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2220         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2221         (-[DOMTestObj readOnlyIntAttr]):
2222         (-[DOMTestObj readOnlyStringAttr]):
2223         (-[DOMTestObj readOnlyTestObjAttr]):
2224         (-[DOMTestObj intAttr]):
2225         (-[DOMTestObj setIntAttr:]):
2226         (-[DOMTestObj longLongAttr]):
2227         (-[DOMTestObj setLongLongAttr:]):
2228         (-[DOMTestObj unsignedLongLongAttr]):
2229         (-[DOMTestObj setUnsignedLongLongAttr:]):
2230         (-[DOMTestObj stringAttr]):
2231         (-[DOMTestObj setStringAttr:]):
2232         (-[DOMTestObj testObjAttr]):
2233         (-[DOMTestObj setTestObjAttr:]):
2234         (-[DOMTestObj attrWithException]):
2235         (-[DOMTestObj setAttrWithException:]):
2236         (-[DOMTestObj attrWithSetterException]):
2237         (-[DOMTestObj setAttrWithSetterException:]):
2238         (-[DOMTestObj attrWithGetterException]):
2239         (-[DOMTestObj setAttrWithGetterException:]):
2240         (-[DOMTestObj customAttr]):
2241         (-[DOMTestObj setCustomAttr:]):
2242         (-[DOMTestObj scriptStringAttr]):
2243         (-[DOMTestObj voidMethod]):
2244         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
2245         (-[DOMTestObj intMethod]):
2246         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
2247         (-[DOMTestObj objMethod]):
2248         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
2249         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
2250         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
2251         (-[DOMTestObj serializedValue:]):
2252         (-[DOMTestObj methodWithException]):
2253         (-[DOMTestObj customMethod]):
2254         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
2255         (-[DOMTestObj customArgsAndException:]):
2256         (-[DOMTestObj addEventListener:listener:useCapture:]):
2257         (-[DOMTestObj removeEventListener:listener:useCapture:]):
2258         (-[DOMTestObj withDynamicFrame]):
2259         (-[DOMTestObj withDynamicFrameAndArg:]):
2260         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
2261         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
2262         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
2263         (-[DOMTestObj withScriptStateVoid]):
2264         (-[DOMTestObj withScriptStateObj]):
2265         (-[DOMTestObj withScriptStateVoidException]):
2266         (-[DOMTestObj withScriptStateObjException]):
2267         (-[DOMTestObj methodWithOptionalArg:]):
2268         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
2269         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
2270         * bindings/v8/ScriptController.cpp:
2271         (WebCore::ScriptController::canAccessFromCurrentOrigin):
2272         * bindings/v8/ScriptController.h:
2273         * html/HTMLFrameElementBase.cpp:
2274         (WebCore::HTMLFrameElementBase::isURLAllowed):
2275
2276 2010-05-19  Andreas Kling  <andreas.kling@nokia.com>
2277
2278         Reviewed by Darin Adler.
2279
2280         CanvasRenderingContext2D's property getters that return colors should
2281         serialize them in accordance with the HTML5 spec (4.8.11.1.4)
2282         Setters should ignore invalid colors.
2283
2284         Also, shadowColor should initially be transparent black (4.8.11.1.6)
2285
2286         https://bugs.webkit.org/show_bug.cgi?id=38845
2287
2288         Refactored CanvasStyle to store an RGBA32 instead of RGBA components and/or the color string.
2289
2290         Spec links:
2291         http://www.whatwg.org/specs/web-apps/current-work/#serialization-of-a-color
2292         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-shadowcolor
2293
2294         * html/canvas/CanvasRenderingContext2D.cpp:
2295         (WebCore::CanvasRenderingContext2D::State::State):
2296         (WebCore::CanvasRenderingContext2D::shadowColor):
2297         (WebCore::CanvasRenderingContext2D::setShadowColor):
2298         (WebCore::CanvasRenderingContext2D::setShadow):
2299         (WebCore::CanvasRenderingContext2D::clearShadow):
2300         (WebCore::CanvasRenderingContext2D::applyShadow):
2301         * html/canvas/CanvasRenderingContext2D.h:
2302         * html/canvas/CanvasStyle.cpp:
2303         (WebCore::CanvasStyle::CanvasStyle):
2304         (WebCore::CanvasStyle::create):
2305         (WebCore::CanvasStyle::applyStrokeColor):
2306         (WebCore::CanvasStyle::applyFillColor):
2307         * html/canvas/CanvasStyle.h:
2308         (WebCore::CanvasStyle::create):
2309         (WebCore::CanvasStyle::color):
2310         (WebCore::CanvasStyle::):
2311         (WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
2312         * platform/graphics/Color.cpp:
2313         (WebCore::Color::serialized):
2314         * platform/graphics/Color.h:
2315
2316 2010-05-19  Andreas Kling  <andreas.kling@nokia.com>
2317
2318         Reviewed by Simon Hausmann.
2319
2320         [Qt] REGRESSION: CoolClock isn't rendered properly
2321
2322         https://bugs.webkit.org/show_bug.cgi?id=38526
2323
2324         CanvasRenderingContext2D's arc() should connect to the previous point
2325         with a straight line (HTML5 spec 4.8.11.1.8), but if the path is empty
2326         to begin with, we don't want a line back to (0,0)
2327         This also fixes the rendering artifact discussed in bug 36226.
2328
2329         Spec link:
2330         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-arc
2331
2332         Test: fast/canvas/canvas-arc-connecting-line.html
2333
2334         * platform/graphics/qt/PathQt.cpp:
2335         (WebCore::Path::addArc):
2336
2337 2010-05-19  Alexander Pavlov  <apavlov@chromium.org>
2338
2339         Reviewed by Jeremy Orlow.
2340
2341         Fix whitespace for the bug 38906
2342         https://bugs.webkit.org/show_bug.cgi?id=39351
2343
2344         No new tests required (no code change).
2345
2346         * css/CSSParser.cpp:
2347         (WebCore::CSSParser::~CSSParser):
2348         (WebCore::CSSParser::setupParser):
2349         (WebCore::CSSParser::parseSheet):
2350         (WebCore::CSSParser::parseValue):
2351         (WebCore::CSSParser::parseSelector):
2352         (WebCore::unitFromString):
2353         (WebCore::CSSParser::checkForOrphanedUnits):
2354         (WebCore::CSSParser::parseWCSSInputProperty):
2355         (WebCore::CSSParser::parseFillShorthand):
2356         (WebCore::CSSParser::parseAnimationShorthand):
2357         (WebCore::CSSParser::parseTransitionShorthand):
2358         (WebCore::CSSParser::parseShorthand):
2359         (WebCore::CSSParser::parse4Values):
2360         (WebCore::CSSParser::parseAttr):
2361         (WebCore::CSSParser::parseFillPositionXY):
2362         (WebCore::CSSParser::parseFillPosition):
2363         (WebCore::CSSParser::parseFillRepeat):
2364         (WebCore::CSSParser::parseFillProperty):
2365         (WebCore::CSSParser::parseAnimationTimingFunction):
2366         (WebCore::CSSParser::parseAnimationProperty):
2367         (WebCore::CSSParser::parseDashboardRegions):
2368         (WebCore::CSSParser::parseCounterContent):
2369         (WebCore::CSSParser::parseShape):
2370         (WebCore::CSSParser::parseFont):
2371         (WebCore::CSSParser::parseFontFamily):
2372         (WebCore::CSSParser::parseFontFaceSrc):
2373         (WebCore::parseInt):
2374         (WebCore::CSSParser::parseColor):
2375         (WebCore::CSSParser::parseShadow):
2376         (WebCore::CSSParser::parseReflect):
2377         (WebCore::BorderImageParseContext::commitNumber):
2378         (WebCore::BorderImageParseContext::commitBorderImage):
2379         (WebCore::CSSParser::parseBorderImage):
2380         (WebCore::CSSParser::parseCounter):
2381         (WebCore::parseGradientPoint):
2382         (WebCore::parseGradientColorStop):
2383         (WebCore::CSSParser::parseGradient):
2384         (WebCore::CSSParser::parseCanvas):
2385         (WebCore::CSSParser::parseTransform):
2386         (WebCore::CSSParser::parseTransformOrigin):
2387         (WebCore::CSSParser::parsePerspectiveOrigin):
2388         (WebCore::CSSParser::text):
2389         (WebCore::CSSParser::createRuleList):
2390         (WebCore::CSSParser::createVariablesRule):
2391         (WebCore::CSSParser::parseVariable):
2392         (WebCore::CSSParser::parsePropertyWithResolvedVariables):
2393         (WebCore::CSSParser::checkForVariables):
2394         (WebCore::CSSParser::createKeyframeRule):
2395         * css/CSSParser.h:
2396         * inspector/InspectorController.cpp:
2397         (WebCore::InspectorController::setFrontend):
2398         (WebCore::InspectorController::show):
2399         (WebCore::InspectorController::unbindAllResources):
2400         (WebCore::InspectorController::didCommitLoad):
2401         (WebCore::InspectorController::scriptImported):
2402         (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
2403         (WebCore::InspectorController::removeBreakpoint):
2404         (WebCore::drawOutlinedQuad):
2405         (WebCore::InspectorController::stopTiming):
2406         * inspector/InspectorDOMAgent.cpp:
2407         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
2408         (WebCore::InspectorDOMAgent::getStyles):
2409         (WebCore::InspectorDOMAgent::applyStyleText):
2410
2411 2010-05-19  Steve Block  <steveblock@google.com>
2412
2413         Reviewed by Nate Chapin.
2414
2415         V8 code generator does not add ENABLE guards around attribute getters and setters
2416         https://bugs.webkit.org/show_bug.cgi?id=39222
2417
2418         No new tests, build fix only.
2419
2420         * bindings/scripts/CodeGeneratorV8.pm:
2421
2422 2010-05-19  Jeremy Orlow  <jorlow@chromium.org>
2423
2424         Unreviewed build fix for Chromium.
2425
2426         * storage/IndexedDatabaseImpl.cpp:
2427
2428 2010-05-17  Jeremy Orlow  <jorlow@chromium.org>
2429
2430         Reviewed by Darin Fisher.
2431
2432         Hook Chromium's WebIndexedDatabaseImpl up to IndexedDatabaseImpl
2433         https://bugs.webkit.org/show_bug.cgi?id=39216
2434
2435         All of these functions are supposed to be passing around the origin since
2436         the caller of IndexedDatabaseImpl might not be able to pass in a Frame*
2437         object.  I tried to fix this in an ealier patch, but obviously messed up.
2438
2439         Also change passing security origin strings to passing SecurityOrigin
2440         objects.
2441
2442         No behavior change because Chromium was emulating the old behavior before
2443         even though the code wasn't properly hooked up.
2444
2445         * storage/IndexedDatabase.h:
2446         * storage/IndexedDatabaseImpl.cpp:
2447         (WebCore::IndexedDatabaseImpl::open):
2448         * storage/IndexedDatabaseImpl.h:
2449         * storage/IndexedDatabaseRequest.cpp:
2450         (WebCore::IndexedDatabaseRequest::open):
2451
2452 2010-05-19  Ben Murdoch  <benm@google.com>
2453
2454         Reviewed by Darin Adler.
2455
2456         Touch events are marked DontEnum in DOMWindow.idl
2457         https://bugs.webkit.org/show_bug.cgi?id=39118
2458
2459         Touch events are the only attribute event listeners on the
2460         window object that are marked DontEnum. For consistency allow
2461         them to be enumerated.
2462
2463         * page/DOMWindow.idl: Remove DontEnum from touchcancel, touchend,
2464             touchstart and touchmove attributes.
2465
2466 2010-05-19  Simon Hausmann  <simon.hausmann@nokia.com>
2467
2468         [Qt] Fix build warning
2469
2470         NamedAttrMap.h has been renamed to NamedNodeMap.h
2471
2472         * WebCore.pro:
2473
2474 2010-05-19  Eric Seidel  <eric@webkit.org>
2475
2476         Reviewed by Adam Barth.
2477
2478         Add an HTML parsing benchmark
2479         https://bugs.webkit.org/show_bug.cgi?id=39338
2480
2481         This benchmark parses the HTML5 specification 10 times and
2482         reports how long it takes.  It does this 21 times, discarding
2483         the first warm-up run, and then prints the average time and
2484         standard deviation.
2485
2486         Sharking the benchmark correctly shows over 60% of the time spent under HTMLTokenizer::write().
2487         The numbers from the benchmark are rather consistent.  On my
2488         Mac Book Pro, I consistently see standard deviations < 2% of total time.
2489
2490         * benchmarks/parser/html-parser.html: Added.
2491         * benchmarks/parser/resources/html5.html: Added.
2492
2493 2010-05-18  Yuzo Fujishima  <yuzo@google.com>
2494
2495         Reviewed by Shinichiro Hamaji.
2496
2497         Make CSS Parser properly handle only-for-pages pseudo-classes.
2498
2499         A new Match category, PagePseudoClass, is introduced to distinguish
2500         only-for-pages pseudo-classes from others. A new symbol, pseudo_page,
2501         is introduced to handle them separately.
2502
2503         https://bugs.webkit.org/show_bug.cgi?id=38731
2504
2505         * css/CSSGrammar.y:
2506         * css/CSSParser.cpp:
2507         (WebCore::CSSParser::createMarginAtRule):
2508         * css/CSSParser.h:
2509         * css/CSSSelector.cpp:
2510         (WebCore::CSSSelector::extractPseudoType):
2511         (WebCore::CSSSelector::selectorText):
2512         * css/CSSSelector.h:
2513         (WebCore::CSSSelector::):
2514         * css/CSSStyleSelector.cpp:
2515         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2516
2517 2010-05-19  Adam Barth  <abarth@webkit.org>
2518
2519         Reviewed by David Hyatt.
2520
2521         Change the API of nextToken to distinguish between emitting a token and just running out of input
2522         https://bugs.webkit.org/show_bug.cgi?id=39349
2523
2524         I'm not sure there's a functional difference with this patch yet, but
2525         as discussed with Eric, we need this to handle attributes.
2526
2527         * html/HTML5Lexer.cpp:
2528         (WebCore::HTML5Lexer::reset):
2529         (WebCore::HTML5Lexer::nextToken):
2530         * html/HTML5Lexer.h:
2531         * html/HTML5Token.h:
2532         (WebCore::HTML5Token::HTML5Token):
2533         (WebCore::HTML5Token::clear):
2534         (WebCore::HTML5Token::beginStartTag):
2535         (WebCore::HTML5Token::beginEndTag):
2536         (WebCore::HTML5Token::beginCharacter):
2537         * html/HTML5Tokenizer.cpp:
2538         (WebCore::HTML5Tokenizer::write):
2539
2540 2010-05-18  Eric Seidel  <eric@webkit.org>
2541
2542         Reviewed by Maciej Stachowiak.
2543
2544         Refactor HTMLTokenizer::write to make it more readable and split out the lexer bits from flow control bits
2545         https://bugs.webkit.org/show_bug.cgi?id=39318
2546
2547         No functional changes, only moving code into smaller functions.
2548
2549         This code is already covered by numerous layout tests.
2550
2551         HTML parsing benchmark shows this to be a wash.
2552
2553         * dom/Tokenizer.h:
2554         * html/HTMLTokenizer.cpp:
2555         (WebCore::HTMLTokenizer::advance):
2556          - New funtion to encapulate code which will move into HTMLLexer eventually.
2557          - Use ALWAYS_INLINE to make sure compilers inline this large
2558            function (otherwise this patch is a regression).
2559         (WebCore::HTMLTokenizer::willWriteHTML):
2560          - New function to handle calling any pre-write delegates.
2561         (WebCore::HTMLTokenizer::didWriteHTML):
2562          - New function to handle calling any post-write delegates.
2563         (WebCore::HTMLTokenizer::write):
2564          - Call the new functions.
2565         * html/HTMLTokenizer.h:
2566
2567 2010-05-18  Adam Barth  <abarth@webkit.org>
2568
2569         Reviewed by Eric Seidel.
2570
2571         Make the HTML5 parser correctly parse <div>Hello</div>
2572         https://bugs.webkit.org/show_bug.cgi?id=39345
2573
2574         Again, this patch is covered by a large number of LayoutTests.
2575
2576         * html/HTML5Lexer.cpp:
2577         (WebCore::HTML5Lexer::HTML5Lexer):
2578         (WebCore::HTML5Lexer::reset):
2579         (WebCore::HTML5Lexer::nextToken):
2580         (WebCore::HTML5Lexer::emitCommentToken):
2581         (WebCore::HTML5Lexer::emitCharacter):
2582         (WebCore::HTML5Lexer::emitCurrentTagToken):
2583         * html/HTML5Lexer.h:
2584         * html/HTML5Token.h:
2585         (WebCore::HTML5Token::beginCharacter):
2586         (WebCore::HTML5Token::appendToCharacter):
2587         (WebCore::HTML5Token::characters):
2588         * html/HTML5Tokenizer.cpp:
2589         (WebCore::convertToOldStyle):
2590
2591 2010-05-18  Adam Barth  <abarth@webkit.org>
2592
2593         Reviewed by Eric Seidel.
2594
2595         Make the HTML5 parser actually parse <div></div>
2596         https://bugs.webkit.org/show_bug.cgi?id=39342
2597
2598         This patch is covered by every LayoutTest.  Yes.  All of them.  :)
2599
2600         * html/HTML5Lexer.cpp:
2601         (WebCore::toLowerCase):
2602         (WebCore::HTML5Lexer::HTML5Lexer):
2603         (WebCore::HTML5Lexer::nextToken):
2604         (WebCore::HTML5Lexer::emitCharacter):
2605         * html/HTML5Lexer.h:
2606         * html/HTML5Token.h:
2607         (WebCore::HTML5Token::HTML5Token):
2608         (WebCore::HTML5Token::beginStartTag):
2609         (WebCore::HTML5Token::beginEndTag):
2610         (WebCore::HTML5Token::appendToName):
2611         (WebCore::HTML5Token::type):
2612         (WebCore::HTML5Token::name):
2613         (WebCore::HTML5Token::selfClosing):
2614         (WebCore::HTML5Token::attrs):
2615         * html/HTML5Tokenizer.cpp:
2616         (WebCore::convertToOldStyle):
2617         (WebCore::HTML5Tokenizer::write):
2618
2619 2010-05-18  Tony Chang  <tony@chromium.org>
2620
2621         Reviewed by Ojan Vafai.
2622
2623         REGRESSION: crash in WebCore::CompositeEditCommand::splitTreeToNode when indenting in an empty li
2624         https://bugs.webkit.org/show_bug.cgi?id=38232
2625
2626         Test: editing/execCommand/crash-indenting-list-item.html
2627
2628         * editing/IndentOutdentCommand.cpp:
2629         (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
2630         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
2631
2632 2010-05-18  Kent Tamura  <tkent@chromium.org>
2633
2634         Reviewed by Darin Adler.
2635
2636         ':optional' pseudo selector should not be applied to <keygen> and <progress>
2637         https://bugs.webkit.org/show_bug.cgi?id=39292
2638
2639         Test: fast/css/pseudo-required-optional-unapplied.html
2640
2641         * html/HTMLKeygenElement.h:
2642         (WebCore::HTMLKeygenElement::isOptionalFormControl):
2643           Add isOptionalFormControl() returning false.
2644           HTMLKeygenElement inherits HTMLSelectElement, which should return true
2645           for isOptionalFormControl(). However, <keygen> is not :optional
2646           according to the standard.
2647         * html/HTMLProgressElement.h:
2648           Remove isOptionalFormControl().
2649
2650 2010-05-18  Adam Barth  <abarth@webkit.org>
2651
2652         Reviewed by Eric Seidel.
2653
2654         Implement the DOCTYPE states for the HTML5 lexer
2655         https://bugs.webkit.org/show_bug.cgi?id=39335
2656
2657         * html/HTML5Lexer.cpp:
2658         (WebCore::HTML5Lexer::nextToken):
2659         (WebCore::emitCurrentDoctypeToken):
2660         * html/HTML5Lexer.h:
2661
2662 2010-05-18  Tony Chang  <tony@chromium.org>
2663
2664         Reviewed by Ojan Vafai.
2665
2666         [chromium] ignore IME events if the keydown event was prevented
2667         https://bugs.webkit.org/show_bug.cgi?id=37692
2668
2669         A manual test to verify the IME behavior since the existing methods of
2670         textInputController test at a lower level than the fix.
2671
2672         * manual-tests/ime-keydown-preventdefault.html: Added.
2673
2674 2010-05-18  Sam Weinig  <sam@webkit.org>
2675
2676         Fix the build for platforms that don't always include UnusedParam.h
2677
2678         * dom/Attribute.cpp:
2679
2680 2010-05-18  MORITA Hajime  <morrita@google.com>
2681
2682         Reviewed by Kent Tamura.
2683
2684         [Chromium] Windows: Determinate progress bar should have glossy overlay
2685         https://bugs.webkit.org/show_bug.cgi?id=39269
2686         
2687         - Moved animation code from RenderThemeChromiumWin to chromium tree
2688           because it should be behind the theme implementation, which lives
2689           in chromium tree.
2690         - Passed current time to the bridge, which will be used to compute
2691           the state of the theme animation.
2692         
2693         No new tests, animation effect can be confirmed only manually.
2694         
2695         * platform/chromium/ChromiumBridge.h:
2696         * rendering/RenderProgress.h:
2697         (WebCore::RenderProgress::animationStartTime): Added.
2698         * rendering/RenderThemeChromiumWin.cpp:
2699         (WebCore::RenderThemeChromiumWin::animationDurationForProgressBar):
2700         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2701
2702 2010-05-18  Sam Weinig  <sam@webkit.org>
2703
2704         Fix release build.
2705
2706         * dom/Attribute.cpp:
2707         (WebCore::Attribute::unbindAttr):
2708
2709 2010-05-18  Sam Weinig  <sam@webkit.org>
2710
2711         Reviewed by Maciej Stachowiak.
2712
2713         Move Attr pointer from Attribute to a global HashMap.
2714         https://bugs.webkit.org/show_bug.cgi?id=39337
2715         <rdar://problem/8001168>
2716
2717         Shaves another word off of Attribute.
2718
2719         * dom/Attr.cpp:
2720         (WebCore::Attr::Attr):
2721         (WebCore::Attr::~Attr):
2722         * dom/Attribute.cpp:
2723         (WebCore::attributeAttrMap):
2724         (WebCore::Attribute::attr):
2725         (WebCore::Attribute::createAttrIfNeeded):
2726         (WebCore::Attribute::bindAttr):
2727         (WebCore::Attribute::unbindAttr):
2728         * dom/Attribute.h:
2729         (WebCore::Attribute::Attribute):
2730
2731 2010-05-18  Jakob Petsovits  <jpetsovits@rim.com>
2732
2733         Unreviewed, forgot to svn add source file in r59619.
2734         http://trac.webkit.org/changeset/59619
2735
2736         * platform/image-decoders/openvg: Added.
2737         * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp: Added.
2738         (WebCore::RGBA32Buffer::asNewNativeImage):
2739
2740 2010-05-18  Yaar Schnitman  <yaar@chromium.org>
2741
2742         Unreviewed, rolling out r59693.
2743         http://trac.webkit.org/changeset/59693
2744         https://bugs.webkit.org/show_bug.cgi?id=37815
2745
2746         Broke GTK Release
2747
2748         * Android.jscbindings.mk:
2749         * CMakeLists.txt:
2750         * GNUmakefile.am:
2751         * WebCore.gypi:
2752         * WebCore.pro:
2753         * WebCore.vcproj/WebCore.vcproj:
2754         * WebCore.xcodeproj/project.pbxproj:
2755         * bindings/js/JSBindingsAllInOne.cpp:
2756         * bindings/js/JSCallbackData.cpp:
2757         (WebCore::JSCallbackData::invokeCallback):
2758         * bindings/js/JSEventListener.cpp:
2759         (WebCore::JSEventListener::handleEvent):
2760         * bindings/js/JSInjectedScriptHostCustom.cpp:
2761         (WebCore::InjectedScriptHost::createInjectedScript):
2762         * bindings/js/JSMainThreadExecState.cpp: Removed.
2763         * bindings/js/JSMainThreadExecState.h: Removed.
2764         * bindings/js/ScheduledAction.cpp:
2765         (WebCore::ScheduledAction::executeFunctionInContext):
2766         (WebCore::ScheduledAction::execute):
2767         * bindings/js/ScheduledAction.h:
2768         * bindings/js/ScriptController.cpp:
2769         (WebCore::ScriptController::evaluateInWorld):
2770         * bindings/js/ScriptController.h:
2771         * bindings/js/ScriptFunctionCall.cpp:
2772         (WebCore::ScriptFunctionCall::call):
2773         * bindings/objc/ObjCEventListener.mm:
2774         * bindings/objc/WebScriptObject.mm:
2775         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2776         (-[WebScriptObject evaluateWebScript:]):
2777         * bindings/scripts/CodeGeneratorObjC.pm:
2778         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2779         (-[DOMTestCallback callbackWithClass1Param:]):
2780         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
2781         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
2782         (-[DOMTestCallback customCallback:class6Param:]):
2783         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2784         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2785         (-[DOMTestObj readOnlyIntAttr]):
2786         (-[DOMTestObj readOnlyStringAttr]):
2787         (-[DOMTestObj readOnlyTestObjAttr]):
2788         (-[DOMTestObj intAttr]):
2789         (-[DOMTestObj setIntAttr:]):
2790         (-[DOMTestObj longLongAttr]):
2791         (-[DOMTestObj setLongLongAttr:]):
2792         (-[DOMTestObj unsignedLongLongAttr]):
2793         (-[DOMTestObj setUnsignedLongLongAttr:]):
2794         (-[DOMTestObj stringAttr]):
2795         (-[DOMTestObj setStringAttr:]):
2796         (-[DOMTestObj testObjAttr]):
2797         (-[DOMTestObj setTestObjAttr:]):
2798         (-[DOMTestObj attrWithException]):
2799         (-[DOMTestObj setAttrWithException:]):
2800         (-[DOMTestObj attrWithSetterException]):
2801         (-[DOMTestObj setAttrWithSetterException:]):
2802         (-[DOMTestObj attrWithGetterException]):
2803         (-[DOMTestObj setAttrWithGetterException:]):
2804         (-[DOMTestObj customAttr]):
2805         (-[DOMTestObj setCustomAttr:]):
2806         (-[DOMTestObj scriptStringAttr]):
2807         (-[DOMTestObj voidMethod]):
2808         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
2809         (-[DOMTestObj intMethod]):
2810         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
2811         (-[DOMTestObj objMethod]):
2812         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
2813         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
2814         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
2815         (-[DOMTestObj serializedValue:]):
2816         (-[DOMTestObj methodWithException]):
2817         (-[DOMTestObj customMethod]):
2818         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
2819         (-[DOMTestObj customArgsAndException:]):
2820         (-[DOMTestObj addEventListener:listener:useCapture:]):
2821         (-[DOMTestObj removeEventListener:listener:useCapture:]):
2822         (-[DOMTestObj withDynamicFrame]):
2823         (-[DOMTestObj withDynamicFrameAndArg:]):
2824         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
2825         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
2826         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
2827         (-[DOMTestObj withScriptStateVoid]):
2828         (-[DOMTestObj withScriptStateObj]):
2829         (-[DOMTestObj withScriptStateVoidException]):
2830         (-[DOMTestObj withScriptStateObjException]):
2831         (-[DOMTestObj methodWithOptionalArg:]):
2832         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
2833         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
2834         * bindings/v8/ScriptController.cpp:
2835         * bindings/v8/ScriptController.h:
2836         * html/HTMLFrameElementBase.cpp:
2837         (WebCore::HTMLFrameElementBase::isURLAllowed):
2838
2839 2010-05-18  Adam Barth  <abarth@webkit.org>
2840
2841         Reviewed by Eric Seidel.
2842
2843         Implement comment states for HTML5 lexer
2844         https://bugs.webkit.org/show_bug.cgi?id=39334
2845
2846         * html/HTML5Lexer.cpp:
2847         (WebCore::HTML5Lexer::nextToken):
2848
2849 2010-05-18  Anders Carlsson  <andersca@apple.com>
2850
2851         Reviewed by Sam Weinig.
2852
2853         Move all member variables from MappedAttribute to Attribute.
2854         https://bugs.webkit.org/show_bug.cgi?id=39336
2855         <rdar://problem/8000853>
2856
2857         This saves one word because we no longer have any virtual member functions in Attribute, and
2858         thus no vtable pointer.
2859         
2860         I plan to remove MappedAttribute altogether in a subsequent commit.
2861
2862         * Android.mk:
2863         * GNUmakefile.am:
2864         * WebCore.gypi:
2865         * WebCore.pro:
2866         * WebCore.vcproj/WebCore.vcproj:
2867         * WebCore.xcodeproj/project.pbxproj:
2868         * css/CSSStyleSelector.cpp:
2869         (WebCore::CSSStyleSelector::styleForElement):
2870         * dom/Attribute.cpp:
2871         (WebCore::Attribute::clone):
2872         * dom/Attribute.h:
2873         (WebCore::Attribute::create):
2874         (WebCore::Attribute::style):
2875         (WebCore::Attribute::decl):
2876         (WebCore::Attribute::setDecl):
2877         (WebCore::Attribute::isMappedAttribute):
2878         (WebCore::Attribute::Attribute):
2879         * dom/MappedAttribute.cpp: Removed.
2880         * dom/MappedAttribute.h:
2881         (WebCore::MappedAttribute::create):
2882         (WebCore::MappedAttribute::MappedAttribute):
2883         (WebCore::toMappedAttribute):
2884         * dom/NamedMappedAttrMap.cpp:
2885         (WebCore::NamedMappedAttrMap::declCount):
2886         (WebCore::NamedMappedAttrMap::mapsEquivalent):
2887         * dom/StyledElement.cpp:
2888         (WebCore::StyledElement::attributeChanged):
2889         * svg/SVGSVGElement.cpp:
2890         (WebCore::updateCSSForAttribute):
2891         * svg/SVGStyledElement.cpp:
2892         (WebCore::SVGStyledElement::getPresentationAttribute):
2893
2894 2010-05-18  Tony Chang  <tony@chromium.org>
2895
2896         Reviewed by Darin Adler.
2897
2898         https://bugs.webkit.org/show_bug.cgi?id=24943
2899         Command-B and Command-I do not generate keydown events in contentEditable regions.
2900
2901         * manual-tests/style-keypress-events.html: Added.
2902
2903 2010-05-18  Adam Barth  <abarth@webkit.org>
2904
2905         Reviewed by Eric Seidel.
2906
2907         Add more state to the HTML5 lexer
2908         https://bugs.webkit.org/show_bug.cgi?id=39333
2909
2910         This code is just transliteration from the spec.
2911
2912         * html/HTML5Lexer.cpp:
2913         (WebCore::HTML5Lexer::HTML5Lexer):
2914         (WebCore::HTML5Lexer::nextToken):
2915         * html/HTML5Lexer.h:
2916
2917 2010-05-18  Adam Barth  <abarth@webkit.org>
2918
2919         Reviewed by Eric Seidel.
2920
2921         Implement two more lexer states
2922         https://bugs.webkit.org/show_bug.cgi?id=39298
2923
2924         No tests because Eric is still working on wiring up the lexer to the
2925         test harness.
2926
2927         * html/HTML5Lexer.cpp:
2928         (WebCore::HTML5Lexer::nextToken):
2929         (WebCore::HTML5Lexer::emitParseError):
2930         (WebCore::HTML5Lexer::emitCurrentTagToken):
2931         * html/HTML5Lexer.h:
2932
2933 2010-05-18  Brady Eidson  <beidson@apple.com>
2934
2935         Reviewed by Maciej Stachowiak.
2936
2937         Repro crash with many Google image search results
2938         <rdar://problem/7685669> and https://bugs.webkit.org/show_bug.cgi?id=39323
2939
2940         When an iframe has a plugin resource as its src, that case bypassed the plugin sandboxing checks and continued to load
2941         the data for the plugin resource. It handed that data off to a nonexistent Widget, causing a null deref and the crash.
2942
2943         By replacing PluginDocuments in sandboxes iframes with a new "SinkDocument" that just acts as a data sink, we prevent the
2944         crash and also prevent actually loading the plugin binaries.
2945
2946         I filed https://bugs.webkit.org/show_bug.cgi?id=39330 to follow up and let us cancel the load as soon as we know we should.
2947
2948         Test: fast/loader/sandboxed-plugin-crash.html
2949
2950         * CMakeLists.txt:
2951         * GNUmakefile.am:
2952         * WebCore.gypi:
2953         * WebCore.pro:
2954         * WebCore.vcproj/WebCore.vcproj:
2955         * WebCore.xcodeproj/project.pbxproj:
2956
2957         * loader/DocumentWriter.cpp:
2958         (WebCore::DocumentWriter::begin): If the created document is a PluginDocument and the plugin sandbox flag is set,
2959           replace it with a SinkDocument.
2960
2961         * loader/PluginDocument.h:
2962         (WebCore::PluginDocument::isPluginDocument): Make public (it was already public at the Document.h level).
2963
2964         Add a simple document/tokenizer pair that simply presents a blank HTML document and acts as a data sink for whatever
2965         data is handed to it:
2966         * loader/SinkDocument.cpp: Added.
2967         (WebCore::SinkTokenizer::SinkTokenizer):
2968         (WebCore::SinkTokenizer::write):
2969         (WebCore::SinkTokenizer::isWaitingForScripts):
2970         (WebCore::SinkTokenizer::wantsRawData):
2971         (WebCore::SinkTokenizer::writeRawData):
2972         (WebCore::SinkTokenizer::stopParsing):
2973         (WebCore::SinkTokenizer::finish):
2974         (WebCore::SinkDocument::SinkDocument):
2975         (WebCore::SinkDocument::createTokenizer):
2976         * loader/SinkDocument.h: Added.
2977         (WebCore::SinkDocument::create):
2978
2979 2010-05-18  Sam Weinig  <sam@webkit.org>
2980
2981         Reviewed by Anders Carlsson.
2982
2983         https://bugs.webkit.org/show_bug.cgi?id=39321
2984         Reduce the size of ListHashSets used by Document
2985         <rdar://problem/7999388>
2986
2987         Reduce Membuster peak memory usage by ~450K by reducing the pool sizes
2988         of the ListHashSets used by Document.
2989
2990         * dom/Document.cpp:
2991         (WebCore::Document::addStyleSheetCandidateNode):
2992         (WebCore::Document::recalcStyleSelector):
2993         * dom/Document.h:
2994
2995 2010-05-18  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2996
2997         Rubberstamped by Simon Hausmann.
2998
2999         Return null when creating an ImageBuffer failed, due to for
3000         instance a nulled pixmap.
3001
3002         * platform/graphics/qt/ImageBufferQt.cpp:
3003         (WebCore::ImageBufferData::ImageBufferData):
3004         (WebCore::ImageBuffer::ImageBuffer):
3005
3006 2010-05-18  Jian Li  <jianli@chromium.org>
3007
3008         Reviewed by Dmitry Titov.
3009
3010         Fix bug 39285: fast/files/file-reader.html is timing out on all mac bots.
3011         https://bugs.webkit.org/show_bug.cgi?id=39285
3012
3013         The timeout is caused by 59659 that changed the GC timer to 0 and thus
3014         triggered a bug in FileReader code. The fix is to add more states so
3015         that hasPendingActivity() can do the check correctly.
3016
3017         * html/FileReader.cpp:
3018         (WebCore::FileReader::FileReader):
3019         (WebCore::FileReader::hasPendingActivity):
3020         (WebCore::FileReader::readInternal):
3021         (WebCore::FileReader::terminate):
3022         (WebCore::FileReader::didStart):
3023         (WebCore::FileReader::didGetSize):
3024         (WebCore::FileReader::didRead):
3025         (WebCore::FileReader::didFinish):
3026         (WebCore::FileReader::didFail):
3027         (WebCore::FileReader::readyState):
3028         (WebCore::FileReader::result):
3029         * html/FileReader.h:
3030         (WebCore::FileReader::):
3031
3032 2010-05-18  Simon Fraser  <simon.fraser@apple.com>
3033
3034         Reviewed by Darin Adler.
3035
3036         Clean up GraphicsLayer naming code
3037         https://bugs.webkit.org/show_bug.cgi?id=39316
3038
3039         Move code that generates a name for the GraphicsLayer (used in debug builds only) into
3040         a new nameForLayer() method. Use it when naming the foreground layer.
3041
3042         * rendering/RenderLayerBacking.cpp:
3043         (WebCore::RenderLayerBacking::createGraphicsLayer):
3044         (WebCore::RenderLayerBacking::updateForegroundLayer):
3045         (WebCore::RenderLayerBacking::nameForLayer):
3046         * rendering/RenderLayerBacking.h:
3047
3048 2010-05-18  Justin Schuh  <jschuh@chromium.org>
3049
3050         Reviewed by Adam Barth.
3051
3052         Moving frame.src checks out of the bindings
3053         https://bugs.webkit.org/show_bug.cgi?id=37815
3054
3055         Moved JavaScript frame.src checks out of bindings and into
3056         HTMLFrameElementBase. Added main thread state stack to JavaScriptCore
3057         so ExecState is available inside core DOM. Updated affected bindings
3058         (except for GObject, which will need to be updated to avoid origin
3059         failures inside native code).
3060
3061         * Android.jscbindings.mk:
3062         * CMakeLists.txt:
3063         * GNUmakefile.am:
3064         * WebCore.gypi:
3065         * WebCore.pro:
3066         * WebCore.vcproj/WebCore.vcproj:
3067         * WebCore.xcodeproj/project.pbxproj:
3068         * bindings/js/JSBindingsAllInOne.cpp:
3069         * bindings/js/JSCallbackData.cpp:
3070         (WebCore::JSCallbackData::invokeCallback):
3071         * bindings/js/JSEventListener.cpp:
3072         (WebCore::JSEventListener::handleEvent):
3073         * bindings/js/JSInjectedScriptHostCustom.cpp:
3074         (WebCore::InjectedScriptHost::createInjectedScript):
3075         * bindings/js/JSMainThreadExecState.cpp: Added.
3076         * bindings/js/JSMainThreadExecState.h: Added.
3077         (WebCore::JSMainThreadExecState::currentState):
3078         (WebCore::JSMainThreadExecState::call):
3079         (WebCore::JSMainThreadExecState::evaluate):
3080         (WebCore::JSMainThreadExecState::JSMainThreadExecState):
3081         (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
3082         (WebCore::JSMainThreadNullState::JSMainThreadNullState):
3083         * bindings/js/ScheduledAction.cpp:
3084         (WebCore::ScheduledAction::executeFunctionInContext):
3085         (WebCore::ScheduledAction::execute):
3086         * bindings/js/ScheduledAction.h:
3087         * bindings/js/ScriptController.cpp:
3088         (WebCore::ScriptController::evaluateInWorld):
3089         (WebCore::ScriptController::canAccessFromCurrentOrigin):
3090         * bindings/js/ScriptController.h:
3091         * bindings/js/ScriptFunctionCall.cpp:
3092         (WebCore::ScriptFunctionCall::call):
3093         * bindings/objc/ObjCEventListener.mm:
3094         * bindings/objc/WebScriptObject.mm:
3095         (-[WebScriptObject callWebScriptMethod:withArguments:]):
3096         (-[WebScriptObject evaluateWebScript:]):
3097         * bindings/scripts/CodeGeneratorObjC.pm:
3098         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
3099         (-[DOMTestCallback callbackWithClass1Param:]):
3100         (-[DOMTestCallback callbackWithClass2Param:strArg:]):
3101         (-[DOMTestCallback callbackWithNonBoolReturnType:]):
3102         (-[DOMTestCallback customCallback:class6Param:]):
3103         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
3104         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3105         (-[DOMTestObj readOnlyIntAttr]):
3106         (-[DOMTestObj readOnlyStringAttr]):
3107         (-[DOMTestObj readOnlyTestObjAttr]):
3108         (-[DOMTestObj intAttr]):
3109         (-[DOMTestObj setIntAttr:]):
3110         (-[DOMTestObj longLongAttr]):
3111         (-[DOMTestObj setLongLongAttr:]):
3112         (-[DOMTestObj unsignedLongLongAttr]):
3113         (-[DOMTestObj setUnsignedLongLongAttr:]):
3114         (-[DOMTestObj stringAttr]):
3115         (-[DOMTestObj setStringAttr:]):
3116         (-[DOMTestObj testObjAttr]):
3117         (-[DOMTestObj setTestObjAttr:]):
3118         (-[DOMTestObj attrWithException]):
3119         (-[DOMTestObj setAttrWithException:]):
3120         (-[DOMTestObj attrWithSetterException]):
3121         (-[DOMTestObj setAttrWithSetterException:]):
3122         (-[DOMTestObj attrWithGetterException]):
3123         (-[DOMTestObj setAttrWithGetterException:]):
3124         (-[DOMTestObj customAttr]):
3125         (-[DOMTestObj setCustomAttr:]):
3126         (-[DOMTestObj scriptStringAttr]):
3127         (-[DOMTestObj voidMethod]):
3128         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
3129         (-[DOMTestObj intMethod]):
3130         (-[DOMTestObj intMethodWithArgs:strArg:objArg:]):
3131         (-[DOMTestObj objMethod]):
3132         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
3133         (-[DOMTestObj methodThatRequiresAllArgs:objArg:]):
3134         (-[DOMTestObj methodThatRequiresAllArgsAndThrows:objArg:]):
3135         (-[DOMTestObj serializedValue:]):
3136         (-[DOMTestObj methodWithException]):
3137         (-[DOMTestObj customMethod]):
3138         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
3139         (-[DOMTestObj customArgsAndException:]):
3140         (-[DOMTestObj addEventListener:listener:useCapture:]):
3141         (-[DOMTestObj removeEventListener:listener:useCapture:]):
3142         (-[DOMTestObj withDynamicFrame]):
3143         (-[DOMTestObj withDynamicFrameAndArg:]):
3144         (-[DOMTestObj withDynamicFrameAndOptionalArg:optionalArg:]):
3145         (-[DOMTestObj withDynamicFrameAndUserGesture:]):
3146         (-[DOMTestObj withDynamicFrameAndUserGestureASAD:optionalArg:]):
3147         (-[DOMTestObj withScriptStateVoid]):
3148         (-[DOMTestObj withScriptStateObj]):
3149         (-[DOMTestObj withScriptStateVoidException]):
3150         (-[DOMTestObj withScriptStateObjException]):
3151         (-[DOMTestObj methodWithOptionalArg:]):
3152         (-[DOMTestObj methodWithNonOptionalArgAndOptionalArg:opt:]):
3153         (-[DOMTestObj methodWithNonOptionalArgAndTwoOptionalArgs:opt1:opt2:]):
3154         * bindings/v8/ScriptController.cpp:
3155         (WebCore::ScriptController::canAccessFromCurrentOrigin):
3156         * bindings/v8/ScriptController.h:
3157         * html/HTMLFrameElementBase.cpp:
3158         (WebCore::HTMLFrameElementBase::isURLAllowed):
3159
3160 2010-05-18  Drew Wilson  <atwilson@chromium.org>
3161
3162         Unreviewed: Speculative build fix for Chromium win.
3163
3164         * platform/graphics/skia/SkiaFontWin.cpp: Properly set inlineCapacity.
3165
3166 2010-05-18  Drew Wilson  <atwilson@chromium.org>
3167
3168         Unreviewed fix for Chromium build break.
3169
3170         * platform/graphics/skia/SkiaFontWin.cpp: Now set inlineCapacity param.
3171
3172 2010-05-18  Daniel Cheng  <dcheng@chromium.org>
3173
3174         Reviewed by Darin Adler, Jian Li.
3175
3176         DragData::asURL() shouldn't do file validity checks
3177         https://bugs.webkit.org/show_bug.cgi?id=38711
3178
3179         There's no point to trying to make sure the file is valid in
3180         DragData::asURL(). It's better to ask for forgiveness than to ask for
3181         permission, since asking for permission is prone to race conditions
3182         and results in unnecessary I/O.  Consumers of this function either:
3183         - need to verify the file exists themselves (e.g. the loader)
3184         - don't care about file validity (rich text drag-and-drop)
3185
3186         * platform/chromium/DragDataChromium.cpp:
3187         (WebCore::DragData::asURL):
3188
3189 2010-05-18  Timothy Hatcher  <timothy@apple.com>
3190
3191         Fix a handful of various localization issues in the Web Inspector.
3192
3193         * Localize strings that where not localized.
3194         * Make WebInspector.UIString work without bind.
3195         * Always pass WebInspector.UIString to Number.secondsToString and Number.bytesToString.
3196         * Never pass a variable to WebInspector.UIString, since that prevents auto-generation.
3197         * Use an ellipsis instead of three periods.
3198
3199         https://webkit.org/b/39303
3200         rdar://problem/7997101
3201
3202         Reviewed by Adam Roben.
3203
3204         * English.lproj/localizedStrings.js:
3205         * inspector/front-end/AuditRules.js:
3206         (WebInspector.AuditRules.GzipRule.prototype.doRun):
3207         (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies):
3208         (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
3209         * inspector/front-end/ConsoleView.js:
3210         (WebInspector.ConsoleView):
3211         * inspector/front-end/ImageView.js:
3212         (WebInspector.ImageView.prototype.contentTabSelected):
3213         * inspector/front-end/ProfileDataGridTree.js:
3214         (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
3215         (WebInspector.ProfileDataGridNode.prototype.get data):
3216         * inspector/front-end/ResourcesPanel.js:
3217         (WebInspector.ResourceTimeCalculator.prototype.formatValue):
3218         (WebInspector.ResourceTransferTimeCalculator.prototype.formatValue):
3219         (WebInspector.ResourceTransferDurationCalculator.prototype.formatValue):
3220         (WebInspector.ResourceTransferSizeCalculator.prototype.formatValue):
3221         * inspector/front-end/ScriptsPanel.js:
3222         (WebInspector.ScriptsPanel.prototype._registerShortcuts):
3223         * inspector/front-end/SourceFrame.js:
3224         (WebInspector.SourceFrame.prototype._contextMenu):
3225         * inspector/front-end/TimelineOverviewPane.js:
3226         (WebInspector.TimelineOverviewCalculator):
3227         (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
3228         * inspector/front-end/TimelinePanel.js:
3229         (WebInspector.TimelinePanel):
3230         (WebInspector.TimelineCalculator):
3231         (WebInspector.TimelineCalculator.prototype.formatValue):
3232         (WebInspector.TimelinePanel.FormattedRecord.prototype._generateAggregatedInfo):
3233         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
3234         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
3235         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendTextRow):
3236         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendElementRow):
3237         * inspector/front-end/inspector.js:
3238         (WebInspector.loaded):
3239         (WebInspector.setRecordingProfile):
3240         (WebInspector.UIString):
3241
3242 2010-05-18  Sam Weinig  <sam@webkit.org>
3243
3244         Another attempt to fix the build.
3245
3246         * css/CSSCursorImageValue.cpp:
3247
3248 2010-05-18  Adam Roben  <aroben@apple.com>
3249
3250         Make accelerated compositing work on machines that don't support
3251         hardware vertex processing
3252
3253         Fixes <http://webkit.org/b/39299> <rdar://problem/7997692> Accelerated
3254         compositing on Windows doesn't work on machines that don't support
3255         hardware vertex processing, but should
3256
3257         Reviewed by Eric Carlson.
3258
3259         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3260         (WebCore::WKCACFLayerRenderer::createRenderer): Query the device
3261         capabilities to decide whether to request hardware or software vertex
3262         processing.
3263
3264 2010-05-18  Adam Roben  <aroben@apple.com>
3265
3266         Make WKCACFLayerRenderer robust against temporary failure of
3267         Direct3DCreate9 and IDirect3D9::CreateDevice
3268
3269         For a short time after waking from sleep, Direct3DCreate9() will
3270         return an IDirect3D9 for which IDirect3D9::CreateDevice will always
3271         fail. Also during this time period, IDirect3D9::CreateDevice
3272         will fail even for non-bad IDirect3D9s. (It will later start
3273         succeeding.) WKCACFLayerRenderer now works around this behavior by
3274         detecting when it might be in this situation and calling these
3275         functions again later.
3276
3277         Fixes <http://webkit.org/b/39297> <rdar://problem/7997431> WebView
3278         doesn't repaint until page reloads when page using hardware
3279         acceleration loads just after waking from sleep
3280
3281         Reviewed by John Sullivan.
3282
3283         * manual-tests/crash-and-no-repaint-after-wake-from-sleep.html:
3284         Renamed from WebCore/manual-tests/crash-after-wake-from-sleep.html.
3285         Modified to also include instructions for reproducing this bug.
3286
3287         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3288         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Replaced
3289         m_triedToCreateD3DRenderer with m_mightBeAbleToCreateDeviceLater. The
3290         new member is initialized to true, since we haven't even tried to
3291         create a device once yet.
3292         (WebCore::WKCACFLayerRenderer::createRenderer): If we already have a
3293         D3D device, or we don't have one and are sure that we won't be able to
3294         create one later, just return the previously-created device, if any.
3295         We assume that we won't be able to create a device later if this
3296         function fails, unless the function fails due to CreateDevice failing.
3297         As noted above, CreateDevice will sometimes temporarily fail and then
3298         later start working again. When CreateDevice fails, we also assume
3299         that we might have a bad IDirect3D9, so we get rid of the one we have
3300         so a new (and hopefully non-bad) one will be allocated later.
3301         (WebCore::WKCACFLayerRenderer::destroyRenderer): Reset
3302         m_mightBeAbleToCreateDeviceLater to true, since we no longer have a
3303         device.
3304         (WebCore::WKCACFLayerRenderer::paint): Before trying to paint, try to
3305         create our D3D device and renderer. If this fails, we bail out, but if
3306         we think we might be able to create a device later we schedule another
3307         paint (via renderSoon()) so that we'll try again soon.
3308
3309         * platform/graphics/win/WKCACFLayerRenderer.h: Replaced
3310         m_triedToCreateD3DRenderer with m_mightBeAbleToCreateDeviceLater.
3311
3312 2010-05-18  Adam Roben  <aroben@apple.com>
3313
3314         Fix a crash when a page that uses accelerated compositing loads soon
3315         after the computer wakes from sleep
3316
3317         The set-up:
3318
3319         For a short time after waking from sleep, IDirect3D9::CreateDevice
3320         will fail. This caused WKCACFLayerRenderer::createRenderer to fail,
3321         and meant that WKCACFLayerRenderer never allocated a root layer.
3322         WebView wouldn't notice that createRenderer failed, and would go ahead
3323         and try to use the root layer anyway, resulting in a crash.
3324
3325         The fix:
3326
3327         We now allocate the root layer (and all the other members of
3328         WKCACFLayerRenderer that aren't dependent on having an
3329         IDirect3DDevice9) in WKCACFLayerRenderer's constructor. This way the
3330         layers will always be present, even when creating the D3D device
3331         fails.
3332
3333         There are two remaining problems:
3334           1) This results in slightly more memory usage in the case where
3335              CreateDevice fails.
3336           2) Once we get into this bad state, the WebView doesn't repaint
3337              until we navigate somewhere else.
3338
3339         (2) is covered by
3340         <http://webkit.org/b/39297>/<rdar://problem/7997431>. We'll fix it by
3341         retrying CreateDevice later in hopes that it will succeed after more
3342         time has passed. This will in turn fix (1). (We should never end up in
3343         a case where CreateDevice fails forever because we already did some
3344         preliminary checks in acceleratedCompositingAvailable().)
3345
3346         Fixes <http://webkit.org/b/39295> <rdar://problem/7971319> Crash
3347         (preceded by assertion) in WKCACFLayerRenderer::setNeedsDisplay when
3348         computer wakes from sleep on particular page
3349
3350         Reviewed by John Sullivan.
3351
3352         * manual-tests/crash-after-wake-from-sleep.html: Added. This
3353         is the Poster Circle demo from webkit.org/blog, but modified to
3354         automatically reload every 5 seconds and with instructions to put the
3355         computer to sleep and wake it up again.
3356
3357         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3358         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Moved code to
3359         initialize m_context, m_renderContext, and m_*Layer here...
3360         (WebCore::WKCACFLayerRenderer::createRenderer): ...from here.
3361
3362 2010-05-18  Adam Roben  <aroben@apple.com>
3363
3364         Remove an unused member variable from WKCACFLayerRenderer
3365
3366         Rubber-stamped by Ada Chan.
3367
3368         * platform/graphics/win/WKCACFLayerRenderer.h: Removed m_viewLayer,
3369         which is unused.
3370
3371 2010-05-18  Anders Carlsson  <andersca@apple.com>
3372
3373         Reviewed by Sam Weinig.
3374
3375         Allocate the m_preloads list hash set dynamically and free it when done.
3376         https://bugs.webkit.org/show_bug.cgi?id=39309
3377         <rdar://problem/7998495>
3378
3379         This saves about 6000 bytes on a fully loaded document.
3380
3381         * loader/DocLoader.cpp:
3382         (WebCore::DocLoader::requestPreload):
3383         (WebCore::DocLoader::clearPreloads):
3384         * loader/DocLoader.h:
3385
3386 2010-05-18  Anders Carlsson  <andersca@apple.com>
3387
3388         Revert unintended indentation and unnecessary nested name specifier.
3389
3390         * rendering/RenderBlock.cpp:
3391         (WebCore::clipOutPositionedObjects):
3392         (WebCore::RenderBlock::insertPositionedObject):
3393
3394 2010-05-18  Anders Carlsson  <andersca@apple.com>
3395
3396         Reviewed by Sam Weinig.
3397
3398         Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set.
3399         https://bugs.webkit.org/show_bug.cgi?id=39304
3400         <rdar://problem/7998366>
3401
3402         Set the inlineCapacity for the positionedObjects ListHashSet to 4 instead of 256. Since a RenderBlock usually has 
3403         few positioned objects, this saves memory.
3404
3405         * WebCore.base.exp:
3406         * rendering/RenderBlock.cpp:
3407         (WebCore::clipOutPositionedObjects):
3408         (WebCore::RenderBlock::insertPositionedObject):
3409         * rendering/RenderBlock.h:
3410         (WebCore::RenderBlock::positionedObjects):
3411
3412 2010-05-17  Sam Weinig  <sam@webkit.org>
3413
3414         Reviewed by Darin Adler.
3415
3416         https://bugs.webkit.org/show_bug.cgi?id=39258
3417         Remove NamedAttrMap residual gunk
3418
3419         Replace NamedAttrMap.h/cpp with NamedNodeMap.h/cpp which was the class
3420         it contained.
3421
3422         * CMakeLists.txt:
3423         * GNUmakefile.am:
3424         * WebCore.gypi:
3425         * WebCore.pro:
3426         * WebCore.vcproj/WebCore.vcproj:
3427         * WebCore.xcodeproj/project.pbxproj:
3428         * bindings/v8/custom/V8NamedNodesCollection.cpp:
3429         * dom/NamedAttrMap.cpp: Removed.
3430         * dom/NamedAttrMap.h: Removed.
3431         * dom/NamedNodeMap.cpp: Copied from dom/NamedAttrMap.cpp.
3432         * dom/NamedNodeMap.h: Replaced with dom/NamedAttrMap.h.
3433         * editing/ReplaceNodeWithSpanCommand.cpp:
3434         * platform/chromium/ClipboardChromium.cpp:
3435
3436 2010-05-18  Brady Eidson  <beidson@apple.com>
3437
3438         Reviewed by Eric Carlson.
3439
3440         <rdar://problem/7993468> REGRESSION (r58586): Audio doesn't play on first click of play button at NPR.org
3441
3442         NPR swallows the first mouse click on the play button, calls load() on the element, then waits for the
3443         canplay event to come in before calling play itself.
3444
3445         After the site specific hack added in r58586, we disallowed play() from within the canplay event handler.
3446         By tracking whether a load() was triggered by a user gesture, we can differentiate between the original
3447         canplay event that we meant to ignore and the one resulting from the first mouse click which we want to honor.
3448         
3449         No new tests. (Currently no way to test such site specific hack behavior)
3450
3451         * html/HTMLMediaElement.cpp:
3452         (WebCore::HTMLMediaElement::HTMLMediaElement):
3453         (WebCore::HTMLMediaElement::load): Set the m_loadInitiatedByUserGesture flag
3454         (WebCore::HTMLMediaElement::play): Only apply the site specific hack if the load wasn't initiated by a user gesture.
3455         * html/HTMLMediaElement.h:
3456
3457 2010-05-18  Jakob Petsovits  <jpetsovits@rim.com>
3458
3459         Reviewed by Dirk Schulze.
3460
3461         [OpenVG] Fix stupid build errors from the OpenVG Path commit
3462         https://bugs.webkit.org/show_bug.cgi?id=39228
3463
3464         * platform/graphics/openvg/PainterOpenVG.cpp:
3465         (WebCore::PainterOpenVG::clipPath):
3466         * platform/graphics/openvg/PathOpenVG.cpp:
3467         (WebCore::Path::transform):
3468
3469 2010-05-18  Chris Jerdonek  <cjerdonek@webkit.org>
3470
3471         Reviewed by Darin Adler.
3472
3473         Refactored FrameLoader::isDocumentSandboxed() from a private member function
3474         to a static, non-member, non-friend function.
3475
3476         https://bugs.webkit.org/show_bug.cgi?id=39157
3477
3478         Making this function non-private lets us make FrameLoader::createWindow()
3479         a non-member function in a subsequent patch.  We also made it non-member
3480         rather than member to increase encapsulation and limit the number of
3481         public functions with access to private FrameLoader data.
3482
3483         No new functionality, so no new tests.
3484
3485         * loader/FrameLoader.cpp:
3486         (WebCore::isDocumentSandboxed):
3487           - Moved this function from a private member function of FrameLoader
3488             to a static, non-member, non-friend function.
3489         (WebCore::FrameLoader::createWindow):
3490           - Updated the call to isDocumentSandboxed().
3491         (WebCore::FrameLoader::submitForm):
3492           - Updated the call to isDocumentSandboxed().
3493         (WebCore::FrameLoader::requestObject):
3494           - Updated the call to isDocumentSandboxed().
3495         (WebCore::FrameLoader::shouldAllowNavigation):
3496           - Updated the call to isDocumentSandboxed().
3497         * loader/FrameLoader.h:
3498           - Removed isDocumentSandboxed() and added a FIXME to move
3499             createWindow() out of the FrameLoader class.
3500
3501 2010-05-08  Robert Hogan  <robert@roberthogan.net>
3502
3503         Reviewed by Simon Hausmann.
3504
3505         [Qt] Fix http/tests/xmlhttprequest/cross-origin-no-authorization.html
3506              and http/tests/xmlhttprequest/cross-origin-authorization.html
3507
3508         QHttpNetworkRequest adds Authorization and Cookie headers to XHRs
3509         without knowing if this is valid behaviour or not. In order to allow
3510         Qt to decide whether Cookie/Authorization headers should be added
3511         to an XHR QtWebKit needs to use an attribute added to QNetworkRequest.
3512         These new attributes are: QNetworkRequest::CookieLoadControlAttribute,
3513         QNetworkRequest::CookieSaveControlAttribute,and
3514         QNetworkRequest::AuthenticationReuseControlAttribute.
3515
3516         QtWebKit will set QNetworkRequest::AuthenticationReuseControlAttribute to false
3517         unless withCredentials is set to true in the XHR.
3518
3519         QtWebkit will set CookieLoad/SaveControlAttribute to false unless withCredentials
3520         is set to true in the XHR.
3521
3522         Qt will pass the values onto QHttpNetworkRequest and this will permit
3523         the Qt network access processing to decide whether or not to add either
3524         or both of the Cookie/Authorisation headers, and whether to save cookies
3525         returned from such requests. By default the attribute
3526         will always be true so unless QtWebKit sets it to false normal
3527         header processing is unaffected.
3528
3529         The Qt part of these changes was merged at: http://gitorious.org/qt/qt/merge_requests/592
3530
3531         https://bugs.webkit.org/show_bug.cgi?id=32967
3532
3533         * platform/network/qt/ResourceRequestQt.cpp:
3534         (WebCore::ResourceRequest::toNetworkRequest):
3535
3536 2010-05-18  Zoltan Herczeg  <zherczeg@webkit.org>
3537
3538         Reviewed by Kenneth Rohde Christiansen.
3539
3540         [Qt] Implementing clipToImageBuffer for Qt port.
3541         https://bugs.webkit.org/show_bug.cgi?id=24289
3542
3543         The implementation combines pixmap layers and destinationIn
3544         composition mode.
3545
3546         * platform/graphics/qt/GraphicsContextQt.cpp:
3547         (WebCore::TransparencyLayer::TransparencyLayer):
3548         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3549         (WebCore::GraphicsContext::savePlatformState):
3550         (WebCore::GraphicsContext::restorePlatformState):
3551         (WebCore::GraphicsContext::inTransparencyLayer):
3552         (WebCore::GraphicsContext::beginTransparencyLayer):
3553         (WebCore::GraphicsContext::endTransparencyLayer):
3554         (WebCore::GraphicsContext::clipToImageBuffer):
3555
3556 2010-05-18  Eric Seidel  <eric@webkit.org>
3557
3558         Unreviewed build fix.
3559
3560         Make it possible to enable the new HTML5Tokenizer for testing
3561         https://bugs.webkit.org/show_bug.cgi?id=39275
3562
3563         * WebCore.gypi:
3564          - Fix HTMLLexer.* -> HTML5Lexer.*
3565         * WebCore.vcproj/WebCore.vcproj:
3566          - Add HTML5Lexer and HTML5Tokenizer to project.
3567
3568 2010-05-18  Eric Seidel  <eric@webkit.org>
3569
3570         Unreviewed build fix.
3571
3572         Make it possible to enable the new HTML5Tokenizer for testing
3573         https://bugs.webkit.org/show_bug.cgi?id=39275
3574
3575         * dom/NamedAttrMap.cpp:
3576         (WebCore::NamedNodeMap::setNamedItemNS):
3577          - Move this to the .cpp file so as to avoid needing to include "Node.h" in the header.
3578         * dom/NamedAttrMap.h:
3579         * html/HTML5Token.h:
3580          - Remove #include "String.h" which was wrong.  Adam meant "PlatformString.h"
3581          - Remove unneeded #include "Node.h", it was only needed because
3582            NamedAttrMap.h was incorrectly depending on Node.h but not
3583            including it.  It didn't actually need Node.h except for one
3584            inlined method setNamedItemNS, so I moved setNamedItemNS into
3585            the .cpp to get rid of the Node.h requirement.
3586
3587 2010-05-18  Eric Seidel  <eric@webkit.org>
3588
3589         Reviewed by Adam Barth.
3590
3591         Make it possible to enable the new HTML5Tokenizer for testing
3592         https://bugs.webkit.org/show_bug.cgi?id=39275
3593
3594         I added html5ParserEnabled to Settings so that we can enable/disable
3595         the HTML5 parser for testing.
3596
3597         I also ripped out a bunch of dead code from HTML5Lexer.
3598
3599         I had to add HTML5Lexer/HTML5Tokenizer to all build systems so that
3600         the build wouldn't fail now that we reference these classes from HTMLDocument.
3601
3602         * Android.mk:
3603         * CMakeLists.txt:
3604         * GNUmakefile.am:
3605         * WebCore.gypi:
3606         * WebCore.pro:
3607         * WebCore.xcodeproj/project.pbxproj:
3608         * html/HTML5Lexer.cpp:
3609         (WebCore::HTML5Lexer::reset):
3610         (WebCore::isWhitespace):
3611         (WebCore::HTML5Lexer::nextToken):
3612         * html/HTML5Lexer.h:
3613         * html/HTML5Tokenizer.cpp: Added.
3614         (WebCore::HTML5Tokenizer::HTML5Tokenizer):
3615         (WebCore::HTML5Tokenizer::~HTML5Tokenizer):
3616         (WebCore::HTML5Tokenizer::begin):
3617         (WebCore::HTML5Tokenizer::write):
3618         (WebCore::HTML5Tokenizer::end):
3619         (WebCore::HTML5Tokenizer::finish):
3620         (WebCore::HTML5Tokenizer::isWaitingForScripts):
3621         * html/HTML5Tokenizer.h: Added.
3622         * html/HTMLDocument.cpp:
3623         (WebCore::HTMLDocument::createTokenizer):
3624         * html/HTMLTokenizer.h:
3625         * html/HTMLViewSourceDocument.cpp:
3626         (WebCore::HTMLViewSourceDocument::createTokenizer):
3627         * page/Settings.cpp:
3628         (WebCore::Settings::Settings):
3629         * page/Settings.h:
3630         (WebCore::Settings::setHTML5ParserEnabled):
3631         (WebCore::Settings::html5ParserEnabled):
3632
3633 2010-05-18  Maciej Stachowiak  <mjs@apple.com>
3634
3635         Not reviewed, build fix.
3636
3637         Attempt to fix build for v8 bindings (untested).
3638
3639         * bindings/v8/ScriptController.cpp:
3640         (WebCore::ScriptController::clearWindowShell):
3641         * bindings/v8/ScriptController.h:
3642
3643 2010-05-17  Maciej Stachowiak  <mjs@apple.com>
3644
3645         Reviewed by Oliver Hunt.
3646
3647         GC more promptly when navigating to a new inner window, but not at all when it went in the page cache
3648         https://bugs.webkit.org/show_bug.cgi?id=39254
3649         <rdar://problem/7996370>
3650
3651         ~1% PLT speedup
3652         ~4% iBench HTML speedup
3653
3654         * bindings/js/GCController.cpp:
3655         (WebCore::GCController::garbageCollectSoon): Change back to a 0 delay timer instead of
3656         0.5 second.
3657         * bindings/js/ScriptController.cpp:
3658         (WebCore::ScriptController::clearWindowShell): Add a new boolean parameter. Don't
3659         garbageColectSoon if the page is going into the page cache.
3660         * bindings/js/ScriptController.h: Prototype change for above.
3661         * loader/FrameLoader.cpp:
3662         (WebCore::FrameLoader::clear): Indicate when the page is going into the page cache.
3663
3664 2010-05-18  Adam Barth  <abarth@webkit.org>
3665
3666         Reviewed by Eric Seidel.
3667
3668         Add an HTML5Token
3669         https://bugs.webkit.org/show_bug.cgi?id=39274
3670
3671         The token object is an ugly fake union, but I'm sure sure there's a
3672         better way...  Eric needs this to provide output for the test harness.
3673
3674         * WebCore.xcodeproj/project.pbxproj:
3675         * html/HTML5Lexer.cpp:
3676         (WebCore::HTML5Lexer::HTML5Lexer):
3677         (WebCore::HTML5Lexer::write):
3678         (WebCore::HTML5Lexer::emitCharacter):
3679         * html/HTML5Lexer.h:
3680         * html/HTML5Token.h: Added.
3681         (WebCore::HTML5Token::):
3682         (WebCore::HTML5Token::HTML5Token):
3683         (WebCore::HTML5Token::setToCharacter):
3684
3685 2010-05-18  Adam Barth  <abarth@webkit.org>
3686
3687         Reviewed by Eric Seidel.
3688
3689         Implement ScriptData states for HTML5Lexer
3690         https://bugs.webkit.org/show_bug.cgi?id=39273
3691
3692         This patch implements more of the lexer states according to the HTML5
3693         specification.  Currently, this code is compiled by not tested.  We're
3694         working on bringing up a test harness in parallel with transliterating
3695         the spec into code.
3696
3697         * html/HTML5Lexer.cpp:
3698         (WebCore::HTML5Lexer::tokenize):
3699         (WebCore::HTML5Lexer::temporaryBufferIs):
3700         * html/HTML5Lexer.h:
3701         (WebCore::HTML5Lexer::):
3702
3703 2010-05-17  Eric Seidel  <eric@webkit.org>
3704
3705         Reviewed by Adam Barth.
3706
3707         Rename HTML5Tokenzier to HTML5Lexer so that we can add a new HTML5Tokenizer which implements Tokenizer
3708         https://bugs.webkit.org/show_bug.cgi?id=39272
3709
3710         Strictly a rename, no functionality change.
3711
3712         * WebCore.xcodeproj/project.pbxproj:
3713         * html/HTML5Lexer.cpp: Added.
3714         * html/HTML5Lexer.h: Added.
3715         * html/HTML5Tokenizer.cpp: Removed.
3716         * html/HTML5Tokenizer.h: Removed.
3717
3718 2010-05-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3719
3720         Unreviewed, rolling out r59652.
3721         http://trac.webkit.org/changeset/59652
3722         https://bugs.webkit.org/show_bug.cgi?id=39268
3723
3724         file-input-files-access test is broken on Mac (Requested by
3725         dcheng on #webkit).
3726
3727         * platform/chromium/DragDataChromium.cpp:
3728         (WebCore::DragData::asURL):
3729
3730 2010-05-17  Adam Barth  <abarth@webkit.org>
3731
3732         Reviewed by Eric Seidel.
3733
3734         Implement RAWTEXT tokenizer states
3735         https://bugs.webkit.org/show_bug.cgi?id=39267
3736
3737         More tokenizer states.  There's a bunch of functionality notImplemented
3738         that we'll come back to.
3739
3740         * html/HTML5Tokenizer.cpp:
3741         (WebCore::HTML5Tokenizer::tokenize):
3742         * html/HTML5Tokenizer.h:
3743
3744 2010-05-17  Adam Barth  <abarth@webkit.org>
3745
3746         Reviewed by Eric Seidel.
3747
3748         Implement more parser states in HTML5Tokenizer
3749         https://bugs.webkit.org/show_bug.cgi?id=39265
3750
3751         This patch implements some easy states.  I'll come back and do the
3752         harder states later.
3753
3754         * html/HTML5Tokenizer.cpp:
3755         (WebCore::HTML5Tokenizer::tokenize):
3756         (WebCore::HTML5Tokenizer::emitParseError):
3757         * html/HTML5Tokenizer.h:
3758
3759 2010-05-17  Daniel Cheng  <dcheng@chromium.org>
3760
3761         Reviewed by Darin Adler.
3762
3763         DragData::asURL() shouldn't do file validity checks
3764         https://bugs.webkit.org/show_bug.cgi?id=38711
3765
3766         There's no point to trying to make sure the file is valid in
3767         DragData::asURL(). It's better to ask for forgiveness than to ask for
3768         permission, since asking for permission is prone to race conditions
3769         and results in unnecessary I/O.  Consumers of this function either:
3770         - need to verify the file exists themselves (e.g. the loader)
3771         - don't care about file validity (rich text drag-and-drop)
3772
3773         * platform/chromium/DragDataChromium.cpp:
3774         (WebCore::DragData::asURL):
3775
3776 2010-05-17  Adam Barth  <abarth@webkit.org>
3777
3778         Reviewed by Eric Seidel.
3779
3780         Update states in HTML5Tokenizer to match HTML5 spec
3781         https://bugs.webkit.org/show_bug.cgi?id=39264
3782
3783         I've also implemented the DataState.  More states to follow.
3784
3785         * html/HTML5Tokenizer.cpp:
3786         (WebCore::HTML5Tokenizer::reset):
3787         (WebCore::HTML5Tokenizer::tokenize):
3788         * html/HTML5Tokenizer.h:
3789         (WebCore::HTML5Tokenizer::):
3790
3791 2010-05-17  Kent Tamura  <tkent@chromium.org>
3792
3793         Reviewed by Darin Adler.
3794
3795         ':valid' CSS selector should not be applied to some form controls
3796         https://bugs.webkit.org/show_bug.cgi?id=39162
3797
3798         * html/HTMLElement.cpp:
3799         (WebCore::inlineTagList): Always includes progressTag. This change is
3800         needed in a case of no ENABLE_PROGRESS_TAG. Without this change and
3801         ENABLE_PROGRESS_TAG, <progress> tags disappear.
3802         * html/HTMLInputElement.cpp:
3803         (WebCore::HTMLInputElement::recalcWillValidate):
3804           Return false for SUBMIT and IMAGE.
3805         * html/HTMLProgressElement.h:
3806         (WebCore::HTMLProgressElement::recalcWillValidate):
3807           Return false. This change is needed in a case of ENABLE_PROGRESS_TAG.
3808
3809 2010-05-17  Adam Barth  <abarth@webkit.org>
3810
3811         Reviewed by Eric Seidel.
3812
3813         Remove load-related code from HTML5Tokenizer
3814         https://bugs.webkit.org/show_bug.cgi?id=39263
3815
3816         This code is related to reloading resources and not to tokenizing.  In
3817         the PreloadScanner, these concerns are coupled, but we want to decouple
3818         them.
3819
3820         * html/HTML5Tokenizer.cpp:
3821         (WebCore::HTML5Tokenizer::HTML5Tokenizer):
3822         (WebCore::HTML5Tokenizer::~HTML5Tokenizer):
3823         (WebCore::HTML5Tokenizer::begin):
3824         (WebCore::HTML5Tokenizer::end):
3825         (WebCore::HTML5Tokenizer::reset):
3826         (WebCore::HTML5Tokenizer::write):
3827         (WebCore::HTML5Tokenizer::consumeEntity):
3828         (WebCore::HTML5Tokenizer::tokenize):
3829         (WebCore::HTML5Tokenizer::processAttribute):
3830         (WebCore::HTML5Tokenizer::emitCharacter):
3831         (WebCore::HTML5Tokenizer::emitTag):
3832         * html/HTML5Tokenizer.h:
3833
3834 2010-05-17  Adam Barth  <abarth@webkit.org>
3835
3836         Reviewed by Eric Seidel.
3837
3838         Add HTML5Tokenizer to the build system on Mac
3839         https://bugs.webkit.org/show_bug.cgi?id=39262
3840
3841         This file will be easier to work with if we're actually compiling it.
3842         Hopefully we'll get this wired into the PreloadScanner soon.  Once we
3843         start actually calling the code, we'll add it to the build system on
3844         other platforms.
3845
3846         * WebCore.xcodeproj/project.pbxproj:
3847
3848 2010-05-17  Eric Seidel  <eric@webkit.org>
3849
3850         Reviewed by Adam Barth.
3851
3852         Copy PreloadScanner.* to HTML5Tokenizer.* to start work on the new HTML5 Tokenizer
3853         https://bugs.webkit.org/show_bug.cgi?id=39261
3854
3855         * html/HTML5Tokenizer.cpp: Rename PreloadScanner to HTML5Tokenizer.
3856         * html/HTML5Tokenizer.h: ditto.
3857
3858 2010-05-17  Eric Seidel  <eric@webkit.org>
3859
3860         Reviewed by Adam Barth.
3861
3862         Copy PreloadScanner.* to HTML5Tokenizer.* to start work on the new HTML5 Tokenizer
3863         https://bugs.webkit.org/show_bug.cgi?id=39261
3864
3865         This time copy the cpp from the right file.
3866
3867         * html/HTML5Tokenizer.cpp: Copied from WebCore/html/PreloadScanner.cpp.
3868
3869 2010-05-17  Eric Seidel  <eric@webkit.org>
3870
3871         Reviewed by Adam Barth.
3872
3873         Copy PreloadScanner.* to HTML5Tokenizer.* to start work on the new HTML5 Tokenizer
3874         https://bugs.webkit.org/show_bug.cgi?id=39261
3875
3876         * html/HTML5Tokenizer.cpp: Copied from WebCore/html/PreloadScanner.h.
3877         * html/HTML5Tokenizer.h: Copied from WebCore/html/PreloadScanner.h.
3878
3879 2010-05-17  MORITA Hajime  <morrita@google.com>
3880
3881         Reviewed by Kent Tamura.
3882
3883         [Chromium] Windows: Speed of indeterminate progress bar should be constant
3884         https://bugs.webkit.org/show_bug.cgi?id=39211
3885
3886         No new tests, animation effect can be confirmed only manually.
3887
3888         * rendering/RenderThemeChromiumWin.cpp:
3889         (WebCore::RenderThemeChromiumWin::animationDurationForProgressBar):
3890         (WebCore::RenderThemeChromiumWin::paintProgressBar):
3891
3892 2010-05-17  Drew Wilson  <atwilson@chromium.org>
3893
3894         Unreviewed build fix for Qt and Chromium.
3895
3896         https://bugs.webkit.org/show_bug.cgi?id=39147
3897
3898         * page/Frame.h: Now includes CSSMutableStyleDeclaration.h.
3899
3900 2010-05-17  Simon Fraser  <simon.fraser@apple.com>
3901
3902         Reviewed by Darin Adler.
3903
3904         Remove unused member member from Document
3905         https://bugs.webkit.org/show_bug.cgi?id=39251
3906
3907         Remove m_associatedHistoryItems from Document; it is never used.
3908
3909         * dom/Document.h:
3910
3911 2010-05-17  Darin Adler  <darin@apple.com>
3912
3913         Fix Qt build.
3914
3915         * page/Frame.cpp:
3916         (WebCore::Frame::setTypingStyle): Move back to make non-inline.
3917         * page/Frame.h: Removed inline version of setTypingStyle.
3918
3919 2010-05-14  Darin Adler  <darin@apple.com>
3920
3921         Reviewed by Brady Eidson.
3922
3923         Frame has many trivial member functions that should be inlined
3924         https://bugs.webkit.org/show_bug.cgi?id=39147
3925
3926         * WebCore.base.exp: Export the functions that are now inlined.
3927
3928         * page/Frame.cpp:
3929         (WebCore::Frame::removeEditingStyleFromBodyElement):
3930         Removed the body of this function.
3931
3932         * page/Frame.h:
3933         (WebCore::Frame::init): Moved here from .cpp.
3934         (WebCore::Frame::loader): Ditto.
3935         (WebCore::Frame::redirectScheduler): Ditto.
3936         (WebCore::Frame::view): Ditto.
3937         (WebCore::Frame::script): Ditto.
3938         (WebCore::Frame::document): Ditto.
3939         (WebCore::Frame::selection): Ditto.
3940         (WebCore::Frame::editor): Ditto.
3941         (WebCore::Frame::animation): Ditto.
3942         (WebCore::Frame::mark): Ditto.
3943         (WebCore::Frame::setMark): Ditto.
3944         (WebCore::Frame::zoomFactor): Ditto.
3945         (WebCore::Frame::jsStatusBarText): Ditto.
3946         (WebCore::Frame::jsDefaultStatusBarText): Ditto.
3947         (WebCore::Frame::needsReapplyStyles): Ditto.
3948         (WebCore::Frame::typingStyle): Ditto.
3949         (WebCore::Frame::setTypingStyle): Ditto.
3950         (WebCore::Frame::clearTypingStyle): Ditto.
3951         (WebCore::Frame::ownerElement): Ditto.
3952         (WebCore::Frame::isDisconnected): Ditto.
3953         (WebCore::Frame::setIsDisconnected): Ditto.
3954         (WebCore::Frame::excludeFromTextSearch): Ditto.
3955         (WebCore::Frame::setExcludeFromTextSearch): Ditto.
3956         (WebCore::Frame::inViewSourceMode): Ditto.
3957         (WebCore::Frame::setInViewSourceMode): Ditto.
3958         (WebCore::Frame::markedTextMatchesAreHighlighted): Ditto.
3959         (WebCore::Frame::tree): Ditto.
3960         (WebCore::Frame::page): Ditto.
3961         (WebCore::Frame::detachFromPage): Ditto.
3962         (WebCore::Frame::eventHandler): Ditto.
3963         (WebCore::Frame::shouldClose): Ditto.
3964
3965 2010-05-17  Anders Carlsson  <andersca@apple.com>
3966
3967         Reviewed by Sam Weinig.
3968
3969         https://bugs.webkit.org/show_bug.cgi?id=39247
3970         <rdar://problem/7994707>
3971         Move rarely used data members to the rare structures, thus saving memory.
3972
3973         Move rarely used member variables from StyleInheritedData and StyleVisualData to
3974         StyleRareInheritedData and StyleRareNonInheritedData, namely:
3975
3976         indent, cursorData, m_effectiveZoom, widows and orphans move from StyleInheritedData to StyleRareInheritedData.
3977         m_counterIncrement and m_counterReset move from StyleVisualData to StyleRareNonInheritedData.
3978
3979         * rendering/style/RenderStyle.cpp:
3980         (WebCore::RenderStyle::diff):
3981         (WebCore::RenderStyle::addCursor):
3982         (WebCore::RenderStyle::setCursorList):
3983         (WebCore::RenderStyle::clearCursorList):
3984         * rendering/style/RenderStyle.h:
3985         (WebCore::InheritedFlags::textIndent):
3986         (WebCore::InheritedFlags::effectiveZoom):
3987         (WebCore::InheritedFlags::counterIncrement):
3988         (WebCore::InheritedFlags::counterReset):
3989         (WebCore::InheritedFlags::cursors):
3990         (WebCore::InheritedFlags::widows):
3991         (WebCore::InheritedFlags::orphans):
3992         (WebCore::InheritedFlags::setTextIndent):
3993         (WebCore::InheritedFlags::setEffectiveZoom):
3994         (WebCore::InheritedFlags::setCounterIncrement):
3995         (WebCore::InheritedFlags::setCounterReset):
3996         (WebCore::InheritedFlags::setWidows):
3997         (WebCore::InheritedFlags::setOrphans):
3998         * rendering/style/StyleInheritedData.cpp:
3999         (WebCore::StyleInheritedData::StyleInheritedData):
4000         (WebCore::StyleInheritedData::operator==):
4001         * rendering/style/StyleInheritedData.h:
4002         * rendering/style/StyleRareInheritedData.cpp:
4003         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
4004         (WebCore::cursorDataEquivalent):
4005         (WebCore::StyleRareInheritedData::operator==):
4006         * rendering/style/StyleRareInheritedData.h:
4007         * rendering/style/StyleRareNonInheritedData.cpp:
4008         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
4009         (WebCore::StyleRareNonInheritedData::operator==):
4010         * rendering/style/StyleRareNonInheritedData.h:
4011         * rendering/style/StyleVisualData.cpp:
4012         (WebCore::StyleVisualData::StyleVisualData):
4013         * rendering/style/StyleVisualData.h:
4014         (WebCore::StyleVisualData::operator==):
4015
4016 2010-05-17  Robert Hogan  <robert@webkit.org>
4017
4018         Rubber-stamped by Eric Seidel.
4019
4020         Fix --no-svg build.
4021
4022         I have no idea where the SVG-dependent include of this file is hidden, but
4023         it is probably better to include it explicitly anyway like V8WorkerContextCustom.cpp.
4024
4025         * bindings/js/JSWorkerContextCustom.cpp:
4026
4027 2010-05-17  David Hyatt  <hyatt@apple.com>
4028
4029         Reviewed by Dan Bernstein.
4030
4031         https://bugs.webkit.org/show_bug.cgi?id=39231
4032
4033         Fix failures in the RTL portion of fast/multicol/layers-in-multicol.html.  Make sure block children of RTL blocks are positioned using
4034         the reduced column width instead of the total content width.
4035
4036         * rendering/RenderBlock.cpp:
4037         (WebCore::RenderBlock::determineHorizontalPosition):
4038         (WebCore::RenderBlock::nodeAtPoint):
4039         (WebCore::RenderBlock::hitTestContents):
4040         (WebCore::RenderBlock::adjustForColumns):
4041
4042 2010-05-17  Jakob Petsovits  <jpetsovits@rim.com>
4043
4044         Reviewed by George Staikos.
4045
4046         [OpenVG] Add support for decoding and drawing images
4047         https://bugs.webkit.org/show_bug.cgi?id=36072
4048
4049         OpenVG has a maximum image size (how large is
4050         specific to the OpenVG implementation), so this
4051         requires us to store them as separate image tiles.
4052
4053         Image decoding and initial drawing code by
4054         Adam Treat <atreat@rim.com>. Image decoder
4055         downsampling support by Yong Li <yoli@rim.com>.
4056
4057         * platform/graphics/ImageSource.h:
4058         * platform/graphics/openvg/ImageOpenVG.cpp: Added.
4059         (WebCore::FrameData::clear):
4060         (WebCore::BitmapImage::BitmapImage):
4061         (WebCore::BitmapImage::checkForSolidColor):
4062         (WebCore::BitmapImage::initPlatformData):
4063         (WebCore::BitmapImage::invalidatePlatformData):
4064         (WebCore::adjustSourceRectForDownSampling):
4065         (WebCore::BitmapImage::draw):
4066         (WebCore::Image::drawPattern):
4067         (WebCore::Image::loadPlatformResource):
4068         * platform/graphics/openvg/PainterOpenVG.cpp:
4069         (WebCore::PainterOpenVG::drawImage):
4070         (WebCore::PainterOpenVG::asNewNativeImage):
4071         * platform/graphics/openvg/PainterOpenVG.h:
4072         * platform/graphics/openvg/TiledImageOpenVG.cpp: Added.
4073         (WebCore::TiledImageOpenVG::TiledImageOpenVG):
4074         (WebCore::TiledImageOpenVG::operator=):
4075         (WebCore::TiledImageOpenVG::~TiledImageOpenVG):
4076         (WebCore::TiledImageOpenVG::numTiles):
4077         (WebCore::TiledImageOpenVG::numColumns):
4078         (WebCore::TiledImageOpenVG::numRows):
4079         (WebCore::TiledImageOpenVG::setTile):
4080         (WebCore::TiledImageOpenVG::tilesInRect):
4081         (WebCore::TiledImageOpenVG::tile):
4082         (WebCore::TiledImageOpenVG::tileRect):
4083         (WebCore::TiledImageOpenVG::detachTiles):
4084         (WebCore::TiledImageOpenVG::destroyTiles):
4085         * platform/graphics/openvg/TiledImageOpenVG.h: Added.
4086         (WebCore::TiledImageOpenVG::size):
4087         (WebCore::TiledImageOpenVG::maxTileSize):
4088         * platform/graphics/openvg/VGUtils.cpp:
4089         (WebCore::VGUtils::bytesForImage):
4090         (WebCore::VGUtils::bytesForImageScanline):
4091         (WebCore::VGUtils::imageFormatBitsPerPixel):
4092         (WebCore::VGUtils::endianAwareImageFormat):
4093         * platform/graphics/openvg/VGUtils.h:
4094         * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp: Added.
4095         (WebCore::RGBA32Buffer::asNewNativeImage):
4096
4097 2010-05-17  Yaar Schnitman  <yaar@chromium.org>
4098
4099         Reviewed by Darin Adler.
4100
4101         Fix JSC's generation of 'Optional' arguments. When a single 'Optional' extended attribute precedes multiple method arguments, all of these arguments are optional as a group (either all or non must be specified). This fix, which makes JSC compliant with V8 and with the Web IDL specs, is pretty harmless, since Optional is currently not being used anywhere in JSC, but it blocks further work on overloads.
4102         https://bugs.webkit.org/show_bug.cgi?id=39227
4103
4104         * bindings/scripts/CodeGeneratorJS.pm:
4105         * bindings/scripts/test/JS/JSTestObj.cpp:
4106         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
4107
4108 2010-05-16  Sam Weinig  <sam@webkit.org>
4109
4110         Reviewed by Adam Barth.
4111
4112         https://bugs.webkit.org/show_bug.cgi?id=39192
4113         Remove unused PERFECT_HASH code CodeGeneratorJS.
4114
4115         * bindings/scripts/CodeGeneratorJS.pm:
4116
4117 2010-05-17  Jeremy Moskovich  <jeremy@chromium.org>
4118
4119         Reviewed by Jeremy Orlow.
4120
4121         Remove debug code that was introduced to help narrow down the
4122         source of a crash.
4123         https://bugs.webkit.org/show_bug.cgi?id=36426
4124
4125         No change in behavior, so no new tests.
4126
4127         * loader/FrameLoader.cpp:
4128         (WebCore::FrameLoader::finishedLoadingDocument):
4129
4130 2010-05-17  Andreas Kling  <andreas.kling@nokia.com>
4131
4132         Reviewed by Kenneth Rohde Christiansen.
4133
4134         Bring CanvasRenderingContext2D's createImageData() in line with HTML5 spec
4135         Added createImageData(ImageData) which returns a new ImageData with the same size as the one passed.
4136         Changed createImageData(width, height) to use the absolute values of width and height.
4137
4138         https://bugs.webkit.org/show_bug.cgi?id=39189
4139
4140         Spec link:
4141         http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createimagedata
4142
4143         Test: fast/canvas/canvas-createImageData.html
4144
4145         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
4146         (WebCore::JSCanvasRenderingContext2D::createImageData):
4147         * html/canvas/CanvasRenderingContext2D.cpp:
4148         (WebCore::CanvasRenderingContext2D::createImageData):
4149         * html/canvas/CanvasRenderingContext2D.h:
4150         * html/canvas/CanvasRenderingContext2D.idl:
4151
4152 2010-05-17  Antti Koivisto  <koivisto@iki.fi>
4153
4154         This was missing from previous commit.
4155
4156         * platform/qt/QWebPageClient.h:
4157         (QWebPageClient::graphicsItemVisibleRect):
4158
4159 2010-05-17  Antti Koivisto  <koivisto@iki.fi>
4160
4161         Reviewed by Kenneth Rohde Christiansen.
4162
4163         https://bugs.webkit.org/show_bug.cgi?id=39218
4164         [Qt] Tiled backing store tiles sometimes flicker when exiting a zoom animation
4165         
4166         Tiles sometimes flicker when exiting a zoom animation. This happens as a result
4167         of the visible rectangle being momentarily out of sync.
4168         
4169         Instead of updating the visible rect by explicitly setting it, pull it through
4170         the client and recompute in the WebKit level.
4171
4172         * page/ChromeClient.h:
4173         (WebCore::ChromeClient::visibleRectForTiledBackingStore):
4174         * page/Frame.cpp:
4175         (WebCore::Frame::tiledBackingStoreVisibleRect):
4176         * page/Frame.h:
4177         * platform/graphics/TiledBackingStore.cpp:
4178         (WebCore::TiledBackingStore::checkVisibleRectChanged):
4179         (WebCore::TiledBackingStore::createTiles):
4180         * platform/graphics/TiledBackingStore.h:
4181         * platform/graphics/TiledBackingStoreClient.h:
4182
4183 2010-05-15  Adam Roben  <aroben@apple.com>
4184
4185         Periodically try to reset a lost IDirect3DDevice9 until we succeed
4186
4187         This is how MSDN says we must respond to a lost device (see
4188         <http://msdn.microsoft.com/en-us/library/bb174714(v=VS.85).aspx>).
4189
4190         Only testable by a manual test, unfortunately.
4191
4192         Fixes <rdar://problem/7986906> <http://webkit.org/b/39139> Pages that
4193         use hardware acceleration don't repaint after waking computer from
4194         sleep
4195
4196         Reviewed by John Sullivan.
4197
4198         * manual-tests/no-repaint-after-wake-from-sleep.html: Added. This is
4199         the Poster Circle demo from webkit.org/blog, but with instructions for
4200         putting the computer to sleep and waking it up again.
4201
4202         * platform/graphics/win/WKCACFLayerRenderer.cpp:
4203         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Initialize new
4204         member that tells us whether we need to try to reset the device before
4205         rendering.
4206         (WebCore::WKCACFLayerRenderer::resize): Changed to tell resetDevice
4207         the reason why the device needs to be reset (which is because the
4208         window's size has changed).
4209         (WebCore::WKCACFLayerRenderer::render): Before we do anything else,
4210         check if we need to reset the device before rendering. If we do, try
4211         to reset it. If that fails, bail out and set a timer to try again
4212         later. If we discover that the device is lost when calling
4213         IDirect3DDevice9::Present and resetting the device fails, bail out and
4214         set a timer to try again later.
4215         (WebCore::WKCACFLayerRenderer::resetDevice): Changed to return a
4216         boolean indicating whether resetting succeeded or not. Added a
4217         ResetReason parameter so callers can specify whey the device needs to
4218         be reset. Before trying to do anything, we call
4219         IDirect3DDevice9::TestCooperativeLevel to find out whether the device
4220         can be reset currently. If it can't, we set a flag to tell ourselves
4221         that the device must be reset before we next render, and indicate to
4222         the caller that the reset failed. If we thought the device was lost
4223         but it turns out not to be, we don't have to do anything and can tell
4224         the caller that the reset succeeded. Otherwise we go ahead and reset
4225         the device as before, and indicate to the caller that the reset
4226         succeeded.
4227
4228         * platform/graphics/win/WKCACFLayerRenderer.h: Changed resetDevice to
4229         return a boolean and take a ResetReason parameter. Added a comment
4230         about when and why this function should be called. And added