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